cmat 0.0.86 → 0.0.88

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 (228) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +9 -9
  2. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  3. package/fesm2022/cmat-components-breadcrumb.mjs +98 -80
  4. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  5. package/fesm2022/cmat-components-card.mjs +26 -34
  6. package/fesm2022/cmat-components-card.mjs.map +1 -1
  7. package/fesm2022/cmat-components-carousel.mjs +467 -556
  8. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  9. package/fesm2022/cmat-components-cascade.mjs +270 -259
  10. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  11. package/fesm2022/cmat-components-chip-input.mjs +200 -116
  12. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  13. package/fesm2022/cmat-components-code-editor.mjs +85 -38
  14. package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
  15. package/fesm2022/cmat-components-color-picker.mjs +841 -0
  16. package/fesm2022/cmat-components-color-picker.mjs.map +1 -0
  17. package/fesm2022/cmat-components-custom-formly.mjs +1395 -838
  18. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  19. package/fesm2022/cmat-components-data-picker.mjs +996 -0
  20. package/fesm2022/cmat-components-data-picker.mjs.map +1 -0
  21. package/fesm2022/cmat-components-date-range.mjs +310 -264
  22. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  23. package/fesm2022/cmat-components-date-time-display.mjs +16 -20
  24. package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
  25. package/fesm2022/cmat-components-drawer.mjs +120 -137
  26. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  27. package/fesm2022/cmat-components-empty-state.mjs +17 -24
  28. package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
  29. package/fesm2022/cmat-components-file-preview.mjs +18 -24
  30. package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
  31. package/fesm2022/cmat-components-filter-toolbar.mjs +30 -39
  32. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  33. package/fesm2022/cmat-components-form-actions.mjs +12 -12
  34. package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
  35. package/fesm2022/cmat-components-fullscreen.mjs +10 -10
  36. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  37. package/fesm2022/cmat-components-highlight.mjs +48 -41
  38. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  39. package/fesm2022/cmat-components-image-viewer.mjs +104 -107
  40. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  41. package/fesm2022/cmat-components-inline-loading.mjs +12 -15
  42. package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
  43. package/fesm2022/cmat-components-json-editor.mjs +118 -75
  44. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  45. package/fesm2022/cmat-components-knob-input.mjs +196 -178
  46. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  47. package/fesm2022/cmat-components-masonry.mjs +26 -41
  48. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  49. package/fesm2022/cmat-components-material-color-picker.mjs +81 -80
  50. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  51. package/fesm2022/cmat-components-material-datetimepicker.mjs +1212 -1287
  52. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  53. package/fesm2022/cmat-components-navigation.mjs +467 -450
  54. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  55. package/fesm2022/cmat-components-opt-input.mjs +143 -132
  56. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  57. package/fesm2022/cmat-components-org-chart.mjs +68 -83
  58. package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
  59. package/fesm2022/cmat-components-page-header.mjs +18 -24
  60. package/fesm2022/cmat-components-page-header.mjs.map +1 -1
  61. package/fesm2022/cmat-components-pagination.mjs +220 -136
  62. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  63. package/fesm2022/cmat-components-password-strength.mjs +262 -215
  64. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  65. package/fesm2022/cmat-components-popover.mjs +227 -195
  66. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  67. package/fesm2022/cmat-components-progress-bar.mjs +15 -34
  68. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  69. package/fesm2022/cmat-components-qrcode.mjs +95 -88
  70. package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
  71. package/fesm2022/cmat-components-rating.mjs +70 -67
  72. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  73. package/fesm2022/cmat-components-rich-text-editor.mjs +23 -26
  74. package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
  75. package/fesm2022/cmat-components-select-search.mjs +190 -159
  76. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  77. package/fesm2022/cmat-components-select-table.mjs +276 -213
  78. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  79. package/fesm2022/cmat-components-select-tree.mjs +178 -128
  80. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  81. package/fesm2022/cmat-components-skeleton.mjs +44 -28
  82. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  83. package/fesm2022/cmat-components-speed-dial.mjs +107 -163
  84. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  85. package/fesm2022/cmat-components-status-tag.mjs +29 -36
  86. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  87. package/fesm2022/cmat-components-table-toolbar.mjs +14 -18
  88. package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
  89. package/fesm2022/cmat-components-timeline.mjs +111 -118
  90. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  91. package/fesm2022/cmat-components-toast.mjs +65 -66
  92. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  93. package/fesm2022/cmat-components-transfer-picker.mjs +130 -160
  94. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  95. package/fesm2022/cmat-components-treetable.mjs +32 -39
  96. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  97. package/fesm2022/cmat-components-upload.mjs +186 -176
  98. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  99. package/fesm2022/cmat-directives-animate-on-scroll.mjs +25 -28
  100. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  101. package/fesm2022/cmat-directives-arrow-cursor.mjs +85 -92
  102. package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
  103. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  104. package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
  105. package/fesm2022/cmat-directives-data-exporter.mjs +49 -50
  106. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  107. package/fesm2022/cmat-directives-debounce.mjs +16 -19
  108. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  109. package/fesm2022/cmat-directives-digit-only.mjs +60 -69
  110. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  111. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  112. package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
  113. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +31 -30
  114. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
  115. package/fesm2022/cmat-lib-mock-api.mjs +6 -6
  116. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  117. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  118. package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
  119. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  120. package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
  121. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
  122. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  123. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  124. package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
  125. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  126. package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
  127. package/fesm2022/cmat-pipes-secure.mjs +7 -13
  128. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  129. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  130. package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
  131. package/fesm2022/cmat-services-alert.mjs +26 -27
  132. package/fesm2022/cmat-services-alert.mjs.map +1 -1
  133. package/fesm2022/cmat-services-config.mjs +14 -23
  134. package/fesm2022/cmat-services-config.mjs.map +1 -1
  135. package/fesm2022/cmat-services-confirmation.mjs +8 -8
  136. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  137. package/fesm2022/cmat-services-data.mjs +6 -10
  138. package/fesm2022/cmat-services-data.mjs.map +1 -1
  139. package/fesm2022/cmat-services-export-as.mjs +3 -3
  140. package/fesm2022/cmat-services-export-as.mjs.map +1 -1
  141. package/fesm2022/cmat-services-loading.mjs +30 -47
  142. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  143. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  144. package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
  145. package/fesm2022/cmat-services-media-watcher.mjs +43 -34
  146. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  147. package/fesm2022/cmat-services-platform.mjs +3 -3
  148. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  149. package/fesm2022/cmat-services-splash-screen.mjs +3 -3
  150. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  151. package/fesm2022/cmat-services-title.mjs +3 -3
  152. package/fesm2022/cmat-services-title.mjs.map +1 -1
  153. package/fesm2022/cmat-services-translation.mjs +11 -11
  154. package/fesm2022/cmat-services-translation.mjs.map +1 -1
  155. package/fesm2022/cmat-services-utils.mjs +4 -4
  156. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  157. package/fesm2022/cmat.mjs +9229 -7508
  158. package/fesm2022/cmat.mjs.map +1 -1
  159. package/icons/material-icons/heroicons-outline.svg +3 -0
  160. package/icons/material-icons/heroicons-solid.svg +3 -0
  161. package/package.json +10 -1
  162. package/styles/components/bundle.scss +21 -0
  163. package/styles/overrides/angular-material.scss +22 -1
  164. package/tailwind/plugins/theming.js +183 -183
  165. package/types/cmat-components-breadcrumb.d.ts +40 -37
  166. package/types/cmat-components-card.d.ts +11 -13
  167. package/types/cmat-components-carousel.d.ts +87 -113
  168. package/types/cmat-components-cascade.d.ts +84 -65
  169. package/types/cmat-components-chip-input.d.ts +29 -24
  170. package/types/cmat-components-code-editor.d.ts +28 -12
  171. package/types/cmat-components-color-picker.d.ts +236 -0
  172. package/types/cmat-components-custom-formly.d.ts +316 -184
  173. package/types/cmat-components-data-picker.d.ts +372 -0
  174. package/types/cmat-components-date-range.d.ts +31 -36
  175. package/types/cmat-components-date-time-display.d.ts +8 -8
  176. package/types/cmat-components-drawer.d.ts +30 -32
  177. package/types/cmat-components-empty-state.d.ts +9 -10
  178. package/types/cmat-components-file-preview.d.ts +9 -9
  179. package/types/cmat-components-filter-toolbar.d.ts +15 -15
  180. package/types/cmat-components-form-actions.d.ts +5 -5
  181. package/types/cmat-components-fullscreen.d.ts +5 -5
  182. package/types/cmat-components-highlight.d.ts +13 -14
  183. package/types/cmat-components-image-viewer.d.ts +29 -33
  184. package/types/cmat-components-inline-loading.d.ts +6 -6
  185. package/types/cmat-components-json-editor.d.ts +15 -17
  186. package/types/cmat-components-knob-input.d.ts +58 -55
  187. package/types/cmat-components-masonry.d.ts +9 -12
  188. package/types/cmat-components-material-color-picker.d.ts +16 -21
  189. package/types/cmat-components-material-datetimepicker.d.ts +174 -216
  190. package/types/cmat-components-navigation.d.ts +34 -39
  191. package/types/cmat-components-opt-input.d.ts +35 -33
  192. package/types/cmat-components-org-chart.d.ts +8 -9
  193. package/types/cmat-components-page-header.d.ts +9 -9
  194. package/types/cmat-components-pagination.d.ts +36 -40
  195. package/types/cmat-components-password-strength.d.ts +58 -64
  196. package/types/cmat-components-popover.d.ts +22 -32
  197. package/types/cmat-components-progress-bar.d.ts +7 -10
  198. package/types/cmat-components-qrcode.d.ts +22 -22
  199. package/types/cmat-components-rating.d.ts +17 -19
  200. package/types/cmat-components-rich-text-editor.d.ts +11 -12
  201. package/types/cmat-components-select-search.d.ts +48 -36
  202. package/types/cmat-components-select-table.d.ts +38 -34
  203. package/types/cmat-components-select-tree.d.ts +17 -15
  204. package/types/cmat-components-skeleton.d.ts +27 -10
  205. package/types/cmat-components-speed-dial.d.ts +24 -33
  206. package/types/cmat-components-status-tag.d.ts +19 -9
  207. package/types/cmat-components-table-toolbar.d.ts +7 -7
  208. package/types/cmat-components-timeline.d.ts +33 -34
  209. package/types/cmat-components-toast.d.ts +26 -30
  210. package/types/cmat-components-transfer-picker.d.ts +51 -56
  211. package/types/cmat-components-treetable.d.ts +12 -13
  212. package/types/cmat-components-upload.d.ts +33 -38
  213. package/types/cmat-components-x6-angular-shape.d.ts +1 -1
  214. package/types/cmat-directives-animate-on-scroll.d.ts +7 -7
  215. package/types/cmat-directives-arrow-cursor.d.ts +18 -20
  216. package/types/cmat-directives-data-exporter.d.ts +10 -10
  217. package/types/cmat-directives-debounce.d.ts +5 -5
  218. package/types/cmat-directives-digit-only.d.ts +13 -13
  219. package/types/cmat-directives-seamless-auto-scroll.d.ts +7 -7
  220. package/types/cmat-pipes-secure.d.ts +1 -3
  221. package/types/cmat-services-alert.d.ts +11 -12
  222. package/types/cmat-services-config.d.ts +2 -7
  223. package/types/cmat-services-confirmation.d.ts +2 -2
  224. package/types/cmat-services-data.d.ts +0 -1
  225. package/types/cmat-services-loading.d.ts +14 -22
  226. package/types/cmat-services-media-watcher.d.ts +5 -5
  227. package/types/cmat-services-translation.d.ts +4 -5
  228. package/types/cmat.d.ts +2167 -1746
