ngx-kit 7.2.0 → 7.3.1
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/angle-selector/README.md +34 -34
- package/box-shadow/README.md +33 -33
- package/color-picker/README.md +52 -52
- package/{shared → core}/README.md +117 -117
- package/data-table/README.md +120 -120
- package/date-picker/README.md +74 -74
- package/dialog/README.md +122 -92
- package/drag-resize/README.md +53 -55
- package/fesm2022/ngx-kit-angle-selector.mjs +9 -26
- package/fesm2022/ngx-kit-angle-selector.mjs.map +1 -1
- package/fesm2022/ngx-kit-box-shadow.mjs +330 -356
- package/fesm2022/ngx-kit-box-shadow.mjs.map +1 -1
- package/fesm2022/ngx-kit-color-picker.mjs +132 -272
- package/fesm2022/ngx-kit-color-picker.mjs.map +1 -1
- package/fesm2022/{ngx-kit-shared.mjs → ngx-kit-core.mjs} +845 -277
- package/fesm2022/ngx-kit-core.mjs.map +1 -0
- package/fesm2022/ngx-kit-data-table.mjs +3 -3
- package/fesm2022/ngx-kit-data-table.mjs.map +1 -1
- package/fesm2022/ngx-kit-date-picker.mjs +153 -147
- package/fesm2022/ngx-kit-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-dialog.mjs +430 -331
- package/fesm2022/ngx-kit-dialog.mjs.map +1 -1
- package/fesm2022/ngx-kit-drag-resize.mjs +126 -45
- package/fesm2022/ngx-kit-drag-resize.mjs.map +1 -1
- package/fesm2022/ngx-kit-drawer-menu.mjs +2 -2
- package/fesm2022/ngx-kit-drawer-menu.mjs.map +1 -1
- package/fesm2022/ngx-kit-dropzone.mjs.map +1 -1
- package/fesm2022/ngx-kit-form-field.mjs.map +1 -1
- package/fesm2022/ngx-kit-gallery.mjs +3 -3
- package/fesm2022/ngx-kit-gallery.mjs.map +1 -1
- package/fesm2022/ngx-kit-gradient-picker.mjs +20 -38
- package/fesm2022/ngx-kit-gradient-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-grid-layout.mjs +19 -18
- package/fesm2022/ngx-kit-grid-layout.mjs.map +1 -1
- package/fesm2022/ngx-kit-image-editor.mjs +3 -3
- package/fesm2022/ngx-kit-image-editor.mjs.map +1 -1
- package/fesm2022/ngx-kit-menu.mjs +1 -1
- package/fesm2022/ngx-kit-menu.mjs.map +1 -1
- package/fesm2022/ngx-kit-message.mjs +1 -1
- package/fesm2022/ngx-kit-message.mjs.map +1 -1
- package/fesm2022/ngx-kit-notify.mjs +1 -1
- package/fesm2022/ngx-kit-notify.mjs.map +1 -1
- package/fesm2022/ngx-kit-time-picker.mjs +1 -1
- package/fesm2022/ngx-kit-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-virtual-scroll.mjs +2 -2
- package/fesm2022/ngx-kit-virtual-scroll.mjs.map +1 -1
- package/gallery/README.md +71 -71
- package/gradient-picker/README.md +41 -41
- package/grid-layout/README.md +64 -64
- package/image-editor/README.md +44 -44
- package/menu/README.md +85 -85
- package/message/README.md +70 -70
- package/notify/README.md +56 -56
- package/package.json +5 -9
- package/time-picker/README.md +89 -89
- package/types/ngx-kit-angle-selector.d.ts +13 -16
- package/types/ngx-kit-box-shadow.d.ts +37 -95
- package/types/ngx-kit-color-picker.d.ts +61 -58
- package/types/{ngx-kit-shared.d.ts → ngx-kit-core.d.ts} +156 -34
- package/types/ngx-kit-data-table.d.ts +2 -2
- package/types/ngx-kit-date-picker.d.ts +30 -29
- package/types/ngx-kit-dialog.d.ts +208 -107
- package/types/ngx-kit-drag-resize.d.ts +33 -6
- package/types/ngx-kit-gradient-picker.d.ts +4 -7
- package/types/ngx-kit-grid-layout.d.ts +0 -1
- package/types/ngx-kit-menu.d.ts +1 -1
- package/types/ngx-kit-time-picker.d.ts +1 -1
- package/virtual-scroll/README.md +199 -199
- package/fesm2022/ngx-kit-shared.mjs.map +0 -1
- package/fesm2022/ngx-kit-webflow.mjs +0 -709
- package/fesm2022/ngx-kit-webflow.mjs.map +0 -1
- package/types/ngx-kit-webflow.d.ts +0 -286
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, input, EventEmitter, forwardRef, Output, Input, Component, ViewContainerRef, Renderer2, HostListener, Directive, viewChild, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, Injectable, signal, input, model, EventEmitter, forwardRef, Output, Input, Component, ViewContainerRef, Renderer2, HostListener, Directive, viewChild, ChangeDetectionStrategy } from '@angular/core';
|
|
3
3
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
|
-
import { OverlayService } from 'ngx-kit/
|
|
6
|
+
import { OverlayService } from 'ngx-kit/core';
|
|
7
7
|
|
|
8
8
|
class NgxDatePickerConfig {
|
|
9
9
|
previousButtonTemplate;
|
|
@@ -257,32 +257,32 @@ class GregorianAdapter {
|
|
|
257
257
|
lastDateofLastMonth(year, month) {
|
|
258
258
|
return new Date(year, month, 0).getDate();
|
|
259
259
|
}
|
|
260
|
-
// TODO
|
|
261
260
|
/**
|
|
262
261
|
* month start with zero
|
|
263
262
|
* @param date
|
|
264
263
|
* @returns
|
|
265
264
|
*/
|
|
266
265
|
getDate(date) {
|
|
267
|
-
let str = date.year + '-' + (date.month ? date.month + 1 : 1) + '-' + (date.day ?? 1);
|
|
268
|
-
str = str
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
})
|
|
273
|
-
|
|
274
|
-
if (date.hours || date.minutes || date.seconds || date.milliseconds) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
return new Date(str);
|
|
266
|
+
// let str = date.year + '-' + (date.month ? date.month + 1 : 1) + '-' + (date.day ?? 1);
|
|
267
|
+
// str = str
|
|
268
|
+
// .split('-')
|
|
269
|
+
// .map((i) => {
|
|
270
|
+
// return i.length < 2 ? '0' + i : i;
|
|
271
|
+
// })
|
|
272
|
+
// .join('-');
|
|
273
|
+
// if (date.hours || date.minutes || date.seconds || date.milliseconds) {
|
|
274
|
+
// str +=
|
|
275
|
+
// ' ' +
|
|
276
|
+
// (date.hours ?? 0) +
|
|
277
|
+
// ':' +
|
|
278
|
+
// (date.minutes ?? 0) +
|
|
279
|
+
// ':' +
|
|
280
|
+
// (date.seconds ?? 0) +
|
|
281
|
+
// ':' +
|
|
282
|
+
// (date.milliseconds ?? 0);
|
|
283
|
+
// }
|
|
284
|
+
// return new Date(str);
|
|
285
|
+
return new Date(date.year, date.month ?? 0, date.day ?? 1, date.hours ?? 0, date.minutes ?? 0, date.seconds ?? 0, date.milliseconds ?? 0);
|
|
286
286
|
}
|
|
287
287
|
formatDate(date, format) {
|
|
288
288
|
if (!date) {
|
|
@@ -641,7 +641,7 @@ class JalaliAdapter {
|
|
|
641
641
|
'اردیبهشت',
|
|
642
642
|
'خرداد',
|
|
643
643
|
'تیر',
|
|
644
|
-
'
|
|
644
|
+
'مردادا',
|
|
645
645
|
'شهریور',
|
|
646
646
|
'مهر',
|
|
647
647
|
'آبان',
|
|
@@ -1487,16 +1487,21 @@ class NgxDatePickerBase {
|
|
|
1487
1487
|
_locale = 'en';
|
|
1488
1488
|
dateAdapterRegistry = inject(DateAdapterRegistry);
|
|
1489
1489
|
adapter = this.dateAdapterRegistry.resolve(this._locale);
|
|
1490
|
-
currYear
|
|
1491
|
-
|
|
1492
|
-
|
|
1490
|
+
currYear = signal(0, /* @ts-ignore */
|
|
1491
|
+
...(ngDevMode ? [{ debugName: "currYear" }] : /* istanbul ignore next */ []));
|
|
1492
|
+
currMonth = signal(0, /* @ts-ignore */
|
|
1493
|
+
...(ngDevMode ? [{ debugName: "currMonth" }] : /* istanbul ignore next */ []));
|
|
1494
|
+
currentWeek = signal(0, /* @ts-ignore */
|
|
1495
|
+
...(ngDevMode ? [{ debugName: "currentWeek" }] : /* istanbul ignore next */ []));
|
|
1493
1496
|
months = [];
|
|
1494
1497
|
weeks = [];
|
|
1498
|
+
// Todo: change to signal
|
|
1495
1499
|
viewDays = [];
|
|
1496
1500
|
viewMonths = [];
|
|
1497
1501
|
viewYears = [];
|
|
1498
1502
|
viewWeeks = [];
|
|
1499
|
-
displayMonth = ''
|
|
1503
|
+
displayMonth = signal('', /* @ts-ignore */
|
|
1504
|
+
...(ngDevMode ? [{ debugName: "displayMonth" }] : /* istanbul ignore next */ []));
|
|
1500
1505
|
minDate = null;
|
|
1501
1506
|
maxDate = null;
|
|
1502
1507
|
renderCalendar(view, selected, events, callback) {
|
|
@@ -1511,7 +1516,7 @@ class NgxDatePickerBase {
|
|
|
1511
1516
|
this.renderWeek();
|
|
1512
1517
|
break;
|
|
1513
1518
|
}
|
|
1514
|
-
this.displayMonth
|
|
1519
|
+
this.displayMonth.set(this.months[this.currMonth()] ?? '');
|
|
1515
1520
|
if (callback)
|
|
1516
1521
|
callback();
|
|
1517
1522
|
}
|
|
@@ -1527,18 +1532,18 @@ class NgxDatePickerBase {
|
|
|
1527
1532
|
this.renderYear();
|
|
1528
1533
|
break;
|
|
1529
1534
|
}
|
|
1530
|
-
this.displayMonth
|
|
1535
|
+
this.displayMonth.set(this.months[this.currMonth()] ?? '');
|
|
1531
1536
|
if (callback)
|
|
1532
1537
|
callback();
|
|
1533
1538
|
}
|
|
1534
1539
|
renderYear() {
|
|
1535
1540
|
this.viewYears = [];
|
|
1536
|
-
const s = this.currYear - 10;
|
|
1537
|
-
const e = this.currYear + 10;
|
|
1541
|
+
const s = this.currYear() - 10;
|
|
1542
|
+
const e = this.currYear() + 10;
|
|
1538
1543
|
for (let i = s; i < e; i++) {
|
|
1539
1544
|
this.viewYears.push({
|
|
1540
1545
|
year: i,
|
|
1541
|
-
selected: i === this.currYear,
|
|
1546
|
+
selected: i === this.currYear(),
|
|
1542
1547
|
active: this.checkActiveYear(i),
|
|
1543
1548
|
});
|
|
1544
1549
|
}
|
|
@@ -1549,8 +1554,8 @@ class NgxDatePickerBase {
|
|
|
1549
1554
|
this.viewMonths.push({
|
|
1550
1555
|
month: i,
|
|
1551
1556
|
displayMonth: this.months[i],
|
|
1552
|
-
selected: i === this.currMonth,
|
|
1553
|
-
active: this.checkActiveMonth(this.currYear, i),
|
|
1557
|
+
selected: i === this.currMonth(),
|
|
1558
|
+
active: this.checkActiveMonth(this.currYear(), i),
|
|
1554
1559
|
});
|
|
1555
1560
|
}
|
|
1556
1561
|
}
|
|
@@ -1601,16 +1606,16 @@ class NgxDatePickerBase {
|
|
|
1601
1606
|
*/
|
|
1602
1607
|
renderDay(selected, events) {
|
|
1603
1608
|
this.viewDays = [];
|
|
1604
|
-
const firstDayOfMonth = this.adapter.firstDayofMonth(this.currYear, this.currMonth);
|
|
1605
|
-
const lastDateOfMonth = this.adapter.lastDateofMonth(this.currYear, this.currMonth);
|
|
1606
|
-
const lastDayOfMonth = this.adapter.lastDayofMonth(this.currYear, this.currMonth);
|
|
1607
|
-
const lastDateOfLastMonth = this.adapter.lastDateofLastMonth(this.currYear, this.currMonth);
|
|
1609
|
+
const firstDayOfMonth = this.adapter.firstDayofMonth(this.currYear(), this.currMonth());
|
|
1610
|
+
const lastDateOfMonth = this.adapter.lastDateofMonth(this.currYear(), this.currMonth());
|
|
1611
|
+
const lastDayOfMonth = this.adapter.lastDayofMonth(this.currYear(), this.currMonth());
|
|
1612
|
+
const lastDateOfLastMonth = this.adapter.lastDateofLastMonth(this.currYear(), this.currMonth());
|
|
1608
1613
|
for (let i = firstDayOfMonth; i > 0; i--) {
|
|
1609
1614
|
const day = lastDateOfLastMonth - i + 1;
|
|
1610
1615
|
const date = this.adapter.getDate({
|
|
1611
1616
|
locale: this._locale,
|
|
1612
|
-
year: this.currYear,
|
|
1613
|
-
month: this.currMonth - 1,
|
|
1617
|
+
year: this.currYear(),
|
|
1618
|
+
month: this.currMonth() - 1,
|
|
1614
1619
|
day,
|
|
1615
1620
|
});
|
|
1616
1621
|
this.viewDays.push({
|
|
@@ -1624,11 +1629,11 @@ class NgxDatePickerBase {
|
|
|
1624
1629
|
}
|
|
1625
1630
|
for (let day = 1; day <= lastDateOfMonth; day++) {
|
|
1626
1631
|
const today = this.adapter.today();
|
|
1627
|
-
const isToday = day === today.day && this.currMonth === today.month && this.currYear === today.year;
|
|
1632
|
+
const isToday = day === today.day && this.currMonth() === today.month && this.currYear() === today.year;
|
|
1628
1633
|
const date = this.adapter.getDate({
|
|
1629
1634
|
locale: this._locale,
|
|
1630
|
-
year: this.currYear,
|
|
1631
|
-
month: this.currMonth,
|
|
1635
|
+
year: this.currYear(),
|
|
1636
|
+
month: this.currMonth(),
|
|
1632
1637
|
day,
|
|
1633
1638
|
});
|
|
1634
1639
|
this.viewDays.push({
|
|
@@ -1636,8 +1641,8 @@ class NgxDatePickerBase {
|
|
|
1636
1641
|
active: this.checkActiveDate(date),
|
|
1637
1642
|
isToday,
|
|
1638
1643
|
selected: day === selected?.day &&
|
|
1639
|
-
selected.month === this.currMonth &&
|
|
1640
|
-
selected.year === this.currYear,
|
|
1644
|
+
selected.month === this.currMonth() &&
|
|
1645
|
+
selected.year === this.currYear(),
|
|
1641
1646
|
date,
|
|
1642
1647
|
events: this.getEvents(date, events),
|
|
1643
1648
|
});
|
|
@@ -1646,8 +1651,8 @@ class NgxDatePickerBase {
|
|
|
1646
1651
|
const day = i - lastDayOfMonth + 1;
|
|
1647
1652
|
const date = this.adapter.getDate({
|
|
1648
1653
|
locale: this._locale,
|
|
1649
|
-
year: this.currYear,
|
|
1650
|
-
month: this.currMonth + 1,
|
|
1654
|
+
year: this.currYear(),
|
|
1655
|
+
month: this.currMonth() + 1,
|
|
1651
1656
|
day,
|
|
1652
1657
|
});
|
|
1653
1658
|
this.viewDays.push({
|
|
@@ -1759,10 +1764,12 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1759
1764
|
this.init();
|
|
1760
1765
|
}
|
|
1761
1766
|
}
|
|
1762
|
-
view = 'day'
|
|
1767
|
+
view = model('day', /* @ts-ignore */
|
|
1768
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
1763
1769
|
change = new EventEmitter();
|
|
1764
1770
|
selected;
|
|
1765
|
-
calendarHeader = ''
|
|
1771
|
+
calendarHeader = signal('', /* @ts-ignore */
|
|
1772
|
+
...(ngDevMode ? [{ debugName: "calendarHeader" }] : /* istanbul ignore next */ []));
|
|
1766
1773
|
isDisabled = false;
|
|
1767
1774
|
weekDays = [];
|
|
1768
1775
|
_onChange = (value) => { };
|
|
@@ -1787,9 +1794,9 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1787
1794
|
}
|
|
1788
1795
|
else {
|
|
1789
1796
|
let l = this.adapter.toLocale(this.selected.date);
|
|
1790
|
-
this.currYear
|
|
1791
|
-
this.currMonth
|
|
1792
|
-
this.renderِDatePicker(this.view);
|
|
1797
|
+
this.currYear.set(l.year);
|
|
1798
|
+
this.currMonth.set(l.month ?? 1);
|
|
1799
|
+
this.renderِDatePicker(this.view());
|
|
1793
1800
|
}
|
|
1794
1801
|
}
|
|
1795
1802
|
writeValue(value) {
|
|
@@ -1840,63 +1847,62 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1840
1847
|
renderِDatePicker(view) {
|
|
1841
1848
|
super.renderِDatePicker(view, this.selected, [], () => {
|
|
1842
1849
|
let d = this.selected?.date;
|
|
1843
|
-
this.calendarHeader
|
|
1844
|
-
(d && this.adapter.formatDate(this.adapter.toLocale(d), 'EEEE - d MMMM, yyyy')) ?? '';
|
|
1850
|
+
this.calendarHeader.set((d && this.adapter.formatDate(this.adapter.toLocale(d), 'EEEE - d MMMM, yyyy')) ?? '');
|
|
1845
1851
|
});
|
|
1846
1852
|
}
|
|
1847
1853
|
gotoToday() {
|
|
1848
1854
|
let today = this.adapter.today();
|
|
1849
1855
|
this.selected = today;
|
|
1850
|
-
this.currYear
|
|
1851
|
-
this.currMonth
|
|
1852
|
-
this.calendarHeader
|
|
1856
|
+
this.currYear.set(today.year);
|
|
1857
|
+
this.currMonth.set(today.month ?? 1);
|
|
1858
|
+
this.calendarHeader.set(this.adapter.formatDate(today, 'EEEE, d MMMM, yyyy') ?? '');
|
|
1853
1859
|
this.changeView('day');
|
|
1854
1860
|
}
|
|
1855
1861
|
changeView(v) {
|
|
1856
|
-
this.view
|
|
1857
|
-
this.renderِDatePicker(this.view);
|
|
1862
|
+
this.view.set(v);
|
|
1863
|
+
this.renderِDatePicker(this.view());
|
|
1858
1864
|
}
|
|
1859
1865
|
next() {
|
|
1860
|
-
if (this.view === 'year') {
|
|
1861
|
-
this.currYear += 20;
|
|
1866
|
+
if (this.view() === 'year') {
|
|
1867
|
+
this.currYear.update((u) => (u += 20));
|
|
1862
1868
|
}
|
|
1863
|
-
else if (this.view === 'month') {
|
|
1864
|
-
this.currYear
|
|
1869
|
+
else if (this.view() === 'month') {
|
|
1870
|
+
this.currYear.update((u) => u++);
|
|
1865
1871
|
}
|
|
1866
1872
|
else {
|
|
1867
|
-
this.currMonth
|
|
1873
|
+
this.currMonth.update((u) => u++);
|
|
1868
1874
|
}
|
|
1869
|
-
if (this.currMonth < 0 || this.currMonth > 11) {
|
|
1870
|
-
let date = new Date(this.currYear, this.currMonth);
|
|
1871
|
-
this.currYear
|
|
1872
|
-
this.currMonth
|
|
1875
|
+
if (this.currMonth() < 0 || this.currMonth() > 11) {
|
|
1876
|
+
let date = new Date(this.currYear(), this.currMonth());
|
|
1877
|
+
this.currYear.set(date.getFullYear());
|
|
1878
|
+
this.currMonth.set(date.getMonth());
|
|
1873
1879
|
}
|
|
1874
|
-
this.renderِDatePicker(this.view);
|
|
1880
|
+
this.renderِDatePicker(this.view());
|
|
1875
1881
|
}
|
|
1876
1882
|
previous() {
|
|
1877
|
-
if (this.view === 'year') {
|
|
1878
|
-
this.currYear -= 20;
|
|
1883
|
+
if (this.view() === 'year') {
|
|
1884
|
+
this.currYear.update((u) => (u -= 20));
|
|
1879
1885
|
}
|
|
1880
|
-
else if (this.view === 'month') {
|
|
1881
|
-
this.currYear
|
|
1886
|
+
else if (this.view() === 'month') {
|
|
1887
|
+
this.currYear.update((u) => u--);
|
|
1882
1888
|
}
|
|
1883
1889
|
else {
|
|
1884
|
-
this.currMonth
|
|
1890
|
+
this.currMonth.update((u) => u--);
|
|
1885
1891
|
}
|
|
1886
|
-
if (this.currMonth < 0 || this.currMonth > 11) {
|
|
1887
|
-
let date = new Date(this.currYear, this.currMonth);
|
|
1888
|
-
this.currYear
|
|
1889
|
-
this.currMonth
|
|
1892
|
+
if (this.currMonth() < 0 || this.currMonth() > 11) {
|
|
1893
|
+
let date = new Date(this.currYear(), this.currMonth());
|
|
1894
|
+
this.currYear.set(date.getFullYear());
|
|
1895
|
+
this.currMonth.set(date.getMonth());
|
|
1890
1896
|
}
|
|
1891
|
-
this.renderِDatePicker(this.view);
|
|
1897
|
+
this.renderِDatePicker(this.view());
|
|
1892
1898
|
}
|
|
1893
1899
|
selectDay(ev, item) {
|
|
1894
1900
|
ev.stopPropagation();
|
|
1895
1901
|
if (item.active) {
|
|
1896
1902
|
this.selected = {
|
|
1897
1903
|
locale: this._locale,
|
|
1898
|
-
year: this.currYear,
|
|
1899
|
-
month: this.currMonth,
|
|
1904
|
+
year: this.currYear(),
|
|
1905
|
+
month: this.currMonth(),
|
|
1900
1906
|
day: item.day,
|
|
1901
1907
|
date: item.date,
|
|
1902
1908
|
};
|
|
@@ -1906,14 +1912,14 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1906
1912
|
selectMonth(ev, item) {
|
|
1907
1913
|
ev.stopPropagation();
|
|
1908
1914
|
if (item.active) {
|
|
1909
|
-
this.currMonth
|
|
1915
|
+
this.currMonth.set(item.month);
|
|
1910
1916
|
this.changeView('day');
|
|
1911
1917
|
}
|
|
1912
1918
|
}
|
|
1913
1919
|
selectYear(ev, item) {
|
|
1914
1920
|
ev.stopPropagation();
|
|
1915
1921
|
if (item.active) {
|
|
1916
|
-
this.currYear
|
|
1922
|
+
this.currYear.set(item.year);
|
|
1917
1923
|
this.changeView('month');
|
|
1918
1924
|
}
|
|
1919
1925
|
}
|
|
@@ -1925,7 +1931,7 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1925
1931
|
ev.stopPropagation();
|
|
1926
1932
|
}
|
|
1927
1933
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxInputDatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1928
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NgxInputDatePickerComponent, isStandalone: true, selector: "ngx-date-picker", inputs: { localize: { classPropertyName: "localize", publicName: "localize", isSignal: true, isRequired: false, transformFunction: null }, setConfig: { classPropertyName: "setConfig", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: false, isRequired: false, transformFunction: null }, setMin: { classPropertyName: "setMin", publicName: "min", isSignal: false, isRequired: false, transformFunction: null }, setMax: { classPropertyName: "setMax", publicName: "max", isSignal: false, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal:
|
|
1934
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NgxInputDatePickerComponent, isStandalone: true, selector: "ngx-date-picker", inputs: { localize: { classPropertyName: "localize", publicName: "localize", isSignal: true, isRequired: false, transformFunction: null }, setConfig: { classPropertyName: "setConfig", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: false, isRequired: false, transformFunction: null }, setMin: { classPropertyName: "setMin", publicName: "min", isSignal: false, isRequired: false, transformFunction: null }, setMax: { classPropertyName: "setMax", publicName: "max", isSignal: false, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { view: "viewChange", change: "change" }, providers: [
|
|
1929
1935
|
DateAdapterRegistry,
|
|
1930
1936
|
{
|
|
1931
1937
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1937,7 +1943,7 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1937
1943
|
useExisting: forwardRef(() => NgxInputDatePickerComponent),
|
|
1938
1944
|
multi: true,
|
|
1939
1945
|
},
|
|
1940
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"wrapper\" #datepickerWrapper (click)=\"stopPagination($event)\">\n <div class=\"header\">\n <svg\n class=\"calendar-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M16 2V6M8 2V6\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M13 4H11C7.22876 4 5.34315 4 4.17157 5.17157C3 6.34315 3 8.22876 3 12V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V12C21 8.22876 21 6.34315 19.8284 5.17157C18.6569 4 16.7712 4 13 4Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M3 10H21\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M11.9955 14H12.0045M11.9955 18H12.0045M15.991 14H16M8 14H8.00897M8 18H8.00897\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n {{ calendarHeader }}\n </div>\n <div class=\"sub-header\">\n <div class=\"icons\">\n <span id=\"prev\" (click)=\"previous()\">\n <ng-template\n [ngTemplateOutlet]=\"\n config.previousButtonTemplate || defaultPreviousBTNTemplate\n \"></ng-template>\n </span>\n </div>\n <span class=\"current-date\">\n <span (click)=\"changeView('year')\">\n {{ currYear }}\n <ng-template\n [ngTemplateOutlet]=\"config.caretDownIconTemplate || defaultCaretDownIcon\"></ng-template>\n </span>\n <span (click)=\"changeView('month')\">\n {{ displayMonth }}\n <ng-template\n [ngTemplateOutlet]=\"config.caretDownIconTemplate || defaultCaretDownIcon\"></ng-template>\n </span>\n </span>\n <div class=\"icons\">\n <span id=\"next\" (click)=\"next()\">\n <ng-template\n [ngTemplateOutlet]=\"config.nextButtonTemplate || defaultNextBTNTemplate\"></ng-template>\n </span>\n </div>\n </div>\n <div class=\"calendar\">\n @if (view === 'day') {\n <ul class=\"weeks\">\n @for (w of weekDays; track $index) {\n <li [title]=\"w.name\">\n {{ w.min }}\n </li>\n }\n </ul>\n <ul class=\"days\">\n @for (item of viewDays; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectDay($event, item)\">\n {{ item.day }}\n </li>\n }\n </ul>\n } @else if (view === 'month') {\n <ul class=\"months\">\n @for (item of viewMonths; track $index; let i = $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectMonth($event, item)\">\n {{ i + 1 }}.{{ item.displayMonth }}\n </li>\n }\n </ul>\n } @else if (view === 'year') {\n <ul class=\"years\">\n @for (item of viewYears; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectYear($event, item)\">\n {{ item.year }}\n </li>\n }\n </ul>\n }\n <!-- <pre>\n currYear={{currYear}}\n currMonth={{currMonth}}\n {{selected|json}}\n </pre> -->\n <div class=\"calendar-footer\">\n @if (config.clearButton) {\n <button (click)=\"clear()\">\n {{ localize().clear }}\n </button>\n }\n @if (config.todayButton) {\n <button (click)=\"gotoToday()\">\n {{ localize().today }}\n </button>\n }\n </div>\n </div>\n</div>\n\n<ng-template #defaultPreviousBTNTemplate>\n <svg width=\"15px\" height=\"40px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M224 480c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25l192-192c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l169.4 169.4c12.5 12.5 12.5 32.75 0 45.25C240.4 476.9 232.2 480 224 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultNextBTNTemplate>\n <svg width=\"15px\" height=\"40px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultCaretDownIcon>\n <svg width=\"10px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z\" />\n </svg>\n</ng-template>\n", styles: [":host{--ngx-color-bg: light-dark(#fff, #0e1428);--ngx-color-text: light-dark(#000, #fff);--ngx-border-color: light-dark(#c0c0c0, #c0c0c0);--ngx-datepicker-header-bg: light-dark( linear-gradient(to right, #643edf, #865bf3), linear-gradient(to right, #34158c, #441ba8) );--ngx-datepicker-header-text: light-dark(#fff, #fff);--ngx-datepicker-subheader-bg: light-dark(#e0d5ef, #0f1529);--ngx-datepicker-subheader-text: light-dark(#272727, #d2b9f9);--ngx-datepicker-font-size: 12px;--ngx-datepicker-active-bg: light-dark( linear-gradient(to bottom, #8753ff, #5325c9), linear-gradient(to bottom, #8753ff, #5325c9) );--ngx-datepicker-active-text: light-dark(#fff, #fff);--ngx-datepicker-today-color: light-dark(#5325c9, #5325c9)}.wrapper{background:var(--ngx-color-bg);box-shadow:0 15px 40px #0000001f;color:var(--ngx-color-text);border-radius:6px;overflow:hidden;font-size:var(--ngx-datepicker-font-size);width:330px}.wrapper .header{display:flex;align-items:center;justify-content:center;text-align:center;padding:15px 15px 10px;background:var(--ngx-datepicker-header-bg);color:var(--ngx-datepicker-header-text);font-size:1.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wrapper .calendar-icon{background-color:#f3f3f33f;border-radius:29px;padding:6px;width:40px;height:40px;corner-shape:squircle;margin:0 6px}.wrapper .sub-header{display:flex;align-items:center;padding:5px 10px;background-color:var(--ngx-datepicker-subheader-bg);color:var(--ngx-datepicker-subheader-text)}.wrapper .sub-header .current-date{font-size:1.5em;flex:auto;display:flex;align-items:center}.wrapper .sub-header .current-date span{flex:auto;text-align:center}.wrapper .sub-header .icons{display:flex}.wrapper .sub-header .icons span{height:38px;width:38px;margin:0 1px;cursor:pointer;color:#878787;text-align:center;line-height:38px;font-size:1.9rem;-webkit-user-select:none;user-select:none;border:1px rgba(176,176,176,.0901960784) solid;border-radius:5px}.wrapper .sub-header .icons span:hover{background:#f2f2f225}.wrapper .calendar-footer{display:flex;justify-content:space-between;gap:5px}.wrapper .calendar-footer button{outline:none;background:none;color:inherit;border:none;border-radius:4px;padding:8px 15px;box-shadow:none;transition:all .3s;border:1px rgba(168,168,168,.1411764706) solid}.wrapper .calendar-footer button:not([disabled]):hover{cursor:pointer;background:#816ef175}.calendar{padding:10px}.calendar ul{display:flex;flex-wrap:wrap;list-style:none;text-align:center;padding:0;margin:0}.calendar .days{margin-bottom:20px}.calendar .days li{width:14.2857142857%;aspect-ratio:1/1}.calendar .months{margin-bottom:20px}.calendar .months li{width:33.3333333333%;height:44px}.calendar .years{margin-bottom:20px}.calendar .years li{width:25%;height:44px}.calendar li{z-index:1;cursor:pointer;position:relative;color:#333;font-size:1.2em;border-radius:50px;display:flex;align-items:center;justify-content:center;border:1px transparent solid;transition:all .3s;color:inherit}.calendar li:not(.active):hover{background:#dfdfdf68}.calendar li.de-active{opacity:.2}.calendar li.selected{background:var(--ngx-datepicker-active-bg)!important;color:var(--ngx-datepicker-active-text)}.calendar li.today{border:1px var(--ngx-datepicker-today-color) solid!important}.calendar .weeks{border-bottom:1px rgba(231,231,231,.3450980392) solid;margin-bottom:10px;padding-bottom:5px}.calendar .weeks li{font-weight:500;cursor:default;flex:auto;flex-wrap:nowrap}.calendar .weeks li:hover{background:none}::ng-deep body[dir=rtl] .wrapper .sub-header .icons #next,::ng-deep body[dir=rtl] .wrapper .sub-header .icons #prev,::ng-deep html[dir=rtl] .wrapper .sub-header .icons #next,::ng-deep html[dir=rtl] .wrapper .sub-header .icons #prev{transform:rotate(180deg)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1946
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"wrapper\" #datepickerWrapper (click)=\"stopPagination($event)\">\n <div class=\"header\">\n <svg\n class=\"calendar-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M16 2V6M8 2V6\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M13 4H11C7.22876 4 5.34315 4 4.17157 5.17157C3 6.34315 3 8.22876 3 12V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V12C21 8.22876 21 6.34315 19.8284 5.17157C18.6569 4 16.7712 4 13 4Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M3 10H21\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M11.9955 14H12.0045M11.9955 18H12.0045M15.991 14H16M8 14H8.00897M8 18H8.00897\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n {{ calendarHeader() }}\n </div>\n <div class=\"sub-header\">\n <div class=\"icons\">\n <span id=\"prev\" (click)=\"previous()\">\n <ng-template\n [ngTemplateOutlet]=\"\n config.previousButtonTemplate || defaultPreviousBTNTemplate\n \"></ng-template>\n </span>\n </div>\n <span class=\"current-date\">\n <span (click)=\"changeView('year')\">\n {{ currYear() }}\n <ng-template\n [ngTemplateOutlet]=\"config.caretDownIconTemplate || defaultCaretDownIcon\"></ng-template>\n </span>\n <span (click)=\"changeView('month')\">\n {{ displayMonth() }}\n <ng-template\n [ngTemplateOutlet]=\"config.caretDownIconTemplate || defaultCaretDownIcon\"></ng-template>\n </span>\n </span>\n <div class=\"icons\">\n <span id=\"next\" (click)=\"next()\">\n <ng-template\n [ngTemplateOutlet]=\"config.nextButtonTemplate || defaultNextBTNTemplate\"></ng-template>\n </span>\n </div>\n </div>\n <div class=\"calendar\">\n @if (view() === 'day') {\n <ul class=\"weeks\">\n @for (w of weekDays; track $index) {\n <li [title]=\"w.name\">\n {{ w.min }}\n </li>\n }\n </ul>\n <ul class=\"days\">\n @for (item of viewDays; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectDay($event, item)\">\n {{ item.day }}\n </li>\n }\n </ul>\n } @else if (view() === 'month') {\n <ul class=\"months\">\n @for (item of viewMonths; track $index; let i = $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectMonth($event, item)\">\n {{ i + 1 }}.{{ item.displayMonth }}\n </li>\n }\n </ul>\n } @else if (view() === 'year') {\n <ul class=\"years\">\n @for (item of viewYears; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectYear($event, item)\">\n {{ item.year }}\n </li>\n }\n </ul>\n }\n <!-- <pre>\n currYear={{currYear}}\n currMonth={{currMonth}}\n {{selected|json}}\n </pre> -->\n <div class=\"calendar-footer\">\n @if (config.clearButton) {\n <button (click)=\"clear()\">\n {{ localize().clear }}\n </button>\n }\n @if (config.todayButton) {\n <button (click)=\"gotoToday()\">\n {{ localize().today }}\n </button>\n }\n </div>\n </div>\n</div>\n\n<ng-template #defaultPreviousBTNTemplate>\n <svg width=\"15px\" height=\"40px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M224 480c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25l192-192c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l169.4 169.4c12.5 12.5 12.5 32.75 0 45.25C240.4 476.9 232.2 480 224 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultNextBTNTemplate>\n <svg width=\"15px\" height=\"40px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultCaretDownIcon>\n <svg width=\"10px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z\" />\n </svg>\n</ng-template>\n", styles: [":host{--ngx-color-bg: light-dark(#fff, #0e1428);--ngx-color-text: light-dark(#000, #fff);--ngx-border-color: light-dark(#c0c0c0, #c0c0c0);--ngx-datepicker-header-bg: light-dark( linear-gradient(to right, #643edf, #865bf3), linear-gradient(to right, #34158c, #441ba8) );--ngx-datepicker-header-text: light-dark(#fff, #fff);--ngx-datepicker-subheader-bg: light-dark(#e0d5ef, #0f1529);--ngx-datepicker-subheader-text: light-dark(#272727, #d2b9f9);--ngx-datepicker-font-size: 12px;--ngx-datepicker-active-bg: light-dark( linear-gradient(to bottom, #8753ff, #5325c9), linear-gradient(to bottom, #8753ff, #5325c9) );--ngx-datepicker-active-text: light-dark(#fff, #fff);--ngx-datepicker-today-color: light-dark(#5325c9, #5325c9)}.wrapper{background:var(--ngx-color-bg);box-shadow:0 15px 40px #0000001f;color:var(--ngx-color-text);border-radius:6px;overflow:hidden;font-size:var(--ngx-datepicker-font-size);width:330px}.wrapper .header{display:flex;align-items:center;justify-content:center;text-align:center;padding:15px 15px 10px;background:var(--ngx-datepicker-header-bg);color:var(--ngx-datepicker-header-text);font-size:1.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wrapper .calendar-icon{background-color:#f3f3f33f;border-radius:29px;padding:6px;width:40px;min-width:40px;height:40px;corner-shape:squircle;margin:0 6px}.wrapper .sub-header{display:flex;align-items:center;padding:5px 10px;background-color:var(--ngx-datepicker-subheader-bg);color:var(--ngx-datepicker-subheader-text)}.wrapper .sub-header .current-date{font-size:1.5em;flex:auto;display:flex;align-items:center}.wrapper .sub-header .current-date span{flex:auto;text-align:center}.wrapper .sub-header .icons{display:flex}.wrapper .sub-header .icons span{height:38px;width:38px;margin:0 1px;cursor:pointer;color:#878787;text-align:center;line-height:38px;font-size:1.9rem;-webkit-user-select:none;user-select:none;border:1px rgba(176,176,176,.0901960784) solid;border-radius:5px}.wrapper .sub-header .icons span:hover{background:#f2f2f225}.wrapper .calendar-footer{display:flex;justify-content:space-between;gap:5px}.wrapper .calendar-footer button{outline:none;background:none;color:inherit;border:none;border-radius:4px;padding:8px 15px;box-shadow:none;transition:all .3s;border:1px rgba(168,168,168,.1411764706) solid}.wrapper .calendar-footer button:not([disabled]):hover{cursor:pointer;background:#816ef175}.calendar{padding:10px}.calendar ul{display:flex;flex-wrap:wrap;list-style:none;text-align:center;padding:0;margin:0}.calendar .days{margin-bottom:20px}.calendar .days li{width:14.2857142857%;aspect-ratio:1/1}.calendar .months{margin-bottom:20px}.calendar .months li{width:33.3333333333%;height:44px}.calendar .years{margin-bottom:20px}.calendar .years li{width:25%;height:44px}.calendar li{z-index:1;cursor:pointer;position:relative;color:#333;font-size:1.2em;border-radius:50px;display:flex;align-items:center;justify-content:center;border:1px transparent solid;transition:all .3s;color:inherit}.calendar li:not(.active):hover{background:#dfdfdf68}.calendar li.de-active{opacity:.2}.calendar li.selected{background:var(--ngx-datepicker-active-bg)!important;color:var(--ngx-datepicker-active-text)}.calendar li.today{border:1px var(--ngx-datepicker-today-color) solid!important}.calendar .weeks{border-bottom:1px rgba(231,231,231,.3450980392) solid;margin-bottom:10px;padding-bottom:5px}.calendar .weeks li{font-weight:500;cursor:default;flex:auto;flex-wrap:nowrap}.calendar .weeks li:hover{background:none}::ng-deep body[dir=rtl] .wrapper .sub-header .icons #next,::ng-deep body[dir=rtl] .wrapper .sub-header .icons #prev,::ng-deep html[dir=rtl] .wrapper .sub-header .icons #next,::ng-deep html[dir=rtl] .wrapper .sub-header .icons #prev{transform:rotate(180deg)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1941
1947
|
}
|
|
1942
1948
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxInputDatePickerComponent, decorators: [{
|
|
1943
1949
|
type: Component,
|
|
@@ -1953,7 +1959,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
1953
1959
|
useExisting: forwardRef(() => NgxInputDatePickerComponent),
|
|
1954
1960
|
multi: true,
|
|
1955
1961
|
},
|
|
1956
|
-
], template: "<div class=\"wrapper\" #datepickerWrapper (click)=\"stopPagination($event)\">\n <div class=\"header\">\n <svg\n class=\"calendar-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M16 2V6M8 2V6\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M13 4H11C7.22876 4 5.34315 4 4.17157 5.17157C3 6.34315 3 8.22876 3 12V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V12C21 8.22876 21 6.34315 19.8284 5.17157C18.6569 4 16.7712 4 13 4Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M3 10H21\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M11.9955 14H12.0045M11.9955 18H12.0045M15.991 14H16M8 14H8.00897M8 18H8.00897\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n {{ calendarHeader }}\n </div>\n <div class=\"sub-header\">\n <div class=\"icons\">\n <span id=\"prev\" (click)=\"previous()\">\n <ng-template\n [ngTemplateOutlet]=\"\n config.previousButtonTemplate || defaultPreviousBTNTemplate\n \"></ng-template>\n </span>\n </div>\n <span class=\"current-date\">\n <span (click)=\"changeView('year')\">\n {{ currYear }}\n <ng-template\n [ngTemplateOutlet]=\"config.caretDownIconTemplate || defaultCaretDownIcon\"></ng-template>\n </span>\n <span (click)=\"changeView('month')\">\n {{ displayMonth }}\n <ng-template\n [ngTemplateOutlet]=\"config.caretDownIconTemplate || defaultCaretDownIcon\"></ng-template>\n </span>\n </span>\n <div class=\"icons\">\n <span id=\"next\" (click)=\"next()\">\n <ng-template\n [ngTemplateOutlet]=\"config.nextButtonTemplate || defaultNextBTNTemplate\"></ng-template>\n </span>\n </div>\n </div>\n <div class=\"calendar\">\n @if (view === 'day') {\n <ul class=\"weeks\">\n @for (w of weekDays; track $index) {\n <li [title]=\"w.name\">\n {{ w.min }}\n </li>\n }\n </ul>\n <ul class=\"days\">\n @for (item of viewDays; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectDay($event, item)\">\n {{ item.day }}\n </li>\n }\n </ul>\n } @else if (view === 'month') {\n <ul class=\"months\">\n @for (item of viewMonths; track $index; let i = $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectMonth($event, item)\">\n {{ i + 1 }}.{{ item.displayMonth }}\n </li>\n }\n </ul>\n } @else if (view === 'year') {\n <ul class=\"years\">\n @for (item of viewYears; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectYear($event, item)\">\n {{ item.year }}\n </li>\n }\n </ul>\n }\n <!-- <pre>\n currYear={{currYear}}\n currMonth={{currMonth}}\n {{selected|json}}\n </pre> -->\n <div class=\"calendar-footer\">\n @if (config.clearButton) {\n <button (click)=\"clear()\">\n {{ localize().clear }}\n </button>\n }\n @if (config.todayButton) {\n <button (click)=\"gotoToday()\">\n {{ localize().today }}\n </button>\n }\n </div>\n </div>\n</div>\n\n<ng-template #defaultPreviousBTNTemplate>\n <svg width=\"15px\" height=\"40px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M224 480c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25l192-192c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l169.4 169.4c12.5 12.5 12.5 32.75 0 45.25C240.4 476.9 232.2 480 224 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultNextBTNTemplate>\n <svg width=\"15px\" height=\"40px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultCaretDownIcon>\n <svg width=\"10px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z\" />\n </svg>\n</ng-template>\n", styles: [":host{--ngx-color-bg: light-dark(#fff, #0e1428);--ngx-color-text: light-dark(#000, #fff);--ngx-border-color: light-dark(#c0c0c0, #c0c0c0);--ngx-datepicker-header-bg: light-dark( linear-gradient(to right, #643edf, #865bf3), linear-gradient(to right, #34158c, #441ba8) );--ngx-datepicker-header-text: light-dark(#fff, #fff);--ngx-datepicker-subheader-bg: light-dark(#e0d5ef, #0f1529);--ngx-datepicker-subheader-text: light-dark(#272727, #d2b9f9);--ngx-datepicker-font-size: 12px;--ngx-datepicker-active-bg: light-dark( linear-gradient(to bottom, #8753ff, #5325c9), linear-gradient(to bottom, #8753ff, #5325c9) );--ngx-datepicker-active-text: light-dark(#fff, #fff);--ngx-datepicker-today-color: light-dark(#5325c9, #5325c9)}.wrapper{background:var(--ngx-color-bg);box-shadow:0 15px 40px #0000001f;color:var(--ngx-color-text);border-radius:6px;overflow:hidden;font-size:var(--ngx-datepicker-font-size);width:330px}.wrapper .header{display:flex;align-items:center;justify-content:center;text-align:center;padding:15px 15px 10px;background:var(--ngx-datepicker-header-bg);color:var(--ngx-datepicker-header-text);font-size:1.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wrapper .calendar-icon{background-color:#f3f3f33f;border-radius:29px;padding:6px;width:40px;height:40px;corner-shape:squircle;margin:0 6px}.wrapper .sub-header{display:flex;align-items:center;padding:5px 10px;background-color:var(--ngx-datepicker-subheader-bg);color:var(--ngx-datepicker-subheader-text)}.wrapper .sub-header .current-date{font-size:1.5em;flex:auto;display:flex;align-items:center}.wrapper .sub-header .current-date span{flex:auto;text-align:center}.wrapper .sub-header .icons{display:flex}.wrapper .sub-header .icons span{height:38px;width:38px;margin:0 1px;cursor:pointer;color:#878787;text-align:center;line-height:38px;font-size:1.9rem;-webkit-user-select:none;user-select:none;border:1px rgba(176,176,176,.0901960784) solid;border-radius:5px}.wrapper .sub-header .icons span:hover{background:#f2f2f225}.wrapper .calendar-footer{display:flex;justify-content:space-between;gap:5px}.wrapper .calendar-footer button{outline:none;background:none;color:inherit;border:none;border-radius:4px;padding:8px 15px;box-shadow:none;transition:all .3s;border:1px rgba(168,168,168,.1411764706) solid}.wrapper .calendar-footer button:not([disabled]):hover{cursor:pointer;background:#816ef175}.calendar{padding:10px}.calendar ul{display:flex;flex-wrap:wrap;list-style:none;text-align:center;padding:0;margin:0}.calendar .days{margin-bottom:20px}.calendar .days li{width:14.2857142857%;aspect-ratio:1/1}.calendar .months{margin-bottom:20px}.calendar .months li{width:33.3333333333%;height:44px}.calendar .years{margin-bottom:20px}.calendar .years li{width:25%;height:44px}.calendar li{z-index:1;cursor:pointer;position:relative;color:#333;font-size:1.2em;border-radius:50px;display:flex;align-items:center;justify-content:center;border:1px transparent solid;transition:all .3s;color:inherit}.calendar li:not(.active):hover{background:#dfdfdf68}.calendar li.de-active{opacity:.2}.calendar li.selected{background:var(--ngx-datepicker-active-bg)!important;color:var(--ngx-datepicker-active-text)}.calendar li.today{border:1px var(--ngx-datepicker-today-color) solid!important}.calendar .weeks{border-bottom:1px rgba(231,231,231,.3450980392) solid;margin-bottom:10px;padding-bottom:5px}.calendar .weeks li{font-weight:500;cursor:default;flex:auto;flex-wrap:nowrap}.calendar .weeks li:hover{background:none}::ng-deep body[dir=rtl] .wrapper .sub-header .icons #next,::ng-deep body[dir=rtl] .wrapper .sub-header .icons #prev,::ng-deep html[dir=rtl] .wrapper .sub-header .icons #next,::ng-deep html[dir=rtl] .wrapper .sub-header .icons #prev{transform:rotate(180deg)}\n"] }]
|
|
1962
|
+
], template: "<div class=\"wrapper\" #datepickerWrapper (click)=\"stopPagination($event)\">\n <div class=\"header\">\n <svg\n class=\"calendar-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M16 2V6M8 2V6\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M13 4H11C7.22876 4 5.34315 4 4.17157 5.17157C3 6.34315 3 8.22876 3 12V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V12C21 8.22876 21 6.34315 19.8284 5.17157C18.6569 4 16.7712 4 13 4Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M3 10H21\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n <path\n d=\"M11.9955 14H12.0045M11.9955 18H12.0045M15.991 14H16M8 14H8.00897M8 18H8.00897\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n {{ calendarHeader() }}\n </div>\n <div class=\"sub-header\">\n <div class=\"icons\">\n <span id=\"prev\" (click)=\"previous()\">\n <ng-template\n [ngTemplateOutlet]=\"\n config.previousButtonTemplate || defaultPreviousBTNTemplate\n \"></ng-template>\n </span>\n </div>\n <span class=\"current-date\">\n <span (click)=\"changeView('year')\">\n {{ currYear() }}\n <ng-template\n [ngTemplateOutlet]=\"config.caretDownIconTemplate || defaultCaretDownIcon\"></ng-template>\n </span>\n <span (click)=\"changeView('month')\">\n {{ displayMonth() }}\n <ng-template\n [ngTemplateOutlet]=\"config.caretDownIconTemplate || defaultCaretDownIcon\"></ng-template>\n </span>\n </span>\n <div class=\"icons\">\n <span id=\"next\" (click)=\"next()\">\n <ng-template\n [ngTemplateOutlet]=\"config.nextButtonTemplate || defaultNextBTNTemplate\"></ng-template>\n </span>\n </div>\n </div>\n <div class=\"calendar\">\n @if (view() === 'day') {\n <ul class=\"weeks\">\n @for (w of weekDays; track $index) {\n <li [title]=\"w.name\">\n {{ w.min }}\n </li>\n }\n </ul>\n <ul class=\"days\">\n @for (item of viewDays; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectDay($event, item)\">\n {{ item.day }}\n </li>\n }\n </ul>\n } @else if (view() === 'month') {\n <ul class=\"months\">\n @for (item of viewMonths; track $index; let i = $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectMonth($event, item)\">\n {{ i + 1 }}.{{ item.displayMonth }}\n </li>\n }\n </ul>\n } @else if (view() === 'year') {\n <ul class=\"years\">\n @for (item of viewYears; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectYear($event, item)\">\n {{ item.year }}\n </li>\n }\n </ul>\n }\n <!-- <pre>\n currYear={{currYear}}\n currMonth={{currMonth}}\n {{selected|json}}\n </pre> -->\n <div class=\"calendar-footer\">\n @if (config.clearButton) {\n <button (click)=\"clear()\">\n {{ localize().clear }}\n </button>\n }\n @if (config.todayButton) {\n <button (click)=\"gotoToday()\">\n {{ localize().today }}\n </button>\n }\n </div>\n </div>\n</div>\n\n<ng-template #defaultPreviousBTNTemplate>\n <svg width=\"15px\" height=\"40px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M224 480c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25l192-192c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l169.4 169.4c12.5 12.5 12.5 32.75 0 45.25C240.4 476.9 232.2 480 224 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultNextBTNTemplate>\n <svg width=\"15px\" height=\"40px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultCaretDownIcon>\n <svg width=\"10px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z\" />\n </svg>\n</ng-template>\n", styles: [":host{--ngx-color-bg: light-dark(#fff, #0e1428);--ngx-color-text: light-dark(#000, #fff);--ngx-border-color: light-dark(#c0c0c0, #c0c0c0);--ngx-datepicker-header-bg: light-dark( linear-gradient(to right, #643edf, #865bf3), linear-gradient(to right, #34158c, #441ba8) );--ngx-datepicker-header-text: light-dark(#fff, #fff);--ngx-datepicker-subheader-bg: light-dark(#e0d5ef, #0f1529);--ngx-datepicker-subheader-text: light-dark(#272727, #d2b9f9);--ngx-datepicker-font-size: 12px;--ngx-datepicker-active-bg: light-dark( linear-gradient(to bottom, #8753ff, #5325c9), linear-gradient(to bottom, #8753ff, #5325c9) );--ngx-datepicker-active-text: light-dark(#fff, #fff);--ngx-datepicker-today-color: light-dark(#5325c9, #5325c9)}.wrapper{background:var(--ngx-color-bg);box-shadow:0 15px 40px #0000001f;color:var(--ngx-color-text);border-radius:6px;overflow:hidden;font-size:var(--ngx-datepicker-font-size);width:330px}.wrapper .header{display:flex;align-items:center;justify-content:center;text-align:center;padding:15px 15px 10px;background:var(--ngx-datepicker-header-bg);color:var(--ngx-datepicker-header-text);font-size:1.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wrapper .calendar-icon{background-color:#f3f3f33f;border-radius:29px;padding:6px;width:40px;min-width:40px;height:40px;corner-shape:squircle;margin:0 6px}.wrapper .sub-header{display:flex;align-items:center;padding:5px 10px;background-color:var(--ngx-datepicker-subheader-bg);color:var(--ngx-datepicker-subheader-text)}.wrapper .sub-header .current-date{font-size:1.5em;flex:auto;display:flex;align-items:center}.wrapper .sub-header .current-date span{flex:auto;text-align:center}.wrapper .sub-header .icons{display:flex}.wrapper .sub-header .icons span{height:38px;width:38px;margin:0 1px;cursor:pointer;color:#878787;text-align:center;line-height:38px;font-size:1.9rem;-webkit-user-select:none;user-select:none;border:1px rgba(176,176,176,.0901960784) solid;border-radius:5px}.wrapper .sub-header .icons span:hover{background:#f2f2f225}.wrapper .calendar-footer{display:flex;justify-content:space-between;gap:5px}.wrapper .calendar-footer button{outline:none;background:none;color:inherit;border:none;border-radius:4px;padding:8px 15px;box-shadow:none;transition:all .3s;border:1px rgba(168,168,168,.1411764706) solid}.wrapper .calendar-footer button:not([disabled]):hover{cursor:pointer;background:#816ef175}.calendar{padding:10px}.calendar ul{display:flex;flex-wrap:wrap;list-style:none;text-align:center;padding:0;margin:0}.calendar .days{margin-bottom:20px}.calendar .days li{width:14.2857142857%;aspect-ratio:1/1}.calendar .months{margin-bottom:20px}.calendar .months li{width:33.3333333333%;height:44px}.calendar .years{margin-bottom:20px}.calendar .years li{width:25%;height:44px}.calendar li{z-index:1;cursor:pointer;position:relative;color:#333;font-size:1.2em;border-radius:50px;display:flex;align-items:center;justify-content:center;border:1px transparent solid;transition:all .3s;color:inherit}.calendar li:not(.active):hover{background:#dfdfdf68}.calendar li.de-active{opacity:.2}.calendar li.selected{background:var(--ngx-datepicker-active-bg)!important;color:var(--ngx-datepicker-active-text)}.calendar li.today{border:1px var(--ngx-datepicker-today-color) solid!important}.calendar .weeks{border-bottom:1px rgba(231,231,231,.3450980392) solid;margin-bottom:10px;padding-bottom:5px}.calendar .weeks li{font-weight:500;cursor:default;flex:auto;flex-wrap:nowrap}.calendar .weeks li:hover{background:none}::ng-deep body[dir=rtl] .wrapper .sub-header .icons #next,::ng-deep body[dir=rtl] .wrapper .sub-header .icons #prev,::ng-deep html[dir=rtl] .wrapper .sub-header .icons #next,::ng-deep html[dir=rtl] .wrapper .sub-header .icons #prev{transform:rotate(180deg)}\n"] }]
|
|
1957
1963
|
}], ctorParameters: () => [], propDecorators: { localize: [{ type: i0.Input, args: [{ isSignal: true, alias: "localize", required: false }] }], setConfig: [{
|
|
1958
1964
|
type: Input,
|
|
1959
1965
|
args: ['config']
|
|
@@ -1965,9 +1971,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
1965
1971
|
}], setMax: [{
|
|
1966
1972
|
type: Input,
|
|
1967
1973
|
args: ['max']
|
|
1968
|
-
}], view: [{
|
|
1969
|
-
type: Input
|
|
1970
|
-
}], change: [{
|
|
1974
|
+
}], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }, { type: i0.Output, args: ["viewChange"] }], change: [{
|
|
1971
1975
|
type: Output
|
|
1972
1976
|
}] } });
|
|
1973
1977
|
|
|
@@ -1982,8 +1986,9 @@ class NgxInputDatePicker {
|
|
|
1982
1986
|
adapter;
|
|
1983
1987
|
_locale = 'en';
|
|
1984
1988
|
set locale(val) {
|
|
1985
|
-
this._locale = val;
|
|
1989
|
+
this._locale = val || 'en';
|
|
1986
1990
|
this.adapter = this.dateAdapterRegistry.resolve(this._locale);
|
|
1991
|
+
this._formatValue(this.value);
|
|
1987
1992
|
}
|
|
1988
1993
|
_onChange = (value) => { };
|
|
1989
1994
|
_onTouched = () => { };
|
|
@@ -2260,10 +2265,12 @@ class NgxCalendarComponent extends NgxDatePickerBase {
|
|
|
2260
2265
|
eventChange = new EventEmitter();
|
|
2261
2266
|
eventsChange = new EventEmitter();
|
|
2262
2267
|
selected;
|
|
2268
|
+
// Todo: change to signal
|
|
2263
2269
|
anchorDate;
|
|
2264
2270
|
eventViewItems = [];
|
|
2265
2271
|
monthEventSegments = [];
|
|
2266
2272
|
monthEventRows = Array.from({ length: MONTH_ROW_COUNT }, () => []);
|
|
2273
|
+
// Todo: change to signal
|
|
2267
2274
|
weekDays = [];
|
|
2268
2275
|
allDayByColumn = [];
|
|
2269
2276
|
timeSlots = Array.from({ length: 48 }, (_, i) => i * 30);
|
|
@@ -2324,7 +2331,7 @@ class NgxCalendarComponent extends NgxDatePickerBase {
|
|
|
2324
2331
|
this.renderEventView();
|
|
2325
2332
|
break;
|
|
2326
2333
|
}
|
|
2327
|
-
this.displayMonth
|
|
2334
|
+
this.displayMonth.set(this.months[this.currMonth()] ?? '');
|
|
2328
2335
|
queueMicrotask(() => this.calcCellSize());
|
|
2329
2336
|
}
|
|
2330
2337
|
get renderEvents() {
|
|
@@ -2332,8 +2339,8 @@ class NgxCalendarComponent extends NgxDatePickerBase {
|
|
|
2332
2339
|
}
|
|
2333
2340
|
syncAnchorToLocale() {
|
|
2334
2341
|
const localeDate = this.adapter.toLocale(this.anchorDate);
|
|
2335
|
-
this.currYear
|
|
2336
|
-
this.currMonth
|
|
2342
|
+
this.currYear.set(localeDate.year);
|
|
2343
|
+
this.currMonth.set(localeDate.month ?? 0);
|
|
2337
2344
|
this.months = this.adapter.longMonths;
|
|
2338
2345
|
this.weeks = this.adapter.longDays;
|
|
2339
2346
|
}
|
|
@@ -2542,15 +2549,15 @@ class NgxCalendarComponent extends NgxDatePickerBase {
|
|
|
2542
2549
|
renderEventView() {
|
|
2543
2550
|
const monthStart = this.adapter.getDate({
|
|
2544
2551
|
locale: this._locale,
|
|
2545
|
-
year: this.currYear,
|
|
2546
|
-
month: this.currMonth,
|
|
2552
|
+
year: this.currYear(),
|
|
2553
|
+
month: this.currMonth(),
|
|
2547
2554
|
day: 1,
|
|
2548
2555
|
});
|
|
2549
2556
|
const monthEnd = this.adapter.getDate({
|
|
2550
2557
|
locale: this._locale,
|
|
2551
|
-
year: this.currYear,
|
|
2552
|
-
month: this.currMonth,
|
|
2553
|
-
day: this.adapter.lastDateofMonth(this.currYear, this.currMonth),
|
|
2558
|
+
year: this.currYear(),
|
|
2559
|
+
month: this.currMonth(),
|
|
2560
|
+
day: this.adapter.lastDateofMonth(this.currYear(), this.currMonth()),
|
|
2554
2561
|
});
|
|
2555
2562
|
this.eventViewItems = this.renderEventSources()
|
|
2556
2563
|
.map((event) => {
|
|
@@ -2967,7 +2974,7 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
2967
2974
|
if (!sameDate(next, this.minDate)) {
|
|
2968
2975
|
this.minDate = next;
|
|
2969
2976
|
this._validatorOnChange();
|
|
2970
|
-
this.renderِDatePicker(this.view);
|
|
2977
|
+
this.renderِDatePicker(this.view());
|
|
2971
2978
|
}
|
|
2972
2979
|
}
|
|
2973
2980
|
set max(value) {
|
|
@@ -2975,16 +2982,18 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
2975
2982
|
if (!sameDate(next, this.maxDate)) {
|
|
2976
2983
|
this.maxDate = next;
|
|
2977
2984
|
this._validatorOnChange();
|
|
2978
|
-
this.renderِDatePicker(this.view);
|
|
2985
|
+
this.renderِDatePicker(this.view());
|
|
2979
2986
|
}
|
|
2980
2987
|
}
|
|
2981
|
-
view = 'day'
|
|
2988
|
+
view = model('day', /* @ts-ignore */
|
|
2989
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
2982
2990
|
rangeChange = new EventEmitter();
|
|
2983
2991
|
change = new EventEmitter();
|
|
2984
2992
|
range = { start: null, end: null };
|
|
2985
2993
|
hoverDate = null;
|
|
2986
2994
|
weekDays = [];
|
|
2987
|
-
calendarHeader = ''
|
|
2995
|
+
calendarHeader = signal('', /* @ts-ignore */
|
|
2996
|
+
...(ngDevMode ? [{ debugName: "calendarHeader" }] : /* istanbul ignore next */ []));
|
|
2988
2997
|
_onChange = (_value) => { };
|
|
2989
2998
|
_onTouched = () => { };
|
|
2990
2999
|
_validatorOnChange = () => { };
|
|
@@ -3037,19 +3046,17 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3037
3046
|
renderِDatePicker(view) {
|
|
3038
3047
|
super.renderِDatePicker(view, undefined, [], () => {
|
|
3039
3048
|
this.applyRangeState();
|
|
3040
|
-
const start = this.range.start;
|
|
3041
|
-
const end = this.range.end;
|
|
3042
|
-
const startText = start
|
|
3043
|
-
? this.adapter.formatDate(this.adapter.toLocale(start), 'EEEE, d MMMM, yyyy')
|
|
3044
|
-
: '';
|
|
3045
|
-
const endText = end
|
|
3046
|
-
? this.adapter.formatDate(this.adapter.toLocale(end), 'EEEE, d MMMM, yyyy')
|
|
3047
|
-
: '';
|
|
3048
|
-
this.calendarHeader = endText
|
|
3049
|
-
? `${startText} – ${endText}`
|
|
3050
|
-
: startText || 'Select date range';
|
|
3051
3049
|
});
|
|
3052
3050
|
}
|
|
3051
|
+
updateHeader() {
|
|
3052
|
+
const start = this.range.start || this.hoverDate;
|
|
3053
|
+
const end = this.range.end || this.hoverDate;
|
|
3054
|
+
const startText = start
|
|
3055
|
+
? this.adapter.formatDate(this.adapter.toLocale(start), 'yyyy/MM/dd')
|
|
3056
|
+
: '';
|
|
3057
|
+
const endText = end ? this.adapter.formatDate(this.adapter.toLocale(end), 'yyyy/MM/dd') : '';
|
|
3058
|
+
this.calendarHeader.set(endText ? `${startText} – ${endText}` : startText || 'Select date range');
|
|
3059
|
+
}
|
|
3053
3060
|
init() {
|
|
3054
3061
|
this.months = this.adapter.longMonths;
|
|
3055
3062
|
const shortDays = this.adapter.shortDays;
|
|
@@ -3057,19 +3064,19 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3057
3064
|
this.weekDays = shortDays.map((min, i) => ({ min, name: longDays[i] }));
|
|
3058
3065
|
const anchor = this.range.end || this.range.start || this.adapter.getDate(this.adapter.today());
|
|
3059
3066
|
const locale = this.adapter.toLocale(anchor);
|
|
3060
|
-
this.currYear
|
|
3061
|
-
this.currMonth
|
|
3062
|
-
this.renderِDatePicker(this.view);
|
|
3067
|
+
this.currYear.set(locale.year);
|
|
3068
|
+
this.currMonth.set(locale.month ?? 0);
|
|
3069
|
+
this.renderِDatePicker(this.view());
|
|
3063
3070
|
}
|
|
3064
3071
|
changeView(view) {
|
|
3065
|
-
this.view
|
|
3072
|
+
this.view.set(view);
|
|
3066
3073
|
this.renderِDatePicker(view);
|
|
3067
3074
|
}
|
|
3068
3075
|
gotoToday() {
|
|
3069
3076
|
const today = this.adapter.today();
|
|
3070
3077
|
const date = today.date ?? this.adapter.getDate(today);
|
|
3071
|
-
this.currYear
|
|
3072
|
-
this.currMonth
|
|
3078
|
+
this.currYear.set(today.year);
|
|
3079
|
+
this.currMonth.set(today.month ?? 0);
|
|
3073
3080
|
// Keep an existing completed range; today is only a navigation shortcut.
|
|
3074
3081
|
if (!this.range.start || this.range.end) {
|
|
3075
3082
|
this.range = { start: date, end: null };
|
|
@@ -3078,38 +3085,38 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3078
3085
|
this.changeView('day');
|
|
3079
3086
|
}
|
|
3080
3087
|
next() {
|
|
3081
|
-
if (this.view === 'year') {
|
|
3082
|
-
this.currYear += 20;
|
|
3088
|
+
if (this.view() === 'year') {
|
|
3089
|
+
this.currYear.update((u) => (u += 20));
|
|
3083
3090
|
}
|
|
3084
|
-
else if (this.view === 'month') {
|
|
3085
|
-
this.currYear
|
|
3091
|
+
else if (this.view() === 'month') {
|
|
3092
|
+
this.currYear.update((u) => u++);
|
|
3086
3093
|
}
|
|
3087
3094
|
else {
|
|
3088
|
-
this.currMonth
|
|
3095
|
+
this.currMonth.update((u) => u++);
|
|
3089
3096
|
}
|
|
3090
|
-
if (this.currMonth < 0 || this.currMonth > 11) {
|
|
3091
|
-
let date = new Date(this.currYear, this.currMonth);
|
|
3092
|
-
this.currYear
|
|
3093
|
-
this.currMonth
|
|
3097
|
+
if (this.currMonth() < 0 || this.currMonth() > 11) {
|
|
3098
|
+
let date = new Date(this.currYear(), this.currMonth());
|
|
3099
|
+
this.currYear.set(date.getFullYear());
|
|
3100
|
+
this.currMonth.set(date.getMonth());
|
|
3094
3101
|
}
|
|
3095
|
-
this.renderِDatePicker(this.view);
|
|
3102
|
+
this.renderِDatePicker(this.view());
|
|
3096
3103
|
}
|
|
3097
3104
|
previous() {
|
|
3098
|
-
if (this.view === 'year') {
|
|
3099
|
-
this.currYear -= 20;
|
|
3105
|
+
if (this.view() === 'year') {
|
|
3106
|
+
this.currYear.update((u) => (u -= 20));
|
|
3100
3107
|
}
|
|
3101
|
-
else if (this.view === 'month') {
|
|
3102
|
-
this.currYear
|
|
3108
|
+
else if (this.view() === 'month') {
|
|
3109
|
+
this.currYear.update((u) => u--);
|
|
3103
3110
|
}
|
|
3104
3111
|
else {
|
|
3105
|
-
this.currMonth
|
|
3112
|
+
this.currMonth.update((u) => u--);
|
|
3106
3113
|
}
|
|
3107
|
-
if (this.currMonth < 0 || this.currMonth > 11) {
|
|
3108
|
-
let date = new Date(this.currYear, this.currMonth);
|
|
3109
|
-
this.currYear
|
|
3110
|
-
this.currMonth
|
|
3114
|
+
if (this.currMonth() < 0 || this.currMonth() > 11) {
|
|
3115
|
+
let date = new Date(this.currYear(), this.currMonth());
|
|
3116
|
+
this.currYear.set(date.getFullYear());
|
|
3117
|
+
this.currMonth.set(date.getMonth());
|
|
3111
3118
|
}
|
|
3112
|
-
this.renderِDatePicker(this.view);
|
|
3119
|
+
this.renderِDatePicker(this.view());
|
|
3113
3120
|
}
|
|
3114
3121
|
selectDay(event, item) {
|
|
3115
3122
|
event.stopPropagation();
|
|
@@ -3135,14 +3142,14 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3135
3142
|
selectMonth(event, item) {
|
|
3136
3143
|
event.stopPropagation();
|
|
3137
3144
|
if (item.active) {
|
|
3138
|
-
this.currMonth
|
|
3145
|
+
this.currMonth.set(item.month);
|
|
3139
3146
|
this.changeView('day');
|
|
3140
3147
|
}
|
|
3141
3148
|
}
|
|
3142
3149
|
selectYear(event, item) {
|
|
3143
3150
|
event.stopPropagation();
|
|
3144
3151
|
if (item.active) {
|
|
3145
|
-
this.currYear
|
|
3152
|
+
this.currYear.set(item.year);
|
|
3146
3153
|
this.changeView('month');
|
|
3147
3154
|
}
|
|
3148
3155
|
}
|
|
@@ -3176,6 +3183,7 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3176
3183
|
!this.range.end && isDateInPreviewRange(item.date, this.range.start, this.hoverDate);
|
|
3177
3184
|
item.selected = !!item.rangeStart || !!item.rangeEnd;
|
|
3178
3185
|
}
|
|
3186
|
+
this.updateHeader();
|
|
3179
3187
|
}
|
|
3180
3188
|
emitValue() {
|
|
3181
3189
|
const value = { ...this.range };
|
|
@@ -3187,7 +3195,7 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3187
3195
|
event.stopPropagation();
|
|
3188
3196
|
}
|
|
3189
3197
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDateRangePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3190
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NgxDateRangePickerComponent, isStandalone: true, selector: "ngx-date-range-picker", inputs: { localize: { classPropertyName: "localize", publicName: "localize", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: false, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: false, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: false, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal:
|
|
3198
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.4", type: NgxDateRangePickerComponent, isStandalone: true, selector: "ngx-date-range-picker", inputs: { localize: { classPropertyName: "localize", publicName: "localize", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: false, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: false, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: false, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { view: "viewChange", rangeChange: "rangeChange", change: "change" }, providers: [
|
|
3191
3199
|
DateAdapterRegistry,
|
|
3192
3200
|
{
|
|
3193
3201
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -3199,7 +3207,7 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3199
3207
|
useExisting: forwardRef(() => NgxDateRangePickerComponent),
|
|
3200
3208
|
multi: true,
|
|
3201
3209
|
},
|
|
3202
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"wrapper\" (click)=\"stopPagination($event)\">\n <div class=\"header\">\n <div class=\"calendar-icon\" aria-hidden=\"true\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M16 2V6M8 2V6\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n <path\n d=\"M13 4H11C7.22876 4 5.34315 4 4.17157 5.17157C3 6.34315 3 8.22876 3 12V14C3 17.7712 3 19.6569 4.17157 20.8284C5 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 17.7712 21 14V12C21 8.22876 19.8284 5.17157 19.8284 5.17157C4 4 13 4 13 4Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\" />\n <path d=\"M3 10H21\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n </svg>\n </div>\n <div class=\"header-copy\">\n <div class=\"header-title\">Date range</div>\n <div class=\"header-value\">{{ calendarHeader }}</div>\n </div>\n </div>\n\n <div class=\"sub-header\">\n <button type=\"button\" class=\"nav-button\" id=\"prev\" (click)=\"previous()\" aria-label=\"Previous\">\n <ng-template\n [ngTemplateOutlet]=\"\n config.previousButtonTemplate || defaultPreviousBTNTemplate\n \"></ng-template>\n </button>\n\n <button type=\"button\" class=\"current-date\" (click)=\"changeView('month')\">\n <span>{{ displayMonth }}</span>\n <span>{{ currYear }}</span>\n </button>\n\n <button type=\"button\" class=\"nav-button\" id=\"next\" (click)=\"next()\" aria-label=\"Next\">\n <ng-template\n [ngTemplateOutlet]=\"config.nextButtonTemplate || defaultNextBTNTemplate\"></ng-template>\n </button>\n </div>\n\n <div class=\"calendar\">\n @if (view === 'day') {\n <ul class=\"weeks\">\n @for (w of weekDays; track $index) {\n <li [title]=\"w.name\">{{ w.min }}</li>\n }\n </ul>\n\n <ul class=\"days\">\n @for (item of viewDays; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.in-range]=\"item.inRange\"\n [class.in-range-preview]=\"item.inRangePreview\"\n [class.range-start]=\"item.rangeStart\"\n [class.range-end]=\"item.rangeEnd\"\n [class.range-single]=\"item.rangeStart && item.rangeEnd\"\n (mouseenter)=\"onDayEnter(item)\"\n (mouseleave)=\"onDayLeave()\"\n (click)=\"selectDay($event, item)\"\n [attr.aria-selected]=\"\n item.rangeStart || item.rangeEnd || item.inRange || item.inRangePreview\n \">\n <span class=\"day-number\">{{ item.day }}</span>\n </li>\n }\n </ul>\n } @else if (view === 'month') {\n <ul class=\"months\">\n @for (item of viewMonths; track $index; let i = $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectMonth($event, item)\">\n {{ i + 1 }}.{{ item.displayMonth }}\n </li>\n }\n </ul>\n } @else {\n <ul class=\"years\">\n @for (item of viewYears; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectYear($event, item)\">\n {{ item.year }}\n </li>\n }\n </ul>\n }\n\n <div class=\"calendar-footer\">\n @if (config.clearButton) {\n <button type=\"button\" (click)=\"clear()\">{{ localize().clear }}</button>\n }\n @if (config.todayButton) {\n <button type=\"button\" (click)=\"gotoToday()\">{{ localize().today }}</button>\n }\n </div>\n </div>\n</div>\n\n<ng-template #defaultPreviousBTNTemplate>\n <svg width=\"14\" height=\"28\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M224 480c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25l192-192c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l169.4 169.4c12.5 12.5 12.5 32.75 0 45.25C240.4 476.9 232.2 480 224 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultNextBTNTemplate>\n <svg width=\"14\" height=\"28\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M96 480c-8.188 0-16.38-3.125-22.62-9.375L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z\" />\n </svg>\n</ng-template>\n", styles: [":host{--ngx-range-bg: light-dark(#ffffff, #10162b);--ngx-range-text: light-dark(#171717, #f4f4f5);--ngx-range-muted: light-dark(#8a8f98, #72798a);--ngx-range-border: light-dark(#e6e8ee, #272d40);--ngx-range-accent: light-dark(#6544e8, #8d6cff);--ngx-range-accent-soft: light-dark(#eeeaff, #2b2252);--ngx-range-hover: light-dark(#f4f2ff, #211b38)}.wrapper{width:336px;overflow:hidden;border:1px solid var(--ngx-range-border);border-radius:14px;background:var(--ngx-range-bg);color:var(--ngx-range-text);box-shadow:0 18px 55px #0000002e;font-size:13px}.header{display:flex;gap:12px;padding:15px 16px;background:linear-gradient(135deg,#6747e9,#8b64f5);color:#fff}.header .calendar-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#ffffff29}.header .header-copy{min-width:0;flex:1}.header .header-title{opacity:.75;font-size:11px;text-transform:uppercase;letter-spacing:.08em}.header .header-value{margin-top:3px;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sub-header{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--ngx-range-border)}.sub-header button{color:inherit;border:0;background:transparent;cursor:pointer}.sub-header .nav-button{width:36px;height:36px;display:grid;place-items:center;border-radius:9px}.sub-header .nav-button:hover{background:var(--ngx-range-hover)}.sub-header .current-date{display:flex;justify-content:center;gap:6px;font-weight:700;font-size:14px}.calendar{padding:10px 12px 12px}.calendar ul{display:flex;flex-wrap:wrap;list-style:none;padding:0;margin:0}.calendar .weeks li,.calendar .days li{width:14.2857142857%}.calendar .weeks{margin-bottom:4px}.calendar .weeks li{height:30px;display:grid;place-items:center;color:var(--ngx-range-muted);font-size:11px;font-weight:700}.calendar .days li{position:relative;height:40px;display:grid;place-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}.calendar .days li:before{content:\"\";position:absolute;inset:4px 0;background:transparent;z-index:0}.calendar .days li .day-number{position:relative;z-index:2;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;transition:transform .12s ease,background .12s ease}.calendar .days li:not(.de-active):hover .day-number{background:var(--ngx-range-hover)}.calendar .days li.de-active{color:var(--ngx-range-muted);opacity:.45;cursor:default}.calendar .days li.in-range:before,.calendar .days li.in-range-preview:before{background:var(--ngx-range-accent-soft)}.calendar .days li.range-start:before{border-radius:20px 0 0 20px}.calendar .days li.range-end:before{border-radius:0 20px 20px 0}.calendar .days li.range-start.range-end:before{border-radius:20px}.calendar .days li.range-start .day-number,.calendar .days li.range-end .day-number{background:var(--ngx-range-accent);color:#fff;font-weight:700;box-shadow:0 3px 10px #6544e847}.calendar .days li.range-single .day-number{box-shadow:none}.calendar .days li.today:not(.range-start):not(.range-end) .day-number{outline:1.5px solid var(--ngx-range-accent);outline-offset:-1px}.calendar .days li.in-range:not(.range-start):not(.range-end) .day-number{color:var(--ngx-range-text)}.calendar .months li,.calendar .years li{height:46px;width:33.333%;display:grid;place-items:center;border-radius:10px;cursor:pointer}.calendar .months li:hover,.calendar .years li:hover{background:var(--ngx-range-hover)}.calendar .months li.selected,.calendar .years li.selected{background:var(--ngx-range-accent);color:#fff}.calendar .months li.de-active,.calendar .years li.de-active{opacity:.4}.calendar .years li{width:25%}.calendar .calendar-footer{display:flex;justify-content:space-between;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--ngx-range-border)}.calendar .calendar-footer button{min-height:34px;padding:0 13px;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer;font-weight:600}.calendar .calendar-footer button:hover{background:var(--ngx-range-hover)}:host-context([dir=rtl]) .days li.range-start:before{border-radius:0 20px 20px 0}:host-context([dir=rtl]) .days li.range-end:before{border-radius:20px 0 0 20px}:host-context([dir=rtl]) .days li.range-start.range-end:before{border-radius:20px}:host-context([dir=rtl]) #prev,:host-context([dir=rtl]) #next{transform:rotate(180deg)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
3210
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"wrapper\" (click)=\"stopPagination($event)\">\n <div class=\"header\">\n <div class=\"calendar-icon\" aria-hidden=\"true\">\n <svg fill=\"currentColor\" viewBox=\"0 0 448 512\">\n <path\n d=\"M384 272C384 280.8 376.8 288 368 288H208C199.2 288 192 280.8 192 272C192 263.2 199.2 256 208 256H368C376.8 256 384 263.2 384 272zM80 416C71.16 416 64 408.8 64 400C64 391.2 71.16 384 80 384H240C248.8 384 256 391.2 256 400C256 408.8 248.8 416 240 416H80zM160 272C160 298.5 138.5 320 112 320C85.49 320 64 298.5 64 272C64 245.5 85.49 224 112 224C138.5 224 160 245.5 160 272zM96 272C96 280.8 103.2 288 112 288C120.8 288 128 280.8 128 272C128 263.2 120.8 256 112 256C103.2 256 96 263.2 96 272zM288 400C288 373.5 309.5 352 336 352C362.5 352 384 373.5 384 400C384 426.5 362.5 448 336 448C309.5 448 288 426.5 288 400zM352 400C352 391.2 344.8 384 336 384C327.2 384 320 391.2 320 400C320 408.8 327.2 416 336 416C344.8 416 352 408.8 352 400zM112 0C120.8 0 128 7.164 128 16V64H320V16C320 7.164 327.2 0 336 0C344.8 0 352 7.164 352 16V64H384C419.3 64 448 92.65 448 128V448C448 483.3 419.3 512 384 512H64C28.65 512 0 483.3 0 448V128C0 92.65 28.65 64 64 64H96V16C96 7.164 103.2 0 112 0zM416 192H32V448C32 465.7 46.33 480 64 480H384C401.7 480 416 465.7 416 448V192zM384 96H64C46.33 96 32 110.3 32 128V160H416V128C416 110.3 401.7 96 384 96z\" />\n </svg>\n </div>\n <div class=\"header-copy\">\n <div class=\"header-title\">Date range</div>\n <div class=\"header-value\">{{ calendarHeader() }}</div>\n </div>\n </div>\n\n <div class=\"sub-header\">\n <button type=\"button\" class=\"nav-button\" id=\"prev\" (click)=\"previous()\" aria-label=\"Previous\">\n <ng-template\n [ngTemplateOutlet]=\"\n config.previousButtonTemplate || defaultPreviousBTNTemplate\n \"></ng-template>\n </button>\n\n <button type=\"button\" class=\"current-date\" (click)=\"changeView('month')\">\n <span>{{ displayMonth() }}</span>\n <span>{{ currYear() }}</span>\n </button>\n\n <button type=\"button\" class=\"nav-button\" id=\"next\" (click)=\"next()\" aria-label=\"Next\">\n <ng-template\n [ngTemplateOutlet]=\"config.nextButtonTemplate || defaultNextBTNTemplate\"></ng-template>\n </button>\n </div>\n\n <div class=\"calendar\">\n @if (view() === 'day') {\n <ul class=\"weeks\">\n @for (w of weekDays; track $index) {\n <li [title]=\"w.name\">{{ w.min }}</li>\n }\n </ul>\n\n <ul class=\"days\">\n @for (item of viewDays; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.in-range]=\"item.inRange\"\n [class.in-range-preview]=\"item.inRangePreview\"\n [class.range-start]=\"item.rangeStart\"\n [class.range-end]=\"item.rangeEnd\"\n [class.range-single]=\"item.rangeStart && item.rangeEnd\"\n (mouseenter)=\"onDayEnter(item)\"\n (mouseleave)=\"onDayLeave()\"\n (click)=\"selectDay($event, item)\"\n [attr.aria-selected]=\"\n item.rangeStart || item.rangeEnd || item.inRange || item.inRangePreview\n \">\n <span class=\"day-number\">{{ item.day }}</span>\n </li>\n }\n </ul>\n } @else if (view() === 'month') {\n <ul class=\"months\">\n @for (item of viewMonths; track $index; let i = $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectMonth($event, item)\">\n {{ i + 1 }}.{{ item.displayMonth }}\n </li>\n }\n </ul>\n } @else {\n <ul class=\"years\">\n @for (item of viewYears; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectYear($event, item)\">\n {{ item.year }}\n </li>\n }\n </ul>\n }\n\n <div class=\"calendar-footer\">\n @if (config.clearButton) {\n <button type=\"button\" (click)=\"clear()\">{{ localize().clear }}</button>\n }\n @if (config.todayButton) {\n <button type=\"button\" (click)=\"gotoToday()\">{{ localize().today }}</button>\n }\n </div>\n </div>\n</div>\n\n<ng-template #defaultPreviousBTNTemplate>\n <svg width=\"14\" height=\"28\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M224 480c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25l192-192c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l169.4 169.4c12.5 12.5 12.5 32.75 0 45.25C240.4 476.9 232.2 480 224 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultNextBTNTemplate>\n <svg width=\"15px\" height=\"40px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z\" />\n </svg>\n</ng-template>\n", styles: [":host{--ngx-range-bg: light-dark(#ffffff, #10162b);--ngx-range-text: light-dark(#171717, #f4f4f5);--ngx-range-muted: light-dark(#8a8f98, #72798a);--ngx-range-border: light-dark(#e6e8ee, #272d40);--ngx-range-accent: light-dark(#6544e8, #8d6cff);--ngx-range-accent-soft: light-dark(#eeeaff, #2b2252);--ngx-range-hover: light-dark(#f4f2ff, #211b38)}.wrapper{width:336px;overflow:hidden;border:1px solid var(--ngx-range-border);border-radius:14px;background:var(--ngx-range-bg);color:var(--ngx-range-text);box-shadow:0 18px 55px #0000002e;font-size:13px}.header{display:flex;gap:12px;padding:15px 16px;background:linear-gradient(135deg,#6747e9,#8b64f5);color:#fff}.header .calendar-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#ffffff29}.header .header-copy{min-width:0;flex:1}.header .header-title{opacity:.75;font-size:11px;text-transform:uppercase;letter-spacing:.08em}.header .header-value{margin-top:3px;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sub-header{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--ngx-range-border)}.sub-header button{color:inherit;border:0;background:transparent;cursor:pointer}.sub-header .nav-button{width:36px;height:36px;display:grid;place-items:center;border-radius:9px}.sub-header .nav-button:hover{background:var(--ngx-range-hover)}.sub-header .current-date{display:flex;justify-content:center;gap:6px;font-weight:700;font-size:14px}.calendar{padding:10px 12px 12px}.calendar ul{display:flex;flex-wrap:wrap;list-style:none;padding:0;margin:0}.calendar .weeks li,.calendar .days li{width:14.2857142857%}.calendar .weeks{margin-bottom:4px}.calendar .weeks li{height:30px;display:grid;place-items:center;color:var(--ngx-range-muted);font-size:11px;font-weight:700}.calendar .days li{position:relative;height:40px;display:grid;place-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}.calendar .days li:before{content:\"\";position:absolute;inset:4px 0;background:transparent;z-index:0}.calendar .days li .day-number{position:relative;z-index:2;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;transition:transform .12s ease,background .12s ease}.calendar .days li:not(.de-active):hover .day-number{background:var(--ngx-range-hover)}.calendar .days li.de-active{color:var(--ngx-range-muted);opacity:.45;cursor:default}.calendar .days li.in-range:before,.calendar .days li.in-range-preview:before{background:var(--ngx-range-accent-soft)}.calendar .days li.range-start:before{border-radius:20px 0 0 20px}.calendar .days li.range-end:before{border-radius:0 20px 20px 0}.calendar .days li:nth-last-child(1 of.in-range-preview):before{border-radius:0 20px 20px 0}.calendar .days li.range-start.range-end:before{border-radius:20px}.calendar .days li.range-start .day-number,.calendar .days li.range-end .day-number{background:var(--ngx-range-accent);color:#fff;font-weight:700;box-shadow:0 3px 10px #6544e847}.calendar .days li.range-single .day-number{box-shadow:none}.calendar .days li.today:not(.range-start):not(.range-end) .day-number{outline:1.5px solid var(--ngx-range-accent);outline-offset:-1px}.calendar .days li.in-range:not(.range-start):not(.range-end) .day-number{color:var(--ngx-range-text)}.calendar .months li,.calendar .years li{height:46px;width:33.333%;display:grid;place-items:center;border-radius:10px;cursor:pointer}.calendar .months li:hover,.calendar .years li:hover{background:var(--ngx-range-hover)}.calendar .months li.selected,.calendar .years li.selected{background:var(--ngx-range-accent);color:#fff}.calendar .months li.de-active,.calendar .years li.de-active{opacity:.4}.calendar .years li{width:25%}.calendar .calendar-footer{display:flex;justify-content:space-between;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--ngx-range-border)}.calendar .calendar-footer button{min-height:34px;padding:0 13px;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer;font-weight:600}.calendar .calendar-footer button:hover{background:var(--ngx-range-hover)}::ng-deep [dir=rtl] ngx-date-range-picker .days li.range-start:before{border-radius:0 20px 20px 0!important}::ng-deep [dir=rtl] ngx-date-range-picker .days li.range-end:before{border-radius:20px 0 0 20px!important}::ng-deep [dir=rtl] ngx-date-range-picker .days li:nth-last-child(1 of.in-range-preview):before{border-radius:20px 0 0 20px!important}::ng-deep [dir=rtl] ngx-date-range-picker .days li.range-start.range-end:before{border-radius:20px!important}::ng-deep [dir=rtl] ngx-date-range-picker #prev,::ng-deep [dir=rtl] ngx-date-range-picker #next{transform:rotate(180deg)!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
3203
3211
|
}
|
|
3204
3212
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDateRangePickerComponent, decorators: [{
|
|
3205
3213
|
type: Component,
|
|
@@ -3215,16 +3223,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
3215
3223
|
useExisting: forwardRef(() => NgxDateRangePickerComponent),
|
|
3216
3224
|
multi: true,
|
|
3217
3225
|
},
|
|
3218
|
-
], template: "<div class=\"wrapper\" (click)=\"stopPagination($event)\">\n <div class=\"header\">\n <div class=\"calendar-icon\" aria-hidden=\"true\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M16 2V6M8 2V6\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n <path\n d=\"M13 4H11C7.22876 4 5.34315 4 4.17157 5.17157C3 6.34315 3 8.22876 3 12V14C3 17.7712 3 19.6569 4.17157 20.8284C5 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 17.7712 21 14V12C21 8.22876 19.8284 5.17157 19.8284 5.17157C4 4 13 4 13 4Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\" />\n <path d=\"M3 10H21\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n </svg>\n </div>\n <div class=\"header-copy\">\n <div class=\"header-title\">Date range</div>\n <div class=\"header-value\">{{ calendarHeader }}</div>\n </div>\n </div>\n\n <div class=\"sub-header\">\n <button type=\"button\" class=\"nav-button\" id=\"prev\" (click)=\"previous()\" aria-label=\"Previous\">\n <ng-template\n [ngTemplateOutlet]=\"\n config.previousButtonTemplate || defaultPreviousBTNTemplate\n \"></ng-template>\n </button>\n\n <button type=\"button\" class=\"current-date\" (click)=\"changeView('month')\">\n <span>{{ displayMonth }}</span>\n <span>{{ currYear }}</span>\n </button>\n\n <button type=\"button\" class=\"nav-button\" id=\"next\" (click)=\"next()\" aria-label=\"Next\">\n <ng-template\n [ngTemplateOutlet]=\"config.nextButtonTemplate || defaultNextBTNTemplate\"></ng-template>\n </button>\n </div>\n\n <div class=\"calendar\">\n @if (view === 'day') {\n <ul class=\"weeks\">\n @for (w of weekDays; track $index) {\n <li [title]=\"w.name\">{{ w.min }}</li>\n }\n </ul>\n\n <ul class=\"days\">\n @for (item of viewDays; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.in-range]=\"item.inRange\"\n [class.in-range-preview]=\"item.inRangePreview\"\n [class.range-start]=\"item.rangeStart\"\n [class.range-end]=\"item.rangeEnd\"\n [class.range-single]=\"item.rangeStart && item.rangeEnd\"\n (mouseenter)=\"onDayEnter(item)\"\n (mouseleave)=\"onDayLeave()\"\n (click)=\"selectDay($event, item)\"\n [attr.aria-selected]=\"\n item.rangeStart || item.rangeEnd || item.inRange || item.inRangePreview\n \">\n <span class=\"day-number\">{{ item.day }}</span>\n </li>\n }\n </ul>\n } @else if (view === 'month') {\n <ul class=\"months\">\n @for (item of viewMonths; track $index; let i = $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectMonth($event, item)\">\n {{ i + 1 }}.{{ item.displayMonth }}\n </li>\n }\n </ul>\n } @else {\n <ul class=\"years\">\n @for (item of viewYears; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectYear($event, item)\">\n {{ item.year }}\n </li>\n }\n </ul>\n }\n\n <div class=\"calendar-footer\">\n @if (config.clearButton) {\n <button type=\"button\" (click)=\"clear()\">{{ localize().clear }}</button>\n }\n @if (config.todayButton) {\n <button type=\"button\" (click)=\"gotoToday()\">{{ localize().today }}</button>\n }\n </div>\n </div>\n</div>\n\n<ng-template #defaultPreviousBTNTemplate>\n <svg width=\"14\" height=\"28\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M224 480c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25l192-192c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l169.4 169.4c12.5 12.5 12.5 32.75 0 45.25C240.4 476.9 232.2 480 224 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultNextBTNTemplate>\n <svg width=\"14\" height=\"28\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M96 480c-8.188 0-16.38-3.125-22.62-9.375L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z\" />\n </svg>\n</ng-template>\n", styles: [":host{--ngx-range-bg: light-dark(#ffffff, #10162b);--ngx-range-text: light-dark(#171717, #f4f4f5);--ngx-range-muted: light-dark(#8a8f98, #72798a);--ngx-range-border: light-dark(#e6e8ee, #272d40);--ngx-range-accent: light-dark(#6544e8, #8d6cff);--ngx-range-accent-soft: light-dark(#eeeaff, #2b2252);--ngx-range-hover: light-dark(#f4f2ff, #211b38)}.wrapper{width:336px;overflow:hidden;border:1px solid var(--ngx-range-border);border-radius:14px;background:var(--ngx-range-bg);color:var(--ngx-range-text);box-shadow:0 18px 55px #0000002e;font-size:13px}.header{display:flex;gap:12px;padding:15px 16px;background:linear-gradient(135deg,#6747e9,#8b64f5);color:#fff}.header .calendar-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#ffffff29}.header .header-copy{min-width:0;flex:1}.header .header-title{opacity:.75;font-size:11px;text-transform:uppercase;letter-spacing:.08em}.header .header-value{margin-top:3px;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sub-header{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--ngx-range-border)}.sub-header button{color:inherit;border:0;background:transparent;cursor:pointer}.sub-header .nav-button{width:36px;height:36px;display:grid;place-items:center;border-radius:9px}.sub-header .nav-button:hover{background:var(--ngx-range-hover)}.sub-header .current-date{display:flex;justify-content:center;gap:6px;font-weight:700;font-size:14px}.calendar{padding:10px 12px 12px}.calendar ul{display:flex;flex-wrap:wrap;list-style:none;padding:0;margin:0}.calendar .weeks li,.calendar .days li{width:14.2857142857%}.calendar .weeks{margin-bottom:4px}.calendar .weeks li{height:30px;display:grid;place-items:center;color:var(--ngx-range-muted);font-size:11px;font-weight:700}.calendar .days li{position:relative;height:40px;display:grid;place-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}.calendar .days li:before{content:\"\";position:absolute;inset:4px 0;background:transparent;z-index:0}.calendar .days li .day-number{position:relative;z-index:2;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;transition:transform .12s ease,background .12s ease}.calendar .days li:not(.de-active):hover .day-number{background:var(--ngx-range-hover)}.calendar .days li.de-active{color:var(--ngx-range-muted);opacity:.45;cursor:default}.calendar .days li.in-range:before,.calendar .days li.in-range-preview:before{background:var(--ngx-range-accent-soft)}.calendar .days li.range-start:before{border-radius:20px 0 0 20px}.calendar .days li.range-end:before{border-radius:0 20px 20px 0}.calendar .days li.range-start.range-end:before{border-radius:20px}.calendar .days li.range-start .day-number,.calendar .days li.range-end .day-number{background:var(--ngx-range-accent);color:#fff;font-weight:700;box-shadow:0 3px 10px #6544e847}.calendar .days li.range-single .day-number{box-shadow:none}.calendar .days li.today:not(.range-start):not(.range-end) .day-number{outline:1.5px solid var(--ngx-range-accent);outline-offset:-1px}.calendar .days li.in-range:not(.range-start):not(.range-end) .day-number{color:var(--ngx-range-text)}.calendar .months li,.calendar .years li{height:46px;width:33.333%;display:grid;place-items:center;border-radius:10px;cursor:pointer}.calendar .months li:hover,.calendar .years li:hover{background:var(--ngx-range-hover)}.calendar .months li.selected,.calendar .years li.selected{background:var(--ngx-range-accent);color:#fff}.calendar .months li.de-active,.calendar .years li.de-active{opacity:.4}.calendar .years li{width:25%}.calendar .calendar-footer{display:flex;justify-content:space-between;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--ngx-range-border)}.calendar .calendar-footer button{min-height:34px;padding:0 13px;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer;font-weight:600}.calendar .calendar-footer button:hover{background:var(--ngx-range-hover)}:host-context([dir=rtl]) .days li.range-start:before{border-radius:0 20px 20px 0}:host-context([dir=rtl]) .days li.range-end:before{border-radius:20px 0 0 20px}:host-context([dir=rtl]) .days li.range-start.range-end:before{border-radius:20px}:host-context([dir=rtl]) #prev,:host-context([dir=rtl]) #next{transform:rotate(180deg)}\n"] }]
|
|
3226
|
+
], template: "<div class=\"wrapper\" (click)=\"stopPagination($event)\">\n <div class=\"header\">\n <div class=\"calendar-icon\" aria-hidden=\"true\">\n <svg fill=\"currentColor\" viewBox=\"0 0 448 512\">\n <path\n d=\"M384 272C384 280.8 376.8 288 368 288H208C199.2 288 192 280.8 192 272C192 263.2 199.2 256 208 256H368C376.8 256 384 263.2 384 272zM80 416C71.16 416 64 408.8 64 400C64 391.2 71.16 384 80 384H240C248.8 384 256 391.2 256 400C256 408.8 248.8 416 240 416H80zM160 272C160 298.5 138.5 320 112 320C85.49 320 64 298.5 64 272C64 245.5 85.49 224 112 224C138.5 224 160 245.5 160 272zM96 272C96 280.8 103.2 288 112 288C120.8 288 128 280.8 128 272C128 263.2 120.8 256 112 256C103.2 256 96 263.2 96 272zM288 400C288 373.5 309.5 352 336 352C362.5 352 384 373.5 384 400C384 426.5 362.5 448 336 448C309.5 448 288 426.5 288 400zM352 400C352 391.2 344.8 384 336 384C327.2 384 320 391.2 320 400C320 408.8 327.2 416 336 416C344.8 416 352 408.8 352 400zM112 0C120.8 0 128 7.164 128 16V64H320V16C320 7.164 327.2 0 336 0C344.8 0 352 7.164 352 16V64H384C419.3 64 448 92.65 448 128V448C448 483.3 419.3 512 384 512H64C28.65 512 0 483.3 0 448V128C0 92.65 28.65 64 64 64H96V16C96 7.164 103.2 0 112 0zM416 192H32V448C32 465.7 46.33 480 64 480H384C401.7 480 416 465.7 416 448V192zM384 96H64C46.33 96 32 110.3 32 128V160H416V128C416 110.3 401.7 96 384 96z\" />\n </svg>\n </div>\n <div class=\"header-copy\">\n <div class=\"header-title\">Date range</div>\n <div class=\"header-value\">{{ calendarHeader() }}</div>\n </div>\n </div>\n\n <div class=\"sub-header\">\n <button type=\"button\" class=\"nav-button\" id=\"prev\" (click)=\"previous()\" aria-label=\"Previous\">\n <ng-template\n [ngTemplateOutlet]=\"\n config.previousButtonTemplate || defaultPreviousBTNTemplate\n \"></ng-template>\n </button>\n\n <button type=\"button\" class=\"current-date\" (click)=\"changeView('month')\">\n <span>{{ displayMonth() }}</span>\n <span>{{ currYear() }}</span>\n </button>\n\n <button type=\"button\" class=\"nav-button\" id=\"next\" (click)=\"next()\" aria-label=\"Next\">\n <ng-template\n [ngTemplateOutlet]=\"config.nextButtonTemplate || defaultNextBTNTemplate\"></ng-template>\n </button>\n </div>\n\n <div class=\"calendar\">\n @if (view() === 'day') {\n <ul class=\"weeks\">\n @for (w of weekDays; track $index) {\n <li [title]=\"w.name\">{{ w.min }}</li>\n }\n </ul>\n\n <ul class=\"days\">\n @for (item of viewDays; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.in-range]=\"item.inRange\"\n [class.in-range-preview]=\"item.inRangePreview\"\n [class.range-start]=\"item.rangeStart\"\n [class.range-end]=\"item.rangeEnd\"\n [class.range-single]=\"item.rangeStart && item.rangeEnd\"\n (mouseenter)=\"onDayEnter(item)\"\n (mouseleave)=\"onDayLeave()\"\n (click)=\"selectDay($event, item)\"\n [attr.aria-selected]=\"\n item.rangeStart || item.rangeEnd || item.inRange || item.inRangePreview\n \">\n <span class=\"day-number\">{{ item.day }}</span>\n </li>\n }\n </ul>\n } @else if (view() === 'month') {\n <ul class=\"months\">\n @for (item of viewMonths; track $index; let i = $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectMonth($event, item)\">\n {{ i + 1 }}.{{ item.displayMonth }}\n </li>\n }\n </ul>\n } @else {\n <ul class=\"years\">\n @for (item of viewYears; track $index) {\n <li\n [class.de-active]=\"!item.active\"\n [class.today]=\"item.isToday\"\n [class.selected]=\"item.selected\"\n (click)=\"selectYear($event, item)\">\n {{ item.year }}\n </li>\n }\n </ul>\n }\n\n <div class=\"calendar-footer\">\n @if (config.clearButton) {\n <button type=\"button\" (click)=\"clear()\">{{ localize().clear }}</button>\n }\n @if (config.todayButton) {\n <button type=\"button\" (click)=\"gotoToday()\">{{ localize().today }}</button>\n }\n </div>\n </div>\n</div>\n\n<ng-template #defaultPreviousBTNTemplate>\n <svg width=\"14\" height=\"28\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M224 480c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25l192-192c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l169.4 169.4c12.5 12.5 12.5 32.75 0 45.25C240.4 476.9 232.2 480 224 480z\" />\n </svg>\n</ng-template>\n\n<ng-template #defaultNextBTNTemplate>\n <svg width=\"15px\" height=\"40px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\n <path\n fill=\"currentColor\"\n d=\"M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z\" />\n </svg>\n</ng-template>\n", styles: [":host{--ngx-range-bg: light-dark(#ffffff, #10162b);--ngx-range-text: light-dark(#171717, #f4f4f5);--ngx-range-muted: light-dark(#8a8f98, #72798a);--ngx-range-border: light-dark(#e6e8ee, #272d40);--ngx-range-accent: light-dark(#6544e8, #8d6cff);--ngx-range-accent-soft: light-dark(#eeeaff, #2b2252);--ngx-range-hover: light-dark(#f4f2ff, #211b38)}.wrapper{width:336px;overflow:hidden;border:1px solid var(--ngx-range-border);border-radius:14px;background:var(--ngx-range-bg);color:var(--ngx-range-text);box-shadow:0 18px 55px #0000002e;font-size:13px}.header{display:flex;gap:12px;padding:15px 16px;background:linear-gradient(135deg,#6747e9,#8b64f5);color:#fff}.header .calendar-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#ffffff29}.header .header-copy{min-width:0;flex:1}.header .header-title{opacity:.75;font-size:11px;text-transform:uppercase;letter-spacing:.08em}.header .header-value{margin-top:3px;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sub-header{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--ngx-range-border)}.sub-header button{color:inherit;border:0;background:transparent;cursor:pointer}.sub-header .nav-button{width:36px;height:36px;display:grid;place-items:center;border-radius:9px}.sub-header .nav-button:hover{background:var(--ngx-range-hover)}.sub-header .current-date{display:flex;justify-content:center;gap:6px;font-weight:700;font-size:14px}.calendar{padding:10px 12px 12px}.calendar ul{display:flex;flex-wrap:wrap;list-style:none;padding:0;margin:0}.calendar .weeks li,.calendar .days li{width:14.2857142857%}.calendar .weeks{margin-bottom:4px}.calendar .weeks li{height:30px;display:grid;place-items:center;color:var(--ngx-range-muted);font-size:11px;font-weight:700}.calendar .days li{position:relative;height:40px;display:grid;place-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}.calendar .days li:before{content:\"\";position:absolute;inset:4px 0;background:transparent;z-index:0}.calendar .days li .day-number{position:relative;z-index:2;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;transition:transform .12s ease,background .12s ease}.calendar .days li:not(.de-active):hover .day-number{background:var(--ngx-range-hover)}.calendar .days li.de-active{color:var(--ngx-range-muted);opacity:.45;cursor:default}.calendar .days li.in-range:before,.calendar .days li.in-range-preview:before{background:var(--ngx-range-accent-soft)}.calendar .days li.range-start:before{border-radius:20px 0 0 20px}.calendar .days li.range-end:before{border-radius:0 20px 20px 0}.calendar .days li:nth-last-child(1 of.in-range-preview):before{border-radius:0 20px 20px 0}.calendar .days li.range-start.range-end:before{border-radius:20px}.calendar .days li.range-start .day-number,.calendar .days li.range-end .day-number{background:var(--ngx-range-accent);color:#fff;font-weight:700;box-shadow:0 3px 10px #6544e847}.calendar .days li.range-single .day-number{box-shadow:none}.calendar .days li.today:not(.range-start):not(.range-end) .day-number{outline:1.5px solid var(--ngx-range-accent);outline-offset:-1px}.calendar .days li.in-range:not(.range-start):not(.range-end) .day-number{color:var(--ngx-range-text)}.calendar .months li,.calendar .years li{height:46px;width:33.333%;display:grid;place-items:center;border-radius:10px;cursor:pointer}.calendar .months li:hover,.calendar .years li:hover{background:var(--ngx-range-hover)}.calendar .months li.selected,.calendar .years li.selected{background:var(--ngx-range-accent);color:#fff}.calendar .months li.de-active,.calendar .years li.de-active{opacity:.4}.calendar .years li{width:25%}.calendar .calendar-footer{display:flex;justify-content:space-between;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--ngx-range-border)}.calendar .calendar-footer button{min-height:34px;padding:0 13px;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer;font-weight:600}.calendar .calendar-footer button:hover{background:var(--ngx-range-hover)}::ng-deep [dir=rtl] ngx-date-range-picker .days li.range-start:before{border-radius:0 20px 20px 0!important}::ng-deep [dir=rtl] ngx-date-range-picker .days li.range-end:before{border-radius:20px 0 0 20px!important}::ng-deep [dir=rtl] ngx-date-range-picker .days li:nth-last-child(1 of.in-range-preview):before{border-radius:20px 0 0 20px!important}::ng-deep [dir=rtl] ngx-date-range-picker .days li.range-start.range-end:before{border-radius:20px!important}::ng-deep [dir=rtl] ngx-date-range-picker #prev,::ng-deep [dir=rtl] ngx-date-range-picker #next{transform:rotate(180deg)!important}\n"] }]
|
|
3219
3227
|
}], propDecorators: { localize: [{ type: i0.Input, args: [{ isSignal: true, alias: "localize", required: false }] }], locale: [{
|
|
3220
3228
|
type: Input
|
|
3221
3229
|
}], min: [{
|
|
3222
3230
|
type: Input
|
|
3223
3231
|
}], max: [{
|
|
3224
3232
|
type: Input
|
|
3225
|
-
}], view: [{
|
|
3226
|
-
type: Input
|
|
3227
|
-
}], rangeChange: [{
|
|
3233
|
+
}], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }, { type: i0.Output, args: ["viewChange"] }], rangeChange: [{
|
|
3228
3234
|
type: Output
|
|
3229
3235
|
}], change: [{
|
|
3230
3236
|
type: Output
|