@wlcm/angular 19.2.6 → 22.0.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 +37 -0
- package/button/fesm2022/wlcm-angular-button.mjs +25 -31
- package/button/fesm2022/wlcm-angular-button.mjs.map +1 -1
- package/button/package.json +25 -0
- package/button/types/wlcm-angular-button.d.ts +28 -0
- package/core/fesm2022/wlcm-angular-core.mjs +76 -92
- package/core/fesm2022/wlcm-angular-core.mjs.map +1 -1
- package/core/package.json +26 -0
- package/core/types/wlcm-angular-core.d.ts +102 -0
- package/datepicker/fesm2022/wlcm-angular-datepicker.mjs +329 -500
- package/datepicker/fesm2022/wlcm-angular-datepicker.mjs.map +1 -1
- package/datepicker/package.json +33 -0
- package/datepicker/types/wlcm-angular-datepicker.d.ts +285 -0
- package/filters/fesm2022/wlcm-angular-filters.mjs +32 -38
- package/filters/fesm2022/wlcm-angular-filters.mjs.map +1 -1
- package/filters/package.json +25 -0
- package/filters/types/wlcm-angular-filters.d.ts +81 -0
- package/forms/fesm2022/wlcm-angular-forms.mjs +375 -401
- package/forms/fesm2022/wlcm-angular-forms.mjs.map +1 -1
- package/forms/package.json +31 -0
- package/forms/types/wlcm-angular-forms.d.ts +365 -0
- package/package.json +27 -46
- package/phone-input/fesm2022/wlcm-angular-phone-input.mjs +67 -85
- package/phone-input/fesm2022/wlcm-angular-phone-input.mjs.map +1 -1
- package/phone-input/package.json +32 -0
- package/phone-input/types/wlcm-angular-phone-input.d.ts +81 -0
- package/search-field/fesm2022/wlcm-angular-search-field.mjs +25 -30
- package/search-field/fesm2022/wlcm-angular-search-field.mjs.map +1 -1
- package/search-field/package.json +28 -0
- package/search-field/types/wlcm-angular-search-field.d.ts +24 -0
- package/stepper/fesm2022/wlcm-angular-stepper.mjs +171 -294
- package/stepper/fesm2022/wlcm-angular-stepper.mjs.map +1 -1
- package/stepper/package.json +24 -0
- package/stepper/types/wlcm-angular-stepper.d.ts +114 -0
- package/styles/components/button/index.scss +25 -82
- package/styles/components/calendar/_calendar-header.scss +3 -6
- package/styles/components/calendar/_calendar.scss +10 -13
- package/styles/components/common/index.scss +4 -7
- package/styles/components/datepicker/_datepicker-input-container.scss +0 -3
- package/styles/components/datepicker/_datepicker-panel.scss +2 -5
- package/styles/components/datepicker/_datepicker-trigger.scss +0 -3
- package/styles/components/datepicker/date-range-picker/_date-range-picker-body.scss +0 -3
- package/styles/components/datepicker/date-range-picker/_date-range-picker-input.scss +4 -7
- package/styles/components/datepicker/date-range-picker/_date-range-picker-panel.scss +2 -5
- package/styles/components/forms/_autocomplete.scss +0 -3
- package/styles/components/forms/_checkbox-group.scss +0 -3
- package/styles/components/forms/_checkbox.scss +6 -8
- package/styles/components/forms/_error.scss +2 -13
- package/styles/components/forms/_form-field.scss +9 -10
- package/styles/components/forms/_label.scss +2 -11
- package/styles/components/forms/_radio.scss +13 -12
- package/styles/components/forms/_select.scss +5 -8
- package/styles/components/forms/partials/_dropdown-panel.scss +4 -6
- package/styles/components/loader/_loader.scss +5 -9
- package/styles/components/phone-input/_country-code-select.scss +0 -5
- package/styles/components/phone-input/_phone-input-container.scss +1 -6
- package/styles/components/search-field/index.scss +0 -4
- package/styles/components/stepper/_step-header.scss +8 -11
- package/styles/components/stepper/_step.scss +0 -5
- package/styles/components/stepper/_stepper-header.scss +0 -5
- package/styles/components/stepper/_stepper.scss +0 -4
- package/styles/components/table/_table-head-data.scss +6 -9
- package/styles/components/table/_table-head.scss +0 -5
- package/styles/components/table/_table-row-data.scss +2 -7
- package/styles/components/table/_table-row.scss +0 -5
- package/styles/components/table/_table.scss +0 -5
- package/styles/core/_all-theme.scss +8 -3
- package/styles/core/_tokens.scss +41 -0
- package/styles/core/_utils.scss +11 -44
- package/styles/wlcm.scss +1 -3
- package/table/fesm2022/wlcm-angular-table.mjs +130 -160
- package/table/fesm2022/wlcm-angular-table.mjs.map +1 -1
- package/table/package.json +27 -0
- package/table/types/wlcm-angular-table.d.ts +115 -0
- package/button/index.d.ts +0 -2
- package/button/lib/button.module.d.ts +0 -7
- package/button/lib/components/button/button.component.d.ts +0 -19
- package/button/lib/models/button.models.d.ts +0 -4
- package/core/index.d.ts +0 -11
- package/core/lib/components/default-loader/default-loader.component.d.ts +0 -5
- package/core/lib/components/icons/calendar-icon/calendar-icon.component.d.ts +0 -5
- package/core/lib/components/icons/chevron-down-icon/chevron-down-icon.component.d.ts +0 -5
- package/core/lib/components/icons/close-icon/close-icon.component.d.ts +0 -5
- package/core/lib/components/icons/search-icon/search-icon.component.d.ts +0 -5
- package/core/lib/components/loader/loader.component.d.ts +0 -11
- package/core/lib/constants/_index.d.ts +0 -2
- package/core/lib/constants/http.constants.d.ts +0 -2
- package/core/lib/constants/icon.contants.d.ts +0 -4
- package/core/lib/constants/loader.constants.d.ts +0 -2
- package/core/lib/directives/_index.d.ts +0 -1
- package/core/lib/directives/icon.directive.d.ts +0 -15
- package/core/lib/models/_index.d.ts +0 -2
- package/core/lib/models/icon.models.d.ts +0 -9
- package/core/lib/models/option.models.d.ts +0 -14
- package/core/lib/services/scroll-detection.api.d.ts +0 -10
- package/core/lib/utils/paginated-data-emulator.utils.d.ts +0 -9
- package/core/lib/utils/stream.utils.d.ts +0 -6
- package/datepicker/index.d.ts +0 -18
- package/datepicker/lib/components/calendar-header/calendar-header.component.d.ts +0 -24
- package/datepicker/lib/components/range/date-range-calendar-header/date-range-calendar-header.component.d.ts +0 -24
- package/datepicker/lib/components/range/date-range-picker-bottom-panel/date-range-picker-bottom-panel.component.d.ts +0 -8
- package/datepicker/lib/components/range/date-range-picker-input/date-range-picker-input.component.d.ts +0 -36
- package/datepicker/lib/components/range/double-calendar-range-picker/double-calendar-range-picker.component.d.ts +0 -37
- package/datepicker/lib/components/range/single-calendar-range-picker/single-calendar-range-picker.component.d.ts +0 -27
- package/datepicker/lib/components/single/datepicker-input-container/datepicker-input-container.component.d.ts +0 -30
- package/datepicker/lib/components/single/datepicker-panel/datepicker-panel.component.d.ts +0 -17
- package/datepicker/lib/constants/datepicker.constants.d.ts +0 -7
- package/datepicker/lib/constants/range/date-range-picker.constants.d.ts +0 -5
- package/datepicker/lib/constants/range/date-range-selection-model.constants.d.ts +0 -4
- package/datepicker/lib/constants/range/date-range-trigger-selection-model.constants.d.ts +0 -4
- package/datepicker/lib/datepicker.module.d.ts +0 -12
- package/datepicker/lib/directives/calendar.directive.d.ts +0 -5
- package/datepicker/lib/directives/datepicker-input.base.d.ts +0 -33
- package/datepicker/lib/directives/datepicker-trigger.base.d.ts +0 -33
- package/datepicker/lib/directives/ragne/date-range-picker-input-end.directive.d.ts +0 -20
- package/datepicker/lib/directives/ragne/date-range-picker-input-start.directive.d.ts +0 -20
- package/datepicker/lib/directives/ragne/date-range-picker-input.base.d.ts +0 -23
- package/datepicker/lib/directives/ragne/left-calendar.directive.d.ts +0 -17
- package/datepicker/lib/directives/ragne/right-calendar.directive.d.ts +0 -20
- package/datepicker/lib/directives/single/datepicker-input.directive.d.ts +0 -21
- package/datepicker/lib/models/date-picker.models.d.ts +0 -18
- package/datepicker/lib/models/range/data-range-calendar.models.d.ts +0 -25
- package/datepicker/lib/models/range/date-range-picker.models.d.ts +0 -19
- package/datepicker/lib/models/range/date-range-validation.models.d.ts +0 -3
- package/datepicker/lib/utils/range/date-range-input.validators.d.ts +0 -2
- package/datepicker/lib/utils/range/date-range-picker-errors.d.ts +0 -4
- package/filters/index.d.ts +0 -5
- package/filters/lib/components/filters-group/filters-group.component.d.ts +0 -6
- package/filters/lib/constants/filter.constants.d.ts +0 -3
- package/filters/lib/constants/index.d.ts +0 -1
- package/filters/lib/directives/filter.directive.d.ts +0 -5
- package/filters/lib/directives/index.d.ts +0 -1
- package/filters/lib/filters.module.d.ts +0 -9
- package/filters/lib/models/array-filter.models.d.ts +0 -19
- package/filters/lib/models/filter.models.d.ts +0 -19
- package/filters/lib/models/filters-group.models.d.ts +0 -22
- package/filters/lib/models/index.d.ts +0 -3
- package/forms/index.d.ts +0 -12
- package/forms/lib/forms/components/autocomplete/autocomplete.component.d.ts +0 -76
- package/forms/lib/forms/components/checkbox/checkbox.component.d.ts +0 -28
- package/forms/lib/forms/components/checkbox-group/checkbox-group.component.d.ts +0 -25
- package/forms/lib/forms/components/error/error.component.d.ts +0 -5
- package/forms/lib/forms/components/form-field/form-field.component.d.ts +0 -34
- package/forms/lib/forms/components/index.d.ts +0 -8
- package/forms/lib/forms/components/label/label.component.d.ts +0 -7
- package/forms/lib/forms/components/partials/autocomplete-suffix/autocomplete-suffix.component.d.ts +0 -10
- package/forms/lib/forms/components/partials/index.d.ts +0 -1
- package/forms/lib/forms/components/select/select.component.d.ts +0 -90
- package/forms/lib/forms/constants/form-elements.constants.d.ts +0 -6
- package/forms/lib/forms/constants/form-errors.constants.d.ts +0 -4
- package/forms/lib/forms/constants/form-field.constants.d.ts +0 -1
- package/forms/lib/forms/constants/form-state-handlers.constants.d.ts +0 -6
- package/forms/lib/forms/constants/index.d.ts +0 -5
- package/forms/lib/forms/constants/select.constants.d.ts +0 -3
- package/forms/lib/forms/directives/autocomplete.directive.d.ts +0 -16
- package/forms/lib/forms/directives/form-field-custom-container.directive.d.ts +0 -8
- package/forms/lib/forms/directives/form-field-hint.directive.d.ts +0 -5
- package/forms/lib/forms/directives/form-field-prefix.directive.d.ts +0 -6
- package/forms/lib/forms/directives/form-field-suffix.directive.d.ts +0 -5
- package/forms/lib/forms/directives/input.directive.d.ts +0 -14
- package/forms/lib/forms/directives/select-input-binder.directive.d.ts +0 -5
- package/forms/lib/forms/forms.module.d.ts +0 -19
- package/forms/lib/forms/models/_index.d.ts +0 -5
- package/forms/lib/forms/models/autocomplete.models.d.ts +0 -9
- package/forms/lib/forms/models/form-errors.models.d.ts +0 -5
- package/forms/lib/forms/models/form.models.d.ts +0 -11
- package/forms/lib/forms/models/input.models.d.ts +0 -13
- package/forms/lib/forms/models/select.models.d.ts +0 -9
- package/forms/lib/forms/pipes/errors-mapper.pipe.d.ts +0 -17
- package/forms/lib/forms/services/form-state-handler.service.d.ts +0 -10
- package/forms/lib/forms/services/index.d.ts +0 -2
- package/forms/lib/forms/services/places.api.d.ts +0 -11
- package/phone-input/index.d.ts +0 -4
- package/phone-input/lib/components/country-code-select/country-code-select.component.d.ts +0 -15
- package/phone-input/lib/components/phone-input-container/phone-input-container.component.d.ts +0 -30
- package/phone-input/lib/constants/country-code-options.constants.d.ts +0 -3
- package/phone-input/lib/constants/phone-adapter.constants.d.ts +0 -3
- package/phone-input/lib/directives/phone-input.directive.d.ts +0 -36
- package/phone-input/lib/models/country-code.models.d.ts +0 -7
- package/phone-input/lib/models/phone-adapter.models.d.ts +0 -10
- package/phone-input/lib/models/phone.models.d.ts +0 -3
- package/phone-input/lib/phone-input.module.d.ts +0 -9
- package/phone-input/lib/pipes/phone-code.pipe.d.ts +0 -8
- package/search-field/index.d.ts +0 -2
- package/search-field/lib/components/search-field/search-field.component.d.ts +0 -16
- package/search-field/lib/search-field.module.d.ts +0 -8
- package/stepper/index.d.ts +0 -10
- package/stepper/lib/components/step/step.component.d.ts +0 -16
- package/stepper/lib/components/step-header/step-header.component.d.ts +0 -20
- package/stepper/lib/components/stepper/stepper.component.d.ts +0 -6
- package/stepper/lib/components/stepper-header/stepper-header.component.d.ts +0 -8
- package/stepper/lib/constants/step.constants.d.ts +0 -4
- package/stepper/lib/constants/stepper.stepper.d.ts +0 -3
- package/stepper/lib/directives/load-on-active-step.directive.d.ts +0 -13
- package/stepper/lib/models/step.models.d.ts +0 -43
- package/stepper/lib/models/stepper.models.d.ts +0 -44
- package/stepper/lib/stepper.module.d.ts +0 -12
- package/styles/core/_core.scss +0 -10
- package/table/index.d.ts +0 -9
- package/table/lib/components/table/table.component.d.ts +0 -24
- package/table/lib/components/table-head/table-head.component.d.ts +0 -8
- package/table/lib/components/table-head-actions/table-head-actions.component.d.ts +0 -12
- package/table/lib/components/table-head-data/table-head-data.component.d.ts +0 -5
- package/table/lib/components/table-row/table-row.component.d.ts +0 -23
- package/table/lib/components/table-row-actions/table-row-actions.component.d.ts +0 -5
- package/table/lib/components/table-row-data/table-row-data.component.d.ts +0 -5
- package/table/lib/components/table-row-spacer/table-row-spacer.component.d.ts +0 -5
- package/table/lib/constants/table-row.constants.d.ts +0 -3
- package/table/lib/constants/table.constants.d.ts +0 -3
- package/table/lib/directives/scrollable-table-container.directive.d.ts +0 -13
- package/table/lib/models/table-config-manager.models.d.ts +0 -12
- package/table/lib/models/table-row.models.d.ts +0 -10
- package/table/lib/models/table-selection-model.d.ts +0 -25
- package/table/lib/models/table.models.d.ts +0 -4
- package/table/lib/pipes/table-row-injector.pipe.d.ts +0 -9
- package/table/lib/table.module.d.ts +0 -13
- package/table/lib/utils/table-errors.utils.d.ts +0 -3
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable,
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import * as i2 from '@angular/material/datepicker';
|
|
5
|
-
import { MatRangeDateSelectionModel, MatDateSelectionModel, DateRange, yearsPerPage, MatCalendar, MAT_DATE_RANGE_SELECTION_STRATEGY, MatDatepickerModule, DefaultMatCalendarRangeStrategy, MatMonthView, MatSingleDateSelectionModel } from '@angular/material/datepicker';
|
|
2
|
+
import { InjectionToken, Injectable, inject, ViewContainerRef, DestroyRef, input, Injector, Directive, ElementRef, forwardRef, signal, computed, ChangeDetectionStrategy, Component, viewChild, contentChild, output, effect, NgModule } from '@angular/core';
|
|
6
3
|
import { WLCM_FORM_FIELD, WlcmFormsModule, WLCM_FORM_CONTROL_PROVIDER, WLCM_INPUT_BINDER } from '@wlcm/angular/forms';
|
|
7
4
|
import { merge, EMPTY, filter, BehaviorSubject, switchMap, fromEvent, map, Subject, tap, startWith, takeUntil } from 'rxjs';
|
|
8
|
-
import * as i3 from '@angular/forms';
|
|
9
5
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, ControlContainer } from '@angular/forms';
|
|
10
|
-
import * as i1$1 from '@angular/material/
|
|
6
|
+
import * as i1$1 from '@angular/material/datepicker';
|
|
7
|
+
import { MatRangeDateSelectionModel, DateRange, MAT_DATE_RANGE_SELECTION_STRATEGY, MatCalendar, yearsPerPage, MatDatepickerModule, DefaultMatCalendarRangeStrategy, MatMonthView, MatDateSelectionModel, MatSingleDateSelectionModel } from '@angular/material/datepicker';
|
|
11
8
|
import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';
|
|
12
|
-
import {
|
|
9
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
10
|
import { format, isBefore, startOfDay, isAfter, parse, isValid, endOfMonth, add, startOfMonth } from 'date-fns';
|
|
14
11
|
import { DateFnsAdapter } from '@angular/material-date-fns-adapter';
|
|
15
12
|
import { enUS } from 'date-fns/locale';
|
|
16
|
-
import
|
|
17
|
-
import { OverlayRef, OverlayConfig, Overlay } from '@angular/cdk/overlay';
|
|
13
|
+
import { Overlay, OverlayRef, OverlayConfig } from '@angular/cdk/overlay';
|
|
18
14
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
19
|
-
import
|
|
20
|
-
import * as i2$1 from '@wlcm/angular/button';
|
|
15
|
+
import * as i1 from '@wlcm/angular/button';
|
|
21
16
|
import { WlcmButtonModule } from '@wlcm/angular/button';
|
|
22
17
|
import { WlcmIconName, WlcmIconDirective } from '@wlcm/angular/core';
|
|
18
|
+
import { CommonModule } from '@angular/common';
|
|
23
19
|
|
|
24
20
|
const WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL = new InjectionToken('WLCM_DATE_RANGE_SELECTION_MODEL');
|
|
25
21
|
const WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL_PROVIDER = {
|
|
@@ -40,10 +36,10 @@ class WlcmDateAdapter extends DateFnsAdapter {
|
|
|
40
36
|
const formatString = style === 'long' ? 'EEEE' : 'EEEEEE';
|
|
41
37
|
return range(7, (i) => format(new Date(2017, 0, i + 1), formatString));
|
|
42
38
|
}
|
|
43
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
44
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
40
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateAdapter }); }
|
|
45
41
|
}
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateAdapter, decorators: [{
|
|
47
43
|
type: Injectable
|
|
48
44
|
}] });
|
|
49
45
|
var WlcmDateValidation;
|
|
@@ -72,17 +68,19 @@ const WLCM_DEFAULT_DATEPICKER_PROVIDERS = [
|
|
|
72
68
|
const WLCM_DATEPICKER_CONFIG = new InjectionToken('WLCM_DATEPICKER_CONFIG', { providedIn: 'root', factory: () => ({ selectOnly: false }) });
|
|
73
69
|
const WLCM_DATEPICKER_INPUT_CLASS = 'wlcm-datepicker-input';
|
|
74
70
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
this.
|
|
81
|
-
this.
|
|
82
|
-
this.
|
|
83
|
-
|
|
84
|
-
this.maxDate = input(this.defaultDatepickerConfig.maxDate?.()
|
|
85
|
-
|
|
71
|
+
// The second generic parameter (`_D`) is retained for subclass typing of the date-range
|
|
72
|
+
// selection model they provide (e.g. `DateRange<Date>`); it is not referenced in the base body.
|
|
73
|
+
class WlcmDatepickerTrigger {
|
|
74
|
+
constructor() {
|
|
75
|
+
this.overlay = inject(Overlay);
|
|
76
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
77
|
+
this.destroyRef = inject(DestroyRef);
|
|
78
|
+
this.minDate = input(this.defaultDatepickerConfig.minDate?.(), /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
80
|
+
this.maxDate = input(this.defaultDatepickerConfig.maxDate?.(), /* @ts-ignore */
|
|
81
|
+
...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
82
|
+
this.selectOnly = input(this.defaultDatepickerConfig.selectOnly || false, /* @ts-ignore */
|
|
83
|
+
...(ngDevMode ? [{ debugName: "selectOnly" }] : /* istanbul ignore next */ []));
|
|
86
84
|
this.overlayRef = this.overlay.create(this.createOverlayConfig());
|
|
87
85
|
this.handleBackdropClick();
|
|
88
86
|
}
|
|
@@ -129,7 +127,7 @@ let WlcmDatepickerTrigger = class WlcmDatepickerTrigger {
|
|
|
129
127
|
handleBackdropClick() {
|
|
130
128
|
this.overlayRef
|
|
131
129
|
.backdropClick()
|
|
132
|
-
.pipe(
|
|
130
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
133
131
|
.subscribe(() => this.close());
|
|
134
132
|
}
|
|
135
133
|
updatePositionStrategy() {
|
|
@@ -149,23 +147,25 @@ let WlcmDatepickerTrigger = class WlcmDatepickerTrigger {
|
|
|
149
147
|
backdropClass: 'transparent',
|
|
150
148
|
});
|
|
151
149
|
}
|
|
152
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
153
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
154
|
-
}
|
|
155
|
-
WlcmDatepickerTrigger
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.ViewContainerRef }, { type: i2.MatDateSelectionModel }], propDecorators: { isOnlySelect: [{
|
|
164
|
-
type: HostBinding,
|
|
165
|
-
args: ['class.wlcm-datepicker-select-only-mode']
|
|
166
|
-
}] } });
|
|
150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
151
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: WlcmDatepickerTrigger, isStandalone: true, inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, selectOnly: { classPropertyName: "selectOnly", publicName: "selectOnly", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.wlcm-datepicker-select-only-mode": "selectOnly()" } }, ngImport: i0 }); }
|
|
152
|
+
}
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerTrigger, decorators: [{
|
|
154
|
+
type: Directive,
|
|
155
|
+
args: [{
|
|
156
|
+
host: {
|
|
157
|
+
'[class.wlcm-datepicker-select-only-mode]': 'selectOnly()',
|
|
158
|
+
},
|
|
159
|
+
}]
|
|
160
|
+
}], ctorParameters: () => [], propDecorators: { minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], selectOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnly", required: false }] }] } });
|
|
167
161
|
|
|
168
162
|
class WlcmDatepickerInputBase {
|
|
163
|
+
constructor() {
|
|
164
|
+
this.element = inject(ElementRef);
|
|
165
|
+
this.dateAdapter = inject(DateAdapter);
|
|
166
|
+
this.dateFormats = inject(MAT_DATE_FORMATS, { optional: true });
|
|
167
|
+
this.trigger = inject(WlcmDatepickerTrigger);
|
|
168
|
+
}
|
|
169
169
|
handleBlur() {
|
|
170
170
|
this.updateSelection();
|
|
171
171
|
this._touched?.();
|
|
@@ -176,15 +176,6 @@ class WlcmDatepickerInputBase {
|
|
|
176
176
|
}
|
|
177
177
|
this._validatorChanged?.();
|
|
178
178
|
}
|
|
179
|
-
get datepickerInputClass() {
|
|
180
|
-
return WLCM_DATEPICKER_INPUT_CLASS;
|
|
181
|
-
}
|
|
182
|
-
constructor(element, dateAdapter, dateFormats, trigger) {
|
|
183
|
-
this.element = element;
|
|
184
|
-
this.dateAdapter = dateAdapter;
|
|
185
|
-
this.dateFormats = dateFormats;
|
|
186
|
-
this.trigger = trigger;
|
|
187
|
-
}
|
|
188
179
|
writeValue(value) {
|
|
189
180
|
this.updateInputValue(value);
|
|
190
181
|
}
|
|
@@ -243,29 +234,26 @@ class WlcmDatepickerInputBase {
|
|
|
243
234
|
}
|
|
244
235
|
this.inputElement.value = newValue;
|
|
245
236
|
}
|
|
246
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
247
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
237
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerInputBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
238
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: WlcmDatepickerInputBase, isStandalone: true, host: { listeners: { "blur": "handleBlur()", "input": "handleInput()" }, classAttribute: "wlcm-datepicker-input" }, ngImport: i0 }); }
|
|
248
239
|
}
|
|
249
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
250
|
-
type: Directive
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
args: ['class']
|
|
260
|
-
}] } });
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerInputBase, decorators: [{
|
|
241
|
+
type: Directive,
|
|
242
|
+
args: [{
|
|
243
|
+
host: {
|
|
244
|
+
class: WLCM_DATEPICKER_INPUT_CLASS,
|
|
245
|
+
'(blur)': 'handleBlur()',
|
|
246
|
+
'(input)': 'handleInput()',
|
|
247
|
+
},
|
|
248
|
+
}]
|
|
249
|
+
}] });
|
|
261
250
|
|
|
262
251
|
class WlcmDateRangePickerInputBase extends WlcmDatepickerInputBase {
|
|
263
|
-
constructor(
|
|
264
|
-
super(
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
this.
|
|
268
|
-
this.trigger = trigger;
|
|
252
|
+
constructor() {
|
|
253
|
+
super(...arguments);
|
|
254
|
+
// Widen visibility from the base's `protected element` so the range-picker-input
|
|
255
|
+
// component can read the start/end host elements for focus tracking.
|
|
256
|
+
this.element = this.element;
|
|
269
257
|
this._inputMirror = this.createInputMirror();
|
|
270
258
|
}
|
|
271
259
|
ngAfterViewInit() {
|
|
@@ -303,28 +291,25 @@ class WlcmDateRangePickerInputBase extends WlcmDatepickerInputBase {
|
|
|
303
291
|
target.style.fontFamily = inputElementStyles.fontFamily;
|
|
304
292
|
target.style.letterSpacing = inputElementStyles.letterSpacing;
|
|
305
293
|
}
|
|
306
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
307
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
294
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateRangePickerInputBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
295
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: WlcmDateRangePickerInputBase, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
308
296
|
}
|
|
309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateRangePickerInputBase, decorators: [{
|
|
310
298
|
type: Directive
|
|
311
|
-
}]
|
|
299
|
+
}] });
|
|
312
300
|
|
|
313
301
|
var WlcmDateRangeValidation;
|
|
314
302
|
(function (WlcmDateRangeValidation) {
|
|
315
303
|
WlcmDateRangeValidation["StartExceedsEnd"] = "wlcmDateRangeStartExceedsEnd";
|
|
316
304
|
})(WlcmDateRangeValidation || (WlcmDateRangeValidation = {}));
|
|
317
305
|
|
|
318
|
-
|
|
319
|
-
constructor(
|
|
320
|
-
super(
|
|
321
|
-
this.
|
|
322
|
-
this.
|
|
323
|
-
this.dateFormats = dateFormats;
|
|
324
|
-
this.selectionModel = selectionModel;
|
|
325
|
-
this.trigger = trigger;
|
|
306
|
+
class DateRangePickerInputStartDirective extends WlcmDateRangePickerInputBase {
|
|
307
|
+
constructor() {
|
|
308
|
+
super();
|
|
309
|
+
this.selectionModel = inject(WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL);
|
|
310
|
+
this.destroyRef = inject(DestroyRef);
|
|
326
311
|
this.updateSelection = () => {
|
|
327
|
-
|
|
312
|
+
const start = this.parseCurrentValue();
|
|
328
313
|
this.selectionModel.updateSelection(new DateRange(start, this.selectionModel.selection.end), this);
|
|
329
314
|
};
|
|
330
315
|
this.handleSelectionChange();
|
|
@@ -340,45 +325,30 @@ let DateRangePickerInputStartDirective = class DateRangePickerInputStartDirectiv
|
|
|
340
325
|
return defaultErrors;
|
|
341
326
|
}
|
|
342
327
|
handleSelectionChange() {
|
|
343
|
-
this.selectionModel.selectionChanged.pipe(
|
|
328
|
+
this.selectionModel.selectionChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ selection }) => {
|
|
344
329
|
const validDate = this.dateAdapter.getValidDateOrNull(selection.start);
|
|
345
330
|
this._changed?.(validDate);
|
|
346
331
|
this.updateInputValue(validDate);
|
|
347
332
|
this._validatorChanged?.();
|
|
348
333
|
});
|
|
349
334
|
}
|
|
350
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
351
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
335
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateRangePickerInputStartDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
336
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: DateRangePickerInputStartDirective, isStandalone: true, selector: "[wlcmDateRangePickerInputStart]", host: { classAttribute: "wlcm-date-range-picker-input-field" }, providers: [
|
|
352
337
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateRangePickerInputStartDirective), multi: true },
|
|
353
338
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateRangePickerInputStartDirective), multi: true },
|
|
354
339
|
], usesInheritance: true, ngImport: i0 }); }
|
|
355
|
-
}
|
|
356
|
-
DateRangePickerInputStartDirective
|
|
357
|
-
UntilDestroy(),
|
|
358
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
359
|
-
DateAdapter, Object, MatDateSelectionModel,
|
|
360
|
-
WlcmDatepickerTrigger])
|
|
361
|
-
], DateRangePickerInputStartDirective);
|
|
362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: DateRangePickerInputStartDirective, decorators: [{
|
|
340
|
+
}
|
|
341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateRangePickerInputStartDirective, decorators: [{
|
|
363
342
|
type: Directive,
|
|
364
343
|
args: [{
|
|
365
344
|
selector: '[wlcmDateRangePickerInputStart]',
|
|
366
345
|
host: { class: 'wlcm-date-range-picker-input-field' },
|
|
367
|
-
standalone: true,
|
|
368
346
|
providers: [
|
|
369
347
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateRangePickerInputStartDirective), multi: true },
|
|
370
348
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateRangePickerInputStartDirective), multi: true },
|
|
371
349
|
],
|
|
372
350
|
}]
|
|
373
|
-
}], ctorParameters: () => [
|
|
374
|
-
type: Optional
|
|
375
|
-
}, {
|
|
376
|
-
type: Inject,
|
|
377
|
-
args: [MAT_DATE_FORMATS]
|
|
378
|
-
}] }, { type: i2.MatDateSelectionModel, decorators: [{
|
|
379
|
-
type: Inject,
|
|
380
|
-
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
|
381
|
-
}] }, { type: WlcmDatepickerTrigger }] });
|
|
351
|
+
}], ctorParameters: () => [] });
|
|
382
352
|
|
|
383
353
|
const WLCM_DATE_RANGE_SELECTION_MODEL = new InjectionToken('WLCM_DATE_RANGE_SELECTION_MODEL');
|
|
384
354
|
const WLCM_DATE_RANGE_SELECTION_MODEL_PROVIDER = {
|
|
@@ -388,11 +358,14 @@ const WLCM_DATE_RANGE_SELECTION_MODEL_PROVIDER = {
|
|
|
388
358
|
};
|
|
389
359
|
|
|
390
360
|
class WlcmDateRangePicker {
|
|
391
|
-
constructor(
|
|
392
|
-
this.
|
|
393
|
-
|
|
394
|
-
this.
|
|
395
|
-
|
|
361
|
+
constructor() {
|
|
362
|
+
this._isComplete = signal(false, /* @ts-ignore */
|
|
363
|
+
...(ngDevMode ? [{ debugName: "_isComplete" }] : /* istanbul ignore next */ []));
|
|
364
|
+
this.isComplete = computed(() => this._isComplete(), /* @ts-ignore */
|
|
365
|
+
...(ngDevMode ? [{ debugName: "isComplete" }] : /* istanbul ignore next */ []));
|
|
366
|
+
this.localSelectionModel = inject(WLCM_DATE_RANGE_SELECTION_MODEL);
|
|
367
|
+
this.rangeSelectionStrategy = inject(MAT_DATE_RANGE_SELECTION_STRATEGY);
|
|
368
|
+
this._destroyRef = inject(DestroyRef);
|
|
396
369
|
this.handleSelectionChanged();
|
|
397
370
|
}
|
|
398
371
|
setSelection(selection) {
|
|
@@ -410,39 +383,45 @@ class WlcmDateRangePicker {
|
|
|
410
383
|
}
|
|
411
384
|
handleSelectionChanged() {
|
|
412
385
|
this.localSelectionModel.selectionChanged
|
|
413
|
-
.pipe(
|
|
386
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
414
387
|
.subscribe(() => this._isComplete.set(this.localSelectionModel.isComplete()));
|
|
415
388
|
}
|
|
416
389
|
}
|
|
417
390
|
|
|
418
391
|
class WlcmDateRangePickerBottomPanelComponent {
|
|
419
|
-
constructor(
|
|
420
|
-
this.picker =
|
|
392
|
+
constructor() {
|
|
393
|
+
this.picker = inject(WlcmDateRangePicker);
|
|
421
394
|
}
|
|
422
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
423
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
395
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateRangePickerBottomPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
396
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: WlcmDateRangePickerBottomPanelComponent, isStandalone: true, selector: "wlcm-date-range-picker-bottom-panel", ngImport: i0, template: "<div class=\"wlcm-date-range-picker-bottom-panel\">\n <wlcm-button styleType=\"compact\" (clicked)=\"picker.reset()\">Reset</wlcm-button>\n\n <wlcm-button (clicked)=\"picker.apply()\" [isDisabled]=\"!picker.isComplete()\">\n Apply\n </wlcm-button>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: WlcmButtonModule }, { kind: "component", type: i1.WlcmButtonComponent, selector: "wlcm-button", inputs: ["size", "styleType", "buttonColor", "buttonType", "isDisabled", "isLoading"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
424
397
|
}
|
|
425
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateRangePickerBottomPanelComponent, decorators: [{
|
|
426
399
|
type: Component,
|
|
427
|
-
args: [{ selector: 'wlcm-date-range-picker-bottom-panel',
|
|
428
|
-
}]
|
|
400
|
+
args: [{ selector: 'wlcm-date-range-picker-bottom-panel', imports: [WlcmButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"wlcm-date-range-picker-bottom-panel\">\n <wlcm-button styleType=\"compact\" (clicked)=\"picker.reset()\">Reset</wlcm-button>\n\n <wlcm-button (clicked)=\"picker.apply()\" [isDisabled]=\"!picker.isComplete()\">\n Apply\n </wlcm-button>\n</div>\n" }]
|
|
401
|
+
}] });
|
|
429
402
|
|
|
430
403
|
const WLCM_DATE_RANGE_PICKER_CONFIG = new InjectionToken('WLCM_DATE_RANGE_PICKER_CONFIG', { providedIn: 'root', factory: () => ({}) });
|
|
431
404
|
const WLCM_DATE_RANGE_PICKER_BP = new InjectionToken('WLCM_DATE_RANGE_PICKER_BP', { providedIn: 'root', factory: () => WlcmDateRangePickerBottomPanelComponent });
|
|
432
405
|
const WLCM_DATE_RANGE_PICKER_LEFT_PANEL = new InjectionToken('WLCM_DATE_RANGE_PICKER_LEFT_PANEL');
|
|
433
406
|
|
|
434
407
|
class WlcmCalendarHeaderComponent {
|
|
435
|
-
constructor(
|
|
436
|
-
this.dateAdapter = dateAdapter;
|
|
437
|
-
this.dateFormats = dateFormats;
|
|
438
|
-
this.calendar = calendar;
|
|
408
|
+
constructor() {
|
|
439
409
|
this.WlcmIconName = WlcmIconName;
|
|
440
|
-
this.next = input(
|
|
441
|
-
|
|
442
|
-
this.
|
|
443
|
-
|
|
444
|
-
this.
|
|
445
|
-
|
|
410
|
+
this.next = input(/* @ts-ignore */
|
|
411
|
+
...(ngDevMode ? [undefined, { debugName: "next" }] : /* istanbul ignore next */ []));
|
|
412
|
+
this.previous = input(/* @ts-ignore */
|
|
413
|
+
...(ngDevMode ? [undefined, { debugName: "previous" }] : /* istanbul ignore next */ []));
|
|
414
|
+
this.disableLeftArrow = input(false, /* @ts-ignore */
|
|
415
|
+
...(ngDevMode ? [{ debugName: "disableLeftArrow" }] : /* istanbul ignore next */ []));
|
|
416
|
+
this.disableRightArrow = input(false, /* @ts-ignore */
|
|
417
|
+
...(ngDevMode ? [{ debugName: "disableRightArrow" }] : /* istanbul ignore next */ []));
|
|
418
|
+
this.displayLeftArrow = input(true, /* @ts-ignore */
|
|
419
|
+
...(ngDevMode ? [{ debugName: "displayLeftArrow" }] : /* istanbul ignore next */ []));
|
|
420
|
+
this.displayRightArrow = input(true, /* @ts-ignore */
|
|
421
|
+
...(ngDevMode ? [{ debugName: "displayRightArrow" }] : /* istanbul ignore next */ []));
|
|
422
|
+
this.dateAdapter = inject(DateAdapter);
|
|
423
|
+
this.dateFormats = inject(MAT_DATE_FORMATS, { optional: true });
|
|
424
|
+
this.calendar = inject(forwardRef(() => MatCalendar));
|
|
446
425
|
}
|
|
447
426
|
previousClicked() {
|
|
448
427
|
if (this.previous())
|
|
@@ -470,50 +449,40 @@ class WlcmCalendarHeaderComponent {
|
|
|
470
449
|
get periodLabel() {
|
|
471
450
|
return this.dateAdapter.format(this.calendar.activeDate, this.dateFormats.display.monthYearLabel);
|
|
472
451
|
}
|
|
473
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
474
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
452
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmCalendarHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
453
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: WlcmCalendarHeaderComponent, isStandalone: true, selector: "wlcm-calendar-header", inputs: { next: { classPropertyName: "next", publicName: "next", isSignal: true, isRequired: false, transformFunction: null }, previous: { classPropertyName: "previous", publicName: "previous", isSignal: true, isRequired: false, transformFunction: null }, disableLeftArrow: { classPropertyName: "disableLeftArrow", publicName: "disableLeftArrow", isSignal: true, isRequired: false, transformFunction: null }, disableRightArrow: { classPropertyName: "disableRightArrow", publicName: "disableRightArrow", isSignal: true, isRequired: false, transformFunction: null }, displayLeftArrow: { classPropertyName: "displayLeftArrow", publicName: "displayLeftArrow", isSignal: true, isRequired: false, transformFunction: null }, displayRightArrow: { classPropertyName: "displayRightArrow", publicName: "displayRightArrow", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wlcm-calendar-header" }, ngImport: i0, template: "<div class=\"wlcm-calendar-header-button-container\">\n @if (displayLeftArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-left\"\n [disabled]=\"disableLeftArrow()\"\n (click)=\"previousClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n\n<button\n class=\"wlcm-calendar-header-change-view-button\"\n (click)=\"changeCalendarView()\"\n>\n <div class=\"wlcm-calendar-header-period-label\">\n {{ periodLabel }}\n </div>\n\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n</button>\n\n<div class=\"wlcm-calendar-header-button-container\">\n @if (displayRightArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-right\"\n [disabled]=\"disableRightArrow()\"\n (click)=\"nextClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: WlcmIconDirective, selector: "[wlcmIcon]", inputs: ["wlcmIcon", "wlcmIconStopPropagation"], outputs: ["wlcmIconClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
475
454
|
}
|
|
476
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmCalendarHeaderComponent, decorators: [{
|
|
477
456
|
type: Component,
|
|
478
|
-
args: [{ selector: 'wlcm-calendar-header', host: { class: 'wlcm-calendar-header' },
|
|
479
|
-
}],
|
|
480
|
-
type: Optional
|
|
481
|
-
}, {
|
|
482
|
-
type: Inject,
|
|
483
|
-
args: [MAT_DATE_FORMATS]
|
|
484
|
-
}] }, { type: i2.MatCalendar, decorators: [{
|
|
485
|
-
type: Inject,
|
|
486
|
-
args: [forwardRef(() => MatCalendar)]
|
|
487
|
-
}] }] });
|
|
457
|
+
args: [{ selector: 'wlcm-calendar-header', host: { class: 'wlcm-calendar-header' }, imports: [WlcmIconDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"wlcm-calendar-header-button-container\">\n @if (displayLeftArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-left\"\n [disabled]=\"disableLeftArrow()\"\n (click)=\"previousClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n\n<button\n class=\"wlcm-calendar-header-change-view-button\"\n (click)=\"changeCalendarView()\"\n>\n <div class=\"wlcm-calendar-header-period-label\">\n {{ periodLabel }}\n </div>\n\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n</button>\n\n<div class=\"wlcm-calendar-header-button-container\">\n @if (displayRightArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-right\"\n [disabled]=\"disableRightArrow()\"\n (click)=\"nextClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n" }]
|
|
458
|
+
}], propDecorators: { next: [{ type: i0.Input, args: [{ isSignal: true, alias: "next", required: false }] }], previous: [{ type: i0.Input, args: [{ isSignal: true, alias: "previous", required: false }] }], disableLeftArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableLeftArrow", required: false }] }], disableRightArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRightArrow", required: false }] }], displayLeftArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayLeftArrow", required: false }] }], displayRightArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayRightArrow", required: false }] }] } });
|
|
488
459
|
|
|
489
460
|
class WlcmCalendarDirective {
|
|
490
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
491
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
461
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmCalendarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
462
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: WlcmCalendarDirective, isStandalone: true, selector: "[wlcmCalendar]", host: { classAttribute: "wlcm-calendar" }, ngImport: i0 }); }
|
|
492
463
|
}
|
|
493
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmCalendarDirective, decorators: [{
|
|
494
465
|
type: Directive,
|
|
495
466
|
args: [{
|
|
496
467
|
selector: '[wlcmCalendar]',
|
|
497
468
|
host: { class: 'wlcm-calendar' },
|
|
498
|
-
standalone: true,
|
|
499
469
|
}]
|
|
500
470
|
}] });
|
|
501
471
|
|
|
502
|
-
|
|
503
|
-
constructor(
|
|
504
|
-
super(
|
|
505
|
-
this.rangeSelectionStrategy = rangeSelectionStrategy;
|
|
506
|
-
this.localSelectionModel = localSelectionModel;
|
|
507
|
-
this.triggerSelectionModel = triggerSelectionModel;
|
|
508
|
-
this.trigger = trigger;
|
|
509
|
-
this.datepickerConfig = datepickerConfig;
|
|
510
|
-
this.pickerBottomPanel = pickerBottomPanel;
|
|
511
|
-
this.dateAdapter = dateAdapter;
|
|
472
|
+
class SingleCalendarRangePickerComponent extends WlcmDateRangePicker {
|
|
473
|
+
constructor() {
|
|
474
|
+
super();
|
|
512
475
|
this.headerComponent = WlcmCalendarHeaderComponent;
|
|
476
|
+
this.bottomPanelContainer = viewChild('bottomPanelContainer', { ...(ngDevMode ? { debugName: "bottomPanelContainer" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
|
|
477
|
+
this.triggerSelectionModel = inject(WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL);
|
|
478
|
+
this.trigger = inject(WlcmDatepickerTrigger);
|
|
479
|
+
this.datepickerConfig = inject(WLCM_DATEPICKER_CONFIG);
|
|
480
|
+
this.pickerBottomPanel = inject(WLCM_DATE_RANGE_PICKER_BP);
|
|
481
|
+
this.dateAdapter = inject(DateAdapter);
|
|
513
482
|
this.localSelectionModel.updateSelection(this.triggerSelectionModel.selection, this);
|
|
514
483
|
}
|
|
515
484
|
ngAfterViewInit() {
|
|
516
|
-
this.bottomPanelContainer.createComponent(this.pickerBottomPanel);
|
|
485
|
+
this.bottomPanelContainer().createComponent(this.pickerBottomPanel);
|
|
517
486
|
}
|
|
518
487
|
get minDate() {
|
|
519
488
|
return this.datepickerConfig.minDate?.();
|
|
@@ -528,26 +497,19 @@ let SingleCalendarRangePickerComponent = class SingleCalendarRangePickerComponen
|
|
|
528
497
|
reset() {
|
|
529
498
|
this.trigger.close();
|
|
530
499
|
}
|
|
531
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
532
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
500
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SingleCalendarRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
501
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: SingleCalendarRangePickerComponent, isStandalone: true, selector: "wlcm-single-calendar-range-picker", providers: [
|
|
533
502
|
{
|
|
534
503
|
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
535
504
|
useClass: DefaultMatCalendarRangeStrategy,
|
|
536
505
|
},
|
|
537
506
|
{ provide: WlcmDateRangePicker, useExisting: forwardRef(() => SingleCalendarRangePickerComponent) },
|
|
538
507
|
WLCM_DATE_RANGE_SELECTION_MODEL_PROVIDER,
|
|
539
|
-
], viewQueries: [{ propertyName: "bottomPanelContainer", first: true, predicate: ["bottomPanelContainer"], descendants: true, read: ViewContainerRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"wlcm-date-range-picker-panel\">\n <div class=\"signal-calendar-range-picker-body\">\n <mat-calendar\n wlcmCalendar\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [selected]=\"selected\"\n [headerComponent]=\"headerComponent\"\n (_userSelection)=\"calendarSelection($event)\"\n (_userDragDrop)=\"calendarDragDrop($event)\"\n ></mat-calendar>\n </div>\n\n <ng-container #bottomPanelContainer></ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type:
|
|
540
|
-
}
|
|
541
|
-
SingleCalendarRangePickerComponent
|
|
542
|
-
UntilDestroy(),
|
|
543
|
-
__metadata("design:paramtypes", [Object, MatDateSelectionModel,
|
|
544
|
-
MatDateSelectionModel,
|
|
545
|
-
WlcmDatepickerTrigger, Object, Type,
|
|
546
|
-
DateAdapter])
|
|
547
|
-
], SingleCalendarRangePickerComponent);
|
|
548
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: SingleCalendarRangePickerComponent, decorators: [{
|
|
508
|
+
], viewQueries: [{ propertyName: "bottomPanelContainer", first: true, predicate: ["bottomPanelContainer"], descendants: true, read: ViewContainerRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"wlcm-date-range-picker-panel\">\n <div class=\"signal-calendar-range-picker-body\">\n <mat-calendar\n wlcmCalendar\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [selected]=\"selected\"\n [headerComponent]=\"headerComponent\"\n (_userSelection)=\"calendarSelection($event)\"\n (_userDragDrop)=\"calendarDragDrop($event)\"\n ></mat-calendar>\n </div>\n\n <ng-container #bottomPanelContainer></ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1$1.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "directive", type: WlcmCalendarDirective, selector: "[wlcmCalendar]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
509
|
+
}
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SingleCalendarRangePickerComponent, decorators: [{
|
|
549
511
|
type: Component,
|
|
550
|
-
args: [{ selector: 'wlcm-single-calendar-range-picker', imports: [
|
|
512
|
+
args: [{ selector: 'wlcm-single-calendar-range-picker', imports: [MatDatepickerModule, WlcmCalendarDirective], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
551
513
|
{
|
|
552
514
|
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
553
515
|
useClass: DefaultMatCalendarRangeStrategy,
|
|
@@ -555,36 +517,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImpor
|
|
|
555
517
|
{ provide: WlcmDateRangePicker, useExisting: forwardRef(() => SingleCalendarRangePickerComponent) },
|
|
556
518
|
WLCM_DATE_RANGE_SELECTION_MODEL_PROVIDER,
|
|
557
519
|
], template: "<div class=\"wlcm-date-range-picker-panel\">\n <div class=\"signal-calendar-range-picker-body\">\n <mat-calendar\n wlcmCalendar\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [selected]=\"selected\"\n [headerComponent]=\"headerComponent\"\n (_userSelection)=\"calendarSelection($event)\"\n (_userDragDrop)=\"calendarDragDrop($event)\"\n ></mat-calendar>\n </div>\n\n <ng-container #bottomPanelContainer></ng-container>\n</div>\n" }]
|
|
558
|
-
}], ctorParameters: () => [{ type:
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
}] }, { type: i2.MatDateSelectionModel, decorators: [{
|
|
562
|
-
type: Inject,
|
|
563
|
-
args: [WLCM_DATE_RANGE_SELECTION_MODEL]
|
|
564
|
-
}] }, { type: i2.MatDateSelectionModel, decorators: [{
|
|
565
|
-
type: Inject,
|
|
566
|
-
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
|
567
|
-
}] }, { type: WlcmDatepickerTrigger }, { type: undefined, decorators: [{
|
|
568
|
-
type: Inject,
|
|
569
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
570
|
-
}] }, { type: i0.Type, decorators: [{
|
|
571
|
-
type: Inject,
|
|
572
|
-
args: [WLCM_DATE_RANGE_PICKER_BP]
|
|
573
|
-
}] }, { type: i1$1.DateAdapter }], propDecorators: { bottomPanelContainer: [{
|
|
574
|
-
type: ViewChild,
|
|
575
|
-
args: ['bottomPanelContainer', { read: ViewContainerRef }]
|
|
576
|
-
}] } });
|
|
520
|
+
}], ctorParameters: () => [], propDecorators: { bottomPanelContainer: [{ type: i0.ViewChild, args: ['bottomPanelContainer', { ...{
|
|
521
|
+
read: ViewContainerRef,
|
|
522
|
+
}, isSignal: true }] }] } });
|
|
577
523
|
|
|
578
|
-
|
|
579
|
-
constructor(
|
|
580
|
-
super(
|
|
581
|
-
this.
|
|
582
|
-
this.
|
|
583
|
-
this.dateFormats = dateFormats;
|
|
584
|
-
this.selectionModel = selectionModel;
|
|
585
|
-
this.trigger = trigger;
|
|
524
|
+
class DateRangePickerInputEndDirective extends WlcmDateRangePickerInputBase {
|
|
525
|
+
constructor() {
|
|
526
|
+
super();
|
|
527
|
+
this.selectionModel = inject(WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL);
|
|
528
|
+
this.destroyRef = inject(DestroyRef);
|
|
586
529
|
this.updateSelection = () => {
|
|
587
|
-
|
|
530
|
+
const end = this.parseCurrentValue();
|
|
588
531
|
this.selectionModel.updateSelection(new DateRange(this.selectionModel.selection.start, end), this);
|
|
589
532
|
};
|
|
590
533
|
this.handleSelectionChange();
|
|
@@ -600,45 +543,30 @@ let DateRangePickerInputEndDirective = class DateRangePickerInputEndDirective ex
|
|
|
600
543
|
return defaultErrors;
|
|
601
544
|
}
|
|
602
545
|
handleSelectionChange() {
|
|
603
|
-
this.selectionModel.selectionChanged.pipe(
|
|
546
|
+
this.selectionModel.selectionChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ selection }) => {
|
|
604
547
|
const validDate = this.dateAdapter.getValidDateOrNull(selection.end);
|
|
605
548
|
this._changed?.(validDate);
|
|
606
549
|
this.updateInputValue(validDate);
|
|
607
550
|
this._validatorChanged?.();
|
|
608
551
|
});
|
|
609
552
|
}
|
|
610
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
611
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
553
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateRangePickerInputEndDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
554
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: DateRangePickerInputEndDirective, isStandalone: true, selector: "[wlcmDateRangePickerInputEnd]", host: { classAttribute: "wlcm-date-range-picker-input-field" }, providers: [
|
|
612
555
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateRangePickerInputEndDirective), multi: true },
|
|
613
556
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateRangePickerInputEndDirective), multi: true },
|
|
614
557
|
], usesInheritance: true, ngImport: i0 }); }
|
|
615
|
-
}
|
|
616
|
-
DateRangePickerInputEndDirective
|
|
617
|
-
UntilDestroy(),
|
|
618
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
619
|
-
DateAdapter, Object, MatDateSelectionModel,
|
|
620
|
-
WlcmDatepickerTrigger])
|
|
621
|
-
], DateRangePickerInputEndDirective);
|
|
622
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: DateRangePickerInputEndDirective, decorators: [{
|
|
558
|
+
}
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateRangePickerInputEndDirective, decorators: [{
|
|
623
560
|
type: Directive,
|
|
624
561
|
args: [{
|
|
625
562
|
selector: '[wlcmDateRangePickerInputEnd]',
|
|
626
563
|
host: { class: 'wlcm-date-range-picker-input-field' },
|
|
627
|
-
standalone: true,
|
|
628
564
|
providers: [
|
|
629
565
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateRangePickerInputEndDirective), multi: true },
|
|
630
566
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateRangePickerInputEndDirective), multi: true },
|
|
631
567
|
],
|
|
632
568
|
}]
|
|
633
|
-
}], ctorParameters: () => [
|
|
634
|
-
type: Optional
|
|
635
|
-
}, {
|
|
636
|
-
type: Inject,
|
|
637
|
-
args: [MAT_DATE_FORMATS]
|
|
638
|
-
}] }, { type: i2.MatDateSelectionModel, decorators: [{
|
|
639
|
-
type: Inject,
|
|
640
|
-
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
|
641
|
-
}] }, { type: WlcmDatepickerTrigger }] });
|
|
569
|
+
}], ctorParameters: () => [] });
|
|
642
570
|
|
|
643
571
|
class DateRangePickerErrors {
|
|
644
572
|
static throwNoStartInputError() {
|
|
@@ -650,18 +578,19 @@ class DateRangePickerErrors {
|
|
|
650
578
|
}
|
|
651
579
|
|
|
652
580
|
class WlcmDateRangePickerInputComponent extends WlcmDatepickerTrigger {
|
|
653
|
-
constructor(
|
|
654
|
-
super(
|
|
655
|
-
this.overlay = overlay;
|
|
656
|
-
this.viewContainerRef = viewContainerRef;
|
|
657
|
-
this.selectionModel = selectionModel;
|
|
658
|
-
this.formField = formField;
|
|
659
|
-
this.controlContainer = controlContainer;
|
|
581
|
+
constructor() {
|
|
582
|
+
super();
|
|
660
583
|
this._focusStream$ = new BehaviorSubject(EMPTY);
|
|
661
584
|
this._blurStream$ = new BehaviorSubject(EMPTY);
|
|
662
585
|
this.focus$ = this._focusStream$.pipe(switchMap((stream) => stream));
|
|
663
586
|
this.blur$ = this._blurStream$.pipe(switchMap((stream) => stream));
|
|
664
587
|
this.componentType = SingleCalendarRangePickerComponent;
|
|
588
|
+
this.startInput = contentChild(DateRangePickerInputStartDirective, /* @ts-ignore */
|
|
589
|
+
...(ngDevMode ? [{ debugName: "startInput" }] : /* istanbul ignore next */ []));
|
|
590
|
+
this.endInput = contentChild(DateRangePickerInputEndDirective, /* @ts-ignore */
|
|
591
|
+
...(ngDevMode ? [{ debugName: "endInput" }] : /* istanbul ignore next */ []));
|
|
592
|
+
this.formField = inject(WLCM_FORM_FIELD, { host: true });
|
|
593
|
+
this.controlContainer = inject(ControlContainer, { host: true });
|
|
665
594
|
}
|
|
666
595
|
ngAfterContentInit() {
|
|
667
596
|
this.checkInputs();
|
|
@@ -685,19 +614,21 @@ class WlcmDateRangePickerInputComponent extends WlcmDatepickerTrigger {
|
|
|
685
614
|
return this.controlContainer?.control;
|
|
686
615
|
}
|
|
687
616
|
get startInputElement() {
|
|
688
|
-
return this.startInput.element.nativeElement;
|
|
617
|
+
return this.startInput().element.nativeElement;
|
|
689
618
|
}
|
|
690
619
|
get endInputElement() {
|
|
691
|
-
return this.endInput.element.nativeElement;
|
|
620
|
+
return this.endInput().element.nativeElement;
|
|
692
621
|
}
|
|
693
622
|
checkInputs() {
|
|
694
|
-
if (!this.startInput)
|
|
623
|
+
if (!this.startInput())
|
|
695
624
|
DateRangePickerErrors.throwNoStartInputError();
|
|
696
|
-
if (!this.endInput)
|
|
625
|
+
if (!this.endInput())
|
|
697
626
|
DateRangePickerErrors.throwNoEndInputError();
|
|
698
627
|
}
|
|
699
628
|
attachFocusBlurListeners() {
|
|
700
|
-
const voidFn = () => {
|
|
629
|
+
const voidFn = () => {
|
|
630
|
+
// noop
|
|
631
|
+
};
|
|
701
632
|
const startInputFocus = fromEvent(this.startInputElement, 'focus');
|
|
702
633
|
const endInputFocus = fromEvent(this.endInputElement, 'focus');
|
|
703
634
|
const startInputBlur = fromEvent(this.startInputElement, 'blur');
|
|
@@ -707,8 +638,8 @@ class WlcmDateRangePickerInputComponent extends WlcmDatepickerTrigger {
|
|
|
707
638
|
this._focusStream$.next(merge(...focusObservables).pipe(map(voidFn)));
|
|
708
639
|
this._blurStream$.next(merge(...blurObservables).pipe(map(() => this.control?.markAsTouched())));
|
|
709
640
|
}
|
|
710
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
711
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
641
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateRangePickerInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
642
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: WlcmDateRangePickerInputComponent, isStandalone: true, selector: "wlcm-date-range-picker-input", host: { classAttribute: "wlcm-date-range-picker-input" }, providers: [
|
|
712
643
|
WLCM_FORM_CONTROL_PROVIDER,
|
|
713
644
|
WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL_PROVIDER,
|
|
714
645
|
{
|
|
@@ -719,11 +650,11 @@ class WlcmDateRangePickerInputComponent extends WlcmDatepickerTrigger {
|
|
|
719
650
|
},
|
|
720
651
|
},
|
|
721
652
|
{ provide: WlcmDatepickerTrigger, useExisting: forwardRef(() => WlcmDateRangePickerInputComponent) },
|
|
722
|
-
], queries: [{ propertyName: "startInput", first: true, predicate: DateRangePickerInputStartDirective, descendants: true }, { propertyName: "endInput", first: true, predicate: DateRangePickerInputEndDirective, descendants: true }], exportAs: ["wlcmDateRangePickerInput"], usesInheritance: true, ngImport: i0, template: "<div class=\"wlcm-date-range-picker-inputs-container\">\n <div class=\"wlcm-date-range-picker-input-field-wrapper\">\n <ng-content select=\"[wlcmDateRangePickerInputStart]\"></ng-content>\n </div>\n\n <div class=\"wlcm-date-range-picker-input-dash\"></div>\n\n <div class=\"wlcm-date-range-picker-input-field-wrapper\">\n <ng-content select=\"[wlcmDateRangePickerInputEnd]\"></ng-content>\n </div>\n</div>\n", styles: [".wlcm-date-range-picker-inputs-container{display:flex;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type:
|
|
653
|
+
], queries: [{ propertyName: "startInput", first: true, predicate: DateRangePickerInputStartDirective, descendants: true, isSignal: true }, { propertyName: "endInput", first: true, predicate: DateRangePickerInputEndDirective, descendants: true, isSignal: true }], exportAs: ["wlcmDateRangePickerInput"], usesInheritance: true, ngImport: i0, template: "<div class=\"wlcm-date-range-picker-inputs-container\">\n <div class=\"wlcm-date-range-picker-input-field-wrapper\">\n <ng-content select=\"[wlcmDateRangePickerInputStart]\"></ng-content>\n </div>\n\n <div class=\"wlcm-date-range-picker-input-dash\"></div>\n\n <div class=\"wlcm-date-range-picker-input-field-wrapper\">\n <ng-content select=\"[wlcmDateRangePickerInputEnd]\"></ng-content>\n </div>\n</div>\n", styles: [".wlcm-date-range-picker-inputs-container{display:flex;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: WlcmFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
723
654
|
}
|
|
724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateRangePickerInputComponent, decorators: [{
|
|
725
656
|
type: Component,
|
|
726
|
-
args: [{ selector: 'wlcm-date-range-picker-input', host: { class: 'wlcm-date-range-picker-input' }, exportAs: 'wlcmDateRangePickerInput',
|
|
657
|
+
args: [{ selector: 'wlcm-date-range-picker-input', host: { class: 'wlcm-date-range-picker-input' }, exportAs: 'wlcmDateRangePickerInput', imports: [WlcmFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
727
658
|
WLCM_FORM_CONTROL_PROVIDER,
|
|
728
659
|
WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL_PROVIDER,
|
|
729
660
|
{
|
|
@@ -735,39 +666,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImpor
|
|
|
735
666
|
},
|
|
736
667
|
{ provide: WlcmDatepickerTrigger, useExisting: forwardRef(() => WlcmDateRangePickerInputComponent) },
|
|
737
668
|
], template: "<div class=\"wlcm-date-range-picker-inputs-container\">\n <div class=\"wlcm-date-range-picker-input-field-wrapper\">\n <ng-content select=\"[wlcmDateRangePickerInputStart]\"></ng-content>\n </div>\n\n <div class=\"wlcm-date-range-picker-input-dash\"></div>\n\n <div class=\"wlcm-date-range-picker-input-field-wrapper\">\n <ng-content select=\"[wlcmDateRangePickerInputEnd]\"></ng-content>\n </div>\n</div>\n", styles: [".wlcm-date-range-picker-inputs-container{display:flex;align-items:center}\n"] }]
|
|
738
|
-
}], ctorParameters: () => [{ type:
|
|
739
|
-
type: Inject,
|
|
740
|
-
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
|
741
|
-
}] }, { type: undefined, decorators: [{
|
|
742
|
-
type: Host
|
|
743
|
-
}, {
|
|
744
|
-
type: Inject,
|
|
745
|
-
args: [WLCM_FORM_FIELD]
|
|
746
|
-
}] }, { type: i3.ControlContainer, decorators: [{
|
|
747
|
-
type: Host
|
|
748
|
-
}, {
|
|
749
|
-
type: Inject,
|
|
750
|
-
args: [ControlContainer]
|
|
751
|
-
}] }], propDecorators: { componentType: [{
|
|
752
|
-
type: Input
|
|
753
|
-
}], startInput: [{
|
|
754
|
-
type: ContentChild,
|
|
755
|
-
args: [DateRangePickerInputStartDirective]
|
|
756
|
-
}], endInput: [{
|
|
757
|
-
type: ContentChild,
|
|
758
|
-
args: [DateRangePickerInputEndDirective]
|
|
759
|
-
}] } });
|
|
669
|
+
}], ctorParameters: () => [], propDecorators: { startInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DateRangePickerInputStartDirective), { isSignal: true }] }], endInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DateRangePickerInputEndDirective), { isSignal: true }] }] } });
|
|
760
670
|
|
|
761
671
|
class WlcmDataRangeCalendar {
|
|
762
|
-
constructor(
|
|
763
|
-
this.element = element;
|
|
764
|
-
this.calendar = calendar;
|
|
765
|
-
this.dateAdapter = dateAdapter;
|
|
766
|
-
this.datepickerConfig = datepickerConfig;
|
|
672
|
+
constructor() {
|
|
767
673
|
this.dateChange = output();
|
|
768
674
|
this.viewChange = output();
|
|
769
|
-
this.disabled = input(false
|
|
770
|
-
|
|
675
|
+
this.disabled = input(false, /* @ts-ignore */
|
|
676
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
677
|
+
this.element = inject(ElementRef);
|
|
678
|
+
this.calendar = inject(forwardRef(() => MatCalendar));
|
|
679
|
+
this.dateAdapter = inject(DateAdapter);
|
|
680
|
+
this.datepickerConfig = inject(WLCM_DATEPICKER_CONFIG);
|
|
771
681
|
effect(() => {
|
|
772
682
|
if (this.disabled()) {
|
|
773
683
|
this.element.nativeElement.classList.add('wlcm-calendar-disabled');
|
|
@@ -805,71 +715,58 @@ class WlcmDataRangeCalendar {
|
|
|
805
715
|
return true;
|
|
806
716
|
};
|
|
807
717
|
}
|
|
808
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
809
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
718
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDataRangeCalendar, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
719
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: WlcmDataRangeCalendar, isStandalone: true, inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange", viewChange: "viewChange" }, ngImport: i0 }); }
|
|
810
720
|
}
|
|
811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
721
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDataRangeCalendar, decorators: [{
|
|
812
722
|
type: Directive
|
|
813
|
-
}], ctorParameters: () => [
|
|
723
|
+
}], ctorParameters: () => [], propDecorators: { dateChange: [{ type: i0.Output, args: ["dateChange"] }], viewChange: [{ type: i0.Output, args: ["viewChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
814
724
|
|
|
815
|
-
|
|
816
|
-
constructor(
|
|
817
|
-
super(
|
|
818
|
-
this.
|
|
819
|
-
this.
|
|
820
|
-
this.calendar = calendar;
|
|
821
|
-
this.datepickerConfig = datepickerConfig;
|
|
725
|
+
class WlcmLeftCalendarDirective extends WlcmDataRangeCalendar {
|
|
726
|
+
constructor() {
|
|
727
|
+
super();
|
|
728
|
+
this.location = 'left';
|
|
729
|
+
this.destroyRef = inject(DestroyRef);
|
|
822
730
|
this.handleYearChange();
|
|
823
731
|
this.handleMonthChange();
|
|
824
732
|
}
|
|
825
733
|
handleYearChange() {
|
|
826
|
-
this.calendar.yearSelected
|
|
734
|
+
this.calendar.yearSelected
|
|
735
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
736
|
+
.subscribe((date) => this.dateChange.emit(date));
|
|
827
737
|
}
|
|
828
738
|
handleMonthChange() {
|
|
829
|
-
this.calendar.monthSelected
|
|
739
|
+
this.calendar.monthSelected
|
|
740
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
741
|
+
.subscribe((date) => this.dateChange.emit(date));
|
|
830
742
|
}
|
|
831
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
832
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
833
|
-
}
|
|
834
|
-
WlcmLeftCalendarDirective
|
|
835
|
-
UntilDestroy(),
|
|
836
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
837
|
-
DateAdapter,
|
|
838
|
-
MatCalendar, Object])
|
|
839
|
-
], WlcmLeftCalendarDirective);
|
|
840
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: WlcmLeftCalendarDirective, decorators: [{
|
|
743
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmLeftCalendarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
744
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: WlcmLeftCalendarDirective, isStandalone: true, selector: "[wlcmLeftCalendar]", providers: [{ provide: WlcmDataRangeCalendar, useExisting: forwardRef(() => WlcmLeftCalendarDirective) }], usesInheritance: true, ngImport: i0 }); }
|
|
745
|
+
}
|
|
746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmLeftCalendarDirective, decorators: [{
|
|
841
747
|
type: Directive,
|
|
842
748
|
args: [{
|
|
843
749
|
selector: '[wlcmLeftCalendar]',
|
|
844
|
-
standalone: true,
|
|
845
750
|
providers: [{ provide: WlcmDataRangeCalendar, useExisting: forwardRef(() => WlcmLeftCalendarDirective) }],
|
|
846
751
|
}]
|
|
847
|
-
}], ctorParameters: () => [
|
|
848
|
-
type: Inject,
|
|
849
|
-
args: [forwardRef(() => MatCalendar)]
|
|
850
|
-
}] }, { type: undefined, decorators: [{
|
|
851
|
-
type: Inject,
|
|
852
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
853
|
-
}] }] });
|
|
752
|
+
}], ctorParameters: () => [] });
|
|
854
753
|
|
|
855
|
-
|
|
856
|
-
constructor(
|
|
857
|
-
super(
|
|
858
|
-
this.
|
|
859
|
-
this.
|
|
860
|
-
this.calendar = calendar;
|
|
861
|
-
this.datepickerConfig = datepickerConfig;
|
|
754
|
+
class WlcmRightCalendarDirective extends WlcmDataRangeCalendar {
|
|
755
|
+
constructor() {
|
|
756
|
+
super();
|
|
757
|
+
this.location = 'right';
|
|
758
|
+
this.destroyRef = inject(DestroyRef);
|
|
862
759
|
this.handleYearChange();
|
|
863
760
|
this.handleMonthChange();
|
|
864
761
|
}
|
|
865
762
|
handleYearChange() {
|
|
866
763
|
this.calendar.yearSelected
|
|
867
|
-
.pipe(
|
|
764
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
868
765
|
.subscribe((date) => this.dateChange.emit(this.dateAdapter.addCalendarMonths(date, -1)));
|
|
869
766
|
}
|
|
870
767
|
handleMonthChange() {
|
|
871
768
|
this.calendar.monthSelected
|
|
872
|
-
.pipe(
|
|
769
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
873
770
|
.subscribe((date) => this.dateChange.emit(this.dateAdapter.addCalendarMonths(date, -1)));
|
|
874
771
|
}
|
|
875
772
|
nextMonth() {
|
|
@@ -881,37 +778,24 @@ let WlcmRightCalendarDirective = class WlcmRightCalendarDirective extends WlcmDa
|
|
|
881
778
|
nextYear() {
|
|
882
779
|
this.dateChange.emit(this.dateAdapter.addCalendarMonths(this.dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? 1 : yearsPerPage), -1));
|
|
883
780
|
}
|
|
884
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
885
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
886
|
-
}
|
|
887
|
-
WlcmRightCalendarDirective
|
|
888
|
-
UntilDestroy(),
|
|
889
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
890
|
-
DateAdapter,
|
|
891
|
-
MatCalendar, Object])
|
|
892
|
-
], WlcmRightCalendarDirective);
|
|
893
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: WlcmRightCalendarDirective, decorators: [{
|
|
781
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmRightCalendarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
782
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: WlcmRightCalendarDirective, isStandalone: true, selector: "[wlcmRightCalendar]", providers: [{ provide: WlcmDataRangeCalendar, useExisting: forwardRef(() => WlcmRightCalendarDirective) }], usesInheritance: true, ngImport: i0 }); }
|
|
783
|
+
}
|
|
784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmRightCalendarDirective, decorators: [{
|
|
894
785
|
type: Directive,
|
|
895
786
|
args: [{
|
|
896
787
|
selector: '[wlcmRightCalendar]',
|
|
897
|
-
standalone: true,
|
|
898
788
|
providers: [{ provide: WlcmDataRangeCalendar, useExisting: forwardRef(() => WlcmRightCalendarDirective) }],
|
|
899
789
|
}]
|
|
900
|
-
}], ctorParameters: () => [
|
|
901
|
-
type: Inject,
|
|
902
|
-
args: [forwardRef(() => MatCalendar)]
|
|
903
|
-
}] }, { type: undefined, decorators: [{
|
|
904
|
-
type: Inject,
|
|
905
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
906
|
-
}] }] });
|
|
790
|
+
}], ctorParameters: () => [] });
|
|
907
791
|
|
|
908
792
|
class WlcmDateRangeCalendarHeaderComponent {
|
|
909
|
-
constructor(
|
|
910
|
-
this.rangeCalendar = rangeCalendar;
|
|
911
|
-
this.dateFormats = dateFormats;
|
|
912
|
-
this.calendar = calendar;
|
|
913
|
-
this.datepickerConfig = datepickerConfig;
|
|
793
|
+
constructor() {
|
|
914
794
|
this.WlcmIconName = WlcmIconName;
|
|
795
|
+
this.rangeCalendar = inject(WlcmDataRangeCalendar, { optional: true });
|
|
796
|
+
this.dateFormats = inject(MAT_DATE_FORMATS, { optional: true });
|
|
797
|
+
this.calendar = inject(forwardRef(() => MatCalendar));
|
|
798
|
+
this.datepickerConfig = inject(WLCM_DATEPICKER_CONFIG);
|
|
915
799
|
this.previous = () => {
|
|
916
800
|
if (this.isPreviousDisabled)
|
|
917
801
|
return;
|
|
@@ -959,71 +843,72 @@ class WlcmDateRangeCalendarHeaderComponent {
|
|
|
959
843
|
get canDisplayRightArrow() {
|
|
960
844
|
return !this.rangeCalendar || this.rangeCalendar.location === 'right' || this.calendar.currentView !== 'month';
|
|
961
845
|
}
|
|
962
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
963
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
846
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateRangeCalendarHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
847
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: WlcmDateRangeCalendarHeaderComponent, isStandalone: true, selector: "wlcm-date-range-calendar-header", ngImport: i0, template: "<wlcm-calendar-header\n [next]=\"next\"\n [previous]=\"previous\"\n [disableLeftArrow]=\"isPreviousDisabled\"\n [disableRightArrow]=\"isNextDisabled\"\n [displayLeftArrow]=\"canDisplayLeftArrow && !rangeCalendar?.disabled()\"\n [displayRightArrow]=\"canDisplayRightArrow && !rangeCalendar?.disabled()\"\n></wlcm-calendar-header>\n", styles: [""], dependencies: [{ kind: "component", type: WlcmCalendarHeaderComponent, selector: "wlcm-calendar-header", inputs: ["next", "previous", "disableLeftArrow", "disableRightArrow", "displayLeftArrow", "displayRightArrow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
964
848
|
}
|
|
965
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateRangeCalendarHeaderComponent, decorators: [{
|
|
966
850
|
type: Component,
|
|
967
|
-
args: [{ selector: 'wlcm-date-range-calendar-header',
|
|
968
|
-
}]
|
|
969
|
-
type: Optional
|
|
970
|
-
}] }, { type: undefined, decorators: [{
|
|
971
|
-
type: Optional
|
|
972
|
-
}, {
|
|
973
|
-
type: Inject,
|
|
974
|
-
args: [MAT_DATE_FORMATS]
|
|
975
|
-
}] }, { type: i2.MatCalendar, decorators: [{
|
|
976
|
-
type: Inject,
|
|
977
|
-
args: [forwardRef(() => MatCalendar)]
|
|
978
|
-
}] }, { type: undefined, decorators: [{
|
|
979
|
-
type: Inject,
|
|
980
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
981
|
-
}] }] });
|
|
851
|
+
args: [{ selector: 'wlcm-date-range-calendar-header', imports: [WlcmCalendarHeaderComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<wlcm-calendar-header\n [next]=\"next\"\n [previous]=\"previous\"\n [disableLeftArrow]=\"isPreviousDisabled\"\n [disableRightArrow]=\"isNextDisabled\"\n [displayLeftArrow]=\"canDisplayLeftArrow && !rangeCalendar?.disabled()\"\n [displayRightArrow]=\"canDisplayRightArrow && !rangeCalendar?.disabled()\"\n></wlcm-calendar-header>\n" }]
|
|
852
|
+
}] });
|
|
982
853
|
|
|
983
|
-
|
|
984
|
-
constructor(
|
|
985
|
-
super(
|
|
986
|
-
this.rangeConfig = rangeConfig;
|
|
987
|
-
this.rangeSelectionStrategy = rangeSelectionStrategy;
|
|
988
|
-
this.localSelectionModel = localSelectionModel;
|
|
989
|
-
this.triggerSelectionModel = triggerSelectionModel;
|
|
990
|
-
this.trigger = trigger;
|
|
991
|
-
this.datepickerConfig = datepickerConfig;
|
|
992
|
-
this.pickerBottomPanel = pickerBottomPanel;
|
|
993
|
-
this.pickerLeftPanel = pickerLeftPanel;
|
|
994
|
-
this.dateAdapter = dateAdapter;
|
|
854
|
+
class DoubleCalendarRangePickerComponent extends WlcmDateRangePicker {
|
|
855
|
+
constructor() {
|
|
856
|
+
super();
|
|
995
857
|
this.headerComponent = WlcmDateRangeCalendarHeaderComponent;
|
|
996
|
-
this._isViewInitialized = signal(false
|
|
997
|
-
|
|
998
|
-
this.
|
|
999
|
-
this.
|
|
858
|
+
this._isViewInitialized = signal(false, /* @ts-ignore */
|
|
859
|
+
...(ngDevMode ? [{ debugName: "_isViewInitialized" }] : /* istanbul ignore next */ []));
|
|
860
|
+
this.rangeConfig = inject(WLCM_DATE_RANGE_PICKER_CONFIG, { optional: true });
|
|
861
|
+
this.triggerSelectionModel = inject(WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL);
|
|
862
|
+
this.trigger = inject(WlcmDatepickerTrigger);
|
|
863
|
+
this.datepickerConfig = inject(WLCM_DATEPICKER_CONFIG);
|
|
864
|
+
this.pickerBottomPanel = inject(WLCM_DATE_RANGE_PICKER_BP);
|
|
865
|
+
this.pickerLeftPanel = inject(WLCM_DATE_RANGE_PICKER_LEFT_PANEL, { optional: true });
|
|
866
|
+
this.dateAdapter = inject(DateAdapter);
|
|
867
|
+
this.destroyRef = inject(DestroyRef);
|
|
868
|
+
this.leftCalendar = viewChild(WlcmLeftCalendarDirective, { ...(ngDevMode ? { debugName: "leftCalendar" } : /* istanbul ignore next */ {}), read: MatCalendar });
|
|
869
|
+
this.rightCalendar = viewChild(WlcmRightCalendarDirective, { ...(ngDevMode ? { debugName: "rightCalendar" } : /* istanbul ignore next */ {}), read: MatCalendar });
|
|
870
|
+
this.leftCalendarElement = viewChild(WlcmLeftCalendarDirective, { ...(ngDevMode ? { debugName: "leftCalendarElement" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
871
|
+
this.bottomPanelContainer = viewChild('bottomPanelContainer', { ...(ngDevMode ? { debugName: "bottomPanelContainer" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
|
|
872
|
+
this.leftPanelContainer = viewChild('leftPanelContainer', { ...(ngDevMode ? { debugName: "leftPanelContainer" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
|
|
873
|
+
this.monthView = viewChild(MatMonthView, /* @ts-ignore */
|
|
874
|
+
...(ngDevMode ? [{ debugName: "monthView" }] : /* istanbul ignore next */ []));
|
|
875
|
+
this.startDate = signal(new Date(), /* @ts-ignore */
|
|
876
|
+
...(ngDevMode ? [{ debugName: "startDate" }] : /* istanbul ignore next */ []));
|
|
877
|
+
this.leftCalendarYearViewActivated = signal(false, /* @ts-ignore */
|
|
878
|
+
...(ngDevMode ? [{ debugName: "leftCalendarYearViewActivated" }] : /* istanbul ignore next */ []));
|
|
879
|
+
this.rightCalendarYearViewActivated = signal(false, /* @ts-ignore */
|
|
880
|
+
...(ngDevMode ? [{ debugName: "rightCalendarYearViewActivated" }] : /* istanbul ignore next */ []));
|
|
1000
881
|
this.localSelectionModel.updateSelection(this.triggerSelectionModel.selection, this);
|
|
1001
882
|
if (this.triggerSelectionModel.selection.start) {
|
|
1002
883
|
this.startDate.set(this.triggerSelectionModel.selection.start);
|
|
1003
884
|
}
|
|
1004
|
-
if (this.rangeConfig
|
|
885
|
+
if (this.rangeConfig?.headerComponent) {
|
|
1005
886
|
this.headerComponent = this.rangeConfig.headerComponent;
|
|
1006
887
|
}
|
|
1007
888
|
effect(() => {
|
|
1008
889
|
if (!this._isViewInitialized())
|
|
1009
890
|
return;
|
|
1010
891
|
const startDate = this.startDate();
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
892
|
+
const leftCalendar = this.leftCalendar();
|
|
893
|
+
const rightCalendar = this.rightCalendar();
|
|
894
|
+
if (!leftCalendar || !rightCalendar)
|
|
895
|
+
return;
|
|
896
|
+
leftCalendar.activeDate = startDate;
|
|
897
|
+
rightCalendar.activeDate = this.dateAdapter.addCalendarMonths(startDate, 1);
|
|
898
|
+
rightCalendar.startAt = rightCalendar.activeDate;
|
|
1014
899
|
});
|
|
1015
900
|
}
|
|
1016
901
|
ngAfterViewInit() {
|
|
1017
902
|
this._isViewInitialized.set(true);
|
|
1018
|
-
this.leftCalendar.viewChanged.pipe(
|
|
903
|
+
this.leftCalendar().viewChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((view) => {
|
|
1019
904
|
this.leftCalendarYearViewActivated.set(view !== 'month');
|
|
1020
905
|
});
|
|
1021
|
-
this.rightCalendar.viewChanged.pipe(
|
|
906
|
+
this.rightCalendar().viewChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((view) => {
|
|
1022
907
|
this.rightCalendarYearViewActivated.set(view !== 'month');
|
|
1023
908
|
});
|
|
1024
|
-
this.bottomPanelContainer.createComponent(this.pickerBottomPanel);
|
|
909
|
+
this.bottomPanelContainer().createComponent(this.pickerBottomPanel);
|
|
1025
910
|
if (this.pickerLeftPanel) {
|
|
1026
|
-
this.leftPanelContainer.createComponent(this.pickerLeftPanel).changeDetectorRef.detectChanges();
|
|
911
|
+
this.leftPanelContainer().createComponent(this.pickerLeftPanel).changeDetectorRef.detectChanges();
|
|
1027
912
|
}
|
|
1028
913
|
this.handleRightCalendarPreviewChange();
|
|
1029
914
|
}
|
|
@@ -1035,56 +920,54 @@ let DoubleCalendarRangePickerComponent = class DoubleCalendarRangePickerComponen
|
|
|
1035
920
|
this.trigger.close();
|
|
1036
921
|
}
|
|
1037
922
|
get leftCalendarActiveCell() {
|
|
1038
|
-
return this.leftCalendarElement
|
|
923
|
+
return this.leftCalendarElement()?.nativeElement.querySelector('.mat-calendar-body-active') ?? null;
|
|
1039
924
|
}
|
|
1040
925
|
handleRightCalendarPreviewChange() {
|
|
926
|
+
const rightCalendar = this.rightCalendar();
|
|
927
|
+
if (!rightCalendar)
|
|
928
|
+
return;
|
|
1041
929
|
const viewChanged = new Subject();
|
|
1042
|
-
|
|
1043
|
-
.pipe(
|
|
930
|
+
rightCalendar.viewChanged
|
|
931
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1044
932
|
.pipe(tap(() => viewChanged.next()))
|
|
1045
|
-
.pipe(startWith(
|
|
933
|
+
.pipe(startWith(rightCalendar.currentView))
|
|
1046
934
|
.subscribe((view) => {
|
|
1047
935
|
if (view !== 'month')
|
|
1048
936
|
return;
|
|
1049
|
-
|
|
1050
|
-
.pipe(takeUntil(viewChanged),
|
|
937
|
+
rightCalendar.monthView._matCalendarBody.previewChange
|
|
938
|
+
.pipe(takeUntil(viewChanged), takeUntilDestroyed(this.destroyRef))
|
|
1051
939
|
.subscribe(() => {
|
|
1052
|
-
|
|
940
|
+
const leftCalendar = this.leftCalendar();
|
|
941
|
+
if (!leftCalendar || leftCalendar.currentView !== 'month' || !leftCalendar.monthView._rangeStart()) {
|
|
1053
942
|
return;
|
|
1054
|
-
|
|
1055
|
-
|
|
943
|
+
}
|
|
944
|
+
leftCalendar.monthView._previewStart.set(rightCalendar.monthView._previewStart());
|
|
945
|
+
leftCalendar.monthView._previewEnd.set(rightCalendar.monthView._previewEnd());
|
|
1056
946
|
const activeCell = this.leftCalendarActiveCell;
|
|
1057
947
|
if (activeCell && activeCell === document.activeElement)
|
|
1058
948
|
activeCell.blur();
|
|
1059
|
-
|
|
949
|
+
leftCalendar.monthView._changeDetectorRef.markForCheck();
|
|
1060
950
|
});
|
|
1061
951
|
});
|
|
1062
952
|
}
|
|
1063
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1064
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
953
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DoubleCalendarRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
954
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: DoubleCalendarRangePickerComponent, isStandalone: true, selector: "wlcm-double-calendar-range-picker", providers: [
|
|
1065
955
|
{
|
|
1066
956
|
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
1067
957
|
useClass: DefaultMatCalendarRangeStrategy,
|
|
1068
958
|
},
|
|
1069
959
|
{ provide: WlcmDateRangePicker, useExisting: forwardRef(() => DoubleCalendarRangePickerComponent) },
|
|
1070
960
|
WLCM_DATE_RANGE_SELECTION_MODEL_PROVIDER,
|
|
1071
|
-
], viewQueries: [{ propertyName: "leftCalendar", first: true, predicate: WlcmLeftCalendarDirective, descendants: true, read: MatCalendar }, { propertyName: "rightCalendar", first: true, predicate: WlcmRightCalendarDirective, descendants: true, read: MatCalendar }, { propertyName: "leftCalendarElement", first: true, predicate: WlcmLeftCalendarDirective, descendants: true, read: ElementRef }, { propertyName: "bottomPanelContainer", first: true, predicate: ["bottomPanelContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "leftPanelContainer", first: true, predicate: ["leftPanelContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "monthView", first: true, predicate: MatMonthView, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"wlcm-date-range-picker-panel\">\n <div class=\"double-calendar-range-picker-body\">\n <div class=\"double-calendar-range-picker__left-section\">\n <ng-container #leftPanelContainer></ng-container>\n </div>\n\n <div class=\"double-calendar-range-picker__calendars-container\">\n <mat-calendar\n wlcmCalendar\n wlcmLeftCalendar\n [selected]=\"selected\"\n [disabled]=\"rightCalendarYearViewActivated()\"\n [headerComponent]=\"headerComponent\"\n (_userSelection)=\"calendarSelection($event)\"\n (_userDragDrop)=\"calendarDragDrop($event)\"\n (dateChange)=\"startDate.set($event)\"\n ></mat-calendar>\n\n <mat-calendar\n wlcmCalendar\n wlcmRightCalendar\n [selected]=\"selected\"\n [disabled]=\"leftCalendarYearViewActivated()\"\n [headerComponent]=\"headerComponent\"\n (_userSelection)=\"calendarSelection($event)\"\n (_userDragDrop)=\"calendarDragDrop($event)\"\n (dateChange)=\"startDate.set($event)\"\n ></mat-calendar>\n </div>\n </div>\n\n <ng-container #bottomPanelContainer></ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type:
|
|
1072
|
-
}
|
|
1073
|
-
DoubleCalendarRangePickerComponent
|
|
1074
|
-
UntilDestroy(),
|
|
1075
|
-
__metadata("design:paramtypes", [Object, Object, MatDateSelectionModel,
|
|
1076
|
-
MatDateSelectionModel,
|
|
1077
|
-
WlcmDatepickerTrigger, Object, Type, Object, DateAdapter])
|
|
1078
|
-
], DoubleCalendarRangePickerComponent);
|
|
1079
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: DoubleCalendarRangePickerComponent, decorators: [{
|
|
961
|
+
], viewQueries: [{ propertyName: "leftCalendar", first: true, predicate: WlcmLeftCalendarDirective, descendants: true, read: MatCalendar, isSignal: true }, { propertyName: "rightCalendar", first: true, predicate: WlcmRightCalendarDirective, descendants: true, read: MatCalendar, isSignal: true }, { propertyName: "leftCalendarElement", first: true, predicate: WlcmLeftCalendarDirective, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "bottomPanelContainer", first: true, predicate: ["bottomPanelContainer"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "leftPanelContainer", first: true, predicate: ["leftPanelContainer"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "monthView", first: true, predicate: MatMonthView, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"wlcm-date-range-picker-panel\">\n <div class=\"double-calendar-range-picker-body\">\n <div class=\"double-calendar-range-picker__left-section\">\n <ng-container #leftPanelContainer></ng-container>\n </div>\n\n <div class=\"double-calendar-range-picker__calendars-container\">\n <mat-calendar\n wlcmCalendar\n wlcmLeftCalendar\n [selected]=\"selected\"\n [disabled]=\"rightCalendarYearViewActivated()\"\n [headerComponent]=\"headerComponent\"\n (_userSelection)=\"calendarSelection($event)\"\n (_userDragDrop)=\"calendarDragDrop($event)\"\n (dateChange)=\"startDate.set($event)\"\n ></mat-calendar>\n\n <mat-calendar\n wlcmCalendar\n wlcmRightCalendar\n [selected]=\"selected\"\n [disabled]=\"leftCalendarYearViewActivated()\"\n [headerComponent]=\"headerComponent\"\n (_userSelection)=\"calendarSelection($event)\"\n (_userDragDrop)=\"calendarDragDrop($event)\"\n (dateChange)=\"startDate.set($event)\"\n ></mat-calendar>\n </div>\n </div>\n\n <ng-container #bottomPanelContainer></ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1$1.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "directive", type: WlcmCalendarDirective, selector: "[wlcmCalendar]" }, { kind: "directive", type: WlcmLeftCalendarDirective, selector: "[wlcmLeftCalendar]" }, { kind: "directive", type: WlcmRightCalendarDirective, selector: "[wlcmRightCalendar]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
962
|
+
}
|
|
963
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DoubleCalendarRangePickerComponent, decorators: [{
|
|
1080
964
|
type: Component,
|
|
1081
965
|
args: [{ selector: 'wlcm-double-calendar-range-picker', imports: [
|
|
1082
|
-
CommonModule,
|
|
1083
966
|
MatDatepickerModule,
|
|
1084
967
|
WlcmCalendarDirective,
|
|
1085
968
|
WlcmLeftCalendarDirective,
|
|
1086
|
-
WlcmRightCalendarDirective
|
|
1087
|
-
], providers: [
|
|
969
|
+
WlcmRightCalendarDirective
|
|
970
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1088
971
|
{
|
|
1089
972
|
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
1090
973
|
useClass: DefaultMatCalendarRangeStrategy,
|
|
@@ -1092,143 +975,90 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImpor
|
|
|
1092
975
|
{ provide: WlcmDateRangePicker, useExisting: forwardRef(() => DoubleCalendarRangePickerComponent) },
|
|
1093
976
|
WLCM_DATE_RANGE_SELECTION_MODEL_PROVIDER,
|
|
1094
977
|
], template: "<div class=\"wlcm-date-range-picker-panel\">\n <div class=\"double-calendar-range-picker-body\">\n <div class=\"double-calendar-range-picker__left-section\">\n <ng-container #leftPanelContainer></ng-container>\n </div>\n\n <div class=\"double-calendar-range-picker__calendars-container\">\n <mat-calendar\n wlcmCalendar\n wlcmLeftCalendar\n [selected]=\"selected\"\n [disabled]=\"rightCalendarYearViewActivated()\"\n [headerComponent]=\"headerComponent\"\n (_userSelection)=\"calendarSelection($event)\"\n (_userDragDrop)=\"calendarDragDrop($event)\"\n (dateChange)=\"startDate.set($event)\"\n ></mat-calendar>\n\n <mat-calendar\n wlcmCalendar\n wlcmRightCalendar\n [selected]=\"selected\"\n [disabled]=\"leftCalendarYearViewActivated()\"\n [headerComponent]=\"headerComponent\"\n (_userSelection)=\"calendarSelection($event)\"\n (_userDragDrop)=\"calendarDragDrop($event)\"\n (dateChange)=\"startDate.set($event)\"\n ></mat-calendar>\n </div>\n </div>\n\n <ng-container #bottomPanelContainer></ng-container>\n</div>\n" }]
|
|
1095
|
-
}], ctorParameters: () => [{ type:
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
}] }, { type: i2.MatDateSelectionModel, decorators: [{
|
|
1107
|
-
type: Inject,
|
|
1108
|
-
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
|
1109
|
-
}] }, { type: WlcmDatepickerTrigger }, { type: undefined, decorators: [{
|
|
1110
|
-
type: Inject,
|
|
1111
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
1112
|
-
}] }, { type: i0.Type, decorators: [{
|
|
1113
|
-
type: Inject,
|
|
1114
|
-
args: [WLCM_DATE_RANGE_PICKER_BP]
|
|
1115
|
-
}] }, { type: i0.Type, decorators: [{
|
|
1116
|
-
type: Optional
|
|
1117
|
-
}, {
|
|
1118
|
-
type: Inject,
|
|
1119
|
-
args: [WLCM_DATE_RANGE_PICKER_LEFT_PANEL]
|
|
1120
|
-
}] }, { type: i1$1.DateAdapter }], propDecorators: { leftCalendar: [{
|
|
1121
|
-
type: ViewChild,
|
|
1122
|
-
args: [WlcmLeftCalendarDirective, { read: MatCalendar }]
|
|
1123
|
-
}], rightCalendar: [{
|
|
1124
|
-
type: ViewChild,
|
|
1125
|
-
args: [WlcmRightCalendarDirective, { read: MatCalendar }]
|
|
1126
|
-
}], leftCalendarElement: [{
|
|
1127
|
-
type: ViewChild,
|
|
1128
|
-
args: [WlcmLeftCalendarDirective, { read: ElementRef }]
|
|
1129
|
-
}], bottomPanelContainer: [{
|
|
1130
|
-
type: ViewChild,
|
|
1131
|
-
args: ['bottomPanelContainer', { read: ViewContainerRef }]
|
|
1132
|
-
}], leftPanelContainer: [{
|
|
1133
|
-
type: ViewChild,
|
|
1134
|
-
args: ['leftPanelContainer', { read: ViewContainerRef }]
|
|
1135
|
-
}], monthView: [{
|
|
1136
|
-
type: ViewChild,
|
|
1137
|
-
args: [MatMonthView]
|
|
1138
|
-
}] } });
|
|
978
|
+
}], ctorParameters: () => [], propDecorators: { leftCalendar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => WlcmLeftCalendarDirective), { ...{
|
|
979
|
+
read: MatCalendar,
|
|
980
|
+
}, isSignal: true }] }], rightCalendar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => WlcmRightCalendarDirective), { ...{
|
|
981
|
+
read: MatCalendar,
|
|
982
|
+
}, isSignal: true }] }], leftCalendarElement: [{ type: i0.ViewChild, args: [i0.forwardRef(() => WlcmLeftCalendarDirective), { ...{
|
|
983
|
+
read: ElementRef,
|
|
984
|
+
}, isSignal: true }] }], bottomPanelContainer: [{ type: i0.ViewChild, args: ['bottomPanelContainer', { ...{
|
|
985
|
+
read: ViewContainerRef,
|
|
986
|
+
}, isSignal: true }] }], leftPanelContainer: [{ type: i0.ViewChild, args: ['leftPanelContainer', { ...{
|
|
987
|
+
read: ViewContainerRef,
|
|
988
|
+
}, isSignal: true }] }], monthView: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatMonthView), { isSignal: true }] }] } });
|
|
1139
989
|
|
|
1140
|
-
|
|
1141
|
-
constructor(
|
|
1142
|
-
super(
|
|
1143
|
-
this.
|
|
1144
|
-
this.
|
|
1145
|
-
this.dateFormats = dateFormats;
|
|
1146
|
-
this.selectionModel = selectionModel;
|
|
1147
|
-
this.trigger = trigger;
|
|
990
|
+
class WlcmDatepickerInputDirective extends WlcmDatepickerInputBase {
|
|
991
|
+
constructor() {
|
|
992
|
+
super();
|
|
993
|
+
this.selectionModel = inject(MatDateSelectionModel);
|
|
994
|
+
this.destroyRef = inject(DestroyRef);
|
|
1148
995
|
this.handleSelectionChange();
|
|
1149
996
|
this.handleClosePanel();
|
|
1150
997
|
}
|
|
1151
998
|
updateSelection() {
|
|
1152
|
-
|
|
999
|
+
const date = this.parseCurrentValue();
|
|
1153
1000
|
this.selectionModel.updateSelection(date, this);
|
|
1154
1001
|
}
|
|
1155
1002
|
handleClosePanel() {
|
|
1156
|
-
this.trigger.closed.pipe(
|
|
1003
|
+
this.trigger.closed.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this._touched?.());
|
|
1157
1004
|
}
|
|
1158
1005
|
handleSelectionChange() {
|
|
1159
|
-
this.selectionModel.selectionChanged.pipe(
|
|
1006
|
+
this.selectionModel.selectionChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ selection }) => {
|
|
1160
1007
|
this.updateInputValue(selection);
|
|
1161
1008
|
this._changed?.(selection);
|
|
1162
1009
|
this._touched?.();
|
|
1163
1010
|
});
|
|
1164
1011
|
}
|
|
1165
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1166
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1012
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1013
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: WlcmDatepickerInputDirective, isStandalone: true, selector: "[wlcmDatepickerInput]", host: { classAttribute: "wlcm-form-field-input" }, providers: [
|
|
1167
1014
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => WlcmDatepickerInputDirective), multi: true },
|
|
1168
1015
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => WlcmDatepickerInputDirective), multi: true },
|
|
1169
1016
|
], exportAs: ["wlcmDatepickerInput"], usesInheritance: true, ngImport: i0 }); }
|
|
1170
|
-
}
|
|
1171
|
-
WlcmDatepickerInputDirective
|
|
1172
|
-
UntilDestroy(),
|
|
1173
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
1174
|
-
DateAdapter, Object, MatDateSelectionModel,
|
|
1175
|
-
WlcmDatepickerTrigger])
|
|
1176
|
-
], WlcmDatepickerInputDirective);
|
|
1177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: WlcmDatepickerInputDirective, decorators: [{
|
|
1017
|
+
}
|
|
1018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerInputDirective, decorators: [{
|
|
1178
1019
|
type: Directive,
|
|
1179
1020
|
args: [{
|
|
1180
1021
|
selector: '[wlcmDatepickerInput]',
|
|
1181
1022
|
exportAs: 'wlcmDatepickerInput',
|
|
1182
1023
|
host: { class: 'wlcm-form-field-input' },
|
|
1183
|
-
standalone: true,
|
|
1184
1024
|
providers: [
|
|
1185
1025
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => WlcmDatepickerInputDirective), multi: true },
|
|
1186
1026
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => WlcmDatepickerInputDirective), multi: true },
|
|
1187
1027
|
],
|
|
1188
1028
|
}]
|
|
1189
|
-
}], ctorParameters: () => [
|
|
1190
|
-
type: Inject,
|
|
1191
|
-
args: [MAT_DATE_FORMATS]
|
|
1192
|
-
}] }, { type: i2.MatDateSelectionModel }, { type: WlcmDatepickerTrigger }] });
|
|
1029
|
+
}], ctorParameters: () => [] });
|
|
1193
1030
|
|
|
1194
1031
|
class WlcmDatepickerPanelComponent {
|
|
1195
|
-
constructor(
|
|
1196
|
-
this.selectionModel = selectionModel;
|
|
1197
|
-
this.trigger = trigger;
|
|
1198
|
-
this.config = config;
|
|
1032
|
+
constructor() {
|
|
1199
1033
|
this.headerComponent = WlcmCalendarHeaderComponent;
|
|
1200
|
-
this.matCalendar = viewChild(MatCalendar
|
|
1034
|
+
this.matCalendar = viewChild(MatCalendar, /* @ts-ignore */
|
|
1035
|
+
...(ngDevMode ? [{ debugName: "matCalendar" }] : /* istanbul ignore next */ []));
|
|
1036
|
+
this.selectionModel = inject(MatDateSelectionModel);
|
|
1037
|
+
this.trigger = inject(WlcmDatepickerTrigger);
|
|
1038
|
+
this.config = inject(WLCM_DATEPICKER_CONFIG);
|
|
1201
1039
|
}
|
|
1202
1040
|
select(date) {
|
|
1203
1041
|
this.selectionModel.updateSelection(date, this);
|
|
1204
1042
|
this.trigger.close();
|
|
1205
1043
|
}
|
|
1206
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1207
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
1044
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1045
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: WlcmDatepickerPanelComponent, isStandalone: true, selector: "wlcm-datepicker-panel", host: { classAttribute: "wlcm-datepicker-panel" }, viewQueries: [{ propertyName: "matCalendar", first: true, predicate: MatCalendar, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-calendar\n wlcmCalendar\n [minDate]=\"config.minDate?.()\"\n [maxDate]=\"config.maxDate?.()\"\n [startAt]=\"selectionModel.selection\"\n [selected]=\"selectionModel.selection\"\n [headerComponent]=\"headerComponent\"\n (selectedChange)=\"select($event)\"\n></mat-calendar>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1$1.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "directive", type: WlcmCalendarDirective, selector: "[wlcmCalendar]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1208
1046
|
}
|
|
1209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1047
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerPanelComponent, decorators: [{
|
|
1210
1048
|
type: Component,
|
|
1211
|
-
args: [{ selector: 'wlcm-datepicker-panel', host: { class: 'wlcm-datepicker-panel' },
|
|
1212
|
-
}],
|
|
1213
|
-
type: Inject,
|
|
1214
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
1215
|
-
}] }] });
|
|
1049
|
+
args: [{ selector: 'wlcm-datepicker-panel', host: { class: 'wlcm-datepicker-panel' }, imports: [MatDatepickerModule, WlcmCalendarDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-calendar\n wlcmCalendar\n [minDate]=\"config.minDate?.()\"\n [maxDate]=\"config.maxDate?.()\"\n [startAt]=\"selectionModel.selection\"\n [selected]=\"selectionModel.selection\"\n [headerComponent]=\"headerComponent\"\n (selectedChange)=\"select($event)\"\n></mat-calendar>\n" }]
|
|
1050
|
+
}], propDecorators: { matCalendar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatCalendar), { isSignal: true }] }] } });
|
|
1216
1051
|
|
|
1217
1052
|
class WlcmDatepickerInputContainerComponent extends WlcmDatepickerTrigger {
|
|
1218
|
-
constructor(
|
|
1219
|
-
super(
|
|
1220
|
-
this.overlay = overlay;
|
|
1221
|
-
this.viewContainerRef = viewContainerRef;
|
|
1222
|
-
this.selectionModel = selectionModel;
|
|
1223
|
-
this.formField = formField;
|
|
1053
|
+
constructor() {
|
|
1054
|
+
super();
|
|
1224
1055
|
this._focusStream$ = new BehaviorSubject(EMPTY);
|
|
1225
1056
|
this._blurStream$ = new BehaviorSubject(EMPTY);
|
|
1226
1057
|
this.focus$ = this._focusStream$.pipe(switchMap((stream) => stream));
|
|
1227
1058
|
this.blur$ = this._blurStream$.pipe(switchMap((stream) => stream));
|
|
1228
|
-
this.inputRef = contentChild(WlcmDatepickerInputDirective, {
|
|
1229
|
-
read: ElementRef,
|
|
1230
|
-
});
|
|
1059
|
+
this.inputRef = contentChild(WlcmDatepickerInputDirective, { ...(ngDevMode ? { debugName: "inputRef" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
1231
1060
|
this.componentType = WlcmDatepickerPanelComponent;
|
|
1061
|
+
this.formField = inject(WLCM_FORM_FIELD, { host: true });
|
|
1232
1062
|
this.focus = () => {
|
|
1233
1063
|
if (this.selectOnly())
|
|
1234
1064
|
return this.open();
|
|
@@ -1248,7 +1078,9 @@ class WlcmDatepickerInputContainerComponent extends WlcmDatepickerTrigger {
|
|
|
1248
1078
|
return this.inputRef()?.nativeElement;
|
|
1249
1079
|
}
|
|
1250
1080
|
attachFocusBlurListeners() {
|
|
1251
|
-
const voidFn = () => {
|
|
1081
|
+
const voidFn = () => {
|
|
1082
|
+
// noop
|
|
1083
|
+
};
|
|
1252
1084
|
const inputFocus = fromEvent(this.inputElement, 'focus');
|
|
1253
1085
|
const inputBlur = fromEvent(this.inputElement, 'blur');
|
|
1254
1086
|
const focusObservables = [inputFocus, this.opened];
|
|
@@ -1256,8 +1088,8 @@ class WlcmDatepickerInputContainerComponent extends WlcmDatepickerTrigger {
|
|
|
1256
1088
|
this._focusStream$.next(merge(...focusObservables).pipe(map(voidFn)));
|
|
1257
1089
|
this._blurStream$.next(merge(...blurObservables).pipe(map(voidFn)));
|
|
1258
1090
|
}
|
|
1259
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1260
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
1091
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerInputContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1092
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: WlcmDatepickerInputContainerComponent, isStandalone: true, selector: "wlcm-datepicker-input-container", host: { classAttribute: "wlcm-datepicker-input-container" }, providers: [
|
|
1261
1093
|
{
|
|
1262
1094
|
provide: WLCM_INPUT_BINDER,
|
|
1263
1095
|
useFactory: () => {
|
|
@@ -1269,11 +1101,11 @@ class WlcmDatepickerInputContainerComponent extends WlcmDatepickerTrigger {
|
|
|
1269
1101
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => WlcmDatepickerInputContainerComponent), multi: true },
|
|
1270
1102
|
{ provide: WlcmDatepickerTrigger, useExisting: forwardRef(() => WlcmDatepickerInputContainerComponent) },
|
|
1271
1103
|
{ provide: MatDateSelectionModel, useClass: MatSingleDateSelectionModel },
|
|
1272
|
-
], queries: [{ propertyName: "inputRef", first: true, predicate: WlcmDatepickerInputDirective, descendants: true, read: ElementRef, isSignal: true }], exportAs: ["wlcmDatepicker"], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"[wlcmDatepickerInput]\"></ng-content>\n", styles: [""],
|
|
1104
|
+
], queries: [{ propertyName: "inputRef", first: true, predicate: WlcmDatepickerInputDirective, descendants: true, read: ElementRef, isSignal: true }], exportAs: ["wlcmDatepicker"], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"[wlcmDatepickerInput]\"></ng-content>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1273
1105
|
}
|
|
1274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerInputContainerComponent, decorators: [{
|
|
1275
1107
|
type: Component,
|
|
1276
|
-
args: [{ selector: 'wlcm-datepicker-input-container', host: { class: 'wlcm-datepicker-input-container' }, exportAs: 'wlcmDatepicker',
|
|
1108
|
+
args: [{ selector: 'wlcm-datepicker-input-container', host: { class: 'wlcm-datepicker-input-container' }, exportAs: 'wlcmDatepicker', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1277
1109
|
{
|
|
1278
1110
|
provide: WLCM_INPUT_BINDER,
|
|
1279
1111
|
useFactory: () => {
|
|
@@ -1286,12 +1118,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImpor
|
|
|
1286
1118
|
{ provide: WlcmDatepickerTrigger, useExisting: forwardRef(() => WlcmDatepickerInputContainerComponent) },
|
|
1287
1119
|
{ provide: MatDateSelectionModel, useClass: MatSingleDateSelectionModel },
|
|
1288
1120
|
], template: "<ng-content select=\"[wlcmDatepickerInput]\"></ng-content>\n" }]
|
|
1289
|
-
}], ctorParameters: () => [
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
type: Inject,
|
|
1293
|
-
args: [WLCM_FORM_FIELD]
|
|
1294
|
-
}] }] });
|
|
1121
|
+
}], ctorParameters: () => [], propDecorators: { inputRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WlcmDatepickerInputDirective), { ...{
|
|
1122
|
+
read: ElementRef,
|
|
1123
|
+
}, isSignal: true }] }] } });
|
|
1295
1124
|
|
|
1296
1125
|
function WlcmDateRangeInputValidator() {
|
|
1297
1126
|
return (control) => {
|
|
@@ -1315,15 +1144,15 @@ const publicDirectives = [
|
|
|
1315
1144
|
DateRangePickerInputEndDirective,
|
|
1316
1145
|
];
|
|
1317
1146
|
class WlcmDatepickerModule {
|
|
1318
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1319
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1148
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerModule, imports: [CommonModule, WlcmDatepickerInputContainerComponent, WlcmDateRangePickerInputComponent, WlcmDatepickerInputDirective,
|
|
1320
1149
|
DateRangePickerInputStartDirective,
|
|
1321
1150
|
DateRangePickerInputEndDirective], exports: [WlcmDatepickerInputContainerComponent, WlcmDateRangePickerInputComponent, WlcmDatepickerInputDirective,
|
|
1322
1151
|
DateRangePickerInputStartDirective,
|
|
1323
1152
|
DateRangePickerInputEndDirective] }); }
|
|
1324
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1153
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerModule, providers: [...WLCM_DEFAULT_DATEPICKER_PROVIDERS], imports: [CommonModule, WlcmDateRangePickerInputComponent] }); }
|
|
1325
1154
|
}
|
|
1326
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerModule, decorators: [{
|
|
1327
1156
|
type: NgModule,
|
|
1328
1157
|
args: [{
|
|
1329
1158
|
imports: [CommonModule, ...publicComponents, ...publicDirectives],
|