cmat 0.0.43 → 0.0.44
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/animations/dropdown.css +16 -0
- package/animations/expand-collapse.css +27 -0
- package/animations/fade.css +105 -0
- package/animations/shake.css +9 -0
- package/animations/slide.css +71 -0
- package/animations/zoom.css +21 -0
- package/components/drawer/index.d.ts +2 -2
- package/components/image-viewer/index.d.ts +9 -17
- package/components/material-datetimepicker/index.d.ts +19 -13
- package/components/navigation/index.d.ts +0 -2
- package/components/password-strength/index.d.ts +7 -2
- package/components/popover/index.d.ts +0 -1
- package/fesm2022/cmat-components-adapter.mjs +9 -9
- package/fesm2022/cmat-components-breadcrumb.mjs +9 -9
- package/fesm2022/cmat-components-card.mjs +4 -5
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +12 -12
- package/fesm2022/cmat-components-cascade.mjs +10 -11
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +3 -3
- package/fesm2022/cmat-components-custom-formly.mjs +88 -88
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +3 -3
- package/fesm2022/cmat-components-drawer.mjs +28 -39
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +3 -3
- package/fesm2022/cmat-components-highlight.mjs +6 -6
- package/fesm2022/cmat-components-image-viewer.mjs +49 -73
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +3 -3
- package/fesm2022/cmat-components-knob-input.mjs +3 -3
- package/fesm2022/cmat-components-masonry.mjs +4 -5
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +4 -5
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +130 -111
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +75 -100
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- 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 +69 -163
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +11 -11
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- 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 +54 -59
- package/styles/overrides/angular-material.scss +2 -2
- package/animations/index.d.ts +0 -5
- package/fesm2022/cmat-animations.mjs +0 -466
- package/fesm2022/cmat-animations.mjs.map +0 -1
|
@@ -5,7 +5,6 @@ import { DatetimeAdapter, CMAT_DATETIME_FORMATS } from 'cmat/components/adapter'
|
|
|
5
5
|
import { coerceNumberProperty, coerceBooleanProperty, coerceStringArray } from '@angular/cdk/coercion';
|
|
6
6
|
import * as i1 from '@angular/material/button';
|
|
7
7
|
import { MatButtonModule } from '@angular/material/button';
|
|
8
|
-
import { trigger, transition, animate, keyframes, style, state } from '@angular/animations';
|
|
9
8
|
import { Subject, Subscription, merge, of } from 'rxjs';
|
|
10
9
|
import * as i1$1 from '@angular/cdk/a11y';
|
|
11
10
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
@@ -271,10 +270,10 @@ class CmatDatetimepickerClockComponent {
|
|
|
271
270
|
this.activeDate = date;
|
|
272
271
|
this.activeDateChange.emit(this.activeDate);
|
|
273
272
|
}
|
|
274
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
275
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
273
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerClockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
274
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CmatDatetimepickerClockComponent, isStandalone: true, selector: "cmat-datetimepicker-clock", inputs: { dateFilter: "dateFilter", interval: "interval", twelvehour: "twelvehour", activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate", startView: "startView" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange", activeDateChange: "activeDateChange" }, host: { listeners: { "mousedown": "handleMousedown($event)" }, properties: { "role": "this.role", "class": "this.class" } }, exportAs: ["cmatDatetimepickerClock"], ngImport: i0, template: "<div class=\"cmat-datetimepicker-clock-wrapper\">\r\n <div class=\"cmat-datetimepicker-clock-center\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hand\" [ngStyle]=\"hand\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hours\" [class.active]=\"hourView\">\r\n @for (item of hours; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedHour === item.value\"\r\n [ngStyle]=\"{'fontSize':item.fontSize,'left':item.left+'%',top:item.top+'%'}\">\r\n {{ item.displayValue }}</div>\r\n }\r\n </div>\r\n <div class=\"cmat-datetimepicker-clock-minutes\" [class.active]=\"!hourView\">\r\n @for (item of minutes; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedMinute === item.value\" [ngStyle]=\"{'left':item.left+'%','top':item.top+'%'}\">{{ item.displayValue\r\n }}</div>\r\n }\r\n </div>\r\n</div>", styles: [".cmat-datetimepicker-clock{position:relative;display:block;min-width:224px;margin:12px;box-sizing:border-box;-webkit-user-select:none;user-select:none}.cmat-datetimepicker-clock-wrapper{position:relative;width:100%;height:0;padding-top:100%;border-radius:50%}.cmat-datetimepicker-clock-center{position:absolute;top:50%;left:50%;width:2%;height:2%;margin:-1%;border-radius:50%}.cmat-datetimepicker-clock-hand{position:absolute;inset:0;width:1px;margin:0 auto;transform-origin:bottom}.cmat-datetimepicker-clock-hand:before{content:\"\";position:absolute;top:-4px;left:-4px;width:8px;height:8px;border-radius:50%}.cmat-datetimepicker-clock-hours,.cmat-datetimepicker-clock-minutes{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;visibility:hidden;transition:.35s;transform:scale(1.2)}.cmat-datetimepicker-clock-hours.active,.cmat-datetimepicker-clock-minutes.active{opacity:1;visibility:visible;transform:scale(1)}.cmat-datetimepicker-clock-minutes{transform:scale(.8)}.cmat-datetimepicker-clock-cell{position:absolute;display:flex;width:14.1666%;height:14.1666%;justify-content:center;box-sizing:border-box;border-radius:50%;align-items:center;cursor:pointer}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
276
275
|
}
|
|
277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerClockComponent, decorators: [{
|
|
278
277
|
type: Component,
|
|
279
278
|
args: [{ selector: 'cmat-datetimepicker-clock', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerClock', imports: [NgStyle], template: "<div class=\"cmat-datetimepicker-clock-wrapper\">\r\n <div class=\"cmat-datetimepicker-clock-center\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hand\" [ngStyle]=\"hand\"></div>\r\n <div class=\"cmat-datetimepicker-clock-hours\" [class.active]=\"hourView\">\r\n @for (item of hours; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedHour === item.value\"\r\n [ngStyle]=\"{'fontSize':item.fontSize,'left':item.left+'%',top:item.top+'%'}\">\r\n {{ item.displayValue }}</div>\r\n }\r\n </div>\r\n <div class=\"cmat-datetimepicker-clock-minutes\" [class.active]=\"!hourView\">\r\n @for (item of minutes; track $index) {\r\n <div class=\"cmat-datetimepicker-clock-cell\"\r\n [class.cmat-datetimepicker-clock-cell-disabled]=\"!item.enabled\"\r\n [class.cmat-datetimepicker-clock-cell-selected]=\"selectedMinute === item.value\" [ngStyle]=\"{'left':item.left+'%','top':item.top+'%'}\">{{ item.displayValue\r\n }}</div>\r\n }\r\n </div>\r\n</div>", styles: [".cmat-datetimepicker-clock{position:relative;display:block;min-width:224px;margin:12px;box-sizing:border-box;-webkit-user-select:none;user-select:none}.cmat-datetimepicker-clock-wrapper{position:relative;width:100%;height:0;padding-top:100%;border-radius:50%}.cmat-datetimepicker-clock-center{position:absolute;top:50%;left:50%;width:2%;height:2%;margin:-1%;border-radius:50%}.cmat-datetimepicker-clock-hand{position:absolute;inset:0;width:1px;margin:0 auto;transform-origin:bottom}.cmat-datetimepicker-clock-hand:before{content:\"\";position:absolute;top:-4px;left:-4px;width:8px;height:8px;border-radius:50%}.cmat-datetimepicker-clock-hours,.cmat-datetimepicker-clock-minutes{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;visibility:hidden;transition:.35s;transform:scale(1.2)}.cmat-datetimepicker-clock-hours.active,.cmat-datetimepicker-clock-minutes.active{opacity:1;visibility:visible;transform:scale(1)}.cmat-datetimepicker-clock-minutes{transform:scale(.8)}.cmat-datetimepicker-clock-cell{position:absolute;display:flex;width:14.1666%;height:14.1666%;justify-content:center;box-sizing:border-box;border-radius:50%;align-items:center;cursor:pointer}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{pointer-events:none}\n"] }]
|
|
280
279
|
}], ctorParameters: () => [], propDecorators: { userSelection: [{
|
|
@@ -312,39 +311,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
312
311
|
args: ['mousedown', ['$event']]
|
|
313
312
|
}] } });
|
|
314
313
|
|
|
315
|
-
const transformPanel = trigger('transformPanel', [
|
|
316
|
-
transition('void => enter-dropdown', animate('120ms cubic-bezier(0, 0, 0.2, 1)', keyframes([
|
|
317
|
-
style({ opacity: 0, transform: 'scale(1, 0.8)' }),
|
|
318
|
-
style({ opacity: 1, transform: 'scale(1, 1)' }),
|
|
319
|
-
]))),
|
|
320
|
-
transition('void => enter-dialog', animate('150ms cubic-bezier(0, 0, 0.2, 1)', keyframes([
|
|
321
|
-
style({ opacity: 0, transform: 'scale(0.7)' }),
|
|
322
|
-
style({ transform: 'none', opacity: 1 }),
|
|
323
|
-
]))),
|
|
324
|
-
transition('* => void', animate('100ms linear', style({ opacity: 0 }))),
|
|
325
|
-
]);
|
|
326
|
-
const fadeInCalendar = trigger('fadeInCalendar', [
|
|
327
|
-
state('void', style({ opacity: 0 })),
|
|
328
|
-
state('enter', style({ opacity: 1 })),
|
|
329
|
-
transition('void => *', animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)'))
|
|
330
|
-
]);
|
|
331
|
-
const slideCalendar = trigger('slideCalendar', [
|
|
332
|
-
transition('* => left', [
|
|
333
|
-
animate(180, keyframes([
|
|
334
|
-
style({ transform: 'translateX(100%)', offset: 0.5 }),
|
|
335
|
-
style({ transform: 'translateX(-100%)', offset: 0.51 }),
|
|
336
|
-
style({ transform: 'translateX(0)', offset: 1 })
|
|
337
|
-
]))
|
|
338
|
-
]),
|
|
339
|
-
transition('* => right', [
|
|
340
|
-
animate(180, keyframes([
|
|
341
|
-
style({ transform: 'translateX(-100%)', offset: 0.5 }),
|
|
342
|
-
style({ transform: 'translateX(100%)', offset: 0.51 }),
|
|
343
|
-
style({ transform: 'translateX(0)', offset: 1 })
|
|
344
|
-
]))
|
|
345
|
-
])
|
|
346
|
-
]);
|
|
347
|
-
|
|
348
314
|
function createMissingDateImplError(provider) {
|
|
349
315
|
return Error(`CmatDatetimepickerComponent: No provider found for ${provider}. You must import one of the following ` +
|
|
350
316
|
'modules at your application root: CMatNativeDatetimeModule or provide a ' +
|
|
@@ -403,10 +369,10 @@ class CmatDatetimepickerIntl {
|
|
|
403
369
|
formatYearRangeLabel(start, end) {
|
|
404
370
|
return `${start} to ${end}`;
|
|
405
371
|
}
|
|
406
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
407
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
372
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
373
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerIntl, providedIn: 'root' }); }
|
|
408
374
|
}
|
|
409
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerIntl, decorators: [{
|
|
410
376
|
type: Injectable,
|
|
411
377
|
args: [{ providedIn: 'root' }]
|
|
412
378
|
}] });
|
|
@@ -456,10 +422,10 @@ class CmatDatetimepickerCalendarBodyComponent {
|
|
|
456
422
|
}
|
|
457
423
|
return cellNumber === this.activeCell;
|
|
458
424
|
}
|
|
459
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
460
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
425
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerCalendarBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
426
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CmatDatetimepickerCalendarBodyComponent, isStandalone: true, selector: "[cmat-datetimepicker-calendar-body]", inputs: { label: "label", rows: "rows", todayValue: "todayValue", selectedValue: "selectedValue", labelMinRequiredCells: "labelMinRequiredCells", numCols: "numCols", allowDisabledSelection: "allowDisabledSelection", activeCell: "activeCell" }, outputs: { selectedValueChange: "selectedValueChange" }, host: { properties: { "class": "this.class" } }, exportAs: ["cmatDatetimepickerCalendarBody"], ngImport: i0, template: "<!--\r\nIf rst row, create a separate label row. We mark this row as\r\naria-hidden because we don't want it to be read out as one of the weeks in the month.\r\n-->\r\n@if (_firstRowOffset < labelMinRequiredCells) {\r\n <tr aria-hidden=\"true\">\r\n <td class=\"cmat-datetimepicker-calendar-body-label\" [attr.colspan]=\"numCols\">{{ label }}</td>\r\n </tr>\r\n}\r\n\r\n<!-- Create the first row separately so we can include a special spacer cell. -->\r\n@for (row of rows; track $index; let rowIndex = $index) {\r\n <tr role=\"row\">\r\n <!--\r\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\r\n -->\r\n @if (rowIndex === 0 && _firstRowOffset) {\r\n <td aria-hidden=\"true\" class=\"cmat-datetimepicker-calendar-body-label\"\r\n [attr.colspan]=\"_firstRowOffset\">\r\n {{ _firstRowOffset >= labelMinRequiredCells ? label : '' }}\r\n </td>\r\n }\r\n @for (item of row; track $index; let colIndex = $index) {\r\n <td role=\"presentation\" class=\"cmat-datetimepicker-calendar-body-cell\"\r\n [attr.aria-disabled]=\"!item.enabled || null\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [class.cmat-datetimepicker-calendar-body-active]=\"isActiveCell(rowIndex, colIndex)\"\r\n [class.cmat-datetimepicker-calendar-body-disabled]=\"!item.enabled\" (click)=\"cellClicked(item)\">\r\n <div class=\"cmat-datetimepicker-calendar-body-cell-content\"\r\n [attr.aria-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-today]=\"todayValue === item.value\">\r\n {{ item.displayValue }}\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n}", styles: [".cmat-datetimepicker-calendar-body{min-width:224px}.cmat-datetimepicker-calendar-body-label{height:0;line-height:0;text-align:left;padding:calc(14.2857142857% / 2) 4.7142857143%}[dir=rtl] .cmat-datetimepicker-calendar-body-label{text-align:right}.cmat-datetimepicker-calendar-body-cell{position:relative;width:14.2857142857%;height:0;line-height:0;padding:calc(14.2857142857% / 2) 0;text-align:center;outline:none;cursor:pointer}.cmat-datetimepicker-calendar-body-disabled{cursor:default;pointer-events:none}.cmat-datetimepicker-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;border:1px solid transparent;border-radius:999px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
461
427
|
}
|
|
462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerCalendarBodyComponent, decorators: [{
|
|
463
429
|
type: Component,
|
|
464
430
|
args: [{ selector: '[cmat-datetimepicker-calendar-body]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerCalendarBody', imports: [], template: "<!--\r\nIf rst row, create a separate label row. We mark this row as\r\naria-hidden because we don't want it to be read out as one of the weeks in the month.\r\n-->\r\n@if (_firstRowOffset < labelMinRequiredCells) {\r\n <tr aria-hidden=\"true\">\r\n <td class=\"cmat-datetimepicker-calendar-body-label\" [attr.colspan]=\"numCols\">{{ label }}</td>\r\n </tr>\r\n}\r\n\r\n<!-- Create the first row separately so we can include a special spacer cell. -->\r\n@for (row of rows; track $index; let rowIndex = $index) {\r\n <tr role=\"row\">\r\n <!--\r\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\r\n -->\r\n @if (rowIndex === 0 && _firstRowOffset) {\r\n <td aria-hidden=\"true\" class=\"cmat-datetimepicker-calendar-body-label\"\r\n [attr.colspan]=\"_firstRowOffset\">\r\n {{ _firstRowOffset >= labelMinRequiredCells ? label : '' }}\r\n </td>\r\n }\r\n @for (item of row; track $index; let colIndex = $index) {\r\n <td role=\"presentation\" class=\"cmat-datetimepicker-calendar-body-cell\"\r\n [attr.aria-disabled]=\"!item.enabled || null\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [class.cmat-datetimepicker-calendar-body-active]=\"isActiveCell(rowIndex, colIndex)\"\r\n [class.cmat-datetimepicker-calendar-body-disabled]=\"!item.enabled\" (click)=\"cellClicked(item)\">\r\n <div class=\"cmat-datetimepicker-calendar-body-cell-content\"\r\n [attr.aria-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-today]=\"todayValue === item.value\">\r\n {{ item.displayValue }}\r\n </div>\r\n </td>\r\n }\r\n </tr>\r\n}", styles: [".cmat-datetimepicker-calendar-body{min-width:224px}.cmat-datetimepicker-calendar-body-label{height:0;line-height:0;text-align:left;padding:calc(14.2857142857% / 2) 4.7142857143%}[dir=rtl] .cmat-datetimepicker-calendar-body-label{text-align:right}.cmat-datetimepicker-calendar-body-cell{position:relative;width:14.2857142857%;height:0;line-height:0;padding:calc(14.2857142857% / 2) 0;text-align:center;outline:none;cursor:pointer}.cmat-datetimepicker-calendar-body-disabled{cursor:default;pointer-events:none}.cmat-datetimepicker-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;border:1px solid transparent;border-radius:999px}\n"] }]
|
|
465
431
|
}], propDecorators: { label: [{
|
|
@@ -497,6 +463,9 @@ class CmatDatetimepickerMonthViewComponent {
|
|
|
497
463
|
this.selectedChange = new EventEmitter();
|
|
498
464
|
this.adapter = inject(DatetimeAdapter, { optional: true });
|
|
499
465
|
this._dateFormats = inject(CMAT_DATETIME_FORMATS, { optional: true });
|
|
466
|
+
this._elementRef = inject(ElementRef);
|
|
467
|
+
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
468
|
+
this._calendarAnimationListener = this.calendarStateDone.bind(this);
|
|
500
469
|
if (!this.adapter) {
|
|
501
470
|
throw createMissingDateImplError('CDatetimeAdapter');
|
|
502
471
|
}
|
|
@@ -510,6 +479,7 @@ class CmatDatetimepickerMonthViewComponent {
|
|
|
510
479
|
const weekdays = longWeekdays.map((long, i) => ({ long, narrow: narrowWeekdays[i] }));
|
|
511
480
|
this.weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));
|
|
512
481
|
this._activeDate = this.adapter.today();
|
|
482
|
+
this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);
|
|
513
483
|
}
|
|
514
484
|
/**
|
|
515
485
|
* The date to display in this month view (everything other than the month and year is ignored).
|
|
@@ -543,6 +513,9 @@ class CmatDatetimepickerMonthViewComponent {
|
|
|
543
513
|
ngAfterContentInit() {
|
|
544
514
|
this._init();
|
|
545
515
|
}
|
|
516
|
+
ngOnDestroy() {
|
|
517
|
+
this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);
|
|
518
|
+
}
|
|
546
519
|
/** Handles when a new date is selected. */
|
|
547
520
|
dateSelected(date) {
|
|
548
521
|
this.selectedChange.emit(this.adapter.createDatetime(this.adapter.getYear(this.activeDate), this.adapter.getMonth(this.activeDate), date, this.adapter.getHour(this.activeDate), this.adapter.getMinute(this.activeDate)));
|
|
@@ -550,8 +523,11 @@ class CmatDatetimepickerMonthViewComponent {
|
|
|
550
523
|
this.userSelection.emit();
|
|
551
524
|
}
|
|
552
525
|
}
|
|
553
|
-
calendarStateDone() {
|
|
554
|
-
|
|
526
|
+
calendarStateDone(event) {
|
|
527
|
+
if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {
|
|
528
|
+
this.calendarState = '';
|
|
529
|
+
this._changeDetectorRef.markForCheck();
|
|
530
|
+
}
|
|
555
531
|
}
|
|
556
532
|
/** Initializes this month view. */
|
|
557
533
|
_init() {
|
|
@@ -592,12 +568,12 @@ class CmatDatetimepickerMonthViewComponent {
|
|
|
592
568
|
_changeCalendarState(direction) {
|
|
593
569
|
this.calendarState = direction;
|
|
594
570
|
}
|
|
595
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
596
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
571
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerMonthViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
572
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CmatDatetimepickerMonthViewComponent, isStandalone: true, selector: "cmat-datetimepicker-month-view", inputs: { type: "type", dateFilter: "dateFilter", activeDate: "activeDate", selected: "selected" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange" }, exportAs: ["cmatDatetimepickerMonthView"], ngImport: i0, template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\">\r\n <tr>\r\n @for (day of weekdays; track $index) {\r\n <th [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\r\n }\r\n </tr>\r\n <tr>\r\n <th colspan=\"7\" class=\"cmat-calendar-table-header-divider\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getDate(activeDate) - 1\" [rows]=\"weeks\"\r\n [selectedValue]=\"selectedDate\" [todayValue]=\"todayDate\" (selectedValueChange)=\"dateSelected($event)\">\r\n </tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "component", type: CmatDatetimepickerCalendarBodyComponent, selector: "[cmat-datetimepicker-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "allowDisabledSelection", "activeCell"], outputs: ["selectedValueChange"], exportAs: ["cmatDatetimepickerCalendarBody"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
597
573
|
}
|
|
598
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerMonthViewComponent, decorators: [{
|
|
599
575
|
type: Component,
|
|
600
|
-
args: [{ selector: 'cmat-datetimepicker-month-view',
|
|
576
|
+
args: [{ selector: 'cmat-datetimepicker-month-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerMonthView', imports: [CmatDatetimepickerCalendarBodyComponent, NgClass], template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\">\r\n <tr>\r\n @for (day of weekdays; track $index) {\r\n <th [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\r\n }\r\n </tr>\r\n <tr>\r\n <th colspan=\"7\" class=\"cmat-calendar-table-header-divider\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getDate(activeDate) - 1\" [rows]=\"weeks\"\r\n [selectedValue]=\"selectedDate\" [todayValue]=\"todayDate\" (selectedValueChange)=\"dateSelected($event)\">\r\n </tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
|
|
601
577
|
}], ctorParameters: () => [], propDecorators: { type: [{
|
|
602
578
|
type: Input
|
|
603
579
|
}], userSelection: [{
|
|
@@ -625,6 +601,9 @@ class CmatDatetimepickerMultiYearViewComponent {
|
|
|
625
601
|
this.selectedChange = new EventEmitter();
|
|
626
602
|
this.adapter = inject(DatetimeAdapter, { optional: true });
|
|
627
603
|
this._dateFormats = inject(CMAT_DATETIME_FORMATS, { optional: true });
|
|
604
|
+
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
605
|
+
this._elementRef = inject(ElementRef);
|
|
606
|
+
this._calendarAnimationListener = this.calendarStateDone.bind(this);
|
|
628
607
|
if (!this.adapter) {
|
|
629
608
|
throw createMissingDateImplError('CDatetimeAdapter');
|
|
630
609
|
}
|
|
@@ -632,6 +611,7 @@ class CmatDatetimepickerMultiYearViewComponent {
|
|
|
632
611
|
throw createMissingDateImplError('CMAT_DATETIME_FORMATS');
|
|
633
612
|
}
|
|
634
613
|
this._activeDate = this.adapter.today();
|
|
614
|
+
this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);
|
|
635
615
|
}
|
|
636
616
|
/** The date to display in this multi year view*/
|
|
637
617
|
get activeDate() {
|
|
@@ -643,6 +623,12 @@ class CmatDatetimepickerMultiYearViewComponent {
|
|
|
643
623
|
if (oldActiveDate && this._activeDate &&
|
|
644
624
|
!isSameMultiYearView(this.adapter, oldActiveDate, this._activeDate, this.minDate, this.maxDate)) {
|
|
645
625
|
this._init();
|
|
626
|
+
if (this.adapter.isInNextMonth(oldActiveDate, this._activeDate)) {
|
|
627
|
+
this._changeCalendarState('right');
|
|
628
|
+
}
|
|
629
|
+
else {
|
|
630
|
+
this._changeCalendarState('left');
|
|
631
|
+
}
|
|
646
632
|
}
|
|
647
633
|
}
|
|
648
634
|
/** The currently selected date. */
|
|
@@ -673,6 +659,9 @@ class CmatDatetimepickerMultiYearViewComponent {
|
|
|
673
659
|
ngAfterContentInit() {
|
|
674
660
|
this._init();
|
|
675
661
|
}
|
|
662
|
+
ngOnDestroy() {
|
|
663
|
+
this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);
|
|
664
|
+
}
|
|
676
665
|
/** Handles when a new year is selected. */
|
|
677
666
|
yearSelected(year) {
|
|
678
667
|
const month = this.adapter.getMonth(this.activeDate);
|
|
@@ -685,8 +674,11 @@ class CmatDatetimepickerMultiYearViewComponent {
|
|
|
685
674
|
getActiveCell() {
|
|
686
675
|
return getActiveOffset(this.adapter, this.activeDate, this.minDate, this.maxDate);
|
|
687
676
|
}
|
|
688
|
-
calendarStateDone() {
|
|
689
|
-
|
|
677
|
+
calendarStateDone(event) {
|
|
678
|
+
if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {
|
|
679
|
+
this.calendarState = '';
|
|
680
|
+
this._changeDetectorRef.markForCheck();
|
|
681
|
+
}
|
|
690
682
|
}
|
|
691
683
|
/** Initializes this year view. */
|
|
692
684
|
_init() {
|
|
@@ -736,12 +728,15 @@ class CmatDatetimepickerMultiYearViewComponent {
|
|
|
736
728
|
_getValidDateOrNull(obj) {
|
|
737
729
|
return (this.adapter.isDateInstance(obj) && this.adapter.isValid(obj)) ? obj : null;
|
|
738
730
|
}
|
|
739
|
-
|
|
740
|
-
|
|
731
|
+
_changeCalendarState(direction) {
|
|
732
|
+
this.calendarState = direction;
|
|
733
|
+
}
|
|
734
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerMultiYearViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
735
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: CmatDatetimepickerMultiYearViewComponent, isStandalone: true, selector: "cmat-datetimepicker-multi-year-view", inputs: { type: "type", dateFilter: "dateFilter", activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange" }, exportAs: ["cmatDatetimepickerMultiYearView"], ngImport: i0, template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"getActiveCell()\" [numCols]=\"4\" [rows]=\"years\"\r\n [selectedValue]=\"selectedYear\" [todayValue]=\"todayYear\" [allowDisabledSelection]=\"true\"\r\n (selectedValueChange)=\"yearSelected($event)\"></tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "component", type: CmatDatetimepickerCalendarBodyComponent, selector: "[cmat-datetimepicker-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "allowDisabledSelection", "activeCell"], outputs: ["selectedValueChange"], exportAs: ["cmatDatetimepickerCalendarBody"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
741
736
|
}
|
|
742
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerMultiYearViewComponent, decorators: [{
|
|
743
738
|
type: Component,
|
|
744
|
-
args: [{ selector: 'cmat-datetimepicker-multi-year-view',
|
|
739
|
+
args: [{ selector: 'cmat-datetimepicker-multi-year-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerMultiYearView', imports: [CmatDatetimepickerCalendarBodyComponent, NgClass], template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"getActiveCell()\" [numCols]=\"4\" [rows]=\"years\"\r\n [selectedValue]=\"selectedYear\" [todayValue]=\"todayYear\" [allowDisabledSelection]=\"true\"\r\n (selectedValueChange)=\"yearSelected($event)\"></tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
|
|
745
740
|
}], ctorParameters: () => [], propDecorators: { userSelection: [{
|
|
746
741
|
type: Output
|
|
747
742
|
}], type: [{
|
|
@@ -946,10 +941,10 @@ class CmatDatetimepickerTimeInputDirective {
|
|
|
946
941
|
this.inputElement.removeEventListener('keypress', this._keyPressListener);
|
|
947
942
|
this.inputElement.removeEventListener('input', this._inputEventListener);
|
|
948
943
|
}
|
|
949
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
950
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
944
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerTimeInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
945
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: CmatDatetimepickerTimeInputDirective, isStandalone: true, selector: "input.cmat-datetimepicker-time-input", inputs: { timeInterval: "timeInterval", timeMin: "timeMin", timeMax: "timeMax", timeValue: "timeValue" }, outputs: { timeValueChanged: "timeValueChanged" }, host: { listeners: { "blur": "blur($event)", "focus": "focus($event)" } }, exportAs: ["cmatDatetimepickerTimeInput"], ngImport: i0 }); }
|
|
951
946
|
}
|
|
952
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
947
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerTimeInputDirective, decorators: [{
|
|
953
948
|
type: Directive,
|
|
954
949
|
args: [{
|
|
955
950
|
selector: 'input.cmat-datetimepicker-time-input',
|
|
@@ -1190,10 +1185,10 @@ class CmatDatetimepickerTimeComponent {
|
|
|
1190
1185
|
this.datetimepickerIntlChangesSubscription.unsubscribe();
|
|
1191
1186
|
}
|
|
1192
1187
|
}
|
|
1193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1194
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
1188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1189
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CmatDatetimepickerTimeComponent, isStandalone: true, selector: "cmat-datetimepicker-time", inputs: { dateFilter: "dateFilter", interval: "interval", AMPM: "AMPM", twelvehour: "twelvehour", activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate", clockView: "clockView" }, outputs: { selectedChange: "selectedChange", activeDateChange: "activeDateChange", userSelection: "userSelection", ampmChange: "ampmChange", clockViewChange: "clockViewChange" }, host: { properties: { "class": "this.class" } }, viewQueries: [{ propertyName: "hourInputElement", first: true, predicate: ["hourInput"], descendants: true, read: (ElementRef) }, { propertyName: "hourInputDirective", first: true, predicate: ["hourInput"], descendants: true, read: CmatDatetimepickerTimeInputDirective }, { propertyName: "minuteInputElement", first: true, predicate: ["minuteInput"], descendants: true, read: (ElementRef) }, { propertyName: "minuteInputDirective", first: true, predicate: ["minuteInput"], descendants: true, read: CmatDatetimepickerTimeInputDirective }], exportAs: ["cmatDatetimepickerTime"], usesOnChanges: true, ngImport: i0, template: "<div class=\"cmat-datetimepicker-time-input-wrapper\">\r\n <div class=\"cmat-datetimepicker-time-input-inner\">\r\n <input #hourInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'hour'\" [class.cmat-datetimepicker-time-input-warning]=\"!hourInput.valid\" [timeMin]=\"twelvehour ? 1 : 0\" [timeMax]=\"twelvehour ? 12 : 23\"\r\n [timeValue]=\"hour\" (timeValueChanged)=\"handleHourInputChange($event)\" (focus)=\"handleFocus('hour')\" />\r\n\r\n <div class=\"cmat-datetimepicker-time-seperator\">:</div>\r\n\r\n <input #minuteInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'minute'\" [class.cmat-datetimepicker-time-input-warning]=\"!minuteInput.valid\" [timeMin]=\"0\" [timeMax]=\"59\" [timeValue]=\"minute\"\r\n [timeInterval]=\"interval\" (timeValueChanged)=\"handleMinuteInputChange($event)\" (focus)=\"handleFocus('minute')\" />\r\n\r\n @if (twelvehour) {\r\n <div class=\"cmat-datetimepicker-time-ampm\">\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-am\"\r\n aria-label=\"AM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'AM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('AM')\">AM</button>\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-pm\"\r\n aria-label=\"PM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'PM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('PM')\">PM</button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"interval\"\r\n [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"selected\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\"\r\n (selectedChange)=\"timeSelected($event)\" (activeDateChange)=\"onActiveDateChange($event)\">\r\n </cmat-datetimepicker-clock>\r\n\r\n <div class=\"cmat-datetimepicker-time-button-wrapper flex flex-row gap-4\">\r\n <button class=\"cmat=datetimepicker-time-cancel-button\" matButton=\"outlined\" type=\"button\" (click)=\"handleCancel()\">\r\n {{ datetimepickerIntl.cancelLabel }}\r\n </button>\r\n <button class=\"cmat-datetimepicker-time-ok-button\" matButton=\"filled\" type=\"button\" color=\"primary\" [disabled]=\"minuteInputDirective?.invalid || hourInputDirective?.invalid\"\r\n (click)=\"handleOk()\">\r\n {{ datetimepickerIntl.okLabel }}\r\n </button>\r\n </div>", styles: [".cmat-datetimepicker-time{display:block;outline:none;-webkit-user-select:none;user-select:none}.cmat-datetimepicker-time-input-wrapper{padding:8px 0;text-align:center}.cmat-datetimepicker-time-input-inner{display:inline-flex;height:56px;align-items:center}.cmat-datetimepicker-time-input{width:72px;font-size:36px;text-align:center;border-radius:8px;border:2px solid transparent;appearance:none;outline:none;height:100%}.cmat-datetimepicker-time-seperator{display:inline-flex;justify-content:center;width:24px;font-size:36px;height:100%}.cmat-datetimepicker-time-ampm{display:inline-flex;flex-direction:column;margin-left:12px;height:100%}[dir=rtl] .cmat-datetimepicker-time-ampm{margin-left:auto;margin-right:12px}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{flex:1;width:40px;min-width:auto;padding:0;line-height:normal;border-width:1px;border-style:solid;min-height:0}.cmat-datetimepicker-time-am.mat-mdc-button{border-radius:8px 8px 0 0!important}.cmat-datetimepicker-time-pm.mat-mdc-button{border-radius:0 0 8px 8px!important;border-top:none}.cmat-datetimepicker-time-button-wrapper{display:flex;justify-content:flex-end;padding-top:8px}\n"], dependencies: [{ kind: "directive", type: CmatDatetimepickerTimeInputDirective, selector: "input.cmat-datetimepicker-time-input", inputs: ["timeInterval", "timeMin", "timeMax", "timeValue"], outputs: ["timeValueChanged"], exportAs: ["cmatDatetimepickerTimeInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: CmatDatetimepickerClockComponent, selector: "cmat-datetimepicker-clock", inputs: ["dateFilter", "interval", "twelvehour", "activeDate", "selected", "minDate", "maxDate", "startView"], outputs: ["userSelection", "selectedChange", "activeDateChange"], exportAs: ["cmatDatetimepickerClock"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1195
1190
|
}
|
|
1196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerTimeComponent, decorators: [{
|
|
1197
1192
|
type: Component,
|
|
1198
1193
|
args: [{ selector: 'cmat-datetimepicker-time', exportAs: 'cmatDatetimepickerTime', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CmatDatetimepickerTimeInputDirective, MatButtonModule, CmatDatetimepickerClockComponent], template: "<div class=\"cmat-datetimepicker-time-input-wrapper\">\r\n <div class=\"cmat-datetimepicker-time-input-inner\">\r\n <input #hourInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'hour'\" [class.cmat-datetimepicker-time-input-warning]=\"!hourInput.valid\" [timeMin]=\"twelvehour ? 1 : 0\" [timeMax]=\"twelvehour ? 12 : 23\"\r\n [timeValue]=\"hour\" (timeValueChanged)=\"handleHourInputChange($event)\" (focus)=\"handleFocus('hour')\" />\r\n\r\n <div class=\"cmat-datetimepicker-time-seperator\">:</div>\r\n\r\n <input #minuteInput=\"cmatDatetimepickerTimeInput\" class=\"cmat-datetimepicker-time-input\"\r\n type=\"text\" inputmode=\"numeric\"\r\n maxlength=\"2\" [class.cmat-datetimepicker-time-input-active]=\"clockView === 'minute'\" [class.cmat-datetimepicker-time-input-warning]=\"!minuteInput.valid\" [timeMin]=\"0\" [timeMax]=\"59\" [timeValue]=\"minute\"\r\n [timeInterval]=\"interval\" (timeValueChanged)=\"handleMinuteInputChange($event)\" (focus)=\"handleFocus('minute')\" />\r\n\r\n @if (twelvehour) {\r\n <div class=\"cmat-datetimepicker-time-ampm\">\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-am\"\r\n aria-label=\"AM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'AM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('AM')\">AM</button>\r\n <button matButton type=\"button\" class=\"cmat-datetimepicker-time-pm\"\r\n aria-label=\"PM\" [class.cmat-datetimepicker-time-ampm-active]=\"AMPM === 'PM'\"\r\n (keydown)=\"$event.stopPropagation()\" (click)=\"ampmChange.emit('PM')\">PM</button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"interval\"\r\n [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"selected\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\"\r\n (selectedChange)=\"timeSelected($event)\" (activeDateChange)=\"onActiveDateChange($event)\">\r\n </cmat-datetimepicker-clock>\r\n\r\n <div class=\"cmat-datetimepicker-time-button-wrapper flex flex-row gap-4\">\r\n <button class=\"cmat=datetimepicker-time-cancel-button\" matButton=\"outlined\" type=\"button\" (click)=\"handleCancel()\">\r\n {{ datetimepickerIntl.cancelLabel }}\r\n </button>\r\n <button class=\"cmat-datetimepicker-time-ok-button\" matButton=\"filled\" type=\"button\" color=\"primary\" [disabled]=\"minuteInputDirective?.invalid || hourInputDirective?.invalid\"\r\n (click)=\"handleOk()\">\r\n {{ datetimepickerIntl.okLabel }}\r\n </button>\r\n </div>", styles: [".cmat-datetimepicker-time{display:block;outline:none;-webkit-user-select:none;user-select:none}.cmat-datetimepicker-time-input-wrapper{padding:8px 0;text-align:center}.cmat-datetimepicker-time-input-inner{display:inline-flex;height:56px;align-items:center}.cmat-datetimepicker-time-input{width:72px;font-size:36px;text-align:center;border-radius:8px;border:2px solid transparent;appearance:none;outline:none;height:100%}.cmat-datetimepicker-time-seperator{display:inline-flex;justify-content:center;width:24px;font-size:36px;height:100%}.cmat-datetimepicker-time-ampm{display:inline-flex;flex-direction:column;margin-left:12px;height:100%}[dir=rtl] .cmat-datetimepicker-time-ampm{margin-left:auto;margin-right:12px}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{flex:1;width:40px;min-width:auto;padding:0;line-height:normal;border-width:1px;border-style:solid;min-height:0}.cmat-datetimepicker-time-am.mat-mdc-button{border-radius:8px 8px 0 0!important}.cmat-datetimepicker-time-pm.mat-mdc-button{border-radius:0 0 8px 8px!important;border-top:none}.cmat-datetimepicker-time-button-wrapper{display:flex;justify-content:flex-end;padding-top:8px}\n"] }]
|
|
1199
1194
|
}], ctorParameters: () => [], propDecorators: { selectedChange: [{
|
|
@@ -1252,6 +1247,9 @@ class CmatDatetimepickerYearViewComponent {
|
|
|
1252
1247
|
this.selectedChange = new EventEmitter();
|
|
1253
1248
|
this.adapter = inject(DatetimeAdapter, { optional: true });
|
|
1254
1249
|
this._dateFormats = inject(CMAT_DATETIME_FORMATS, { optional: true });
|
|
1250
|
+
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
1251
|
+
this._elementRef = inject(ElementRef);
|
|
1252
|
+
this._calendarAnimationListener = this.calendarStateDone.bind(this);
|
|
1255
1253
|
if (!this.adapter) {
|
|
1256
1254
|
throw createMissingDateImplError('CDatetimeAdapter');
|
|
1257
1255
|
}
|
|
@@ -1259,6 +1257,7 @@ class CmatDatetimepickerYearViewComponent {
|
|
|
1259
1257
|
throw createMissingDateImplError('CMAT_DATETIME_FORMATS');
|
|
1260
1258
|
}
|
|
1261
1259
|
this._activeDate = this.adapter.today();
|
|
1260
|
+
this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);
|
|
1262
1261
|
}
|
|
1263
1262
|
/** The date to display in this year view (everything other than the year is ignored). */
|
|
1264
1263
|
get activeDate() {
|
|
@@ -1270,6 +1269,12 @@ class CmatDatetimepickerYearViewComponent {
|
|
|
1270
1269
|
if (oldActiveDate && this._activeDate &&
|
|
1271
1270
|
!this.adapter.sameYear(oldActiveDate, this._activeDate)) {
|
|
1272
1271
|
this._init();
|
|
1272
|
+
if (this.adapter.isInNextMonth(oldActiveDate, this._activeDate)) {
|
|
1273
|
+
this._changeCalendarState('right');
|
|
1274
|
+
}
|
|
1275
|
+
else {
|
|
1276
|
+
this._changeCalendarState('left');
|
|
1277
|
+
}
|
|
1273
1278
|
}
|
|
1274
1279
|
}
|
|
1275
1280
|
/** The currently selected date. */
|
|
@@ -1284,6 +1289,9 @@ class CmatDatetimepickerYearViewComponent {
|
|
|
1284
1289
|
ngAfterContentInit() {
|
|
1285
1290
|
this._init();
|
|
1286
1291
|
}
|
|
1292
|
+
ngOnDestroy() {
|
|
1293
|
+
this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);
|
|
1294
|
+
}
|
|
1287
1295
|
/** Handles when a new month is selected. */
|
|
1288
1296
|
monthSelected(month) {
|
|
1289
1297
|
const normalizedDate = this.adapter.createDatetime(this.adapter.getYear(this.activeDate), month, 1, 0, 0);
|
|
@@ -1292,8 +1300,11 @@ class CmatDatetimepickerYearViewComponent {
|
|
|
1292
1300
|
this.userSelection.emit();
|
|
1293
1301
|
}
|
|
1294
1302
|
}
|
|
1295
|
-
calendarStateDone() {
|
|
1296
|
-
|
|
1303
|
+
calendarStateDone(event) {
|
|
1304
|
+
if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {
|
|
1305
|
+
this.calendarState = '';
|
|
1306
|
+
this._changeDetectorRef.markForCheck();
|
|
1307
|
+
}
|
|
1297
1308
|
}
|
|
1298
1309
|
/** Initializes this month view. */
|
|
1299
1310
|
_init() {
|
|
@@ -1331,12 +1342,15 @@ class CmatDatetimepickerYearViewComponent {
|
|
|
1331
1342
|
}
|
|
1332
1343
|
return false;
|
|
1333
1344
|
}
|
|
1334
|
-
|
|
1335
|
-
|
|
1345
|
+
_changeCalendarState(direction) {
|
|
1346
|
+
this.calendarState = direction;
|
|
1347
|
+
}
|
|
1348
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerYearViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1349
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: CmatDatetimepickerYearViewComponent, isStandalone: true, selector: "cmat-datetimepicker-year-view", inputs: { type: "type", dateFilter: "dateFilter", activeDate: "activeDate", selected: "selected" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange" }, exportAs: ["cmatDatetimepickerYearView"], ngImport: i0, template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getMonth(activeDate)\" [labelMinRequiredCells]=\"2\"\r\n [label]=\"yearLabel\" [rows]=\"months\" [selectedValue]=\"selectedMonth\" [todayValue]=\"todayMonth\"\r\n [allowDisabledSelection]=\"true\" (selectedValueChange)=\"monthSelected($event)\"></tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], dependencies: [{ kind: "component", type: CmatDatetimepickerCalendarBodyComponent, selector: "[cmat-datetimepicker-calendar-body]", inputs: ["label", "rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "allowDisabledSelection", "activeCell"], outputs: ["selectedValueChange"], exportAs: ["cmatDatetimepickerCalendarBody"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1336
1350
|
}
|
|
1337
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerYearViewComponent, decorators: [{
|
|
1338
1352
|
type: Component,
|
|
1339
|
-
args: [{ selector: 'cmat-datetimepicker-year-view',
|
|
1353
|
+
args: [{ selector: 'cmat-datetimepicker-year-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerYearView', imports: [CmatDatetimepickerCalendarBodyComponent, NgClass], template: "<table class=\"cmat-datetimepicker-calendar-table\">\r\n <thead class=\"cmat-datetimepicker-calendar-table-header\"></thead>\r\n <tbody class=\"cmat-calendar-slide-animation\" cmat-datetimepicker-calendar-body role=\"grid\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\" [activeCell]=\"adapter.getMonth(activeDate)\" [labelMinRequiredCells]=\"2\"\r\n [label]=\"yearLabel\" [rows]=\"months\" [selectedValue]=\"selectedMonth\" [todayValue]=\"todayMonth\"\r\n [allowDisabledSelection]=\"true\" (selectedValueChange)=\"monthSelected($event)\"></tbody>\r\n</table>", styles: [".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
|
|
1340
1354
|
}], ctorParameters: () => [], propDecorators: { userSelection: [{
|
|
1341
1355
|
type: Output
|
|
1342
1356
|
}], type: [{
|
|
@@ -1379,8 +1393,10 @@ class CmatDatetimepickerCalendarComponent {
|
|
|
1379
1393
|
this._intl = inject(CmatDatetimepickerIntl);
|
|
1380
1394
|
this._adapter = inject(DatetimeAdapter, { optional: true });
|
|
1381
1395
|
this._dateFormats = inject(CMAT_DATETIME_FORMATS, { optional: true });
|
|
1396
|
+
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
1382
1397
|
this._type = 'date';
|
|
1383
1398
|
this._timeInput = false;
|
|
1399
|
+
this._calendarAnimationListener = this.calendarStateDone.bind(this);
|
|
1384
1400
|
/** Date filter for the month and year views. */
|
|
1385
1401
|
this.dateFilterForViews = (date) => !!date &&
|
|
1386
1402
|
(!this.dateFilter || this.dateFilter(date, CmatDatetimepickerFilterType.DATE)) &&
|
|
@@ -1396,6 +1412,7 @@ class CmatDatetimepickerCalendarComponent {
|
|
|
1396
1412
|
}
|
|
1397
1413
|
this._intlChanges = _intl.changes
|
|
1398
1414
|
.subscribe(() => changeDetectorRef.markForCheck());
|
|
1415
|
+
this._elementRef.nativeElement.addEventListener('animationend', this._calendarAnimationListener);
|
|
1399
1416
|
}
|
|
1400
1417
|
get type() {
|
|
1401
1418
|
return this._type;
|
|
@@ -1461,7 +1478,7 @@ class CmatDatetimepickerCalendarComponent {
|
|
|
1461
1478
|
set activeDate(value) {
|
|
1462
1479
|
const oldActiveDate = this._clampedActiveDate;
|
|
1463
1480
|
this._clampedActiveDate = this._adapter.clampDate(value, this.minDate, this.maxDate);
|
|
1464
|
-
if (oldActiveDate && this._clampedActiveDate &&
|
|
1481
|
+
if (oldActiveDate && this._clampedActiveDate &&
|
|
1465
1482
|
!this._adapter.sameMonthAndYear(oldActiveDate, this._clampedActiveDate)) {
|
|
1466
1483
|
if (this._adapter.isInNextMonth(oldActiveDate, this._clampedActiveDate)) {
|
|
1467
1484
|
this._changeCalendarState('right');
|
|
@@ -1603,6 +1620,7 @@ class CmatDatetimepickerCalendarComponent {
|
|
|
1603
1620
|
}
|
|
1604
1621
|
}
|
|
1605
1622
|
ngOnDestroy() {
|
|
1623
|
+
this._elementRef.nativeElement.removeEventListener('animationend', this._calendarAnimationListener);
|
|
1606
1624
|
this._intlChanges.unsubscribe();
|
|
1607
1625
|
}
|
|
1608
1626
|
/** Handles date selection in the month view. */
|
|
@@ -1749,8 +1767,11 @@ class CmatDatetimepickerCalendarComponent {
|
|
|
1749
1767
|
focusActiveCell() {
|
|
1750
1768
|
this._elementRef.nativeElement.focus();
|
|
1751
1769
|
}
|
|
1752
|
-
calendarStateDone() {
|
|
1753
|
-
|
|
1770
|
+
calendarStateDone(event) {
|
|
1771
|
+
if (event.animationName === 'slideCalendarLeft' || event.animationName === 'slideCalendarRight') {
|
|
1772
|
+
this.calendarState = '';
|
|
1773
|
+
this._changeDetectorRef.markForCheck();
|
|
1774
|
+
}
|
|
1754
1775
|
}
|
|
1755
1776
|
/** Whether the two dates represent the same view in the current view mode (month or year). */
|
|
1756
1777
|
_isSameView(date1, date2) {
|
|
@@ -1943,16 +1964,16 @@ class CmatDatetimepickerCalendarComponent {
|
|
|
1943
1964
|
_2digit(n) {
|
|
1944
1965
|
return ('00' + n).slice(-2);
|
|
1945
1966
|
}
|
|
1946
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1947
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CmatDatetimepickerCalendarComponent, isStandalone: true, selector: "cmat-datetimepicker-calendar", inputs: { multiYearSelector: "multiYearSelector", startView: "startView", twelvehour: "twelvehour", timeInterval: "timeInterval", dateFilter: "dateFilter", preventSameDateTimeSelection: "preventSameDateTimeSelection", type: "type", startAt: "startAt", timeInput: "timeInput", selected: "selected", minDate: "minDate", maxDate: "maxDate" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange", viewChanged: "viewChanged" }, host: { listeners: { "keydown": "handleCalendarBodyKeydown($event)" }, properties: { "class.cmat-datetimepicker-calendar-with-time-input": "timeInput", "class": "this.class", "attr.aria-label": "this.label", "role": "this.role", "tabindex": "this.tabindex" } }, exportAs: ["cmatDatetimepickerCalendar"], ngImport: i0, template: "<div class=\"cmat-datetimepicker-calendar-header\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-year header-button\"\r\n [class.active]=\"currentView === 'year' || currentView === 'multi-year'\" [attr.aria-label]=\"yearButtonLabel\"\r\n (click)=\"yearClicked()\">\r\n <span class=\"font-medium\">{{ yearButtonText }}</span>\r\n @if (multiYearSelector || type === 'year') {\r\n <svg class=\"cmat-datetimepicker-calendar-header-year-dropdown\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\r\n fill=\"currentColor\">\r\n <path d=\"M7,10L12,15L17,10H7Z\"></path>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (type !== 'year') {\r\n <div class=\"cmat-datetimepicker-calendar-header-date-time\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-date header-button\"\r\n [class.active]=\"currentView === 'month'\" [class.not-clickable]=\"type === 'month'\"\r\n [attr.aria-label]=\"dateButtonLabel\" (click)=\"dateClicked()\">{{ dateButtonText }}</div>\r\n }\r\n @if (type.endsWith('time')) {\r\n <span class=\"cmat-datetimepicker-calendar-header-time\" [class.active]=\"currentView === 'clock'\">\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-hours header-button\"\r\n [class.active]=\"clockView === 'hour'\" [attr.aria-label]=\"hourButtonLabel\" (click)=\"hoursClicked()\">\r\n {{ hoursButtonText }}</div>\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-separator\">:</span>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-minutes header-button\"\r\n [class.active]=\"clockView === 'minute'\" [attr.aria-label]=\"minuteButtonLabel\" (click)=\"minutesClicked()\">{{\r\n minutesButtonText }}</div>\r\n </span>\r\n @if (twelvehour) {\r\n <span class=\"cmat-datetimepicker-calendar-header-ampm-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\"\r\n aria-label=\"AM\" [class.active]=\"AMPM === 'AM'\" (click)=\"ampmClicked('AM')\">AM</div>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\"\r\n aria-label=\"PM\" [class.active]=\"AMPM === 'PM'\" (click)=\"ampmClicked('PM')\">PM</div>\r\n </span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<div class=\"cmat-datetimepicker-calendar-content\" [ngClass]=\"{'flex flex-col justify-center': currentView==='clock'}\">\r\n @if (currentView === 'month' || currentView === 'year' || currentView === 'multi-year') {\r\n <div class=\"cmat-datetimepickermonth-content\">\r\n <div class=\"cmat-datetimepicker-calendar-controls\">\r\n <button matIconButton type=\"button\" class=\"cmat-datetimepicker-calendar-previous-button\"\r\n [class.disabled]=\"!previousEnabled()\" [attr.aria-disabled]=\"!previousEnabled()\"\r\n [attr.aria-label]=\"prevButtonLabel\" (click)=\"previousClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"></path>\r\n </svg>\r\n </button>\r\n <div class=\"cmat-datetimepicker-calendar-period-button text-default font-medium\" [@slideCalendar]=\"calendarState\"\r\n (@slideCalendar.done)=\"calendarStateDone()\">\r\n <strong>{{ yearPeriodText }}</strong>\r\n </div>\r\n <button type=\"button\" matIconButton class=\"cmat-datetimepicker-calendar-next-button\"\r\n [class.disabled]=\"!nextEnabled()\" [attr.aria-disabled]=\"!nextEnabled()\" [attr.aria-label]=\"nextButtonLabel\"\r\n (click)=\"nextClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n @switch (currentView) {\r\n @case ('month') {\r\n <cmat-datetimepicker-month-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\"\r\n [selected]=\"selected!\" [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"dateSelected($event)\">\r\n </cmat-datetimepicker-month-view>\r\n }\r\n @case ('year') {\r\n <cmat-datetimepicker-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\"\r\n [selected]=\"selected!\" [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"monthSelected($event)\">\r\n </cmat-datetimepicker-year-view>\r\n }\r\n @case ('multi-year') {\r\n <cmat-datetimepicker-multi-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\"\r\n [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"selected!\" [type]=\"type\"\r\n (userSelection)=\"userSelected()\" (selectedChange)=\"yearSelected($event)\">\r\n </cmat-datetimepicker-multi-year-view>\r\n }\r\n @default {\r\n @if (timeInput) {\r\n <cmat-datetimepicker-time [AMPM]=\"AMPM\" [clockView]=\"clockView\"\r\n [twelvehour]=\"twelvehour\" [dateFilter]=\"dateFilter\" [interval]=\"timeInterval\" [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\" [selected]=\"activeDate\" (userSelection)=\"userSelected()\" (activeDateChange)=\"onActiveDateChange($event)\"\r\n (selectedChange)=\"timeSelected($event)\" (ampmChange)=\"ampmClicked($event)\" (clockViewChange)=\"clockView = $event\">\r\n </cmat-datetimepicker-time>\r\n } @else {\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"timeInterval\"\r\n [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"activeDate\" [startView]=\"clockView\"\r\n [twelvehour]=\"twelvehour\" (userSelection)=\"userSelected()\" (activeDateChange)=\"onActiveDateChange($event)\" (selectedChange)=\"dialTimeSelected($event)\">\r\n </cmat-datetimepicker-clock>\r\n }\r\n }\r\n }\r\n</div>", styles: [".cmat-datetimepicker-calendar{display:block;outline:none}.cmat-datetimepicker-calendar-header{box-sizing:border-box;padding:8px;border-radius:4px 4px 0 0;min-width:264px}.cmat-datetimepicker-calendar-header .header-button{color:#fff!important;padding:0 4px;font-size:inherit;white-space:normal;word-break:break-word;font-weight:500;cursor:pointer}.cmat-datetimepicker-calendar-header-year.header-button{font-size:26px;line-height:24px;display:flex}.cmat-datetimepicker-calendar-header-date-time{font-size:24px;line-height:36px;display:flex;flex-direction:row}.cmat-datetimepicker-calendar-header-year:not(.active),.cmat-datetimepicker-calendar-header-date:not(.active),.cmat-datetimepicker-calendar-header-hours:not(.active),.cmat-datetimepicker-calendar-header-minutes:not(.active),.cmat-datetimepicker-calendar-header-ampm:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-year.not-clickable,.cmat-datetimepicker-calendar-header-date.not-clickable,.cmat-datetimepicker-calendar-header-hours.not-clickable,.cmat-datetimepicker-calendar-header-minutes.not-clickable,.cmat-datetimepicker-calendar-header-ampm.not-clickable{cursor:initial}.cmat-datetimepicker-calendar-header-time{display:inline-flex}.cmat-datetimepicker-calendar-header-time:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-hours,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-minutes,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-ampm{opacity:1}.cmat-datetimepicker-calendar-header-hour-minute-separator{display:inline-block;width:8px;text-align:center}.cmat-datetimepicker-calendar-header-ampm-container{display:inline-flex;flex-direction:column;line-height:18px;font-size:12px}.cmat-datetimepicker-calendar-content{width:100%;padding:8px;outline:none;box-sizing:border-box;overflow:hidden}.cmat-datetimepicker-calendar-controls{display:flex;justify-content:space-between;margin:0 calc(4.7142857143% - 16px)}.cmat-datetimepicker-calendar-period-button{display:inline-block;height:40px;line-height:40px;outline:none;border:0;background:transparent;box-sizing:border-box}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{pointer-events:none}.cmat-datetimepicker-calendar-previous-button svg,.cmat-datetimepicker-calendar-next-button svg{fill:currentColor;vertical-align:top}[dir=rtl] .cmat-datetimepicker-calendar-previous-button svg,[dir=rtl] .cmat-datetimepicker-calendar-next-button svg{transform:rotate(180deg)}.cmat-datetimepicker-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.cmat-datetimepicker-calendar-table-header th{text-align:center;padding:8px 0}\n"], 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: "component", type: CmatDatetimepickerMonthViewComponent, selector: "cmat-datetimepicker-month-view", inputs: ["type", "dateFilter", "activeDate", "selected"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerMonthView"] }, { kind: "component", type: CmatDatetimepickerYearViewComponent, selector: "cmat-datetimepicker-year-view", inputs: ["type", "dateFilter", "activeDate", "selected"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerYearView"] }, { kind: "component", type: CmatDatetimepickerMultiYearViewComponent, selector: "cmat-datetimepicker-multi-year-view", inputs: ["type", "dateFilter", "activeDate", "selected", "minDate", "maxDate"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerMultiYearView"] }, { kind: "component", type: CmatDatetimepickerTimeComponent, selector: "cmat-datetimepicker-time", inputs: ["dateFilter", "interval", "AMPM", "twelvehour", "activeDate", "selected", "minDate", "maxDate", "clockView"], outputs: ["selectedChange", "activeDateChange", "userSelection", "ampmChange", "clockViewChange"], exportAs: ["cmatDatetimepickerTime"] }, { kind: "component", type: CmatDatetimepickerClockComponent, selector: "cmat-datetimepicker-clock", inputs: ["dateFilter", "interval", "twelvehour", "activeDate", "selected", "minDate", "maxDate", "startView"], outputs: ["userSelection", "selectedChange", "activeDateChange"], exportAs: ["cmatDatetimepickerClock"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [slideCalendar], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1967
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1968
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CmatDatetimepickerCalendarComponent, isStandalone: true, selector: "cmat-datetimepicker-calendar", inputs: { multiYearSelector: "multiYearSelector", startView: "startView", twelvehour: "twelvehour", timeInterval: "timeInterval", dateFilter: "dateFilter", preventSameDateTimeSelection: "preventSameDateTimeSelection", type: "type", startAt: "startAt", timeInput: "timeInput", selected: "selected", minDate: "minDate", maxDate: "maxDate" }, outputs: { userSelection: "userSelection", selectedChange: "selectedChange", viewChanged: "viewChanged" }, host: { listeners: { "keydown": "handleCalendarBodyKeydown($event)" }, properties: { "class.cmat-datetimepicker-calendar-with-time-input": "timeInput", "class": "this.class", "attr.aria-label": "this.label", "role": "this.role", "tabindex": "this.tabindex" } }, exportAs: ["cmatDatetimepickerCalendar"], ngImport: i0, template: "<div class=\"cmat-datetimepicker-calendar-header\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-year header-button\"\r\n [class.active]=\"currentView === 'year' || currentView === 'multi-year'\" [attr.aria-label]=\"yearButtonLabel\"\r\n (click)=\"yearClicked()\">\r\n <span class=\"font-medium\">{{ yearButtonText }}</span>\r\n @if (multiYearSelector || type === 'year') {\r\n <svg class=\"cmat-datetimepicker-calendar-header-year-dropdown\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\r\n fill=\"currentColor\">\r\n <path d=\"M7,10L12,15L17,10H7Z\"></path>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (type !== 'year') {\r\n <div class=\"cmat-datetimepicker-calendar-header-date-time\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-date header-button\"\r\n [class.active]=\"currentView === 'month'\" [class.not-clickable]=\"type === 'month'\"\r\n [attr.aria-label]=\"dateButtonLabel\" (click)=\"dateClicked()\">{{ dateButtonText }}</div>\r\n }\r\n @if (type.endsWith('time')) {\r\n <span class=\"cmat-datetimepicker-calendar-header-time\" [class.active]=\"currentView === 'clock'\">\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-hours header-button\"\r\n [class.active]=\"clockView === 'hour'\" [attr.aria-label]=\"hourButtonLabel\" (click)=\"hoursClicked()\">\r\n {{ hoursButtonText }}</div>\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-separator\">:</span>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-minutes header-button\"\r\n [class.active]=\"clockView === 'minute'\" [attr.aria-label]=\"minuteButtonLabel\" (click)=\"minutesClicked()\">{{\r\n minutesButtonText }}</div>\r\n </span>\r\n @if (twelvehour) {\r\n <span class=\"cmat-datetimepicker-calendar-header-ampm-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"AM\"\r\n [class.active]=\"AMPM === 'AM'\" (click)=\"ampmClicked('AM')\">AM</div>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"PM\"\r\n [class.active]=\"AMPM === 'PM'\" (click)=\"ampmClicked('PM')\">PM</div>\r\n </span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<div class=\"cmat-datetimepicker-calendar-content\" [ngClass]=\"{'flex flex-col justify-center': currentView==='clock'}\">\r\n @if (currentView === 'month' || currentView === 'year' || currentView === 'multi-year') {\r\n <div class=\"cmat-datetimepickermonth-content\">\r\n <div class=\"cmat-datetimepicker-calendar-controls\">\r\n <button matIconButton type=\"button\" class=\"cmat-datetimepicker-calendar-previous-button\"\r\n [class.disabled]=\"!previousEnabled()\" [attr.aria-disabled]=\"!previousEnabled()\"\r\n [attr.aria-label]=\"prevButtonLabel\" (click)=\"previousClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"></path>\r\n </svg>\r\n </button>\r\n <div class=\"cmat-datetimepicker-calendar-period-button text-default font-medium cmat-calendar-slide-animation\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\">\r\n <strong>{{ yearPeriodText }}</strong>\r\n </div>\r\n <button type=\"button\" matIconButton class=\"cmat-datetimepicker-calendar-next-button\"\r\n [class.disabled]=\"!nextEnabled()\" [attr.aria-disabled]=\"!nextEnabled()\" [attr.aria-label]=\"nextButtonLabel\"\r\n (click)=\"nextClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n @switch (currentView) {\r\n @case ('month') {\r\n <cmat-datetimepicker-month-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"dateSelected($event)\">\r\n </cmat-datetimepicker-month-view>\r\n }\r\n @case ('year') {\r\n <cmat-datetimepicker-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"monthSelected($event)\">\r\n </cmat-datetimepicker-year-view>\r\n }\r\n @case ('multi-year') {\r\n <cmat-datetimepicker-multi-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\" [selected]=\"selected!\" [type]=\"type\" (userSelection)=\"userSelected()\"\r\n (selectedChange)=\"yearSelected($event)\">\r\n </cmat-datetimepicker-multi-year-view>\r\n }\r\n @default {\r\n @if (timeInput) {\r\n <cmat-datetimepicker-time [AMPM]=\"AMPM\" [clockView]=\"clockView\" [twelvehour]=\"twelvehour\" [dateFilter]=\"dateFilter\"\r\n [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"activeDate\"\r\n (userSelection)=\"userSelected()\" (activeDateChange)=\"onActiveDateChange($event)\"\r\n (selectedChange)=\"timeSelected($event)\" (ampmChange)=\"ampmClicked($event)\" (clockViewChange)=\"clockView = $event\">\r\n </cmat-datetimepicker-time>\r\n } @else {\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\"\r\n [selected]=\"activeDate\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\" (userSelection)=\"userSelected()\"\r\n (activeDateChange)=\"onActiveDateChange($event)\" (selectedChange)=\"dialTimeSelected($event)\">\r\n </cmat-datetimepicker-clock>\r\n }\r\n }\r\n }\r\n</div>", styles: [".cmat-datetimepicker-calendar{display:block;outline:none}.cmat-datetimepicker-calendar-header{box-sizing:border-box;padding:8px;border-radius:4px 4px 0 0;min-width:264px}.cmat-datetimepicker-calendar-header .header-button{color:#fff!important;padding:0 4px;font-size:inherit;white-space:normal;word-break:break-word;font-weight:500;cursor:pointer}.cmat-datetimepicker-calendar-header-year.header-button{font-size:26px;line-height:24px;display:flex}.cmat-datetimepicker-calendar-header-date-time{font-size:24px;line-height:36px;display:flex;flex-direction:row}.cmat-datetimepicker-calendar-header-year:not(.active),.cmat-datetimepicker-calendar-header-date:not(.active),.cmat-datetimepicker-calendar-header-hours:not(.active),.cmat-datetimepicker-calendar-header-minutes:not(.active),.cmat-datetimepicker-calendar-header-ampm:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-year.not-clickable,.cmat-datetimepicker-calendar-header-date.not-clickable,.cmat-datetimepicker-calendar-header-hours.not-clickable,.cmat-datetimepicker-calendar-header-minutes.not-clickable,.cmat-datetimepicker-calendar-header-ampm.not-clickable{cursor:initial}.cmat-datetimepicker-calendar-header-time{display:inline-flex}.cmat-datetimepicker-calendar-header-time:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-hours,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-minutes,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-ampm{opacity:1}.cmat-datetimepicker-calendar-header-hour-minute-separator{display:inline-block;width:8px;text-align:center}.cmat-datetimepicker-calendar-header-ampm-container{display:inline-flex;flex-direction:column;line-height:18px;font-size:12px}.cmat-datetimepicker-calendar-content{width:100%;padding:8px;outline:none;box-sizing:border-box;overflow:hidden}.cmat-datetimepicker-calendar-controls{display:flex;justify-content:space-between;margin:0 calc(4.7142857143% - 16px)}.cmat-datetimepicker-calendar-period-button{display:inline-block;height:40px;line-height:40px;outline:none;border:0;background:transparent;box-sizing:border-box}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{pointer-events:none}.cmat-datetimepicker-calendar-previous-button svg,.cmat-datetimepicker-calendar-next-button svg{fill:currentColor;vertical-align:top}[dir=rtl] .cmat-datetimepicker-calendar-previous-button svg,[dir=rtl] .cmat-datetimepicker-calendar-next-button svg{transform:rotate(180deg)}.cmat-datetimepicker-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.cmat-datetimepicker-calendar-table-header th{text-align:center;padding:8px 0}\n", ".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"], 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: "component", type: CmatDatetimepickerMonthViewComponent, selector: "cmat-datetimepicker-month-view", inputs: ["type", "dateFilter", "activeDate", "selected"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerMonthView"] }, { kind: "component", type: CmatDatetimepickerYearViewComponent, selector: "cmat-datetimepicker-year-view", inputs: ["type", "dateFilter", "activeDate", "selected"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerYearView"] }, { kind: "component", type: CmatDatetimepickerMultiYearViewComponent, selector: "cmat-datetimepicker-multi-year-view", inputs: ["type", "dateFilter", "activeDate", "selected", "minDate", "maxDate"], outputs: ["userSelection", "selectedChange"], exportAs: ["cmatDatetimepickerMultiYearView"] }, { kind: "component", type: CmatDatetimepickerTimeComponent, selector: "cmat-datetimepicker-time", inputs: ["dateFilter", "interval", "AMPM", "twelvehour", "activeDate", "selected", "minDate", "maxDate", "clockView"], outputs: ["selectedChange", "activeDateChange", "userSelection", "ampmChange", "clockViewChange"], exportAs: ["cmatDatetimepickerTime"] }, { kind: "component", type: CmatDatetimepickerClockComponent, selector: "cmat-datetimepicker-clock", inputs: ["dateFilter", "interval", "twelvehour", "activeDate", "selected", "minDate", "maxDate", "startView"], outputs: ["userSelection", "selectedChange", "activeDateChange"], exportAs: ["cmatDatetimepickerClock"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1948
1969
|
}
|
|
1949
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerCalendarComponent, decorators: [{
|
|
1950
1971
|
type: Component,
|
|
1951
|
-
args: [{ selector: 'cmat-datetimepicker-calendar',
|
|
1972
|
+
args: [{ selector: 'cmat-datetimepicker-calendar', host: {
|
|
1952
1973
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1953
1974
|
'[class.cmat-datetimepicker-calendar-with-time-input]': 'timeInput',
|
|
1954
1975
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerCalendar', imports: [MatButtonModule, CmatDatetimepickerMonthViewComponent, CmatDatetimepickerYearViewComponent,
|
|
1955
|
-
CmatDatetimepickerMultiYearViewComponent, CmatDatetimepickerTimeComponent, CmatDatetimepickerClockComponent, NgClass], template: "<div class=\"cmat-datetimepicker-calendar-header\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-year header-button\"\r\n [class.active]=\"currentView === 'year' || currentView === 'multi-year'\" [attr.aria-label]=\"yearButtonLabel\"\r\n (click)=\"yearClicked()\">\r\n <span class=\"font-medium\">{{ yearButtonText }}</span>\r\n @if (multiYearSelector || type === 'year') {\r\n <svg class=\"cmat-datetimepicker-calendar-header-year-dropdown\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\r\n fill=\"currentColor\">\r\n <path d=\"M7,10L12,15L17,10H7Z\"></path>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (type !== 'year') {\r\n <div class=\"cmat-datetimepicker-calendar-header-date-time\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-date header-button\"\r\n [class.active]=\"currentView === 'month'\" [class.not-clickable]=\"type === 'month'\"\r\n [attr.aria-label]=\"dateButtonLabel\" (click)=\"dateClicked()\">{{ dateButtonText }}</div>\r\n }\r\n @if (type.endsWith('time')) {\r\n <span class=\"cmat-datetimepicker-calendar-header-time\" [class.active]=\"currentView === 'clock'\">\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-hours header-button\"\r\n [class.active]=\"clockView === 'hour'\" [attr.aria-label]=\"hourButtonLabel\" (click)=\"hoursClicked()\">\r\n {{ hoursButtonText }}</div>\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-separator\">:</span>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-minutes header-button\"\r\n [class.active]=\"clockView === 'minute'\" [attr.aria-label]=\"minuteButtonLabel\" (click)=\"minutesClicked()\">{{\r\n minutesButtonText }}</div>\r\n </span>\r\n @if (twelvehour) {\r\n <span class=\"cmat-datetimepicker-calendar-header-ampm-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\"
|
|
1976
|
+
CmatDatetimepickerMultiYearViewComponent, CmatDatetimepickerTimeComponent, CmatDatetimepickerClockComponent, NgClass], template: "<div class=\"cmat-datetimepicker-calendar-header\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-year header-button\"\r\n [class.active]=\"currentView === 'year' || currentView === 'multi-year'\" [attr.aria-label]=\"yearButtonLabel\"\r\n (click)=\"yearClicked()\">\r\n <span class=\"font-medium\">{{ yearButtonText }}</span>\r\n @if (multiYearSelector || type === 'year') {\r\n <svg class=\"cmat-datetimepicker-calendar-header-year-dropdown\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\r\n fill=\"currentColor\">\r\n <path d=\"M7,10L12,15L17,10H7Z\"></path>\r\n </svg>\r\n }\r\n </div>\r\n }\r\n @if (type !== 'year') {\r\n <div class=\"cmat-datetimepicker-calendar-header-date-time\">\r\n @if (type !== 'time') {\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-date header-button\"\r\n [class.active]=\"currentView === 'month'\" [class.not-clickable]=\"type === 'month'\"\r\n [attr.aria-label]=\"dateButtonLabel\" (click)=\"dateClicked()\">{{ dateButtonText }}</div>\r\n }\r\n @if (type.endsWith('time')) {\r\n <span class=\"cmat-datetimepicker-calendar-header-time\" [class.active]=\"currentView === 'clock'\">\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-hours header-button\"\r\n [class.active]=\"clockView === 'hour'\" [attr.aria-label]=\"hourButtonLabel\" (click)=\"hoursClicked()\">\r\n {{ hoursButtonText }}</div>\r\n <span class=\"cmat-datetimepicker-calendar-header-hour-minute-separator\">:</span>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-minutes header-button\"\r\n [class.active]=\"clockView === 'minute'\" [attr.aria-label]=\"minuteButtonLabel\" (click)=\"minutesClicked()\">{{\r\n minutesButtonText }}</div>\r\n </span>\r\n @if (twelvehour) {\r\n <span class=\"cmat-datetimepicker-calendar-header-ampm-container flex place-items-center\">\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"AM\"\r\n [class.active]=\"AMPM === 'AM'\" (click)=\"ampmClicked('AM')\">AM</div>\r\n <div role=\"presentation\" class=\"cmat-datetimepicker-calendar-header-ampm header-button\" aria-label=\"PM\"\r\n [class.active]=\"AMPM === 'PM'\" (click)=\"ampmClicked('PM')\">PM</div>\r\n </span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<div class=\"cmat-datetimepicker-calendar-content\" [ngClass]=\"{'flex flex-col justify-center': currentView==='clock'}\">\r\n @if (currentView === 'month' || currentView === 'year' || currentView === 'multi-year') {\r\n <div class=\"cmat-datetimepickermonth-content\">\r\n <div class=\"cmat-datetimepicker-calendar-controls\">\r\n <button matIconButton type=\"button\" class=\"cmat-datetimepicker-calendar-previous-button\"\r\n [class.disabled]=\"!previousEnabled()\" [attr.aria-disabled]=\"!previousEnabled()\"\r\n [attr.aria-label]=\"prevButtonLabel\" (click)=\"previousClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"></path>\r\n </svg>\r\n </button>\r\n <div class=\"cmat-datetimepicker-calendar-period-button text-default font-medium cmat-calendar-slide-animation\"\r\n [ngClass]=\"{\r\n 'left': calendarState==='left',\r\n 'right': calendarState==='right'\r\n }\">\r\n <strong>{{ yearPeriodText }}</strong>\r\n </div>\r\n <button type=\"button\" matIconButton class=\"cmat-datetimepicker-calendar-next-button\"\r\n [class.disabled]=\"!nextEnabled()\" [attr.aria-disabled]=\"!nextEnabled()\" [attr.aria-label]=\"nextButtonLabel\"\r\n (click)=\"nextClicked()\">\r\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\r\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n @switch (currentView) {\r\n @case ('month') {\r\n <cmat-datetimepicker-month-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"dateSelected($event)\">\r\n </cmat-datetimepicker-month-view>\r\n }\r\n @case ('year') {\r\n <cmat-datetimepicker-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [selected]=\"selected!\"\r\n [type]=\"type\" (userSelection)=\"userSelected()\" (selectedChange)=\"monthSelected($event)\">\r\n </cmat-datetimepicker-year-view>\r\n }\r\n @case ('multi-year') {\r\n <cmat-datetimepicker-multi-year-view [activeDate]=\"activeDate\" [dateFilter]=\"dateFilterForViews\" [maxDate]=\"maxDate\"\r\n [minDate]=\"minDate\" [selected]=\"selected!\" [type]=\"type\" (userSelection)=\"userSelected()\"\r\n (selectedChange)=\"yearSelected($event)\">\r\n </cmat-datetimepicker-multi-year-view>\r\n }\r\n @default {\r\n @if (timeInput) {\r\n <cmat-datetimepicker-time [AMPM]=\"AMPM\" [clockView]=\"clockView\" [twelvehour]=\"twelvehour\" [dateFilter]=\"dateFilter\"\r\n [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\" [selected]=\"activeDate\"\r\n (userSelection)=\"userSelected()\" (activeDateChange)=\"onActiveDateChange($event)\"\r\n (selectedChange)=\"timeSelected($event)\" (ampmChange)=\"ampmClicked($event)\" (clockViewChange)=\"clockView = $event\">\r\n </cmat-datetimepicker-time>\r\n } @else {\r\n <cmat-datetimepicker-clock [dateFilter]=\"dateFilter\" [interval]=\"timeInterval\" [maxDate]=\"maxDate\" [minDate]=\"minDate\"\r\n [selected]=\"activeDate\" [startView]=\"clockView\" [twelvehour]=\"twelvehour\" (userSelection)=\"userSelected()\"\r\n (activeDateChange)=\"onActiveDateChange($event)\" (selectedChange)=\"dialTimeSelected($event)\">\r\n </cmat-datetimepicker-clock>\r\n }\r\n }\r\n }\r\n</div>", styles: [".cmat-datetimepicker-calendar{display:block;outline:none}.cmat-datetimepicker-calendar-header{box-sizing:border-box;padding:8px;border-radius:4px 4px 0 0;min-width:264px}.cmat-datetimepicker-calendar-header .header-button{color:#fff!important;padding:0 4px;font-size:inherit;white-space:normal;word-break:break-word;font-weight:500;cursor:pointer}.cmat-datetimepicker-calendar-header-year.header-button{font-size:26px;line-height:24px;display:flex}.cmat-datetimepicker-calendar-header-date-time{font-size:24px;line-height:36px;display:flex;flex-direction:row}.cmat-datetimepicker-calendar-header-year:not(.active),.cmat-datetimepicker-calendar-header-date:not(.active),.cmat-datetimepicker-calendar-header-hours:not(.active),.cmat-datetimepicker-calendar-header-minutes:not(.active),.cmat-datetimepicker-calendar-header-ampm:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-year.not-clickable,.cmat-datetimepicker-calendar-header-date.not-clickable,.cmat-datetimepicker-calendar-header-hours.not-clickable,.cmat-datetimepicker-calendar-header-minutes.not-clickable,.cmat-datetimepicker-calendar-header-ampm.not-clickable{cursor:initial}.cmat-datetimepicker-calendar-header-time{display:inline-flex}.cmat-datetimepicker-calendar-header-time:not(.active){opacity:.6}.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-hours,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-minutes,.cmat-datetimepicker-calendar-header-time:not(.active) .cmat-datetimepicker-calendar-header-ampm{opacity:1}.cmat-datetimepicker-calendar-header-hour-minute-separator{display:inline-block;width:8px;text-align:center}.cmat-datetimepicker-calendar-header-ampm-container{display:inline-flex;flex-direction:column;line-height:18px;font-size:12px}.cmat-datetimepicker-calendar-content{width:100%;padding:8px;outline:none;box-sizing:border-box;overflow:hidden}.cmat-datetimepicker-calendar-controls{display:flex;justify-content:space-between;margin:0 calc(4.7142857143% - 16px)}.cmat-datetimepicker-calendar-period-button{display:inline-block;height:40px;line-height:40px;outline:none;border:0;background:transparent;box-sizing:border-box}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{pointer-events:none}.cmat-datetimepicker-calendar-previous-button svg,.cmat-datetimepicker-calendar-next-button svg{fill:currentColor;vertical-align:top}[dir=rtl] .cmat-datetimepicker-calendar-previous-button svg,[dir=rtl] .cmat-datetimepicker-calendar-next-button svg{transform:rotate(180deg)}.cmat-datetimepicker-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.cmat-datetimepicker-calendar-table-header th{text-align:center;padding:8px 0}\n", ".cmat-calendar-slide-animation.left{animation:slideCalendarLeft .18s}.cmat-calendar-slide-animation.right{animation:slideCalendarRight .18s}@keyframes slideCalendarLeft{0%,50%{transform:translate(100%)}51%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes slideCalendarRight{0%,50%{transform:translate(-100%)}51%{transform:translate(100%)}to{transform:translate(0)}}\n"] }]
|
|
1956
1977
|
}], ctorParameters: () => [], propDecorators: { userSelection: [{
|
|
1957
1978
|
type: Output
|
|
1958
1979
|
}], multiYearSelector: [{
|
|
@@ -2013,12 +2034,6 @@ const CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
|
|
|
2013
2034
|
deps: [Overlay],
|
|
2014
2035
|
useFactory: CMAT_DATETIMEPICKER_SCROLL_STRATEGY_FACTORY
|
|
2015
2036
|
};
|
|
2016
|
-
/**
|
|
2017
|
-
* Component used as the content for the datepicker dialog and popup. We use this instead of using
|
|
2018
|
-
* MatCalendar directly as the content so we can control the initial focus. This also gives us a
|
|
2019
|
-
* place to put additional features of the popup that are not part of the calendar itself in the
|
|
2020
|
-
* future. (e.g. confirmation buttons).
|
|
2021
|
-
*/
|
|
2022
2037
|
class CmatDatetimepickerContentComponent {
|
|
2023
2038
|
constructor() {
|
|
2024
2039
|
/** Emits when an animation has finished. */
|
|
@@ -2027,44 +2042,48 @@ class CmatDatetimepickerContentComponent {
|
|
|
2027
2042
|
this.dialogLabelId = null;
|
|
2028
2043
|
this._elementRef = inject(ElementRef);
|
|
2029
2044
|
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
2045
|
+
this._animationEndListener = null;
|
|
2030
2046
|
}
|
|
2031
2047
|
ngOnInit() {
|
|
2032
2048
|
this.animationState = this.datetimepicker.touchUi ? 'enter-dialog' : 'enter-dropdown';
|
|
2049
|
+
this._animationEndListener = (event) => {
|
|
2050
|
+
if (event.animationName === 'panel-dropdown-enter' || event.animationName === 'panel-dialog-enter' || event.animationName === 'panel-leave') {
|
|
2051
|
+
this.animationDone.next();
|
|
2052
|
+
}
|
|
2053
|
+
};
|
|
2054
|
+
this._elementRef.nativeElement.addEventListener('animationend', this._animationEndListener);
|
|
2033
2055
|
}
|
|
2034
2056
|
ngAfterContentInit() {
|
|
2035
2057
|
this._calendar.focusActiveCell();
|
|
2036
2058
|
}
|
|
2037
2059
|
startExitAnimation() {
|
|
2038
|
-
this.animationState = '
|
|
2060
|
+
this.animationState = 'leave';
|
|
2039
2061
|
this._changeDetectorRef.markForCheck();
|
|
2040
2062
|
}
|
|
2041
2063
|
ngOnDestroy() {
|
|
2042
2064
|
this.animationDone.complete();
|
|
2065
|
+
this._elementRef.nativeElement.removeEventListener('animationend', this._animationEndListener);
|
|
2043
2066
|
}
|
|
2044
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2045
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
2046
|
-
transformPanel,
|
|
2047
|
-
fadeInCalendar,
|
|
2048
|
-
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2067
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2068
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: CmatDatetimepickerContentComponent, isStandalone: true, selector: "cmat-datetimepicker-content", inputs: { color: "color" }, host: { properties: { "class": "color ? \"mat-\" + color : \"\"", "class.enter-dropdown": "animationState === \"enter-dropdown\"", "class.enter-dialog": "animationState === \"enter-dialog\"", "class.leave": "animationState === \"leave\"", "class.cmat-datetimepicker-content-touch": "datetimepicker?.touchUi", "attr.mode": "datetimepicker.mode" }, classAttribute: "cmat-datetimepicker-content cmat-datetimepicker-transform-panel" }, viewQueries: [{ propertyName: "_calendar", first: true, predicate: CmatDatetimepickerCalendarComponent, descendants: true, static: true }], exportAs: ["cmatDatetimepickerContent"], ngImport: i0, template: "<div cdkTrapFocus role=\"dialog\" class=\"cmat-datetimepicker-content-container\" [attr.aria-modal]=\"true\"\r\n [attr.aria-labelledby]=\"dialogLabelId ?? undefined\" [attr.mode]=\"datetimepicker.mode\">\r\n <cmat-datetimepicker-calendar [id]=\"datetimepicker.id\"\r\n [ngClass]=\"datetimepicker.panelClass\" [attr.mode]=\"datetimepicker.mode\" [type]=\"datetimepicker.type\"\r\n [startAt]=\"datetimepicker.startAt\" [startView]=\"datetimepicker.startView\" [maxDate]=\"datetimepicker.maxDate\"\r\n [minDate]=\"datetimepicker.minDate\" [dateFilter]=\"datetimepicker.dateFilter\"\r\n [multiYearSelector]=\"datetimepicker.multiYearSelector\"\r\n [preventSameDateTimeSelection]=\"datetimepicker.preventSameDateTimeSelection\"\r\n [timeInterval]=\"datetimepicker.timeInterval\" [twelvehour]=\"datetimepicker.twelvehour\"\r\n [selected]=\"datetimepicker.selected\" [timeInput]=\"datetimepicker.timeInput\"\r\n (selectedChange)=\"datetimepicker.select($event)\" (viewChanged)=\"datetimepicker.viewChange($event)\"\r\n (userSelection)=\"datetimepicker.close()\">\r\n </cmat-datetimepicker-calendar>\r\n</div>", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: CmatDatetimepickerCalendarComponent, selector: "cmat-datetimepicker-calendar", inputs: ["multiYearSelector", "startView", "twelvehour", "timeInterval", "dateFilter", "preventSameDateTimeSelection", "type", "startAt", "timeInput", "selected", "minDate", "maxDate"], outputs: ["userSelection", "selectedChange", "viewChanged"], exportAs: ["cmatDatetimepickerCalendar"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2049
2069
|
}
|
|
2050
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerContentComponent, decorators: [{
|
|
2051
2071
|
type: Component,
|
|
2052
2072
|
args: [{ selector: 'cmat-datetimepicker-content', host: {
|
|
2053
|
-
'class': 'cmat-datetimepicker-content',
|
|
2073
|
+
'class': 'cmat-datetimepicker-content cmat-datetimepicker-transform-panel',
|
|
2054
2074
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2055
2075
|
'[class]': 'color ? "mat-" + color : ""',
|
|
2056
2076
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2057
|
-
'[class.
|
|
2077
|
+
'[class.enter-dropdown]': 'animationState === "enter-dropdown"',
|
|
2058
2078
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2059
|
-
'[
|
|
2079
|
+
'[class.enter-dialog]': 'animationState === "enter-dialog"',
|
|
2060
2080
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2061
|
-
'[
|
|
2081
|
+
'[class.leave]': 'animationState === "leave"',
|
|
2082
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2083
|
+
'[class.cmat-datetimepicker-content-touch]': 'datetimepicker?.touchUi',
|
|
2062
2084
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2063
|
-
'
|
|
2064
|
-
},
|
|
2065
|
-
transformPanel,
|
|
2066
|
-
fadeInCalendar,
|
|
2067
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerContent', imports: [A11yModule, CmatDatetimepickerCalendarComponent, NgClass], template: "<div cdkTrapFocus role=\"dialog\" class=\"cmat-datetimepicker-content-container\" [attr.aria-modal]=\"true\"\r\n [attr.aria-labelledby]=\"dialogLabelId ?? undefined\" [attr.mode]=\"datetimepicker.mode\">\r\n <cmat-datetimepicker-calendar [id]=\"datetimepicker.id\" [ngClass]=\"datetimepicker.panelClass\"\r\n [attr.mode]=\"datetimepicker.mode\" [type]=\"datetimepicker.type\" [startAt]=\"datetimepicker.startAt\"\r\n [startView]=\"datetimepicker.startView\" [maxDate]=\"datetimepicker.maxDate\" [minDate]=\"datetimepicker.minDate\"\r\n [dateFilter]=\"datetimepicker.dateFilter\" [multiYearSelector]=\"datetimepicker.multiYearSelector\"\r\n [preventSameDateTimeSelection]=\"datetimepicker.preventSameDateTimeSelection\"\r\n [timeInterval]=\"datetimepicker.timeInterval\" [twelvehour]=\"datetimepicker.twelvehour\"\r\n [selected]=\"datetimepicker.selected\" [timeInput]=\"datetimepicker.timeInput\"\r\n [@fadeInCalendar]=\"'enter'\" (selectedChange)=\"datetimepicker.select($event)\"\r\n (viewChanged)=\"datetimepicker.viewChange($event)\" (userSelection)=\"datetimepicker.close()\">\r\n </cmat-datetimepicker-calendar>\r\n</div>" }]
|
|
2085
|
+
'[attr.mode]': 'datetimepicker.mode'
|
|
2086
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerContent', imports: [A11yModule, CmatDatetimepickerCalendarComponent, NgClass], template: "<div cdkTrapFocus role=\"dialog\" class=\"cmat-datetimepicker-content-container\" [attr.aria-modal]=\"true\"\r\n [attr.aria-labelledby]=\"dialogLabelId ?? undefined\" [attr.mode]=\"datetimepicker.mode\">\r\n <cmat-datetimepicker-calendar [id]=\"datetimepicker.id\"\r\n [ngClass]=\"datetimepicker.panelClass\" [attr.mode]=\"datetimepicker.mode\" [type]=\"datetimepicker.type\"\r\n [startAt]=\"datetimepicker.startAt\" [startView]=\"datetimepicker.startView\" [maxDate]=\"datetimepicker.maxDate\"\r\n [minDate]=\"datetimepicker.minDate\" [dateFilter]=\"datetimepicker.dateFilter\"\r\n [multiYearSelector]=\"datetimepicker.multiYearSelector\"\r\n [preventSameDateTimeSelection]=\"datetimepicker.preventSameDateTimeSelection\"\r\n [timeInterval]=\"datetimepicker.timeInterval\" [twelvehour]=\"datetimepicker.twelvehour\"\r\n [selected]=\"datetimepicker.selected\" [timeInput]=\"datetimepicker.timeInput\"\r\n (selectedChange)=\"datetimepicker.select($event)\" (viewChanged)=\"datetimepicker.viewChange($event)\"\r\n (userSelection)=\"datetimepicker.close()\">\r\n </cmat-datetimepicker-calendar>\r\n</div>" }]
|
|
2068
2087
|
}], propDecorators: { _calendar: [{
|
|
2069
2088
|
type: ViewChild,
|
|
2070
2089
|
args: [CmatDatetimepickerCalendarComponent, { static: true }]
|
|
@@ -2337,7 +2356,7 @@ class CmatDatetimepickerComponent {
|
|
|
2337
2356
|
this.viewChanged.emit(type);
|
|
2338
2357
|
}
|
|
2339
2358
|
/**
|
|
2340
|
-
*
|
|
2359
|
+
* relevant values from the datetimepicker to the
|
|
2341
2360
|
* datetimepicker content inside the overlay.
|
|
2342
2361
|
*/
|
|
2343
2362
|
_forwardContentValues(instance) {
|
|
@@ -2451,12 +2470,12 @@ class CmatDatetimepickerComponent {
|
|
|
2451
2470
|
hasModifierKey(event, 'altKey') &&
|
|
2452
2471
|
event.code === 'ArrowUp')))));
|
|
2453
2472
|
}
|
|
2454
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2455
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
2473
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2474
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: CmatDatetimepickerComponent, isStandalone: true, selector: "cmat-datetimepicker", inputs: { startView: "startView", mode: "mode", timeInterval: "timeInterval", preventSameDateTimeSelection: "preventSameDateTimeSelection", xPosition: "xPosition", yPosition: "yPosition", multiYearSelector: "multiYearSelector", twelvehour: "twelvehour", panelClass: "panelClass", opened: "opened", color: "color", startAt: "startAt", type: "type", timeInput: "timeInput", touchUi: "touchUi", disabled: "disabled", restoreFocus: "restoreFocus" }, outputs: { selectedChanged: "selectedChanged", openedStream: "openedStream", closedStream: "closedStream", viewChanged: "viewChanged" }, exportAs: ["cmatDatetimepicker"], ngImport: i0, template: '', isInline: true, styles: [".cmat-datetimepicker-calendar-header,.cmat-datetimepicker-calendar-body-cell-content.cmat-datetimepicker-calendar-body-selected{color:#fff!important}.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected).cmat-datetimepicker-calendar-body-today{border-color:var(--cmat-text-hint)}.cmat-datetimepicker-calendar-body-cell:not(.cmat-datetimepicker-calendar-body-disabled):hover>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected),.cmat-datetimepicker-calendar-body-active>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){background-color:rgba(var(--cmat-primary-rgb),.3)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){color:var(--cmat-text-disabled)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-today:not(.cmat-datetimepicker-calendar-body-selected){border-color:rgba(var(--cmat-text-disabled),.8)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-selected{background-color:rgba(var(--cmat-primary-rgb),.4)}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-clock-wrapper{background-color:var(--cmat-divider)}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-selected{color:#fff!important}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input{background-color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active{background-color:rgba(var(--cmat-primary-rgb),.2)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus{border-color:var(--cmat-primary);background-color:var(--cmat-divider)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus::placeholder{color:rgba(var(--cmat-primary-rgb),.6)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-warning{border-color:var(--cmat-warn)}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{color:var(--cmat-text-hint);border-color:var(--cmat-text-hint)}.cmat-datetimepicker-time-am.mat-mdc-button.cmat-datetimepicker-time-ampm-active,.cmat-datetimepicker-time-pm.mat-mdc-button.cmat-datetimepicker-time-ampm-active{background-color:rgba(var(--cmat-accent-rgb),.2)}.cmat-datetimepicker-content{display:block;border-radius:4px;overflow:hidden}.cmat-datetimepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.cmat-datetimepicker-content .cmat-calendar{width:296px;height:424px}.cmat-datetimepicker-content .cmat-calendar.cmat-datetimepicker-calendar-with-time-input{height:490px}.cmat-datetimepicker-content-touch{display:block;position:relative;overflow:visible}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container{min-height:300px;max-height:850px;min-width:250px;max-width:750px}.cmat-datetimepicker-content-touch .cmat-datetimepicker-calendar{width:100%;height:auto}@media all and (orientation: landscape){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:120vh;height:100%;min-height:80vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:64vh;height:90vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}}@media all and (orientation: portrait){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:80vw;height:120vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:90vw;height:64vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container-with-actions{height:135vw}}.cmat-datetimepicker-transform-panel.enter-dropdown{animation:panel-dropdown-enter .12s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.enter-dialog{animation:panel-dialog-enter .15s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.leave{animation:panel-leave .1s linear}@keyframes panel-dropdown-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:scale(1)}}@keyframes panel-dialog-enter{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}@keyframes panel-leave{0%{opacity:1}to{opacity:0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2456
2475
|
}
|
|
2457
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2476
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerComponent, decorators: [{
|
|
2458
2477
|
type: Component,
|
|
2459
|
-
args: [{ selector: 'cmat-datetimepicker', exportAs: 'cmatDatetimepicker', template: '', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, styles: [".cmat-datetimepicker-calendar-header,.cmat-datetimepicker-calendar-body-cell-content.cmat-datetimepicker-calendar-body-selected{color:#fff!important}.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected).cmat-datetimepicker-calendar-body-today{border-color:var(--cmat-text-hint)}.cmat-datetimepicker-calendar-body-cell:not(.cmat-datetimepicker-calendar-body-disabled):hover>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected),.cmat-datetimepicker-calendar-body-active>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){background-color:rgba(var(--cmat-primary-rgb),.3)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){color:var(--cmat-text-disabled)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-today:not(.cmat-datetimepicker-calendar-body-selected){border-color:rgba(var(--cmat-text-disabled),.8)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-selected{background-color:rgba(var(--cmat-primary-rgb),.4)}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-clock-wrapper{background-color:var(--cmat-divider)}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-selected{color:#fff!important}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input{background-color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active{background-color:rgba(var(--cmat-primary-rgb),.2)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus{border-color:var(--cmat-primary);background-color:var(--cmat-divider)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus::placeholder{color:rgba(var(--cmat-primary-rgb),.6)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-warning{border-color:var(--cmat-warn)}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{color:var(--cmat-text-hint);border-color:var(--cmat-text-hint)}.cmat-datetimepicker-time-am.mat-mdc-button.cmat-datetimepicker-time-ampm-active,.cmat-datetimepicker-time-pm.mat-mdc-button.cmat-datetimepicker-time-ampm-active{background-color:rgba(var(--cmat-accent-rgb),.2)}.cmat-datetimepicker-content{display:block;border-radius:4px;overflow:hidden}.cmat-datetimepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.cmat-datetimepicker-content .cmat-calendar{width:296px;height:424px}.cmat-datetimepicker-content .cmat-calendar.cmat-datetimepicker-calendar-with-time-input{height:490px}.cmat-datetimepicker-content-touch{display:block;position:relative;overflow:visible}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container{min-height:300px;max-height:850px;min-width:250px;max-width:750px}.cmat-datetimepicker-content-touch .cmat-datetimepicker-calendar{width:100%;height:auto}@media all and (orientation: landscape){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:120vh;height:100%;min-height:80vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:64vh;height:90vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}}@media all and (orientation: portrait){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:80vw;height:120vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:90vw;height:64vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container-with-actions{height:135vw}}\n"] }]
|
|
2478
|
+
args: [{ selector: 'cmat-datetimepicker', exportAs: 'cmatDatetimepicker', template: '', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, styles: [".cmat-datetimepicker-calendar-header,.cmat-datetimepicker-calendar-body-cell-content.cmat-datetimepicker-calendar-body-selected{color:#fff!important}.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected).cmat-datetimepicker-calendar-body-today{border-color:var(--cmat-text-hint)}.cmat-datetimepicker-calendar-body-cell:not(.cmat-datetimepicker-calendar-body-disabled):hover>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected),.cmat-datetimepicker-calendar-body-active>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){background-color:rgba(var(--cmat-primary-rgb),.3)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-cell-content:not(.cmat-datetimepicker-calendar-body-selected){color:var(--cmat-text-disabled)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-today:not(.cmat-datetimepicker-calendar-body-selected){border-color:rgba(var(--cmat-text-disabled),.8)}.cmat-datetimepicker-calendar-body-disabled>.cmat-datetimepicker-calendar-body-selected{background-color:rgba(var(--cmat-primary-rgb),.4)}.cmat-datetimepicker-calendar-previous-button.disabled,.cmat-datetimepicker-calendar-next-button.disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-clock-wrapper{background-color:var(--cmat-divider)}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-selected{color:#fff!important}.cmat-datetimepicker-clock-cell.cmat-datetimepicker-clock-cell-disabled{color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input{background-color:var(--cmat-text-disabled)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active{background-color:rgba(var(--cmat-primary-rgb),.2)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus{border-color:var(--cmat-primary);background-color:var(--cmat-divider)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-active:focus::placeholder{color:rgba(var(--cmat-primary-rgb),.6)}.cmat-datetimepicker-time-input.cmat-datetimepicker-time-input-warning{border-color:var(--cmat-warn)}.cmat-datetimepicker-time-am.mat-mdc-button,.cmat-datetimepicker-time-pm.mat-mdc-button{color:var(--cmat-text-hint);border-color:var(--cmat-text-hint)}.cmat-datetimepicker-time-am.mat-mdc-button.cmat-datetimepicker-time-ampm-active,.cmat-datetimepicker-time-pm.mat-mdc-button.cmat-datetimepicker-time-ampm-active{background-color:rgba(var(--cmat-accent-rgb),.2)}.cmat-datetimepicker-content{display:block;border-radius:4px;overflow:hidden}.cmat-datetimepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.cmat-datetimepicker-content .cmat-calendar{width:296px;height:424px}.cmat-datetimepicker-content .cmat-calendar.cmat-datetimepicker-calendar-with-time-input{height:490px}.cmat-datetimepicker-content-touch{display:block;position:relative;overflow:visible}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container{min-height:300px;max-height:850px;min-width:250px;max-width:750px}.cmat-datetimepicker-content-touch .cmat-datetimepicker-calendar{width:100%;height:auto}@media all and (orientation: landscape){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:120vh;height:100%;min-height:80vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:64vh;height:90vh}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}}@media all and (orientation: portrait){.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto],.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait]{width:80vw;height:120vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=auto] .cmat-datetimepicker-calendar,.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=portrait] .cmat-datetimepicker-calendar{width:100%;height:auto}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape]{width:90vw;height:64vw}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container[mode=landscape] .cmat-datetimepicker-calendar{width:auto;height:100%}.cmat-datetimepicker-content-touch .cmat-datetimepicker-content-container-with-actions{height:135vw}}.cmat-datetimepicker-transform-panel.enter-dropdown{animation:panel-dropdown-enter .12s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.enter-dialog{animation:panel-dialog-enter .15s cubic-bezier(0,0,.2,1)}.cmat-datetimepicker-transform-panel.leave{animation:panel-leave .1s linear}@keyframes panel-dropdown-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:scale(1)}}@keyframes panel-dialog-enter{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}@keyframes panel-leave{0%{opacity:1}to{opacity:0}}\n"] }]
|
|
2460
2479
|
}], ctorParameters: () => [], propDecorators: { startView: [{
|
|
2461
2480
|
type: Input
|
|
2462
2481
|
}], mode: [{
|
|
@@ -2773,14 +2792,14 @@ class CmatDatetimepickerInputDirective {
|
|
|
2773
2792
|
this._elementRef.nativeElement.value =
|
|
2774
2793
|
value ? this._dateAdapter.format(value, this._getDisplayFormat()) : '';
|
|
2775
2794
|
}
|
|
2776
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2777
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
2795
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2796
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: CmatDatetimepickerInputDirective, isStandalone: true, selector: "input[cmatDatetimepicker]", inputs: { cmatDatetimepicker: "cmatDatetimepicker", cmatDatepickerFilter: "cmatDatepickerFilter", value: "value", min: "min", max: "max", disabled: "disabled" }, outputs: { dateChange: "dateChange", dateInput: "dateInput" }, host: { listeners: { "input": "onInput($event.target.value)", "change": "onChange()", "blur": "onBlur()", "keydown": "onKeydown($event)" }, properties: { "attr.aria-haspopup": "true", "attr.aria-owns": "(datetimepicker?.opened && datetimepicker.id) || null", "attr.min": "min ? datetimepicker.toIso8601(min) : null", "attr.max": "max ? datetimepicker.toIso8601(max) : null", "disabled": "disabled" } }, providers: [
|
|
2778
2797
|
CMAT_DATETIMEPICKER_VALUE_ACCESSOR,
|
|
2779
2798
|
CMAT_DATETIMEPICKER_VALIDATORS,
|
|
2780
2799
|
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: CmatDatetimepickerInputDirective },
|
|
2781
2800
|
], exportAs: ["cmatDatepickerInput"], ngImport: i0 }); }
|
|
2782
2801
|
}
|
|
2783
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerInputDirective, decorators: [{
|
|
2784
2803
|
type: Directive,
|
|
2785
2804
|
args: [{
|
|
2786
2805
|
selector: 'input[cmatDatetimepicker]',
|
|
@@ -2822,10 +2841,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
2822
2841
|
|
|
2823
2842
|
/** Can be used to override the icon of a `cmatDatetimepickerToggle`. */
|
|
2824
2843
|
class CmatDatetimepickerToggleIconDirective {
|
|
2825
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2826
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
2844
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerToggleIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2845
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.4", type: CmatDatetimepickerToggleIconDirective, isStandalone: true, selector: "[cmatDatetimepickerToggleIcon]", ngImport: i0 }); }
|
|
2827
2846
|
}
|
|
2828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2847
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerToggleIconDirective, decorators: [{
|
|
2829
2848
|
type: Directive,
|
|
2830
2849
|
args: [{
|
|
2831
2850
|
selector: '[cmatDatetimepickerToggleIcon]'
|
|
@@ -2870,10 +2889,10 @@ class CmatDatetimepickerToggleComponent {
|
|
|
2870
2889
|
this._stateChanges = merge([this.intl.changes, datepickerDisabled, inputDisabled])
|
|
2871
2890
|
.subscribe(() => this._changeDetectorRef.markForCheck());
|
|
2872
2891
|
}
|
|
2873
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2874
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
2892
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2893
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CmatDatetimepickerToggleComponent, isStandalone: true, selector: "cmat-datetimepicker-toggle", inputs: { datetimepicker: ["for", "datetimepicker"], tabIndex: "tabIndex", ariaLabel: ["aria-label", "ariaLabel"], disableRipple: "disableRipple", disabled: "disabled" }, host: { properties: { "class": "this.class" } }, queries: [{ propertyName: "customIcon", first: true, predicate: CmatDatetimepickerToggleIconDirective, descendants: true }], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true }], exportAs: ["cmatDatetimepickerToggle"], usesOnChanges: true, ngImport: i0, template: "<button type=\"button\" matIconButton \r\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\" [attr.aria-label]=\"ariaLabel || intl.openCalendarLabel\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\" [disabled]=\"disabled\" [disableRipple]=\"disableRipple\" (click)=\"open($event)\">\r\n @if (!customIcon) {\r\n @switch (datetimepicker.type) {\r\n @case ('time') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\r\n </path>\r\n </svg>\r\n }\r\n @case ('datetime') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\r\n </path>\r\n </svg>\r\n }\r\n @default {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\r\n <path\r\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\r\n </svg>\r\n }\r\n }\r\n }\r\n\r\n <ng-content select=\"[cmatDatetimepickerToggleIcon]\"></ng-content>\r\n </button>", 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2875
2894
|
}
|
|
2876
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CmatDatetimepickerToggleComponent, decorators: [{
|
|
2877
2896
|
type: Component,
|
|
2878
2897
|
args: [{ selector: 'cmat-datetimepicker-toggle', exportAs: 'cmatDatetimepickerToggle', encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule], template: "<button type=\"button\" matIconButton \r\n [attr.aria-haspopup]=\"datetimepicker ? 'dialog' : null\" [attr.aria-label]=\"ariaLabel || intl.openCalendarLabel\"\r\n [attr.tabindex]=\"disabled ? -1 : tabIndex\" [disabled]=\"disabled\" [disableRipple]=\"disableRipple\" (click)=\"open($event)\">\r\n @if (!customIcon) {\r\n @switch (datetimepicker.type) {\r\n @case ('time') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\r\n </path>\r\n </svg>\r\n }\r\n @case ('datetime') {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path\r\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\r\n </path>\r\n </svg>\r\n }\r\n @default {\r\n <svg class=\"mat-icon cmat-datetimepicker-toggle-default-icon\" viewBox=\"0 0 24 24\" width=\"24px\"\r\n height=\"24px\" fill=\"currentColor\" focusable=\"false\">\r\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\r\n <path\r\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\r\n </svg>\r\n }\r\n }\r\n }\r\n\r\n <ng-content select=\"[cmatDatetimepickerToggleIcon]\"></ng-content>\r\n </button>" }]
|
|
2879
2898
|
}], propDecorators: { datetimepicker: [{
|