@nuralyui/datepicker 0.0.4 → 0.0.5

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 (85) hide show
  1. package/bundle.js +791 -0
  2. package/datepicker.component.d.ts +189 -0
  3. package/datepicker.component.js +668 -0
  4. package/datepicker.component.js.map +1 -0
  5. package/datepicker.constant.d.ts +60 -0
  6. package/datepicker.constant.js +60 -0
  7. package/datepicker.constant.js.map +1 -0
  8. package/datepicker.style.d.ts +7 -0
  9. package/datepicker.style.js +456 -0
  10. package/datepicker.style.js.map +1 -0
  11. package/datepicker.style.variables.d.ts +11 -0
  12. package/datepicker.style.variables.js +115 -0
  13. package/datepicker.style.variables.js.map +1 -0
  14. package/datepicker.type.d.ts +142 -0
  15. package/datepicker.type.js +75 -0
  16. package/datepicker.type.js.map +1 -0
  17. package/index.d.ts +4 -1
  18. package/index.js +4 -1
  19. package/index.js.map +1 -1
  20. package/package.json +16 -2
  21. package/react.d.ts +15 -2
  22. package/react.js +16 -3
  23. package/react.js.map +1 -1
  24. package/constants.d.ts +0 -2
  25. package/constants.d.ts.map +0 -1
  26. package/constants.js +0 -2
  27. package/constants.js.map +0 -1
  28. package/core/day.helper.d.ts +0 -5
  29. package/core/day.helper.d.ts.map +0 -1
  30. package/core/day.helper.js +0 -53
  31. package/core/day.helper.js.map +0 -1
  32. package/core/formatter.d.ts +0 -2
  33. package/core/formatter.d.ts.map +0 -1
  34. package/core/formatter.js +0 -9
  35. package/core/formatter.js.map +0 -1
  36. package/core/locale.helper.d.ts +0 -144
  37. package/core/locale.helper.d.ts.map +0 -1
  38. package/core/locale.helper.js +0 -151
  39. package/core/locale.helper.js.map +0 -1
  40. package/core/month.helper.d.ts +0 -3
  41. package/core/month.helper.d.ts.map +0 -1
  42. package/core/month.helper.js +0 -24
  43. package/core/month.helper.js.map +0 -1
  44. package/core/string.helper.d.ts +0 -2
  45. package/core/string.helper.d.ts.map +0 -1
  46. package/core/string.helper.js +0 -4
  47. package/core/string.helper.js.map +0 -1
  48. package/date-picker.component.d.ts +0 -80
  49. package/date-picker.component.d.ts.map +0 -1
  50. package/date-picker.component.js +0 -475
  51. package/date-picker.component.js.map +0 -1
  52. package/date-picker.style.d.ts +0 -2
  53. package/date-picker.style.d.ts.map +0 -1
  54. package/date-picker.style.js +0 -223
  55. package/date-picker.style.js.map +0 -1
  56. package/datepicker.types.d.ts +0 -39
  57. package/datepicker.types.d.ts.map +0 -1
  58. package/datepicker.types.js +0 -8
  59. package/datepicker.types.js.map +0 -1
  60. package/demo/date-picker-demo.d.ts +0 -18
  61. package/demo/date-picker-demo.d.ts.map +0 -1
  62. package/demo/date-picker-demo.js +0 -95
  63. package/demo/date-picker-demo.js.map +0 -1
  64. package/index.d.ts.map +0 -1
  65. package/react.d.ts.map +0 -1
  66. package/templates/days.template.d.ts +0 -4
  67. package/templates/days.template.d.ts.map +0 -1
  68. package/templates/days.template.js +0 -28
  69. package/templates/days.template.js.map +0 -1
  70. package/templates/headers.template.d.ts +0 -2
  71. package/templates/headers.template.d.ts.map +0 -1
  72. package/templates/headers.template.js +0 -5
  73. package/templates/headers.template.js.map +0 -1
  74. package/templates/months.template.d.ts +0 -6
  75. package/templates/months.template.d.ts.map +0 -1
  76. package/templates/months.template.js +0 -10
  77. package/templates/months.template.js.map +0 -1
  78. package/templates/years.template.d.ts +0 -6
  79. package/templates/years.template.d.ts.map +0 -1
  80. package/templates/years.template.js +0 -11
  81. package/templates/years.template.js.map +0 -1
  82. package/test/datepicker_test.d.ts +0 -2
  83. package/test/datepicker_test.d.ts.map +0 -1
  84. package/test/datepicker_test.js +0 -132
  85. package/test/datepicker_test.js.map +0 -1
