ng-primitives 0.120.4 → 0.121.0
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/example-theme/index.css +9 -0
- package/fesm2022/ng-primitives-a11y.mjs +5 -5
- package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
- package/fesm2022/ng-primitives-accordion.mjs +34 -51
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-ai.mjs +39 -52
- package/fesm2022/ng-primitives-ai.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +4 -4
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
- package/fesm2022/ng-primitives-avatar.mjs +14 -17
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-breadcrumbs.mjs +21 -21
- package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +7 -9
- package/fesm2022/ng-primitives-button.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +15 -30
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-combobox.mjs +60 -92
- package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/ng-primitives-common.mjs +4 -4
- package/fesm2022/ng-primitives-common.mjs.map +1 -1
- package/fesm2022/ng-primitives-context-menu.mjs +68 -121
- package/fesm2022/ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +91 -115
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-dialog.mjs +35 -51
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +26 -53
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +5 -8
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +39 -44
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input-otp.mjs +30 -43
- package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +6 -8
- package/fesm2022/ng-primitives-input.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +31 -48
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +39 -35
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-listbox.mjs +34 -48
- package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +85 -151
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-meter.mjs +25 -36
- package/fesm2022/ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/ng-primitives-navigation-menu.mjs +60 -108
- package/fesm2022/ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-number-field.mjs +35 -59
- package/fesm2022/ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-pagination.mjs +270 -297
- package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +209 -223
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +88 -59
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +30 -41
- package/fesm2022/ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/ng-primitives-radio.mjs +20 -30
- package/fesm2022/ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/ng-primitives-resize.mjs +3 -3
- package/fesm2022/ng-primitives-resize.mjs.map +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs +20 -34
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +9 -9
- package/fesm2022/ng-primitives-search.mjs.map +1 -1
- package/fesm2022/ng-primitives-select.mjs +720 -620
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-separator.mjs +4 -6
- package/fesm2022/ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +63 -100
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +3 -3
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +15 -21
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +31 -41
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +5 -7
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +30 -23
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +20 -36
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +10 -19
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-toolbar.mjs +4 -6
- package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +401 -402
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +5 -4
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/package.json +56 -55
- package/schematics/ng-generate/templates/select/select.__fileSuffix@dasherize__.ts.template +48 -48
- package/{a11y/index.d.ts → types/ng-primitives-a11y.d.ts} +18 -24
- package/{accordion/index.d.ts → types/ng-primitives-accordion.d.ts} +85 -98
- package/{autofill/index.d.ts → types/ng-primitives-autofill.d.ts} +3 -10
- package/{avatar/index.d.ts → types/ng-primitives-avatar.d.ts} +7 -30
- package/{breadcrumbs/index.d.ts → types/ng-primitives-breadcrumbs.d.ts} +15 -70
- package/{button/index.d.ts → types/ng-primitives-button.d.ts} +23 -29
- package/{checkbox/index.d.ts → types/ng-primitives-checkbox.d.ts} +68 -74
- package/{combobox/index.d.ts → types/ng-primitives-combobox.d.ts} +35 -35
- package/{context-menu/index.d.ts → types/ng-primitives-context-menu.d.ts} +2 -1
- package/{date-picker/index.d.ts → types/ng-primitives-date-picker.d.ts} +2 -2
- package/{dialog/index.d.ts → types/ng-primitives-dialog.d.ts} +7 -2
- package/{file-upload/index.d.ts → types/ng-primitives-file-upload.d.ts} +5 -20
- package/{focus-trap/index.d.ts → types/ng-primitives-focus-trap.d.ts} +3 -10
- package/{form-field/index.d.ts → types/ng-primitives-form-field.d.ts} +9 -40
- package/{input/index.d.ts → types/ng-primitives-input.d.ts} +3 -10
- package/{menu/index.d.ts → types/ng-primitives-menu.d.ts} +17 -63
- package/{navigation-menu/index.d.ts → types/ng-primitives-navigation-menu.d.ts} +15 -70
- package/{number-field/index.d.ts → types/ng-primitives-number-field.d.ts} +80 -110
- package/types/ng-primitives-pagination.d.ts +502 -0
- package/{popover/index.d.ts → types/ng-primitives-popover.d.ts} +244 -57
- package/{portal/index.d.ts → types/ng-primitives-portal.d.ts} +22 -13
- package/{progress/index.d.ts → types/ng-primitives-progress.d.ts} +3 -10
- package/{roving-focus/index.d.ts → types/ng-primitives-roving-focus.d.ts} +65 -79
- package/types/ng-primitives-select.d.ts +687 -0
- package/{separator/index.d.ts → types/ng-primitives-separator.d.ts} +3 -10
- package/{slider/index.d.ts → types/ng-primitives-slider.d.ts} +76 -138
- package/{state/index.d.ts → types/ng-primitives-state.d.ts} +26 -21
- package/{switch/index.d.ts → types/ng-primitives-switch.d.ts} +50 -64
- package/{tabs/index.d.ts → types/ng-primitives-tabs.d.ts} +9 -40
- package/{textarea/index.d.ts → types/ng-primitives-textarea.d.ts} +3 -10
- package/{toast/index.d.ts → types/ng-primitives-toast.d.ts} +13 -1
- package/{toggle-group/index.d.ts → types/ng-primitives-toggle-group.d.ts} +75 -89
- package/{toggle/index.d.ts → types/ng-primitives-toggle.d.ts} +50 -56
- package/{toolbar/index.d.ts → types/ng-primitives-toolbar.d.ts} +3 -10
- package/types/ng-primitives-tooltip.d.ts +691 -0
- package/pagination/index.d.ts +0 -211
- package/select/index.d.ts +0 -396
- package/tooltip/index.d.ts +0 -384
- /package/{ai/index.d.ts → types/ng-primitives-ai.d.ts} +0 -0
- /package/{common/index.d.ts → types/ng-primitives-common.d.ts} +0 -0
- /package/{date-time-luxon/index.d.ts → types/ng-primitives-date-time-luxon.d.ts} +0 -0
- /package/{date-time/index.d.ts → types/ng-primitives-date-time.d.ts} +0 -0
- /package/{input-otp/index.d.ts → types/ng-primitives-input-otp.d.ts} +0 -0
- /package/{interactions/index.d.ts → types/ng-primitives-interactions.d.ts} +0 -0
- /package/{internal/index.d.ts → types/ng-primitives-internal.d.ts} +0 -0
- /package/{listbox/index.d.ts → types/ng-primitives-listbox.d.ts} +0 -0
- /package/{meter/index.d.ts → types/ng-primitives-meter.d.ts} +0 -0
- /package/{radio/index.d.ts → types/ng-primitives-radio.d.ts} +0 -0
- /package/{resize/index.d.ts → types/ng-primitives-resize.d.ts} +0 -0
- /package/{search/index.d.ts → types/ng-primitives-search.d.ts} +0 -0
- /package/{utils/index.d.ts → types/ng-primitives-utils.d.ts} +0 -0
- /package/{index.d.ts → types/ng-primitives.d.ts} +0 -0
|
@@ -113,10 +113,10 @@ class NgpDatePickerCellRender {
|
|
|
113
113
|
ngOnDestroy() {
|
|
114
114
|
this.viewRefs.forEach(viewRef => viewRef.destroy());
|
|
115
115
|
}
|
|
116
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
117
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
116
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerCellRender, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
117
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpDatePickerCellRender, isStandalone: true, selector: "[ngpDatePickerCellRender]", providers: [{ provide: NgpDatePickerCellRenderToken, useExisting: NgpDatePickerCellRender }], exportAs: ["ngpDatePickerCellRender"], ngImport: i0 }); }
|
|
118
118
|
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerCellRender, decorators: [{
|
|
120
120
|
type: Directive,
|
|
121
121
|
args: [{
|
|
122
122
|
selector: '[ngpDatePickerCellRender]',
|
|
@@ -180,18 +180,16 @@ class NgpDatePickerCell {
|
|
|
180
180
|
/**
|
|
181
181
|
* Access the child date picker date button.
|
|
182
182
|
*/
|
|
183
|
-
this.datePickerButton = contentChild(NgpDatePickerDateButtonToken, ...(ngDevMode ?
|
|
184
|
-
descendants: true,
|
|
185
|
-
}]));
|
|
183
|
+
this.datePickerButton = contentChild(NgpDatePickerDateButtonToken, { ...(ngDevMode ? { debugName: "datePickerButton" } : /* istanbul ignore next */ {}), descendants: true });
|
|
186
184
|
/**
|
|
187
185
|
* Access the label id.
|
|
188
186
|
*/
|
|
189
|
-
this.labelId = computed(() => this.state().label()?.id(), ...(ngDevMode ? [{ debugName: "labelId" }] : []));
|
|
187
|
+
this.labelId = computed(() => this.state().label()?.id(), ...(ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []));
|
|
190
188
|
}
|
|
191
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
192
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
189
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerCell, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
190
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.14", type: NgpDatePickerCell, isStandalone: true, selector: "[ngpDatePickerCell]", host: { attributes: { "role": "gridcell" }, properties: { "attr.data-selected": "datePickerButton()?.selected() ? \"\" : null", "attr.aria-selected": "datePickerButton()?.selected()", "attr.aria-disabled": "datePickerButton()?.disabled()", "attr.data-disabled": "datePickerButton()?.disabled() ? \"\" : null", "attr.aria-labelledby": "labelId()" } }, queries: [{ propertyName: "datePickerButton", first: true, predicate: NgpDatePickerDateButtonToken, descendants: true, isSignal: true }], exportAs: ["ngpDatePickerCell"], ngImport: i0 }); }
|
|
193
191
|
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerCell, decorators: [{
|
|
195
193
|
type: Directive,
|
|
196
194
|
args: [{
|
|
197
195
|
selector: '[ngpDatePickerCell]',
|
|
@@ -237,32 +235,32 @@ class NgpDatePickerDateButton {
|
|
|
237
235
|
/**
|
|
238
236
|
* Determine if this is the focused date.
|
|
239
237
|
*/
|
|
240
|
-
this.focused = computed(() => this.dateAdapter.isSameDay(this.date, this.state().focusedDate()), ...(ngDevMode ? [{ debugName: "focused" }] : []));
|
|
238
|
+
this.focused = computed(() => this.dateAdapter.isSameDay(this.date, this.state().focusedDate()), ...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
241
239
|
/**
|
|
242
240
|
* Determine if this is the selected date.
|
|
243
241
|
* @internal
|
|
244
242
|
*/
|
|
245
|
-
this.selected = computed(() => this.state().isSelected(this.date), ...(ngDevMode ? [{ debugName: "selected" }] : []));
|
|
243
|
+
this.selected = computed(() => this.state().isSelected(this.date), ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
246
244
|
/**
|
|
247
245
|
* Determine if this is the start date of the range.
|
|
248
246
|
*/
|
|
249
|
-
this.start = computed(() => this.state().isStartOfRange(this.date), ...(ngDevMode ? [{ debugName: "start" }] : []));
|
|
247
|
+
this.start = computed(() => this.state().isStartOfRange(this.date), ...(ngDevMode ? [{ debugName: "start" }] : /* istanbul ignore next */ []));
|
|
250
248
|
/**
|
|
251
249
|
* Determine if this is the end date of the range.
|
|
252
250
|
*/
|
|
253
|
-
this.end = computed(() => this.state().isEndOfRange(this.date), ...(ngDevMode ? [{ debugName: "end" }] : []));
|
|
251
|
+
this.end = computed(() => this.state().isEndOfRange(this.date), ...(ngDevMode ? [{ debugName: "end" }] : /* istanbul ignore next */ []));
|
|
254
252
|
/**
|
|
255
253
|
* Determine if this is between the start and end dates of the range.
|
|
256
254
|
*/
|
|
257
|
-
this.betweenRange = computed(() => this.state().isBetweenRange(this.date), ...(ngDevMode ? [{ debugName: "betweenRange" }] : []));
|
|
255
|
+
this.betweenRange = computed(() => this.state().isBetweenRange(this.date), ...(ngDevMode ? [{ debugName: "betweenRange" }] : /* istanbul ignore next */ []));
|
|
258
256
|
/**
|
|
259
257
|
* Determine if this date is outside the current month.
|
|
260
258
|
*/
|
|
261
|
-
this.outside = computed(() => !this.dateAdapter.isSameMonth(this.date, this.state().focusedDate()), ...(ngDevMode ? [{ debugName: "outside" }] : []));
|
|
259
|
+
this.outside = computed(() => !this.dateAdapter.isSameMonth(this.date, this.state().focusedDate()), ...(ngDevMode ? [{ debugName: "outside" }] : /* istanbul ignore next */ []));
|
|
262
260
|
/**
|
|
263
261
|
* Determine if this date is today.
|
|
264
262
|
*/
|
|
265
|
-
this.today = computed(() => this.dateAdapter.isSameDay(this.date, this.dateAdapter.now()), ...(ngDevMode ? [{ debugName: "today" }] : []));
|
|
263
|
+
this.today = computed(() => this.dateAdapter.isSameDay(this.date, this.dateAdapter.now()), ...(ngDevMode ? [{ debugName: "today" }] : /* istanbul ignore next */ []));
|
|
266
264
|
/**
|
|
267
265
|
* Determine if this date is disabled.
|
|
268
266
|
* @internal
|
|
@@ -280,7 +278,7 @@ class NgpDatePickerDateButton {
|
|
|
280
278
|
return true;
|
|
281
279
|
}
|
|
282
280
|
return false;
|
|
283
|
-
}, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
281
|
+
}, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
284
282
|
/**
|
|
285
283
|
* Determine if the element is a button.
|
|
286
284
|
*/
|
|
@@ -425,10 +423,10 @@ class NgpDatePickerDateButton {
|
|
|
425
423
|
getDirection() {
|
|
426
424
|
return getComputedStyle(this.elementRef.nativeElement).direction === 'rtl' ? 'rtl' : 'ltr';
|
|
427
425
|
}
|
|
428
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
429
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
426
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerDateButton, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
427
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpDatePickerDateButton, isStandalone: true, selector: "[ngpDatePickerDateButton]", host: { listeners: { "click": "select()", "keydown.enter": "select($event)", "keydown.space": "select($event)", "keydown.arrowLeft": "focusPrevious($event)", "keydown.arrowRight": "focusNext($event)", "keydown.arrowUp": "focusAbove($event)", "keydown.arrowDown": "focusBelow($event)", "keydown.home": "focusFirst($event)", "keydown.end": "focusLast($event)", "keydown.pageUp": "focusPreviousMonth($event)", "keydown.pageDown": "focusNextMonth($event)" }, properties: { "attr.role": "!isButton ? \"button\" : null", "attr.tabindex": "focused() ? 0 : -1", "attr.data-selected": "selected() ? \"\" : null", "attr.aria-disabled": "disabled()", "attr.data-outside-month": "outside() ? \"\" : null", "attr.data-today": "today() ? \"\" : null", "attr.data-range-start": "start() ? \"\" : null", "attr.data-range-end": "end() ? \"\" : null", "attr.data-range-between": "betweenRange() ? \"\" : null" } }, providers: [{ provide: NgpDatePickerDateButtonToken, useExisting: NgpDatePickerDateButton }], exportAs: ["ngpDatePickerDateButton"], ngImport: i0 }); }
|
|
430
428
|
}
|
|
431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerDateButton, decorators: [{
|
|
432
430
|
type: Directive,
|
|
433
431
|
args: [{
|
|
434
432
|
selector: '[ngpDatePickerDateButton]',
|
|
@@ -493,12 +491,12 @@ class NgpDatePickerGrid {
|
|
|
493
491
|
/**
|
|
494
492
|
* Determine the id for the label.
|
|
495
493
|
*/
|
|
496
|
-
this.labelId = computed(() => this.state().label()?.id(), ...(ngDevMode ? [{ debugName: "labelId" }] : []));
|
|
494
|
+
this.labelId = computed(() => this.state().label()?.id(), ...(ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []));
|
|
497
495
|
}
|
|
498
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
499
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
496
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerGrid, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
497
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpDatePickerGrid, isStandalone: true, selector: "[ngpDatePickerGrid]", host: { attributes: { "role": "grid" }, properties: { "attr.aria-labelledby": "labelId()", "attr.data-disabled": "state().disabled() ? \"\" : null" } }, exportAs: ["ngpDatePickerGrid"], ngImport: i0 }); }
|
|
500
498
|
}
|
|
501
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
499
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerGrid, decorators: [{
|
|
502
500
|
type: Directive,
|
|
503
501
|
args: [{
|
|
504
502
|
selector: '[ngpDatePickerGrid]',
|
|
@@ -531,18 +529,16 @@ class NgpDatePickerLabel {
|
|
|
531
529
|
/**
|
|
532
530
|
* Define a unique id for the label.
|
|
533
531
|
*/
|
|
534
|
-
this.id = input(uniqueId('ngp-date-picker-label'), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
532
|
+
this.id = input(uniqueId('ngp-date-picker-label'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
535
533
|
/**
|
|
536
534
|
* Define the aria live attribute.
|
|
537
535
|
*/
|
|
538
|
-
this.ariaLive = input('polite', ...(ngDevMode ?
|
|
539
|
-
alias: 'aria-live',
|
|
540
|
-
}]));
|
|
536
|
+
this.ariaLive = input('polite', { ...(ngDevMode ? { debugName: "ariaLive" } : /* istanbul ignore next */ {}), alias: 'aria-live' });
|
|
541
537
|
}
|
|
542
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
543
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
538
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
539
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpDatePickerLabel, isStandalone: true, selector: "[ngpDatePickerLabel]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLive: { classPropertyName: "ariaLive", publicName: "aria-live", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "id()", "attr.aria-live": "ariaLive()", "attr.data-disabled": "state().disabled() ? \"\" : null" } }, providers: [{ provide: NgpDatePickerLabelToken, useExisting: NgpDatePickerLabel }], exportAs: ["ngpDatePickerLabel"], ngImport: i0 }); }
|
|
544
540
|
}
|
|
545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerLabel, decorators: [{
|
|
546
542
|
type: Directive,
|
|
547
543
|
args: [{
|
|
548
544
|
selector: '[ngpDatePickerLabel]',
|
|
@@ -597,7 +593,7 @@ class NgpDatePickerNextMonth {
|
|
|
597
593
|
return true;
|
|
598
594
|
}
|
|
599
595
|
return false;
|
|
600
|
-
}, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
596
|
+
}, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
601
597
|
ngpButton({ disabled: this.disabled });
|
|
602
598
|
}
|
|
603
599
|
/**
|
|
@@ -607,22 +603,29 @@ class NgpDatePickerNextMonth {
|
|
|
607
603
|
if (this.disabled()) {
|
|
608
604
|
return;
|
|
609
605
|
}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
606
|
+
const focusedDate = this.state().focusedDate();
|
|
607
|
+
const day = this.dateAdapter.getDate(focusedDate);
|
|
608
|
+
// Move to the first day of the next month before restoring the focused day,
|
|
609
|
+
// otherwise a focused date such as the 31st would overflow into the month
|
|
610
|
+
// after next when the next month has fewer days.
|
|
611
|
+
let date = this.dateAdapter.set(focusedDate, {
|
|
614
612
|
day: 1,
|
|
615
613
|
hour: 0,
|
|
616
614
|
minute: 0,
|
|
617
615
|
second: 0,
|
|
618
616
|
millisecond: 0,
|
|
619
617
|
});
|
|
618
|
+
date = this.dateAdapter.add(date, { months: 1 });
|
|
619
|
+
// Preserve the focused day, clamping to the last day of the month when the
|
|
620
|
+
// next month is shorter (e.g. 31 May -> 30 June).
|
|
621
|
+
const lastDay = this.dateAdapter.getDate(this.dateAdapter.endOfMonth(date));
|
|
622
|
+
date = this.dateAdapter.set(date, { day: Math.min(day, lastDay) });
|
|
620
623
|
this.state().setFocusedDate(date, 'mouse', 'forward');
|
|
621
624
|
}
|
|
622
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
623
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
625
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerNextMonth, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
626
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpDatePickerNextMonth, isStandalone: true, selector: "[ngpDatePickerNextMonth]", host: { listeners: { "click": "navigateToNextMonth()" }, properties: { "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.type": "isButton ? \"button\" : null" } }, exportAs: ["ngpDatePickerNextMonth"], ngImport: i0 }); }
|
|
624
627
|
}
|
|
625
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
628
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerNextMonth, decorators: [{
|
|
626
629
|
type: Directive,
|
|
627
630
|
args: [{
|
|
628
631
|
selector: '[ngpDatePickerNextMonth]',
|
|
@@ -679,7 +682,7 @@ class NgpDatePickerPreviousMonth {
|
|
|
679
682
|
return true;
|
|
680
683
|
}
|
|
681
684
|
return false;
|
|
682
|
-
}, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
685
|
+
}, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
683
686
|
ngpButton({ disabled: this.disabled });
|
|
684
687
|
}
|
|
685
688
|
/**
|
|
@@ -689,9 +692,12 @@ class NgpDatePickerPreviousMonth {
|
|
|
689
692
|
if (this.disabled()) {
|
|
690
693
|
return;
|
|
691
694
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
+
const focusedDate = this.state().focusedDate();
|
|
696
|
+
const day = this.dateAdapter.getDate(focusedDate);
|
|
697
|
+
// Move to the first day of the previous month before restoring the focused
|
|
698
|
+
// day, otherwise a focused date such as the 31st would overflow when the
|
|
699
|
+
// previous month has fewer days.
|
|
700
|
+
let date = this.dateAdapter.set(focusedDate, {
|
|
695
701
|
day: 1,
|
|
696
702
|
hour: 0,
|
|
697
703
|
minute: 0,
|
|
@@ -699,12 +705,16 @@ class NgpDatePickerPreviousMonth {
|
|
|
699
705
|
millisecond: 0,
|
|
700
706
|
});
|
|
701
707
|
date = this.dateAdapter.subtract(date, { months: 1 });
|
|
708
|
+
// Preserve the focused day, clamping to the last day of the month when the
|
|
709
|
+
// previous month is shorter (e.g. 31 March -> 28 February).
|
|
710
|
+
const lastDay = this.dateAdapter.getDate(this.dateAdapter.endOfMonth(date));
|
|
711
|
+
date = this.dateAdapter.set(date, { day: Math.min(day, lastDay) });
|
|
702
712
|
this.state().setFocusedDate(date, 'mouse', 'backward');
|
|
703
713
|
}
|
|
704
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
705
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
714
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerPreviousMonth, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
715
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpDatePickerPreviousMonth, isStandalone: true, selector: "[ngpDatePickerPreviousMonth]", host: { listeners: { "click": "navigateToPreviouMonth()" }, properties: { "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.type": "isButton ? \"button\" : null" } }, exportAs: ["ngpDatePickerPreviousMonth"], ngImport: i0 }); }
|
|
706
716
|
}
|
|
707
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerPreviousMonth, decorators: [{
|
|
708
718
|
type: Directive,
|
|
709
719
|
args: [{
|
|
710
720
|
selector: '[ngpDatePickerPreviousMonth]',
|
|
@@ -771,7 +781,7 @@ class NgpDatePickerRowRender {
|
|
|
771
781
|
firstDay = this.dateAdapter.add(firstDay, { days: 1 });
|
|
772
782
|
}
|
|
773
783
|
return days;
|
|
774
|
-
}, ...(ngDevMode ? [{ debugName: "days" }] : []));
|
|
784
|
+
}, ...(ngDevMode ? [{ debugName: "days" }] : /* istanbul ignore next */ []));
|
|
775
785
|
// get the weeks to display.
|
|
776
786
|
this.weeks = computed(() => {
|
|
777
787
|
const days = this.days();
|
|
@@ -780,7 +790,7 @@ class NgpDatePickerRowRender {
|
|
|
780
790
|
weeks.push(days.slice(i, i + 7));
|
|
781
791
|
}
|
|
782
792
|
return weeks;
|
|
783
|
-
}, ...(ngDevMode ? [{ debugName: "weeks" }] : []));
|
|
793
|
+
}, ...(ngDevMode ? [{ debugName: "weeks" }] : /* istanbul ignore next */ []));
|
|
784
794
|
/**
|
|
785
795
|
* Store the embedded view refs of each rendered row.
|
|
786
796
|
*/
|
|
@@ -859,10 +869,10 @@ class NgpDatePickerRowRender {
|
|
|
859
869
|
const firstDay = this.state().firstDayOfWeek();
|
|
860
870
|
return (DAYS_PER_WEEK + firstDay + DAYS_PER_WEEK - 1 - lastDay) % DAYS_PER_WEEK;
|
|
861
871
|
}
|
|
862
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
863
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
872
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerRowRender, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
873
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: NgpDatePickerRowRender, isStandalone: true, selector: "[ngpDatePickerRowRender]", providers: [{ provide: NgpDatePickerRowRenderToken, useExisting: NgpDatePickerRowRender }], exportAs: ["ngpDatePickerRowRender"], ngImport: i0 }); }
|
|
864
874
|
}
|
|
865
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
875
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePickerRowRender, decorators: [{
|
|
866
876
|
type: Directive,
|
|
867
877
|
args: [{
|
|
868
878
|
selector: '[ngpDatePickerRowRender]',
|
|
@@ -904,29 +914,20 @@ class NgpDatePicker {
|
|
|
904
914
|
/**
|
|
905
915
|
* The minimum date that can be selected.
|
|
906
916
|
*/
|
|
907
|
-
this.min = input(undefined, ...(ngDevMode ?
|
|
908
|
-
alias: 'ngpDatePickerMin',
|
|
909
|
-
}]));
|
|
917
|
+
this.min = input(undefined, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), alias: 'ngpDatePickerMin' });
|
|
910
918
|
/**
|
|
911
919
|
* The maximum date that can be selected.
|
|
912
920
|
*/
|
|
913
|
-
this.max = input(undefined, ...(ngDevMode ?
|
|
914
|
-
alias: 'ngpDatePickerMax',
|
|
915
|
-
}]));
|
|
921
|
+
this.max = input(undefined, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), alias: 'ngpDatePickerMax' });
|
|
916
922
|
/**
|
|
917
923
|
* Determine if the date picker is disabled.
|
|
918
924
|
*/
|
|
919
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
920
|
-
|
|
921
|
-
alias: 'ngpDatePickerDisabled',
|
|
922
|
-
transform: booleanAttribute,
|
|
923
|
-
}]));
|
|
925
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpDatePickerDisabled',
|
|
926
|
+
transform: booleanAttribute });
|
|
924
927
|
/**
|
|
925
928
|
* A function that is called to determine if a specific date should be disabled.
|
|
926
929
|
*/
|
|
927
|
-
this.dateDisabled = input(() => false, ...(ngDevMode ?
|
|
928
|
-
alias: 'ngpDatePickerDateDisabled',
|
|
929
|
-
}]));
|
|
930
|
+
this.dateDisabled = input(() => false, { ...(ngDevMode ? { debugName: "dateDisabled" } : /* istanbul ignore next */ {}), alias: 'ngpDatePickerDateDisabled' });
|
|
930
931
|
/**
|
|
931
932
|
* Sets which day starts the week in the calendar.
|
|
932
933
|
* Accepts 0-7 where 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday, 7=Sunday.
|
|
@@ -934,17 +935,12 @@ class NgpDatePicker {
|
|
|
934
935
|
* Note: Update calendar header column order when changing from Sunday start.
|
|
935
936
|
* @default 7 (Sunday)
|
|
936
937
|
*/
|
|
937
|
-
this.firstDayOfWeek = input(transformToFirstDayOfWeekNumber(this.config.firstDayOfWeek), ...(ngDevMode ?
|
|
938
|
-
|
|
939
|
-
alias: 'ngpDatePickerFirstDayOfWeek',
|
|
940
|
-
transform: transformToFirstDayOfWeekNumber,
|
|
941
|
-
}]));
|
|
938
|
+
this.firstDayOfWeek = input(transformToFirstDayOfWeekNumber(this.config.firstDayOfWeek), { ...(ngDevMode ? { debugName: "firstDayOfWeek" } : /* istanbul ignore next */ {}), alias: 'ngpDatePickerFirstDayOfWeek',
|
|
939
|
+
transform: transformToFirstDayOfWeekNumber });
|
|
942
940
|
/**
|
|
943
941
|
* The selected value.
|
|
944
942
|
*/
|
|
945
|
-
this.date = input(undefined, ...(ngDevMode ?
|
|
946
|
-
alias: 'ngpDatePickerDate',
|
|
947
|
-
}]));
|
|
943
|
+
this.date = input(undefined, { ...(ngDevMode ? { debugName: "date" } : /* istanbul ignore next */ {}), alias: 'ngpDatePickerDate' });
|
|
948
944
|
/**
|
|
949
945
|
* Emit when the date changes.
|
|
950
946
|
*/
|
|
@@ -954,9 +950,7 @@ class NgpDatePicker {
|
|
|
954
950
|
/**
|
|
955
951
|
* The focused value.
|
|
956
952
|
*/
|
|
957
|
-
this.focusedDate = input(this.dateAdapter.now(), ...(ngDevMode ?
|
|
958
|
-
alias: 'ngpDatePickerFocusedDate',
|
|
959
|
-
}]));
|
|
953
|
+
this.focusedDate = input(this.dateAdapter.now(), { ...(ngDevMode ? { debugName: "focusedDate" } : /* istanbul ignore next */ {}), alias: 'ngpDatePickerFocusedDate' });
|
|
960
954
|
/**
|
|
961
955
|
* Emit when the focused date changes.
|
|
962
956
|
*/
|
|
@@ -967,11 +961,11 @@ class NgpDatePicker {
|
|
|
967
961
|
* Detect the label element.
|
|
968
962
|
* @internal
|
|
969
963
|
*/
|
|
970
|
-
this.label = contentChild(NgpDatePickerLabelToken, ...(ngDevMode ?
|
|
964
|
+
this.label = contentChild(NgpDatePickerLabelToken, { ...(ngDevMode ? { debugName: "label" } : /* istanbul ignore next */ {}), descendants: true });
|
|
971
965
|
/**
|
|
972
966
|
* Access all the date picker buttons
|
|
973
967
|
*/
|
|
974
|
-
this.buttons = signal([], ...(ngDevMode ? [{ debugName: "buttons" }] : []));
|
|
968
|
+
this.buttons = signal([], ...(ngDevMode ? [{ debugName: "buttons" }] : /* istanbul ignore next */ []));
|
|
975
969
|
/**
|
|
976
970
|
* The date picker state.
|
|
977
971
|
*/
|
|
@@ -1091,10 +1085,10 @@ class NgpDatePicker {
|
|
|
1091
1085
|
isBetweenRange(_) {
|
|
1092
1086
|
return false;
|
|
1093
1087
|
}
|
|
1094
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1095
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
1088
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePicker, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1089
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.14", type: NgpDatePicker, isStandalone: true, selector: "[ngpDatePicker]", inputs: { min: { classPropertyName: "min", publicName: "ngpDatePickerMin", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "ngpDatePickerMax", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpDatePickerDisabled", isSignal: true, isRequired: false, transformFunction: null }, dateDisabled: { classPropertyName: "dateDisabled", publicName: "ngpDatePickerDateDisabled", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "ngpDatePickerFirstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "ngpDatePickerDate", isSignal: true, isRequired: false, transformFunction: null }, focusedDate: { classPropertyName: "focusedDate", publicName: "ngpDatePickerFocusedDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "ngpDatePickerDateChange", focusedDateChange: "ngpDatePickerFocusedDateChange" }, host: { properties: { "attr.data-disabled": "state.disabled() ? \"\" : null" } }, providers: [provideDatePickerState()], queries: [{ propertyName: "label", first: true, predicate: NgpDatePickerLabelToken, descendants: true, isSignal: true }], exportAs: ["ngpDatePicker"], ngImport: i0 }); }
|
|
1096
1090
|
}
|
|
1097
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDatePicker, decorators: [{
|
|
1098
1092
|
type: Directive,
|
|
1099
1093
|
args: [{
|
|
1100
1094
|
selector: '[ngpDatePicker]',
|
|
@@ -1120,29 +1114,20 @@ class NgpDateRangePicker {
|
|
|
1120
1114
|
/**
|
|
1121
1115
|
* The minimum date that can be selected.
|
|
1122
1116
|
*/
|
|
1123
|
-
this.min = input(undefined, ...(ngDevMode ?
|
|
1124
|
-
alias: 'ngpDateRangePickerMin',
|
|
1125
|
-
}]));
|
|
1117
|
+
this.min = input(undefined, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), alias: 'ngpDateRangePickerMin' });
|
|
1126
1118
|
/**
|
|
1127
1119
|
* The maximum date that can be selected.
|
|
1128
1120
|
*/
|
|
1129
|
-
this.max = input(undefined, ...(ngDevMode ?
|
|
1130
|
-
alias: 'ngpDateRangePickerMax',
|
|
1131
|
-
}]));
|
|
1121
|
+
this.max = input(undefined, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), alias: 'ngpDateRangePickerMax' });
|
|
1132
1122
|
/**
|
|
1133
1123
|
* Determine if the date picker is disabled.
|
|
1134
1124
|
*/
|
|
1135
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
1136
|
-
|
|
1137
|
-
alias: 'ngpDateRangePickerDisabled',
|
|
1138
|
-
transform: booleanAttribute,
|
|
1139
|
-
}]));
|
|
1125
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngpDateRangePickerDisabled',
|
|
1126
|
+
transform: booleanAttribute });
|
|
1140
1127
|
/**
|
|
1141
1128
|
* A function that is called to determine if a specific date should be disabled.
|
|
1142
1129
|
*/
|
|
1143
|
-
this.dateDisabled = input(() => false, ...(ngDevMode ?
|
|
1144
|
-
alias: 'ngpDateRangePickerDateDisabled',
|
|
1145
|
-
}]));
|
|
1130
|
+
this.dateDisabled = input(() => false, { ...(ngDevMode ? { debugName: "dateDisabled" } : /* istanbul ignore next */ {}), alias: 'ngpDateRangePickerDateDisabled' });
|
|
1146
1131
|
/**
|
|
1147
1132
|
* Sets which day starts the week in the calendar.
|
|
1148
1133
|
* Accepts 0-7 where 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday, 7=Sunday.
|
|
@@ -1150,17 +1135,12 @@ class NgpDateRangePicker {
|
|
|
1150
1135
|
* Note: Update calendar header column order when changing from Sunday start.
|
|
1151
1136
|
* @default 7 (Sunday)
|
|
1152
1137
|
*/
|
|
1153
|
-
this.firstDayOfWeek = input(transformToFirstDayOfWeekNumber(this.config.firstDayOfWeek), ...(ngDevMode ?
|
|
1154
|
-
|
|
1155
|
-
alias: 'ngpDateRangePickerFirstDayOfWeek',
|
|
1156
|
-
transform: transformToFirstDayOfWeekNumber,
|
|
1157
|
-
}]));
|
|
1138
|
+
this.firstDayOfWeek = input(transformToFirstDayOfWeekNumber(this.config.firstDayOfWeek), { ...(ngDevMode ? { debugName: "firstDayOfWeek" } : /* istanbul ignore next */ {}), alias: 'ngpDateRangePickerFirstDayOfWeek',
|
|
1139
|
+
transform: transformToFirstDayOfWeekNumber });
|
|
1158
1140
|
/**
|
|
1159
1141
|
* The selected start date
|
|
1160
1142
|
*/
|
|
1161
|
-
this.startDate = input(undefined, ...(ngDevMode ?
|
|
1162
|
-
alias: 'ngpDateRangePickerStartDate',
|
|
1163
|
-
}]));
|
|
1143
|
+
this.startDate = input(undefined, { ...(ngDevMode ? { debugName: "startDate" } : /* istanbul ignore next */ {}), alias: 'ngpDateRangePickerStartDate' });
|
|
1164
1144
|
/**
|
|
1165
1145
|
* Emit when the date changes.
|
|
1166
1146
|
*/
|
|
@@ -1170,9 +1150,7 @@ class NgpDateRangePicker {
|
|
|
1170
1150
|
/**
|
|
1171
1151
|
* The selected end date
|
|
1172
1152
|
*/
|
|
1173
|
-
this.endDate = input(undefined, ...(ngDevMode ?
|
|
1174
|
-
alias: 'ngpDateRangePickerEndDate',
|
|
1175
|
-
}]));
|
|
1153
|
+
this.endDate = input(undefined, { ...(ngDevMode ? { debugName: "endDate" } : /* istanbul ignore next */ {}), alias: 'ngpDateRangePickerEndDate' });
|
|
1176
1154
|
/**
|
|
1177
1155
|
* Emit when the end date changes.
|
|
1178
1156
|
*/
|
|
@@ -1182,9 +1160,7 @@ class NgpDateRangePicker {
|
|
|
1182
1160
|
/**
|
|
1183
1161
|
* The focused value.
|
|
1184
1162
|
*/
|
|
1185
|
-
this.focusedDate = input(this.dateAdapter.now(), ...(ngDevMode ?
|
|
1186
|
-
alias: 'ngpDateRangePickerFocusedDate',
|
|
1187
|
-
}]));
|
|
1163
|
+
this.focusedDate = input(this.dateAdapter.now(), { ...(ngDevMode ? { debugName: "focusedDate" } : /* istanbul ignore next */ {}), alias: 'ngpDateRangePickerFocusedDate' });
|
|
1188
1164
|
/**
|
|
1189
1165
|
* Emit when the focused date changes.
|
|
1190
1166
|
*/
|
|
@@ -1195,11 +1171,11 @@ class NgpDateRangePicker {
|
|
|
1195
1171
|
* Detect the label element.
|
|
1196
1172
|
* @internal
|
|
1197
1173
|
*/
|
|
1198
|
-
this.label = contentChild(NgpDatePickerLabelToken, ...(ngDevMode ?
|
|
1174
|
+
this.label = contentChild(NgpDatePickerLabelToken, { ...(ngDevMode ? { debugName: "label" } : /* istanbul ignore next */ {}), descendants: true });
|
|
1199
1175
|
/**
|
|
1200
1176
|
* Access all the date picker buttons
|
|
1201
1177
|
*/
|
|
1202
|
-
this.buttons = signal([], ...(ngDevMode ? [{ debugName: "buttons" }] : []));
|
|
1178
|
+
this.buttons = signal([], ...(ngDevMode ? [{ debugName: "buttons" }] : /* istanbul ignore next */ []));
|
|
1203
1179
|
/**
|
|
1204
1180
|
* The date range picker state.
|
|
1205
1181
|
*/
|
|
@@ -1379,10 +1355,10 @@ class NgpDateRangePicker {
|
|
|
1379
1355
|
}
|
|
1380
1356
|
return this.dateAdapter.isAfter(date, start) && this.dateAdapter.isBefore(date, end);
|
|
1381
1357
|
}
|
|
1382
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1383
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
1358
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDateRangePicker, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1359
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.14", type: NgpDateRangePicker, isStandalone: true, selector: "[ngpDateRangePicker]", inputs: { min: { classPropertyName: "min", publicName: "ngpDateRangePickerMin", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "ngpDateRangePickerMax", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpDateRangePickerDisabled", isSignal: true, isRequired: false, transformFunction: null }, dateDisabled: { classPropertyName: "dateDisabled", publicName: "ngpDateRangePickerDateDisabled", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "ngpDateRangePickerFirstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, startDate: { classPropertyName: "startDate", publicName: "ngpDateRangePickerStartDate", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "ngpDateRangePickerEndDate", isSignal: true, isRequired: false, transformFunction: null }, focusedDate: { classPropertyName: "focusedDate", publicName: "ngpDateRangePickerFocusedDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { startDateChange: "ngpDateRangePickerStartDateChange", endDateChange: "ngpDateRangePickerEndDateChange", focusedDateChange: "ngpDateRangePickerFocusedDateChange" }, host: { properties: { "attr.data-disabled": "state.disabled() ? \"\" : null" } }, providers: [provideDateRangePickerState()], queries: [{ propertyName: "label", first: true, predicate: NgpDatePickerLabelToken, descendants: true, isSignal: true }], exportAs: ["ngpDateRangePicker"], ngImport: i0 }); }
|
|
1384
1360
|
}
|
|
1385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDateRangePicker, decorators: [{
|
|
1386
1362
|
type: Directive,
|
|
1387
1363
|
args: [{
|
|
1388
1364
|
selector: '[ngpDateRangePicker]',
|