@konce-pt/angular 0.7.7 → 0.7.8
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/CHANGELOG.md +28 -0
- package/fesm2022/konce-pt-angular.mjs +593 -376
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/date-range/llms.txt +8 -1
- package/src/lib/datepicker/llms.txt +27 -3
- package/types/konce-pt-angular.d.ts +90 -15
- package/types/konce-pt-angular.d.ts.map +1 -1
|
@@ -762,6 +762,11 @@ const KPT_MESSAGES_EN = {
|
|
|
762
762
|
nextYear: 'Next year',
|
|
763
763
|
prevYears: 'Previous years',
|
|
764
764
|
nextYears: 'Next years',
|
|
765
|
+
prevDecades: 'Previous decades',
|
|
766
|
+
nextDecades: 'Next decades',
|
|
767
|
+
chooseMonth: 'Choose month',
|
|
768
|
+
chooseYear: 'Choose year',
|
|
769
|
+
chooseDecade: 'Choose decade',
|
|
765
770
|
calendar: 'Calendar',
|
|
766
771
|
month: 'Month',
|
|
767
772
|
time: 'Time',
|
|
@@ -1024,6 +1029,11 @@ const KPT_MESSAGES_PL = {
|
|
|
1024
1029
|
nextYear: 'Następny rok',
|
|
1025
1030
|
prevYears: 'Poprzednie lata',
|
|
1026
1031
|
nextYears: 'Następne lata',
|
|
1032
|
+
prevDecades: 'Poprzednie dekady',
|
|
1033
|
+
nextDecades: 'Następne dekady',
|
|
1034
|
+
chooseMonth: 'Wybierz miesiąc',
|
|
1035
|
+
chooseYear: 'Wybierz rok',
|
|
1036
|
+
chooseDecade: 'Wybierz dekadę',
|
|
1027
1037
|
calendar: 'Kalendarz',
|
|
1028
1038
|
month: 'Miesiąc',
|
|
1029
1039
|
time: 'Godzina',
|
|
@@ -3047,7 +3057,7 @@ class KptClock {
|
|
|
3047
3057
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptClock, { className: "KptClock", filePath: "lib/datepicker/clock.component.ts", lineNumber: 94 }); })();
|
|
3048
3058
|
|
|
3049
3059
|
const _forTrack0$8 = ($index, $item) => $item.iso;
|
|
3050
|
-
const _forTrack1$
|
|
3060
|
+
const _forTrack1$2 = ($index, $item) => $item.label;
|
|
3051
3061
|
function KptDatepicker_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
3052
3062
|
i0.ɵɵelementStart(0, "span", 2);
|
|
3053
3063
|
i0.ɵɵtext(1);
|
|
@@ -3076,325 +3086,284 @@ function KptDatepicker_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
3076
3086
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
3077
3087
|
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("common.clear"));
|
|
3078
3088
|
} }
|
|
3079
|
-
function
|
|
3080
|
-
const
|
|
3081
|
-
i0.ɵɵelementStart(0, "
|
|
3082
|
-
i0.ɵɵ
|
|
3089
|
+
function KptDatepicker_ng_template_7_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
3090
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
3091
|
+
i0.ɵɵelementStart(0, "div", 12)(1, "button", 14);
|
|
3092
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_1_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.backToCalendar()); });
|
|
3093
|
+
i0.ɵɵelement(2, "kpt-icon", 15);
|
|
3083
3094
|
i0.ɵɵelementEnd();
|
|
3084
|
-
i0.ɵɵelementStart(
|
|
3085
|
-
i0.ɵɵ
|
|
3086
|
-
i0.ɵɵtext(3);
|
|
3095
|
+
i0.ɵɵelementStart(3, "span", 16);
|
|
3096
|
+
i0.ɵɵtext(4);
|
|
3087
3097
|
i0.ɵɵelementEnd()();
|
|
3088
3098
|
} if (rf & 2) {
|
|
3089
|
-
const ctx_r0 = i0.ɵɵnextContext(
|
|
3090
|
-
i0.ɵɵtwoWayProperty("value", ctx_r0.timeStr);
|
|
3091
|
-
i0.ɵɵproperty("hourFormat", ctx_r0.hourFormat())("minuteStep", ctx_r0.minuteStep());
|
|
3092
|
-
i0.ɵɵadvance(3);
|
|
3093
|
-
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("common.done"));
|
|
3094
|
-
} }
|
|
3095
|
-
function KptDatepicker_ng_template_7_Case_2_Conditional_0_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
3096
|
-
i0.ɵɵelementStart(0, "span", 20);
|
|
3097
|
-
i0.ɵɵtext(1);
|
|
3098
|
-
i0.ɵɵelementEnd();
|
|
3099
|
-
} if (rf & 2) {
|
|
3100
|
-
const wd_r7 = ctx.$implicit;
|
|
3099
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3101
3100
|
i0.ɵɵadvance();
|
|
3102
|
-
i0.ɵɵ
|
|
3101
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.calendar"));
|
|
3102
|
+
i0.ɵɵadvance(3);
|
|
3103
|
+
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("datepicker.time"));
|
|
3103
3104
|
} }
|
|
3104
|
-
function
|
|
3105
|
-
const
|
|
3106
|
-
i0.ɵɵ
|
|
3107
|
-
i0.ɵɵ
|
|
3108
|
-
i0.ɵɵ
|
|
3105
|
+
function KptDatepicker_ng_template_7_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
3106
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
3107
|
+
i0.ɵɵconditionalCreate(0, KptDatepicker_ng_template_7_Conditional_1_Conditional_0_Template, 5, 2, "div", 12);
|
|
3108
|
+
i0.ɵɵelementStart(1, "kpt-clock", 13);
|
|
3109
|
+
i0.ɵɵtwoWayListener("valueChange", function KptDatepicker_ng_template_7_Conditional_1_Template_kpt_clock_valueChange_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.timeStr, $event) || (ctx_r0.timeStr = $event); return i0.ɵɵresetView($event); });
|
|
3109
3110
|
i0.ɵɵelementEnd();
|
|
3110
3111
|
} if (rf & 2) {
|
|
3111
|
-
const
|
|
3112
|
-
i0.ɵɵ
|
|
3113
|
-
i0.ɵɵproperty("disabled", cell_r9.disabled);
|
|
3114
|
-
i0.ɵɵattribute("aria-pressed", cell_r9.selected);
|
|
3112
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3113
|
+
i0.ɵɵconditional(ctx_r0.selectionMode() === "datetime" ? 0 : -1);
|
|
3115
3114
|
i0.ɵɵadvance();
|
|
3116
|
-
i0.ɵɵ
|
|
3117
|
-
|
|
3118
|
-
function KptDatepicker_ng_template_7_Case_2_Conditional_0_For_12_Template(rf, ctx) { if (rf & 1) {
|
|
3119
|
-
i0.ɵɵrepeaterCreate(0, KptDatepicker_ng_template_7_Case_2_Conditional_0_For_12_For_1_Template, 2, 9, "button", 24, _forTrack0$8);
|
|
3120
|
-
} if (rf & 2) {
|
|
3121
|
-
const week_r10 = ctx.$implicit;
|
|
3122
|
-
i0.ɵɵrepeater(week_r10);
|
|
3115
|
+
i0.ɵɵtwoWayProperty("value", ctx_r0.timeStr);
|
|
3116
|
+
i0.ɵɵproperty("hourFormat", ctx_r0.hourFormat())("minuteStep", ctx_r0.minuteStep());
|
|
3123
3117
|
} }
|
|
3124
|
-
function
|
|
3118
|
+
function KptDatepicker_ng_template_7_Conditional_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
3125
3119
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
3126
|
-
i0.ɵɵelementStart(0, "
|
|
3127
|
-
i0.ɵɵlistener("click", function
|
|
3128
|
-
i0.ɵɵelement(
|
|
3129
|
-
i0.ɵɵelementEnd();
|
|
3130
|
-
i0.ɵɵelementStart(3, "span", 17);
|
|
3131
|
-
i0.ɵɵtext(4);
|
|
3132
|
-
i0.ɵɵelementEnd();
|
|
3133
|
-
i0.ɵɵelementStart(5, "button", 15);
|
|
3134
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_2_Conditional_0_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.nextMonth()); });
|
|
3135
|
-
i0.ɵɵelement(6, "kpt-icon", 18);
|
|
3136
|
-
i0.ɵɵelementEnd()();
|
|
3137
|
-
i0.ɵɵelementStart(7, "div", 19);
|
|
3138
|
-
i0.ɵɵrepeaterCreate(8, KptDatepicker_ng_template_7_Case_2_Conditional_0_For_9_Template, 2, 1, "span", 20, i0.ɵɵrepeaterTrackByIdentity);
|
|
3139
|
-
i0.ɵɵelementEnd();
|
|
3140
|
-
i0.ɵɵelementStart(10, "div", 21);
|
|
3141
|
-
i0.ɵɵrepeaterCreate(11, KptDatepicker_ng_template_7_Case_2_Conditional_0_For_12_Template, 2, 0, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
3120
|
+
i0.ɵɵelementStart(0, "button", 22);
|
|
3121
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.pagePrev()); });
|
|
3122
|
+
i0.ɵɵelement(1, "kpt-icon", 15);
|
|
3142
3123
|
i0.ɵɵelementEnd();
|
|
3143
|
-
i0.ɵɵelementStart(13, "button", 22);
|
|
3144
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_2_Conditional_0_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.openClock()); });
|
|
3145
|
-
i0.ɵɵelement(14, "kpt-icon", 23);
|
|
3146
|
-
i0.ɵɵelementStart(15, "span");
|
|
3147
|
-
i0.ɵɵtext(16);
|
|
3148
|
-
i0.ɵɵelementEnd()();
|
|
3149
3124
|
} if (rf & 2) {
|
|
3150
3125
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3151
|
-
i0.ɵɵ
|
|
3152
|
-
i0.ɵɵattribute("aria-label", ctx_r0.
|
|
3153
|
-
i0.ɵɵadvance(3);
|
|
3154
|
-
i0.ɵɵtextInterpolate(ctx_r0.monthLabel());
|
|
3155
|
-
i0.ɵɵadvance();
|
|
3156
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.nextMonth"));
|
|
3157
|
-
i0.ɵɵadvance(3);
|
|
3158
|
-
i0.ɵɵrepeater(ctx_r0.weekdays());
|
|
3159
|
-
i0.ɵɵadvance(3);
|
|
3160
|
-
i0.ɵɵrepeater(ctx_r0.weeks());
|
|
3161
|
-
i0.ɵɵadvance(5);
|
|
3162
|
-
i0.ɵɵtextInterpolate(ctx_r0.timeBarLabel());
|
|
3126
|
+
i0.ɵɵproperty("disabled", !ctx_r0.canPageBack());
|
|
3127
|
+
i0.ɵɵattribute("aria-label", ctx_r0.navPrevLabel());
|
|
3163
3128
|
} }
|
|
3164
|
-
function
|
|
3165
|
-
const
|
|
3166
|
-
i0.ɵɵelementStart(0, "
|
|
3167
|
-
i0.ɵɵlistener("click", function
|
|
3168
|
-
i0.ɵɵ
|
|
3129
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_3_Template(rf, ctx) { if (rf & 1) {
|
|
3130
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
3131
|
+
i0.ɵɵelementStart(0, "button", 23);
|
|
3132
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.goTo("month")); });
|
|
3133
|
+
i0.ɵɵtext(1);
|
|
3169
3134
|
i0.ɵɵelementEnd();
|
|
3170
|
-
i0.ɵɵelementStart(
|
|
3171
|
-
i0.ɵɵ
|
|
3172
|
-
i0.ɵɵ
|
|
3173
|
-
i0.ɵɵelementStart(5, "kpt-clock", 11);
|
|
3174
|
-
i0.ɵɵtwoWayListener("valueChange", function KptDatepicker_ng_template_7_Case_2_Conditional_1_Template_kpt_clock_valueChange_5_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r0 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r0.timeStr, $event) || (ctx_r0.timeStr = $event); return i0.ɵɵresetView($event); });
|
|
3135
|
+
i0.ɵɵelementStart(2, "button", 23);
|
|
3136
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_3_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.goTo("year")); });
|
|
3137
|
+
i0.ɵɵtext(3);
|
|
3175
3138
|
i0.ɵɵelementEnd();
|
|
3176
3139
|
} if (rf & 2) {
|
|
3177
3140
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3141
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.chooseMonth"));
|
|
3178
3142
|
i0.ɵɵadvance();
|
|
3179
|
-
i0.ɵɵ
|
|
3180
|
-
i0.ɵɵadvance(3);
|
|
3181
|
-
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("datepicker.time"));
|
|
3143
|
+
i0.ɵɵtextInterpolate(ctx_r0.monthName());
|
|
3182
3144
|
i0.ɵɵadvance();
|
|
3183
|
-
i0.ɵɵ
|
|
3184
|
-
i0.ɵɵ
|
|
3185
|
-
|
|
3186
|
-
function KptDatepicker_ng_template_7_Case_2_Template(rf, ctx) { if (rf & 1) {
|
|
3187
|
-
const _r5 = i0.ɵɵgetCurrentView();
|
|
3188
|
-
i0.ɵɵconditionalCreate(0, KptDatepicker_ng_template_7_Case_2_Conditional_0_Template, 17, 4)(1, KptDatepicker_ng_template_7_Case_2_Conditional_1_Template, 6, 5);
|
|
3189
|
-
i0.ɵɵelementStart(2, "div", 12)(3, "kpt-button", 13);
|
|
3190
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_2_Template_kpt_button_click_3_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.commit()); });
|
|
3191
|
-
i0.ɵɵtext(4);
|
|
3192
|
-
i0.ɵɵelementEnd()();
|
|
3193
|
-
} if (rf & 2) {
|
|
3194
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3195
|
-
i0.ɵɵconditional(ctx_r0.dtView() === "calendar" ? 0 : 1);
|
|
3196
|
-
i0.ɵɵadvance(4);
|
|
3197
|
-
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("common.done"));
|
|
3145
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.chooseYear"));
|
|
3146
|
+
i0.ɵɵadvance();
|
|
3147
|
+
i0.ɵɵtextInterpolate(ctx_r0.viewYear());
|
|
3198
3148
|
} }
|
|
3199
|
-
function
|
|
3200
|
-
|
|
3201
|
-
i0.ɵɵelementStart(0, "button", 28);
|
|
3202
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_3_For_9_Template_button_click_0_listener() { const cell_r14 = i0.ɵɵrestoreView(_r13).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.selectCell(cell_r14)); });
|
|
3149
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
3150
|
+
i0.ɵɵelementStart(0, "span", 16);
|
|
3203
3151
|
i0.ɵɵtext(1);
|
|
3204
3152
|
i0.ɵɵelementEnd();
|
|
3205
3153
|
} if (rf & 2) {
|
|
3206
|
-
const
|
|
3207
|
-
i0.ɵɵclassProp("kpt-calendar__cell--selected", cell_r14.selected);
|
|
3208
|
-
i0.ɵɵproperty("disabled", cell_r14.disabled);
|
|
3209
|
-
i0.ɵɵattribute("aria-pressed", cell_r14.selected);
|
|
3154
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
3210
3155
|
i0.ɵɵadvance();
|
|
3211
|
-
i0.ɵɵtextInterpolate(
|
|
3156
|
+
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("datepicker.month"));
|
|
3212
3157
|
} }
|
|
3213
|
-
function
|
|
3214
|
-
const
|
|
3215
|
-
i0.ɵɵelementStart(0, "
|
|
3216
|
-
i0.ɵɵlistener("click", function
|
|
3217
|
-
i0.ɵɵ
|
|
3218
|
-
i0.ɵɵelementEnd();
|
|
3219
|
-
i0.ɵɵelementStart(3, "span", 17);
|
|
3220
|
-
i0.ɵɵtext(4);
|
|
3221
|
-
i0.ɵɵelementEnd();
|
|
3222
|
-
i0.ɵɵelementStart(5, "button", 15);
|
|
3223
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_3_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r12); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.nextYear()); });
|
|
3224
|
-
i0.ɵɵelement(6, "kpt-icon", 18);
|
|
3225
|
-
i0.ɵɵelementEnd()();
|
|
3226
|
-
i0.ɵɵelementStart(7, "div", 26);
|
|
3227
|
-
i0.ɵɵrepeaterCreate(8, KptDatepicker_ng_template_7_Case_3_For_9_Template, 2, 5, "button", 27, _forTrack1$1);
|
|
3158
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
3159
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
3160
|
+
i0.ɵɵelementStart(0, "button", 23);
|
|
3161
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_4_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.goTo("year")); });
|
|
3162
|
+
i0.ɵɵtext(1);
|
|
3228
3163
|
i0.ɵɵelementEnd();
|
|
3229
3164
|
} if (rf & 2) {
|
|
3230
|
-
const ctx_r0 = i0.ɵɵnextContext(
|
|
3165
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
3166
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.chooseYear"));
|
|
3231
3167
|
i0.ɵɵadvance();
|
|
3232
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.prevYear"));
|
|
3233
|
-
i0.ɵɵadvance(3);
|
|
3234
3168
|
i0.ɵɵtextInterpolate(ctx_r0.viewYear());
|
|
3235
|
-
i0.ɵɵadvance();
|
|
3236
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.nextYear"));
|
|
3237
|
-
i0.ɵɵadvance(3);
|
|
3238
|
-
i0.ɵɵrepeater(ctx_r0.monthCells());
|
|
3239
3169
|
} }
|
|
3240
|
-
function
|
|
3241
|
-
|
|
3242
|
-
i0.ɵɵelementStart(0, "button", 28);
|
|
3243
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_4_For_9_Template_button_click_0_listener() { const cell_r17 = i0.ɵɵrestoreView(_r16).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.selectCell(cell_r17)); });
|
|
3244
|
-
i0.ɵɵtext(1);
|
|
3245
|
-
i0.ɵɵelementEnd();
|
|
3170
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_4_Template(rf, ctx) { if (rf & 1) {
|
|
3171
|
+
i0.ɵɵconditionalCreate(0, KptDatepicker_ng_template_7_Conditional_2_Case_4_Conditional_0_Template, 2, 1, "span", 16)(1, KptDatepicker_ng_template_7_Conditional_2_Case_4_Conditional_1_Template, 2, 2, "button", 19);
|
|
3246
3172
|
} if (rf & 2) {
|
|
3247
|
-
const
|
|
3248
|
-
i0.ɵɵ
|
|
3249
|
-
i0.ɵɵproperty("disabled", cell_r17.disabled);
|
|
3250
|
-
i0.ɵɵattribute("aria-pressed", cell_r17.selected);
|
|
3251
|
-
i0.ɵɵadvance();
|
|
3252
|
-
i0.ɵɵtextInterpolate(cell_r17.label);
|
|
3173
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3174
|
+
i0.ɵɵconditional(ctx_r0.selectionMode() === "month" ? 0 : 1);
|
|
3253
3175
|
} }
|
|
3254
|
-
function
|
|
3255
|
-
const
|
|
3256
|
-
i0.ɵɵelementStart(0, "
|
|
3257
|
-
i0.ɵɵlistener("click", function
|
|
3258
|
-
i0.ɵɵ
|
|
3259
|
-
i0.ɵɵelementEnd();
|
|
3260
|
-
i0.ɵɵelementStart(3, "span", 17);
|
|
3261
|
-
i0.ɵɵtext(4);
|
|
3262
|
-
i0.ɵɵelementEnd();
|
|
3263
|
-
i0.ɵɵelementStart(5, "button", 15);
|
|
3264
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_4_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r15); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.nextYearPage()); });
|
|
3265
|
-
i0.ɵɵelement(6, "kpt-icon", 18);
|
|
3266
|
-
i0.ɵɵelementEnd()();
|
|
3267
|
-
i0.ɵɵelementStart(7, "div", 26);
|
|
3268
|
-
i0.ɵɵrepeaterCreate(8, KptDatepicker_ng_template_7_Case_4_For_9_Template, 2, 5, "button", 27, _forTrack1$1);
|
|
3176
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_5_Template(rf, ctx) { if (rf & 1) {
|
|
3177
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
3178
|
+
i0.ɵɵelementStart(0, "button", 23);
|
|
3179
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.goTo("decade")); });
|
|
3180
|
+
i0.ɵɵtext(1);
|
|
3269
3181
|
i0.ɵɵelementEnd();
|
|
3270
3182
|
} if (rf & 2) {
|
|
3271
|
-
const ctx_r0 = i0.ɵɵnextContext(
|
|
3183
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3184
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.chooseDecade"));
|
|
3272
3185
|
i0.ɵɵadvance();
|
|
3273
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.prevYears"));
|
|
3274
|
-
i0.ɵɵadvance(3);
|
|
3275
3186
|
i0.ɵɵtextInterpolate(ctx_r0.yearRangeLabel());
|
|
3276
|
-
i0.ɵɵadvance();
|
|
3277
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.nextYears"));
|
|
3278
|
-
i0.ɵɵadvance(3);
|
|
3279
|
-
i0.ɵɵrepeater(ctx_r0.yearCells());
|
|
3280
3187
|
} }
|
|
3281
|
-
function
|
|
3282
|
-
|
|
3283
|
-
i0.ɵɵelementStart(0, "button", 30);
|
|
3284
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_5_For_5_Template_button_click_0_listener() { const cell_r19 = i0.ɵɵrestoreView(_r18).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.selectCell(cell_r19)); });
|
|
3188
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_6_Template(rf, ctx) { if (rf & 1) {
|
|
3189
|
+
i0.ɵɵelementStart(0, "span", 16);
|
|
3285
3190
|
i0.ɵɵtext(1);
|
|
3286
3191
|
i0.ɵɵelementEnd();
|
|
3287
3192
|
} if (rf & 2) {
|
|
3288
|
-
const
|
|
3289
|
-
i0.ɵɵclassProp("kpt-calendar__cell--selected", cell_r19.selected);
|
|
3290
|
-
i0.ɵɵattribute("aria-pressed", cell_r19.selected);
|
|
3193
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3291
3194
|
i0.ɵɵadvance();
|
|
3292
|
-
i0.ɵɵtextInterpolate(
|
|
3195
|
+
i0.ɵɵtextInterpolate(ctx_r0.decadeRangeLabel());
|
|
3293
3196
|
} }
|
|
3294
|
-
function
|
|
3295
|
-
i0.ɵɵ
|
|
3296
|
-
i0.ɵɵ
|
|
3297
|
-
i0.ɵɵ
|
|
3298
|
-
i0.ɵɵ
|
|
3299
|
-
i0.ɵɵrepeaterCreate(4, KptDatepicker_ng_template_7_Case_5_For_5_Template, 2, 4, "button", 29, _forTrack1$1);
|
|
3197
|
+
function KptDatepicker_ng_template_7_Conditional_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
3198
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
3199
|
+
i0.ɵɵelementStart(0, "button", 22);
|
|
3200
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Conditional_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.pageNext()); });
|
|
3201
|
+
i0.ɵɵelement(1, "kpt-icon", 24);
|
|
3300
3202
|
i0.ɵɵelementEnd();
|
|
3301
3203
|
} if (rf & 2) {
|
|
3302
|
-
const ctx_r0 = i0.ɵɵnextContext(
|
|
3303
|
-
i0.ɵɵ
|
|
3304
|
-
i0.ɵɵ
|
|
3305
|
-
i0.ɵɵadvance(2);
|
|
3306
|
-
i0.ɵɵrepeater(ctx_r0.monthCells());
|
|
3204
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3205
|
+
i0.ɵɵproperty("disabled", !ctx_r0.canPageForward());
|
|
3206
|
+
i0.ɵɵattribute("aria-label", ctx_r0.navNextLabel());
|
|
3307
3207
|
} }
|
|
3308
|
-
function
|
|
3309
|
-
i0.ɵɵelementStart(0, "span",
|
|
3208
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_8_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3209
|
+
i0.ɵɵelementStart(0, "span", 26);
|
|
3310
3210
|
i0.ɵɵtext(1);
|
|
3311
3211
|
i0.ɵɵelementEnd();
|
|
3312
3212
|
} if (rf & 2) {
|
|
3313
|
-
const
|
|
3213
|
+
const wd_r11 = ctx.$implicit;
|
|
3314
3214
|
i0.ɵɵadvance();
|
|
3315
|
-
i0.ɵɵtextInterpolate(
|
|
3215
|
+
i0.ɵɵtextInterpolate(wd_r11);
|
|
3316
3216
|
} }
|
|
3317
|
-
function
|
|
3318
|
-
const
|
|
3319
|
-
i0.ɵɵelementStart(0, "button",
|
|
3320
|
-
i0.ɵɵlistener("click", function
|
|
3217
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
3218
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
3219
|
+
i0.ɵɵelementStart(0, "button", 29);
|
|
3220
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_For_1_Template_button_click_0_listener() { const cell_r13 = i0.ɵɵrestoreView(_r12).$implicit; const ctx_r0 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r0.selectDay(cell_r13)); });
|
|
3321
3221
|
i0.ɵɵtext(1);
|
|
3322
3222
|
i0.ɵɵelementEnd();
|
|
3323
3223
|
} if (rf & 2) {
|
|
3324
|
-
const
|
|
3325
|
-
i0.ɵɵclassProp("kpt-calendar__day--muted", !
|
|
3326
|
-
i0.ɵɵproperty("disabled",
|
|
3327
|
-
i0.ɵɵattribute("aria-pressed",
|
|
3224
|
+
const cell_r13 = ctx.$implicit;
|
|
3225
|
+
i0.ɵɵclassProp("kpt-calendar__day--muted", !cell_r13.inMonth)("kpt-calendar__day--today", cell_r13.today)("kpt-calendar__day--selected", cell_r13.selected);
|
|
3226
|
+
i0.ɵɵproperty("disabled", cell_r13.disabled);
|
|
3227
|
+
i0.ɵɵattribute("aria-pressed", cell_r13.selected);
|
|
3328
3228
|
i0.ɵɵadvance();
|
|
3329
|
-
i0.ɵɵtextInterpolate(
|
|
3229
|
+
i0.ɵɵtextInterpolate(cell_r13.day);
|
|
3330
3230
|
} }
|
|
3331
|
-
function
|
|
3332
|
-
i0.ɵɵrepeaterCreate(0,
|
|
3231
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
3232
|
+
i0.ɵɵrepeaterCreate(0, KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_For_1_Template, 2, 9, "button", 28, _forTrack0$8);
|
|
3333
3233
|
} if (rf & 2) {
|
|
3334
|
-
const
|
|
3335
|
-
i0.ɵɵrepeater(
|
|
3234
|
+
const week_r14 = ctx.$implicit;
|
|
3235
|
+
i0.ɵɵrepeater(week_r14);
|
|
3336
3236
|
} }
|
|
3337
|
-
function
|
|
3338
|
-
|
|
3339
|
-
i0.ɵɵ
|
|
3340
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_6_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r20); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.prevMonth()); });
|
|
3341
|
-
i0.ɵɵelement(2, "kpt-icon", 16);
|
|
3237
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_8_Template(rf, ctx) { if (rf & 1) {
|
|
3238
|
+
i0.ɵɵelementStart(0, "div", 25);
|
|
3239
|
+
i0.ɵɵrepeaterCreate(1, KptDatepicker_ng_template_7_Conditional_2_Case_8_For_2_Template, 2, 1, "span", 26, i0.ɵɵrepeaterTrackByIdentity);
|
|
3342
3240
|
i0.ɵɵelementEnd();
|
|
3343
|
-
i0.ɵɵelementStart(3, "
|
|
3344
|
-
i0.ɵɵ
|
|
3241
|
+
i0.ɵɵelementStart(3, "div", 27);
|
|
3242
|
+
i0.ɵɵrepeaterCreate(4, KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_Template, 2, 0, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
3345
3243
|
i0.ɵɵelementEnd();
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
i0.ɵɵ
|
|
3244
|
+
} if (rf & 2) {
|
|
3245
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3246
|
+
i0.ɵɵadvance();
|
|
3247
|
+
i0.ɵɵrepeater(ctx_r0.weekdays());
|
|
3248
|
+
i0.ɵɵadvance(3);
|
|
3249
|
+
i0.ɵɵrepeater(ctx_r0.weeks());
|
|
3250
|
+
} }
|
|
3251
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_9_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3252
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
3253
|
+
i0.ɵɵelementStart(0, "button", 32);
|
|
3254
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_9_For_2_Template_button_click_0_listener() { const cell_r16 = i0.ɵɵrestoreView(_r15).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.selectCell(cell_r16)); });
|
|
3255
|
+
i0.ɵɵtext(1);
|
|
3256
|
+
i0.ɵɵelementEnd();
|
|
3257
|
+
} if (rf & 2) {
|
|
3258
|
+
const cell_r16 = ctx.$implicit;
|
|
3259
|
+
i0.ɵɵclassProp("kpt-calendar__cell--selected", cell_r16.selected)("kpt-calendar__cell--current", cell_r16.current);
|
|
3260
|
+
i0.ɵɵproperty("disabled", cell_r16.disabled);
|
|
3261
|
+
i0.ɵɵattribute("aria-pressed", cell_r16.selected);
|
|
3262
|
+
i0.ɵɵadvance();
|
|
3263
|
+
i0.ɵɵtextInterpolate(cell_r16.label);
|
|
3264
|
+
} }
|
|
3265
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_9_Template(rf, ctx) { if (rf & 1) {
|
|
3266
|
+
i0.ɵɵelementStart(0, "div", 30);
|
|
3267
|
+
i0.ɵɵrepeaterCreate(1, KptDatepicker_ng_template_7_Conditional_2_Case_9_For_2_Template, 2, 7, "button", 31, _forTrack1$2);
|
|
3268
|
+
i0.ɵɵelementEnd();
|
|
3269
|
+
} if (rf & 2) {
|
|
3270
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3271
|
+
i0.ɵɵclassProp("kpt-calendar__grid--decades", ctx_r0.panelView() === "decade");
|
|
3272
|
+
i0.ɵɵadvance();
|
|
3273
|
+
i0.ɵɵrepeater(ctx_r0.levelCells());
|
|
3274
|
+
} }
|
|
3275
|
+
function KptDatepicker_ng_template_7_Conditional_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
3276
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
3277
|
+
i0.ɵɵelementStart(0, "button", 33);
|
|
3278
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Conditional_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.openClock()); });
|
|
3279
|
+
i0.ɵɵelement(1, "kpt-icon", 34);
|
|
3280
|
+
i0.ɵɵelementStart(2, "span");
|
|
3281
|
+
i0.ɵɵtext(3);
|
|
3349
3282
|
i0.ɵɵelementEnd()();
|
|
3350
|
-
|
|
3351
|
-
|
|
3283
|
+
} if (rf & 2) {
|
|
3284
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3285
|
+
i0.ɵɵadvance(3);
|
|
3286
|
+
i0.ɵɵtextInterpolate(ctx_r0.timeBarLabel());
|
|
3287
|
+
} }
|
|
3288
|
+
function KptDatepicker_ng_template_7_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
3289
|
+
i0.ɵɵelementStart(0, "div", 12);
|
|
3290
|
+
i0.ɵɵconditionalCreate(1, KptDatepicker_ng_template_7_Conditional_2_Conditional_1_Template, 2, 2, "button", 17);
|
|
3291
|
+
i0.ɵɵelementStart(2, "span", 18);
|
|
3292
|
+
i0.ɵɵconditionalCreate(3, KptDatepicker_ng_template_7_Conditional_2_Case_3_Template, 4, 4)(4, KptDatepicker_ng_template_7_Conditional_2_Case_4_Template, 2, 1)(5, KptDatepicker_ng_template_7_Conditional_2_Case_5_Template, 2, 2, "button", 19)(6, KptDatepicker_ng_template_7_Conditional_2_Case_6_Template, 2, 1, "span", 16);
|
|
3352
3293
|
i0.ɵɵelementEnd();
|
|
3353
|
-
i0.ɵɵ
|
|
3354
|
-
i0.ɵɵrepeaterCreate(11, KptDatepicker_ng_template_7_Case_6_For_12_Template, 2, 0, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
3294
|
+
i0.ɵɵconditionalCreate(7, KptDatepicker_ng_template_7_Conditional_2_Conditional_7_Template, 2, 2, "button", 17);
|
|
3355
3295
|
i0.ɵɵelementEnd();
|
|
3296
|
+
i0.ɵɵconditionalCreate(8, KptDatepicker_ng_template_7_Conditional_2_Case_8_Template, 6, 0)(9, KptDatepicker_ng_template_7_Conditional_2_Case_9_Template, 3, 2, "div", 20);
|
|
3297
|
+
i0.ɵɵconditionalCreate(10, KptDatepicker_ng_template_7_Conditional_2_Conditional_10_Template, 4, 1, "button", 21);
|
|
3356
3298
|
} if (rf & 2) {
|
|
3299
|
+
let tmp_4_0;
|
|
3300
|
+
let tmp_6_0;
|
|
3357
3301
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3358
3302
|
i0.ɵɵadvance();
|
|
3359
|
-
i0.ɵɵ
|
|
3360
|
-
i0.ɵɵadvance(
|
|
3361
|
-
i0.ɵɵ
|
|
3303
|
+
i0.ɵɵconditional(ctx_r0.hasNav() ? 1 : -1);
|
|
3304
|
+
i0.ɵɵadvance(2);
|
|
3305
|
+
i0.ɵɵconditional((tmp_4_0 = ctx_r0.panelView()) === "day" ? 3 : tmp_4_0 === "month" ? 4 : tmp_4_0 === "year" ? 5 : tmp_4_0 === "decade" ? 6 : -1);
|
|
3306
|
+
i0.ɵɵadvance(4);
|
|
3307
|
+
i0.ɵɵconditional(ctx_r0.hasNav() ? 7 : -1);
|
|
3362
3308
|
i0.ɵɵadvance();
|
|
3363
|
-
i0.ɵɵ
|
|
3364
|
-
i0.ɵɵadvance(
|
|
3365
|
-
i0.ɵɵ
|
|
3366
|
-
|
|
3367
|
-
|
|
3309
|
+
i0.ɵɵconditional((tmp_6_0 = ctx_r0.panelView()) === "day" ? 8 : 9);
|
|
3310
|
+
i0.ɵɵadvance(2);
|
|
3311
|
+
i0.ɵɵconditional(ctx_r0.selectionMode() === "datetime" ? 10 : -1);
|
|
3312
|
+
} }
|
|
3313
|
+
function KptDatepicker_ng_template_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
3314
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
3315
|
+
i0.ɵɵelementStart(0, "div", 11)(1, "kpt-button", 35);
|
|
3316
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_3_Template_kpt_button_click_1_listener() { i0.ɵɵrestoreView(_r18); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.commit()); });
|
|
3317
|
+
i0.ɵɵtext(2);
|
|
3318
|
+
i0.ɵɵelementEnd()();
|
|
3319
|
+
} if (rf & 2) {
|
|
3320
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3321
|
+
i0.ɵɵadvance(2);
|
|
3322
|
+
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("common.done"));
|
|
3368
3323
|
} }
|
|
3369
3324
|
function KptDatepicker_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
3370
3325
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
3371
3326
|
i0.ɵɵelementStart(0, "div", 10);
|
|
3372
3327
|
i0.ɵɵlistener("keydown.escape", function KptDatepicker_ng_template_7_Template_div_keydown_escape_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.close()); });
|
|
3373
|
-
i0.ɵɵconditionalCreate(1,
|
|
3328
|
+
i0.ɵɵconditionalCreate(1, KptDatepicker_ng_template_7_Conditional_1_Template, 2, 4)(2, KptDatepicker_ng_template_7_Conditional_2_Template, 11, 5);
|
|
3329
|
+
i0.ɵɵconditionalCreate(3, KptDatepicker_ng_template_7_Conditional_3_Template, 3, 1, "div", 11);
|
|
3374
3330
|
i0.ɵɵelementEnd();
|
|
3375
3331
|
} if (rf & 2) {
|
|
3376
|
-
let tmp_3_0;
|
|
3377
3332
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
3378
|
-
i0.ɵɵclassProp("kpt-calendar--clock", ctx_r0.
|
|
3333
|
+
i0.ɵɵclassProp("kpt-calendar--clock", ctx_r0.showClock());
|
|
3379
3334
|
i0.ɵɵadvance();
|
|
3380
|
-
i0.ɵɵconditional(
|
|
3335
|
+
i0.ɵɵconditional(ctx_r0.showClock() ? 1 : 2);
|
|
3336
|
+
i0.ɵɵadvance(2);
|
|
3337
|
+
i0.ɵɵconditional(ctx_r0.hasFooter() ? 3 : -1);
|
|
3381
3338
|
} }
|
|
3339
|
+
/** Kolejność poziomów panelu, od najdrobniejszego. Indeks = „wysokość" widoku. */
|
|
3340
|
+
const LEVELS = ['day', 'month', 'year', 'decade'];
|
|
3382
3341
|
const pad$1 = (n) => String(n).padStart(2, '0');
|
|
3383
3342
|
const toIso$1 = (d) => `${d.getFullYear()}-${pad$1(d.getMonth() + 1)}-${pad$1(d.getDate())}`;
|
|
3384
3343
|
/**
|
|
3385
3344
|
* Wybór daty/godziny z własnym kalendarzem (CDK Overlay), Signal Forms.
|
|
3386
3345
|
* Granulacja przez `selectionMode`: data, miesiąc+rok, rok, miesiąc, data+godzina, sama godzina.
|
|
3346
|
+
* Panel jest stosem widoków dekady → lata → miesiące → dni: klik w komórkę schodzi poziom niżej,
|
|
3347
|
+
* klik w tytuł wchodzi poziom wyżej. Poziom startowy ustawia `startView` (data urodzenia:
|
|
3348
|
+
* `startView="decade"`); domyślnie startuje na poziomie, na którym tryb zatwierdza wartość.
|
|
3387
3349
|
* Godzina na tarczy zegara (dwa etapy: godziny → minuty), format 12/24h przez `hourFormat`.
|
|
3388
3350
|
* Format wartości zależy od trybu: 'RRRR-MM-DD' / 'RRRR-MM' / 'RRRR' / 'MM'
|
|
3389
3351
|
* / 'RRRR-MM-DDTHH:mm' (datetime) / 'HH:mm' (time). Czas przechowywany zawsze 24h.
|
|
3390
3352
|
* Wymaga stylów overlay CDK: `import '@angular/cdk/overlay-prebuilt.css';`
|
|
3391
3353
|
*
|
|
3392
3354
|
* @example
|
|
3393
|
-
* <kpt-datepicker [formField]="f.birthDate" minDate="1900-01-01" />
|
|
3355
|
+
* <kpt-datepicker [formField]="f.birthDate" startView="decade" minDate="1900-01-01" />
|
|
3394
3356
|
* <kpt-datepicker selectionMode="datetime" [hourFormat]="12" [(value)]="meetingAt" />
|
|
3395
3357
|
* <kpt-datepicker selectionMode="time" [(value)]="alarm" />
|
|
3396
3358
|
*/
|
|
3397
3359
|
class KptDatepicker {
|
|
3360
|
+
effectiveStartView() {
|
|
3361
|
+
const commit = LEVELS.indexOf(this.commitLevel());
|
|
3362
|
+
const top = LEVELS.indexOf(this.topLevel());
|
|
3363
|
+
const wanted = this.startView();
|
|
3364
|
+
const idx = wanted ? LEVELS.indexOf(wanted) : commit;
|
|
3365
|
+
return LEVELS[Math.min(Math.max(idx, commit), top)];
|
|
3366
|
+
}
|
|
3398
3367
|
constructor() {
|
|
3399
3368
|
this.value = model('', /* @ts-ignore */
|
|
3400
3369
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -3415,6 +3384,13 @@ class KptDatepicker {
|
|
|
3415
3384
|
/** Granulacja wyboru. */
|
|
3416
3385
|
this.selectionMode = input('date', /* @ts-ignore */
|
|
3417
3386
|
...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
|
|
3387
|
+
/**
|
|
3388
|
+
* Poziom, od którego otwiera się panel. `null` = poziom zatwierdzania danego trybu
|
|
3389
|
+
* (dni dla 'date'). Nie schodzi poniżej tego poziomu — `startView="day"` w trybie 'year'
|
|
3390
|
+
* nie ma sensu i jest podnoszony do 'year'.
|
|
3391
|
+
*/
|
|
3392
|
+
this.startView = input(null, /* @ts-ignore */
|
|
3393
|
+
...(ngDevMode ? [{ debugName: "startView" }] : /* istanbul ignore next */ []));
|
|
3418
3394
|
/** Prezentacja miesiąca w trybie 'month': słownie ('long') lub liczbą ('number'). */
|
|
3419
3395
|
this.monthDisplay = input('long', /* @ts-ignore */
|
|
3420
3396
|
...(ngDevMode ? [{ debugName: "monthDisplay" }] : /* istanbul ignore next */ []));
|
|
@@ -3455,6 +3431,25 @@ class KptDatepicker {
|
|
|
3455
3431
|
this.today = new Date();
|
|
3456
3432
|
this.view = signal({ y: this.today.getFullYear(), m: this.today.getMonth() }, /* @ts-ignore */
|
|
3457
3433
|
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
3434
|
+
/** Aktualny poziom stosu widoków panelu. */
|
|
3435
|
+
this.panelView = signal('day', /* @ts-ignore */
|
|
3436
|
+
...(ngDevMode ? [{ debugName: "panelView" }] : /* istanbul ignore next */ []));
|
|
3437
|
+
/** Poziom, na którym klik w komórkę zatwierdza wartość zamiast schodzić niżej. */
|
|
3438
|
+
this.commitLevel = computed(() => {
|
|
3439
|
+
switch (this.selectionMode()) {
|
|
3440
|
+
case 'monthYear':
|
|
3441
|
+
case 'month':
|
|
3442
|
+
return 'month';
|
|
3443
|
+
case 'year':
|
|
3444
|
+
return 'year';
|
|
3445
|
+
default:
|
|
3446
|
+
return 'day';
|
|
3447
|
+
}
|
|
3448
|
+
}, /* @ts-ignore */
|
|
3449
|
+
...(ngDevMode ? [{ debugName: "commitLevel" }] : /* istanbul ignore next */ []));
|
|
3450
|
+
/** Tryb 'month' nie ma roku ani dekady — wartością jest samo 'MM'. */
|
|
3451
|
+
this.topLevel = computed(() => this.selectionMode() === 'month' ? 'month' : 'decade', /* @ts-ignore */
|
|
3452
|
+
...(ngDevMode ? [{ debugName: "topLevel" }] : /* istanbul ignore next */ []));
|
|
3458
3453
|
// ── Stan czasu (bufor 'HH:mm', 24h) ──
|
|
3459
3454
|
this.timeStr = signal('', /* @ts-ignore */
|
|
3460
3455
|
...(ngDevMode ? [{ debugName: "timeStr" }] : /* istanbul ignore next */ []));
|
|
@@ -3462,24 +3457,77 @@ class KptDatepicker {
|
|
|
3462
3457
|
...(ngDevMode ? [{ debugName: "dtView" }] : /* istanbul ignore next */ []));
|
|
3463
3458
|
this.pendingDate = signal('', /* @ts-ignore */
|
|
3464
3459
|
...(ngDevMode ? [{ debugName: "pendingDate" }] : /* istanbul ignore next */ []));
|
|
3460
|
+
/** Tarcza zamiast siatek: tryb 'time' zawsze, 'datetime' po wejściu w pasek czasu. */
|
|
3461
|
+
this.showClock = computed(() => this.selectionMode() === 'time' || (this.selectionMode() === 'datetime' && this.dtView() === 'clock'), /* @ts-ignore */
|
|
3462
|
+
...(ngDevMode ? [{ debugName: "showClock" }] : /* istanbul ignore next */ []));
|
|
3463
|
+
this.hasFooter = computed(() => this.selectionMode() === 'time' || this.selectionMode() === 'datetime', /* @ts-ignore */
|
|
3464
|
+
...(ngDevMode ? [{ debugName: "hasFooter" }] : /* istanbul ignore next */ []));
|
|
3465
3465
|
this.positions = [
|
|
3466
3466
|
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
3467
3467
|
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
|
|
3468
3468
|
];
|
|
3469
3469
|
this.viewYear = computed(() => this.view().y, /* @ts-ignore */
|
|
3470
3470
|
...(ngDevMode ? [{ debugName: "viewYear" }] : /* istanbul ignore next */ []));
|
|
3471
|
-
this.
|
|
3471
|
+
this.monthName = computed(() => this.months()[this.view().m], /* @ts-ignore */
|
|
3472
|
+
...(ngDevMode ? [{ debugName: "monthName" }] : /* istanbul ignore next */ []));
|
|
3473
|
+
/** Początek dekady widocznej w siatce lat (1979 → 1970). */
|
|
3474
|
+
this.decadeStart = computed(() => Math.floor(this.view().y / 10) * 10, /* @ts-ignore */
|
|
3475
|
+
...(ngDevMode ? [{ debugName: "decadeStart" }] : /* istanbul ignore next */ []));
|
|
3476
|
+
/** Początek strony dekad: 12 dekad, czyli 120 lat (1979 → 1920, strona 1920–2039). */
|
|
3477
|
+
this.centuryStart = computed(() => Math.floor(this.view().y / 120) * 120, /* @ts-ignore */
|
|
3478
|
+
...(ngDevMode ? [{ debugName: "centuryStart" }] : /* istanbul ignore next */ []));
|
|
3479
|
+
this.yearRangeLabel = computed(() => `${this.decadeStart()} – ${this.decadeStart() + 9}`, /* @ts-ignore */
|
|
3480
|
+
...(ngDevMode ? [{ debugName: "yearRangeLabel" }] : /* istanbul ignore next */ []));
|
|
3481
|
+
this.decadeRangeLabel = computed(() => `${this.centuryStart()} – ${this.centuryStart() + 119}`, /* @ts-ignore */
|
|
3482
|
+
...(ngDevMode ? [{ debugName: "decadeRangeLabel" }] : /* istanbul ignore next */ []));
|
|
3483
|
+
/** Tryb 'month' nie ma po czym nawigować — siatka miesięcy jest kompletna. */
|
|
3484
|
+
this.hasNav = computed(() => this.selectionMode() !== 'month', /* @ts-ignore */
|
|
3485
|
+
...(ngDevMode ? [{ debugName: "hasNav" }] : /* istanbul ignore next */ []));
|
|
3486
|
+
this.navPrevLabel = computed(() => {
|
|
3487
|
+
switch (this.panelView()) {
|
|
3488
|
+
case 'month': return this.i18n.t('datepicker.prevYear');
|
|
3489
|
+
case 'year': return this.i18n.t('datepicker.prevYears');
|
|
3490
|
+
case 'decade': return this.i18n.t('datepicker.prevDecades');
|
|
3491
|
+
default: return this.i18n.t('datepicker.prevMonth');
|
|
3492
|
+
}
|
|
3493
|
+
}, /* @ts-ignore */
|
|
3494
|
+
...(ngDevMode ? [{ debugName: "navPrevLabel" }] : /* istanbul ignore next */ []));
|
|
3495
|
+
this.navNextLabel = computed(() => {
|
|
3496
|
+
switch (this.panelView()) {
|
|
3497
|
+
case 'month': return this.i18n.t('datepicker.nextYear');
|
|
3498
|
+
case 'year': return this.i18n.t('datepicker.nextYears');
|
|
3499
|
+
case 'decade': return this.i18n.t('datepicker.nextDecades');
|
|
3500
|
+
default: return this.i18n.t('datepicker.nextMonth');
|
|
3501
|
+
}
|
|
3502
|
+
}, /* @ts-ignore */
|
|
3503
|
+
...(ngDevMode ? [{ debugName: "navNextLabel" }] : /* istanbul ignore next */ []));
|
|
3504
|
+
/** Strzałka wstecz gasnie, gdy cała poprzednia strona wypada przed `minDate`. */
|
|
3505
|
+
this.canPageBack = computed(() => {
|
|
3506
|
+
const min = this.minDate();
|
|
3507
|
+
if (!min)
|
|
3508
|
+
return true;
|
|
3472
3509
|
const { y, m } = this.view();
|
|
3473
|
-
|
|
3510
|
+
switch (this.panelView()) {
|
|
3511
|
+
case 'month': return `${y - 1}-12` >= min.slice(0, 7);
|
|
3512
|
+
case 'year': return this.decadeStart() - 1 >= +min.slice(0, 4);
|
|
3513
|
+
case 'decade': return this.centuryStart() - 1 >= +min.slice(0, 4);
|
|
3514
|
+
default: return toIso$1(new Date(y, m, 0)) >= min; // ostatni dzień poprzedniego miesiąca
|
|
3515
|
+
}
|
|
3474
3516
|
}, /* @ts-ignore */
|
|
3475
|
-
...(ngDevMode ? [{ debugName: "
|
|
3476
|
-
this.
|
|
3477
|
-
const
|
|
3478
|
-
|
|
3517
|
+
...(ngDevMode ? [{ debugName: "canPageBack" }] : /* istanbul ignore next */ []));
|
|
3518
|
+
this.canPageForward = computed(() => {
|
|
3519
|
+
const max = this.maxDate();
|
|
3520
|
+
if (!max)
|
|
3521
|
+
return true;
|
|
3522
|
+
const { y, m } = this.view();
|
|
3523
|
+
switch (this.panelView()) {
|
|
3524
|
+
case 'month': return `${y + 1}-01` <= max.slice(0, 7);
|
|
3525
|
+
case 'year': return this.decadeStart() + 10 <= +max.slice(0, 4);
|
|
3526
|
+
case 'decade': return this.centuryStart() + 120 <= +max.slice(0, 4);
|
|
3527
|
+
default: return toIso$1(new Date(y, m + 1, 1)) <= max;
|
|
3528
|
+
}
|
|
3479
3529
|
}, /* @ts-ignore */
|
|
3480
|
-
...(ngDevMode ? [{ debugName: "
|
|
3481
|
-
this.yearRangeLabel = computed(() => `${this.yearPageStart()} – ${this.yearPageStart() + 11}`, /* @ts-ignore */
|
|
3482
|
-
...(ngDevMode ? [{ debugName: "yearRangeLabel" }] : /* istanbul ignore next */ []));
|
|
3530
|
+
...(ngDevMode ? [{ debugName: "canPageForward" }] : /* istanbul ignore next */ []));
|
|
3483
3531
|
/** Etykieta czasu na pasku trybu datetime (uwzględnia AM/PM). */
|
|
3484
3532
|
this.timeBarLabel = computed(() => {
|
|
3485
3533
|
const t = this.parseTime(this.timeStr());
|
|
@@ -3557,35 +3605,97 @@ class KptDatepicker {
|
|
|
3557
3605
|
return weeks;
|
|
3558
3606
|
}, /* @ts-ignore */
|
|
3559
3607
|
...(ngDevMode ? [{ debugName: "weeks" }] : /* istanbul ignore next */ []));
|
|
3560
|
-
|
|
3608
|
+
/** Rok/miesiąc bieżącej wartości — zaznaczenie w siatkach wyższych poziomów. */
|
|
3609
|
+
this.selectedYM = computed(() => {
|
|
3610
|
+
const v = this.value();
|
|
3611
|
+
switch (this.selectionMode()) {
|
|
3612
|
+
case 'month': {
|
|
3613
|
+
const m = /^(\d{2})$/.exec(v);
|
|
3614
|
+
return { y: null, m: m ? +m[1] - 1 : null };
|
|
3615
|
+
}
|
|
3616
|
+
case 'year':
|
|
3617
|
+
return { y: /^\d{4}$/.test(v) ? +v : null, m: null };
|
|
3618
|
+
case 'monthYear': {
|
|
3619
|
+
const m = /^(\d{4})-(\d{2})$/.exec(v);
|
|
3620
|
+
return m ? { y: +m[1], m: +m[2] - 1 } : { y: null, m: null };
|
|
3621
|
+
}
|
|
3622
|
+
case 'time':
|
|
3623
|
+
return { y: null, m: null };
|
|
3624
|
+
default: {
|
|
3625
|
+
const d = this.parseDate(this.selectedDateIso());
|
|
3626
|
+
return d ? { y: d.getFullYear(), m: d.getMonth() } : { y: null, m: null };
|
|
3627
|
+
}
|
|
3628
|
+
}
|
|
3629
|
+
}, /* @ts-ignore */
|
|
3630
|
+
...(ngDevMode ? [{ debugName: "selectedYM" }] : /* istanbul ignore next */ []));
|
|
3631
|
+
// ── Siatka miesięcy ──
|
|
3561
3632
|
this.monthCells = computed(() => {
|
|
3562
3633
|
const { y } = this.view();
|
|
3563
|
-
const sel = this.
|
|
3634
|
+
const sel = this.selectedYM();
|
|
3564
3635
|
const isMonthOnly = this.selectionMode() === 'month';
|
|
3565
3636
|
const numeric = this.monthDisplay() === 'number';
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
});
|
|
3637
|
+
const todayY = this.today.getFullYear();
|
|
3638
|
+
const todayM = this.today.getMonth();
|
|
3639
|
+
return this.months().map((name, i) => ({
|
|
3640
|
+
label: numeric ? pad$1(i + 1) : name,
|
|
3641
|
+
y,
|
|
3642
|
+
m: i,
|
|
3643
|
+
selected: sel.m === i && (isMonthOnly || sel.y === y),
|
|
3644
|
+
current: todayM === i && (isMonthOnly || todayY === y),
|
|
3645
|
+
disabled: isMonthOnly ? false : this.isMonthYearDisabled(y, i),
|
|
3646
|
+
}));
|
|
3576
3647
|
}, /* @ts-ignore */
|
|
3577
3648
|
...(ngDevMode ? [{ debugName: "monthCells" }] : /* istanbul ignore next */ []));
|
|
3578
|
-
// ── Siatka lat (
|
|
3649
|
+
// ── Siatka lat (pełna dekada) ──
|
|
3579
3650
|
this.yearCells = computed(() => {
|
|
3580
|
-
const start = this.
|
|
3581
|
-
const sel = this.
|
|
3582
|
-
|
|
3651
|
+
const start = this.decadeStart();
|
|
3652
|
+
const sel = this.selectedYM();
|
|
3653
|
+
const todayY = this.today.getFullYear();
|
|
3654
|
+
return Array.from({ length: 10 }, (_, i) => {
|
|
3583
3655
|
const year = start + i;
|
|
3584
|
-
|
|
3585
|
-
|
|
3656
|
+
return {
|
|
3657
|
+
label: String(year),
|
|
3658
|
+
y: year,
|
|
3659
|
+
m: 0,
|
|
3660
|
+
selected: sel.y === year,
|
|
3661
|
+
current: todayY === year,
|
|
3662
|
+
disabled: this.isYearDisabled(year),
|
|
3663
|
+
};
|
|
3586
3664
|
});
|
|
3587
3665
|
}, /* @ts-ignore */
|
|
3588
3666
|
...(ngDevMode ? [{ debugName: "yearCells" }] : /* istanbul ignore next */ []));
|
|
3667
|
+
// ── Siatka dekad (12 dekad = 120 lat) ──
|
|
3668
|
+
this.decadeCells = computed(() => {
|
|
3669
|
+
const start = this.centuryStart();
|
|
3670
|
+
const sel = this.selectedYM();
|
|
3671
|
+
const todayY = this.today.getFullYear();
|
|
3672
|
+
return Array.from({ length: 12 }, (_, i) => {
|
|
3673
|
+
const from = start + i * 10;
|
|
3674
|
+
const to = from + 9;
|
|
3675
|
+
return {
|
|
3676
|
+
label: `${from} – ${to}`,
|
|
3677
|
+
y: from,
|
|
3678
|
+
m: 0,
|
|
3679
|
+
selected: sel.y != null && sel.y >= from && sel.y <= to,
|
|
3680
|
+
current: todayY >= from && todayY <= to,
|
|
3681
|
+
// Dekada wypada z zakresu dopiero, gdy poza nim są oba jej krańce.
|
|
3682
|
+
disabled: this.isYearDisabled(from) && this.isYearDisabled(to),
|
|
3683
|
+
};
|
|
3684
|
+
});
|
|
3685
|
+
}, /* @ts-ignore */
|
|
3686
|
+
...(ngDevMode ? [{ debugName: "decadeCells" }] : /* istanbul ignore next */ []));
|
|
3687
|
+
/** Komórki bieżącego poziomu — siatka miesięcy/lat/dekad ma jeden wspólny markup. */
|
|
3688
|
+
this.levelCells = computed(() => {
|
|
3689
|
+
switch (this.panelView()) {
|
|
3690
|
+
case 'year':
|
|
3691
|
+
return this.yearCells();
|
|
3692
|
+
case 'decade':
|
|
3693
|
+
return this.decadeCells();
|
|
3694
|
+
default:
|
|
3695
|
+
return this.monthCells();
|
|
3696
|
+
}
|
|
3697
|
+
}, /* @ts-ignore */
|
|
3698
|
+
...(ngDevMode ? [{ debugName: "levelCells" }] : /* istanbul ignore next */ []));
|
|
3589
3699
|
// Kalendarz może zostać otwarty także z zewnątrz (`[open]`), nie tylko klikiem w trigger —
|
|
3590
3700
|
// widok i bufor czasu ustawiamy więc przy każdym otwarciu, nie w `toggleOpen()`.
|
|
3591
3701
|
effect(() => {
|
|
@@ -3594,6 +3704,7 @@ class KptDatepicker {
|
|
|
3594
3704
|
if (!isOpen)
|
|
3595
3705
|
return;
|
|
3596
3706
|
this.view.set(this.initialView());
|
|
3707
|
+
this.panelView.set(this.effectiveStartView());
|
|
3597
3708
|
this.syncTimeFromValue();
|
|
3598
3709
|
this.dtView.set(this.selectionMode() === 'time' ? 'clock' : 'calendar');
|
|
3599
3710
|
});
|
|
@@ -3700,11 +3811,29 @@ class KptDatepicker {
|
|
|
3700
3811
|
this.value.set(cell.iso);
|
|
3701
3812
|
this.close();
|
|
3702
3813
|
}
|
|
3814
|
+
/**
|
|
3815
|
+
* Klik w komórkę siatki: na poziomie zatwierdzania ustawia wartość i zamyka panel,
|
|
3816
|
+
* wyżej — przestawia widok i schodzi poziom niżej.
|
|
3817
|
+
*/
|
|
3703
3818
|
selectCell(cell) {
|
|
3704
3819
|
if (cell.disabled)
|
|
3705
3820
|
return;
|
|
3706
|
-
this.
|
|
3707
|
-
this.
|
|
3821
|
+
const level = this.panelView();
|
|
3822
|
+
if (level === this.commitLevel()) {
|
|
3823
|
+
this.value.set(level === 'year' ? String(cell.y) : this.monthValue(cell));
|
|
3824
|
+
this.close();
|
|
3825
|
+
return;
|
|
3826
|
+
}
|
|
3827
|
+
this.view.update(({ m }) => ({ y: cell.y, m: level === 'month' ? cell.m : m }));
|
|
3828
|
+
this.panelView.set(LEVELS[LEVELS.indexOf(level) - 1]);
|
|
3829
|
+
}
|
|
3830
|
+
monthValue(cell) {
|
|
3831
|
+
const mm = pad$1(cell.m + 1);
|
|
3832
|
+
return this.selectionMode() === 'month' ? mm : `${cell.y}-${mm}`;
|
|
3833
|
+
}
|
|
3834
|
+
/** Klik w tytuł — wejście poziom wyżej w stosie widoków. */
|
|
3835
|
+
goTo(level) {
|
|
3836
|
+
this.panelView.set(level);
|
|
3708
3837
|
}
|
|
3709
3838
|
// ── Zegar (delegowany do kpt-clock przez timeStr) ──
|
|
3710
3839
|
openClock() {
|
|
@@ -3725,23 +3854,33 @@ class KptDatepicker {
|
|
|
3725
3854
|
}
|
|
3726
3855
|
this.close();
|
|
3727
3856
|
}
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3857
|
+
/** Strzałki ‹ › — krok zależny od poziomu: miesiąc, rok, dekada, strona dekad. */
|
|
3858
|
+
page(dir) {
|
|
3859
|
+
const level = this.panelView();
|
|
3860
|
+
this.view.update(({ y, m }) => {
|
|
3861
|
+
switch (level) {
|
|
3862
|
+
case 'month':
|
|
3863
|
+
return { y: y + dir, m };
|
|
3864
|
+
case 'year':
|
|
3865
|
+
return { y: y + dir * 10, m };
|
|
3866
|
+
case 'decade':
|
|
3867
|
+
return { y: y + dir * 120, m };
|
|
3868
|
+
default: {
|
|
3869
|
+
const next = m + dir;
|
|
3870
|
+
if (next < 0)
|
|
3871
|
+
return { y: y - 1, m: 11 };
|
|
3872
|
+
if (next > 11)
|
|
3873
|
+
return { y: y + 1, m: 0 };
|
|
3874
|
+
return { y, m: next };
|
|
3875
|
+
}
|
|
3876
|
+
}
|
|
3877
|
+
});
|
|
3739
3878
|
}
|
|
3740
|
-
|
|
3741
|
-
this.
|
|
3879
|
+
pagePrev() {
|
|
3880
|
+
this.page(-1);
|
|
3742
3881
|
}
|
|
3743
|
-
|
|
3744
|
-
this.
|
|
3882
|
+
pageNext() {
|
|
3883
|
+
this.page(1);
|
|
3745
3884
|
}
|
|
3746
3885
|
clear(event) {
|
|
3747
3886
|
event.stopPropagation();
|
|
@@ -3749,7 +3888,7 @@ class KptDatepicker {
|
|
|
3749
3888
|
this.pendingDate.set('');
|
|
3750
3889
|
}
|
|
3751
3890
|
static { this.ɵfac = function KptDatepicker_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptDatepicker)(); }; }
|
|
3752
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDatepicker, selectors: [["kpt-datepicker"]], hostAttrs: [1, "kpt-datepicker-host"], inputs: { value: [1, "value"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], placeholder: [1, "placeholder"], ariaLabel: [1, "ariaLabel"], displayFormat: [1, "displayFormat"], selectionMode: [1, "selectionMode"], monthDisplay: [1, "monthDisplay"], hourFormat: [1, "hourFormat"], minuteStep: [1, "minuteStep"], minDate: [1, "minDate"], maxDate: [1, "maxDate"], open: [1, "open"] }, outputs: { value: "valueChange", touch: "touch", open: "openChange" }, decls: 8, vars: 15, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "button", "tabindex", "0", 1, "kpt-datepicker", 3, "click", "keydown.enter", "blur"], [1, "kpt-datepicker__value"], [1, "kpt-datepicker__placeholder"], [1, "kpt-datepicker__spacer"], ["type", "button", 1, "kpt-datepicker__clear"], [1, "kpt-datepicker__icon", 3, "name"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["type", "button", 1, "kpt-datepicker__clear", 3, "click"], ["name", "x"], [1, "kpt-calendar", 3, "keydown.escape"], [3, "valueChange", "value", "hourFormat", "minuteStep"], [1, "kpt-
|
|
3891
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDatepicker, selectors: [["kpt-datepicker"]], hostAttrs: [1, "kpt-datepicker-host"], inputs: { value: [1, "value"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], placeholder: [1, "placeholder"], ariaLabel: [1, "ariaLabel"], displayFormat: [1, "displayFormat"], selectionMode: [1, "selectionMode"], startView: [1, "startView"], monthDisplay: [1, "monthDisplay"], hourFormat: [1, "hourFormat"], minuteStep: [1, "minuteStep"], minDate: [1, "minDate"], maxDate: [1, "maxDate"], open: [1, "open"] }, outputs: { value: "valueChange", touch: "touch", open: "openChange" }, decls: 8, vars: 15, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "button", "tabindex", "0", 1, "kpt-datepicker", 3, "click", "keydown.enter", "blur"], [1, "kpt-datepicker__value"], [1, "kpt-datepicker__placeholder"], [1, "kpt-datepicker__spacer"], ["type", "button", 1, "kpt-datepicker__clear"], [1, "kpt-datepicker__icon", 3, "name"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["type", "button", 1, "kpt-datepicker__clear", 3, "click"], ["name", "x"], [1, "kpt-calendar", 3, "keydown.escape"], [1, "kpt-calendar__footer"], [1, "kpt-calendar__header"], [3, "valueChange", "value", "hourFormat", "minuteStep"], ["type", "button", 1, "kpt-calendar__nav", 3, "click"], ["name", "chevron-left"], [1, "kpt-calendar__title"], ["type", "button", 1, "kpt-calendar__nav", 3, "disabled"], [1, "kpt-calendar__titles"], ["type", "button", 1, "kpt-calendar__title-btn"], [1, "kpt-calendar__grid", "kpt-calendar__grid--cells", 3, "kpt-calendar__grid--decades"], ["type", "button", 1, "kpt-calendar__timebar"], ["type", "button", 1, "kpt-calendar__nav", 3, "click", "disabled"], ["type", "button", 1, "kpt-calendar__title-btn", 3, "click"], ["name", "chevron-right"], [1, "kpt-calendar__weekdays"], [1, "kpt-calendar__weekday"], [1, "kpt-calendar__grid"], ["type", "button", 1, "kpt-calendar__day", 3, "kpt-calendar__day--muted", "kpt-calendar__day--today", "kpt-calendar__day--selected", "disabled"], ["type", "button", 1, "kpt-calendar__day", 3, "click", "disabled"], [1, "kpt-calendar__grid", "kpt-calendar__grid--cells"], ["type", "button", 1, "kpt-calendar__cell", 3, "kpt-calendar__cell--selected", "kpt-calendar__cell--current", "disabled"], ["type", "button", 1, "kpt-calendar__cell", 3, "click", "disabled"], ["type", "button", 1, "kpt-calendar__timebar", 3, "click"], ["name", "clock"], ["size", "sm", 3, "click"]], template: function KptDatepicker_Template(rf, ctx) { if (rf & 1) {
|
|
3753
3892
|
i0.ɵɵelementStart(0, "div", 1, 0);
|
|
3754
3893
|
i0.ɵɵlistener("click", function KptDatepicker_Template_div_click_0_listener() { return ctx.toggleOpen(); })("keydown.enter", function KptDatepicker_Template_div_keydown_enter_0_listener() { return ctx.toggleOpen(); })("blur", function KptDatepicker_Template_div_blur_0_listener() { return ctx.touch.emit(); });
|
|
3755
3894
|
i0.ɵɵconditionalCreate(2, KptDatepicker_Conditional_2_Template, 2, 1, "span", 2)(3, KptDatepicker_Conditional_3_Template, 2, 1, "span", 3);
|
|
@@ -3757,10 +3896,10 @@ class KptDatepicker {
|
|
|
3757
3896
|
i0.ɵɵconditionalCreate(5, KptDatepicker_Conditional_5_Template, 2, 1, "button", 5);
|
|
3758
3897
|
i0.ɵɵelement(6, "kpt-icon", 6);
|
|
3759
3898
|
i0.ɵɵelementEnd();
|
|
3760
|
-
i0.ɵɵtemplate(7, KptDatepicker_ng_template_7_Template,
|
|
3899
|
+
i0.ɵɵtemplate(7, KptDatepicker_ng_template_7_Template, 4, 4, "ng-template", 7);
|
|
3761
3900
|
i0.ɵɵlistener("backdropClick", function KptDatepicker_Template_ng_template_backdropClick_7_listener() { return ctx.close(); })("detach", function KptDatepicker_Template_ng_template_detach_7_listener() { return ctx.close(); });
|
|
3762
3901
|
} if (rf & 2) {
|
|
3763
|
-
const
|
|
3902
|
+
const trigger_r19 = i0.ɵɵreference(1);
|
|
3764
3903
|
i0.ɵɵclassProp("kpt-datepicker--open", ctx.open())("kpt-datepicker--disabled", ctx.disabled())("kpt-datepicker--invalid", ctx.showInvalid());
|
|
3765
3904
|
i0.ɵɵattribute("aria-disabled", ctx.disabled() || null)("aria-label", ctx.ariaLabel());
|
|
3766
3905
|
i0.ɵɵadvance(2);
|
|
@@ -3770,14 +3909,14 @@ class KptDatepicker {
|
|
|
3770
3909
|
i0.ɵɵadvance();
|
|
3771
3910
|
i0.ɵɵproperty("name", ctx.selectionMode() === "time" ? "clock" : "calendar");
|
|
3772
3911
|
i0.ɵɵadvance();
|
|
3773
|
-
i0.ɵɵproperty("cdkConnectedOverlayOrigin",
|
|
3774
|
-
} }, dependencies: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], styles: ["@layer kpt.components{.kpt-datepicker-host{display:block}.kpt-datepicker{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--%NS%kpt-space-3, .75rem);box-sizing:border-box;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-datepicker:hover:not(.kpt-datepicker--disabled){border-color:var(--%NS%kpt-form-field-border-hover)}.kpt-datepicker:focus-visible,.kpt-datepicker.kpt-datepicker--open{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-datepicker.kpt-datepicker--invalid{border-color:var(--%NS%kpt-form-field-border-error)}.kpt-datepicker.kpt-datepicker--disabled{cursor:not-allowed;opacity:.6;background:var(--%NS%kpt-color-surface-variant)}.kpt-datepicker__placeholder{color:var(--%NS%kpt-form-field-placeholder)}.kpt-datepicker__spacer{flex:1}.kpt-datepicker__icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-datepicker__clear{display:inline-flex;border:0;background:none;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted);padding:0}.kpt-datepicker__clear:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:var(--%NS%kpt-elevation-3);color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--%NS%kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__day--muted{color:var(--%NS%kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--%NS%kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__day:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--cells{grid-template-columns:repeat(3,1fr);gap:4px}.kpt-calendar__cell{padding:.6rem .25rem;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit;text-transform:capitalize}.kpt-calendar__cell:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__cell--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__cell:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__timebar{display:flex;align-items:center;justify-content:center;gap:var(--%NS%kpt-space-2, .5rem);width:100%;margin-top:var(--%NS%kpt-space-2, .5rem);padding:var(--%NS%kpt-space-2, .5rem);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.kpt-calendar__timebar:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__timebar kpt-icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--%NS%kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}}\n"], encapsulation: 2 }); }
|
|
3912
|
+
i0.ɵɵproperty("cdkConnectedOverlayOrigin", trigger_r19)("cdkConnectedOverlayOpen", ctx.open())("cdkConnectedOverlayPositions", ctx.positions)("cdkConnectedOverlayHasBackdrop", true);
|
|
3913
|
+
} }, dependencies: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], styles: ["@layer kpt.components{.kpt-datepicker-host{display:block}.kpt-datepicker{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--%NS%kpt-space-3, .75rem);box-sizing:border-box;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-datepicker:hover:not(.kpt-datepicker--disabled){border-color:var(--%NS%kpt-form-field-border-hover)}.kpt-datepicker:focus-visible,.kpt-datepicker.kpt-datepicker--open{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-datepicker.kpt-datepicker--invalid{border-color:var(--%NS%kpt-form-field-border-error)}.kpt-datepicker.kpt-datepicker--disabled{cursor:not-allowed;opacity:.6;background:var(--%NS%kpt-color-surface-variant)}.kpt-datepicker__placeholder{color:var(--%NS%kpt-form-field-placeholder)}.kpt-datepicker__spacer{flex:1}.kpt-datepicker__icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-datepicker__clear{display:inline-flex;border:0;background:none;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted);padding:0}.kpt-datepicker__clear:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:var(--%NS%kpt-elevation-3);color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--%NS%kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__titles{display:flex;align-items:center;gap:var(--%NS%kpt-space-1, .25rem)}.kpt-calendar__title-btn{padding:.25rem var(--%NS%kpt-space-2, .5rem);border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:var(--%NS%kpt-color-muted);color:var(--%NS%kpt-color-on-surface);font:inherit;font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:capitalize;cursor:pointer}.kpt-calendar__title-btn:hover{background:var(--%NS%kpt-color-muted-hover)}.kpt-calendar__title-btn:focus-visible{outline:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border-strong);outline-offset:1px}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__nav:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__day--muted{color:var(--%NS%kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--%NS%kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__day:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--cells{grid-template-columns:repeat(3,1fr);gap:4px}.kpt-calendar__cell{padding:.6rem .25rem;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit;text-transform:capitalize}.kpt-calendar__cell:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__cell--current{box-shadow:inset 0 0 0 1px var(--%NS%kpt-color-border-strong)}.kpt-calendar__cell--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__cell:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--decades .kpt-calendar__cell{padding-inline:0;font-size:var(--%NS%kpt-font-size-xs, .75rem);white-space:nowrap}.kpt-calendar__timebar{display:flex;align-items:center;justify-content:center;gap:var(--%NS%kpt-space-2, .5rem);width:100%;margin-top:var(--%NS%kpt-space-2, .5rem);padding:var(--%NS%kpt-space-2, .5rem);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.kpt-calendar__timebar:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__timebar kpt-icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--%NS%kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}}\n"], encapsulation: 2 }); }
|
|
3775
3914
|
}
|
|
3776
3915
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptDatepicker, [{
|
|
3777
3916
|
type: Component,
|
|
3778
|
-
args: [{ selector: 'kpt-datepicker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], host: { class: 'kpt-datepicker-host' }, template: "<div\n class=\"kpt-datepicker\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"button\"\n tabindex=\"0\"\n [class.kpt-datepicker--open]=\"open()\"\n [class.kpt-datepicker--disabled]=\"disabled()\"\n [class.kpt-datepicker--invalid]=\"showInvalid()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"toggleOpen()\"\n (keydown.enter)=\"toggleOpen()\"\n (blur)=\"touch.emit()\"\n>\n @if (display()) {\n <span class=\"kpt-datepicker__value\">{{ display() }}</span>\n } @else {\n <span class=\"kpt-datepicker__placeholder\">{{ effectivePlaceholder() }}</span>\n }\n <span class=\"kpt-datepicker__spacer\"></span>\n @if (display()) {\n <button type=\"button\" class=\"kpt-datepicker__clear\" (click)=\"clear($event)\" [attr.aria-label]=\"i18n.t('common.clear')\"><kpt-icon name=\"x\" /></button>\n }\n <kpt-icon\n class=\"kpt-datepicker__icon\"\n [name]=\"selectionMode() === 'time' ? 'clock' : 'calendar'\"\n />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"kpt-calendar\" [class.kpt-calendar--clock]=\"selectionMode() === 'time' || (selectionMode() === 'datetime' && dtView() === 'clock')\" (keydown.escape)=\"close()\">\n @switch (selectionMode()) {\n @case ('time') {\n <kpt-clock [(value)]=\"timeStr\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n @case ('datetime') {\n @if (dtView() === 'calendar') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ monthLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n <button type=\"button\" class=\"kpt-calendar__timebar\" (click)=\"openClock()\">\n <kpt-icon name=\"clock\" />\n <span>{{ timeBarLabel() }}</span>\n </button>\n } @else {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"backToCalendar()\" [attr.aria-label]=\"i18n.t('datepicker.calendar')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.time') }}</span>\n </div>\n <kpt-clock [(value)]=\"timeStr\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n @case ('monthYear') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevYear()\" [attr.aria-label]=\"i18n.t('datepicker.prevYear')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ viewYear() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextYear()\" [attr.aria-label]=\"i18n.t('datepicker.nextYear')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of monthCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @case ('year') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevYearPage()\" [attr.aria-label]=\"i18n.t('datepicker.prevYears')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ yearRangeLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextYearPage()\" [attr.aria-label]=\"i18n.t('datepicker.nextYears')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of yearCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @case ('month') {\n <div class=\"kpt-calendar__header\">\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.month') }}</span>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of monthCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @default {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ monthLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n }\n }\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-datepicker-host{display:block}.kpt-datepicker{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-datepicker:hover:not(.kpt-datepicker--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-datepicker:focus-visible,.kpt-datepicker.kpt-datepicker--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-datepicker.kpt-datepicker--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-datepicker.kpt-datepicker--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-datepicker__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-datepicker__spacer{flex:1}.kpt-datepicker__icon{color:var(--kpt-color-on-surface-muted)}.kpt-datepicker__clear{display:inline-flex;border:0;background:none;cursor:pointer;color:var(--kpt-color-on-surface-muted);padding:0}.kpt-datepicker__clear:hover{color:var(--kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--kpt-color-muted)}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__day--muted{color:var(--kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__day:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--cells{grid-template-columns:repeat(3,1fr);gap:4px}.kpt-calendar__cell{padding:.6rem .25rem;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit;text-transform:capitalize}.kpt-calendar__cell:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__cell--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__cell:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__timebar{display:flex;align-items:center;justify-content:center;gap:var(--kpt-space-2, .5rem);width:100%;margin-top:var(--kpt-space-2, .5rem);padding:var(--kpt-space-2, .5rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.kpt-calendar__timebar:hover{background:var(--kpt-color-muted)}.kpt-calendar__timebar kpt-icon{color:var(--kpt-color-on-surface-muted)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}}\n"] }]
|
|
3779
|
-
}], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], monthDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthDisplay", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] }); })();
|
|
3780
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDatepicker, { className: "KptDatepicker", filePath: "lib/datepicker/datepicker.component.ts", lineNumber:
|
|
3917
|
+
args: [{ selector: 'kpt-datepicker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], host: { class: 'kpt-datepicker-host' }, template: "<div\n class=\"kpt-datepicker\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"button\"\n tabindex=\"0\"\n [class.kpt-datepicker--open]=\"open()\"\n [class.kpt-datepicker--disabled]=\"disabled()\"\n [class.kpt-datepicker--invalid]=\"showInvalid()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"toggleOpen()\"\n (keydown.enter)=\"toggleOpen()\"\n (blur)=\"touch.emit()\"\n>\n @if (display()) {\n <span class=\"kpt-datepicker__value\">{{ display() }}</span>\n } @else {\n <span class=\"kpt-datepicker__placeholder\">{{ effectivePlaceholder() }}</span>\n }\n <span class=\"kpt-datepicker__spacer\"></span>\n @if (display()) {\n <button type=\"button\" class=\"kpt-datepicker__clear\" (click)=\"clear($event)\" [attr.aria-label]=\"i18n.t('common.clear')\"><kpt-icon name=\"x\" /></button>\n }\n <kpt-icon\n class=\"kpt-datepicker__icon\"\n [name]=\"selectionMode() === 'time' ? 'clock' : 'calendar'\"\n />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"kpt-calendar\" [class.kpt-calendar--clock]=\"showClock()\" (keydown.escape)=\"close()\">\n @if (showClock()) {\n @if (selectionMode() === 'datetime') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"backToCalendar()\" [attr.aria-label]=\"i18n.t('datepicker.calendar')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.time') }}</span>\n </div>\n }\n <kpt-clock [(value)]=\"timeStr\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n } @else {\n <!-- Nag\u0142\u00F3wek wsp\u00F3lny dla czterech poziom\u00F3w: r\u00F3\u017Cni je tylko tre\u015B\u0107 tytu\u0142u. -->\n <div class=\"kpt-calendar__header\">\n @if (hasNav()) {\n <button type=\"button\" class=\"kpt-calendar__nav\" [disabled]=\"!canPageBack()\" (click)=\"pagePrev()\" [attr.aria-label]=\"navPrevLabel()\"><kpt-icon name=\"chevron-left\" /></button>\n }\n <span class=\"kpt-calendar__titles\">\n @switch (panelView()) {\n @case ('day') {\n <button type=\"button\" class=\"kpt-calendar__title-btn\" (click)=\"goTo('month')\" [attr.aria-label]=\"i18n.t('datepicker.chooseMonth')\">{{ monthName() }}</button>\n <button type=\"button\" class=\"kpt-calendar__title-btn\" (click)=\"goTo('year')\" [attr.aria-label]=\"i18n.t('datepicker.chooseYear')\">{{ viewYear() }}</button>\n }\n @case ('month') {\n @if (selectionMode() === 'month') {\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.month') }}</span>\n } @else {\n <button type=\"button\" class=\"kpt-calendar__title-btn\" (click)=\"goTo('year')\" [attr.aria-label]=\"i18n.t('datepicker.chooseYear')\">{{ viewYear() }}</button>\n }\n }\n @case ('year') {\n <button type=\"button\" class=\"kpt-calendar__title-btn\" (click)=\"goTo('decade')\" [attr.aria-label]=\"i18n.t('datepicker.chooseDecade')\">{{ yearRangeLabel() }}</button>\n }\n @case ('decade') {\n <span class=\"kpt-calendar__title\">{{ decadeRangeLabel() }}</span>\n }\n }\n </span>\n @if (hasNav()) {\n <button type=\"button\" class=\"kpt-calendar__nav\" [disabled]=\"!canPageForward()\" (click)=\"pageNext()\" [attr.aria-label]=\"navNextLabel()\"><kpt-icon name=\"chevron-right\" /></button>\n }\n </div>\n\n @switch (panelView()) {\n @case ('day') {\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n }\n @default {\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\" [class.kpt-calendar__grid--decades]=\"panelView() === 'decade'\">\n @for (cell of levelCells(); track cell.label) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [class.kpt-calendar__cell--current]=\"cell.current\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n }\n\n @if (selectionMode() === 'datetime') {\n <button type=\"button\" class=\"kpt-calendar__timebar\" (click)=\"openClock()\">\n <kpt-icon name=\"clock\" />\n <span>{{ timeBarLabel() }}</span>\n </button>\n }\n }\n @if (hasFooter()) {\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-datepicker-host{display:block}.kpt-datepicker{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-datepicker:hover:not(.kpt-datepicker--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-datepicker:focus-visible,.kpt-datepicker.kpt-datepicker--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-datepicker.kpt-datepicker--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-datepicker.kpt-datepicker--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-datepicker__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-datepicker__spacer{flex:1}.kpt-datepicker__icon{color:var(--kpt-color-on-surface-muted)}.kpt-datepicker__clear{display:inline-flex;border:0;background:none;cursor:pointer;color:var(--kpt-color-on-surface-muted);padding:0}.kpt-datepicker__clear:hover{color:var(--kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__titles{display:flex;align-items:center;gap:var(--kpt-space-1, .25rem)}.kpt-calendar__title-btn{padding:.25rem var(--kpt-space-2, .5rem);border:0;border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-color-muted);color:var(--kpt-color-on-surface);font:inherit;font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize;cursor:pointer}.kpt-calendar__title-btn:hover{background:var(--kpt-color-muted-hover)}.kpt-calendar__title-btn:focus-visible{outline:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border-strong);outline-offset:1px}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__nav:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__day--muted{color:var(--kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__day:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--cells{grid-template-columns:repeat(3,1fr);gap:4px}.kpt-calendar__cell{padding:.6rem .25rem;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit;text-transform:capitalize}.kpt-calendar__cell:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__cell--current{box-shadow:inset 0 0 0 1px var(--kpt-color-border-strong)}.kpt-calendar__cell--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__cell:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--decades .kpt-calendar__cell{padding-inline:0;font-size:var(--kpt-font-size-xs, .75rem);white-space:nowrap}.kpt-calendar__timebar{display:flex;align-items:center;justify-content:center;gap:var(--kpt-space-2, .5rem);width:100%;margin-top:var(--kpt-space-2, .5rem);padding:var(--kpt-space-2, .5rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.kpt-calendar__timebar:hover{background:var(--kpt-color-muted)}.kpt-calendar__timebar kpt-icon{color:var(--kpt-color-on-surface-muted)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}}\n"] }]
|
|
3918
|
+
}], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], startView: [{ type: i0.Input, args: [{ isSignal: true, alias: "startView", required: false }] }], monthDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthDisplay", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] }); })();
|
|
3919
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDatepicker, { className: "KptDatepicker", filePath: "lib/datepicker/datepicker.component.ts", lineNumber: 81 }); })();
|
|
3781
3920
|
|
|
3782
3921
|
const _c0$u = ["ta"];
|
|
3783
3922
|
/**
|
|
@@ -5879,7 +6018,8 @@ class KptColorPicker {
|
|
|
5879
6018
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
|
|
5880
6019
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptColorPicker, { className: "KptColorPicker", filePath: "lib/color-picker/color-picker.component.ts", lineNumber: 52 }); })();
|
|
5881
6020
|
|
|
5882
|
-
const _forTrack0$5 = ($index, $item) => $item.
|
|
6021
|
+
const _forTrack0$5 = ($index, $item) => $item.key;
|
|
6022
|
+
const _forTrack1$1 = ($index, $item) => $item.iso;
|
|
5883
6023
|
function KptDateRange_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
5884
6024
|
i0.ɵɵelementStart(0, "span", 2);
|
|
5885
6025
|
i0.ɵɵtext(1);
|
|
@@ -5956,64 +6096,129 @@ function KptDateRange_ng_template_7_Conditional_1_Template(rf, ctx) { if (rf & 1
|
|
|
5956
6096
|
i0.ɵɵadvance(4);
|
|
5957
6097
|
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("common.done"));
|
|
5958
6098
|
} }
|
|
5959
|
-
function
|
|
5960
|
-
i0.ɵɵ
|
|
6099
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
6100
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
6101
|
+
i0.ɵɵelementStart(0, "button", 26);
|
|
6102
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.prevMonth()); });
|
|
6103
|
+
i0.ɵɵelement(1, "kpt-icon", 27);
|
|
6104
|
+
i0.ɵɵelementEnd();
|
|
6105
|
+
} if (rf & 2) {
|
|
6106
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
6107
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.prevMonth"));
|
|
6108
|
+
} }
|
|
6109
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
6110
|
+
i0.ɵɵelement(0, "span", 21);
|
|
6111
|
+
} }
|
|
6112
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
6113
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
6114
|
+
i0.ɵɵelementStart(0, "button", 26);
|
|
6115
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.nextMonth()); });
|
|
6116
|
+
i0.ɵɵelement(1, "kpt-icon", 28);
|
|
6117
|
+
i0.ɵɵelementEnd();
|
|
6118
|
+
} if (rf & 2) {
|
|
6119
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
6120
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.nextMonth"));
|
|
6121
|
+
} }
|
|
6122
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
6123
|
+
i0.ɵɵelement(0, "span", 21);
|
|
6124
|
+
} }
|
|
6125
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
6126
|
+
i0.ɵɵelementStart(0, "span", 24);
|
|
5961
6127
|
i0.ɵɵtext(1);
|
|
5962
6128
|
i0.ɵɵelementEnd();
|
|
5963
6129
|
} if (rf & 2) {
|
|
5964
|
-
const
|
|
6130
|
+
const wd_r9 = ctx.$implicit;
|
|
5965
6131
|
i0.ɵɵadvance();
|
|
5966
|
-
i0.ɵɵtextInterpolate(
|
|
6132
|
+
i0.ɵɵtextInterpolate(wd_r9);
|
|
5967
6133
|
} }
|
|
5968
|
-
function
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
6134
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
6135
|
+
i0.ɵɵelement(0, "span", 29);
|
|
6136
|
+
} }
|
|
6137
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
6138
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
6139
|
+
i0.ɵɵelementStart(0, "button", 31);
|
|
6140
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const cell_r11 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r0.selectDay(cell_r11)); });
|
|
5972
6141
|
i0.ɵɵtext(1);
|
|
5973
6142
|
i0.ɵɵelementEnd();
|
|
5974
6143
|
} if (rf & 2) {
|
|
5975
|
-
const
|
|
5976
|
-
i0.ɵɵclassProp("kpt-calendar__day--muted", !
|
|
6144
|
+
const cell_r11 = i0.ɵɵnextContext().$implicit;
|
|
6145
|
+
i0.ɵɵclassProp("kpt-calendar__day--muted", !cell_r11.inMonth)("kpt-calendar__day--today", cell_r11.today)("kpt-calendar__day--range", cell_r11.inRange)("kpt-calendar__day--range-start", cell_r11.rangeStart)("kpt-calendar__day--range-end", cell_r11.rangeEnd)("kpt-calendar__day--selected", cell_r11.isStart || cell_r11.isEnd);
|
|
5977
6146
|
i0.ɵɵadvance();
|
|
5978
|
-
i0.ɵɵtextInterpolate(
|
|
6147
|
+
i0.ɵɵtextInterpolate(cell_r11.day);
|
|
5979
6148
|
} }
|
|
5980
|
-
function
|
|
5981
|
-
i0.ɵɵ
|
|
6149
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
6150
|
+
i0.ɵɵconditionalCreate(0, KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Conditional_0_Template, 1, 0, "span", 29)(1, KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Conditional_1_Template, 2, 13, "button", 30);
|
|
5982
6151
|
} if (rf & 2) {
|
|
5983
|
-
const
|
|
5984
|
-
i0.ɵɵ
|
|
6152
|
+
const cell_r11 = ctx.$implicit;
|
|
6153
|
+
i0.ɵɵconditional(cell_r11.blank ? 0 : 1);
|
|
5985
6154
|
} }
|
|
5986
|
-
function
|
|
5987
|
-
|
|
6155
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_For_13_Template(rf, ctx) { if (rf & 1) {
|
|
6156
|
+
i0.ɵɵrepeaterCreate(0, KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Template, 2, 1, null, null, _forTrack1$1);
|
|
6157
|
+
} if (rf & 2) {
|
|
6158
|
+
const week_r12 = ctx.$implicit;
|
|
6159
|
+
i0.ɵɵrepeater(week_r12);
|
|
6160
|
+
} }
|
|
6161
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
6162
|
+
i0.ɵɵelementStart(0, "div", 18)(1, "div", 19);
|
|
6163
|
+
i0.ɵɵconditionalCreate(2, KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_2_Template, 2, 1, "button", 20)(3, KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_3_Template, 1, 0, "span", 21);
|
|
6164
|
+
i0.ɵɵelementStart(4, "span", 22);
|
|
6165
|
+
i0.ɵɵtext(5);
|
|
6166
|
+
i0.ɵɵelementEnd();
|
|
6167
|
+
i0.ɵɵconditionalCreate(6, KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_6_Template, 2, 1, "button", 20)(7, KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_7_Template, 1, 0, "span", 21);
|
|
6168
|
+
i0.ɵɵelementEnd();
|
|
6169
|
+
i0.ɵɵelementStart(8, "div", 23);
|
|
6170
|
+
i0.ɵɵrepeaterCreate(9, KptDateRange_ng_template_7_Conditional_2_For_2_For_10_Template, 2, 1, "span", 24, i0.ɵɵrepeaterTrackByIdentity);
|
|
6171
|
+
i0.ɵɵelementEnd();
|
|
6172
|
+
i0.ɵɵelementStart(11, "div", 25);
|
|
6173
|
+
i0.ɵɵrepeaterCreate(12, KptDateRange_ng_template_7_Conditional_2_For_2_For_13_Template, 2, 0, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
6174
|
+
i0.ɵɵelementEnd()();
|
|
6175
|
+
} if (rf & 2) {
|
|
6176
|
+
const panel_r13 = ctx.$implicit;
|
|
6177
|
+
const ɵ$index_47_r14 = ctx.$index;
|
|
6178
|
+
const ɵ$count_47_r15 = ctx.$count;
|
|
6179
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
6180
|
+
i0.ɵɵadvance(2);
|
|
6181
|
+
i0.ɵɵconditional(ɵ$index_47_r14 === 0 ? 2 : 3);
|
|
6182
|
+
i0.ɵɵadvance(3);
|
|
6183
|
+
i0.ɵɵtextInterpolate(panel_r13.label);
|
|
6184
|
+
i0.ɵɵadvance();
|
|
6185
|
+
i0.ɵɵconditional(ɵ$index_47_r14 === ɵ$count_47_r15 - 1 ? 6 : 7);
|
|
6186
|
+
i0.ɵɵadvance(3);
|
|
6187
|
+
i0.ɵɵrepeater(ctx_r0.weekdays());
|
|
6188
|
+
i0.ɵɵadvance(3);
|
|
6189
|
+
i0.ɵɵrepeater(panel_r13.weeks);
|
|
6190
|
+
} }
|
|
6191
|
+
function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
6192
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
5988
6193
|
i0.ɵɵelementStart(0, "kpt-clock", 16);
|
|
5989
|
-
i0.ɵɵlistener("valueChange", function
|
|
6194
|
+
i0.ɵɵlistener("valueChange", function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_5_Template_kpt_clock_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.startTime.set($event)); });
|
|
5990
6195
|
i0.ɵɵelementEnd();
|
|
5991
6196
|
} if (rf & 2) {
|
|
5992
6197
|
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
5993
6198
|
i0.ɵɵproperty("value", ctx_r0.startTime())("hourFormat", ctx_r0.hourFormat())("minuteStep", ctx_r0.minuteStep());
|
|
5994
6199
|
} }
|
|
5995
|
-
function
|
|
5996
|
-
const
|
|
6200
|
+
function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
6201
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
5997
6202
|
i0.ɵɵelementStart(0, "kpt-clock", 16);
|
|
5998
|
-
i0.ɵɵlistener("valueChange", function
|
|
6203
|
+
i0.ɵɵlistener("valueChange", function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_6_Template_kpt_clock_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.endTime.set($event)); });
|
|
5999
6204
|
i0.ɵɵelementEnd();
|
|
6000
6205
|
} if (rf & 2) {
|
|
6001
6206
|
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
6002
6207
|
i0.ɵɵproperty("value", ctx_r0.endTime())("hourFormat", ctx_r0.hourFormat())("minuteStep", ctx_r0.minuteStep());
|
|
6003
6208
|
} }
|
|
6004
|
-
function
|
|
6005
|
-
const
|
|
6209
|
+
function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
6210
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
6006
6211
|
i0.ɵɵelementStart(0, "div", 11)(1, "button", 12);
|
|
6007
|
-
i0.ɵɵlistener("click", function
|
|
6212
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r16); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.timeEnd.set("start")); });
|
|
6008
6213
|
i0.ɵɵtext(2);
|
|
6009
6214
|
i0.ɵɵelementEnd();
|
|
6010
6215
|
i0.ɵɵelementStart(3, "button", 12);
|
|
6011
|
-
i0.ɵɵlistener("click", function
|
|
6216
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r16); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.timeEnd.set("end")); });
|
|
6012
6217
|
i0.ɵɵtext(4);
|
|
6013
6218
|
i0.ɵɵelementEnd()();
|
|
6014
|
-
i0.ɵɵconditionalCreate(5,
|
|
6219
|
+
i0.ɵɵconditionalCreate(5, KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_5_Template, 1, 3, "kpt-clock", 13)(6, KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_6_Template, 1, 3, "kpt-clock", 13);
|
|
6015
6220
|
i0.ɵɵelementStart(7, "div", 14)(8, "kpt-button", 15);
|
|
6016
|
-
i0.ɵɵlistener("click", function
|
|
6221
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template_kpt_button_click_8_listener() { i0.ɵɵrestoreView(_r16); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.commit()); });
|
|
6017
6222
|
i0.ɵɵtext(9);
|
|
6018
6223
|
i0.ɵɵelementEnd()();
|
|
6019
6224
|
} if (rf & 2) {
|
|
@@ -6032,49 +6237,26 @@ function KptDateRange_ng_template_7_Conditional_2_Conditional_13_Template(rf, ct
|
|
|
6032
6237
|
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("common.done"));
|
|
6033
6238
|
} }
|
|
6034
6239
|
function KptDateRange_ng_template_7_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
6035
|
-
|
|
6036
|
-
i0.ɵɵ
|
|
6037
|
-
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.prevMonth()); });
|
|
6038
|
-
i0.ɵɵelement(2, "kpt-icon", 19);
|
|
6039
|
-
i0.ɵɵelementEnd();
|
|
6040
|
-
i0.ɵɵelementStart(3, "span", 20);
|
|
6041
|
-
i0.ɵɵtext(4);
|
|
6240
|
+
i0.ɵɵelementStart(0, "div", 17);
|
|
6241
|
+
i0.ɵɵrepeaterCreate(1, KptDateRange_ng_template_7_Conditional_2_For_2_Template, 14, 3, "div", 18, _forTrack0$5);
|
|
6042
6242
|
i0.ɵɵelementEnd();
|
|
6043
|
-
i0.ɵɵ
|
|
6044
|
-
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.nextMonth()); });
|
|
6045
|
-
i0.ɵɵelement(6, "kpt-icon", 21);
|
|
6046
|
-
i0.ɵɵelementEnd()();
|
|
6047
|
-
i0.ɵɵelementStart(7, "div", 22);
|
|
6048
|
-
i0.ɵɵrepeaterCreate(8, KptDateRange_ng_template_7_Conditional_2_For_9_Template, 2, 1, "span", 23, i0.ɵɵrepeaterTrackByIdentity);
|
|
6049
|
-
i0.ɵɵelementEnd();
|
|
6050
|
-
i0.ɵɵelementStart(10, "div", 24);
|
|
6051
|
-
i0.ɵɵrepeaterCreate(11, KptDateRange_ng_template_7_Conditional_2_For_12_Template, 2, 0, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
6052
|
-
i0.ɵɵelementEnd();
|
|
6053
|
-
i0.ɵɵconditionalCreate(13, KptDateRange_ng_template_7_Conditional_2_Conditional_13_Template, 10, 8);
|
|
6243
|
+
i0.ɵɵconditionalCreate(3, KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template, 10, 8);
|
|
6054
6244
|
} if (rf & 2) {
|
|
6055
6245
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
6056
6246
|
i0.ɵɵadvance();
|
|
6057
|
-
i0.ɵɵ
|
|
6058
|
-
i0.ɵɵadvance(3);
|
|
6059
|
-
i0.ɵɵtextInterpolate(ctx_r0.monthLabel());
|
|
6060
|
-
i0.ɵɵadvance();
|
|
6061
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.nextMonth"));
|
|
6062
|
-
i0.ɵɵadvance(3);
|
|
6063
|
-
i0.ɵɵrepeater(ctx_r0.weekdays());
|
|
6064
|
-
i0.ɵɵadvance(3);
|
|
6065
|
-
i0.ɵɵrepeater(ctx_r0.weeks());
|
|
6247
|
+
i0.ɵɵrepeater(ctx_r0.panels());
|
|
6066
6248
|
i0.ɵɵadvance(2);
|
|
6067
|
-
i0.ɵɵconditional(ctx_r0.mode() === "datetime" ?
|
|
6249
|
+
i0.ɵɵconditional(ctx_r0.mode() === "datetime" ? 3 : -1);
|
|
6068
6250
|
} }
|
|
6069
6251
|
function KptDateRange_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
6070
6252
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
6071
6253
|
i0.ɵɵelementStart(0, "div", 10);
|
|
6072
6254
|
i0.ɵɵlistener("keydown.escape", function KptDateRange_ng_template_7_Template_div_keydown_escape_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.close()); });
|
|
6073
|
-
i0.ɵɵconditionalCreate(1, KptDateRange_ng_template_7_Conditional_1_Template, 10, 8)(2, KptDateRange_ng_template_7_Conditional_2_Template,
|
|
6255
|
+
i0.ɵɵconditionalCreate(1, KptDateRange_ng_template_7_Conditional_1_Template, 10, 8)(2, KptDateRange_ng_template_7_Conditional_2_Template, 4, 1);
|
|
6074
6256
|
i0.ɵɵelementEnd();
|
|
6075
6257
|
} if (rf & 2) {
|
|
6076
6258
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
6077
|
-
i0.ɵɵclassProp("kpt-calendar--clock", ctx_r0.mode() === "time");
|
|
6259
|
+
i0.ɵɵclassProp("kpt-calendar--clock", ctx_r0.mode() === "time")("kpt-calendar--range", ctx_r0.mode() !== "time")("kpt-calendar--multi", ctx_r0.multi() && ctx_r0.mode() !== "time");
|
|
6078
6260
|
i0.ɵɵadvance();
|
|
6079
6261
|
i0.ɵɵconditional(ctx_r0.mode() === "time" ? 1 : 2);
|
|
6080
6262
|
} }
|
|
@@ -6083,11 +6265,14 @@ const toIso = (d) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDat
|
|
|
6083
6265
|
/**
|
|
6084
6266
|
* Wybór zakresu dat z kalendarzem (CDK Overlay), Signal Forms.
|
|
6085
6267
|
* `mode`: 'date' (domyślnie), 'datetime' (data+godzina, tarcza zegara), 'time' (sama godzina).
|
|
6268
|
+
* `visibleMonths` pokazuje kilka miesięcy obok siebie (typowo 2) — zakres podświetla się
|
|
6269
|
+
* ciągłym pasmem przez wszystkie panele.
|
|
6086
6270
|
* Wartość: `{ start, end }` — daty 'RRRR-MM-DD', datetime 'RRRR-MM-DDTHH:mm', godziny 'HH:mm'.
|
|
6087
6271
|
* Wymaga `import '@angular/cdk/overlay-prebuilt.css';`
|
|
6088
6272
|
*
|
|
6089
6273
|
* @example
|
|
6090
6274
|
* <kpt-date-range [formField]="f.period" />
|
|
6275
|
+
* <kpt-date-range [visibleMonths]="2" [(value)]="period" />
|
|
6091
6276
|
* <kpt-date-range mode="datetime" [hourFormat]="12" [(value)]="span" />
|
|
6092
6277
|
* <kpt-date-range mode="time" [(value)]="hours" />
|
|
6093
6278
|
*/
|
|
@@ -6109,6 +6294,8 @@ class KptDateRange {
|
|
|
6109
6294
|
...(ngDevMode ? [{ debugName: "displayFormat" }] : /* istanbul ignore next */ []));
|
|
6110
6295
|
this.mode = input('date', /* @ts-ignore */
|
|
6111
6296
|
...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
6297
|
+
/** Liczba miesięcy obok siebie (1–3; domyślnie 1). Ignorowana w trybie 'time'. */
|
|
6298
|
+
this.visibleMonths = input(1, { ...(ngDevMode ? { debugName: "visibleMonths" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
6112
6299
|
this.hourFormat = input(24, { ...(ngDevMode ? { debugName: "hourFormat" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
6113
6300
|
this.minuteStep = input(1, { ...(ngDevMode ? { debugName: "minuteStep" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
6114
6301
|
this.i18n = inject(KptI18n);
|
|
@@ -6139,11 +6326,13 @@ class KptDateRange {
|
|
|
6139
6326
|
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
6140
6327
|
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
|
|
6141
6328
|
];
|
|
6142
|
-
this.
|
|
6143
|
-
const
|
|
6144
|
-
return
|
|
6329
|
+
this.panelCount = computed(() => {
|
|
6330
|
+
const n = Math.trunc(this.visibleMonths());
|
|
6331
|
+
return Number.isFinite(n) ? Math.min(3, Math.max(1, n)) : 1;
|
|
6145
6332
|
}, /* @ts-ignore */
|
|
6146
|
-
...(ngDevMode ? [{ debugName: "
|
|
6333
|
+
...(ngDevMode ? [{ debugName: "panelCount" }] : /* istanbul ignore next */ []));
|
|
6334
|
+
this.multi = computed(() => this.panelCount() > 1, /* @ts-ignore */
|
|
6335
|
+
...(ngDevMode ? [{ debugName: "multi" }] : /* istanbul ignore next */ []));
|
|
6147
6336
|
this.display = computed(() => {
|
|
6148
6337
|
const { start, end } = this.value();
|
|
6149
6338
|
if (!start)
|
|
@@ -6163,34 +6352,25 @@ class KptDateRange {
|
|
|
6163
6352
|
return end ? `${this.fmtDate(start)} – ${this.fmtDate(end)}` : `${this.fmtDate(start)} – …`;
|
|
6164
6353
|
}, /* @ts-ignore */
|
|
6165
6354
|
...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
|
|
6166
|
-
|
|
6355
|
+
/**
|
|
6356
|
+
* Panele miesięcy. Przy kilku panelach dni sąsiednich miesięcy są wygaszane do pustych slotów:
|
|
6357
|
+
* inaczej ta sama data byłaby klikalna dwa razy (jako „wyszarzona" w jednym panelu i właściwa
|
|
6358
|
+
* w drugim) i pasmo zakresu malowałoby się w obu miejscach.
|
|
6359
|
+
*/
|
|
6360
|
+
this.panels = computed(() => {
|
|
6167
6361
|
const { y, m } = this.view();
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
const iso = toIso(date);
|
|
6179
|
-
row.push({
|
|
6180
|
-
day: date.getDate(),
|
|
6181
|
-
iso,
|
|
6182
|
-
inMonth: date.getMonth() === m,
|
|
6183
|
-
isStart: iso === start,
|
|
6184
|
-
isEnd: iso === end,
|
|
6185
|
-
inRange: !!start && !!end && iso > start && iso < end,
|
|
6186
|
-
disabled: false,
|
|
6187
|
-
});
|
|
6188
|
-
}
|
|
6189
|
-
weeks.push(row);
|
|
6190
|
-
}
|
|
6191
|
-
return weeks;
|
|
6362
|
+
return Array.from({ length: this.panelCount() }, (_, i) => {
|
|
6363
|
+
const first = new Date(y, m + i, 1);
|
|
6364
|
+
const py = first.getFullYear();
|
|
6365
|
+
const pm = first.getMonth();
|
|
6366
|
+
return {
|
|
6367
|
+
key: `${py}-${pad(pm + 1)}`,
|
|
6368
|
+
label: `${this.months()[pm]} ${py}`,
|
|
6369
|
+
weeks: this.buildWeeks(py, pm),
|
|
6370
|
+
};
|
|
6371
|
+
});
|
|
6192
6372
|
}, /* @ts-ignore */
|
|
6193
|
-
...(ngDevMode ? [{ debugName: "
|
|
6373
|
+
...(ngDevMode ? [{ debugName: "panels" }] : /* istanbul ignore next */ []));
|
|
6194
6374
|
}
|
|
6195
6375
|
datePart(v) {
|
|
6196
6376
|
return v ? v.slice(0, 10) : '';
|
|
@@ -6216,6 +6396,41 @@ class KptDateRange {
|
|
|
6216
6396
|
}
|
|
6217
6397
|
return hhmm;
|
|
6218
6398
|
}
|
|
6399
|
+
buildWeeks(y, m) {
|
|
6400
|
+
const datetime = this.mode() === 'datetime';
|
|
6401
|
+
const start = datetime ? this.startDate() : this.value().start;
|
|
6402
|
+
const end = datetime ? this.endDate() : this.value().end;
|
|
6403
|
+
const hasBand = !!start && !!end && start < end;
|
|
6404
|
+
const hideOutside = this.multi();
|
|
6405
|
+
const todayIso = toIso(this.today);
|
|
6406
|
+
const first = new Date(y, m, 1);
|
|
6407
|
+
const startOffset = (first.getDay() + 6) % 7;
|
|
6408
|
+
const gridStart = new Date(y, m, 1 - startOffset);
|
|
6409
|
+
const weeks = [];
|
|
6410
|
+
for (let w = 0; w < 6; w++) {
|
|
6411
|
+
const row = [];
|
|
6412
|
+
for (let d = 0; d < 7; d++) {
|
|
6413
|
+
const date = new Date(gridStart.getFullYear(), gridStart.getMonth(), gridStart.getDate() + w * 7 + d);
|
|
6414
|
+
const iso = toIso(date);
|
|
6415
|
+
const inMonth = date.getMonth() === m;
|
|
6416
|
+
row.push({
|
|
6417
|
+
day: date.getDate(),
|
|
6418
|
+
iso,
|
|
6419
|
+
inMonth,
|
|
6420
|
+
today: iso === todayIso,
|
|
6421
|
+
isStart: iso === start,
|
|
6422
|
+
isEnd: iso === end,
|
|
6423
|
+
inRange: hasBand && iso > start && iso < end,
|
|
6424
|
+
rangeStart: hasBand && iso === start,
|
|
6425
|
+
rangeEnd: hasBand && iso === end,
|
|
6426
|
+
blank: hideOutside && !inMonth,
|
|
6427
|
+
disabled: false,
|
|
6428
|
+
});
|
|
6429
|
+
}
|
|
6430
|
+
weeks.push(row);
|
|
6431
|
+
}
|
|
6432
|
+
return weeks;
|
|
6433
|
+
}
|
|
6219
6434
|
toggleOpen() {
|
|
6220
6435
|
if (this.disabled())
|
|
6221
6436
|
return;
|
|
@@ -6245,6 +6460,8 @@ class KptDateRange {
|
|
|
6245
6460
|
this.touch.emit();
|
|
6246
6461
|
}
|
|
6247
6462
|
selectDay(cell) {
|
|
6463
|
+
if (cell.blank || cell.disabled)
|
|
6464
|
+
return;
|
|
6248
6465
|
if (this.mode() === 'datetime') {
|
|
6249
6466
|
const start = this.startDate();
|
|
6250
6467
|
const end = this.endDate();
|
|
@@ -6306,7 +6523,7 @@ class KptDateRange {
|
|
|
6306
6523
|
this.endDate.set('');
|
|
6307
6524
|
}
|
|
6308
6525
|
static { this.ɵfac = function KptDateRange_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptDateRange)(); }; }
|
|
6309
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDateRange, selectors: [["kpt-date-range"]], hostAttrs: [1, "kpt-date-range-host"], inputs: { value: [1, "value"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], placeholder: [1, "placeholder"], displayFormat: [1, "displayFormat"], mode: [1, "mode"], hourFormat: [1, "hourFormat"], minuteStep: [1, "minuteStep"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 8, vars: 12, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "button", "tabindex", "0", 1, "kpt-date-range", 3, "click", "keydown.enter", "blur"], [1, "kpt-date-range__value"], [1, "kpt-date-range__placeholder"], [1, "kpt-date-range__spacer"], ["type", "button", 1, "kpt-date-range__clear"], ["name", "calendar", 1, "kpt-date-range__icon"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["type", "button", 1, "kpt-date-range__clear", 3, "click"], ["name", "x"], [1, "kpt-calendar", 3, "keydown.escape"], [1, "kpt-range-tabs"], ["type", "button", 3, "click"], [3, "value", "hourFormat", "minuteStep"], [1, "kpt-calendar__footer"], ["size", "sm", 3, "click"], [3, "valueChange", "value", "hourFormat", "minuteStep"], [1, "kpt-calendar__header"], ["type", "button", 1, "kpt-calendar__nav",
|
|
6526
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDateRange, selectors: [["kpt-date-range"]], hostAttrs: [1, "kpt-date-range-host"], inputs: { value: [1, "value"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], placeholder: [1, "placeholder"], displayFormat: [1, "displayFormat"], mode: [1, "mode"], visibleMonths: [1, "visibleMonths"], hourFormat: [1, "hourFormat"], minuteStep: [1, "minuteStep"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 8, vars: 12, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "button", "tabindex", "0", 1, "kpt-date-range", 3, "click", "keydown.enter", "blur"], [1, "kpt-date-range__value"], [1, "kpt-date-range__placeholder"], [1, "kpt-date-range__spacer"], ["type", "button", 1, "kpt-date-range__clear"], ["name", "calendar", 1, "kpt-date-range__icon"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["type", "button", 1, "kpt-date-range__clear", 3, "click"], ["name", "x"], [1, "kpt-calendar", 3, "keydown.escape"], [1, "kpt-range-tabs"], ["type", "button", 3, "click"], [3, "value", "hourFormat", "minuteStep"], [1, "kpt-calendar__footer"], ["size", "sm", 3, "click"], [3, "valueChange", "value", "hourFormat", "minuteStep"], [1, "kpt-calendar__panels"], [1, "kpt-calendar__panel"], [1, "kpt-calendar__header"], ["type", "button", 1, "kpt-calendar__nav"], [1, "kpt-calendar__nav-slot"], [1, "kpt-calendar__title"], [1, "kpt-calendar__weekdays"], [1, "kpt-calendar__weekday"], [1, "kpt-calendar__grid"], ["type", "button", 1, "kpt-calendar__nav", 3, "click"], ["name", "chevron-left"], ["name", "chevron-right"], [1, "kpt-calendar__day", "kpt-calendar__day--blank"], ["type", "button", 1, "kpt-calendar__day", 3, "kpt-calendar__day--muted", "kpt-calendar__day--today", "kpt-calendar__day--range", "kpt-calendar__day--range-start", "kpt-calendar__day--range-end", "kpt-calendar__day--selected"], ["type", "button", 1, "kpt-calendar__day", 3, "click"]], template: function KptDateRange_Template(rf, ctx) { if (rf & 1) {
|
|
6310
6527
|
i0.ɵɵelementStart(0, "div", 1, 0);
|
|
6311
6528
|
i0.ɵɵlistener("click", function KptDateRange_Template_div_click_0_listener() { return ctx.toggleOpen(); })("keydown.enter", function KptDateRange_Template_div_keydown_enter_0_listener() { return ctx.toggleOpen(); })("blur", function KptDateRange_Template_div_blur_0_listener() { return ctx.touch.emit(); });
|
|
6312
6529
|
i0.ɵɵconditionalCreate(2, KptDateRange_Conditional_2_Template, 2, 1, "span", 2)(3, KptDateRange_Conditional_3_Template, 2, 1, "span", 3);
|
|
@@ -6314,24 +6531,24 @@ class KptDateRange {
|
|
|
6314
6531
|
i0.ɵɵconditionalCreate(5, KptDateRange_Conditional_5_Template, 2, 1, "button", 5);
|
|
6315
6532
|
i0.ɵɵelement(6, "kpt-icon", 6);
|
|
6316
6533
|
i0.ɵɵelementEnd();
|
|
6317
|
-
i0.ɵɵtemplate(7, KptDateRange_ng_template_7_Template, 3,
|
|
6534
|
+
i0.ɵɵtemplate(7, KptDateRange_ng_template_7_Template, 3, 7, "ng-template", 7);
|
|
6318
6535
|
i0.ɵɵlistener("backdropClick", function KptDateRange_Template_ng_template_backdropClick_7_listener() { return ctx.close(); })("detach", function KptDateRange_Template_ng_template_detach_7_listener() { return ctx.close(); });
|
|
6319
6536
|
} if (rf & 2) {
|
|
6320
|
-
const
|
|
6537
|
+
const trigger_r19 = i0.ɵɵreference(1);
|
|
6321
6538
|
i0.ɵɵclassProp("kpt-date-range--open", ctx.open())("kpt-date-range--disabled", ctx.disabled())("kpt-date-range--invalid", ctx.showInvalid());
|
|
6322
6539
|
i0.ɵɵadvance(2);
|
|
6323
6540
|
i0.ɵɵconditional(ctx.display() ? 2 : 3);
|
|
6324
6541
|
i0.ɵɵadvance(3);
|
|
6325
6542
|
i0.ɵɵconditional(ctx.display() ? 5 : -1);
|
|
6326
6543
|
i0.ɵɵadvance(2);
|
|
6327
|
-
i0.ɵɵproperty("cdkConnectedOverlayOrigin",
|
|
6328
|
-
} }, dependencies: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], styles: ["@layer kpt.components{.kpt-date-range-host{display:block}.kpt-date-range{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--%NS%kpt-space-3, .75rem);box-sizing:border-box;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-date-range:hover:not(.kpt-date-range--disabled){border-color:var(--%NS%kpt-form-field-border-hover)}.kpt-date-range:focus-visible,.kpt-date-range.kpt-date-range--open{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-date-range.kpt-date-range--invalid{border-color:var(--%NS%kpt-form-field-border-error)}.kpt-date-range.kpt-date-range--disabled{cursor:not-allowed;opacity:.6;background:var(--%NS%kpt-color-surface-variant)}.kpt-date-range__placeholder{color:var(--%NS%kpt-form-field-placeholder)}.kpt-date-range__spacer{flex:1}.kpt-date-range__icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-date-range__clear{display:inline-flex;border:0;background:none;cursor:pointer;padding:0;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-date-range__clear:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:var(--%NS%kpt-elevation-3);color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--%NS%kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__day--muted{color:var(--%NS%kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--
|
|
6544
|
+
i0.ɵɵproperty("cdkConnectedOverlayOrigin", trigger_r19)("cdkConnectedOverlayOpen", ctx.open())("cdkConnectedOverlayPositions", ctx.positions)("cdkConnectedOverlayHasBackdrop", true);
|
|
6545
|
+
} }, dependencies: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-date-range-host{display:block}.kpt-date-range{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--%NS%kpt-space-3, .75rem);box-sizing:border-box;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-date-range:hover:not(.kpt-date-range--disabled){border-color:var(--%NS%kpt-form-field-border-hover)}.kpt-date-range:focus-visible,.kpt-date-range.kpt-date-range--open{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-date-range.kpt-date-range--invalid{border-color:var(--%NS%kpt-form-field-border-error)}.kpt-date-range.kpt-date-range--disabled{cursor:not-allowed;opacity:.6;background:var(--%NS%kpt-color-surface-variant)}.kpt-date-range__placeholder{color:var(--%NS%kpt-form-field-placeholder)}.kpt-date-range__spacer{flex:1}.kpt-date-range__icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-date-range__clear{display:inline-flex;border:0;background:none;cursor:pointer;padding:0;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-date-range__clear:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:var(--%NS%kpt-elevation-3);color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--%NS%kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__nav-slot{width:2rem;height:2rem}.kpt-calendar__panels{display:flex;flex-wrap:wrap;gap:var(--%NS%kpt-space-4, 1rem)}.kpt-calendar__panel{flex:none;width:15.5rem}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{position:relative;isolation:isolate;aspect-ratio:1;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__day--muted{color:var(--%NS%kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--blank{cursor:default;pointer-events:none}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--%NS%kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--%NS%kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}.kpt-calendar--multi{width:auto;max-width:calc(100vw - 2rem)}.kpt-calendar--range .kpt-calendar__day--%NS%range:before,.kpt-calendar--range .kpt-calendar__day--%NS%range-start:before,.kpt-calendar--range .kpt-calendar__day--%NS%range-end:before{content:\"\";position:absolute;inset-block:0;inset-inline:-1px;z-index:-2;background:color-mix(in oklch,var(--%NS%kpt-color-primary) 14%,transparent)}.kpt-calendar--range .kpt-calendar__day--%NS%range-start:before{inset-inline-start:50%}.kpt-calendar--range .kpt-calendar__day--%NS%range-end:before{inset-inline-end:50%}.kpt-calendar--range .kpt-calendar__day--selected{background:none!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar--range .kpt-calendar__day--%NS%selected:after{content:\"\";position:absolute;inset:0;z-index:-1;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:var(--%NS%kpt-color-primary)}.kpt-calendar--range .kpt-calendar__grid>.kpt-calendar__day:nth-child(7n+1):before{border-start-start-radius:var(--%NS%kpt-radius-sm, .25rem);border-end-start-radius:var(--%NS%kpt-radius-sm, .25rem)}.kpt-calendar--range .kpt-calendar__grid>.kpt-calendar__day:nth-child(7n):before{border-start-end-radius:var(--%NS%kpt-radius-sm, .25rem);border-end-end-radius:var(--%NS%kpt-radius-sm, .25rem)}.kpt-range-tabs{display:flex;gap:var(--%NS%kpt-space-1, .25rem);margin-block:var(--%NS%kpt-space-3, .75rem) var(--%NS%kpt-space-2, .5rem);padding:2px;background:var(--%NS%kpt-color-surface-variant);border-radius:var(--%NS%kpt-radius-md, .5rem)}.kpt-range-tabs button{flex:1;border:0;background:none;padding:var(--%NS%kpt-space-1, .25rem) var(--%NS%kpt-space-2, .5rem);border-radius:var(--%NS%kpt-radius-sm, .25rem);color:var(--%NS%kpt-color-on-surface-muted);font:inherit;font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-range-tabs button.is-active{background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface);font-weight:var(--%NS%kpt-font-weight-medium, 500);box-shadow:var(--%NS%kpt-elevation-1)}}\n"], encapsulation: 2 }); }
|
|
6329
6546
|
}
|
|
6330
6547
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptDateRange, [{
|
|
6331
6548
|
type: Component,
|
|
6332
|
-
args: [{ selector: 'kpt-date-range', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], host: { class: 'kpt-date-range-host' }, template: "<div\n class=\"kpt-date-range\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"button\"\n tabindex=\"0\"\n [class.kpt-date-range--open]=\"open()\"\n [class.kpt-date-range--disabled]=\"disabled()\"\n [class.kpt-date-range--invalid]=\"showInvalid()\"\n (click)=\"toggleOpen()\"\n (keydown.enter)=\"toggleOpen()\"\n (blur)=\"touch.emit()\"\n>\n @if (display()) {\n <span class=\"kpt-date-range__value\">{{ display() }}</span>\n } @else {\n <span class=\"kpt-date-range__placeholder\">{{ effectivePlaceholder() }}</span>\n }\n <span class=\"kpt-date-range__spacer\"></span>\n @if (display()) {\n <button type=\"button\" class=\"kpt-date-range__clear\" (click)=\"clear($event)\" [attr.aria-label]=\"i18n.t('common.clear')\"><kpt-icon name=\"x\" /></button>\n }\n <kpt-icon class=\"kpt-date-range__icon\" name=\"calendar\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"kpt-calendar\" [class.kpt-calendar--clock]=\"mode() === 'time'\" (keydown.escape)=\"close()\">\n @if (mode() === 'time') {\n <div class=\"kpt-range-tabs\">\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'start'\" (click)=\"timeEnd.set('start')\">{{ i18n.t('dateRange.from') }}</button>\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'end'\" (click)=\"timeEnd.set('end')\">{{ i18n.t('dateRange.to') }}</button>\n </div>\n @if (timeEnd() === 'start') {\n <kpt-clock [value]=\"startTime()\" (valueChange)=\"startTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n } @else {\n <kpt-clock [value]=\"endTime()\" (valueChange)=\"endTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n } @else {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ monthLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--range]=\"cell.inRange\"\n [class.kpt-calendar__day--selected]=\"cell.isStart || cell.isEnd\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n\n @if (mode() === 'datetime') {\n <div class=\"kpt-range-tabs\">\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'start'\" (click)=\"timeEnd.set('start')\">{{ i18n.t('dateRange.fromTime') }}</button>\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'end'\" (click)=\"timeEnd.set('end')\">{{ i18n.t('dateRange.toTime') }}</button>\n </div>\n @if (timeEnd() === 'start') {\n <kpt-clock [value]=\"startTime()\" (valueChange)=\"startTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n } @else {\n <kpt-clock [value]=\"endTime()\" (valueChange)=\"endTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n }\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-date-range-host{display:block}.kpt-date-range{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-date-range:hover:not(.kpt-date-range--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-date-range:focus-visible,.kpt-date-range.kpt-date-range--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-date-range.kpt-date-range--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-date-range.kpt-date-range--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-date-range__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-date-range__spacer{flex:1}.kpt-date-range__icon{color:var(--kpt-color-on-surface-muted)}.kpt-date-range__clear{display:inline-flex;border:0;background:none;cursor:pointer;padding:0;color:var(--kpt-color-on-surface-muted)}.kpt-date-range__clear:hover{color:var(--kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--kpt-color-muted)}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__day--muted{color:var(--kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--range{background:color-mix(in oklch,var(--kpt-color-primary) 14%,transparent);border-radius:0}.kpt-calendar__day--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}.kpt-range-tabs{display:flex;gap:var(--kpt-space-1, .25rem);margin-block:var(--kpt-space-3, .75rem) var(--kpt-space-2, .5rem);padding:2px;background:var(--kpt-color-surface-variant);border-radius:var(--kpt-radius-md, .5rem)}.kpt-range-tabs button{flex:1;border:0;background:none;padding:var(--kpt-space-1, .25rem) var(--kpt-space-2, .5rem);border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface-muted);font:inherit;font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-range-tabs button.is-active{background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);font-weight:var(--kpt-font-weight-medium, 500);box-shadow:var(--kpt-elevation-1)}}\n"] }]
|
|
6333
|
-
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }] }); })();
|
|
6334
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDateRange, { className: "KptDateRange", filePath: "lib/date-range/date-range.component.ts", lineNumber:
|
|
6549
|
+
args: [{ selector: 'kpt-date-range', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], host: { class: 'kpt-date-range-host' }, template: "<div\n class=\"kpt-date-range\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"button\"\n tabindex=\"0\"\n [class.kpt-date-range--open]=\"open()\"\n [class.kpt-date-range--disabled]=\"disabled()\"\n [class.kpt-date-range--invalid]=\"showInvalid()\"\n (click)=\"toggleOpen()\"\n (keydown.enter)=\"toggleOpen()\"\n (blur)=\"touch.emit()\"\n>\n @if (display()) {\n <span class=\"kpt-date-range__value\">{{ display() }}</span>\n } @else {\n <span class=\"kpt-date-range__placeholder\">{{ effectivePlaceholder() }}</span>\n }\n <span class=\"kpt-date-range__spacer\"></span>\n @if (display()) {\n <button type=\"button\" class=\"kpt-date-range__clear\" (click)=\"clear($event)\" [attr.aria-label]=\"i18n.t('common.clear')\"><kpt-icon name=\"x\" /></button>\n }\n <kpt-icon class=\"kpt-date-range__icon\" name=\"calendar\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n class=\"kpt-calendar\"\n [class.kpt-calendar--clock]=\"mode() === 'time'\"\n [class.kpt-calendar--range]=\"mode() !== 'time'\"\n [class.kpt-calendar--multi]=\"multi() && mode() !== 'time'\"\n (keydown.escape)=\"close()\"\n >\n @if (mode() === 'time') {\n <div class=\"kpt-range-tabs\">\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'start'\" (click)=\"timeEnd.set('start')\">{{ i18n.t('dateRange.from') }}</button>\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'end'\" (click)=\"timeEnd.set('end')\">{{ i18n.t('dateRange.to') }}</button>\n </div>\n @if (timeEnd() === 'start') {\n <kpt-clock [value]=\"startTime()\" (valueChange)=\"startTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n } @else {\n <kpt-clock [value]=\"endTime()\" (valueChange)=\"endTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n } @else {\n <div class=\"kpt-calendar__panels\">\n @for (panel of panels(); track panel.key; let first = $first, last = $last) {\n <div class=\"kpt-calendar__panel\">\n <!-- Strza\u0142ki tylko na skrajnych panelach; puste sloty trzymaj\u0105 tytu\u0142 na \u015Brodku. -->\n <div class=\"kpt-calendar__header\">\n @if (first) {\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n } @else {\n <span class=\"kpt-calendar__nav-slot\"></span>\n }\n <span class=\"kpt-calendar__title\">{{ panel.label }}</span>\n @if (last) {\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n } @else {\n <span class=\"kpt-calendar__nav-slot\"></span>\n }\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of panel.weeks; track $index) {\n @for (cell of week; track cell.iso) {\n @if (cell.blank) {\n <span class=\"kpt-calendar__day kpt-calendar__day--blank\"></span>\n } @else {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--range]=\"cell.inRange\"\n [class.kpt-calendar__day--range-start]=\"cell.rangeStart\"\n [class.kpt-calendar__day--range-end]=\"cell.rangeEnd\"\n [class.kpt-calendar__day--selected]=\"cell.isStart || cell.isEnd\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n }\n </div>\n </div>\n }\n </div>\n\n @if (mode() === 'datetime') {\n <div class=\"kpt-range-tabs\">\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'start'\" (click)=\"timeEnd.set('start')\">{{ i18n.t('dateRange.fromTime') }}</button>\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'end'\" (click)=\"timeEnd.set('end')\">{{ i18n.t('dateRange.toTime') }}</button>\n </div>\n @if (timeEnd() === 'start') {\n <kpt-clock [value]=\"startTime()\" (valueChange)=\"startTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n } @else {\n <kpt-clock [value]=\"endTime()\" (valueChange)=\"endTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n }\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-date-range-host{display:block}.kpt-date-range{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-date-range:hover:not(.kpt-date-range--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-date-range:focus-visible,.kpt-date-range.kpt-date-range--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-date-range.kpt-date-range--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-date-range.kpt-date-range--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-date-range__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-date-range__spacer{flex:1}.kpt-date-range__icon{color:var(--kpt-color-on-surface-muted)}.kpt-date-range__clear{display:inline-flex;border:0;background:none;cursor:pointer;padding:0;color:var(--kpt-color-on-surface-muted)}.kpt-date-range__clear:hover{color:var(--kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--kpt-color-muted)}.kpt-calendar__nav-slot{width:2rem;height:2rem}.kpt-calendar__panels{display:flex;flex-wrap:wrap;gap:var(--kpt-space-4, 1rem)}.kpt-calendar__panel{flex:none;width:15.5rem}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{position:relative;isolation:isolate;aspect-ratio:1;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__day--muted{color:var(--kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--blank{cursor:default;pointer-events:none}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}.kpt-calendar--multi{width:auto;max-width:calc(100vw - 2rem)}.kpt-calendar--range .kpt-calendar__day--range:before,.kpt-calendar--range .kpt-calendar__day--range-start:before,.kpt-calendar--range .kpt-calendar__day--range-end:before{content:\"\";position:absolute;inset-block:0;inset-inline:-1px;z-index:-2;background:color-mix(in oklch,var(--kpt-color-primary) 14%,transparent)}.kpt-calendar--range .kpt-calendar__day--range-start:before{inset-inline-start:50%}.kpt-calendar--range .kpt-calendar__day--range-end:before{inset-inline-end:50%}.kpt-calendar--range .kpt-calendar__day--selected{background:none!important;color:var(--kpt-color-on-primary)}.kpt-calendar--range .kpt-calendar__day--selected:after{content:\"\";position:absolute;inset:0;z-index:-1;border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-color-primary)}.kpt-calendar--range .kpt-calendar__grid>.kpt-calendar__day:nth-child(7n+1):before{border-start-start-radius:var(--kpt-radius-sm, .25rem);border-end-start-radius:var(--kpt-radius-sm, .25rem)}.kpt-calendar--range .kpt-calendar__grid>.kpt-calendar__day:nth-child(7n):before{border-start-end-radius:var(--kpt-radius-sm, .25rem);border-end-end-radius:var(--kpt-radius-sm, .25rem)}.kpt-range-tabs{display:flex;gap:var(--kpt-space-1, .25rem);margin-block:var(--kpt-space-3, .75rem) var(--kpt-space-2, .5rem);padding:2px;background:var(--kpt-color-surface-variant);border-radius:var(--kpt-radius-md, .5rem)}.kpt-range-tabs button{flex:1;border:0;background:none;padding:var(--kpt-space-1, .25rem) var(--kpt-space-2, .5rem);border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface-muted);font:inherit;font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-range-tabs button.is-active{background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);font-weight:var(--kpt-font-weight-medium, 500);box-shadow:var(--kpt-elevation-1)}}\n"] }]
|
|
6550
|
+
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], visibleMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibleMonths", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }] }); })();
|
|
6551
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDateRange, { className: "KptDateRange", filePath: "lib/date-range/date-range.component.ts", lineNumber: 79 }); })();
|
|
6335
6552
|
|
|
6336
6553
|
function KptInputNumber_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
6337
6554
|
const _r1 = i0.ɵɵgetCurrentView();
|