@lucca-front/ng 21.2.2 → 21.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/lucca-front-ng-a11y.mjs +4 -4
- package/fesm2022/lucca-front-ng-a11y.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-activity-feed.mjs +26 -21
- package/fesm2022/lucca-front-ng-activity-feed.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-api.mjs +46 -41
- package/fesm2022/lucca-front-ng-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-app-layout.mjs +4 -4
- package/fesm2022/lucca-front-ng-app-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-box.mjs +7 -7
- package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs +10 -10
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-bubble-icon.mjs +18 -12
- package/fesm2022/lucca-front-ng-bubble-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-bubble-illustration.mjs +16 -11
- package/fesm2022/lucca-front-ng-bubble-illustration.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-callout.mjs +76 -70
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-chip.mjs +22 -16
- package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-clear.mjs +15 -10
- package/fesm2022/lucca-front-ng-clear.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-code.mjs +5 -5
- package/fesm2022/lucca-front-ng-code.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-color.mjs +13 -8
- package/fesm2022/lucca-front-ng-color.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-comment.mjs +37 -32
- package/fesm2022/lucca-front-ng-comment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-container.mjs +13 -8
- package/fesm2022/lucca-front-ng-container.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-api.mjs +13 -13
- package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-department.mjs +21 -15
- package/fesm2022/lucca-front-ng-core-select-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs +15 -15
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +9 -9
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs +6 -6
- package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-user.mjs +50 -45
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +90 -90
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core.mjs +18 -18
- package/fesm2022/lucca-front-ng-core.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-data-table.mjs +95 -80
- package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date.mjs +42 -42
- package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +133 -126
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-department.mjs +25 -25
- package/fesm2022/lucca-front-ng-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +61 -43
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-divider.mjs +14 -9
- package/fesm2022/lucca-front-ng-divider.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dropdown.mjs +43 -43
- package/fesm2022/lucca-front-ng-dropdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-empty-state.mjs +41 -35
- package/fesm2022/lucca-front-ng-empty-state.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-error-page.mjs +12 -7
- package/fesm2022/lucca-front-ng-error-page.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-establishment.mjs +34 -34
- package/fesm2022/lucca-front-ng-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-fancy-box.mjs +16 -11
- package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-file-upload.mjs +84 -64
- package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills.mjs +61 -88
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-footer.mjs +17 -11
- package/fesm2022/lucca-front-ng-footer.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +94 -76
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-header.mjs +10 -5
- package/fesm2022/lucca-front-ng-form-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-label.mjs +18 -13
- package/fesm2022/lucca-front-ng-form-label.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form.mjs +11 -8
- package/fesm2022/lucca-front-ng-form.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-formly.mjs +58 -58
- package/fesm2022/lucca-front-ng-formly.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +46 -41
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-html.mjs +3 -3
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-html.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs +8 -9
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs +3 -3
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +94 -92
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +212 -153
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-gauge.mjs +19 -19
- package/fesm2022/lucca-front-ng-gauge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-grid.mjs +38 -26
- package/fesm2022/lucca-front-ng-grid.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-data.mjs +39 -17
- package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-text.mjs +26 -0
- package/fesm2022/lucca-front-ng-highlight-text.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs +165 -20
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-impersonation.mjs +119 -0
- package/fesm2022/lucca-front-ng-impersonation.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-index-table.mjs +69 -63
- package/fesm2022/lucca-front-ng-index-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs +15 -8
- package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-input.mjs +22 -22
- package/fesm2022/lucca-front-ng-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-link.mjs +12 -12
- package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listbox.mjs +32 -27
- package/fesm2022/lucca-front-ng-listbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listing.mjs +21 -21
- package/fesm2022/lucca-front-ng-listing.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-loading.mjs +14 -9
- package/fesm2022/lucca-front-ng-loading.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-main-layout.mjs +9 -9
- package/fesm2022/lucca-front-ng-main-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-mobile-push.mjs +5 -5
- package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-modal.mjs +23 -23
- package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +113 -95
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-new-badge.mjs +4 -4
- package/fesm2022/lucca-front-ng-new-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-number-format.mjs +10 -10
- package/fesm2022/lucca-front-ng-number-format.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-number.mjs +7 -7
- package/fesm2022/lucca-front-ng-number.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-numeric-badge.mjs +18 -13
- package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-option.mjs +130 -130
- package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-page-header.mjs +9 -9
- package/fesm2022/lucca-front-ng-page-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-pagination.mjs +17 -12
- package/fesm2022/lucca-front-ng-pagination.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs +9 -9
- package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover.mjs +17 -17
- package/fesm2022/lucca-front-ng-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +16 -16
- package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popup.mjs +10 -10
- package/fesm2022/lucca-front-ng-popup.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-progress-bar.mjs +13 -8
- package/fesm2022/lucca-front-ng-progress-bar.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-progress-stepper.mjs +18 -13
- package/fesm2022/lucca-front-ng-progress-stepper.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-read-more.mjs +24 -19
- package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-resource-card.mjs +28 -22
- package/fesm2022/lucca-front-ng-resource-card.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-safe-content.mjs +10 -10
- package/fesm2022/lucca-front-ng-safe-content.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll-box.mjs +6 -6
- package/fesm2022/lucca-front-ng-scroll-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll.mjs +8 -8
- package/fesm2022/lucca-front-ng-scroll.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +22 -16
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control.mjs +11 -11
- package/fesm2022/lucca-front-ng-segmented-control.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-select.mjs +14 -14
- package/fesm2022/lucca-front-ng-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-sidepanel.mjs +7 -7
- package/fesm2022/lucca-front-ng-sidepanel.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select.mjs +37 -36
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-skeleton.mjs +82 -56
- package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs +84 -0
- package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-software-icon.mjs +34 -23
- package/fesm2022/lucca-front-ng-software-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-sortable-list.mjs +14 -14
- package/fesm2022/lucca-front-ng-sortable-list.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-status-badge.mjs +13 -8
- package/fesm2022/lucca-front-ng-status-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-table-of-content.mjs +7 -7
- package/fesm2022/lucca-front-ng-table-of-content.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tag.mjs +19 -14
- package/fesm2022/lucca-front-ng-tag.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-text-flow.mjs +4 -4
- package/fesm2022/lucca-front-ng-text-flow.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-time.mjs +362 -115
- package/fesm2022/lucca-front-ng-time.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-title.mjs +10 -10
- package/fesm2022/lucca-front-ng-title.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-toast.mjs +14 -14
- package/fesm2022/lucca-front-ng-toast.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tooltip.mjs +35 -35
- package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tree-select.mjs +16 -16
- package/fesm2022/lucca-front-ng-tree-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user-popover.mjs +22 -21
- package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user.mjs +122 -100
- package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs +27 -27
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs.map +1 -1
- package/package.json +18 -5
- package/schematics/lib/local-deps/package-lock.json +17 -79
- package/schematics/lib/local-deps/package.json +1 -1
- package/schematics/palettes/index.js +1 -0
- package/src/components/_picker.scss +2 -1
- package/types/lucca-front-ng-activity-feed.d.ts +8 -1
- package/types/lucca-front-ng-api.d.ts +22 -16
- package/types/lucca-front-ng-bubble-icon.d.ts +10 -1
- package/types/lucca-front-ng-bubble-illustration.d.ts +10 -4
- package/types/lucca-front-ng-callout.d.ts +21 -13
- package/types/lucca-front-ng-chip.d.ts +10 -1
- package/types/lucca-front-ng-clear.d.ts +8 -2
- package/types/lucca-front-ng-color.d.ts +8 -1
- package/types/lucca-front-ng-comment.d.ts +8 -1
- package/types/lucca-front-ng-container.d.ts +8 -1
- package/types/lucca-front-ng-core-select-department.d.ts +4 -0
- package/types/lucca-front-ng-core-select-user.d.ts +3 -2
- package/types/lucca-front-ng-core-select.d.ts +6 -6
- package/types/lucca-front-ng-core.d.ts +1 -1
- package/types/lucca-front-ng-data-table.d.ts +12 -1
- package/types/lucca-front-ng-date2.d.ts +17 -9
- package/types/lucca-front-ng-dialog.d.ts +14 -3
- package/types/lucca-front-ng-divider.d.ts +8 -1
- package/types/lucca-front-ng-empty-state.d.ts +15 -7
- package/types/lucca-front-ng-error-page.d.ts +9 -4
- package/types/lucca-front-ng-fancy-box.d.ts +8 -1
- package/types/lucca-front-ng-file-upload.d.ts +20 -4
- package/types/lucca-front-ng-filter-pills.d.ts +4 -9
- package/types/lucca-front-ng-footer.d.ts +11 -2
- package/types/lucca-front-ng-form-field.d.ts +35 -18
- package/types/lucca-front-ng-form-header.d.ts +8 -1
- package/types/lucca-front-ng-form-label.d.ts +8 -1
- package/types/lucca-front-ng-form.d.ts +2 -0
- package/types/lucca-front-ng-forms-phone-number-input.d.ts +19 -12
- package/types/lucca-front-ng-forms-rich-text-input.d.ts +1 -0
- package/types/lucca-front-ng-forms.d.ts +82 -30
- package/types/lucca-front-ng-grid.d.ts +23 -8
- package/types/lucca-front-ng-highlight-data.d.ts +16 -1
- package/types/lucca-front-ng-highlight-text.d.ts +12 -0
- package/types/lucca-front-ng-horizontal-navigation.d.ts +40 -3
- package/types/lucca-front-ng-impersonation.d.ts +33 -0
- package/types/lucca-front-ng-index-table.d.ts +10 -1
- package/types/lucca-front-ng-inline-message.d.ts +11 -4
- package/types/lucca-front-ng-listbox.d.ts +8 -1
- package/types/lucca-front-ng-loading.d.ts +8 -1
- package/types/lucca-front-ng-multi-select.d.ts +3 -1
- package/types/lucca-front-ng-numeric-badge.d.ts +8 -1
- package/types/lucca-front-ng-pagination.d.ts +8 -1
- package/types/lucca-front-ng-progress-bar.d.ts +9 -2
- package/types/lucca-front-ng-progress-stepper.d.ts +8 -1
- package/types/lucca-front-ng-read-more.d.ts +8 -1
- package/types/lucca-front-ng-resource-card.d.ts +10 -1
- package/types/lucca-front-ng-segmented-control-tabs.d.ts +2 -0
- package/types/lucca-front-ng-segmented-control.d.ts +4 -2
- package/types/lucca-front-ng-simple-select.d.ts +3 -2
- package/types/lucca-front-ng-skeleton.d.ts +30 -10
- package/types/lucca-front-ng-software-icon-wrapper.d.ts +31 -0
- package/types/lucca-front-ng-software-icon.d.ts +17 -6
- package/types/lucca-front-ng-status-badge.d.ts +8 -1
- package/types/lucca-front-ng-tag.d.ts +8 -1
- package/types/lucca-front-ng-time.d.ts +87 -8
- package/types/lucca-front-ng-user.d.ts +19 -5
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, model, viewChild, computed, ChangeDetectionStrategy, Component, output, Directive, numberAttribute, booleanAttribute, LOCALE_ID, ViewChild, Inject, InjectionToken, forwardRef, ViewEncapsulation, inject } from '@angular/core';
|
|
2
|
+
import { input, model, viewChild, computed, ChangeDetectionStrategy, Component, output, Directive, numberAttribute, booleanAttribute, LOCALE_ID, ViewChild, Inject, InjectionToken, signal, forwardRef, ViewEncapsulation, inject, Injector } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
|
-
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
4
|
+
import { NG_VALUE_ACCESSOR, FormsModule, NgControl, NgModel, NG_VALIDATORS } from '@angular/forms';
|
|
5
5
|
import { isNotNil, ɵeffectWithDeps as _effectWithDeps, intlInputOptions, isNil } from '@lucca-front/ng/core';
|
|
6
6
|
import { formatNumber } from '@angular/common';
|
|
7
|
-
import { InputDirective } from '@lucca-front/ng/form-field';
|
|
7
|
+
import { InputDirective, FORM_FIELD_INSTANCE, ɵPresentationDisplayDefaultDirective as _PresentationDisplayDefaultDirective } from '@lucca-front/ng/form-field';
|
|
8
8
|
import { FormLabelComponent } from '@lucca-front/ng/form-label';
|
|
9
|
+
import { IconComponent } from '@lucca/prisme/icon';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Available BasePickerComponent sizes
|
|
13
|
+
*/
|
|
14
|
+
const BASE_PICKER_SIZE = ['S', 'M'];
|
|
9
15
|
|
|
10
16
|
class BasePickerComponent {
|
|
11
17
|
constructor() {
|
|
12
|
-
this.step = input(null, ...(ngDevMode ? [{ debugName: "step" }] : []));
|
|
13
|
-
this.disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
14
|
-
this.size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
15
|
-
this.hoursPart = viewChild('hoursPart', ...(ngDevMode ? [{ debugName: "hoursPart" }] : []));
|
|
16
|
-
this.minutesPart = viewChild('minutesPart', ...(ngDevMode ? [{ debugName: "minutesPart" }] : []));
|
|
17
|
-
this.hoursIncrement = computed(() => this.getHoursIncrement(), ...(ngDevMode ? [{ debugName: "hoursIncrement" }] : []));
|
|
18
|
-
this.minutesIncrement = computed(() => this.getMinutesIncrement(), ...(ngDevMode ? [{ debugName: "minutesIncrement" }] : []));
|
|
18
|
+
this.step = input(null, ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
19
|
+
this.disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
20
|
+
this.size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
|
|
21
|
+
this.hoursPart = viewChild('hoursPart', ...(ngDevMode ? [{ debugName: "hoursPart" }] : /* istanbul ignore next */ []));
|
|
22
|
+
this.minutesPart = viewChild('minutesPart', ...(ngDevMode ? [{ debugName: "minutesPart" }] : /* istanbul ignore next */ []));
|
|
23
|
+
this.hoursIncrement = computed(() => this.getHoursIncrement(), ...(ngDevMode ? [{ debugName: "hoursIncrement" }] : /* istanbul ignore next */ []));
|
|
24
|
+
this.minutesIncrement = computed(() => this.getMinutesIncrement(), ...(ngDevMode ? [{ debugName: "minutesIncrement" }] : /* istanbul ignore next */ []));
|
|
19
25
|
}
|
|
20
26
|
registerOnChange(fn) {
|
|
21
27
|
this.onChange = fn;
|
|
@@ -38,10 +44,10 @@ class BasePickerComponent {
|
|
|
38
44
|
this.minutesPart()?.focus();
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
42
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: BasePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
48
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.15", type: BasePickerComponent, isStandalone: true, selector: "ng-component", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange" }, viewQueries: [{ propertyName: "hoursPart", first: true, predicate: ["hoursPart"], descendants: true, isSignal: true }, { propertyName: "minutesPart", first: true, predicate: ["minutesPart"], descendants: true, isSignal: true }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
43
49
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: BasePickerComponent, decorators: [{
|
|
45
51
|
type: Component,
|
|
46
52
|
args: [{
|
|
47
53
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -49,6 +55,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
49
55
|
}]
|
|
50
56
|
}], propDecorators: { step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hoursPart: [{ type: i0.ViewChild, args: ['hoursPart', { isSignal: true }] }], minutesPart: [{ type: i0.ViewChild, args: ['minutesPart', { isSignal: true }] }] } });
|
|
51
57
|
|
|
58
|
+
const MAX_TIME = '23:59:59';
|
|
59
|
+
const DEFAULT_TIME_VALUE = '––:––:––';
|
|
52
60
|
const ISO8601DurationRegExp = /^(?<sign>-)?P(?:(?<years>-?\d+)Y)?(?:(?<months>-?\d+)M)?(?:(?<weeks>-?\d+)W)?(?:(?<days>-?\d+)D)?(?:T(?:(?<hours>-?\d+)H)?(?:(?<minutes>-?\d+)M)?(?:(?<seconds>-?\d+(?:\.\d+)?)S)?)?$/;
|
|
53
61
|
// TODO memoize
|
|
54
62
|
const isoDurationToDateFnsDuration = (isoDuration) => {
|
|
@@ -99,9 +107,25 @@ const getHoursPartFromDuration = (duration) => {
|
|
|
99
107
|
const getMinutesPartFromDuration = (duration) => {
|
|
100
108
|
return Math.floor((isoDurationToSeconds(duration) % 3600) / 60);
|
|
101
109
|
};
|
|
110
|
+
const getTotalSeconds = (time) => {
|
|
111
|
+
const [hours, minutes, seconds] = time.split(':').map(Number);
|
|
112
|
+
return hours * 3600 + minutes * 60 + seconds;
|
|
113
|
+
};
|
|
102
114
|
const createDurationFromHoursAndMinutes = (hours, minutes) => {
|
|
103
115
|
return `PT${hours}H${minutes}M`;
|
|
104
116
|
};
|
|
117
|
+
const isValidTimeRangePicker = (time) => {
|
|
118
|
+
if (isNotNil(time?.end) && isNotNil(time?.start)) {
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
return false;
|
|
122
|
+
};
|
|
123
|
+
const isEndTimeBeforeStartTime = (time) => {
|
|
124
|
+
if (isNotNil(time?.end) && isNotNil(time?.start)) {
|
|
125
|
+
return getTotalSeconds(time.end) < getTotalSeconds(time.start);
|
|
126
|
+
}
|
|
127
|
+
return false;
|
|
128
|
+
};
|
|
105
129
|
|
|
106
130
|
const roundToNearest = (value, step) => Math.round(value / step) * step;
|
|
107
131
|
const floorToNearest = (value, step) => Math.floor(value / step) * step;
|
|
@@ -178,10 +202,10 @@ class RepeatOnHoldDirective {
|
|
|
178
202
|
window.removeEventListener('mouseup', this.onWindowMouseUp);
|
|
179
203
|
this.cancelAnimationFrame();
|
|
180
204
|
}
|
|
181
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
182
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
205
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: RepeatOnHoldDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
206
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.15", type: RepeatOnHoldDirective, isStandalone: true, selector: "[luRepeatOnHold]", outputs: { hold: "hold" }, ngImport: i0 }); }
|
|
183
207
|
}
|
|
184
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: RepeatOnHoldDirective, decorators: [{
|
|
185
209
|
type: Directive,
|
|
186
210
|
args: [{
|
|
187
211
|
selector: '[luRepeatOnHold]',
|
|
@@ -192,23 +216,24 @@ let nextId$1 = 0;
|
|
|
192
216
|
class TimePickerPartComponent {
|
|
193
217
|
constructor(locale) {
|
|
194
218
|
this.locale = locale;
|
|
195
|
-
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
196
|
-
this.decimalConf = input('2.0-0', ...(ngDevMode ? [{ debugName: "decimalConf" }] : []));
|
|
197
|
-
this.value = model('––', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
198
|
-
this.display = input(...(ngDevMode ? [undefined, { debugName: "display" }] : []));
|
|
199
|
-
this.max = input(0, { ...(ngDevMode ? { debugName: "max" } : {}), transform: numberAttribute });
|
|
200
|
-
this.autoWidth = input(false, { ...(ngDevMode ? { debugName: "autoWidth" } : {}), transform: booleanAttribute });
|
|
201
|
-
this.displayArrows = input(false, { ...(ngDevMode ? { debugName: "displayArrows" } : {}), transform: booleanAttribute });
|
|
202
|
-
this.isReadonly = input(false, { ...(ngDevMode ? { debugName: "isReadonly" } : {}), transform: booleanAttribute });
|
|
203
|
-
this.hideValue = input(false, { ...(ngDevMode ? { debugName: "hideValue" } : {}), transform: booleanAttribute });
|
|
204
|
-
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
205
|
-
this.focused = input(false, { ...(ngDevMode ? { debugName: "focused" } : {}), transform: booleanAttribute });
|
|
206
|
-
this.maxDigits = input(2, ...(ngDevMode ? [{ debugName: "maxDigits" }] : []));
|
|
207
|
-
this.showZero = input(false, { ...(ngDevMode ? { debugName: "showZero" } : {}), transform: booleanAttribute });
|
|
208
|
-
this.digitNumber = model(2, ...(ngDevMode ? [{ debugName: "digitNumber" }] : []));
|
|
209
|
-
this.isValueSet = model(false, ...(ngDevMode ? [{ debugName: "isValueSet" }] : []));
|
|
219
|
+
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
220
|
+
this.decimalConf = input('2.0-0', ...(ngDevMode ? [{ debugName: "decimalConf" }] : /* istanbul ignore next */ []));
|
|
221
|
+
this.value = model('––', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
222
|
+
this.display = input(...(ngDevMode ? [undefined, { debugName: "display" }] : /* istanbul ignore next */ []));
|
|
223
|
+
this.max = input(0, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
224
|
+
this.autoWidth = input(false, { ...(ngDevMode ? { debugName: "autoWidth" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
225
|
+
this.displayArrows = input(false, { ...(ngDevMode ? { debugName: "displayArrows" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
226
|
+
this.isReadonly = input(false, { ...(ngDevMode ? { debugName: "isReadonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
227
|
+
this.hideValue = input(false, { ...(ngDevMode ? { debugName: "hideValue" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
228
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
229
|
+
this.focused = input(false, { ...(ngDevMode ? { debugName: "focused" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
230
|
+
this.maxDigits = input(2, ...(ngDevMode ? [{ debugName: "maxDigits" }] : /* istanbul ignore next */ []));
|
|
231
|
+
this.showZero = input(false, { ...(ngDevMode ? { debugName: "showZero" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
232
|
+
this.digitNumber = model(2, ...(ngDevMode ? [{ debugName: "digitNumber" }] : /* istanbul ignore next */ []));
|
|
233
|
+
this.isValueSet = model(false, ...(ngDevMode ? [{ debugName: "isValueSet" }] : /* istanbul ignore next */ []));
|
|
210
234
|
this.prevRequest = output();
|
|
211
235
|
this.nextRequest = output();
|
|
236
|
+
this.nonDigitKeyPressed = output();
|
|
212
237
|
this.inputControlClick = output();
|
|
213
238
|
this.touched = output();
|
|
214
239
|
this.valueLabel = computed(() => {
|
|
@@ -227,7 +252,8 @@ class TimePickerPartComponent {
|
|
|
227
252
|
const label = this.isValueSet() ? formattedNumber : '';
|
|
228
253
|
// remove trailing 0 when value is not 0 or showZero is false
|
|
229
254
|
return this.showZero() ? label : label.replace(/^0/, '');
|
|
230
|
-
}, ...(ngDevMode ? [{ debugName: "valueLabel" }] : []));
|
|
255
|
+
}, ...(ngDevMode ? [{ debugName: "valueLabel" }] : /* istanbul ignore next */ []));
|
|
256
|
+
this.currentValue = computed(() => (this.hideValue() || !this.isValueSet() ? null : this.value()), ...(ngDevMode ? [{ debugName: "currentValue" }] : /* istanbul ignore next */ []));
|
|
231
257
|
this.inputId = `time-picker-part-${nextId$1++}`;
|
|
232
258
|
_effectWithDeps([this.valueLabel], (valueLabel) => {
|
|
233
259
|
if (valueLabel) {
|
|
@@ -252,6 +278,7 @@ class TimePickerPartComponent {
|
|
|
252
278
|
return;
|
|
253
279
|
}
|
|
254
280
|
if (event.data && /\D+/.test(event.data)) {
|
|
281
|
+
this.nonDigitKeyPressed.emit();
|
|
255
282
|
event.target.value = String(this.value());
|
|
256
283
|
return;
|
|
257
284
|
}
|
|
@@ -322,47 +349,47 @@ class TimePickerPartComponent {
|
|
|
322
349
|
this.timePickerInput.nativeElement.focus();
|
|
323
350
|
}
|
|
324
351
|
}
|
|
325
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
326
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
352
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: TimePickerPartComponent, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
353
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: TimePickerPartComponent, isStandalone: true, selector: "lu-time-picker-part", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, decimalConf: { classPropertyName: "decimalConf", publicName: "decimalConf", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, autoWidth: { classPropertyName: "autoWidth", publicName: "autoWidth", isSignal: true, isRequired: false, transformFunction: null }, displayArrows: { classPropertyName: "displayArrows", publicName: "displayArrows", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, hideValue: { classPropertyName: "hideValue", publicName: "hideValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, focused: { classPropertyName: "focused", publicName: "focused", isSignal: true, isRequired: false, transformFunction: null }, maxDigits: { classPropertyName: "maxDigits", publicName: "maxDigits", isSignal: true, isRequired: false, transformFunction: null }, showZero: { classPropertyName: "showZero", publicName: "showZero", isSignal: true, isRequired: false, transformFunction: null }, digitNumber: { classPropertyName: "digitNumber", publicName: "digitNumber", isSignal: true, isRequired: false, transformFunction: null }, isValueSet: { classPropertyName: "isValueSet", publicName: "isValueSet", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", digitNumber: "digitNumberChange", isValueSet: "isValueSetChange", prevRequest: "prevRequest", nextRequest: "nextRequest", nonDigitKeyPressed: "nonDigitKeyPressed", inputControlClick: "inputControlClick", touched: "touched" }, viewQueries: [{ propertyName: "timePickerInput", first: true, predicate: ["timePickerInput"], descendants: true }], ngImport: i0, template: "<div class=\"timePicker-fieldset-group-textfield\">\n\t<label luFormLabel class=\"pr-u-mask\" [attr.id]=\"`${inputId}-label`\" [attr.for]=\"`${inputId}-input`\">{{ label() }}</label>\n\t<div class=\"timePicker-fieldset-group-textfield\">\n\t\t<input\n\t\t\t#timePickerInput\n\t\t\ttype=\"text\"\n\t\t\tluInput\n\t\t\tluInputStandalone\n\t\t\tinputmode=\"numeric\"\n\t\t\t[attr.id]=\"inputId + '-input'\"\n\t\t\tclass=\"timePicker-fieldset-group-textfield-input\"\n\t\t\t[attr.aria-labelledby]=\"inputId + '-label'\"\n\t\t\tautocomplete=\"off\"\n\t\t\t[value]=\"currentValue()\"\n\t\t\t(input)=\"keysInputHandler($event)\"\n\t\t\t(click)=\"clickHandler($event)\"\n\t\t\t(keydown)=\"keydownHandler($event)\"\n\t\t\t(blur)=\"touched.emit()\"\n\t\t\t(focus)=\"timePickerInput.select()\"\n\t\t\t[style]=\"'--components-timepicker-input-digits:' + digitNumber()\"\n\t\t/>\n\t\t<span aria-hidden=\"true\" class=\"timePicker-fieldset-group-textfield-display\" [attr.data-content-before]=\"valueLabel()\"></span>\n\t</div>\n\t@if (displayArrows()) {\n\t\t<button class=\"timePicker-fieldset-group-stepper\" type=\"button\" tabindex=\"-1\" aria-hidden=\"true\" luRepeatOnHold (hold)=\"up()\">\n\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-northArrow\"></span>\n\t\t\t<span class=\"pr-u-mask\">\u2212</span>\n\t\t</button>\n\t\t<button class=\"timePicker-fieldset-group-stepper\" type=\"button\" tabindex=\"-1\" aria-hidden=\"true\" luRepeatOnHold (hold)=\"down()\">\n\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-southArrow\"></span>\n\t\t\t<span class=\"pr-u-mask\">+</span>\n\t\t</button>\n\t}\n</div>\n", dependencies: [{ kind: "directive", type: RepeatOnHoldDirective, selector: "[luRepeatOnHold]", outputs: ["hold"] }, { kind: "directive", type: InputDirective, selector: "[luInput]", inputs: ["luInputStandalone"] }, { kind: "component", type: FormLabelComponent, selector: "label[luFormLabel], legend[luFormLabel]", inputs: ["intl", "required", "error", "tooltip", "tag", "size", "counterStatus", "counterMax", "counterId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
327
354
|
}
|
|
328
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: TimePickerPartComponent, decorators: [{
|
|
329
356
|
type: Component,
|
|
330
|
-
args: [{ selector: 'lu-time-picker-part', imports: [RepeatOnHoldDirective, InputDirective, FormLabelComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"timePicker-fieldset-group-textfield\">\n\t<label luFormLabel class=\"pr-u-mask\" [attr.id]=\"`${inputId}-label`\" [attr.for]=\"`${inputId}-input`\">{{ label() }}</label>\n\t<div class=\"timePicker-fieldset-group-textfield\">\n\t\t<input\n\t\t\t#timePickerInput\n\t\t\ttype=\"text\"\n\t\t\tluInput\n\t\t\tluInputStandalone\n\t\t\tinputmode=\"numeric\"\n\t\t\t[attr.id]=\"inputId + '-input'\"\n\t\t\tclass=\"timePicker-fieldset-group-textfield-input\"\n\t\t\t[attr.aria-labelledby]=\"inputId + '-label'\"\n\t\t\tautocomplete=\"off\"\n\t\t\t[value]=\"
|
|
357
|
+
args: [{ selector: 'lu-time-picker-part', imports: [RepeatOnHoldDirective, InputDirective, FormLabelComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"timePicker-fieldset-group-textfield\">\n\t<label luFormLabel class=\"pr-u-mask\" [attr.id]=\"`${inputId}-label`\" [attr.for]=\"`${inputId}-input`\">{{ label() }}</label>\n\t<div class=\"timePicker-fieldset-group-textfield\">\n\t\t<input\n\t\t\t#timePickerInput\n\t\t\ttype=\"text\"\n\t\t\tluInput\n\t\t\tluInputStandalone\n\t\t\tinputmode=\"numeric\"\n\t\t\t[attr.id]=\"inputId + '-input'\"\n\t\t\tclass=\"timePicker-fieldset-group-textfield-input\"\n\t\t\t[attr.aria-labelledby]=\"inputId + '-label'\"\n\t\t\tautocomplete=\"off\"\n\t\t\t[value]=\"currentValue()\"\n\t\t\t(input)=\"keysInputHandler($event)\"\n\t\t\t(click)=\"clickHandler($event)\"\n\t\t\t(keydown)=\"keydownHandler($event)\"\n\t\t\t(blur)=\"touched.emit()\"\n\t\t\t(focus)=\"timePickerInput.select()\"\n\t\t\t[style]=\"'--components-timepicker-input-digits:' + digitNumber()\"\n\t\t/>\n\t\t<span aria-hidden=\"true\" class=\"timePicker-fieldset-group-textfield-display\" [attr.data-content-before]=\"valueLabel()\"></span>\n\t</div>\n\t@if (displayArrows()) {\n\t\t<button class=\"timePicker-fieldset-group-stepper\" type=\"button\" tabindex=\"-1\" aria-hidden=\"true\" luRepeatOnHold (hold)=\"up()\">\n\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-northArrow\"></span>\n\t\t\t<span class=\"pr-u-mask\">\u2212</span>\n\t\t</button>\n\t\t<button class=\"timePicker-fieldset-group-stepper\" type=\"button\" tabindex=\"-1\" aria-hidden=\"true\" luRepeatOnHold (hold)=\"down()\">\n\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-southArrow\"></span>\n\t\t\t<span class=\"pr-u-mask\">+</span>\n\t\t</button>\n\t}\n</div>\n" }]
|
|
331
358
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
332
359
|
type: Inject,
|
|
333
360
|
args: [LOCALE_ID]
|
|
334
|
-
}] }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], decimalConf: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimalConf", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], autoWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoWidth", required: false }] }], displayArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayArrows", required: false }] }], isReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "isReadonly", required: false }] }], hideValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideValue", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], focused: [{ type: i0.Input, args: [{ isSignal: true, alias: "focused", required: false }] }], maxDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDigits", required: false }] }], showZero: [{ type: i0.Input, args: [{ isSignal: true, alias: "showZero", required: false }] }], digitNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "digitNumber", required: false }] }, { type: i0.Output, args: ["digitNumberChange"] }], isValueSet: [{ type: i0.Input, args: [{ isSignal: true, alias: "isValueSet", required: false }] }, { type: i0.Output, args: ["isValueSetChange"] }], prevRequest: [{ type: i0.Output, args: ["prevRequest"] }], nextRequest: [{ type: i0.Output, args: ["nextRequest"] }], inputControlClick: [{ type: i0.Output, args: ["inputControlClick"] }], touched: [{ type: i0.Output, args: ["touched"] }], timePickerInput: [{
|
|
361
|
+
}] }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], decimalConf: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimalConf", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], autoWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoWidth", required: false }] }], displayArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayArrows", required: false }] }], isReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "isReadonly", required: false }] }], hideValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideValue", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], focused: [{ type: i0.Input, args: [{ isSignal: true, alias: "focused", required: false }] }], maxDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDigits", required: false }] }], showZero: [{ type: i0.Input, args: [{ isSignal: true, alias: "showZero", required: false }] }], digitNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "digitNumber", required: false }] }, { type: i0.Output, args: ["digitNumberChange"] }], isValueSet: [{ type: i0.Input, args: [{ isSignal: true, alias: "isValueSet", required: false }] }, { type: i0.Output, args: ["isValueSetChange"] }], prevRequest: [{ type: i0.Output, args: ["prevRequest"] }], nextRequest: [{ type: i0.Output, args: ["nextRequest"] }], nonDigitKeyPressed: [{ type: i0.Output, args: ["nonDigitKeyPressed"] }], inputControlClick: [{ type: i0.Output, args: ["inputControlClick"] }], touched: [{ type: i0.Output, args: ["touched"] }], timePickerInput: [{
|
|
335
362
|
type: ViewChild,
|
|
336
363
|
args: ['timePickerInput']
|
|
337
364
|
}] } });
|
|
338
365
|
|
|
339
366
|
const DEFAULT_TIME_DECIMAL_PIPE_FORMAT$1 = '2.0-0';
|
|
340
367
|
|
|
341
|
-
const Translations$
|
|
368
|
+
const Translations$2 = {
|
|
342
369
|
pt: {
|
|
343
|
-
timePickerHours: '
|
|
370
|
+
timePickerHours: 'Horas',
|
|
344
371
|
timePickerTimeSeparator: 'h',
|
|
345
|
-
timePickerMinutes: '
|
|
372
|
+
timePickerMinutes: 'Minutos',
|
|
346
373
|
},
|
|
347
374
|
es: {
|
|
348
|
-
timePickerHours: '
|
|
375
|
+
timePickerHours: 'Horas',
|
|
349
376
|
timePickerTimeSeparator: 'h',
|
|
350
|
-
timePickerMinutes: '
|
|
377
|
+
timePickerMinutes: 'Minutos',
|
|
351
378
|
},
|
|
352
379
|
'nl-BE': {
|
|
353
|
-
timePickerHours: '
|
|
380
|
+
timePickerHours: 'Uren',
|
|
354
381
|
timePickerTimeSeparator: 'h',
|
|
355
|
-
timePickerMinutes: '
|
|
382
|
+
timePickerMinutes: 'Minuten',
|
|
356
383
|
},
|
|
357
384
|
nl: {
|
|
358
|
-
timePickerHours: '
|
|
385
|
+
timePickerHours: 'Uren',
|
|
359
386
|
timePickerTimeSeparator: 'h',
|
|
360
|
-
timePickerMinutes: '
|
|
387
|
+
timePickerMinutes: 'Minuten',
|
|
361
388
|
},
|
|
362
389
|
it: {
|
|
363
|
-
timePickerHours: '
|
|
390
|
+
timePickerHours: 'Ore',
|
|
364
391
|
timePickerTimeSeparator: 'h',
|
|
365
|
-
timePickerMinutes: '
|
|
392
|
+
timePickerMinutes: 'Minuti',
|
|
366
393
|
},
|
|
367
394
|
de: {
|
|
368
395
|
timePickerHours: 'Stunden',
|
|
@@ -370,56 +397,58 @@ const Translations$1 = {
|
|
|
370
397
|
timePickerMinutes: 'Minuten',
|
|
371
398
|
},
|
|
372
399
|
fr: {
|
|
373
|
-
timePickerHours: '
|
|
400
|
+
timePickerHours: 'Heures',
|
|
374
401
|
timePickerTimeSeparator: 'h',
|
|
375
|
-
timePickerMinutes: '
|
|
402
|
+
timePickerMinutes: 'Minutes',
|
|
376
403
|
},
|
|
377
404
|
en: {
|
|
378
|
-
timePickerHours: '
|
|
405
|
+
timePickerHours: 'Hours',
|
|
379
406
|
timePickerTimeSeparator: 'h',
|
|
380
|
-
timePickerMinutes: '
|
|
407
|
+
timePickerMinutes: 'Minutes',
|
|
381
408
|
},
|
|
382
409
|
};
|
|
383
410
|
|
|
384
411
|
const LU_DURATION_PICKER_TRANSLATIONS = new InjectionToken('LuDurationPickerTranslations', {
|
|
385
412
|
factory: () => luDurationPickerTranslations,
|
|
386
413
|
});
|
|
387
|
-
const luDurationPickerTranslations = Translations$
|
|
414
|
+
const luDurationPickerTranslations = Translations$2;
|
|
388
415
|
|
|
389
416
|
class DurationPickerComponent extends BasePickerComponent {
|
|
390
417
|
constructor() {
|
|
391
418
|
super(...arguments);
|
|
392
|
-
this.intl = input(...intlInputOptions(LU_DURATION_PICKER_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : []));
|
|
393
|
-
this.value = model('PT0S', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
394
|
-
this.max = input('PT99H', ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
395
|
-
this.displayArrows = input(false, { ...(ngDevMode ? { debugName: "displayArrows" } : {}), transform: booleanAttribute });
|
|
396
|
-
this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
397
|
-
this.hideZeroValue = input(false, { ...(ngDevMode ? { debugName: "hideZeroValue" } : {}), transform: booleanAttribute });
|
|
419
|
+
this.intl = input(...intlInputOptions(LU_DURATION_PICKER_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : /* istanbul ignore next */ []));
|
|
420
|
+
this.value = model('PT0S', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
421
|
+
this.max = input('PT99H', ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
422
|
+
this.displayArrows = input(false, { ...(ngDevMode ? { debugName: "displayArrows" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
423
|
+
this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
424
|
+
this.hideZeroValue = input(false, { ...(ngDevMode ? { debugName: "hideZeroValue" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
398
425
|
this.durationChange = output();
|
|
399
|
-
this.
|
|
400
|
-
this.
|
|
401
|
-
this.
|
|
426
|
+
this.keyPressed = signal(false, ...(ngDevMode ? [{ debugName: "keyPressed" }] : /* istanbul ignore next */ []));
|
|
427
|
+
this.hours = computed(() => getHoursPartFromDuration(this.value()), ...(ngDevMode ? [{ debugName: "hours" }] : /* istanbul ignore next */ []));
|
|
428
|
+
this.minutes = computed(() => getMinutesPartFromDuration(this.value()), ...(ngDevMode ? [{ debugName: "minutes" }] : /* istanbul ignore next */ []));
|
|
429
|
+
this.shouldHideValue = computed(() => this.hideZeroValue() && this.hours() === 0 && this.minutes() === 0, ...(ngDevMode ? [{ debugName: "shouldHideValue" }] : /* istanbul ignore next */ []));
|
|
402
430
|
this.maxDigits = computed(() => {
|
|
403
431
|
const maxISO = isoDurationToSeconds(this.max());
|
|
404
432
|
const maxHour = maxISO / 3600;
|
|
405
433
|
const maxHourDigits = maxHour.toString().length;
|
|
406
434
|
return maxHourDigits;
|
|
407
|
-
}, ...(ngDevMode ? [{ debugName: "maxDigits" }] : []));
|
|
435
|
+
}, ...(ngDevMode ? [{ debugName: "maxDigits" }] : /* istanbul ignore next */ []));
|
|
408
436
|
this.pickerClasses = computed(() => {
|
|
409
437
|
return {
|
|
410
438
|
timePicker: true,
|
|
411
439
|
'mod-stepper': this.displayArrows(),
|
|
412
440
|
'mod-stepperHover': this.displayArrows(),
|
|
413
441
|
[`mod-${this.size()}`]: Boolean(this.size()),
|
|
442
|
+
'pr-u-animatedShake': this.keyPressed(),
|
|
414
443
|
};
|
|
415
|
-
}, ...(ngDevMode ? [{ debugName: "pickerClasses" }] : []));
|
|
444
|
+
}, ...(ngDevMode ? [{ debugName: "pickerClasses" }] : /* istanbul ignore next */ []));
|
|
416
445
|
this.fieldsetSuffixClasses = computed(() => {
|
|
417
446
|
return {
|
|
418
447
|
'timePicker-fieldset-groupSeparator': true,
|
|
419
448
|
'pr-u-visibilityHidden': this.shouldHideValue(),
|
|
420
449
|
};
|
|
421
|
-
}, ...(ngDevMode ? [{ debugName: "fieldsetSuffixClasses" }] : []));
|
|
422
|
-
this.separator = computed(() => this.intl().timePickerTimeSeparator, ...(ngDevMode ? [{ debugName: "separator" }] : []));
|
|
450
|
+
}, ...(ngDevMode ? [{ debugName: "fieldsetSuffixClasses" }] : /* istanbul ignore next */ []));
|
|
451
|
+
this.separator = computed(() => this.intl().timePickerTimeSeparator, ...(ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []));
|
|
423
452
|
this.hoursDecimalConf = DEFAULT_TIME_DECIMAL_PIPE_FORMAT$1;
|
|
424
453
|
}
|
|
425
454
|
writeValue(value) {
|
|
@@ -563,16 +592,16 @@ class DurationPickerComponent extends BasePickerComponent {
|
|
|
563
592
|
this.focusPart('hours');
|
|
564
593
|
}
|
|
565
594
|
}
|
|
566
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
567
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
595
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: DurationPickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
596
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: DurationPickerComponent, isStandalone: true, selector: "lu-duration-picker", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, displayArrows: { classPropertyName: "displayArrows", publicName: "displayArrows", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hideZeroValue: { classPropertyName: "hideZeroValue", publicName: "hideZeroValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", durationChange: "durationChange" }, providers: [
|
|
568
597
|
{
|
|
569
598
|
provide: NG_VALUE_ACCESSOR,
|
|
570
599
|
useExisting: forwardRef(() => DurationPickerComponent),
|
|
571
600
|
multi: true,
|
|
572
601
|
},
|
|
573
|
-
], usesInheritance: true, ngImport: i0, template: "<div [class]=\"pickerClasses()\" (copy)=\"copyHandler($event)\" (paste)=\"pasteHandler($event)\">\n\t<fieldset class=\"timePicker-fieldset\" [disabled]=\"disabled()\">\n\t\t<legend>\n\t\t\t<span class=\"pr-u-mask\">{{ label() }}</span>\n\t\t</legend>\n\t\t<lu-time-picker-part\n\t\t\t#hoursPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[disabled]=\"disabled()\"\n\t\t\t[label]=\"intl().timePickerHours\"\n\t\t\t[value]=\"hours()\"\n\t\t\t[decimalConf]=\"hoursDecimalConf\"\n\t\t\t[hideValue]=\"shouldHideValue()\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t[maxDigits]=\"maxDigits()\"\n\t\t\t(valueChange)=\"hoursInputHandler($event)\"\n\t\t\t(nextRequest)=\"focusPart('minutes')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('hours', $event)\"\n\t\t/>\n\t\t<div aria-hidden=\"true\" [class]=\"fieldsetSuffixClasses()\"
|
|
602
|
+
], usesInheritance: true, ngImport: i0, template: "<div [class]=\"pickerClasses()\" (copy)=\"copyHandler($event)\" (paste)=\"pasteHandler($event)\" (animationend)=\"keyPressed.set(false)\">\n\t<fieldset class=\"timePicker-fieldset\" [disabled]=\"disabled()\">\n\t\t<legend>\n\t\t\t<span class=\"pr-u-mask\">{{ label() }}</span>\n\t\t</legend>\n\t\t<lu-time-picker-part\n\t\t\t#hoursPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[disabled]=\"disabled()\"\n\t\t\t[label]=\"intl().timePickerHours\"\n\t\t\t[value]=\"hours()\"\n\t\t\t[decimalConf]=\"hoursDecimalConf\"\n\t\t\t[hideValue]=\"shouldHideValue()\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t[maxDigits]=\"maxDigits()\"\n\t\t\t(valueChange)=\"hoursInputHandler($event)\"\n\t\t\t(nextRequest)=\"focusPart('minutes')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('hours', $event)\"\n\t\t\t(nonDigitKeyPressed)=\"keyPressed.set(true)\"\n\t\t/>\n\t\t<div aria-hidden=\"true\" [class]=\"fieldsetSuffixClasses()\" [attr.data-content-before]=\"separator()\"></div>\n\t\t<lu-time-picker-part\n\t\t\t#minutesPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[label]=\"intl().timePickerMinutes\"\n\t\t\t[value]=\"minutes()\"\n\t\t\t[max]=\"59\"\n\t\t\t[hideValue]=\"shouldHideValue()\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t[disabled]=\"disabled() || !minutesIncrement()\"\n\t\t\tshowZero\n\t\t\t(valueChange)=\"minutesInputHandler($event)\"\n\t\t\t(prevRequest)=\"focusPart('hours')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('minutes', $event)\"\n\t\t\t(nonDigitKeyPressed)=\"keyPressed.set(true)\"\n\t\t/>\n\t</fieldset>\n</div>\n", styles: ["@layer components{.timePicker{--components-timepicker-border: var(--pr-t-color-input-border);--components-timepicker-background: var(--pr-t-color-input-background);--components-timepicker-color: var(--pr-t-color-input-text);--components-timepicker-font: var(--pr-t-font-body-M);--components-timepicker-input-height: 2rem;--components-timepicker-input-minInlineSize: .5rem;--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-input-padding-block: var(--pr-t-spacings-50);--components-timepicker-padding: 0;--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline);--components-timepicker-display-inset-block: var(--components-timepicker-input-padding-block);--components-timepicker-separator-left: 2.375rem;--components-timepicker-start: var(--pr-t-spacings-50);--components-timepicker-end: var(--pr-t-spacings-100);padding:var(--components-timepicker-padding);inline-size:fit-content}.timePicker-fieldset{display:flex;align-items:center;box-shadow:0 0 0 1px var(--components-timepicker-border);border-radius:var(--pr-t-border-radius-input);padding:0;border:0;margin:0;background-color:var(--components-timepicker-background);color:var(--components-timepicker-color);font:var(--components-timepicker-font);position:relative;cursor:text}.timePicker-fieldset:hover{--components-timepicker-border: var(--pr-t-color-input-border-hover)}.timePicker-fieldset:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.timePicker-fieldset .timePicker-fieldset{box-shadow:initial}.timePicker-fieldset .timePicker-fieldset:focus-within{outline:initial}.timePicker-arrow{align-self:stretch;display:flex;align-items:center;color:var(--pr-t-color-text-subtle)}.timePicker-arrow-icon .lucca-icon{--icon-size: 1.25rem}.timePicker-fieldset-groupSeparator{pointer-events:none;display:grid;place-items:center;text-align:center;inline-size:var(--pr-t-spacings-200);margin-block:0;margin-inline:calc(var(--pr-t-spacings-100) * -1);position:relative;inset-inline-start:calc(var(--pr-t-spacings-25) * -1)}.timePicker-fieldset-group{position:relative}.timePicker-fieldset-group~.timePicker-fieldset-group{margin-inline-start:calc(var(--pr-t-spacings-50) * -1);--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker-fieldset-group-textfield{background-color:transparent}.timePicker-fieldset-group-textfield-input{display:flex;align-items:center;justify-content:center;border:0;block-size:var(--components-timepicker-input-height);inline-size:calc(var(--components-timepicker-input-minInlineSize) + var(--components-timepicker-input-digits, 2) * 1ch);outline:none;color:inherit;background-color:transparent;text-align:center;padding-block:var(--components-timepicker-input-padding-block);padding-inline:var(--components-timepicker-input-padding-inline);box-sizing:content-box;opacity:.0001}.timePicker-fieldset-group-textfield-input::placeholder{color:var(--component-textField-placeholder)}.timePicker-fieldset-group-textfield-input:focus-visible+.timePicker-fieldset-group-textfield-display{background-color:var(--palettes-product-100)}.timePicker-fieldset-group-textfield-display{position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--components-timepicker-display-inset-inline);border-radius:var(--pr-t-border-radius-50);pointer-events:none;display:grid;place-items:center}.timePicker-fieldset-group-stepper{position:absolute;inset-block-end:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);border:0;padding:0;block-size:1rem;inline-size:1rem;inset-inline-start:50%;transform:translate(-50%);background-color:transparent;color:var(--palettes-neutral-600);display:inline-flex;justify-content:center;align-items:center;border-radius:var(--pr-t-border-radius-50);outline:none;opacity:1;transition-property:opacity;transition-duration:var(--commons-animations-durations-fast);cursor:pointer}.timePicker-fieldset-group-stepper:hover{background-color:var(--palettes-neutral-50);color:var(--palettes-neutral-800)}.timePicker-fieldset-group-stepper:disabled{cursor:default;color:var(--palettes-neutral-500);pointer-events:none}.timePicker-fieldset-group-stepper .lucca-icon{--icon-size: 1rem}.timePicker-fieldset-group-stepper+.timePicker-fieldset-group-stepper{inset-block-start:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);inset-block-end:auto}.timePicker-fieldset-meridiem{box-sizing:content-box;inline-size:calc(var(--pr-t-spacings-100) + 2ch);padding-inline:var(--pr-t-spacings-50);position:relative;align-self:stretch;margin-inline-start:calc(var(--pr-t-spacings-50) * -1)}.timePicker-fieldset-meridiem:after{content:\"\";position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--pr-t-spacings-50);border-radius:var(--pr-t-border-radius-50);display:grid;place-items:center;text-align:end}.timePicker-fieldset-meridiem:has(input:focus):after{background-color:var(--palettes-product-100)}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-ante-input:checked):after{content:\"AM\"/\"\"}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-post-input:checked):after{content:\"PM\"/\"\"}.timePicker-fieldset-meridiem-ante,.timePicker-fieldset-meridiem-post{border:0;clip-path:rect(1px 1px 1px 1px);margin:-1px;overflow:hidden;padding:0;position:absolute;block-size:1px;inline-size:1px;white-space:nowrap;contain:paint}}@layer mods{.timePicker.mod-S{--components-timepicker-font: var(--pr-t-font-body-S);--components-timepicker-input-padding-block: var(--pr-t-spacings-25);--components-timepicker-input-height: 1.75rem;--components-timepicker-separator-left: 1.875rem;--components-timepicker-start: var(--pr-t-spacings-25);--components-timepicker-end: var(--pr-t-spacings-75)}.timePicker.mod-S .timePicker-arrow-icon .lucca-icon{--icon-size: 1rem}.timePicker.mod-S .timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker.mod-S .timePicker-fieldset-group~.timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start)}.timePicker.mod-S .timePicker-fieldset-meridiem{inline-size:calc(var(--pr-t-spacings-50) + 2ch)}.timePicker.mod-S .timePicker-fieldset-meridiem:after{inset-inline:var(--pr-t-spacings-25)}.timePicker.mod-stepper{--components-timepicker-padding: var(--pr-t-spacings-300) 0}.timePicker.mod-stepperHover:not(:hover,:focus-within) .timePicker-fieldset-group-stepper{opacity:0}.timePicker:has([aria-invalid=true]){--components-timepicker-background: var(--pr-t-color-input-background-critical);--components-timepicker-border: var(--pr-t-color-input-border-critical)}.timePicker:has([aria-invalid=true]):hover{--components-timepicker-border: var(--pr-t-color-input-border-critical-hover)}.timePicker:has([disabled]){--components-timepicker-background: var(--pr-t-color-input-background-disabled);--components-timepicker-border: var(--commons-disabled-placeholder);--components-timepicker-color: var(--pr-t-color-input-text-disabled)}}@layer base{lu-duration-picker{display:inline-flex}}\n"], dependencies: [{ kind: "component", type: TimePickerPartComponent, selector: "lu-time-picker-part", inputs: ["label", "decimalConf", "value", "display", "max", "autoWidth", "displayArrows", "isReadonly", "hideValue", "disabled", "focused", "maxDigits", "showZero", "digitNumber", "isValueSet"], outputs: ["valueChange", "digitNumberChange", "isValueSetChange", "prevRequest", "nextRequest", "nonDigitKeyPressed", "inputControlClick", "touched"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
574
603
|
}
|
|
575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: DurationPickerComponent, decorators: [{
|
|
576
605
|
type: Component,
|
|
577
606
|
args: [{ selector: 'lu-duration-picker', imports: [TimePickerPartComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
578
607
|
{
|
|
@@ -580,7 +609,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
580
609
|
useExisting: forwardRef(() => DurationPickerComponent),
|
|
581
610
|
multi: true,
|
|
582
611
|
},
|
|
583
|
-
], template: "<div [class]=\"pickerClasses()\" (copy)=\"copyHandler($event)\" (paste)=\"pasteHandler($event)\">\n\t<fieldset class=\"timePicker-fieldset\" [disabled]=\"disabled()\">\n\t\t<legend>\n\t\t\t<span class=\"pr-u-mask\">{{ label() }}</span>\n\t\t</legend>\n\t\t<lu-time-picker-part\n\t\t\t#hoursPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[disabled]=\"disabled()\"\n\t\t\t[label]=\"intl().timePickerHours\"\n\t\t\t[value]=\"hours()\"\n\t\t\t[decimalConf]=\"hoursDecimalConf\"\n\t\t\t[hideValue]=\"shouldHideValue()\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t[maxDigits]=\"maxDigits()\"\n\t\t\t(valueChange)=\"hoursInputHandler($event)\"\n\t\t\t(nextRequest)=\"focusPart('minutes')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('hours', $event)\"\n\t\t/>\n\t\t<div aria-hidden=\"true\" [class]=\"fieldsetSuffixClasses()\"
|
|
612
|
+
], template: "<div [class]=\"pickerClasses()\" (copy)=\"copyHandler($event)\" (paste)=\"pasteHandler($event)\" (animationend)=\"keyPressed.set(false)\">\n\t<fieldset class=\"timePicker-fieldset\" [disabled]=\"disabled()\">\n\t\t<legend>\n\t\t\t<span class=\"pr-u-mask\">{{ label() }}</span>\n\t\t</legend>\n\t\t<lu-time-picker-part\n\t\t\t#hoursPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[disabled]=\"disabled()\"\n\t\t\t[label]=\"intl().timePickerHours\"\n\t\t\t[value]=\"hours()\"\n\t\t\t[decimalConf]=\"hoursDecimalConf\"\n\t\t\t[hideValue]=\"shouldHideValue()\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t[maxDigits]=\"maxDigits()\"\n\t\t\t(valueChange)=\"hoursInputHandler($event)\"\n\t\t\t(nextRequest)=\"focusPart('minutes')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('hours', $event)\"\n\t\t\t(nonDigitKeyPressed)=\"keyPressed.set(true)\"\n\t\t/>\n\t\t<div aria-hidden=\"true\" [class]=\"fieldsetSuffixClasses()\" [attr.data-content-before]=\"separator()\"></div>\n\t\t<lu-time-picker-part\n\t\t\t#minutesPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[label]=\"intl().timePickerMinutes\"\n\t\t\t[value]=\"minutes()\"\n\t\t\t[max]=\"59\"\n\t\t\t[hideValue]=\"shouldHideValue()\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t[disabled]=\"disabled() || !minutesIncrement()\"\n\t\t\tshowZero\n\t\t\t(valueChange)=\"minutesInputHandler($event)\"\n\t\t\t(prevRequest)=\"focusPart('hours')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('minutes', $event)\"\n\t\t\t(nonDigitKeyPressed)=\"keyPressed.set(true)\"\n\t\t/>\n\t</fieldset>\n</div>\n", styles: ["@layer components{.timePicker{--components-timepicker-border: var(--pr-t-color-input-border);--components-timepicker-background: var(--pr-t-color-input-background);--components-timepicker-color: var(--pr-t-color-input-text);--components-timepicker-font: var(--pr-t-font-body-M);--components-timepicker-input-height: 2rem;--components-timepicker-input-minInlineSize: .5rem;--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-input-padding-block: var(--pr-t-spacings-50);--components-timepicker-padding: 0;--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline);--components-timepicker-display-inset-block: var(--components-timepicker-input-padding-block);--components-timepicker-separator-left: 2.375rem;--components-timepicker-start: var(--pr-t-spacings-50);--components-timepicker-end: var(--pr-t-spacings-100);padding:var(--components-timepicker-padding);inline-size:fit-content}.timePicker-fieldset{display:flex;align-items:center;box-shadow:0 0 0 1px var(--components-timepicker-border);border-radius:var(--pr-t-border-radius-input);padding:0;border:0;margin:0;background-color:var(--components-timepicker-background);color:var(--components-timepicker-color);font:var(--components-timepicker-font);position:relative;cursor:text}.timePicker-fieldset:hover{--components-timepicker-border: var(--pr-t-color-input-border-hover)}.timePicker-fieldset:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.timePicker-fieldset .timePicker-fieldset{box-shadow:initial}.timePicker-fieldset .timePicker-fieldset:focus-within{outline:initial}.timePicker-arrow{align-self:stretch;display:flex;align-items:center;color:var(--pr-t-color-text-subtle)}.timePicker-arrow-icon .lucca-icon{--icon-size: 1.25rem}.timePicker-fieldset-groupSeparator{pointer-events:none;display:grid;place-items:center;text-align:center;inline-size:var(--pr-t-spacings-200);margin-block:0;margin-inline:calc(var(--pr-t-spacings-100) * -1);position:relative;inset-inline-start:calc(var(--pr-t-spacings-25) * -1)}.timePicker-fieldset-group{position:relative}.timePicker-fieldset-group~.timePicker-fieldset-group{margin-inline-start:calc(var(--pr-t-spacings-50) * -1);--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker-fieldset-group-textfield{background-color:transparent}.timePicker-fieldset-group-textfield-input{display:flex;align-items:center;justify-content:center;border:0;block-size:var(--components-timepicker-input-height);inline-size:calc(var(--components-timepicker-input-minInlineSize) + var(--components-timepicker-input-digits, 2) * 1ch);outline:none;color:inherit;background-color:transparent;text-align:center;padding-block:var(--components-timepicker-input-padding-block);padding-inline:var(--components-timepicker-input-padding-inline);box-sizing:content-box;opacity:.0001}.timePicker-fieldset-group-textfield-input::placeholder{color:var(--component-textField-placeholder)}.timePicker-fieldset-group-textfield-input:focus-visible+.timePicker-fieldset-group-textfield-display{background-color:var(--palettes-product-100)}.timePicker-fieldset-group-textfield-display{position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--components-timepicker-display-inset-inline);border-radius:var(--pr-t-border-radius-50);pointer-events:none;display:grid;place-items:center}.timePicker-fieldset-group-stepper{position:absolute;inset-block-end:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);border:0;padding:0;block-size:1rem;inline-size:1rem;inset-inline-start:50%;transform:translate(-50%);background-color:transparent;color:var(--palettes-neutral-600);display:inline-flex;justify-content:center;align-items:center;border-radius:var(--pr-t-border-radius-50);outline:none;opacity:1;transition-property:opacity;transition-duration:var(--commons-animations-durations-fast);cursor:pointer}.timePicker-fieldset-group-stepper:hover{background-color:var(--palettes-neutral-50);color:var(--palettes-neutral-800)}.timePicker-fieldset-group-stepper:disabled{cursor:default;color:var(--palettes-neutral-500);pointer-events:none}.timePicker-fieldset-group-stepper .lucca-icon{--icon-size: 1rem}.timePicker-fieldset-group-stepper+.timePicker-fieldset-group-stepper{inset-block-start:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);inset-block-end:auto}.timePicker-fieldset-meridiem{box-sizing:content-box;inline-size:calc(var(--pr-t-spacings-100) + 2ch);padding-inline:var(--pr-t-spacings-50);position:relative;align-self:stretch;margin-inline-start:calc(var(--pr-t-spacings-50) * -1)}.timePicker-fieldset-meridiem:after{content:\"\";position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--pr-t-spacings-50);border-radius:var(--pr-t-border-radius-50);display:grid;place-items:center;text-align:end}.timePicker-fieldset-meridiem:has(input:focus):after{background-color:var(--palettes-product-100)}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-ante-input:checked):after{content:\"AM\"/\"\"}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-post-input:checked):after{content:\"PM\"/\"\"}.timePicker-fieldset-meridiem-ante,.timePicker-fieldset-meridiem-post{border:0;clip-path:rect(1px 1px 1px 1px);margin:-1px;overflow:hidden;padding:0;position:absolute;block-size:1px;inline-size:1px;white-space:nowrap;contain:paint}}@layer mods{.timePicker.mod-S{--components-timepicker-font: var(--pr-t-font-body-S);--components-timepicker-input-padding-block: var(--pr-t-spacings-25);--components-timepicker-input-height: 1.75rem;--components-timepicker-separator-left: 1.875rem;--components-timepicker-start: var(--pr-t-spacings-25);--components-timepicker-end: var(--pr-t-spacings-75)}.timePicker.mod-S .timePicker-arrow-icon .lucca-icon{--icon-size: 1rem}.timePicker.mod-S .timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker.mod-S .timePicker-fieldset-group~.timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start)}.timePicker.mod-S .timePicker-fieldset-meridiem{inline-size:calc(var(--pr-t-spacings-50) + 2ch)}.timePicker.mod-S .timePicker-fieldset-meridiem:after{inset-inline:var(--pr-t-spacings-25)}.timePicker.mod-stepper{--components-timepicker-padding: var(--pr-t-spacings-300) 0}.timePicker.mod-stepperHover:not(:hover,:focus-within) .timePicker-fieldset-group-stepper{opacity:0}.timePicker:has([aria-invalid=true]){--components-timepicker-background: var(--pr-t-color-input-background-critical);--components-timepicker-border: var(--pr-t-color-input-border-critical)}.timePicker:has([aria-invalid=true]):hover{--components-timepicker-border: var(--pr-t-color-input-border-critical-hover)}.timePicker:has([disabled]){--components-timepicker-background: var(--pr-t-color-input-background-disabled);--components-timepicker-border: var(--commons-disabled-placeholder);--components-timepicker-color: var(--pr-t-color-input-text-disabled)}}@layer base{lu-duration-picker{display:inline-flex}}\n"] }]
|
|
584
613
|
}], propDecorators: { intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], displayArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayArrows", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hideZeroValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideZeroValue", required: false }] }], durationChange: [{ type: i0.Output, args: ["durationChange"] }] } });
|
|
585
614
|
|
|
586
615
|
const castToIsoTime = (str) => str;
|
|
@@ -637,34 +666,36 @@ const getMinutesDisplayPartFromIsoTime = (time) => {
|
|
|
637
666
|
return Number(minutes);
|
|
638
667
|
};
|
|
639
668
|
|
|
669
|
+
const LU_TIME_RANGE_PICKER_INSTANCE = new InjectionToken('LU_TIME_RANGE_PICKER_INSTANCE');
|
|
670
|
+
|
|
640
671
|
const DEFAULT_MIN_TIME = '--:--:--';
|
|
641
672
|
const DEFAULT_TIME_DECIMAL_PIPE_FORMAT = '2.0-0';
|
|
642
673
|
|
|
643
|
-
const Translations = {
|
|
674
|
+
const Translations$1 = {
|
|
644
675
|
pt: {
|
|
645
|
-
timePickerHours: '
|
|
676
|
+
timePickerHours: 'Horas',
|
|
646
677
|
timePickerTimeSeparator: ':',
|
|
647
|
-
timePickerMinutes: '
|
|
678
|
+
timePickerMinutes: 'Minutos',
|
|
648
679
|
},
|
|
649
680
|
es: {
|
|
650
|
-
timePickerHours: '
|
|
681
|
+
timePickerHours: 'Horas',
|
|
651
682
|
timePickerTimeSeparator: ':',
|
|
652
|
-
timePickerMinutes: '
|
|
683
|
+
timePickerMinutes: 'Minutos',
|
|
653
684
|
},
|
|
654
685
|
'nl-BE': {
|
|
655
|
-
timePickerHours: '
|
|
686
|
+
timePickerHours: 'Uren',
|
|
656
687
|
timePickerTimeSeparator: ':',
|
|
657
|
-
timePickerMinutes: '
|
|
688
|
+
timePickerMinutes: 'Minuten',
|
|
658
689
|
},
|
|
659
690
|
nl: {
|
|
660
|
-
timePickerHours: '
|
|
691
|
+
timePickerHours: 'Uren',
|
|
661
692
|
timePickerTimeSeparator: ':',
|
|
662
|
-
timePickerMinutes: '
|
|
693
|
+
timePickerMinutes: 'Minuten',
|
|
663
694
|
},
|
|
664
695
|
it: {
|
|
665
|
-
timePickerHours: '
|
|
696
|
+
timePickerHours: 'Ore',
|
|
666
697
|
timePickerTimeSeparator: ':',
|
|
667
|
-
timePickerMinutes: '
|
|
698
|
+
timePickerMinutes: 'Minuti',
|
|
668
699
|
},
|
|
669
700
|
de: {
|
|
670
701
|
timePickerHours: 'Stunden',
|
|
@@ -672,36 +703,38 @@ const Translations = {
|
|
|
672
703
|
timePickerMinutes: 'Minuten',
|
|
673
704
|
},
|
|
674
705
|
fr: {
|
|
675
|
-
timePickerHours: '
|
|
706
|
+
timePickerHours: 'Heures',
|
|
676
707
|
timePickerTimeSeparator: ':',
|
|
677
|
-
timePickerMinutes: '
|
|
708
|
+
timePickerMinutes: 'Minutes',
|
|
678
709
|
},
|
|
679
710
|
en: {
|
|
680
|
-
timePickerHours: '
|
|
711
|
+
timePickerHours: 'Hours',
|
|
681
712
|
timePickerTimeSeparator: ':',
|
|
682
|
-
timePickerMinutes: '
|
|
713
|
+
timePickerMinutes: 'Minutes',
|
|
683
714
|
},
|
|
684
715
|
};
|
|
685
716
|
|
|
686
717
|
const LU_TIME_PICKER_TRANSLATIONS = new InjectionToken('LuTimePickerTranslations', {
|
|
687
718
|
factory: () => luTimePickerTranslations,
|
|
688
719
|
});
|
|
689
|
-
const luTimePickerTranslations = Translations;
|
|
720
|
+
const luTimePickerTranslations = Translations$1;
|
|
690
721
|
|
|
691
|
-
const MAX_TIME = '23:59:59';
|
|
692
722
|
let nextId = 0;
|
|
693
723
|
class TimePickerComponent extends BasePickerComponent {
|
|
724
|
+
#timeRangePicker;
|
|
694
725
|
constructor() {
|
|
695
|
-
super(
|
|
696
|
-
this
|
|
726
|
+
super();
|
|
727
|
+
this.#timeRangePicker = inject(LU_TIME_RANGE_PICKER_INSTANCE, { optional: true });
|
|
728
|
+
this.intl = input(...intlInputOptions(LU_TIME_PICKER_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : /* istanbul ignore next */ []));
|
|
697
729
|
this.localeId = inject(LOCALE_ID);
|
|
698
730
|
this.idSuffix = nextId++;
|
|
699
|
-
this.anteMeridiemRef = viewChild('anteMeridiemRef', ...(ngDevMode ? [{ debugName: "anteMeridiemRef" }] : []));
|
|
700
|
-
this.postMeridiemRef = viewChild('postMeridiemRef', ...(ngDevMode ? [{ debugName: "postMeridiemRef" }] : []));
|
|
701
|
-
this.value = model(
|
|
702
|
-
this.max = input(MAX_TIME, ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
703
|
-
this.displayArrows = input(false, { ...(ngDevMode ? { debugName: "displayArrows" } : {}), transform: booleanAttribute });
|
|
704
|
-
this.forceMeridiemDisplay = input(null, ...(ngDevMode ? [{ debugName: "forceMeridiemDisplay" }] : []));
|
|
731
|
+
this.anteMeridiemRef = viewChild('anteMeridiemRef', ...(ngDevMode ? [{ debugName: "anteMeridiemRef" }] : /* istanbul ignore next */ []));
|
|
732
|
+
this.postMeridiemRef = viewChild('postMeridiemRef', ...(ngDevMode ? [{ debugName: "postMeridiemRef" }] : /* istanbul ignore next */ []));
|
|
733
|
+
this.value = model(DEFAULT_MIN_TIME, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
734
|
+
this.max = input(MAX_TIME, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
735
|
+
this.displayArrows = input(false, { ...(ngDevMode ? { debugName: "displayArrows" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
736
|
+
this.forceMeridiemDisplay = input(null, ...(ngDevMode ? [{ debugName: "forceMeridiemDisplay" }] : /* istanbul ignore next */ []));
|
|
737
|
+
this.keyPressed = signal(false, ...(ngDevMode ? [{ debugName: "keyPressed" }] : /* istanbul ignore next */ []));
|
|
705
738
|
this.enableMeridiemDisplay = computed(() => {
|
|
706
739
|
if (this.forceMeridiemDisplay() !== null) {
|
|
707
740
|
return this.forceMeridiemDisplay();
|
|
@@ -713,32 +746,45 @@ class TimePickerComponent extends BasePickerComponent {
|
|
|
713
746
|
})
|
|
714
747
|
.format(new Date('1/1/1 17:00:00'))
|
|
715
748
|
.includes('PM');
|
|
716
|
-
}, ...(ngDevMode ? [{ debugName: "enableMeridiemDisplay" }] : []));
|
|
717
|
-
this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
749
|
+
}, ...(ngDevMode ? [{ debugName: "enableMeridiemDisplay" }] : /* istanbul ignore next */ []));
|
|
750
|
+
this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
718
751
|
this.timeChange = output();
|
|
719
|
-
this.
|
|
720
|
-
this.
|
|
721
|
-
this.
|
|
722
|
-
this.
|
|
752
|
+
this.prevPicker = output();
|
|
753
|
+
this.nextPicker = output();
|
|
754
|
+
this.nonDigitKeyPressed = output();
|
|
755
|
+
this.touched = output();
|
|
756
|
+
this.hoursDisplay = computed(() => getHoursDisplayPartFromIsoTime(this.value(), this.enableMeridiemDisplay()), ...(ngDevMode ? [{ debugName: "hoursDisplay" }] : /* istanbul ignore next */ []));
|
|
757
|
+
this.minutesDisplay = computed(() => getMinutesDisplayPartFromIsoTime(this.value()), ...(ngDevMode ? [{ debugName: "minutesDisplay" }] : /* istanbul ignore next */ []));
|
|
758
|
+
this.hours = computed(() => getHoursPartFromIsoTime(this.value()), ...(ngDevMode ? [{ debugName: "hours" }] : /* istanbul ignore next */ []));
|
|
759
|
+
this.minutes = computed(() => getMinutesPartFromIsoTime(this.value()), ...(ngDevMode ? [{ debugName: "minutes" }] : /* istanbul ignore next */ []));
|
|
723
760
|
this.pickerClasses = computed(() => {
|
|
724
761
|
return {
|
|
725
762
|
timePicker: true,
|
|
726
|
-
'mod-stepper': this.displayArrows(),
|
|
727
|
-
'mod-stepperHover': this.displayArrows(),
|
|
763
|
+
'mod-stepper': this.displayArrows() && isNil(this.#timeRangePicker),
|
|
764
|
+
'mod-stepperHover': this.displayArrows() && isNil(this.#timeRangePicker),
|
|
728
765
|
[`mod-${this.size()}`]: Boolean(this.size()),
|
|
766
|
+
'pr-u-animatedShake': this.keyPressed() && isNil(this.#timeRangePicker),
|
|
729
767
|
};
|
|
730
|
-
}, ...(ngDevMode ? [{ debugName: "pickerClasses" }] : []));
|
|
731
|
-
this.separator = computed(() => this.intl().timePickerTimeSeparator, ...(ngDevMode ? [{ debugName: "separator" }] : []));
|
|
768
|
+
}, ...(ngDevMode ? [{ debugName: "pickerClasses" }] : /* istanbul ignore next */ []));
|
|
769
|
+
this.separator = computed(() => this.intl().timePickerTimeSeparator, ...(ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []));
|
|
732
770
|
this.hoursDecimalConf = DEFAULT_TIME_DECIMAL_PIPE_FORMAT;
|
|
733
771
|
this.maxHours = computed(() => {
|
|
734
772
|
if (this.enableMeridiemDisplay()) {
|
|
735
773
|
return 12;
|
|
736
774
|
}
|
|
737
775
|
return getHoursPartFromIsoTime(this.max() ?? '23:59:59');
|
|
738
|
-
}, ...(ngDevMode ? [{ debugName: "maxHours" }] : []));
|
|
776
|
+
}, ...(ngDevMode ? [{ debugName: "maxHours" }] : /* istanbul ignore next */ []));
|
|
739
777
|
this.ampmDisplay = computed(() => {
|
|
740
778
|
return formatAMPM(this.hours()).suffix;
|
|
741
|
-
}, ...(ngDevMode ? [{ debugName: "ampmDisplay" }] : []));
|
|
779
|
+
}, ...(ngDevMode ? [{ debugName: "ampmDisplay" }] : /* istanbul ignore next */ []));
|
|
780
|
+
_effectWithDeps([this.value, this.hoursPart, this.minutesPart], (value, hoursPart, minutesPart) => {
|
|
781
|
+
const hasValue = isNotNil(value) && value !== DEFAULT_MIN_TIME;
|
|
782
|
+
hoursPart?.isValueSet.set(hasValue);
|
|
783
|
+
minutesPart?.isValueSet.set(hasValue);
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
get firstTimePickerInputId() {
|
|
787
|
+
return this.hoursPart()?.inputId ? `${this.hoursPart()?.inputId}-input` : undefined;
|
|
742
788
|
}
|
|
743
789
|
focusPart(type) {
|
|
744
790
|
if (type === 'meridiem') {
|
|
@@ -887,16 +933,24 @@ class TimePickerComponent extends BasePickerComponent {
|
|
|
887
933
|
value: createIsoTimeFromHoursAndMinutes(hours, minutes),
|
|
888
934
|
});
|
|
889
935
|
}
|
|
890
|
-
|
|
891
|
-
|
|
936
|
+
nonDigitKeyPressedHandler() {
|
|
937
|
+
if (isNil(this.#timeRangePicker)) {
|
|
938
|
+
this.keyPressed.set(true);
|
|
939
|
+
}
|
|
940
|
+
else {
|
|
941
|
+
this.nonDigitKeyPressed.emit();
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: TimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
945
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: TimePickerComponent, isStandalone: true, selector: "lu-time-picker", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, displayArrows: { classPropertyName: "displayArrows", publicName: "displayArrows", isSignal: true, isRequired: false, transformFunction: null }, forceMeridiemDisplay: { classPropertyName: "forceMeridiemDisplay", publicName: "forceMeridiemDisplay", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", timeChange: "timeChange", prevPicker: "prevPicker", nextPicker: "nextPicker", nonDigitKeyPressed: "nonDigitKeyPressed", touched: "touched" }, providers: [
|
|
892
946
|
{
|
|
893
947
|
provide: NG_VALUE_ACCESSOR,
|
|
894
948
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
895
949
|
multi: true,
|
|
896
950
|
},
|
|
897
|
-
], viewQueries: [{ propertyName: "anteMeridiemRef", first: true, predicate: ["anteMeridiemRef"], descendants: true, isSignal: true }, { propertyName: "postMeridiemRef", first: true, predicate: ["postMeridiemRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"pickerClasses()\" (copy)=\"copyHandler($event)\" (paste)=\"pasteHandler($event)\">\n\t<fieldset class=\"timePicker-fieldset\" [disabled]=\"disabled()\">\n\t\t<legend>\n\t\t\t<span class=\"pr-u-mask\">{{ label() }}</span>\n\t\t</legend>\n\t\t<lu-time-picker-part\n\t\t\t#hoursPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[disabled]=\"disabled()\"\n\t\t\t[label]=\"intl().timePickerHours\"\n\t\t\t[value]=\"hours()\"\n\t\t\t[display]=\"hoursDisplay()\"\n\t\t\t[max]=\"maxHours()\"\n\t\t\t[decimalConf]=\"hoursDecimalConf\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t(touched)=\"onTouched?.()\"\n\t\t\t(valueChange)=\"hoursInputHandler($event)\"\n\t\t\t(nextRequest)=\"focusPart('minutes')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('hours', $event)\"\n\t\t/>\n\t\t<div aria-hidden=\"true\" class=\"timePicker-fieldset-groupSeparator\">{{ separator() }}</div>\n\t\t<lu-time-picker-part\n\t\t\t#minutesPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[label]=\"intl().timePickerMinutes\"\n\t\t\t[value]=\"minutesDisplay()\"\n\t\t\t[max]=\"59\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t(touched)=\"onTouched?.()\"\n\t\t\t[disabled]=\"disabled() || !minutesIncrement()\"\n\t\t\tshowZero\n\t\t\t(valueChange)=\"minutesInputHandler($event)\"\n\t\t\t(prevRequest)=\"focusPart('hours')\"\n\t\t\t(nextRequest)=\"focusPart('meridiem')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('minutes', $event)\"\n\t\t/>\n\t\t@if (enableMeridiemDisplay()) {\n\t\t\t<div\n\t\t\t\tclass=\"timePicker-fieldset-meridiem\"\n\t\t\t\t(copy)=\"copyHandler($event)\"\n\t\t\t\t(paste)=\"pasteHandler($event)\"\n\t\t\t\t(keydown.A)=\"anteMeridiemRef.click()\"\n\t\t\t\t(keydown.P)=\"postMeridiemRef.click()\"\n\t\t\t\t(keydown.shift.A)=\"anteMeridiemRef.click()\"\n\t\t\t\t(keydown.shift.P)=\"postMeridiemRef.click()\"\n\t\t\t\t(click)=\"ampmDisplay() === 'AM' ? anteMeridiemRef.focus() : postMeridiemRef.focus()\"\n\t\t\t>\n\t\t\t\t<div class=\"timePicker-fieldset-meridiem-ante\">\n\t\t\t\t\t<label [attr.for]=\"'anteMeridiem-' + idSuffix\">AM</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#anteMeridiemRef\n\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t[attr.name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[attr.id]=\"'anteMeridiem-' + idSuffix\"\n\t\t\t\t\t\tclass=\"timePicker-fieldset-meridiem-ante-input\"\n\t\t\t\t\t\tvalue=\"AM\"\n\t\t\t\t\t\t[ngModel]=\"ampmDisplay()\"\n\t\t\t\t\t\t(ngModelChange)=\"switchMeridiem($event)\"\n\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t\t\t(keydown.arrowleft)=\"$event.preventDefault(); focusPart('minutes')\"\n\t\t\t\t\t\t(keydown.arrowright)=\"$event.preventDefault()\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"timePicker-fieldset-meridiem-post\">\n\t\t\t\t\t<label [attr.for]=\"'postMeridiem-' + idSuffix\">PM</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#postMeridiemRef\n\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t[attr.name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[attr.id]=\"'postMeridiem-' + idSuffix\"\n\t\t\t\t\t\tclass=\"timePicker-fieldset-meridiem-post-input\"\n\t\t\t\t\t\tvalue=\"PM\"\n\t\t\t\t\t\t[ngModel]=\"ampmDisplay()\"\n\t\t\t\t\t\t(ngModelChange)=\"switchMeridiem($event)\"\n\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t\t\t(keydown.arrowleft)=\"$event.preventDefault(); focusPart('minutes')\"\n\t\t\t\t\t\t(keydown.arrowright)=\"$event.preventDefault()\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t@if (displayArrows()) {\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"timePicker-fieldset-group-stepper\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t(click)=\"switchMeridiem(ampmDisplay() === 'AM' ? 'PM' : 'AM')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-northArrow\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"timePicker-fieldset-group-stepper\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t(click)=\"switchMeridiem(ampmDisplay() === 'AM' ? 'PM' : 'AM')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-southArrow\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</fieldset>\n</div>\n", styles: ["@layer components{.timePicker{--components-timepicker-border: var(--pr-t-color-input-border);--components-timepicker-background: var(--pr-t-color-input-background);--components-timepicker-color: var(--pr-t-color-input-text);--components-timepicker-font: var(--pr-t-font-body-M);--components-timepicker-input-height: 2rem;--components-timepicker-input-minInlineSize: .5rem;--components-timepicker-input-padding-inline: var(--pr-t-spacings-100);--components-timepicker-input-padding-block: var(--pr-t-spacings-50);--components-timepicker-padding: 0;--components-timepicker-display-padding-inline: var(--pr-t-spacings-50);--components-timepicker-display-padding-block: var(--pr-t-spacings-100);--components-timepicker-separator-left: 2.375rem;padding:var(--components-timepicker-padding);inline-size:fit-content}.timePicker-fieldset{display:flex;align-items:center;box-shadow:0 0 0 1px var(--components-timepicker-border);border-radius:var(--pr-t-border-radius-input);padding:0;border:0;margin:0;background-color:var(--components-timepicker-background);color:var(--components-timepicker-color);font:var(--components-timepicker-font);position:relative;cursor:text}.timePicker-fieldset:hover{--components-timepicker-border: var(--pr-t-color-input-border-hover)}.timePicker-fieldset:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.timePicker-fieldset-groupSeparator{pointer-events:none;display:grid;place-items:center;text-align:center;inline-size:var(--pr-t-spacings-200);margin-block:0;margin-inline:calc(var(--pr-t-spacings-100) * -1);position:relative;inset-inline-start:calc(var(--pr-t-spacings-25) * -1)}.timePicker-fieldset-group{position:relative}.timePicker-fieldset-group~.timePicker-fieldset-group{margin-inline-start:calc(var(--pr-t-spacings-50) * -1)}.timePicker-fieldset-group-textfield{background-color:transparent}.timePicker-fieldset-group-textfield-input{display:flex;align-items:center;justify-content:center;border:0;block-size:var(--components-timepicker-input-height);inline-size:calc(var(--components-timepicker-input-minInlineSize) + var(--components-timepicker-input-digits, 2) * 1ch);outline:none;color:inherit;background-color:transparent;text-align:center;padding-block:var(--components-timepicker-input-padding-block);padding-inline:var(--components-timepicker-input-padding-inline);box-sizing:content-box;opacity:.0001}.timePicker-fieldset-group-textfield-input::placeholder{color:var(--component-textField-placeholder)}.timePicker-fieldset-group-textfield-input:focus-visible+.timePicker-fieldset-group-textfield-display{background-color:var(--palettes-product-100)}.timePicker-fieldset-group-textfield-display{position:absolute;inset:var(--components-timepicker-display-padding-inline) var(--components-timepicker-display-padding-block);border-radius:var(--pr-t-border-radius-50);pointer-events:none;display:grid;place-items:center}.timePicker-fieldset-group-stepper{position:absolute;inset-block-end:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);border:0;padding:0;block-size:1rem;inline-size:1rem;inset-inline-start:50%;transform:translate(-50%);background-color:transparent;color:var(--palettes-neutral-600);display:inline-flex;justify-content:center;align-items:center;border-radius:var(--pr-t-border-radius-50);outline:none;opacity:1;transition-property:opacity;transition-duration:var(--commons-animations-durations-fast);cursor:pointer}.timePicker-fieldset-group-stepper:hover{background-color:var(--palettes-neutral-50);color:var(--palettes-neutral-800)}.timePicker-fieldset-group-stepper:disabled{cursor:default;color:var(--palettes-neutral-500);pointer-events:none}.timePicker-fieldset-group-stepper .lucca-icon{--icon-size: 1rem}.timePicker-fieldset-group-stepper+.timePicker-fieldset-group-stepper{inset-block-start:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);inset-block-end:auto}.timePicker-fieldset-meridiem{box-sizing:content-box;inline-size:calc(var(--components-timepicker-input-minInlineSize) + 2ch);padding-inline:var(--components-timepicker-display-padding-block);position:relative;align-self:stretch;margin-inline-start:calc(var(--pr-t-spacings-50) * -1)}.timePicker-fieldset-meridiem:after{content:\"\";position:absolute;inset:var(--components-timepicker-display-padding-inline) var(--components-timepicker-display-padding-block);border-radius:var(--pr-t-border-radius-50);display:grid;place-items:center;text-align:end}.timePicker-fieldset-meridiem:has(input:focus):after{background-color:var(--palettes-product-100)}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-ante-input:checked):after{content:\"AM\"/\"\"}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-post-input:checked):after{content:\"PM\"/\"\"}.timePicker-fieldset-meridiem-ante,.timePicker-fieldset-meridiem-post{border:0;clip-path:rect(1px 1px 1px 1px);margin:-1px;overflow:hidden;padding:0;position:absolute;block-size:1px;inline-size:1px;white-space:nowrap;contain:paint}}@layer mods{.timePicker.mod-S{--components-timepicker-font: var(--pr-t-font-body-S);--components-timepicker-display-padding-inline: var(--pr-t-spacings-25);--components-timepicker-display-padding-block: var(--pr-t-spacings-75);--components-timepicker-input-padding-inline: var(--pr-t-spacings-75);--components-timepicker-input-padding-block: var(--pr-t-spacings-25);--components-timepicker-input-height: 1.75rem;--components-timepicker-separator-left: 1.875rem}.timePicker.mod-stepper{--components-timepicker-padding: var(--pr-t-spacings-300) 0}.timePicker.mod-stepperHover:not(:hover,:focus-within) .timePicker-fieldset-group-stepper{opacity:0}.timePicker:has([aria-invalid=true]){--components-timepicker-background: var(--pr-t-color-input-background-critical);--components-timepicker-border: var(--pr-t-color-input-border-critical)}.timePicker:has([aria-invalid=true]):hover{--components-timepicker-border: var(--pr-t-color-input-border-critical-hover)}.timePicker:has([disabled]){--components-timepicker-background: var(--pr-t-color-input-background-disabled);--components-timepicker-border: var(--commons-disabled-placeholder);--components-timepicker-color: var(--pr-t-color-input-text-disabled)}}@layer base{lu-time-picker{display:inline-flex}}\n"], dependencies: [{ kind: "component", type: TimePickerPartComponent, selector: "lu-time-picker-part", inputs: ["label", "decimalConf", "value", "display", "max", "autoWidth", "displayArrows", "isReadonly", "hideValue", "disabled", "focused", "maxDigits", "showZero", "digitNumber", "isValueSet"], outputs: ["valueChange", "digitNumberChange", "isValueSetChange", "prevRequest", "nextRequest", "inputControlClick", "touched"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
951
|
+
], viewQueries: [{ propertyName: "anteMeridiemRef", first: true, predicate: ["anteMeridiemRef"], descendants: true, isSignal: true }, { propertyName: "postMeridiemRef", first: true, predicate: ["postMeridiemRef"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"pickerClasses()\" (copy)=\"copyHandler($event)\" (paste)=\"pasteHandler($event)\" (animationend)=\"keyPressed.set(false)\">\n\t<fieldset class=\"timePicker-fieldset\" [disabled]=\"disabled()\">\n\t\t<legend>\n\t\t\t<span class=\"pr-u-mask\">{{ label() }}</span>\n\t\t</legend>\n\t\t<lu-time-picker-part\n\t\t\t#hoursPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[disabled]=\"disabled()\"\n\t\t\t[label]=\"intl().timePickerHours\"\n\t\t\t[value]=\"hours()\"\n\t\t\t[display]=\"hoursDisplay()\"\n\t\t\t[max]=\"maxHours()\"\n\t\t\t[decimalConf]=\"hoursDecimalConf\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t(touched)=\"onTouched?.(); touched.emit()\"\n\t\t\t(valueChange)=\"hoursInputHandler($event)\"\n\t\t\t(nextRequest)=\"focusPart('minutes')\"\n\t\t\t(keydown.arrowleft)=\"$event.preventDefault(); prevPicker.emit()\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('hours', $event)\"\n\t\t\t(nonDigitKeyPressed)=\"nonDigitKeyPressedHandler()\"\n\t\t/>\n\t\t<div aria-hidden=\"true\" class=\"timePicker-fieldset-groupSeparator\" [attr.data-content-before]=\"separator()\"></div>\n\t\t<lu-time-picker-part\n\t\t\t#minutesPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[label]=\"intl().timePickerMinutes\"\n\t\t\t[value]=\"minutesDisplay()\"\n\t\t\t[max]=\"59\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t(touched)=\"onTouched?.(); touched.emit()\"\n\t\t\t[disabled]=\"disabled() || !minutesIncrement()\"\n\t\t\tshowZero\n\t\t\t(valueChange)=\"minutesInputHandler($event)\"\n\t\t\t(prevRequest)=\"focusPart('hours')\"\n\t\t\t(nextRequest)=\"enableMeridiemDisplay() ? focusPart('meridiem') : nextPicker.emit()\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('minutes', $event)\"\n\t\t\t(nonDigitKeyPressed)=\"nonDigitKeyPressedHandler()\"\n\t\t/>\n\t\t@if (enableMeridiemDisplay()) {\n\t\t\t<div\n\t\t\t\tclass=\"timePicker-fieldset-meridiem\"\n\t\t\t\t(copy)=\"copyHandler($event)\"\n\t\t\t\t(paste)=\"pasteHandler($event)\"\n\t\t\t\t(keydown.A)=\"anteMeridiemRef.click()\"\n\t\t\t\t(keydown.P)=\"postMeridiemRef.click()\"\n\t\t\t\t(keydown.shift.A)=\"anteMeridiemRef.click()\"\n\t\t\t\t(keydown.shift.P)=\"postMeridiemRef.click()\"\n\t\t\t\t(click)=\"ampmDisplay() === 'AM' ? anteMeridiemRef.focus() : postMeridiemRef.focus()\"\n\t\t\t>\n\t\t\t\t<div class=\"timePicker-fieldset-meridiem-ante\">\n\t\t\t\t\t<label [attr.for]=\"'anteMeridiem-' + idSuffix\">AM</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#anteMeridiemRef\n\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t[attr.name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[attr.id]=\"'anteMeridiem-' + idSuffix\"\n\t\t\t\t\t\tclass=\"timePicker-fieldset-meridiem-ante-input\"\n\t\t\t\t\t\tvalue=\"AM\"\n\t\t\t\t\t\t[ngModel]=\"ampmDisplay()\"\n\t\t\t\t\t\t(ngModelChange)=\"switchMeridiem($event)\"\n\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t\t\t(keydown.arrowleft)=\"$event.preventDefault(); focusPart('minutes')\"\n\t\t\t\t\t\t(keydown.arrowright)=\"$event.preventDefault(); nextPicker.emit()\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"timePicker-fieldset-meridiem-post\">\n\t\t\t\t\t<label [attr.for]=\"'postMeridiem-' + idSuffix\">PM</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#postMeridiemRef\n\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t[attr.name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[attr.id]=\"'postMeridiem-' + idSuffix\"\n\t\t\t\t\t\tclass=\"timePicker-fieldset-meridiem-post-input\"\n\t\t\t\t\t\tvalue=\"PM\"\n\t\t\t\t\t\t[ngModel]=\"ampmDisplay()\"\n\t\t\t\t\t\t(ngModelChange)=\"switchMeridiem($event)\"\n\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t\t\t(keydown.arrowleft)=\"$event.preventDefault(); focusPart('minutes')\"\n\t\t\t\t\t\t(keydown.arrowright)=\"$event.preventDefault(); nextPicker.emit()\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t@if (displayArrows()) {\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"timePicker-fieldset-group-stepper\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t(click)=\"switchMeridiem(ampmDisplay() === 'AM' ? 'PM' : 'AM')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-northArrow\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"timePicker-fieldset-group-stepper\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t(click)=\"switchMeridiem(ampmDisplay() === 'AM' ? 'PM' : 'AM')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-southArrow\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</fieldset>\n</div>\n", styles: ["@layer components{.timePicker{--components-timepicker-border: var(--pr-t-color-input-border);--components-timepicker-background: var(--pr-t-color-input-background);--components-timepicker-color: var(--pr-t-color-input-text);--components-timepicker-font: var(--pr-t-font-body-M);--components-timepicker-input-height: 2rem;--components-timepicker-input-minInlineSize: .5rem;--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-input-padding-block: var(--pr-t-spacings-50);--components-timepicker-padding: 0;--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline);--components-timepicker-display-inset-block: var(--components-timepicker-input-padding-block);--components-timepicker-separator-left: 2.375rem;--components-timepicker-start: var(--pr-t-spacings-50);--components-timepicker-end: var(--pr-t-spacings-100);padding:var(--components-timepicker-padding);inline-size:fit-content}.timePicker-fieldset{display:flex;align-items:center;box-shadow:0 0 0 1px var(--components-timepicker-border);border-radius:var(--pr-t-border-radius-input);padding:0;border:0;margin:0;background-color:var(--components-timepicker-background);color:var(--components-timepicker-color);font:var(--components-timepicker-font);position:relative;cursor:text}.timePicker-fieldset:hover{--components-timepicker-border: var(--pr-t-color-input-border-hover)}.timePicker-fieldset:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.timePicker-fieldset .timePicker-fieldset{box-shadow:initial}.timePicker-fieldset .timePicker-fieldset:focus-within{outline:initial}.timePicker-arrow{align-self:stretch;display:flex;align-items:center;color:var(--pr-t-color-text-subtle)}.timePicker-arrow-icon .lucca-icon{--icon-size: 1.25rem}.timePicker-fieldset-groupSeparator{pointer-events:none;display:grid;place-items:center;text-align:center;inline-size:var(--pr-t-spacings-200);margin-block:0;margin-inline:calc(var(--pr-t-spacings-100) * -1);position:relative;inset-inline-start:calc(var(--pr-t-spacings-25) * -1)}.timePicker-fieldset-group{position:relative}.timePicker-fieldset-group~.timePicker-fieldset-group{margin-inline-start:calc(var(--pr-t-spacings-50) * -1);--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker-fieldset-group-textfield{background-color:transparent}.timePicker-fieldset-group-textfield-input{display:flex;align-items:center;justify-content:center;border:0;block-size:var(--components-timepicker-input-height);inline-size:calc(var(--components-timepicker-input-minInlineSize) + var(--components-timepicker-input-digits, 2) * 1ch);outline:none;color:inherit;background-color:transparent;text-align:center;padding-block:var(--components-timepicker-input-padding-block);padding-inline:var(--components-timepicker-input-padding-inline);box-sizing:content-box;opacity:.0001}.timePicker-fieldset-group-textfield-input::placeholder{color:var(--component-textField-placeholder)}.timePicker-fieldset-group-textfield-input:focus-visible+.timePicker-fieldset-group-textfield-display{background-color:var(--palettes-product-100)}.timePicker-fieldset-group-textfield-display{position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--components-timepicker-display-inset-inline);border-radius:var(--pr-t-border-radius-50);pointer-events:none;display:grid;place-items:center}.timePicker-fieldset-group-stepper{position:absolute;inset-block-end:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);border:0;padding:0;block-size:1rem;inline-size:1rem;inset-inline-start:50%;transform:translate(-50%);background-color:transparent;color:var(--palettes-neutral-600);display:inline-flex;justify-content:center;align-items:center;border-radius:var(--pr-t-border-radius-50);outline:none;opacity:1;transition-property:opacity;transition-duration:var(--commons-animations-durations-fast);cursor:pointer}.timePicker-fieldset-group-stepper:hover{background-color:var(--palettes-neutral-50);color:var(--palettes-neutral-800)}.timePicker-fieldset-group-stepper:disabled{cursor:default;color:var(--palettes-neutral-500);pointer-events:none}.timePicker-fieldset-group-stepper .lucca-icon{--icon-size: 1rem}.timePicker-fieldset-group-stepper+.timePicker-fieldset-group-stepper{inset-block-start:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);inset-block-end:auto}.timePicker-fieldset-meridiem{box-sizing:content-box;inline-size:calc(var(--pr-t-spacings-100) + 2ch);padding-inline:var(--pr-t-spacings-50);position:relative;align-self:stretch;margin-inline-start:calc(var(--pr-t-spacings-50) * -1)}.timePicker-fieldset-meridiem:after{content:\"\";position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--pr-t-spacings-50);border-radius:var(--pr-t-border-radius-50);display:grid;place-items:center;text-align:end}.timePicker-fieldset-meridiem:has(input:focus):after{background-color:var(--palettes-product-100)}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-ante-input:checked):after{content:\"AM\"/\"\"}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-post-input:checked):after{content:\"PM\"/\"\"}.timePicker-fieldset-meridiem-ante,.timePicker-fieldset-meridiem-post{border:0;clip-path:rect(1px 1px 1px 1px);margin:-1px;overflow:hidden;padding:0;position:absolute;block-size:1px;inline-size:1px;white-space:nowrap;contain:paint}}@layer mods{.timePicker.mod-S{--components-timepicker-font: var(--pr-t-font-body-S);--components-timepicker-input-padding-block: var(--pr-t-spacings-25);--components-timepicker-input-height: 1.75rem;--components-timepicker-separator-left: 1.875rem;--components-timepicker-start: var(--pr-t-spacings-25);--components-timepicker-end: var(--pr-t-spacings-75)}.timePicker.mod-S .timePicker-arrow-icon .lucca-icon{--icon-size: 1rem}.timePicker.mod-S .timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker.mod-S .timePicker-fieldset-group~.timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start)}.timePicker.mod-S .timePicker-fieldset-meridiem{inline-size:calc(var(--pr-t-spacings-50) + 2ch)}.timePicker.mod-S .timePicker-fieldset-meridiem:after{inset-inline:var(--pr-t-spacings-25)}.timePicker.mod-stepper{--components-timepicker-padding: var(--pr-t-spacings-300) 0}.timePicker.mod-stepperHover:not(:hover,:focus-within) .timePicker-fieldset-group-stepper{opacity:0}.timePicker:has([aria-invalid=true]){--components-timepicker-background: var(--pr-t-color-input-background-critical);--components-timepicker-border: var(--pr-t-color-input-border-critical)}.timePicker:has([aria-invalid=true]):hover{--components-timepicker-border: var(--pr-t-color-input-border-critical-hover)}.timePicker:has([disabled]){--components-timepicker-background: var(--pr-t-color-input-background-disabled);--components-timepicker-border: var(--commons-disabled-placeholder);--components-timepicker-color: var(--pr-t-color-input-text-disabled)}}@layer base{lu-time-picker{display:inline-flex}}\n"], dependencies: [{ kind: "component", type: TimePickerPartComponent, selector: "lu-time-picker-part", inputs: ["label", "decimalConf", "value", "display", "max", "autoWidth", "displayArrows", "isReadonly", "hideValue", "disabled", "focused", "maxDigits", "showZero", "digitNumber", "isValueSet"], outputs: ["valueChange", "digitNumberChange", "isValueSetChange", "prevRequest", "nextRequest", "nonDigitKeyPressed", "inputControlClick", "touched"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
898
952
|
}
|
|
899
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
953
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
900
954
|
type: Component,
|
|
901
955
|
args: [{ selector: 'lu-time-picker', imports: [TimePickerPartComponent, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
902
956
|
{
|
|
@@ -904,12 +958,205 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
904
958
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
905
959
|
multi: true,
|
|
906
960
|
},
|
|
907
|
-
], template: "<div [class]=\"pickerClasses()\" (copy)=\"copyHandler($event)\" (paste)=\"pasteHandler($event)\">\n\t<fieldset class=\"timePicker-fieldset\" [disabled]=\"disabled()\">\n\t\t<legend>\n\t\t\t<span class=\"pr-u-mask\">{{ label() }}</span>\n\t\t</legend>\n\t\t<lu-time-picker-part\n\t\t\t#hoursPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[disabled]=\"disabled()\"\n\t\t\t[label]=\"intl().timePickerHours\"\n\t\t\t[value]=\"hours()\"\n\t\t\t[display]=\"hoursDisplay()\"\n\t\t\t[max]=\"maxHours()\"\n\t\t\t[decimalConf]=\"hoursDecimalConf\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t(touched)=\"onTouched?.()\"\n\t\t\t(valueChange)=\"hoursInputHandler($event)\"\n\t\t\t(nextRequest)=\"focusPart('minutes')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('hours', $event)\"\n\t\t/>\n\t\t<div aria-hidden=\"true\" class=\"timePicker-fieldset-groupSeparator\">{{ separator() }}</div>\n\t\t<lu-time-picker-part\n\t\t\t#minutesPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[label]=\"intl().timePickerMinutes\"\n\t\t\t[value]=\"minutesDisplay()\"\n\t\t\t[max]=\"59\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t(touched)=\"onTouched?.()\"\n\t\t\t[disabled]=\"disabled() || !minutesIncrement()\"\n\t\t\tshowZero\n\t\t\t(valueChange)=\"minutesInputHandler($event)\"\n\t\t\t(prevRequest)=\"focusPart('hours')\"\n\t\t\t(nextRequest)=\"focusPart('meridiem')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('minutes', $event)\"\n\t\t/>\n\t\t@if (enableMeridiemDisplay()) {\n\t\t\t<div\n\t\t\t\tclass=\"timePicker-fieldset-meridiem\"\n\t\t\t\t(copy)=\"copyHandler($event)\"\n\t\t\t\t(paste)=\"pasteHandler($event)\"\n\t\t\t\t(keydown.A)=\"anteMeridiemRef.click()\"\n\t\t\t\t(keydown.P)=\"postMeridiemRef.click()\"\n\t\t\t\t(keydown.shift.A)=\"anteMeridiemRef.click()\"\n\t\t\t\t(keydown.shift.P)=\"postMeridiemRef.click()\"\n\t\t\t\t(click)=\"ampmDisplay() === 'AM' ? anteMeridiemRef.focus() : postMeridiemRef.focus()\"\n\t\t\t>\n\t\t\t\t<div class=\"timePicker-fieldset-meridiem-ante\">\n\t\t\t\t\t<label [attr.for]=\"'anteMeridiem-' + idSuffix\">AM</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#anteMeridiemRef\n\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t[attr.name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[attr.id]=\"'anteMeridiem-' + idSuffix\"\n\t\t\t\t\t\tclass=\"timePicker-fieldset-meridiem-ante-input\"\n\t\t\t\t\t\tvalue=\"AM\"\n\t\t\t\t\t\t[ngModel]=\"ampmDisplay()\"\n\t\t\t\t\t\t(ngModelChange)=\"switchMeridiem($event)\"\n\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t\t\t(keydown.arrowleft)=\"$event.preventDefault(); focusPart('minutes')\"\n\t\t\t\t\t\t(keydown.arrowright)=\"$event.preventDefault()\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"timePicker-fieldset-meridiem-post\">\n\t\t\t\t\t<label [attr.for]=\"'postMeridiem-' + idSuffix\">PM</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#postMeridiemRef\n\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t[attr.name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[attr.id]=\"'postMeridiem-' + idSuffix\"\n\t\t\t\t\t\tclass=\"timePicker-fieldset-meridiem-post-input\"\n\t\t\t\t\t\tvalue=\"PM\"\n\t\t\t\t\t\t[ngModel]=\"ampmDisplay()\"\n\t\t\t\t\t\t(ngModelChange)=\"switchMeridiem($event)\"\n\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t\t\t(keydown.arrowleft)=\"$event.preventDefault(); focusPart('minutes')\"\n\t\t\t\t\t\t(keydown.arrowright)=\"$event.preventDefault()\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t@if (displayArrows()) {\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"timePicker-fieldset-group-stepper\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t(click)=\"switchMeridiem(ampmDisplay() === 'AM' ? 'PM' : 'AM')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-northArrow\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"timePicker-fieldset-group-stepper\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t(click)=\"switchMeridiem(ampmDisplay() === 'AM' ? 'PM' : 'AM')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-southArrow\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</fieldset>\n</div>\n", styles: ["@layer components{.timePicker{--components-timepicker-border: var(--pr-t-color-input-border);--components-timepicker-background: var(--pr-t-color-input-background);--components-timepicker-color: var(--pr-t-color-input-text);--components-timepicker-font: var(--pr-t-font-body-M);--components-timepicker-input-height: 2rem;--components-timepicker-input-minInlineSize: .5rem;--components-timepicker-input-padding-inline: var(--pr-t-spacings-100);--components-timepicker-input-padding-block: var(--pr-t-spacings-50);--components-timepicker-padding: 0;--components-timepicker-display-padding-inline: var(--pr-t-spacings-50);--components-timepicker-display-padding-block: var(--pr-t-spacings-100);--components-timepicker-separator-left: 2.375rem;padding:var(--components-timepicker-padding);inline-size:fit-content}.timePicker-fieldset{display:flex;align-items:center;box-shadow:0 0 0 1px var(--components-timepicker-border);border-radius:var(--pr-t-border-radius-input);padding:0;border:0;margin:0;background-color:var(--components-timepicker-background);color:var(--components-timepicker-color);font:var(--components-timepicker-font);position:relative;cursor:text}.timePicker-fieldset:hover{--components-timepicker-border: var(--pr-t-color-input-border-hover)}.timePicker-fieldset:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.timePicker-fieldset-groupSeparator{pointer-events:none;display:grid;place-items:center;text-align:center;inline-size:var(--pr-t-spacings-200);margin-block:0;margin-inline:calc(var(--pr-t-spacings-100) * -1);position:relative;inset-inline-start:calc(var(--pr-t-spacings-25) * -1)}.timePicker-fieldset-group{position:relative}.timePicker-fieldset-group~.timePicker-fieldset-group{margin-inline-start:calc(var(--pr-t-spacings-50) * -1)}.timePicker-fieldset-group-textfield{background-color:transparent}.timePicker-fieldset-group-textfield-input{display:flex;align-items:center;justify-content:center;border:0;block-size:var(--components-timepicker-input-height);inline-size:calc(var(--components-timepicker-input-minInlineSize) + var(--components-timepicker-input-digits, 2) * 1ch);outline:none;color:inherit;background-color:transparent;text-align:center;padding-block:var(--components-timepicker-input-padding-block);padding-inline:var(--components-timepicker-input-padding-inline);box-sizing:content-box;opacity:.0001}.timePicker-fieldset-group-textfield-input::placeholder{color:var(--component-textField-placeholder)}.timePicker-fieldset-group-textfield-input:focus-visible+.timePicker-fieldset-group-textfield-display{background-color:var(--palettes-product-100)}.timePicker-fieldset-group-textfield-display{position:absolute;inset:var(--components-timepicker-display-padding-inline) var(--components-timepicker-display-padding-block);border-radius:var(--pr-t-border-radius-50);pointer-events:none;display:grid;place-items:center}.timePicker-fieldset-group-stepper{position:absolute;inset-block-end:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);border:0;padding:0;block-size:1rem;inline-size:1rem;inset-inline-start:50%;transform:translate(-50%);background-color:transparent;color:var(--palettes-neutral-600);display:inline-flex;justify-content:center;align-items:center;border-radius:var(--pr-t-border-radius-50);outline:none;opacity:1;transition-property:opacity;transition-duration:var(--commons-animations-durations-fast);cursor:pointer}.timePicker-fieldset-group-stepper:hover{background-color:var(--palettes-neutral-50);color:var(--palettes-neutral-800)}.timePicker-fieldset-group-stepper:disabled{cursor:default;color:var(--palettes-neutral-500);pointer-events:none}.timePicker-fieldset-group-stepper .lucca-icon{--icon-size: 1rem}.timePicker-fieldset-group-stepper+.timePicker-fieldset-group-stepper{inset-block-start:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);inset-block-end:auto}.timePicker-fieldset-meridiem{box-sizing:content-box;inline-size:calc(var(--components-timepicker-input-minInlineSize) + 2ch);padding-inline:var(--components-timepicker-display-padding-block);position:relative;align-self:stretch;margin-inline-start:calc(var(--pr-t-spacings-50) * -1)}.timePicker-fieldset-meridiem:after{content:\"\";position:absolute;inset:var(--components-timepicker-display-padding-inline) var(--components-timepicker-display-padding-block);border-radius:var(--pr-t-border-radius-50);display:grid;place-items:center;text-align:end}.timePicker-fieldset-meridiem:has(input:focus):after{background-color:var(--palettes-product-100)}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-ante-input:checked):after{content:\"AM\"/\"\"}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-post-input:checked):after{content:\"PM\"/\"\"}.timePicker-fieldset-meridiem-ante,.timePicker-fieldset-meridiem-post{border:0;clip-path:rect(1px 1px 1px 1px);margin:-1px;overflow:hidden;padding:0;position:absolute;block-size:1px;inline-size:1px;white-space:nowrap;contain:paint}}@layer mods{.timePicker.mod-S{--components-timepicker-font: var(--pr-t-font-body-S);--components-timepicker-display-padding-inline: var(--pr-t-spacings-25);--components-timepicker-display-padding-block: var(--pr-t-spacings-75);--components-timepicker-input-padding-inline: var(--pr-t-spacings-75);--components-timepicker-input-padding-block: var(--pr-t-spacings-25);--components-timepicker-input-height: 1.75rem;--components-timepicker-separator-left: 1.875rem}.timePicker.mod-stepper{--components-timepicker-padding: var(--pr-t-spacings-300) 0}.timePicker.mod-stepperHover:not(:hover,:focus-within) .timePicker-fieldset-group-stepper{opacity:0}.timePicker:has([aria-invalid=true]){--components-timepicker-background: var(--pr-t-color-input-background-critical);--components-timepicker-border: var(--pr-t-color-input-border-critical)}.timePicker:has([aria-invalid=true]):hover{--components-timepicker-border: var(--pr-t-color-input-border-critical-hover)}.timePicker:has([disabled]){--components-timepicker-background: var(--pr-t-color-input-background-disabled);--components-timepicker-border: var(--commons-disabled-placeholder);--components-timepicker-color: var(--pr-t-color-input-text-disabled)}}@layer base{lu-time-picker{display:inline-flex}}\n"] }]
|
|
908
|
-
}], propDecorators: { intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }], anteMeridiemRef: [{ type: i0.ViewChild, args: ['anteMeridiemRef', { isSignal: true }] }], postMeridiemRef: [{ type: i0.ViewChild, args: ['postMeridiemRef', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], displayArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayArrows", required: false }] }], forceMeridiemDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceMeridiemDisplay", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], timeChange: [{ type: i0.Output, args: ["timeChange"] }] } });
|
|
961
|
+
], template: "<div [class]=\"pickerClasses()\" (copy)=\"copyHandler($event)\" (paste)=\"pasteHandler($event)\" (animationend)=\"keyPressed.set(false)\">\n\t<fieldset class=\"timePicker-fieldset\" [disabled]=\"disabled()\">\n\t\t<legend>\n\t\t\t<span class=\"pr-u-mask\">{{ label() }}</span>\n\t\t</legend>\n\t\t<lu-time-picker-part\n\t\t\t#hoursPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[disabled]=\"disabled()\"\n\t\t\t[label]=\"intl().timePickerHours\"\n\t\t\t[value]=\"hours()\"\n\t\t\t[display]=\"hoursDisplay()\"\n\t\t\t[max]=\"maxHours()\"\n\t\t\t[decimalConf]=\"hoursDecimalConf\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t(touched)=\"onTouched?.(); touched.emit()\"\n\t\t\t(valueChange)=\"hoursInputHandler($event)\"\n\t\t\t(nextRequest)=\"focusPart('minutes')\"\n\t\t\t(keydown.arrowleft)=\"$event.preventDefault(); prevPicker.emit()\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('hours', $event)\"\n\t\t\t(nonDigitKeyPressed)=\"nonDigitKeyPressedHandler()\"\n\t\t/>\n\t\t<div aria-hidden=\"true\" class=\"timePicker-fieldset-groupSeparator\" [attr.data-content-before]=\"separator()\"></div>\n\t\t<lu-time-picker-part\n\t\t\t#minutesPart\n\t\t\tclass=\"timePicker-fieldset-group\"\n\t\t\t[label]=\"intl().timePickerMinutes\"\n\t\t\t[value]=\"minutesDisplay()\"\n\t\t\t[max]=\"59\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t(touched)=\"onTouched?.(); touched.emit()\"\n\t\t\t[disabled]=\"disabled() || !minutesIncrement()\"\n\t\t\tshowZero\n\t\t\t(valueChange)=\"minutesInputHandler($event)\"\n\t\t\t(prevRequest)=\"focusPart('hours')\"\n\t\t\t(nextRequest)=\"enableMeridiemDisplay() ? focusPart('meridiem') : nextPicker.emit()\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('minutes', $event)\"\n\t\t\t(nonDigitKeyPressed)=\"nonDigitKeyPressedHandler()\"\n\t\t/>\n\t\t@if (enableMeridiemDisplay()) {\n\t\t\t<div\n\t\t\t\tclass=\"timePicker-fieldset-meridiem\"\n\t\t\t\t(copy)=\"copyHandler($event)\"\n\t\t\t\t(paste)=\"pasteHandler($event)\"\n\t\t\t\t(keydown.A)=\"anteMeridiemRef.click()\"\n\t\t\t\t(keydown.P)=\"postMeridiemRef.click()\"\n\t\t\t\t(keydown.shift.A)=\"anteMeridiemRef.click()\"\n\t\t\t\t(keydown.shift.P)=\"postMeridiemRef.click()\"\n\t\t\t\t(click)=\"ampmDisplay() === 'AM' ? anteMeridiemRef.focus() : postMeridiemRef.focus()\"\n\t\t\t>\n\t\t\t\t<div class=\"timePicker-fieldset-meridiem-ante\">\n\t\t\t\t\t<label [attr.for]=\"'anteMeridiem-' + idSuffix\">AM</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#anteMeridiemRef\n\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t[attr.name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[attr.id]=\"'anteMeridiem-' + idSuffix\"\n\t\t\t\t\t\tclass=\"timePicker-fieldset-meridiem-ante-input\"\n\t\t\t\t\t\tvalue=\"AM\"\n\t\t\t\t\t\t[ngModel]=\"ampmDisplay()\"\n\t\t\t\t\t\t(ngModelChange)=\"switchMeridiem($event)\"\n\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t\t\t(keydown.arrowleft)=\"$event.preventDefault(); focusPart('minutes')\"\n\t\t\t\t\t\t(keydown.arrowright)=\"$event.preventDefault(); nextPicker.emit()\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"timePicker-fieldset-meridiem-post\">\n\t\t\t\t\t<label [attr.for]=\"'postMeridiem-' + idSuffix\">PM</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\t#postMeridiemRef\n\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t[attr.name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[name]=\"'meridiem-' + idSuffix\"\n\t\t\t\t\t\t[attr.id]=\"'postMeridiem-' + idSuffix\"\n\t\t\t\t\t\tclass=\"timePicker-fieldset-meridiem-post-input\"\n\t\t\t\t\t\tvalue=\"PM\"\n\t\t\t\t\t\t[ngModel]=\"ampmDisplay()\"\n\t\t\t\t\t\t(ngModelChange)=\"switchMeridiem($event)\"\n\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t\t\t(keydown.arrowleft)=\"$event.preventDefault(); focusPart('minutes')\"\n\t\t\t\t\t\t(keydown.arrowright)=\"$event.preventDefault(); nextPicker.emit()\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t@if (displayArrows()) {\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"timePicker-fieldset-group-stepper\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t(click)=\"switchMeridiem(ampmDisplay() === 'AM' ? 'PM' : 'AM')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-northArrow\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"timePicker-fieldset-group-stepper\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t(click)=\"switchMeridiem(ampmDisplay() === 'AM' ? 'PM' : 'AM')\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-southArrow\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</fieldset>\n</div>\n", styles: ["@layer components{.timePicker{--components-timepicker-border: var(--pr-t-color-input-border);--components-timepicker-background: var(--pr-t-color-input-background);--components-timepicker-color: var(--pr-t-color-input-text);--components-timepicker-font: var(--pr-t-font-body-M);--components-timepicker-input-height: 2rem;--components-timepicker-input-minInlineSize: .5rem;--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-input-padding-block: var(--pr-t-spacings-50);--components-timepicker-padding: 0;--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline);--components-timepicker-display-inset-block: var(--components-timepicker-input-padding-block);--components-timepicker-separator-left: 2.375rem;--components-timepicker-start: var(--pr-t-spacings-50);--components-timepicker-end: var(--pr-t-spacings-100);padding:var(--components-timepicker-padding);inline-size:fit-content}.timePicker-fieldset{display:flex;align-items:center;box-shadow:0 0 0 1px var(--components-timepicker-border);border-radius:var(--pr-t-border-radius-input);padding:0;border:0;margin:0;background-color:var(--components-timepicker-background);color:var(--components-timepicker-color);font:var(--components-timepicker-font);position:relative;cursor:text}.timePicker-fieldset:hover{--components-timepicker-border: var(--pr-t-color-input-border-hover)}.timePicker-fieldset:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.timePicker-fieldset .timePicker-fieldset{box-shadow:initial}.timePicker-fieldset .timePicker-fieldset:focus-within{outline:initial}.timePicker-arrow{align-self:stretch;display:flex;align-items:center;color:var(--pr-t-color-text-subtle)}.timePicker-arrow-icon .lucca-icon{--icon-size: 1.25rem}.timePicker-fieldset-groupSeparator{pointer-events:none;display:grid;place-items:center;text-align:center;inline-size:var(--pr-t-spacings-200);margin-block:0;margin-inline:calc(var(--pr-t-spacings-100) * -1);position:relative;inset-inline-start:calc(var(--pr-t-spacings-25) * -1)}.timePicker-fieldset-group{position:relative}.timePicker-fieldset-group~.timePicker-fieldset-group{margin-inline-start:calc(var(--pr-t-spacings-50) * -1);--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker-fieldset-group-textfield{background-color:transparent}.timePicker-fieldset-group-textfield-input{display:flex;align-items:center;justify-content:center;border:0;block-size:var(--components-timepicker-input-height);inline-size:calc(var(--components-timepicker-input-minInlineSize) + var(--components-timepicker-input-digits, 2) * 1ch);outline:none;color:inherit;background-color:transparent;text-align:center;padding-block:var(--components-timepicker-input-padding-block);padding-inline:var(--components-timepicker-input-padding-inline);box-sizing:content-box;opacity:.0001}.timePicker-fieldset-group-textfield-input::placeholder{color:var(--component-textField-placeholder)}.timePicker-fieldset-group-textfield-input:focus-visible+.timePicker-fieldset-group-textfield-display{background-color:var(--palettes-product-100)}.timePicker-fieldset-group-textfield-display{position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--components-timepicker-display-inset-inline);border-radius:var(--pr-t-border-radius-50);pointer-events:none;display:grid;place-items:center}.timePicker-fieldset-group-stepper{position:absolute;inset-block-end:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);border:0;padding:0;block-size:1rem;inline-size:1rem;inset-inline-start:50%;transform:translate(-50%);background-color:transparent;color:var(--palettes-neutral-600);display:inline-flex;justify-content:center;align-items:center;border-radius:var(--pr-t-border-radius-50);outline:none;opacity:1;transition-property:opacity;transition-duration:var(--commons-animations-durations-fast);cursor:pointer}.timePicker-fieldset-group-stepper:hover{background-color:var(--palettes-neutral-50);color:var(--palettes-neutral-800)}.timePicker-fieldset-group-stepper:disabled{cursor:default;color:var(--palettes-neutral-500);pointer-events:none}.timePicker-fieldset-group-stepper .lucca-icon{--icon-size: 1rem}.timePicker-fieldset-group-stepper+.timePicker-fieldset-group-stepper{inset-block-start:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);inset-block-end:auto}.timePicker-fieldset-meridiem{box-sizing:content-box;inline-size:calc(var(--pr-t-spacings-100) + 2ch);padding-inline:var(--pr-t-spacings-50);position:relative;align-self:stretch;margin-inline-start:calc(var(--pr-t-spacings-50) * -1)}.timePicker-fieldset-meridiem:after{content:\"\";position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--pr-t-spacings-50);border-radius:var(--pr-t-border-radius-50);display:grid;place-items:center;text-align:end}.timePicker-fieldset-meridiem:has(input:focus):after{background-color:var(--palettes-product-100)}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-ante-input:checked):after{content:\"AM\"/\"\"}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-post-input:checked):after{content:\"PM\"/\"\"}.timePicker-fieldset-meridiem-ante,.timePicker-fieldset-meridiem-post{border:0;clip-path:rect(1px 1px 1px 1px);margin:-1px;overflow:hidden;padding:0;position:absolute;block-size:1px;inline-size:1px;white-space:nowrap;contain:paint}}@layer mods{.timePicker.mod-S{--components-timepicker-font: var(--pr-t-font-body-S);--components-timepicker-input-padding-block: var(--pr-t-spacings-25);--components-timepicker-input-height: 1.75rem;--components-timepicker-separator-left: 1.875rem;--components-timepicker-start: var(--pr-t-spacings-25);--components-timepicker-end: var(--pr-t-spacings-75)}.timePicker.mod-S .timePicker-arrow-icon .lucca-icon{--icon-size: 1rem}.timePicker.mod-S .timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker.mod-S .timePicker-fieldset-group~.timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start)}.timePicker.mod-S .timePicker-fieldset-meridiem{inline-size:calc(var(--pr-t-spacings-50) + 2ch)}.timePicker.mod-S .timePicker-fieldset-meridiem:after{inset-inline:var(--pr-t-spacings-25)}.timePicker.mod-stepper{--components-timepicker-padding: var(--pr-t-spacings-300) 0}.timePicker.mod-stepperHover:not(:hover,:focus-within) .timePicker-fieldset-group-stepper{opacity:0}.timePicker:has([aria-invalid=true]){--components-timepicker-background: var(--pr-t-color-input-background-critical);--components-timepicker-border: var(--pr-t-color-input-border-critical)}.timePicker:has([aria-invalid=true]):hover{--components-timepicker-border: var(--pr-t-color-input-border-critical-hover)}.timePicker:has([disabled]){--components-timepicker-background: var(--pr-t-color-input-background-disabled);--components-timepicker-border: var(--commons-disabled-placeholder);--components-timepicker-color: var(--pr-t-color-input-text-disabled)}}@layer base{lu-time-picker{display:inline-flex}}\n"] }]
|
|
962
|
+
}], ctorParameters: () => [], propDecorators: { intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }], anteMeridiemRef: [{ type: i0.ViewChild, args: ['anteMeridiemRef', { isSignal: true }] }], postMeridiemRef: [{ type: i0.ViewChild, args: ['postMeridiemRef', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], displayArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayArrows", required: false }] }], forceMeridiemDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceMeridiemDisplay", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], timeChange: [{ type: i0.Output, args: ["timeChange"] }], prevPicker: [{ type: i0.Output, args: ["prevPicker"] }], nextPicker: [{ type: i0.Output, args: ["nextPicker"] }], nonDigitKeyPressed: [{ type: i0.Output, args: ["nonDigitKeyPressed"] }], touched: [{ type: i0.Output, args: ["touched"] }] } });
|
|
963
|
+
|
|
964
|
+
const Translations = {
|
|
965
|
+
'nl-BE': {
|
|
966
|
+
timeRangePickerStart: 'start',
|
|
967
|
+
timeRangePickerEnd: 'einde',
|
|
968
|
+
timeRangePickerFrom: 'Van',
|
|
969
|
+
timeRangePickerAt: 'tot',
|
|
970
|
+
},
|
|
971
|
+
fr: {
|
|
972
|
+
timeRangePickerStart: 'début',
|
|
973
|
+
timeRangePickerEnd: 'fin',
|
|
974
|
+
timeRangePickerFrom: 'De',
|
|
975
|
+
timeRangePickerAt: 'à',
|
|
976
|
+
},
|
|
977
|
+
de: {
|
|
978
|
+
timeRangePickerStart: 'anfang',
|
|
979
|
+
timeRangePickerEnd: 'ende',
|
|
980
|
+
timeRangePickerFrom: 'Von',
|
|
981
|
+
timeRangePickerAt: 'an',
|
|
982
|
+
},
|
|
983
|
+
en: {
|
|
984
|
+
timeRangePickerStart: 'start',
|
|
985
|
+
timeRangePickerEnd: 'end',
|
|
986
|
+
timeRangePickerFrom: 'From',
|
|
987
|
+
timeRangePickerAt: 'to',
|
|
988
|
+
},
|
|
989
|
+
es: {
|
|
990
|
+
timeRangePickerStart: 'iniciar',
|
|
991
|
+
timeRangePickerEnd: 'fin',
|
|
992
|
+
timeRangePickerFrom: 'De',
|
|
993
|
+
timeRangePickerAt: 'en',
|
|
994
|
+
},
|
|
995
|
+
it: {
|
|
996
|
+
timeRangePickerStart: 'inizio',
|
|
997
|
+
timeRangePickerEnd: 'fine',
|
|
998
|
+
timeRangePickerFrom: 'Di',
|
|
999
|
+
timeRangePickerAt: 'a',
|
|
1000
|
+
},
|
|
1001
|
+
nl: {
|
|
1002
|
+
timeRangePickerStart: 'start',
|
|
1003
|
+
timeRangePickerEnd: 'einde',
|
|
1004
|
+
timeRangePickerFrom: 'Van',
|
|
1005
|
+
timeRangePickerAt: 'tot',
|
|
1006
|
+
},
|
|
1007
|
+
pt: {
|
|
1008
|
+
timeRangePickerStart: 'início',
|
|
1009
|
+
timeRangePickerEnd: 'fim',
|
|
1010
|
+
timeRangePickerFrom: 'De',
|
|
1011
|
+
timeRangePickerAt: 'à',
|
|
1012
|
+
},
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
const LU_TIME_RANGE_PICKER_TRANSLATIONS = new InjectionToken('LuTimeRangePickerTranslations', {
|
|
1016
|
+
factory: () => luTimeRangePickerTranslations,
|
|
1017
|
+
});
|
|
1018
|
+
const luTimeRangePickerTranslations = Translations;
|
|
1019
|
+
|
|
1020
|
+
class TimeRangePickerComponent {
|
|
1021
|
+
#injector;
|
|
1022
|
+
#formFieldRef;
|
|
1023
|
+
#locale;
|
|
1024
|
+
#ngControl; // Initialized in ngOnInit
|
|
1025
|
+
#onChange;
|
|
1026
|
+
#onTouched;
|
|
1027
|
+
#disabledState;
|
|
1028
|
+
constructor() {
|
|
1029
|
+
this.#injector = inject(Injector);
|
|
1030
|
+
this.#formFieldRef = inject(FORM_FIELD_INSTANCE, { optional: true });
|
|
1031
|
+
this.#locale = inject(LOCALE_ID);
|
|
1032
|
+
this.#disabledState = signal(false, ...(ngDevMode ? [{ debugName: "#disabledState" }] : /* istanbul ignore next */ []));
|
|
1033
|
+
this.value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1034
|
+
this.intl = input(...intlInputOptions(LU_TIME_RANGE_PICKER_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : /* istanbul ignore next */ []));
|
|
1035
|
+
this.displayArrows = input(false, { ...(ngDevMode ? { debugName: "displayArrows" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1036
|
+
this.forceMeridiemDisplay = input(false, { ...(ngDevMode ? { debugName: "forceMeridiemDisplay" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1037
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1038
|
+
this.isDisabled = computed(() => this.disabled() || this.#disabledState(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
1039
|
+
this.size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
|
|
1040
|
+
this.max = input(MAX_TIME, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
1041
|
+
this.step = input(null, ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
1042
|
+
this.keyPressed = signal(false, ...(ngDevMode ? [{ debugName: "keyPressed" }] : /* istanbul ignore next */ []));
|
|
1043
|
+
this.startValue = computed(() => this.value()?.start ?? DEFAULT_TIME_VALUE, ...(ngDevMode ? [{ debugName: "startValue" }] : /* istanbul ignore next */ []));
|
|
1044
|
+
this.endValue = computed(() => this.value()?.end ?? DEFAULT_TIME_VALUE, ...(ngDevMode ? [{ debugName: "endValue" }] : /* istanbul ignore next */ []));
|
|
1045
|
+
this.formFieldLabel = computed(() => this.#formFieldRef?.label(), ...(ngDevMode ? [{ debugName: "formFieldLabel" }] : /* istanbul ignore next */ []));
|
|
1046
|
+
this.isLocaleFr = computed(() => this.#locale === 'fr', ...(ngDevMode ? [{ debugName: "isLocaleFr" }] : /* istanbul ignore next */ []));
|
|
1047
|
+
this.DEFAULT_TIME_VALUE = DEFAULT_TIME_VALUE;
|
|
1048
|
+
if (this.#formFieldRef) {
|
|
1049
|
+
this.#formFieldRef.rolePresentationLabel.set(true);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
ngOnInit() {
|
|
1053
|
+
this.#ngControl = this.#injector.get(NgControl);
|
|
1054
|
+
}
|
|
1055
|
+
validate(control) {
|
|
1056
|
+
if (isNil(control.value)) {
|
|
1057
|
+
return null;
|
|
1058
|
+
}
|
|
1059
|
+
return isValidTimeRangePicker(control.value) ? null : { time: true };
|
|
1060
|
+
}
|
|
1061
|
+
writeValue(value) {
|
|
1062
|
+
if (this.#ngControl instanceof NgModel && isNil(this.#onChange)) {
|
|
1063
|
+
// avoid phantom call for ngModel
|
|
1064
|
+
// https://github.com/angular/angular/issues/14988#issuecomment-1310420293
|
|
1065
|
+
return;
|
|
1066
|
+
}
|
|
1067
|
+
this.value.set(value ?? null);
|
|
1068
|
+
}
|
|
1069
|
+
registerOnChange(fn) {
|
|
1070
|
+
this.#onChange = fn;
|
|
1071
|
+
}
|
|
1072
|
+
registerOnTouched(fn) {
|
|
1073
|
+
this.#onTouched = fn;
|
|
1074
|
+
}
|
|
1075
|
+
setDisabledState(isDisabled) {
|
|
1076
|
+
this.#disabledState.set(isDisabled);
|
|
1077
|
+
}
|
|
1078
|
+
onStartChange(start) {
|
|
1079
|
+
const newValue = {
|
|
1080
|
+
start,
|
|
1081
|
+
end: this.value()?.end,
|
|
1082
|
+
};
|
|
1083
|
+
this.value.set(newValue);
|
|
1084
|
+
this.#onChange?.(newValue);
|
|
1085
|
+
}
|
|
1086
|
+
onEndChange(end) {
|
|
1087
|
+
const newValue = {
|
|
1088
|
+
start: this.value()?.start,
|
|
1089
|
+
end,
|
|
1090
|
+
};
|
|
1091
|
+
this.value.set(newValue);
|
|
1092
|
+
this.#onChange?.(newValue);
|
|
1093
|
+
}
|
|
1094
|
+
onTouched() {
|
|
1095
|
+
this.#onTouched?.();
|
|
1096
|
+
this.#ngControl?.control?.markAsTouched();
|
|
1097
|
+
}
|
|
1098
|
+
partToFocus() {
|
|
1099
|
+
return this.forceMeridiemDisplay() ? 'meridiem' : 'minutes';
|
|
1100
|
+
}
|
|
1101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: TimeRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1102
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: TimeRangePickerComponent, isStandalone: true, selector: "lu-time-range-picker", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, displayArrows: { classPropertyName: "displayArrows", publicName: "displayArrows", isSignal: true, isRequired: false, transformFunction: null }, forceMeridiemDisplay: { classPropertyName: "forceMeridiemDisplay", publicName: "forceMeridiemDisplay", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1103
|
+
{
|
|
1104
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1105
|
+
useExisting: forwardRef(() => TimeRangePickerComponent),
|
|
1106
|
+
multi: true,
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
provide: NG_VALIDATORS,
|
|
1110
|
+
useExisting: forwardRef(() => TimeRangePickerComponent),
|
|
1111
|
+
multi: true,
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
provide: LU_TIME_RANGE_PICKER_INSTANCE,
|
|
1115
|
+
useExisting: forwardRef(() => TimeRangePickerComponent),
|
|
1116
|
+
},
|
|
1117
|
+
], ngImport: i0, template: "@let startLabel = `${formFieldLabel() && isLocaleFr() ? formFieldLabel() + \" \" : \"\"}(${intl().timeRangePickerStart})`;\n@let endLabel = `${formFieldLabel() && isLocaleFr() ? formFieldLabel() + \" \" : \"\"}(${intl().timeRangePickerEnd})`;\n\n<div\n\tclass=\"timePicker\"\n\t[class.mod-stepper]=\"displayArrows()\"\n\t[class.pr-u-animatedShake]=\"keyPressed()\"\n\t(animationend)=\"keyPressed.set(false)\"\n>\n\t<div class=\"timePicker-fieldset\">\n\t\t<lu-time-picker\n\t\t\t#timePickerStart\n\t\t\t[label]=\"startLabel\"\n\t\t\t[value]=\"startValue()\"\n\t\t\t(valueChange)=\"onStartChange($event)\"\n\t\t\t[disabled]=\"isDisabled()\"\n\t\t\t[max]=\"max()\"\n\t\t\t[step]=\"step()\"\n\t\t\t[size]=\"size()\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t[forceMeridiemDisplay]=\"forceMeridiemDisplay()\"\n\t\t\t(touched)=\"onTouched()\"\n\t\t\t(nextPicker)=\"timePickerEnd.focusPart('hours')\"\n\t\t\t(nonDigitKeyPressed)=\"keyPressed.set(true)\"\n\t\t/>\n\t\t<label role=\"presentation\" [attr.for]=\"timePickerEnd?.firstTimePickerInputId\" class=\"timePicker-arrow\">\n\t\t\t<lu-icon class=\"timePicker-arrow-icon\" icon=\"arrowRight\" />\n\t\t</label>\n\t\t<lu-time-picker\n\t\t\t#timePickerEnd\n\t\t\t[label]=\"endLabel\"\n\t\t\t[value]=\"endValue()\"\n\t\t\t(valueChange)=\"onEndChange($event)\"\n\t\t\t[disabled]=\"isDisabled()\"\n\t\t\t[max]=\"max()\"\n\t\t\t[step]=\"step()\"\n\t\t\t[size]=\"size()\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t[forceMeridiemDisplay]=\"forceMeridiemDisplay()\"\n\t\t\t(touched)=\"onTouched()\"\n\t\t\t(prevPicker)=\"timePickerStart.focusPart(partToFocus())\"\n\t\t\t(nonDigitKeyPressed)=\"keyPressed.set(true)\"\n\t\t/>\n\t</div>\n</div>\n\n<ng-container *luPresentationDisplayDefault>\n\t{{ intl().timeRangePickerFrom }}\n\t<span class=\"pr-u-mask\">{{ startLabel }}</span>\n\t@if (startValue() && startValue() !== DEFAULT_TIME_VALUE) {\n\t\t{{ startValue() }}\n\t} @else {\n\t\t<span aria-hidden=\"true\" data-content-before=\"\u2013\"></span>\n\t}\n\t{{ intl().timeRangePickerAt }}\n\t<span class=\"pr-u-mask\">{{ endLabel }}</span>\n\t@if (endValue() && endValue() !== DEFAULT_TIME_VALUE) {\n\t\t{{ endValue() }}\n\t} @else {\n\t\t<span aria-hidden=\"true\" data-content-before=\"\u2013\"></span>\n\t}\n</ng-container>\n", styles: ["@layer components{.timePicker{--components-timepicker-border: var(--pr-t-color-input-border);--components-timepicker-background: var(--pr-t-color-input-background);--components-timepicker-color: var(--pr-t-color-input-text);--components-timepicker-font: var(--pr-t-font-body-M);--components-timepicker-input-height: 2rem;--components-timepicker-input-minInlineSize: .5rem;--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-input-padding-block: var(--pr-t-spacings-50);--components-timepicker-padding: 0;--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline);--components-timepicker-display-inset-block: var(--components-timepicker-input-padding-block);--components-timepicker-separator-left: 2.375rem;--components-timepicker-start: var(--pr-t-spacings-50);--components-timepicker-end: var(--pr-t-spacings-100);padding:var(--components-timepicker-padding);inline-size:fit-content}.timePicker-fieldset{display:flex;align-items:center;box-shadow:0 0 0 1px var(--components-timepicker-border);border-radius:var(--pr-t-border-radius-input);padding:0;border:0;margin:0;background-color:var(--components-timepicker-background);color:var(--components-timepicker-color);font:var(--components-timepicker-font);position:relative;cursor:text}.timePicker-fieldset:hover{--components-timepicker-border: var(--pr-t-color-input-border-hover)}.timePicker-fieldset:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.timePicker-fieldset .timePicker-fieldset{box-shadow:initial}.timePicker-fieldset .timePicker-fieldset:focus-within{outline:initial}.timePicker-arrow{align-self:stretch;display:flex;align-items:center;color:var(--pr-t-color-text-subtle)}.timePicker-arrow-icon .lucca-icon{--icon-size: 1.25rem}.timePicker-fieldset-groupSeparator{pointer-events:none;display:grid;place-items:center;text-align:center;inline-size:var(--pr-t-spacings-200);margin-block:0;margin-inline:calc(var(--pr-t-spacings-100) * -1);position:relative;inset-inline-start:calc(var(--pr-t-spacings-25) * -1)}.timePicker-fieldset-group{position:relative}.timePicker-fieldset-group~.timePicker-fieldset-group{margin-inline-start:calc(var(--pr-t-spacings-50) * -1);--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker-fieldset-group-textfield{background-color:transparent}.timePicker-fieldset-group-textfield-input{display:flex;align-items:center;justify-content:center;border:0;block-size:var(--components-timepicker-input-height);inline-size:calc(var(--components-timepicker-input-minInlineSize) + var(--components-timepicker-input-digits, 2) * 1ch);outline:none;color:inherit;background-color:transparent;text-align:center;padding-block:var(--components-timepicker-input-padding-block);padding-inline:var(--components-timepicker-input-padding-inline);box-sizing:content-box;opacity:.0001}.timePicker-fieldset-group-textfield-input::placeholder{color:var(--component-textField-placeholder)}.timePicker-fieldset-group-textfield-input:focus-visible+.timePicker-fieldset-group-textfield-display{background-color:var(--palettes-product-100)}.timePicker-fieldset-group-textfield-display{position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--components-timepicker-display-inset-inline);border-radius:var(--pr-t-border-radius-50);pointer-events:none;display:grid;place-items:center}.timePicker-fieldset-group-stepper{position:absolute;inset-block-end:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);border:0;padding:0;block-size:1rem;inline-size:1rem;inset-inline-start:50%;transform:translate(-50%);background-color:transparent;color:var(--palettes-neutral-600);display:inline-flex;justify-content:center;align-items:center;border-radius:var(--pr-t-border-radius-50);outline:none;opacity:1;transition-property:opacity;transition-duration:var(--commons-animations-durations-fast);cursor:pointer}.timePicker-fieldset-group-stepper:hover{background-color:var(--palettes-neutral-50);color:var(--palettes-neutral-800)}.timePicker-fieldset-group-stepper:disabled{cursor:default;color:var(--palettes-neutral-500);pointer-events:none}.timePicker-fieldset-group-stepper .lucca-icon{--icon-size: 1rem}.timePicker-fieldset-group-stepper+.timePicker-fieldset-group-stepper{inset-block-start:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);inset-block-end:auto}.timePicker-fieldset-meridiem{box-sizing:content-box;inline-size:calc(var(--pr-t-spacings-100) + 2ch);padding-inline:var(--pr-t-spacings-50);position:relative;align-self:stretch;margin-inline-start:calc(var(--pr-t-spacings-50) * -1)}.timePicker-fieldset-meridiem:after{content:\"\";position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--pr-t-spacings-50);border-radius:var(--pr-t-border-radius-50);display:grid;place-items:center;text-align:end}.timePicker-fieldset-meridiem:has(input:focus):after{background-color:var(--palettes-product-100)}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-ante-input:checked):after{content:\"AM\"/\"\"}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-post-input:checked):after{content:\"PM\"/\"\"}.timePicker-fieldset-meridiem-ante,.timePicker-fieldset-meridiem-post{border:0;clip-path:rect(1px 1px 1px 1px);margin:-1px;overflow:hidden;padding:0;position:absolute;block-size:1px;inline-size:1px;white-space:nowrap;contain:paint}}@layer mods{.timePicker.mod-S{--components-timepicker-font: var(--pr-t-font-body-S);--components-timepicker-input-padding-block: var(--pr-t-spacings-25);--components-timepicker-input-height: 1.75rem;--components-timepicker-separator-left: 1.875rem;--components-timepicker-start: var(--pr-t-spacings-25);--components-timepicker-end: var(--pr-t-spacings-75)}.timePicker.mod-S .timePicker-arrow-icon .lucca-icon{--icon-size: 1rem}.timePicker.mod-S .timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker.mod-S .timePicker-fieldset-group~.timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start)}.timePicker.mod-S .timePicker-fieldset-meridiem{inline-size:calc(var(--pr-t-spacings-50) + 2ch)}.timePicker.mod-S .timePicker-fieldset-meridiem:after{inset-inline:var(--pr-t-spacings-25)}.timePicker.mod-stepper{--components-timepicker-padding: var(--pr-t-spacings-300) 0}.timePicker.mod-stepperHover:not(:hover,:focus-within) .timePicker-fieldset-group-stepper{opacity:0}.timePicker:has([aria-invalid=true]){--components-timepicker-background: var(--pr-t-color-input-background-critical);--components-timepicker-border: var(--pr-t-color-input-border-critical)}.timePicker:has([aria-invalid=true]):hover{--components-timepicker-border: var(--pr-t-color-input-border-critical-hover)}.timePicker:has([disabled]){--components-timepicker-background: var(--pr-t-color-input-background-disabled);--components-timepicker-border: var(--commons-disabled-placeholder);--components-timepicker-color: var(--pr-t-color-input-text-disabled)}}@layer base{lu-time-range-picker{display:contents}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "lu-icon, pr-icon", inputs: ["icon", "alt", "size", "color", "AI"] }, { kind: "component", type: TimePickerComponent, selector: "lu-time-picker", inputs: ["intl", "value", "max", "displayArrows", "forceMeridiemDisplay", "label"], outputs: ["valueChange", "timeChange", "prevPicker", "nextPicker", "nonDigitKeyPressed", "touched"] }, { kind: "directive", type: _PresentationDisplayDefaultDirective, selector: "[luPresentationDisplayDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1118
|
+
}
|
|
1119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: TimeRangePickerComponent, decorators: [{
|
|
1120
|
+
type: Component,
|
|
1121
|
+
args: [{ selector: 'lu-time-range-picker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [IconComponent, TimePickerComponent, _PresentationDisplayDefaultDirective], providers: [
|
|
1122
|
+
{
|
|
1123
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1124
|
+
useExisting: forwardRef(() => TimeRangePickerComponent),
|
|
1125
|
+
multi: true,
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
provide: NG_VALIDATORS,
|
|
1129
|
+
useExisting: forwardRef(() => TimeRangePickerComponent),
|
|
1130
|
+
multi: true,
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
provide: LU_TIME_RANGE_PICKER_INSTANCE,
|
|
1134
|
+
useExisting: forwardRef(() => TimeRangePickerComponent),
|
|
1135
|
+
},
|
|
1136
|
+
], template: "@let startLabel = `${formFieldLabel() && isLocaleFr() ? formFieldLabel() + \" \" : \"\"}(${intl().timeRangePickerStart})`;\n@let endLabel = `${formFieldLabel() && isLocaleFr() ? formFieldLabel() + \" \" : \"\"}(${intl().timeRangePickerEnd})`;\n\n<div\n\tclass=\"timePicker\"\n\t[class.mod-stepper]=\"displayArrows()\"\n\t[class.pr-u-animatedShake]=\"keyPressed()\"\n\t(animationend)=\"keyPressed.set(false)\"\n>\n\t<div class=\"timePicker-fieldset\">\n\t\t<lu-time-picker\n\t\t\t#timePickerStart\n\t\t\t[label]=\"startLabel\"\n\t\t\t[value]=\"startValue()\"\n\t\t\t(valueChange)=\"onStartChange($event)\"\n\t\t\t[disabled]=\"isDisabled()\"\n\t\t\t[max]=\"max()\"\n\t\t\t[step]=\"step()\"\n\t\t\t[size]=\"size()\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t[forceMeridiemDisplay]=\"forceMeridiemDisplay()\"\n\t\t\t(touched)=\"onTouched()\"\n\t\t\t(nextPicker)=\"timePickerEnd.focusPart('hours')\"\n\t\t\t(nonDigitKeyPressed)=\"keyPressed.set(true)\"\n\t\t/>\n\t\t<label role=\"presentation\" [attr.for]=\"timePickerEnd?.firstTimePickerInputId\" class=\"timePicker-arrow\">\n\t\t\t<lu-icon class=\"timePicker-arrow-icon\" icon=\"arrowRight\" />\n\t\t</label>\n\t\t<lu-time-picker\n\t\t\t#timePickerEnd\n\t\t\t[label]=\"endLabel\"\n\t\t\t[value]=\"endValue()\"\n\t\t\t(valueChange)=\"onEndChange($event)\"\n\t\t\t[disabled]=\"isDisabled()\"\n\t\t\t[max]=\"max()\"\n\t\t\t[step]=\"step()\"\n\t\t\t[size]=\"size()\"\n\t\t\t[displayArrows]=\"displayArrows()\"\n\t\t\t[forceMeridiemDisplay]=\"forceMeridiemDisplay()\"\n\t\t\t(touched)=\"onTouched()\"\n\t\t\t(prevPicker)=\"timePickerStart.focusPart(partToFocus())\"\n\t\t\t(nonDigitKeyPressed)=\"keyPressed.set(true)\"\n\t\t/>\n\t</div>\n</div>\n\n<ng-container *luPresentationDisplayDefault>\n\t{{ intl().timeRangePickerFrom }}\n\t<span class=\"pr-u-mask\">{{ startLabel }}</span>\n\t@if (startValue() && startValue() !== DEFAULT_TIME_VALUE) {\n\t\t{{ startValue() }}\n\t} @else {\n\t\t<span aria-hidden=\"true\" data-content-before=\"\u2013\"></span>\n\t}\n\t{{ intl().timeRangePickerAt }}\n\t<span class=\"pr-u-mask\">{{ endLabel }}</span>\n\t@if (endValue() && endValue() !== DEFAULT_TIME_VALUE) {\n\t\t{{ endValue() }}\n\t} @else {\n\t\t<span aria-hidden=\"true\" data-content-before=\"\u2013\"></span>\n\t}\n</ng-container>\n", styles: ["@layer components{.timePicker{--components-timepicker-border: var(--pr-t-color-input-border);--components-timepicker-background: var(--pr-t-color-input-background);--components-timepicker-color: var(--pr-t-color-input-text);--components-timepicker-font: var(--pr-t-font-body-M);--components-timepicker-input-height: 2rem;--components-timepicker-input-minInlineSize: .5rem;--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-input-padding-block: var(--pr-t-spacings-50);--components-timepicker-padding: 0;--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline);--components-timepicker-display-inset-block: var(--components-timepicker-input-padding-block);--components-timepicker-separator-left: 2.375rem;--components-timepicker-start: var(--pr-t-spacings-50);--components-timepicker-end: var(--pr-t-spacings-100);padding:var(--components-timepicker-padding);inline-size:fit-content}.timePicker-fieldset{display:flex;align-items:center;box-shadow:0 0 0 1px var(--components-timepicker-border);border-radius:var(--pr-t-border-radius-input);padding:0;border:0;margin:0;background-color:var(--components-timepicker-background);color:var(--components-timepicker-color);font:var(--components-timepicker-font);position:relative;cursor:text}.timePicker-fieldset:hover{--components-timepicker-border: var(--pr-t-color-input-border-hover)}.timePicker-fieldset:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:3px}.timePicker-fieldset .timePicker-fieldset{box-shadow:initial}.timePicker-fieldset .timePicker-fieldset:focus-within{outline:initial}.timePicker-arrow{align-self:stretch;display:flex;align-items:center;color:var(--pr-t-color-text-subtle)}.timePicker-arrow-icon .lucca-icon{--icon-size: 1.25rem}.timePicker-fieldset-groupSeparator{pointer-events:none;display:grid;place-items:center;text-align:center;inline-size:var(--pr-t-spacings-200);margin-block:0;margin-inline:calc(var(--pr-t-spacings-100) * -1);position:relative;inset-inline-start:calc(var(--pr-t-spacings-25) * -1)}.timePicker-fieldset-group{position:relative}.timePicker-fieldset-group~.timePicker-fieldset-group{margin-inline-start:calc(var(--pr-t-spacings-50) * -1);--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker-fieldset-group-textfield{background-color:transparent}.timePicker-fieldset-group-textfield-input{display:flex;align-items:center;justify-content:center;border:0;block-size:var(--components-timepicker-input-height);inline-size:calc(var(--components-timepicker-input-minInlineSize) + var(--components-timepicker-input-digits, 2) * 1ch);outline:none;color:inherit;background-color:transparent;text-align:center;padding-block:var(--components-timepicker-input-padding-block);padding-inline:var(--components-timepicker-input-padding-inline);box-sizing:content-box;opacity:.0001}.timePicker-fieldset-group-textfield-input::placeholder{color:var(--component-textField-placeholder)}.timePicker-fieldset-group-textfield-input:focus-visible+.timePicker-fieldset-group-textfield-display{background-color:var(--palettes-product-100)}.timePicker-fieldset-group-textfield-display{position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--components-timepicker-display-inset-inline);border-radius:var(--pr-t-border-radius-50);pointer-events:none;display:grid;place-items:center}.timePicker-fieldset-group-stepper{position:absolute;inset-block-end:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);border:0;padding:0;block-size:1rem;inline-size:1rem;inset-inline-start:50%;transform:translate(-50%);background-color:transparent;color:var(--palettes-neutral-600);display:inline-flex;justify-content:center;align-items:center;border-radius:var(--pr-t-border-radius-50);outline:none;opacity:1;transition-property:opacity;transition-duration:var(--commons-animations-durations-fast);cursor:pointer}.timePicker-fieldset-group-stepper:hover{background-color:var(--palettes-neutral-50);color:var(--palettes-neutral-800)}.timePicker-fieldset-group-stepper:disabled{cursor:default;color:var(--palettes-neutral-500);pointer-events:none}.timePicker-fieldset-group-stepper .lucca-icon{--icon-size: 1rem}.timePicker-fieldset-group-stepper+.timePicker-fieldset-group-stepper{inset-block-start:calc(var(--components-timepicker-input-height) + var(--pr-t-spacings-150) + 1px);inset-block-end:auto}.timePicker-fieldset-meridiem{box-sizing:content-box;inline-size:calc(var(--pr-t-spacings-100) + 2ch);padding-inline:var(--pr-t-spacings-50);position:relative;align-self:stretch;margin-inline-start:calc(var(--pr-t-spacings-50) * -1)}.timePicker-fieldset-meridiem:after{content:\"\";position:absolute;inset-block:var(--components-timepicker-display-inset-block);inset-inline:var(--pr-t-spacings-50);border-radius:var(--pr-t-border-radius-50);display:grid;place-items:center;text-align:end}.timePicker-fieldset-meridiem:has(input:focus):after{background-color:var(--palettes-product-100)}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-ante-input:checked):after{content:\"AM\"/\"\"}.timePicker-fieldset-meridiem:has(.timePicker-fieldset-meridiem-post-input:checked):after{content:\"PM\"/\"\"}.timePicker-fieldset-meridiem-ante,.timePicker-fieldset-meridiem-post{border:0;clip-path:rect(1px 1px 1px 1px);margin:-1px;overflow:hidden;padding:0;position:absolute;block-size:1px;inline-size:1px;white-space:nowrap;contain:paint}}@layer mods{.timePicker.mod-S{--components-timepicker-font: var(--pr-t-font-body-S);--components-timepicker-input-padding-block: var(--pr-t-spacings-25);--components-timepicker-input-height: 1.75rem;--components-timepicker-separator-left: 1.875rem;--components-timepicker-start: var(--pr-t-spacings-25);--components-timepicker-end: var(--pr-t-spacings-75)}.timePicker.mod-S .timePicker-arrow-icon .lucca-icon{--icon-size: 1rem}.timePicker.mod-S .timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-start) var(--components-timepicker-end);--components-timepicker-display-inset-inline: var(--components-timepicker-input-padding-inline)}.timePicker.mod-S .timePicker-fieldset-group~.timePicker-fieldset-group{--components-timepicker-input-padding-inline: var(--components-timepicker-end) var(--components-timepicker-start)}.timePicker.mod-S .timePicker-fieldset-meridiem{inline-size:calc(var(--pr-t-spacings-50) + 2ch)}.timePicker.mod-S .timePicker-fieldset-meridiem:after{inset-inline:var(--pr-t-spacings-25)}.timePicker.mod-stepper{--components-timepicker-padding: var(--pr-t-spacings-300) 0}.timePicker.mod-stepperHover:not(:hover,:focus-within) .timePicker-fieldset-group-stepper{opacity:0}.timePicker:has([aria-invalid=true]){--components-timepicker-background: var(--pr-t-color-input-background-critical);--components-timepicker-border: var(--pr-t-color-input-border-critical)}.timePicker:has([aria-invalid=true]):hover{--components-timepicker-border: var(--pr-t-color-input-border-critical-hover)}.timePicker:has([disabled]){--components-timepicker-background: var(--pr-t-color-input-background-disabled);--components-timepicker-border: var(--commons-disabled-placeholder);--components-timepicker-color: var(--pr-t-color-input-text-disabled)}}@layer base{lu-time-range-picker{display:contents}}\n"] }]
|
|
1137
|
+
}], ctorParameters: () => [], propDecorators: { intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }], displayArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayArrows", required: false }] }], forceMeridiemDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceMeridiemDisplay", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }] } });
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Available TimeRangePicker Types
|
|
1141
|
+
*/
|
|
1142
|
+
const TIME_RANGE_PICKER_SIZE = ['S', 'M'];
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* Validator that checks if the end time is before the start time
|
|
1146
|
+
* Returns an error object `endTimeBeforeStartTime: true` if the end time is before the start time
|
|
1147
|
+
*/
|
|
1148
|
+
function endTimeBeforeStartTimeValidator() {
|
|
1149
|
+
return (control) => {
|
|
1150
|
+
if (isNil(control.value)) {
|
|
1151
|
+
return null;
|
|
1152
|
+
}
|
|
1153
|
+
return isEndTimeBeforeStartTime(control.value) ? { endTimeBeforeStartTime: true } : null;
|
|
1154
|
+
};
|
|
1155
|
+
}
|
|
909
1156
|
|
|
910
1157
|
/**
|
|
911
1158
|
* Generated bundle index. Do not edit.
|
|
912
1159
|
*/
|
|
913
1160
|
|
|
914
|
-
export { DurationPickerComponent, LU_DURATION_PICKER_TRANSLATIONS, LU_TIME_PICKER_TRANSLATIONS, TimePickerComponent, luDurationPickerTranslations, luTimePickerTranslations };
|
|
1161
|
+
export { BASE_PICKER_SIZE, DurationPickerComponent, LU_DURATION_PICKER_TRANSLATIONS, LU_TIME_PICKER_TRANSLATIONS, LU_TIME_RANGE_PICKER_TRANSLATIONS, TIME_RANGE_PICKER_SIZE, TimePickerComponent, TimeRangePickerComponent, endTimeBeforeStartTimeValidator, luDurationPickerTranslations, luTimePickerTranslations, luTimeRangePickerTranslations };
|
|
915
1162
|
//# sourceMappingURL=lucca-front-ng-time.mjs.map
|