@luftborn/custom-elements 2.8.1 → 2.8.2

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.
Files changed (20) hide show
  1. package/demo/index.js +466 -2853
  2. package/demo/index.min.js +465 -2852
  3. package/demo/index.min.js.map +1 -1
  4. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepicker.d.ts +45 -0
  5. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepicker.js +327 -0
  6. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepicker.js.map +1 -0
  7. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.d.ts +1 -0
  8. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.js +5 -0
  9. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.js.map +1 -0
  10. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerUtils.d.ts +6 -0
  11. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerUtils.js +45 -0
  12. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerUtils.js.map +1 -0
  13. package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.d.ts +2 -6
  14. package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js +14 -60
  15. package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js.map +1 -1
  16. package/package.json +2 -6
  17. package/src/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepicker.ts +355 -0
  18. package/src/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.ts +101 -0
  19. package/src/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerUtils.ts +44 -0
  20. package/src/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.ts +18 -72
@@ -0,0 +1,45 @@
1
+ declare type CustomDatepickerOptions = {
2
+ input: HTMLInputElement;
3
+ dateFormat: string;
4
+ otherTriggers?: HTMLElement[];
5
+ parentElement?: ShadowRoot | HTMLElement;
6
+ };
7
+ export default class CustomDatepicker {
8
+ private input;
9
+ private otherTriggers;
10
+ private parentElement;
11
+ private datepicker;
12
+ private header;
13
+ private monthYear;
14
+ private selectNextMonth;
15
+ private selectPrevMonth;
16
+ private weekdays;
17
+ private days;
18
+ private selectMonthYear;
19
+ private selectDate;
20
+ private currentDate;
21
+ private currentMonth;
22
+ private currentYear;
23
+ private selectedDate;
24
+ private selectedMonth;
25
+ private selectedYear;
26
+ private selectedDay;
27
+ private firstDayOfMonth;
28
+ private lastDayOfMonth;
29
+ private firstDay;
30
+ private lastDay;
31
+ private dateFormat;
32
+ constructor(options: CustomDatepickerOptions);
33
+ private createDatePickerElements;
34
+ private applyStyles;
35
+ private moveMonth;
36
+ private renderCalendar;
37
+ private initSelectMonthYear;
38
+ private toggleSelectMonthYear;
39
+ private hideSelectMonthYear;
40
+ private showPicker;
41
+ private positionPicker;
42
+ private setDateForToday;
43
+ private addEventListeners;
44
+ }
45
+ export {};
@@ -0,0 +1,327 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var CustomDatepickerStyles_1 = require("./CustomDatepickerStyles");
4
+ var CustomDatepickerUtils_1 = require("./CustomDatepickerUtils");
5
+ var CustomDatepicker = /** @class */ (function () {
6
+ function CustomDatepicker(options) {
7
+ this.input = options.input;
8
+ this.dateFormat = CustomDatepickerUtils_1.supportedDateFormats.includes(options.dateFormat) ? options.dateFormat : CustomDatepickerUtils_1.defaultDateFormat;
9
+ this.otherTriggers = options.otherTriggers || [];
10
+ this.parentElement = options.parentElement;
11
+ this.currentDate = new Date();
12
+ this.currentMonth = this.currentDate.getMonth();
13
+ this.currentYear = this.currentDate.getFullYear();
14
+ this.selectedDate = new Date();
15
+ this.selectedMonth = this.selectedDate.getMonth();
16
+ this.selectedYear = this.selectedDate.getFullYear();
17
+ this.selectedDay = this.selectedDate.getDate();
18
+ this.firstDayOfMonth = new Date(this.currentYear, this.currentMonth, 1);
19
+ this.lastDayOfMonth = new Date(this.currentYear, this.currentMonth + 1, 0);
20
+ this.firstDay = this.firstDayOfMonth.getDay();
21
+ this.lastDay = this.lastDayOfMonth.getDate();
22
+ this.createDatePickerElements();
23
+ this.renderCalendar();
24
+ this.initSelectMonthYear();
25
+ this.addEventListeners();
26
+ }
27
+ CustomDatepicker.prototype.createDatePickerElements = function () {
28
+ var _this = this;
29
+ this.datepicker = document.createElement('div');
30
+ this.datepicker.classList.add('datepicker');
31
+ this.header = document.createElement('div');
32
+ this.header.classList.add('header');
33
+ this.monthYear = document.createElement('span');
34
+ this.monthYear.classList.add('month-year');
35
+ this.monthYear.onclick = function () { return _this.toggleSelectMonthYear(); };
36
+ this.selectNextMonth = document.createElement('span');
37
+ this.selectNextMonth.classList.add('next-month');
38
+ this.selectNextMonth.innerHTML = '▶';
39
+ this.selectNextMonth.onclick = function () { return _this.moveMonth(1); };
40
+ this.selectPrevMonth = document.createElement('span');
41
+ this.selectPrevMonth.classList.add('prev-month');
42
+ this.selectPrevMonth.innerHTML = '◀';
43
+ this.selectPrevMonth.onclick = function () { return _this.moveMonth(-1); };
44
+ this.header.appendChild(this.selectPrevMonth);
45
+ this.header.appendChild(this.monthYear);
46
+ this.header.appendChild(this.selectNextMonth);
47
+ this.weekdays = document.createElement('div');
48
+ this.weekdays.classList.add('weekdays');
49
+ this.days = document.createElement('div');
50
+ this.days.classList.add('days');
51
+ this.selectMonthYear = document.createElement('div');
52
+ this.selectMonthYear.classList.add('select-month-year');
53
+ this.selectDate = document.createElement('div');
54
+ this.selectDate.classList.add('select-date');
55
+ this.datepicker.appendChild(this.header);
56
+ this.datepicker.appendChild(this.selectDate);
57
+ this.selectDate.appendChild(this.weekdays);
58
+ this.selectDate.appendChild(this.days);
59
+ this.datepicker.appendChild(this.selectMonthYear);
60
+ var actions = document.createElement('div');
61
+ actions.classList.add('actions');
62
+ this.selectDate.appendChild(actions);
63
+ var cancel = document.createElement('input');
64
+ cancel.type = 'reset';
65
+ cancel.value = 'Cancel';
66
+ cancel.onclick = function () { return _this.showPicker(false); };
67
+ actions.appendChild(cancel);
68
+ var today = document.createElement('input');
69
+ today.type = 'reset';
70
+ today.value = 'Today';
71
+ today.onclick = function () { return _this.setDateForToday(); };
72
+ actions.appendChild(today);
73
+ if (this.input.parentElement) {
74
+ this.input.parentElement.appendChild(this.datepicker);
75
+ }
76
+ else {
77
+ document.body.appendChild(this.datepicker);
78
+ }
79
+ this.applyStyles();
80
+ };
81
+ CustomDatepicker.prototype.applyStyles = function () {
82
+ var style = document.createElement('style');
83
+ style.innerHTML = CustomDatepickerStyles_1.CustomDatepickerStyles;
84
+ this.datepicker.appendChild(style);
85
+ };
86
+ CustomDatepicker.prototype.moveMonth = function (steps) {
87
+ var newMonth = this.currentMonth + steps;
88
+ var newYear = this.currentYear;
89
+ if (newMonth < 0) {
90
+ newYear = this.currentYear + Math.floor(newMonth / 12);
91
+ newMonth = 12 + (newMonth % 12);
92
+ }
93
+ else if (newMonth > 11) {
94
+ newYear = this.currentYear + Math.floor(newMonth / 12);
95
+ newMonth = newMonth % 12;
96
+ }
97
+ this.currentMonth = newMonth;
98
+ this.currentYear = newYear;
99
+ this.firstDayOfMonth = new Date(this.currentYear, this.currentMonth, 1);
100
+ this.lastDayOfMonth = new Date(this.currentYear, this.currentMonth + 1, 0);
101
+ this.firstDay = this.firstDayOfMonth.getDay();
102
+ this.lastDay = this.lastDayOfMonth.getDate();
103
+ this.renderCalendar();
104
+ };
105
+ CustomDatepicker.prototype.renderCalendar = function () {
106
+ var _this = this;
107
+ this.monthYear.innerHTML = CustomDatepickerUtils_1.months[this.currentMonth] + ' ' + this.currentYear;
108
+ this.weekdays.innerHTML = '';
109
+ for (var i = 0; i < CustomDatepickerUtils_1.daysOfWeek.length; i++) {
110
+ var span = document.createElement('span');
111
+ span.innerHTML = CustomDatepickerUtils_1.daysOfWeek[i];
112
+ this.weekdays.appendChild(span);
113
+ }
114
+ this.days.innerHTML = '';
115
+ var _loop_1 = function (i) {
116
+ var span = document.createElement('span');
117
+ if (i < this_1.firstDay) {
118
+ span.classList.add('day-of-previous-month');
119
+ span.style.color = '#ccc';
120
+ var currentDate = new Date(this_1.currentYear, this_1.currentMonth, 0);
121
+ span.innerHTML = (currentDate.getDate() - this_1.firstDay + i + 1).toString();
122
+ }
123
+ else if (i < this_1.lastDay + this_1.firstDay) {
124
+ span.classList.add('day-of-current-month');
125
+ span.innerHTML = (i - this_1.firstDay + 1).toString();
126
+ if (i - this_1.firstDay + 1 === this_1.selectedDay && this_1.currentMonth === this_1.selectedMonth && this_1.currentYear === this_1.selectedYear) {
127
+ span.classList.add('selected-day');
128
+ }
129
+ }
130
+ else {
131
+ span.classList.add('day-of-next-month');
132
+ span.style.color = '#ccc';
133
+ span.innerHTML = (i - this_1.lastDay - this_1.firstDay + 1).toString();
134
+ }
135
+ span.onclick = function () {
136
+ var moveMonthSteps = 0;
137
+ _this.selectedDay = parseInt(span.innerHTML);
138
+ if (span.classList.contains('day-of-previous-month')) {
139
+ _this.selectedMonth = _this.currentMonth - 1;
140
+ _this.selectedYear = _this.currentYear;
141
+ moveMonthSteps = -1;
142
+ }
143
+ else if (span.classList.contains('day-of-current-month')) {
144
+ _this.selectedMonth = _this.currentMonth;
145
+ _this.selectedYear = _this.currentYear;
146
+ }
147
+ else {
148
+ _this.selectedMonth = _this.currentMonth + 1;
149
+ _this.selectedYear = _this.currentYear;
150
+ moveMonthSteps = 1;
151
+ }
152
+ _this.selectedDate = new Date(_this.selectedYear, _this.selectedMonth, _this.selectedDay);
153
+ var selectedDayElement = _this.days.querySelector('.selected-day');
154
+ if (selectedDayElement) {
155
+ selectedDayElement.classList.remove('selected-day');
156
+ }
157
+ span.classList.add('selected-day');
158
+ var formattedDate = (0, CustomDatepickerUtils_1.formatDate)(_this.selectedDate, _this.dateFormat);
159
+ _this.input.value = formattedDate;
160
+ _this.showPicker(false);
161
+ };
162
+ this_1.days.appendChild(span);
163
+ };
164
+ var this_1 = this;
165
+ for (var i = 0; i < 42; i++) {
166
+ _loop_1(i);
167
+ }
168
+ this.positionPicker();
169
+ };
170
+ CustomDatepicker.prototype.initSelectMonthYear = function () {
171
+ var _this = this;
172
+ this.selectMonthYear.style.display = 'none';
173
+ this.selectMonthYear.style.height = '200px';
174
+ if ((0, CustomDatepickerUtils_1.isMobileDevice)()) {
175
+ this.selectMonthYear.style.height = '300px';
176
+ }
177
+ this.selectMonthYear.innerHTML = '';
178
+ var monthsContainer = document.createElement('div');
179
+ monthsContainer.classList.add('months');
180
+ var _loop_2 = function (i) {
181
+ var span = document.createElement('span');
182
+ span.innerHTML = CustomDatepickerUtils_1.months[i].substring(0, 3);
183
+ span.classList.add('select-month');
184
+ monthsContainer.appendChild(span);
185
+ span.onclick = function () {
186
+ _this.selectedMonth = CustomDatepickerUtils_1.months.findIndex(function (month) { return month.substring(0, 3) === span.innerHTML; });
187
+ var moveMonthSteps = (_this.selectedYear - _this.currentYear) * 12 + _this.selectedMonth - _this.currentMonth;
188
+ _this.moveMonth(moveMonthSteps);
189
+ _this.hideSelectMonthYear();
190
+ };
191
+ };
192
+ for (var i = 0; i < CustomDatepickerUtils_1.months.length; i++) {
193
+ _loop_2(i);
194
+ }
195
+ for (var i = this.currentYear - 100; i < this.currentYear + 100; i++) {
196
+ var year = document.createElement('div');
197
+ year.classList.add('year');
198
+ year.innerHTML = i.toString();
199
+ this.selectMonthYear.appendChild(year);
200
+ if (i === this.currentYear) {
201
+ year.appendChild(monthsContainer);
202
+ }
203
+ }
204
+ var years = this.selectMonthYear.querySelectorAll('.year');
205
+ var tempSelectedYear = this.selectedYear;
206
+ var _loop_3 = function (i) {
207
+ years[i].addEventListener('click', function () {
208
+ var year = parseInt(years[i].innerHTML);
209
+ if (year === tempSelectedYear) {
210
+ return;
211
+ }
212
+ else {
213
+ tempSelectedYear = year;
214
+ _this.selectedYear = year;
215
+ var monthsContainers = _this.selectMonthYear.querySelectorAll('.months');
216
+ for (var i_1 = 0; i_1 < monthsContainers.length; i_1++) {
217
+ monthsContainers[i_1].remove();
218
+ }
219
+ years[i].appendChild(monthsContainer);
220
+ }
221
+ });
222
+ };
223
+ for (var i = 0; i < years.length; i++) {
224
+ _loop_3(i);
225
+ }
226
+ };
227
+ CustomDatepicker.prototype.toggleSelectMonthYear = function () {
228
+ if (this.selectMonthYear.style.display === 'none') {
229
+ this.selectDate.style.display = 'none';
230
+ this.selectMonthYear.style.display = 'block';
231
+ this.header.style.color = '#ccc';
232
+ var years = this.selectMonthYear.querySelectorAll('.year');
233
+ for (var i = 0; i < years.length; i++) {
234
+ if (years[i].querySelector('.months')) {
235
+ years[i].scrollIntoView();
236
+ break;
237
+ }
238
+ }
239
+ }
240
+ else {
241
+ this.hideSelectMonthYear();
242
+ }
243
+ };
244
+ CustomDatepicker.prototype.hideSelectMonthYear = function () {
245
+ this.selectDate.style.display = 'block';
246
+ this.selectMonthYear.style.display = 'none';
247
+ this.header.style.color = '#000';
248
+ };
249
+ CustomDatepicker.prototype.showPicker = function (showpicker) {
250
+ if (showpicker === void 0) { showpicker = true; }
251
+ if (showpicker) {
252
+ this.positionPicker();
253
+ this.datepicker.style.display = 'block';
254
+ }
255
+ else {
256
+ this.datepicker.style.display = 'none';
257
+ this.hideSelectMonthYear();
258
+ return;
259
+ }
260
+ };
261
+ CustomDatepicker.prototype.positionPicker = function () {
262
+ this.datepicker.style.position = 'fixed';
263
+ var datepickerHeight = 250;
264
+ if ((0, CustomDatepickerUtils_1.isMobileDevice)()) {
265
+ this.datepicker.style.height = '400px';
266
+ this.datepicker.style.top = '50%';
267
+ this.datepicker.style.left = '50%';
268
+ this.datepicker.style.transform = 'translate(-50%, -50%)';
269
+ this.datepicker.style.width = '90%';
270
+ this.datepicker.style.maxWidth = '300px';
271
+ this.datepicker.style.fontSize = '16px';
272
+ this.datepicker.style.padding = '30px';
273
+ this.header.style.marginBottom = '20px';
274
+ var weekdaysSpans = this.weekdays.querySelectorAll('span');
275
+ var daysSpans = this.days.querySelectorAll('span');
276
+ weekdaysSpans.forEach(function (span) { return span.style.marginBottom = '10px'; });
277
+ daysSpans.forEach(function (span) { return span.style.marginBottom = '10px'; });
278
+ }
279
+ else {
280
+ this.datepicker.style.height = datepickerHeight + 'px';
281
+ var dateInputRect = this.input.getBoundingClientRect();
282
+ datepickerHeight += 20;
283
+ if (window.innerHeight - dateInputRect.bottom < datepickerHeight) {
284
+ this.datepicker.style.top = 'auto';
285
+ this.datepicker.style.bottom = window.innerHeight - dateInputRect.top + 'px';
286
+ }
287
+ else {
288
+ this.datepicker.style.bottom = 'auto';
289
+ this.datepicker.style.top = dateInputRect.bottom + 'px';
290
+ }
291
+ this.datepicker.style.left = dateInputRect.left + 'px';
292
+ }
293
+ };
294
+ CustomDatepicker.prototype.setDateForToday = function () {
295
+ this.input.value = (0, CustomDatepickerUtils_1.formatDate)(this.selectedDate, this.dateFormat);
296
+ this.showPicker(false);
297
+ };
298
+ CustomDatepicker.prototype.addEventListeners = function () {
299
+ var _this = this;
300
+ this.input.addEventListener('click', function () { return _this.showPicker(true); });
301
+ this.input.addEventListener('focus', function () { return _this.showPicker(true); });
302
+ this.input.addEventListener('change', function () {
303
+ var date = new Date(_this.input.value);
304
+ if (date.toString() !== 'Invalid Date') {
305
+ _this.selectedDate = date;
306
+ _this.selectedMonth = date.getMonth();
307
+ _this.selectedYear = date.getFullYear();
308
+ _this.selectedDay = date.getDate();
309
+ _this.renderCalendar();
310
+ }
311
+ });
312
+ this.otherTriggers.forEach(function (trigger) {
313
+ trigger.addEventListener('click', function () { return _this.showPicker(true); });
314
+ });
315
+ document.onclick = function (event) {
316
+ var elementsToNeglect = [_this.input, _this.datepicker, _this.monthYear, _this.weekdays, _this.days, _this.header, _this.selectMonthYear];
317
+ var element = event.target;
318
+ var isNeglected = elementsToNeglect.includes(element) || elementsToNeglect.includes(element.parentElement) || (element).classList.contains('select-month') || element === _this.parentElement;
319
+ if (!isNeglected) {
320
+ _this.showPicker(false);
321
+ }
322
+ };
323
+ };
324
+ return CustomDatepicker;
325
+ }());
326
+ exports.default = CustomDatepicker;
327
+ //# sourceMappingURL=CustomDatepicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomDatepicker.js","sourceRoot":"","sources":["../../../../src/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepicker.ts"],"names":[],"mappings":";;AAAA,mEAAkE;AAClE,iEAAkI;AASlI;IA4BI,0BAAY,OAAgC;QACxC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,4CAAoB,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,yCAAiB,CAAC;QAC7G,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,EAAE,CAAC;QACjD,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAE3C,IAAI,CAAC,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;QAClD,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC;QAC/B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;QAClD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;QACpD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC/C,IAAI,CAAC,eAAe,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,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C,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,OAAO,KAAK,KAAI,CAAC,aAAa,CAAC;YAE/L,IAAI,CAAC,WAAW,EAAC;gBACb,KAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;aAC1B;QACL,CAAC,CAAC;IACN,CAAC;IACL,uBAAC;AAAD,CAAC,AAxVD,IAwVC"}
@@ -0,0 +1 @@
1
+ export declare const CustomDatepickerStyles = "\n .datepicker {\n position: fixed;\n background-color: #fff;\n display: none;\n width: 200px;\n border: 1px solid #ccc;\n border-radius: 5px;\n padding: 10px;\n margin: 0 auto;\n box-shadow: 0 0 10px 0 #ccc;\n font: 12px Arial, sans-serif;\n }\n\n .header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n }\n .weekdays {\n display: flex;\n justify-content: space-between;\n }\n .weekdays span {\n width: 14.28%;\n text-align: center;\n padding: 5px 0;\n }\n .days {\n display: flex;\n flex-wrap: wrap;\n }\n .days span {\n width: 14.28%;\n text-align: center;\n padding: 5px 0;\n }\n .days span:hover {\n background-color: #B2d5ff;\n cursor: pointer;\n }\n .days span.today {\n border: 1px solid #000;\n }\n .days span.selected-day {\n background-color: #0075ff;\n color: #fff;\n }\n .prev-month, .next-month {\n cursor: pointer;\n }\n .month-year {\n font-weight: bold;\n }\n .month-year:hover {\n cursor: pointer;\n }\n .select-month-year {\n display: none;\n width: 100%;\n overflow-y: auto;\n }\n .select-month-year .year {\n text-align: center;\n background-color: #f0f0f0;\n border-bottom: 1px solid #3f3d3d;\n padding: 5px 0;\n cursor: pointer;\n }\n .select-month-year .year .months {\n display: flex;\n flex-wrap: wrap;\n }\n .select-month-year .year .months span {\n width: 25%;\n text-align: center;\n padding: 10px 0;\n background-color: #fff;\n }\n .select-month-year .year .months span:hover {\n background-color: #B2d5ff;\n cursor: pointer;\n }\n .actions {\n display: flex;\n justify-content: space-between;\n margin-top: 10px;\n }\n .actions input {\n color: #0075ff;\n border: none;\n background-color: transparent;\n padding: 5px;\n border: 1px solid transparent;\n }\n .actions input:hover {\n background-color: #B2d5ff;\n border-color: #000;\n }\n";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CustomDatepickerStyles = void 0;
4
+ exports.CustomDatepickerStyles = "\n .datepicker {\n position: fixed;\n background-color: #fff;\n display: none;\n width: 200px;\n border: 1px solid #ccc;\n border-radius: 5px;\n padding: 10px;\n margin: 0 auto;\n box-shadow: 0 0 10px 0 #ccc;\n font: 12px Arial, sans-serif;\n }\n\n .header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n }\n .weekdays {\n display: flex;\n justify-content: space-between;\n }\n .weekdays span {\n width: 14.28%;\n text-align: center;\n padding: 5px 0;\n }\n .days {\n display: flex;\n flex-wrap: wrap;\n }\n .days span {\n width: 14.28%;\n text-align: center;\n padding: 5px 0;\n }\n .days span:hover {\n background-color: #B2d5ff;\n cursor: pointer;\n }\n .days span.today {\n border: 1px solid #000;\n }\n .days span.selected-day {\n background-color: #0075ff;\n color: #fff;\n }\n .prev-month, .next-month {\n cursor: pointer;\n }\n .month-year {\n font-weight: bold;\n }\n .month-year:hover {\n cursor: pointer;\n }\n .select-month-year {\n display: none;\n width: 100%;\n overflow-y: auto;\n }\n .select-month-year .year {\n text-align: center;\n background-color: #f0f0f0;\n border-bottom: 1px solid #3f3d3d;\n padding: 5px 0;\n cursor: pointer;\n }\n .select-month-year .year .months {\n display: flex;\n flex-wrap: wrap;\n }\n .select-month-year .year .months span {\n width: 25%;\n text-align: center;\n padding: 10px 0;\n background-color: #fff;\n }\n .select-month-year .year .months span:hover {\n background-color: #B2d5ff;\n cursor: pointer;\n }\n .actions {\n display: flex;\n justify-content: space-between;\n margin-top: 10px;\n }\n .actions input {\n color: #0075ff;\n border: none;\n background-color: transparent;\n padding: 5px;\n border: 1px solid transparent;\n }\n .actions input:hover {\n background-color: #B2d5ff;\n border-color: #000;\n }\n";
5
+ //# sourceMappingURL=CustomDatepickerStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomDatepickerStyles.js","sourceRoot":"","sources":["../../../../src/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG,6yEAoGrC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const months: string[];
2
+ export declare const daysOfWeek: string[];
3
+ export declare const defaultDateFormat = "yyyy-mm-dd";
4
+ export declare const supportedDateFormats: string[];
5
+ export declare function formatDate(date: Date, dateFormat: string): string;
6
+ export declare function isMobileDevice(): boolean;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isMobileDevice = exports.formatDate = exports.supportedDateFormats = exports.defaultDateFormat = exports.daysOfWeek = exports.months = void 0;
4
+ exports.months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
5
+ exports.daysOfWeek = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
6
+ exports.defaultDateFormat = 'yyyy-mm-dd';
7
+ exports.supportedDateFormats = [
8
+ 'ddmmyyyy',
9
+ 'mmddyyyy',
10
+ 'dd/mm/yyyy',
11
+ 'mm/dd/yyyy',
12
+ 'dd-mm-yyyy',
13
+ 'mm-dd-yyyy',
14
+ 'yyyy-mm-dd',
15
+ 'yyyy-dd-mm',
16
+ 'Month dd, yyyy',
17
+ 'mm/dd/yy',
18
+ 'dd/mm/yy',
19
+ ];
20
+ function formatDate(date, dateFormat) {
21
+ var year = date.getFullYear();
22
+ var month = (date.getMonth() + 1).toString().padStart(2, '0');
23
+ var day = date.getDate().toString().padStart(2, '0');
24
+ var monthName = date.toLocaleString('default', { month: 'long' });
25
+ var dateFormats = {
26
+ 'ddmmyyyy': "" + day + month + year,
27
+ 'mmddyyyy': "" + month + day + year,
28
+ 'dd/mm/yyyy': day + "/" + month + "/" + year,
29
+ 'mm/dd/yyyy': month + "/" + day + "/" + year,
30
+ 'dd-mm-yyyy': day + "-" + month + "-" + year,
31
+ 'mm-dd-yyyy': month + "-" + day + "-" + year,
32
+ 'yyyy-mm-dd': year + "-" + month + "-" + day,
33
+ 'yyyy-dd-mm': year + "-" + day + "-" + month,
34
+ 'Month dd, yyyy': monthName + " " + day + ", " + year,
35
+ 'mm/dd/yy': month + "/" + day + "/" + year.toString().slice(-2),
36
+ 'dd/mm/yy': day + "/" + month + "/" + year.toString().slice(-2),
37
+ };
38
+ return dateFormats[dateFormat];
39
+ }
40
+ exports.formatDate = formatDate;
41
+ function isMobileDevice() {
42
+ return /Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth < 480;
43
+ }
44
+ exports.isMobileDevice = isMobileDevice;
45
+ //# sourceMappingURL=CustomDatepickerUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomDatepickerUtils.js","sourceRoot":"","sources":["../../../../src/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerUtils.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAa,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAC9I,QAAA,UAAU,GAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAElE,QAAA,iBAAiB,GAAG,YAAY,CAAC;AACjC,QAAA,oBAAoB,GAAG;IAChC,UAAU;IACV,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,UAAU;IACV,UAAU;CACb,CAAC;AAEF,SAAgB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B,OAAO,sDAAsD,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC,UAAU,GAAG,GAAG,CAAC;AACvH,CAAC;AAFD,wCAEC"}
@@ -2,9 +2,7 @@ import { CustomInputElement } from '../../framework/CustomInputElement';
2
2
  export declare class CustomFormatDateFieldElement extends CustomInputElement {
3
3
  date: HTMLInputElement;
4
4
  dateWrapper: HTMLElement;
5
- datepicker: any;
6
- private readonly defaultDateFormat;
7
- private readonly supportedDateFormats;
5
+ pickerTrigger: HTMLElement;
8
6
  constructor();
9
7
  get value(): string;
10
8
  set value(value: string);
@@ -13,7 +11,5 @@ export declare class CustomFormatDateFieldElement extends CustomInputElement {
13
11
  initChildInputs(): void;
14
12
  change($event: any): void;
15
13
  validate(): void;
16
- initFlatpickr(): void;
17
- private formatDate;
18
- private validateDateFormats;
14
+ initCustomPicker(): void;
19
15
  }
@@ -25,26 +25,12 @@ exports.CustomFormatDateFieldElement = void 0;
25
25
  var custom_element_decorator_1 = require("../../framework/custom-element.decorator");
26
26
  var CustomInputElement_1 = require("../../framework/CustomInputElement");
27
27
  var CustomEvents_1 = require("../../framework/CustomEvents");
28
- var flatpickr = require('flatpickr');
28
+ var CustomDatepicker_1 = require("./CustomDatepicker/CustomDatepicker");
29
+ var CustomDatepickerUtils_1 = require("./CustomDatepicker/CustomDatepickerUtils");
29
30
  var CustomFormatDateFieldElement = /** @class */ (function (_super) {
30
31
  __extends(CustomFormatDateFieldElement, _super);
31
32
  function CustomFormatDateFieldElement() {
32
- var _this = _super.call(this) || this;
33
- _this.defaultDateFormat = 'yyyy-mm-dd';
34
- _this.supportedDateFormats = [
35
- 'ddmmyyyy',
36
- 'mmddyyyy',
37
- 'dd/mm/yyyy',
38
- 'mm/dd/yyyy',
39
- 'dd-mm-yyyy',
40
- 'mm-dd-yyyy',
41
- 'yyyy-mm-dd',
42
- 'yyyy-dd-mm',
43
- 'Month dd, yyyy',
44
- 'mm/dd/yy',
45
- 'dd/mm/yy',
46
- ];
47
- return _this;
33
+ return _super.call(this) || this;
48
34
  }
49
35
  Object.defineProperty(CustomFormatDateFieldElement.prototype, "value", {
50
36
  get: function () {
@@ -68,8 +54,8 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
68
54
  };
69
55
  CustomFormatDateFieldElement.prototype.initChildInputs = function () {
70
56
  this.date = _super.prototype.getChildInput.call(this, '#date-field');
71
- this.dateWrapper = _super.prototype.getChildInput.call(this, '.flatpickr');
72
- this.validateDateFormats();
57
+ this.pickerTrigger = this.getChildElement('#picker-trigger');
58
+ this.dateFormat = CustomDatepickerUtils_1.supportedDateFormats.includes(this.dateFormat) ? this.dateFormat : CustomDatepickerUtils_1.defaultDateFormat;
73
59
  this.date.placeholder = this.dateFormat;
74
60
  this.date.addEventListener('change', this.change.bind(this));
75
61
  if (this.required) {
@@ -81,7 +67,7 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
81
67
  if (this.min) {
82
68
  this.date.setAttribute('min', this.min);
83
69
  }
84
- this.initFlatpickr();
70
+ this.initCustomPicker();
85
71
  };
86
72
  // events
87
73
  CustomFormatDateFieldElement.prototype.change = function ($event) {
@@ -92,51 +78,19 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
92
78
  this.valid;
93
79
  this.onValidate.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'validate'));
94
80
  };
95
- CustomFormatDateFieldElement.prototype.initFlatpickr = function () {
96
- var _this = this;
97
- flatpickr(this.dateWrapper, {
98
- wrap: true,
99
- altInput: true,
100
- appendTo: this.shadowRoot.querySelector('.wrapper'),
101
- disableMobile: true,
102
- parseDate: function (datestr) {
103
- return new Date(datestr);
104
- },
105
- formatDate: function (date, format) {
106
- return _this.formatDate(date);
107
- }
81
+ CustomFormatDateFieldElement.prototype.initCustomPicker = function () {
82
+ new CustomDatepicker_1.default({
83
+ input: this.date,
84
+ dateFormat: this.dateFormat,
85
+ otherTriggers: [this.pickerTrigger],
86
+ parentElement: this,
108
87
  });
109
88
  };
110
- CustomFormatDateFieldElement.prototype.formatDate = function (date) {
111
- var year = date.getFullYear();
112
- var month = (date.getMonth() + 1).toString().padStart(2, '0');
113
- var day = date.getDate().toString().padStart(2, '0');
114
- var monthName = date.toLocaleString('default', { month: 'long' });
115
- var dateFormats = {
116
- 'ddmmyyyy': "" + day + month + year,
117
- 'mmddyyyy': "" + month + day + year,
118
- 'dd/mm/yyyy': day + "/" + month + "/" + year,
119
- 'mm/dd/yyyy': month + "/" + day + "/" + year,
120
- 'dd-mm-yyyy': day + "-" + month + "-" + year,
121
- 'mm-dd-yyyy': month + "-" + day + "-" + year,
122
- 'yyyy-mm-dd': year + "-" + month + "-" + day,
123
- 'yyyy-dd-mm': year + "-" + day + "-" + month,
124
- 'Month dd, yyyy': monthName + " " + day + ", " + year,
125
- 'mm/dd/yy': month + "/" + day + "/" + year.toString().slice(-2),
126
- 'dd/mm/yy': day + "/" + month + "/" + year.toString().slice(-2),
127
- };
128
- return dateFormats[this.dateFormat];
129
- };
130
- CustomFormatDateFieldElement.prototype.validateDateFormats = function () {
131
- if (!this.supportedDateFormats.includes(this.dateFormat)) {
132
- this.dateFormat = this.defaultDateFormat;
133
- }
134
- };
135
89
  CustomFormatDateFieldElement = __decorate([
136
90
  (0, custom_element_decorator_1.default)({
137
91
  selector: 'custom-format-date-element',
138
- template: "\n\t\t<div class=\"wrapper flatpickr\">\n\t\t\t<input type=\"text\" id=\"date-field\" data-input />\n\t\t\t<svg id=\"picker-trigger\" data-toggle viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"2\" y=\"4\" width=\"20\" height=\"18\" rx=\"1\" fill=\"#000\"/><rect x=\"4\" y=\"8\" width=\"16\" height=\"12\" fill=\"white\"/><path d=\"M4 10H20\" stroke=\"#000\" stroke-width=\"1\"/><circle cx=\"16\" cy=\"14\" r=\"2\" fill=\"#F44336\"/><rect x=\"6\" y=\"2\" width=\"3\" height=\"4\" rx=\".5\" fill=\"#000\"/><rect x=\"15\" y=\"2\" width=\"3\" height=\"4\" rx=\".5\" fill=\"#000\"/></svg>\n\t\t</div>",
139
- style: "\n\t\t@import '../../../node_modules/flatpickr/dist/flatpickr.min.css';\n\t\t:host{\n\t\t\twidth:100%;\n\t\t}\n\t\t.wrapper{\n\t\t\tdisplay:flex;\n\t\t\tposition: relative;\n\t\t}\n\t\tinput{\n\t\t\tbox-sizing: border-box;\n\t\t\twidth: 100% !important;\n\t\t\tborder: none;\n\t\t\tbackground-color: #f1f4ff;\n\t\t\tmargin: 2px;\n\t\t\tresize: none;\n\t\t}\n\t\t#date-field::after {\n\t\t\tcontent: url('path/to/datepicker-icon.png'); /* Path to your datepicker icon */\n\t\t\tcursor: pointer;\n\t\t\tright: 10px;\n\t\t}\n\t\t#picker-trigger {\n\t\t\tcursor: pointer;\n\t\t\twidth: 15px;\n\t\t\theight: 15px;\n\t\t\tposition:absolute;\n\t\t\tright: 2px;\n\t\t\ttop: 15%;\n\t\t}\n\t\t.flatpickr-calendar {\n\t\t\tposition: fixed !important; /* Use fixed positioning */\n\t\t\ttop: 50% !important; /* Center vertically */\n\t\t\tleft: 50% !important; /* Center horizontally */\n\t\t\tz-index: 1000 !important; /* Ensure it's above other content */\n\t\t}\n\t",
92
+ template: "\n\t\t<div class=\"wrapper\">\n\t\t\t<input type=\"text\" id=\"date-field\" readonly />\n\t\t\t<svg id=\"picker-trigger\" data-toggle viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"2\" y=\"4\" width=\"20\" height=\"18\" rx=\"1\" fill=\"#000\"/><rect x=\"4\" y=\"8\" width=\"16\" height=\"12\" fill=\"white\"/><path d=\"M4 10H20\" stroke=\"#000\" stroke-width=\"1\"/><circle cx=\"16\" cy=\"14\" r=\"2\" fill=\"#F44336\"/><rect x=\"6\" y=\"2\" width=\"3\" height=\"4\" rx=\".5\" fill=\"#000\"/><rect x=\"15\" y=\"2\" width=\"3\" height=\"4\" rx=\".5\" fill=\"#000\"/></svg>\n\t\t</div>",
93
+ style: "\n\t\t:host{\n\t\t\twidth:100%;\n\t\t}\n\t\t* {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.wrapper{\n\t\t\tdisplay:flex;\n\t\t\tposition: relative;\n\t\t}\n\t\tinput{\n\t\t\tbox-sizing: border-box;\n\t\t\twidth: 100% !important;\n\t\t\tborder: none;\n\t\t\tbackground-color: #f1f4ff;\n\t\t\tmargin: 2px;\n\t\t\tresize: none;\n\t\t}\n\t\t#date-field::after {\n\t\t\tcontent: url('path/to/datepicker-icon.png'); /* Path to your datepicker icon */\n\t\t\tcursor: pointer;\n\t\t\tright: 10px;\n\t\t}\n\t\t#picker-trigger {\n\t\t\tcursor: pointer;\n\t\t\twidth: 15px;\n\t\t\theight: 15px;\n\t\t\tposition:absolute;\n\t\t\tright: 2px;\n\t\t\ttop: 15%;\n\t\t}\n\t",
140
94
  useShadow: true,
141
95
  })
142
96
  ], CustomFormatDateFieldElement);
@@ -1 +1 @@
1
- {"version":3,"file":"CustomFormatDateFieldElement.js","sourceRoot":"","sources":["../../../src/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,IAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAgDvC;IAAkD,gDAAkB;IAoBnE;QAAA,YACC,iBAAO,SACP;QAjBgB,uBAAiB,GAAG,YAAY,CAAC;QACjC,0BAAoB,GAAG;YACvC,UAAU;YACV,UAAU;YACV,YAAY;YACZ,YAAY;YACZ,YAAY;YACZ,YAAY;YACZ,YAAY;YACZ,YAAY;YACZ,gBAAgB;YAChB,UAAU;YACV,UAAU;SACV,CAAC;;IAIF,CAAC;IAED,sBAAI,+CAAK;aAAT;YACC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;QACxB,CAAC;aA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AY,EAAK,GAAG,SAAI,KAAK,SAAI,IAAM;YACvC,YAAY,EAAK,KAAK,SAAI,GAAG,SAAI,IAAM;YACvC,YAAY,EAAK,GAAG,SAAI,KAAK,SAAI,IAAM;YACvC,YAAY,EAAK,KAAK,SAAI,GAAG,SAAI,IAAM;YACvC,YAAY,EAAK,IAAI,SAAI,KAAK,SAAI,GAAK;YACvC,YAAY,EAAK,IAAI,SAAI,GAAG,SAAI,KAAO;YACvC,gBAAgB,EAAK,SAAS,SAAI,GAAG,UAAK,IAAM;YAChD,UAAU,EAAK,KAAK,SAAI,GAAG,SAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAG;YAC1D,UAAU,EAAK,GAAG,SAAI,KAAK,SAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAG;SAC1D,CAAA;QAED,OAAO,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;IAEO,0DAAmB,GAA3B;QACC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACzD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC;SACzC;IACF,CAAC;IArHW,4BAA4B;QA9CxC,IAAA,kCAAa,EAAC;YACd,QAAQ,EAAE,4BAA4B;YACtC,QAAQ,EAAE,ynBAIF;YACR,KAAK,EAAE,87BAoCN;YACD,SAAS,EAAE,IAAI;SACf,CAAC;OACW,4BAA4B,CAsHxC;IAAD,mCAAC;CAAA,AAtHD,CAAkD,uCAAkB,GAsHnE;AAtHY,oEAA4B"}
1
+ {"version":3,"file":"CustomFormatDateFieldElement.js","sourceRoot":"","sources":["../../../src/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACt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