nexheal-lib 0.0.57 → 0.0.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/nexheal-lib.mjs +198 -238
- package/fesm2022/nexheal-lib.mjs.map +1 -1
- package/index.d.ts +30 -28
- package/package.json +1 -1
package/fesm2022/nexheal-lib.mjs
CHANGED
|
@@ -452,7 +452,7 @@ class CalendarControl {
|
|
|
452
452
|
dateSelected = new EventEmitter();
|
|
453
453
|
/** Emitted in `selectionMode="week"` with the selected week's start/end (or null when cleared). */
|
|
454
454
|
weekSelected = new EventEmitter();
|
|
455
|
-
/** Emitted in `selectionMode="range"` with the selected start/end (or null when cleared). */
|
|
455
|
+
/** Emitted in `selectionMode="range"` with the selected range's start/end (or null when cleared). */
|
|
456
456
|
rangeSelected = new EventEmitter();
|
|
457
457
|
_defaultDate;
|
|
458
458
|
get defaultDate() {
|
|
@@ -505,11 +505,12 @@ class CalendarControl {
|
|
|
505
505
|
selectedWeekEnd = null;
|
|
506
506
|
hoverWeekStart = null;
|
|
507
507
|
hoverWeekEnd = null;
|
|
508
|
+
// ── range mode state ──
|
|
508
509
|
rangeStart = null;
|
|
509
510
|
rangeEnd = null;
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
511
|
+
rangeHoverEnd = null;
|
|
512
|
+
/** Tracks whether the user is picking the end date (true) or the start date (false). */
|
|
513
|
+
rangePicking = 'start';
|
|
513
514
|
today = new Date();
|
|
514
515
|
todayYear = this.today.getFullYear();
|
|
515
516
|
todayMonth = this.today.getMonth();
|
|
@@ -550,10 +551,17 @@ class CalendarControl {
|
|
|
550
551
|
this.selectedDate = null;
|
|
551
552
|
this.selectedWeekStart = null;
|
|
552
553
|
this.selectedWeekEnd = null;
|
|
553
|
-
this.
|
|
554
|
+
this.rangeStart = null;
|
|
555
|
+
this.rangeEnd = null;
|
|
556
|
+
this.rangePicking = 'start';
|
|
554
557
|
this.inputControl.setValue("", { emitEvent: false });
|
|
555
558
|
return;
|
|
556
559
|
}
|
|
560
|
+
// Range mode: delegate to separate handler
|
|
561
|
+
if (this.selectionMode === "range") {
|
|
562
|
+
this.writeValueRange(value);
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
557
565
|
// Week mode: value is a "start - end" range string
|
|
558
566
|
if (this.selectionMode === "week") {
|
|
559
567
|
const raw = String(value);
|
|
@@ -575,20 +583,6 @@ class CalendarControl {
|
|
|
575
583
|
this.inputControl.setValue(this.formatWeek(start, end), { emitEvent: false });
|
|
576
584
|
return;
|
|
577
585
|
}
|
|
578
|
-
if (this.selectionMode === "range") {
|
|
579
|
-
const parsedRange = this.parseIncomingRange(value);
|
|
580
|
-
if (!parsedRange) {
|
|
581
|
-
this.applyDateRange(null, null, false);
|
|
582
|
-
this.selectedDate = null;
|
|
583
|
-
this.inputControl.setValue("", { emitEvent: false });
|
|
584
|
-
return;
|
|
585
|
-
}
|
|
586
|
-
this.applyDateRange(parsedRange.start, parsedRange.end, false);
|
|
587
|
-
this.selectedDate = parsedRange.start;
|
|
588
|
-
this.displayMonth = parsedRange.start.getMonth();
|
|
589
|
-
this.displayYear = parsedRange.start.getFullYear();
|
|
590
|
-
return;
|
|
591
|
-
}
|
|
592
586
|
if (this.timeOnly) {
|
|
593
587
|
let hours, mins;
|
|
594
588
|
if (typeof value === "string") {
|
|
@@ -717,6 +711,11 @@ class CalendarControl {
|
|
|
717
711
|
// events
|
|
718
712
|
onBlur() {
|
|
719
713
|
this.onTouchedFn();
|
|
714
|
+
// Range mode: delegate to separate handler
|
|
715
|
+
if (this.selectionMode === "range") {
|
|
716
|
+
this.onBlurRange();
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
720
719
|
// Week mode keeps a "start - end" range string; the single-date parsing
|
|
721
720
|
// below would fail to parse it and wipe the selection, so handle it here.
|
|
722
721
|
if (this.selectionMode === "week") {
|
|
@@ -761,10 +760,6 @@ class CalendarControl {
|
|
|
761
760
|
this.blurEvent.emit();
|
|
762
761
|
return;
|
|
763
762
|
}
|
|
764
|
-
if (this.selectionMode === "range") {
|
|
765
|
-
this.onRangeBlur();
|
|
766
|
-
return;
|
|
767
|
-
}
|
|
768
763
|
const raw = (this.inputControl.value || "");
|
|
769
764
|
let currentFormatted = "";
|
|
770
765
|
if (this.selectedDate) {
|
|
@@ -906,10 +901,7 @@ class CalendarControl {
|
|
|
906
901
|
this.toggleCalendar();
|
|
907
902
|
break;
|
|
908
903
|
case "Escape":
|
|
909
|
-
|
|
910
|
-
this.closeCalendar();
|
|
911
|
-
else
|
|
912
|
-
this.isOpen = false;
|
|
904
|
+
this.isOpen = false;
|
|
913
905
|
break;
|
|
914
906
|
case " ":
|
|
915
907
|
case "Spacebar":
|
|
@@ -917,10 +909,7 @@ class CalendarControl {
|
|
|
917
909
|
this.toggleCalendar();
|
|
918
910
|
break;
|
|
919
911
|
case "Tab":
|
|
920
|
-
|
|
921
|
-
this.closeCalendar();
|
|
922
|
-
else
|
|
923
|
-
this.isOpen = false;
|
|
912
|
+
this.isOpen = false;
|
|
924
913
|
break;
|
|
925
914
|
}
|
|
926
915
|
}
|
|
@@ -929,6 +918,11 @@ class CalendarControl {
|
|
|
929
918
|
if (!cell || cell.disabled)
|
|
930
919
|
return;
|
|
931
920
|
const base = cell.date;
|
|
921
|
+
// Range mode: delegate to separate handler
|
|
922
|
+
if (this.selectionMode === "range") {
|
|
923
|
+
this.selectDayRange(cell);
|
|
924
|
+
return;
|
|
925
|
+
}
|
|
932
926
|
// Week mode: select the whole week containing the clicked day
|
|
933
927
|
if (this.selectionMode === "week") {
|
|
934
928
|
const { start, end } = this.getWeekRange(base);
|
|
@@ -944,10 +938,6 @@ class CalendarControl {
|
|
|
944
938
|
this.isOpen = false;
|
|
945
939
|
return;
|
|
946
940
|
}
|
|
947
|
-
if (this.selectionMode === "range") {
|
|
948
|
-
this.selectRangeDay(cell);
|
|
949
|
-
return;
|
|
950
|
-
}
|
|
951
941
|
const picked = this.showTime
|
|
952
942
|
? new Date(base.getFullYear(), base.getMonth(), base.getDate(), this.selectedHour, this.selectedMinute)
|
|
953
943
|
: new Date(base.getFullYear(), base.getMonth(), base.getDate());
|
|
@@ -971,20 +961,36 @@ class CalendarControl {
|
|
|
971
961
|
start.setDate(1 - firstOfMonth.getDay());
|
|
972
962
|
const end = new Date(lastOfMonth);
|
|
973
963
|
end.setDate(lastOfMonth.getDate() + (6 - lastOfMonth.getDay()));
|
|
964
|
+
const isRange = this.selectionMode === "range";
|
|
974
965
|
const cells = [];
|
|
975
966
|
const cursor = new Date(start);
|
|
976
967
|
while (cursor <= end) {
|
|
977
968
|
const date = new Date(cursor.getFullYear(), cursor.getMonth(), cursor.getDate());
|
|
978
|
-
|
|
969
|
+
const cell = {
|
|
979
970
|
date,
|
|
980
971
|
day: date.getDate(),
|
|
981
972
|
otherMonth: date.getMonth() !== this.displayMonth,
|
|
982
973
|
disabled: this.isDateDisabled(date),
|
|
983
|
-
selected:
|
|
974
|
+
selected: isRange
|
|
975
|
+
? this.isRangeEdge(date)
|
|
976
|
+
: this.selectionMode === "week"
|
|
977
|
+
? this.isWithin(date, this.selectedWeekStart, this.selectedWeekEnd)
|
|
978
|
+
: !!this.selectedDate &&
|
|
979
|
+
this.selectedDate.getFullYear() === date.getFullYear() &&
|
|
980
|
+
this.selectedDate.getMonth() === date.getMonth() &&
|
|
981
|
+
this.selectedDate.getDate() === date.getDate(),
|
|
984
982
|
today: this.todayYear === date.getFullYear() &&
|
|
985
983
|
this.todayMonth === date.getMonth() &&
|
|
986
984
|
this.todayDate === date.getDate(),
|
|
987
|
-
}
|
|
985
|
+
};
|
|
986
|
+
// Populate range-specific flags
|
|
987
|
+
if (isRange) {
|
|
988
|
+
cell.isRangeStart = this.isSameDay(date, this.rangeStart);
|
|
989
|
+
cell.isRangeEnd = this.isSameDay(date, this.rangeEnd);
|
|
990
|
+
cell.isInRange = this.isInFinalRange(date);
|
|
991
|
+
cell.isInHoverRange = this.isInHoverRange(date);
|
|
992
|
+
}
|
|
993
|
+
cells.push(cell);
|
|
988
994
|
cursor.setDate(cursor.getDate() + 1);
|
|
989
995
|
}
|
|
990
996
|
return cells;
|
|
@@ -1068,222 +1074,186 @@ class CalendarControl {
|
|
|
1068
1074
|
return this.isWithin(date, this.hoverWeekStart, this.hoverWeekEnd);
|
|
1069
1075
|
}
|
|
1070
1076
|
onDayHover(cell) {
|
|
1071
|
-
if (this.selectionMode === "week") {
|
|
1072
|
-
const { start, end } = this.getWeekRange(cell.date);
|
|
1073
|
-
this.hoverWeekStart = start;
|
|
1074
|
-
this.hoverWeekEnd = end;
|
|
1075
|
-
return;
|
|
1076
|
-
}
|
|
1077
1077
|
if (this.selectionMode === "range") {
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
this.hoverDate = cell.date;
|
|
1078
|
+
this.onDayHoverRange(cell);
|
|
1079
|
+
return;
|
|
1081
1080
|
}
|
|
1081
|
+
if (this.selectionMode !== "week")
|
|
1082
|
+
return;
|
|
1083
|
+
const { start, end } = this.getWeekRange(cell.date);
|
|
1084
|
+
this.hoverWeekStart = start;
|
|
1085
|
+
this.hoverWeekEnd = end;
|
|
1082
1086
|
}
|
|
1083
1087
|
onDayLeave() {
|
|
1084
1088
|
this.hoverWeekStart = null;
|
|
1085
1089
|
this.hoverWeekEnd = null;
|
|
1086
|
-
this.
|
|
1090
|
+
this.rangeHoverEnd = null;
|
|
1087
1091
|
}
|
|
1088
1092
|
/** Stable identity for day cells so they aren't re-created every change-detection. */
|
|
1089
1093
|
trackByDate = (_, cell) => cell.date.getTime();
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1094
|
+
// ══════════════════════════════════════════════════════════════════════
|
|
1095
|
+
// ── Range Mode Methods (selectionMode === 'range') ──────────────────
|
|
1096
|
+
// ══════════════════════════════════════════════════════════════════════
|
|
1097
|
+
/** Handle day click in range mode. First click = start, second click = end. */
|
|
1098
|
+
selectDayRange(cell) {
|
|
1099
|
+
if (!cell || cell.disabled)
|
|
1100
|
+
return;
|
|
1101
|
+
const clicked = new Date(cell.date.getFullYear(), cell.date.getMonth(), cell.date.getDate());
|
|
1102
|
+
if (this.rangePicking === 'start' || (this.rangeStart && this.rangeEnd)) {
|
|
1103
|
+
// Starting a new range (or restarting after a complete range)
|
|
1104
|
+
this.rangeStart = clicked;
|
|
1105
|
+
this.rangeEnd = null;
|
|
1106
|
+
this.rangePicking = 'end';
|
|
1107
|
+
// Follow click into adjacent month
|
|
1108
|
+
this.displayMonth = clicked.getMonth();
|
|
1109
|
+
this.displayYear = clicked.getFullYear();
|
|
1110
|
+
return; // keep the picker open for the end date
|
|
1111
|
+
}
|
|
1112
|
+
// Picking the end date
|
|
1113
|
+
let start = this.rangeStart;
|
|
1114
|
+
let end = clicked;
|
|
1115
|
+
// Auto-swap if end < start
|
|
1116
|
+
if (end < start) {
|
|
1117
|
+
const tmp = start;
|
|
1118
|
+
start = end;
|
|
1119
|
+
end = tmp;
|
|
1096
1120
|
}
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
return false;
|
|
1110
|
-
if (this.rangeEnd)
|
|
1111
|
-
return this.isSameDay(date, this.rangeEnd);
|
|
1112
|
-
return !!this.rangeStart && !!this.hoverDate && this.isSameDay(date, this.hoverDate);
|
|
1121
|
+
this.rangeStart = start;
|
|
1122
|
+
this.rangeEnd = end;
|
|
1123
|
+
this.rangePicking = 'start';
|
|
1124
|
+
this.rangeHoverEnd = null;
|
|
1125
|
+
this.selectedDate = start; // keep selectedDate in sync for the clear button
|
|
1126
|
+
const out = this.formatRange(start, end);
|
|
1127
|
+
this.inputControl.setValue(out, { emitEvent: false });
|
|
1128
|
+
this.onChangeFn(out);
|
|
1129
|
+
this.onTouchedFn();
|
|
1130
|
+
this.rangeSelected.emit({ start, end });
|
|
1131
|
+
this.dateSelected.emit(start);
|
|
1132
|
+
this.isOpen = false;
|
|
1113
1133
|
}
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1134
|
+
/** Hover handler for range mode — shows preview band while picking end date. */
|
|
1135
|
+
onDayHoverRange(cell) {
|
|
1136
|
+
if (this.rangePicking === 'end' && this.rangeStart) {
|
|
1137
|
+
this.rangeHoverEnd = cell.date;
|
|
1138
|
+
}
|
|
1118
1139
|
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
const ordered = this.orderDateRange(this.rangeStart, this.hoverDate);
|
|
1123
|
-
return this.isWithinDayRange(date, ordered.start, ordered.end);
|
|
1140
|
+
/** Format a range as "start - end" using the configured dateFormat. */
|
|
1141
|
+
formatRange(start, end) {
|
|
1142
|
+
return `${this.datePipe.transform(start, this.dateFormat)} - ${this.datePipe.transform(end, this.dateFormat)}`;
|
|
1124
1143
|
}
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1144
|
+
/** writeValue delegate for range mode. */
|
|
1145
|
+
writeValueRange(value) {
|
|
1146
|
+
const raw = String(value);
|
|
1147
|
+
const parts = raw.split(" - ");
|
|
1148
|
+
if (parts.length === 2) {
|
|
1149
|
+
const s = this.parseDate(parts[0].trim());
|
|
1150
|
+
const e = this.parseDate(parts[1].trim());
|
|
1151
|
+
if (s && e) {
|
|
1152
|
+
this.rangeStart = s;
|
|
1153
|
+
this.rangeEnd = e;
|
|
1154
|
+
this.selectedDate = s;
|
|
1155
|
+
this.rangePicking = 'start';
|
|
1156
|
+
this.displayMonth = s.getMonth();
|
|
1157
|
+
this.displayYear = s.getFullYear();
|
|
1158
|
+
this.inputControl.setValue(this.formatRange(s, e), { emitEvent: false });
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
// single date fallback — treat as rangeStart only
|
|
1163
|
+
const parsed = this.parseDate(raw);
|
|
1164
|
+
if (parsed) {
|
|
1165
|
+
this.rangeStart = parsed;
|
|
1129
1166
|
this.rangeEnd = null;
|
|
1130
|
-
this.
|
|
1131
|
-
this.
|
|
1132
|
-
this.displayMonth =
|
|
1133
|
-
this.displayYear =
|
|
1134
|
-
this.inputControl.setValue(this.
|
|
1135
|
-
|
|
1167
|
+
this.selectedDate = parsed;
|
|
1168
|
+
this.rangePicking = 'end';
|
|
1169
|
+
this.displayMonth = parsed.getMonth();
|
|
1170
|
+
this.displayYear = parsed.getFullYear();
|
|
1171
|
+
this.inputControl.setValue(this.datePipe.transform(parsed, this.dateFormat), { emitEvent: false });
|
|
1172
|
+
}
|
|
1173
|
+
else {
|
|
1174
|
+
this.rangeStart = null;
|
|
1175
|
+
this.rangeEnd = null;
|
|
1176
|
+
this.selectedDate = null;
|
|
1177
|
+
this.rangePicking = 'start';
|
|
1178
|
+
this.inputControl.setValue("", { emitEvent: false });
|
|
1136
1179
|
}
|
|
1137
|
-
const ordered = this.orderDateRange(this.rangeStart, picked);
|
|
1138
|
-
this.applyDateRange(ordered.start, ordered.end, true);
|
|
1139
|
-
this.selectedDate = ordered.start;
|
|
1140
|
-
this.displayMonth = ordered.start.getMonth();
|
|
1141
|
-
this.displayYear = ordered.start.getFullYear();
|
|
1142
|
-
this.onTouchedFn();
|
|
1143
|
-
this.rangeSelected.emit({ start: ordered.start, end: ordered.end });
|
|
1144
|
-
this.dateSelected.emit(ordered.start);
|
|
1145
|
-
this.closeCalendar();
|
|
1146
1180
|
}
|
|
1147
|
-
|
|
1181
|
+
/** onBlur delegate for range mode. */
|
|
1182
|
+
onBlurRange() {
|
|
1148
1183
|
const raw = (this.inputControl.value || "").trim();
|
|
1149
|
-
const current = this.
|
|
1184
|
+
const current = this.rangeStart && this.rangeEnd
|
|
1185
|
+
? this.formatRange(this.rangeStart, this.rangeEnd)
|
|
1186
|
+
: "";
|
|
1187
|
+
// Unchanged — keep selection
|
|
1150
1188
|
if (raw === current) {
|
|
1151
1189
|
this.blurEvent.emit();
|
|
1152
1190
|
return;
|
|
1153
1191
|
}
|
|
1192
|
+
// Cleared by user
|
|
1154
1193
|
if (!raw) {
|
|
1155
|
-
this.
|
|
1194
|
+
this.rangeStart = null;
|
|
1195
|
+
this.rangeEnd = null;
|
|
1156
1196
|
this.selectedDate = null;
|
|
1197
|
+
this.rangePicking = 'start';
|
|
1198
|
+
this.onChangeFn(null);
|
|
1157
1199
|
this.rangeSelected.emit(null);
|
|
1158
1200
|
this.dateSelected.emit(null);
|
|
1159
1201
|
this.blurEvent.emit();
|
|
1160
1202
|
return;
|
|
1161
1203
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1204
|
+
// Try to parse what the user typed
|
|
1205
|
+
const parts = raw.split(" - ");
|
|
1206
|
+
if (parts.length === 2) {
|
|
1207
|
+
const s = this.parseDate(parts[0].trim());
|
|
1208
|
+
const e = this.parseDate(parts[1].trim());
|
|
1209
|
+
if (s && e) {
|
|
1210
|
+
const start = s < e ? s : e;
|
|
1211
|
+
const end = s < e ? e : s;
|
|
1212
|
+
this.rangeStart = start;
|
|
1213
|
+
this.rangeEnd = end;
|
|
1214
|
+
this.selectedDate = start;
|
|
1215
|
+
this.rangePicking = 'start';
|
|
1216
|
+
this.displayMonth = start.getMonth();
|
|
1217
|
+
this.displayYear = start.getFullYear();
|
|
1218
|
+
const out = this.formatRange(start, end);
|
|
1219
|
+
this.inputControl.setValue(out, { emitEvent: false });
|
|
1220
|
+
this.onChangeFn(out);
|
|
1221
|
+
this.rangeSelected.emit({ start, end });
|
|
1222
|
+
this.dateSelected.emit(start);
|
|
1223
|
+
this.blurEvent.emit();
|
|
1224
|
+
return;
|
|
1225
|
+
}
|
|
1180
1226
|
}
|
|
1227
|
+
// Invalid — revert
|
|
1181
1228
|
this.inputControl.setValue(current, { emitEvent: false });
|
|
1182
|
-
this.rangeStart = this.committedRangeStart;
|
|
1183
|
-
this.rangeEnd = this.committedRangeEnd;
|
|
1184
|
-
this.selectedDate = this.rangeStart;
|
|
1185
1229
|
this.blurEvent.emit();
|
|
1186
1230
|
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
this.
|
|
1191
|
-
this.committedRangeStart = start;
|
|
1192
|
-
this.committedRangeEnd = end;
|
|
1193
|
-
const out = start && end ? this.formatWeek(start, end) : "";
|
|
1194
|
-
this.inputControl.setValue(out, { emitEvent: false });
|
|
1195
|
-
if (emit) {
|
|
1196
|
-
this.onChangeFn(out || null);
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
formatInProgressRange(start) {
|
|
1200
|
-
return `${this.datePipe.transform(start, this.dateFormat)} - `;
|
|
1201
|
-
}
|
|
1202
|
-
formatCommittedRangeInput() {
|
|
1203
|
-
if (this.committedRangeStart && this.committedRangeEnd) {
|
|
1204
|
-
return this.formatWeek(this.committedRangeStart, this.committedRangeEnd);
|
|
1205
|
-
}
|
|
1206
|
-
if (this.rangeStart && !this.rangeEnd) {
|
|
1207
|
-
return this.formatInProgressRange(this.rangeStart);
|
|
1208
|
-
}
|
|
1209
|
-
return "";
|
|
1231
|
+
// ── Range helper predicates ──
|
|
1232
|
+
/** True when `date` matches either rangeStart or rangeEnd (day-level). */
|
|
1233
|
+
isRangeEdge(date) {
|
|
1234
|
+
return this.isSameDay(date, this.rangeStart) || this.isSameDay(date, this.rangeEnd);
|
|
1210
1235
|
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
return this.orderDateRange(start, end);
|
|
1217
|
-
return null;
|
|
1218
|
-
}
|
|
1219
|
-
if (value && typeof value === "object" && !(value instanceof Date) && value.start && value.end) {
|
|
1220
|
-
const start = this.parseDate(value.start);
|
|
1221
|
-
const end = this.parseDate(value.end);
|
|
1222
|
-
if (start && end)
|
|
1223
|
-
return this.orderDateRange(start, end);
|
|
1224
|
-
return null;
|
|
1225
|
-
}
|
|
1226
|
-
if (typeof value === "string") {
|
|
1227
|
-
const parts = value.split(" - ").map((part) => part.trim()).filter(Boolean);
|
|
1228
|
-
if (parts.length === 2) {
|
|
1229
|
-
const start = this.parseDate(parts[0]);
|
|
1230
|
-
const end = this.parseDate(parts[1]);
|
|
1231
|
-
if (start && end)
|
|
1232
|
-
return this.orderDateRange(start, end);
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
return null;
|
|
1236
|
-
}
|
|
1237
|
-
orderDateRange(a, b) {
|
|
1238
|
-
const start = this.startOfDay(a);
|
|
1239
|
-
const end = this.startOfDay(b);
|
|
1240
|
-
if (this.toDayKey(end) < this.toDayKey(start)) {
|
|
1241
|
-
return { start: end, end: start };
|
|
1242
|
-
}
|
|
1243
|
-
return { start, end };
|
|
1244
|
-
}
|
|
1245
|
-
startOfDay(d) {
|
|
1246
|
-
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
1236
|
+
/** True when `date` falls strictly between the finalised rangeStart and rangeEnd. */
|
|
1237
|
+
isInFinalRange(date) {
|
|
1238
|
+
if (!this.rangeStart || !this.rangeEnd)
|
|
1239
|
+
return false;
|
|
1240
|
+
return date > this.rangeStart && date < this.rangeEnd;
|
|
1247
1241
|
}
|
|
1248
|
-
|
|
1249
|
-
|
|
1242
|
+
/** True during the "pick end" phase, for hover preview highlighting. */
|
|
1243
|
+
isInHoverRange(date) {
|
|
1244
|
+
if (this.rangePicking !== 'end' || !this.rangeStart || !this.rangeHoverEnd)
|
|
1245
|
+
return false;
|
|
1246
|
+
const lo = this.rangeStart < this.rangeHoverEnd ? this.rangeStart : this.rangeHoverEnd;
|
|
1247
|
+
const hi = this.rangeStart < this.rangeHoverEnd ? this.rangeHoverEnd : this.rangeStart;
|
|
1248
|
+
return date >= lo && date <= hi;
|
|
1250
1249
|
}
|
|
1250
|
+
/** Day-level equality check (ignores time). */
|
|
1251
1251
|
isSameDay(a, b) {
|
|
1252
|
-
|
|
1253
|
-
}
|
|
1254
|
-
isWithinDayRange(date, start, end) {
|
|
1255
|
-
const key = this.toDayKey(date);
|
|
1256
|
-
return key >= this.toDayKey(start) && key <= this.toDayKey(end);
|
|
1257
|
-
}
|
|
1258
|
-
rangeCoversMonth(year, monthIndex) {
|
|
1259
|
-
if (!this.rangeStart)
|
|
1260
|
-
return false;
|
|
1261
|
-
const start = this.rangeStart;
|
|
1262
|
-
const end = this.rangeEnd || this.rangeStart;
|
|
1263
|
-
const monthStart = new Date(year, monthIndex, 1);
|
|
1264
|
-
const monthEnd = new Date(year, monthIndex + 1, 0);
|
|
1265
|
-
return this.toDayKey(start) <= this.toDayKey(monthEnd) && this.toDayKey(end) >= this.toDayKey(monthStart);
|
|
1266
|
-
}
|
|
1267
|
-
rangeCoversYear(year) {
|
|
1268
|
-
if (!this.rangeStart)
|
|
1252
|
+
if (!b)
|
|
1269
1253
|
return false;
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
}
|
|
1274
|
-
restoreIncompleteRange() {
|
|
1275
|
-
if (this.selectionMode !== "range")
|
|
1276
|
-
return;
|
|
1277
|
-
if (!this.rangeStart || this.rangeEnd)
|
|
1278
|
-
return;
|
|
1279
|
-
this.rangeStart = this.committedRangeStart;
|
|
1280
|
-
this.rangeEnd = this.committedRangeEnd;
|
|
1281
|
-
this.hoverDate = null;
|
|
1282
|
-
this.selectedDate = this.rangeStart;
|
|
1283
|
-
const out = this.committedRangeStart && this.committedRangeEnd
|
|
1284
|
-
? this.formatWeek(this.committedRangeStart, this.committedRangeEnd)
|
|
1285
|
-
: "";
|
|
1286
|
-
this.inputControl.setValue(out, { emitEvent: false });
|
|
1254
|
+
return a.getFullYear() === b.getFullYear() &&
|
|
1255
|
+
a.getMonth() === b.getMonth() &&
|
|
1256
|
+
a.getDate() === b.getDate();
|
|
1287
1257
|
}
|
|
1288
1258
|
// month
|
|
1289
1259
|
goToMonthView() {
|
|
@@ -1325,9 +1295,6 @@ class CalendarControl {
|
|
|
1325
1295
|
return this.months[this.displayMonth];
|
|
1326
1296
|
}
|
|
1327
1297
|
isMonthSelected(monthIndex) {
|
|
1328
|
-
if (this.selectionMode === "range") {
|
|
1329
|
-
return this.rangeCoversMonth(this.displayYear, monthIndex);
|
|
1330
|
-
}
|
|
1331
1298
|
return (!!this.selectedDate &&
|
|
1332
1299
|
this.selectedDate.getFullYear() === this.displayYear &&
|
|
1333
1300
|
this.selectedDate.getMonth() === monthIndex);
|
|
@@ -1336,9 +1303,6 @@ class CalendarControl {
|
|
|
1336
1303
|
return this.todayYear === this.displayYear && this.todayMonth === monthIndex;
|
|
1337
1304
|
}
|
|
1338
1305
|
isYearSelected(year) {
|
|
1339
|
-
if (this.selectionMode === "range") {
|
|
1340
|
-
return this.rangeCoversYear(year);
|
|
1341
|
-
}
|
|
1342
1306
|
return !!this.selectedDate && this.selectedDate.getFullYear() === year;
|
|
1343
1307
|
}
|
|
1344
1308
|
isYearCurrent(year) {
|
|
@@ -1640,9 +1604,6 @@ class CalendarControl {
|
|
|
1640
1604
|
}
|
|
1641
1605
|
}
|
|
1642
1606
|
else {
|
|
1643
|
-
if (this.selectionMode === "range") {
|
|
1644
|
-
this.restoreIncompleteRange();
|
|
1645
|
-
}
|
|
1646
1607
|
this.destroyPopper();
|
|
1647
1608
|
}
|
|
1648
1609
|
}
|
|
@@ -1653,18 +1614,10 @@ class CalendarControl {
|
|
|
1653
1614
|
}
|
|
1654
1615
|
clickOutside(event) {
|
|
1655
1616
|
if (!this.rootElement.nativeElement.contains(event.target) && this.isOpen) {
|
|
1656
|
-
|
|
1657
|
-
this.closeCalendar();
|
|
1658
|
-
}
|
|
1659
|
-
else {
|
|
1660
|
-
this.isOpen = false;
|
|
1661
|
-
}
|
|
1617
|
+
this.isOpen = false;
|
|
1662
1618
|
}
|
|
1663
1619
|
}
|
|
1664
1620
|
closeCalendar() {
|
|
1665
|
-
if (this.selectionMode === "range") {
|
|
1666
|
-
this.restoreIncompleteRange();
|
|
1667
|
-
}
|
|
1668
1621
|
this.destroyPopper();
|
|
1669
1622
|
this.isOpen = false;
|
|
1670
1623
|
if (CalendarControl._currentlyOpen === this) {
|
|
@@ -1677,7 +1630,11 @@ class CalendarControl {
|
|
|
1677
1630
|
this.selectedDate = null;
|
|
1678
1631
|
this.selectedWeekStart = null;
|
|
1679
1632
|
this.selectedWeekEnd = null;
|
|
1680
|
-
|
|
1633
|
+
// Clear range state
|
|
1634
|
+
this.rangeStart = null;
|
|
1635
|
+
this.rangeEnd = null;
|
|
1636
|
+
this.rangeHoverEnd = null;
|
|
1637
|
+
this.rangePicking = 'start';
|
|
1681
1638
|
if (this._minDate) {
|
|
1682
1639
|
const parsed = new Date(this._minDate);
|
|
1683
1640
|
if (!isNaN(parsed.getTime())) {
|
|
@@ -1713,7 +1670,7 @@ class CalendarControl {
|
|
|
1713
1670
|
useExisting: forwardRef(() => CalendarControl),
|
|
1714
1671
|
multi: true,
|
|
1715
1672
|
},
|
|
1716
|
-
], viewQueries: [{ propertyName: "rootElement", first: true, predicate: ["root"], descendants: true, static: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, static: true }, { propertyName: "datePickerEl", first: true, predicate: ["datePicker"], descendants: true }], ngImport: i0, template: "<div class=\"form-group calendar\" [ngClass]=\"customClass\" [class.readonly]=\"readonly\" [class.disabled]=\"disabled\" #root\r\n (click)=\"openCalendar()\">\r\n <label class=\"inp-label\" [ngClass]=\"{'required' : required}\" *ngIf=\"title\">{{ title }}</label>\r\n <input type=\"text\" #inputEl [placeholder]=\"placeholder\" [formControl]=\"inputControl\" class=\"form-control\"\r\n [ngClass]=\"{ 'is-invalid': error }\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" [readonly]=\"readonly\"\r\n (click)=\"openCalendar(); $event.stopPropagation()\" (keydown)=\"onInputKeydown($event)\" />\r\n\r\n <span class=\"focus-border\" *ngIf=\"deFocus\"></span>\r\n @if(!inputLoader) {\r\n <span class=\"calendar-icon\">\r\n <i class=\"he\" [ngClass]=\"!timeOnly ? 'he-calendar-blank' : 'he-clock'\"></i>\r\n </span>\r\n }\r\n\r\n @if(!inputLoader &&(selectedDate && !disabled && !readonly) && clearVal) {\r\n <label class=\"clear\" (click)=\"clearDate($event)\">\r\n <i class=\"he he-close\"></i>\r\n </label>\r\n }\r\n\r\n @if(inputLoader) {\r\n <label class=\"loader input-loader\"></label>\r\n }\r\n @if(error) {\r\n <div class=\"val-msg\">{{ errorMessage }}</div>\r\n }\r\n\r\n <div class=\"datepicker-group\" #datePicker *ngIf=\"isOpen\" (mousedown)=\"$event.preventDefault()\"\r\n (click)=\"$event.stopPropagation()\">\r\n\r\n <!-- time picker -->\r\n <ng-container *ngIf=\"timeOnly\">\r\n <div class=\"time-picker\">\r\n <div class=\"time-select\">\r\n <button (click)=\"incrementHour()\" [disabled]=\"!isIncrementHourValid()\"><i\r\n class=\"he he-chevron-up\"></i></button>\r\n <ng-container *ngIf=\"hourFormat === '12'; else show24\">\r\n <div class=\"time-value\">\r\n {{ ((selectedHour % 12) || 12) | number:'2.0' }}\r\n </div>\r\n </ng-container>\r\n <ng-template #show24>\r\n <div class=\"time-value\">\r\n {{ selectedHour | number:'2.0' }}\r\n </div>\r\n </ng-template>\r\n\r\n <button (click)=\"decrementHour()\" [disabled]=\"!isDecrementHourValid()\"><i\r\n class=\"he he-chevron-down\"></i></button>\r\n </div>\r\n <span class=\"time-separator\">:</span>\r\n <div class=\"time-select\">\r\n <button (click)=\"incrementMinute()\" [disabled]=\"!isIncrementMinuteValid()\"><i\r\n class=\"he he-chevron-up\"></i></button>\r\n <div class=\"time-value\">{{ selectedMinute | number:'2.0' }}</div>\r\n <button (click)=\"decrementMinute()\" [disabled]=\"!isDecrementMinuteValid()\"><i\r\n class=\"he he-chevron-down\"></i></button>\r\n </div>\r\n <div class=\"ampm-toggle\" *ngIf=\"hourFormat === '12'\">\r\n <button type=\"button\" [class.active]=\"meridian === 'AM'\" (click)=\"setMeridian('AM')\">AM</button>\r\n <button type=\"button\" [class.active]=\"meridian === 'PM'\" (click)=\"setMeridian('PM')\">PM</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- day view -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'day'\">\r\n <div class=\"header\">\r\n <button class=\"calendar-arrow\" (click)=\"prevMonth()\"><i class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\" (click)=\"goToMonthView()\">\r\n <div>{{ displayMonthName }}</div>\r\n <div>{{ displayYear }}</div>\r\n </div>\r\n <button class=\"calendar-arrow\" (click)=\"nextMonth()\"><i class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"week-header\">\r\n <div>Sun</div>\r\n <div>Mon</div>\r\n <div>Tue</div>\r\n <div>Wed</div>\r\n <div>Thu</div>\r\n <div>Fri</div>\r\n <div>Sat</div>\r\n </div>\r\n <div class=\"days-grid\" [class.week-mode]=\"selectionMode === 'week'\"\r\n [class.range-mode]=\"selectionMode === 'range'\" (mouseleave)=\"onDayLeave()\">\r\n <div class=\"day-cell\" *ngFor=\"let cell of daysInMonth; trackBy: trackByDate\" (click)=\"selectDay(cell)\"\r\n (mouseenter)=\"onDayHover(cell)\" (mouseleave)=\"onDayLeave()\"\r\n [class.other-month]=\"cell.otherMonth\"\r\n [class.disabled]=\"cell.disabled\"\r\n [class.selected]=\"cell.selected\"\r\n [class.week-hover]=\"isInHoverWeek(cell.date)\"\r\n [class.range-start]=\"isRangeStart(cell.date)\"\r\n [class.range-end]=\"isRangeEnd(cell.date)\"\r\n [class.in-range]=\"isInSelectedRange(cell.date)\"\r\n [class.range-hover]=\"isInHoverRange(cell.date)\"\r\n [class.today]=\"cell.today\">\r\n {{ cell.day }}\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"showTime\">\r\n <div class=\"time-picker\">\r\n <div class=\"time-select\">\r\n <button type=\"button\" (click)=\"incrementHour()\" [disabled]=\"!isIncrementHourValid()\">\r\n <i class=\"he he-chevron-up\"></i>\r\n </button>\r\n <ng-container *ngIf=\"hourFormat === '12'; else show24\">\r\n <div class=\"time-value\">\r\n {{\r\n selectedHour % 12 === 0\r\n ? 12\r\n : selectedHour % 12\r\n | number:'2.0' }}\r\n </div>\r\n </ng-container>\r\n <ng-template #show24>\r\n <div class=\"time-value\">{{ selectedHour | number:'2.0' }}</div>\r\n </ng-template>\r\n <button type=\"button\" (click)=\"decrementHour()\" [disabled]=\"!isDecrementHourValid()\">\r\n <i class=\"he he-chevron-down\"></i>\r\n </button>\r\n </div>\r\n <span class=\"time-separator\">:</span>\r\n <div class=\"time-select\">\r\n <button type=\"button\" (click)=\"incrementMinute()\" [disabled]=\"!isIncrementMinuteValid()\">\r\n <i class=\"he he-chevron-up\"></i>\r\n </button>\r\n <div class=\"time-value\">\r\n {{ selectedMinute < 10 ? '0' +selectedMinute : selectedMinute }} </div>\r\n <button type=\"button\" (click)=\"decrementMinute()\" [disabled]=\"!isDecrementMinuteValid()\">\r\n <i class=\"he he-chevron-down\"></i>\r\n </button>\r\n </div>\r\n <div class=\"ampm-toggle\" *ngIf=\"hourFormat === '12'\">\r\n <button type=\"button\" [class.active]=\"meridian === 'AM'\" (click)=\"setMeridian('AM')\">AM</button>\r\n <button type=\"button\" [class.active]=\"meridian === 'PM'\" (click)=\"setMeridian('PM')\">PM</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- month view -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'month'\">\r\n <div class=\"header\" *ngIf=\"viewMode !== 'month'\">\r\n <button class=\"calendar-arrow\" (click)=\"displayYear = displayYear - 1\"><i\r\n class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\" (click)=\"goToYearRangeView()\">{{ displayYear }}</div>\r\n <button class=\"calendar-arrow\" (click)=\"displayYear = displayYear + 1\"><i\r\n class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"month-grid\">\r\n <div class=\"month-cell\" *ngFor=\"let m of months; index as i\" (click)=\"selectMonth(i)\"\r\n [class.selected]=\"isMonthSelected(i)\" [class.today]=\"isMonthCurrent(i)\">{{ m }}\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- year range view -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'yearRange'\">\r\n <div class=\"header\">\r\n <button class=\"calendar-arrow\" (click)=\"prevYearRange()\"><i class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\">{{ yearRange[0] }} ~ {{ yearRange[yearRangeSize-1] }}</div>\r\n <button class=\"calendar-arrow\" (click)=\"nextYearRange()\"><i class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"year-grid\">\r\n <div class=\"year-cell\" *ngFor=\"let y of yearRange\" (click)=\"selectYear(y)\"\r\n [class.selected]=\"isYearSelected(y)\" [class.today]=\"isYearCurrent(y)\">{{ y }}</div>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n</div>", styles: [".form-group.calendar{position:relative}.form-group.calendar .datepicker-group{left:0;width:100%;z-index:1000;padding:.5rem;color:#495057;min-width:240px;max-width:260px;border-radius:3px;background:#fff;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.form-group.calendar .datepicker-group .header{display:flex;font-weight:600;padding:5px;align-items:center;justify-content:space-between;border-bottom:1px solid #dee2e6}.form-group.calendar .datepicker-group .header .title{gap:8px;display:flex;font-size:15px;cursor:pointer;font-weight:600}.form-group.calendar .datepicker-group .header .calendar-arrow{width:28px;height:28px;border:none;line-height:1;cursor:pointer;background:none}.form-group.calendar .datepicker-group .header .calendar-arrow i{font-size:14px}.form-group.calendar .datepicker-group .header .calendar-arrow:hover{background:#f0f0f0}.form-group.calendar .datepicker-group .week-header{display:grid;padding:8px 0;font-size:13px;font-weight:700;text-align:center;grid-template-columns:repeat(7,1fr)}.form-group.calendar .datepicker-group .days-grid,.form-group.calendar .datepicker-group .month-grid,.form-group.calendar .datepicker-group .year-grid{gap:3px;padding:5px;display:grid;grid-template-columns:repeat(7,1fr)}.form-group.calendar .datepicker-group .days-grid .day-cell,.form-group.calendar .datepicker-group .days-grid .month-cell,.form-group.calendar .datepicker-group .days-grid .year-cell,.form-group.calendar .datepicker-group .month-grid .day-cell,.form-group.calendar .datepicker-group .month-grid .month-cell,.form-group.calendar .datepicker-group .month-grid .year-cell,.form-group.calendar .datepicker-group .year-grid .day-cell,.form-group.calendar .datepicker-group .year-grid .month-cell,.form-group.calendar .datepicker-group .year-grid .year-cell{display:flex;font-size:14px;cursor:pointer;align-items:center;justify-content:center}.form-group.calendar .datepicker-group .days-grid .day-cell.today,.form-group.calendar .datepicker-group .days-grid .month-cell.today,.form-group.calendar .datepicker-group .days-grid .year-cell.today,.form-group.calendar .datepicker-group .month-grid .day-cell.today,.form-group.calendar .datepicker-group .month-grid .month-cell.today,.form-group.calendar .datepicker-group .month-grid .year-cell.today,.form-group.calendar .datepicker-group .year-grid .day-cell.today,.form-group.calendar .datepicker-group .year-grid .month-cell.today,.form-group.calendar .datepicker-group .year-grid .year-cell.today{color:#37c0b3;font-weight:700;border:1px solid #37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.selected,.form-group.calendar .datepicker-group .days-grid .day-cell:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.selected,.form-group.calendar .datepicker-group .days-grid .month-cell:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.selected,.form-group.calendar .datepicker-group .days-grid .year-cell:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.selected,.form-group.calendar .datepicker-group .month-grid .day-cell:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.selected,.form-group.calendar .datepicker-group .month-grid .month-cell:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.selected,.form-group.calendar .datepicker-group .month-grid .year-cell:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.selected,.form-group.calendar .datepicker-group .year-grid .day-cell:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.selected,.form-group.calendar .datepicker-group .year-grid .month-cell:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.selected,.form-group.calendar .datepicker-group .year-grid .year-cell:hover{color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled{color:#e0e0e0;background:none;-webkit-user-select:none;user-select:none;cursor:not-allowed}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled.today{color:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled.today:hover{color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled:hover{color:#e0e0e0;background:transparent}.form-group.calendar .datepicker-group .days-grid .day-cell,.form-group.calendar .datepicker-group .month-grid .day-cell,.form-group.calendar .datepicker-group .year-grid .day-cell{padding:5px 2px;border-radius:50%}.form-group.calendar .datepicker-group .days-grid .day-cell.other-month:not(.selected):not(:hover),.form-group.calendar .datepicker-group .month-grid .day-cell.other-month:not(.selected):not(:hover),.form-group.calendar .datepicker-group .year-grid .day-cell.other-month:not(.selected):not(:hover){color:#c5c5c5}.form-group.calendar .datepicker-group .days-grid .month-cell,.form-group.calendar .datepicker-group .days-grid .year-cell,.form-group.calendar .datepicker-group .month-grid .month-cell,.form-group.calendar .datepicker-group .month-grid .year-cell,.form-group.calendar .datepicker-group .year-grid .month-cell,.form-group.calendar .datepicker-group .year-grid .year-cell{padding:8px 2px;border-radius:3px}.form-group.calendar .datepicker-group .days-grid.week-mode .day-cell{border-radius:4px}.form-group.calendar .datepicker-group .days-grid.week-mode .day-cell.week-hover:not(.selected){color:#0d6f7d;background:#e6f5f3}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell{border-radius:4px}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.in-range:not(.range-start):not(.range-end),.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-hover:not(.range-start):not(.range-end){color:#0d6f7d;background:#e6f5f3;border-radius:0}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.other-month.in-range:not(.range-start):not(.range-end),.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.other-month.range-hover:not(.range-start):not(.range-end){color:#0d6f7d}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-start,.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-end,.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.selected{color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-start:not(.range-end){border-radius:4px 0 0 4px}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-end:not(.range-start){border-radius:0 4px 4px 0}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell:hover:not(.disabled):not(.range-start):not(.range-end){color:#0d6f7d;background:#e6f5f3}.form-group.calendar .datepicker-group .month-grid{grid-template-columns:repeat(3,1fr)}.form-group.calendar .datepicker-group .year-grid{grid-template-columns:repeat(4,1fr)}.form-group.calendar .datepicker-group .time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center}.form-group.calendar .datepicker-group .time-picker .ampm-toggle{gap:6px;display:flex;margin-left:1rem;flex-direction:column;justify-content:center}.form-group.calendar .datepicker-group .time-picker .ampm-toggle button{cursor:pointer;padding:3px 8px;font-size:.75rem;background:#fff;border:1px solid #cccccc}.form-group.calendar .datepicker-group .time-picker .ampm-toggle button.active{color:#fff;border-color:#37c0b3;background-color:#37c0b3}.form-group.calendar .datepicker-group .time-picker .time-select{display:flex;margin:0 .75rem;align-items:center;flex-direction:column}.form-group.calendar .datepicker-group .time-picker .time-select button{border:none;cursor:pointer;padding:4px 8px;background:transparent}.form-group.calendar .datepicker-group .time-picker .time-select button i{font-size:1rem}.form-group.calendar .datepicker-group .time-picker .time-select button:hover{background:#f0f0f0}.form-group.calendar .datepicker-group .time-picker .time-select .time-value{width:2rem;font-size:1rem;text-align:center;margin:2px 3px 4px}.form-group.calendar .datepicker-group .time-picker .time-separator{line-height:1;font-size:1rem}.form-group.calendar .clear{right:35px}.form-group.calendar.group-sm .clear{top:7px;right:35px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] });
|
|
1673
|
+
], viewQueries: [{ propertyName: "rootElement", first: true, predicate: ["root"], descendants: true, static: true }, { propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, static: true }, { propertyName: "datePickerEl", first: true, predicate: ["datePicker"], descendants: true }], ngImport: i0, template: "<div class=\"form-group calendar\" [ngClass]=\"customClass\" [class.readonly]=\"readonly\" [class.disabled]=\"disabled\" #root\r\n (click)=\"openCalendar()\">\r\n <label class=\"inp-label\" [ngClass]=\"{'required' : required}\" *ngIf=\"title\">{{ title }}</label>\r\n <input type=\"text\" #inputEl [placeholder]=\"placeholder\" [formControl]=\"inputControl\" class=\"form-control\"\r\n [ngClass]=\"{ 'is-invalid': error }\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" [readonly]=\"readonly\"\r\n (click)=\"openCalendar(); $event.stopPropagation()\" (keydown)=\"onInputKeydown($event)\" />\r\n\r\n <span class=\"focus-border\" *ngIf=\"deFocus\"></span>\r\n @if(!inputLoader) {\r\n <span class=\"calendar-icon\">\r\n <i class=\"he\" [ngClass]=\"!timeOnly ? 'he-calendar-blank' : 'he-clock'\"></i>\r\n </span>\r\n }\r\n\r\n @if(!inputLoader &&((selectedDate || rangeStart) && !disabled && !readonly) && clearVal) {\r\n <label class=\"clear\" (click)=\"clearDate($event)\">\r\n <i class=\"he he-close\"></i>\r\n </label>\r\n }\r\n\r\n @if(inputLoader) {\r\n <label class=\"loader input-loader\"></label>\r\n }\r\n @if(error) {\r\n <div class=\"val-msg\">{{ errorMessage }}</div>\r\n }\r\n\r\n <div class=\"datepicker-group\" #datePicker *ngIf=\"isOpen\" (mousedown)=\"$event.preventDefault()\"\r\n (click)=\"$event.stopPropagation()\">\r\n\r\n <!-- time picker -->\r\n <ng-container *ngIf=\"timeOnly\">\r\n <div class=\"time-picker\">\r\n <div class=\"time-select\">\r\n <button (click)=\"incrementHour()\" [disabled]=\"!isIncrementHourValid()\"><i\r\n class=\"he he-chevron-up\"></i></button>\r\n <ng-container *ngIf=\"hourFormat === '12'; else show24\">\r\n <div class=\"time-value\">\r\n {{ ((selectedHour % 12) || 12) | number:'2.0' }}\r\n </div>\r\n </ng-container>\r\n <ng-template #show24>\r\n <div class=\"time-value\">\r\n {{ selectedHour | number:'2.0' }}\r\n </div>\r\n </ng-template>\r\n\r\n <button (click)=\"decrementHour()\" [disabled]=\"!isDecrementHourValid()\"><i\r\n class=\"he he-chevron-down\"></i></button>\r\n </div>\r\n <span class=\"time-separator\">:</span>\r\n <div class=\"time-select\">\r\n <button (click)=\"incrementMinute()\" [disabled]=\"!isIncrementMinuteValid()\"><i\r\n class=\"he he-chevron-up\"></i></button>\r\n <div class=\"time-value\">{{ selectedMinute | number:'2.0' }}</div>\r\n <button (click)=\"decrementMinute()\" [disabled]=\"!isDecrementMinuteValid()\"><i\r\n class=\"he he-chevron-down\"></i></button>\r\n </div>\r\n <div class=\"ampm-toggle\" *ngIf=\"hourFormat === '12'\">\r\n <button type=\"button\" [class.active]=\"meridian === 'AM'\" (click)=\"setMeridian('AM')\">AM</button>\r\n <button type=\"button\" [class.active]=\"meridian === 'PM'\" (click)=\"setMeridian('PM')\">PM</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- day view (single / week modes) -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'day' && selectionMode !== 'range'\">\r\n <div class=\"header\">\r\n <button class=\"calendar-arrow\" (click)=\"prevMonth()\"><i class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\" (click)=\"goToMonthView()\">\r\n <div>{{ displayMonthName }}</div>\r\n <div>{{ displayYear }}</div>\r\n </div>\r\n <button class=\"calendar-arrow\" (click)=\"nextMonth()\"><i class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"week-header\">\r\n <div>Sun</div>\r\n <div>Mon</div>\r\n <div>Tue</div>\r\n <div>Wed</div>\r\n <div>Thu</div>\r\n <div>Fri</div>\r\n <div>Sat</div>\r\n </div>\r\n <div class=\"days-grid\" [class.week-mode]=\"selectionMode === 'week'\">\r\n <div class=\"day-cell\" *ngFor=\"let cell of daysInMonth; trackBy: trackByDate\" (click)=\"selectDay(cell)\"\r\n (mouseenter)=\"onDayHover(cell)\" (mouseleave)=\"onDayLeave()\"\r\n [class.other-month]=\"cell.otherMonth\"\r\n [class.disabled]=\"cell.disabled\"\r\n [class.selected]=\"cell.selected\"\r\n [class.week-hover]=\"isInHoverWeek(cell.date)\"\r\n [class.today]=\"cell.today\">\r\n {{ cell.day }}\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"showTime\">\r\n <div class=\"time-picker\">\r\n <div class=\"time-select\">\r\n <button type=\"button\" (click)=\"incrementHour()\" [disabled]=\"!isIncrementHourValid()\">\r\n <i class=\"he he-chevron-up\"></i>\r\n </button>\r\n <ng-container *ngIf=\"hourFormat === '12'; else show24\">\r\n <div class=\"time-value\">\r\n {{\r\n selectedHour % 12 === 0\r\n ? 12\r\n : selectedHour % 12\r\n | number:'2.0' }}\r\n </div>\r\n </ng-container>\r\n <ng-template #show24>\r\n <div class=\"time-value\">{{ selectedHour | number:'2.0' }}</div>\r\n </ng-template>\r\n <button type=\"button\" (click)=\"decrementHour()\" [disabled]=\"!isDecrementHourValid()\">\r\n <i class=\"he he-chevron-down\"></i>\r\n </button>\r\n </div>\r\n <span class=\"time-separator\">:</span>\r\n <div class=\"time-select\">\r\n <button type=\"button\" (click)=\"incrementMinute()\" [disabled]=\"!isIncrementMinuteValid()\">\r\n <i class=\"he he-chevron-up\"></i>\r\n </button>\r\n <div class=\"time-value\">\r\n {{ selectedMinute < 10 ? '0' +selectedMinute : selectedMinute }} </div>\r\n <button type=\"button\" (click)=\"decrementMinute()\" [disabled]=\"!isDecrementMinuteValid()\">\r\n <i class=\"he he-chevron-down\"></i>\r\n </button>\r\n </div>\r\n <div class=\"ampm-toggle\" *ngIf=\"hourFormat === '12'\">\r\n <button type=\"button\" [class.active]=\"meridian === 'AM'\" (click)=\"setMeridian('AM')\">AM</button>\r\n <button type=\"button\" [class.active]=\"meridian === 'PM'\" (click)=\"setMeridian('PM')\">PM</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- day view (range mode) -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'day' && selectionMode === 'range'\">\r\n <div class=\"header\">\r\n <button class=\"calendar-arrow\" (click)=\"prevMonth()\"><i class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\" (click)=\"goToMonthView()\">\r\n <div>{{ displayMonthName }}</div>\r\n <div>{{ displayYear }}</div>\r\n </div>\r\n <button class=\"calendar-arrow\" (click)=\"nextMonth()\"><i class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"week-header\">\r\n <div>Sun</div>\r\n <div>Mon</div>\r\n <div>Tue</div>\r\n <div>Wed</div>\r\n <div>Thu</div>\r\n <div>Fri</div>\r\n <div>Sat</div>\r\n </div>\r\n <div class=\"days-grid range-mode\">\r\n <div class=\"day-cell\" *ngFor=\"let cell of daysInMonth; trackBy: trackByDate\" (click)=\"selectDay(cell)\"\r\n (mouseenter)=\"onDayHover(cell)\" (mouseleave)=\"onDayLeave()\"\r\n [class.other-month]=\"cell.otherMonth\"\r\n [class.disabled]=\"cell.disabled\"\r\n [class.selected]=\"cell.selected\"\r\n [class.range-start]=\"cell.isRangeStart\"\r\n [class.range-end]=\"cell.isRangeEnd\"\r\n [class.in-range]=\"cell.isInRange\"\r\n [class.range-hover]=\"cell.isInHoverRange\"\r\n [class.today]=\"cell.today\">\r\n {{ cell.day }}\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- month view -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'month'\">\r\n <div class=\"header\" *ngIf=\"viewMode !== 'month'\">\r\n <button class=\"calendar-arrow\" (click)=\"displayYear = displayYear - 1\"><i\r\n class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\" (click)=\"goToYearRangeView()\">{{ displayYear }}</div>\r\n <button class=\"calendar-arrow\" (click)=\"displayYear = displayYear + 1\"><i\r\n class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"month-grid\">\r\n <div class=\"month-cell\" *ngFor=\"let m of months; index as i\" (click)=\"selectMonth(i)\"\r\n [class.selected]=\"isMonthSelected(i)\" [class.today]=\"isMonthCurrent(i)\">{{ m }}\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- year range view -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'yearRange'\">\r\n <div class=\"header\">\r\n <button class=\"calendar-arrow\" (click)=\"prevYearRange()\"><i class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\">{{ yearRange[0] }} ~ {{ yearRange[yearRangeSize-1] }}</div>\r\n <button class=\"calendar-arrow\" (click)=\"nextYearRange()\"><i class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"year-grid\">\r\n <div class=\"year-cell\" *ngFor=\"let y of yearRange\" (click)=\"selectYear(y)\"\r\n [class.selected]=\"isYearSelected(y)\" [class.today]=\"isYearCurrent(y)\">{{ y }}</div>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n</div>", styles: [".form-group.calendar{position:relative}.form-group.calendar .datepicker-group{left:0;width:100%;z-index:1000;padding:.5rem;color:#495057;min-width:240px;max-width:260px;border-radius:3px;background:#fff;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.form-group.calendar .datepicker-group .header{display:flex;font-weight:600;padding:5px;align-items:center;justify-content:space-between;border-bottom:1px solid #dee2e6}.form-group.calendar .datepicker-group .header .title{gap:8px;display:flex;font-size:15px;cursor:pointer;font-weight:600}.form-group.calendar .datepicker-group .header .calendar-arrow{width:28px;height:28px;border:none;line-height:1;cursor:pointer;background:none}.form-group.calendar .datepicker-group .header .calendar-arrow i{font-size:14px}.form-group.calendar .datepicker-group .header .calendar-arrow:hover{background:#f0f0f0}.form-group.calendar .datepicker-group .week-header{display:grid;padding:8px 0;font-size:13px;font-weight:700;text-align:center;grid-template-columns:repeat(7,1fr)}.form-group.calendar .datepicker-group .days-grid,.form-group.calendar .datepicker-group .month-grid,.form-group.calendar .datepicker-group .year-grid{gap:3px;padding:5px;display:grid;grid-template-columns:repeat(7,1fr)}.form-group.calendar .datepicker-group .days-grid .day-cell,.form-group.calendar .datepicker-group .days-grid .month-cell,.form-group.calendar .datepicker-group .days-grid .year-cell,.form-group.calendar .datepicker-group .month-grid .day-cell,.form-group.calendar .datepicker-group .month-grid .month-cell,.form-group.calendar .datepicker-group .month-grid .year-cell,.form-group.calendar .datepicker-group .year-grid .day-cell,.form-group.calendar .datepicker-group .year-grid .month-cell,.form-group.calendar .datepicker-group .year-grid .year-cell{display:flex;font-size:14px;cursor:pointer;align-items:center;justify-content:center}.form-group.calendar .datepicker-group .days-grid .day-cell.today,.form-group.calendar .datepicker-group .days-grid .month-cell.today,.form-group.calendar .datepicker-group .days-grid .year-cell.today,.form-group.calendar .datepicker-group .month-grid .day-cell.today,.form-group.calendar .datepicker-group .month-grid .month-cell.today,.form-group.calendar .datepicker-group .month-grid .year-cell.today,.form-group.calendar .datepicker-group .year-grid .day-cell.today,.form-group.calendar .datepicker-group .year-grid .month-cell.today,.form-group.calendar .datepicker-group .year-grid .year-cell.today{color:#37c0b3;font-weight:700;border:1px solid #37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.selected,.form-group.calendar .datepicker-group .days-grid .day-cell:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.selected,.form-group.calendar .datepicker-group .days-grid .month-cell:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.selected,.form-group.calendar .datepicker-group .days-grid .year-cell:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.selected,.form-group.calendar .datepicker-group .month-grid .day-cell:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.selected,.form-group.calendar .datepicker-group .month-grid .month-cell:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.selected,.form-group.calendar .datepicker-group .month-grid .year-cell:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.selected,.form-group.calendar .datepicker-group .year-grid .day-cell:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.selected,.form-group.calendar .datepicker-group .year-grid .month-cell:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.selected,.form-group.calendar .datepicker-group .year-grid .year-cell:hover{color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled{color:#e0e0e0;background:none;-webkit-user-select:none;user-select:none;cursor:not-allowed}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled.today{color:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled.today:hover{color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled:hover{color:#e0e0e0;background:transparent}.form-group.calendar .datepicker-group .days-grid .day-cell,.form-group.calendar .datepicker-group .month-grid .day-cell,.form-group.calendar .datepicker-group .year-grid .day-cell{padding:5px 2px;border-radius:50%}.form-group.calendar .datepicker-group .days-grid .day-cell.other-month:not(.selected):not(:hover),.form-group.calendar .datepicker-group .month-grid .day-cell.other-month:not(.selected):not(:hover),.form-group.calendar .datepicker-group .year-grid .day-cell.other-month:not(.selected):not(:hover){color:#c5c5c5}.form-group.calendar .datepicker-group .days-grid .month-cell,.form-group.calendar .datepicker-group .days-grid .year-cell,.form-group.calendar .datepicker-group .month-grid .month-cell,.form-group.calendar .datepicker-group .month-grid .year-cell,.form-group.calendar .datepicker-group .year-grid .month-cell,.form-group.calendar .datepicker-group .year-grid .year-cell{padding:8px 2px;border-radius:3px}.form-group.calendar .datepicker-group .days-grid.week-mode .day-cell{border-radius:4px}.form-group.calendar .datepicker-group .days-grid.week-mode .day-cell.week-hover:not(.selected){color:#0d6f7d;background:#e6f5f3}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell{border-radius:0}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-start{border-radius:50% 0 0 50%;color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-end{border-radius:0 50% 50% 0;color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-start.range-end{border-radius:50%}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.in-range:not(.range-start):not(.range-end){background:#e6f5f3;color:#0d6f7d}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-hover:not(.in-range):not(.range-start):not(.range-end):not(.selected){background:#f0faf9;color:#0d6f7d}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.selected:not(.range-start):not(.range-end):not(.in-range){color:#fff;background:#37c0b3;border-radius:50%}.form-group.calendar .datepicker-group .month-grid{grid-template-columns:repeat(3,1fr)}.form-group.calendar .datepicker-group .year-grid{grid-template-columns:repeat(4,1fr)}.form-group.calendar .datepicker-group .time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center}.form-group.calendar .datepicker-group .time-picker .ampm-toggle{gap:6px;display:flex;margin-left:1rem;flex-direction:column;justify-content:center}.form-group.calendar .datepicker-group .time-picker .ampm-toggle button{cursor:pointer;padding:3px 8px;font-size:.75rem;background:#fff;border:1px solid #cccccc}.form-group.calendar .datepicker-group .time-picker .ampm-toggle button.active{color:#fff;border-color:#37c0b3;background-color:#37c0b3}.form-group.calendar .datepicker-group .time-picker .time-select{display:flex;margin:0 .75rem;align-items:center;flex-direction:column}.form-group.calendar .datepicker-group .time-picker .time-select button{border:none;cursor:pointer;padding:4px 8px;background:transparent}.form-group.calendar .datepicker-group .time-picker .time-select button i{font-size:1rem}.form-group.calendar .datepicker-group .time-picker .time-select button:hover{background:#f0f0f0}.form-group.calendar .datepicker-group .time-picker .time-select .time-value{width:2rem;font-size:1rem;text-align:center;margin:2px 3px 4px}.form-group.calendar .datepicker-group .time-picker .time-separator{line-height:1;font-size:1rem}.form-group.calendar .clear{right:35px}.form-group.calendar.group-sm .clear{top:7px;right:35px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] });
|
|
1717
1674
|
}
|
|
1718
1675
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: CalendarControl, decorators: [{
|
|
1719
1676
|
type: Component,
|
|
@@ -1728,7 +1685,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1728
1685
|
useExisting: forwardRef(() => CalendarControl),
|
|
1729
1686
|
multi: true,
|
|
1730
1687
|
},
|
|
1731
|
-
], template: "<div class=\"form-group calendar\" [ngClass]=\"customClass\" [class.readonly]=\"readonly\" [class.disabled]=\"disabled\" #root\r\n (click)=\"openCalendar()\">\r\n <label class=\"inp-label\" [ngClass]=\"{'required' : required}\" *ngIf=\"title\">{{ title }}</label>\r\n <input type=\"text\" #inputEl [placeholder]=\"placeholder\" [formControl]=\"inputControl\" class=\"form-control\"\r\n [ngClass]=\"{ 'is-invalid': error }\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" [readonly]=\"readonly\"\r\n (click)=\"openCalendar(); $event.stopPropagation()\" (keydown)=\"onInputKeydown($event)\" />\r\n\r\n <span class=\"focus-border\" *ngIf=\"deFocus\"></span>\r\n @if(!inputLoader) {\r\n <span class=\"calendar-icon\">\r\n <i class=\"he\" [ngClass]=\"!timeOnly ? 'he-calendar-blank' : 'he-clock'\"></i>\r\n </span>\r\n }\r\n\r\n @if(!inputLoader &&(selectedDate && !disabled && !readonly) && clearVal) {\r\n <label class=\"clear\" (click)=\"clearDate($event)\">\r\n <i class=\"he he-close\"></i>\r\n </label>\r\n }\r\n\r\n @if(inputLoader) {\r\n <label class=\"loader input-loader\"></label>\r\n }\r\n @if(error) {\r\n <div class=\"val-msg\">{{ errorMessage }}</div>\r\n }\r\n\r\n <div class=\"datepicker-group\" #datePicker *ngIf=\"isOpen\" (mousedown)=\"$event.preventDefault()\"\r\n (click)=\"$event.stopPropagation()\">\r\n\r\n <!-- time picker -->\r\n <ng-container *ngIf=\"timeOnly\">\r\n <div class=\"time-picker\">\r\n <div class=\"time-select\">\r\n <button (click)=\"incrementHour()\" [disabled]=\"!isIncrementHourValid()\"><i\r\n class=\"he he-chevron-up\"></i></button>\r\n <ng-container *ngIf=\"hourFormat === '12'; else show24\">\r\n <div class=\"time-value\">\r\n {{ ((selectedHour % 12) || 12) | number:'2.0' }}\r\n </div>\r\n </ng-container>\r\n <ng-template #show24>\r\n <div class=\"time-value\">\r\n {{ selectedHour | number:'2.0' }}\r\n </div>\r\n </ng-template>\r\n\r\n <button (click)=\"decrementHour()\" [disabled]=\"!isDecrementHourValid()\"><i\r\n class=\"he he-chevron-down\"></i></button>\r\n </div>\r\n <span class=\"time-separator\">:</span>\r\n <div class=\"time-select\">\r\n <button (click)=\"incrementMinute()\" [disabled]=\"!isIncrementMinuteValid()\"><i\r\n class=\"he he-chevron-up\"></i></button>\r\n <div class=\"time-value\">{{ selectedMinute | number:'2.0' }}</div>\r\n <button (click)=\"decrementMinute()\" [disabled]=\"!isDecrementMinuteValid()\"><i\r\n class=\"he he-chevron-down\"></i></button>\r\n </div>\r\n <div class=\"ampm-toggle\" *ngIf=\"hourFormat === '12'\">\r\n <button type=\"button\" [class.active]=\"meridian === 'AM'\" (click)=\"setMeridian('AM')\">AM</button>\r\n <button type=\"button\" [class.active]=\"meridian === 'PM'\" (click)=\"setMeridian('PM')\">PM</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- day view -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'day'\">\r\n <div class=\"header\">\r\n <button class=\"calendar-arrow\" (click)=\"prevMonth()\"><i class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\" (click)=\"goToMonthView()\">\r\n <div>{{ displayMonthName }}</div>\r\n <div>{{ displayYear }}</div>\r\n </div>\r\n <button class=\"calendar-arrow\" (click)=\"nextMonth()\"><i class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"week-header\">\r\n <div>Sun</div>\r\n <div>Mon</div>\r\n <div>Tue</div>\r\n <div>Wed</div>\r\n <div>Thu</div>\r\n <div>Fri</div>\r\n <div>Sat</div>\r\n </div>\r\n <div class=\"days-grid\" [class.week-mode]=\"selectionMode === 'week'\"\r\n [class.range-mode]=\"selectionMode === 'range'\" (mouseleave)=\"onDayLeave()\">\r\n <div class=\"day-cell\" *ngFor=\"let cell of daysInMonth; trackBy: trackByDate\" (click)=\"selectDay(cell)\"\r\n (mouseenter)=\"onDayHover(cell)\" (mouseleave)=\"onDayLeave()\"\r\n [class.other-month]=\"cell.otherMonth\"\r\n [class.disabled]=\"cell.disabled\"\r\n [class.selected]=\"cell.selected\"\r\n [class.week-hover]=\"isInHoverWeek(cell.date)\"\r\n [class.range-start]=\"isRangeStart(cell.date)\"\r\n [class.range-end]=\"isRangeEnd(cell.date)\"\r\n [class.in-range]=\"isInSelectedRange(cell.date)\"\r\n [class.range-hover]=\"isInHoverRange(cell.date)\"\r\n [class.today]=\"cell.today\">\r\n {{ cell.day }}\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"showTime\">\r\n <div class=\"time-picker\">\r\n <div class=\"time-select\">\r\n <button type=\"button\" (click)=\"incrementHour()\" [disabled]=\"!isIncrementHourValid()\">\r\n <i class=\"he he-chevron-up\"></i>\r\n </button>\r\n <ng-container *ngIf=\"hourFormat === '12'; else show24\">\r\n <div class=\"time-value\">\r\n {{\r\n selectedHour % 12 === 0\r\n ? 12\r\n : selectedHour % 12\r\n | number:'2.0' }}\r\n </div>\r\n </ng-container>\r\n <ng-template #show24>\r\n <div class=\"time-value\">{{ selectedHour | number:'2.0' }}</div>\r\n </ng-template>\r\n <button type=\"button\" (click)=\"decrementHour()\" [disabled]=\"!isDecrementHourValid()\">\r\n <i class=\"he he-chevron-down\"></i>\r\n </button>\r\n </div>\r\n <span class=\"time-separator\">:</span>\r\n <div class=\"time-select\">\r\n <button type=\"button\" (click)=\"incrementMinute()\" [disabled]=\"!isIncrementMinuteValid()\">\r\n <i class=\"he he-chevron-up\"></i>\r\n </button>\r\n <div class=\"time-value\">\r\n {{ selectedMinute < 10 ? '0' +selectedMinute : selectedMinute }} </div>\r\n <button type=\"button\" (click)=\"decrementMinute()\" [disabled]=\"!isDecrementMinuteValid()\">\r\n <i class=\"he he-chevron-down\"></i>\r\n </button>\r\n </div>\r\n <div class=\"ampm-toggle\" *ngIf=\"hourFormat === '12'\">\r\n <button type=\"button\" [class.active]=\"meridian === 'AM'\" (click)=\"setMeridian('AM')\">AM</button>\r\n <button type=\"button\" [class.active]=\"meridian === 'PM'\" (click)=\"setMeridian('PM')\">PM</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- month view -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'month'\">\r\n <div class=\"header\" *ngIf=\"viewMode !== 'month'\">\r\n <button class=\"calendar-arrow\" (click)=\"displayYear = displayYear - 1\"><i\r\n class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\" (click)=\"goToYearRangeView()\">{{ displayYear }}</div>\r\n <button class=\"calendar-arrow\" (click)=\"displayYear = displayYear + 1\"><i\r\n class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"month-grid\">\r\n <div class=\"month-cell\" *ngFor=\"let m of months; index as i\" (click)=\"selectMonth(i)\"\r\n [class.selected]=\"isMonthSelected(i)\" [class.today]=\"isMonthCurrent(i)\">{{ m }}\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- year range view -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'yearRange'\">\r\n <div class=\"header\">\r\n <button class=\"calendar-arrow\" (click)=\"prevYearRange()\"><i class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\">{{ yearRange[0] }} ~ {{ yearRange[yearRangeSize-1] }}</div>\r\n <button class=\"calendar-arrow\" (click)=\"nextYearRange()\"><i class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"year-grid\">\r\n <div class=\"year-cell\" *ngFor=\"let y of yearRange\" (click)=\"selectYear(y)\"\r\n [class.selected]=\"isYearSelected(y)\" [class.today]=\"isYearCurrent(y)\">{{ y }}</div>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n</div>", styles: [".form-group.calendar{position:relative}.form-group.calendar .datepicker-group{left:0;width:100%;z-index:1000;padding:.5rem;color:#495057;min-width:240px;max-width:260px;border-radius:3px;background:#fff;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.form-group.calendar .datepicker-group .header{display:flex;font-weight:600;padding:5px;align-items:center;justify-content:space-between;border-bottom:1px solid #dee2e6}.form-group.calendar .datepicker-group .header .title{gap:8px;display:flex;font-size:15px;cursor:pointer;font-weight:600}.form-group.calendar .datepicker-group .header .calendar-arrow{width:28px;height:28px;border:none;line-height:1;cursor:pointer;background:none}.form-group.calendar .datepicker-group .header .calendar-arrow i{font-size:14px}.form-group.calendar .datepicker-group .header .calendar-arrow:hover{background:#f0f0f0}.form-group.calendar .datepicker-group .week-header{display:grid;padding:8px 0;font-size:13px;font-weight:700;text-align:center;grid-template-columns:repeat(7,1fr)}.form-group.calendar .datepicker-group .days-grid,.form-group.calendar .datepicker-group .month-grid,.form-group.calendar .datepicker-group .year-grid{gap:3px;padding:5px;display:grid;grid-template-columns:repeat(7,1fr)}.form-group.calendar .datepicker-group .days-grid .day-cell,.form-group.calendar .datepicker-group .days-grid .month-cell,.form-group.calendar .datepicker-group .days-grid .year-cell,.form-group.calendar .datepicker-group .month-grid .day-cell,.form-group.calendar .datepicker-group .month-grid .month-cell,.form-group.calendar .datepicker-group .month-grid .year-cell,.form-group.calendar .datepicker-group .year-grid .day-cell,.form-group.calendar .datepicker-group .year-grid .month-cell,.form-group.calendar .datepicker-group .year-grid .year-cell{display:flex;font-size:14px;cursor:pointer;align-items:center;justify-content:center}.form-group.calendar .datepicker-group .days-grid .day-cell.today,.form-group.calendar .datepicker-group .days-grid .month-cell.today,.form-group.calendar .datepicker-group .days-grid .year-cell.today,.form-group.calendar .datepicker-group .month-grid .day-cell.today,.form-group.calendar .datepicker-group .month-grid .month-cell.today,.form-group.calendar .datepicker-group .month-grid .year-cell.today,.form-group.calendar .datepicker-group .year-grid .day-cell.today,.form-group.calendar .datepicker-group .year-grid .month-cell.today,.form-group.calendar .datepicker-group .year-grid .year-cell.today{color:#37c0b3;font-weight:700;border:1px solid #37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.selected,.form-group.calendar .datepicker-group .days-grid .day-cell:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.selected,.form-group.calendar .datepicker-group .days-grid .month-cell:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.selected,.form-group.calendar .datepicker-group .days-grid .year-cell:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.selected,.form-group.calendar .datepicker-group .month-grid .day-cell:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.selected,.form-group.calendar .datepicker-group .month-grid .month-cell:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.selected,.form-group.calendar .datepicker-group .month-grid .year-cell:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.selected,.form-group.calendar .datepicker-group .year-grid .day-cell:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.selected,.form-group.calendar .datepicker-group .year-grid .month-cell:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.selected,.form-group.calendar .datepicker-group .year-grid .year-cell:hover{color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled{color:#e0e0e0;background:none;-webkit-user-select:none;user-select:none;cursor:not-allowed}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled.today{color:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled.today:hover{color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled:hover{color:#e0e0e0;background:transparent}.form-group.calendar .datepicker-group .days-grid .day-cell,.form-group.calendar .datepicker-group .month-grid .day-cell,.form-group.calendar .datepicker-group .year-grid .day-cell{padding:5px 2px;border-radius:50%}.form-group.calendar .datepicker-group .days-grid .day-cell.other-month:not(.selected):not(:hover),.form-group.calendar .datepicker-group .month-grid .day-cell.other-month:not(.selected):not(:hover),.form-group.calendar .datepicker-group .year-grid .day-cell.other-month:not(.selected):not(:hover){color:#c5c5c5}.form-group.calendar .datepicker-group .days-grid .month-cell,.form-group.calendar .datepicker-group .days-grid .year-cell,.form-group.calendar .datepicker-group .month-grid .month-cell,.form-group.calendar .datepicker-group .month-grid .year-cell,.form-group.calendar .datepicker-group .year-grid .month-cell,.form-group.calendar .datepicker-group .year-grid .year-cell{padding:8px 2px;border-radius:3px}.form-group.calendar .datepicker-group .days-grid.week-mode .day-cell{border-radius:4px}.form-group.calendar .datepicker-group .days-grid.week-mode .day-cell.week-hover:not(.selected){color:#0d6f7d;background:#e6f5f3}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell{border-radius:4px}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.in-range:not(.range-start):not(.range-end),.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-hover:not(.range-start):not(.range-end){color:#0d6f7d;background:#e6f5f3;border-radius:0}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.other-month.in-range:not(.range-start):not(.range-end),.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.other-month.range-hover:not(.range-start):not(.range-end){color:#0d6f7d}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-start,.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-end,.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.selected{color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-start:not(.range-end){border-radius:4px 0 0 4px}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-end:not(.range-start){border-radius:0 4px 4px 0}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell:hover:not(.disabled):not(.range-start):not(.range-end){color:#0d6f7d;background:#e6f5f3}.form-group.calendar .datepicker-group .month-grid{grid-template-columns:repeat(3,1fr)}.form-group.calendar .datepicker-group .year-grid{grid-template-columns:repeat(4,1fr)}.form-group.calendar .datepicker-group .time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center}.form-group.calendar .datepicker-group .time-picker .ampm-toggle{gap:6px;display:flex;margin-left:1rem;flex-direction:column;justify-content:center}.form-group.calendar .datepicker-group .time-picker .ampm-toggle button{cursor:pointer;padding:3px 8px;font-size:.75rem;background:#fff;border:1px solid #cccccc}.form-group.calendar .datepicker-group .time-picker .ampm-toggle button.active{color:#fff;border-color:#37c0b3;background-color:#37c0b3}.form-group.calendar .datepicker-group .time-picker .time-select{display:flex;margin:0 .75rem;align-items:center;flex-direction:column}.form-group.calendar .datepicker-group .time-picker .time-select button{border:none;cursor:pointer;padding:4px 8px;background:transparent}.form-group.calendar .datepicker-group .time-picker .time-select button i{font-size:1rem}.form-group.calendar .datepicker-group .time-picker .time-select button:hover{background:#f0f0f0}.form-group.calendar .datepicker-group .time-picker .time-select .time-value{width:2rem;font-size:1rem;text-align:center;margin:2px 3px 4px}.form-group.calendar .datepicker-group .time-picker .time-separator{line-height:1;font-size:1rem}.form-group.calendar .clear{right:35px}.form-group.calendar.group-sm .clear{top:7px;right:35px}\n"] }]
|
|
1688
|
+
], template: "<div class=\"form-group calendar\" [ngClass]=\"customClass\" [class.readonly]=\"readonly\" [class.disabled]=\"disabled\" #root\r\n (click)=\"openCalendar()\">\r\n <label class=\"inp-label\" [ngClass]=\"{'required' : required}\" *ngIf=\"title\">{{ title }}</label>\r\n <input type=\"text\" #inputEl [placeholder]=\"placeholder\" [formControl]=\"inputControl\" class=\"form-control\"\r\n [ngClass]=\"{ 'is-invalid': error }\" (blur)=\"onBlur()\" (focus)=\"onFocus()\" [readonly]=\"readonly\"\r\n (click)=\"openCalendar(); $event.stopPropagation()\" (keydown)=\"onInputKeydown($event)\" />\r\n\r\n <span class=\"focus-border\" *ngIf=\"deFocus\"></span>\r\n @if(!inputLoader) {\r\n <span class=\"calendar-icon\">\r\n <i class=\"he\" [ngClass]=\"!timeOnly ? 'he-calendar-blank' : 'he-clock'\"></i>\r\n </span>\r\n }\r\n\r\n @if(!inputLoader &&((selectedDate || rangeStart) && !disabled && !readonly) && clearVal) {\r\n <label class=\"clear\" (click)=\"clearDate($event)\">\r\n <i class=\"he he-close\"></i>\r\n </label>\r\n }\r\n\r\n @if(inputLoader) {\r\n <label class=\"loader input-loader\"></label>\r\n }\r\n @if(error) {\r\n <div class=\"val-msg\">{{ errorMessage }}</div>\r\n }\r\n\r\n <div class=\"datepicker-group\" #datePicker *ngIf=\"isOpen\" (mousedown)=\"$event.preventDefault()\"\r\n (click)=\"$event.stopPropagation()\">\r\n\r\n <!-- time picker -->\r\n <ng-container *ngIf=\"timeOnly\">\r\n <div class=\"time-picker\">\r\n <div class=\"time-select\">\r\n <button (click)=\"incrementHour()\" [disabled]=\"!isIncrementHourValid()\"><i\r\n class=\"he he-chevron-up\"></i></button>\r\n <ng-container *ngIf=\"hourFormat === '12'; else show24\">\r\n <div class=\"time-value\">\r\n {{ ((selectedHour % 12) || 12) | number:'2.0' }}\r\n </div>\r\n </ng-container>\r\n <ng-template #show24>\r\n <div class=\"time-value\">\r\n {{ selectedHour | number:'2.0' }}\r\n </div>\r\n </ng-template>\r\n\r\n <button (click)=\"decrementHour()\" [disabled]=\"!isDecrementHourValid()\"><i\r\n class=\"he he-chevron-down\"></i></button>\r\n </div>\r\n <span class=\"time-separator\">:</span>\r\n <div class=\"time-select\">\r\n <button (click)=\"incrementMinute()\" [disabled]=\"!isIncrementMinuteValid()\"><i\r\n class=\"he he-chevron-up\"></i></button>\r\n <div class=\"time-value\">{{ selectedMinute | number:'2.0' }}</div>\r\n <button (click)=\"decrementMinute()\" [disabled]=\"!isDecrementMinuteValid()\"><i\r\n class=\"he he-chevron-down\"></i></button>\r\n </div>\r\n <div class=\"ampm-toggle\" *ngIf=\"hourFormat === '12'\">\r\n <button type=\"button\" [class.active]=\"meridian === 'AM'\" (click)=\"setMeridian('AM')\">AM</button>\r\n <button type=\"button\" [class.active]=\"meridian === 'PM'\" (click)=\"setMeridian('PM')\">PM</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- day view (single / week modes) -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'day' && selectionMode !== 'range'\">\r\n <div class=\"header\">\r\n <button class=\"calendar-arrow\" (click)=\"prevMonth()\"><i class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\" (click)=\"goToMonthView()\">\r\n <div>{{ displayMonthName }}</div>\r\n <div>{{ displayYear }}</div>\r\n </div>\r\n <button class=\"calendar-arrow\" (click)=\"nextMonth()\"><i class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"week-header\">\r\n <div>Sun</div>\r\n <div>Mon</div>\r\n <div>Tue</div>\r\n <div>Wed</div>\r\n <div>Thu</div>\r\n <div>Fri</div>\r\n <div>Sat</div>\r\n </div>\r\n <div class=\"days-grid\" [class.week-mode]=\"selectionMode === 'week'\">\r\n <div class=\"day-cell\" *ngFor=\"let cell of daysInMonth; trackBy: trackByDate\" (click)=\"selectDay(cell)\"\r\n (mouseenter)=\"onDayHover(cell)\" (mouseleave)=\"onDayLeave()\"\r\n [class.other-month]=\"cell.otherMonth\"\r\n [class.disabled]=\"cell.disabled\"\r\n [class.selected]=\"cell.selected\"\r\n [class.week-hover]=\"isInHoverWeek(cell.date)\"\r\n [class.today]=\"cell.today\">\r\n {{ cell.day }}\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"showTime\">\r\n <div class=\"time-picker\">\r\n <div class=\"time-select\">\r\n <button type=\"button\" (click)=\"incrementHour()\" [disabled]=\"!isIncrementHourValid()\">\r\n <i class=\"he he-chevron-up\"></i>\r\n </button>\r\n <ng-container *ngIf=\"hourFormat === '12'; else show24\">\r\n <div class=\"time-value\">\r\n {{\r\n selectedHour % 12 === 0\r\n ? 12\r\n : selectedHour % 12\r\n | number:'2.0' }}\r\n </div>\r\n </ng-container>\r\n <ng-template #show24>\r\n <div class=\"time-value\">{{ selectedHour | number:'2.0' }}</div>\r\n </ng-template>\r\n <button type=\"button\" (click)=\"decrementHour()\" [disabled]=\"!isDecrementHourValid()\">\r\n <i class=\"he he-chevron-down\"></i>\r\n </button>\r\n </div>\r\n <span class=\"time-separator\">:</span>\r\n <div class=\"time-select\">\r\n <button type=\"button\" (click)=\"incrementMinute()\" [disabled]=\"!isIncrementMinuteValid()\">\r\n <i class=\"he he-chevron-up\"></i>\r\n </button>\r\n <div class=\"time-value\">\r\n {{ selectedMinute < 10 ? '0' +selectedMinute : selectedMinute }} </div>\r\n <button type=\"button\" (click)=\"decrementMinute()\" [disabled]=\"!isDecrementMinuteValid()\">\r\n <i class=\"he he-chevron-down\"></i>\r\n </button>\r\n </div>\r\n <div class=\"ampm-toggle\" *ngIf=\"hourFormat === '12'\">\r\n <button type=\"button\" [class.active]=\"meridian === 'AM'\" (click)=\"setMeridian('AM')\">AM</button>\r\n <button type=\"button\" [class.active]=\"meridian === 'PM'\" (click)=\"setMeridian('PM')\">PM</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- day view (range mode) -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'day' && selectionMode === 'range'\">\r\n <div class=\"header\">\r\n <button class=\"calendar-arrow\" (click)=\"prevMonth()\"><i class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\" (click)=\"goToMonthView()\">\r\n <div>{{ displayMonthName }}</div>\r\n <div>{{ displayYear }}</div>\r\n </div>\r\n <button class=\"calendar-arrow\" (click)=\"nextMonth()\"><i class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"week-header\">\r\n <div>Sun</div>\r\n <div>Mon</div>\r\n <div>Tue</div>\r\n <div>Wed</div>\r\n <div>Thu</div>\r\n <div>Fri</div>\r\n <div>Sat</div>\r\n </div>\r\n <div class=\"days-grid range-mode\">\r\n <div class=\"day-cell\" *ngFor=\"let cell of daysInMonth; trackBy: trackByDate\" (click)=\"selectDay(cell)\"\r\n (mouseenter)=\"onDayHover(cell)\" (mouseleave)=\"onDayLeave()\"\r\n [class.other-month]=\"cell.otherMonth\"\r\n [class.disabled]=\"cell.disabled\"\r\n [class.selected]=\"cell.selected\"\r\n [class.range-start]=\"cell.isRangeStart\"\r\n [class.range-end]=\"cell.isRangeEnd\"\r\n [class.in-range]=\"cell.isInRange\"\r\n [class.range-hover]=\"cell.isInHoverRange\"\r\n [class.today]=\"cell.today\">\r\n {{ cell.day }}\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- month view -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'month'\">\r\n <div class=\"header\" *ngIf=\"viewMode !== 'month'\">\r\n <button class=\"calendar-arrow\" (click)=\"displayYear = displayYear - 1\"><i\r\n class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\" (click)=\"goToYearRangeView()\">{{ displayYear }}</div>\r\n <button class=\"calendar-arrow\" (click)=\"displayYear = displayYear + 1\"><i\r\n class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"month-grid\">\r\n <div class=\"month-cell\" *ngFor=\"let m of months; index as i\" (click)=\"selectMonth(i)\"\r\n [class.selected]=\"isMonthSelected(i)\" [class.today]=\"isMonthCurrent(i)\">{{ m }}\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- year range view -->\r\n <ng-container *ngIf=\"!timeOnly && currentView === 'yearRange'\">\r\n <div class=\"header\">\r\n <button class=\"calendar-arrow\" (click)=\"prevYearRange()\"><i class=\"he he-chevron-left\"></i></button>\r\n <div class=\"title\">{{ yearRange[0] }} ~ {{ yearRange[yearRangeSize-1] }}</div>\r\n <button class=\"calendar-arrow\" (click)=\"nextYearRange()\"><i class=\"he he-chevron-right\"></i></button>\r\n </div>\r\n <div class=\"year-grid\">\r\n <div class=\"year-cell\" *ngFor=\"let y of yearRange\" (click)=\"selectYear(y)\"\r\n [class.selected]=\"isYearSelected(y)\" [class.today]=\"isYearCurrent(y)\">{{ y }}</div>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n</div>", styles: [".form-group.calendar{position:relative}.form-group.calendar .datepicker-group{left:0;width:100%;z-index:1000;padding:.5rem;color:#495057;min-width:240px;max-width:260px;border-radius:3px;background:#fff;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.form-group.calendar .datepicker-group .header{display:flex;font-weight:600;padding:5px;align-items:center;justify-content:space-between;border-bottom:1px solid #dee2e6}.form-group.calendar .datepicker-group .header .title{gap:8px;display:flex;font-size:15px;cursor:pointer;font-weight:600}.form-group.calendar .datepicker-group .header .calendar-arrow{width:28px;height:28px;border:none;line-height:1;cursor:pointer;background:none}.form-group.calendar .datepicker-group .header .calendar-arrow i{font-size:14px}.form-group.calendar .datepicker-group .header .calendar-arrow:hover{background:#f0f0f0}.form-group.calendar .datepicker-group .week-header{display:grid;padding:8px 0;font-size:13px;font-weight:700;text-align:center;grid-template-columns:repeat(7,1fr)}.form-group.calendar .datepicker-group .days-grid,.form-group.calendar .datepicker-group .month-grid,.form-group.calendar .datepicker-group .year-grid{gap:3px;padding:5px;display:grid;grid-template-columns:repeat(7,1fr)}.form-group.calendar .datepicker-group .days-grid .day-cell,.form-group.calendar .datepicker-group .days-grid .month-cell,.form-group.calendar .datepicker-group .days-grid .year-cell,.form-group.calendar .datepicker-group .month-grid .day-cell,.form-group.calendar .datepicker-group .month-grid .month-cell,.form-group.calendar .datepicker-group .month-grid .year-cell,.form-group.calendar .datepicker-group .year-grid .day-cell,.form-group.calendar .datepicker-group .year-grid .month-cell,.form-group.calendar .datepicker-group .year-grid .year-cell{display:flex;font-size:14px;cursor:pointer;align-items:center;justify-content:center}.form-group.calendar .datepicker-group .days-grid .day-cell.today,.form-group.calendar .datepicker-group .days-grid .month-cell.today,.form-group.calendar .datepicker-group .days-grid .year-cell.today,.form-group.calendar .datepicker-group .month-grid .day-cell.today,.form-group.calendar .datepicker-group .month-grid .month-cell.today,.form-group.calendar .datepicker-group .month-grid .year-cell.today,.form-group.calendar .datepicker-group .year-grid .day-cell.today,.form-group.calendar .datepicker-group .year-grid .month-cell.today,.form-group.calendar .datepicker-group .year-grid .year-cell.today{color:#37c0b3;font-weight:700;border:1px solid #37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.selected,.form-group.calendar .datepicker-group .days-grid .day-cell:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.selected,.form-group.calendar .datepicker-group .days-grid .month-cell:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.selected,.form-group.calendar .datepicker-group .days-grid .year-cell:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.selected,.form-group.calendar .datepicker-group .month-grid .day-cell:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.selected,.form-group.calendar .datepicker-group .month-grid .month-cell:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.selected,.form-group.calendar .datepicker-group .month-grid .year-cell:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.selected,.form-group.calendar .datepicker-group .year-grid .day-cell:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.selected,.form-group.calendar .datepicker-group .year-grid .month-cell:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.selected,.form-group.calendar .datepicker-group .year-grid .year-cell:hover{color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled{color:#e0e0e0;background:none;-webkit-user-select:none;user-select:none;cursor:not-allowed}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled.today,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled.today{color:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled.today:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled.today:hover{color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .days-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .days-grid .year-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .month-grid .year-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .day-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .month-cell.disabled:hover,.form-group.calendar .datepicker-group .year-grid .year-cell.disabled:hover{color:#e0e0e0;background:transparent}.form-group.calendar .datepicker-group .days-grid .day-cell,.form-group.calendar .datepicker-group .month-grid .day-cell,.form-group.calendar .datepicker-group .year-grid .day-cell{padding:5px 2px;border-radius:50%}.form-group.calendar .datepicker-group .days-grid .day-cell.other-month:not(.selected):not(:hover),.form-group.calendar .datepicker-group .month-grid .day-cell.other-month:not(.selected):not(:hover),.form-group.calendar .datepicker-group .year-grid .day-cell.other-month:not(.selected):not(:hover){color:#c5c5c5}.form-group.calendar .datepicker-group .days-grid .month-cell,.form-group.calendar .datepicker-group .days-grid .year-cell,.form-group.calendar .datepicker-group .month-grid .month-cell,.form-group.calendar .datepicker-group .month-grid .year-cell,.form-group.calendar .datepicker-group .year-grid .month-cell,.form-group.calendar .datepicker-group .year-grid .year-cell{padding:8px 2px;border-radius:3px}.form-group.calendar .datepicker-group .days-grid.week-mode .day-cell{border-radius:4px}.form-group.calendar .datepicker-group .days-grid.week-mode .day-cell.week-hover:not(.selected){color:#0d6f7d;background:#e6f5f3}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell{border-radius:0}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-start{border-radius:50% 0 0 50%;color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-end{border-radius:0 50% 50% 0;color:#fff;background:#37c0b3}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-start.range-end{border-radius:50%}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.in-range:not(.range-start):not(.range-end){background:#e6f5f3;color:#0d6f7d}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.range-hover:not(.in-range):not(.range-start):not(.range-end):not(.selected){background:#f0faf9;color:#0d6f7d}.form-group.calendar .datepicker-group .days-grid.range-mode .day-cell.selected:not(.range-start):not(.range-end):not(.in-range){color:#fff;background:#37c0b3;border-radius:50%}.form-group.calendar .datepicker-group .month-grid{grid-template-columns:repeat(3,1fr)}.form-group.calendar .datepicker-group .year-grid{grid-template-columns:repeat(4,1fr)}.form-group.calendar .datepicker-group .time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center}.form-group.calendar .datepicker-group .time-picker .ampm-toggle{gap:6px;display:flex;margin-left:1rem;flex-direction:column;justify-content:center}.form-group.calendar .datepicker-group .time-picker .ampm-toggle button{cursor:pointer;padding:3px 8px;font-size:.75rem;background:#fff;border:1px solid #cccccc}.form-group.calendar .datepicker-group .time-picker .ampm-toggle button.active{color:#fff;border-color:#37c0b3;background-color:#37c0b3}.form-group.calendar .datepicker-group .time-picker .time-select{display:flex;margin:0 .75rem;align-items:center;flex-direction:column}.form-group.calendar .datepicker-group .time-picker .time-select button{border:none;cursor:pointer;padding:4px 8px;background:transparent}.form-group.calendar .datepicker-group .time-picker .time-select button i{font-size:1rem}.form-group.calendar .datepicker-group .time-picker .time-select button:hover{background:#f0f0f0}.form-group.calendar .datepicker-group .time-picker .time-select .time-value{width:2rem;font-size:1rem;text-align:center;margin:2px 3px 4px}.form-group.calendar .datepicker-group .time-picker .time-separator{line-height:1;font-size:1rem}.form-group.calendar .clear{right:35px}.form-group.calendar.group-sm .clear{top:7px;right:35px}\n"] }]
|
|
1732
1689
|
}], ctorParameters: () => [{ type: i1.DatePipe }], propDecorators: { title: [{
|
|
1733
1690
|
type: Input
|
|
1734
1691
|
}], required: [{
|
|
@@ -2958,6 +2915,9 @@ class MultiselectControl {
|
|
|
2958
2915
|
.map((item) => item[this.optionDisplayProperty])
|
|
2959
2916
|
.join(", ");
|
|
2960
2917
|
}
|
|
2918
|
+
// Sync the form control value so the input displays the selected items
|
|
2919
|
+
// (formControl binding overrides [value], so we must set it explicitly)
|
|
2920
|
+
this.inputControl.setValue(this.selectedItemList, { emitEvent: false });
|
|
2961
2921
|
}
|
|
2962
2922
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MultiselectControl, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2963
2923
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: MultiselectControl, isStandalone: true, selector: "multiselect-control", inputs: { title: "title", selectedItems: "selectedItems", required: "required", placeholder: "placeholder", customClass: "customClass", clearVal: "clearVal", deFocus: "deFocus", optionValueProperty: "optionValueProperty", inputLoader: "inputLoader", error: "error", errorMessage: "errorMessage", autocomplete: "autocomplete", showSearch: "showSearch", optionDisplayProperty: "optionDisplayProperty", options: "options", readonly: "readonly", disabled: "disabled" }, outputs: { optionsSelected: "optionsSelected", selectionCleared: "selectionCleared", blurEvent: "blurEvent" }, host: { listeners: { "window:keydown": "handleWindowKeydown($event)" } }, providers: [
|