ngx-kit 7.3.0 → 7.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngx-kit-data-table.mjs +39 -33
- package/fesm2022/ngx-kit-data-table.mjs.map +1 -1
- package/fesm2022/ngx-kit-date-picker.mjs +129 -129
- package/fesm2022/ngx-kit-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-kit-grid-layout.mjs +5 -4
- package/fesm2022/ngx-kit-grid-layout.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngx-kit-data-table.d.ts +25 -26
- package/types/ngx-kit-date-picker.d.ts +29 -28
- package/types/ngx-kit-grid-layout.d.ts +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
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';
|
|
@@ -641,7 +641,7 @@ class JalaliAdapter {
|
|
|
641
641
|
'اردیبهشت',
|
|
642
642
|
'خرداد',
|
|
643
643
|
'تیر',
|
|
644
|
-
'
|
|
644
|
+
'مردادا',
|
|
645
645
|
'شهریور',
|
|
646
646
|
'مهر',
|
|
647
647
|
'آبان',
|
|
@@ -1487,12 +1487,12 @@ class NgxDatePickerBase {
|
|
|
1487
1487
|
_locale = 'en';
|
|
1488
1488
|
dateAdapterRegistry = inject(DateAdapterRegistry);
|
|
1489
1489
|
adapter = this.dateAdapterRegistry.resolve(this._locale);
|
|
1490
|
-
|
|
1491
|
-
currYear;
|
|
1492
|
-
|
|
1493
|
-
currMonth;
|
|
1494
|
-
|
|
1495
|
-
currentWeek;
|
|
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 */ []));
|
|
1496
1496
|
months = [];
|
|
1497
1497
|
weeks = [];
|
|
1498
1498
|
// Todo: change to signal
|
|
@@ -1500,7 +1500,8 @@ class NgxDatePickerBase {
|
|
|
1500
1500
|
viewMonths = [];
|
|
1501
1501
|
viewYears = [];
|
|
1502
1502
|
viewWeeks = [];
|
|
1503
|
-
displayMonth = ''
|
|
1503
|
+
displayMonth = signal('', /* @ts-ignore */
|
|
1504
|
+
...(ngDevMode ? [{ debugName: "displayMonth" }] : /* istanbul ignore next */ []));
|
|
1504
1505
|
minDate = null;
|
|
1505
1506
|
maxDate = null;
|
|
1506
1507
|
renderCalendar(view, selected, events, callback) {
|
|
@@ -1515,7 +1516,7 @@ class NgxDatePickerBase {
|
|
|
1515
1516
|
this.renderWeek();
|
|
1516
1517
|
break;
|
|
1517
1518
|
}
|
|
1518
|
-
this.displayMonth
|
|
1519
|
+
this.displayMonth.set(this.months[this.currMonth()] ?? '');
|
|
1519
1520
|
if (callback)
|
|
1520
1521
|
callback();
|
|
1521
1522
|
}
|
|
@@ -1531,18 +1532,18 @@ class NgxDatePickerBase {
|
|
|
1531
1532
|
this.renderYear();
|
|
1532
1533
|
break;
|
|
1533
1534
|
}
|
|
1534
|
-
this.displayMonth
|
|
1535
|
+
this.displayMonth.set(this.months[this.currMonth()] ?? '');
|
|
1535
1536
|
if (callback)
|
|
1536
1537
|
callback();
|
|
1537
1538
|
}
|
|
1538
1539
|
renderYear() {
|
|
1539
1540
|
this.viewYears = [];
|
|
1540
|
-
const s = this.currYear - 10;
|
|
1541
|
-
const e = this.currYear + 10;
|
|
1541
|
+
const s = this.currYear() - 10;
|
|
1542
|
+
const e = this.currYear() + 10;
|
|
1542
1543
|
for (let i = s; i < e; i++) {
|
|
1543
1544
|
this.viewYears.push({
|
|
1544
1545
|
year: i,
|
|
1545
|
-
selected: i === this.currYear,
|
|
1546
|
+
selected: i === this.currYear(),
|
|
1546
1547
|
active: this.checkActiveYear(i),
|
|
1547
1548
|
});
|
|
1548
1549
|
}
|
|
@@ -1553,8 +1554,8 @@ class NgxDatePickerBase {
|
|
|
1553
1554
|
this.viewMonths.push({
|
|
1554
1555
|
month: i,
|
|
1555
1556
|
displayMonth: this.months[i],
|
|
1556
|
-
selected: i === this.currMonth,
|
|
1557
|
-
active: this.checkActiveMonth(this.currYear, i),
|
|
1557
|
+
selected: i === this.currMonth(),
|
|
1558
|
+
active: this.checkActiveMonth(this.currYear(), i),
|
|
1558
1559
|
});
|
|
1559
1560
|
}
|
|
1560
1561
|
}
|
|
@@ -1605,16 +1606,16 @@ class NgxDatePickerBase {
|
|
|
1605
1606
|
*/
|
|
1606
1607
|
renderDay(selected, events) {
|
|
1607
1608
|
this.viewDays = [];
|
|
1608
|
-
const firstDayOfMonth = this.adapter.firstDayofMonth(this.currYear, this.currMonth);
|
|
1609
|
-
const lastDateOfMonth = this.adapter.lastDateofMonth(this.currYear, this.currMonth);
|
|
1610
|
-
const lastDayOfMonth = this.adapter.lastDayofMonth(this.currYear, this.currMonth);
|
|
1611
|
-
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());
|
|
1612
1613
|
for (let i = firstDayOfMonth; i > 0; i--) {
|
|
1613
1614
|
const day = lastDateOfLastMonth - i + 1;
|
|
1614
1615
|
const date = this.adapter.getDate({
|
|
1615
1616
|
locale: this._locale,
|
|
1616
|
-
year: this.currYear,
|
|
1617
|
-
month: this.currMonth - 1,
|
|
1617
|
+
year: this.currYear(),
|
|
1618
|
+
month: this.currMonth() - 1,
|
|
1618
1619
|
day,
|
|
1619
1620
|
});
|
|
1620
1621
|
this.viewDays.push({
|
|
@@ -1628,11 +1629,11 @@ class NgxDatePickerBase {
|
|
|
1628
1629
|
}
|
|
1629
1630
|
for (let day = 1; day <= lastDateOfMonth; day++) {
|
|
1630
1631
|
const today = this.adapter.today();
|
|
1631
|
-
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;
|
|
1632
1633
|
const date = this.adapter.getDate({
|
|
1633
1634
|
locale: this._locale,
|
|
1634
|
-
year: this.currYear,
|
|
1635
|
-
month: this.currMonth,
|
|
1635
|
+
year: this.currYear(),
|
|
1636
|
+
month: this.currMonth(),
|
|
1636
1637
|
day,
|
|
1637
1638
|
});
|
|
1638
1639
|
this.viewDays.push({
|
|
@@ -1640,8 +1641,8 @@ class NgxDatePickerBase {
|
|
|
1640
1641
|
active: this.checkActiveDate(date),
|
|
1641
1642
|
isToday,
|
|
1642
1643
|
selected: day === selected?.day &&
|
|
1643
|
-
selected.month === this.currMonth &&
|
|
1644
|
-
selected.year === this.currYear,
|
|
1644
|
+
selected.month === this.currMonth() &&
|
|
1645
|
+
selected.year === this.currYear(),
|
|
1645
1646
|
date,
|
|
1646
1647
|
events: this.getEvents(date, events),
|
|
1647
1648
|
});
|
|
@@ -1650,8 +1651,8 @@ class NgxDatePickerBase {
|
|
|
1650
1651
|
const day = i - lastDayOfMonth + 1;
|
|
1651
1652
|
const date = this.adapter.getDate({
|
|
1652
1653
|
locale: this._locale,
|
|
1653
|
-
year: this.currYear,
|
|
1654
|
-
month: this.currMonth + 1,
|
|
1654
|
+
year: this.currYear(),
|
|
1655
|
+
month: this.currMonth() + 1,
|
|
1655
1656
|
day,
|
|
1656
1657
|
});
|
|
1657
1658
|
this.viewDays.push({
|
|
@@ -1763,10 +1764,12 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1763
1764
|
this.init();
|
|
1764
1765
|
}
|
|
1765
1766
|
}
|
|
1766
|
-
view = 'day'
|
|
1767
|
+
view = model('day', /* @ts-ignore */
|
|
1768
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
1767
1769
|
change = new EventEmitter();
|
|
1768
1770
|
selected;
|
|
1769
|
-
calendarHeader = ''
|
|
1771
|
+
calendarHeader = signal('', /* @ts-ignore */
|
|
1772
|
+
...(ngDevMode ? [{ debugName: "calendarHeader" }] : /* istanbul ignore next */ []));
|
|
1770
1773
|
isDisabled = false;
|
|
1771
1774
|
weekDays = [];
|
|
1772
1775
|
_onChange = (value) => { };
|
|
@@ -1791,9 +1794,9 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1791
1794
|
}
|
|
1792
1795
|
else {
|
|
1793
1796
|
let l = this.adapter.toLocale(this.selected.date);
|
|
1794
|
-
this.currYear
|
|
1795
|
-
this.currMonth
|
|
1796
|
-
this.renderِDatePicker(this.view);
|
|
1797
|
+
this.currYear.set(l.year);
|
|
1798
|
+
this.currMonth.set(l.month ?? 1);
|
|
1799
|
+
this.renderِDatePicker(this.view());
|
|
1797
1800
|
}
|
|
1798
1801
|
}
|
|
1799
1802
|
writeValue(value) {
|
|
@@ -1844,63 +1847,62 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1844
1847
|
renderِDatePicker(view) {
|
|
1845
1848
|
super.renderِDatePicker(view, this.selected, [], () => {
|
|
1846
1849
|
let d = this.selected?.date;
|
|
1847
|
-
this.calendarHeader
|
|
1848
|
-
(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')) ?? '');
|
|
1849
1851
|
});
|
|
1850
1852
|
}
|
|
1851
1853
|
gotoToday() {
|
|
1852
1854
|
let today = this.adapter.today();
|
|
1853
1855
|
this.selected = today;
|
|
1854
|
-
this.currYear
|
|
1855
|
-
this.currMonth
|
|
1856
|
-
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') ?? '');
|
|
1857
1859
|
this.changeView('day');
|
|
1858
1860
|
}
|
|
1859
1861
|
changeView(v) {
|
|
1860
|
-
this.view
|
|
1861
|
-
this.renderِDatePicker(this.view);
|
|
1862
|
+
this.view.set(v);
|
|
1863
|
+
this.renderِDatePicker(this.view());
|
|
1862
1864
|
}
|
|
1863
1865
|
next() {
|
|
1864
|
-
if (this.view === 'year') {
|
|
1865
|
-
this.currYear += 20;
|
|
1866
|
+
if (this.view() === 'year') {
|
|
1867
|
+
this.currYear.update((u) => (u += 20));
|
|
1866
1868
|
}
|
|
1867
|
-
else if (this.view === 'month') {
|
|
1868
|
-
this.currYear
|
|
1869
|
+
else if (this.view() === 'month') {
|
|
1870
|
+
this.currYear.update((u) => u++);
|
|
1869
1871
|
}
|
|
1870
1872
|
else {
|
|
1871
|
-
this.currMonth
|
|
1873
|
+
this.currMonth.update((u) => u++);
|
|
1872
1874
|
}
|
|
1873
|
-
if (this.currMonth < 0 || this.currMonth > 11) {
|
|
1874
|
-
let date = new Date(this.currYear, this.currMonth);
|
|
1875
|
-
this.currYear
|
|
1876
|
-
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());
|
|
1877
1879
|
}
|
|
1878
|
-
this.renderِDatePicker(this.view);
|
|
1880
|
+
this.renderِDatePicker(this.view());
|
|
1879
1881
|
}
|
|
1880
1882
|
previous() {
|
|
1881
|
-
if (this.view === 'year') {
|
|
1882
|
-
this.currYear -= 20;
|
|
1883
|
+
if (this.view() === 'year') {
|
|
1884
|
+
this.currYear.update((u) => (u -= 20));
|
|
1883
1885
|
}
|
|
1884
|
-
else if (this.view === 'month') {
|
|
1885
|
-
this.currYear
|
|
1886
|
+
else if (this.view() === 'month') {
|
|
1887
|
+
this.currYear.update((u) => u--);
|
|
1886
1888
|
}
|
|
1887
1889
|
else {
|
|
1888
|
-
this.currMonth
|
|
1890
|
+
this.currMonth.update((u) => u--);
|
|
1889
1891
|
}
|
|
1890
|
-
if (this.currMonth < 0 || this.currMonth > 11) {
|
|
1891
|
-
let date = new Date(this.currYear, this.currMonth);
|
|
1892
|
-
this.currYear
|
|
1893
|
-
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());
|
|
1894
1896
|
}
|
|
1895
|
-
this.renderِDatePicker(this.view);
|
|
1897
|
+
this.renderِDatePicker(this.view());
|
|
1896
1898
|
}
|
|
1897
1899
|
selectDay(ev, item) {
|
|
1898
1900
|
ev.stopPropagation();
|
|
1899
1901
|
if (item.active) {
|
|
1900
1902
|
this.selected = {
|
|
1901
1903
|
locale: this._locale,
|
|
1902
|
-
year: this.currYear,
|
|
1903
|
-
month: this.currMonth,
|
|
1904
|
+
year: this.currYear(),
|
|
1905
|
+
month: this.currMonth(),
|
|
1904
1906
|
day: item.day,
|
|
1905
1907
|
date: item.date,
|
|
1906
1908
|
};
|
|
@@ -1910,14 +1912,14 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1910
1912
|
selectMonth(ev, item) {
|
|
1911
1913
|
ev.stopPropagation();
|
|
1912
1914
|
if (item.active) {
|
|
1913
|
-
this.currMonth
|
|
1915
|
+
this.currMonth.set(item.month);
|
|
1914
1916
|
this.changeView('day');
|
|
1915
1917
|
}
|
|
1916
1918
|
}
|
|
1917
1919
|
selectYear(ev, item) {
|
|
1918
1920
|
ev.stopPropagation();
|
|
1919
1921
|
if (item.active) {
|
|
1920
|
-
this.currYear
|
|
1922
|
+
this.currYear.set(item.year);
|
|
1921
1923
|
this.changeView('month');
|
|
1922
1924
|
}
|
|
1923
1925
|
}
|
|
@@ -1929,7 +1931,7 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1929
1931
|
ev.stopPropagation();
|
|
1930
1932
|
}
|
|
1931
1933
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxInputDatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1932
|
-
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: [
|
|
1933
1935
|
DateAdapterRegistry,
|
|
1934
1936
|
{
|
|
1935
1937
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1941,7 +1943,7 @@ class NgxInputDatePickerComponent extends NgxDatePickerBase {
|
|
|
1941
1943
|
useExisting: forwardRef(() => NgxInputDatePickerComponent),
|
|
1942
1944
|
multi: true,
|
|
1943
1945
|
},
|
|
1944
|
-
], 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"] }] });
|
|
1945
1947
|
}
|
|
1946
1948
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxInputDatePickerComponent, decorators: [{
|
|
1947
1949
|
type: Component,
|
|
@@ -1957,7 +1959,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
1957
1959
|
useExisting: forwardRef(() => NgxInputDatePickerComponent),
|
|
1958
1960
|
multi: true,
|
|
1959
1961
|
},
|
|
1960
|
-
], 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"] }]
|
|
1961
1963
|
}], ctorParameters: () => [], propDecorators: { localize: [{ type: i0.Input, args: [{ isSignal: true, alias: "localize", required: false }] }], setConfig: [{
|
|
1962
1964
|
type: Input,
|
|
1963
1965
|
args: ['config']
|
|
@@ -1969,9 +1971,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
1969
1971
|
}], setMax: [{
|
|
1970
1972
|
type: Input,
|
|
1971
1973
|
args: ['max']
|
|
1972
|
-
}], view: [{
|
|
1973
|
-
type: Input
|
|
1974
|
-
}], change: [{
|
|
1974
|
+
}], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }, { type: i0.Output, args: ["viewChange"] }], change: [{
|
|
1975
1975
|
type: Output
|
|
1976
1976
|
}] } });
|
|
1977
1977
|
|
|
@@ -1986,8 +1986,9 @@ class NgxInputDatePicker {
|
|
|
1986
1986
|
adapter;
|
|
1987
1987
|
_locale = 'en';
|
|
1988
1988
|
set locale(val) {
|
|
1989
|
-
this._locale = val;
|
|
1989
|
+
this._locale = val || 'en';
|
|
1990
1990
|
this.adapter = this.dateAdapterRegistry.resolve(this._locale);
|
|
1991
|
+
this._formatValue(this.value);
|
|
1991
1992
|
}
|
|
1992
1993
|
_onChange = (value) => { };
|
|
1993
1994
|
_onTouched = () => { };
|
|
@@ -2330,7 +2331,7 @@ class NgxCalendarComponent extends NgxDatePickerBase {
|
|
|
2330
2331
|
this.renderEventView();
|
|
2331
2332
|
break;
|
|
2332
2333
|
}
|
|
2333
|
-
this.displayMonth
|
|
2334
|
+
this.displayMonth.set(this.months[this.currMonth()] ?? '');
|
|
2334
2335
|
queueMicrotask(() => this.calcCellSize());
|
|
2335
2336
|
}
|
|
2336
2337
|
get renderEvents() {
|
|
@@ -2338,8 +2339,8 @@ class NgxCalendarComponent extends NgxDatePickerBase {
|
|
|
2338
2339
|
}
|
|
2339
2340
|
syncAnchorToLocale() {
|
|
2340
2341
|
const localeDate = this.adapter.toLocale(this.anchorDate);
|
|
2341
|
-
this.currYear
|
|
2342
|
-
this.currMonth
|
|
2342
|
+
this.currYear.set(localeDate.year);
|
|
2343
|
+
this.currMonth.set(localeDate.month ?? 0);
|
|
2343
2344
|
this.months = this.adapter.longMonths;
|
|
2344
2345
|
this.weeks = this.adapter.longDays;
|
|
2345
2346
|
}
|
|
@@ -2548,15 +2549,15 @@ class NgxCalendarComponent extends NgxDatePickerBase {
|
|
|
2548
2549
|
renderEventView() {
|
|
2549
2550
|
const monthStart = this.adapter.getDate({
|
|
2550
2551
|
locale: this._locale,
|
|
2551
|
-
year: this.currYear,
|
|
2552
|
-
month: this.currMonth,
|
|
2552
|
+
year: this.currYear(),
|
|
2553
|
+
month: this.currMonth(),
|
|
2553
2554
|
day: 1,
|
|
2554
2555
|
});
|
|
2555
2556
|
const monthEnd = this.adapter.getDate({
|
|
2556
2557
|
locale: this._locale,
|
|
2557
|
-
year: this.currYear,
|
|
2558
|
-
month: this.currMonth,
|
|
2559
|
-
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()),
|
|
2560
2561
|
});
|
|
2561
2562
|
this.eventViewItems = this.renderEventSources()
|
|
2562
2563
|
.map((event) => {
|
|
@@ -2973,7 +2974,7 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
2973
2974
|
if (!sameDate(next, this.minDate)) {
|
|
2974
2975
|
this.minDate = next;
|
|
2975
2976
|
this._validatorOnChange();
|
|
2976
|
-
this.renderِDatePicker(this.view);
|
|
2977
|
+
this.renderِDatePicker(this.view());
|
|
2977
2978
|
}
|
|
2978
2979
|
}
|
|
2979
2980
|
set max(value) {
|
|
@@ -2981,16 +2982,18 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
2981
2982
|
if (!sameDate(next, this.maxDate)) {
|
|
2982
2983
|
this.maxDate = next;
|
|
2983
2984
|
this._validatorOnChange();
|
|
2984
|
-
this.renderِDatePicker(this.view);
|
|
2985
|
+
this.renderِDatePicker(this.view());
|
|
2985
2986
|
}
|
|
2986
2987
|
}
|
|
2987
|
-
view = 'day'
|
|
2988
|
+
view = model('day', /* @ts-ignore */
|
|
2989
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
2988
2990
|
rangeChange = new EventEmitter();
|
|
2989
2991
|
change = new EventEmitter();
|
|
2990
2992
|
range = { start: null, end: null };
|
|
2991
2993
|
hoverDate = null;
|
|
2992
2994
|
weekDays = [];
|
|
2993
|
-
calendarHeader = ''
|
|
2995
|
+
calendarHeader = signal('', /* @ts-ignore */
|
|
2996
|
+
...(ngDevMode ? [{ debugName: "calendarHeader" }] : /* istanbul ignore next */ []));
|
|
2994
2997
|
_onChange = (_value) => { };
|
|
2995
2998
|
_onTouched = () => { };
|
|
2996
2999
|
_validatorOnChange = () => { };
|
|
@@ -3043,19 +3046,17 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3043
3046
|
renderِDatePicker(view) {
|
|
3044
3047
|
super.renderِDatePicker(view, undefined, [], () => {
|
|
3045
3048
|
this.applyRangeState();
|
|
3046
|
-
const start = this.range.start;
|
|
3047
|
-
const end = this.range.end;
|
|
3048
|
-
const startText = start
|
|
3049
|
-
? this.adapter.formatDate(this.adapter.toLocale(start), 'EEEE, d MMMM, yyyy')
|
|
3050
|
-
: '';
|
|
3051
|
-
const endText = end
|
|
3052
|
-
? this.adapter.formatDate(this.adapter.toLocale(end), 'EEEE, d MMMM, yyyy')
|
|
3053
|
-
: '';
|
|
3054
|
-
this.calendarHeader = endText
|
|
3055
|
-
? `${startText} – ${endText}`
|
|
3056
|
-
: startText || 'Select date range';
|
|
3057
3049
|
});
|
|
3058
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
|
+
}
|
|
3059
3060
|
init() {
|
|
3060
3061
|
this.months = this.adapter.longMonths;
|
|
3061
3062
|
const shortDays = this.adapter.shortDays;
|
|
@@ -3063,19 +3064,19 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3063
3064
|
this.weekDays = shortDays.map((min, i) => ({ min, name: longDays[i] }));
|
|
3064
3065
|
const anchor = this.range.end || this.range.start || this.adapter.getDate(this.adapter.today());
|
|
3065
3066
|
const locale = this.adapter.toLocale(anchor);
|
|
3066
|
-
this.currYear
|
|
3067
|
-
this.currMonth
|
|
3068
|
-
this.renderِDatePicker(this.view);
|
|
3067
|
+
this.currYear.set(locale.year);
|
|
3068
|
+
this.currMonth.set(locale.month ?? 0);
|
|
3069
|
+
this.renderِDatePicker(this.view());
|
|
3069
3070
|
}
|
|
3070
3071
|
changeView(view) {
|
|
3071
|
-
this.view
|
|
3072
|
+
this.view.set(view);
|
|
3072
3073
|
this.renderِDatePicker(view);
|
|
3073
3074
|
}
|
|
3074
3075
|
gotoToday() {
|
|
3075
3076
|
const today = this.adapter.today();
|
|
3076
3077
|
const date = today.date ?? this.adapter.getDate(today);
|
|
3077
|
-
this.currYear
|
|
3078
|
-
this.currMonth
|
|
3078
|
+
this.currYear.set(today.year);
|
|
3079
|
+
this.currMonth.set(today.month ?? 0);
|
|
3079
3080
|
// Keep an existing completed range; today is only a navigation shortcut.
|
|
3080
3081
|
if (!this.range.start || this.range.end) {
|
|
3081
3082
|
this.range = { start: date, end: null };
|
|
@@ -3084,38 +3085,38 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3084
3085
|
this.changeView('day');
|
|
3085
3086
|
}
|
|
3086
3087
|
next() {
|
|
3087
|
-
if (this.view === 'year') {
|
|
3088
|
-
this.currYear += 20;
|
|
3088
|
+
if (this.view() === 'year') {
|
|
3089
|
+
this.currYear.update((u) => (u += 20));
|
|
3089
3090
|
}
|
|
3090
|
-
else if (this.view === 'month') {
|
|
3091
|
-
this.currYear
|
|
3091
|
+
else if (this.view() === 'month') {
|
|
3092
|
+
this.currYear.update((u) => u++);
|
|
3092
3093
|
}
|
|
3093
3094
|
else {
|
|
3094
|
-
this.currMonth
|
|
3095
|
+
this.currMonth.update((u) => u++);
|
|
3095
3096
|
}
|
|
3096
|
-
if (this.currMonth < 0 || this.currMonth > 11) {
|
|
3097
|
-
let date = new Date(this.currYear, this.currMonth);
|
|
3098
|
-
this.currYear
|
|
3099
|
-
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());
|
|
3100
3101
|
}
|
|
3101
|
-
this.renderِDatePicker(this.view);
|
|
3102
|
+
this.renderِDatePicker(this.view());
|
|
3102
3103
|
}
|
|
3103
3104
|
previous() {
|
|
3104
|
-
if (this.view === 'year') {
|
|
3105
|
-
this.currYear -= 20;
|
|
3105
|
+
if (this.view() === 'year') {
|
|
3106
|
+
this.currYear.update((u) => (u -= 20));
|
|
3106
3107
|
}
|
|
3107
|
-
else if (this.view === 'month') {
|
|
3108
|
-
this.currYear
|
|
3108
|
+
else if (this.view() === 'month') {
|
|
3109
|
+
this.currYear.update((u) => u--);
|
|
3109
3110
|
}
|
|
3110
3111
|
else {
|
|
3111
|
-
this.currMonth
|
|
3112
|
+
this.currMonth.update((u) => u--);
|
|
3112
3113
|
}
|
|
3113
|
-
if (this.currMonth < 0 || this.currMonth > 11) {
|
|
3114
|
-
let date = new Date(this.currYear, this.currMonth);
|
|
3115
|
-
this.currYear
|
|
3116
|
-
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());
|
|
3117
3118
|
}
|
|
3118
|
-
this.renderِDatePicker(this.view);
|
|
3119
|
+
this.renderِDatePicker(this.view());
|
|
3119
3120
|
}
|
|
3120
3121
|
selectDay(event, item) {
|
|
3121
3122
|
event.stopPropagation();
|
|
@@ -3141,14 +3142,14 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3141
3142
|
selectMonth(event, item) {
|
|
3142
3143
|
event.stopPropagation();
|
|
3143
3144
|
if (item.active) {
|
|
3144
|
-
this.currMonth
|
|
3145
|
+
this.currMonth.set(item.month);
|
|
3145
3146
|
this.changeView('day');
|
|
3146
3147
|
}
|
|
3147
3148
|
}
|
|
3148
3149
|
selectYear(event, item) {
|
|
3149
3150
|
event.stopPropagation();
|
|
3150
3151
|
if (item.active) {
|
|
3151
|
-
this.currYear
|
|
3152
|
+
this.currYear.set(item.year);
|
|
3152
3153
|
this.changeView('month');
|
|
3153
3154
|
}
|
|
3154
3155
|
}
|
|
@@ -3182,6 +3183,7 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3182
3183
|
!this.range.end && isDateInPreviewRange(item.date, this.range.start, this.hoverDate);
|
|
3183
3184
|
item.selected = !!item.rangeStart || !!item.rangeEnd;
|
|
3184
3185
|
}
|
|
3186
|
+
this.updateHeader();
|
|
3185
3187
|
}
|
|
3186
3188
|
emitValue() {
|
|
3187
3189
|
const value = { ...this.range };
|
|
@@ -3193,7 +3195,7 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3193
3195
|
event.stopPropagation();
|
|
3194
3196
|
}
|
|
3195
3197
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDateRangePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3196
|
-
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: [
|
|
3197
3199
|
DateAdapterRegistry,
|
|
3198
3200
|
{
|
|
3199
3201
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -3205,7 +3207,7 @@ class NgxDateRangePickerComponent extends NgxDatePickerBase {
|
|
|
3205
3207
|
useExisting: forwardRef(() => NgxDateRangePickerComponent),
|
|
3206
3208
|
multi: true,
|
|
3207
3209
|
},
|
|
3208
|
-
], 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"] }] });
|
|
3209
3211
|
}
|
|
3210
3212
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NgxDateRangePickerComponent, decorators: [{
|
|
3211
3213
|
type: Component,
|
|
@@ -3221,16 +3223,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
|
|
|
3221
3223
|
useExisting: forwardRef(() => NgxDateRangePickerComponent),
|
|
3222
3224
|
multi: true,
|
|
3223
3225
|
},
|
|
3224
|
-
], 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"] }]
|
|
3225
3227
|
}], propDecorators: { localize: [{ type: i0.Input, args: [{ isSignal: true, alias: "localize", required: false }] }], locale: [{
|
|
3226
3228
|
type: Input
|
|
3227
3229
|
}], min: [{
|
|
3228
3230
|
type: Input
|
|
3229
3231
|
}], max: [{
|
|
3230
3232
|
type: Input
|
|
3231
|
-
}], view: [{
|
|
3232
|
-
type: Input
|
|
3233
|
-
}], rangeChange: [{
|
|
3233
|
+
}], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }, { type: i0.Output, args: ["viewChange"] }], rangeChange: [{
|
|
3234
3234
|
type: Output
|
|
3235
3235
|
}], change: [{
|
|
3236
3236
|
type: Output
|