@yoozsoft/yoozsoft-ng 6.2.0 → 7.1.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/README.md +206 -94
- package/fesm2022/yoozsoft-yoozsoft-ng-autocomplete.mjs +70 -38
- package/fesm2022/yoozsoft-yoozsoft-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-datepicker.mjs +194 -109
- package/fesm2022/yoozsoft-yoozsoft-ng-datepicker.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-dropdown.mjs +70 -55
- package/fesm2022/yoozsoft-yoozsoft-ng-dropdown.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-file-upload.mjs +55 -33
- package/fesm2022/yoozsoft-yoozsoft-ng-file-upload.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-footer.mjs +13 -11
- package/fesm2022/yoozsoft-yoozsoft-ng-footer.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-loading.mjs +17 -11
- package/fesm2022/yoozsoft-yoozsoft-ng-loading.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-navbar.mjs +37 -28
- package/fesm2022/yoozsoft-yoozsoft-ng-navbar.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-overlay.mjs +7 -6
- package/fesm2022/yoozsoft-yoozsoft-ng-overlay.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-pagination.mjs +39 -28
- package/fesm2022/yoozsoft-yoozsoft-ng-pagination.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-password-strength.mjs +65 -39
- package/fesm2022/yoozsoft-yoozsoft-ng-password-strength.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-pipes.mjs +3 -3
- package/fesm2022/yoozsoft-yoozsoft-ng-pipes.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-progress.mjs +26 -17
- package/fesm2022/yoozsoft-yoozsoft-ng-progress.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-rating.mjs +155 -0
- package/fesm2022/yoozsoft-yoozsoft-ng-rating.mjs.map +1 -0
- package/fesm2022/yoozsoft-yoozsoft-ng-select.mjs +47 -33
- package/fesm2022/yoozsoft-yoozsoft-ng-select.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-sidebar.mjs +30 -29
- package/fesm2022/yoozsoft-yoozsoft-ng-sidebar.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-table.mjs +93 -84
- package/fesm2022/yoozsoft-yoozsoft-ng-table.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-tiff-viewer.mjs +41 -27
- package/fesm2022/yoozsoft-yoozsoft-ng-tiff-viewer.mjs.map +1 -1
- package/fesm2022/yoozsoft-yoozsoft-ng-toast.mjs +20 -18
- package/fesm2022/yoozsoft-yoozsoft-ng-toast.mjs.map +1 -1
- package/package.json +12 -4
- package/rating/package.json +4 -0
- package/types/yoozsoft-yoozsoft-ng-rating.d.ts +56 -0
|
@@ -8,21 +8,34 @@ import { YsPersianDatePipe } from '@yoozsoft/yoozsoft-ng/pipes';
|
|
|
8
8
|
import { PERSIAN_WEEKDAYS_SHORT, PERSIAN_MONTHS, JalaliDate, compareDates } from '@yoozsoft/yoozsoft-ng/date';
|
|
9
9
|
|
|
10
10
|
class YsDatepickerGregorian {
|
|
11
|
-
value = input(null,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
value = input(null, /* @ts-ignore */
|
|
12
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
13
|
+
disabled = input(false, /* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
15
|
+
firstDayOfWeek = input(1, /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []));
|
|
17
|
+
weekend = input([6, 7], /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "weekend" }] : /* istanbul ignore next */ []));
|
|
19
|
+
showFooter = input(true, /* @ts-ignore */
|
|
20
|
+
...(ngDevMode ? [{ debugName: "showFooter" }] : /* istanbul ignore next */ []));
|
|
21
|
+
todayLabel = input('Today', /* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "todayLabel" }] : /* istanbul ignore next */ []));
|
|
23
|
+
outsideDays = input('visible', /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "outsideDays" }] : /* istanbul ignore next */ []));
|
|
25
|
+
displayMonths = input(1, /* @ts-ignore */
|
|
26
|
+
...(ngDevMode ? [{ debugName: "displayMonths" }] : /* istanbul ignore next */ []));
|
|
19
27
|
valueChange = output();
|
|
20
|
-
model = signal(null,
|
|
28
|
+
model = signal(null, /* @ts-ignore */
|
|
29
|
+
...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
|
|
21
30
|
/*------------Range fields */
|
|
22
|
-
rangeMode = input(false,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
rangeMode = input(false, /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "rangeMode" }] : /* istanbul ignore next */ []));
|
|
33
|
+
fromDate = input(null, /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "fromDate" }] : /* istanbul ignore next */ []));
|
|
35
|
+
toDate = input(null, /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "toDate" }] : /* istanbul ignore next */ []));
|
|
37
|
+
hoveredDate = input(null, /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "hoveredDate" }] : /* istanbul ignore next */ []));
|
|
26
39
|
dateSelect = output();
|
|
27
40
|
dateHover = output();
|
|
28
41
|
/*------------Range fields */
|
|
@@ -128,15 +141,15 @@ class YsDatepickerGregorian {
|
|
|
128
141
|
date.month === to.month &&
|
|
129
142
|
date.day === to.day);
|
|
130
143
|
}
|
|
131
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
132
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
144
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepickerGregorian, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
145
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: YsDatepickerGregorian, isStandalone: true, selector: "ys-datepicker-gregorian", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, weekend: { classPropertyName: "weekend", publicName: "weekend", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, outsideDays: { classPropertyName: "outsideDays", publicName: "outsideDays", isSignal: true, isRequired: false, transformFunction: null }, displayMonths: { classPropertyName: "displayMonths", publicName: "displayMonths", isSignal: true, isRequired: false, transformFunction: null }, rangeMode: { classPropertyName: "rangeMode", publicName: "rangeMode", isSignal: true, isRequired: false, transformFunction: null }, fromDate: { classPropertyName: "fromDate", publicName: "fromDate", isSignal: true, isRequired: false, transformFunction: null }, toDate: { classPropertyName: "toDate", publicName: "toDate", isSignal: true, isRequired: false, transformFunction: null }, hoveredDate: { classPropertyName: "hoveredDate", publicName: "hoveredDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", dateSelect: "dateSelect", dateHover: "dateHover" }, ngImport: i0, template: "<ngb-datepicker #dp [navigation]=\"'select'\" [firstDayOfWeek]=\"firstDayOfWeek()\" [disabled]=\"disabled()\"\n [dayTemplate]=\"dayTemplate\" [footerTemplate]=\"footerTemplate\" [ngModel]=\"model()\"\n (ngModelChange)=\"valueChanged($event)\" [outsideDays]=\"outsideDays()\" [displayMonths]=\"displayMonths()\">\n</ngb-datepicker>\n\n<ng-template #dayTemplate let-date let-currentMonth=\"currentMonth\" let-selected=\"selected\" let-focused=\"focused\">\n\n <span class=\"ys-day\" [class.ys-selected]=\"selected\" [class.ys-focused]=\"focused\"\n [class.ys-weekend]=\"isWeekend(date)\" [class.ys-hidden]=\"date.month !== currentMonth\"\n [class.text-muted]=\"date.month !== currentMonth\" [class.ys-range]=\"rangeMode() && isRange(date)\"\n [class.ys-range-start]=\"rangeMode() && isStart(date)\" [class.ys-range-end]=\"rangeMode() && isEnd(date)\"\n (click)=\"dateSelect.emit(date)\" (mouseenter)=\"dateHover.emit(date)\">\n\n {{ date.day }}\n\n </span>\n\n</ng-template>\n\n<ng-template #footerTemplate>\n @if(showFooter()) {\n <div class=\"ys-datepicker-footer border-top\">\n\n <button type=\"button\" class=\"btn btn-sm btn-primary float-start mb-2\" [disabled]=\"disabled()\"\n (click)=\"setToday(dp)\">\n\n {{ todayLabel() }}\n\n </button>\n\n </div>\n }\n</ng-template>", styles: [".ys-day{text-align:center;padding:.185rem .25rem;border-radius:.25rem;display:inline-block;width:2rem;height:2rem;line-height:1.7}.ys-day:hover,.ys-focused{background:var(--bs-secondary-bg)}.ys-selected{background:var(--bs-primary);color:var(--bs-white)}.ys-selected.ys-day:hover{color:var(--bs-body-color)}.ys-weekend{color:var(--bs-danger)}.ys-hidden{opacity:.5}.ys-datepicker-footer{padding:.5rem}.ys-range{background-color:var(--bs-primary-bg-subtle);border-radius:0}.ys-range-start,.ys-range-end{background-color:var(--bs-primary);color:var(--bs-white)}.ys-range-start{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.ys-range-end{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.ys-range-start.ys-day:hover,.ys-range-end.ys-day:hover{color:var(--bs-body-color)}\n"], dependencies: [{ kind: "ngmodule", type: NgbDatepickerModule }, { kind: "component", type: i1.NgbDatepicker, selector: "ngb-datepicker", inputs: ["contentTemplate", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "maxDate", "minDate", "navigation", "outsideDays", "showWeekNumbers", "startDate", "weekdays"], outputs: ["navigate", "dateSelect"], exportAs: ["ngbDatepicker"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
133
146
|
}
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepickerGregorian, decorators: [{
|
|
135
148
|
type: Component,
|
|
136
149
|
args: [{ selector: 'ys-datepicker-gregorian', imports: [
|
|
137
150
|
NgbDatepickerModule,
|
|
138
151
|
FormsModule
|
|
139
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ngb-datepicker #dp [navigation]=\"'select'\" [firstDayOfWeek]=\"firstDayOfWeek()\" [disabled]=\"disabled()\"\n [dayTemplate]=\"dayTemplate\" [footerTemplate]=\"footerTemplate\" [ngModel]=\"model()\"\n (ngModelChange)=\"valueChanged($event)\" [outsideDays]=\"outsideDays()\" [displayMonths]=\"displayMonths()\">\n</ngb-datepicker>\n\n<ng-template #dayTemplate let-date let-currentMonth=\"currentMonth\" let-selected=\"selected\" let-focused=\"focused\">\n\n <span class=\"ys-day\" [class.ys-selected]=\"selected\" [class.ys-focused]=\"focused\"\n [class.ys-weekend]=\"isWeekend(date)\" [class.ys-hidden]=\"date.month !== currentMonth\"\n [class.text-muted]=\"date.month !== currentMonth\" [class.ys-range]=\"rangeMode() && isRange(date)\"\n [class.ys-range-start]=\"rangeMode() && isStart(date)\" [class.ys-range-end]=\"rangeMode() && isEnd(date)\"\n (click)=\"dateSelect.emit(date)\" (mouseenter)=\"dateHover.emit(date)\">\n\n {{ date.day }}\n\n </span>\n\n</ng-template>\n\n<ng-template #footerTemplate>\n @if(showFooter()) {\n <div class=\"ys-datepicker-footer border-top\">\n\n <button type=\"button\" class=\"btn btn-sm btn-primary float-start mb-2\" [disabled]=\"disabled()\"\n (click)=\"setToday(dp)\">\n\n {{ todayLabel() }}\n\n </button>\n\n </div>\n }\n</ng-template>", styles: [".ys-day{text-align:center;padding:.185rem .25rem;border-radius:.25rem;display:inline-block;width:2rem;height:2rem;line-height:1.7}.ys-day:hover,.ys-focused{background:var(--bs-secondary-bg)}.ys-selected{background:var(--bs-primary);color:var(--bs-white)}.ys-weekend{color:var(--bs-danger)}.ys-hidden{opacity:.5}.ys-datepicker-footer{padding:.5rem}.ys-range{background-color:var(--bs-primary-bg-subtle)}.ys-range-start,.ys-range-end{background-color:var(--bs-primary);color:var(--bs-white)}.ys-range-start{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.ys-range-end{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}\n"] }]
|
|
152
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ngb-datepicker #dp [navigation]=\"'select'\" [firstDayOfWeek]=\"firstDayOfWeek()\" [disabled]=\"disabled()\"\n [dayTemplate]=\"dayTemplate\" [footerTemplate]=\"footerTemplate\" [ngModel]=\"model()\"\n (ngModelChange)=\"valueChanged($event)\" [outsideDays]=\"outsideDays()\" [displayMonths]=\"displayMonths()\">\n</ngb-datepicker>\n\n<ng-template #dayTemplate let-date let-currentMonth=\"currentMonth\" let-selected=\"selected\" let-focused=\"focused\">\n\n <span class=\"ys-day\" [class.ys-selected]=\"selected\" [class.ys-focused]=\"focused\"\n [class.ys-weekend]=\"isWeekend(date)\" [class.ys-hidden]=\"date.month !== currentMonth\"\n [class.text-muted]=\"date.month !== currentMonth\" [class.ys-range]=\"rangeMode() && isRange(date)\"\n [class.ys-range-start]=\"rangeMode() && isStart(date)\" [class.ys-range-end]=\"rangeMode() && isEnd(date)\"\n (click)=\"dateSelect.emit(date)\" (mouseenter)=\"dateHover.emit(date)\">\n\n {{ date.day }}\n\n </span>\n\n</ng-template>\n\n<ng-template #footerTemplate>\n @if(showFooter()) {\n <div class=\"ys-datepicker-footer border-top\">\n\n <button type=\"button\" class=\"btn btn-sm btn-primary float-start mb-2\" [disabled]=\"disabled()\"\n (click)=\"setToday(dp)\">\n\n {{ todayLabel() }}\n\n </button>\n\n </div>\n }\n</ng-template>", styles: [".ys-day{text-align:center;padding:.185rem .25rem;border-radius:.25rem;display:inline-block;width:2rem;height:2rem;line-height:1.7}.ys-day:hover,.ys-focused{background:var(--bs-secondary-bg)}.ys-selected{background:var(--bs-primary);color:var(--bs-white)}.ys-selected.ys-day:hover{color:var(--bs-body-color)}.ys-weekend{color:var(--bs-danger)}.ys-hidden{opacity:.5}.ys-datepicker-footer{padding:.5rem}.ys-range{background-color:var(--bs-primary-bg-subtle);border-radius:0}.ys-range-start,.ys-range-end{background-color:var(--bs-primary);color:var(--bs-white)}.ys-range-start{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.ys-range-end{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.ys-range-start.ys-day:hover,.ys-range-end.ys-day:hover{color:var(--bs-body-color)}\n"] }]
|
|
140
153
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], weekend: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekend", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], outsideDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "outsideDays", required: false }] }], displayMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMonths", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], rangeMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeMode", required: false }] }], fromDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "fromDate", required: false }] }], toDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "toDate", required: false }] }], hoveredDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoveredDate", required: false }] }], dateSelect: [{ type: i0.Output, args: ["dateSelect"] }], dateHover: [{ type: i0.Output, args: ["dateHover"] }] } });
|
|
141
154
|
|
|
142
155
|
class YsPersianDatepickerI18n extends NgbDatepickerI18n {
|
|
@@ -152,29 +165,42 @@ class YsPersianDatepickerI18n extends NgbDatepickerI18n {
|
|
|
152
165
|
getDayAriaLabel(date) {
|
|
153
166
|
return `${date.year}/${date.month}/${date.day}`;
|
|
154
167
|
}
|
|
155
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
156
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
168
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsPersianDatepickerI18n, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
169
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsPersianDatepickerI18n });
|
|
157
170
|
}
|
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsPersianDatepickerI18n, decorators: [{
|
|
159
172
|
type: Injectable
|
|
160
173
|
}] });
|
|
161
174
|
class YsDatepickerJalali {
|
|
162
175
|
calendar = inject(NgbCalendar);
|
|
163
|
-
value = input(null,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
176
|
+
value = input(null, /* @ts-ignore */
|
|
177
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
178
|
+
disabled = input(false, /* @ts-ignore */
|
|
179
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
180
|
+
firstDayOfWeek = input(6, /* @ts-ignore */
|
|
181
|
+
...(ngDevMode ? [{ debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []));
|
|
182
|
+
weekend = input([5], /* @ts-ignore */
|
|
183
|
+
...(ngDevMode ? [{ debugName: "weekend" }] : /* istanbul ignore next */ []));
|
|
184
|
+
showFooter = input(true, /* @ts-ignore */
|
|
185
|
+
...(ngDevMode ? [{ debugName: "showFooter" }] : /* istanbul ignore next */ []));
|
|
186
|
+
todayLabel = input('امروز', /* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [{ debugName: "todayLabel" }] : /* istanbul ignore next */ []));
|
|
188
|
+
outsideDays = input('visible', /* @ts-ignore */
|
|
189
|
+
...(ngDevMode ? [{ debugName: "outsideDays" }] : /* istanbul ignore next */ []));
|
|
190
|
+
displayMonths = input(1, /* @ts-ignore */
|
|
191
|
+
...(ngDevMode ? [{ debugName: "displayMonths" }] : /* istanbul ignore next */ []));
|
|
171
192
|
valueChange = output();
|
|
172
|
-
model = signal(null,
|
|
193
|
+
model = signal(null, /* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
|
|
173
195
|
/*------------Range fields */
|
|
174
|
-
rangeMode = input(false,
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
196
|
+
rangeMode = input(false, /* @ts-ignore */
|
|
197
|
+
...(ngDevMode ? [{ debugName: "rangeMode" }] : /* istanbul ignore next */ []));
|
|
198
|
+
fromDate = input(null, /* @ts-ignore */
|
|
199
|
+
...(ngDevMode ? [{ debugName: "fromDate" }] : /* istanbul ignore next */ []));
|
|
200
|
+
toDate = input(null, /* @ts-ignore */
|
|
201
|
+
...(ngDevMode ? [{ debugName: "toDate" }] : /* istanbul ignore next */ []));
|
|
202
|
+
hoveredDate = input(null, /* @ts-ignore */
|
|
203
|
+
...(ngDevMode ? [{ debugName: "hoveredDate" }] : /* istanbul ignore next */ []));
|
|
178
204
|
dateSelect = output();
|
|
179
205
|
dateHover = output();
|
|
180
206
|
/*------------Range fields */
|
|
@@ -281,13 +307,13 @@ class YsDatepickerJalali {
|
|
|
281
307
|
date.month === to.month &&
|
|
282
308
|
date.day === to.day);
|
|
283
309
|
}
|
|
284
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
285
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
310
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepickerJalali, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
311
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: YsDatepickerJalali, isStandalone: true, selector: "ys-datepicker-jalali", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, weekend: { classPropertyName: "weekend", publicName: "weekend", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, outsideDays: { classPropertyName: "outsideDays", publicName: "outsideDays", isSignal: true, isRequired: false, transformFunction: null }, displayMonths: { classPropertyName: "displayMonths", publicName: "displayMonths", isSignal: true, isRequired: false, transformFunction: null }, rangeMode: { classPropertyName: "rangeMode", publicName: "rangeMode", isSignal: true, isRequired: false, transformFunction: null }, fromDate: { classPropertyName: "fromDate", publicName: "fromDate", isSignal: true, isRequired: false, transformFunction: null }, toDate: { classPropertyName: "toDate", publicName: "toDate", isSignal: true, isRequired: false, transformFunction: null }, hoveredDate: { classPropertyName: "hoveredDate", publicName: "hoveredDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", dateSelect: "dateSelect", dateHover: "dateHover" }, providers: [
|
|
286
312
|
{ provide: NgbCalendar, useClass: NgbCalendarPersian },
|
|
287
313
|
{ provide: NgbDatepickerI18n, useClass: YsPersianDatepickerI18n }
|
|
288
|
-
], ngImport: i0, template: "<ngb-datepicker #dp [navigation]=\"'select'\" [firstDayOfWeek]=\"firstDayOfWeek()\" [disabled]=\"disabled()\"\n [dayTemplate]=\"dayTemplate\" [footerTemplate]=\"footerTemplate\" [ngModel]=\"model()\"\n (ngModelChange)=\"valueChanged($event)\" [outsideDays]=\"outsideDays()\" [displayMonths]=\"displayMonths()\">\n</ngb-datepicker>\n\n<ng-template #dayTemplate let-date let-currentMonth=\"currentMonth\" let-selected=\"selected\" let-focused=\"focused\">\n\n <span class=\"ys-day\" [class.ys-selected]=\"selected\" [class.ys-focused]=\"focused\"\n [class.ys-weekend]=\"isWeekend(date)\" [class.ys-hidden]=\"date.month !== currentMonth\"\n [class.text-muted]=\"date.month !== currentMonth\" [class.ys-range]=\"rangeMode() && isRange(date)\"\n [class.ys-range-start]=\"rangeMode() && isStart(date)\" [class.ys-range-end]=\"rangeMode() && isEnd(date)\"\n (click)=\"dateSelect.emit(date)\" (mouseenter)=\"dateHover.emit(date)\">\n\n {{ date.day }}\n\n </span>\n\n</ng-template>\n\n<ng-template #footerTemplate>\n @if(showFooter()) {\n <div class=\"ys-datepicker-footer border-top\">\n\n <button type=\"button\" class=\"btn btn-sm btn-primary float-start mb-2\" [disabled]=\"disabled()\"\n (click)=\"setToday(dp)\">\n\n {{ todayLabel() }}\n\n </button>\n\n </div>\n }\n</ng-template>", styles: [".ys-day{text-align:center;padding:.185rem .25rem;border-radius:.25rem;display:inline-block;width:2rem;height:2rem;line-height:1.7}.ys-day:hover,.ys-focused{background:var(--bs-secondary-bg)}.ys-selected{background:var(--bs-primary);color:var(--bs-white)}.ys-weekend{color:var(--bs-danger)}.ys-hidden{opacity:.5}.ys-datepicker-footer{padding:.5rem}.ys-range{background-color:var(--bs-primary-bg-subtle);border-radius:0}.ys-range-start,.ys-range-end{background-color:var(--bs-primary);color:var(--bs-white)}.ys-range-start{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.ys-range-end{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}\n"], dependencies: [{ kind: "ngmodule", type: NgbDatepickerModule }, { kind: "component", type: i1.NgbDatepicker, selector: "ngb-datepicker", inputs: ["contentTemplate", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "maxDate", "minDate", "navigation", "outsideDays", "showWeekNumbers", "startDate", "weekdays"], outputs: ["navigate", "dateSelect"], exportAs: ["ngbDatepicker"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
314
|
+
], ngImport: i0, template: "<ngb-datepicker #dp [navigation]=\"'select'\" [firstDayOfWeek]=\"firstDayOfWeek()\" [disabled]=\"disabled()\"\n [dayTemplate]=\"dayTemplate\" [footerTemplate]=\"footerTemplate\" [ngModel]=\"model()\"\n (ngModelChange)=\"valueChanged($event)\" [outsideDays]=\"outsideDays()\" [displayMonths]=\"displayMonths()\">\n</ngb-datepicker>\n\n<ng-template #dayTemplate let-date let-currentMonth=\"currentMonth\" let-selected=\"selected\" let-focused=\"focused\">\n\n <span class=\"ys-day\" [class.ys-selected]=\"selected\" [class.ys-focused]=\"focused\"\n [class.ys-weekend]=\"isWeekend(date)\" [class.ys-hidden]=\"date.month !== currentMonth\"\n [class.text-muted]=\"date.month !== currentMonth\" [class.ys-range]=\"rangeMode() && isRange(date)\"\n [class.ys-range-start]=\"rangeMode() && isStart(date)\" [class.ys-range-end]=\"rangeMode() && isEnd(date)\"\n (click)=\"dateSelect.emit(date)\" (mouseenter)=\"dateHover.emit(date)\">\n\n {{ date.day }}\n\n </span>\n\n</ng-template>\n\n<ng-template #footerTemplate>\n @if(showFooter()) {\n <div class=\"ys-datepicker-footer border-top\">\n\n <button type=\"button\" class=\"btn btn-sm btn-primary float-start mb-2\" [disabled]=\"disabled()\"\n (click)=\"setToday(dp)\">\n\n {{ todayLabel() }}\n\n </button>\n\n </div>\n }\n</ng-template>", styles: [".ys-day{text-align:center;padding:.185rem .25rem;border-radius:.25rem;display:inline-block;width:2rem;height:2rem;line-height:1.7}.ys-day:hover,.ys-focused{background:var(--bs-secondary-bg)}.ys-selected{background:var(--bs-primary);color:var(--bs-white)}.ys-selected.ys-day:hover{color:var(--bs-body-color)}.ys-weekend{color:var(--bs-danger)}.ys-hidden{opacity:.5}.ys-datepicker-footer{padding:.5rem}.ys-range{background-color:var(--bs-primary-bg-subtle);border-radius:0}.ys-range-start,.ys-range-end{background-color:var(--bs-primary);color:var(--bs-white)}.ys-range-start{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.ys-range-end{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.ys-range-start.ys-day:hover,.ys-range-end.ys-day:hover{color:var(--bs-body-color)}\n"], dependencies: [{ kind: "ngmodule", type: NgbDatepickerModule }, { kind: "component", type: i1.NgbDatepicker, selector: "ngb-datepicker", inputs: ["contentTemplate", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "maxDate", "minDate", "navigation", "outsideDays", "showWeekNumbers", "startDate", "weekdays"], outputs: ["navigate", "dateSelect"], exportAs: ["ngbDatepicker"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
289
315
|
}
|
|
290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepickerJalali, decorators: [{
|
|
291
317
|
type: Component,
|
|
292
318
|
args: [{ selector: 'ys-datepicker-jalali', imports: [
|
|
293
319
|
NgbDatepickerModule,
|
|
@@ -295,28 +321,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
295
321
|
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
296
322
|
{ provide: NgbCalendar, useClass: NgbCalendarPersian },
|
|
297
323
|
{ provide: NgbDatepickerI18n, useClass: YsPersianDatepickerI18n }
|
|
298
|
-
], template: "<ngb-datepicker #dp [navigation]=\"'select'\" [firstDayOfWeek]=\"firstDayOfWeek()\" [disabled]=\"disabled()\"\n [dayTemplate]=\"dayTemplate\" [footerTemplate]=\"footerTemplate\" [ngModel]=\"model()\"\n (ngModelChange)=\"valueChanged($event)\" [outsideDays]=\"outsideDays()\" [displayMonths]=\"displayMonths()\">\n</ngb-datepicker>\n\n<ng-template #dayTemplate let-date let-currentMonth=\"currentMonth\" let-selected=\"selected\" let-focused=\"focused\">\n\n <span class=\"ys-day\" [class.ys-selected]=\"selected\" [class.ys-focused]=\"focused\"\n [class.ys-weekend]=\"isWeekend(date)\" [class.ys-hidden]=\"date.month !== currentMonth\"\n [class.text-muted]=\"date.month !== currentMonth\" [class.ys-range]=\"rangeMode() && isRange(date)\"\n [class.ys-range-start]=\"rangeMode() && isStart(date)\" [class.ys-range-end]=\"rangeMode() && isEnd(date)\"\n (click)=\"dateSelect.emit(date)\" (mouseenter)=\"dateHover.emit(date)\">\n\n {{ date.day }}\n\n </span>\n\n</ng-template>\n\n<ng-template #footerTemplate>\n @if(showFooter()) {\n <div class=\"ys-datepicker-footer border-top\">\n\n <button type=\"button\" class=\"btn btn-sm btn-primary float-start mb-2\" [disabled]=\"disabled()\"\n (click)=\"setToday(dp)\">\n\n {{ todayLabel() }}\n\n </button>\n\n </div>\n }\n</ng-template>", styles: [".ys-day{text-align:center;padding:.185rem .25rem;border-radius:.25rem;display:inline-block;width:2rem;height:2rem;line-height:1.7}.ys-day:hover,.ys-focused{background:var(--bs-secondary-bg)}.ys-selected{background:var(--bs-primary);color:var(--bs-white)}.ys-weekend{color:var(--bs-danger)}.ys-hidden{opacity:.5}.ys-datepicker-footer{padding:.5rem}.ys-range{background-color:var(--bs-primary-bg-subtle);border-radius:0}.ys-range-start,.ys-range-end{background-color:var(--bs-primary);color:var(--bs-white)}.ys-range-start{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.ys-range-end{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}\n"] }]
|
|
324
|
+
], template: "<ngb-datepicker #dp [navigation]=\"'select'\" [firstDayOfWeek]=\"firstDayOfWeek()\" [disabled]=\"disabled()\"\n [dayTemplate]=\"dayTemplate\" [footerTemplate]=\"footerTemplate\" [ngModel]=\"model()\"\n (ngModelChange)=\"valueChanged($event)\" [outsideDays]=\"outsideDays()\" [displayMonths]=\"displayMonths()\">\n</ngb-datepicker>\n\n<ng-template #dayTemplate let-date let-currentMonth=\"currentMonth\" let-selected=\"selected\" let-focused=\"focused\">\n\n <span class=\"ys-day\" [class.ys-selected]=\"selected\" [class.ys-focused]=\"focused\"\n [class.ys-weekend]=\"isWeekend(date)\" [class.ys-hidden]=\"date.month !== currentMonth\"\n [class.text-muted]=\"date.month !== currentMonth\" [class.ys-range]=\"rangeMode() && isRange(date)\"\n [class.ys-range-start]=\"rangeMode() && isStart(date)\" [class.ys-range-end]=\"rangeMode() && isEnd(date)\"\n (click)=\"dateSelect.emit(date)\" (mouseenter)=\"dateHover.emit(date)\">\n\n {{ date.day }}\n\n </span>\n\n</ng-template>\n\n<ng-template #footerTemplate>\n @if(showFooter()) {\n <div class=\"ys-datepicker-footer border-top\">\n\n <button type=\"button\" class=\"btn btn-sm btn-primary float-start mb-2\" [disabled]=\"disabled()\"\n (click)=\"setToday(dp)\">\n\n {{ todayLabel() }}\n\n </button>\n\n </div>\n }\n</ng-template>", styles: [".ys-day{text-align:center;padding:.185rem .25rem;border-radius:.25rem;display:inline-block;width:2rem;height:2rem;line-height:1.7}.ys-day:hover,.ys-focused{background:var(--bs-secondary-bg)}.ys-selected{background:var(--bs-primary);color:var(--bs-white)}.ys-selected.ys-day:hover{color:var(--bs-body-color)}.ys-weekend{color:var(--bs-danger)}.ys-hidden{opacity:.5}.ys-datepicker-footer{padding:.5rem}.ys-range{background-color:var(--bs-primary-bg-subtle);border-radius:0}.ys-range-start,.ys-range-end{background-color:var(--bs-primary);color:var(--bs-white)}.ys-range-start{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.ys-range-end{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.ys-range-start.ys-day:hover,.ys-range-end.ys-day:hover{color:var(--bs-body-color)}\n"] }]
|
|
299
325
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], weekend: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekend", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], outsideDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "outsideDays", required: false }] }], displayMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMonths", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], rangeMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeMode", required: false }] }], fromDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "fromDate", required: false }] }], toDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "toDate", required: false }] }], hoveredDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoveredDate", required: false }] }], dateSelect: [{ type: i0.Output, args: ["dateSelect"] }], dateHover: [{ type: i0.Output, args: ["dateHover"] }] } });
|
|
300
326
|
|
|
301
327
|
class YsDatepickerPopup {
|
|
302
|
-
calendarType = input('gregorian',
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
328
|
+
calendarType = input('gregorian', /* @ts-ignore */
|
|
329
|
+
...(ngDevMode ? [{ debugName: "calendarType" }] : /* istanbul ignore next */ []));
|
|
330
|
+
disabled = input(false, /* @ts-ignore */
|
|
331
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
332
|
+
readonly = input(false, /* @ts-ignore */
|
|
333
|
+
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
334
|
+
placeholder = input('', /* @ts-ignore */
|
|
335
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
336
|
+
firstDayOfWeek = input(/* @ts-ignore */
|
|
337
|
+
...(ngDevMode ? [undefined, { debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []));
|
|
338
|
+
weekend = input(/* @ts-ignore */
|
|
339
|
+
...(ngDevMode ? [undefined, { debugName: "weekend" }] : /* istanbul ignore next */ []));
|
|
340
|
+
showFooter = input(true, /* @ts-ignore */
|
|
341
|
+
...(ngDevMode ? [{ debugName: "showFooter" }] : /* istanbul ignore next */ []));
|
|
342
|
+
todayLabel = input(/* @ts-ignore */
|
|
343
|
+
...(ngDevMode ? [undefined, { debugName: "todayLabel" }] : /* istanbul ignore next */ []));
|
|
344
|
+
outsideDays = input('visible', /* @ts-ignore */
|
|
345
|
+
...(ngDevMode ? [{ debugName: "outsideDays" }] : /* istanbul ignore next */ []));
|
|
346
|
+
displayMonths = input(1, /* @ts-ignore */
|
|
347
|
+
...(ngDevMode ? [{ debugName: "displayMonths" }] : /* istanbul ignore next */ []));
|
|
348
|
+
autoClose = input(true, /* @ts-ignore */
|
|
349
|
+
...(ngDevMode ? [{ debugName: "autoClose" }] : /* istanbul ignore next */ []));
|
|
350
|
+
container = input(null, /* @ts-ignore */
|
|
351
|
+
...(ngDevMode ? [{ debugName: "container" }] : /* istanbul ignore next */ []));
|
|
352
|
+
calendarIconClass = input('fa fa-calendar', /* @ts-ignore */
|
|
353
|
+
...(ngDevMode ? [{ debugName: "calendarIconClass" }] : /* istanbul ignore next */ []));
|
|
354
|
+
clearIconClass = input('fa fa-xmark', /* @ts-ignore */
|
|
355
|
+
...(ngDevMode ? [{ debugName: "clearIconClass" }] : /* istanbul ignore next */ []));
|
|
356
|
+
disabledState = signal(false, /* @ts-ignore */
|
|
357
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
317
358
|
isDisabled = computed(() => this.disabled() ||
|
|
318
|
-
this.disabledState(),
|
|
319
|
-
|
|
359
|
+
this.disabledState(), /* @ts-ignore */
|
|
360
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
361
|
+
value = signal(null, /* @ts-ignore */
|
|
362
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
320
363
|
displayValue = computed(() => {
|
|
321
364
|
const value = this.value();
|
|
322
365
|
if (!value) {
|
|
@@ -326,7 +369,8 @@ class YsDatepickerPopup {
|
|
|
326
369
|
return new YsPersianDatePipe().transform(value, 'shortDate');
|
|
327
370
|
}
|
|
328
371
|
return value.toLocaleDateString('en-CA');
|
|
329
|
-
},
|
|
372
|
+
}, /* @ts-ignore */
|
|
373
|
+
...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
|
|
330
374
|
onChange = (_) => { };
|
|
331
375
|
onTouched = () => { };
|
|
332
376
|
writeValue(value) {
|
|
@@ -355,8 +399,8 @@ class YsDatepickerPopup {
|
|
|
355
399
|
this.onChange(null);
|
|
356
400
|
this.onTouched();
|
|
357
401
|
}
|
|
358
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
359
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
402
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepickerPopup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
403
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: YsDatepickerPopup, isStandalone: true, selector: "ys-datepicker-popup", inputs: { calendarType: { classPropertyName: "calendarType", publicName: "calendarType", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, weekend: { classPropertyName: "weekend", publicName: "weekend", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, outsideDays: { classPropertyName: "outsideDays", publicName: "outsideDays", isSignal: true, isRequired: false, transformFunction: null }, displayMonths: { classPropertyName: "displayMonths", publicName: "displayMonths", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, calendarIconClass: { classPropertyName: "calendarIconClass", publicName: "calendarIconClass", isSignal: true, isRequired: false, transformFunction: null }, clearIconClass: { classPropertyName: "clearIconClass", publicName: "clearIconClass", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
360
404
|
{
|
|
361
405
|
provide: NG_VALUE_ACCESSOR,
|
|
362
406
|
useExisting: forwardRef(() => YsDatepickerPopup),
|
|
@@ -364,7 +408,7 @@ class YsDatepickerPopup {
|
|
|
364
408
|
}
|
|
365
409
|
], ngImport: i0, template: "<div ngbDropdown #dropdown=\"ngbDropdown\" [container]=\"container()\" class=\"ys-datepicker-popup\">\n\n <div class=\"input-group\">\n\n <input type=\"text\" class=\"form-control\" [placeholder]=\"placeholder()\" [value]=\"displayValue()\"\n [readonly]=\"readonly()\" [disabled]=\"isDisabled()\" ngbDropdownToggle>\n\n @if(value()) {\n\n <button type=\"button\" class=\"btn btn-outline-secondary\" [disabled]=\"isDisabled()\" (click)=\"clear($event)\">\n <i [class]=\"clearIconClass()\"></i>\n </button>\n\n }\n\n <button type=\"button\" class=\"btn btn-outline-secondary\" [disabled]=\"isDisabled()\" ngbDropdownToggle>\n <i [class]=\"calendarIconClass()\"></i>\n </button>\n\n </div>\n\n <div ngbDropdownMenu class=\"p-0 border-0 shadow\">\n\n @if(calendarType() === 'jalali') {\n\n <ys-datepicker-jalali [value]=\"value()\" [disabled]=\"isDisabled()\" [firstDayOfWeek]=\"firstDayOfWeek() ?? 6\"\n [weekend]=\"weekend() ?? [5]\" [showFooter]=\"showFooter()\" [todayLabel]=\"todayLabel() ?? '\u0627\u0645\u0631\u0648\u0632'\"\n (valueChange)=\"valueChanged($event, dropdown)\" [outsideDays]=\"outsideDays()\"\n [displayMonths]=\"displayMonths()\">\n </ys-datepicker-jalali>\n\n }\n\n @else {\n\n <ys-datepicker-gregorian [value]=\"value()\" [disabled]=\"isDisabled()\" [firstDayOfWeek]=\"firstDayOfWeek() ?? 1\"\n [weekend]=\"weekend() ?? [6,7]\" [showFooter]=\"showFooter()\" [todayLabel]=\"todayLabel() ?? 'Today'\"\n (valueChange)=\"valueChanged($event, dropdown)\" [outsideDays]=\"outsideDays()\"\n [displayMonths]=\"displayMonths()\">\n </ys-datepicker-gregorian>\n\n }\n\n </div>\n\n</div>", styles: [":host{display:block}.ys-datepicker-popup{width:100%}.ys-datepicker-popup .dropdown-toggle:after{display:none}.form-control[readonly]{cursor:pointer}.ys-datepicker-popup .input-group>input.dropdown-toggle{border-start-end-radius:0;border-end-end-radius:0}\n"], dependencies: [{ kind: "ngmodule", type: NgbDropdownModule }, { kind: "directive", type: i1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "component", type: YsDatepickerGregorian, selector: "ys-datepicker-gregorian", inputs: ["value", "disabled", "firstDayOfWeek", "weekend", "showFooter", "todayLabel", "outsideDays", "displayMonths", "rangeMode", "fromDate", "toDate", "hoveredDate"], outputs: ["valueChange", "dateSelect", "dateHover"] }, { kind: "component", type: YsDatepickerJalali, selector: "ys-datepicker-jalali", inputs: ["value", "disabled", "firstDayOfWeek", "weekend", "showFooter", "todayLabel", "outsideDays", "displayMonths", "rangeMode", "fromDate", "toDate", "hoveredDate"], outputs: ["valueChange", "dateSelect", "dateHover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
366
410
|
}
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepickerPopup, decorators: [{
|
|
368
412
|
type: Component,
|
|
369
413
|
args: [{ selector: 'ys-datepicker-popup', imports: [
|
|
370
414
|
NgbDropdownModule,
|
|
@@ -381,20 +425,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
381
425
|
}], propDecorators: { calendarType: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarType", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], weekend: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekend", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], outsideDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "outsideDays", required: false }] }], displayMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMonths", required: false }] }], autoClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClose", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }], calendarIconClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarIconClass", required: false }] }], clearIconClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearIconClass", required: false }] }] } });
|
|
382
426
|
|
|
383
427
|
class YsDatepickerRange {
|
|
384
|
-
calendarType = input('gregorian',
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
428
|
+
calendarType = input('gregorian', /* @ts-ignore */
|
|
429
|
+
...(ngDevMode ? [{ debugName: "calendarType" }] : /* istanbul ignore next */ []));
|
|
430
|
+
disabled = input(false, /* @ts-ignore */
|
|
431
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
432
|
+
firstDayOfWeek = input(/* @ts-ignore */
|
|
433
|
+
...(ngDevMode ? [undefined, { debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []));
|
|
434
|
+
weekend = input(/* @ts-ignore */
|
|
435
|
+
...(ngDevMode ? [undefined, { debugName: "weekend" }] : /* istanbul ignore next */ []));
|
|
436
|
+
showFooter = input(true, /* @ts-ignore */
|
|
437
|
+
...(ngDevMode ? [{ debugName: "showFooter" }] : /* istanbul ignore next */ []));
|
|
438
|
+
todayLabel = input(/* @ts-ignore */
|
|
439
|
+
...(ngDevMode ? [undefined, { debugName: "todayLabel" }] : /* istanbul ignore next */ []));
|
|
440
|
+
outsideDays = input('visible', /* @ts-ignore */
|
|
441
|
+
...(ngDevMode ? [{ debugName: "outsideDays" }] : /* istanbul ignore next */ []));
|
|
442
|
+
displayMonths = input(2, /* @ts-ignore */
|
|
443
|
+
...(ngDevMode ? [{ debugName: "displayMonths" }] : /* istanbul ignore next */ []));
|
|
444
|
+
disabledState = signal(false, /* @ts-ignore */
|
|
445
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
393
446
|
isDisabled = computed(() => this.disabled() ||
|
|
394
|
-
this.disabledState(),
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
447
|
+
this.disabledState(), /* @ts-ignore */
|
|
448
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
449
|
+
fromDate = signal(null, /* @ts-ignore */
|
|
450
|
+
...(ngDevMode ? [{ debugName: "fromDate" }] : /* istanbul ignore next */ []));
|
|
451
|
+
toDate = signal(null, /* @ts-ignore */
|
|
452
|
+
...(ngDevMode ? [{ debugName: "toDate" }] : /* istanbul ignore next */ []));
|
|
453
|
+
hoveredDate = signal(null, /* @ts-ignore */
|
|
454
|
+
...(ngDevMode ? [{ debugName: "hoveredDate" }] : /* istanbul ignore next */ []));
|
|
398
455
|
onChange = (_) => { };
|
|
399
456
|
onTouched = () => { };
|
|
400
457
|
writeValue(value) {
|
|
@@ -464,8 +521,8 @@ class YsDatepickerRange {
|
|
|
464
521
|
}
|
|
465
522
|
return new Date(date.year, date.month - 1, date.day);
|
|
466
523
|
}
|
|
467
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
468
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
524
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepickerRange, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
525
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: YsDatepickerRange, isStandalone: true, selector: "ys-datepicker-range", inputs: { calendarType: { classPropertyName: "calendarType", publicName: "calendarType", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, weekend: { classPropertyName: "weekend", publicName: "weekend", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, outsideDays: { classPropertyName: "outsideDays", publicName: "outsideDays", isSignal: true, isRequired: false, transformFunction: null }, displayMonths: { classPropertyName: "displayMonths", publicName: "displayMonths", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
469
526
|
{
|
|
470
527
|
provide: NG_VALUE_ACCESSOR,
|
|
471
528
|
useExisting: forwardRef(() => YsDatepickerRange),
|
|
@@ -473,7 +530,7 @@ class YsDatepickerRange {
|
|
|
473
530
|
}
|
|
474
531
|
], ngImport: i0, template: "@if(calendarType() === 'jalali') {\n\n<ys-datepicker-jalali [disabled]=\"isDisabled()\" [firstDayOfWeek]=\"firstDayOfWeek() ?? 6\" [weekend]=\"weekend() ?? [5]\"\n [showFooter]=\"showFooter()\" [todayLabel]=\"todayLabel() ?? '\u0627\u0645\u0631\u0648\u0632'\" [rangeMode]=\"true\" [fromDate]=\"fromDate()\"\n [toDate]=\"toDate()\" [hoveredDate]=\"hoveredDate()\" (dateSelect)=\"select($event)\" (dateHover)=\"hover($event)\"\n [outsideDays]=\"outsideDays()\" [displayMonths]=\"displayMonths()\">\n</ys-datepicker-jalali>\n\n}\n\n@else {\n\n<ys-datepicker-gregorian [disabled]=\"isDisabled()\" [firstDayOfWeek]=\"firstDayOfWeek() ?? 1\"\n [weekend]=\"weekend() ?? [6,7]\" [showFooter]=\"showFooter()\" [todayLabel]=\"todayLabel() ?? 'Today'\" [rangeMode]=\"true\"\n [fromDate]=\"fromDate()\" [toDate]=\"toDate()\" [hoveredDate]=\"hoveredDate()\" (dateSelect)=\"select($event)\"\n (dateHover)=\"hover($event)\" [outsideDays]=\"outsideDays()\" [displayMonths]=\"displayMonths()\">\n</ys-datepicker-gregorian>\n\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: YsDatepickerGregorian, selector: "ys-datepicker-gregorian", inputs: ["value", "disabled", "firstDayOfWeek", "weekend", "showFooter", "todayLabel", "outsideDays", "displayMonths", "rangeMode", "fromDate", "toDate", "hoveredDate"], outputs: ["valueChange", "dateSelect", "dateHover"] }, { kind: "component", type: YsDatepickerJalali, selector: "ys-datepicker-jalali", inputs: ["value", "disabled", "firstDayOfWeek", "weekend", "showFooter", "todayLabel", "outsideDays", "displayMonths", "rangeMode", "fromDate", "toDate", "hoveredDate"], outputs: ["valueChange", "dateSelect", "dateHover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
475
532
|
}
|
|
476
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepickerRange, decorators: [{
|
|
477
534
|
type: Component,
|
|
478
535
|
args: [{ selector: 'ys-datepicker-range', imports: [
|
|
479
536
|
FormsModule,
|
|
@@ -489,24 +546,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
489
546
|
}], propDecorators: { calendarType: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarType", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], weekend: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekend", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], outsideDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "outsideDays", required: false }] }], displayMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMonths", required: false }] }] } });
|
|
490
547
|
|
|
491
548
|
class YsDatepickerRangePopup {
|
|
492
|
-
calendarType = input('gregorian',
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
549
|
+
calendarType = input('gregorian', /* @ts-ignore */
|
|
550
|
+
...(ngDevMode ? [{ debugName: "calendarType" }] : /* istanbul ignore next */ []));
|
|
551
|
+
disabled = input(false, /* @ts-ignore */
|
|
552
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
553
|
+
readonly = input(false, /* @ts-ignore */
|
|
554
|
+
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
555
|
+
placeholder = input('Select date range', /* @ts-ignore */
|
|
556
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
557
|
+
firstDayOfWeek = input(/* @ts-ignore */
|
|
558
|
+
...(ngDevMode ? [undefined, { debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []));
|
|
559
|
+
weekend = input(/* @ts-ignore */
|
|
560
|
+
...(ngDevMode ? [undefined, { debugName: "weekend" }] : /* istanbul ignore next */ []));
|
|
561
|
+
showFooter = input(true, /* @ts-ignore */
|
|
562
|
+
...(ngDevMode ? [{ debugName: "showFooter" }] : /* istanbul ignore next */ []));
|
|
563
|
+
todayLabel = input(/* @ts-ignore */
|
|
564
|
+
...(ngDevMode ? [undefined, { debugName: "todayLabel" }] : /* istanbul ignore next */ []));
|
|
565
|
+
outsideDays = input('visible', /* @ts-ignore */
|
|
566
|
+
...(ngDevMode ? [{ debugName: "outsideDays" }] : /* istanbul ignore next */ []));
|
|
567
|
+
displayMonths = input(2, /* @ts-ignore */
|
|
568
|
+
...(ngDevMode ? [{ debugName: "displayMonths" }] : /* istanbul ignore next */ []));
|
|
569
|
+
autoClose = input(true, /* @ts-ignore */
|
|
570
|
+
...(ngDevMode ? [{ debugName: "autoClose" }] : /* istanbul ignore next */ []));
|
|
571
|
+
container = input(null, /* @ts-ignore */
|
|
572
|
+
...(ngDevMode ? [{ debugName: "container" }] : /* istanbul ignore next */ []));
|
|
573
|
+
calendarIconClass = input('fa fa-calendar', /* @ts-ignore */
|
|
574
|
+
...(ngDevMode ? [{ debugName: "calendarIconClass" }] : /* istanbul ignore next */ []));
|
|
575
|
+
clearIconClass = input('fa fa-xmark', /* @ts-ignore */
|
|
576
|
+
...(ngDevMode ? [{ debugName: "clearIconClass" }] : /* istanbul ignore next */ []));
|
|
577
|
+
disabledState = signal(false, /* @ts-ignore */
|
|
578
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
507
579
|
isDisabled = computed(() => this.disabled() ||
|
|
508
|
-
this.disabledState(),
|
|
509
|
-
|
|
580
|
+
this.disabledState(), /* @ts-ignore */
|
|
581
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
582
|
+
value = signal(null, /* @ts-ignore */
|
|
583
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
510
584
|
displayValue = computed(() => {
|
|
511
585
|
const range = this.value();
|
|
512
586
|
if (!range?.from) {
|
|
@@ -516,7 +590,8 @@ class YsDatepickerRangePopup {
|
|
|
516
590
|
return this.formatDate(range.from);
|
|
517
591
|
}
|
|
518
592
|
return `${this.formatDate(range.from)} - ${this.formatDate(range.to)}`;
|
|
519
|
-
},
|
|
593
|
+
}, /* @ts-ignore */
|
|
594
|
+
...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
|
|
520
595
|
onChange = (_) => { };
|
|
521
596
|
onTouched = () => { };
|
|
522
597
|
writeValue(value) {
|
|
@@ -554,8 +629,8 @@ class YsDatepickerRangePopup {
|
|
|
554
629
|
const day = String(value.getDate()).padStart(2, '0');
|
|
555
630
|
return `${year}/${month}/${day}`;
|
|
556
631
|
}
|
|
557
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
558
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
632
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepickerRangePopup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
633
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: YsDatepickerRangePopup, isStandalone: true, selector: "ys-datepicker-range-popup", inputs: { calendarType: { classPropertyName: "calendarType", publicName: "calendarType", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, weekend: { classPropertyName: "weekend", publicName: "weekend", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, outsideDays: { classPropertyName: "outsideDays", publicName: "outsideDays", isSignal: true, isRequired: false, transformFunction: null }, displayMonths: { classPropertyName: "displayMonths", publicName: "displayMonths", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, calendarIconClass: { classPropertyName: "calendarIconClass", publicName: "calendarIconClass", isSignal: true, isRequired: false, transformFunction: null }, clearIconClass: { classPropertyName: "clearIconClass", publicName: "clearIconClass", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
559
634
|
{
|
|
560
635
|
provide: NG_VALUE_ACCESSOR,
|
|
561
636
|
useExisting: forwardRef(() => YsDatepickerRangePopup),
|
|
@@ -563,7 +638,7 @@ class YsDatepickerRangePopup {
|
|
|
563
638
|
}
|
|
564
639
|
], ngImport: i0, template: "<div ngbDropdown #dropdown=\"ngbDropdown\" class=\"ys-datepicker-range-popup\" [container]=\"container()\">\n\n <div class=\"input-group\">\n\n <input type=\"text\" class=\"form-control\" readonly ngbDropdownToggle [value]=\"displayValue()\"\n [readonly]=\"readonly()\" [placeholder]=\"placeholder()\" [disabled]=\"isDisabled()\" />\n\n @if(value()) {\n\n <button type=\"button\" class=\"btn btn-outline-secondary\" [disabled]=\"isDisabled()\" (click)=\"clear($event)\">\n <i [class]=\"clearIconClass()\"></i>\n </button>\n\n }\n\n <button type=\"button\" class=\"btn btn-outline-secondary\" [disabled]=\"isDisabled()\" ngbDropdownToggle>\n <i [class]=\"calendarIconClass()\"></i>\n </button>\n\n </div>\n\n <div ngbDropdownMenu class=\"p-0 border-0 shadow\">\n\n <ys-datepicker-range [calendarType]=\"calendarType()\" [disabled]=\"isDisabled()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\" [weekend]=\"weekend()\" [showFooter]=\"showFooter()\"\n [todayLabel]=\"todayLabel()\" [ngModel]=\"value()\" (ngModelChange)=\"valueChanged($event, dropdown)\"\n [outsideDays]=\"outsideDays()\" [displayMonths]=\"displayMonths()\">\n </ys-datepicker-range>\n\n </div>\n\n</div>", styles: [":host{display:block}.ys-datepicker-range-popup{width:100%}.ys-datepicker-range-popup .dropdown-toggle:after{display:none}.input-group{width:100%}.form-control[readonly]{cursor:pointer}.ys-datepicker-range-popup .input-group>input.dropdown-toggle{border-start-end-radius:0;border-end-end-radius:0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NgbDropdownModule }, { kind: "directive", type: i1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "component", type: YsDatepickerRange, selector: "ys-datepicker-range", inputs: ["calendarType", "disabled", "firstDayOfWeek", "weekend", "showFooter", "todayLabel", "outsideDays", "displayMonths"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
565
640
|
}
|
|
566
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepickerRangePopup, decorators: [{
|
|
567
642
|
type: Component,
|
|
568
643
|
args: [{ selector: 'ys-datepicker-range-popup', imports: [
|
|
569
644
|
FormsModule,
|
|
@@ -579,17 +654,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
579
654
|
}], propDecorators: { calendarType: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarType", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], weekend: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekend", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], outsideDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "outsideDays", required: false }] }], displayMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMonths", required: false }] }], autoClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClose", required: false }] }], container: [{ type: i0.Input, args: [{ isSignal: true, alias: "container", required: false }] }], calendarIconClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarIconClass", required: false }] }], clearIconClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearIconClass", required: false }] }] } });
|
|
580
655
|
|
|
581
656
|
class YsDatepicker {
|
|
582
|
-
calendarType = input('gregorian',
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
657
|
+
calendarType = input('gregorian', /* @ts-ignore */
|
|
658
|
+
...(ngDevMode ? [{ debugName: "calendarType" }] : /* istanbul ignore next */ []));
|
|
659
|
+
disabled = input(false, /* @ts-ignore */
|
|
660
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
661
|
+
firstDayOfWeek = input(/* @ts-ignore */
|
|
662
|
+
...(ngDevMode ? [undefined, { debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []));
|
|
663
|
+
weekend = input(/* @ts-ignore */
|
|
664
|
+
...(ngDevMode ? [undefined, { debugName: "weekend" }] : /* istanbul ignore next */ []));
|
|
665
|
+
showFooter = input(true, /* @ts-ignore */
|
|
666
|
+
...(ngDevMode ? [{ debugName: "showFooter" }] : /* istanbul ignore next */ []));
|
|
667
|
+
todayLabel = input(/* @ts-ignore */
|
|
668
|
+
...(ngDevMode ? [undefined, { debugName: "todayLabel" }] : /* istanbul ignore next */ []));
|
|
669
|
+
outsideDays = input('visible', /* @ts-ignore */
|
|
670
|
+
...(ngDevMode ? [{ debugName: "outsideDays" }] : /* istanbul ignore next */ []));
|
|
671
|
+
disabledState = signal(false, /* @ts-ignore */
|
|
672
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
590
673
|
isDisabled = computed(() => this.disabled() ||
|
|
591
|
-
this.disabledState(),
|
|
592
|
-
|
|
674
|
+
this.disabledState(), /* @ts-ignore */
|
|
675
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
676
|
+
value = signal(null, /* @ts-ignore */
|
|
677
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
593
678
|
onChange = (_) => { };
|
|
594
679
|
onTouched = () => { };
|
|
595
680
|
writeValue(value) {
|
|
@@ -609,8 +694,8 @@ class YsDatepicker {
|
|
|
609
694
|
this.onChange(value);
|
|
610
695
|
this.onTouched();
|
|
611
696
|
}
|
|
612
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
613
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
697
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
698
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: YsDatepicker, isStandalone: true, selector: "ys-datepicker", inputs: { calendarType: { classPropertyName: "calendarType", publicName: "calendarType", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, weekend: { classPropertyName: "weekend", publicName: "weekend", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, outsideDays: { classPropertyName: "outsideDays", publicName: "outsideDays", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
614
699
|
{
|
|
615
700
|
provide: NG_VALUE_ACCESSOR,
|
|
616
701
|
useExisting: forwardRef(() => YsDatepicker),
|
|
@@ -618,7 +703,7 @@ class YsDatepicker {
|
|
|
618
703
|
}
|
|
619
704
|
], ngImport: i0, template: "@if(calendarType() === 'jalali') {\n\n<ys-datepicker-jalali [value]=\"value()\" [disabled]=\"isDisabled()\" [firstDayOfWeek]=\"firstDayOfWeek() ?? 6\"\n [weekend]=\"weekend() ?? [5]\" [showFooter]=\"showFooter()\" [todayLabel]=\"todayLabel() ?? '\u0627\u0645\u0631\u0648\u0632'\"\n (valueChange)=\"valueChanged($event)\" [outsideDays]=\"outsideDays()\">\n</ys-datepicker-jalali>\n\n}\n@else {\n\n<ys-datepicker-gregorian [value]=\"value()\" [disabled]=\"isDisabled()\" [firstDayOfWeek]=\"firstDayOfWeek() ?? 1\"\n [weekend]=\"weekend() ?? [6,7]\" [showFooter]=\"showFooter()\" [todayLabel]=\"todayLabel() ?? 'Today'\"\n (valueChange)=\"valueChanged($event)\" [outsideDays]=\"outsideDays()\">\n</ys-datepicker-gregorian>\n\n}", styles: [""], dependencies: [{ kind: "component", type: YsDatepickerGregorian, selector: "ys-datepicker-gregorian", inputs: ["value", "disabled", "firstDayOfWeek", "weekend", "showFooter", "todayLabel", "outsideDays", "displayMonths", "rangeMode", "fromDate", "toDate", "hoveredDate"], outputs: ["valueChange", "dateSelect", "dateHover"] }, { kind: "component", type: YsDatepickerJalali, selector: "ys-datepicker-jalali", inputs: ["value", "disabled", "firstDayOfWeek", "weekend", "showFooter", "todayLabel", "outsideDays", "displayMonths", "rangeMode", "fromDate", "toDate", "hoveredDate"], outputs: ["valueChange", "dateSelect", "dateHover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
620
705
|
}
|
|
621
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: YsDatepicker, decorators: [{
|
|
622
707
|
type: Component,
|
|
623
708
|
args: [{ selector: 'ys-datepicker', imports: [
|
|
624
709
|
YsDatepickerGregorian,
|