cmat 0.0.62 → 0.0.64
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 +12 -12
- package/fesm2022/cmat-components-cascade.mjs +9 -9
- package/fesm2022/cmat-components-chip-input.mjs +3 -3
- package/fesm2022/cmat-components-custom-formly.mjs +109 -88
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +58 -53
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +6 -6
- package/fesm2022/cmat-components-fullscreen.mjs +3 -3
- package/fesm2022/cmat-components-highlight.mjs +6 -6
- package/fesm2022/cmat-components-image-viewer.mjs +3 -3
- package/fesm2022/cmat-components-json-editor.mjs +3 -3
- package/fesm2022/cmat-components-knob-input.mjs +3 -3
- package/fesm2022/cmat-components-masonry.mjs +3 -3
- package/fesm2022/cmat-components-material-color-picker.mjs +3 -3
- package/fesm2022/cmat-components-material-datetimepicker.mjs +42 -42
- package/fesm2022/cmat-components-navigation.mjs +39 -39
- package/fesm2022/cmat-components-opt-input.mjs +3 -3
- package/fesm2022/cmat-components-org-chart.mjs +9 -9
- package/fesm2022/cmat-components-pagination.mjs +12 -12
- package/fesm2022/cmat-components-password-strength.mjs +9 -9
- package/fesm2022/cmat-components-popover.mjs +9 -9
- package/fesm2022/cmat-components-progress-bar.mjs +3 -3
- package/fesm2022/cmat-components-qrcode.mjs +3 -3
- package/fesm2022/cmat-components-rating.mjs +3 -3
- package/fesm2022/cmat-components-select-search.mjs +9 -9
- package/fesm2022/cmat-components-select-table.mjs +3 -3
- package/fesm2022/cmat-components-select-tree.mjs +3 -3
- package/fesm2022/cmat-components-speed-dial.mjs +9 -9
- package/fesm2022/cmat-components-timeline.mjs +12 -12
- package/fesm2022/cmat-components-toast.mjs +9 -9
- package/fesm2022/cmat-components-transfer-picker.mjs +18 -18
- package/fesm2022/cmat-components-treetable.mjs +6 -6
- package/fesm2022/cmat-components-upload.mjs +9 -9
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -6
- package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
- 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-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/package.json +1 -1
- package/styles/components/bundle.scss +6 -12
- package/styles/styles.scss +6 -5
- package/types/cmat-components-custom-formly.d.ts +26 -2
- package/types/cmat-components-date-range.d.ts +2 -1
|
@@ -7,13 +7,12 @@ 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';
|
|
9
9
|
import { MatButtonModule } from '@angular/material/button';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import * as i5 from '@angular/material/form-field';
|
|
10
|
+
import { MatMonthView } from '@angular/material/datepicker';
|
|
11
|
+
import * as i4 from '@angular/material/form-field';
|
|
13
12
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
14
13
|
import * as i3 from '@angular/material/icon';
|
|
15
14
|
import { MatIconModule } from '@angular/material/icon';
|
|
16
|
-
import * as
|
|
15
|
+
import * as i5 from '@angular/material/input';
|
|
17
16
|
import { MatInputModule } from '@angular/material/input';
|
|
18
17
|
import dayjs from 'dayjs';
|
|
19
18
|
import isBetween from 'dayjs/plugin/isBetween';
|
|
@@ -22,6 +21,7 @@ import { Subject } from 'rxjs';
|
|
|
22
21
|
class CmatDateRangeComponent {
|
|
23
22
|
constructor() {
|
|
24
23
|
this.controlClass = '';
|
|
24
|
+
this.initData = true;
|
|
25
25
|
this.rangeChanged = new EventEmitter();
|
|
26
26
|
this.activeDates = {
|
|
27
27
|
month1: null,
|
|
@@ -91,7 +91,7 @@ class CmatDateRangeComponent {
|
|
|
91
91
|
// Store the value
|
|
92
92
|
this._timeRange = value;
|
|
93
93
|
// If the time range turned off...
|
|
94
|
-
if (!value && this._range
|
|
94
|
+
if (!value && this._range?.start && this._range?.end) {
|
|
95
95
|
this.range = {
|
|
96
96
|
start: this._range.start.clone().startOf('day'),
|
|
97
97
|
end: this._range.end.clone().endOf('day')
|
|
@@ -104,25 +104,24 @@ class CmatDateRangeComponent {
|
|
|
104
104
|
get range() {
|
|
105
105
|
if (this._range.start && this._range.end) {
|
|
106
106
|
// Clone the range start and end
|
|
107
|
-
const start = this._range
|
|
108
|
-
const end = this._range
|
|
107
|
+
const start = this._range?.start.clone();
|
|
108
|
+
const end = this._range?.end.clone();
|
|
109
109
|
// Build and return the range object
|
|
110
110
|
return {
|
|
111
|
-
startDate: start.clone().format(this.dateFormat),
|
|
112
|
-
startTime: this.timeRange ? start.clone().format(this.timeFormat) : null,
|
|
113
|
-
endDate: end.clone().format(this.dateFormat),
|
|
114
|
-
endTime: this.timeRange ? end.clone().format(this.timeFormat) : null
|
|
111
|
+
startDate: start ? start.clone().format(this.dateFormat) : null,
|
|
112
|
+
startTime: this.timeRange && start ? start.clone().format(this.timeFormat) : null,
|
|
113
|
+
endDate: end ? end.clone().format(this.dateFormat) : null,
|
|
114
|
+
endTime: end && this.timeRange ? end.clone().format(this.timeFormat) : null
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
return void 0;
|
|
118
118
|
}
|
|
119
119
|
set range(value) {
|
|
120
|
-
if (!value) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
console.error('Range input must have "start" and "end" properties!');
|
|
120
|
+
if (!(value?.start && value.end)) {
|
|
121
|
+
this.activeDates = {
|
|
122
|
+
month1: dayjs(),
|
|
123
|
+
month2: dayjs().add(1, 'month')
|
|
124
|
+
};
|
|
126
125
|
return;
|
|
127
126
|
}
|
|
128
127
|
// Check if we are setting an individual date or both of them
|
|
@@ -323,20 +322,22 @@ class CmatDateRangeComponent {
|
|
|
323
322
|
*/
|
|
324
323
|
dateClass() {
|
|
325
324
|
return (date) => {
|
|
325
|
+
const start = this._range.start ?? dayjs();
|
|
326
|
+
const end = this._range.end ?? dayjs().add(1, 'day').endOf('day');
|
|
326
327
|
// If the date is both start and end date...
|
|
327
|
-
if (date.isSame(
|
|
328
|
+
if (date.isSame(start, 'day') && date.isSame(end, 'day')) {
|
|
328
329
|
return ['cmat-date-range', 'cmat-date-range-start', 'cmat-date-range-end'];
|
|
329
330
|
}
|
|
330
331
|
// If the date is the start date...
|
|
331
|
-
if (date.isSame(
|
|
332
|
+
if (date.isSame(start, 'day')) {
|
|
332
333
|
return ['cmat-date-range', 'cmat-date-range-start'];
|
|
333
334
|
}
|
|
334
335
|
// If the date is the end date...
|
|
335
|
-
if (date.isSame(
|
|
336
|
+
if (date.isSame(end, 'day')) {
|
|
336
337
|
return ['cmat-date-range', 'cmat-date-range-end'];
|
|
337
338
|
}
|
|
338
339
|
// If the date is in between start and end dates...
|
|
339
|
-
if (date.isBetween(
|
|
340
|
+
if (date.isBetween(start, end, 'day')) {
|
|
340
341
|
return ['cmat-date-range', 'cmat-date-range-mid'];
|
|
341
342
|
}
|
|
342
343
|
return void 0;
|
|
@@ -355,29 +356,26 @@ class CmatDateRangeComponent {
|
|
|
355
356
|
* @param date
|
|
356
357
|
*/
|
|
357
358
|
onSelectedDateChange(date) {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
else {
|
|
371
|
-
newRange.end = dayjs(newRange.end).year(date.year()).month(date.month()).date(date.date()).toISOString();
|
|
372
|
-
}
|
|
373
|
-
// Append the which date to the new range object
|
|
374
|
-
newRange.whichDate = this.setWhichDate;
|
|
375
|
-
// Switch which date to set on the next run
|
|
376
|
-
this.setWhichDate = this.setWhichDate === 'start' ? 'end' : 'start';
|
|
377
|
-
// Set the range
|
|
378
|
-
this.range = newRange;
|
|
379
|
-
this._changeDetectorRef.markForCheck();
|
|
359
|
+
const newRange = {
|
|
360
|
+
start: dayjs().toISOString(),
|
|
361
|
+
end: dayjs().toISOString(),
|
|
362
|
+
whichDate: ''
|
|
363
|
+
};
|
|
364
|
+
// Replace either the start or the end date with the new one
|
|
365
|
+
// depending on which date we are setting
|
|
366
|
+
if (this.setWhichDate === 'start') {
|
|
367
|
+
newRange.start = dayjs(newRange.start).year(date.year()).month(date.month()).date(date.date()).toISOString();
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
newRange.end = dayjs(newRange.end).year(date.year()).month(date.month()).date(date.date()).toISOString();
|
|
380
371
|
}
|
|
372
|
+
// Append the which date to the new range object
|
|
373
|
+
newRange.whichDate = this.setWhichDate;
|
|
374
|
+
// Switch which date to set on the next run
|
|
375
|
+
this.setWhichDate = this.setWhichDate === 'start' ? 'end' : 'start';
|
|
376
|
+
// Set the range
|
|
377
|
+
this.range = newRange;
|
|
378
|
+
this._changeDetectorRef.markForCheck();
|
|
381
379
|
}
|
|
382
380
|
/**
|
|
383
381
|
* Go to previous month on both views
|
|
@@ -485,10 +483,15 @@ class CmatDateRangeComponent {
|
|
|
485
483
|
this.endTimeFormControl = new FormControl('', [Validators.pattern(this._timeRegExp)]);
|
|
486
484
|
// Set the default range
|
|
487
485
|
this._programmaticChange = true;
|
|
488
|
-
this.
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
486
|
+
if (this.initData) {
|
|
487
|
+
this.range = {
|
|
488
|
+
start: dayjs().startOf('day').toISOString(),
|
|
489
|
+
end: dayjs().add(1, 'day').endOf('day').toISOString()
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
else {
|
|
493
|
+
this.range = {};
|
|
494
|
+
}
|
|
492
495
|
// Set the default time range
|
|
493
496
|
this._programmaticChange = true;
|
|
494
497
|
this.timeRange = this.timeRange ?? true;
|
|
@@ -513,16 +516,16 @@ class CmatDateRangeComponent {
|
|
|
513
516
|
// If meridiem doesn't exist, create a moment using 24-hours format and return in
|
|
514
517
|
return dayjs(value, 'HH:mm').second(0);
|
|
515
518
|
}
|
|
516
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.
|
|
517
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.
|
|
519
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CmatDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
520
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.2", 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: [
|
|
518
521
|
{
|
|
519
522
|
provide: NG_VALUE_ACCESSOR,
|
|
520
523
|
useExisting: forwardRef(() => CmatDateRangeComponent),
|
|
521
524
|
multi: true
|
|
522
525
|
}
|
|
523
|
-
], 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 <!-- Start -->\r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"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 <!-- End -->\r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"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>", 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}.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: MatDatepickerModule }, { kind: "component", type: i4.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: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6.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 }); }
|
|
526
|
+
], 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 <!-- Start -->\r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"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 <!-- End -->\r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"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>", 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 }); }
|
|
524
527
|
}
|
|
525
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CmatDateRangeComponent, decorators: [{
|
|
526
529
|
type: Component,
|
|
527
530
|
args: [{ selector: 'cmat-date-range', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDateRange', providers: [
|
|
528
531
|
{
|
|
@@ -531,10 +534,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
531
534
|
multi: true
|
|
532
535
|
}
|
|
533
536
|
], imports: [FormsModule, ReactiveFormsModule, MatButtonModule, MatIconModule,
|
|
534
|
-
|
|
535
|
-
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
|
|
537
|
+
MatFormFieldModule, MatMonthView,
|
|
538
|
+
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 <!-- Start -->\r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"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 <!-- End -->\r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"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>", 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"] }]
|
|
536
539
|
}], ctorParameters: () => [], propDecorators: { controlClass: [{
|
|
537
540
|
type: Input
|
|
541
|
+
}], initData: [{
|
|
542
|
+
type: Input
|
|
538
543
|
}], rangeChanged: [{
|
|
539
544
|
type: Output
|
|
540
545
|
}], _matMonthView1: [{
|
|
@@ -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, MatDatepickerModule } 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\nimport { Subject } from 'rxjs';\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 MatDatepickerModule, MatFormFieldModule,\r\n MatInputModule, NgClass]\r\n})\r\nexport class CmatDateRangeComponent implements ControlValueAccessor, OnInit, OnDestroy {\r\n @Input() controlClass: string = '';\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 private _unsubscribeAll: Subject<any> = new Subject<any>();\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 // Return if the values are the same\r\n if (this._dateFormat === value) {\r\n return;\r\n }\r\n\r\n // Store the value\r\n this._dateFormat = value;\r\n }\r\n\r\n /**\r\n * Setter & getter for timeFormat input */\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 // Return if the values are the same\r\n if (this._timeFormat === value) {\r\n return;\r\n }\r\n\r\n // Set format based on the time format input\r\n this._timeFormat = value === '12' ? 'hh:mmA' : 'HH:mm';\r\n }\r\n\r\n\r\n\r\n /**\r\n * Setter & getter for timeRange input */\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 // Return if the values are the same\r\n if (this._timeRange === value) {\r\n return;\r\n }\r\n\r\n // Store the value\r\n this._timeRange = value;\r\n\r\n // If the time range turned off...\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 * Setter & getter for range input */\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 // Clone the range start and end\r\n const start = this._range.start.clone();\r\n const end = this._range.end.clone();\r\n\r\n // Build and return the range object\r\n return {\r\n startDate: start.clone().format(this.dateFormat),\r\n startTime: this.timeRange ? start.clone().format(this.timeFormat) : null,\r\n endDate: end.clone().format(this.dateFormat),\r\n endTime: 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) {\r\n return;\r\n }\r\n\r\n // Check if the value is an object and has 'start' and 'end' values\r\n if (!value.start || !value.end) {\r\n console.error('Range input must have \"start\" and \"end\" properties!');\r\n\r\n return;\r\n }\r\n\r\n // Check if we are setting an individual date or both of them\r\n const whichDate = value.whichDate ?? null;\r\n\r\n // Get the start and end dates as moment\r\n const start = dayjs(value.start);\r\n const end = dayjs(value.end);\r\n\r\n // If we are only setting the start date...\r\n if (whichDate === 'start') {\r\n // Set the start date\r\n this._range.start = start.clone();\r\n\r\n // If the selected start date is after the end date...\r\n if (this._range.end && this._range.start.isAfter(this._range.end)) {\r\n // Set the end date to the start date but keep the end date's time\r\n const endDate = start.clone().hour(this._range.end.hour()).minute(this._range.end.minute()).second(this._range.end.second());\r\n\r\n // Test this new end date to see if it's ahead of the start date\r\n if (this._range.start.isBefore(endDate)) {\r\n // If it's, set the new end date\r\n this._range.end = endDate;\r\n }\r\n else {\r\n // Otherwise, set the end date same as the start date\r\n this._range.end = start.clone();\r\n }\r\n }\r\n }\r\n\r\n // If we are only setting the end date...\r\n if (whichDate === 'end') {\r\n // Set the end date\r\n this._range.end = end.clone();\r\n\r\n // If the selected end date is before the start date...\r\n if (this._range.start?.isAfter(this._range.end)) {\r\n // Set the start date to the end date but keep the start date's time\r\n const startDate = end.clone().hour(this._range.start.hour()).minute(this._range.start.minute()).second(this._range.start.second());\r\n\r\n // Test this new end date to see if it's ahead of the start date\r\n if (this._range.end.isAfter(startDate)) {\r\n // If it's, set the new start date\r\n this._range.start = startDate;\r\n }\r\n else {\r\n // Otherwise, set the start date same as the end date\r\n this._range.start = end.clone();\r\n }\r\n }\r\n }\r\n\r\n // If we are setting both dates...\r\n if (!whichDate) {\r\n // Set the start date\r\n this._range.start = start.clone();\r\n\r\n // If the start date is before the end date, set the end date as normal.\r\n // If the start date is after the end date, set the end date same as the start date.\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 // Prepare another range object that holds the ISO formatted range dates\r\n const range = {\r\n start: this._range.start.clone().toISOString(),\r\n end: this._range.end.clone().toISOString()\r\n };\r\n\r\n // Emit the range changed event with the range\r\n this.rangeChanged.emit(range);\r\n\r\n // Update the model with the range if the change was not a programmatic change\r\n // Because programmatic changes trigger writeValue which triggers onChange and onTouched\r\n // internally causing them to trigger twice which breaks the form's pristine and touched\r\n // statuses.\r\n if (!this._programmaticChange) {\r\n this._onTouched(range);\r\n this._onChange(range);\r\n }\r\n\r\n // Set the active dates\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\r\n // Set the time form controls\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\r\n // Run ngAfterContentInit on month views to trigger\r\n // re-render on month views if they are available\r\n if (this._matMonthView1 && this._matMonthView2) {\r\n this._matMonthView1.ngAfterContentInit();\r\n this._matMonthView2.ngAfterContentInit();\r\n }\r\n\r\n // Reset the programmatic change status\r\n this._programmaticChange = false;\r\n }\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Control Value Accessor\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Update the form model on change\r\n *\r\n * @param fn\r\n */\r\n registerOnChange(fn: any): void {\r\n this._onChange = fn;\r\n }\r\n\r\n /**\r\n * Update the form model on blur\r\n *\r\n * @param fn\r\n */\r\n registerOnTouched(fn: any): void {\r\n this._onTouched = fn;\r\n }\r\n\r\n /**\r\n * Write to view from model when the form model changes programmatically\r\n *\r\n * @param range\r\n */\r\n writeValue(range: { start: string; end: string }): void {\r\n // Set this change as a programmatic one\r\n this._programmaticChange = true;\r\n\r\n // Set the range\r\n this.range = range;\r\n\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n\r\n ngOnInit(): void {\r\n // Initialize the component\r\n this._init();\r\n }\r\n /**\r\n * On destroy\r\n */\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n this.writeValue = (): void => { };\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Open the picker panel\r\n */\r\n openPickerPanel(): void {\r\n if (this.readonly)\r\n return;\r\n\r\n // Create the overlay\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\r\n // Create a portal from the template\r\n const templatePortal = new TemplatePortal(this._pickerPanel, this._viewContainerRef);\r\n\r\n // On backdrop click\r\n overlayRef.backdropClick().subscribe(() => {\r\n\r\n // If template portal exists and attached...\r\n if (templatePortal?.isAttached) {\r\n // Detach it\r\n templatePortal.detach();\r\n }\r\n\r\n // If overlay exists and attached...\r\n if (overlayRef?.hasAttached()) {\r\n // Detach it\r\n overlayRef.detach();\r\n overlayRef.dispose();\r\n }\r\n });\r\n\r\n // Attach the portal to the overlay\r\n overlayRef.attach(templatePortal);\r\n }\r\n\r\n /**\r\n * Get month label\r\n *\r\n * @param month\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 * Date class function to add/remove class names to calendar days\r\n */\r\n dateClass(): any {\r\n return (date: Dayjs): MatCalendarCellCssClasses | void => {\r\n\r\n // If the date is both start and end date...\r\n if (date.isSame(this._range.start, 'day') && date.isSame(this._range.end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start', 'cmat-date-range-end'];\r\n }\r\n\r\n // If the date is the start date...\r\n if (date.isSame(this._range.start, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start'];\r\n }\r\n\r\n // If the date is the end date...\r\n if (date.isSame(this._range.end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-end'];\r\n }\r\n\r\n // If the date is in between start and end dates...\r\n if (date.isBetween(this._range.start, this._range.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 * Date filter to enable/disable calendar days\r\n */\r\n dateFilter(): any {\r\n // If we are selecting the end date, disable all the dates that comes before the start date\r\n return (date: Dayjs): boolean => !(this.setWhichDate === 'end' && date.isBefore(this._range.start, 'day'));\r\n }\r\n\r\n /**\r\n * On selected date change\r\n *\r\n * @param date\r\n */\r\n onSelectedDateChange(date: Dayjs): void {\r\n if (this._range.start && this._range.end) {\r\n // Create a new range object\r\n const newRange = {\r\n start: this._range.start.clone().toISOString(),\r\n end: this._range.end.clone().toISOString(),\r\n whichDate: ''\r\n };\r\n\r\n // Replace either the start or the end date with the new one\r\n // depending on which date we are setting\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\r\n // Append the which date to the new range object\r\n newRange.whichDate = this.setWhichDate;\r\n\r\n // Switch which date to set on the next run\r\n this.setWhichDate = this.setWhichDate === 'start' ? 'end' : 'start';\r\n\r\n // Set the range\r\n this.range = newRange;\r\n\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n /**\r\n * Go to previous month on both views\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 * Go to next month on both views\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 * Update the start time\r\n *\r\n * @param event\r\n */\r\n updateStartTime(event: any): void {\r\n // Parse the time\r\n const parsedTime = this._parseTime(event.target.value);\r\n\r\n // Go back to the previous value if the form control is not valid\r\n if (this.startTimeFormControl.invalid) {\r\n if (this._range.start) {\r\n // Override the time \r\n const time = this._range.start.clone().format(this._timeFormat);\r\n\r\n // Set the time\r\n this.startTimeFormControl.setValue(time);\r\n }\r\n // Do not update the range\r\n return;\r\n }\r\n\r\n if (this._range.start && this._range.end) {\r\n // Append the new time to the start date\r\n const startDate = this._range.start.clone().hour(parsedTime.hour()).minute(parsedTime.minute());\r\n\r\n // If the new start date is after the current end date,\r\n // use the end date's time and set the start date again\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\r\n // Set the start date\r\n startDate.hour(endDateHours).minute(endDateMinutes);\r\n }\r\n\r\n // If everything is okay, set the new date\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 * Update the end time\r\n *\r\n * @param event\r\n */\r\n updateEndTime(event: any): void {\r\n // Parse the time\r\n const parsedTime = this._parseTime(event.target.value);\r\n\r\n // Go back to the previous value if the form control is not valid\r\n if (this.endTimeFormControl.invalid) {\r\n if (this._range.end) {\r\n // Override the time\r\n const time = this._range.end.clone().format(this._timeFormat);\r\n\r\n // Set the time\r\n this.endTimeFormControl.setValue(time);\r\n }\r\n // Do not update the range\r\n return;\r\n }\r\n\r\n if (this._range.start && this._range.end) {\r\n // Append the new time to the end date\r\n const endDate = this._range.end.clone().hour(parsedTime.hour()).minute(parsedTime.minute());\r\n\r\n // If the new end date is before the current start date,\r\n // use the start date's time and set the end date again\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\r\n // Set the end date\r\n endDate.hour(startDateHours).minute(startDateMinutes);\r\n }\r\n\r\n // If everything is okay, set the new date\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 methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Initialize\r\n *\r\n * @private\r\n */\r\n private _init(): void {\r\n // Start and end time form controls\r\n this.startTimeFormControl = new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n this.endTimeFormControl = new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n\r\n // Set the default range\r\n this._programmaticChange = true;\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\r\n // Set the default time range\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 * Parse the time from the inputs\r\n *\r\n * @param value\r\n * @private\r\n */\r\n private _parseTime(value: string): Dayjs {\r\n // Parse the time using the time regexp\r\n const timeArr = value.split(this._timeRegExp).filter(part => part !== '');\r\n\r\n // Get the meridiem\r\n const meridiem = timeArr[2] || null;\r\n\r\n // If meridiem exists...\r\n if (meridiem) {\r\n // Create a moment using 12-hours format and return it\r\n return dayjs(value, 'hh:mmA').second(0);\r\n }\r\n\r\n // If meridiem doesn't exist, create a moment using 24-hours format and return in\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 <!-- Start -->\r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"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 <!-- End -->\r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"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>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;MAgCa,sBAAsB,CAAA;AAqC/B,IAAA,WAAA,GAAA;QApCS,IAAA,CAAA,YAAY,GAAW,EAAE;AAEf,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,C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,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;;sBA6CvB;;sBASA;;sBAiBA;;sBAmBA;;sBAwCA;;;AEzKL;;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, 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\nimport { Subject } from 'rxjs';\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 private _unsubscribeAll: Subject<any> = new Subject<any>();\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 // Return if the values are the same\r\n if (this._dateFormat === value) {\r\n return;\r\n }\r\n\r\n // Store the value\r\n this._dateFormat = value;\r\n }\r\n\r\n /**\r\n * Setter & getter for timeFormat input */\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 // Return if the values are the same\r\n if (this._timeFormat === value) {\r\n return;\r\n }\r\n\r\n // Set format based on the time format input\r\n this._timeFormat = value === '12' ? 'hh:mmA' : 'HH:mm';\r\n }\r\n\r\n\r\n\r\n /**\r\n * Setter & getter for timeRange input */\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 // Return if the values are the same\r\n if (this._timeRange === value) {\r\n return;\r\n }\r\n\r\n // Store the value\r\n this._timeRange = value;\r\n\r\n // If the time range turned off...\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 * Setter & getter for range input */\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 // Clone the range start and end\r\n const start = this._range?.start.clone();\r\n const end = this._range?.end.clone();\r\n\r\n // Build and return the range object\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\r\n // Check if we are setting an individual date or both of them\r\n const whichDate = value.whichDate ?? null;\r\n\r\n // Get the start and end dates as moment\r\n const start = dayjs(value.start);\r\n const end = dayjs(value.end);\r\n\r\n // If we are only setting the start date...\r\n if (whichDate === 'start') {\r\n // Set the start date\r\n this._range.start = start.clone();\r\n\r\n // If the selected start date is after the end date...\r\n if (this._range.end && this._range.start.isAfter(this._range.end)) {\r\n // Set the end date to the start date but keep the end date's time\r\n const endDate = start.clone().hour(this._range.end.hour()).minute(this._range.end.minute()).second(this._range.end.second());\r\n\r\n // Test this new end date to see if it's ahead of the start date\r\n if (this._range.start.isBefore(endDate)) {\r\n // If it's, set the new end date\r\n this._range.end = endDate;\r\n }\r\n else {\r\n // Otherwise, set the end date same as the start date\r\n this._range.end = start.clone();\r\n }\r\n }\r\n }\r\n\r\n // If we are only setting the end date...\r\n if (whichDate === 'end') {\r\n // Set the end date\r\n this._range.end = end.clone();\r\n\r\n // If the selected end date is before the start date...\r\n if (this._range.start?.isAfter(this._range.end)) {\r\n // Set the start date to the end date but keep the start date's time\r\n const startDate = end.clone().hour(this._range.start.hour()).minute(this._range.start.minute()).second(this._range.start.second());\r\n\r\n // Test this new end date to see if it's ahead of the start date\r\n if (this._range.end.isAfter(startDate)) {\r\n // If it's, set the new start date\r\n this._range.start = startDate;\r\n }\r\n else {\r\n // Otherwise, set the start date same as the end date\r\n this._range.start = end.clone();\r\n }\r\n }\r\n }\r\n\r\n // If we are setting both dates...\r\n if (!whichDate) {\r\n // Set the start date\r\n this._range.start = start.clone();\r\n\r\n // If the start date is before the end date, set the end date as normal.\r\n // If the start date is after the end date, set the end date same as the start date.\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 // Prepare another range object that holds the ISO formatted range dates\r\n const range = {\r\n start: this._range.start.clone().toISOString(),\r\n end: this._range.end.clone().toISOString()\r\n };\r\n\r\n // Emit the range changed event with the range\r\n this.rangeChanged.emit(range);\r\n\r\n // Update the model with the range if the change was not a programmatic change\r\n // Because programmatic changes trigger writeValue which triggers onChange and onTouched\r\n // internally causing them to trigger twice which breaks the form's pristine and touched\r\n // statuses.\r\n if (!this._programmaticChange) {\r\n this._onTouched(range);\r\n this._onChange(range);\r\n }\r\n\r\n // Set the active dates\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\r\n // Set the time form controls\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\r\n // Run ngAfterContentInit on month views to trigger\r\n // re-render on month views if they are available\r\n if (this._matMonthView1 && this._matMonthView2) {\r\n this._matMonthView1.ngAfterContentInit();\r\n this._matMonthView2.ngAfterContentInit();\r\n }\r\n\r\n // Reset the programmatic change status\r\n this._programmaticChange = false;\r\n }\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Control Value Accessor\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Update the form model on change\r\n *\r\n * @param fn\r\n */\r\n registerOnChange(fn: any): void {\r\n this._onChange = fn;\r\n }\r\n\r\n /**\r\n * Update the form model on blur\r\n *\r\n * @param fn\r\n */\r\n registerOnTouched(fn: any): void {\r\n this._onTouched = fn;\r\n }\r\n\r\n /**\r\n * Write to view from model when the form model changes programmatically\r\n *\r\n * @param range\r\n */\r\n writeValue(range: { start: string; end: string }): void {\r\n // Set this change as a programmatic one\r\n this._programmaticChange = true;\r\n\r\n // Set the range\r\n this.range = range;\r\n\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n\r\n ngOnInit(): void {\r\n // Initialize the component\r\n this._init();\r\n }\r\n /**\r\n * On destroy\r\n */\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n this.writeValue = (): void => { };\r\n }\r\n\r\n // -----------------------------------------------------------------------------------------------------\r\n // @ Public methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Open the picker panel\r\n */\r\n openPickerPanel(): void {\r\n if (this.readonly)\r\n return;\r\n\r\n // Create the overlay\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\r\n // Create a portal from the template\r\n const templatePortal = new TemplatePortal(this._pickerPanel, this._viewContainerRef);\r\n\r\n // On backdrop click\r\n overlayRef.backdropClick().subscribe(() => {\r\n\r\n // If template portal exists and attached...\r\n if (templatePortal?.isAttached) {\r\n // Detach it\r\n templatePortal.detach();\r\n }\r\n\r\n // If overlay exists and attached...\r\n if (overlayRef?.hasAttached()) {\r\n // Detach it\r\n overlayRef.detach();\r\n overlayRef.dispose();\r\n }\r\n });\r\n\r\n // Attach the portal to the overlay\r\n overlayRef.attach(templatePortal);\r\n }\r\n\r\n /**\r\n * Get month label\r\n *\r\n * @param month\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 * Date class function to add/remove class names to calendar days\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\r\n // If the date is both start and end date...\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\r\n // If the date is the start date...\r\n if (date.isSame(start, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start'];\r\n }\r\n\r\n // If the date is the end date...\r\n if (date.isSame(end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-end'];\r\n }\r\n\r\n // If the date is in between start and end dates...\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 * Date filter to enable/disable calendar days\r\n */\r\n dateFilter(): any {\r\n // If we are selecting the end date, disable all the dates that comes before the start date\r\n return (date: Dayjs): boolean => !(this.setWhichDate === 'end' && date.isBefore(this._range.start, 'day'));\r\n }\r\n\r\n /**\r\n * On selected date change\r\n *\r\n * @param date\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\r\n // Replace either the start or the end date with the new one\r\n // depending on which date we are setting\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\r\n // Append the which date to the new range object\r\n newRange.whichDate = this.setWhichDate;\r\n\r\n // Switch which date to set on the next run\r\n this.setWhichDate = this.setWhichDate === 'start' ? 'end' : 'start';\r\n\r\n // Set the range\r\n this.range = newRange;\r\n\r\n this._changeDetectorRef.markForCheck();\r\n\r\n }\r\n\r\n /**\r\n * Go to previous month on both views\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 * Go to next month on both views\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 * Update the start time\r\n *\r\n * @param event\r\n */\r\n updateStartTime(event: any): void {\r\n // Parse the time\r\n const parsedTime = this._parseTime(event.target.value);\r\n\r\n // Go back to the previous value if the form control is not valid\r\n if (this.startTimeFormControl.invalid) {\r\n if (this._range.start) {\r\n // Override the time \r\n const time = this._range.start.clone().format(this._timeFormat);\r\n\r\n // Set the time\r\n this.startTimeFormControl.setValue(time);\r\n }\r\n // Do not update the range\r\n return;\r\n }\r\n\r\n if (this._range.start && this._range.end) {\r\n // Append the new time to the start date\r\n const startDate = this._range.start.clone().hour(parsedTime.hour()).minute(parsedTime.minute());\r\n\r\n // If the new start date is after the current end date,\r\n // use the end date's time and set the start date again\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\r\n // Set the start date\r\n startDate.hour(endDateHours).minute(endDateMinutes);\r\n }\r\n\r\n // If everything is okay, set the new date\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 * Update the end time\r\n *\r\n * @param event\r\n */\r\n updateEndTime(event: any): void {\r\n // Parse the time\r\n const parsedTime = this._parseTime(event.target.value);\r\n\r\n // Go back to the previous value if the form control is not valid\r\n if (this.endTimeFormControl.invalid) {\r\n if (this._range.end) {\r\n // Override the time\r\n const time = this._range.end.clone().format(this._timeFormat);\r\n\r\n // Set the time\r\n this.endTimeFormControl.setValue(time);\r\n }\r\n // Do not update the range\r\n return;\r\n }\r\n\r\n if (this._range.start && this._range.end) {\r\n // Append the new time to the end date\r\n const endDate = this._range.end.clone().hour(parsedTime.hour()).minute(parsedTime.minute());\r\n\r\n // If the new end date is before the current start date,\r\n // use the start date's time and set the end date again\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\r\n // Set the end date\r\n endDate.hour(startDateHours).minute(startDateMinutes);\r\n }\r\n\r\n // If everything is okay, set the new date\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 methods\r\n // -----------------------------------------------------------------------------------------------------\r\n\r\n /**\r\n * Initialize\r\n *\r\n * @private\r\n */\r\n private _init(): void {\r\n // Start and end time form controls\r\n this.startTimeFormControl = new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n this.endTimeFormControl = new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n\r\n // Set the default range\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\r\n // Set the default time range\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 * Parse the time from the inputs\r\n *\r\n * @param value\r\n * @private\r\n */\r\n private _parseTime(value: string): Dayjs {\r\n // Parse the time using the time regexp\r\n const timeArr = value.split(this._timeRegExp).filter(part => part !== '');\r\n\r\n // Get the meridiem\r\n const meridiem = timeArr[2] || null;\r\n\r\n // If meridiem exists...\r\n if (meridiem) {\r\n // Create a moment using 12-hours format and return it\r\n return dayjs(value, 'hh:mmA').second(0);\r\n }\r\n\r\n // If meridiem doesn't exist, create a moment using 24-hours format and return in\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 <!-- Start -->\r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"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 <!-- End -->\r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"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>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAgCa,sBAAsB,CAAA;AAsC/B,IAAA,WAAA,GAAA;QArCS,IAAA,CAAA,YAAY,GAAW,EAAE;QACzB,IAAA,CAAA,QAAQ,GAAY,IAAI;AAEd,QAAA,IAAA,CAAA,YAAY,GAAiD,IAAI,YAAY,EAAkC;AAMlI,QAAA,IAAA,CAAA,WAAW,GAAmD;AAC1D,YAAA,MAAM,EAAE,IAAI;AACZ,YAAA,MAAM,EAAE;SACX;QACD,IAAA,CAAA,YAAY,GAAoB,OAAO;AAI/B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;AAC1B,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC5C,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAM9C,QAAA,IAAA,CAAA,MAAM,GAA+C;AACzD,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,GAAG,EAAE;SACR;QAIgB,IAAA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B,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,mBAAmB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;;sBACnD,SAAS;uBAAC,aAAa;;sBA6CvB;;sBASA;;sBAiBA;;sBAmBA;;sBAwCA;;;AE1KL;;AAEG;;;;"}
|
|
@@ -32,10 +32,10 @@ class CmatDrawerService {
|
|
|
32
32
|
getComponent(name) {
|
|
33
33
|
return this._componentRegistry.get(name);
|
|
34
34
|
}
|
|
35
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.
|
|
36
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CmatDrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
36
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CmatDrawerService, providedIn: 'root' }); }
|
|
37
37
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CmatDrawerService, decorators: [{
|
|
39
39
|
type: Injectable,
|
|
40
40
|
args: [{
|
|
41
41
|
providedIn: 'root'
|
|
@@ -285,10 +285,10 @@ class CmatDrawerComponent {
|
|
|
285
285
|
// Execute the observable
|
|
286
286
|
this.openedChanged.emit(open);
|
|
287
287
|
}
|
|
288
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.
|
|
289
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.
|
|
288
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CmatDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
289
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: CmatDrawerComponent, isStandalone: true, selector: "cmat-drawer", inputs: { fixed: "fixed", mode: "mode", name: "name", opened: "opened", position: "position", transparentOverlay: "transparentOverlay" }, outputs: { fixedChanged: "fixedChanged", modeChanged: "modeChanged", openedChanged: "openedChanged", positionChanged: "positionChanged" }, host: { listeners: { "mouseenter": "onMouseenter()", "mouseleave": "onMouseleave()" }, properties: { "class": "this.classList", "style": "this.styleList" } }, exportAs: ["cmatDrawer"], usesOnChanges: true, ngImport: i0, template: "<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>", styles: ["cmat-drawer{position:relative;display:flex;flex-direction:column;flex:1 1 auto;width:320px;min-width:320px;max-width:320px;z-index:300;box-shadow:0 2px 8px #00000059}cmat-drawer.cmat-drawer-animations-enabled{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:visibility,margin-left,margin-right,transform,width,max-width,min-width}cmat-drawer.cmat-drawer-animations-enabled .cmat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:width,max-width,min-width}cmat-drawer.cmat-drawer-mode-over{position:absolute;top:0;bottom:0}cmat-drawer.cmat-drawer-mode-over.cmat-drawer-fixed{position:fixed}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side{margin-left:-320px}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side.cmat-drawer-opened{margin-left:0}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over{left:0;transform:translate3d(-100%,0,0)}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-left .cmat-drawer-content{left:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side{margin-right:-320px}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side.cmat-drawer-opened{margin-right:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over{right:0;transform:translate3d(100%,0,0)}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-right .cmat-drawer-content{right:0}cmat-drawer .cmat-drawer-content{position:absolute;display:flex;flex:1 1 auto;top:0;bottom:0;width:100%;height:100%;overflow:hidden}.cmat-drawer-overlay{position:absolute;inset:0;z-index:299;opacity:1;background-color:#0009}.cmat-drawer-overlay.cmat-drawer-overlay-fixed{position:fixed}.cmat-drawer-overlay.cmat-drawer-overlay-transparent{background-color:transparent}.cmat-drawer-overlay.cmat-drawer-overlay-enter{animation:drawer-overlay-enter .3s cubic-bezier(.25,.8,.25,1)}.cmat-drawer-overlay.cmat-drawer-overlay-leave{animation:drawer-overlay-leave .3s cubic-bezier(.25,.8,.25,1)}@keyframes drawer-overlay-enter{0%{opacity:0}to{opacity:1}}@keyframes drawer-overlay-leave{0%{opacity:1}to{opacity:0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
290
290
|
}
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CmatDrawerComponent, decorators: [{
|
|
292
292
|
type: Component,
|
|
293
293
|
args: [{ selector: 'cmat-drawer', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDrawer', template: "<div class=\"cmat-drawer-content\">\r\n <ng-content></ng-content>\r\n</div>", styles: ["cmat-drawer{position:relative;display:flex;flex-direction:column;flex:1 1 auto;width:320px;min-width:320px;max-width:320px;z-index:300;box-shadow:0 2px 8px #00000059}cmat-drawer.cmat-drawer-animations-enabled{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:visibility,margin-left,margin-right,transform,width,max-width,min-width}cmat-drawer.cmat-drawer-animations-enabled .cmat-drawer-content{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:width,max-width,min-width}cmat-drawer.cmat-drawer-mode-over{position:absolute;top:0;bottom:0}cmat-drawer.cmat-drawer-mode-over.cmat-drawer-fixed{position:fixed}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side{margin-left:-320px}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-side.cmat-drawer-opened{margin-left:0}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over{left:0;transform:translate3d(-100%,0,0)}cmat-drawer.cmat-drawer-position-left.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-left .cmat-drawer-content{left:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side{margin-right:-320px}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-side.cmat-drawer-opened{margin-right:0}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over{right:0;transform:translate3d(100%,0,0)}cmat-drawer.cmat-drawer-position-right.cmat-drawer-mode-over.cmat-drawer-opened{transform:translateZ(0)}cmat-drawer.cmat-drawer-position-right .cmat-drawer-content{right:0}cmat-drawer .cmat-drawer-content{position:absolute;display:flex;flex:1 1 auto;top:0;bottom:0;width:100%;height:100%;overflow:hidden}.cmat-drawer-overlay{position:absolute;inset:0;z-index:299;opacity:1;background-color:#0009}.cmat-drawer-overlay.cmat-drawer-overlay-fixed{position:fixed}.cmat-drawer-overlay.cmat-drawer-overlay-transparent{background-color:transparent}.cmat-drawer-overlay.cmat-drawer-overlay-enter{animation:drawer-overlay-enter .3s cubic-bezier(.25,.8,.25,1)}.cmat-drawer-overlay.cmat-drawer-overlay-leave{animation:drawer-overlay-leave .3s cubic-bezier(.25,.8,.25,1)}@keyframes drawer-overlay-enter{0%{opacity:0}to{opacity:1}}@keyframes drawer-overlay-leave{0%{opacity:1}to{opacity:0}}\n"] }]
|
|
294
294
|
}], propDecorators: { fixed: [{
|
|
@@ -28,10 +28,10 @@ class CmatFullscreenComponent {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.
|
|
32
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CmatFullscreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.2", type: CmatFullscreenComponent, isStandalone: true, selector: "cmat-fullscreen", inputs: { iconTpl: "iconTpl", tooltip: "tooltip" }, exportAs: ["cmatFullscreen"], ngImport: i0, template: "<!-- Button -->\r\n<button type=\"button\" matIconButton [matTooltip]=\"tooltip || '\u5207\u6362\u5168\u5C4F'\" (click)=\"toggleFullscreen()\">\r\n <ng-container [ngTemplateOutlet]=\"iconTpl || defaultIconTpl\"></ng-container>\r\n</button>\r\n\r\n<!-- Default icon -->\r\n<ng-template #defaultIconTpl>\r\n <mat-icon [svgIcon]=\"'heroicons_outline:arrows-pointing-out'\"></mat-icon>\r\n</ng-template>", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
33
33
|
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: CmatFullscreenComponent, decorators: [{
|
|
35
35
|
type: Component,
|
|
36
36
|
args: [{ selector: 'cmat-fullscreen', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatFullscreen', imports: [MatButtonModule, MatTooltipModule, NgTemplateOutlet, MatIconModule], template: "<!-- Button -->\r\n<button type=\"button\" matIconButton [matTooltip]=\"tooltip || '\u5207\u6362\u5168\u5C4F'\" (click)=\"toggleFullscreen()\">\r\n <ng-container [ngTemplateOutlet]=\"iconTpl || defaultIconTpl\"></ng-container>\r\n</button>\r\n\r\n<!-- Default icon -->\r\n<ng-template #defaultIconTpl>\r\n <mat-icon [svgIcon]=\"'heroicons_outline:arrows-pointing-out'\"></mat-icon>\r\n</ng-template>" }]
|
|
37
37
|
}], propDecorators: { iconTpl: [{
|