@siemens/element-ng 49.13.0 → 51.0.0-rc.3
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 +1 -1
- package/fesm2022/siemens-element-ng-about.mjs +41 -25
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +56 -39
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +81 -51
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +15 -12
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +142 -137
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +34 -28
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +27 -22
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +31 -21
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-badge.mjs +9 -8
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +17 -14
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +18 -15
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +71 -46
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-carousel.mjs +55 -32
- package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +175 -111
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +37 -24
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +24 -16
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +52 -33
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +12 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs +14 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +35 -26
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-copyright-notice.mjs +19 -14
- package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +327 -213
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datatable.mjs +8 -8
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +119 -72
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +358 -234
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +21 -16
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-empty-state.mjs +15 -12
- package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +93 -81
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +29 -22
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +243 -147
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-footer.mjs +12 -10
- package/fesm2022/siemens-element-ng-footer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +267 -84
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly-legacy.mjs +99 -0
- package/fesm2022/siemens-element-ng-formly-legacy.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-formly.mjs +220 -315
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +38 -29
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-help-button.mjs +5 -5
- package/fesm2022/siemens-element-ng-help-button.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs +46 -47
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-info-page.mjs +17 -11
- package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-inline-notification.mjs +19 -14
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +19 -15
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-landing-page.mjs +118 -72
- package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +16 -12
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-link.mjs +31 -21
- package/fesm2022/siemens-element-ng-link.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +73 -54
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +42 -33
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-localization.mjs +14 -12
- package/fesm2022/siemens-element-ng-localization.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +46 -29
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs +6 -5
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-menu.mjs +56 -48
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +12 -10
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +133 -94
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +117 -81
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +67 -41
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +19 -11
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +38 -27
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +31 -20
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-strength.mjs +31 -22
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +18 -13
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs +121 -138
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +76 -45
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +63 -58
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover-legacy.mjs +43 -28
- package/fesm2022/siemens-element-ng-popover-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +33 -26
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-progressbar.mjs +23 -16
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-resize-observer.mjs +32 -43
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-result-details-list.mjs +12 -10
- package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +32 -24
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +212 -154
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-shadow-root.mjs +3 -3
- package/fesm2022/siemens-element-ng-side-panel.mjs +119 -75
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-skip-links.mjs +14 -13
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-slider.mjs +42 -28
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-split.mjs +268 -254
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +57 -47
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-counter.mjs +15 -11
- package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs +22 -14
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +25 -16
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +27 -17
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-system-banner.mjs +11 -8
- package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +16 -15
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +59 -45
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +5 -4
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +59 -40
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +45 -40
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +52 -54
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +28 -19
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs +0 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +92 -73
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +75 -67
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +72 -48
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/formly-legacy/package.json +4 -0
- package/package.json +20 -22
- package/schematics/migration.json +4 -4
- package/schematics/migrations/data/class-member-replacement.js +1 -19
- package/schematics/migrations/data/component-property-names.js +1 -25
- package/schematics/migrations/data/element-class-changes.js +1 -28
- package/schematics/migrations/data/element-migration-data.js +2 -0
- package/schematics/migrations/data/element-selectors.js +1 -11
- package/schematics/migrations/data/index.js +0 -4
- package/schematics/migrations/data/migration-test-data.js +9 -6
- package/schematics/migrations/data/provider-function-removals.js +7 -0
- package/schematics/migrations/data/symbol-removals.js +7 -7
- package/schematics/migrations/data/symbol-renaming.js +1 -48
- package/schematics/migrations/element-migration/element-migration.js +3 -6
- package/schematics/migrations/utilities/import-removal.js +39 -0
- package/schematics/migrations/utilities/index.js +2 -0
- package/schematics/migrations/utilities/provider-function-removal.migration.js +116 -0
- package/schematics/ng-update/index.js +1 -1
- package/schematics/ng-update/{migrate-to-v49.js → migrate-to-v51.js} +2 -2
- package/template-i18n.json +3 -6
- package/types/siemens-element-ng-application-header.d.ts +1 -21
- package/types/siemens-element-ng-chat-messages.d.ts +6 -4
- package/types/siemens-element-ng-circle-status.d.ts +1 -1
- package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
- package/types/siemens-element-ng-datepicker.d.ts +1 -12
- package/types/siemens-element-ng-file-uploader.d.ts +5 -23
- package/types/siemens-element-ng-filtered-search.d.ts +1 -1
- package/types/siemens-element-ng-form.d.ts +134 -37
- package/types/siemens-element-ng-formly-legacy.d.ts +40 -0
- package/types/siemens-element-ng-formly.d.ts +34 -167
- package/types/siemens-element-ng-icon.d.ts +2 -19
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +6 -1
- package/types/siemens-element-ng-notification-item.d.ts +12 -0
- package/types/siemens-element-ng-phone-number.d.ts +5 -8
- package/types/siemens-element-ng-resize-observer.d.ts +0 -17
- package/types/siemens-element-ng-split.d.ts +95 -63
- package/types/siemens-element-ng-status-bar.d.ts +5 -13
- package/types/siemens-element-ng-status-counter.d.ts +1 -1
- package/types/siemens-element-ng-toast-notification.d.ts +0 -1
- package/types/siemens-element-ng-translate.d.ts +1 -5
- package/fesm2022/siemens-element-ng-icon-status.mjs +0 -46
- package/fesm2022/siemens-element-ng-icon-status.mjs.map +0 -1
- package/fesm2022/siemens-element-ng-sort-bar.mjs +0 -99
- package/fesm2022/siemens-element-ng-sort-bar.mjs.map +0 -1
- package/icon-status/package.json +0 -4
- package/schematics/vitest-setup.js +0 -5
- package/sort-bar/package.json +0 -4
- package/types/siemens-element-ng-icon-status.d.ts +0 -25
- package/types/siemens-element-ng-sort-bar.d.ts +0 -59
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getLocaleDayPeriods, FormStyle, TranslationWidth, getLocaleId, getLocaleDateTimeFormat, FormatWidth, getLocaleTimeFormat, getLocaleDateFormat, formatDate, DatePipe, NgTemplateOutlet, getLocaleFirstDayOfWeek, WeekDay } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, model, output, booleanAttribute, computed, signal, inject, LOCALE_ID, HostListener, Directive, ElementRef, viewChildren,
|
|
3
|
+
import { input, model, output, booleanAttribute, computed, signal, inject, LOCALE_ID, HostListener, Directive, ElementRef, viewChildren, Component, viewChild, HostAttributeToken, effect, ChangeDetectorRef, SimpleChange, ChangeDetectionStrategy, DOCUMENT, DestroyRef, contentChild, NgModule } from '@angular/core';
|
|
4
4
|
import * as i2 from '@angular/forms';
|
|
5
5
|
import { Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormBuilder, ReactiveFormsModule, FormControl, FormsModule, NgControl } from '@angular/forms';
|
|
6
6
|
import { SI_FORM_ITEM_CONTROL } from '@siemens/element-ng/form';
|
|
@@ -749,7 +749,8 @@ class SiDateInputDirective {
|
|
|
749
749
|
* `si-date-input-${SiDateInputDirective.idCounter++}`
|
|
750
750
|
* ```
|
|
751
751
|
*/
|
|
752
|
-
id = input(`si-date-input-${SiDateInputDirective.idCounter++}`,
|
|
752
|
+
id = input(`si-date-input-${SiDateInputDirective.idCounter++}`, /* @ts-ignore */
|
|
753
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
753
754
|
/**
|
|
754
755
|
* Configuration object for the datepicker.
|
|
755
756
|
*
|
|
@@ -758,7 +759,8 @@ class SiDateInputDirective {
|
|
|
758
759
|
* {}
|
|
759
760
|
* ```
|
|
760
761
|
*/
|
|
761
|
-
siDatepickerConfig = model({},
|
|
762
|
+
siDatepickerConfig = model({}, /* @ts-ignore */
|
|
763
|
+
...(ngDevMode ? [{ debugName: "siDatepickerConfig" }] : /* istanbul ignore next */ []));
|
|
762
764
|
/**
|
|
763
765
|
* Emits an event to notify about disabling the time from the datepicker.
|
|
764
766
|
* When time is disable, we construct a pure date object in UTC 00:00:00 time.
|
|
@@ -773,12 +775,12 @@ class SiDateInputDirective {
|
|
|
773
775
|
* @defaultValue false
|
|
774
776
|
*/
|
|
775
777
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
776
|
-
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : {}), alias: 'disabled' });
|
|
778
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled' });
|
|
777
779
|
/**
|
|
778
780
|
* Whether the date range input is readonly.
|
|
779
781
|
* @defaultValue false
|
|
780
782
|
*/
|
|
781
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
783
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
782
784
|
/**
|
|
783
785
|
* This ID will be bound to the `aria-describedby` attribute of the date-input.
|
|
784
786
|
* Use this to reference the element containing the error message(s) for the date-input.
|
|
@@ -789,7 +791,8 @@ class SiDateInputDirective {
|
|
|
789
791
|
* `${this.id()}-errormessage`
|
|
790
792
|
* ```
|
|
791
793
|
*/
|
|
792
|
-
errormessageId = input(`${this.id()}-errormessage`,
|
|
794
|
+
errormessageId = input(`${this.id()}-errormessage`, /* @ts-ignore */
|
|
795
|
+
...(ngDevMode ? [{ debugName: "errormessageId" }] : /* istanbul ignore next */ []));
|
|
793
796
|
/** @internal */
|
|
794
797
|
validatorOnChange = () => { };
|
|
795
798
|
/**
|
|
@@ -806,11 +809,14 @@ class SiDateInputDirective {
|
|
|
806
809
|
*/
|
|
807
810
|
dateChange = output();
|
|
808
811
|
/** @internal */
|
|
809
|
-
disabled = computed(() => this.disabledInput() || this.disabledNgControl(),
|
|
812
|
+
disabled = computed(() => this.disabledInput() || this.disabledNgControl(), /* @ts-ignore */
|
|
813
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
810
814
|
onTouched = () => { };
|
|
811
815
|
onModelChange = () => { };
|
|
812
|
-
dateString = signal('',
|
|
813
|
-
|
|
816
|
+
dateString = signal('', /* @ts-ignore */
|
|
817
|
+
...(ngDevMode ? [{ debugName: "dateString" }] : /* istanbul ignore next */ []));
|
|
818
|
+
disabledNgControl = signal(false, /* @ts-ignore */
|
|
819
|
+
...(ngDevMode ? [{ debugName: "disabledNgControl" }] : /* istanbul ignore next */ []));
|
|
814
820
|
locale = inject(LOCALE_ID).toString();
|
|
815
821
|
format = '';
|
|
816
822
|
ngOnChanges(changes) {
|
|
@@ -965,8 +971,8 @@ class SiDateInputDirective {
|
|
|
965
971
|
}
|
|
966
972
|
};
|
|
967
973
|
}
|
|
968
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
969
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
974
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDateInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
975
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: SiDateInputDirective, isStandalone: true, selector: "input[siDateInput]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, siDatepickerConfig: { classPropertyName: "siDatepickerConfig", publicName: "siDatepickerConfig", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, errormessageId: { classPropertyName: "errormessageId", publicName: "errormessageId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { siDatepickerConfig: "siDatepickerConfigChange", siDatepickerDisabledTime: "siDatepickerDisabledTime", stateChange: "stateChange", dateChange: "dateChange" }, host: { listeners: { "input": "onInput($event)", "blur": "onBlur($event)" }, properties: { "attr.id": "id()", "attr.disabled": "disabled() || null", "attr.readonly": "readonly() || null", "class.readonly": "readonly()", "attr.aria-describedby": "errormessageId()", "value": "dateString()" } }, providers: [
|
|
970
976
|
{
|
|
971
977
|
provide: NG_VALUE_ACCESSOR,
|
|
972
978
|
useExisting: SiDateInputDirective,
|
|
@@ -983,7 +989,7 @@ class SiDateInputDirective {
|
|
|
983
989
|
}
|
|
984
990
|
], exportAs: ["siDateInput"], usesOnChanges: true, ngImport: i0 });
|
|
985
991
|
}
|
|
986
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
992
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDateInputDirective, decorators: [{
|
|
987
993
|
type: Directive,
|
|
988
994
|
args: [{
|
|
989
995
|
selector: 'input[siDateInput]',
|
|
@@ -1026,14 +1032,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1026
1032
|
* SPDX-License-Identifier: MIT
|
|
1027
1033
|
*/
|
|
1028
1034
|
class SiCalendarDateCellDirective {
|
|
1029
|
-
cell = input.required(
|
|
1030
|
-
|
|
1035
|
+
cell = input.required(/* @ts-ignore */
|
|
1036
|
+
...(ngDevMode ? [{ debugName: "cell" }] : /* istanbul ignore next */ []));
|
|
1037
|
+
compareAdapter = input.required(/* @ts-ignore */
|
|
1038
|
+
...(ngDevMode ? [{ debugName: "compareAdapter" }] : /* istanbul ignore next */ []));
|
|
1031
1039
|
/** @defaultValue inject(ElementRef) */
|
|
1032
1040
|
ref = inject(ElementRef);
|
|
1033
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1034
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1041
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCalendarDateCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1042
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: SiCalendarDateCellDirective, isStandalone: true, selector: "[siCalendarDateCell]", inputs: { cell: { classPropertyName: "cell", publicName: "cell", isSignal: true, isRequired: true, transformFunction: null }, compareAdapter: { classPropertyName: "compareAdapter", publicName: "compareAdapter", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "attr.aria-disabled": "cell().disabled", "class.disabled": "cell().disabled", "attr.aria-label": "cell().ariaLabel", "class.today": "this.cell().isToday", "attr.aria-current": "this.cell().isToday ? \"date\" : null" }, classAttribute: "si-calendar-date-cell focus-inside" }, ngImport: i0 });
|
|
1035
1043
|
}
|
|
1036
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCalendarDateCellDirective, decorators: [{
|
|
1037
1045
|
type: Directive,
|
|
1038
1046
|
args: [{
|
|
1039
1047
|
selector: '[siCalendarDateCell]',
|
|
@@ -1179,54 +1187,65 @@ class RangeSelectionStrategy extends SelectionStrategy {
|
|
|
1179
1187
|
}
|
|
1180
1188
|
class SiCalendarBodyComponent {
|
|
1181
1189
|
/** The active date, the cell which will receive the focus. */
|
|
1182
|
-
focusedDate = model.required(
|
|
1190
|
+
focusedDate = model.required(/* @ts-ignore */
|
|
1191
|
+
...(ngDevMode ? [{ debugName: "focusedDate" }] : /* istanbul ignore next */ []));
|
|
1183
1192
|
/** The date which shall be indicated as currently selected. */
|
|
1184
|
-
startDate = input(
|
|
1193
|
+
startDate = input(/* @ts-ignore */
|
|
1194
|
+
...(ngDevMode ? [undefined, { debugName: "startDate" }] : /* istanbul ignore next */ []));
|
|
1185
1195
|
/** Selected end value which is only considered with enableRangeSelection. */
|
|
1186
|
-
endDate = input(
|
|
1196
|
+
endDate = input(/* @ts-ignore */
|
|
1197
|
+
...(ngDevMode ? [undefined, { debugName: "endDate" }] : /* istanbul ignore next */ []));
|
|
1187
1198
|
/**
|
|
1188
1199
|
* The cells to display in the table.
|
|
1189
1200
|
*
|
|
1190
1201
|
* @defaultValue []
|
|
1191
1202
|
*/
|
|
1192
|
-
rows = input([],
|
|
1203
|
+
rows = input([], /* @ts-ignore */
|
|
1204
|
+
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
1193
1205
|
/**
|
|
1194
1206
|
* Labels for each row, which can be used to display the week number.
|
|
1195
1207
|
* @defaultValue undefined
|
|
1196
1208
|
*/
|
|
1197
|
-
rowLabels = input(undefined,
|
|
1209
|
+
rowLabels = input(undefined, /* @ts-ignore */
|
|
1210
|
+
...(ngDevMode ? [{ debugName: "rowLabels" }] : /* istanbul ignore next */ []));
|
|
1198
1211
|
/**
|
|
1199
1212
|
* Additional row label CSS class(es).
|
|
1200
1213
|
*
|
|
1201
1214
|
* @defaultValue []
|
|
1202
1215
|
*/
|
|
1203
|
-
rowLabelCssClasses = input([],
|
|
1216
|
+
rowLabelCssClasses = input([], /* @ts-ignore */
|
|
1217
|
+
...(ngDevMode ? [{ debugName: "rowLabelCssClasses" }] : /* istanbul ignore next */ []));
|
|
1204
1218
|
/**
|
|
1205
1219
|
* Choose the selection strategy between single or range selection.
|
|
1206
1220
|
* @defaultValue false
|
|
1207
1221
|
*/
|
|
1208
|
-
enableRangeSelection = input(false,
|
|
1222
|
+
enableRangeSelection = input(false, /* @ts-ignore */
|
|
1223
|
+
...(ngDevMode ? [{ debugName: "enableRangeSelection" }] : /* istanbul ignore next */ []));
|
|
1209
1224
|
/**
|
|
1210
1225
|
* Indicate whether a range preview shall be displayed.
|
|
1211
1226
|
* It's necessary since to display a preview also datepicker has a valid endDate.
|
|
1212
1227
|
*
|
|
1213
1228
|
* @defaultValue true
|
|
1214
1229
|
*/
|
|
1215
|
-
previewRange = input(true, { ...(ngDevMode ? { debugName: "previewRange" } : {}), transform: booleanAttribute });
|
|
1230
|
+
previewRange = input(true, { ...(ngDevMode ? { debugName: "previewRange" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1216
1231
|
/** The cell which which has the mouse hover. */
|
|
1217
|
-
activeHover = model(
|
|
1232
|
+
activeHover = model(/* @ts-ignore */
|
|
1233
|
+
...(ngDevMode ? [undefined, { debugName: "activeHover" }] : /* istanbul ignore next */ []));
|
|
1218
1234
|
/**
|
|
1219
1235
|
* Compare date functions which are necessary to compare a the dates according the current view.
|
|
1220
1236
|
*
|
|
1221
1237
|
* @defaultValue new DayCompareAdapter()
|
|
1222
1238
|
*/
|
|
1223
|
-
compareAdapter = input(new DayCompareAdapter(),
|
|
1239
|
+
compareAdapter = input(new DayCompareAdapter(), /* @ts-ignore */
|
|
1240
|
+
...(ngDevMode ? [{ debugName: "compareAdapter" }] : /* istanbul ignore next */ []));
|
|
1224
1241
|
/** Emits when a user select a cell via click, space or enter. */
|
|
1225
1242
|
selectedValueChange = output();
|
|
1226
|
-
calendarDateCells = viewChildren(SiCalendarDateCellDirective,
|
|
1243
|
+
calendarDateCells = viewChildren(SiCalendarDateCellDirective, /* @ts-ignore */
|
|
1244
|
+
...(ngDevMode ? [{ debugName: "calendarDateCells" }] : /* istanbul ignore next */ []));
|
|
1227
1245
|
selection = computed(() => this.enableRangeSelection()
|
|
1228
1246
|
? new RangeSelectionStrategy(this.compareAdapter())
|
|
1229
|
-
: new SingleSelectionStrategy(this.compareAdapter()),
|
|
1247
|
+
: new SingleSelectionStrategy(this.compareAdapter()), /* @ts-ignore */
|
|
1248
|
+
...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
|
|
1230
1249
|
cellRangeClasses = computed(() => {
|
|
1231
1250
|
const sel = this.selection();
|
|
1232
1251
|
const rows = this.rows();
|
|
@@ -1256,7 +1275,8 @@ class SiCalendarBodyComponent {
|
|
|
1256
1275
|
}
|
|
1257
1276
|
return classes;
|
|
1258
1277
|
}));
|
|
1259
|
-
},
|
|
1278
|
+
}, /* @ts-ignore */
|
|
1279
|
+
...(ngDevMode ? [{ debugName: "cellRangeClasses" }] : /* istanbul ignore next */ []));
|
|
1260
1280
|
/**
|
|
1261
1281
|
* Focus calendar cell which is marked as active cell.
|
|
1262
1282
|
*/
|
|
@@ -1290,12 +1310,12 @@ class SiCalendarBodyComponent {
|
|
|
1290
1310
|
this.focusedDate.set(cell.valueRaw);
|
|
1291
1311
|
}
|
|
1292
1312
|
}
|
|
1293
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1294
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1313
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCalendarBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1314
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiCalendarBodyComponent, isStandalone: true, selector: "[si-calendar-body]", inputs: { focusedDate: { classPropertyName: "focusedDate", publicName: "focusedDate", isSignal: true, isRequired: true, transformFunction: null }, startDate: { classPropertyName: "startDate", publicName: "startDate", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, rowLabels: { classPropertyName: "rowLabels", publicName: "rowLabels", isSignal: true, isRequired: false, transformFunction: null }, rowLabelCssClasses: { classPropertyName: "rowLabelCssClasses", publicName: "rowLabelCssClasses", isSignal: true, isRequired: false, transformFunction: null }, enableRangeSelection: { classPropertyName: "enableRangeSelection", publicName: "enableRangeSelection", isSignal: true, isRequired: false, transformFunction: null }, previewRange: { classPropertyName: "previewRange", publicName: "previewRange", isSignal: true, isRequired: false, transformFunction: null }, activeHover: { classPropertyName: "activeHover", publicName: "activeHover", isSignal: true, isRequired: false, transformFunction: null }, compareAdapter: { classPropertyName: "compareAdapter", publicName: "compareAdapter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focusedDate: "focusedDateChange", activeHover: "activeHoverChange", selectedValueChange: "selectedValueChange" }, host: { classAttribute: "si-calendar-body" }, viewQueries: [{ propertyName: "calendarDateCells", predicate: SiCalendarDateCellDirective, descendants: true, isSignal: true }], exportAs: ["siCalendarBody"], ngImport: i0, template: "@for (row of rows(); track rowIndex; let rowIndex = $index) {\n <tr role=\"row\">\n <!-- Typically used for week numbers -->\n @if (rowLabels()) {\n <td class=\"si-calendar-row-label\" [attr.data-row]=\"rowIndex\">\n <div [class]=\"rowLabelCssClasses()\">{{ rowLabels()?.at(rowIndex) ?? '' }}</div>\n </td>\n }\n @for (col of row; track colIndex; let colIndex = $index) {\n <td\n role=\"gridcell\"\n class=\"si-calendar-cell\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-col]=\"colIndex\"\n [class]=\"cellRangeClasses()[rowIndex][colIndex]\"\n >\n <button\n siCalendarDateCell\n type=\"button\"\n [cell]=\"col\"\n [compareAdapter]=\"compareAdapter()\"\n [attr.cdkFocusInitial]=\"isActive(col) ? '' : null\"\n [class]=\"cellCss(col)\"\n [class.selected]=\"selection().isSelected(col, startDate(), endDate())\"\n [class.text-secondary]=\"\n col.isPreview &&\n !col.disabled &&\n !selection().isRangeSelected(col, startDate()) &&\n !selection().isRangeSelected(col, endDate()) &&\n !selection().inRange(col, startDate(), endDate())\n \"\n [tabindex]=\"isActive(col) ? '0' : '-1'\"\n (mouseover)=\"emitActiveHover(col)\"\n (click)=\"emitSelectCell(col)\"\n (focus)=\"emitActiveDateChange(col)\"\n >\n {{ col.displayValue }}\n </button>\n </td>\n }\n </tr>\n}\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: SiCalendarDateCellDirective, selector: "[siCalendarDateCell]", inputs: ["cell", "compareAdapter"] }] });
|
|
1295
1315
|
}
|
|
1296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCalendarBodyComponent, decorators: [{
|
|
1297
1317
|
type: Component,
|
|
1298
|
-
args: [{ selector: '[si-calendar-body]', imports: [A11yModule, SiCalendarDateCellDirective],
|
|
1318
|
+
args: [{ selector: '[si-calendar-body]', imports: [A11yModule, SiCalendarDateCellDirective], host: {
|
|
1299
1319
|
class: 'si-calendar-body'
|
|
1300
1320
|
}, exportAs: 'siCalendarBody', template: "@for (row of rows(); track rowIndex; let rowIndex = $index) {\n <tr role=\"row\">\n <!-- Typically used for week numbers -->\n @if (rowLabels()) {\n <td class=\"si-calendar-row-label\" [attr.data-row]=\"rowIndex\">\n <div [class]=\"rowLabelCssClasses()\">{{ rowLabels()?.at(rowIndex) ?? '' }}</div>\n </td>\n }\n @for (col of row; track colIndex; let colIndex = $index) {\n <td\n role=\"gridcell\"\n class=\"si-calendar-cell\"\n [attr.data-row]=\"rowIndex\"\n [attr.data-col]=\"colIndex\"\n [class]=\"cellRangeClasses()[rowIndex][colIndex]\"\n >\n <button\n siCalendarDateCell\n type=\"button\"\n [cell]=\"col\"\n [compareAdapter]=\"compareAdapter()\"\n [attr.cdkFocusInitial]=\"isActive(col) ? '' : null\"\n [class]=\"cellCss(col)\"\n [class.selected]=\"selection().isSelected(col, startDate(), endDate())\"\n [class.text-secondary]=\"\n col.isPreview &&\n !col.disabled &&\n !selection().isRangeSelected(col, startDate()) &&\n !selection().isRangeSelected(col, endDate()) &&\n !selection().inRange(col, startDate(), endDate())\n \"\n [tabindex]=\"isActive(col) ? '0' : '-1'\"\n (mouseover)=\"emitActiveHover(col)\"\n (click)=\"emitSelectCell(col)\"\n (focus)=\"emitActiveDateChange(col)\"\n >\n {{ col.displayValue }}\n </button>\n </td>\n }\n </tr>\n}\n" }]
|
|
1301
1321
|
}], propDecorators: { focusedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedDate", required: true }] }, { type: i0.Output, args: ["focusedDateChange"] }], startDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "startDate", required: false }] }], endDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "endDate", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], rowLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowLabels", required: false }] }], rowLabelCssClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowLabelCssClasses", required: false }] }], enableRangeSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableRangeSelection", required: false }] }], previewRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewRange", required: false }] }], activeHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeHover", required: false }] }, { type: i0.Output, args: ["activeHoverChange"] }], compareAdapter: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareAdapter", required: false }] }], selectedValueChange: [{ type: i0.Output, args: ["selectedValueChange"] }], calendarDateCells: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => SiCalendarDateCellDirective), { isSignal: true }] }] } });
|
|
@@ -1305,26 +1325,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1305
1325
|
* SPDX-License-Identifier: MIT
|
|
1306
1326
|
*/
|
|
1307
1327
|
class SiCalendarDirectionButtonComponent {
|
|
1308
|
-
ariaLabel = input.required(
|
|
1328
|
+
ariaLabel = input.required(/* @ts-ignore */
|
|
1329
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
1309
1330
|
/** @defaultValue false */
|
|
1310
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
1311
|
-
direction = input(
|
|
1331
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1332
|
+
direction = input(/* @ts-ignore */
|
|
1333
|
+
...(ngDevMode ? [undefined, { debugName: "direction" }] : /* istanbul ignore next */ []));
|
|
1312
1334
|
/**
|
|
1313
1335
|
* Emit on button click.
|
|
1314
1336
|
*/
|
|
1315
1337
|
clicked = output();
|
|
1316
|
-
icon = computed(() => this.direction() === 'left' ? this.icons.elementLeft2 : this.icons.elementRight2,
|
|
1317
|
-
|
|
1338
|
+
icon = computed(() => this.direction() === 'left' ? this.icons.elementLeft2 : this.icons.elementRight2, /* @ts-ignore */
|
|
1339
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
1340
|
+
buttonClass = computed(() => this.direction() === 'left' ? 'previous-button' : 'next-button', /* @ts-ignore */
|
|
1341
|
+
...(ngDevMode ? [{ debugName: "buttonClass" }] : /* istanbul ignore next */ []));
|
|
1318
1342
|
icons = addIcons({ elementLeft2, elementRight2 });
|
|
1319
1343
|
onClick() {
|
|
1320
1344
|
this.clicked.emit();
|
|
1321
1345
|
}
|
|
1322
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1323
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1346
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCalendarDirectionButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1347
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: SiCalendarDirectionButtonComponent, isStandalone: true, selector: "si-calendar-direction-button", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n type=\"button\"\n [class]=\"`btn btn-circle btn-tertiary ${buttonClass()}`\"\n [disabled]=\"disabled() || null\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick()\"\n>\n <si-icon class=\"icon flip-rtl\" [icon]=\"icon()\" />\n</button>\n", dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }] });
|
|
1324
1348
|
}
|
|
1325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCalendarDirectionButtonComponent, decorators: [{
|
|
1326
1350
|
type: Component,
|
|
1327
|
-
args: [{ selector: 'si-calendar-direction-button', imports: [SiIconComponent],
|
|
1351
|
+
args: [{ selector: 'si-calendar-direction-button', imports: [SiIconComponent], template: "<button\n type=\"button\"\n [class]=\"`btn btn-circle btn-tertiary ${buttonClass()}`\"\n [disabled]=\"disabled() || null\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick()\"\n>\n <si-icon class=\"icon flip-rtl\" [icon]=\"icon()\" />\n</button>\n" }]
|
|
1328
1352
|
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
|
|
1329
1353
|
|
|
1330
1354
|
/**
|
|
@@ -1336,52 +1360,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
1336
1360
|
*/
|
|
1337
1361
|
class SiInitialFocusComponent {
|
|
1338
1362
|
/** The cell which has the mouse hover. */
|
|
1339
|
-
activeHover = model(
|
|
1363
|
+
activeHover = model(/* @ts-ignore */
|
|
1364
|
+
...(ngDevMode ? [undefined, { debugName: "activeHover" }] : /* istanbul ignore next */ []));
|
|
1340
1365
|
/** The date which is displayed as selected. */
|
|
1341
|
-
startDate = input(
|
|
1366
|
+
startDate = input(/* @ts-ignore */
|
|
1367
|
+
...(ngDevMode ? [undefined, { debugName: "startDate" }] : /* istanbul ignore next */ []));
|
|
1342
1368
|
/** The date which is displayed as selected end. The value is only considered with enableRangeSelection. */
|
|
1343
|
-
endDate = input(
|
|
1369
|
+
endDate = input(/* @ts-ignore */
|
|
1370
|
+
...(ngDevMode ? [undefined, { debugName: "endDate" }] : /* istanbul ignore next */ []));
|
|
1344
1371
|
/**
|
|
1345
1372
|
* Guard to set the focus during ngAfterViewInit, we just set the focus after we first initialized the view
|
|
1346
1373
|
*
|
|
1347
1374
|
* @defaultValue true
|
|
1348
1375
|
*/
|
|
1349
|
-
initialFocus = input(true,
|
|
1376
|
+
initialFocus = input(true, /* @ts-ignore */
|
|
1377
|
+
...(ngDevMode ? [{ debugName: "initialFocus" }] : /* istanbul ignore next */ []));
|
|
1350
1378
|
/** The minimum selectable date. */
|
|
1351
|
-
minDate = input(
|
|
1379
|
+
minDate = input(/* @ts-ignore */
|
|
1380
|
+
...(ngDevMode ? [undefined, { debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
1352
1381
|
/** The maximum selectable date. */
|
|
1353
|
-
maxDate = input(
|
|
1382
|
+
maxDate = input(/* @ts-ignore */
|
|
1383
|
+
...(ngDevMode ? [undefined, { debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
1354
1384
|
/**
|
|
1355
1385
|
* Optional input to control the minimum month the datepicker can show and the user can navigate.
|
|
1356
1386
|
* The `minMonth` can be larger than the `minDate` This option enables the usage of multiple
|
|
1357
1387
|
* datepickers next to each other while the more left calendar always
|
|
1358
1388
|
* shows an earlier month the more right one.
|
|
1359
1389
|
*/
|
|
1360
|
-
minMonth = input(
|
|
1390
|
+
minMonth = input(/* @ts-ignore */
|
|
1391
|
+
...(ngDevMode ? [undefined, { debugName: "minMonth" }] : /* istanbul ignore next */ []));
|
|
1361
1392
|
/**
|
|
1362
1393
|
* Optional input to control the maximum month the datepicker can show and the user can navigate.
|
|
1363
1394
|
* The `maxMonth` can be smaller than the `maxDate` This option enables the usage of multiple
|
|
1364
1395
|
* datepickers next to each other while the more left calendar always
|
|
1365
1396
|
* shows an earlier month the more right one.
|
|
1366
1397
|
*/
|
|
1367
|
-
maxMonth = input(
|
|
1398
|
+
maxMonth = input(/* @ts-ignore */
|
|
1399
|
+
...(ngDevMode ? [undefined, { debugName: "maxMonth" }] : /* istanbul ignore next */ []));
|
|
1368
1400
|
/** Aria label for the next button. Needed for a11y. */
|
|
1369
|
-
previousLabel = input.required(
|
|
1401
|
+
previousLabel = input.required(/* @ts-ignore */
|
|
1402
|
+
...(ngDevMode ? [{ debugName: "previousLabel" }] : /* istanbul ignore next */ []));
|
|
1370
1403
|
/** Aria label for the next button. Needed for a11y. */
|
|
1371
|
-
nextLabel = input.required(
|
|
1404
|
+
nextLabel = input.required(/* @ts-ignore */
|
|
1405
|
+
...(ngDevMode ? [{ debugName: "nextLabel" }] : /* istanbul ignore next */ []));
|
|
1372
1406
|
/**
|
|
1373
1407
|
* Is range selection enabled, when enabled it shows a preview between the startDate and the focused date.
|
|
1374
1408
|
*
|
|
1375
1409
|
* @defaultValue false
|
|
1376
1410
|
*/
|
|
1377
|
-
isRangeSelection = input(false, { ...(ngDevMode ? { debugName: "isRangeSelection" } : {}), transform: booleanAttribute });
|
|
1411
|
+
isRangeSelection = input(false, { ...(ngDevMode ? { debugName: "isRangeSelection" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1378
1412
|
/**
|
|
1379
1413
|
* Indicate whether a range preview shall be displayed.
|
|
1380
1414
|
* When enabled a preview is visible between startDate and focusedDate.
|
|
1381
1415
|
*
|
|
1382
1416
|
* @defaultValue true
|
|
1383
1417
|
*/
|
|
1384
|
-
previewRange = input(true, { ...(ngDevMode ? { debugName: "previewRange" } : {}), transform: booleanAttribute });
|
|
1418
|
+
previewRange = input(true, { ...(ngDevMode ? { debugName: "previewRange" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1385
1419
|
/**
|
|
1386
1420
|
* Emits when a new value is selected. In case where the value is null to
|
|
1387
1421
|
* user aborted the selection by Escape.
|
|
@@ -1403,14 +1437,13 @@ class SiInitialFocusComponent {
|
|
|
1403
1437
|
onActiveHoverChange(event) {
|
|
1404
1438
|
this.activeHover.set(event);
|
|
1405
1439
|
}
|
|
1406
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1407
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
1440
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiInitialFocusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1441
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: SiInitialFocusComponent, isStandalone: true, selector: "ng-component", inputs: { activeHover: { classPropertyName: "activeHover", publicName: "activeHover", isSignal: true, isRequired: false, transformFunction: null }, startDate: { classPropertyName: "startDate", publicName: "startDate", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, initialFocus: { classPropertyName: "initialFocus", publicName: "initialFocus", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, minMonth: { classPropertyName: "minMonth", publicName: "minMonth", isSignal: true, isRequired: false, transformFunction: null }, maxMonth: { classPropertyName: "maxMonth", publicName: "maxMonth", isSignal: true, isRequired: false, transformFunction: null }, previousLabel: { classPropertyName: "previousLabel", publicName: "previousLabel", isSignal: true, isRequired: true, transformFunction: null }, nextLabel: { classPropertyName: "nextLabel", publicName: "nextLabel", isSignal: true, isRequired: true, transformFunction: null }, isRangeSelection: { classPropertyName: "isRangeSelection", publicName: "isRangeSelection", isSignal: true, isRequired: false, transformFunction: null }, previewRange: { classPropertyName: "previewRange", publicName: "previewRange", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeHover: "activeHoverChange", selectedValueChange: "selectedValueChange" }, viewQueries: [{ propertyName: "calendarBody", first: true, predicate: SiCalendarBodyComponent, descendants: true, isSignal: true }], ngImport: i0, template: '', isInline: true });
|
|
1408
1442
|
}
|
|
1409
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiInitialFocusComponent, decorators: [{
|
|
1410
1444
|
type: Component,
|
|
1411
1445
|
args: [{
|
|
1412
|
-
template: ''
|
|
1413
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1446
|
+
template: ''
|
|
1414
1447
|
}]
|
|
1415
1448
|
}], propDecorators: { activeHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeHover", required: false }] }, { type: i0.Output, args: ["activeHoverChange"] }], startDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "startDate", required: false }] }], endDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "endDate", required: false }] }], initialFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialFocus", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], minMonth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minMonth", required: false }] }], maxMonth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxMonth", required: false }] }], previousLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousLabel", required: true }] }], nextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextLabel", required: true }] }], isRangeSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRangeSelection", required: false }] }], previewRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewRange", required: false }] }], selectedValueChange: [{ type: i0.Output, args: ["selectedValueChange"] }], calendarBody: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiCalendarBodyComponent), { isSignal: true }] }] } });
|
|
1416
1449
|
|
|
@@ -1429,31 +1462,38 @@ class SiDaySelectionComponent extends SiInitialFocusComponent {
|
|
|
1429
1462
|
*
|
|
1430
1463
|
* @defaultValue false
|
|
1431
1464
|
*/
|
|
1432
|
-
hideWeekNumbers = input(false, { ...(ngDevMode ? { debugName: "hideWeekNumbers" } : {}), transform: booleanAttribute });
|
|
1465
|
+
hideWeekNumbers = input(false, { ...(ngDevMode ? { debugName: "hideWeekNumbers" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1433
1466
|
/**
|
|
1434
1467
|
* Defines the starting day of the week. Default is `monday`.
|
|
1435
1468
|
*
|
|
1436
1469
|
* @defaultValue 'monday'
|
|
1437
1470
|
*/
|
|
1438
|
-
weekStartDay = input('monday',
|
|
1471
|
+
weekStartDay = input('monday', /* @ts-ignore */
|
|
1472
|
+
...(ngDevMode ? [{ debugName: "weekStartDay" }] : /* istanbul ignore next */ []));
|
|
1439
1473
|
/**
|
|
1440
1474
|
* The active date, the cell which will receive the focus.
|
|
1441
1475
|
* @defaultValue calendarUtils.today()
|
|
1442
1476
|
*/
|
|
1443
|
-
focusedDate = model.required(
|
|
1477
|
+
focusedDate = model.required(/* @ts-ignore */
|
|
1478
|
+
...(ngDevMode ? [{ debugName: "focusedDate" }] : /* istanbul ignore next */ []));
|
|
1444
1479
|
/** Today button text */
|
|
1445
|
-
todayLabel = input(
|
|
1480
|
+
todayLabel = input(/* @ts-ignore */
|
|
1481
|
+
...(ngDevMode ? [undefined, { debugName: "todayLabel" }] : /* istanbul ignore next */ []));
|
|
1446
1482
|
/** Aria label for calendar week column */
|
|
1447
|
-
calendarWeekLabel = input(
|
|
1483
|
+
calendarWeekLabel = input(/* @ts-ignore */
|
|
1484
|
+
...(ngDevMode ? [undefined, { debugName: "calendarWeekLabel" }] : /* istanbul ignore next */ []));
|
|
1448
1485
|
/** Emits when the active focused date changed to another month / year, typically during keyboard navigation */
|
|
1449
1486
|
activeMonthChange = output();
|
|
1450
1487
|
/** Emits when the user requests a different to show a different view */
|
|
1451
1488
|
viewChange = output();
|
|
1452
|
-
today = computed(() => this.todayLabel() ?? this.todayDefaultText,
|
|
1489
|
+
today = computed(() => this.todayLabel() ?? this.todayDefaultText, /* @ts-ignore */
|
|
1490
|
+
...(ngDevMode ? [{ debugName: "today" }] : /* istanbul ignore next */ []));
|
|
1453
1491
|
/** The translated list of week days. */
|
|
1454
|
-
days = computed(() => getDayStrings(this.locale, this.weekStartDay()),
|
|
1492
|
+
days = computed(() => getDayStrings(this.locale, this.weekStartDay()), /* @ts-ignore */
|
|
1493
|
+
...(ngDevMode ? [{ debugName: "days" }] : /* istanbul ignore next */ []));
|
|
1455
1494
|
/** The week numbers which are shown as row label */
|
|
1456
|
-
weekNumbers = computed(() => this.weeks().map(w => getWeekOfYear(w[0].valueRaw, this.weekStartDay()).toString()),
|
|
1495
|
+
weekNumbers = computed(() => this.weeks().map(w => getWeekOfYear(w[0].valueRaw, this.weekStartDay()).toString()), /* @ts-ignore */
|
|
1496
|
+
...(ngDevMode ? [{ debugName: "weekNumbers" }] : /* istanbul ignore next */ []));
|
|
1457
1497
|
/**
|
|
1458
1498
|
* The current visible list of calendar days.
|
|
1459
1499
|
* Every time the focusedDate changes to either another month or year the list will be rebuild.
|
|
@@ -1490,11 +1530,13 @@ class SiDaySelectionComponent extends SiInitialFocusComponent {
|
|
|
1490
1530
|
});
|
|
1491
1531
|
}
|
|
1492
1532
|
return weeks;
|
|
1493
|
-
},
|
|
1533
|
+
}, /* @ts-ignore */
|
|
1534
|
+
...(ngDevMode ? [{ debugName: "weeks" }] : /* istanbul ignore next */ []));
|
|
1494
1535
|
/** Compare date based on the current view */
|
|
1495
1536
|
compareAdapter = new DayCompareAdapter();
|
|
1496
1537
|
/** Disable today button if it is the same month */
|
|
1497
|
-
isTodayButtonDisabled = computed(() => isSameMonth(today(), this.focusedDate()),
|
|
1538
|
+
isTodayButtonDisabled = computed(() => isSameMonth(today(), this.focusedDate()), /* @ts-ignore */
|
|
1539
|
+
...(ngDevMode ? [{ debugName: "isTodayButtonDisabled" }] : /* istanbul ignore next */ []));
|
|
1498
1540
|
/**
|
|
1499
1541
|
* Indicate the previous button shall be disabled.
|
|
1500
1542
|
* This happens when the focusedDate is equal or before the minDate.
|
|
@@ -1503,7 +1545,8 @@ class SiDaySelectionComponent extends SiInitialFocusComponent {
|
|
|
1503
1545
|
const minDate = this.minDate();
|
|
1504
1546
|
const focusedDate = this.focusedDate();
|
|
1505
1547
|
return minDate && (isSameMonth(focusedDate, minDate) || isAfterMonth(minDate, focusedDate));
|
|
1506
|
-
},
|
|
1548
|
+
}, /* @ts-ignore */
|
|
1549
|
+
...(ngDevMode ? [{ debugName: "isPreviousButtonDisabled" }] : /* istanbul ignore next */ []));
|
|
1507
1550
|
/**
|
|
1508
1551
|
* Indicate the next button shall be disabled.
|
|
1509
1552
|
* This happens when the focusedDate is equal or after the maxDate.
|
|
@@ -1512,7 +1555,8 @@ class SiDaySelectionComponent extends SiInitialFocusComponent {
|
|
|
1512
1555
|
const maxDate = this.maxDate();
|
|
1513
1556
|
const focusedDate = this.focusedDate();
|
|
1514
1557
|
return maxDate && (isSameMonth(focusedDate, maxDate) || isAfterMonth(focusedDate, maxDate));
|
|
1515
|
-
},
|
|
1558
|
+
}, /* @ts-ignore */
|
|
1559
|
+
...(ngDevMode ? [{ debugName: "isNextButtonDisabled" }] : /* istanbul ignore next */ []));
|
|
1516
1560
|
locale = inject(LOCALE_ID).toString();
|
|
1517
1561
|
calendarBodyKeyDown(event) {
|
|
1518
1562
|
const isRtl = isRTL();
|
|
@@ -1592,12 +1636,12 @@ class SiDaySelectionComponent extends SiInitialFocusComponent {
|
|
|
1592
1636
|
emitViewChange(view) {
|
|
1593
1637
|
this.viewChange.emit(view);
|
|
1594
1638
|
}
|
|
1595
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1596
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1639
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDaySelectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1640
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiDaySelectionComponent, isStandalone: true, selector: "si-day-selection", inputs: { hideWeekNumbers: { classPropertyName: "hideWeekNumbers", publicName: "hideWeekNumbers", isSignal: true, isRequired: false, transformFunction: null }, weekStartDay: { classPropertyName: "weekStartDay", publicName: "weekStartDay", isSignal: true, isRequired: false, transformFunction: null }, focusedDate: { classPropertyName: "focusedDate", publicName: "focusedDate", isSignal: true, isRequired: true, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, calendarWeekLabel: { classPropertyName: "calendarWeekLabel", publicName: "calendarWeekLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focusedDate: "focusedDateChange", activeMonthChange: "activeMonthChange", viewChange: "viewChange" }, host: { classAttribute: "d-flex flex-column gap-6" }, usesInheritance: true, ngImport: i0, template: "<div class=\"header\">\n <si-calendar-direction-button\n direction=\"left\"\n [ariaLabel]=\"previousLabel() | translate\"\n [disabled]=\"isPreviousButtonDisabled()\"\n (clicked)=\"setMonthOffset(-1)\"\n />\n <div class=\"flex-fill\">\n <button\n type=\"button\"\n class=\"open-month-view flex-fill text-end px-4 btn btn-tertiary calendar-button\"\n (click)=\"emitViewChange('month')\"\n >\n {{ focusedDate() | date: 'MMMM' }}\n </button>\n <button\n type=\"button\"\n class=\"open-year-view flex-fill text-start px-4 btn btn-tertiary calendar-button\"\n (click)=\"emitViewChange('year')\"\n >\n {{ focusedDate() | date: 'yyyy' }}\n </button>\n </div>\n <si-calendar-direction-button\n direction=\"right\"\n [ariaLabel]=\"nextLabel() | translate\"\n [disabled]=\"isNextButtonDisabled()\"\n (clicked)=\"setMonthOffset(1)\"\n />\n</div>\n<div class=\"calendar-table\">\n <table class=\"px-9\" role=\"grid\">\n <thead class=\"si-calendar-table-header\">\n <tr>\n @if (!hideWeekNumbers()) {\n <th scope=\"col\" class=\"week-num\">\n <span class=\"visually-hidden\">{{ calendarWeekLabel() | translate }}</span>\n </th>\n }\n @for (day of days(); track $index) {\n <th scope=\"col\">\n <span class=\"si-hidden-xs si-hidden-sm\">{{ day }}</span>\n </th>\n }\n </tr>\n </thead>\n <tbody\n si-calendar-body\n rowLabelCssClasses=\"week-num\"\n [focusedDate]=\"focusedDate()\"\n [compareAdapter]=\"compareAdapter\"\n [startDate]=\"startDate()\"\n [endDate]=\"endDate()\"\n [enableRangeSelection]=\"isRangeSelection()\"\n [previewRange]=\"previewRange()\"\n [rows]=\"weeks()\"\n [rowLabels]=\"hideWeekNumbers() ? undefined : weekNumbers()\"\n [activeHover]=\"activeHover()\"\n (activeHoverChange)=\"onActiveHoverChange($event)\"\n (selectedValueChange)=\"emitSelectedValue($event)\"\n (focusedDateChange)=\"emitActiveDate($event!)\"\n (keydown)=\"calendarBodyKeyDown($event)\"\n >\n </tbody>\n </table>\n</div>\n<div class=\"footer ps-8 pe-8\">\n <button\n type=\"button\"\n class=\"today-button btn btn-tertiary flex-fill\"\n [disabled]=\"isTodayButtonDisabled()\"\n (click)=\"goToToday()\"\n >\n {{ today() | translate }}\n </button>\n</div>\n", dependencies: [{ kind: "component", type: SiCalendarBodyComponent, selector: "[si-calendar-body]", inputs: ["focusedDate", "startDate", "endDate", "rows", "rowLabels", "rowLabelCssClasses", "enableRangeSelection", "previewRange", "activeHover", "compareAdapter"], outputs: ["focusedDateChange", "activeHoverChange", "selectedValueChange"], exportAs: ["siCalendarBody"] }, { kind: "component", type: SiCalendarDirectionButtonComponent, selector: "si-calendar-direction-button", inputs: ["ariaLabel", "disabled", "direction"], outputs: ["clicked"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
1597
1641
|
}
|
|
1598
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDaySelectionComponent, decorators: [{
|
|
1599
1643
|
type: Component,
|
|
1600
|
-
args: [{ selector: 'si-day-selection', imports: [DatePipe, SiCalendarBodyComponent, SiCalendarDirectionButtonComponent, SiTranslatePipe],
|
|
1644
|
+
args: [{ selector: 'si-day-selection', imports: [DatePipe, SiCalendarBodyComponent, SiCalendarDirectionButtonComponent, SiTranslatePipe], host: {
|
|
1601
1645
|
class: 'd-flex flex-column gap-6'
|
|
1602
1646
|
}, template: "<div class=\"header\">\n <si-calendar-direction-button\n direction=\"left\"\n [ariaLabel]=\"previousLabel() | translate\"\n [disabled]=\"isPreviousButtonDisabled()\"\n (clicked)=\"setMonthOffset(-1)\"\n />\n <div class=\"flex-fill\">\n <button\n type=\"button\"\n class=\"open-month-view flex-fill text-end px-4 btn btn-tertiary calendar-button\"\n (click)=\"emitViewChange('month')\"\n >\n {{ focusedDate() | date: 'MMMM' }}\n </button>\n <button\n type=\"button\"\n class=\"open-year-view flex-fill text-start px-4 btn btn-tertiary calendar-button\"\n (click)=\"emitViewChange('year')\"\n >\n {{ focusedDate() | date: 'yyyy' }}\n </button>\n </div>\n <si-calendar-direction-button\n direction=\"right\"\n [ariaLabel]=\"nextLabel() | translate\"\n [disabled]=\"isNextButtonDisabled()\"\n (clicked)=\"setMonthOffset(1)\"\n />\n</div>\n<div class=\"calendar-table\">\n <table class=\"px-9\" role=\"grid\">\n <thead class=\"si-calendar-table-header\">\n <tr>\n @if (!hideWeekNumbers()) {\n <th scope=\"col\" class=\"week-num\">\n <span class=\"visually-hidden\">{{ calendarWeekLabel() | translate }}</span>\n </th>\n }\n @for (day of days(); track $index) {\n <th scope=\"col\">\n <span class=\"si-hidden-xs si-hidden-sm\">{{ day }}</span>\n </th>\n }\n </tr>\n </thead>\n <tbody\n si-calendar-body\n rowLabelCssClasses=\"week-num\"\n [focusedDate]=\"focusedDate()\"\n [compareAdapter]=\"compareAdapter\"\n [startDate]=\"startDate()\"\n [endDate]=\"endDate()\"\n [enableRangeSelection]=\"isRangeSelection()\"\n [previewRange]=\"previewRange()\"\n [rows]=\"weeks()\"\n [rowLabels]=\"hideWeekNumbers() ? undefined : weekNumbers()\"\n [activeHover]=\"activeHover()\"\n (activeHoverChange)=\"onActiveHoverChange($event)\"\n (selectedValueChange)=\"emitSelectedValue($event)\"\n (focusedDateChange)=\"emitActiveDate($event!)\"\n (keydown)=\"calendarBodyKeyDown($event)\"\n >\n </tbody>\n </table>\n</div>\n<div class=\"footer ps-8 pe-8\">\n <button\n type=\"button\"\n class=\"today-button btn btn-tertiary flex-fill\"\n [disabled]=\"isTodayButtonDisabled()\"\n (click)=\"goToToday()\"\n >\n {{ today() | translate }}\n </button>\n</div>\n" }]
|
|
1603
1647
|
}], propDecorators: { hideWeekNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideWeekNumbers", required: false }] }], weekStartDay: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekStartDay", required: false }] }], focusedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedDate", required: true }] }, { type: i0.Output, args: ["focusedDateChange"] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], calendarWeekLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarWeekLabel", required: false }] }], activeMonthChange: [{ type: i0.Output, args: ["activeMonthChange"] }], viewChange: [{ type: i0.Output, args: ["viewChange"] }] } });
|
|
@@ -1616,11 +1660,13 @@ class SiMonthSelectionComponent extends SiInitialFocusComponent {
|
|
|
1616
1660
|
*
|
|
1617
1661
|
* @defaultValue []
|
|
1618
1662
|
*/
|
|
1619
|
-
months = input([],
|
|
1663
|
+
months = input([], /* @ts-ignore */
|
|
1664
|
+
...(ngDevMode ? [{ debugName: "months" }] : /* istanbul ignore next */ []));
|
|
1620
1665
|
/**
|
|
1621
1666
|
* The active date, the cell which will receive the focus.
|
|
1622
1667
|
*/
|
|
1623
|
-
focusedDate = model.required(
|
|
1668
|
+
focusedDate = model.required(/* @ts-ignore */
|
|
1669
|
+
...(ngDevMode ? [{ debugName: "focusedDate" }] : /* istanbul ignore next */ []));
|
|
1624
1670
|
/** Emits when the active focused date is changed to another month / year, typically during keyboard navigation. */
|
|
1625
1671
|
activeMonthChange = output();
|
|
1626
1672
|
/** Emits when the user requests a different to show a different view. */
|
|
@@ -1647,7 +1693,8 @@ class SiMonthSelectionComponent extends SiInitialFocusComponent {
|
|
|
1647
1693
|
const minDate = this.minDate();
|
|
1648
1694
|
const focusedDate = this.focusedDate();
|
|
1649
1695
|
return minDate && (isSameYear(focusedDate, minDate) || isAfterYear(minDate, focusedDate));
|
|
1650
|
-
},
|
|
1696
|
+
}, /* @ts-ignore */
|
|
1697
|
+
...(ngDevMode ? [{ debugName: "isPreviousButtonDisabled" }] : /* istanbul ignore next */ []));
|
|
1651
1698
|
/**
|
|
1652
1699
|
* Indicate the next button shall be disabled.
|
|
1653
1700
|
* This happens when the focusedDate is equal or after the maxDate.
|
|
@@ -1656,7 +1703,8 @@ class SiMonthSelectionComponent extends SiInitialFocusComponent {
|
|
|
1656
1703
|
const maxDate = this.maxDate();
|
|
1657
1704
|
const focusedDate = this.focusedDate();
|
|
1658
1705
|
return maxDate && (isSameYear(focusedDate, maxDate) || isAfterYear(focusedDate, maxDate));
|
|
1659
|
-
},
|
|
1706
|
+
}, /* @ts-ignore */
|
|
1707
|
+
...(ngDevMode ? [{ debugName: "isNextButtonDisabled" }] : /* istanbul ignore next */ []));
|
|
1660
1708
|
ngOnChanges(changes) {
|
|
1661
1709
|
if (changes.maxDate ||
|
|
1662
1710
|
changes.minDate ||
|
|
@@ -1765,12 +1813,12 @@ class SiMonthSelectionComponent extends SiInitialFocusComponent {
|
|
|
1765
1813
|
}
|
|
1766
1814
|
this.monthCells.push(row);
|
|
1767
1815
|
}
|
|
1768
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1769
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1816
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiMonthSelectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1817
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: SiMonthSelectionComponent, isStandalone: true, selector: "si-month-selection", inputs: { months: { classPropertyName: "months", publicName: "months", isSignal: true, isRequired: false, transformFunction: null }, focusedDate: { classPropertyName: "focusedDate", publicName: "focusedDate", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { focusedDate: "focusedDateChange", activeMonthChange: "activeMonthChange", viewChange: "viewChange" }, host: { listeners: { "keydown.Escape": "triggerEsc($event)" }, classAttribute: "d-flex flex-column gap-6" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"header\">\n <si-calendar-direction-button\n direction=\"left\"\n [ariaLabel]=\"previousLabel()\"\n [disabled]=\"isPreviousButtonDisabled()\"\n (clicked)=\"setYearOffset(-1)\"\n />\n <button\n type=\"button\"\n class=\"open-year-view flex-fill mx-4 btn btn-tertiary calendar-button\"\n (click)=\"emitViewChange()\"\n >\n {{ focusedDate() | date: 'yyyy' }}\n </button>\n <si-calendar-direction-button\n direction=\"right\"\n [ariaLabel]=\"nextLabel()\"\n [disabled]=\"isNextButtonDisabled()\"\n (clicked)=\"setYearOffset(1)\"\n />\n</div>\n<div class=\"calendar-table\">\n <table class=\"px-9\" role=\"grid\">\n <tbody\n si-calendar-body\n [focusedDate]=\"focusedDate()\"\n [compareAdapter]=\"compareAdapter\"\n [startDate]=\"startDate()\"\n [endDate]=\"endDate()\"\n [enableRangeSelection]=\"isRangeSelection()\"\n [previewRange]=\"previewRange()\"\n [rows]=\"monthCells\"\n [activeHover]=\"activeHover()\"\n (activeHoverChange)=\"onActiveHoverChange($event)\"\n (selectedValueChange)=\"emitSelectedValue($event)\"\n (focusedDateChange)=\"emitFocusedDate($event)\"\n (keydown)=\"calendarBodyKeyDown($event)\"\n >\n </tbody>\n </table>\n</div>\n<div class=\"footer\"></div>\n", dependencies: [{ kind: "component", type: SiCalendarDirectionButtonComponent, selector: "si-calendar-direction-button", inputs: ["ariaLabel", "disabled", "direction"], outputs: ["clicked"] }, { kind: "component", type: SiCalendarBodyComponent, selector: "[si-calendar-body]", inputs: ["focusedDate", "startDate", "endDate", "rows", "rowLabels", "rowLabelCssClasses", "enableRangeSelection", "previewRange", "activeHover", "compareAdapter"], outputs: ["focusedDateChange", "activeHoverChange", "selectedValueChange"], exportAs: ["siCalendarBody"] }, { kind: "pipe", type: DatePipe, name: "date" }] });
|
|
1770
1818
|
}
|
|
1771
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1819
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiMonthSelectionComponent, decorators: [{
|
|
1772
1820
|
type: Component,
|
|
1773
|
-
args: [{ selector: 'si-month-selection', imports: [SiCalendarDirectionButtonComponent, SiCalendarBodyComponent, DatePipe],
|
|
1821
|
+
args: [{ selector: 'si-month-selection', imports: [SiCalendarDirectionButtonComponent, SiCalendarBodyComponent, DatePipe], host: {
|
|
1774
1822
|
class: 'd-flex flex-column gap-6'
|
|
1775
1823
|
}, template: "<div class=\"header\">\n <si-calendar-direction-button\n direction=\"left\"\n [ariaLabel]=\"previousLabel()\"\n [disabled]=\"isPreviousButtonDisabled()\"\n (clicked)=\"setYearOffset(-1)\"\n />\n <button\n type=\"button\"\n class=\"open-year-view flex-fill mx-4 btn btn-tertiary calendar-button\"\n (click)=\"emitViewChange()\"\n >\n {{ focusedDate() | date: 'yyyy' }}\n </button>\n <si-calendar-direction-button\n direction=\"right\"\n [ariaLabel]=\"nextLabel()\"\n [disabled]=\"isNextButtonDisabled()\"\n (clicked)=\"setYearOffset(1)\"\n />\n</div>\n<div class=\"calendar-table\">\n <table class=\"px-9\" role=\"grid\">\n <tbody\n si-calendar-body\n [focusedDate]=\"focusedDate()\"\n [compareAdapter]=\"compareAdapter\"\n [startDate]=\"startDate()\"\n [endDate]=\"endDate()\"\n [enableRangeSelection]=\"isRangeSelection()\"\n [previewRange]=\"previewRange()\"\n [rows]=\"monthCells\"\n [activeHover]=\"activeHover()\"\n (activeHoverChange)=\"onActiveHoverChange($event)\"\n (selectedValueChange)=\"emitSelectedValue($event)\"\n (focusedDateChange)=\"emitFocusedDate($event)\"\n (keydown)=\"calendarBodyKeyDown($event)\"\n >\n </tbody>\n </table>\n</div>\n<div class=\"footer\"></div>\n" }]
|
|
1776
1824
|
}], propDecorators: { months: [{ type: i0.Input, args: [{ isSignal: true, alias: "months", required: false }] }], focusedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedDate", required: true }] }, { type: i0.Output, args: ["focusedDateChange"] }], activeMonthChange: [{ type: i0.Output, args: ["activeMonthChange"] }], viewChange: [{ type: i0.Output, args: ["viewChange"] }], triggerEsc: [{
|
|
@@ -1790,7 +1838,8 @@ class SiYearSelectionComponent extends SiInitialFocusComponent {
|
|
|
1790
1838
|
/**
|
|
1791
1839
|
* The active date, the cell which will receive the focus.
|
|
1792
1840
|
*/
|
|
1793
|
-
focusedDate = model.required(
|
|
1841
|
+
focusedDate = model.required(/* @ts-ignore */
|
|
1842
|
+
...(ngDevMode ? [{ debugName: "focusedDate" }] : /* istanbul ignore next */ []));
|
|
1794
1843
|
/** Emits when the active focused date changed to another month / year, typically during keyboard navigation. */
|
|
1795
1844
|
yearRangeChange = output();
|
|
1796
1845
|
/** Listen Escape event to switch view back */
|
|
@@ -1804,9 +1853,11 @@ class SiYearSelectionComponent extends SiInitialFocusComponent {
|
|
|
1804
1853
|
/** The number of years which shall be displayed, this number should be even and dividable by columnCount */
|
|
1805
1854
|
yearsToDisplay = 18;
|
|
1806
1855
|
/** Lower windows bound for displayed year range */
|
|
1807
|
-
fromYear = signal(undefined,
|
|
1856
|
+
fromYear = signal(undefined, /* @ts-ignore */
|
|
1857
|
+
...(ngDevMode ? [{ debugName: "fromYear" }] : /* istanbul ignore next */ []));
|
|
1808
1858
|
/** Upper windows bound for displayed year range */
|
|
1809
|
-
toYear = signal(undefined,
|
|
1859
|
+
toYear = signal(undefined, /* @ts-ignore */
|
|
1860
|
+
...(ngDevMode ? [{ debugName: "toYear" }] : /* istanbul ignore next */ []));
|
|
1810
1861
|
/**
|
|
1811
1862
|
* The current visible list of calendar years.
|
|
1812
1863
|
* Every time the focusedDate changes to another year the list will be rebuilt.
|
|
@@ -1823,7 +1874,8 @@ class SiYearSelectionComponent extends SiInitialFocusComponent {
|
|
|
1823
1874
|
const min = minDate(minDate$1, minMonth);
|
|
1824
1875
|
return (this.compareAdapter.isEqual(this.fromYear(), min) ||
|
|
1825
1876
|
this.compareAdapter.isAfter(min, this.fromYear()));
|
|
1826
|
-
},
|
|
1877
|
+
}, /* @ts-ignore */
|
|
1878
|
+
...(ngDevMode ? [{ debugName: "isPreviousButtonDisabled" }] : /* istanbul ignore next */ []));
|
|
1827
1879
|
/** Is next button disabled based on the maxDate */
|
|
1828
1880
|
isNextButtonDisabled = computed(() => {
|
|
1829
1881
|
const maxDate = this.maxDate();
|
|
@@ -1832,7 +1884,8 @@ class SiYearSelectionComponent extends SiInitialFocusComponent {
|
|
|
1832
1884
|
}
|
|
1833
1885
|
return (this.compareAdapter.isEqual(this.toYear(), maxDate) ||
|
|
1834
1886
|
this.compareAdapter.isAfter(this.toYear(), maxDate));
|
|
1835
|
-
},
|
|
1887
|
+
}, /* @ts-ignore */
|
|
1888
|
+
...(ngDevMode ? [{ debugName: "isNextButtonDisabled" }] : /* istanbul ignore next */ []));
|
|
1836
1889
|
ngOnChanges(changes) {
|
|
1837
1890
|
if (changes.startDate || changes.focusedDate || changes.maxDate || changes.minDate) {
|
|
1838
1891
|
this.initView();
|
|
@@ -1976,12 +2029,12 @@ class SiYearSelectionComponent extends SiInitialFocusComponent {
|
|
|
1976
2029
|
this.initView();
|
|
1977
2030
|
}
|
|
1978
2031
|
}
|
|
1979
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1980
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
2032
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiYearSelectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2033
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: SiYearSelectionComponent, isStandalone: true, selector: "si-year-selection", inputs: { focusedDate: { classPropertyName: "focusedDate", publicName: "focusedDate", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { focusedDate: "focusedDateChange", yearRangeChange: "yearRangeChange" }, host: { listeners: { "keydown.Escape": "triggerEsc($event)" }, classAttribute: "d-flex flex-column gap-6" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"header\">\n <si-calendar-direction-button\n direction=\"left\"\n [ariaLabel]=\"previousLabel()\"\n [disabled]=\"isPreviousButtonDisabled()\"\n (clicked)=\"changeVisibleYearRange(-1)\"\n />\n <span class=\"year-range-label flex-fill mx-4 si-h4 text-secondary calendar-button\">\n {{ fromYear() | date: 'yyyy' }} - {{ toYear() | date: 'yyyy' }}\n </span>\n <si-calendar-direction-button\n direction=\"right\"\n [ariaLabel]=\"nextLabel()\"\n [disabled]=\"isNextButtonDisabled()\"\n (clicked)=\"changeVisibleYearRange(1)\"\n />\n</div>\n<div class=\"calendar-table\">\n <table class=\"px-9\" role=\"grid\">\n <tbody\n si-calendar-body\n [focusedDate]=\"focusedDate()\"\n [compareAdapter]=\"compareAdapter\"\n [startDate]=\"startDate()\"\n [endDate]=\"endDate()\"\n [enableRangeSelection]=\"isRangeSelection()\"\n [previewRange]=\"previewRange()\"\n [rows]=\"yearCells\"\n (selectedValueChange)=\"emitSelectedValue($event)\"\n (keydown)=\"calendarBodyKeyDown($event)\"\n >\n </tbody>\n </table>\n</div>\n<div class=\"footer\"></div>\n", dependencies: [{ kind: "component", type: SiCalendarDirectionButtonComponent, selector: "si-calendar-direction-button", inputs: ["ariaLabel", "disabled", "direction"], outputs: ["clicked"] }, { kind: "component", type: SiCalendarBodyComponent, selector: "[si-calendar-body]", inputs: ["focusedDate", "startDate", "endDate", "rows", "rowLabels", "rowLabelCssClasses", "enableRangeSelection", "previewRange", "activeHover", "compareAdapter"], outputs: ["focusedDateChange", "activeHoverChange", "selectedValueChange"], exportAs: ["siCalendarBody"] }, { kind: "pipe", type: DatePipe, name: "date" }] });
|
|
1981
2034
|
}
|
|
1982
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2035
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiYearSelectionComponent, decorators: [{
|
|
1983
2036
|
type: Component,
|
|
1984
|
-
args: [{ selector: 'si-year-selection', imports: [SiCalendarDirectionButtonComponent, SiCalendarBodyComponent, DatePipe],
|
|
2037
|
+
args: [{ selector: 'si-year-selection', imports: [SiCalendarDirectionButtonComponent, SiCalendarBodyComponent, DatePipe], host: {
|
|
1985
2038
|
class: 'd-flex flex-column gap-6'
|
|
1986
2039
|
}, template: "<div class=\"header\">\n <si-calendar-direction-button\n direction=\"left\"\n [ariaLabel]=\"previousLabel()\"\n [disabled]=\"isPreviousButtonDisabled()\"\n (clicked)=\"changeVisibleYearRange(-1)\"\n />\n <span class=\"year-range-label flex-fill mx-4 si-h4 text-secondary calendar-button\">\n {{ fromYear() | date: 'yyyy' }} - {{ toYear() | date: 'yyyy' }}\n </span>\n <si-calendar-direction-button\n direction=\"right\"\n [ariaLabel]=\"nextLabel()\"\n [disabled]=\"isNextButtonDisabled()\"\n (clicked)=\"changeVisibleYearRange(1)\"\n />\n</div>\n<div class=\"calendar-table\">\n <table class=\"px-9\" role=\"grid\">\n <tbody\n si-calendar-body\n [focusedDate]=\"focusedDate()\"\n [compareAdapter]=\"compareAdapter\"\n [startDate]=\"startDate()\"\n [endDate]=\"endDate()\"\n [enableRangeSelection]=\"isRangeSelection()\"\n [previewRange]=\"previewRange()\"\n [rows]=\"yearCells\"\n (selectedValueChange)=\"emitSelectedValue($event)\"\n (keydown)=\"calendarBodyKeyDown($event)\"\n >\n </tbody>\n </table>\n</div>\n<div class=\"footer\"></div>\n" }]
|
|
1987
2040
|
}], propDecorators: { focusedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedDate", required: true }] }, { type: i0.Output, args: ["focusedDateChange"] }], yearRangeChange: [{ type: i0.Output, args: ["yearRangeChange"] }], triggerEsc: [{
|
|
@@ -2004,7 +2057,8 @@ class SiTimepickerComponent {
|
|
|
2004
2057
|
* `__si-timepicker-${SiTimepickerComponent.idCounter++}`
|
|
2005
2058
|
* ```
|
|
2006
2059
|
*/
|
|
2007
|
-
id = input(`__si-timepicker-${SiTimepickerComponent.idCounter++}`,
|
|
2060
|
+
id = input(`__si-timepicker-${SiTimepickerComponent.idCounter++}`, /* @ts-ignore */
|
|
2061
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
2008
2062
|
labelledby = inject(new HostAttributeToken('aria-labelledby'), {
|
|
2009
2063
|
optional: true
|
|
2010
2064
|
}) ?? `${this.id()}-label`;
|
|
@@ -2014,108 +2068,127 @@ class SiTimepickerComponent {
|
|
|
2014
2068
|
* @defaultValue false
|
|
2015
2069
|
*/
|
|
2016
2070
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
2017
|
-
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : {}), alias: 'disabled' });
|
|
2071
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled' });
|
|
2018
2072
|
/**
|
|
2019
2073
|
* @defaultValue 'hh'
|
|
2020
2074
|
*/
|
|
2021
|
-
hoursLabel = input('hh',
|
|
2075
|
+
hoursLabel = input('hh', /* @ts-ignore */
|
|
2076
|
+
...(ngDevMode ? [{ debugName: "hoursLabel" }] : /* istanbul ignore next */ []));
|
|
2022
2077
|
/**
|
|
2023
2078
|
* @defaultValue 'mm'
|
|
2024
2079
|
*/
|
|
2025
|
-
minutesLabel = input('mm',
|
|
2080
|
+
minutesLabel = input('mm', /* @ts-ignore */
|
|
2081
|
+
...(ngDevMode ? [{ debugName: "minutesLabel" }] : /* istanbul ignore next */ []));
|
|
2026
2082
|
/**
|
|
2027
2083
|
* @defaultValue 'ss'
|
|
2028
2084
|
*/
|
|
2029
|
-
secondsLabel = input('ss',
|
|
2085
|
+
secondsLabel = input('ss', /* @ts-ignore */
|
|
2086
|
+
...(ngDevMode ? [{ debugName: "secondsLabel" }] : /* istanbul ignore next */ []));
|
|
2030
2087
|
/**
|
|
2031
2088
|
* @defaultValue 'ms'
|
|
2032
2089
|
*/
|
|
2033
|
-
millisecondsLabel = input('ms',
|
|
2090
|
+
millisecondsLabel = input('ms', /* @ts-ignore */
|
|
2091
|
+
...(ngDevMode ? [{ debugName: "millisecondsLabel" }] : /* istanbul ignore next */ []));
|
|
2034
2092
|
/**
|
|
2035
2093
|
* Hide the labels of the input fields.
|
|
2036
2094
|
* @defaultValue false
|
|
2037
2095
|
*/
|
|
2038
|
-
hideLabels = input(false, { ...(ngDevMode ? { debugName: "hideLabels" } : {}), transform: booleanAttribute });
|
|
2096
|
+
hideLabels = input(false, { ...(ngDevMode ? { debugName: "hideLabels" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2039
2097
|
/**
|
|
2040
2098
|
* @defaultValue
|
|
2041
2099
|
* ```
|
|
2042
2100
|
* t(() => $localize`:@@SI_DATEPICKER.HOURS:Hours`)
|
|
2043
2101
|
* ```
|
|
2044
2102
|
*/
|
|
2045
|
-
hoursAriaLabel = input(t(() => $localize `:@@SI_DATEPICKER.HOURS:Hours`),
|
|
2103
|
+
hoursAriaLabel = input(t(() => $localize `:@@SI_DATEPICKER.HOURS:Hours`), /* @ts-ignore */
|
|
2104
|
+
...(ngDevMode ? [{ debugName: "hoursAriaLabel" }] : /* istanbul ignore next */ []));
|
|
2046
2105
|
/**
|
|
2047
2106
|
* @defaultValue
|
|
2048
2107
|
* ```
|
|
2049
2108
|
* t(() => $localize`:@@SI_DATEPICKER.MINUTES:Minutes`)
|
|
2050
2109
|
* ```
|
|
2051
2110
|
*/
|
|
2052
|
-
minutesAriaLabel = input(t(() => $localize `:@@SI_DATEPICKER.MINUTES:Minutes`),
|
|
2111
|
+
minutesAriaLabel = input(t(() => $localize `:@@SI_DATEPICKER.MINUTES:Minutes`), /* @ts-ignore */
|
|
2112
|
+
...(ngDevMode ? [{ debugName: "minutesAriaLabel" }] : /* istanbul ignore next */ []));
|
|
2053
2113
|
/**
|
|
2054
2114
|
* @defaultValue
|
|
2055
2115
|
* ```
|
|
2056
2116
|
* t(() => $localize`:@@SI_DATEPICKER.SECONDS:Seconds`)
|
|
2057
2117
|
* ```
|
|
2058
2118
|
*/
|
|
2059
|
-
secondsAriaLabel = input(t(() => $localize `:@@SI_DATEPICKER.SECONDS:Seconds`),
|
|
2119
|
+
secondsAriaLabel = input(t(() => $localize `:@@SI_DATEPICKER.SECONDS:Seconds`), /* @ts-ignore */
|
|
2120
|
+
...(ngDevMode ? [{ debugName: "secondsAriaLabel" }] : /* istanbul ignore next */ []));
|
|
2060
2121
|
/**
|
|
2061
2122
|
* @defaultValue
|
|
2062
2123
|
* ```
|
|
2063
2124
|
* t(() => $localize`:@@SI_DATEPICKER.MILLISECONDS:Milliseconds`)
|
|
2064
2125
|
* ```
|
|
2065
2126
|
*/
|
|
2066
|
-
millisecondsAriaLabel = input(t(() => $localize `:@@SI_DATEPICKER.MILLISECONDS:Milliseconds`),
|
|
2127
|
+
millisecondsAriaLabel = input(t(() => $localize `:@@SI_DATEPICKER.MILLISECONDS:Milliseconds`), /* @ts-ignore */
|
|
2128
|
+
...(ngDevMode ? [{ debugName: "millisecondsAriaLabel" }] : /* istanbul ignore next */ []));
|
|
2067
2129
|
/**
|
|
2068
2130
|
* @defaultValue 'hh'
|
|
2069
2131
|
*/
|
|
2070
|
-
hoursPlaceholder = input('hh',
|
|
2132
|
+
hoursPlaceholder = input('hh', /* @ts-ignore */
|
|
2133
|
+
...(ngDevMode ? [{ debugName: "hoursPlaceholder" }] : /* istanbul ignore next */ []));
|
|
2071
2134
|
/**
|
|
2072
2135
|
* @defaultValue 'mm'
|
|
2073
2136
|
*/
|
|
2074
|
-
minutesPlaceholder = input('mm',
|
|
2137
|
+
minutesPlaceholder = input('mm', /* @ts-ignore */
|
|
2138
|
+
...(ngDevMode ? [{ debugName: "minutesPlaceholder" }] : /* istanbul ignore next */ []));
|
|
2075
2139
|
/**
|
|
2076
2140
|
* @defaultValue 'ss'
|
|
2077
2141
|
*/
|
|
2078
|
-
secondsPlaceholder = input('ss',
|
|
2142
|
+
secondsPlaceholder = input('ss', /* @ts-ignore */
|
|
2143
|
+
...(ngDevMode ? [{ debugName: "secondsPlaceholder" }] : /* istanbul ignore next */ []));
|
|
2079
2144
|
/**
|
|
2080
2145
|
* @defaultValue 'ms'
|
|
2081
2146
|
*/
|
|
2082
|
-
millisecondsPlaceholder = input('ms',
|
|
2083
|
-
|
|
2147
|
+
millisecondsPlaceholder = input('ms', /* @ts-ignore */
|
|
2148
|
+
...(ngDevMode ? [{ debugName: "millisecondsPlaceholder" }] : /* istanbul ignore next */ []));
|
|
2149
|
+
meridians = input(/* @ts-ignore */
|
|
2150
|
+
...(ngDevMode ? [undefined, { debugName: "meridians" }] : /* istanbul ignore next */ []));
|
|
2084
2151
|
/**
|
|
2085
2152
|
* @defaultValue 'am/pm'
|
|
2086
2153
|
*/
|
|
2087
|
-
meridiansLabel = input('am/pm',
|
|
2154
|
+
meridiansLabel = input('am/pm', /* @ts-ignore */
|
|
2155
|
+
...(ngDevMode ? [{ debugName: "meridiansLabel" }] : /* istanbul ignore next */ []));
|
|
2088
2156
|
/**
|
|
2089
2157
|
* @defaultValue
|
|
2090
2158
|
* ```
|
|
2091
2159
|
* t(() => $localize`:@@SI_DATEPICKER.PERIOD:Period`)
|
|
2092
2160
|
* ```
|
|
2093
2161
|
*/
|
|
2094
|
-
meridiansAriaLabel = input(t(() => $localize `:@@SI_DATEPICKER.PERIOD:Period`),
|
|
2162
|
+
meridiansAriaLabel = input(t(() => $localize `:@@SI_DATEPICKER.PERIOD:Period`), /* @ts-ignore */
|
|
2163
|
+
...(ngDevMode ? [{ debugName: "meridiansAriaLabel" }] : /* istanbul ignore next */ []));
|
|
2095
2164
|
/** @defaultValue true */
|
|
2096
|
-
showMinutes = input(true, { ...(ngDevMode ? { debugName: "showMinutes" } : {}), transform: booleanAttribute });
|
|
2165
|
+
showMinutes = input(true, { ...(ngDevMode ? { debugName: "showMinutes" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2097
2166
|
/** @defaultValue false */
|
|
2098
|
-
showSeconds = input(false, { ...(ngDevMode ? { debugName: "showSeconds" } : {}), transform: booleanAttribute });
|
|
2167
|
+
showSeconds = input(false, { ...(ngDevMode ? { debugName: "showSeconds" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2099
2168
|
/** @defaultValue false */
|
|
2100
|
-
showMilliseconds = input(false, { ...(ngDevMode ? { debugName: "showMilliseconds" } : {}), transform: booleanAttribute });
|
|
2169
|
+
showMilliseconds = input(false, { ...(ngDevMode ? { debugName: "showMilliseconds" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2101
2170
|
/**
|
|
2102
2171
|
* Show time in 12-hour period including the select to toggle between AM/PM.
|
|
2103
2172
|
*/
|
|
2104
|
-
showMeridian = input(
|
|
2173
|
+
showMeridian = input(/* @ts-ignore */
|
|
2174
|
+
...(ngDevMode ? [undefined, { debugName: "showMeridian" }] : /* istanbul ignore next */ []));
|
|
2105
2175
|
/**
|
|
2106
2176
|
* A minimum time limit. The date part of the date object will be ignored.
|
|
2107
2177
|
*/
|
|
2108
|
-
min = input(
|
|
2178
|
+
min = input(/* @ts-ignore */
|
|
2179
|
+
...(ngDevMode ? [undefined, { debugName: "min" }] : /* istanbul ignore next */ []));
|
|
2109
2180
|
/**
|
|
2110
2181
|
* A maximum time limit. The date part of the date object will be ignored.
|
|
2111
2182
|
*/
|
|
2112
|
-
max = input(
|
|
2183
|
+
max = input(/* @ts-ignore */
|
|
2184
|
+
...(ngDevMode ? [undefined, { debugName: "max" }] : /* istanbul ignore next */ []));
|
|
2113
2185
|
/** @defaultValue false */
|
|
2114
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
2186
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2115
2187
|
isValid = output();
|
|
2116
2188
|
meridianChange = output();
|
|
2117
2189
|
inputCompleted = output();
|
|
2118
|
-
inputParts = viewChildren('inputPart',
|
|
2190
|
+
inputParts = viewChildren('inputPart', /* @ts-ignore */
|
|
2191
|
+
...(ngDevMode ? [{ debugName: "inputParts" }] : /* istanbul ignore next */ []));
|
|
2119
2192
|
/**
|
|
2120
2193
|
* This ID will be bound to the `aria-describedby` attribute of the timepicker.
|
|
2121
2194
|
* Use this to reference the element containing the error message(s) for the timepicker.
|
|
@@ -2126,17 +2199,22 @@ class SiTimepickerComponent {
|
|
|
2126
2199
|
* `${this.id()}-errormessage`
|
|
2127
2200
|
* ```
|
|
2128
2201
|
*/
|
|
2129
|
-
errormessageId = input(`${this.id()}-errormessage`,
|
|
2202
|
+
errormessageId = input(`${this.id()}-errormessage`, /* @ts-ignore */
|
|
2203
|
+
...(ngDevMode ? [{ debugName: "errormessageId" }] : /* istanbul ignore next */ []));
|
|
2130
2204
|
onChange = () => { };
|
|
2131
2205
|
onTouched = () => { };
|
|
2132
2206
|
// The following are the time values for the ui.
|
|
2133
2207
|
periods = computed(() => {
|
|
2134
2208
|
const meridians = this.meridians();
|
|
2135
2209
|
return meridians?.length ? meridians : this.periodDefaults;
|
|
2136
|
-
},
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2210
|
+
}, /* @ts-ignore */
|
|
2211
|
+
...(ngDevMode ? [{ debugName: "periods" }] : /* istanbul ignore next */ []));
|
|
2212
|
+
use12HourClock = computed(() => this.showMeridian() ?? getLocaleTimeFormat(this.locale, FormatWidth.Full).includes('a'), /* @ts-ignore */
|
|
2213
|
+
...(ngDevMode ? [{ debugName: "use12HourClock" }] : /* istanbul ignore next */ []));
|
|
2214
|
+
disabled = computed(() => this.disabledInput() || this.disabledNgControl(), /* @ts-ignore */
|
|
2215
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2216
|
+
meridian = signal('', /* @ts-ignore */
|
|
2217
|
+
...(ngDevMode ? [{ debugName: "meridian" }] : /* istanbul ignore next */ []));
|
|
2140
2218
|
units = computed(() => {
|
|
2141
2219
|
const config = [
|
|
2142
2220
|
{
|
|
@@ -2180,7 +2258,8 @@ class SiTimepickerComponent {
|
|
|
2180
2258
|
});
|
|
2181
2259
|
}
|
|
2182
2260
|
return config;
|
|
2183
|
-
},
|
|
2261
|
+
}, /* @ts-ignore */
|
|
2262
|
+
...(ngDevMode ? [{ debugName: "units" }] : /* istanbul ignore next */ []));
|
|
2184
2263
|
/* Input fields state */
|
|
2185
2264
|
timeControls = this.formBuilder.group({
|
|
2186
2265
|
hours: this.formBuilder.nonNullable.control('', [this.validateTime('hours')]),
|
|
@@ -2199,7 +2278,8 @@ class SiTimepickerComponent {
|
|
|
2199
2278
|
}
|
|
2200
2279
|
return false;
|
|
2201
2280
|
}
|
|
2202
|
-
disabledNgControl = signal(false,
|
|
2281
|
+
disabledNgControl = signal(false, /* @ts-ignore */
|
|
2282
|
+
...(ngDevMode ? [{ debugName: "disabledNgControl" }] : /* istanbul ignore next */ []));
|
|
2203
2283
|
/**
|
|
2204
2284
|
* Holds the time as date object that is presented by this control.
|
|
2205
2285
|
*/
|
|
@@ -2552,8 +2632,8 @@ class SiTimepickerComponent {
|
|
|
2552
2632
|
return null;
|
|
2553
2633
|
};
|
|
2554
2634
|
}
|
|
2555
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2556
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2635
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiTimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2636
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiTimepickerComponent, isStandalone: true, selector: "si-timepicker", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hoursLabel: { classPropertyName: "hoursLabel", publicName: "hoursLabel", isSignal: true, isRequired: false, transformFunction: null }, minutesLabel: { classPropertyName: "minutesLabel", publicName: "minutesLabel", isSignal: true, isRequired: false, transformFunction: null }, secondsLabel: { classPropertyName: "secondsLabel", publicName: "secondsLabel", isSignal: true, isRequired: false, transformFunction: null }, millisecondsLabel: { classPropertyName: "millisecondsLabel", publicName: "millisecondsLabel", isSignal: true, isRequired: false, transformFunction: null }, hideLabels: { classPropertyName: "hideLabels", publicName: "hideLabels", isSignal: true, isRequired: false, transformFunction: null }, hoursAriaLabel: { classPropertyName: "hoursAriaLabel", publicName: "hoursAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, minutesAriaLabel: { classPropertyName: "minutesAriaLabel", publicName: "minutesAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, secondsAriaLabel: { classPropertyName: "secondsAriaLabel", publicName: "secondsAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, millisecondsAriaLabel: { classPropertyName: "millisecondsAriaLabel", publicName: "millisecondsAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, hoursPlaceholder: { classPropertyName: "hoursPlaceholder", publicName: "hoursPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, minutesPlaceholder: { classPropertyName: "minutesPlaceholder", publicName: "minutesPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, secondsPlaceholder: { classPropertyName: "secondsPlaceholder", publicName: "secondsPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, millisecondsPlaceholder: { classPropertyName: "millisecondsPlaceholder", publicName: "millisecondsPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, meridians: { classPropertyName: "meridians", publicName: "meridians", isSignal: true, isRequired: false, transformFunction: null }, meridiansLabel: { classPropertyName: "meridiansLabel", publicName: "meridiansLabel", isSignal: true, isRequired: false, transformFunction: null }, meridiansAriaLabel: { classPropertyName: "meridiansAriaLabel", publicName: "meridiansAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, showMinutes: { classPropertyName: "showMinutes", publicName: "showMinutes", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, showMilliseconds: { classPropertyName: "showMilliseconds", publicName: "showMilliseconds", isSignal: true, isRequired: false, transformFunction: null }, showMeridian: { classPropertyName: "showMeridian", publicName: "showMeridian", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, errormessageId: { classPropertyName: "errormessageId", publicName: "errormessageId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isValid: "isValid", meridianChange: "meridianChange", inputCompleted: "inputCompleted" }, host: { attributes: { "role": "group" }, properties: { "class.readonly": "readonly()", "attr.aria-labelledby": "labelledby" }, classAttribute: "form-custom-control" }, providers: [
|
|
2557
2637
|
{
|
|
2558
2638
|
provide: NG_VALUE_ACCESSOR,
|
|
2559
2639
|
useExisting: SiTimepickerComponent,
|
|
@@ -2568,9 +2648,9 @@ class SiTimepickerComponent {
|
|
|
2568
2648
|
provide: SI_FORM_ITEM_CONTROL,
|
|
2569
2649
|
useExisting: SiTimepickerComponent
|
|
2570
2650
|
}
|
|
2571
|
-
], viewQueries: [{ propertyName: "inputParts", predicate: ["inputPart"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"d-flex flex-row flex-wrap\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"focusChange($event)\"\n>\n @for (config of units(); track $index) {\n @if (!$first) {\n <ng-container *ngTemplateOutlet=\"separator; context: { separator: config.separator }\" />\n }\n <label>\n @if (!hideLabels()) {\n <span class=\"form-label\">{{ (config.label | translate) || ' ' }}</span>\n }\n <input\n #inputPart\n autocomplete=\"off\"\n class=\"form-control hide-feedback-icon\"\n type=\"text\"\n inputmode=\"numeric\"\n [attr.aria-label]=\"config.ariaLabel | translate\"\n [attr.aria-describedby]=\"errormessageId()\"\n [attr.maxlength]=\"config.maxLength\"\n [formControl]=\"timeControls.controls[config.name]\"\n [name]=\"config.name\"\n [placeholder]=\"config.placeholder\"\n [readonly]=\"readonly()\"\n (blur)=\"updateField(config.name, toHtmlInputElement($event.target).value)\"\n (keydown)=\"handleKeyPressEvent($event)\"\n />\n </label>\n }\n @if (use12HourClock()) {\n <label class=\"ms-2\">\n @if (!hideLabels()) {\n <span class=\"form-label\">{{ (meridiansLabel() | translate) || ' ' }}</span>\n }\n <select\n #inputPart\n class=\"form-control\"\n [attr.aria-label]=\"meridiansAriaLabel() | translate\"\n [attr.aria-describedby]=\"errormessageId()\"\n [class.readonly]=\"readonly()\"\n [disabled]=\"disabled()\"\n (change)=\"toggleMeridian()\"\n (keydown)=\"handleKeyPressEvent($event)\"\n >\n <option value=\"am\" [selected]=\"meridian() === 'am'\">{{ periods()[0] }}</option>\n <option value=\"pm\" [selected]=\"meridian() === 'pm'\">{{ periods()[1] }}</option>\n </select>\n </label>\n }\n</div>\n\n<ng-template #separator let-separator=\"separator\">\n <div class=\"align-self-end pb-3 px-1\" aria-hidden=\"true\">{{ separator ? separator : ':' }}</div>\n</ng-template>\n", styles: [":host{display:block}:host.ng-touched.ng-invalid:not(:has(.ng-touched.ng-invalid)) .form-control{--border-color: var(--element-status-danger)}:host input{inline-size:calc(3ch + 16px)}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }]
|
|
2651
|
+
], viewQueries: [{ propertyName: "inputParts", predicate: ["inputPart"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"d-flex flex-row flex-wrap\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"focusChange($event)\"\n>\n @for (config of units(); track $index) {\n @if (!$first) {\n <ng-container *ngTemplateOutlet=\"separator; context: { separator: config.separator }\" />\n }\n <label>\n @if (!hideLabels()) {\n <span class=\"form-label\">{{ (config.label | translate) || ' ' }}</span>\n }\n <input\n #inputPart\n autocomplete=\"off\"\n class=\"form-control hide-feedback-icon\"\n type=\"text\"\n inputmode=\"numeric\"\n [attr.aria-label]=\"config.ariaLabel | translate\"\n [attr.aria-describedby]=\"errormessageId()\"\n [attr.maxlength]=\"config.maxLength\"\n [formControl]=\"timeControls.controls[config.name]\"\n [name]=\"config.name\"\n [placeholder]=\"config.placeholder\"\n [readonly]=\"readonly()\"\n (blur)=\"updateField(config.name, toHtmlInputElement($event.target).value)\"\n (keydown)=\"handleKeyPressEvent($event)\"\n />\n </label>\n }\n @if (use12HourClock()) {\n <label class=\"ms-2\">\n @if (!hideLabels()) {\n <span class=\"form-label\">{{ (meridiansLabel() | translate) || ' ' }}</span>\n }\n <select\n #inputPart\n class=\"form-control\"\n [attr.aria-label]=\"meridiansAriaLabel() | translate\"\n [attr.aria-describedby]=\"errormessageId()\"\n [class.readonly]=\"readonly()\"\n [disabled]=\"disabled()\"\n (change)=\"toggleMeridian()\"\n (keydown)=\"handleKeyPressEvent($event)\"\n >\n <option value=\"am\" [selected]=\"meridian() === 'am'\">{{ periods()[0] }}</option>\n <option value=\"pm\" [selected]=\"meridian() === 'pm'\">{{ periods()[1] }}</option>\n </select>\n </label>\n }\n</div>\n\n<ng-template #separator let-separator=\"separator\">\n <div class=\"align-self-end pb-3 px-1\" aria-hidden=\"true\">{{ separator ? separator : ':' }}</div>\n</ng-template>\n", styles: [":host{display:block}:host.ng-touched.ng-invalid:not(:has(.ng-touched.ng-invalid)) .form-control{--border-color: var(--element-status-danger)}:host input{inline-size:calc(3ch + 16px)}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
2572
2652
|
}
|
|
2573
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2653
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiTimepickerComponent, decorators: [{
|
|
2574
2654
|
type: Component,
|
|
2575
2655
|
args: [{ selector: 'si-timepicker', imports: [A11yModule, NgTemplateOutlet, ReactiveFormsModule, SiTranslatePipe], providers: [
|
|
2576
2656
|
{
|
|
@@ -2587,7 +2667,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
2587
2667
|
provide: SI_FORM_ITEM_CONTROL,
|
|
2588
2668
|
useExisting: SiTimepickerComponent
|
|
2589
2669
|
}
|
|
2590
|
-
],
|
|
2670
|
+
], host: {
|
|
2591
2671
|
role: 'group',
|
|
2592
2672
|
class: 'form-custom-control',
|
|
2593
2673
|
'[class.readonly]': 'readonly()',
|
|
@@ -2606,31 +2686,37 @@ class SiDatepickerComponent {
|
|
|
2606
2686
|
* The date which is currently focused
|
|
2607
2687
|
* Compare to the selected date or range the calendar requires to have one element to focus.
|
|
2608
2688
|
*/
|
|
2609
|
-
focusedDate = model(
|
|
2689
|
+
focusedDate = model(/* @ts-ignore */
|
|
2690
|
+
...(ngDevMode ? [undefined, { debugName: "focusedDate" }] : /* istanbul ignore next */ []));
|
|
2610
2691
|
/**
|
|
2611
2692
|
* The selected date of the datepicker. Use for
|
|
2612
2693
|
* initialization and for bidirectional binding.
|
|
2613
2694
|
*/
|
|
2614
|
-
date = model(
|
|
2695
|
+
date = model(/* @ts-ignore */
|
|
2696
|
+
...(ngDevMode ? [undefined, { debugName: "date" }] : /* istanbul ignore next */ []));
|
|
2615
2697
|
/**
|
|
2616
2698
|
* The selected date range of the datepicker. Use for
|
|
2617
2699
|
* initialization and for bidirectional binding.
|
|
2618
2700
|
*/
|
|
2619
|
-
dateRange = model(
|
|
2701
|
+
dateRange = model(/* @ts-ignore */
|
|
2702
|
+
...(ngDevMode ? [undefined, { debugName: "dateRange" }] : /* istanbul ignore next */ []));
|
|
2620
2703
|
/** @internal */
|
|
2621
|
-
dateRangeRole = input(
|
|
2704
|
+
dateRangeRole = input(/* @ts-ignore */
|
|
2705
|
+
...(ngDevMode ? [undefined, { debugName: "dateRangeRole" }] : /* istanbul ignore next */ []));
|
|
2622
2706
|
/**
|
|
2623
2707
|
* Set initial focus to calendar body.
|
|
2624
2708
|
*
|
|
2625
2709
|
* @defaultValue false
|
|
2626
2710
|
*/
|
|
2627
|
-
initialFocus = input(false,
|
|
2711
|
+
initialFocus = input(false, /* @ts-ignore */
|
|
2712
|
+
...(ngDevMode ? [{ debugName: "initialFocus" }] : /* istanbul ignore next */ []));
|
|
2628
2713
|
/**
|
|
2629
2714
|
* Disabled the optional visible time picker.
|
|
2630
2715
|
*
|
|
2631
2716
|
* @defaultValue false
|
|
2632
2717
|
*/
|
|
2633
|
-
disabledTime = model(false,
|
|
2718
|
+
disabledTime = model(false, /* @ts-ignore */
|
|
2719
|
+
...(ngDevMode ? [{ debugName: "disabledTime" }] : /* istanbul ignore next */ []));
|
|
2634
2720
|
/**
|
|
2635
2721
|
* Object to configure the datepicker.
|
|
2636
2722
|
*
|
|
@@ -2639,7 +2725,8 @@ class SiDatepickerComponent {
|
|
|
2639
2725
|
* {}
|
|
2640
2726
|
* ```
|
|
2641
2727
|
*/
|
|
2642
|
-
config = model({},
|
|
2728
|
+
config = model({}, /* @ts-ignore */
|
|
2729
|
+
...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
2643
2730
|
/**
|
|
2644
2731
|
* Aria label for the previous button. Needed for a11y.
|
|
2645
2732
|
*
|
|
@@ -2648,7 +2735,8 @@ class SiDatepickerComponent {
|
|
|
2648
2735
|
* t(() => $localize`:@@SI_DATEPICKER.PREVIOUS:Previous`)
|
|
2649
2736
|
* ```
|
|
2650
2737
|
*/
|
|
2651
|
-
previousLabel = input(t(() => $localize `:@@SI_DATEPICKER.PREVIOUS:Previous`),
|
|
2738
|
+
previousLabel = input(t(() => $localize `:@@SI_DATEPICKER.PREVIOUS:Previous`), /* @ts-ignore */
|
|
2739
|
+
...(ngDevMode ? [{ debugName: "previousLabel" }] : /* istanbul ignore next */ []));
|
|
2652
2740
|
/**
|
|
2653
2741
|
* Aria label for the next button. Needed for a11y.
|
|
2654
2742
|
*
|
|
@@ -2657,39 +2745,31 @@ class SiDatepickerComponent {
|
|
|
2657
2745
|
* t(() => $localize`:@@SI_DATEPICKER.NEXT:Next`)
|
|
2658
2746
|
* ```
|
|
2659
2747
|
*/
|
|
2660
|
-
nextLabel = input(t(() => $localize `:@@SI_DATEPICKER.NEXT:Next`),
|
|
2748
|
+
nextLabel = input(t(() => $localize `:@@SI_DATEPICKER.NEXT:Next`), /* @ts-ignore */
|
|
2749
|
+
...(ngDevMode ? [{ debugName: "nextLabel" }] : /* istanbul ignore next */ []));
|
|
2661
2750
|
/**
|
|
2662
2751
|
* Aria label for week number column
|
|
2663
2752
|
*
|
|
2664
|
-
* @deprecated Use `calendarWeekLabel` instead.
|
|
2665
2753
|
* @defaultValue
|
|
2666
2754
|
* ```
|
|
2667
2755
|
* t(() => $localize`:@@SI_DATEPICKER.CALENDAR_WEEK_LABEL:Calendar week`)
|
|
2668
2756
|
* ```
|
|
2669
2757
|
*/
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
* Aria label for week number column
|
|
2673
|
-
*
|
|
2674
|
-
* @defaultValue
|
|
2675
|
-
* ```
|
|
2676
|
-
* t(() => $localize`:@@SI_DATEPICKER.CALENDAR_WEEK_LABEL:Calendar week`)
|
|
2677
|
-
* ```
|
|
2678
|
-
*/
|
|
2679
|
-
calendarWeekLabel = input(t(() => $localize `:@@SI_DATEPICKER.CALENDAR_WEEK_LABEL:Calendar week`), ...(ngDevMode ? [{ debugName: "calendarWeekLabel" }] : []));
|
|
2680
|
-
derivedWeekLabel = computed(() => this.calenderWeekLabel() ?? this.calendarWeekLabel(), ...(ngDevMode ? [{ debugName: "derivedWeekLabel" }] : []));
|
|
2758
|
+
calendarWeekLabel = input(t(() => $localize `:@@SI_DATEPICKER.CALENDAR_WEEK_LABEL:Calendar week`), /* @ts-ignore */
|
|
2759
|
+
...(ngDevMode ? [{ debugName: "calendarWeekLabel" }] : /* istanbul ignore next */ []));
|
|
2681
2760
|
/**
|
|
2682
2761
|
* Enable/disable 12H mode in timepicker. Defaults to locale
|
|
2683
2762
|
*
|
|
2684
2763
|
* @defaultValue undefined
|
|
2685
2764
|
*/
|
|
2686
|
-
time12h = input(undefined, { ...(ngDevMode ? { debugName: "time12h" } : {}), transform: booleanAttribute });
|
|
2765
|
+
time12h = input(undefined, { ...(ngDevMode ? { debugName: "time12h" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2687
2766
|
/**
|
|
2688
2767
|
* Use this to force date range operation to select either start date or end date.
|
|
2689
2768
|
*
|
|
2690
2769
|
* @defaultValue 'START'
|
|
2691
2770
|
*/
|
|
2692
|
-
rangeType = model('START',
|
|
2771
|
+
rangeType = model('START', /* @ts-ignore */
|
|
2772
|
+
...(ngDevMode ? [{ debugName: "rangeType" }] : /* istanbul ignore next */ []));
|
|
2693
2773
|
/**
|
|
2694
2774
|
* Optional input to control the minimum month the datepicker can show and the user can navigate.
|
|
2695
2775
|
* The `minMonth` can be larger than the `minDate` This option enables the usage of multiple
|
|
@@ -2697,7 +2777,8 @@ class SiDatepickerComponent {
|
|
|
2697
2777
|
* shows a earlier month the the more right one.
|
|
2698
2778
|
* @internal
|
|
2699
2779
|
*/
|
|
2700
|
-
minMonth = input(
|
|
2780
|
+
minMonth = input(/* @ts-ignore */
|
|
2781
|
+
...(ngDevMode ? [undefined, { debugName: "minMonth" }] : /* istanbul ignore next */ []));
|
|
2701
2782
|
/**
|
|
2702
2783
|
* Optional input to control the maximum month the datepicker can show and the user can navigate.
|
|
2703
2784
|
* The `maxMonth` can be smaller than the `maxDate` This option enables the usage of multiple
|
|
@@ -2705,19 +2786,23 @@ class SiDatepickerComponent {
|
|
|
2705
2786
|
* shows a earlier month the the more right one.
|
|
2706
2787
|
* @internal
|
|
2707
2788
|
*/
|
|
2708
|
-
maxMonth = input(
|
|
2789
|
+
maxMonth = input(/* @ts-ignore */
|
|
2790
|
+
...(ngDevMode ? [undefined, { debugName: "maxMonth" }] : /* istanbul ignore next */ []));
|
|
2709
2791
|
/**
|
|
2710
2792
|
* Option to hide the time switch.
|
|
2711
2793
|
*
|
|
2712
2794
|
* @defaultValue false
|
|
2713
2795
|
*/
|
|
2714
|
-
hideTimeToggle = input(false,
|
|
2796
|
+
hideTimeToggle = input(false, /* @ts-ignore */
|
|
2797
|
+
...(ngDevMode ? [{ debugName: "hideTimeToggle" }] : /* istanbul ignore next */ []));
|
|
2715
2798
|
/** @internal */
|
|
2716
|
-
hideCalendar = input(false,
|
|
2799
|
+
hideCalendar = input(false, /* @ts-ignore */
|
|
2800
|
+
...(ngDevMode ? [{ debugName: "hideCalendar" }] : /* istanbul ignore next */ []));
|
|
2717
2801
|
/**
|
|
2718
2802
|
* Optional timepicker label.
|
|
2719
2803
|
*/
|
|
2720
|
-
timepickerLabel = input(
|
|
2804
|
+
timepickerLabel = input(/* @ts-ignore */
|
|
2805
|
+
...(ngDevMode ? [undefined, { debugName: "timepickerLabel" }] : /* istanbul ignore next */ []));
|
|
2721
2806
|
get startDate() {
|
|
2722
2807
|
return this.config().enableDateRange ? this.dateRange()?.start : this.date();
|
|
2723
2808
|
}
|
|
@@ -2740,7 +2825,8 @@ class SiDatepickerComponent {
|
|
|
2740
2825
|
defaultEnableTimeText = t(() => $localize `:@@SI_DATEPICKER.ENABLED_TIME_TEXT:Consider time`);
|
|
2741
2826
|
includeTimeLabel = computed(() => this.disabledTime()
|
|
2742
2827
|
? (this.config().disabledTimeText ?? this.defaultDisabledTimeText)
|
|
2743
|
-
: (this.config().enabledTimeText ?? this.defaultEnableTimeText),
|
|
2828
|
+
: (this.config().enabledTimeText ?? this.defaultEnableTimeText), /* @ts-ignore */
|
|
2829
|
+
...(ngDevMode ? [{ debugName: "includeTimeLabel" }] : /* istanbul ignore next */ []));
|
|
2744
2830
|
get weekStartDay() {
|
|
2745
2831
|
return this.config().weekStartDay ?? this.localeWeekStart;
|
|
2746
2832
|
}
|
|
@@ -2750,7 +2836,8 @@ class SiDatepickerComponent {
|
|
|
2750
2836
|
/**
|
|
2751
2837
|
* The active view
|
|
2752
2838
|
*/
|
|
2753
|
-
view = signal('week',
|
|
2839
|
+
view = signal('week', /* @ts-ignore */
|
|
2840
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
2754
2841
|
/**
|
|
2755
2842
|
* Get the current shown view.
|
|
2756
2843
|
*/
|
|
@@ -2763,11 +2850,15 @@ class SiDatepickerComponent {
|
|
|
2763
2850
|
default:
|
|
2764
2851
|
return this.daySelection();
|
|
2765
2852
|
}
|
|
2766
|
-
},
|
|
2767
|
-
|
|
2768
|
-
|
|
2853
|
+
}, /* @ts-ignore */
|
|
2854
|
+
...(ngDevMode ? [{ debugName: "activeView" }] : /* istanbul ignore next */ []));
|
|
2855
|
+
actualFocusedDate = computed(() => this.focusedDate() ?? today(), /* @ts-ignore */
|
|
2856
|
+
...(ngDevMode ? [{ debugName: "actualFocusedDate" }] : /* istanbul ignore next */ []));
|
|
2857
|
+
requireFocus = signal(this.initialFocus(), /* @ts-ignore */
|
|
2858
|
+
...(ngDevMode ? [{ debugName: "requireFocus" }] : /* istanbul ignore next */ []));
|
|
2769
2859
|
/** When the user switch from the year or month view via keyboard selection we force the focus. */
|
|
2770
|
-
forceFocus = computed(() => this.requireFocus() || this.initialFocus(),
|
|
2860
|
+
forceFocus = computed(() => this.requireFocus() || this.initialFocus(), /* @ts-ignore */
|
|
2861
|
+
...(ngDevMode ? [{ debugName: "forceFocus" }] : /* istanbul ignore next */ []));
|
|
2771
2862
|
months = [];
|
|
2772
2863
|
switchId = `__si-datepicker-switch-id-${idCounter++}`;
|
|
2773
2864
|
timepickerId = `__si-datepicker-timepicker-id-${idCounter++}`;
|
|
@@ -2794,16 +2885,20 @@ class SiDatepickerComponent {
|
|
|
2794
2885
|
*/
|
|
2795
2886
|
previousTime;
|
|
2796
2887
|
/** Reference to the current day selection component. Shown when view === 'week' */
|
|
2797
|
-
daySelection = viewChild(SiDaySelectionComponent,
|
|
2888
|
+
daySelection = viewChild(SiDaySelectionComponent, /* @ts-ignore */
|
|
2889
|
+
...(ngDevMode ? [{ debugName: "daySelection" }] : /* istanbul ignore next */ []));
|
|
2798
2890
|
/** Reference to the current month selection component. Shown when view === 'month' */
|
|
2799
|
-
monthSelection = viewChild(SiMonthSelectionComponent,
|
|
2891
|
+
monthSelection = viewChild(SiMonthSelectionComponent, /* @ts-ignore */
|
|
2892
|
+
...(ngDevMode ? [{ debugName: "monthSelection" }] : /* istanbul ignore next */ []));
|
|
2800
2893
|
/** Reference to the current year selection component. Shown when view === 'year' */
|
|
2801
|
-
yearSelection = viewChild(SiYearSelectionComponent,
|
|
2894
|
+
yearSelection = viewChild(SiYearSelectionComponent, /* @ts-ignore */
|
|
2895
|
+
...(ngDevMode ? [{ debugName: "yearSelection" }] : /* istanbul ignore next */ []));
|
|
2802
2896
|
/**
|
|
2803
2897
|
* The cell which which has the mouse hover.
|
|
2804
2898
|
* @internal
|
|
2805
2899
|
*/
|
|
2806
|
-
activeHover = model(
|
|
2900
|
+
activeHover = model(/* @ts-ignore */
|
|
2901
|
+
...(ngDevMode ? [undefined, { debugName: "activeHover" }] : /* istanbul ignore next */ []));
|
|
2807
2902
|
constructor() {
|
|
2808
2903
|
this.initCalendarLabels();
|
|
2809
2904
|
const weekStart = getLocaleFirstDayOfWeek(this.locale);
|
|
@@ -3114,10 +3209,10 @@ class SiDatepickerComponent {
|
|
|
3114
3209
|
onActiveHoverChange(event) {
|
|
3115
3210
|
this.activeHover.set(event);
|
|
3116
3211
|
}
|
|
3117
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3118
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: SiDatepickerComponent, isStandalone: true, selector: "si-datepicker", inputs: { focusedDate: { classPropertyName: "focusedDate", publicName: "focusedDate", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, dateRange: { classPropertyName: "dateRange", publicName: "dateRange", isSignal: true, isRequired: false, transformFunction: null }, dateRangeRole: { classPropertyName: "dateRangeRole", publicName: "dateRangeRole", isSignal: true, isRequired: false, transformFunction: null }, initialFocus: { classPropertyName: "initialFocus", publicName: "initialFocus", isSignal: true, isRequired: false, transformFunction: null }, disabledTime: { classPropertyName: "disabledTime", publicName: "disabledTime", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, previousLabel: { classPropertyName: "previousLabel", publicName: "previousLabel", isSignal: true, isRequired: false, transformFunction: null }, nextLabel: { classPropertyName: "nextLabel", publicName: "nextLabel", isSignal: true, isRequired: false, transformFunction: null }, calenderWeekLabel: { classPropertyName: "calenderWeekLabel", publicName: "calenderWeekLabel", isSignal: true, isRequired: false, transformFunction: null }, calendarWeekLabel: { classPropertyName: "calendarWeekLabel", publicName: "calendarWeekLabel", isSignal: true, isRequired: false, transformFunction: null }, time12h: { classPropertyName: "time12h", publicName: "time12h", isSignal: true, isRequired: false, transformFunction: null }, rangeType: { classPropertyName: "rangeType", publicName: "rangeType", isSignal: true, isRequired: false, transformFunction: null }, minMonth: { classPropertyName: "minMonth", publicName: "minMonth", isSignal: true, isRequired: false, transformFunction: null }, maxMonth: { classPropertyName: "maxMonth", publicName: "maxMonth", isSignal: true, isRequired: false, transformFunction: null }, hideTimeToggle: { classPropertyName: "hideTimeToggle", publicName: "hideTimeToggle", isSignal: true, isRequired: false, transformFunction: null }, hideCalendar: { classPropertyName: "hideCalendar", publicName: "hideCalendar", isSignal: true, isRequired: false, transformFunction: null }, timepickerLabel: { classPropertyName: "timepickerLabel", publicName: "timepickerLabel", isSignal: true, isRequired: false, transformFunction: null }, activeHover: { classPropertyName: "activeHover", publicName: "activeHover", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focusedDate: "focusedDateChange", date: "dateChange", dateRange: "dateRangeChange", disabledTime: "disabledTimeChange", config: "configChange", rangeType: "rangeTypeChange", activeHover: "activeHoverChange" }, viewQueries: [{ propertyName: "daySelection", first: true, predicate: SiDaySelectionComponent, descendants: true, isSignal: true }, { propertyName: "monthSelection", first: true, predicate: SiMonthSelectionComponent, descendants: true, isSignal: true }, { propertyName: "yearSelection", first: true, predicate: SiYearSelectionComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (!hideCalendar()) {\n <div class=\"text-center pb-6 calendar\">\n @switch (view()) {\n @case ('year') {\n <si-year-selection\n [focusedDate]=\"actualFocusedDate()\"\n [startDate]=\"startDate\"\n [endDate]=\"endDate\"\n [minDate]=\"config().minDate\"\n [maxDate]=\"config().maxDate\"\n [minMonth]=\"minMonth()\"\n [maxMonth]=\"maxMonth()\"\n [isRangeSelection]=\"config().enableDateRange!\"\n [previousLabel]=\"previousLabel() | translate\"\n [nextLabel]=\"nextLabel() | translate\"\n (selectedValueChange)=\"activeYearChange($event)\"\n />\n }\n @case ('month') {\n <si-month-selection\n [startDate]=\"startDate\"\n [endDate]=\"endDate\"\n [months]=\"months\"\n [minDate]=\"config().minDate\"\n [maxDate]=\"config().maxDate\"\n [minMonth]=\"minMonth()\"\n [maxMonth]=\"maxMonth()\"\n [isRangeSelection]=\"config().enableDateRange!\"\n [previewRange]=\"rangeType() === 'END'\"\n [previousLabel]=\"previousLabel() | translate\"\n [nextLabel]=\"nextLabel() | translate\"\n [activeHover]=\"activeHover()\"\n [focusedDate]=\"actualFocusedDate()\"\n (activeHoverChange)=\"onActiveHoverChange($event)\"\n (focusedDateChange)=\"focusedDate.set($event)\"\n (selectedValueChange)=\"activeMonthChange($event)\"\n (viewChange)=\"view.set($event)\"\n />\n }\n @case ('week') {\n <si-day-selection\n [initialFocus]=\"forceFocus()\"\n [startDate]=\"startDate\"\n [endDate]=\"dateRange()?.end\"\n [isRangeSelection]=\"config().enableDateRange!\"\n [previewRange]=\"rangeType() === 'END'\"\n [hideWeekNumbers]=\"hideWeekNumbers\"\n [minDate]=\"config().minDate\"\n [maxDate]=\"config().maxDate\"\n [minMonth]=\"minMonth()\"\n [weekStartDay]=\"weekStartDay\"\n [calendarWeekLabel]=\"derivedWeekLabel()\"\n [previousLabel]=\"previousLabel() | translate\"\n [nextLabel]=\"nextLabel() | translate\"\n [todayLabel]=\"config().todayText\"\n [activeHover]=\"activeHover()\"\n [focusedDate]=\"actualFocusedDate()\"\n (activeHoverChange)=\"onActiveHoverChange($event)\"\n (focusedDateChange)=\"focusedDate.set($event)\"\n (selectedValueChange)=\"selectionChange($event!)\"\n (viewChange)=\"view.set($event)\"\n />\n }\n }\n </div>\n}\n@if (this.config().showTime) {\n <div\n class=\"timepicker-container px-9 pb-6\"\n [class.pt-6]=\"!hideCalendar()\"\n [class.border-top]=\"!hideCalendar()\"\n >\n @if (!config().mandatoryTime && !hideTimeToggle()) {\n <div class=\"mb-5 form-check form-switch\">\n <input\n type=\"checkbox\"\n class=\"form-check-input\"\n role=\"switch\"\n [id]=\"switchId\"\n [checked]=\"!disabledTime()\"\n (change)=\"toggleDisabledTime()\"\n />\n <label class=\"form-check-label\" [for]=\"switchId\">{{\n includeTimeLabel() | translate\n }}</label>\n </div>\n }\n <div class=\"mt-auto\">\n @if (timepickerLabel()) {\n <label class=\"form-label\" [for]=\"timepickerId\">{{ timepickerLabel() | translate }}</label>\n }\n <si-timepicker\n #timePicker\n [id]=\"timepickerId\"\n [formControl]=\"time\"\n [hoursLabel]=\"config().hoursLabel ?? timePicker.hoursLabel()\"\n [minutesLabel]=\"config().minutesLabel ?? timePicker.minutesLabel()\"\n [secondsLabel]=\"config().secondsLabel ?? timePicker.secondsLabel()\"\n [millisecondsLabel]=\"config().millisecondsLabel ?? timePicker.millisecondsLabel()\"\n [hideLabels]=\"config().hideLabels ?? timePicker.hideLabels()\"\n [hoursAriaLabel]=\"config().hoursAriaLabel ?? timePicker.hoursAriaLabel()\"\n [minutesAriaLabel]=\"config().minutesAriaLabel ?? timePicker.minutesAriaLabel()\"\n [secondsAriaLabel]=\"config().secondsAriaLabel ?? timePicker.secondsAriaLabel()\"\n [millisecondsAriaLabel]=\"\n config().millisecondsAriaLabel ?? timePicker.millisecondsAriaLabel()\n \"\n [hoursPlaceholder]=\"config().hoursPlaceholder ?? timePicker.hoursPlaceholder()\"\n [minutesPlaceholder]=\"config().minutesPlaceholder ?? timePicker.minutesPlaceholder()\"\n [secondsPlaceholder]=\"config().secondsPlaceholder ?? timePicker.secondsPlaceholder()\"\n [millisecondsPlaceholder]=\"\n config().millisecondsPlaceholder ?? timePicker.millisecondsPlaceholder()\n \"\n [meridians]=\"config().meridians ?? timePicker.meridians()\"\n [meridiansLabel]=\"config().meridiansLabel ?? timePicker.meridiansLabel()\"\n [meridiansAriaLabel]=\"config().meridiansAriaLabel ?? timePicker.meridiansAriaLabel()\"\n [showMinutes]=\"config().showMinutes ?? true\"\n [showSeconds]=\"config().showSeconds ?? false\"\n [showMilliseconds]=\"config().showMilliseconds ?? false\"\n [showMeridian]=\"time12h()\"\n />\n </div>\n </div>\n}\n", styles: [":host ::ng-deep .year:not(.disabled):not(.selected):hover,:host ::ng-deep .month:not(.disabled):not(.selected):hover,:host ::ng-deep .day:not(.disabled):not(.selected):hover{background:var(--element-base-1-hover);color:var(--element-ui-0)}:host ::ng-deep .year,:host ::ng-deep .month,:host ::ng-deep td,:host ::ng-deep th,:host ::ng-deep .day{block-size:2rem;line-height:2rem}:host ::ng-deep td,:host ::ng-deep th,:host ::ng-deep .day{inline-size:2rem}:host ::ng-deep .year,:host ::ng-deep .month,:host ::ng-deep .day{display:block;margin-inline:auto;position:relative;border:unset;background-color:unset;padding:0;cursor:pointer;border-radius:var(--element-button-radius)}:host{background:var(--element-base-1);border-radius:var(--element-radius-2);display:flex;flex-direction:column}:host ::ng-deep .header,:host ::ng-deep .footer{display:flex;align-items:center;min-block-size:calc(1rem + 16px)}:host ::ng-deep .header{padding-block:12px;padding-inline:32px;border-block-end:1px solid var(--element-ui-4)}:host ::ng-deep .header a{text-decoration:none;cursor:pointer}:host ::ng-deep .footer{margin-block-start:4px}:host ::ng-deep .calendar-table{min-block-size:calc(14rem + 24px)}:host ::ng-deep table{border-collapse:separate;border-spacing:0 3px;table-layout:fixed;margin-block-end:-3px}:host ::ng-deep .day.selected{background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep .month{inline-size:8rem}:host ::ng-deep .month.selected{background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep .year{inline-size:5.3333333333rem}:host ::ng-deep .year.selected{background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep td,:host ::ng-deep th{padding:0;font-weight:400}:host ::ng-deep .week-num,:host ::ng-deep th{font-size:.75rem;color:var(--element-text-secondary);inline-size:2rem;cursor:default}:host ::ng-deep .today.selected:before{border-color:var(--element-ui-5)}:host ::ng-deep .today:before{position:absolute;content:\"\";inset:1px;border:1px solid var(--element-ui-1);border-radius:var(--element-radius-2);display:inline-block}:host ::ng-deep .disabled{color:var(--element-text-disabled);font-weight:400!important;cursor:default!important}:host ::ng-deep .range{background-color:var(--element-ui-4)}:host ::ng-deep .range:hover{background:var(--element-base-1-hover)}:host ::ng-deep .range:hover div.si-h4:hover{background:transparent}:host ::ng-deep .range-hover{background-color:var(--element-base-1-hover)}:host ::ng-deep .range-hover-end{border-start-end-radius:var(--element-button-radius);border-end-end-radius:var(--element-button-radius)}:host ::ng-deep td:is(.range-start,.range-end){background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep td:is(.range-start,.range-end) div.si-h4:hover,:host ::ng-deep td:is(.range-start,.range-end) div.si-body-lg:hover{background:transparent;color:var(--element-base-1)}:host ::ng-deep td:is(.range-start,.range-end) .today:before{border-color:var(--element-ui-5)}:host ::ng-deep td.range-start{border-start-start-radius:var(--element-button-radius);border-end-start-radius:var(--element-button-radius)}:host ::ng-deep td.range-end{border-start-end-radius:var(--element-button-radius);border-end-end-radius:var(--element-button-radius)}:host ::ng-deep .calendar-button{font-weight:600;font-size:.875rem;line-height:1.1428571429;color:var(--element-text-active);min-inline-size:0!important}:host ::ng-deep .timepicker-container{display:flex;flex:1 1 auto;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SiYearSelectionComponent, selector: "si-year-selection", inputs: ["focusedDate"], outputs: ["focusedDateChange", "yearRangeChange"] }, { kind: "component", type: SiMonthSelectionComponent, selector: "si-month-selection", inputs: ["months", "focusedDate"], outputs: ["focusedDateChange", "activeMonthChange", "viewChange"] }, { kind: "component", type: SiDaySelectionComponent, selector: "si-day-selection", inputs: ["hideWeekNumbers", "weekStartDay", "focusedDate", "todayLabel", "calendarWeekLabel"], outputs: ["focusedDateChange", "activeMonthChange", "viewChange"] }, { kind: "component", type: SiTimepickerComponent, selector: "si-timepicker", inputs: ["id", "disabled", "hoursLabel", "minutesLabel", "secondsLabel", "millisecondsLabel", "hideLabels", "hoursAriaLabel", "minutesAriaLabel", "secondsAriaLabel", "millisecondsAriaLabel", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder", "millisecondsPlaceholder", "meridians", "meridiansLabel", "meridiansAriaLabel", "showMinutes", "showSeconds", "showMilliseconds", "showMeridian", "min", "max", "readonly", "errormessageId"], outputs: ["isValid", "meridianChange", "inputCompleted"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
3212
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3213
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiDatepickerComponent, isStandalone: true, selector: "si-datepicker", inputs: { focusedDate: { classPropertyName: "focusedDate", publicName: "focusedDate", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, dateRange: { classPropertyName: "dateRange", publicName: "dateRange", isSignal: true, isRequired: false, transformFunction: null }, dateRangeRole: { classPropertyName: "dateRangeRole", publicName: "dateRangeRole", isSignal: true, isRequired: false, transformFunction: null }, initialFocus: { classPropertyName: "initialFocus", publicName: "initialFocus", isSignal: true, isRequired: false, transformFunction: null }, disabledTime: { classPropertyName: "disabledTime", publicName: "disabledTime", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, previousLabel: { classPropertyName: "previousLabel", publicName: "previousLabel", isSignal: true, isRequired: false, transformFunction: null }, nextLabel: { classPropertyName: "nextLabel", publicName: "nextLabel", isSignal: true, isRequired: false, transformFunction: null }, calendarWeekLabel: { classPropertyName: "calendarWeekLabel", publicName: "calendarWeekLabel", isSignal: true, isRequired: false, transformFunction: null }, time12h: { classPropertyName: "time12h", publicName: "time12h", isSignal: true, isRequired: false, transformFunction: null }, rangeType: { classPropertyName: "rangeType", publicName: "rangeType", isSignal: true, isRequired: false, transformFunction: null }, minMonth: { classPropertyName: "minMonth", publicName: "minMonth", isSignal: true, isRequired: false, transformFunction: null }, maxMonth: { classPropertyName: "maxMonth", publicName: "maxMonth", isSignal: true, isRequired: false, transformFunction: null }, hideTimeToggle: { classPropertyName: "hideTimeToggle", publicName: "hideTimeToggle", isSignal: true, isRequired: false, transformFunction: null }, hideCalendar: { classPropertyName: "hideCalendar", publicName: "hideCalendar", isSignal: true, isRequired: false, transformFunction: null }, timepickerLabel: { classPropertyName: "timepickerLabel", publicName: "timepickerLabel", isSignal: true, isRequired: false, transformFunction: null }, activeHover: { classPropertyName: "activeHover", publicName: "activeHover", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focusedDate: "focusedDateChange", date: "dateChange", dateRange: "dateRangeChange", disabledTime: "disabledTimeChange", config: "configChange", rangeType: "rangeTypeChange", activeHover: "activeHoverChange" }, viewQueries: [{ propertyName: "daySelection", first: true, predicate: SiDaySelectionComponent, descendants: true, isSignal: true }, { propertyName: "monthSelection", first: true, predicate: SiMonthSelectionComponent, descendants: true, isSignal: true }, { propertyName: "yearSelection", first: true, predicate: SiYearSelectionComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "@if (!hideCalendar()) {\n <div class=\"text-center pb-6 calendar\">\n @switch (view()) {\n @case ('year') {\n <si-year-selection\n [focusedDate]=\"actualFocusedDate()\"\n [startDate]=\"startDate\"\n [endDate]=\"endDate\"\n [minDate]=\"config().minDate\"\n [maxDate]=\"config().maxDate\"\n [minMonth]=\"minMonth()\"\n [maxMonth]=\"maxMonth()\"\n [isRangeSelection]=\"config().enableDateRange!\"\n [previousLabel]=\"previousLabel() | translate\"\n [nextLabel]=\"nextLabel() | translate\"\n (selectedValueChange)=\"activeYearChange($event)\"\n />\n }\n @case ('month') {\n <si-month-selection\n [startDate]=\"startDate\"\n [endDate]=\"endDate\"\n [months]=\"months\"\n [minDate]=\"config().minDate\"\n [maxDate]=\"config().maxDate\"\n [minMonth]=\"minMonth()\"\n [maxMonth]=\"maxMonth()\"\n [isRangeSelection]=\"config().enableDateRange!\"\n [previewRange]=\"rangeType() === 'END'\"\n [previousLabel]=\"previousLabel() | translate\"\n [nextLabel]=\"nextLabel() | translate\"\n [activeHover]=\"activeHover()\"\n [focusedDate]=\"actualFocusedDate()\"\n (activeHoverChange)=\"onActiveHoverChange($event)\"\n (focusedDateChange)=\"focusedDate.set($event)\"\n (selectedValueChange)=\"activeMonthChange($event)\"\n (viewChange)=\"view.set($event)\"\n />\n }\n @case ('week') {\n <si-day-selection\n [initialFocus]=\"forceFocus()\"\n [startDate]=\"startDate\"\n [endDate]=\"dateRange()?.end\"\n [isRangeSelection]=\"config().enableDateRange!\"\n [previewRange]=\"rangeType() === 'END'\"\n [hideWeekNumbers]=\"hideWeekNumbers\"\n [minDate]=\"config().minDate\"\n [maxDate]=\"config().maxDate\"\n [minMonth]=\"minMonth()\"\n [weekStartDay]=\"weekStartDay\"\n [calendarWeekLabel]=\"calendarWeekLabel()\"\n [previousLabel]=\"previousLabel() | translate\"\n [nextLabel]=\"nextLabel() | translate\"\n [todayLabel]=\"config().todayText\"\n [activeHover]=\"activeHover()\"\n [focusedDate]=\"actualFocusedDate()\"\n (activeHoverChange)=\"onActiveHoverChange($event)\"\n (focusedDateChange)=\"focusedDate.set($event)\"\n (selectedValueChange)=\"selectionChange($event!)\"\n (viewChange)=\"view.set($event)\"\n />\n }\n }\n </div>\n}\n@if (this.config().showTime) {\n <div\n class=\"timepicker-container px-9 pb-6\"\n [class.pt-6]=\"!hideCalendar()\"\n [class.border-top]=\"!hideCalendar()\"\n >\n @if (!config().mandatoryTime && !hideTimeToggle()) {\n <div class=\"mb-5 form-check form-switch\">\n <input\n type=\"checkbox\"\n class=\"form-check-input\"\n role=\"switch\"\n [id]=\"switchId\"\n [checked]=\"!disabledTime()\"\n (change)=\"toggleDisabledTime()\"\n />\n <label class=\"form-check-label\" [for]=\"switchId\">{{\n includeTimeLabel() | translate\n }}</label>\n </div>\n }\n <div class=\"mt-auto\">\n @if (timepickerLabel()) {\n <label class=\"form-label\" [for]=\"timepickerId\">{{ timepickerLabel() | translate }}</label>\n }\n <si-timepicker\n #timePicker\n [id]=\"timepickerId\"\n [formControl]=\"time\"\n [hoursLabel]=\"config().hoursLabel ?? timePicker.hoursLabel()\"\n [minutesLabel]=\"config().minutesLabel ?? timePicker.minutesLabel()\"\n [secondsLabel]=\"config().secondsLabel ?? timePicker.secondsLabel()\"\n [millisecondsLabel]=\"config().millisecondsLabel ?? timePicker.millisecondsLabel()\"\n [hideLabels]=\"config().hideLabels ?? timePicker.hideLabels()\"\n [hoursAriaLabel]=\"config().hoursAriaLabel ?? timePicker.hoursAriaLabel()\"\n [minutesAriaLabel]=\"config().minutesAriaLabel ?? timePicker.minutesAriaLabel()\"\n [secondsAriaLabel]=\"config().secondsAriaLabel ?? timePicker.secondsAriaLabel()\"\n [millisecondsAriaLabel]=\"\n config().millisecondsAriaLabel ?? timePicker.millisecondsAriaLabel()\n \"\n [hoursPlaceholder]=\"config().hoursPlaceholder ?? timePicker.hoursPlaceholder()\"\n [minutesPlaceholder]=\"config().minutesPlaceholder ?? timePicker.minutesPlaceholder()\"\n [secondsPlaceholder]=\"config().secondsPlaceholder ?? timePicker.secondsPlaceholder()\"\n [millisecondsPlaceholder]=\"\n config().millisecondsPlaceholder ?? timePicker.millisecondsPlaceholder()\n \"\n [meridians]=\"config().meridians ?? timePicker.meridians()\"\n [meridiansLabel]=\"config().meridiansLabel ?? timePicker.meridiansLabel()\"\n [meridiansAriaLabel]=\"config().meridiansAriaLabel ?? timePicker.meridiansAriaLabel()\"\n [showMinutes]=\"config().showMinutes ?? true\"\n [showSeconds]=\"config().showSeconds ?? false\"\n [showMilliseconds]=\"config().showMilliseconds ?? false\"\n [showMeridian]=\"time12h()\"\n />\n </div>\n </div>\n}\n", styles: [":host ::ng-deep .year:not(.disabled):not(.selected):hover,:host ::ng-deep .month:not(.disabled):not(.selected):hover,:host ::ng-deep .day:not(.disabled):not(.selected):hover{background:var(--element-base-1-hover);color:var(--element-ui-0)}:host ::ng-deep .year,:host ::ng-deep .month,:host ::ng-deep td,:host ::ng-deep th,:host ::ng-deep .day{block-size:2rem;line-height:2rem}:host ::ng-deep td,:host ::ng-deep th,:host ::ng-deep .day{inline-size:2rem}:host ::ng-deep .year,:host ::ng-deep .month,:host ::ng-deep .day{display:block;margin-inline:auto;position:relative;border:unset;background-color:unset;padding:0;cursor:pointer;border-radius:var(--element-button-radius)}:host{background:var(--element-base-1);border-radius:var(--element-radius-2);display:flex;flex-direction:column}:host ::ng-deep .header,:host ::ng-deep .footer{display:flex;align-items:center;min-block-size:calc(1rem + 16px)}:host ::ng-deep .header{padding-block:12px;padding-inline:32px;border-block-end:1px solid var(--element-ui-4)}:host ::ng-deep .header a{text-decoration:none;cursor:pointer}:host ::ng-deep .footer{margin-block-start:4px}:host ::ng-deep .calendar-table{min-block-size:calc(14rem + 24px)}:host ::ng-deep table{border-collapse:separate;border-spacing:0 3px;table-layout:fixed;margin-block-end:-3px}:host ::ng-deep .day.selected{background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep .month{inline-size:8rem}:host ::ng-deep .month.selected{background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep .year{inline-size:5.3333333333rem}:host ::ng-deep .year.selected{background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep td,:host ::ng-deep th{padding:0;font-weight:400}:host ::ng-deep .week-num,:host ::ng-deep th{font-size:.75rem;color:var(--element-text-secondary);inline-size:2rem;cursor:default}:host ::ng-deep .today.selected:before{border-color:var(--element-ui-5)}:host ::ng-deep .today:before{position:absolute;content:\"\";inset:1px;border:1px solid var(--element-ui-1);border-radius:var(--element-radius-2);display:inline-block}:host ::ng-deep .disabled{color:var(--element-text-disabled);font-weight:400!important;cursor:default!important}:host ::ng-deep .range{background-color:var(--element-ui-4)}:host ::ng-deep .range:hover{background:var(--element-base-1-hover)}:host ::ng-deep .range:hover div.si-h4:hover{background:transparent}:host ::ng-deep .range-hover{background-color:var(--element-base-1-hover)}:host ::ng-deep .range-hover-end{border-start-end-radius:var(--element-button-radius);border-end-end-radius:var(--element-button-radius)}:host ::ng-deep td:is(.range-start,.range-end){background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep td:is(.range-start,.range-end) div.si-h4:hover,:host ::ng-deep td:is(.range-start,.range-end) div.si-body-lg:hover{background:transparent;color:var(--element-base-1)}:host ::ng-deep td:is(.range-start,.range-end) .today:before{border-color:var(--element-ui-5)}:host ::ng-deep td.range-start{border-start-start-radius:var(--element-button-radius);border-end-start-radius:var(--element-button-radius)}:host ::ng-deep td.range-end{border-start-end-radius:var(--element-button-radius);border-end-end-radius:var(--element-button-radius)}:host ::ng-deep .calendar-button{font-weight:600;font-size:.875rem;line-height:1.1428571429;color:var(--element-text-active);min-inline-size:0!important}:host ::ng-deep .timepicker-container{display:flex;flex:1 1 auto;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SiYearSelectionComponent, selector: "si-year-selection", inputs: ["focusedDate"], outputs: ["focusedDateChange", "yearRangeChange"] }, { kind: "component", type: SiMonthSelectionComponent, selector: "si-month-selection", inputs: ["months", "focusedDate"], outputs: ["focusedDateChange", "activeMonthChange", "viewChange"] }, { kind: "component", type: SiDaySelectionComponent, selector: "si-day-selection", inputs: ["hideWeekNumbers", "weekStartDay", "focusedDate", "todayLabel", "calendarWeekLabel"], outputs: ["focusedDateChange", "activeMonthChange", "viewChange"] }, { kind: "component", type: SiTimepickerComponent, selector: "si-timepicker", inputs: ["id", "disabled", "hoursLabel", "minutesLabel", "secondsLabel", "millisecondsLabel", "hideLabels", "hoursAriaLabel", "minutesAriaLabel", "secondsAriaLabel", "millisecondsAriaLabel", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder", "millisecondsPlaceholder", "meridians", "meridiansLabel", "meridiansAriaLabel", "showMinutes", "showSeconds", "showMilliseconds", "showMeridian", "min", "max", "readonly", "errormessageId"], outputs: ["isValid", "meridianChange", "inputCompleted"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
3119
3214
|
}
|
|
3120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerComponent, decorators: [{
|
|
3121
3216
|
type: Component,
|
|
3122
3217
|
args: [{ selector: 'si-datepicker', imports: [
|
|
3123
3218
|
ReactiveFormsModule,
|
|
@@ -3126,22 +3221,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
3126
3221
|
SiDaySelectionComponent,
|
|
3127
3222
|
SiTimepickerComponent,
|
|
3128
3223
|
SiTranslatePipe
|
|
3129
|
-
], changeDetection: ChangeDetectionStrategy.
|
|
3130
|
-
}], ctorParameters: () => [], propDecorators: { focusedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedDate", required: false }] }, { type: i0.Output, args: ["focusedDateChange"] }], date: [{ type: i0.Input, args: [{ isSignal: true, alias: "date", required: false }] }, { type: i0.Output, args: ["dateChange"] }], dateRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateRange", required: false }] }, { type: i0.Output, args: ["dateRangeChange"] }], dateRangeRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateRangeRole", required: false }] }], initialFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialFocus", required: false }] }], disabledTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledTime", required: false }] }, { type: i0.Output, args: ["disabledTimeChange"] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }, { type: i0.Output, args: ["configChange"] }], previousLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousLabel", required: false }] }], nextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextLabel", required: false }] }],
|
|
3224
|
+
], changeDetection: ChangeDetectionStrategy.Eager, template: "@if (!hideCalendar()) {\n <div class=\"text-center pb-6 calendar\">\n @switch (view()) {\n @case ('year') {\n <si-year-selection\n [focusedDate]=\"actualFocusedDate()\"\n [startDate]=\"startDate\"\n [endDate]=\"endDate\"\n [minDate]=\"config().minDate\"\n [maxDate]=\"config().maxDate\"\n [minMonth]=\"minMonth()\"\n [maxMonth]=\"maxMonth()\"\n [isRangeSelection]=\"config().enableDateRange!\"\n [previousLabel]=\"previousLabel() | translate\"\n [nextLabel]=\"nextLabel() | translate\"\n (selectedValueChange)=\"activeYearChange($event)\"\n />\n }\n @case ('month') {\n <si-month-selection\n [startDate]=\"startDate\"\n [endDate]=\"endDate\"\n [months]=\"months\"\n [minDate]=\"config().minDate\"\n [maxDate]=\"config().maxDate\"\n [minMonth]=\"minMonth()\"\n [maxMonth]=\"maxMonth()\"\n [isRangeSelection]=\"config().enableDateRange!\"\n [previewRange]=\"rangeType() === 'END'\"\n [previousLabel]=\"previousLabel() | translate\"\n [nextLabel]=\"nextLabel() | translate\"\n [activeHover]=\"activeHover()\"\n [focusedDate]=\"actualFocusedDate()\"\n (activeHoverChange)=\"onActiveHoverChange($event)\"\n (focusedDateChange)=\"focusedDate.set($event)\"\n (selectedValueChange)=\"activeMonthChange($event)\"\n (viewChange)=\"view.set($event)\"\n />\n }\n @case ('week') {\n <si-day-selection\n [initialFocus]=\"forceFocus()\"\n [startDate]=\"startDate\"\n [endDate]=\"dateRange()?.end\"\n [isRangeSelection]=\"config().enableDateRange!\"\n [previewRange]=\"rangeType() === 'END'\"\n [hideWeekNumbers]=\"hideWeekNumbers\"\n [minDate]=\"config().minDate\"\n [maxDate]=\"config().maxDate\"\n [minMonth]=\"minMonth()\"\n [weekStartDay]=\"weekStartDay\"\n [calendarWeekLabel]=\"calendarWeekLabel()\"\n [previousLabel]=\"previousLabel() | translate\"\n [nextLabel]=\"nextLabel() | translate\"\n [todayLabel]=\"config().todayText\"\n [activeHover]=\"activeHover()\"\n [focusedDate]=\"actualFocusedDate()\"\n (activeHoverChange)=\"onActiveHoverChange($event)\"\n (focusedDateChange)=\"focusedDate.set($event)\"\n (selectedValueChange)=\"selectionChange($event!)\"\n (viewChange)=\"view.set($event)\"\n />\n }\n }\n </div>\n}\n@if (this.config().showTime) {\n <div\n class=\"timepicker-container px-9 pb-6\"\n [class.pt-6]=\"!hideCalendar()\"\n [class.border-top]=\"!hideCalendar()\"\n >\n @if (!config().mandatoryTime && !hideTimeToggle()) {\n <div class=\"mb-5 form-check form-switch\">\n <input\n type=\"checkbox\"\n class=\"form-check-input\"\n role=\"switch\"\n [id]=\"switchId\"\n [checked]=\"!disabledTime()\"\n (change)=\"toggleDisabledTime()\"\n />\n <label class=\"form-check-label\" [for]=\"switchId\">{{\n includeTimeLabel() | translate\n }}</label>\n </div>\n }\n <div class=\"mt-auto\">\n @if (timepickerLabel()) {\n <label class=\"form-label\" [for]=\"timepickerId\">{{ timepickerLabel() | translate }}</label>\n }\n <si-timepicker\n #timePicker\n [id]=\"timepickerId\"\n [formControl]=\"time\"\n [hoursLabel]=\"config().hoursLabel ?? timePicker.hoursLabel()\"\n [minutesLabel]=\"config().minutesLabel ?? timePicker.minutesLabel()\"\n [secondsLabel]=\"config().secondsLabel ?? timePicker.secondsLabel()\"\n [millisecondsLabel]=\"config().millisecondsLabel ?? timePicker.millisecondsLabel()\"\n [hideLabels]=\"config().hideLabels ?? timePicker.hideLabels()\"\n [hoursAriaLabel]=\"config().hoursAriaLabel ?? timePicker.hoursAriaLabel()\"\n [minutesAriaLabel]=\"config().minutesAriaLabel ?? timePicker.minutesAriaLabel()\"\n [secondsAriaLabel]=\"config().secondsAriaLabel ?? timePicker.secondsAriaLabel()\"\n [millisecondsAriaLabel]=\"\n config().millisecondsAriaLabel ?? timePicker.millisecondsAriaLabel()\n \"\n [hoursPlaceholder]=\"config().hoursPlaceholder ?? timePicker.hoursPlaceholder()\"\n [minutesPlaceholder]=\"config().minutesPlaceholder ?? timePicker.minutesPlaceholder()\"\n [secondsPlaceholder]=\"config().secondsPlaceholder ?? timePicker.secondsPlaceholder()\"\n [millisecondsPlaceholder]=\"\n config().millisecondsPlaceholder ?? timePicker.millisecondsPlaceholder()\n \"\n [meridians]=\"config().meridians ?? timePicker.meridians()\"\n [meridiansLabel]=\"config().meridiansLabel ?? timePicker.meridiansLabel()\"\n [meridiansAriaLabel]=\"config().meridiansAriaLabel ?? timePicker.meridiansAriaLabel()\"\n [showMinutes]=\"config().showMinutes ?? true\"\n [showSeconds]=\"config().showSeconds ?? false\"\n [showMilliseconds]=\"config().showMilliseconds ?? false\"\n [showMeridian]=\"time12h()\"\n />\n </div>\n </div>\n}\n", styles: [":host ::ng-deep .year:not(.disabled):not(.selected):hover,:host ::ng-deep .month:not(.disabled):not(.selected):hover,:host ::ng-deep .day:not(.disabled):not(.selected):hover{background:var(--element-base-1-hover);color:var(--element-ui-0)}:host ::ng-deep .year,:host ::ng-deep .month,:host ::ng-deep td,:host ::ng-deep th,:host ::ng-deep .day{block-size:2rem;line-height:2rem}:host ::ng-deep td,:host ::ng-deep th,:host ::ng-deep .day{inline-size:2rem}:host ::ng-deep .year,:host ::ng-deep .month,:host ::ng-deep .day{display:block;margin-inline:auto;position:relative;border:unset;background-color:unset;padding:0;cursor:pointer;border-radius:var(--element-button-radius)}:host{background:var(--element-base-1);border-radius:var(--element-radius-2);display:flex;flex-direction:column}:host ::ng-deep .header,:host ::ng-deep .footer{display:flex;align-items:center;min-block-size:calc(1rem + 16px)}:host ::ng-deep .header{padding-block:12px;padding-inline:32px;border-block-end:1px solid var(--element-ui-4)}:host ::ng-deep .header a{text-decoration:none;cursor:pointer}:host ::ng-deep .footer{margin-block-start:4px}:host ::ng-deep .calendar-table{min-block-size:calc(14rem + 24px)}:host ::ng-deep table{border-collapse:separate;border-spacing:0 3px;table-layout:fixed;margin-block-end:-3px}:host ::ng-deep .day.selected{background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep .month{inline-size:8rem}:host ::ng-deep .month.selected{background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep .year{inline-size:5.3333333333rem}:host ::ng-deep .year.selected{background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep td,:host ::ng-deep th{padding:0;font-weight:400}:host ::ng-deep .week-num,:host ::ng-deep th{font-size:.75rem;color:var(--element-text-secondary);inline-size:2rem;cursor:default}:host ::ng-deep .today.selected:before{border-color:var(--element-ui-5)}:host ::ng-deep .today:before{position:absolute;content:\"\";inset:1px;border:1px solid var(--element-ui-1);border-radius:var(--element-radius-2);display:inline-block}:host ::ng-deep .disabled{color:var(--element-text-disabled);font-weight:400!important;cursor:default!important}:host ::ng-deep .range{background-color:var(--element-ui-4)}:host ::ng-deep .range:hover{background:var(--element-base-1-hover)}:host ::ng-deep .range:hover div.si-h4:hover{background:transparent}:host ::ng-deep .range-hover{background-color:var(--element-base-1-hover)}:host ::ng-deep .range-hover-end{border-start-end-radius:var(--element-button-radius);border-end-end-radius:var(--element-button-radius)}:host ::ng-deep td:is(.range-start,.range-end){background:var(--element-ui-0);color:var(--element-base-1)}:host ::ng-deep td:is(.range-start,.range-end) div.si-h4:hover,:host ::ng-deep td:is(.range-start,.range-end) div.si-body-lg:hover{background:transparent;color:var(--element-base-1)}:host ::ng-deep td:is(.range-start,.range-end) .today:before{border-color:var(--element-ui-5)}:host ::ng-deep td.range-start{border-start-start-radius:var(--element-button-radius);border-end-start-radius:var(--element-button-radius)}:host ::ng-deep td.range-end{border-start-end-radius:var(--element-button-radius);border-end-end-radius:var(--element-button-radius)}:host ::ng-deep .calendar-button{font-weight:600;font-size:.875rem;line-height:1.1428571429;color:var(--element-text-active);min-inline-size:0!important}:host ::ng-deep .timepicker-container{display:flex;flex:1 1 auto;flex-direction:column}\n"] }]
|
|
3225
|
+
}], ctorParameters: () => [], propDecorators: { focusedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedDate", required: false }] }, { type: i0.Output, args: ["focusedDateChange"] }], date: [{ type: i0.Input, args: [{ isSignal: true, alias: "date", required: false }] }, { type: i0.Output, args: ["dateChange"] }], dateRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateRange", required: false }] }, { type: i0.Output, args: ["dateRangeChange"] }], dateRangeRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateRangeRole", required: false }] }], initialFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialFocus", required: false }] }], disabledTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledTime", required: false }] }, { type: i0.Output, args: ["disabledTimeChange"] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }, { type: i0.Output, args: ["configChange"] }], previousLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousLabel", required: false }] }], nextLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextLabel", required: false }] }], calendarWeekLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarWeekLabel", required: false }] }], time12h: [{ type: i0.Input, args: [{ isSignal: true, alias: "time12h", required: false }] }], rangeType: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeType", required: false }] }, { type: i0.Output, args: ["rangeTypeChange"] }], minMonth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minMonth", required: false }] }], maxMonth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxMonth", required: false }] }], hideTimeToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideTimeToggle", required: false }] }], hideCalendar: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideCalendar", required: false }] }], timepickerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "timepickerLabel", required: false }] }], daySelection: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiDaySelectionComponent), { isSignal: true }] }], monthSelection: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiMonthSelectionComponent), { isSignal: true }] }], yearSelection: [{ type: i0.ViewChild, args: [i0.forwardRef(() => SiYearSelectionComponent), { isSignal: true }] }], activeHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeHover", required: false }] }, { type: i0.Output, args: ["activeHoverChange"] }] } });
|
|
3131
3226
|
|
|
3132
3227
|
/**
|
|
3133
3228
|
* Copyright (c) Siemens 2016 - 2026
|
|
3134
3229
|
* SPDX-License-Identifier: MIT
|
|
3135
3230
|
*/
|
|
3136
3231
|
class SiDatepickerOverlayComponent {
|
|
3137
|
-
minMonth = signal(undefined,
|
|
3138
|
-
|
|
3232
|
+
minMonth = signal(undefined, /* @ts-ignore */
|
|
3233
|
+
...(ngDevMode ? [{ debugName: "minMonth" }] : /* istanbul ignore next */ []));
|
|
3234
|
+
maxMonth = signal(undefined, /* @ts-ignore */
|
|
3235
|
+
...(ngDevMode ? [{ debugName: "maxMonth" }] : /* istanbul ignore next */ []));
|
|
3139
3236
|
datepicker = viewChild.required(SiDatepickerComponent);
|
|
3140
3237
|
/**
|
|
3141
3238
|
* {@inheritDoc SiDatepickerComponent#initialFocus}
|
|
3142
3239
|
* @defaultValue false
|
|
3143
3240
|
*/
|
|
3144
|
-
initialFocus = input(false, { ...(ngDevMode ? { debugName: "initialFocus" } : {}), transform: booleanAttribute });
|
|
3241
|
+
initialFocus = input(false, { ...(ngDevMode ? { debugName: "initialFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3145
3242
|
/**
|
|
3146
3243
|
* {@inheritDoc SiDatepickerComponent#config}
|
|
3147
3244
|
* @defaultValue
|
|
@@ -3149,24 +3246,28 @@ class SiDatepickerOverlayComponent {
|
|
|
3149
3246
|
* {}
|
|
3150
3247
|
* ```
|
|
3151
3248
|
*/
|
|
3152
|
-
config = input({},
|
|
3249
|
+
config = input({}, /* @ts-ignore */
|
|
3250
|
+
...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
3153
3251
|
/**
|
|
3154
3252
|
* {@inheritDoc SiDatepickerComponent#date}
|
|
3155
3253
|
*/
|
|
3156
|
-
date = model(
|
|
3254
|
+
date = model(/* @ts-ignore */
|
|
3255
|
+
...(ngDevMode ? [undefined, { debugName: "date" }] : /* istanbul ignore next */ []));
|
|
3157
3256
|
/**
|
|
3158
3257
|
* {@inheritDoc SiDatepickerComponent#dateRange}
|
|
3159
3258
|
*/
|
|
3160
|
-
dateRange = model(
|
|
3259
|
+
dateRange = model(/* @ts-ignore */
|
|
3260
|
+
...(ngDevMode ? [undefined, { debugName: "dateRange" }] : /* istanbul ignore next */ []));
|
|
3161
3261
|
/**
|
|
3162
3262
|
* {@inheritDoc SiDatepickerComponent#rangeType}
|
|
3163
3263
|
*/
|
|
3164
|
-
rangeType = model(
|
|
3264
|
+
rangeType = model(/* @ts-ignore */
|
|
3265
|
+
...(ngDevMode ? [undefined, { debugName: "rangeType" }] : /* istanbul ignore next */ []));
|
|
3165
3266
|
/**
|
|
3166
3267
|
* {@inheritDoc SiDatepickerComponent#time12h}
|
|
3167
3268
|
* @defaultValue false
|
|
3168
3269
|
*/
|
|
3169
|
-
time12h = input(false, { ...(ngDevMode ? { debugName: "time12h" } : {}), transform: booleanAttribute });
|
|
3270
|
+
time12h = input(false, { ...(ngDevMode ? { debugName: "time12h" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3170
3271
|
/**
|
|
3171
3272
|
* Emits an event to notify about disabling the time from the datepicker.
|
|
3172
3273
|
* When time is disable, we construct a pure date object in UTC 00:00:00 time.
|
|
@@ -3178,20 +3279,27 @@ class SiDatepickerOverlayComponent {
|
|
|
3178
3279
|
focusTrapFactory = inject(ConfigurableFocusTrapFactory);
|
|
3179
3280
|
focusTrap;
|
|
3180
3281
|
previousActiveElement;
|
|
3181
|
-
disableTime = signal(false,
|
|
3182
|
-
|
|
3282
|
+
disableTime = signal(false, /* @ts-ignore */
|
|
3283
|
+
...(ngDevMode ? [{ debugName: "disableTime" }] : /* istanbul ignore next */ []));
|
|
3284
|
+
activeHover = signal(undefined, /* @ts-ignore */
|
|
3285
|
+
...(ngDevMode ? [{ debugName: "activeHover" }] : /* istanbul ignore next */ []));
|
|
3183
3286
|
isTwoMonthDateRange = computed(() => !!this.config().enableDateRange &&
|
|
3184
|
-
(!!this.config().enableTwoMonthDateRange || !!this.config().showTime),
|
|
3185
|
-
|
|
3186
|
-
|
|
3287
|
+
(!!this.config().enableTwoMonthDateRange || !!this.config().showTime), /* @ts-ignore */
|
|
3288
|
+
...(ngDevMode ? [{ debugName: "isTwoMonthDateRange" }] : /* istanbul ignore next */ []));
|
|
3289
|
+
firstDatepickerConfig = signal({}, /* @ts-ignore */
|
|
3290
|
+
...(ngDevMode ? [{ debugName: "firstDatepickerConfig" }] : /* istanbul ignore next */ []));
|
|
3291
|
+
secondDatepickerConfig = signal({}, /* @ts-ignore */
|
|
3292
|
+
...(ngDevMode ? [{ debugName: "secondDatepickerConfig" }] : /* istanbul ignore next */ []));
|
|
3187
3293
|
/**
|
|
3188
3294
|
* Indicate that the overlay is opened in small screen.
|
|
3189
3295
|
* A modal dialog animation display when true and a wrapped two month calendar layout is displayed.
|
|
3190
3296
|
*
|
|
3191
3297
|
* @defaultValue false
|
|
3192
3298
|
*/
|
|
3193
|
-
isMobile = input(false,
|
|
3194
|
-
|
|
3299
|
+
isMobile = input(false, /* @ts-ignore */
|
|
3300
|
+
...(ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []));
|
|
3301
|
+
completeAnimation = signal(false, /* @ts-ignore */
|
|
3302
|
+
...(ngDevMode ? [{ debugName: "completeAnimation" }] : /* istanbul ignore next */ []));
|
|
3195
3303
|
ngOnChanges(changes) {
|
|
3196
3304
|
if (changes.config) {
|
|
3197
3305
|
const config = this.config();
|
|
@@ -3250,8 +3358,8 @@ class SiDatepickerOverlayComponent {
|
|
|
3250
3358
|
}
|
|
3251
3359
|
}
|
|
3252
3360
|
}
|
|
3253
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3254
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3361
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3362
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiDatepickerOverlayComponent, isStandalone: true, selector: "si-datepicker-overlay", inputs: { initialFocus: { classPropertyName: "initialFocus", publicName: "initialFocus", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, dateRange: { classPropertyName: "dateRange", publicName: "dateRange", isSignal: true, isRequired: false, transformFunction: null }, rangeType: { classPropertyName: "rangeType", publicName: "rangeType", isSignal: true, isRequired: false, transformFunction: null }, time12h: { classPropertyName: "time12h", publicName: "time12h", isSignal: true, isRequired: false, transformFunction: null }, isMobile: { classPropertyName: "isMobile", publicName: "isMobile", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { date: "dateChange", dateRange: "dateRangeChange", rangeType: "rangeTypeChange", disabledTimeChange: "disabledTimeChange" }, host: { properties: { "class.flex-wrap": "isMobile()", "class.mobile-datepicker-overlay": "isMobile()", "class.fade": "isMobile()", "class.show": "completeAnimation()" }, classAttribute: "mt-md-1 d-flex elevation-2 rounded-2 overflow-auto align-items-stretch" }, viewQueries: [{ propertyName: "datepicker", first: true, predicate: SiDatepickerComponent, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
3255
3363
|
<si-datepicker
|
|
3256
3364
|
#datepicker
|
|
3257
3365
|
tabindex="-1"
|
|
@@ -3298,9 +3406,9 @@ class SiDatepickerOverlayComponent {
|
|
|
3298
3406
|
(rangeTypeChange)="rangeType.set($event)"
|
|
3299
3407
|
/>
|
|
3300
3408
|
}
|
|
3301
|
-
`, isInline: true, styles: [":host{background:var(--element-base-1);max-block-size:max-content;max-inline-size:min-content}:host.fade{transition:transform calc(.3s * var(--element-animations-enabled, 1)) ease-out;transform:translateY(-50px)}:host.show{transform:none}.mobile-datepicker-overlay{max-inline-size:43.5ch}.first-datepicker{border-inline-end:0;border-start-end-radius:0;border-end-end-radius:0}.second-datepicker{border-inline-start:0;border-start-start-radius:0;border-end-start-radius:0}.first-datepicker-mobile{border-block-end:0;border-end-start-radius:0;border-end-end-radius:0}.second-datepicker-mobile{border-block-start:0;border-start-start-radius:0;border-start-end-radius:0}\n"], dependencies: [{ kind: "component", type: SiDatepickerComponent, selector: "si-datepicker", inputs: ["focusedDate", "date", "dateRange", "dateRangeRole", "initialFocus", "disabledTime", "config", "previousLabel", "nextLabel", "
|
|
3409
|
+
`, isInline: true, styles: [":host{background:var(--element-base-1);max-block-size:max-content;max-inline-size:min-content}:host.fade{transition:transform calc(.3s * var(--element-animations-enabled, 1)) ease-out;transform:translateY(-50px)}:host.show{transform:none}.mobile-datepicker-overlay{max-inline-size:43.5ch}.first-datepicker{border-inline-end:0;border-start-end-radius:0;border-end-end-radius:0}.second-datepicker{border-inline-start:0;border-start-start-radius:0;border-end-start-radius:0}.first-datepicker-mobile{border-block-end:0;border-end-start-radius:0;border-end-end-radius:0}.second-datepicker-mobile{border-block-start:0;border-start-start-radius:0;border-start-end-radius:0}\n"], dependencies: [{ kind: "component", type: SiDatepickerComponent, selector: "si-datepicker", inputs: ["focusedDate", "date", "dateRange", "dateRangeRole", "initialFocus", "disabledTime", "config", "previousLabel", "nextLabel", "calendarWeekLabel", "time12h", "rangeType", "minMonth", "maxMonth", "hideTimeToggle", "hideCalendar", "timepickerLabel", "activeHover"], outputs: ["focusedDateChange", "dateChange", "dateRangeChange", "disabledTimeChange", "configChange", "rangeTypeChange", "activeHoverChange"] }, { kind: "ngmodule", type: A11yModule }] });
|
|
3302
3410
|
}
|
|
3303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerOverlayComponent, decorators: [{
|
|
3304
3412
|
type: Component,
|
|
3305
3413
|
args: [{ selector: 'si-datepicker-overlay', imports: [SiDatepickerComponent, A11yModule], template: `
|
|
3306
3414
|
<si-datepicker
|
|
@@ -3349,7 +3457,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
3349
3457
|
(rangeTypeChange)="rangeType.set($event)"
|
|
3350
3458
|
/>
|
|
3351
3459
|
}
|
|
3352
|
-
`,
|
|
3460
|
+
`, host: {
|
|
3353
3461
|
class: 'mt-md-1 d-flex elevation-2 rounded-2 overflow-auto align-items-stretch',
|
|
3354
3462
|
'[class.flex-wrap]': 'isMobile()',
|
|
3355
3463
|
'[class.mobile-datepicker-overlay]': 'isMobile()',
|
|
@@ -3394,7 +3502,8 @@ class SiDatepickerOverlayDirective {
|
|
|
3394
3502
|
originX: 'start',
|
|
3395
3503
|
originY: 'top'
|
|
3396
3504
|
}
|
|
3397
|
-
],
|
|
3505
|
+
], /* @ts-ignore */
|
|
3506
|
+
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
3398
3507
|
/**
|
|
3399
3508
|
* Output event on closing datepicker e.g. by clicking backdrop or escape key.
|
|
3400
3509
|
*/
|
|
@@ -3552,10 +3661,10 @@ class SiDatepickerOverlayDirective {
|
|
|
3552
3661
|
observeOn(asapScheduler), map(() => CloseCause.Select)), overlayRef.backdropClick().pipe(map(() => CloseCause.Backdrop)), overlayRef.detachments().pipe(map(() => CloseCause.Detach)), overlayRef.keydownEvents().pipe(filter(event => event.key === 'Escape'), tap(event => event.stopPropagation()), // ESC handled, prevent closing modal, etc.
|
|
3553
3662
|
map(() => CloseCause.Escape)));
|
|
3554
3663
|
}
|
|
3555
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3556
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
3664
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerOverlayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3665
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: SiDatepickerOverlayDirective, isStandalone: true, selector: "[siDatepickerOverlay]", outputs: { siDatepickerClose: "siDatepickerClose" }, exportAs: ["siDatepickerOverlay"], ngImport: i0 });
|
|
3557
3666
|
}
|
|
3558
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3667
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerOverlayDirective, decorators: [{
|
|
3559
3668
|
type: Directive,
|
|
3560
3669
|
args: [{
|
|
3561
3670
|
selector: '[siDatepickerOverlay]',
|
|
@@ -3575,7 +3684,7 @@ class SiDatepickerDirective extends SiDateInputDirective {
|
|
|
3575
3684
|
*
|
|
3576
3685
|
* @defaultValue false
|
|
3577
3686
|
*/
|
|
3578
|
-
autoClose = input(false, { ...(ngDevMode ? { debugName: "autoClose" } : {}), transform: booleanAttribute });
|
|
3687
|
+
autoClose = input(false, { ...(ngDevMode ? { debugName: "autoClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3579
3688
|
/**
|
|
3580
3689
|
* During focus on close the datepicker will not show since we recover the focus on element.
|
|
3581
3690
|
* The focus on close is only relevant when the directive is configured without a calendar button.
|
|
@@ -3659,8 +3768,8 @@ class SiDatepickerDirective extends SiDateInputDirective {
|
|
|
3659
3768
|
this.overlayToggle.closeAfterSelection();
|
|
3660
3769
|
}
|
|
3661
3770
|
}
|
|
3662
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3663
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
3771
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3772
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: SiDatepickerDirective, isStandalone: true, selector: "[siDatepicker]", inputs: { autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick()", "keydown.tab": "onTab()", "focus": "focusChange()" } }, providers: [
|
|
3664
3773
|
{
|
|
3665
3774
|
provide: NG_VALUE_ACCESSOR,
|
|
3666
3775
|
useExisting: SiDatepickerDirective,
|
|
@@ -3677,7 +3786,7 @@ class SiDatepickerDirective extends SiDateInputDirective {
|
|
|
3677
3786
|
}
|
|
3678
3787
|
], exportAs: ["siDatepicker"], usesInheritance: true, hostDirectives: [{ directive: SiDatepickerOverlayDirective, outputs: ["siDatepickerClose", "siDatepickerClose"] }], ngImport: i0 });
|
|
3679
3788
|
}
|
|
3680
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3789
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerDirective, decorators: [{
|
|
3681
3790
|
type: Directive,
|
|
3682
3791
|
args: [{
|
|
3683
3792
|
selector: '[siDatepicker]',
|
|
@@ -3722,7 +3831,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
3722
3831
|
*/
|
|
3723
3832
|
class SiDateRangeComponent {
|
|
3724
3833
|
static idCounter = 0;
|
|
3725
|
-
inputDirectives = viewChildren(SiDateInputDirective,
|
|
3834
|
+
inputDirectives = viewChildren(SiDateInputDirective, /* @ts-ignore */
|
|
3835
|
+
...(ngDevMode ? [{ debugName: "inputDirectives" }] : /* istanbul ignore next */ []));
|
|
3726
3836
|
startInput = viewChild.required('startInput');
|
|
3727
3837
|
endInput = viewChild.required('endInput');
|
|
3728
3838
|
button = viewChild.required('button');
|
|
@@ -3732,7 +3842,8 @@ class SiDateRangeComponent {
|
|
|
3732
3842
|
* `__si-date-range-${SiDateRangeComponent.idCounter++}`
|
|
3733
3843
|
* ```
|
|
3734
3844
|
*/
|
|
3735
|
-
id = input(`__si-date-range-${SiDateRangeComponent.idCounter++}`,
|
|
3845
|
+
id = input(`__si-date-range-${SiDateRangeComponent.idCounter++}`, /* @ts-ignore */
|
|
3846
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
3736
3847
|
labelledby = inject(new HostAttributeToken('aria-labelledby'), {
|
|
3737
3848
|
optional: true
|
|
3738
3849
|
}) ?? `${this.id()}-label`;
|
|
@@ -3744,7 +3855,8 @@ class SiDateRangeComponent {
|
|
|
3744
3855
|
* { enableDateRange: true }
|
|
3745
3856
|
* ```
|
|
3746
3857
|
*/
|
|
3747
|
-
siDatepickerConfig = model({ enableDateRange: true },
|
|
3858
|
+
siDatepickerConfig = model({ enableDateRange: true }, /* @ts-ignore */
|
|
3859
|
+
...(ngDevMode ? [{ debugName: "siDatepickerConfig" }] : /* istanbul ignore next */ []));
|
|
3748
3860
|
/**
|
|
3749
3861
|
* Placeholder of the start date input.
|
|
3750
3862
|
*
|
|
@@ -3753,7 +3865,8 @@ class SiDateRangeComponent {
|
|
|
3753
3865
|
* t(() => $localize`:@@SI_DATEPICKER.START_DATE_PLACEHOLDER:Start date`)
|
|
3754
3866
|
* ```
|
|
3755
3867
|
*/
|
|
3756
|
-
startDatePlaceholder = input(t(() => $localize `:@@SI_DATEPICKER.START_DATE_PLACEHOLDER:Start date`),
|
|
3868
|
+
startDatePlaceholder = input(t(() => $localize `:@@SI_DATEPICKER.START_DATE_PLACEHOLDER:Start date`), /* @ts-ignore */
|
|
3869
|
+
...(ngDevMode ? [{ debugName: "startDatePlaceholder" }] : /* istanbul ignore next */ []));
|
|
3757
3870
|
/**
|
|
3758
3871
|
* Placeholder of the end date input.
|
|
3759
3872
|
*
|
|
@@ -3762,7 +3875,8 @@ class SiDateRangeComponent {
|
|
|
3762
3875
|
* t(() => $localize`:@@SI_DATEPICKER.END_DATE_PLACEHOLDER:End date`)
|
|
3763
3876
|
* ```
|
|
3764
3877
|
*/
|
|
3765
|
-
endDatePlaceholder = input(t(() => $localize `:@@SI_DATEPICKER.END_DATE_PLACEHOLDER:End date`),
|
|
3878
|
+
endDatePlaceholder = input(t(() => $localize `:@@SI_DATEPICKER.END_DATE_PLACEHOLDER:End date`), /* @ts-ignore */
|
|
3879
|
+
...(ngDevMode ? [{ debugName: "endDatePlaceholder" }] : /* istanbul ignore next */ []));
|
|
3766
3880
|
/**
|
|
3767
3881
|
* Aria label of the date-range calendar toggle button.
|
|
3768
3882
|
*
|
|
@@ -3771,7 +3885,8 @@ class SiDateRangeComponent {
|
|
|
3771
3885
|
* t(() => $localize`:@@SI_DATEPICKER.CALENDAR_TOGGLE_BUTTON:Open calendar`)
|
|
3772
3886
|
* ```
|
|
3773
3887
|
*/
|
|
3774
|
-
ariaLabelCalendarButton = input(t(() => $localize `:@@SI_DATEPICKER.CALENDAR_TOGGLE_BUTTON:Open calendar`),
|
|
3888
|
+
ariaLabelCalendarButton = input(t(() => $localize `:@@SI_DATEPICKER.CALENDAR_TOGGLE_BUTTON:Open calendar`), /* @ts-ignore */
|
|
3889
|
+
...(ngDevMode ? [{ debugName: "ariaLabelCalendarButton" }] : /* istanbul ignore next */ []));
|
|
3775
3890
|
/**
|
|
3776
3891
|
* Form label of the start timepicker.
|
|
3777
3892
|
*
|
|
@@ -3780,7 +3895,8 @@ class SiDateRangeComponent {
|
|
|
3780
3895
|
* t(() => $localize`:@@SI_DATEPICKER.START_TIME_LABEL:from`)
|
|
3781
3896
|
* ```
|
|
3782
3897
|
*/
|
|
3783
|
-
startTimeLabel = input(t(() => $localize `:@@SI_DATEPICKER.START_TIME_LABEL:from`),
|
|
3898
|
+
startTimeLabel = input(t(() => $localize `:@@SI_DATEPICKER.START_TIME_LABEL:from`), /* @ts-ignore */
|
|
3899
|
+
...(ngDevMode ? [{ debugName: "startTimeLabel" }] : /* istanbul ignore next */ []));
|
|
3784
3900
|
/**
|
|
3785
3901
|
* Form label of the start timepicker.
|
|
3786
3902
|
*
|
|
@@ -3789,13 +3905,14 @@ class SiDateRangeComponent {
|
|
|
3789
3905
|
* t(() => $localize`:@@SI_DATEPICKER.END_TIME_LABEL:to`)
|
|
3790
3906
|
* ```
|
|
3791
3907
|
*/
|
|
3792
|
-
endTimeLabel = input(t(() => $localize `:@@SI_DATEPICKER.END_TIME_LABEL:to`),
|
|
3908
|
+
endTimeLabel = input(t(() => $localize `:@@SI_DATEPICKER.END_TIME_LABEL:to`), /* @ts-ignore */
|
|
3909
|
+
...(ngDevMode ? [{ debugName: "endTimeLabel" }] : /* istanbul ignore next */ []));
|
|
3793
3910
|
/**
|
|
3794
3911
|
* Automatically close overlay on date selection.
|
|
3795
3912
|
*
|
|
3796
3913
|
* @defaultValue false
|
|
3797
3914
|
*/
|
|
3798
|
-
autoClose = input(false, { ...(ngDevMode ? { debugName: "autoClose" } : {}), transform: booleanAttribute });
|
|
3915
|
+
autoClose = input(false, { ...(ngDevMode ? { debugName: "autoClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3799
3916
|
/** Emits on the date range value changes. */
|
|
3800
3917
|
siDatepickerRangeChange = output();
|
|
3801
3918
|
/**
|
|
@@ -3809,18 +3926,19 @@ class SiDateRangeComponent {
|
|
|
3809
3926
|
* @defaultValue false
|
|
3810
3927
|
*/
|
|
3811
3928
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
3812
|
-
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : {}), alias: 'disabled' });
|
|
3929
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled' });
|
|
3813
3930
|
/**
|
|
3814
3931
|
* Whether the date range input is readonly.
|
|
3815
3932
|
*
|
|
3816
3933
|
* @defaultValue false
|
|
3817
3934
|
*/
|
|
3818
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
3935
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
3819
3936
|
/**
|
|
3820
3937
|
* Set the date-range object displayed in the control.
|
|
3821
3938
|
* The input can be used if the control is used outside Angular forms.
|
|
3822
3939
|
*/
|
|
3823
|
-
value = model(
|
|
3940
|
+
value = model(/* @ts-ignore */
|
|
3941
|
+
...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
3824
3942
|
/**
|
|
3825
3943
|
* This ID will be bound to the `aria-describedby` attribute of the date-range.
|
|
3826
3944
|
* Use this to reference the element containing the error message(s) for the date-range.
|
|
@@ -3831,13 +3949,16 @@ class SiDateRangeComponent {
|
|
|
3831
3949
|
* `${this.id()}-errormessage`
|
|
3832
3950
|
* ```
|
|
3833
3951
|
*/
|
|
3834
|
-
errormessageId = input(`${this.id()}-errormessage`,
|
|
3952
|
+
errormessageId = input(`${this.id()}-errormessage`, /* @ts-ignore */
|
|
3953
|
+
...(ngDevMode ? [{ debugName: "errormessageId" }] : /* istanbul ignore next */ []));
|
|
3835
3954
|
validator;
|
|
3836
3955
|
onChange = (val) => { };
|
|
3837
3956
|
onTouch = () => { };
|
|
3838
3957
|
icons = addIcons({ elementCalendar });
|
|
3839
|
-
disabled = computed(() => this.disabledInput() || this.disabledNgControl(),
|
|
3840
|
-
|
|
3958
|
+
disabled = computed(() => this.disabledInput() || this.disabledNgControl(), /* @ts-ignore */
|
|
3959
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
3960
|
+
disabledNgControl = signal(false, /* @ts-ignore */
|
|
3961
|
+
...(ngDevMode ? [{ debugName: "disabledNgControl" }] : /* istanbul ignore next */ []));
|
|
3841
3962
|
cdRef = inject(ChangeDetectorRef);
|
|
3842
3963
|
locale = inject(LOCALE_ID).toString();
|
|
3843
3964
|
overlayToggle = inject(SiDatepickerOverlayDirective);
|
|
@@ -4004,8 +4125,8 @@ class SiDateRangeComponent {
|
|
|
4004
4125
|
this.value.set(value);
|
|
4005
4126
|
}
|
|
4006
4127
|
}
|
|
4007
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4008
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
4128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4129
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: SiDateRangeComponent, isStandalone: true, selector: "si-date-range", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, siDatepickerConfig: { classPropertyName: "siDatepickerConfig", publicName: "siDatepickerConfig", isSignal: true, isRequired: false, transformFunction: null }, startDatePlaceholder: { classPropertyName: "startDatePlaceholder", publicName: "startDatePlaceholder", isSignal: true, isRequired: false, transformFunction: null }, endDatePlaceholder: { classPropertyName: "endDatePlaceholder", publicName: "endDatePlaceholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelCalendarButton: { classPropertyName: "ariaLabelCalendarButton", publicName: "ariaLabelCalendarButton", isSignal: true, isRequired: false, transformFunction: null }, startTimeLabel: { classPropertyName: "startTimeLabel", publicName: "startTimeLabel", isSignal: true, isRequired: false, transformFunction: null }, endTimeLabel: { classPropertyName: "endTimeLabel", publicName: "endTimeLabel", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, errormessageId: { classPropertyName: "errormessageId", publicName: "errormessageId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { siDatepickerConfig: "siDatepickerConfigChange", siDatepickerRangeChange: "siDatepickerRangeChange", disabledTimeChange: "disabledTimeChange", value: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onFocusOut($event)" }, properties: { "class.disabled": "disabled()", "class.readonly": "readonly()", "attr.aria-labelledby": "labelledby" }, classAttribute: "form-control d-flex align-items-center" }, providers: [
|
|
4009
4130
|
{
|
|
4010
4131
|
provide: NG_VALUE_ACCESSOR,
|
|
4011
4132
|
useExisting: SiDateRangeComponent,
|
|
@@ -4020,9 +4141,9 @@ class SiDateRangeComponent {
|
|
|
4020
4141
|
provide: SI_FORM_ITEM_CONTROL,
|
|
4021
4142
|
useExisting: SiDateRangeComponent
|
|
4022
4143
|
}
|
|
4023
|
-
], viewQueries: [{ propertyName: "inputDirectives", predicate: SiDateInputDirective, descendants: true, isSignal: true }, { propertyName: "startInput", first: true, predicate: ["startInput"], descendants: true, isSignal: true }, { propertyName: "endInput", first: true, predicate: ["endInput"], descendants: true, isSignal: true }, { propertyName: "button", first: true, predicate: ["button"], descendants: true, isSignal: true }], usesOnChanges: true, hostDirectives: [{ directive: SiDatepickerOverlayDirective, outputs: ["siDatepickerClose", "siDatepickerClose"] }], ngImport: i0, template: "<input\n #startInput=\"ngModel\"\n type=\"text\"\n class=\"border-0 p-0 focus-none\"\n siDateInput\n [ngModel]=\"value()?.start ?? null\"\n [siDatepickerConfig]=\"siDatepickerConfig()\"\n [placeholder]=\"startDatePlaceholder() | translate\"\n [attr.aria-label]=\"startDatePlaceholder() | translate\"\n [errormessageId]=\"errormessageId()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (ngModelChange)=\"onInputChanged({ start: $event, end: value()?.end })\"\n/>\n<span class=\"mx-3\">-</span>\n<input\n #endInput=\"ngModel\"\n type=\"text\"\n class=\"border-0 p-0 focus-none text-end\"\n siDateInput\n [ngModel]=\"value()?.end ?? null\"\n [siDatepickerConfig]=\"siDatepickerConfig()\"\n [placeholder]=\"endDatePlaceholder() | translate\"\n [attr.aria-label]=\"endDatePlaceholder() | translate\"\n [errormessageId]=\"errormessageId()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (ngModelChange)=\"onInputChanged({ start: value()?.start, end: $event })\"\n/>\n<div class=\"form-control-actions\">\n <button\n #button\n type=\"button\"\n class=\"btn btn-icon btn-tertiary btn-sm\"\n [attr.aria-label]=\"ariaLabelCalendarButton() | translate\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"show()\"\n >\n <si-icon [icon]=\"icons.elementCalendar\" />\n </button>\n</div>\n", styles: [":host{display:block;min-inline-size:237px}:host(:focus-within:has(input:focus)){outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}input{flex-grow:1;background-color:transparent;min-inline-size:80px}input::placeholder{opacity:1;color:var(--element-text-secondary)}input:disabled,input[readonly]{background-color:var(--element-base-1);opacity:1}input:not([readonly]):focus::placeholder,input:focus:not([readonly]):focus::placeholder{color:transparent}.disabled,.disabled:hover,.disabled:focus{--border-color: var(--element-ui-3);color:var(--element-text-disabled)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: SiDateInputDirective, selector: "input[siDateInput]", inputs: ["id", "siDatepickerConfig", "disabled", "readonly", "errormessageId"], outputs: ["siDatepickerConfigChange", "siDatepickerDisabledTime", "stateChange", "dateChange"], exportAs: ["siDateInput"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "ngmodule", type: A11yModule }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.
|
|
4144
|
+
], viewQueries: [{ propertyName: "inputDirectives", predicate: SiDateInputDirective, descendants: true, isSignal: true }, { propertyName: "startInput", first: true, predicate: ["startInput"], descendants: true, isSignal: true }, { propertyName: "endInput", first: true, predicate: ["endInput"], descendants: true, isSignal: true }, { propertyName: "button", first: true, predicate: ["button"], descendants: true, isSignal: true }], usesOnChanges: true, hostDirectives: [{ directive: SiDatepickerOverlayDirective, outputs: ["siDatepickerClose", "siDatepickerClose"] }], ngImport: i0, template: "<input\n #startInput=\"ngModel\"\n type=\"text\"\n class=\"border-0 p-0 focus-none\"\n siDateInput\n [ngModel]=\"value()?.start ?? null\"\n [siDatepickerConfig]=\"siDatepickerConfig()\"\n [placeholder]=\"startDatePlaceholder() | translate\"\n [attr.aria-label]=\"startDatePlaceholder() | translate\"\n [errormessageId]=\"errormessageId()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (ngModelChange)=\"onInputChanged({ start: $event, end: value()?.end })\"\n/>\n<span class=\"mx-3\">-</span>\n<input\n #endInput=\"ngModel\"\n type=\"text\"\n class=\"border-0 p-0 focus-none text-end\"\n siDateInput\n [ngModel]=\"value()?.end ?? null\"\n [siDatepickerConfig]=\"siDatepickerConfig()\"\n [placeholder]=\"endDatePlaceholder() | translate\"\n [attr.aria-label]=\"endDatePlaceholder() | translate\"\n [errormessageId]=\"errormessageId()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (ngModelChange)=\"onInputChanged({ start: value()?.start, end: $event })\"\n/>\n<div class=\"form-control-actions\">\n <button\n #button\n type=\"button\"\n class=\"btn btn-icon btn-tertiary btn-sm\"\n [attr.aria-label]=\"ariaLabelCalendarButton() | translate\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"show()\"\n >\n <si-icon [icon]=\"icons.elementCalendar\" />\n </button>\n</div>\n", styles: [":host{display:block;min-inline-size:237px}:host(:focus-within:has(input:focus)){outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}input{flex-grow:1;background-color:transparent;min-inline-size:80px}input::placeholder{opacity:1;color:var(--element-text-secondary)}input:disabled,input[readonly]{background-color:var(--element-base-1);opacity:1}input:not([readonly]):focus::placeholder,input:focus:not([readonly]):focus::placeholder{color:transparent}.disabled,.disabled:hover,.disabled:focus{--border-color: var(--element-ui-3);color:var(--element-text-disabled)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: SiDateInputDirective, selector: "input[siDateInput]", inputs: ["id", "siDatepickerConfig", "disabled", "readonly", "errormessageId"], outputs: ["siDatepickerConfigChange", "siDatepickerDisabledTime", "stateChange", "dateChange"], exportAs: ["siDateInput"] }, { kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "ngmodule", type: A11yModule }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
4024
4145
|
}
|
|
4025
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDateRangeComponent, decorators: [{
|
|
4026
4147
|
type: Component,
|
|
4027
4148
|
args: [{ selector: 'si-date-range', imports: [FormsModule, SiDateInputDirective, SiIconComponent, SiTranslatePipe, A11yModule], providers: [
|
|
4028
4149
|
{
|
|
@@ -4039,7 +4160,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
4039
4160
|
provide: SI_FORM_ITEM_CONTROL,
|
|
4040
4161
|
useExisting: SiDateRangeComponent
|
|
4041
4162
|
}
|
|
4042
|
-
], changeDetection: ChangeDetectionStrategy.
|
|
4163
|
+
], changeDetection: ChangeDetectionStrategy.Eager, host: {
|
|
4043
4164
|
class: 'form-control d-flex align-items-center',
|
|
4044
4165
|
role: 'group',
|
|
4045
4166
|
'[class.disabled]': 'disabled()',
|
|
@@ -4084,13 +4205,16 @@ class SiCalendarButtonComponent {
|
|
|
4084
4205
|
* t(() => $localize`:@@SI_DATEPICKER.CALENDAR_TOGGLE_BUTTON:Open calendar`)
|
|
4085
4206
|
* ```
|
|
4086
4207
|
*/
|
|
4087
|
-
ariaLabel = input(t(() => $localize `:@@SI_DATEPICKER.CALENDAR_TOGGLE_BUTTON:Open calendar`),
|
|
4208
|
+
ariaLabel = input(t(() => $localize `:@@SI_DATEPICKER.CALENDAR_TOGGLE_BUTTON:Open calendar`), /* @ts-ignore */
|
|
4209
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
4088
4210
|
button = viewChild.required('calendarButton');
|
|
4089
4211
|
/** Datepicker input directive instance used to watch for state changes and required to open the calendar. */
|
|
4090
4212
|
datepicker = contentChild.required(SiDatepickerDirective);
|
|
4091
4213
|
datepickerOverlay = contentChild.required(SiDatepickerOverlayDirective);
|
|
4092
|
-
ngControl = contentChild(NgControl,
|
|
4093
|
-
|
|
4214
|
+
ngControl = contentChild(NgControl, /* @ts-ignore */
|
|
4215
|
+
...(ngDevMode ? [{ debugName: "ngControl" }] : /* istanbul ignore next */ []));
|
|
4216
|
+
disabled = signal(false, /* @ts-ignore */
|
|
4217
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
4094
4218
|
icons = addIcons({ elementCalendar });
|
|
4095
4219
|
destroyerRef = inject(DestroyRef);
|
|
4096
4220
|
focusMonitor = inject(FocusMonitor);
|
|
@@ -4118,8 +4242,8 @@ class SiCalendarButtonComponent {
|
|
|
4118
4242
|
const datepicker = this.datepicker();
|
|
4119
4243
|
this.disabled.set(datepicker.disabled() || datepicker.readonly());
|
|
4120
4244
|
}
|
|
4121
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4122
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
4245
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCalendarButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4246
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: SiCalendarButtonComponent, isStandalone: true, selector: "si-calendar-button", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "d-inline-block position-relative form-control-wrapper" }, queries: [{ propertyName: "datepicker", first: true, predicate: SiDatepickerDirective, descendants: true, isSignal: true }, { propertyName: "datepickerOverlay", first: true, predicate: SiDatepickerOverlayDirective, descendants: true, isSignal: true }, { propertyName: "ngControl", first: true, predicate: NgControl, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "button", first: true, predicate: ["calendarButton"], descendants: true, isSignal: true }], ngImport: i0, template: `<ng-content />
|
|
4123
4247
|
<div class="form-control-actions">
|
|
4124
4248
|
<button
|
|
4125
4249
|
#calendarButton
|
|
@@ -4132,9 +4256,9 @@ class SiCalendarButtonComponent {
|
|
|
4132
4256
|
>
|
|
4133
4257
|
<si-icon [icon]="icons.elementCalendar" />
|
|
4134
4258
|
</button>
|
|
4135
|
-
</div>`, isInline: true, styles: [":host{--si-action-icon-offset: calc(1.25rem + 6px) }\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }]
|
|
4259
|
+
</div>`, isInline: true, styles: [":host{--si-action-icon-offset: calc(1.25rem + 6px) }\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
4136
4260
|
}
|
|
4137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCalendarButtonComponent, decorators: [{
|
|
4138
4262
|
type: Component,
|
|
4139
4263
|
args: [{ selector: 'si-calendar-button', imports: [SiIconComponent, SiTranslatePipe], template: `<ng-content />
|
|
4140
4264
|
<div class="form-control-actions">
|
|
@@ -4149,7 +4273,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
4149
4273
|
>
|
|
4150
4274
|
<si-icon [icon]="icons.elementCalendar" />
|
|
4151
4275
|
</button>
|
|
4152
|
-
</div>`,
|
|
4276
|
+
</div>`, host: {
|
|
4153
4277
|
class: 'd-inline-block position-relative form-control-wrapper'
|
|
4154
4278
|
}, styles: [":host{--si-action-icon-offset: calc(1.25rem + 6px) }\n"] }]
|
|
4155
4279
|
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], button: [{ type: i0.ViewChild, args: ['calendarButton', { isSignal: true }] }], datepicker: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SiDatepickerDirective), { isSignal: true }] }], datepickerOverlay: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SiDatepickerOverlayDirective), { isSignal: true }] }], ngControl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => NgControl), { isSignal: true }] }] } });
|
|
@@ -4159,8 +4283,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
4159
4283
|
* SPDX-License-Identifier: MIT
|
|
4160
4284
|
*/
|
|
4161
4285
|
class SiDatepickerModule {
|
|
4162
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4163
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
4286
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4287
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerModule, imports: [SiCalendarButtonComponent,
|
|
4164
4288
|
SiDateInputDirective,
|
|
4165
4289
|
SiDatepickerComponent,
|
|
4166
4290
|
SiDatepickerDirective,
|
|
@@ -4171,12 +4295,12 @@ class SiDatepickerModule {
|
|
|
4171
4295
|
SiDatepickerDirective,
|
|
4172
4296
|
SiDateRangeComponent,
|
|
4173
4297
|
SiTimepickerComponent] });
|
|
4174
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4298
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerModule, imports: [SiCalendarButtonComponent,
|
|
4175
4299
|
SiDatepickerComponent,
|
|
4176
4300
|
SiDateRangeComponent,
|
|
4177
4301
|
SiTimepickerComponent] });
|
|
4178
4302
|
}
|
|
4179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiDatepickerModule, decorators: [{
|
|
4180
4304
|
type: NgModule,
|
|
4181
4305
|
args: [{
|
|
4182
4306
|
imports: [
|