mis-crystal-design-system 14.0.43-test → 14.0.44-test
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/datepicker_v2/datepicker.module.d.ts +2 -1
- package/datepicker_v2/tz-datepicker.directive.d.ts +2 -0
- package/datepicker_v2/tz-dp-container/tz-dp-container.component.d.ts +2 -0
- package/daterangepicker_v2/daterangepicker.module.d.ts +2 -1
- package/daterangepicker_v2/tz-daterangepicker.directive.d.ts +2 -0
- package/daterangepicker_v2/tz-drp-container/tz-drp-container.component.d.ts +3 -1
- package/dropdown/dropdown.component.d.ts +1 -0
- package/dropdown/dropdown.module.d.ts +2 -1
- package/dynamic-form/dynamic-form.component.d.ts +1 -0
- package/esm2020/datepicker_v2/datepicker.module.mjs +5 -4
- package/esm2020/datepicker_v2/tz-datepicker.directive.mjs +21 -2
- package/esm2020/datepicker_v2/tz-dp-container/tz-dp-container.component.mjs +68 -63
- package/esm2020/daterangepicker_v2/daterangepicker.module.mjs +5 -4
- package/esm2020/daterangepicker_v2/models/drp-config.model.mjs +1 -1
- package/esm2020/daterangepicker_v2/tz-daterangepicker.directive.mjs +21 -2
- package/esm2020/daterangepicker_v2/tz-drp-container/tz-drp-container.component.mjs +121 -109
- package/esm2020/dropdown/dropdown.component.mjs +52 -38
- package/esm2020/dropdown/dropdown.module.mjs +5 -4
- package/esm2020/dynamic-form/dynamic-form.component.mjs +6 -11
- package/esm2020/mobile-filter/mobile-filter.component.mjs +18 -16
- package/esm2020/phone-input/phone-input.component.mjs +13 -82
- package/esm2020/specificdatepicker/tz-sdp-container/tz-sdp-container.component.mjs +41 -55
- package/esm2020/timepicker/timepicker.component.mjs +48 -54
- package/esm2020/timerangepicker/timerangepicker.component.mjs +42 -46
- package/fesm2015/mis-crystal-design-system-datepicker_v2.mjs +93 -66
- package/fesm2015/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-daterangepicker_v2.mjs +146 -113
- package/fesm2015/mis-crystal-design-system-daterangepicker_v2.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-dropdown.mjs +57 -40
- package/fesm2015/mis-crystal-design-system-dropdown.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-dynamic-form.mjs +4 -10
- package/fesm2015/mis-crystal-design-system-dynamic-form.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-mobile-filter.mjs +17 -15
- package/fesm2015/mis-crystal-design-system-mobile-filter.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-phone-input.mjs +10 -84
- package/fesm2015/mis-crystal-design-system-phone-input.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-specificdatepicker.mjs +40 -54
- package/fesm2015/mis-crystal-design-system-specificdatepicker.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-timepicker.mjs +47 -53
- package/fesm2015/mis-crystal-design-system-timepicker.mjs.map +1 -1
- package/fesm2015/mis-crystal-design-system-timerangepicker.mjs +41 -45
- package/fesm2015/mis-crystal-design-system-timerangepicker.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-datepicker_v2.mjs +91 -66
- package/fesm2020/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-daterangepicker_v2.mjs +143 -112
- package/fesm2020/mis-crystal-design-system-daterangepicker_v2.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-dropdown.mjs +55 -40
- package/fesm2020/mis-crystal-design-system-dropdown.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-dynamic-form.mjs +4 -10
- package/fesm2020/mis-crystal-design-system-dynamic-form.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-mobile-filter.mjs +17 -15
- package/fesm2020/mis-crystal-design-system-mobile-filter.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-phone-input.mjs +10 -79
- package/fesm2020/mis-crystal-design-system-phone-input.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-specificdatepicker.mjs +40 -54
- package/fesm2020/mis-crystal-design-system-specificdatepicker.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-timepicker.mjs +47 -53
- package/fesm2020/mis-crystal-design-system-timepicker.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-timerangepicker.mjs +41 -45
- package/fesm2020/mis-crystal-design-system-timerangepicker.mjs.map +1 -1
- package/package.json +1 -1
- package/phone-input/phone-input.component.d.ts +11 -25
- package/specificdatepicker/tz-sdp-container/tz-sdp-container.component.d.ts +1 -1
- package/timepicker/timepicker.component.d.ts +2 -2
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Component, Inject, EventEmitter, Injector, Directive, Self, Optional, Input, Output,
|
|
3
|
-
import
|
|
4
|
-
import timezone from 'dayjs/plugin/timezone';
|
|
5
|
-
import utc from 'dayjs/plugin/utc';
|
|
6
|
-
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter';
|
|
7
|
-
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore';
|
|
8
|
-
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
2
|
+
import { InjectionToken, Component, Inject, HostListener, EventEmitter, Injector, Directive, Self, Optional, Input, Output, NgModule } from '@angular/core';
|
|
3
|
+
import { parseZone, tz } from 'moment-timezone';
|
|
9
4
|
import * as i1 from 'mis-crystal-design-system/toast';
|
|
10
5
|
import { ToastModule } from 'mis-crystal-design-system/toast';
|
|
11
6
|
import * as i2 from '@angular/common';
|
|
12
7
|
import { CommonModule } from '@angular/common';
|
|
13
8
|
import * as i3 from 'mis-crystal-design-system/button';
|
|
14
9
|
import { ButtonModule } from 'mis-crystal-design-system/button';
|
|
10
|
+
import * as i4 from '@angular/cdk/a11y';
|
|
11
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
15
12
|
import * as i2$1 from '@angular/cdk/overlay';
|
|
16
13
|
import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
17
14
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
@@ -69,9 +66,9 @@ const getMonth = (index) => {
|
|
|
69
66
|
};
|
|
70
67
|
|
|
71
68
|
const _c0 = function (a0) { return { "current-day": a0 }; };
|
|
72
|
-
function
|
|
69
|
+
function TzDpContainerComponent_div_13_Template(rf, ctx) {
|
|
73
70
|
if (rf & 1) {
|
|
74
|
-
i0.ɵɵelementStart(0, "div",
|
|
71
|
+
i0.ɵɵelementStart(0, "div", 13)(1, "span", 14);
|
|
75
72
|
i0.ɵɵtext(2);
|
|
76
73
|
i0.ɵɵelementEnd()();
|
|
77
74
|
}
|
|
@@ -84,27 +81,28 @@ function TzDpContainerComponent_div_12_Template(rf, ctx) {
|
|
|
84
81
|
}
|
|
85
82
|
}
|
|
86
83
|
const _c1 = function (a0, a1, a2) { return { "current-day": a0, "selected-day": a1, "disabled-day": a2 }; };
|
|
87
|
-
function
|
|
84
|
+
function TzDpContainerComponent_div_15_span_1_Template(rf, ctx) {
|
|
88
85
|
if (rf & 1) {
|
|
89
|
-
i0.ɵɵelementStart(0, "span",
|
|
86
|
+
i0.ɵɵelementStart(0, "span", 17);
|
|
90
87
|
i0.ɵɵtext(1);
|
|
91
88
|
i0.ɵɵelementEnd();
|
|
92
89
|
}
|
|
93
90
|
if (rf & 2) {
|
|
94
91
|
const day_r4 = i0.ɵɵnextContext().$implicit;
|
|
95
92
|
const ctx_r5 = i0.ɵɵnextContext();
|
|
96
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(
|
|
93
|
+
i0.ɵɵproperty("tabindex", day_r4.isDisabledDay ? -1 : 0)("ngClass", i0.ɵɵpureFunction3(4, _c1, day_r4.isCurrentDay, !ctx_r5.localSelectedDate ? day_r4.isSelectedDay : day_r4 === ctx_r5.localSelectedDate, day_r4.isDisabledDay));
|
|
94
|
+
i0.ɵɵattribute("aria-label", ctx_r5.retractDayMonth(day_r4.date, ctx_r5.currentMonth, ctx_r5.currentYearNumber));
|
|
97
95
|
i0.ɵɵadvance(1);
|
|
98
96
|
i0.ɵɵtextInterpolate1(" ", day_r4.date, " ");
|
|
99
97
|
}
|
|
100
98
|
}
|
|
101
99
|
const _c2 = function (a0, a1, a2) { return { "selected-day": a0, "disabled-day": a1, "is-valid-date": a2 }; };
|
|
102
|
-
function
|
|
100
|
+
function TzDpContainerComponent_div_15_Template(rf, ctx) {
|
|
103
101
|
if (rf & 1) {
|
|
104
102
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
105
|
-
i0.ɵɵelementStart(0, "div",
|
|
106
|
-
i0.ɵɵlistener("click", function
|
|
107
|
-
i0.ɵɵtemplate(1,
|
|
103
|
+
i0.ɵɵelementStart(0, "div", 15);
|
|
104
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_div_15_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r8); const day_r4 = restoredCtx.$implicit; const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.selectDay(day_r4)); })("keyup.enter", function TzDpContainerComponent_div_15_Template_div_keyup_enter_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r8); const day_r4 = restoredCtx.$implicit; const ctx_r9 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r9.selectDay(day_r4)); });
|
|
105
|
+
i0.ɵɵtemplate(1, TzDpContainerComponent_div_15_span_1_Template, 2, 8, "span", 16);
|
|
108
106
|
i0.ɵɵelementEnd();
|
|
109
107
|
}
|
|
110
108
|
if (rf & 2) {
|
|
@@ -115,15 +113,15 @@ function TzDpContainerComponent_div_14_Template(rf, ctx) {
|
|
|
115
113
|
i0.ɵɵproperty("ngIf", day_r4.date > 0);
|
|
116
114
|
}
|
|
117
115
|
}
|
|
118
|
-
function
|
|
116
|
+
function TzDpContainerComponent_div_16_Template(rf, ctx) {
|
|
119
117
|
if (rf & 1) {
|
|
120
|
-
const
|
|
121
|
-
i0.ɵɵelementStart(0, "div",
|
|
122
|
-
i0.ɵɵlistener("click", function
|
|
118
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
119
|
+
i0.ɵɵelementStart(0, "div", 18)(1, "button", 19);
|
|
120
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_div_16_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r10.cancelDatePicker()); });
|
|
123
121
|
i0.ɵɵtext(2, "Cancel");
|
|
124
122
|
i0.ɵɵelementEnd();
|
|
125
|
-
i0.ɵɵelementStart(3, "button",
|
|
126
|
-
i0.ɵɵlistener("click", function
|
|
123
|
+
i0.ɵɵelementStart(3, "button", 20);
|
|
124
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_div_16_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r11); const ctx_r12 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r12.applyDate()); });
|
|
127
125
|
i0.ɵɵtext(4, "Apply");
|
|
128
126
|
i0.ɵɵelementEnd()();
|
|
129
127
|
}
|
|
@@ -134,17 +132,12 @@ function TzDpContainerComponent_div_15_Template(rf, ctx) {
|
|
|
134
132
|
}
|
|
135
133
|
}
|
|
136
134
|
const _c3 = function (a0) { return { "disabled-month": a0 }; };
|
|
137
|
-
dayjs.extend(utc);
|
|
138
|
-
dayjs.extend(timezone);
|
|
139
|
-
dayjs.extend(customParseFormat);
|
|
140
|
-
dayjs.extend(isSameOrAfter);
|
|
141
|
-
dayjs.extend(isSameOrBefore);
|
|
142
135
|
class TzDpContainerComponent {
|
|
143
136
|
constructor(data, toast) {
|
|
144
137
|
var _a, _b, _c, _d;
|
|
145
138
|
this.toast = toast;
|
|
146
139
|
this.parseZoneInstance = (...args) => {
|
|
147
|
-
return
|
|
140
|
+
return parseZone(...args);
|
|
148
141
|
};
|
|
149
142
|
this.rawWeekDays = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"];
|
|
150
143
|
this.weekDays = [];
|
|
@@ -155,7 +148,7 @@ class TzDpContainerComponent {
|
|
|
155
148
|
this.data = data;
|
|
156
149
|
if ((_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.dpConfig) === null || _b === void 0 ? void 0 : _b.timezone) {
|
|
157
150
|
this.parseZoneInstance = (...args) => {
|
|
158
|
-
return tz(args[0], args[1]
|
|
151
|
+
return tz(args[0], args[1], this.data.dpConfig.timezone);
|
|
159
152
|
};
|
|
160
153
|
}
|
|
161
154
|
this.currentMonthNumber = this.parseZoneInstance().month();
|
|
@@ -169,12 +162,15 @@ class TzDpContainerComponent {
|
|
|
169
162
|
this.data.dpConfig = Object.assign(Object.assign({}, this.data.dpConfig), { format: DATE_FORMAT });
|
|
170
163
|
}
|
|
171
164
|
}
|
|
165
|
+
retractDayMonth(day, month, year) {
|
|
166
|
+
return `${day} ${month} ${year}`;
|
|
167
|
+
}
|
|
172
168
|
ngOnInit() {
|
|
173
169
|
this.currentDateInstance();
|
|
174
170
|
this.calculateMinMaxDays();
|
|
175
171
|
}
|
|
176
172
|
currentDateInstance() {
|
|
177
|
-
const selectedDate =
|
|
173
|
+
const selectedDate = parseZone(this.data.date, this.data.dpConfig.format);
|
|
178
174
|
if (selectedDate.isValid()) {
|
|
179
175
|
this.currentYearNumber = selectedDate.year();
|
|
180
176
|
this.currentMonthNumber = selectedDate.month();
|
|
@@ -184,17 +180,17 @@ class TzDpContainerComponent {
|
|
|
184
180
|
}
|
|
185
181
|
calculateMinMaxDays() {
|
|
186
182
|
const currentInstance = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber);
|
|
187
|
-
const minDate =
|
|
183
|
+
const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);
|
|
188
184
|
if (minDate.isValid()) {
|
|
189
185
|
this.isPreviousMonthDisabled = minDate.isSameOrAfter(currentInstance, "month");
|
|
190
186
|
}
|
|
191
|
-
const maxDate =
|
|
187
|
+
const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);
|
|
192
188
|
if (maxDate.isValid()) {
|
|
193
189
|
this.isNextMonthDisabled = maxDate.isSameOrBefore(currentInstance, "month");
|
|
194
190
|
}
|
|
195
191
|
}
|
|
196
192
|
navigateMonth(direction) {
|
|
197
|
-
let thisMonth =
|
|
193
|
+
let thisMonth = parseZone().year(this.currentYearNumber).month(this.currentMonthNumber);
|
|
198
194
|
if (direction === "NEXT") {
|
|
199
195
|
thisMonth = thisMonth.add(1, "month");
|
|
200
196
|
}
|
|
@@ -210,16 +206,16 @@ class TzDpContainerComponent {
|
|
|
210
206
|
generateDates(month, currentYearNumber) {
|
|
211
207
|
var _a;
|
|
212
208
|
let dates = [];
|
|
213
|
-
const daysInMonth =
|
|
209
|
+
const daysInMonth = parseZone().year(currentYearNumber).month(month).daysInMonth();
|
|
214
210
|
for (let currentDate = 1; currentDate <= daysInMonth; currentDate++) {
|
|
215
211
|
const date = this.parseZoneInstance().year(currentYearNumber).month(month).date(currentDate);
|
|
216
212
|
const dateString = date.format(this.data.dpConfig.format);
|
|
217
213
|
let isDisabledDay = this.data.datesDisabled.some(d => d === dateString);
|
|
218
|
-
const minDate =
|
|
214
|
+
const minDate = this.parseZoneInstance(this.data.dpConfig.minDate, this.data.dpConfig.format);
|
|
219
215
|
if (!isDisabledDay && minDate.isValid()) {
|
|
220
216
|
isDisabledDay = minDate.isAfter(date, "day");
|
|
221
217
|
}
|
|
222
|
-
const maxDate =
|
|
218
|
+
const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate, this.data.dpConfig.format);
|
|
223
219
|
if (!isDisabledDay && maxDate.isValid()) {
|
|
224
220
|
isDisabledDay = maxDate.isBefore(date, "day");
|
|
225
221
|
}
|
|
@@ -240,8 +236,8 @@ class TzDpContainerComponent {
|
|
|
240
236
|
}
|
|
241
237
|
selectDay(day) {
|
|
242
238
|
this.currentSelection = this.parseZoneInstance().year(this.currentYearNumber).month(this.currentMonthNumber).date(day.date);
|
|
243
|
-
const maxDate =
|
|
244
|
-
const minDate =
|
|
239
|
+
const maxDate = this.parseZoneInstance(this.data.dpConfig.maxDate).endOf("day");
|
|
240
|
+
const minDate = this.parseZoneInstance(this.data.dpConfig.minDate).startOf("day");
|
|
245
241
|
this.allowBookingOnDisabledDay = this.data.allowBookingOnDisabledDay;
|
|
246
242
|
if (day.date <= 0)
|
|
247
243
|
return;
|
|
@@ -257,7 +253,7 @@ class TzDpContainerComponent {
|
|
|
257
253
|
}
|
|
258
254
|
applyDate(day) {
|
|
259
255
|
if (day || this.localSelectedDate) {
|
|
260
|
-
this.data.dateChange(
|
|
256
|
+
this.data.dateChange(parseZone()
|
|
261
257
|
.year(this.currentYearNumber)
|
|
262
258
|
.month(this.currentMonthNumber)
|
|
263
259
|
.date(day ? day.date : this.localSelectedDate.date)
|
|
@@ -267,47 +263,56 @@ class TzDpContainerComponent {
|
|
|
267
263
|
this.cancelDatePicker();
|
|
268
264
|
}
|
|
269
265
|
}
|
|
266
|
+
closeOnEsc() {
|
|
267
|
+
this.cancelDatePicker();
|
|
268
|
+
}
|
|
270
269
|
cancelDatePicker() {
|
|
271
270
|
this.data.dateChange("");
|
|
272
271
|
}
|
|
273
272
|
}
|
|
274
273
|
TzDpContainerComponent.ɵfac = function TzDpContainerComponent_Factory(t) { return new (t || TzDpContainerComponent)(i0.ɵɵdirectiveInject(CONTAINER_DATA), i0.ɵɵdirectiveInject(i1.ToastService)); };
|
|
275
|
-
TzDpContainerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TzDpContainerComponent, selectors: [["mis-tz-dp"]],
|
|
274
|
+
TzDpContainerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TzDpContainerComponent, selectors: [["mis-tz-dp"]], hostBindings: function TzDpContainerComponent_HostBindings(rf, ctx) {
|
|
275
|
+
if (rf & 1) {
|
|
276
|
+
i0.ɵɵlistener("keydown.esc", function TzDpContainerComponent_keydown_esc_HostBindingHandler() { return ctx.closeOnEsc(); });
|
|
277
|
+
}
|
|
278
|
+
}, decls: 17, vars: 13, consts: [["aria-label", "date picker", "cdkTrapFocus", "", 1, "datepicker-container", 3, "ngClass", "cdkTrapFocusAutoCapture"], ["tabindex", "-1", "cdkFocusInitial", ""], [1, "datepicker-container__header"], ["tabindex", "0", "aria-label", "Previous Month", 1, "datepicker-container__arrow__icon", 3, "ngClass", "click", "keyup.enter"], ["width", "20", "height", "16", "viewBox", "0 0 20 16", "fill", "none", "xmlns", "http://www.w3.org/2000/svg"], ["d", "M19.7071 8.70711C20.0976 8.31658 20.0976 7.68342 19.7071 7.29289L13.3431 0.928933C12.9526 0.538409 12.3195 0.538409 11.9289 0.928933C11.5384 1.31946 11.5384 1.95262 11.9289 2.34315L17.5858 8L11.9289 13.6569C11.5384 14.0474 11.5384 14.6805 11.9289 15.0711C12.3195 15.4616 12.9526 15.4616 13.3431 15.0711L19.7071 8.70711ZM-8.74228e-08 9L19 9L19 7L8.74228e-08 7L-8.74228e-08 9Z", "fill", "#181F33"], ["tabindex", "0", "aria-label", "Next Month", 1, "datepicker-container__arrow__icon", 3, "ngClass", "click", "keyup.enter"], [1, "datepicker-container__body"], [1, "datepicker-container__weekdays"], ["class", "datepicker-container__weekday", 4, "ngFor", "ngForOf"], [1, "datepicker-container__days"], ["class", "datepicker-container__day", 3, "ngClass", "click", "keyup.enter", 4, "ngFor", "ngForOf"], ["class", "datepicker-container__footer", 4, "ngIf"], [1, "datepicker-container__weekday"], [3, "ngClass"], [1, "datepicker-container__day", 3, "ngClass", "click", "keyup.enter"], [3, "tabindex", "ngClass", 4, "ngIf"], [3, "tabindex", "ngClass"], [1, "datepicker-container__footer"], ["mis-button", "", "size", "md", "type", "'none'", 3, "click"], ["mis-button", "", "size", "md", "type", "primary", 3, "disabled", "click"]], template: function TzDpContainerComponent_Template(rf, ctx) {
|
|
276
279
|
if (rf & 1) {
|
|
277
|
-
i0.ɵɵelementStart(0, "div", 0)
|
|
278
|
-
i0.ɵɵ
|
|
280
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
281
|
+
i0.ɵɵelement(1, "div", 1);
|
|
282
|
+
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3);
|
|
283
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_Template_div_click_3_listener() { return !ctx.isPreviousMonthDisabled && ctx.navigateMonth("PREVIOUS"); })("keyup.enter", function TzDpContainerComponent_Template_div_keyup_enter_3_listener() { return !ctx.isPreviousMonthDisabled && ctx.navigateMonth("PREVIOUS"); });
|
|
279
284
|
i0.ɵɵnamespaceSVG();
|
|
280
|
-
i0.ɵɵelementStart(
|
|
281
|
-
i0.ɵɵelement(
|
|
285
|
+
i0.ɵɵelementStart(4, "svg", 4);
|
|
286
|
+
i0.ɵɵelement(5, "path", 5);
|
|
282
287
|
i0.ɵɵelementEnd()();
|
|
283
288
|
i0.ɵɵnamespaceHTML();
|
|
284
|
-
i0.ɵɵelementStart(
|
|
285
|
-
i0.ɵɵtext(
|
|
289
|
+
i0.ɵɵelementStart(6, "span");
|
|
290
|
+
i0.ɵɵtext(7);
|
|
286
291
|
i0.ɵɵelementEnd();
|
|
287
|
-
i0.ɵɵelementStart(
|
|
288
|
-
i0.ɵɵlistener("click", function
|
|
292
|
+
i0.ɵɵelementStart(8, "div", 6);
|
|
293
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_Template_div_click_8_listener() { return !ctx.isNextMonthDisabled && ctx.navigateMonth("NEXT"); })("keyup.enter", function TzDpContainerComponent_Template_div_keyup_enter_8_listener() { return !ctx.isNextMonthDisabled && ctx.navigateMonth("NEXT"); });
|
|
289
294
|
i0.ɵɵnamespaceSVG();
|
|
290
|
-
i0.ɵɵelementStart(
|
|
291
|
-
i0.ɵɵelement(
|
|
295
|
+
i0.ɵɵelementStart(9, "svg", 4);
|
|
296
|
+
i0.ɵɵelement(10, "path", 5);
|
|
292
297
|
i0.ɵɵelementEnd()()();
|
|
293
298
|
i0.ɵɵnamespaceHTML();
|
|
294
|
-
i0.ɵɵelementStart(
|
|
295
|
-
i0.ɵɵtemplate(
|
|
299
|
+
i0.ɵɵelementStart(11, "div", 7)(12, "div", 8);
|
|
300
|
+
i0.ɵɵtemplate(13, TzDpContainerComponent_div_13_Template, 3, 4, "div", 9);
|
|
296
301
|
i0.ɵɵelementEnd();
|
|
297
|
-
i0.ɵɵelementStart(
|
|
298
|
-
i0.ɵɵtemplate(
|
|
302
|
+
i0.ɵɵelementStart(14, "div", 10);
|
|
303
|
+
i0.ɵɵtemplate(15, TzDpContainerComponent_div_15_Template, 2, 6, "div", 11);
|
|
299
304
|
i0.ɵɵelementEnd()();
|
|
300
|
-
i0.ɵɵtemplate(
|
|
305
|
+
i0.ɵɵtemplate(16, TzDpContainerComponent_div_16_Template, 5, 1, "div", 12);
|
|
301
306
|
i0.ɵɵelementEnd();
|
|
302
307
|
}
|
|
303
308
|
if (rf & 2) {
|
|
304
|
-
i0.ɵɵproperty("ngClass", ctx.data.disableBoxShadow ? "remove-box-shadow" : "");
|
|
305
|
-
i0.ɵɵadvance(
|
|
306
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
309
|
+
i0.ɵɵproperty("ngClass", ctx.data.disableBoxShadow ? "remove-box-shadow" : "")("cdkTrapFocusAutoCapture", true);
|
|
310
|
+
i0.ɵɵadvance(3);
|
|
311
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c3, ctx.isPreviousMonthDisabled));
|
|
307
312
|
i0.ɵɵadvance(4);
|
|
308
313
|
i0.ɵɵtextInterpolate2(" ", ctx.currentMonth, " ", ctx.currentYearNumber, " ");
|
|
309
314
|
i0.ɵɵadvance(1);
|
|
310
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
315
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c3, ctx.isNextMonthDisabled));
|
|
311
316
|
i0.ɵɵadvance(5);
|
|
312
317
|
i0.ɵɵproperty("ngForOf", ctx.weekDays);
|
|
313
318
|
i0.ɵɵadvance(2);
|
|
@@ -315,17 +320,20 @@ TzDpContainerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TzDp
|
|
|
315
320
|
i0.ɵɵadvance(1);
|
|
316
321
|
i0.ɵɵproperty("ngIf", ctx.data.dpConfig.showApplyButton);
|
|
317
322
|
}
|
|
318
|
-
}, dependencies: [i2.NgClass, i2.NgForOf, i2.NgIf, i3.ButtonDirective], styles: [".datepicker-container[_ngcontent-%COMP%]{background:#ffffff;border:1px solid #e0e0e0;box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:12px;display:flex;flex-direction:column;font-family:Lato;-webkit-user-select:none;user-select:none;box-sizing:border-box;width:290px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%]{display:flex;height:32px;margin:16px;justify-content:space-between;align-items:center;width:258px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:16px;font-style:normal;font-weight:700;line-height:24px;letter-spacing:.2px;text-align:center}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%] .datepicker-container__arrow__icon[_ngcontent-%COMP%]{height:20px;width:20px;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:4px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%] .datepicker-container__arrow__icon.disabled-month[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%] .datepicker-container__arrow__icon[_ngcontent-%COMP%]:not(.disabled-month):hover{cursor:pointer;background-color:#cbddfb}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%] .datepicker-container__arrow__icon[_ngcontent-%COMP%]:nth-child(1){transform:rotate(180deg)}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%]{width:258px;height:100%;margin:0 16px 16px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__weekdays[_ngcontent-%COMP%]{width:100%;display:flex;padding-bottom:10px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__weekdays[_ngcontent-%COMP%] .datepicker-container__weekday[_ngcontent-%COMP%]{width:36px;height:18px;text-align:center}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__weekdays[_ngcontent-%COMP%] .datepicker-container__weekday[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;font-style:normal;font-weight:400;line-height:18px;letter-spacing:.2px;text-align:center;color:#c7c7c7}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__weekdays[_ngcontent-%COMP%] .datepicker-container__weekday[_ngcontent-%COMP%] span.current-day[_ngcontent-%COMP%]{font-weight:700;letter-spacing:.25px;color:#181f33}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:2px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day[_ngcontent-%COMP%]{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:4px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day.selected-day[_ngcontent-%COMP%]{background-color:#0937b2;cursor:pointer}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day.disabled-day[_ngcontent-%COMP%]{cursor:default}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day.disabled-day[_ngcontent-%COMP%]:hover{background-color:transparent}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day.is-valid-date[_ngcontent-%COMP%]:not(.disabled-day):not(.selected-day):hover{background-color:#cbddfb;cursor:pointer}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day.is-valid-date[_ngcontent-%COMP%]:not(.disabled-day):not(.selected-day):hover span.selected-day[_ngcontent-%COMP%]{color:#181f33!important}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px;font-style:normal;font-weight:400;line-height:20px;letter-spacing:.2px;text-align:center;color:#181f33}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day[_ngcontent-%COMP%] span.current-day[_ngcontent-%COMP%]{font-weight:700;letter-spacing:.25px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day[_ngcontent-%COMP%] span.selected-day[_ngcontent-%COMP%]{color:#fff}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day[_ngcontent-%COMP%] span.disabled-day[_ngcontent-%COMP%]{color:#c7c7c7}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;bottom:0;align-items:center;position:sticky;padding:16px;border-top:1px solid #e0e0e0}.remove-box-shadow[_ngcontent-%COMP%]{box-shadow:none!important;border:none!important;border-radius:0!important}"] });
|
|
323
|
+
}, dependencies: [i2.NgClass, i2.NgForOf, i2.NgIf, i3.ButtonDirective, i4.CdkTrapFocus], styles: [".datepicker-container[_ngcontent-%COMP%]{background:#ffffff;border:1px solid #e0e0e0;box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:12px;display:flex;flex-direction:column;font-family:Lato;-webkit-user-select:none;user-select:none;box-sizing:border-box;width:290px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%]{display:flex;height:32px;margin:16px;justify-content:space-between;align-items:center;width:258px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:16px;font-style:normal;font-weight:700;line-height:24px;letter-spacing:.2px;text-align:center}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%] .datepicker-container__arrow__icon[_ngcontent-%COMP%]{height:20px;width:20px;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:4px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%] .datepicker-container__arrow__icon.disabled-month[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%] .datepicker-container__arrow__icon[_ngcontent-%COMP%]:not(.disabled-month):hover{cursor:pointer;background-color:#cbddfb}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__header[_ngcontent-%COMP%] .datepicker-container__arrow__icon[_ngcontent-%COMP%]:nth-child(1){transform:rotate(180deg)}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%]{width:258px;height:100%;margin:0 16px 16px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__weekdays[_ngcontent-%COMP%]{width:100%;display:flex;padding-bottom:10px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__weekdays[_ngcontent-%COMP%] .datepicker-container__weekday[_ngcontent-%COMP%]{width:36px;height:18px;text-align:center}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__weekdays[_ngcontent-%COMP%] .datepicker-container__weekday[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;font-style:normal;font-weight:400;line-height:18px;letter-spacing:.2px;text-align:center;color:#c7c7c7}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__weekdays[_ngcontent-%COMP%] .datepicker-container__weekday[_ngcontent-%COMP%] span.current-day[_ngcontent-%COMP%]{font-weight:700;letter-spacing:.25px;color:#181f33}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:2px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day[_ngcontent-%COMP%]{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:4px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day.selected-day[_ngcontent-%COMP%]{background-color:#0937b2;cursor:pointer}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day.disabled-day[_ngcontent-%COMP%]{cursor:default}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day.disabled-day[_ngcontent-%COMP%]:hover{background-color:transparent}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day.is-valid-date[_ngcontent-%COMP%]:not(.disabled-day):not(.selected-day):hover{background-color:#cbddfb;cursor:pointer}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day.is-valid-date[_ngcontent-%COMP%]:not(.disabled-day):not(.selected-day):hover span.selected-day[_ngcontent-%COMP%]{color:#181f33!important}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px;font-style:normal;font-weight:400;line-height:20px;letter-spacing:.2px;text-align:center;color:#181f33}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day[_ngcontent-%COMP%] span.current-day[_ngcontent-%COMP%]{font-weight:700;letter-spacing:.25px}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day[_ngcontent-%COMP%] span.selected-day[_ngcontent-%COMP%]{color:#fff}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__body[_ngcontent-%COMP%] .datepicker-container__days[_ngcontent-%COMP%] .datepicker-container__day[_ngcontent-%COMP%] span.disabled-day[_ngcontent-%COMP%]{color:#c7c7c7}.datepicker-container[_ngcontent-%COMP%] .datepicker-container__footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;bottom:0;align-items:center;position:sticky;padding:16px;border-top:1px solid #e0e0e0}.remove-box-shadow[_ngcontent-%COMP%]{box-shadow:none!important;border:none!important;border-radius:0!important}"] });
|
|
319
324
|
(function () {
|
|
320
325
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TzDpContainerComponent, [{
|
|
321
326
|
type: Component,
|
|
322
|
-
args: [{ selector: "mis-tz-dp", template: "<div class=\"datepicker-container\" [ngClass]=\"data.disableBoxShadow?'remove-box-shadow':''\">\n <div class=\"datepicker-container__header\">\n <div\n class=\"datepicker-container__arrow__icon\"\n (click)=\"!isPreviousMonthDisabled && navigateMonth('PREVIOUS')\"\n [ngClass]=\"{\n 'disabled-month': isPreviousMonthDisabled\n }\"\n >\n <svg width=\"20\" height=\"16\" viewBox=\"0 0 20 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M19.7071 8.70711C20.0976 8.31658 20.0976 7.68342 19.7071 7.29289L13.3431 0.928933C12.9526 0.538409 12.3195 0.538409 11.9289 0.928933C11.5384 1.31946 11.5384 1.95262 11.9289 2.34315L17.5858 8L11.9289 13.6569C11.5384 14.0474 11.5384 14.6805 11.9289 15.0711C12.3195 15.4616 12.9526 15.4616 13.3431 15.0711L19.7071 8.70711ZM-8.74228e-08 9L19 9L19 7L8.74228e-08 7L-8.74228e-08 9Z\"\n fill=\"#181F33\"\n ></path>\n </svg>\n </div>\n <span> {{ currentMonth }} {{ currentYearNumber }} </span>\n <div\n class=\"datepicker-container__arrow__icon\"\n (click)=\"!isNextMonthDisabled && navigateMonth('NEXT')\"\n [ngClass]=\"{\n 'disabled-month': isNextMonthDisabled\n }\"\n >\n <svg width=\"20\" height=\"16\" viewBox=\"0 0 20 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M19.7071 8.70711C20.0976 8.31658 20.0976 7.68342 19.7071 7.29289L13.3431 0.928933C12.9526 0.538409 12.3195 0.538409 11.9289 0.928933C11.5384 1.31946 11.5384 1.95262 11.9289 2.34315L17.5858 8L11.9289 13.6569C11.5384 14.0474 11.5384 14.6805 11.9289 15.0711C12.3195 15.4616 12.9526 15.4616 13.3431 15.0711L19.7071 8.70711ZM-8.74228e-08 9L19 9L19 7L8.74228e-08 7L-8.74228e-08 9Z\"\n fill=\"#181F33\"\n ></path>\n </svg>\n </div>\n </div>\n <div class=\"datepicker-container__body\">\n <div class=\"datepicker-container__weekdays\">\n <div class=\"datepicker-container__weekday\" *ngFor=\"let weekDay of weekDays\">\n <span [ngClass]=\"{ 'current-day': weekDay.isCurrentDay }\">{{ weekDay.label }}</span>\n </div>\n </div>\n <div class=\"datepicker-container__days\">\n <div\n class=\"datepicker-container__day\"\n [ngClass]=\"{\n 'selected-day': !localSelectedDate ? day.isSelectedDay : day === localSelectedDate,\n 'disabled-day': day.isDisabledDay,\n 'is-valid-date': day.date > 0 && !day.isSelectedDay\n }\"\n *ngFor=\"let day of currentMonthDates\"\n (click)=\"selectDay(day)\"\n >\n <span\n *ngIf=\"day.date > 0\"\n [ngClass]=\"{\n 'current-day': day.isCurrentDay,\n 'selected-day': !localSelectedDate ? day.isSelectedDay : day === localSelectedDate,\n 'disabled-day': day.isDisabledDay\n }\"\n >\n {{ day.date }}\n </span>\n </div>\n </div>\n </div>\n <div class=\"datepicker-container__footer\" *ngIf=\"data.dpConfig.showApplyButton\">\n <button mis-button size=\"md\" type=\"'none'\" (click)=\"cancelDatePicker()\">Cancel</button>\n <button mis-button size=\"md\" type=\"primary\" (click)=\"applyDate()\" [disabled]=\"!(data.date || localSelectedDate)\">Apply</button>\n </div>\n</div>\n", styles: [".datepicker-container{background:#ffffff;border:1px solid #e0e0e0;box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:12px;display:flex;flex-direction:column;font-family:Lato;-webkit-user-select:none;user-select:none;box-sizing:border-box;width:290px}.datepicker-container .datepicker-container__header{display:flex;height:32px;margin:16px;justify-content:space-between;align-items:center;width:258px}.datepicker-container .datepicker-container__header span{font-size:16px;font-style:normal;font-weight:700;line-height:24px;letter-spacing:.2px;text-align:center}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon{height:20px;width:20px;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:4px}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon.disabled-month{opacity:.5;cursor:not-allowed}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon:not(.disabled-month):hover{cursor:pointer;background-color:#cbddfb}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon:nth-child(1){transform:rotate(180deg)}.datepicker-container .datepicker-container__body{width:258px;height:100%;margin:0 16px 16px}.datepicker-container .datepicker-container__body .datepicker-container__weekdays{width:100%;display:flex;padding-bottom:10px}.datepicker-container .datepicker-container__body .datepicker-container__weekdays .datepicker-container__weekday{width:36px;height:18px;text-align:center}.datepicker-container .datepicker-container__body .datepicker-container__weekdays .datepicker-container__weekday span{font-size:12px;font-style:normal;font-weight:400;line-height:18px;letter-spacing:.2px;text-align:center;color:#c7c7c7}.datepicker-container .datepicker-container__body .datepicker-container__weekdays .datepicker-container__weekday span.current-day{font-weight:700;letter-spacing:.25px;color:#181f33}.datepicker-container .datepicker-container__body .datepicker-container__days{display:flex;flex-wrap:wrap;gap:2px}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:4px}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.selected-day{background-color:#0937b2;cursor:pointer}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.disabled-day{cursor:default}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.disabled-day:hover{background-color:transparent}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.is-valid-date:not(.disabled-day):not(.selected-day):hover{background-color:#cbddfb;cursor:pointer}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.is-valid-date:not(.disabled-day):not(.selected-day):hover span.selected-day{color:#181f33!important}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span{font-size:14px;font-style:normal;font-weight:400;line-height:20px;letter-spacing:.2px;text-align:center;color:#181f33}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span.current-day{font-weight:700;letter-spacing:.25px}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span.selected-day{color:#fff}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span.disabled-day{color:#c7c7c7}.datepicker-container .datepicker-container__footer{display:flex;justify-content:flex-end;gap:8px;bottom:0;align-items:center;position:sticky;padding:16px;border-top:1px solid #e0e0e0}.remove-box-shadow{box-shadow:none!important;border:none!important;border-radius:0!important}\n"] }]
|
|
327
|
+
args: [{ selector: "mis-tz-dp", template: "<div class=\"datepicker-container\" [ngClass]=\"data.disableBoxShadow?'remove-box-shadow':''\" aria-label=\"date picker\" cdkTrapFocus [cdkTrapFocusAutoCapture]=\"true\">\n <div tabindex=\"-1\" cdkFocusInitial></div>\n <div class=\"datepicker-container__header\">\n <div\n class=\"datepicker-container__arrow__icon\"\n (click)=\"!isPreviousMonthDisabled && navigateMonth('PREVIOUS')\"\n tabindex=\"0\"\n aria-label=\"Previous Month\"\n (keyup.enter)=\"!isPreviousMonthDisabled && navigateMonth('PREVIOUS')\"\n [ngClass]=\"{\n 'disabled-month': isPreviousMonthDisabled\n }\"\n >\n <svg width=\"20\" height=\"16\" viewBox=\"0 0 20 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M19.7071 8.70711C20.0976 8.31658 20.0976 7.68342 19.7071 7.29289L13.3431 0.928933C12.9526 0.538409 12.3195 0.538409 11.9289 0.928933C11.5384 1.31946 11.5384 1.95262 11.9289 2.34315L17.5858 8L11.9289 13.6569C11.5384 14.0474 11.5384 14.6805 11.9289 15.0711C12.3195 15.4616 12.9526 15.4616 13.3431 15.0711L19.7071 8.70711ZM-8.74228e-08 9L19 9L19 7L8.74228e-08 7L-8.74228e-08 9Z\"\n fill=\"#181F33\"\n ></path>\n </svg>\n </div>\n <span> {{ currentMonth }} {{ currentYearNumber }} </span>\n <div\n class=\"datepicker-container__arrow__icon\"\n (click)=\"!isNextMonthDisabled && navigateMonth('NEXT')\"\n tabindex=\"0\"\n aria-label=\"Next Month\"\n (keyup.enter)=\"!isNextMonthDisabled && navigateMonth('NEXT')\"\n [ngClass]=\"{\n 'disabled-month': isNextMonthDisabled\n }\"\n >\n <svg width=\"20\" height=\"16\" viewBox=\"0 0 20 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M19.7071 8.70711C20.0976 8.31658 20.0976 7.68342 19.7071 7.29289L13.3431 0.928933C12.9526 0.538409 12.3195 0.538409 11.9289 0.928933C11.5384 1.31946 11.5384 1.95262 11.9289 2.34315L17.5858 8L11.9289 13.6569C11.5384 14.0474 11.5384 14.6805 11.9289 15.0711C12.3195 15.4616 12.9526 15.4616 13.3431 15.0711L19.7071 8.70711ZM-8.74228e-08 9L19 9L19 7L8.74228e-08 7L-8.74228e-08 9Z\"\n fill=\"#181F33\"\n ></path>\n </svg>\n </div>\n </div>\n <div class=\"datepicker-container__body\">\n <div class=\"datepicker-container__weekdays\">\n <div class=\"datepicker-container__weekday\" *ngFor=\"let weekDay of weekDays\">\n <span [ngClass]=\"{ 'current-day': weekDay.isCurrentDay }\">{{ weekDay.label }}</span>\n </div>\n </div>\n <div class=\"datepicker-container__days\">\n <div\n class=\"datepicker-container__day\"\n [ngClass]=\"{\n 'selected-day': !localSelectedDate ? day.isSelectedDay : day === localSelectedDate,\n 'disabled-day': day.isDisabledDay,\n 'is-valid-date': day.date > 0 && !day.isSelectedDay\n }\"\n *ngFor=\"let day of currentMonthDates\"\n (click)=\"selectDay(day)\"\n (keyup.enter)=\"selectDay(day)\"\n >\n <span\n *ngIf=\"day.date > 0\"\n [tabindex]=\"day.isDisabledDay ? -1 : 0\"\n [ngClass]=\"{\n 'current-day': day.isCurrentDay,\n 'selected-day': !localSelectedDate ? day.isSelectedDay : day === localSelectedDate,\n 'disabled-day': day.isDisabledDay\n }\"\n [attr.aria-label]=\"retractDayMonth(day.date, currentMonth, currentYearNumber)\"\n >\n {{ day.date }}\n </span>\n </div>\n </div>\n </div>\n <div class=\"datepicker-container__footer\" *ngIf=\"data.dpConfig.showApplyButton\">\n <button mis-button size=\"md\" type=\"'none'\" (click)=\"cancelDatePicker()\">Cancel</button>\n <button mis-button size=\"md\" type=\"primary\" (click)=\"applyDate()\" [disabled]=\"!(data.date || localSelectedDate)\">Apply</button>\n </div>\n</div>\n", styles: [".datepicker-container{background:#ffffff;border:1px solid #e0e0e0;box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:12px;display:flex;flex-direction:column;font-family:Lato;-webkit-user-select:none;user-select:none;box-sizing:border-box;width:290px}.datepicker-container .datepicker-container__header{display:flex;height:32px;margin:16px;justify-content:space-between;align-items:center;width:258px}.datepicker-container .datepicker-container__header span{font-size:16px;font-style:normal;font-weight:700;line-height:24px;letter-spacing:.2px;text-align:center}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon{height:20px;width:20px;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:4px}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon.disabled-month{opacity:.5;cursor:not-allowed}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon:not(.disabled-month):hover{cursor:pointer;background-color:#cbddfb}.datepicker-container .datepicker-container__header .datepicker-container__arrow__icon:nth-child(1){transform:rotate(180deg)}.datepicker-container .datepicker-container__body{width:258px;height:100%;margin:0 16px 16px}.datepicker-container .datepicker-container__body .datepicker-container__weekdays{width:100%;display:flex;padding-bottom:10px}.datepicker-container .datepicker-container__body .datepicker-container__weekdays .datepicker-container__weekday{width:36px;height:18px;text-align:center}.datepicker-container .datepicker-container__body .datepicker-container__weekdays .datepicker-container__weekday span{font-size:12px;font-style:normal;font-weight:400;line-height:18px;letter-spacing:.2px;text-align:center;color:#c7c7c7}.datepicker-container .datepicker-container__body .datepicker-container__weekdays .datepicker-container__weekday span.current-day{font-weight:700;letter-spacing:.25px;color:#181f33}.datepicker-container .datepicker-container__body .datepicker-container__days{display:flex;flex-wrap:wrap;gap:2px}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:4px}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.selected-day{background-color:#0937b2;cursor:pointer}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.disabled-day{cursor:default}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.disabled-day:hover{background-color:transparent}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.is-valid-date:not(.disabled-day):not(.selected-day):hover{background-color:#cbddfb;cursor:pointer}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day.is-valid-date:not(.disabled-day):not(.selected-day):hover span.selected-day{color:#181f33!important}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span{font-size:14px;font-style:normal;font-weight:400;line-height:20px;letter-spacing:.2px;text-align:center;color:#181f33}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span.current-day{font-weight:700;letter-spacing:.25px}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span.selected-day{color:#fff}.datepicker-container .datepicker-container__body .datepicker-container__days .datepicker-container__day span.disabled-day{color:#c7c7c7}.datepicker-container .datepicker-container__footer{display:flex;justify-content:flex-end;gap:8px;bottom:0;align-items:center;position:sticky;padding:16px;border-top:1px solid #e0e0e0}.remove-box-shadow{box-shadow:none!important;border:none!important;border-radius:0!important}\n"] }]
|
|
323
328
|
}], function () {
|
|
324
329
|
return [{ type: undefined, decorators: [{
|
|
325
330
|
type: Inject,
|
|
326
331
|
args: [CONTAINER_DATA]
|
|
327
332
|
}] }, { type: i1.ToastService }];
|
|
328
|
-
},
|
|
333
|
+
}, { closeOnEsc: [{
|
|
334
|
+
type: HostListener,
|
|
335
|
+
args: ["keydown.esc"]
|
|
336
|
+
}] });
|
|
329
337
|
})();
|
|
330
338
|
|
|
331
339
|
class TzDatepickerDirective {
|
|
@@ -373,6 +381,19 @@ class TzDatepickerDirective {
|
|
|
373
381
|
this.open();
|
|
374
382
|
}
|
|
375
383
|
}
|
|
384
|
+
toggleDatePickerOnEnter() {
|
|
385
|
+
if (this.isOpen) {
|
|
386
|
+
this.close();
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
this.open();
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
closeOnEsc() {
|
|
393
|
+
if (this.isOpen) {
|
|
394
|
+
this.close();
|
|
395
|
+
}
|
|
396
|
+
}
|
|
376
397
|
open() {
|
|
377
398
|
var _a;
|
|
378
399
|
this.dpConfig = Object.assign({ format: DATE_FORMAT, minDate: "", maxDate: "", showApplyButton: false }, this.dpConfig);
|
|
@@ -439,7 +460,7 @@ class TzDatepickerDirective {
|
|
|
439
460
|
TzDatepickerDirective.ɵfac = function TzDatepickerDirective_Factory(t) { return new (t || TzDatepickerDirective)(i0.ɵɵdirectiveInject(i1$1.NgControl, 10), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i2$1.Overlay), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); };
|
|
440
461
|
TzDatepickerDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TzDatepickerDirective, selectors: [["input", "misTzDp", ""]], hostBindings: function TzDatepickerDirective_HostBindings(rf, ctx) {
|
|
441
462
|
if (rf & 1) {
|
|
442
|
-
i0.ɵɵlistener("click", function TzDatepickerDirective_click_HostBindingHandler() { return ctx.toggleDatePicker(); });
|
|
463
|
+
i0.ɵɵlistener("click", function TzDatepickerDirective_click_HostBindingHandler() { return ctx.toggleDatePicker(); })("keydown.enter", function TzDatepickerDirective_keydown_enter_HostBindingHandler() { return ctx.toggleDatePickerOnEnter(); })("keydown.esc", function TzDatepickerDirective_keydown_esc_HostBindingHandler() { return ctx.closeOnEsc(); });
|
|
443
464
|
}
|
|
444
465
|
}, inputs: { dpConfig: "dpConfig", selectedDate: "selectedDate", datesDisabled: "datesDisabled", dateMessages: "dateMessages", positionX: "positionX", positionY: "positionY", offsetX: "offsetX", offsetY: "offsetY", allowBookingOnDisabledDay: "allowBookingOnDisabledDay", disableBoxShadow: "disableBoxShadow", disableOverLay: "disableOverLay", openElement: "openElement" }, outputs: { dateChange: "dateChange" }, features: [i0.ɵɵNgOnChangesFeature] });
|
|
445
466
|
(function () {
|
|
@@ -483,6 +504,12 @@ TzDatepickerDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TzDat
|
|
|
483
504
|
}], toggleDatePicker: [{
|
|
484
505
|
type: HostListener,
|
|
485
506
|
args: ["click"]
|
|
507
|
+
}], toggleDatePickerOnEnter: [{
|
|
508
|
+
type: HostListener,
|
|
509
|
+
args: ["keydown.enter"]
|
|
510
|
+
}], closeOnEsc: [{
|
|
511
|
+
type: HostListener,
|
|
512
|
+
args: ["keydown.esc"]
|
|
486
513
|
}] });
|
|
487
514
|
})();
|
|
488
515
|
|
|
@@ -490,18 +517,18 @@ class DatepickerModuleV2 {
|
|
|
490
517
|
}
|
|
491
518
|
DatepickerModuleV2.ɵfac = function DatepickerModuleV2_Factory(t) { return new (t || DatepickerModuleV2)(); };
|
|
492
519
|
DatepickerModuleV2.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: DatepickerModuleV2 });
|
|
493
|
-
DatepickerModuleV2.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, OverlayModule, ToastModule.forRoot(), ButtonModule] });
|
|
520
|
+
DatepickerModuleV2.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, OverlayModule, ToastModule.forRoot(), ButtonModule, A11yModule] });
|
|
494
521
|
(function () {
|
|
495
522
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DatepickerModuleV2, [{
|
|
496
523
|
type: NgModule,
|
|
497
524
|
args: [{
|
|
498
525
|
declarations: [TzDpContainerComponent, TzDatepickerDirective],
|
|
499
|
-
imports: [CommonModule, OverlayModule, ToastModule.forRoot(), ButtonModule],
|
|
526
|
+
imports: [CommonModule, OverlayModule, ToastModule.forRoot(), ButtonModule, A11yModule],
|
|
500
527
|
exports: [TzDpContainerComponent, TzDatepickerDirective]
|
|
501
528
|
}]
|
|
502
529
|
}], null, null);
|
|
503
530
|
})();
|
|
504
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(DatepickerModuleV2, { declarations: [TzDpContainerComponent, TzDatepickerDirective], imports: [CommonModule, OverlayModule, i1.ToastModule, ButtonModule], exports: [TzDpContainerComponent, TzDatepickerDirective] }); })();
|
|
531
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(DatepickerModuleV2, { declarations: [TzDpContainerComponent, TzDatepickerDirective], imports: [CommonModule, OverlayModule, i1.ToastModule, ButtonModule, A11yModule], exports: [TzDpContainerComponent, TzDatepickerDirective] }); })();
|
|
505
532
|
|
|
506
533
|
/**
|
|
507
534
|
* Generated bundle index. Do not edit.
|