@@ -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, signal, inject, ViewContainerRef, ElementRef, forwardRef, Input, ViewChild, Output, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
5
+ import { input, output, signal, computed, viewChild, inject, ViewContainerRef, effect, untracked, forwardRef, 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';
@@ -19,148 +19,121 @@ import isBetween from 'dayjs/plugin/isBetween';
19
19
 
20
20
  class CmatDateRangeComponent {
21
21
  constructor() {
22
- this.controlClass = '';
23
- this.initData = true;
24
- this.rangeChanged = new EventEmitter();
25
- this.activeDates = {
22
+ this.controlClass = input('', /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "controlClass" }] : /* istanbul ignore next */ []));
24
+ this.dateFormat = input('YYYY/MM/DD', /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []));
26
+ this.timeFormat = input('HH:mm', { ...(ngDevMode ? { debugName: "timeFormat" } : /* istanbul ignore next */ {}), transform: (value) => value === '12' ? 'hh:mmA' : 'HH:mm' });
27
+ this.readonly = input(false, /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
29
+ this.timeRange = input(true, /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "timeRange" }] : /* istanbul ignore next */ []));
31
+ this.range = input(null, /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "range" }] : /* istanbul ignore next */ []));
33
+ this.rangeChanged = output();
34
+ this.activeDates = signal({
26
35
  month1: dayjs(),
27
- month2: dayjs().add(1, 'month')
28
- };
29
- this.refreshVersion = signal(0, ...(ngDevMode ? [{ debugName: "refreshVersion" }] : /* istanbul ignore next */ []));
30
- this.setWhichDate = 'start';
36
+ month2: dayjs().add(1, 'month'),
37
+ }, /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "activeDates" }] : /* istanbul ignore next */ []));
39
+ this.setWhichDate = signal('start', /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "setWhichDate" }] : /* istanbul ignore next */ []));
41
+ this.rangeDisplay = computed(() => {
42
+ const r = this._range();
43
+ if (r.start && r.end) {
44
+ const start = r.start.clone();
45
+ const end = r.end.clone();
46
+ return {
47
+ startDate: start.format(this.dateFormat()),
48
+ startTime: this.timeRange() ? start.format(this.timeFormat()) : null,
49
+ endDate: end.format(this.dateFormat()),
50
+ endTime: this.timeRange() ? end.format(this.timeFormat()) : null,
51
+ };
52
+ }
53
+ return undefined;
54
+ }, /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "rangeDisplay" }] : /* istanbul ignore next */ []));
56
+ this.dateClassFn = computed(() => {
57
+ const r = this._range();
58
+ return (date) => {
59
+ if (r.start && r.end) {
60
+ if (date.isSame(r.start, 'day') && date.isSame(r.end, 'day')) {
61
+ return ['cmat-date-range', 'cmat-date-range-start', 'cmat-date-range-end'];
62
+ }
63
+ if (date.isSame(r.start, 'day')) {
64
+ return ['cmat-date-range', 'cmat-date-range-start'];
65
+ }
66
+ if (date.isSame(r.end, 'day')) {
67
+ return ['cmat-date-range', 'cmat-date-range-end'];
68
+ }
69
+ if (date.isBetween(r.start, r.end, 'day')) {
70
+ return ['cmat-date-range', 'cmat-date-range-mid'];
71
+ }
72
+ }
73
+ else if (r.start && date.isSame(r.start, 'day')) {
74
+ return ['cmat-date-range', 'cmat-date-range-start'];
75
+ }
76
+ return [];
77
+ };
78
+ }, /* @ts-ignore */
79
+ ...(ngDevMode ? [{ debugName: "dateClassFn" }] : /* istanbul ignore next */ []));
80
+ this.dateFilterFn = computed(() => {
81
+ const which = this.setWhichDate();
82
+ const r = this._range();
83
+ return (date) => {
84
+ return !(which === 'end' && r.start && date.isBefore(r.start, 'day'));
85
+ };
86
+ }, /* @ts-ignore */
87
+ ...(ngDevMode ? [{ debugName: "dateFilterFn" }] : /* istanbul ignore next */ []));
88
+ this._matMonthView1 = viewChild('matMonthView1', /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "_matMonthView1" }] : /* istanbul ignore next */ []));
90
+ this._matMonthView2 = viewChild('matMonthView2', /* @ts-ignore */
91
+ ...(ngDevMode ? [{ debugName: "_matMonthView2" }] : /* istanbul ignore next */ []));
92
+ this._pickerPanelOrigin = viewChild('pickerPanelOrigin', /* @ts-ignore */
93
+ ...(ngDevMode ? [{ debugName: "_pickerPanelOrigin" }] : /* istanbul ignore next */ []));
94
+ this._pickerPanel = viewChild('pickerPanel', /* @ts-ignore */
95
+ ...(ngDevMode ? [{ debugName: "_pickerPanel" }] : /* istanbul ignore next */ []));
31
96
  this._overlay = inject(Overlay);