@@ -1,475 +0,0 @@
1
- /* eslint-disable no-case-declarations */
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
- /**
4
- * @license
5
- * Copyright 2023 Google Laabidi Aymen
6
- * SPDX-License-Identifier: MIT
7
- */
8
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
9
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
10
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
12
- return c > 3 && r && Object.defineProperty(target, key, r), r;
13
- };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- import { LitElement, html, nothing } from 'lit';
24
- import { customElement, property, query, state } from 'lit/decorators.js';
25
- import dayjs from 'dayjs';
26
- import { getMonthDetails } from './core/month.helper.js';
27
- import { styles } from './date-picker.style.js';
28
- import { Mode } from './datepicker.types.js';
29
- import { renderMonthsTemplate } from './templates/months.template.js';
30
- import { renderYearsTemplate } from './templates/years.template.js';
31
- import { renderDays } from './templates/days.template.js';
32
- import { oneToTwoDigit } from './core/formatter.js';
33
- import { capitalizeFirstLetter } from './core/string.helper.js';
34
- import './core/locale.helper.js';
35
- import { EMPTY_STRING } from './constants.js';
36
- let HyDatePickerElement = class HyDatePickerElement extends LitElement {
37
- constructor() {
38
- super(...arguments);
39
- this.today = dayjs();
40
- this.locale = 'en';
41
- this.mode = Mode.Day;
42
- this.range = false;
43
- this.prevMode = this.mode;
44
- this.openedCalendar = false;
45
- this.monthsShort = dayjs().localeData().monthsShort();
46
- this.months = dayjs().localeData().months();
47
- this.days = dayjs().localeData().weekdays();
48
- this.weekdaysShort = dayjs().localeData().weekdaysShort();
49
- this.currentYear = this.today.year();
50
- this.currentDay = this.today.date();
51
- this.currentMonth = this.today.month() + 1;
52
- this.inputFieldValue = '';
53
- this.fieldFormat = 'DD/MM/YYYY';
54
- this.dateValue = '';
55
- this.navigationDates = {
56
- start: {
57
- year: this.currentYear,
58
- month: this.currentMonth,
59
- day: this.currentDay,
60
- },
61
- };
62
- this.size = "medium" /* INPUT_SIZE.Medium */;
63
- this.state = "default" /* INPUT_STATE.Default */;
64
- this.disabled = false;
65
- this.INPUT_TYPE = 'calendar';
66
- this.positionCalendar = () => __awaiter(this, void 0, void 0, function* () {
67
- if (this.openedCalendar) {
68
- yield this.updateComplete;
69
- const dateInput = this.shadowRoot.querySelector('#date-input');
70
- const calendarHeight = this.calendarContainer.getBoundingClientRect().height;
71
- const dateInputRect = dateInput.getBoundingClientRect();
72
- const availableBottomSpace = window.visualViewport.height - dateInputRect.bottom;
73
- const availableTopSpace = dateInputRect.top;
74
- this.calendarContainer.style.removeProperty('top');
75
- this.calendarContainer.style.removeProperty('position');
76
- if (calendarHeight > availableBottomSpace && availableTopSpace > calendarHeight) {
77
- const inputElement = dateInput.shadowRoot.querySelector('#input-container');
78
- const inputBorderTop = +getComputedStyle(inputElement).borderTopWidth.split('px')[0];
79
- this.calendarContainer.style.top = `${availableTopSpace - calendarHeight - inputBorderTop}px`;
80
- this.calendarContainer.style.position = 'fixed';
81
- }
82
- }
83
- });
84
- this.selectMonth = (selectedMonth) => {
85
- const _month = selectedMonth + 1 > 11 && this.range ? 11 : selectedMonth + 1;
86
- this.navigationDates.start.month = _month;
87
- this.navigationDates = Object.assign({}, this.navigationDates);
88
- //TODO: handle mainMode
89
- if (this.mode == Mode.Month) {
90
- this.currentDay = 1;
91
- this.openedCalendar = false;
92
- }
93
- else {
94
- this.prevMode = Mode.Day;
95
- }
96
- };
97
- this.selectYear = (selectedYear) => {
98
- this.navigationDates = Object.assign(Object.assign({}, this.navigationDates), { start: Object.assign(Object.assign({}, this.navigationDates.start), { year: selectedYear }) });
99
- //TODO: handle mainMode
100
- if (this.mode == Mode.Year) {
101
- this.currentDay = 1;
102
- this.currentMonth = 1;
103
- this.openedCalendar = false;
104
- }
105
- else {
106
- this.prevMode = Mode.Month;
107
- }
108
- };
109
- this.selectDay = (selectedDay) => {
110
- if (!this.range) {
111
- this.currentDay = Number(oneToTwoDigit(selectedDay.date));
112
- this.currentMonth = selectedDay.month + 1;
113
- this.currentYear = selectedDay.year;
114
- const _month = this.currentMonth > 11 && this.range ? 11 : this.currentMonth;
115
- this.navigationDates = Object.assign(Object.assign({}, this.navigationDates), { start: {
116
- month: _month,
117
- day: this.currentDay,
118
- year: selectedDay.year,
119
- } });
120
- }
121
- else {
122
- this.selectDateRange(selectedDay);
123
- }
124
- //TODO: handle mainMode
125
- this.prevMode = Mode.Day;
126
- if (!this.range)
127
- this.openedCalendar = false;
128
- };
129
- }
130
- connectedCallback() {
131
- super.connectedCallback();
132
- document.addEventListener('click', this._onClickOutside.bind(this));
133
- document.addEventListener('scroll', this.positionCalendar);
134
- }
135
- firstUpdated() {
136
- if (this.range) {
137
- this.endYear = this.currentYear;
138
- this.endMonth = this.currentMonth;
139
- this.endDay = this.currentDay;
140
- }
141
- this.fillInputField();
142
- }
143
- willUpdate(changedProperties) {
144
- if (changedProperties.has('fieldFormat')) {
145
- this.fillInputField();
146
- }
147
- if (changedProperties.has('openedCalendar') && this.openedCalendar) {
148
- this.daysPresentation = getMonthDetails(this.currentYear, this.currentMonth - 1, this.days);
149
- this.positionCalendar();
150
- }
151
- if (changedProperties.has('dateValue') && this.dateValue) {
152
- const dateObj = dayjs(this.dateValue, this.fieldFormat, true);
153
- if (dateObj.isValid()) {
154
- const { years, months, date } = dateObj.toObject();
155
- this.currentYear = years;
156
- this.currentMonth = months + 1;
157
- this.currentDay = date;
158
- this.navigationDates = Object.assign(Object.assign({}, this.navigationDates), { start: { year: years, month: months + 1, day: date } });
159
- }
160
- }
161
- if ((changedProperties.has('currentDay') && changedProperties.get('currentDay')) ||
162
- (changedProperties.has('currentMonth') && changedProperties.get('currentMonth')) ||
163
- (changedProperties.has('currentYear') && changedProperties.get('currentYear'))) {
164
- this.fillInputField();
165
- this.dispatchDateChange();
166
- }
167
- if (changedProperties.has('locale')) {
168
- this.updateLocale(this.locale);
169
- }
170
- }
171
- _onClickOutside(e) {
172
- if (!e.composedPath().includes(this)) {
173
- this.openedCalendar = false;
174
- }
175
- }
176
- toggleCaldendar() {
177
- this.openedCalendar = !this.openedCalendar;
178
- }
179
- fillInputField() {
180
- this.inputFieldValue = this.range
181
- ? dayjs(`${this.currentYear}-${this.currentMonth}-${this.currentDay}`).format(this.fieldFormat) +
182
- '-' +
183
- dayjs(`${this.endYear}-${this.endMonth}-${this.endDay}`).format(this.fieldFormat)
184
- : dayjs(`${this.currentYear}-${this.currentMonth}-${this.currentDay}`).format(this.fieldFormat);
185
- }
186
- dispatchDateChange() {
187
- this.dispatchEvent(new CustomEvent('date-change', { bubbles: true, composed: true, detail: { value: this.inputFieldValue } }));
188
- }
189
- updateLocale(locale) {
190
- dayjs.locale(locale);
191
- this.monthsShort = dayjs().localeData().monthsShort();
192
- this.months = dayjs().localeData().months();
193
- this.weekdaysShort = dayjs().localeData().weekdaysShort();
194
- this.days = dayjs().localeData().weekdays();
195
- }
196
- nextYear() {
197
- let startYear = this.navigationDates.start.year;
198
- this.navigationDates = Object.assign(Object.assign({}, this.navigationDates), { start: Object.assign(Object.assign({}, this.navigationDates.start), { year: ++startYear }) });
199
- }
200
- prevYear() {
201
- let startYear = this.navigationDates.start.year;
202
- this.navigationDates = Object.assign(Object.assign({}, this.navigationDates), { start: Object.assign(Object.assign({}, this.navigationDates.start), { year: --startYear }) });
203
- }
204
- nextMonth() {
205
- const { start } = this.navigationDates;
206
- let startMonth = start.month;
207
- let startYear = start.year;
208
- if ((startMonth == 11 && this.range) || startMonth == 12) {
209
- startMonth = 1;
210
- startYear++;
211
- }
212
- else {
213
- startMonth++;
214
- }
215
- this.navigationDates = Object.assign(Object.assign({}, this.navigationDates), { start: {
216
- day: this.navigationDates.start.day,
217
- month: startMonth,
218
- year: startYear,
219
- } });
220
- }
221
- prevMonth() {
222
- const { start } = this.navigationDates;
223
- let startMonth = start.month;
224
- let startYear = start.year;
225
- if (startMonth >= 2) {
226
- startMonth = --startMonth;
227
- }
228
- else {
229
- if (this.range)
230
- startMonth = 11;
231
- else
232
- startMonth = 12;
233
- startYear = --startYear;
234
- }
235
- this.navigationDates = Object.assign(Object.assign({}, this.navigationDates), { start: {
236
- day: this.navigationDates.start.day,
237
- year: startYear,
238
- month: startMonth,
239
- } });
240
- }
241
- selectDateRange(selectedDay) {
242
- const selectedDateDay = selectedDay.date;
243
- const selectedDateMonth = selectedDay.month;
244
- const selectedDateYear = selectedDay.year;
245
- const selectedDate = new Date(selectedDateYear, selectedDateMonth, selectedDateDay);
246
- const endDateDay = this.endDay;
247
- const endDateMonth = this.endMonth - 1;
248
- const endDateYear = this.endYear;
249
- const endDate = new Date(endDateYear, endDateMonth, endDateDay);
250
- const startDateDay = this.currentDay;
251
- const startDateMonth = this.currentMonth - 1;
252
- const startDateYear = this.currentYear;
253
- const startDate = new Date(startDateYear, startDateMonth, startDateDay);
254
- if (!startDate ||
255
- (endDate &&
256
- startDate &&
257
- (selectedDate.getTime() < startDate.getTime() || selectedDate.getTime() < endDate.getTime())) ||
258
- (startDate && !endDate && selectedDate.getTime() < startDate.getTime())) {
259
- this.currentDay = Number(oneToTwoDigit(selectedDay.date));
260
- this.currentMonth = selectedDay.month + 1;
261
- this.currentYear = selectedDay.year;
262
- const _month = this.currentMonth > 11 && this.range ? 11 : this.currentMonth;
263
- this.navigationDates = Object.assign(Object.assign({}, this.navigationDates), { start: {
264
- month: _month,
265
- day: this.currentDay,
266
- year: selectedDay.year,
267
- } });
268
- }
269
- else if ((startDate && !endDate && selectedDate.getTime() > startDate.getTime()) ||
270
- (startDate && selectedDate.getTime() > startDate.getTime()) ||
271
- (endDate && startDate && selectedDate.getTime() > endDate.getTime())) {
272
- const _month = selectedDay.month + 1 > 12 ? 11 : selectedDay.month + 1;
273
- this.endDay = Number(oneToTwoDigit(selectedDay.date));
274
- this.endMonth = _month;
275
- this.endYear = selectedDay.year;
276
- }
277
- }
278
- toggleMonthView() {
279
- if (this.prevMode != Mode.Month) {
280
- this.prevMode = Mode.Month;
281
- }
282
- }
283
- toggleYearView() {
284
- if (this.prevMode != Mode.Year) {
285
- this.prevMode = Mode.Year;
286
- }
287
- }
288
- inputChanged(inputChangedEvent) {
289
- this.dateValue = inputChangedEvent.detail.value;
290
- }
291
- onFocus() {
292
- this.openedCalendar = true;
293
- }
294
- renderContainer(isRange = false) {
295
- switch (this.prevMode) {
296
- case Mode.Day:
297
- return renderDays(this.weekdaysShort, this.navigationDates, this.selectDay, {
298
- curentYear: this.currentYear,
299
- currentMonth: this.currentMonth,
300
- currentDay: this.currentDay,
301
- endYear: this.endYear,
302
- endMonth: this.endMonth,
303
- endDay: this.endDay,
304
- }, isRange, this.days);
305
- case Mode.Month:
306
- return renderMonthsTemplate(this.monthsShort, this.currentMonth, this.selectMonth);
307
- case Mode.Year:
308
- return renderYearsTemplate(this.navigationDates.start.year, this.selectYear);
309
- default:
310
- return nothing;
311
- }
312
- }
313
- renderCalendarHeader() {
314
- return html `
315
- <div class="year-month-header">
316
- ${this.mode !== Mode.Year
317
- ? html `<nr-button @click=${this.toggleMonthView} class="toggle-month-view">
318
- ${capitalizeFirstLetter(this.months[this.navigationDates.start.month - 1])}
319
- ${this.range && this.prevMode === Mode.Day
320
- ? ' - ' + capitalizeFirstLetter(this.months[this.navigationDates.start.month])
321
- : nothing}
322
- </nr-button> `
323
- : nothing}
324
-
325
- <div class="current-year-container">
326
- <nr-button class="toggle-year-view" @click=${this.toggleYearView}>${this.navigationDates.start.year}</nr-button>
327
- <div class="year-icons-toggler">
328
- <nr-button class="next-year" .icon=${['caret-up']} @click=${() => this.nextYear()}></nr-button>
329
- <nr-button class="previous-year" .icon=${['caret-down']} @click=${() => this.prevYear()}></nr-button>
330
- </div>
331
- </div>
332
- </div>
333
- </div>
334
- `;
335
- }
336
- renderCalendar() {
337
- return html ` <div
338
- class="calendar-container ${this.range && this.prevMode === Mode.Day ? 'calendar-container-range' : EMPTY_STRING}"
339
- >
340
- <div class="calendar-header">
341
- <nr-button
342
- type="text"
343
- class="header-prev-button prev-month"
344
- .icon="${['angle-left']}"
345
- @click=${() => this.prevMonth()}
346
- ></nr-button>
347
- ${this.renderCalendarHeader()}
348
-
349
- <nr-button
350
- type="text"
351
- class="header-next-button next-month"
352
- .icon="${['angle-right']}"
353
- @click=${() => this.nextMonth()}
354
- ></nr-button>
355
- </div>
356
- <span class="day-containers">
357
- ${this.renderContainer()}
358
- ${this.range && this.prevMode === Mode.Day ? this.renderContainer(this.range) : nothing}
359
- </span>
360
- </div>`;
361
- }
362
- disconnectedCallback() {
363
- super.disconnectedCallback();
364
- document.removeEventListener('click', this._onClickOutside.bind(this));
365
- document.removeEventListener('scroll', this.positionCalendar);
366
- }
367
- render() {
368
- return html `
369
- <hy-input
370
- id="date-input"
371
- .type=${this.INPUT_TYPE}
372
- .value=${this.inputFieldValue}
373
- .size=${this.size}
374
- .state=${this.state}
375
- .disabled=${this.disabled}
376
- @valueChange=${this.inputChanged}
377
- @focus=${this.onFocus}
378
- >
379
- ${this.label ? html ` <span slot="label">${this.label}</span> ` : nothing}
380
- ${this.helper ? html ` <span slot="helper-text">${this.helper}</span> ` : nothing}
381
- </hy-input>
382
- ${this.openedCalendar ? this.renderCalendar() : nothing}
383
- `;
384
- }
385
- };
386
- HyDatePickerElement.styles = styles;
387
- __decorate([
388
- property({ type: String })
389
- ], HyDatePickerElement.prototype, "name", void 0);
390
- __decorate([
391
- property({ type: String })
392
- ], HyDatePickerElement.prototype, "locale", void 0);
393
- __decorate([
394
- property({ reflect: true })
395
- ], HyDatePickerElement.prototype, "mode", void 0);
396
- __decorate([
397
- property({ type: Boolean })
398
- ], HyDatePickerElement.prototype, "range", void 0);
399
- __decorate([
400
- state()
401
- ], HyDatePickerElement.prototype, "prevMode", void 0);
402
- __decorate([
403
- property({ reflect: true, type: Boolean })
404
- ], HyDatePickerElement.prototype, "openedCalendar", void 0);
405
- __decorate([
406
- state()
407
- ], HyDatePickerElement.prototype, "monthsShort", void 0);
408
- __decorate([
409
- state()
410
- ], HyDatePickerElement.prototype, "months", void 0);
411
- __decorate([
412
- state()
413
- ], HyDatePickerElement.prototype, "days", void 0);
414
- __decorate([
415
- state()
416
- ], HyDatePickerElement.prototype, "weekdaysShort", void 0);
417
- __decorate([
418
- state()
419
- ], HyDatePickerElement.prototype, "currentYear", void 0);
420
- __decorate([
421
- state()
422
- ], HyDatePickerElement.prototype, "currentDay", void 0);
423
- __decorate([
424
- state()
425
- ], HyDatePickerElement.prototype, "currentMonth", void 0);
426
- __decorate([
427
- state()
428
- ], HyDatePickerElement.prototype, "endYear", void 0);
429
- __decorate([
430
- state()
431
- ], HyDatePickerElement.prototype, "endDay", void 0);
432
- __decorate([
433
- state()
434
- ], HyDatePickerElement.prototype, "endMonth", void 0);
435
- __decorate([
436
- state()
437
- ], HyDatePickerElement.prototype, "inputFieldValue", void 0);
438
- __decorate([
439
- property({ type: String })
440
- ], HyDatePickerElement.prototype, "fieldFormat", void 0);
441
- __decorate([
442
- property({ type: String })
443
- ], HyDatePickerElement.prototype, "dateValue", void 0);
444
- __decorate([
445
- state()
446
- ], HyDatePickerElement.prototype, "navigationDates", void 0);
447
- __decorate([
448
- query('#date-input')
449
- ], HyDatePickerElement.prototype, "dateInput", void 0);
450
- __decorate([
451
- query('.calendar-container')
452
- ], HyDatePickerElement.prototype, "calendarContainer", void 0);
453
- __decorate([
454
- state()
455
- ], HyDatePickerElement.prototype, "daysPresentation", void 0);
456
- __decorate([
457
- property()
458
- ], HyDatePickerElement.prototype, "size", void 0);
459
- __decorate([
460
- property()
461
- ], HyDatePickerElement.prototype, "state", void 0);
462
- __decorate([
463
- property()
464
- ], HyDatePickerElement.prototype, "label", void 0);
465
- __decorate([
466
- property()
467
- ], HyDatePickerElement.prototype, "helper", void 0);
468
- __decorate([
469
- property({ reflect: true, type: Boolean })
470
- ], HyDatePickerElement.prototype, "disabled", void 0);
471
- HyDatePickerElement = __decorate([
472
- customElement('hy-datepicker')
473
- ], HyDatePickerElement);
474
- export { HyDatePickerElement };
475
- //# sourceMappingURL=date-picker.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-picker.component.js","sourceRoot":"","sources":["../../../src/components/datepicker/date-picker.component.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,uDAAuD;AACvD;;;;GAIG;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAkC,MAAM,KAAK,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAqC,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,IAAa,mBAAmB,GAAhC,MAAa,mBAAoB,SAAQ,UAAU;IAAnD;;QACE,UAAK,GAAG,KAAK,EAAE,CAAC;QAKhB,WAAM,GAAG,IAAI,CAAC;QAGd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ACI;AAGf;IADC,QAAQ,EAAE;mDACK;AAGhB;IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC;qDACxB;AA1FN,mBAAmB;IAD/B,aAAa,CAAC,eAAe,CAAC;GAClB,mBAAmB,CA0d/B;SA1dY,mBAAmB","sourcesContent":["/* eslint-disable no-case-declarations */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * @license\n * Copyright 2023 Google Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { LitElement, html, nothing, PropertyValues, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport dayjs from 'dayjs';\nimport { getMonthDetails } from './core/month.helper.js';\nimport { styles } from './date-picker.style.js';\nimport { IDayPresentation, INavigationDate, Mode } from './datepicker.types.js';\nimport { renderMonthsTemplate } from './templates/months.template.js';\nimport { renderYearsTemplate } from './templates/years.template.js';\nimport { renderDays } from './templates/days.template.js';\nimport { oneToTwoDigit } from './core/formatter.js';\nimport { capitalizeFirstLetter } from './core/string.helper.js';\nimport './core/locale.helper.js';\nimport { INPUT_SIZE, INPUT_STATE } from '../input/input.constant.js';\nimport { EMPTY_STRING } from './constants.js';\n@customElement('hy-datepicker')\nexport class HyDatePickerElement extends LitElement {\n today = dayjs();\n\n @property({type: String})\n name!: string;\n @property({type: String})\n locale = 'en';\n\n @property({reflect: true})\n mode = Mode.Day;\n\n @property({type: Boolean})\n range = false;\n\n @state()\n prevMode = this.mode;\n\n @property({reflect: true, type: Boolean})\n openedCalendar = false;\n\n @state()\n monthsShort = dayjs().localeData().monthsShort()\n \n @state()\n months = dayjs().localeData().months();\n\n @state()\n days = dayjs().localeData().weekdays();\n\n @state()\n weekdaysShort = dayjs().localeData().weekdaysShort();\n\n @state()\n currentYear = this.today.year();\n\n @state()\n currentDay = this.today.date();\n\n @state()\n currentMonth = this.today.month() + 1;\n\n @state()\n endYear!: number;\n\n @state()\n endDay!: number;\n\n @state()\n endMonth!: number;\n\n @state()\n inputFieldValue = '';\n\n @property({type: String})\n fieldFormat = 'DD/MM/YYYY';\n\n @property({type: String})\n dateValue = '';\n\n @state()\n navigationDates: INavigationDate = {\n start: {\n year: this.currentYear,\n month: this.currentMonth,\n day: this.currentDay,\n },\n };\n\n @query('#date-input')\n dateInput!: HTMLElement;\n\n @query('.calendar-container')\n calendarContainer!: HTMLElement;\n\n @state()\n daysPresentation!: IDayPresentation[];\n\n @property()\n size = INPUT_SIZE.Medium;\n\n @property()\n state = INPUT_STATE.Default;\n\n @property()\n label!: string;\n\n @property()\n helper!: string;\n\n @property({reflect: true, type: Boolean})\n disabled = false;\n\n INPUT_TYPE = 'calendar';\n\n static override styles = styles;\n\n override connectedCallback() {\n super.connectedCallback();\n document.addEventListener('click', this._onClickOutside.bind(this));\n document.addEventListener('scroll', this.positionCalendar);\n }\n override firstUpdated() {\n if (this.range) {\n this.endYear = this.currentYear;\n this.endMonth = this.currentMonth;\n this.endDay = this.currentDay;\n }\n this.fillInputField()\n }\n override willUpdate(changedProperties: PropertyValues) {\n if(changedProperties.has('fieldFormat')){\n this.fillInputField()\n }\n if (changedProperties.has('openedCalendar') && this.openedCalendar) {\n this.daysPresentation = getMonthDetails(this.currentYear, this.currentMonth - 1, this.days);\n this.positionCalendar();\n }\n if (changedProperties.has('dateValue') && this.dateValue) {\n const dateObj = dayjs(this.dateValue, this.fieldFormat, true);\n if (dateObj.isValid()) {\n const {years, months, date} = dateObj.toObject();\n this.currentYear = years;\n this.currentMonth = months + 1;\n this.currentDay = date;\n this.navigationDates = {...this.navigationDates, start: {year: years, month: months + 1, day: date}};\n }\n }\n if (\n (changedProperties.has('currentDay') && changedProperties.get('currentDay')) ||\n (changedProperties.has('currentMonth') && changedProperties.get('currentMonth')) ||\n (changedProperties.has('currentYear') && changedProperties.get('currentYear'))\n ) { \n this.fillInputField()\n this.dispatchDateChange();\n }\n if (changedProperties.has('locale')) {\n this.updateLocale(this.locale);\n }\n }\n\n _onClickOutside(e: MouseEvent) {\n if (!e.composedPath().includes(this)) {\n this.openedCalendar = false;\n }\n }\n\n toggleCaldendar() {\n this.openedCalendar = !this.openedCalendar;\n }\n fillInputField(){\n this.inputFieldValue = this.range\n ? dayjs(`${this.currentYear}-${this.currentMonth}-${this.currentDay}`).format(this.fieldFormat) +\n '-' +\n dayjs(`${this.endYear}-${this.endMonth}-${this.endDay}`).format(this.fieldFormat)\n : dayjs(`${this.currentYear}-${this.currentMonth}-${this.currentDay}`).format(this.fieldFormat);\n }\n\n dispatchDateChange() {\n this.dispatchEvent(\n new CustomEvent('date-change', {bubbles: true, composed: true, detail: {value: this.inputFieldValue}})\n );\n }\n\n positionCalendar = async () => {\n if (this.openedCalendar) {\n await this.updateComplete;\n const dateInput = this.shadowRoot!.querySelector('#date-input')!;\n const calendarHeight = this.calendarContainer.getBoundingClientRect().height;\n const dateInputRect = dateInput.getBoundingClientRect();\n const availableBottomSpace = window.visualViewport!.height - dateInputRect.bottom;\n const availableTopSpace = dateInputRect.top;\n this.calendarContainer.style.removeProperty('top');\n this.calendarContainer.style.removeProperty('position');\n if (calendarHeight > availableBottomSpace && availableTopSpace > calendarHeight) {\n const inputElement = dateInput.shadowRoot!.querySelector('#input-container')!;\n const inputBorderTop = +getComputedStyle(inputElement).borderTopWidth.split('px')[0];\n this.calendarContainer.style.top = `${availableTopSpace - calendarHeight - inputBorderTop}px`;\n this.calendarContainer.style.position = 'fixed';\n }\n }\n };\n\n updateLocale(locale: string): void {\n dayjs.locale(locale);\n this.monthsShort = dayjs().localeData().monthsShort();\n this.months = dayjs().localeData().months();\n this.weekdaysShort = dayjs().localeData().weekdaysShort();\n this.days = dayjs().localeData().weekdays();\n }\n\n nextYear() {\n let startYear = this.navigationDates.start.year;\n this.navigationDates = {\n ...this.navigationDates,\n start: {\n ...this.navigationDates.start,\n year: ++startYear,\n },\n };\n }\n\n prevYear() {\n let startYear = this.navigationDates.start.year;\n this.navigationDates = {\n ...this.navigationDates,\n start: {\n ...this.navigationDates.start,\n year: --startYear,\n },\n };\n }\n\n nextMonth() {\n const {start} = this.navigationDates;\n let startMonth = start.month;\n let startYear = start.year;\n if ((startMonth == 11 && this.range) || startMonth == 12) {\n startMonth = 1;\n startYear++;\n } else {\n startMonth++;\n }\n this.navigationDates = {\n ...this.navigationDates,\n start: {\n day: this.navigationDates.start.day,\n month: startMonth,\n year: startYear,\n },\n };\n }\n\n prevMonth() {\n const {start} = this.navigationDates;\n let startMonth = start.month;\n let startYear = start.year;\n if (startMonth >= 2) {\n startMonth = --startMonth;\n } else {\n if (this.range) startMonth = 11;\n else startMonth = 12;\n startYear = --startYear;\n }\n\n this.navigationDates = {\n ...this.navigationDates,\n start: {\n day: this.navigationDates.start.day,\n year: startYear,\n month: startMonth,\n },\n };\n }\n\n selectMonth = (selectedMonth: number): void => {\n const _month = selectedMonth + 1 > 11 && this.range ? 11 : selectedMonth + 1;\n this.navigationDates.start.month = _month;\n this.navigationDates = {...this.navigationDates};\n //TODO: handle mainMode\n if (this.mode == Mode.Month) {\n this.currentDay = 1;\n this.openedCalendar = false;\n } else {\n this.prevMode = Mode.Day;\n }\n };\n\n selectYear = (selectedYear: number): void => {\n this.navigationDates = {\n ...this.navigationDates,\n start: {...this.navigationDates.start, year: selectedYear},\n };\n\n //TODO: handle mainMode\n if (this.mode == Mode.Year) {\n this.currentDay = 1;\n this.currentMonth = 1;\n this.openedCalendar = false;\n } else {\n this.prevMode = Mode.Month;\n }\n };\n\n selectDay = (selectedDay: IDayPresentation): void => {\n if (!this.range) {\n this.currentDay = Number(oneToTwoDigit(selectedDay.date));\n this.currentMonth = selectedDay.month + 1;\n this.currentYear = selectedDay.year;\n const _month = this.currentMonth > 11 && this.range ? 11 : this.currentMonth;\n this.navigationDates = {\n ...this.navigationDates,\n start: {\n month: _month,\n day: this.currentDay,\n year: selectedDay.year,\n },\n };\n } else {\n this.selectDateRange(selectedDay);\n }\n\n //TODO: handle mainMode\n this.prevMode = Mode.Day;\n if (!this.range) this.openedCalendar = false;\n };\n selectDateRange(selectedDay: IDayPresentation) {\n const selectedDateDay = selectedDay.date;\n const selectedDateMonth = selectedDay.month;\n const selectedDateYear = selectedDay.year;\n const selectedDate = new Date(selectedDateYear, selectedDateMonth, selectedDateDay);\n\n const endDateDay = this.endDay;\n const endDateMonth = this.endMonth - 1;\n const endDateYear = this.endYear;\n const endDate = new Date(endDateYear, endDateMonth, endDateDay);\n\n const startDateDay = this.currentDay;\n const startDateMonth = this.currentMonth - 1;\n const startDateYear = this.currentYear;\n const startDate = new Date(startDateYear, startDateMonth, startDateDay);\n\n if (\n !startDate ||\n (endDate &&\n startDate &&\n (selectedDate.getTime() < startDate.getTime() || selectedDate.getTime() < endDate.getTime())) ||\n (startDate && !endDate && selectedDate.getTime() < startDate.getTime())\n ) {\n this.currentDay = Number(oneToTwoDigit(selectedDay.date));\n this.currentMonth = selectedDay.month + 1;\n this.currentYear = selectedDay.year;\n const _month = this.currentMonth > 11 && this.range ? 11 : this.currentMonth;\n this.navigationDates = {\n ...this.navigationDates,\n start: {\n month: _month,\n day: this.currentDay,\n year: selectedDay.year,\n },\n };\n } else if (\n (startDate && !endDate && selectedDate.getTime() > startDate.getTime()) ||\n (startDate && selectedDate.getTime() > startDate.getTime()) ||\n (endDate && startDate && selectedDate.getTime() > endDate.getTime())\n ) {\n const _month = selectedDay.month + 1 > 12 ? 11 : selectedDay.month + 1;\n this.endDay = Number(oneToTwoDigit(selectedDay.date));\n this.endMonth = _month;\n this.endYear = selectedDay.year;\n }\n }\n toggleMonthView(): void {\n if (this.prevMode != Mode.Month) {\n this.prevMode = Mode.Month;\n }\n }\n\n toggleYearView(): void {\n if (this.prevMode != Mode.Year) {\n this.prevMode = Mode.Year;\n }\n }\n inputChanged(inputChangedEvent: CustomEvent): void {\n this.dateValue = inputChangedEvent.detail.value;\n }\n onFocus() {\n this.openedCalendar = true;\n }\n\n renderContainer(isRange = false): TemplateResult | typeof nothing {\n switch (this.prevMode) {\n case Mode.Day:\n return renderDays(\n this.weekdaysShort,\n this.navigationDates,\n this.selectDay,\n {\n curentYear: this.currentYear,\n currentMonth: this.currentMonth,\n currentDay: this.currentDay,\n endYear: this.endYear,\n endMonth: this.endMonth,\n endDay: this.endDay,\n },\n isRange,\n this.days\n );\n case Mode.Month:\n return renderMonthsTemplate(this.monthsShort, this.currentMonth, this.selectMonth);\n case Mode.Year:\n return renderYearsTemplate(this.navigationDates.start.year, this.selectYear);\n default:\n return nothing;\n }\n }\n\n renderCalendarHeader() {\n return html`\n <div class=\"year-month-header\">\n ${\n this.mode !== Mode.Year\n ? html`<nr-button @click=${this.toggleMonthView} class=\"toggle-month-view\">\n ${capitalizeFirstLetter(this.months[this.navigationDates.start.month - 1])}\n ${this.range && this.prevMode === Mode.Day\n ? ' - ' + capitalizeFirstLetter(this.months[this.navigationDates.start.month])\n : nothing}\n </nr-button> `\n : nothing\n } \n \n <div class=\"current-year-container\">\n <nr-button class=\"toggle-year-view\" @click=${this.toggleYearView}>${\n this.navigationDates.start.year\n }</nr-button>\n <div class=\"year-icons-toggler\">\n <nr-button class=\"next-year\" .icon=${['caret-up']} @click=${() => this.nextYear()}></nr-button>\n <nr-button class=\"previous-year\" .icon=${['caret-down']} @click=${() => this.prevYear()}></nr-button>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n\n renderCalendar() {\n return html` <div\n class=\"calendar-container ${this.range && this.prevMode === Mode.Day ? 'calendar-container-range' : EMPTY_STRING}\"\n >\n <div class=\"calendar-header\">\n <nr-button\n type=\"text\"\n class=\"header-prev-button prev-month\"\n .icon=\"${['angle-left']}\"\n @click=${() => this.prevMonth()}\n ></nr-button>\n ${this.renderCalendarHeader()}\n\n <nr-button\n type=\"text\"\n class=\"header-next-button next-month\"\n .icon=\"${['angle-right']}\"\n @click=${() => this.nextMonth()}\n ></nr-button>\n </div>\n <span class=\"day-containers\">\n ${this.renderContainer()}\n ${this.range && this.prevMode === Mode.Day ? this.renderContainer(this.range) : nothing}\n </span>\n </div>`;\n }\n override disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('click', this._onClickOutside.bind(this));\n document.removeEventListener('scroll', this.positionCalendar);\n }\n\n override render(): TemplateResult {\n return html`\n <hy-input\n id=\"date-input\"\n .type=${this.INPUT_TYPE}\n .value=${this.inputFieldValue}\n .size=${this.size}\n .state=${this.state}\n .disabled=${this.disabled}\n @valueChange=${this.inputChanged}\n @focus=${this.onFocus}\n >\n ${this.label ? html` <span slot=\"label\">${this.label}</span> ` : nothing}\n ${this.helper ? html` <span slot=\"helper-text\">${this.helper}</span> ` : nothing}\n </hy-input>\n ${this.openedCalendar ? this.renderCalendar() : nothing}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hy-datepicker': HyDatePickerElement;\n }\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'hy-datepicker':\n | React.DetailedHTMLProps<React.HTMLAttributes<HyDatePickerElement>, HyDatePickerElement>\n | Partial<HyDatePickerElement>;\n }\n }\n}"]}
@@ -1,2 +0,0 @@
1
- export declare const styles: import("lit").CSSResult[];
2
- //# sourceMappingURL=date-picker.style.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-picker.style.d.ts","sourceRoot":"","sources":["../../../src/components/datepicker/date-picker.style.ts"],"names":[],"mappings":"AA8NA,eAAO,MAAM,MAAM,2BAAmB,CAAC"}