mis-crystal-design-system 14.0.67-test1 → 14.0.68
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/tz-dp-container/tz-dp-container.component.d.ts +1 -0
- package/esm2020/datepicker_v2/tz-dp-container/tz-dp-container.component.mjs +78 -116
- package/fesm2015/mis-crystal-design-system-datepicker_v2.mjs +77 -127
- package/fesm2015/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
- package/fesm2020/mis-crystal-design-system-datepicker_v2.mjs +77 -115
- package/fesm2020/mis-crystal-design-system-datepicker_v2.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -65,106 +65,60 @@ const getMonth = (index) => {
|
|
|
65
65
|
return month;
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
function TzDpContainerComponent_div_6_ng_container_1_Template(rf, ctx) {
|
|
69
|
-
if (rf & 1) {
|
|
70
|
-
i0.ɵɵelementContainerStart(0);
|
|
71
|
-
i0.ɵɵtext(1);
|
|
72
|
-
i0.ɵɵelementContainerEnd();
|
|
73
|
-
}
|
|
74
|
-
if (rf & 2) {
|
|
75
|
-
const ctx_r7 = i0.ɵɵnextContext(2);
|
|
76
|
-
i0.ɵɵadvance(1);
|
|
77
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r7.selectedYear, " ");
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function TzDpContainerComponent_div_6_ng_template_2_Template(rf, ctx) {
|
|
81
|
-
if (rf & 1) {
|
|
82
|
-
i0.ɵɵtext(0);
|
|
83
|
-
}
|
|
84
|
-
if (rf & 2) {
|
|
85
|
-
const ctx_r9 = i0.ɵɵnextContext(2);
|
|
86
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r9.availableMonths[ctx_r9.currentMonthNumber], " ");
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
68
|
function TzDpContainerComponent_div_6_Template(rf, ctx) {
|
|
90
69
|
if (rf & 1) {
|
|
91
|
-
const
|
|
70
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
92
71
|
i0.ɵɵnamespaceSVG();
|
|
93
72
|
i0.ɵɵnamespaceHTML();
|
|
94
73
|
i0.ɵɵelementStart(0, "div", 15);
|
|
95
|
-
i0.ɵɵlistener("click", function TzDpContainerComponent_div_6_Template_div_click_0_listener() { i0.ɵɵrestoreView(
|
|
96
|
-
i0.ɵɵ
|
|
97
|
-
i0.ɵɵtemplate(2, TzDpContainerComponent_div_6_ng_template_2_Template, 1, 1, "ng-template", null, 17, i0.ɵɵtemplateRefExtractor);
|
|
74
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_div_6_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.toggleMonthSelector()); });
|
|
75
|
+
i0.ɵɵtext(1);
|
|
98
76
|
i0.ɵɵelementEnd();
|
|
99
77
|
}
|
|
100
78
|
if (rf & 2) {
|
|
101
|
-
const _r8 = i0.ɵɵreference(3);
|
|
102
79
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
103
80
|
i0.ɵɵadvance(1);
|
|
104
|
-
i0.ɵɵ
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
function TzDpContainerComponent_div_7_ng_container_1_Template(rf, ctx) {
|
|
108
|
-
if (rf & 1) {
|
|
109
|
-
i0.ɵɵelementContainerStart(0);
|
|
110
|
-
i0.ɵɵtext(1);
|
|
111
|
-
i0.ɵɵelementContainerEnd();
|
|
112
|
-
}
|
|
113
|
-
if (rf & 2) {
|
|
114
|
-
const ctx_r12 = i0.ɵɵnextContext(2);
|
|
115
|
-
i0.ɵɵadvance(1);
|
|
116
|
-
i0.ɵɵtextInterpolate2(" ", ctx_r12.selectedYear - 6, " - ", ctx_r12.selectedYear + 5, " ");
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
function TzDpContainerComponent_div_7_ng_template_2_Template(rf, ctx) {
|
|
120
|
-
if (rf & 1) {
|
|
121
|
-
i0.ɵɵtext(0);
|
|
122
|
-
}
|
|
123
|
-
if (rf & 2) {
|
|
124
|
-
const ctx_r14 = i0.ɵɵnextContext(2);
|
|
125
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r14.currentYearNumber, " ");
|
|
81
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.isYearSelectionFlow ? ctx_r0.selectedYear : ctx_r0.availableMonths[ctx_r0.currentMonthNumber], " ");
|
|
126
82
|
}
|
|
127
83
|
}
|
|
128
84
|
function TzDpContainerComponent_div_7_Template(rf, ctx) {
|
|
129
85
|
if (rf & 1) {
|
|
130
|
-
const
|
|
86
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
131
87
|
i0.ɵɵnamespaceSVG();
|
|
132
88
|
i0.ɵɵnamespaceHTML();
|
|
133
|
-
i0.ɵɵelementStart(0, "div",
|
|
134
|
-
i0.ɵɵlistener("click", function TzDpContainerComponent_div_7_Template_div_click_0_listener() { i0.ɵɵrestoreView(
|
|
135
|
-
i0.ɵɵ
|
|
136
|
-
i0.ɵɵtemplate(2, TzDpContainerComponent_div_7_ng_template_2_Template, 1, 1, "ng-template", null, 19, i0.ɵɵtemplateRefExtractor);
|
|
89
|
+
i0.ɵɵelementStart(0, "div", 16);
|
|
90
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_div_7_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r9.toggleYearSelector()); });
|
|
91
|
+
i0.ɵɵtext(1);
|
|
137
92
|
i0.ɵɵelementEnd();
|
|
138
93
|
}
|
|
139
94
|
if (rf & 2) {
|
|
140
|
-
const _r13 = i0.ɵɵreference(3);
|
|
141
95
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
142
96
|
i0.ɵɵadvance(1);
|
|
143
|
-
i0.ɵɵ
|
|
97
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.isSelectingYear ? ctx_r1.yearRange : ctx_r1.currentYearNumber, " ");
|
|
144
98
|
}
|
|
145
99
|
}
|
|
146
100
|
const _c0 = function (a0, a1) { return { "disable-month": a0, "select-month": a1 }; };
|
|
147
101
|
function TzDpContainerComponent_div_12_div_2_Template(rf, ctx) {
|
|
148
102
|
if (rf & 1) {
|
|
149
|
-
const
|
|
150
|
-
i0.ɵɵelementStart(0, "div",
|
|
151
|
-
i0.ɵɵlistener("click", function TzDpContainerComponent_div_12_div_2_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(
|
|
103
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
104
|
+
i0.ɵɵelementStart(0, "div", 20);
|
|
105
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_div_12_div_2_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r15); const i_r13 = restoredCtx.index; const month_r12 = restoredCtx.$implicit; const ctx_r14 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(!ctx_r14.disabledMonths[i_r13] && ctx_r14.selectMonth(month_r12)); });
|
|
152
106
|
i0.ɵɵtext(1);
|
|
153
107
|
i0.ɵɵelementEnd();
|
|
154
108
|
}
|
|
155
109
|
if (rf & 2) {
|
|
156
|
-
const
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(2, _c0,
|
|
110
|
+
const month_r12 = ctx.$implicit;
|
|
111
|
+
const i_r13 = ctx.index;
|
|
112
|
+
const ctx_r11 = i0.ɵɵnextContext(2);
|
|
113
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(2, _c0, ctx_r11.disabledMonths[i_r13], !ctx_r11.disabledMonths[ctx_r11.currentMonthNumber] && month_r12 === ctx_r11.availableMonths[ctx_r11.currentMonthNumber]));
|
|
160
114
|
i0.ɵɵadvance(1);
|
|
161
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
115
|
+
i0.ɵɵtextInterpolate1(" ", month_r12, " ");
|
|
162
116
|
}
|
|
163
117
|
}
|
|
164
118
|
function TzDpContainerComponent_div_12_Template(rf, ctx) {
|
|
165
119
|
if (rf & 1) {
|
|
166
|
-
i0.ɵɵelementStart(0, "div",
|
|
167
|
-
i0.ɵɵtemplate(2, TzDpContainerComponent_div_12_div_2_Template, 2, 5, "div",
|
|
120
|
+
i0.ɵɵelementStart(0, "div", 17)(1, "div", 18);
|
|
121
|
+
i0.ɵɵtemplate(2, TzDpContainerComponent_div_12_div_2_Template, 2, 5, "div", 19);
|
|
168
122
|
i0.ɵɵelementEnd()();
|
|
169
123
|
}
|
|
170
124
|
if (rf & 2) {
|
|
@@ -176,25 +130,25 @@ function TzDpContainerComponent_div_12_Template(rf, ctx) {
|
|
|
176
130
|
const _c1 = function (a0, a1) { return { "disable-year": a0, "select-year": a1 }; };
|
|
177
131
|
function TzDpContainerComponent_div_13_div_2_Template(rf, ctx) {
|
|
178
132
|
if (rf & 1) {
|
|
179
|
-
const
|
|
180
|
-
i0.ɵɵelementStart(0, "div",
|
|
181
|
-
i0.ɵɵlistener("click", function TzDpContainerComponent_div_13_div_2_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(
|
|
133
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
134
|
+
i0.ɵɵelementStart(0, "div", 23);
|
|
135
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_div_13_div_2_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r20); const i_r18 = restoredCtx.index; const year_r17 = restoredCtx.$implicit; const ctx_r19 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(!ctx_r19.disabledYears[i_r18] && ctx_r19.selectYear(year_r17)); });
|
|
182
136
|
i0.ɵɵtext(1);
|
|
183
137
|
i0.ɵɵelementEnd();
|
|
184
138
|
}
|
|
185
139
|
if (rf & 2) {
|
|
186
|
-
const
|
|
187
|
-
const
|
|
188
|
-
const
|
|
189
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(2, _c1,
|
|
140
|
+
const year_r17 = ctx.$implicit;
|
|
141
|
+
const i_r18 = ctx.index;
|
|
142
|
+
const ctx_r16 = i0.ɵɵnextContext(2);
|
|
143
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(2, _c1, ctx_r16.disabledYears[i_r18], year_r17 === ctx_r16.currentYearNumber));
|
|
190
144
|
i0.ɵɵadvance(1);
|
|
191
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
145
|
+
i0.ɵɵtextInterpolate1(" ", year_r17, " ");
|
|
192
146
|
}
|
|
193
147
|
}
|
|
194
148
|
function TzDpContainerComponent_div_13_Template(rf, ctx) {
|
|
195
149
|
if (rf & 1) {
|
|
196
|
-
i0.ɵɵelementStart(0, "div",
|
|
197
|
-
i0.ɵɵtemplate(2, TzDpContainerComponent_div_13_div_2_Template, 2, 5, "div",
|
|
150
|
+
i0.ɵɵelementStart(0, "div", 21)(1, "div", 18);
|
|
151
|
+
i0.ɵɵtemplate(2, TzDpContainerComponent_div_13_div_2_Template, 2, 5, "div", 22);
|
|
198
152
|
i0.ɵɵelementEnd()();
|
|
199
153
|
}
|
|
200
154
|
if (rf & 2) {
|
|
@@ -206,22 +160,22 @@ function TzDpContainerComponent_div_13_Template(rf, ctx) {
|
|
|
206
160
|
const _c2 = function (a0) { return { "current-day": a0 }; };
|
|
207
161
|
function TzDpContainerComponent_div_14_div_1_Template(rf, ctx) {
|
|
208
162
|
if (rf & 1) {
|
|
209
|
-
i0.ɵɵelementStart(0, "div",
|
|
163
|
+
i0.ɵɵelementStart(0, "div", 26)(1, "span", 27);
|
|
210
164
|
i0.ɵɵtext(2);
|
|
211
165
|
i0.ɵɵelementEnd()();
|
|
212
166
|
}
|
|
213
167
|
if (rf & 2) {
|
|
214
|
-
const
|
|
168
|
+
const weekDay_r22 = ctx.$implicit;
|
|
215
169
|
i0.ɵɵadvance(1);
|
|
216
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c2,
|
|
170
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c2, weekDay_r22.isCurrentDay));
|
|
217
171
|
i0.ɵɵadvance(1);
|
|
218
|
-
i0.ɵɵtextInterpolate(
|
|
172
|
+
i0.ɵɵtextInterpolate(weekDay_r22.label);
|
|
219
173
|
}
|
|
220
174
|
}
|
|
221
175
|
function TzDpContainerComponent_div_14_Template(rf, ctx) {
|
|
222
176
|
if (rf & 1) {
|
|
223
|
-
i0.ɵɵelementStart(0, "div",
|
|
224
|
-
i0.ɵɵtemplate(1, TzDpContainerComponent_div_14_div_1_Template, 3, 4, "div",
|
|
177
|
+
i0.ɵɵelementStart(0, "div", 24);
|
|
178
|
+
i0.ɵɵtemplate(1, TzDpContainerComponent_div_14_div_1_Template, 3, 4, "div", 25);
|
|
225
179
|
i0.ɵɵelementEnd();
|
|
226
180
|
}
|
|
227
181
|
if (rf & 2) {
|
|
@@ -233,40 +187,40 @@ function TzDpContainerComponent_div_14_Template(rf, ctx) {
|
|
|
233
187
|
const _c3 = function (a0, a1, a2) { return { "current-day": a0, "selected-day": a1, "disabled-day": a2 }; };
|
|
234
188
|
function TzDpContainerComponent_div_15_div_1_span_1_Template(rf, ctx) {
|
|
235
189
|
if (rf & 1) {
|
|
236
|
-
i0.ɵɵelementStart(0, "span",
|
|
190
|
+
i0.ɵɵelementStart(0, "span", 32);
|
|
237
191
|
i0.ɵɵtext(1);
|
|
238
192
|
i0.ɵɵelementEnd();
|
|
239
193
|
}
|
|
240
194
|
if (rf & 2) {
|
|
241
|
-
const
|
|
242
|
-
const
|
|
243
|
-
i0.ɵɵproperty("tabindex",
|
|
244
|
-
i0.ɵɵattribute("aria-label",
|
|
195
|
+
const day_r24 = i0.ɵɵnextContext().$implicit;
|
|
196
|
+
const ctx_r25 = i0.ɵɵnextContext(2);
|
|
197
|
+
i0.ɵɵproperty("tabindex", day_r24.isDisabledDay ? -1 : 0)("ngClass", i0.ɵɵpureFunction3(4, _c3, day_r24.isCurrentDay, !ctx_r25.localSelectedDate ? day_r24.isSelectedDay : day_r24 === ctx_r25.localSelectedDate, day_r24.isDisabledDay));
|
|
198
|
+
i0.ɵɵattribute("aria-label", ctx_r25.retractDayMonth(day_r24.date, ctx_r25.currentMonth, ctx_r25.currentYearNumber));
|
|
245
199
|
i0.ɵɵadvance(1);
|
|
246
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
200
|
+
i0.ɵɵtextInterpolate1(" ", day_r24.date, " ");
|
|
247
201
|
}
|
|
248
202
|
}
|
|
249
203
|
const _c4 = function (a0, a1, a2) { return { "selected-day": a0, "disabled-day": a1, "is-valid-date": a2 }; };
|
|
250
204
|
function TzDpContainerComponent_div_15_div_1_Template(rf, ctx) {
|
|
251
205
|
if (rf & 1) {
|
|
252
|
-
const
|
|
253
|
-
i0.ɵɵelementStart(0, "div",
|
|
254
|
-
i0.ɵɵlistener("click", function TzDpContainerComponent_div_15_div_1_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(
|
|
255
|
-
i0.ɵɵtemplate(1, TzDpContainerComponent_div_15_div_1_span_1_Template, 2, 8, "span",
|
|
206
|
+
const _r28 = i0.ɵɵgetCurrentView();
|
|
207
|
+
i0.ɵɵelementStart(0, "div", 30);
|
|
208
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_div_15_div_1_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r28); const day_r24 = restoredCtx.$implicit; const ctx_r27 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r27.selectDay(day_r24)); })("keyup.enter", function TzDpContainerComponent_div_15_div_1_Template_div_keyup_enter_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r28); const day_r24 = restoredCtx.$implicit; const ctx_r29 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r29.selectDay(day_r24)); });
|
|
209
|
+
i0.ɵɵtemplate(1, TzDpContainerComponent_div_15_div_1_span_1_Template, 2, 8, "span", 31);
|
|
256
210
|
i0.ɵɵelementEnd();
|
|
257
211
|
}
|
|
258
212
|
if (rf & 2) {
|
|
259
|
-
const
|
|
260
|
-
const
|
|
261
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(2, _c4, !
|
|
213
|
+
const day_r24 = ctx.$implicit;
|
|
214
|
+
const ctx_r23 = i0.ɵɵnextContext(2);
|
|
215
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(2, _c4, !ctx_r23.localSelectedDate ? day_r24.isSelectedDay : day_r24 === ctx_r23.localSelectedDate, day_r24.isDisabledDay, day_r24.date > 0 && !day_r24.isSelectedDay));
|
|
262
216
|
i0.ɵɵadvance(1);
|
|
263
|
-
i0.ɵɵproperty("ngIf",
|
|
217
|
+
i0.ɵɵproperty("ngIf", day_r24.date > 0);
|
|
264
218
|
}
|
|
265
219
|
}
|
|
266
220
|
function TzDpContainerComponent_div_15_Template(rf, ctx) {
|
|
267
221
|
if (rf & 1) {
|
|
268
|
-
i0.ɵɵelementStart(0, "div",
|
|
269
|
-
i0.ɵɵtemplate(1, TzDpContainerComponent_div_15_div_1_Template, 2, 6, "div",
|
|
222
|
+
i0.ɵɵelementStart(0, "div", 28);
|
|
223
|
+
i0.ɵɵtemplate(1, TzDpContainerComponent_div_15_div_1_Template, 2, 6, "div", 29);
|
|
270
224
|
i0.ɵɵelementEnd();
|
|
271
225
|
}
|
|
272
226
|
if (rf & 2) {
|
|
@@ -277,13 +231,13 @@ function TzDpContainerComponent_div_15_Template(rf, ctx) {
|
|
|
277
231
|
}
|
|
278
232
|
function TzDpContainerComponent_div_16_Template(rf, ctx) {
|
|
279
233
|
if (rf & 1) {
|
|
280
|
-
const
|
|
281
|
-
i0.ɵɵelementStart(0, "div",
|
|
282
|
-
i0.ɵɵlistener("click", function TzDpContainerComponent_div_16_Template_button_click_1_listener() { i0.ɵɵrestoreView(
|
|
234
|
+
const _r31 = i0.ɵɵgetCurrentView();
|
|
235
|
+
i0.ɵɵelementStart(0, "div", 33)(1, "button", 34);
|
|
236
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_div_16_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r31); const ctx_r30 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r30.cancelDatePicker()); });
|
|
283
237
|
i0.ɵɵtext(2, "Cancel");
|
|
284
238
|
i0.ɵɵelementEnd();
|
|
285
|
-
i0.ɵɵelementStart(3, "button",
|
|
286
|
-
i0.ɵɵlistener("click", function TzDpContainerComponent_div_16_Template_button_click_3_listener() { i0.ɵɵrestoreView(
|
|
239
|
+
i0.ɵɵelementStart(3, "button", 35);
|
|
240
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_div_16_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r31); const ctx_r32 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r32.applyDate()); });
|
|
287
241
|
i0.ɵɵtext(4, "Apply");
|
|
288
242
|
i0.ɵɵelementEnd()();
|
|
289
243
|
}
|
|
@@ -375,32 +329,28 @@ class TzDpContainerComponent {
|
|
|
375
329
|
(maxDate.isValid() && yearDate.isAfter(maxDate, 'year'));
|
|
376
330
|
});
|
|
377
331
|
if (this.isSelectingYear) {
|
|
378
|
-
this.isPreviousMonthDisabled = minDate.isValid() && (this.selectedYear - 6) <= minDate.year();
|
|
379
|
-
this.isNextMonthDisabled = maxDate.isValid() && (this.selectedYear + 5) >= maxDate.year();
|
|
332
|
+
this.isPreviousMonthDisabled = minDate.isValid() && ((this.selectedYear - 6) <= minDate.year());
|
|
333
|
+
this.isNextMonthDisabled = maxDate.isValid() && ((this.selectedYear + 5) >= maxDate.year());
|
|
380
334
|
}
|
|
381
335
|
}
|
|
336
|
+
get yearRange() {
|
|
337
|
+
return `${this.selectedYear - 6} - ${this.selectedYear + 5}`;
|
|
338
|
+
}
|
|
382
339
|
navigateView(direction) {
|
|
340
|
+
if ((direction === 'NEXT' && (this.isNextMonthDisabled || this.isSelectingMonth)) ||
|
|
341
|
+
(direction === 'PREVIOUS' && (this.isPreviousMonthDisabled || this.isSelectingMonth))) {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
383
344
|
if (this.isSelectingYear) {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
this.availableYears = Array.from({ length: 12 }, (_, index) => this.selectedYear - 6 + index);
|
|
387
|
-
}
|
|
388
|
-
else if (direction === "NEXT") {
|
|
389
|
-
this.selectedYear += 12;
|
|
390
|
-
this.availableYears = Array.from({ length: 12 }, (_, index) => this.selectedYear - 6 + index);
|
|
391
|
-
}
|
|
345
|
+
this.selectedYear += direction === "NEXT" ? 12 : -12;
|
|
346
|
+
this.availableYears = Array.from({ length: 12 }, (_, index) => this.selectedYear - 6 + index);
|
|
392
347
|
}
|
|
393
348
|
else {
|
|
394
349
|
let thisMonth = parseZone().year(this.currentYearNumber).month(this.currentMonthNumber);
|
|
395
|
-
|
|
396
|
-
thisMonth = thisMonth.add(1, "month");
|
|
397
|
-
}
|
|
398
|
-
else if (direction === "PREVIOUS") {
|
|
399
|
-
thisMonth = thisMonth.subtract(1, "month");
|
|
400
|
-
}
|
|
350
|
+
thisMonth = direction === "NEXT" ? thisMonth.add(1, "month") : thisMonth.subtract(1, "month");
|
|
401
351
|
this.currentMonthNumber = thisMonth.month();
|
|
402
352
|
this.currentMonth = getMonth(this.currentMonthNumber);
|
|
403
|
-
this.currentYearNumber = thisMonth.year();
|
|
353
|
+
this.selectedYear = this.currentYearNumber = thisMonth.year();
|
|
404
354
|
this.currentMonthDates = this.generateDates(this.currentMonthNumber, this.currentYearNumber);
|
|
405
355
|
}
|
|
406
356
|
this.calculateMinMaxDays();
|
|
@@ -520,21 +470,21 @@ TzDpContainerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TzDp
|
|
|
520
470
|
if (rf & 1) {
|
|
521
471
|
i0.ɵɵlistener("keydown.esc", function TzDpContainerComponent_keydown_esc_HostBindingHandler() { return ctx.closeOnEsc(); });
|
|
522
472
|
}
|
|
523
|
-
}, decls: 17, vars: 15, 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"], ["class", "month-header", 3, "click", 4, "ngIf"], ["class", "year-header", 3, "click", 4, "ngIf"], ["tabindex", "0", "aria-label", "Next Month", 1, "datepicker-container__arrow__icon", 3, "ngClass", "click", "keyup.enter"], [1, "datepicker-container__body"], ["class", "month-selector", 4, "ngIf"], ["class", "year-selector", 4, "ngIf"], ["class", "datepicker-container__weekdays", 4, "ngIf"], ["class", "datepicker-container__days", 4, "ngIf"], ["class", "datepicker-container__footer", 4, "ngIf"], [1, "month-header", 3, "click"], [
|
|
473
|
+
}, decls: 17, vars: 15, 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"], ["class", "month-header", 3, "click", 4, "ngIf"], ["class", "year-header", 3, "click", 4, "ngIf"], ["tabindex", "0", "aria-label", "Next Month", 1, "datepicker-container__arrow__icon", 3, "ngClass", "click", "keyup.enter"], [1, "datepicker-container__body"], ["class", "month-selector", 4, "ngIf"], ["class", "year-selector", 4, "ngIf"], ["class", "datepicker-container__weekdays", 4, "ngIf"], ["class", "datepicker-container__days", 4, "ngIf"], ["class", "datepicker-container__footer", 4, "ngIf"], [1, "month-header", 3, "click"], [1, "year-header", 3, "click"], [1, "month-selector"], [1, "row"], ["class", "month", 3, "ngClass", "click", 4, "ngFor", "ngForOf"], [1, "month", 3, "ngClass", "click"], [1, "year-selector"], ["class", "year", 3, "ngClass", "click", 4, "ngFor", "ngForOf"], [1, "year", 3, "ngClass", "click"], [1, "datepicker-container__weekdays"], ["class", "datepicker-container__weekday", 4, "ngFor", "ngForOf"], [1, "datepicker-container__weekday"], [3, "ngClass"], [1, "datepicker-container__days"], ["class", "datepicker-container__day", 3, "ngClass", "click", "keyup.enter", 4, "ngFor", "ngForOf"], [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) {
|
|
524
474
|
if (rf & 1) {
|
|
525
475
|
i0.ɵɵelementStart(0, "div", 0);
|
|
526
476
|
i0.ɵɵelement(1, "div", 1);
|
|
527
477
|
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3);
|
|
528
|
-
i0.ɵɵlistener("click", function TzDpContainerComponent_Template_div_click_3_listener() { return
|
|
478
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_Template_div_click_3_listener() { return ctx.navigateView("PREVIOUS"); })("keyup.enter", function TzDpContainerComponent_Template_div_keyup_enter_3_listener() { return ctx.navigateView("PREVIOUS"); });
|
|
529
479
|
i0.ɵɵnamespaceSVG();
|
|
530
480
|
i0.ɵɵelementStart(4, "svg", 4);
|
|
531
481
|
i0.ɵɵelement(5, "path", 5);
|
|
532
482
|
i0.ɵɵelementEnd()();
|
|
533
|
-
i0.ɵɵtemplate(6, TzDpContainerComponent_div_6_Template,
|
|
534
|
-
i0.ɵɵtemplate(7, TzDpContainerComponent_div_7_Template,
|
|
483
|
+
i0.ɵɵtemplate(6, TzDpContainerComponent_div_6_Template, 2, 1, "div", 6);
|
|
484
|
+
i0.ɵɵtemplate(7, TzDpContainerComponent_div_7_Template, 2, 1, "div", 7);
|
|
535
485
|
i0.ɵɵnamespaceHTML();
|
|
536
486
|
i0.ɵɵelementStart(8, "div", 8);
|
|
537
|
-
i0.ɵɵlistener("click", function TzDpContainerComponent_Template_div_click_8_listener() { return
|
|
487
|
+
i0.ɵɵlistener("click", function TzDpContainerComponent_Template_div_click_8_listener() { return ctx.navigateView("NEXT"); })("keyup.enter", function TzDpContainerComponent_Template_div_keyup_enter_8_listener() { return ctx.navigateView("NEXT"); });
|
|
538
488
|
i0.ɵɵnamespaceSVG();
|
|
539
489
|
i0.ɵɵelementStart(9, "svg", 4);
|
|
540
490
|
i0.ɵɵelement(10, "path", 5);
|
|
@@ -560,9 +510,9 @@ TzDpContainerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TzDp
|
|
|
560
510
|
i0.ɵɵadvance(1);
|
|
561
511
|
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c5, ctx.isNextMonthDisabled || ctx.isSelectingMonth));
|
|
562
512
|
i0.ɵɵadvance(4);
|
|
563
|
-
i0.ɵɵproperty("ngIf", ctx.isSelectingMonth);
|
|
513
|
+
i0.ɵɵproperty("ngIf", ctx.isSelectingMonth && !ctx.isSelectingYear);
|
|
564
514
|
i0.ɵɵadvance(1);
|
|
565
|
-
i0.ɵɵproperty("ngIf", ctx.isSelectingYear);
|
|
515
|
+
i0.ɵɵproperty("ngIf", ctx.isSelectingYear && !ctx.isSelectingMonth);
|
|
566
516
|
i0.ɵɵadvance(1);
|
|
567
517
|
i0.ɵɵproperty("ngIf", !ctx.isSelectingMonth && !ctx.isSelectingYear);
|
|
568
518
|
i0.ɵɵadvance(1);
|
|
@@ -574,7 +524,7 @@ TzDpContainerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TzDp
|
|
|
574
524
|
(function () {
|
|
575
525
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TzDpContainerComponent, [{
|
|
576
526
|
type: Component,
|
|
577
|
-
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 && !isSelectingMonth && navigateView('PREVIOUS')\"\n tabindex=\"0\"\n aria-label=\"Previous Month\"\n (keyup.enter)=\"!isPreviousMonthDisabled && !isSelectingMonth && navigateView('PREVIOUS')\"\n [ngClass]=\"{\n 'disabled-month': isPreviousMonthDisabled || isSelectingMonth\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\n <div *ngIf=\"!isSelectingYear\" (click)=\"toggleMonthSelector()\" class=\"month-header\">\n <ng-container *ngIf=\"isYearSelectionFlow; else normalFlow\">\n {{selectedYear}}\n </ng-container>\n <ng-template #normalFlow>\n {{ availableMonths[currentMonthNumber] }}\n </ng-template>\n </div>\n <div *ngIf=\"!isSelectingMonth\" (click)=\"toggleYearSelector()\" class=\"year-header\">\n <ng-container *ngIf=\"isSelectingYear; else singleYear\">\n {{ selectedYear - 6 }} - {{ selectedYear + 5 }}\n </ng-container>\n <ng-template #singleYear>\n {{ currentYearNumber }}\n </ng-template>\n </div>\n\n\n <div\n class=\"datepicker-container__arrow__icon\"\n (click)=\"!isNextMonthDisabled && !isSelectingMonth && navigateView('NEXT')\"\n tabindex=\"0\"\n aria-label=\"Next Month\"\n (keyup.enter)=\"!isNextMonthDisabled && !isSelectingMonth && navigateView('NEXT')\"\n [ngClass]=\"{\n 'disabled-month': isNextMonthDisabled || isSelectingMonth\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\n <div *ngIf=\"isSelectingMonth\" class=\"month-selector\">\n <div class=\"row\">\n <div *ngFor=\"let month of availableMonths; let i = index\" \n class=\"month\" \n (click)=\"!disabledMonths[i] && selectMonth(month)\" \n [ngClass]=\"{\n 'disable-month': disabledMonths[i],\n 'select-month': !disabledMonths[currentMonthNumber] && month === availableMonths[currentMonthNumber]\n }\">\n {{ month }}\n </div>\n </div>\n </div>\n \n <div *ngIf=\"isSelectingYear\" class=\"year-selector\">\n <div class=\"row\">\n <div *ngFor=\"let year of availableYears; let i = index\" \n class=\"year\" \n (click)=\"!disabledYears[i] && selectYear(year)\" \n [ngClass]=\"{\n 'disable-year': disabledYears[i],\n 'select-year': year === currentYearNumber\n }\">\n {{ year }}\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!isSelectingMonth && !isSelectingYear\" 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 *ngIf=\"!isSelectingMonth && !isSelectingYear\" 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.date)\">Apply</button>\n </div>\n</div>\n", styles: [".h1{font-size:40px;font-weight:400;letter-spacing:0px;line-height:48px}.h2{font-size:32px;font-weight:400;letter-spacing:0px;line-height:40px}.h3{font-size:28px;font-weight:400;letter-spacing:0px;line-height:36px}.h4{font-size:24px;font-weight:400;letter-spacing:0px;line-height:32px}.h5-b{font-size:20px;font-weight:700;letter-spacing:.25px;line-height:28px}.h5{font-size:20px;font-weight:400;letter-spacing:.15px;line-height:28px}.h6-b{font-size:16px;font-weight:700;letter-spacing:0px;line-height:24px}.h6{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.p{font-size:16px;font-weight:400;letter-spacing:0px;line-height:180%}.h7-b{font-size:14px;font-weight:700;letter-spacing:.25px;line-height:20px}.h7,.datepicker-container .datepicker-container__body .month,.datepicker-container .datepicker-container__body .year{font-size:14px;font-weight:400;letter-spacing:.2px;line-height:20px}.h8-b{font-size:12px;font-weight:700;letter-spacing:.25px;line-height:18px}.h8{font-size:12px;font-weight:400;letter-spacing:.2px;line-height:18px}.h9{font-size:10px;font-weight:400;letter-spacing:0px;line-height:15px}.btn-lg-b{font-size:16px;font-weight:700;letter-spacing:.5px;line-height:24px}.btn-lg{font-size:16px;font-weight:400;letter-spacing:.2px;line-height:24px}.btn-sm{font-size:14px;font-weight:400;letter-spacing:.25px;line-height:20px}.btn-link{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.display-1{font-size:48px;font-weight:400;letter-spacing:0px;line-height:56px}.display-2{font-size:14px;font-weight:400;letter-spacing:.5px;line-height:20px}:root{--pmry-200: #99BAF7;--pmry-100: #CBDDFB;--pmry-500: #0937B2;--pmry-400: #3C68D0;--pmry-600: #062A99;--pmry-700: #041F80;--pmry-300: #638FE7;--pmry-800: #021567;--pmry-900: #010F55;--sec-d-purple: #40447F;--sec-maroon: #6B034E;--sec-mud-red: #B23600;--sec-orange: #ED711C;--sec-purple: #815FD5;--sec-teal: #10ADAE;--sec-yellow: #D4900C;--sec-green: #547F40;--sec-bright-green: #27D22E;--sec-dark-teal: #035F6B;--sec-chocolate: #7C2F33;--sec-rube-pink: #C13D6D;--sec-cerulean: #0087B2;--sem-error: #B00020;--sem-info: #0091FF;--sem-warning: #FF9D00;--sem-success: #38AF49;--grey-bg-1: #FAFAFA;--grey-bg: #F5F5F5;--grey-seperators: #E0E0E0;--grey-disabled: #C8CDD3;--grey-hover: #F5F7FC;--grey-pressed: #E6EBF7;--grey-row: #F5F7FC;--dec-light-yellow: #F4E7C3;--dec-light-purple: #DACFF9;--dec-light-green: #E4F5E9;--dec-light-green2: #F1FFF3;--dec-light-pink: #FAE1EA;--dec-: #F4CBC1;--dec-lt-orange: #FAEFED;--dec-light-blue: #CFECF9;--dec-row-selection: #F1FDF8;--dec-row-selection2: #F2FBFF;--dec-row-lines: #D3E1E9;--text-white: #FFFFFF;--text-disabled: #929DAB;--text-muted: #6A737D;--text-black: #181F33;--MR-solid-blue2:#C8D5F6;--MR-solid-purple:#C9C3FB;--MR-solid-orange:#EEAC9F;--MR-solid-green:#ACDADA;--MR-solid-brown:#E8C8AF;--MR-solid-yellow:#FFEFC7;--MR-solid-blue:#BBE6FF;--MR-solid-pink:#FFC6F2;--tr-hover:#F0F3FA;--tr-pressed:#DAE1F3}.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 .month-header,.datepicker-container .datepicker-container__header .year-header{padding:8px;border-radius:10px}.datepicker-container .datepicker-container__header .month-header:hover,.datepicker-container .datepicker-container__header .year-header:hover{cursor:pointer;background-color:#e6ebf7}.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 .row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:10px}.datepicker-container .datepicker-container__body .month,.datepicker-container .datepicker-container__body .year{padding:10px 6px;cursor:pointer;border-radius:5px;text-align:center;background-color:#fff}.datepicker-container .datepicker-container__body .month:hover,.datepicker-container .datepicker-container__body .year:hover{background-color:#cbddfb}.datepicker-container .datepicker-container__body .disable-month,.datepicker-container .datepicker-container__body .disable-year{cursor:default;color:#c8cdd3}.datepicker-container .datepicker-container__body .disable-month:hover,.datepicker-container .datepicker-container__body .disable-year:hover{background-color:transparent}.datepicker-container .datepicker-container__body .select-month,.datepicker-container .datepicker-container__body .select-year{background-color:#0937b2;color:#fff}.datepicker-container .datepicker-container__body .select-month:hover,.datepicker-container .datepicker-container__body .select-year:hover{cursor:pointer;background-color:#cbddfb}.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"] }]
|
|
527
|
+
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)=\"navigateView('PREVIOUS')\"\n tabindex=\"0\"\n aria-label=\"Previous Month\"\n (keyup.enter)=\"navigateView('PREVIOUS')\"\n [ngClass]=\"{\n 'disabled-month': isPreviousMonthDisabled || isSelectingMonth\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\n <div *ngIf=\"!isSelectingYear\" (click)=\"toggleMonthSelector()\" class=\"month-header\">\n {{ isYearSelectionFlow ? selectedYear : availableMonths[currentMonthNumber] }}\n </div>\n <div *ngIf=\"!isSelectingMonth\" (click)=\"toggleYearSelector()\" class=\"year-header\">\n {{ isSelectingYear ? yearRange : currentYearNumber }}\n </div>\n\n\n <div\n class=\"datepicker-container__arrow__icon\"\n (click)=\"navigateView('NEXT')\"\n tabindex=\"0\"\n aria-label=\"Next Month\"\n (keyup.enter)=\"navigateView('NEXT')\"\n [ngClass]=\"{\n 'disabled-month': isNextMonthDisabled || isSelectingMonth\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\n <div *ngIf=\"isSelectingMonth && !isSelectingYear\" class=\"month-selector\">\n <div class=\"row\">\n <div *ngFor=\"let month of availableMonths; let i = index\" \n class=\"month\" \n (click)=\"!disabledMonths[i] && selectMonth(month)\" \n [ngClass]=\"{\n 'disable-month': disabledMonths[i],\n 'select-month': !disabledMonths[currentMonthNumber] && month === availableMonths[currentMonthNumber]\n }\">\n {{ month }}\n </div>\n </div>\n </div>\n \n <div *ngIf=\"isSelectingYear && !isSelectingMonth\" class=\"year-selector\">\n <div class=\"row\">\n <div *ngFor=\"let year of availableYears; let i = index\" \n class=\"year\" \n (click)=\"!disabledYears[i] && selectYear(year)\" \n [ngClass]=\"{\n 'disable-year': disabledYears[i],\n 'select-year': year === currentYearNumber\n }\">\n {{ year }}\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!isSelectingMonth && !isSelectingYear\" 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 *ngIf=\"!isSelectingMonth && !isSelectingYear\" 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.date)\">Apply</button>\n </div>\n</div>\n", styles: [".h1{font-size:40px;font-weight:400;letter-spacing:0px;line-height:48px}.h2{font-size:32px;font-weight:400;letter-spacing:0px;line-height:40px}.h3{font-size:28px;font-weight:400;letter-spacing:0px;line-height:36px}.h4{font-size:24px;font-weight:400;letter-spacing:0px;line-height:32px}.h5-b{font-size:20px;font-weight:700;letter-spacing:.25px;line-height:28px}.h5{font-size:20px;font-weight:400;letter-spacing:.15px;line-height:28px}.h6-b{font-size:16px;font-weight:700;letter-spacing:0px;line-height:24px}.h6{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.p{font-size:16px;font-weight:400;letter-spacing:0px;line-height:180%}.h7-b{font-size:14px;font-weight:700;letter-spacing:.25px;line-height:20px}.h7,.datepicker-container .datepicker-container__body .month,.datepicker-container .datepicker-container__body .year{font-size:14px;font-weight:400;letter-spacing:.2px;line-height:20px}.h8-b{font-size:12px;font-weight:700;letter-spacing:.25px;line-height:18px}.h8{font-size:12px;font-weight:400;letter-spacing:.2px;line-height:18px}.h9{font-size:10px;font-weight:400;letter-spacing:0px;line-height:15px}.btn-lg-b{font-size:16px;font-weight:700;letter-spacing:.5px;line-height:24px}.btn-lg{font-size:16px;font-weight:400;letter-spacing:.2px;line-height:24px}.btn-sm{font-size:14px;font-weight:400;letter-spacing:.25px;line-height:20px}.btn-link{font-size:16px;font-weight:400;letter-spacing:0px;line-height:24px}.display-1{font-size:48px;font-weight:400;letter-spacing:0px;line-height:56px}.display-2{font-size:14px;font-weight:400;letter-spacing:.5px;line-height:20px}:root{--pmry-200: #99BAF7;--pmry-100: #CBDDFB;--pmry-500: #0937B2;--pmry-400: #3C68D0;--pmry-600: #062A99;--pmry-700: #041F80;--pmry-300: #638FE7;--pmry-800: #021567;--pmry-900: #010F55;--sec-d-purple: #40447F;--sec-maroon: #6B034E;--sec-mud-red: #B23600;--sec-orange: #ED711C;--sec-purple: #815FD5;--sec-teal: #10ADAE;--sec-yellow: #D4900C;--sec-green: #547F40;--sec-bright-green: #27D22E;--sec-dark-teal: #035F6B;--sec-chocolate: #7C2F33;--sec-rube-pink: #C13D6D;--sec-cerulean: #0087B2;--sem-error: #B00020;--sem-info: #0091FF;--sem-warning: #FF9D00;--sem-success: #38AF49;--grey-bg-1: #FAFAFA;--grey-bg: #F5F5F5;--grey-seperators: #E0E0E0;--grey-disabled: #C8CDD3;--grey-hover: #F5F7FC;--grey-pressed: #E6EBF7;--grey-row: #F5F7FC;--dec-light-yellow: #F4E7C3;--dec-light-purple: #DACFF9;--dec-light-green: #E4F5E9;--dec-light-green2: #F1FFF3;--dec-light-pink: #FAE1EA;--dec-: #F4CBC1;--dec-lt-orange: #FAEFED;--dec-light-blue: #CFECF9;--dec-row-selection: #F1FDF8;--dec-row-selection2: #F2FBFF;--dec-row-lines: #D3E1E9;--text-white: #FFFFFF;--text-disabled: #929DAB;--text-muted: #6A737D;--text-black: #181F33;--MR-solid-blue2:#C8D5F6;--MR-solid-purple:#C9C3FB;--MR-solid-orange:#EEAC9F;--MR-solid-green:#ACDADA;--MR-solid-brown:#E8C8AF;--MR-solid-yellow:#FFEFC7;--MR-solid-blue:#BBE6FF;--MR-solid-pink:#FFC6F2;--tr-hover:#F0F3FA;--tr-pressed:#DAE1F3}.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 .month-header,.datepicker-container .datepicker-container__header .year-header{padding:8px;border-radius:10px}.datepicker-container .datepicker-container__header .month-header:hover,.datepicker-container .datepicker-container__header .year-header:hover{cursor:pointer;background-color:#e6ebf7}.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 .row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:10px}.datepicker-container .datepicker-container__body .month,.datepicker-container .datepicker-container__body .year{padding:10px 6px;cursor:pointer;border-radius:5px;text-align:center;background-color:#fff}.datepicker-container .datepicker-container__body .month:hover,.datepicker-container .datepicker-container__body .year:hover{background-color:#cbddfb}.datepicker-container .datepicker-container__body .disable-month,.datepicker-container .datepicker-container__body .disable-year{cursor:default;color:#c8cdd3}.datepicker-container .datepicker-container__body .disable-month:hover,.datepicker-container .datepicker-container__body .disable-year:hover{background-color:transparent}.datepicker-container .datepicker-container__body .select-month,.datepicker-container .datepicker-container__body .select-year{background-color:#0937b2;color:#fff}.datepicker-container .datepicker-container__body .select-month:hover,.datepicker-container .datepicker-container__body .select-year:hover{cursor:pointer;background-color:#cbddfb}.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"] }]
|
|
578
528
|
}], function () {
|
|
579
529
|
return [{ type: undefined, decorators: [{
|
|
580
530
|
type: Inject,
|