32
97
  this._viewContainerRef = inject(ViewContainerRef);
33
98
  this._overlayRef = null;
34
- this._range = {
99
+ this._range = signal({
35
100
  start: null,
36
- end: null
37
- };
101
+ end: null,
102
+ }, /* @ts-ignore */
103
+ ...(ngDevMode ? [{ debugName: "_range" }] : /* istanbul ignore next */ []));
104
+ this._programmaticChange = false;
105
+ this._rangeInputFirstRun = true;
106
+ this._timeRangeFirstRun = true;
107
+ this._emittingChange = false;
38
108
  this._timeRegExp = new RegExp('^(0[0-9]|1[0-9]|2[0-4]|[0-9]):([0-5][0-9])(A|(?:AM)|P|(?:PM))?$', 'i');
39
- dayjs.extend(isBetween);
40
- // eslint-disable-next-line @typescript-eslint/no-empty-function
41
109
  this._onChange = () => { };
42
- // eslint-disable-next-line @typescript-eslint/no-empty-function
43
110
  this._onTouched = () => { };
44
- this.dateFormat = 'YYYY/MM/DD';
45
- this.timeFormat = '12';
46
- }
47
- get readonly() {
48
- return this._readonly;
49
- }
50
- set readonly(value) {
51
- this._readonly = value;
52
- }
53
- // eslint-disable-next-line @typescript-eslint/member-ordering
54
- get dateFormat() {
55
- return this._dateFormat;
56
- }
57
- set dateFormat(value) {
58
- if (this._dateFormat === value) {
59
- return;
60
- }
61
- this._dateFormat = value;
62
- }
63
- // eslint-disable-next-line @typescript-eslint/member-ordering
64
- get timeFormat() {
65
- return this._timeFormat;
66
- }
67
- set timeFormat(value) {
68
- if (this._timeFormat === value) {
69
- return;
70
- }
71
- this._timeFormat = value === '12' ? 'hh:mmA' : 'HH:mm';
72
- }
73
- // eslint-disable-next-line @typescript-eslint/member-ordering
74
- get timeRange() {
75
- return this._timeRange;
76
- }
77
- set timeRange(value) {
78
- if (this._timeRange === value) {
79
- return;
80
- }
81
- this._timeRange = value;
82
- if (!value && this._range?.start && this._range?.end) {
83
- this.range = {
84
- start: this._range.start.clone().startOf('day').toISOString(),
85
- end: this._range.end.clone().endOf('day').toISOString()
86
- };
87
- }
88
- }
89
- // eslint-disable-next-line @typescript-eslint/member-ordering
90
- get range() {
91
- if (this._range.start && this._range.end) {
92
- const start = this._range?.start.clone();
93
- const end = this._range?.end.clone();
94
- return {
95
- startDate: start ? start.clone().format(this.dateFormat) : null,
96
- startTime: this.timeRange && start ? start.clone().format(this.timeFormat) : null,
97
- endDate: end ? end.clone().format(this.dateFormat) : null,
98
- endTime: end && this.timeRange ? end.clone().format(this.timeFormat) : null
99
- };
100
- }
101
- return void 0;
102
- }
103
- set range(value) {
104
- if (!(value?.start && value.end)) {
105
- this.activeDates = {
106
- month1: dayjs(),
107
- month2: dayjs().add(1, 'month')
108
- };
109
- return;
110
- }
111
- const whichDate = value.whichDate ?? null;
112
- const start = dayjs(value.start);
113
- const end = dayjs(value.end);
114
- if (whichDate === 'start') {
115
- this._range.start = start.clone();
116
- if (this._range.end && this._range.start.isAfter(this._range.end)) {
117
- const endDate = start.clone().hour(this._range.end.hour()).minute(this._range.end.minute()).second(this._range.end.second());
118
- if (this._range.start.isBefore(endDate)) {
119
- this._range.end = endDate;
120
- }
121
- else {
122
- this._range.end = start.clone();
123
- }
124
- }
125
- }
126
- if (whichDate === 'end') {
127
- this._range.end = end.clone();
128
- if (this._range.start?.isAfter(this._range.end)) {
129
- const startDate = end.clone().hour(this._range.start.hour()).minute(this._range.start.minute()).second(this._range.start.second());
130
- if (this._range.end.isAfter(startDate)) {
131
- this._range.start = startDate;
132
- }
133
- else {
134
- this._range.start = end.clone();
135
- }
111
+ dayjs.extend(isBetween);
112
+ effect(() => {
113
+ const rangeValue = this.range();
114
+ if (this._rangeInputFirstRun) {
115
+ this._rangeInputFirstRun = false;
116
+ return;
136
117
  }
137
- }
138
- if (!whichDate) {
139
- this._range.start = start.clone();
140
- this._range.end = start.isBefore(end) ? end.clone() : start.clone();
141
- }
142
- if (this._range.start && this._range.end) {
143
- const range = {
144
- start: this._range.start.clone().toISOString(),
145
- end: this._range.end.clone().toISOString()
146
- };
147
- this.rangeChanged.emit(range);
148
- if (!this._programmaticChange) {
149
- this._onTouched();
150
- this._onChange(range);
118
+ untracked(() => {
119
+ this._setRangeFromInput(rangeValue);
120
+ });
121
+ });
122
+ effect(() => {
123
+ const tr = this.timeRange();
124
+ if (this._timeRangeFirstRun) {
125
+ this._timeRangeFirstRun = false;
126
+ return;
151
127
  }
152
- this.activeDates = {
153
- month1: this._range.start.clone(),
154
- month2: this._range.start.clone().add(1, 'month')
155
- };
156
- this.startTimeFormControl.setValue(this._range.start.clone().format(this._timeFormat).toString());
157
- this.endTimeFormControl.setValue(this._range.end.clone().format(this._timeFormat).toString());
158
- }
159
- if (this._matMonthView1 && this._matMonthView2) {
160
- this._matMonthView1.ngAfterContentInit();
161
- this._matMonthView2.ngAfterContentInit();
162
- }
163
- this._programmaticChange = false;
128
+ untracked(() => {
129
+ if (!tr && this._range().start && this._range().end) {
130
+ this._setRangeFromInput({
131
+ start: this._range().start.clone().startOf('day').toISOString(),
132
+ end: this._range().end.clone().endOf('day').toISOString(),
133
+ });
134
+ }
135
+ });
136
+ });
164
137
  }
165
138
  registerOnChange(fn) {
166
139
  this._onChange = fn;
@@ -170,8 +143,7 @@ class CmatDateRangeComponent {
170
143
  }
171
144
  writeValue(range) {
172
145
  this._programmaticChange = true;
173
- this.range = range;
174
- this.refreshVersion.update(value => value + 1);
146
+ this._setRangeFromInput(range);
175
147
  }
176
148
  ngOnInit() {
177
149
  this._init();
@@ -181,38 +153,40 @@ class CmatDateRangeComponent {
181
153
  this._overlayRef.dispose();
182
154
  this._overlayRef = null;
183
155
  }
184
- // eslint-disable-next-line @typescript-eslint/no-empty-function
185
- this.writeValue = () => { };
186
156
  }
187
157
  openPickerPanel() {
188
- if (this.readonly)
158
+ if (this.readonly())
159
+ return;
160
+ const origin = this._pickerPanelOrigin();
161
+ if (!origin)
189
162
  return;
190
163
  const overlayRef = this._overlay.create({
191
164
  panelClass: 'cmat-date-range-panel',
192
165
  backdropClass: '',
193
166
  hasBackdrop: true,
194
167
  scrollStrategy: this._overlay.scrollStrategies.reposition(),
195
- positionStrategy: this._overlay.position()
196
- .flexibleConnectedTo(this._pickerPanelOrigin)
168
+ positionStrategy: this._overlay
169
+ .position()
170
+ .flexibleConnectedTo(origin)
197
171
  .withPositions([
198
172
  {
199
173
  originX: 'start',
200
174
  originY: 'bottom',
201
175
  overlayX: 'start',
202
176
  overlayY: 'top',
203
- offsetY: 8
177
+ offsetY: 8,
204
178
  },
205
179
  {
206
180
  originX: 'start',
207
181
  originY: 'top',
208
182
  overlayX: 'start',
209
183
  overlayY: 'bottom',
210
- offsetY: -8
211
- }
212
- ])
184
+ offsetY: -8,
185
+ },
186
+ ]),
213
187
  });
214
188
  this._overlayRef = overlayRef;
215
- const templatePortal = new TemplatePortal(this._pickerPanel, this._viewContainerRef);
189
+ const templatePortal = new TemplatePortal(this._pickerPanel(), this._viewContainerRef);
216
190
  overlayRef.backdropClick().subscribe(() => {
217
191
  if (templatePortal?.isAttached) {
218
192
  templatePortal.detach();
@@ -226,124 +200,217 @@ class CmatDateRangeComponent {
226
200
  overlayRef.attach(templatePortal);
227
201
  }
228
202
  getMonthLabel(month) {
203
+ const dates = this.activeDates();
229
204
  if (month === 1) {
230
- return this.activeDates.month1?.clone().format('YYYY MMMM') ?? '';
205
+ return dates.month1?.clone().format('YYYY MMMM') ?? '';
231
206
  }
232
- return this.activeDates.month2?.clone().format('YYYY MMMM') ?? '';
207
+ return dates.month2?.clone().format('YYYY MMMM') ?? '';
233
208
  }
234
- dateClass() {
235
- return (date) => {
236
- const start = this._range.start ?? dayjs();
237
- const end = this._range.end ?? dayjs().add(1, 'day').endOf('day');
238
- if (date.isSame(start, 'day') && date.isSame(end, 'day')) {
239
- return ['cmat-date-range', 'cmat-date-range-start', 'cmat-date-range-end'];
240
- }
241
- if (date.isSame(start, 'day')) {
242
- return ['cmat-date-range', 'cmat-date-range-start'];
209
+ onActiveDateChange(month, date) {
210
+ this.activeDates.update((dates) => {
211
+ if (month === 1) {
212
+ return { month1: date, month2: dates.month2 };
243
213
  }
244
- if (date.isSame(end, 'day')) {
245
- return ['cmat-date-range', 'cmat-date-range-end'];
246
- }
247
- if (date.isBetween(start, end, 'day')) {
248
- return ['cmat-date-range', 'cmat-date-range-mid'];
249
- }
250
- return [];
251
- };
252
- }
253
- dateFilter() {
254
- return (date) => !(this.setWhichDate === 'end' && date.isBefore(this._range.start, 'day'));
214
+ return { month1: dates.month1, month2: date };
215
+ });
255
216
  }
256
217
  onSelectedDateChange(date) {
257
218
  if (!date)
258
219
  return;
220
+ const whichDate = this.setWhichDate();
221
+ const r = this._range();
259
222
  const newRange = {
260
- start: dayjs().toISOString(),
261
- end: dayjs().toISOString(),
262
- whichDate: ''
223
+ start: (whichDate === 'start'
224
+ ? (r.start ?? dayjs()).clone().year(date.year()).month(date.month()).date(date.date())
225
+ : r.start ?? date).toISOString(),
226
+ end: (whichDate === 'end'
227
+ ? (r.end ?? dayjs()).clone().year(date.year()).month(date.month()).date(date.date())
228
+ : r.end ?? date).toISOString(),
229
+ whichDate,
263
230
  };
264
- if (this.setWhichDate === 'start') {
265
- newRange.start = dayjs(newRange.start).year(date.year()).month(date.month()).date(date.date()).toISOString();
266
- }
267
- else {
268
- newRange.end = dayjs(newRange.end).year(date.year()).month(date.month()).date(date.date()).toISOString();
269
- }
270
- newRange.whichDate = this.setWhichDate;
271
- this.setWhichDate = this.setWhichDate === 'start' ? 'end' : 'start';
272
- this.range = newRange;
273
- this.refreshVersion.update(value => value + 1);
231
+ this.setWhichDate.set(whichDate === 'start' ? 'end' : 'start');
232
+ this._setRangeFromInput(newRange);
274
233
  }
275
234
  prev() {
276
- this.activeDates.month1 = dayjs(this.activeDates.month1).subtract(1, 'month');
277
- this.activeDates.month2 = dayjs(this.activeDates.month2).subtract(1, 'month');
235
+ this.activeDates.update(dates => ({
236
+ month1: dayjs(dates.month1).subtract(1, 'month'),
237
+ month2: dayjs(dates.month2).subtract(1, 'month'),
238
+ }));
278
239
  }
279
240
  next() {
280
- this.activeDates.month1 = dayjs(this.activeDates.month1).add(1, 'month');
281
- this.activeDates.month2 = dayjs(this.activeDates.month2).add(1, 'month');
241
+ this.activeDates.update(dates => ({
242
+ month1: dayjs(dates.month1).add(1, 'month'),
243
+ month2: dayjs(dates.month2).add(1, 'month'),
244
+ }));
282
245
  }
283
246
  updateStartTime(event) {
284
- const parsedTime = this._parseTime(event.target?.value ?? '');
285
- if (this.startTimeFormControl.invalid) {
286
- if (this._range.start) {
287
- const time = this._range.start.clone().format(this._timeFormat);
288
- this.startTimeFormControl.setValue(time);
247
+ const input = event.target;
248
+ const value = input?.value ?? '';
249
+ const parsedTime = this._parseTime(value);
250
+ const formControl = this.startTimeFormControl;
251
+ if (formControl?.invalid) {
252
+ const r = this._range();
253
+ if (r.start) {
254
+ formControl.setValue(r.start.clone().format(this.timeFormat()));
289
255
  }
290
256
  return;
291
257
  }
292
- if (this._range.start && this._range.end) {
293
- const startDate = this._range.start.clone().hour(parsedTime.hour()).minute(parsedTime.minute());
294
- if (startDate.isAfter(this._range.end)) {
295
- const endDateHours = this._range.end.hour();
296
- const endDateMinutes = this._range.end.minute();
258
+ const r = this._range();
259
+ if (r.start && r.end) {
260
+ let startDate = r.start
261
+ .clone()
262
+ .hour(parsedTime.hour())
263
+ .minute(parsedTime.minute());
264
+ if (startDate.isAfter(r.end)) {
265
+ const endDateHours = r.end.hour();
266
+ const endDateMinutes = r.end.minute();
297
267
  startDate.hour(endDateHours).minute(endDateMinutes);
298
268
  }
299
- this.range = {
269
+ this._setRangeFromInput({
300
270
  start: startDate.toISOString(),
301
- end: this._range.end.clone().toISOString(),
302
- whichDate: 'start'
303
- };
304
- this.refreshVersion.update(value => value + 1);
271
+ end: r.end.clone().toISOString(),
272
+ whichDate: 'start',
273
+ });
305
274
  }
306
275
  }
307
276
  updateEndTime(event) {
308
- const parsedTime = this._parseTime(event.target?.value ?? '');
309
- if (this.endTimeFormControl.invalid) {
310
- if (this._range.end) {
311
- const time = this._range.end.clone().format(this._timeFormat);
312
- this.endTimeFormControl.setValue(time);
277
+ const input = event.target;
278
+ const value = input?.value ?? '';
279
+ const parsedTime = this._parseTime(value);
280
+ const formControl = this.endTimeFormControl;
281
+ if (formControl?.invalid) {
282
+ const r = this._range();
283
+ if (r.end) {
284
+ formControl.setValue(r.end.clone().format(this.timeFormat()));
313
285
  }
314
286
  return;
315
287
  }
316
- if (this._range.start && this._range.end) {
317
- const endDate = this._range.end.clone().hour(parsedTime.hour()).minute(parsedTime.minute());
318
- if (endDate.isBefore(this._range.start)) {
319
- const startDateHours = this._range.start.hour();
320
- const startDateMinutes = this._range.start.minute();
288
+ const r = this._range();
289
+ if (r.start && r.end) {
290
+ let endDate = r.end
291
+ .clone()
292
+ .hour(parsedTime.hour())
293
+ .minute(parsedTime.minute());
294
+ if (endDate.isBefore(r.start)) {
295
+ const startDateHours = r.start.hour();
296
+ const startDateMinutes = r.start.minute();
321
297
  endDate.hour(startDateHours).minute(startDateMinutes);
322
298
  }
323
- this.range = {
324
- start: this._range.start.clone().toISOString(),
299
+ this._setRangeFromInput({
300
+ start: r.start.clone().toISOString(),
325
301
  end: endDate.toISOString(),
326
- whichDate: 'end'
302
+ whichDate: 'end',
303
+ });
304
+ }
305
+ }
306
+ _setRangeFromInput(value) {
307
+ if (!(value?.start && value.end)) {
308
+ this._range.set({ start: null, end: null });
309
+ this.activeDates.set({
310
+ month1: dayjs(),
311
+ month2: dayjs().add(1, 'month'),
312
+ });
313
+ return;
314
+ }
315
+ const whichDate = value.whichDate ?? null;
316
+ const start = dayjs(value.start);
317
+ const end = dayjs(value.end);
318
+ const currentRange = this._range();
319
+ let newStart = currentRange.start;
320
+ let newEnd = currentRange.end;
321
+ if (whichDate === 'start') {
322
+ newStart = start.clone();
323
+ if (newEnd && newStart.isAfter(newEnd)) {
324
+ newEnd = start
325
+ .clone()
326
+ .hour(newEnd.hour())
327
+ .minute(newEnd.minute())
328
+ .second(newEnd.second());
329
+ if (!newStart.isBefore(newEnd)) {
330
+ newEnd = start.clone();
331
+ }
332
+ }
333
+ }
334
+ if (whichDate === 'end') {
335
+ newEnd = end.clone();
336
+ if (newStart?.isAfter(newEnd)) {
337
+ newStart = end
338
+ .clone()
339
+ .hour(newStart.hour())
340
+ .minute(newStart.minute())
341
+ .second(newStart.second());
342
+ if (!newEnd.isAfter(newStart)) {
343
+ newStart = end.clone();
344
+ }
345
+ }
346
+ }
347
+ if (!whichDate) {
348
+ newStart = start.clone();
349
+ newEnd = start.isBefore(end) ? end.clone() : start.clone();
350
+ }
351
+ this._range.set({ start: newStart, end: newEnd });
352
+ if (newStart && newEnd) {
353
+ const rangeOutput = {
354
+ start: newStart.toISOString(),
355
+ end: newEnd.toISOString(),
327
356
  };
328
- this.refreshVersion.update(value => value + 1);
357
+ if (!this._programmaticChange && !this._emittingChange) {
358
+ this._emittingChange = true;
359
+ try {
360
+ this.rangeChanged.emit(rangeOutput);
361
+ this._onTouched();
362
+ this._onChange(rangeOutput);
363
+ }
364
+ finally {
365
+ setTimeout(() => {
366
+ this._emittingChange = false;
367
+ }, 0);
368
+ }
369
+ }
370
+ this.activeDates.set({
371
+ month1: newStart.clone(),
372
+ month2: newStart.clone().add(1, 'month'),
373
+ });
374
+ const timeFmt = this.timeFormat();
375
+ const startCtrl = this.startTimeFormControl;
376
+ const endCtrl = this.endTimeFormControl;
377
+ if (startCtrl && startCtrl.value !== newStart.clone().format(timeFmt)) {
378
+ startCtrl.setValue(newStart.clone().format(timeFmt));
379
+ }
380
+ if (endCtrl && endCtrl.value !== newEnd.clone().format(timeFmt)) {
381
+ endCtrl.setValue(newEnd.clone().format(timeFmt));
382
+ }
383
+ }
384
+ const matMonthView1 = this._matMonthView1();
385
+ const matMonthView2 = this._matMonthView2();
386
+ if (matMonthView1 && matMonthView2) {
387
+ const newDateClassFn = this.dateClassFn();
388
+ const newDateFilterFn = this.dateFilterFn();
389
+ matMonthView1.dateClass = newDateClassFn;
390
+ matMonthView2.dateClass = newDateClassFn;
391
+ matMonthView1.dateFilter = newDateFilterFn;
392
+ matMonthView2.dateFilter = newDateFilterFn;
393
+ matMonthView1.ngAfterContentInit();
394
+ matMonthView2.ngAfterContentInit();
329
395
  }
396
+ this._programmaticChange = false;
330
397
  }
331
398
  _init() {
332
- this.startTimeFormControl = new FormControl('', [Validators.pattern(this._timeRegExp)]);
333
- this.endTimeFormControl = new FormControl('', [Validators.pattern(this._timeRegExp)]);
399
+ this.startTimeFormControl =
400
+ new FormControl('', [Validators.pattern(this._timeRegExp)]);
401
+ this.endTimeFormControl =
402
+ new FormControl('', [Validators.pattern(this._timeRegExp)]);
334
403
  this._programmaticChange = true;
335
- if (this.initData) {
336
- this.range = {
337
- start: dayjs().startOf('day').toISOString(),
338
- end: dayjs().add(1, 'day').endOf('day').toISOString()
339
- };
404
+ const rangeValue = this.range();
405
+ if (rangeValue) {
406
+ this._setRangeFromInput(rangeValue);
340
407
  }
341
408
  else {
342
- this.range = null;
409
+ this._setRangeFromInput({
410
+ start: dayjs().startOf('day').toISOString(),
411
+ end: dayjs().add(1, 'day').endOf('day').toISOString(),
412
+ });
343
413
  }
344
- this._programmaticChange = true;
345
- this.timeRange = this.timeRange ?? true;
346
- this.refreshVersion.update(value => value + 1);
347
414
  }
348
415
  _parseTime(value) {
349
416
  const timeArr = value.split(this._timeRegExp).filter(part => part !== '');
@@ -353,55 +420,34 @@ class CmatDateRangeComponent {
353
420
  }
354
421
  return dayjs(value, 'HH:mm').second(0);
355
422
  }
356
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CmatDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
357
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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: [
423
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
424
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.2", type: CmatDateRangeComponent, isStandalone: true, selector: "cmat-date-range", inputs: { controlClass: { classPropertyName: "controlClass", publicName: "controlClass", isSignal: true, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, timeFormat: { classPropertyName: "timeFormat", publicName: "timeFormat", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, timeRange: { classPropertyName: "timeRange", publicName: "timeRange", isSignal: true, isRequired: false, transformFunction: null }, range: { classPropertyName: "range", publicName: "range", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rangeChanged: "rangeChanged" }, providers: [
358
425
  {
359
426
  provide: NG_VALUE_ACCESSOR,
360
427
  useExisting: forwardRef(() => CmatDateRangeComponent),
361
- multi: true
362
- }
363
- ], 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 }); }
428
+ multi: true,
429
+ },
430
+ ], viewQueries: [{ propertyName: "_matMonthView1", first: true, predicate: ["matMonthView1"], descendants: true, isSignal: true }, { propertyName: "_matMonthView2", first: true, predicate: ["matMonthView2"], descendants: true, isSignal: true }, { propertyName: "_pickerPanelOrigin", first: true, predicate: ["pickerPanelOrigin"], descendants: true, isSignal: true }, { propertyName: "_pickerPanel", first: true, predicate: ["pickerPanel"], descendants: true, isSignal: 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\">{{rangeDisplay()?.startDate}}</div>\r\n @if (rangeDisplay()?.startTime) {\r\n <div class=\"time\">{{rangeDisplay()?.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\">{{rangeDisplay()?.endDate}}</div>\r\n @if (rangeDisplay()?.endTime) {\r\n <div class=\"time\">{{rangeDisplay()?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n <!-- Start -->\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]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month1\" (activeDateChange)=\"onActiveDateChange(1, $event)\"\r\n (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 <!-- End -->\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]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month2\" (activeDateChange)=\"onActiveDateChange(2, $event)\"\r\n (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>", 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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 }); }
364
431
  }
365
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CmatDateRangeComponent, decorators: [{
432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CmatDateRangeComponent, decorators: [{
366
433
  type: Component,
367
434
  args: [{ selector: 'cmat-date-range', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDateRange', providers: [
368
435
  {
369
436
  provide: NG_VALUE_ACCESSOR,
370
437
  useExisting: forwardRef(() => CmatDateRangeComponent),
371
- multi: true
372
- }
373
- ], imports: [FormsModule, ReactiveFormsModule, MatButtonModule, MatIconModule,
374
- MatFormFieldModule, MatMonthView,
375
- 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"] }]
376
- }], ctorParameters: () => [], propDecorators: { controlClass: [{
377
- type: Input
378
- }], initData: [{
379
- type: Input
380
- }], rangeChanged: [{
381
- type: Output
382
- }], _matMonthView1: [{
383
- type: ViewChild,
384
- args: ['matMonthView1']
385
- }], _matMonthView2: [{
386
- type: ViewChild,
387
- args: ['matMonthView2']
388
- }], _pickerPanelOrigin: [{
389
- type: ViewChild,
390
- args: ['pickerPanelOrigin', { read: ElementRef }]
391
- }], _pickerPanel: [{
392
- type: ViewChild,
393
- args: ['pickerPanel']
394
- }], readonly: [{
395
- type: Input
396
- }], dateFormat: [{
397
- type: Input
398
- }], timeFormat: [{
399
- type: Input
400
- }], timeRange: [{
401
- type: Input
402
- }], range: [{
403
- type: Input
404
- }] } });
438
+ multi: true,
439
+ },
440
+ ], imports: [
441
+ FormsModule,
442
+ ReactiveFormsModule,
443
+ MatButtonModule,
444
+ MatIconModule,
445
+ MatFormFieldModule,
446
+ MatMonthView,
447
+ MatInputModule,
448
+ NgClass,
449
+ ], template: "<div #pickerPanelOrigin role=\"presentation\" class=\"range\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.startDate}}</div>\r\n @if (rangeDisplay()?.startTime) {\r\n <div class=\"time\">{{rangeDisplay()?.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\">{{rangeDisplay()?.endDate}}</div>\r\n @if (rangeDisplay()?.endTime) {\r\n <div class=\"time\">{{rangeDisplay()?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n <!-- Start -->\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]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month1\" (activeDateChange)=\"onActiveDateChange(1, $event)\"\r\n (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 <!-- End -->\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]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month2\" (activeDateChange)=\"onActiveDateChange(2, $event)\"\r\n (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>", 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"] }]
450
+ }], ctorParameters: () => [], propDecorators: { controlClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlClass", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], timeFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeFormat", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], timeRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeRange", required: false }] }], range: [{ type: i0.Input, args: [{ isSignal: true, alias: "range", required: false }] }], rangeChanged: [{ type: i0.Output, args: ["rangeChanged"] }], _matMonthView1: [{ type: i0.ViewChild, args: ['matMonthView1', { isSignal: true }] }], _matMonthView2: [{ type: i0.ViewChild, args: ['matMonthView2', { isSignal: true }] }], _pickerPanelOrigin: [{ type: i0.ViewChild, args: ['pickerPanelOrigin', { isSignal: true }] }], _pickerPanel: [{ type: i0.ViewChild, args: ['pickerPanel', { isSignal: true }] }] } });
405
451
 
406
452
  /**
407
453
  * Generated bundle index. Do not edit.