basesite-shared-grid-lib 21.0.0-beta.3 → 21.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/basesite-shared-grid-lib-21.0.1-beta.1.tgz +0 -0
- package/fesm2022/basesite-shared-grid-lib.mjs +80 -56
- package/fesm2022/basesite-shared-grid-lib.mjs.map +1 -1
- package/package.json +1 -1
- package/types/basesite-shared-grid-lib.d.ts +2 -1
- package/basesite-shared-grid-lib-21.0.0-beta.3.tgz +0 -0
|
Binary file
|
|
@@ -1271,6 +1271,18 @@ class DatepickerComponent {
|
|
|
1271
1271
|
this.isDatepickerOpen = false;
|
|
1272
1272
|
this.lastKnownValue = null;
|
|
1273
1273
|
this.isRestoring = false;
|
|
1274
|
+
const sampleDate = new Date(2000, 0, 2); // Jan 2, 2000
|
|
1275
|
+
let localeDate = sampleDate.toLocaleDateString();
|
|
1276
|
+
// Replace numbers with format tokens
|
|
1277
|
+
localeDate = localeDate
|
|
1278
|
+
.replace('2000', 'yyyy')
|
|
1279
|
+
.replace('00', 'yy')
|
|
1280
|
+
.replace('2', 'dd')
|
|
1281
|
+
.replace('1', 'MM');
|
|
1282
|
+
// Remove any remaining numbers
|
|
1283
|
+
this.dateFormat = localeDate.replace(/\d+/g, '');
|
|
1284
|
+
this.placeholder = this.dateFormat.toLowerCase();
|
|
1285
|
+
this.dateFormat = this.placeholder.replace(/yyyy/g, 'yy');
|
|
1274
1286
|
}
|
|
1275
1287
|
// Date Floating Filter functions
|
|
1276
1288
|
agInit(params) {
|
|
@@ -1576,21 +1588,20 @@ class DatepickerComponent {
|
|
|
1576
1588
|
let displayValue = '';
|
|
1577
1589
|
if (this.selectionMode === 'range' && Array.isArray(this.previousValidValue)) {
|
|
1578
1590
|
if (this.previousValidValue.length === 1) {
|
|
1579
|
-
displayValue = this.
|
|
1591
|
+
displayValue = this.previousValidValue[0].toLocaleDateString();
|
|
1580
1592
|
}
|
|
1581
1593
|
else if (this.previousValidValue.length === 2) {
|
|
1582
|
-
const start = this.
|
|
1583
|
-
const end = this.
|
|
1584
|
-
displayValue = start
|
|
1594
|
+
const start = this.previousValidValue[0].toLocaleDateString();
|
|
1595
|
+
const end = this.previousValidValue[1].toLocaleDateString();
|
|
1596
|
+
displayValue = `${start} - ${end}`;
|
|
1585
1597
|
}
|
|
1586
1598
|
}
|
|
1587
1599
|
else if (this.previousValidValue instanceof Date) {
|
|
1588
|
-
displayValue = this.
|
|
1600
|
+
displayValue = this.previousValidValue.toLocaleDateString();
|
|
1589
1601
|
}
|
|
1590
1602
|
// Aggressive restoration - keep setting the value until it sticks
|
|
1591
1603
|
const restoreInputValue = () => {
|
|
1592
1604
|
input.value = displayValue;
|
|
1593
|
-
this.formatInputDisplay(input);
|
|
1594
1605
|
};
|
|
1595
1606
|
// Initial restoration
|
|
1596
1607
|
restoreInputValue();
|
|
@@ -1638,44 +1649,6 @@ class DatepickerComponent {
|
|
|
1638
1649
|
this.isManualInput = false;
|
|
1639
1650
|
this.preventPrimeNGUpdates = false;
|
|
1640
1651
|
}
|
|
1641
|
-
formatInputDisplay(input) {
|
|
1642
|
-
const value = input.value.replace(/\D/g, '');
|
|
1643
|
-
let formattedValue = '';
|
|
1644
|
-
if (this.selectionMode === 'range') {
|
|
1645
|
-
// Format for range: YYYY-MM-DD YYYY-MM-DD
|
|
1646
|
-
if (value.length <= 4) {
|
|
1647
|
-
formattedValue = value;
|
|
1648
|
-
}
|
|
1649
|
-
else if (value.length <= 6) {
|
|
1650
|
-
formattedValue = value.substring(0, 4) + '-' + value.substring(4);
|
|
1651
|
-
}
|
|
1652
|
-
else if (value.length <= 8) {
|
|
1653
|
-
formattedValue = value.substring(0, 4) + '-' + value.substring(4, 6) + '-' + value.substring(6);
|
|
1654
|
-
}
|
|
1655
|
-
else if (value.length <= 12) {
|
|
1656
|
-
formattedValue = value.substring(0, 4) + '-' + value.substring(4, 6) + '-' + value.substring(6, 8) + ' ' + value.substring(8);
|
|
1657
|
-
}
|
|
1658
|
-
else if (value.length <= 14) {
|
|
1659
|
-
formattedValue = value.substring(0, 4) + '-' + value.substring(4, 6) + '-' + value.substring(6, 8) + ' ' + value.substring(8, 12) + '-' + value.substring(12);
|
|
1660
|
-
}
|
|
1661
|
-
else if (value.length >= 16) {
|
|
1662
|
-
formattedValue = value.substring(0, 4) + '-' + value.substring(4, 6) + '-' + value.substring(6, 8) + ' ' + value.substring(8, 12) + '-' + value.substring(12, 14) + '-' + value.substring(14, 16);
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
else {
|
|
1666
|
-
// Format for single date: YYYY-MM-DD
|
|
1667
|
-
if (value.length <= 4) {
|
|
1668
|
-
formattedValue = value;
|
|
1669
|
-
}
|
|
1670
|
-
else if (value.length <= 6) {
|
|
1671
|
-
formattedValue = value.substring(0, 4) + '-' + value.substring(4);
|
|
1672
|
-
}
|
|
1673
|
-
else if (value.length >= 8) {
|
|
1674
|
-
formattedValue = value.substring(0, 4) + '-' + value.substring(4, 6) + '-' + value.substring(6, 8);
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
input.value = formattedValue;
|
|
1678
|
-
}
|
|
1679
1652
|
onKeyDown(event) {
|
|
1680
1653
|
// Allow: backspace, delete, tab, escape, enter, and navigation keys
|
|
1681
1654
|
if ([8, 9, 27, 13, 46, 37, 38, 39, 40].indexOf(event.keyCode) !== -1 ||
|
|
@@ -1987,7 +1960,7 @@ class DatepickerComponent {
|
|
|
1987
1960
|
useExisting: forwardRef(() => DatepickerComponent),
|
|
1988
1961
|
multi: true
|
|
1989
1962
|
}
|
|
1990
|
-
], viewQueries: [{ propertyName: "datepicker", first: true, predicate: ["datepicker"], descendants: true }], ngImport: i0, template: "<div class=\"lspx-datepicker floating-datepicker\">\r\n <p-datepicker\r\n #datepicker\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onSelect)=\"onDateSelect($event)\"\r\n (onShow)=\"onDatepickerShow()\"\r\n (onHide)=\"onDatepickerHide()\"\r\n [selectionMode]=\"selectionMode\"\r\n [placeholder]=\"placeholder\"\r\n [showIcon]=\"showIcon\"\r\n [iconDisplay]=\"iconDisplay\"\r\n [dateFormat]=\"dateFormat\"\r\n [inline]=\"inline\"\r\n [showButtonBar]=\"showButtonBar\"\r\n [disabled]=\"disabled\"\r\n [appendTo]=\"appendTo\"\r\n [inputId]=\"uniqueId\"\r\n [readonlyInput]=\"false\"\r\n [styleClass]=\"'custom-datepicker ' + datepickerClass\"\r\n [dataType]=\"'date'\"\r\n [keepInvalid]=\"false\"\r\n [showOnFocus]=\"showOnFocus\"\r\n (onTodayClick)=\"onTodayButtonClick()\"\r\n (onClearClick)=\"onClearButtonClick()\"\r\n (onInput)=\"onInputChange($event)\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n >\r\n <ng-template pTemplate=\"date\" let-date>\r\n <div class=\"custom-date-wrapper\" [ngClass]=\"getDateClasses(date)\">\r\n <span class=\"date-content\">{{ date.day }}</span>\r\n </div>\r\n </ng-template>\r\n </p-datepicker>\r\n</div> \r\n", styles: [":host{display:block;width:100%;height:100%}::ng-deep .p-datepicker{--p-datepicker-week-day-color: $calendar-grey !important;height:95%}::ng-deep .p-datepicker .p-inputtext{font-size:14px!important;font-family:Inter!important;padding-inline:5px!important}::ng-deep .p-datepicker-select-month,::ng-deep .p-datepicker-select-year{position:relative;padding-right:20px!important;font-family:Inter!important;font-weight:600!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#000!important}::ng-deep .p-datepicker-select-month:after,::ng-deep .p-datepicker-select-year:after{content:\"\";position:absolute;right:5px;top:50%;transform:translateY(-50%);width:7px;height:4px;background-color:#000;clip-path:path(\"M5.86793 0.15296C5.78334 0.0550203 5.66863 6.90412e-07 5.54902 6.81445e-07C5.42941 6.72477e-07 5.3147 0.0550203 5.23011 0.15296L2.99728 2.73897L0.764445 0.15296C0.679371 0.0577956 0.565428 0.00513775 0.447157 0.00632817C0.328886 0.00751834 0.21575 0.0624614 0.132117 0.159323C0.0484838 0.256186 0.00104464 0.387217 1.70436e-05 0.524196C-0.00101055 0.661174 0.0444554 0.79314 0.126623 0.891671L2.67837 3.84704C2.76295 3.94498 2.87767 4 2.99728 4C3.11689 4 3.2316 3.94498 3.31619 3.84704L5.86793 0.891672C5.95249 0.793702 6 0.660845 6 0.522316C6 0.383787 5.9525 0.25093 5.86793 0.15296Z\");pointer-events:none}::ng-deep .p-datepicker-prev-button,::ng-deep .p-datepicker-next-button,::ng-deep .p-datepicker-next-button:not(:disabled):hover,::ng-deep .p-datepicker-prev-button:not(:disabled):hover{color:#77838f!important;background:transparent!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-view .p-datepicker-weekday-cell .p-datepicker-weekday{color:#77838f!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-view .p-datepicker-weekday-cell{font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#77838f!important;text-align:center!important}::ng-deep .p-datepicker .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-selected{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-selected-range{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-day-selected{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-day-selected-range{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-cell{font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#000!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-disabled{color:#77838f!important}::ng-deep .p-datepicker-day-cell{position:relative}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-start):not(:has(.custom-date-wrapper.range-end)):after{content:\"\";position:absolute;top:50%;right:0;width:50%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-end):not(:has(.custom-date-wrapper.range-start)):after{content:\"\";position:absolute;top:50%;left:0;width:50%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-middle):after{content:\"\";position:absolute;top:50%;left:0;width:100%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-start.range-end):after{display:none}::ng-deep .custom-date-wrapper{width:100%;height:100%;display:flex;align-items:center;justify-content:center;position:relative;z-index:1}::ng-deep .custom-date-wrapper .date-content{z-index:2;position:relative;font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important}::ng-deep .custom-date-wrapper.single-selected .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-start .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-end .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-middle .date-content{color:var(--primary)!important;font-weight:500!important}::ng-deep .p-datepicker-year-selected{background:var(--primary)!important;color:#fff!important}::ng-deep .p-datepicker-year-selected:hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-year:not(.p-disabled):not(.p-datepicker-year-selected):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-month-selected{background:var(--primary)!important;color:#fff!important}::ng-deep .p-datepicker-month-selected:hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-month:not(.p-disabled):not(.p-datepicker-month-selected):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-today-button,::ng-deep .p-datepicker-clear-button{background:var(--primary)!important;color:#fff!important;border:none!important}::ng-deep .p-datepicker-today-button:not(:disabled):hover,::ng-deep .p-datepicker-clear-button:not(:disabled):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}.floating-datepicker{display:block;width:100%!important}.floating-datepicker .p-datepicker{width:100%!important}.floating-datepicker .p-inputwrapper{width:100%!important;display:flex!important;align-items:stretch;min-width:0;position:relative}.floating-datepicker .p-inputtext{height:25px!important;font-size:12px!important;padding:2px 22px 2px 4px!important;border:1px solid #BEBEBE!important;border-radius:5px!important;width:100%!important;min-width:0}.floating-datepicker .p-datepicker-input-icon-container{position:absolute!important;top:80%;transform:translate(-50%,-50%);display:flex!important;align-items:center;justify-content:center;cursor:pointer;pointer-events:auto!important;z-index:2;right:0}.floating-datepicker .p-datepicker-input-icon{display:flex!important;visibility:visible!important;opacity:1!important;width:14px;height:14px;color:#6b7280;cursor:pointer;align-items:center;justify-content:center}::ng-deep .custom-datepicker .p-inputtext{border-radius:var(--p-inputtext-border-radius);height:25px!important;font-size:12px!important;padding:2px 22px 2px 4px!important;border:1px solid #BEBEBE!important;width:100%!important;min-width:0}::ng-deep .custom-datepicker .p-datepicker-input-icon-container{position:absolute!important;top:80%;transform:translate(-50%,-50%);display:flex!important;align-items:center;justify-content:center;cursor:pointer;pointer-events:auto!important;z-index:2;right:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
1963
|
+
], viewQueries: [{ propertyName: "datepicker", first: true, predicate: ["datepicker"], descendants: true }], ngImport: i0, template: "<div class=\"lspx-datepicker floating-datepicker\">\r\n <p-datepicker\r\n #datepicker\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onSelect)=\"onDateSelect($event)\"\r\n (onShow)=\"onDatepickerShow()\"\r\n (onHide)=\"onDatepickerHide()\"\r\n [selectionMode]=\"selectionMode\"\r\n [placeholder]=\"placeholder\"\r\n [showIcon]=\"showIcon\"\r\n [iconDisplay]=\"iconDisplay\"\r\n [dateFormat]=\"dateFormat\"\r\n [inline]=\"inline\"\r\n [showButtonBar]=\"showButtonBar\"\r\n [disabled]=\"disabled\"\r\n [appendTo]=\"appendTo\"\r\n [inputId]=\"uniqueId\"\r\n [readonlyInput]=\"false\"\r\n [styleClass]=\"'custom-datepicker ' + datepickerClass\"\r\n [dataType]=\"'date'\"\r\n [keepInvalid]=\"false\"\r\n [showOnFocus]=\"showOnFocus\"\r\n (onTodayClick)=\"onTodayButtonClick()\"\r\n (onClearClick)=\"onClearButtonClick()\"\r\n (onInput)=\"onInputChange($event)\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n >\r\n <ng-template pTemplate=\"date\" let-date>\r\n <div class=\"custom-date-wrapper\" [ngClass]=\"getDateClasses(date)\">\r\n <span class=\"date-content\">{{ date.day }}</span>\r\n </div>\r\n </ng-template>\r\n </p-datepicker>\r\n</div> \r\n", styles: [":host{display:block;width:100%;height:100%}::ng-deep .p-datepicker{--p-datepicker-week-day-color: $calendar-grey !important;height:95%}::ng-deep .p-datepicker .p-inputtext{font-size:14px!important;font-family:Inter!important;padding-inline:5px!important}::ng-deep .p-datepicker-select-month,::ng-deep .p-datepicker-select-year{position:relative;padding-right:20px!important;font-family:Inter!important;font-weight:600!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#000!important}::ng-deep .p-datepicker-select-month:after,::ng-deep .p-datepicker-select-year:after{content:\"\";position:absolute;right:5px;top:50%;transform:translateY(-50%);width:7px;height:4px;background-color:#000;clip-path:path(\"M5.86793 0.15296C5.78334 0.0550203 5.66863 6.90412e-07 5.54902 6.81445e-07C5.42941 6.72477e-07 5.3147 0.0550203 5.23011 0.15296L2.99728 2.73897L0.764445 0.15296C0.679371 0.0577956 0.565428 0.00513775 0.447157 0.00632817C0.328886 0.00751834 0.21575 0.0624614 0.132117 0.159323C0.0484838 0.256186 0.00104464 0.387217 1.70436e-05 0.524196C-0.00101055 0.661174 0.0444554 0.79314 0.126623 0.891671L2.67837 3.84704C2.76295 3.94498 2.87767 4 2.99728 4C3.11689 4 3.2316 3.94498 3.31619 3.84704L5.86793 0.891672C5.95249 0.793702 6 0.660845 6 0.522316C6 0.383787 5.9525 0.25093 5.86793 0.15296Z\");pointer-events:none}::ng-deep .p-datepicker-prev-button,::ng-deep .p-datepicker-next-button,::ng-deep .p-datepicker-next-button:not(:disabled):hover,::ng-deep .p-datepicker-prev-button:not(:disabled):hover{color:#77838f!important;background:transparent!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-view .p-datepicker-weekday-cell .p-datepicker-weekday{color:#77838f!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-view .p-datepicker-weekday-cell{font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#77838f!important;text-align:center!important}::ng-deep .p-datepicker .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-selected{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-selected-range{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-day-selected{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-day-selected-range{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-cell{font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#000!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-disabled{color:#77838f!important}::ng-deep .p-datepicker-day-cell{position:relative}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-start):not(:has(.custom-date-wrapper.range-end)):after{content:\"\";position:absolute;top:50%;right:0;width:50%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-end):not(:has(.custom-date-wrapper.range-start)):after{content:\"\";position:absolute;top:50%;left:0;width:50%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-middle):after{content:\"\";position:absolute;top:50%;left:0;width:100%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-start.range-end):after{display:none}::ng-deep .custom-date-wrapper{width:100%;height:100%;display:flex;align-items:center;justify-content:center;position:relative;z-index:1}::ng-deep .custom-date-wrapper .date-content{z-index:2;position:relative;font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important}::ng-deep .custom-date-wrapper.single-selected .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-start .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-end .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-middle .date-content{color:var(--primary)!important;font-weight:500!important}::ng-deep .p-datepicker-year-selected{background:var(--primary)!important;color:#fff!important}::ng-deep .p-datepicker-year-selected:hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-year:not(.p-disabled):not(.p-datepicker-year-selected):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-month-selected{background:var(--primary)!important;color:#fff!important}::ng-deep .p-datepicker-month-selected:hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-month:not(.p-disabled):not(.p-datepicker-month-selected):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-today-button,::ng-deep .p-datepicker-clear-button{background:var(--primary)!important;color:#fff!important;border:none!important}::ng-deep .p-datepicker-today-button:not(:disabled):hover,::ng-deep .p-datepicker-clear-button:not(:disabled):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}.floating-datepicker{display:block;width:100%!important}.floating-datepicker .p-inputtext{height:25px!important;font-size:12px!important;padding:2px 4px!important;border:1px solid #BEBEBE!important;border-right:0!important;border-radius:5px 0 0 5px!important}.floating-datepicker .p-datepicker-dropdown{width:20px!important;background-color:#fff!important;border:1px solid #BEBEBE!important;border-left:0!important}.floating-datepicker .p-datepicker{width:100%!important}.floating-datepicker .p-inputwrapper{width:100%!important;display:flex!important;align-items:stretch;min-width:0;position:relative}.floating-datepicker .p-inputtext{height:25px!important;font-size:12px!important;padding:2px 22px 2px 4px!important;border:1px solid #BEBEBE!important;border-radius:5px!important;width:100%!important;min-width:0}.floating-datepicker .p-datepicker-input-icon-container{position:absolute!important;top:80%;transform:translate(-50%,-50%);display:flex!important;align-items:center;justify-content:center;cursor:pointer;pointer-events:auto!important;z-index:2;right:0}.floating-datepicker .p-datepicker-input-icon{display:flex!important;visibility:visible!important;opacity:1!important;width:14px;height:14px;color:#6b7280;cursor:pointer;align-items:center;justify-content:center}::ng-deep .custom-datepicker .p-inputtext{border-radius:var(--p-inputtext-border-radius);height:25px!important;font-size:12px!important;padding:2px 22px 2px 4px!important;border:1px solid #BEBEBE!important;width:100%!important;min-width:0}::ng-deep .custom-datepicker .p-datepicker-input-icon-container{position:absolute!important;top:80%;transform:translate(-50%,-50%);display:flex!important;align-items:center;justify-content:center;cursor:pointer;pointer-events:auto!important;z-index:2;right:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
1991
1964
|
}
|
|
1992
1965
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DatepickerComponent, decorators: [{
|
|
1993
1966
|
type: Component,
|
|
@@ -1997,8 +1970,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1997
1970
|
useExisting: forwardRef(() => DatepickerComponent),
|
|
1998
1971
|
multi: true
|
|
1999
1972
|
}
|
|
2000
|
-
], template: "<div class=\"lspx-datepicker floating-datepicker\">\r\n <p-datepicker\r\n #datepicker\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onSelect)=\"onDateSelect($event)\"\r\n (onShow)=\"onDatepickerShow()\"\r\n (onHide)=\"onDatepickerHide()\"\r\n [selectionMode]=\"selectionMode\"\r\n [placeholder]=\"placeholder\"\r\n [showIcon]=\"showIcon\"\r\n [iconDisplay]=\"iconDisplay\"\r\n [dateFormat]=\"dateFormat\"\r\n [inline]=\"inline\"\r\n [showButtonBar]=\"showButtonBar\"\r\n [disabled]=\"disabled\"\r\n [appendTo]=\"appendTo\"\r\n [inputId]=\"uniqueId\"\r\n [readonlyInput]=\"false\"\r\n [styleClass]=\"'custom-datepicker ' + datepickerClass\"\r\n [dataType]=\"'date'\"\r\n [keepInvalid]=\"false\"\r\n [showOnFocus]=\"showOnFocus\"\r\n (onTodayClick)=\"onTodayButtonClick()\"\r\n (onClearClick)=\"onClearButtonClick()\"\r\n (onInput)=\"onInputChange($event)\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n >\r\n <ng-template pTemplate=\"date\" let-date>\r\n <div class=\"custom-date-wrapper\" [ngClass]=\"getDateClasses(date)\">\r\n <span class=\"date-content\">{{ date.day }}</span>\r\n </div>\r\n </ng-template>\r\n </p-datepicker>\r\n</div> \r\n", styles: [":host{display:block;width:100%;height:100%}::ng-deep .p-datepicker{--p-datepicker-week-day-color: $calendar-grey !important;height:95%}::ng-deep .p-datepicker .p-inputtext{font-size:14px!important;font-family:Inter!important;padding-inline:5px!important}::ng-deep .p-datepicker-select-month,::ng-deep .p-datepicker-select-year{position:relative;padding-right:20px!important;font-family:Inter!important;font-weight:600!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#000!important}::ng-deep .p-datepicker-select-month:after,::ng-deep .p-datepicker-select-year:after{content:\"\";position:absolute;right:5px;top:50%;transform:translateY(-50%);width:7px;height:4px;background-color:#000;clip-path:path(\"M5.86793 0.15296C5.78334 0.0550203 5.66863 6.90412e-07 5.54902 6.81445e-07C5.42941 6.72477e-07 5.3147 0.0550203 5.23011 0.15296L2.99728 2.73897L0.764445 0.15296C0.679371 0.0577956 0.565428 0.00513775 0.447157 0.00632817C0.328886 0.00751834 0.21575 0.0624614 0.132117 0.159323C0.0484838 0.256186 0.00104464 0.387217 1.70436e-05 0.524196C-0.00101055 0.661174 0.0444554 0.79314 0.126623 0.891671L2.67837 3.84704C2.76295 3.94498 2.87767 4 2.99728 4C3.11689 4 3.2316 3.94498 3.31619 3.84704L5.86793 0.891672C5.95249 0.793702 6 0.660845 6 0.522316C6 0.383787 5.9525 0.25093 5.86793 0.15296Z\");pointer-events:none}::ng-deep .p-datepicker-prev-button,::ng-deep .p-datepicker-next-button,::ng-deep .p-datepicker-next-button:not(:disabled):hover,::ng-deep .p-datepicker-prev-button:not(:disabled):hover{color:#77838f!important;background:transparent!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-view .p-datepicker-weekday-cell .p-datepicker-weekday{color:#77838f!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-view .p-datepicker-weekday-cell{font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#77838f!important;text-align:center!important}::ng-deep .p-datepicker .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-selected{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-selected-range{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-day-selected{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-day-selected-range{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-cell{font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#000!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-disabled{color:#77838f!important}::ng-deep .p-datepicker-day-cell{position:relative}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-start):not(:has(.custom-date-wrapper.range-end)):after{content:\"\";position:absolute;top:50%;right:0;width:50%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-end):not(:has(.custom-date-wrapper.range-start)):after{content:\"\";position:absolute;top:50%;left:0;width:50%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-middle):after{content:\"\";position:absolute;top:50%;left:0;width:100%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-start.range-end):after{display:none}::ng-deep .custom-date-wrapper{width:100%;height:100%;display:flex;align-items:center;justify-content:center;position:relative;z-index:1}::ng-deep .custom-date-wrapper .date-content{z-index:2;position:relative;font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important}::ng-deep .custom-date-wrapper.single-selected .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-start .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-end .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-middle .date-content{color:var(--primary)!important;font-weight:500!important}::ng-deep .p-datepicker-year-selected{background:var(--primary)!important;color:#fff!important}::ng-deep .p-datepicker-year-selected:hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-year:not(.p-disabled):not(.p-datepicker-year-selected):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-month-selected{background:var(--primary)!important;color:#fff!important}::ng-deep .p-datepicker-month-selected:hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-month:not(.p-disabled):not(.p-datepicker-month-selected):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-today-button,::ng-deep .p-datepicker-clear-button{background:var(--primary)!important;color:#fff!important;border:none!important}::ng-deep .p-datepicker-today-button:not(:disabled):hover,::ng-deep .p-datepicker-clear-button:not(:disabled):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}.floating-datepicker{display:block;width:100%!important}.floating-datepicker .p-datepicker{width:100%!important}.floating-datepicker .p-inputwrapper{width:100%!important;display:flex!important;align-items:stretch;min-width:0;position:relative}.floating-datepicker .p-inputtext{height:25px!important;font-size:12px!important;padding:2px 22px 2px 4px!important;border:1px solid #BEBEBE!important;border-radius:5px!important;width:100%!important;min-width:0}.floating-datepicker .p-datepicker-input-icon-container{position:absolute!important;top:80%;transform:translate(-50%,-50%);display:flex!important;align-items:center;justify-content:center;cursor:pointer;pointer-events:auto!important;z-index:2;right:0}.floating-datepicker .p-datepicker-input-icon{display:flex!important;visibility:visible!important;opacity:1!important;width:14px;height:14px;color:#6b7280;cursor:pointer;align-items:center;justify-content:center}::ng-deep .custom-datepicker .p-inputtext{border-radius:var(--p-inputtext-border-radius);height:25px!important;font-size:12px!important;padding:2px 22px 2px 4px!important;border:1px solid #BEBEBE!important;width:100%!important;min-width:0}::ng-deep .custom-datepicker .p-datepicker-input-icon-container{position:absolute!important;top:80%;transform:translate(-50%,-50%);display:flex!important;align-items:center;justify-content:center;cursor:pointer;pointer-events:auto!important;z-index:2;right:0}\n"] }]
|
|
2001
|
-
}], propDecorators: { disabled: [{
|
|
1973
|
+
], template: "<div class=\"lspx-datepicker floating-datepicker\">\r\n <p-datepicker\r\n #datepicker\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onSelect)=\"onDateSelect($event)\"\r\n (onShow)=\"onDatepickerShow()\"\r\n (onHide)=\"onDatepickerHide()\"\r\n [selectionMode]=\"selectionMode\"\r\n [placeholder]=\"placeholder\"\r\n [showIcon]=\"showIcon\"\r\n [iconDisplay]=\"iconDisplay\"\r\n [dateFormat]=\"dateFormat\"\r\n [inline]=\"inline\"\r\n [showButtonBar]=\"showButtonBar\"\r\n [disabled]=\"disabled\"\r\n [appendTo]=\"appendTo\"\r\n [inputId]=\"uniqueId\"\r\n [readonlyInput]=\"false\"\r\n [styleClass]=\"'custom-datepicker ' + datepickerClass\"\r\n [dataType]=\"'date'\"\r\n [keepInvalid]=\"false\"\r\n [showOnFocus]=\"showOnFocus\"\r\n (onTodayClick)=\"onTodayButtonClick()\"\r\n (onClearClick)=\"onClearButtonClick()\"\r\n (onInput)=\"onInputChange($event)\"\r\n (onBlur)=\"onInputBlur($event)\"\r\n >\r\n <ng-template pTemplate=\"date\" let-date>\r\n <div class=\"custom-date-wrapper\" [ngClass]=\"getDateClasses(date)\">\r\n <span class=\"date-content\">{{ date.day }}</span>\r\n </div>\r\n </ng-template>\r\n </p-datepicker>\r\n</div> \r\n", styles: [":host{display:block;width:100%;height:100%}::ng-deep .p-datepicker{--p-datepicker-week-day-color: $calendar-grey !important;height:95%}::ng-deep .p-datepicker .p-inputtext{font-size:14px!important;font-family:Inter!important;padding-inline:5px!important}::ng-deep .p-datepicker-select-month,::ng-deep .p-datepicker-select-year{position:relative;padding-right:20px!important;font-family:Inter!important;font-weight:600!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#000!important}::ng-deep .p-datepicker-select-month:after,::ng-deep .p-datepicker-select-year:after{content:\"\";position:absolute;right:5px;top:50%;transform:translateY(-50%);width:7px;height:4px;background-color:#000;clip-path:path(\"M5.86793 0.15296C5.78334 0.0550203 5.66863 6.90412e-07 5.54902 6.81445e-07C5.42941 6.72477e-07 5.3147 0.0550203 5.23011 0.15296L2.99728 2.73897L0.764445 0.15296C0.679371 0.0577956 0.565428 0.00513775 0.447157 0.00632817C0.328886 0.00751834 0.21575 0.0624614 0.132117 0.159323C0.0484838 0.256186 0.00104464 0.387217 1.70436e-05 0.524196C-0.00101055 0.661174 0.0444554 0.79314 0.126623 0.891671L2.67837 3.84704C2.76295 3.94498 2.87767 4 2.99728 4C3.11689 4 3.2316 3.94498 3.31619 3.84704L5.86793 0.891672C5.95249 0.793702 6 0.660845 6 0.522316C6 0.383787 5.9525 0.25093 5.86793 0.15296Z\");pointer-events:none}::ng-deep .p-datepicker-prev-button,::ng-deep .p-datepicker-next-button,::ng-deep .p-datepicker-next-button:not(:disabled):hover,::ng-deep .p-datepicker-prev-button:not(:disabled):hover{color:#77838f!important;background:transparent!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-view .p-datepicker-weekday-cell .p-datepicker-weekday{color:#77838f!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-view .p-datepicker-weekday-cell{font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#77838f!important;text-align:center!important}::ng-deep .p-datepicker .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-selected{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-selected-range{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-day-selected{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-day-selected-range{background:transparent!important;color:inherit!important;border:none!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-cell{font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important;color:#000!important}::ng-deep .p-datepicker-calendar .p-datepicker-day-cell .p-datepicker-day.p-datepicker-day-disabled{color:#77838f!important}::ng-deep .p-datepicker-day-cell{position:relative}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-start):not(:has(.custom-date-wrapper.range-end)):after{content:\"\";position:absolute;top:50%;right:0;width:50%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-end):not(:has(.custom-date-wrapper.range-start)):after{content:\"\";position:absolute;top:50%;left:0;width:50%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-middle):after{content:\"\";position:absolute;top:50%;left:0;width:100%;height:32px;transform:translateY(-50%);background:rgba(var(--primary),.12)!important;z-index:0}::ng-deep .p-datepicker-day-cell:has(.custom-date-wrapper.range-start.range-end):after{display:none}::ng-deep .custom-date-wrapper{width:100%;height:100%;display:flex;align-items:center;justify-content:center;position:relative;z-index:1}::ng-deep .custom-date-wrapper .date-content{z-index:2;position:relative;font-family:Inter!important;font-weight:500!important;font-size:12px!important;line-height:100%!important;letter-spacing:0px!important}::ng-deep .custom-date-wrapper.single-selected .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-start .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-end .date-content{background:var(--primary)!important;color:#fff!important;font-weight:500!important;border-radius:50%!important;width:32px;height:32px;display:flex;align-items:center;justify-content:center}::ng-deep .custom-date-wrapper.range-middle .date-content{color:var(--primary)!important;font-weight:500!important}::ng-deep .p-datepicker-year-selected{background:var(--primary)!important;color:#fff!important}::ng-deep .p-datepicker-year-selected:hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-year:not(.p-disabled):not(.p-datepicker-year-selected):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-month-selected{background:var(--primary)!important;color:#fff!important}::ng-deep .p-datepicker-month-selected:hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-month:not(.p-disabled):not(.p-datepicker-month-selected):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}::ng-deep .p-datepicker-today-button,::ng-deep .p-datepicker-clear-button{background:var(--primary)!important;color:#fff!important;border:none!important}::ng-deep .p-datepicker-today-button:not(:disabled):hover,::ng-deep .p-datepicker-clear-button:not(:disabled):hover{background:rgba(var(--primary),.12)!important;color:var(--primary)!important}.floating-datepicker{display:block;width:100%!important}.floating-datepicker .p-inputtext{height:25px!important;font-size:12px!important;padding:2px 4px!important;border:1px solid #BEBEBE!important;border-right:0!important;border-radius:5px 0 0 5px!important}.floating-datepicker .p-datepicker-dropdown{width:20px!important;background-color:#fff!important;border:1px solid #BEBEBE!important;border-left:0!important}.floating-datepicker .p-datepicker{width:100%!important}.floating-datepicker .p-inputwrapper{width:100%!important;display:flex!important;align-items:stretch;min-width:0;position:relative}.floating-datepicker .p-inputtext{height:25px!important;font-size:12px!important;padding:2px 22px 2px 4px!important;border:1px solid #BEBEBE!important;border-radius:5px!important;width:100%!important;min-width:0}.floating-datepicker .p-datepicker-input-icon-container{position:absolute!important;top:80%;transform:translate(-50%,-50%);display:flex!important;align-items:center;justify-content:center;cursor:pointer;pointer-events:auto!important;z-index:2;right:0}.floating-datepicker .p-datepicker-input-icon{display:flex!important;visibility:visible!important;opacity:1!important;width:14px;height:14px;color:#6b7280;cursor:pointer;align-items:center;justify-content:center}::ng-deep .custom-datepicker .p-inputtext{border-radius:var(--p-inputtext-border-radius);height:25px!important;font-size:12px!important;padding:2px 22px 2px 4px!important;border:1px solid #BEBEBE!important;width:100%!important;min-width:0}::ng-deep .custom-datepicker .p-datepicker-input-icon-container{position:absolute!important;top:80%;transform:translate(-50%,-50%);display:flex!important;align-items:center;justify-content:center;cursor:pointer;pointer-events:auto!important;z-index:2;right:0}\n"] }]
|
|
1974
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{
|
|
2002
1975
|
type: Input
|
|
2003
1976
|
}], selectionMode: [{
|
|
2004
1977
|
type: Input
|
|
@@ -2034,28 +2007,35 @@ class ColumnValueFormatter {
|
|
|
2034
2007
|
return '';
|
|
2035
2008
|
let hasTime = false;
|
|
2036
2009
|
if (typeof dateString === 'string') {
|
|
2037
|
-
// excludes time when there is none or it's 00:00:00
|
|
2038
2010
|
const match = /T(\d{2}):(\d{2}):(\d{2})/.exec(dateString);
|
|
2039
2011
|
hasTime = !!(match && (match[1] !== '00' || match[2] !== '00' || match[3] !== '00'));
|
|
2040
2012
|
}
|
|
2041
2013
|
else if (dateString instanceof Date) {
|
|
2042
2014
|
hasTime = true;
|
|
2043
2015
|
}
|
|
2044
|
-
|
|
2045
|
-
if (
|
|
2046
|
-
|
|
2016
|
+
let date;
|
|
2017
|
+
if (hasTime) {
|
|
2018
|
+
date = moment.utc(dateString).toDate();
|
|
2019
|
+
return format ? moment(date).format(format) : date.toLocaleString(undefined, {
|
|
2020
|
+
year: 'numeric',
|
|
2021
|
+
month: '2-digit',
|
|
2022
|
+
day: '2-digit',
|
|
2023
|
+
hour: '2-digit',
|
|
2024
|
+
minute: '2-digit'
|
|
2025
|
+
});
|
|
2047
2026
|
}
|
|
2048
|
-
|
|
2049
|
-
|
|
2027
|
+
else {
|
|
2028
|
+
// Parse as local date, not UTC
|
|
2029
|
+
date = moment(dateString, 'YYYY-MM-DD').toDate();
|
|
2030
|
+
return format ? moment(date).format(format) : date.toLocaleDateString();
|
|
2050
2031
|
}
|
|
2051
|
-
return date.toLocaleString();
|
|
2052
2032
|
}
|
|
2053
2033
|
colValueFormatter(params, colType) {
|
|
2054
2034
|
if (isNaN(+params.value)) {
|
|
2055
2035
|
var dateWrapper = new Date(params.value);
|
|
2056
2036
|
let isValidDate = !isNaN(dateWrapper.getDate());
|
|
2057
2037
|
if (isValidDate && colType == 'date') {
|
|
2058
|
-
return this.
|
|
2038
|
+
return this.toLocal(params.value);
|
|
2059
2039
|
}
|
|
2060
2040
|
else {
|
|
2061
2041
|
return params.value;
|
|
@@ -2535,6 +2515,14 @@ class GridLibraryComponent {
|
|
|
2535
2515
|
return false;
|
|
2536
2516
|
}
|
|
2537
2517
|
setExternalFilters(options) {
|
|
2518
|
+
if (options.includes('$filter=')) {
|
|
2519
|
+
const filterMatch = options.match(/\$filter=([^&]*)/);
|
|
2520
|
+
if (filterMatch) {
|
|
2521
|
+
let filterValue = decodeURIComponent(filterMatch[1]);
|
|
2522
|
+
filterValue = this.replaceDateFilters(filterValue);
|
|
2523
|
+
options = options.replace(/\$filter=[^&]*/, `$filter=${encodeURIComponent(filterValue)}`);
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2538
2526
|
var serverUrl = '';
|
|
2539
2527
|
if (this.serverDataUrl.indexOf('filter') >= 0 &&
|
|
2540
2528
|
options.indexOf('filter') >= 0) {
|
|
@@ -2787,8 +2775,19 @@ class GridLibraryComponent {
|
|
|
2787
2775
|
getDataForExcelExport(type) {
|
|
2788
2776
|
this.gridAPI.showLoadingOverlay();
|
|
2789
2777
|
if (this.enableServerSidePaging) {
|
|
2778
|
+
// Ensure date filters are replaced in the export URL
|
|
2779
|
+
let exportUrl = this.serverDataUrl;
|
|
2780
|
+
// If there is a $filter param, decode, replace, and re-encode it to prevent double filtering
|
|
2781
|
+
if (exportUrl.includes('$filter=')) {
|
|
2782
|
+
const filterMatch = exportUrl.match(/\$filter=([^&]*)/);
|
|
2783
|
+
if (filterMatch) {
|
|
2784
|
+
let filterValue = decodeURIComponent(filterMatch[1]);
|
|
2785
|
+
filterValue = this.replaceDateFilters(filterValue);
|
|
2786
|
+
exportUrl = exportUrl.replace(/\$filter=[^&]*/, `$filter=${encodeURIComponent(filterValue)}`);
|
|
2787
|
+
}
|
|
2788
|
+
}
|
|
2790
2789
|
this.gridService
|
|
2791
|
-
.getDataForExport(
|
|
2790
|
+
.getDataForExport(exportUrl)
|
|
2792
2791
|
.pipe(takeUntil(this.unsubscribe$))
|
|
2793
2792
|
.subscribe((response) => {
|
|
2794
2793
|
this.gridAPI.hideOverlay();
|
|
@@ -3327,6 +3326,31 @@ class GridLibraryComponent {
|
|
|
3327
3326
|
this.setPageSizeMinusOne(this.gridAPI);
|
|
3328
3327
|
}
|
|
3329
3328
|
}
|
|
3329
|
+
replaceDateFilters(filterValue) {
|
|
3330
|
+
function toUtcIso(dateStr, hour, min, sec) {
|
|
3331
|
+
const local = new Date(`${dateStr}T${String(hour).padStart(2, '0')}:${String(min).padStart(2, '0')}:${String(sec).padStart(2, '0')}`);
|
|
3332
|
+
return local.toISOString().replace('.000Z', 'Z');
|
|
3333
|
+
}
|
|
3334
|
+
return filterValue.replace(/\b(dateRaised|dacCreatedDate)\s+(ge|gt|le|lt|eq)\s+([0-9]{4}-[0-9]{2}-[0-9]{2})/gi, (match, field, op, dateStr) => {
|
|
3335
|
+
let before = match;
|
|
3336
|
+
let after = match;
|
|
3337
|
+
if (op.toLowerCase() === 'ge' || op.toLowerCase() === 'gt') {
|
|
3338
|
+
const utcStart = toUtcIso(dateStr, 0, 0, 0);
|
|
3339
|
+
after = `${field} ${op} ${utcStart}`;
|
|
3340
|
+
}
|
|
3341
|
+
else if (op.toLowerCase() === 'le' || op.toLowerCase() === 'lt') {
|
|
3342
|
+
const utcEnd = toUtcIso(dateStr, 23, 59, 59);
|
|
3343
|
+
after = `${field} ${op} ${utcEnd}`;
|
|
3344
|
+
}
|
|
3345
|
+
else if (op.toLowerCase() === 'eq') {
|
|
3346
|
+
const utcStart = toUtcIso(dateStr, 0, 0, 0);
|
|
3347
|
+
const utcEnd = toUtcIso(dateStr, 23, 59, 59);
|
|
3348
|
+
after = `(${field} ge ${utcStart} and ${field} le ${utcEnd})`;
|
|
3349
|
+
}
|
|
3350
|
+
//console.log(`[replaceDateFilters] Before: ${before} | After: ${after}`); commented out until official version release
|
|
3351
|
+
return after;
|
|
3352
|
+
});
|
|
3353
|
+
}
|
|
3330
3354
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: GridLibraryComponent, deps: [{ token: GridLibraryService }, { token: ColumnValueFormatter }, { token: TokenSharingService }, { token: i4$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3331
3355
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: GridLibraryComponent, isStandalone: false, selector: "lib-basesite-shared-grid-lib", inputs: { overrideColumnDefs: "overrideColumnDefs", columnDefs: "columnDefs", rowData: "rowData", paginationAutoPageSize: "paginationAutoPageSize", rowSelection: "rowSelection", gridId: "gridId", loggedInUser: "loggedInUser", siteId: "siteId", enableServerSidePaging: "enableServerSidePaging", serverDataUrl: "serverDataUrl", environment: "environment", cacheBlockSize: "cacheBlockSize", rowMultiSelectWithClick: "rowMultiSelectWithClick", floatingFilter: "floatingFilter", token: "token", userRoles: "userRoles", rowHeight: "rowHeight", noRowsOverlayComponent: "noRowsOverlayComponent" }, outputs: { btnClickHandler: "btnClickHandler", firstDataRendered: "firstDataRendered", filterChanged: "filterChanged", selectionChanged: "selectionChanged", totalRowCount: "totalRowCount", gridReady: "gridReady" }, host: { listeners: { "window:resize": "onResize()" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
3332
3356
|
<ag-grid-angular
|