cmat 0.0.79 → 0.0.81
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.
- package/fesm2022/cmat-components-adapter.mjs +9 -9
- package/fesm2022/cmat-components-breadcrumb.mjs +9 -9
- package/fesm2022/cmat-components-card.mjs +3 -3
- package/fesm2022/cmat-components-carousel.mjs +55 -30
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +14 -14
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +3 -3
- package/fesm2022/cmat-components-code-editor.mjs +3 -3
- package/fesm2022/cmat-components-custom-formly.mjs +119 -116
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +12 -12
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +3 -3
- package/fesm2022/cmat-components-drawer.mjs +59 -24
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +3 -3
- package/fesm2022/cmat-components-file-preview.mjs +3 -3
- package/fesm2022/cmat-components-filter-toolbar.mjs +3 -3
- package/fesm2022/cmat-components-form-actions.mjs +3 -3
- package/fesm2022/cmat-components-fullscreen.mjs +3 -3
- package/fesm2022/cmat-components-highlight.mjs +6 -7
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +12 -15
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +3 -3
- package/fesm2022/cmat-components-json-editor.mjs +4 -6
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +11 -11
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +8 -11
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +13 -14
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +122 -108
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +182 -210
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +75 -65
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +9 -9
- package/fesm2022/cmat-components-page-header.mjs +3 -3
- package/fesm2022/cmat-components-pagination.mjs +34 -32
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +13 -15
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +35 -26
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +11 -14
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +3 -3
- package/fesm2022/cmat-components-rating.mjs +14 -14
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-rich-text-editor.mjs +3 -3
- package/fesm2022/cmat-components-select-search.mjs +25 -37
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +19 -20
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +31 -32
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +3 -3
- package/fesm2022/cmat-components-speed-dial.mjs +57 -20
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +3 -3
- package/fesm2022/cmat-components-table-toolbar.mjs +3 -3
- package/fesm2022/cmat-components-timeline.mjs +12 -12
- package/fesm2022/cmat-components-toast.mjs +77 -28
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +103 -90
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +17 -19
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +24 -31
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs +0 -3
- package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -6
- package/fesm2022/cmat-directives-arrow-cursor.mjs +69 -46
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-data-exporter.mjs +21 -21
- package/fesm2022/cmat-directives-debounce.mjs +9 -9
- package/fesm2022/cmat-directives-digit-only.mjs +6 -6
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +3 -3
- package/fesm2022/cmat-lib-mock-api.mjs +6 -6
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs +3 -3
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-services-alert.mjs +3 -3
- package/fesm2022/cmat-services-config.mjs +6 -6
- package/fesm2022/cmat-services-confirmation.mjs +6 -6
- package/fesm2022/cmat-services-data.mjs +3 -3
- package/fesm2022/cmat-services-export-as.mjs +3 -3
- package/fesm2022/cmat-services-loading.mjs +6 -6
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs +3 -3
- package/fesm2022/cmat-services-platform.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs +3 -3
- package/fesm2022/cmat-services-title.mjs +3 -3
- package/fesm2022/cmat-services-translation.mjs +3 -3
- package/fesm2022/cmat-services-utils.mjs +3 -3
- package/fesm2022/cmat.mjs +1395 -1246
- package/fesm2022/cmat.mjs.map +1 -1
- package/package.json +1 -1
- package/types/cmat-components-carousel.d.ts +18 -11
- package/types/cmat-components-cascade.d.ts +3 -3
- package/types/cmat-components-custom-formly.d.ts +8 -9
- package/types/cmat-components-date-range.d.ts +1 -1
- package/types/cmat-components-drawer.d.ts +8 -2
- package/types/cmat-components-image-viewer.d.ts +5 -6
- package/types/cmat-components-json-editor.d.ts +0 -1
- package/types/cmat-components-knob-input.d.ts +2 -2
- package/types/cmat-components-masonry.d.ts +1 -2
- package/types/cmat-components-material-color-picker.d.ts +1 -2
- package/types/cmat-components-material-datetimepicker.d.ts +16 -16
- package/types/cmat-components-navigation.d.ts +16 -8
- package/types/cmat-components-opt-input.d.ts +11 -8
- package/types/cmat-components-pagination.d.ts +5 -4
- package/types/cmat-components-password-strength.d.ts +1 -2
- package/types/cmat-components-popover.d.ts +3 -4
- package/types/cmat-components-progress-bar.d.ts +6 -7
- package/types/cmat-components-rating.d.ts +6 -7
- package/types/cmat-components-select-search.d.ts +2 -2
- package/types/cmat-components-select-table.d.ts +7 -8
- package/types/cmat-components-select-tree.d.ts +10 -11
- package/types/cmat-components-speed-dial.d.ts +6 -3
- package/types/cmat-components-toast.d.ts +13 -4
- package/types/cmat-components-transfer-picker.d.ts +21 -11
- package/types/cmat-components-treetable.d.ts +3 -4
- package/types/cmat-components-upload.d.ts +5 -7
- package/types/cmat-directives-arrow-cursor.d.ts +9 -4
- package/types/cmat.d.ts +160 -122
|
@@ -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,
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
348
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
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.
|
|
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,C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AA,EAAA,EAAA,CAAA,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;SAC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D,SAAS;uBAAC,aAAa;;sBA4CvB;;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.
|
|
13
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
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.
|
|
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,
|
|
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.
|
|
20
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
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.
|
|
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,17 @@ 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;
|
|
48
|
+
this._overlay = null;
|
|
47
49
|
this._overlayClickDestroyFn = null;
|
|
48
|
-
this.
|
|
50
|
+
this._overlayLeaveTimeoutId = null;
|
|
51
|
+
this._modeChangeTimeoutId = null;
|
|
52
|
+
this._destroyed = false;
|
|
49
53
|
}
|
|
50
54
|
get classList() {
|
|
51
55
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
@@ -89,7 +93,8 @@ class CmatDrawerComponent {
|
|
|
89
93
|
}
|
|
90
94
|
}
|
|
91
95
|
this.modeChanged.emit(currentMode);
|
|
92
|
-
setTimeout(() => {
|
|
96
|
+
this._modeChangeTimeoutId = window.setTimeout(() => {
|
|
97
|
+
this._modeChangeTimeoutId = null;
|
|
93
98
|
this._enableAnimations();
|
|
94
99
|
}, 500);
|
|
95
100
|
}
|
|
@@ -108,7 +113,13 @@ class CmatDrawerComponent {
|
|
|
108
113
|
this._cmatDrawerService.registerComponent(this.name, this);
|
|
109
114
|
}
|
|
110
115
|
ngOnDestroy() {
|
|
116
|
+
this._destroyed = true;
|
|
111
117
|
this._cmatDrawerService.deregisterComponent(this.name);
|
|
118
|
+
this._cleanupOverlay();
|
|
119
|
+
if (this._modeChangeTimeoutId !== null) {
|
|
120
|
+
clearTimeout(this._modeChangeTimeoutId);
|
|
121
|
+
this._modeChangeTimeoutId = null;
|
|
122
|
+
}
|
|
112
123
|
}
|
|
113
124
|
open() {
|
|
114
125
|
if (this.opened) {
|
|
@@ -130,6 +141,26 @@ class CmatDrawerComponent {
|
|
|
130
141
|
this.open();
|
|
131
142
|
}
|
|
132
143
|
}
|
|
144
|
+
_removeOverlayElement() {
|
|
145
|
+
if (this._overlayClickDestroyFn) {
|
|
146
|
+
this._overlayClickDestroyFn();
|
|
147
|
+
this._overlayClickDestroyFn = null;
|
|
148
|
+
}
|
|
149
|
+
if (this._overlay) {
|
|
150
|
+
this._overlay.parentNode?.removeChild(this._overlay);
|
|
151
|
+
this._overlay = null;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
_cleanupOverlay() {
|
|
155
|
+
this._clearOverlayLeaveTimeout();
|
|
156
|
+
this._removeOverlayElement();
|
|
157
|
+
}
|
|
158
|
+
_clearOverlayLeaveTimeout() {
|
|
159
|
+
if (this._overlayLeaveTimeoutId !== null) {
|
|
160
|
+
clearTimeout(this._overlayLeaveTimeoutId);
|
|
161
|
+
this._overlayLeaveTimeoutId = null;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
133
164
|
_enableAnimations() {
|
|
134
165
|
if (this._animationsEnabled) {
|
|
135
166
|
return;
|
|
@@ -143,6 +174,7 @@ class CmatDrawerComponent {
|
|
|
143
174
|
this._animationsEnabled = false;
|
|
144
175
|
}
|
|
145
176
|
_showOverlay() {
|
|
177
|
+
this._cleanupOverlay();
|
|
146
178
|
this._overlay = this._renderer2.createElement('div');
|
|
147
179
|
if (!this._overlay) {
|
|
148
180
|
return;
|
|
@@ -154,8 +186,11 @@ class CmatDrawerComponent {
|
|
|
154
186
|
if (this.transparentOverlay) {
|
|
155
187
|
this._overlay.classList.add('cmat-drawer-overlay-transparent');
|
|
156
188
|
}
|
|
157
|
-
this.
|
|
158
|
-
|
|
189
|
+
const parentEl = this._elementRef.nativeElement.parentElement;
|
|
190
|
+
if (parentEl) {
|
|
191
|
+
this._renderer2.appendChild(parentEl, this._overlay);
|
|
192
|
+
}
|
|
193
|
+
this._overlay.classList.add('cmat-drawer-overlay-enter');
|
|
159
194
|
this._overlayClickDestroyFn = this._renderer2.listen(this._overlay, 'click', () => {
|
|
160
195
|
this.close();
|
|
161
196
|
});
|
|
@@ -165,21 +200,21 @@ class CmatDrawerComponent {
|
|
|
165
200
|
return;
|
|
166
201
|
}
|
|
167
202
|
this._overlay.classList.remove('cmat-drawer-overlay-enter');
|
|
203
|
+
const overlay = this._overlay;
|
|
168
204
|
const handleAnimationEnd = (event) => {
|
|
169
205
|
if (event.animationName === 'drawer-overlay-leave') {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
this._overlayClickDestroyFn = null;
|
|
174
|
-
}
|
|
175
|
-
if (this._overlay) {
|
|
176
|
-
this._overlay.parentNode?.removeChild(this._overlay);
|
|
177
|
-
this._overlay = null;
|
|
178
|
-
}
|
|
206
|
+
overlay.removeEventListener('animationend', handleAnimationEnd);
|
|
207
|
+
this._clearOverlayLeaveTimeout();
|
|
208
|
+
this._removeOverlayElement();
|
|
179
209
|
}
|
|
180
210
|
};
|
|
181
|
-
|
|
182
|
-
|
|
211
|
+
overlay.addEventListener('animationend', handleAnimationEnd);
|
|
212
|
+
overlay.classList.add('cmat-drawer-overlay-leave');
|
|
213
|
+
this._overlayLeaveTimeoutId = window.setTimeout(() => {
|
|
214
|
+
this._overlayLeaveTimeoutId = null;
|
|
215
|
+
overlay.removeEventListener('animationend', handleAnimationEnd);
|
|
216
|
+
this._removeOverlayElement();
|
|
217
|
+
}, 400);
|
|
183
218
|
}
|
|
184
219
|
_toggleOpened(open) {
|
|
185
220
|
this.opened = open;
|
|
@@ -192,15 +227,15 @@ class CmatDrawerComponent {
|
|
|
192
227
|
this._hideOverlay();
|
|
193
228
|
}
|
|
194
229
|
}
|
|
195
|
-
this.
|
|
230
|
+
this.refreshVersion.update(value => value + 1);
|
|
196
231
|
this.openedChanged.emit(open);
|
|
197
232
|
}
|
|
198
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
199
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.
|
|
233
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
234
|
+
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
235
|
}
|
|
201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatDrawerComponent, decorators: [{
|
|
202
237
|
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
|
|
238
|
+
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
239
|
}], propDecorators: { fixed: [{
|
|
205
240
|
type: Input
|
|
206
241
|
}], mode: [{
|