@wlcm/angular 19.2.5 → 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 +341 -497
- 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 +378 -405
- 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 +66 -84
- 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 +10 -5
- 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 -17
- 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 -35
- 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 -4
- 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 -18
- 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 {
|
|
4
|
-
import * as i2 from '@angular/material/datepicker';
|
|
5
|
-
import { MatRangeDateSelectionModel, MatDateSelectionModel, DateRange, yearsPerPage, MatCalendar, MAT_DATE_RANGE_SELECTION_STRATEGY, DefaultMatCalendarRangeStrategy, MatDatepickerModule, MatMonthView, MatSingleDateSelectionModel } from '@angular/material/datepicker';
|
|
6
|
-
import { WLCM_FORM_FIELD, WLCM_FORM_CONTROL_PROVIDER, WLCM_INPUT_BINDER, WlcmFormsModule } from '@wlcm/angular/forms';
|
|
2
|
+
import { InjectionToken, Injectable, inject, ViewContainerRef, DestroyRef, input, Injector, Directive, ElementRef, forwardRef, signal, computed, ChangeDetectionStrategy, Component, viewChild, contentChild, output, effect, NgModule } from '@angular/core';
|
|
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.1.4", 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,13 +358,22 @@ 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
|
}
|
|
371
|
+
setSelection(selection) {
|
|
372
|
+
this.localSelectionModel.updateSelection(selection, this);
|
|
373
|
+
}
|
|
374
|
+
get selected() {
|
|
375
|
+
return this.localSelectionModel.selection;
|
|
376
|
+
}
|
|
398
377
|
calendarSelection(event) {
|
|
399
378
|
const newSelection = this.rangeSelectionStrategy.selectionFinished(event.value, this.localSelectionModel.selection, event.event);
|
|
400
379
|
this.localSelectionModel.updateSelection(newSelection, this);
|
|
@@ -402,43 +381,47 @@ class WlcmDateRangePicker {
|
|
|
402
381
|
calendarDragDrop(event) {
|
|
403
382
|
this.localSelectionModel.updateSelection(event.value, this);
|
|
404
383
|
}
|
|
405
|
-
get selected() {
|
|
406
|
-
return this.localSelectionModel.selection;
|
|
407
|
-
}
|
|
408
384
|
handleSelectionChanged() {
|
|
409
385
|
this.localSelectionModel.selectionChanged
|
|
410
|
-
.pipe(
|
|
386
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
411
387
|
.subscribe(() => this._isComplete.set(this.localSelectionModel.isComplete()));
|
|
412
388
|
}
|
|
413
389
|
}
|
|
414
390
|
|
|
415
391
|
class WlcmDateRangePickerBottomPanelComponent {
|
|
416
|
-
constructor(
|
|
417
|
-
this.picker =
|
|
392
|
+
constructor() {
|
|
393
|
+
this.picker = inject(WlcmDateRangePicker);
|
|
418
394
|
}
|
|
419
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
420
|
-
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 }); }
|
|
421
397
|
}
|
|
422
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateRangePickerBottomPanelComponent, decorators: [{
|
|
423
399
|
type: Component,
|
|
424
|
-
args: [{ selector: 'wlcm-date-range-picker-bottom-panel',
|
|
425
|
-
}]
|
|
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
|
+
}] });
|
|
426
402
|
|
|
427
403
|
const WLCM_DATE_RANGE_PICKER_CONFIG = new InjectionToken('WLCM_DATE_RANGE_PICKER_CONFIG', { providedIn: 'root', factory: () => ({}) });
|
|
428
404
|
const WLCM_DATE_RANGE_PICKER_BP = new InjectionToken('WLCM_DATE_RANGE_PICKER_BP', { providedIn: 'root', factory: () => WlcmDateRangePickerBottomPanelComponent });
|
|
405
|
+
const WLCM_DATE_RANGE_PICKER_LEFT_PANEL = new InjectionToken('WLCM_DATE_RANGE_PICKER_LEFT_PANEL');
|
|
429
406
|
|
|
430
407
|
class WlcmCalendarHeaderComponent {
|
|
431
|
-
constructor(
|
|
432
|
-
this.dateAdapter = dateAdapter;
|
|
433
|
-
this.dateFormats = dateFormats;
|
|
434
|
-
this.calendar = calendar;
|
|
408
|
+
constructor() {
|
|
435
409
|
this.WlcmIconName = WlcmIconName;
|
|
436
|
-
this.next = input(
|
|
437
|
-
|
|
438
|
-
this.
|
|
439
|
-
|
|
440
|
-
this.
|
|
441
|
-
|
|
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));
|
|
442
425
|
}
|
|
443
426
|
previousClicked() {
|
|
444
427
|
if (this.previous())
|
|
@@ -466,50 +449,40 @@ class WlcmCalendarHeaderComponent {
|
|
|
466
449
|
get periodLabel() {
|
|
467
450
|
return this.dateAdapter.format(this.calendar.activeDate, this.dateFormats.display.monthYearLabel);
|
|
468
451
|
}
|
|
469
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
470
|
-
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 }); }
|
|
471
454
|
}
|
|
472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmCalendarHeaderComponent, decorators: [{
|
|
473
456
|
type: Component,
|
|
474
|
-
args: [{ selector: 'wlcm-calendar-header', host: { class: 'wlcm-calendar-header' },
|
|
475
|
-
}],
|
|
476
|
-
type: Optional
|
|
477
|
-
}, {
|
|
478
|
-
type: Inject,
|
|
479
|
-
args: [MAT_DATE_FORMATS]
|
|
480
|
-
}] }, { type: i2.MatCalendar, decorators: [{
|
|
481
|
-
type: Inject,
|
|
482
|
-
args: [forwardRef(() => MatCalendar)]
|
|
483
|
-
}] }] });
|
|
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 }] }] } });
|
|
484
459
|
|
|
485
460
|
class WlcmCalendarDirective {
|
|
486
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
487
|
-
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 }); }
|
|
488
463
|
}
|
|
489
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmCalendarDirective, decorators: [{
|
|
490
465
|
type: Directive,
|
|
491
466
|
args: [{
|
|
492
467
|
selector: '[wlcmCalendar]',
|
|
493
468
|
host: { class: 'wlcm-calendar' },
|
|
494
|
-
standalone: true,
|
|
495
469
|
}]
|
|
496
470
|
}] });
|
|
497
471
|
|
|
498
|
-
|
|
499
|
-
constructor(
|
|
500
|
-
super(
|
|
501
|
-
this.rangeSelectionStrategy = rangeSelectionStrategy;
|
|
502
|
-
this.localSelectionModel = localSelectionModel;
|
|
503
|
-
this.triggerSelectionModel = triggerSelectionModel;
|
|
504
|
-
this.trigger = trigger;
|
|
505
|
-
this.datepickerConfig = datepickerConfig;
|
|
506
|
-
this.pickerBottomPanel = pickerBottomPanel;
|
|
507
|
-
this.dateAdapter = dateAdapter;
|
|
472
|
+
class SingleCalendarRangePickerComponent extends WlcmDateRangePicker {
|
|
473
|
+
constructor() {
|
|
474
|
+
super();
|
|
508
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);
|
|
509
482
|
this.localSelectionModel.updateSelection(this.triggerSelectionModel.selection, this);
|
|
510
483
|
}
|
|
511
484
|
ngAfterViewInit() {
|
|
512
|
-
this.bottomPanelContainer.createComponent(this.pickerBottomPanel);
|
|
485
|
+
this.bottomPanelContainer().createComponent(this.pickerBottomPanel);
|
|
513
486
|
}
|
|
514
487
|
get minDate() {
|
|
515
488
|
return this.datepickerConfig.minDate?.();
|
|
@@ -524,26 +497,19 @@ let SingleCalendarRangePickerComponent = class SingleCalendarRangePickerComponen
|
|
|
524
497
|
reset() {
|
|
525
498
|
this.trigger.close();
|
|
526
499
|
}
|
|
527
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
528
|
-
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: [
|
|
529
502
|
{
|
|
530
503
|
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
531
504
|
useClass: DefaultMatCalendarRangeStrategy,
|
|
532
505
|
},
|
|
533
506
|
{ provide: WlcmDateRangePicker, useExisting: forwardRef(() => SingleCalendarRangePickerComponent) },
|
|
534
507
|
WLCM_DATE_RANGE_SELECTION_MODEL_PROVIDER,
|
|
535
|
-
], 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:
|
|
536
|
-
}
|
|
537
|
-
SingleCalendarRangePickerComponent
|
|
538
|
-
UntilDestroy(),
|
|
539
|
-
__metadata("design:paramtypes", [Object, MatDateSelectionModel,
|
|
540
|
-
MatDateSelectionModel,
|
|
541
|
-
WlcmDatepickerTrigger, Object, Type,
|
|
542
|
-
DateAdapter])
|
|
543
|
-
], SingleCalendarRangePickerComponent);
|
|
544
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", 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: [{
|
|
545
511
|
type: Component,
|
|
546
|
-
args: [{ selector: 'wlcm-single-calendar-range-picker', imports: [
|
|
512
|
+
args: [{ selector: 'wlcm-single-calendar-range-picker', imports: [MatDatepickerModule, WlcmCalendarDirective], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
547
513
|
{
|
|
548
514
|
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
549
515
|
useClass: DefaultMatCalendarRangeStrategy,
|
|
@@ -551,36 +517,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
551
517
|
{ provide: WlcmDateRangePicker, useExisting: forwardRef(() => SingleCalendarRangePickerComponent) },
|
|
552
518
|
WLCM_DATE_RANGE_SELECTION_MODEL_PROVIDER,
|
|
553
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" }]
|
|
554
|
-
}], ctorParameters: () => [{ type:
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
}] }, { type: i2.MatDateSelectionModel, decorators: [{
|
|
558
|
-
type: Inject,
|
|
559
|
-
args: [WLCM_DATE_RANGE_SELECTION_MODEL]
|
|
560
|
-
}] }, { type: i2.MatDateSelectionModel, decorators: [{
|
|
561
|
-
type: Inject,
|
|
562
|
-
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
|
563
|
-
}] }, { type: WlcmDatepickerTrigger }, { type: undefined, decorators: [{
|
|
564
|
-
type: Inject,
|
|
565
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
566
|
-
}] }, { type: i0.Type, decorators: [{
|
|
567
|
-
type: Inject,
|
|
568
|
-
args: [WLCM_DATE_RANGE_PICKER_BP]
|
|
569
|
-
}] }, { type: i1$1.DateAdapter }], propDecorators: { bottomPanelContainer: [{
|
|
570
|
-
type: ViewChild,
|
|
571
|
-
args: ['bottomPanelContainer', { read: ViewContainerRef }]
|
|
572
|
-
}] } });
|
|
520
|
+
}], ctorParameters: () => [], propDecorators: { bottomPanelContainer: [{ type: i0.ViewChild, args: ['bottomPanelContainer', { ...{
|
|
521
|
+
read: ViewContainerRef,
|
|
522
|
+
}, isSignal: true }] }] } });
|
|
573
523
|
|
|
574
|
-
|
|
575
|
-
constructor(
|
|
576
|
-
super(
|
|
577
|
-
this.
|
|
578
|
-
this.
|
|
579
|
-
this.dateFormats = dateFormats;
|
|
580
|
-
this.selectionModel = selectionModel;
|
|
581
|
-
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);
|
|
582
529
|
this.updateSelection = () => {
|
|
583
|
-
|
|
530
|
+
const end = this.parseCurrentValue();
|
|
584
531
|
this.selectionModel.updateSelection(new DateRange(this.selectionModel.selection.start, end), this);
|
|
585
532
|
};
|
|
586
533
|
this.handleSelectionChange();
|
|
@@ -596,45 +543,30 @@ let DateRangePickerInputEndDirective = class DateRangePickerInputEndDirective ex
|
|
|
596
543
|
return defaultErrors;
|
|
597
544
|
}
|
|
598
545
|
handleSelectionChange() {
|
|
599
|
-
this.selectionModel.selectionChanged.pipe(
|
|
546
|
+
this.selectionModel.selectionChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ selection }) => {
|
|
600
547
|
const validDate = this.dateAdapter.getValidDateOrNull(selection.end);
|
|
601
548
|
this._changed?.(validDate);
|
|
602
549
|
this.updateInputValue(validDate);
|
|
603
550
|
this._validatorChanged?.();
|
|
604
551
|
});
|
|
605
552
|
}
|
|
606
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
607
|
-
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: [
|
|
608
555
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateRangePickerInputEndDirective), multi: true },
|
|
609
556
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateRangePickerInputEndDirective), multi: true },
|
|
610
557
|
], usesInheritance: true, ngImport: i0 }); }
|
|
611
|
-
}
|
|
612
|
-
DateRangePickerInputEndDirective
|
|
613
|
-
UntilDestroy(),
|
|
614
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
615
|
-
DateAdapter, Object, MatDateSelectionModel,
|
|
616
|
-
WlcmDatepickerTrigger])
|
|
617
|
-
], DateRangePickerInputEndDirective);
|
|
618
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DateRangePickerInputEndDirective, decorators: [{
|
|
558
|
+
}
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DateRangePickerInputEndDirective, decorators: [{
|
|
619
560
|
type: Directive,
|
|
620
561
|
args: [{
|
|
621
562
|
selector: '[wlcmDateRangePickerInputEnd]',
|
|
622
563
|
host: { class: 'wlcm-date-range-picker-input-field' },
|
|
623
|
-
standalone: true,
|
|
624
564
|
providers: [
|
|
625
565
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateRangePickerInputEndDirective), multi: true },
|
|
626
566
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateRangePickerInputEndDirective), multi: true },
|
|
627
567
|
],
|
|
628
568
|
}]
|
|
629
|
-
}], ctorParameters: () => [
|
|
630
|
-
type: Optional
|
|
631
|
-
}, {
|
|
632
|
-
type: Inject,
|
|
633
|
-
args: [MAT_DATE_FORMATS]
|
|
634
|
-
}] }, { type: i2.MatDateSelectionModel, decorators: [{
|
|
635
|
-
type: Inject,
|
|
636
|
-
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
|
637
|
-
}] }, { type: WlcmDatepickerTrigger }] });
|
|
569
|
+
}], ctorParameters: () => [] });
|
|
638
570
|
|
|
639
571
|
class DateRangePickerErrors {
|
|
640
572
|
static throwNoStartInputError() {
|
|
@@ -646,18 +578,19 @@ class DateRangePickerErrors {
|
|
|
646
578
|
}
|
|
647
579
|
|
|
648
580
|
class WlcmDateRangePickerInputComponent extends WlcmDatepickerTrigger {
|
|
649
|
-
constructor(
|
|
650
|
-
super(
|
|
651
|
-
this.overlay = overlay;
|
|
652
|
-
this.viewContainerRef = viewContainerRef;
|
|
653
|
-
this.selectionModel = selectionModel;
|
|
654
|
-
this.formField = formField;
|
|
655
|
-
this.controlContainer = controlContainer;
|
|
581
|
+
constructor() {
|
|
582
|
+
super();
|
|
656
583
|
this._focusStream$ = new BehaviorSubject(EMPTY);
|
|
657
584
|
this._blurStream$ = new BehaviorSubject(EMPTY);
|
|
658
585
|
this.focus$ = this._focusStream$.pipe(switchMap((stream) => stream));
|
|
659
586
|
this.blur$ = this._blurStream$.pipe(switchMap((stream) => stream));
|
|
660
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 });
|
|
661
594
|
}
|
|
662
595
|
ngAfterContentInit() {
|
|
663
596
|
this.checkInputs();
|
|
@@ -681,19 +614,21 @@ class WlcmDateRangePickerInputComponent extends WlcmDatepickerTrigger {
|
|
|
681
614
|
return this.controlContainer?.control;
|
|
682
615
|
}
|
|
683
616
|
get startInputElement() {
|
|
684
|
-
return this.startInput.element.nativeElement;
|
|
617
|
+
return this.startInput().element.nativeElement;
|
|
685
618
|
}
|
|
686
619
|
get endInputElement() {
|
|
687
|
-
return this.endInput.element.nativeElement;
|
|
620
|
+
return this.endInput().element.nativeElement;
|
|
688
621
|
}
|
|
689
622
|
checkInputs() {
|
|
690
|
-
if (!this.startInput)
|
|
623
|
+
if (!this.startInput())
|
|
691
624
|
DateRangePickerErrors.throwNoStartInputError();
|
|
692
|
-
if (!this.endInput)
|
|
625
|
+
if (!this.endInput())
|
|
693
626
|
DateRangePickerErrors.throwNoEndInputError();
|
|
694
627
|
}
|
|
695
628
|
attachFocusBlurListeners() {
|
|
696
|
-
const voidFn = () => {
|
|
629
|
+
const voidFn = () => {
|
|
630
|
+
// noop
|
|
631
|
+
};
|
|
697
632
|
const startInputFocus = fromEvent(this.startInputElement, 'focus');
|
|
698
633
|
const endInputFocus = fromEvent(this.endInputElement, 'focus');
|
|
699
634
|
const startInputBlur = fromEvent(this.startInputElement, 'blur');
|
|
@@ -703,8 +638,8 @@ class WlcmDateRangePickerInputComponent extends WlcmDatepickerTrigger {
|
|
|
703
638
|
this._focusStream$.next(merge(...focusObservables).pipe(map(voidFn)));
|
|
704
639
|
this._blurStream$.next(merge(...blurObservables).pipe(map(() => this.control?.markAsTouched())));
|
|
705
640
|
}
|
|
706
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
707
|
-
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: [
|
|
708
643
|
WLCM_FORM_CONTROL_PROVIDER,
|
|
709
644
|
WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL_PROVIDER,
|
|
710
645
|
{
|
|
@@ -715,11 +650,11 @@ class WlcmDateRangePickerInputComponent extends WlcmDatepickerTrigger {
|
|
|
715
650
|
},
|
|
716
651
|
},
|
|
717
652
|
{ provide: WlcmDatepickerTrigger, useExisting: forwardRef(() => WlcmDateRangePickerInputComponent) },
|
|
718
|
-
], 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 }); }
|
|
719
654
|
}
|
|
720
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateRangePickerInputComponent, decorators: [{
|
|
721
656
|
type: Component,
|
|
722
|
-
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: [
|
|
723
658
|
WLCM_FORM_CONTROL_PROVIDER,
|
|
724
659
|
WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL_PROVIDER,
|
|
725
660
|
{
|
|
@@ -731,39 +666,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
731
666
|
},
|
|
732
667
|
{ provide: WlcmDatepickerTrigger, useExisting: forwardRef(() => WlcmDateRangePickerInputComponent) },
|
|
733
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"] }]
|
|
734
|
-
}], ctorParameters: () => [{ type:
|
|
735
|
-
type: Inject,
|
|
736
|
-
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
|
737
|
-
}] }, { type: undefined, decorators: [{
|
|
738
|
-
type: Host
|
|
739
|
-
}, {
|
|
740
|
-
type: Inject,
|
|
741
|
-
args: [WLCM_FORM_FIELD]
|
|
742
|
-
}] }, { type: i3.ControlContainer, decorators: [{
|
|
743
|
-
type: Host
|
|
744
|
-
}, {
|
|
745
|
-
type: Inject,
|
|
746
|
-
args: [ControlContainer]
|
|
747
|
-
}] }], propDecorators: { componentType: [{
|
|
748
|
-
type: Input
|
|
749
|
-
}], startInput: [{
|
|
750
|
-
type: ContentChild,
|
|
751
|
-
args: [DateRangePickerInputStartDirective]
|
|
752
|
-
}], endInput: [{
|
|
753
|
-
type: ContentChild,
|
|
754
|
-
args: [DateRangePickerInputEndDirective]
|
|
755
|
-
}] } });
|
|
669
|
+
}], ctorParameters: () => [], propDecorators: { startInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DateRangePickerInputStartDirective), { isSignal: true }] }], endInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DateRangePickerInputEndDirective), { isSignal: true }] }] } });
|
|
756
670
|
|
|
757
671
|
class WlcmDataRangeCalendar {
|
|
758
|
-
constructor(
|
|
759
|
-
this.element = element;
|
|
760
|
-
this.calendar = calendar;
|
|
761
|
-
this.dateAdapter = dateAdapter;
|
|
762
|
-
this.datepickerConfig = datepickerConfig;
|
|
672
|
+
constructor() {
|
|
763
673
|
this.dateChange = output();
|
|
764
674
|
this.viewChange = output();
|
|
765
|
-
this.disabled = input(false
|
|
766
|
-
|
|
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);
|
|
767
681
|
effect(() => {
|
|
768
682
|
if (this.disabled()) {
|
|
769
683
|
this.element.nativeElement.classList.add('wlcm-calendar-disabled');
|
|
@@ -801,71 +715,58 @@ class WlcmDataRangeCalendar {
|
|
|
801
715
|
return true;
|
|
802
716
|
};
|
|
803
717
|
}
|
|
804
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
805
|
-
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 }); }
|
|
806
720
|
}
|
|
807
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
721
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDataRangeCalendar, decorators: [{
|
|
808
722
|
type: Directive
|
|
809
|
-
}], 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 }] }] } });
|
|
810
724
|
|
|
811
|
-
|
|
812
|
-
constructor(
|
|
813
|
-
super(
|
|
814
|
-
this.
|
|
815
|
-
this.
|
|
816
|
-
this.calendar = calendar;
|
|
817
|
-
this.datepickerConfig = datepickerConfig;
|
|
725
|
+
class WlcmLeftCalendarDirective extends WlcmDataRangeCalendar {
|
|
726
|
+
constructor() {
|
|
727
|
+
super();
|
|
728
|
+
this.location = 'left';
|
|
729
|
+
this.destroyRef = inject(DestroyRef);
|
|
818
730
|
this.handleYearChange();
|
|
819
731
|
this.handleMonthChange();
|
|
820
732
|
}
|
|
821
733
|
handleYearChange() {
|
|
822
|
-
this.calendar.yearSelected
|
|
734
|
+
this.calendar.yearSelected
|
|
735
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
736
|
+
.subscribe((date) => this.dateChange.emit(date));
|
|
823
737
|
}
|
|
824
738
|
handleMonthChange() {
|
|
825
|
-
this.calendar.monthSelected
|
|
739
|
+
this.calendar.monthSelected
|
|
740
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
741
|
+
.subscribe((date) => this.dateChange.emit(date));
|
|
826
742
|
}
|
|
827
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
828
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
829
|
-
}
|
|
830
|
-
WlcmLeftCalendarDirective
|
|
831
|
-
UntilDestroy(),
|
|
832
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
833
|
-
DateAdapter,
|
|
834
|
-
MatCalendar, Object])
|
|
835
|
-
], WlcmLeftCalendarDirective);
|
|
836
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", 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: [{
|
|
837
747
|
type: Directive,
|
|
838
748
|
args: [{
|
|
839
749
|
selector: '[wlcmLeftCalendar]',
|
|
840
|
-
standalone: true,
|
|
841
750
|
providers: [{ provide: WlcmDataRangeCalendar, useExisting: forwardRef(() => WlcmLeftCalendarDirective) }],
|
|
842
751
|
}]
|
|
843
|
-
}], ctorParameters: () => [
|
|
844
|
-
type: Inject,
|
|
845
|
-
args: [forwardRef(() => MatCalendar)]
|
|
846
|
-
}] }, { type: undefined, decorators: [{
|
|
847
|
-
type: Inject,
|
|
848
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
849
|
-
}] }] });
|
|
752
|
+
}], ctorParameters: () => [] });
|
|
850
753
|
|
|
851
|
-
|
|
852
|
-
constructor(
|
|
853
|
-
super(
|
|
854
|
-
this.
|
|
855
|
-
this.
|
|
856
|
-
this.calendar = calendar;
|
|
857
|
-
this.datepickerConfig = datepickerConfig;
|
|
754
|
+
class WlcmRightCalendarDirective extends WlcmDataRangeCalendar {
|
|
755
|
+
constructor() {
|
|
756
|
+
super();
|
|
757
|
+
this.location = 'right';
|
|
758
|
+
this.destroyRef = inject(DestroyRef);
|
|
858
759
|
this.handleYearChange();
|
|
859
760
|
this.handleMonthChange();
|
|
860
761
|
}
|
|
861
762
|
handleYearChange() {
|
|
862
763
|
this.calendar.yearSelected
|
|
863
|
-
.pipe(
|
|
764
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
864
765
|
.subscribe((date) => this.dateChange.emit(this.dateAdapter.addCalendarMonths(date, -1)));
|
|
865
766
|
}
|
|
866
767
|
handleMonthChange() {
|
|
867
768
|
this.calendar.monthSelected
|
|
868
|
-
.pipe(
|
|
769
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
869
770
|
.subscribe((date) => this.dateChange.emit(this.dateAdapter.addCalendarMonths(date, -1)));
|
|
870
771
|
}
|
|
871
772
|
nextMonth() {
|
|
@@ -877,37 +778,24 @@ let WlcmRightCalendarDirective = class WlcmRightCalendarDirective extends WlcmDa
|
|
|
877
778
|
nextYear() {
|
|
878
779
|
this.dateChange.emit(this.dateAdapter.addCalendarMonths(this.dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? 1 : yearsPerPage), -1));
|
|
879
780
|
}
|
|
880
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
881
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
882
|
-
}
|
|
883
|
-
WlcmRightCalendarDirective
|
|
884
|
-
UntilDestroy(),
|
|
885
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
886
|
-
DateAdapter,
|
|
887
|
-
MatCalendar, Object])
|
|
888
|
-
], WlcmRightCalendarDirective);
|
|
889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", 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: [{
|
|
890
785
|
type: Directive,
|
|
891
786
|
args: [{
|
|
892
787
|
selector: '[wlcmRightCalendar]',
|
|
893
|
-
standalone: true,
|
|
894
788
|
providers: [{ provide: WlcmDataRangeCalendar, useExisting: forwardRef(() => WlcmRightCalendarDirective) }],
|
|
895
789
|
}]
|
|
896
|
-
}], ctorParameters: () => [
|
|
897
|
-
type: Inject,
|
|
898
|
-
args: [forwardRef(() => MatCalendar)]
|
|
899
|
-
}] }, { type: undefined, decorators: [{
|
|
900
|
-
type: Inject,
|
|
901
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
902
|
-
}] }] });
|
|
790
|
+
}], ctorParameters: () => [] });
|
|
903
791
|
|
|
904
792
|
class WlcmDateRangeCalendarHeaderComponent {
|
|
905
|
-
constructor(
|
|
906
|
-
this.rangeCalendar = rangeCalendar;
|
|
907
|
-
this.dateFormats = dateFormats;
|
|
908
|
-
this.calendar = calendar;
|
|
909
|
-
this.datepickerConfig = datepickerConfig;
|
|
793
|
+
constructor() {
|
|
910
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);
|
|
911
799
|
this.previous = () => {
|
|
912
800
|
if (this.isPreviousDisabled)
|
|
913
801
|
return;
|
|
@@ -955,68 +843,73 @@ class WlcmDateRangeCalendarHeaderComponent {
|
|
|
955
843
|
get canDisplayRightArrow() {
|
|
956
844
|
return !this.rangeCalendar || this.rangeCalendar.location === 'right' || this.calendar.currentView !== 'month';
|
|
957
845
|
}
|
|
958
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
959
|
-
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 }); }
|
|
960
848
|
}
|
|
961
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDateRangeCalendarHeaderComponent, decorators: [{
|
|
962
850
|
type: Component,
|
|
963
|
-
args: [{ selector: 'wlcm-date-range-calendar-header',
|
|
964
|
-
}]
|
|
965
|
-
type: Optional
|
|
966
|
-
}] }, { type: undefined, decorators: [{
|
|
967
|
-
type: Optional
|
|
968
|
-
}, {
|
|
969
|
-
type: Inject,
|
|
970
|
-
args: [MAT_DATE_FORMATS]
|
|
971
|
-
}] }, { type: i2.MatCalendar, decorators: [{
|
|
972
|
-
type: Inject,
|
|
973
|
-
args: [forwardRef(() => MatCalendar)]
|
|
974
|
-
}] }, { type: undefined, decorators: [{
|
|
975
|
-
type: Inject,
|
|
976
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
977
|
-
}] }] });
|
|
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
|
+
}] });
|
|
978
853
|
|
|
979
|
-
|
|
980
|
-
constructor(
|
|
981
|
-
super(
|
|
982
|
-
this.rangeConfig = rangeConfig;
|
|
983
|
-
this.rangeSelectionStrategy = rangeSelectionStrategy;
|
|
984
|
-
this.localSelectionModel = localSelectionModel;
|
|
985
|
-
this.triggerSelectionModel = triggerSelectionModel;
|
|
986
|
-
this.trigger = trigger;
|
|
987
|
-
this.datepickerConfig = datepickerConfig;
|
|
988
|
-
this.pickerBottomPanel = pickerBottomPanel;
|
|
989
|
-
this.dateAdapter = dateAdapter;
|
|
854
|
+
class DoubleCalendarRangePickerComponent extends WlcmDateRangePicker {
|
|
855
|
+
constructor() {
|
|
856
|
+
super();
|
|
990
857
|
this.headerComponent = WlcmDateRangeCalendarHeaderComponent;
|
|
991
|
-
this._isViewInitialized = signal(false
|
|
992
|
-
|
|
993
|
-
this.
|
|
994
|
-
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 */ []));
|
|
995
881
|
this.localSelectionModel.updateSelection(this.triggerSelectionModel.selection, this);
|
|
996
882
|
if (this.triggerSelectionModel.selection.start) {
|
|
997
883
|
this.startDate.set(this.triggerSelectionModel.selection.start);
|
|
998
884
|
}
|
|
999
|
-
if (this.rangeConfig
|
|
885
|
+
if (this.rangeConfig?.headerComponent) {
|
|
1000
886
|
this.headerComponent = this.rangeConfig.headerComponent;
|
|
1001
887
|
}
|
|
1002
888
|
effect(() => {
|
|
1003
889
|
if (!this._isViewInitialized())
|
|
1004
890
|
return;
|
|
1005
891
|
const startDate = this.startDate();
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
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;
|
|
1009
899
|
});
|
|
1010
900
|
}
|
|
1011
901
|
ngAfterViewInit() {
|
|
1012
902
|
this._isViewInitialized.set(true);
|
|
1013
|
-
this.leftCalendar.viewChanged.pipe(
|
|
903
|
+
this.leftCalendar().viewChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((view) => {
|
|
1014
904
|
this.leftCalendarYearViewActivated.set(view !== 'month');
|
|
1015
905
|
});
|
|
1016
|
-
this.rightCalendar.viewChanged.pipe(
|
|
906
|
+
this.rightCalendar().viewChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((view) => {
|
|
1017
907
|
this.rightCalendarYearViewActivated.set(view !== 'month');
|
|
1018
908
|
});
|
|
1019
|
-
this.bottomPanelContainer.createComponent(this.pickerBottomPanel);
|
|
909
|
+
this.bottomPanelContainer().createComponent(this.pickerBottomPanel);
|
|
910
|
+
if (this.pickerLeftPanel) {
|
|
911
|
+
this.leftPanelContainer().createComponent(this.pickerLeftPanel).changeDetectorRef.detectChanges();
|
|
912
|
+
}
|
|
1020
913
|
this.handleRightCalendarPreviewChange();
|
|
1021
914
|
}
|
|
1022
915
|
apply() {
|
|
@@ -1027,193 +920,145 @@ let DoubleCalendarRangePickerComponent = class DoubleCalendarRangePickerComponen
|
|
|
1027
920
|
this.trigger.close();
|
|
1028
921
|
}
|
|
1029
922
|
get leftCalendarActiveCell() {
|
|
1030
|
-
return this.leftCalendarElement
|
|
923
|
+
return this.leftCalendarElement()?.nativeElement.querySelector('.mat-calendar-body-active') ?? null;
|
|
1031
924
|
}
|
|
1032
925
|
handleRightCalendarPreviewChange() {
|
|
926
|
+
const rightCalendar = this.rightCalendar();
|
|
927
|
+
if (!rightCalendar)
|
|
928
|
+
return;
|
|
1033
929
|
const viewChanged = new Subject();
|
|
1034
|
-
|
|
1035
|
-
.pipe(
|
|
930
|
+
rightCalendar.viewChanged
|
|
931
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1036
932
|
.pipe(tap(() => viewChanged.next()))
|
|
1037
|
-
.pipe(startWith(
|
|
933
|
+
.pipe(startWith(rightCalendar.currentView))
|
|
1038
934
|
.subscribe((view) => {
|
|
1039
935
|
if (view !== 'month')
|
|
1040
936
|
return;
|
|
1041
|
-
|
|
1042
|
-
.pipe(takeUntil(viewChanged),
|
|
937
|
+
rightCalendar.monthView._matCalendarBody.previewChange
|
|
938
|
+
.pipe(takeUntil(viewChanged), takeUntilDestroyed(this.destroyRef))
|
|
1043
939
|
.subscribe(() => {
|
|
1044
|
-
|
|
940
|
+
const leftCalendar = this.leftCalendar();
|
|
941
|
+
if (!leftCalendar || leftCalendar.currentView !== 'month' || !leftCalendar.monthView._rangeStart()) {
|
|
1045
942
|
return;
|
|
1046
|
-
|
|
1047
|
-
|
|
943
|
+
}
|
|
944
|
+
leftCalendar.monthView._previewStart.set(rightCalendar.monthView._previewStart());
|
|
945
|
+
leftCalendar.monthView._previewEnd.set(rightCalendar.monthView._previewEnd());
|
|
1048
946
|
const activeCell = this.leftCalendarActiveCell;
|
|
1049
947
|
if (activeCell && activeCell === document.activeElement)
|
|
1050
948
|
activeCell.blur();
|
|
1051
|
-
|
|
949
|
+
leftCalendar.monthView._changeDetectorRef.markForCheck();
|
|
1052
950
|
});
|
|
1053
951
|
});
|
|
1054
952
|
}
|
|
1055
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1056
|
-
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: [
|
|
1057
955
|
{
|
|
1058
956
|
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
1059
957
|
useClass: DefaultMatCalendarRangeStrategy,
|
|
1060
958
|
},
|
|
1061
959
|
{ provide: WlcmDateRangePicker, useExisting: forwardRef(() => DoubleCalendarRangePickerComponent) },
|
|
1062
960
|
WLCM_DATE_RANGE_SELECTION_MODEL_PROVIDER,
|
|
1063
|
-
], 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: "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 <mat-calendar\n
|
|
1064
|
-
}
|
|
1065
|
-
DoubleCalendarRangePickerComponent
|
|
1066
|
-
UntilDestroy(),
|
|
1067
|
-
__metadata("design:paramtypes", [Object, Object, MatDateSelectionModel,
|
|
1068
|
-
MatDateSelectionModel,
|
|
1069
|
-
WlcmDatepickerTrigger, Object, Type,
|
|
1070
|
-
DateAdapter])
|
|
1071
|
-
], DoubleCalendarRangePickerComponent);
|
|
1072
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", 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: [{
|
|
1073
964
|
type: Component,
|
|
1074
965
|
args: [{ selector: 'wlcm-double-calendar-range-picker', imports: [
|
|
1075
|
-
CommonModule,
|
|
1076
966
|
MatDatepickerModule,
|
|
1077
967
|
WlcmCalendarDirective,
|
|
1078
968
|
WlcmLeftCalendarDirective,
|
|
1079
|
-
WlcmRightCalendarDirective
|
|
1080
|
-
], providers: [
|
|
969
|
+
WlcmRightCalendarDirective
|
|
970
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1081
971
|
{
|
|
1082
972
|
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
1083
973
|
useClass: DefaultMatCalendarRangeStrategy,
|
|
1084
974
|
},
|
|
1085
975
|
{ provide: WlcmDateRangePicker, useExisting: forwardRef(() => DoubleCalendarRangePickerComponent) },
|
|
1086
976
|
WLCM_DATE_RANGE_SELECTION_MODEL_PROVIDER,
|
|
1087
|
-
], template: "<div class=\"wlcm-date-range-picker-panel\">\n <div class=\"double-calendar-range-picker-body\">\n <mat-calendar\n
|
|
1088
|
-
}], ctorParameters: () => [{ type:
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
}] }, { type: i2.MatDateSelectionModel, decorators: [{
|
|
1100
|
-
type: Inject,
|
|
1101
|
-
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
|
1102
|
-
}] }, { type: WlcmDatepickerTrigger }, { type: undefined, decorators: [{
|
|
1103
|
-
type: Inject,
|
|
1104
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
1105
|
-
}] }, { type: i0.Type, decorators: [{
|
|
1106
|
-
type: Inject,
|
|
1107
|
-
args: [WLCM_DATE_RANGE_PICKER_BP]
|
|
1108
|
-
}] }, { type: i1$1.DateAdapter }], propDecorators: { leftCalendar: [{
|
|
1109
|
-
type: ViewChild,
|
|
1110
|
-
args: [WlcmLeftCalendarDirective, { read: MatCalendar }]
|
|
1111
|
-
}], rightCalendar: [{
|
|
1112
|
-
type: ViewChild,
|
|
1113
|
-
args: [WlcmRightCalendarDirective, { read: MatCalendar }]
|
|
1114
|
-
}], leftCalendarElement: [{
|
|
1115
|
-
type: ViewChild,
|
|
1116
|
-
args: [WlcmLeftCalendarDirective, { read: ElementRef }]
|
|
1117
|
-
}], bottomPanelContainer: [{
|
|
1118
|
-
type: ViewChild,
|
|
1119
|
-
args: ['bottomPanelContainer', { read: ViewContainerRef }]
|
|
1120
|
-
}], monthView: [{
|
|
1121
|
-
type: ViewChild,
|
|
1122
|
-
args: [MatMonthView]
|
|
1123
|
-
}] } });
|
|
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" }]
|
|
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 }] }] } });
|
|
1124
989
|
|
|
1125
|
-
|
|
1126
|
-
constructor(
|
|
1127
|
-
super(
|
|
1128
|
-
this.
|
|
1129
|
-
this.
|
|
1130
|
-
this.dateFormats = dateFormats;
|
|
1131
|
-
this.selectionModel = selectionModel;
|
|
1132
|
-
this.trigger = trigger;
|
|
990
|
+
class WlcmDatepickerInputDirective extends WlcmDatepickerInputBase {
|
|
991
|
+
constructor() {
|
|
992
|
+
super();
|
|
993
|
+
this.selectionModel = inject(MatDateSelectionModel);
|
|
994
|
+
this.destroyRef = inject(DestroyRef);
|
|
1133
995
|
this.handleSelectionChange();
|
|
1134
996
|
this.handleClosePanel();
|
|
1135
997
|
}
|
|
1136
998
|
updateSelection() {
|
|
1137
|
-
|
|
999
|
+
const date = this.parseCurrentValue();
|
|
1138
1000
|
this.selectionModel.updateSelection(date, this);
|
|
1139
1001
|
}
|
|
1140
1002
|
handleClosePanel() {
|
|
1141
|
-
this.trigger.closed.pipe(
|
|
1003
|
+
this.trigger.closed.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this._touched?.());
|
|
1142
1004
|
}
|
|
1143
1005
|
handleSelectionChange() {
|
|
1144
|
-
this.selectionModel.selectionChanged.pipe(
|
|
1006
|
+
this.selectionModel.selectionChanged.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ selection }) => {
|
|
1145
1007
|
this.updateInputValue(selection);
|
|
1146
1008
|
this._changed?.(selection);
|
|
1147
1009
|
this._touched?.();
|
|
1148
1010
|
});
|
|
1149
1011
|
}
|
|
1150
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1151
|
-
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: [
|
|
1152
1014
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => WlcmDatepickerInputDirective), multi: true },
|
|
1153
1015
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => WlcmDatepickerInputDirective), multi: true },
|
|
1154
1016
|
], exportAs: ["wlcmDatepickerInput"], usesInheritance: true, ngImport: i0 }); }
|
|
1155
|
-
}
|
|
1156
|
-
WlcmDatepickerInputDirective
|
|
1157
|
-
UntilDestroy(),
|
|
1158
|
-
__metadata("design:paramtypes", [ElementRef,
|
|
1159
|
-
DateAdapter, Object, MatDateSelectionModel,
|
|
1160
|
-
WlcmDatepickerTrigger])
|
|
1161
|
-
], WlcmDatepickerInputDirective);
|
|
1162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WlcmDatepickerInputDirective, decorators: [{
|
|
1017
|
+
}
|
|
1018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerInputDirective, decorators: [{
|
|
1163
1019
|
type: Directive,
|
|
1164
1020
|
args: [{
|
|
1165
1021
|
selector: '[wlcmDatepickerInput]',
|
|
1166
1022
|
exportAs: 'wlcmDatepickerInput',
|
|
1167
1023
|
host: { class: 'wlcm-form-field-input' },
|
|
1168
|
-
standalone: true,
|
|
1169
1024
|
providers: [
|
|
1170
1025
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => WlcmDatepickerInputDirective), multi: true },
|
|
1171
1026
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => WlcmDatepickerInputDirective), multi: true },
|
|
1172
1027
|
],
|
|
1173
1028
|
}]
|
|
1174
|
-
}], ctorParameters: () => [
|
|
1175
|
-
type: Inject,
|
|
1176
|
-
args: [MAT_DATE_FORMATS]
|
|
1177
|
-
}] }, { type: i2.MatDateSelectionModel }, { type: WlcmDatepickerTrigger }] });
|
|
1029
|
+
}], ctorParameters: () => [] });
|
|
1178
1030
|
|
|
1179
1031
|
class WlcmDatepickerPanelComponent {
|
|
1180
|
-
constructor(
|
|
1181
|
-
this.selectionModel = selectionModel;
|
|
1182
|
-
this.trigger = trigger;
|
|
1183
|
-
this.config = config;
|
|
1032
|
+
constructor() {
|
|
1184
1033
|
this.headerComponent = WlcmCalendarHeaderComponent;
|
|
1185
|
-
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);
|
|
1186
1039
|
}
|
|
1187
1040
|
select(date) {
|
|
1188
1041
|
this.selectionModel.updateSelection(date, this);
|
|
1189
1042
|
this.trigger.close();
|
|
1190
1043
|
}
|
|
1191
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1192
|
-
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 }); }
|
|
1193
1046
|
}
|
|
1194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1047
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerPanelComponent, decorators: [{
|
|
1195
1048
|
type: Component,
|
|
1196
|
-
args: [{ selector: 'wlcm-datepicker-panel', host: { class: 'wlcm-datepicker-panel' },
|
|
1197
|
-
}],
|
|
1198
|
-
type: Inject,
|
|
1199
|
-
args: [WLCM_DATEPICKER_CONFIG]
|
|
1200
|
-
}] }] });
|
|
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 }] }] } });
|
|
1201
1051
|
|
|
1202
1052
|
class WlcmDatepickerInputContainerComponent extends WlcmDatepickerTrigger {
|
|
1203
|
-
constructor(
|
|
1204
|
-
super(
|
|
1205
|
-
this.overlay = overlay;
|
|
1206
|
-
this.viewContainerRef = viewContainerRef;
|
|
1207
|
-
this.selectionModel = selectionModel;
|
|
1208
|
-
this.formField = formField;
|
|
1053
|
+
constructor() {
|
|
1054
|
+
super();
|
|
1209
1055
|
this._focusStream$ = new BehaviorSubject(EMPTY);
|
|
1210
1056
|
this._blurStream$ = new BehaviorSubject(EMPTY);
|
|
1211
1057
|
this.focus$ = this._focusStream$.pipe(switchMap((stream) => stream));
|
|
1212
1058
|
this.blur$ = this._blurStream$.pipe(switchMap((stream) => stream));
|
|
1213
|
-
this.inputRef = contentChild(WlcmDatepickerInputDirective, {
|
|
1214
|
-
read: ElementRef,
|
|
1215
|
-
});
|
|
1059
|
+
this.inputRef = contentChild(WlcmDatepickerInputDirective, { ...(ngDevMode ? { debugName: "inputRef" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
1216
1060
|
this.componentType = WlcmDatepickerPanelComponent;
|
|
1061
|
+
this.formField = inject(WLCM_FORM_FIELD, { host: true });
|
|
1217
1062
|
this.focus = () => {
|
|
1218
1063
|
if (this.selectOnly())
|
|
1219
1064
|
return this.open();
|
|
@@ -1233,7 +1078,9 @@ class WlcmDatepickerInputContainerComponent extends WlcmDatepickerTrigger {
|
|
|
1233
1078
|
return this.inputRef()?.nativeElement;
|
|
1234
1079
|
}
|
|
1235
1080
|
attachFocusBlurListeners() {
|
|
1236
|
-
const voidFn = () => {
|
|
1081
|
+
const voidFn = () => {
|
|
1082
|
+
// noop
|
|
1083
|
+
};
|
|
1237
1084
|
const inputFocus = fromEvent(this.inputElement, 'focus');
|
|
1238
1085
|
const inputBlur = fromEvent(this.inputElement, 'blur');
|
|
1239
1086
|
const focusObservables = [inputFocus, this.opened];
|
|
@@ -1241,8 +1088,8 @@ class WlcmDatepickerInputContainerComponent extends WlcmDatepickerTrigger {
|
|
|
1241
1088
|
this._focusStream$.next(merge(...focusObservables).pipe(map(voidFn)));
|
|
1242
1089
|
this._blurStream$.next(merge(...blurObservables).pipe(map(voidFn)));
|
|
1243
1090
|
}
|
|
1244
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1245
|
-
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: [
|
|
1246
1093
|
{
|
|
1247
1094
|
provide: WLCM_INPUT_BINDER,
|
|
1248
1095
|
useFactory: () => {
|
|
@@ -1254,11 +1101,11 @@ class WlcmDatepickerInputContainerComponent extends WlcmDatepickerTrigger {
|
|
|
1254
1101
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => WlcmDatepickerInputContainerComponent), multi: true },
|
|
1255
1102
|
{ provide: WlcmDatepickerTrigger, useExisting: forwardRef(() => WlcmDatepickerInputContainerComponent) },
|
|
1256
1103
|
{ provide: MatDateSelectionModel, useClass: MatSingleDateSelectionModel },
|
|
1257
|
-
], 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 }); }
|
|
1258
1105
|
}
|
|
1259
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerInputContainerComponent, decorators: [{
|
|
1260
1107
|
type: Component,
|
|
1261
|
-
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: [
|
|
1262
1109
|
{
|
|
1263
1110
|
provide: WLCM_INPUT_BINDER,
|
|
1264
1111
|
useFactory: () => {
|
|
@@ -1271,12 +1118,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
1271
1118
|
{ provide: WlcmDatepickerTrigger, useExisting: forwardRef(() => WlcmDatepickerInputContainerComponent) },
|
|
1272
1119
|
{ provide: MatDateSelectionModel, useClass: MatSingleDateSelectionModel },
|
|
1273
1120
|
], template: "<ng-content select=\"[wlcmDatepickerInput]\"></ng-content>\n" }]
|
|
1274
|
-
}], ctorParameters: () => [
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
type: Inject,
|
|
1278
|
-
args: [WLCM_FORM_FIELD]
|
|
1279
|
-
}] }] });
|
|
1121
|
+
}], ctorParameters: () => [], propDecorators: { inputRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WlcmDatepickerInputDirective), { ...{
|
|
1122
|
+
read: ElementRef,
|
|
1123
|
+
}, isSignal: true }] }] } });
|
|
1280
1124
|
|
|
1281
1125
|
function WlcmDateRangeInputValidator() {
|
|
1282
1126
|
return (control) => {
|
|
@@ -1300,15 +1144,15 @@ const publicDirectives = [
|
|
|
1300
1144
|
DateRangePickerInputEndDirective,
|
|
1301
1145
|
];
|
|
1302
1146
|
class WlcmDatepickerModule {
|
|
1303
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1304
|
-
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,
|
|
1305
1149
|
DateRangePickerInputStartDirective,
|
|
1306
1150
|
DateRangePickerInputEndDirective], exports: [WlcmDatepickerInputContainerComponent, WlcmDateRangePickerInputComponent, WlcmDatepickerInputDirective,
|
|
1307
1151
|
DateRangePickerInputStartDirective,
|
|
1308
1152
|
DateRangePickerInputEndDirective] }); }
|
|
1309
|
-
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] }); }
|
|
1310
1154
|
}
|
|
1311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmDatepickerModule, decorators: [{
|
|
1312
1156
|
type: NgModule,
|
|
1313
1157
|
args: [{
|
|
1314
1158
|
imports: [CommonModule, ...publicComponents, ...publicDirectives],
|
|
@@ -1321,5 +1165,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
1321
1165
|
* Generated bundle index. Do not edit.
|
|
1322
1166
|
*/
|
|
1323
1167
|
|
|
1324
|
-
export { DateRangePickerInputEndDirective, DateRangePickerInputStartDirective, DoubleCalendarRangePickerComponent, SingleCalendarRangePickerComponent, WLCM_DATEPICKER_CONFIG, WLCM_DATE_RANGE_PICKER_BP, WLCM_DATE_RANGE_SELECTION_MODEL, WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL_PROVIDER, WlcmDateRangeInputValidator, WlcmDateRangePicker, WlcmDateRangePickerInputComponent, WlcmDateRangeValidation, WlcmDateValidation, WlcmDatepickerInputContainerComponent, WlcmDatepickerInputDirective, WlcmDatepickerModule, WlcmDatepickerTrigger };
|
|
1168
|
+
export { DateRangePickerInputEndDirective, DateRangePickerInputStartDirective, DoubleCalendarRangePickerComponent, SingleCalendarRangePickerComponent, WLCM_DATEPICKER_CONFIG, WLCM_DATE_RANGE_PICKER_BP, WLCM_DATE_RANGE_PICKER_LEFT_PANEL, WLCM_DATE_RANGE_SELECTION_MODEL, WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL, WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL_PROVIDER, WlcmDateRangeInputValidator, WlcmDateRangePicker, WlcmDateRangePickerInputComponent, WlcmDateRangeValidation, WlcmDateValidation, WlcmDatepickerInputContainerComponent, WlcmDatepickerInputDirective, WlcmDatepickerModule, WlcmDatepickerTrigger };
|
|
1325
1169
|
//# sourceMappingURL=wlcm-angular-datepicker.mjs.map
|