@lucca-front/ng 21.1.0-rc.0 → 21.1.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 +6 -6
- package/fesm2022/lucca-front-ng-a11y.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-api.mjs +16 -48
- package/fesm2022/lucca-front-ng-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-app-layout.mjs +2 -2
- package/fesm2022/lucca-front-ng-app-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs +5 -5
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-bubble-icon.mjs +51 -0
- package/fesm2022/lucca-front-ng-bubble-icon.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-bubble-illustration.mjs +135 -0
- package/fesm2022/lucca-front-ng-bubble-illustration.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-button.mjs +21 -0
- package/fesm2022/lucca-front-ng-button.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-callout.mjs +41 -15
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-chip.mjs +37 -7
- package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-clear.mjs +21 -6
- package/fesm2022/lucca-front-ng-clear.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-color.mjs +28 -0
- package/fesm2022/lucca-front-ng-color.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-comment.mjs +20 -18
- package/fesm2022/lucca-front-ng-comment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-container.mjs +7 -9
- package/fesm2022/lucca-front-ng-container.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +0 -2
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-user.mjs +14 -14
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +68 -49
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core.mjs +13 -1
- package/fesm2022/lucca-front-ng-core.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-data-table.mjs +6 -6
- package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date.mjs +66 -99
- package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +48 -40
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-department.mjs +8 -24
- package/fesm2022/lucca-front-ng-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +33 -10
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-divider.mjs +10 -1
- package/fesm2022/lucca-front-ng-divider.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-empty-state.mjs +66 -8
- package/fesm2022/lucca-front-ng-empty-state.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-establishment.mjs +11 -75
- package/fesm2022/lucca-front-ng-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-fancy-box.mjs +12 -0
- package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-file-upload.mjs +40 -34
- package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills.mjs +14 -13
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-footer.mjs +3 -0
- package/fesm2022/lucca-front-ng-footer.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +25 -10
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-header.mjs +3 -0
- package/fesm2022/lucca-front-ng-form-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form.mjs +19 -5
- package/fesm2022/lucca-front-ng-form.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-formly.mjs +4 -4
- package/fesm2022/lucca-front-ng-formly.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +2 -2
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +91 -74
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +110 -41
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-gauge.mjs +28 -5
- package/fesm2022/lucca-front-ng-gauge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-grid.mjs +3 -3
- package/fesm2022/lucca-front-ng-grid.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-data.mjs +31 -26
- package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs +5 -2
- package/fesm2022/lucca-front-ng-horizontal-navigation.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-icon.mjs +15 -0
- package/fesm2022/lucca-front-ng-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-index-table.mjs +1 -1
- package/fesm2022/lucca-front-ng-index-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs +12 -0
- package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-input.mjs +7 -7
- package/fesm2022/lucca-front-ng-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-link.mjs +21 -6
- package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listbox.mjs +17 -5
- package/fesm2022/lucca-front-ng-listbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listing.mjs +36 -7
- package/fesm2022/lucca-front-ng-listing.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-loading.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-main-layout.mjs +8 -2
- package/fesm2022/lucca-front-ng-main-layout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-mobile-push.mjs +22 -14
- package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-modal.mjs +1 -1
- package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +31 -28
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-new-badge.mjs +3 -0
- package/fesm2022/lucca-front-ng-new-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-numeric-badge.mjs +10 -1
- package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-option.mjs +227 -337
- package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-page-header.mjs +9 -0
- package/fesm2022/lucca-front-ng-page-header.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-pagination.mjs +29 -5
- package/fesm2022/lucca-front-ng-pagination.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs +11 -5
- package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover.mjs +1 -33
- package/fesm2022/lucca-front-ng-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +30 -20
- package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-progress-bar.mjs +12 -5
- package/fesm2022/lucca-front-ng-progress-bar.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-read-more.mjs +38 -21
- package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-resource-card.mjs +8 -8
- package/fesm2022/lucca-front-ng-resource-card.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll-box.mjs +5 -2
- package/fesm2022/lucca-front-ng-scroll-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +9 -3
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control.mjs +16 -1
- package/fesm2022/lucca-front-ng-segmented-control.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select.mjs +20 -14
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-skeleton.mjs +65 -14
- package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-sortable-list.mjs +25 -1
- package/fesm2022/lucca-front-ng-sortable-list.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-status-badge.mjs +12 -0
- package/fesm2022/lucca-front-ng-status-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tag.mjs +6 -0
- package/fesm2022/lucca-front-ng-tag.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-text-flow.mjs +20 -0
- package/fesm2022/lucca-front-ng-text-flow.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-time.mjs +63 -24
- package/fesm2022/lucca-front-ng-time.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-toast.mjs +5 -5
- package/fesm2022/lucca-front-ng-toast.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tooltip.mjs +13 -27
- package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tree-select.mjs +1 -1
- package/fesm2022/lucca-front-ng-tree-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user-popover.mjs +6 -6
- package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user.mjs +20 -36
- package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs +30 -0
- package/fesm2022/lucca-front-ng-vertical-navigation.mjs.map +1 -1
- package/package.json +19 -3
- package/schematics/action-icon/index.js +4 -5
- package/schematics/action-icon/migration.js +3 -4
- package/schematics/action-icon/migration.spec.js +8 -8
- package/schematics/alignment-utilities/index.js +3 -4
- package/schematics/alignment-utilities/migration.spec.js +8 -8
- package/schematics/cdn-urls/index.js +3 -4
- package/schematics/cdn-urls/migration.js +7 -9
- package/schematics/cdn-urls/migration.spec.js +8 -8
- package/schematics/class-prefix/index.js +3 -4
- package/schematics/class-prefix/migration.spec.js +8 -8
- package/schematics/collection.json +10 -0
- package/schematics/color-text/index.js +3 -4
- package/schematics/color-text/migration.spec.js +8 -8
- package/schematics/component-path/index.js +3 -4
- package/schematics/component-path/migration.spec.js +8 -8
- package/schematics/empty-state-title/index.js +5 -7
- package/schematics/empty-state-title/migration.spec.js +5 -5
- package/schematics/lib/index.js +29 -0
- package/schematics/lib/local-deps/package-lock.json +2 -0
- package/schematics/lib/local-deps/package.json +1 -2
- package/schematics/lib/schematic.utils.js +5 -0
- package/schematics/lu-button/index.js +3 -4
- package/schematics/lu-button/migration.js +5 -11
- package/schematics/lu-button/migration.spec.js +5 -5
- package/schematics/lu-container/index.js +23 -0
- package/schematics/lu-container/migration.js +116 -0
- package/schematics/lu-container/migration.spec.js +23 -0
- package/schematics/lu-container/schema.json +23 -0
- package/schematics/lu-icon/index.js +3 -4
- package/schematics/lu-icon/migration.js +8 -14
- package/schematics/lu-icon/migration.spec.js +5 -5
- package/schematics/lu-loading/index.js +23 -0
- package/schematics/lu-loading/migration.js +136 -0
- package/schematics/lu-loading/migration.spec.js +23 -0
- package/schematics/lu-loading/schema.json +28 -0
- package/schematics/lu-select/index.js +3 -4
- package/schematics/lu-select/migration.js +18 -21
- package/schematics/lu-select/migration.spec.js +5 -5
- package/schematics/lu-select/util.js +17 -19
- package/schematics/lu-text-input/index.js +3 -4
- package/schematics/lu-text-input/migration.js +22 -28
- package/schematics/lu-text-input/migration.spec.js +5 -5
- package/schematics/new-icons/index.js +5 -6
- package/schematics/new-icons/migration.js +11 -16
- package/schematics/new-icons/migration.spec.js +8 -8
- package/schematics/palettes/index.js +3 -4
- package/schematics/palettes/migration.spec.js +8 -8
- package/schematics/tokens-radius/index.js +3 -4
- package/schematics/tokens-radius/migration.spec.js +8 -8
- package/schematics/tokens-spacing/index.js +3 -4
- package/schematics/tokens-spacing/migration.spec.js +8 -8
- package/schematics/tokens-typo/index.js +3 -4
- package/schematics/tokens-typo/migration.spec.js +8 -8
- package/src/components/cdk/_overlay.scss +5 -0
- package/src/definitions/option/_option-item.scss +1 -0
- package/types/lucca-front-ng-a11y.d.ts +3 -3
- package/types/lucca-front-ng-api.d.ts +1 -19
- package/types/lucca-front-ng-breadcrumbs.d.ts +9 -9
- package/types/lucca-front-ng-bubble-icon.d.ts +20 -0
- package/types/lucca-front-ng-bubble-illustration.d.ts +24 -0
- package/types/lucca-front-ng-button.d.ts +21 -0
- package/types/lucca-front-ng-callout.d.ts +33 -3
- package/types/lucca-front-ng-chip.d.ts +33 -3
- package/types/lucca-front-ng-clear.d.ts +21 -6
- package/types/lucca-front-ng-color.d.ts +12 -0
- package/types/lucca-front-ng-comment.d.ts +19 -11
- package/types/lucca-front-ng-container.d.ts +4 -4
- package/types/lucca-front-ng-core-select.d.ts +21 -16
- package/types/lucca-front-ng-core.d.ts +23 -2
- package/types/lucca-front-ng-data-table.d.ts +2 -2
- package/types/lucca-front-ng-date.d.ts +6 -24
- package/types/lucca-front-ng-date2.d.ts +6 -5
- package/types/lucca-front-ng-department.d.ts +3 -12
- package/types/lucca-front-ng-dialog.d.ts +12 -5
- package/types/lucca-front-ng-divider.d.ts +10 -0
- package/types/lucca-front-ng-empty-state.d.ts +21 -3
- package/types/lucca-front-ng-establishment.d.ts +3 -39
- package/types/lucca-front-ng-fancy-box.d.ts +12 -0
- package/types/lucca-front-ng-file-upload.d.ts +18 -8
- package/types/lucca-front-ng-filter-pills.d.ts +6 -5
- package/types/lucca-front-ng-footer.d.ts +3 -0
- package/types/lucca-front-ng-form-field.d.ts +12 -3
- package/types/lucca-front-ng-form-header.d.ts +3 -0
- package/types/lucca-front-ng-form.d.ts +9 -5
- package/types/lucca-front-ng-forms-rich-text-input.d.ts +16 -16
- package/types/lucca-front-ng-forms.d.ts +41 -12
- package/types/lucca-front-ng-gauge.d.ts +25 -0
- package/types/lucca-front-ng-grid.d.ts +1 -1
- package/types/lucca-front-ng-highlight-data.d.ts +36 -15
- package/types/lucca-front-ng-horizontal-navigation.d.ts +3 -0
- package/types/lucca-front-ng-icon.d.ts +15 -0
- package/types/lucca-front-ng-inline-message.d.ts +12 -0
- package/types/lucca-front-ng-input.d.ts +2 -2
- package/types/lucca-front-ng-link.d.ts +17 -2
- package/types/lucca-front-ng-listbox.d.ts +16 -4
- package/types/lucca-front-ng-listing.d.ts +33 -2
- package/types/lucca-front-ng-main-layout.d.ts +6 -0
- package/types/lucca-front-ng-mobile-push.d.ts +9 -2
- package/types/lucca-front-ng-multi-select.d.ts +26 -24
- package/types/lucca-front-ng-new-badge.d.ts +3 -0
- package/types/lucca-front-ng-numeric-badge.d.ts +9 -0
- package/types/lucca-front-ng-option.d.ts +86 -149
- package/types/lucca-front-ng-page-header.d.ts +9 -0
- package/types/lucca-front-ng-pagination.d.ts +26 -2
- package/types/lucca-front-ng-plg-push.d.ts +8 -2
- package/types/lucca-front-ng-popover.d.ts +1 -20
- package/types/lucca-front-ng-popover2.d.ts +8 -6
- package/types/lucca-front-ng-progress-bar.d.ts +9 -0
- package/types/lucca-front-ng-read-more.d.ts +25 -10
- package/types/lucca-front-ng-resource-card.d.ts +6 -0
- package/types/lucca-front-ng-scroll-box.d.ts +4 -1
- package/types/lucca-front-ng-segmented-control-tabs.d.ts +7 -1
- package/types/lucca-front-ng-segmented-control.d.ts +16 -1
- package/types/lucca-front-ng-simple-select.d.ts +5 -4
- package/types/lucca-front-ng-skeleton.d.ts +61 -6
- package/types/lucca-front-ng-sortable-list.d.ts +24 -0
- package/types/lucca-front-ng-status-badge.d.ts +12 -0
- package/types/lucca-front-ng-tag.d.ts +6 -0
- package/types/lucca-front-ng-text-flow.d.ts +8 -0
- package/types/lucca-front-ng-time.d.ts +22 -16
- package/types/lucca-front-ng-toast.d.ts +2 -2
- package/types/lucca-front-ng-tooltip.d.ts +7 -14
- package/types/lucca-front-ng-user-popover.d.ts +6 -7
- package/types/lucca-front-ng-user.d.ts +6 -15
- package/types/lucca-front-ng-vertical-navigation.d.ts +30 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { formatNumber, DecimalPipe, NgClass } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
2
|
import { input, model, viewChild, computed, ChangeDetectionStrategy, Component, output, Directive, numberAttribute, booleanAttribute, LOCALE_ID, ViewChild, Inject, InjectionToken, forwardRef, ViewEncapsulation, inject } from '@angular/core';
|
|
4
3
|
import * as i1 from '@angular/forms';
|
|
5
4
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
6
|
-
import { isNotNil,
|
|
5
|
+
import { isNotNil, ɵeffectWithDeps as _effectWithDeps, intlInputOptions, isNil } from '@lucca-front/ng/core';
|
|
6
|
+
import { formatNumber } from '@angular/common';
|
|
7
|
+
import { toObservable } from '@angular/core/rxjs-interop';
|
|
7
8
|
import { InputDirective } from '@lucca-front/ng/form-field';
|
|
9
|
+
import { skip, tap, take } from 'rxjs';
|
|
8
10
|
|
|
9
11
|
class BasePickerComponent {
|
|
10
12
|
constructor() {
|
|
@@ -196,11 +198,16 @@ class TimePickerPartComponent {
|
|
|
196
198
|
this.value = model('––', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
197
199
|
this.display = input(...(ngDevMode ? [undefined, { debugName: "display" }] : []));
|
|
198
200
|
this.max = input(0, { ...(ngDevMode ? { debugName: "max" } : {}), transform: numberAttribute });
|
|
201
|
+
this.autoWidth = input(false, { ...(ngDevMode ? { debugName: "autoWidth" } : {}), transform: booleanAttribute });
|
|
199
202
|
this.displayArrows = input(false, { ...(ngDevMode ? { debugName: "displayArrows" } : {}), transform: booleanAttribute });
|
|
200
203
|
this.isReadonly = input(false, { ...(ngDevMode ? { debugName: "isReadonly" } : {}), transform: booleanAttribute });
|
|
201
204
|
this.hideValue = input(false, { ...(ngDevMode ? { debugName: "hideValue" } : {}), transform: booleanAttribute });
|
|
202
205
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
203
206
|
this.focused = input(false, { ...(ngDevMode ? { debugName: "focused" } : {}), transform: booleanAttribute });
|
|
207
|
+
this.maxDigits = input(2, ...(ngDevMode ? [{ debugName: "maxDigits" }] : []));
|
|
208
|
+
this.showZero = input(false, { ...(ngDevMode ? { debugName: "showZero" } : {}), transform: booleanAttribute });
|
|
209
|
+
this.digitNumber = model(2, ...(ngDevMode ? [{ debugName: "digitNumber" }] : []));
|
|
210
|
+
this.isValueSet = model(false, ...(ngDevMode ? [{ debugName: "isValueSet" }] : []));
|
|
204
211
|
this.prevRequest = output();
|
|
205
212
|
this.nextRequest = output();
|
|
206
213
|
this.inputControlClick = output();
|
|
@@ -216,9 +223,28 @@ class TimePickerPartComponent {
|
|
|
216
223
|
if (value === '––') {
|
|
217
224
|
return value;
|
|
218
225
|
}
|
|
219
|
-
|
|
226
|
+
// remove comma separator for display
|
|
227
|
+
const formattedNumber = formatNumber(value, this.locale, this.decimalConf()).replace(/,/g, '');
|
|
228
|
+
const label = this.isValueSet() ? formattedNumber : '';
|
|
229
|
+
// remove trailing 0 when value is not 0 or showZero is false
|
|
230
|
+
return this.showZero() ? label : label.replace(/^0/, '');
|
|
220
231
|
}, ...(ngDevMode ? [{ debugName: "valueLabel" }] : []));
|
|
221
232
|
this.inputId = `time-picker-part-${nextId$1++}`;
|
|
233
|
+
_effectWithDeps([this.valueLabel], (valueLabel) => {
|
|
234
|
+
if (valueLabel) {
|
|
235
|
+
if (valueLabel.toString().length > this.digitNumber() || valueLabel.toString().length < this.digitNumber()) {
|
|
236
|
+
if (valueLabel.toString().length > 1) {
|
|
237
|
+
this.digitNumber.set(valueLabel.toString().length);
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
this.digitNumber.set(2);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
toObservable(this.value)
|
|
246
|
+
.pipe(skip(1), tap(() => this.isValueSet.set(true)), take(1))
|
|
247
|
+
.subscribe();
|
|
222
248
|
}
|
|
223
249
|
arrowKeyPressed(event, isUpArrow) {
|
|
224
250
|
event.preventDefault();
|
|
@@ -234,7 +260,10 @@ class TimePickerPartComponent {
|
|
|
234
260
|
return;
|
|
235
261
|
}
|
|
236
262
|
const value = event.target.value;
|
|
237
|
-
let val = value.slice(-
|
|
263
|
+
let val = value.slice(-this.digitNumber());
|
|
264
|
+
if (value.length > this.digitNumber() && val.length < this.maxDigits()) {
|
|
265
|
+
val = value;
|
|
266
|
+
}
|
|
238
267
|
if (this.max() && Number(val) * 10 > this.max()) {
|
|
239
268
|
this.moveRequest(event, 'next');
|
|
240
269
|
}
|
|
@@ -273,6 +302,7 @@ class TimePickerPartComponent {
|
|
|
273
302
|
case 'Delete':
|
|
274
303
|
case 'Backspace':
|
|
275
304
|
this.clearField(event);
|
|
305
|
+
this.digitNumber.set(2);
|
|
276
306
|
break;
|
|
277
307
|
case 'ArrowUp':
|
|
278
308
|
this.arrowKeyPressed(event, true);
|
|
@@ -297,15 +327,15 @@ class TimePickerPartComponent {
|
|
|
297
327
|
}
|
|
298
328
|
}
|
|
299
329
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: TimePickerPartComponent, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
300
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", 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 }, 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 } }, outputs: { value: "valueChange", prevRequest: "prevRequest", nextRequest: "nextRequest", 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 class=\"formLabel 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]=\"hideValue() ? null : value()\"\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/>\n\t\t<span aria-hidden=\"true\" class=\"timePicker-fieldset-group-textfield-display\">{{ 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</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</button>\n\t}\n</div>\n", dependencies: [{ kind: "directive", type: RepeatOnHoldDirective, selector: "[luRepeatOnHold]", outputs: ["hold"] }, { kind: "directive", type: InputDirective, selector: "[luInput]", inputs: ["luInputStandalone"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
330
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", 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", 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 class=\"formLabel 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]=\"hideValue() ? null : value()\"\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\">{{ 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</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</button>\n\t}\n</div>\n", dependencies: [{ kind: "directive", type: RepeatOnHoldDirective, selector: "[luRepeatOnHold]", outputs: ["hold"] }, { kind: "directive", type: InputDirective, selector: "[luInput]", inputs: ["luInputStandalone"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
301
331
|
}
|
|
302
332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: TimePickerPartComponent, decorators: [{
|
|
303
333
|
type: Component,
|
|
304
|
-
args: [{ selector: 'lu-time-picker-part', imports: [RepeatOnHoldDirective,
|
|
334
|
+
args: [{ selector: 'lu-time-picker-part', imports: [RepeatOnHoldDirective, InputDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"timePicker-fieldset-group-textfield\">\n\t<label class=\"formLabel 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]=\"hideValue() ? null : value()\"\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\">{{ 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</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</button>\n\t}\n</div>\n" }]
|
|
305
335
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
306
336
|
type: Inject,
|
|
307
337
|
args: [LOCALE_ID]
|
|
308
|
-
}] }], 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 }] }], 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 }] }], 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: [{
|
|
338
|
+
}] }], 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: [{
|
|
309
339
|
type: ViewChild,
|
|
310
340
|
args: ['timePickerInput']
|
|
311
341
|
}] } });
|
|
@@ -363,7 +393,7 @@ const luDurationPickerTranslations = Translations$1;
|
|
|
363
393
|
class DurationPickerComponent extends BasePickerComponent {
|
|
364
394
|
constructor() {
|
|
365
395
|
super(...arguments);
|
|
366
|
-
this.intl =
|
|
396
|
+
this.intl = input(...intlInputOptions(LU_DURATION_PICKER_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : []));
|
|
367
397
|
this.value = model('PT0S', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
368
398
|
this.max = input('PT99H', ...(ngDevMode ? [{ debugName: "max" }] : []));
|
|
369
399
|
this.displayArrows = input(false, { ...(ngDevMode ? { debugName: "displayArrows" } : {}), transform: booleanAttribute });
|
|
@@ -373,6 +403,12 @@ class DurationPickerComponent extends BasePickerComponent {
|
|
|
373
403
|
this.hours = computed(() => getHoursPartFromDuration(this.value()), ...(ngDevMode ? [{ debugName: "hours" }] : []));
|
|
374
404
|
this.minutes = computed(() => getMinutesPartFromDuration(this.value()), ...(ngDevMode ? [{ debugName: "minutes" }] : []));
|
|
375
405
|
this.shouldHideValue = computed(() => this.hideZeroValue() && this.hours() === 0 && this.minutes() === 0, ...(ngDevMode ? [{ debugName: "shouldHideValue" }] : []));
|
|
406
|
+
this.maxDigits = computed(() => {
|
|
407
|
+
const maxISO = isoDurationToSeconds(this.max());
|
|
408
|
+
const maxHour = maxISO / 3600;
|
|
409
|
+
const maxHourDigits = maxHour.toString().length;
|
|
410
|
+
return maxHourDigits;
|
|
411
|
+
}, ...(ngDevMode ? [{ debugName: "maxDigits" }] : []));
|
|
376
412
|
this.pickerClasses = computed(() => {
|
|
377
413
|
return {
|
|
378
414
|
timePicker: true,
|
|
@@ -387,7 +423,7 @@ class DurationPickerComponent extends BasePickerComponent {
|
|
|
387
423
|
'pr-u-visibilityHidden': this.shouldHideValue(),
|
|
388
424
|
};
|
|
389
425
|
}, ...(ngDevMode ? [{ debugName: "fieldsetSuffixClasses" }] : []));
|
|
390
|
-
this.separator = this.intl.timePickerTimeSeparator;
|
|
426
|
+
this.separator = computed(() => this.intl().timePickerTimeSeparator, ...(ngDevMode ? [{ debugName: "separator" }] : []));
|
|
391
427
|
this.hoursDecimalConf = DEFAULT_TIME_DECIMAL_PIPE_FORMAT$1;
|
|
392
428
|
}
|
|
393
429
|
writeValue(value) {
|
|
@@ -471,8 +507,12 @@ class DurationPickerComponent extends BasePickerComponent {
|
|
|
471
507
|
setTime(protoEvent) {
|
|
472
508
|
let hoursPart = getHoursPartFromDuration(protoEvent.value);
|
|
473
509
|
const minutesPart = getMinutesPartFromDuration(protoEvent.value);
|
|
510
|
+
this.hoursPart().isValueSet.set(true);
|
|
511
|
+
this.minutesPart().isValueSet.set(true);
|
|
474
512
|
if (hoursPart < 0) {
|
|
475
|
-
hoursPart
|
|
513
|
+
if (hoursPart === -1) {
|
|
514
|
+
hoursPart = getHoursPartFromDuration(this.max());
|
|
515
|
+
}
|
|
476
516
|
if (isoDurationToSeconds(createDurationFromHoursAndMinutes(hoursPart, minutesPart)) > isoDurationToSeconds(this.max())) {
|
|
477
517
|
// If current value with minutes is > max, decrement hours again
|
|
478
518
|
hoursPart--;
|
|
@@ -484,9 +524,8 @@ class DurationPickerComponent extends BasePickerComponent {
|
|
|
484
524
|
const max = isoDurationToSeconds(this.max());
|
|
485
525
|
const candidateTimeAsSeconds = hoursPart * 3600 + minutesPart * 60;
|
|
486
526
|
const seconds = roundToNearest(circularize(candidateTimeAsSeconds, max), 60);
|
|
487
|
-
const hours = Math.floor(seconds / 3600);
|
|
488
527
|
const minutes = Math.floor((seconds % 3600) / 60);
|
|
489
|
-
const result = createDurationFromHoursAndMinutes(
|
|
528
|
+
const result = createDurationFromHoursAndMinutes(hoursPart, minutes);
|
|
490
529
|
this.value.set(result);
|
|
491
530
|
this.onChange?.(result);
|
|
492
531
|
this.durationChange.emit({
|
|
@@ -525,24 +564,24 @@ class DurationPickerComponent extends BasePickerComponent {
|
|
|
525
564
|
}
|
|
526
565
|
}
|
|
527
566
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: DurationPickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
528
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.8", type: DurationPickerComponent, isStandalone: true, selector: "lu-duration-picker", inputs: { 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: [
|
|
567
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.8", 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: [
|
|
529
568
|
{
|
|
530
569
|
provide: NG_VALUE_ACCESSOR,
|
|
531
570
|
useExisting: forwardRef(() => DurationPickerComponent),
|
|
532
571
|
multi: true,
|
|
533
572
|
},
|
|
534
|
-
], 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(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()\">{{ 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\t(valueChange)=\"minutesInputHandler($event)\"\n\t\t\t(prevRequest)=\"focusPart('hours')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('minutes', $event)\"\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-
|
|
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()\">{{ 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/>\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-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: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-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", "inputControlClick", "touched"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
535
574
|
}
|
|
536
575
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: DurationPickerComponent, decorators: [{
|
|
537
576
|
type: Component,
|
|
538
|
-
args: [{ selector: 'lu-duration-picker', imports: [TimePickerPartComponent
|
|
577
|
+
args: [{ selector: 'lu-duration-picker', imports: [TimePickerPartComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
539
578
|
{
|
|
540
579
|
provide: NG_VALUE_ACCESSOR,
|
|
541
580
|
useExisting: forwardRef(() => DurationPickerComponent),
|
|
542
581
|
multi: true,
|
|
543
582
|
},
|
|
544
|
-
], 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(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()\">{{ 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\t(valueChange)=\"minutesInputHandler($event)\"\n\t\t\t(prevRequest)=\"focusPart('hours')\"\n\t\t\t(inputControlClick)=\"inputControlClickHandler('minutes', $event)\"\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-
|
|
545
|
-
}], propDecorators: { 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"] }] } });
|
|
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()\">{{ 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/>\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-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: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-duration-picker{display:inline-flex}}\n"] }]
|
|
584
|
+
}], 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"] }] } });
|
|
546
585
|
|
|
547
586
|
const castToIsoTime = (str) => str;
|
|
548
587
|
const convertStringToIsoTime = (time) => {
|
|
@@ -654,7 +693,7 @@ let nextId = 0;
|
|
|
654
693
|
class TimePickerComponent extends BasePickerComponent {
|
|
655
694
|
constructor() {
|
|
656
695
|
super(...arguments);
|
|
657
|
-
this.intl =
|
|
696
|
+
this.intl = input(...intlInputOptions(LU_TIME_PICKER_TRANSLATIONS), ...(ngDevMode ? [{ debugName: "intl" }] : []));
|
|
658
697
|
this.localeId = inject(LOCALE_ID);
|
|
659
698
|
this.idSuffix = nextId++;
|
|
660
699
|
this.anteMeridiemRef = viewChild('anteMeridiemRef', ...(ngDevMode ? [{ debugName: "anteMeridiemRef" }] : []));
|
|
@@ -689,7 +728,7 @@ class TimePickerComponent extends BasePickerComponent {
|
|
|
689
728
|
[`mod-${this.size()}`]: Boolean(this.size()),
|
|
690
729
|
};
|
|
691
730
|
}, ...(ngDevMode ? [{ debugName: "pickerClasses" }] : []));
|
|
692
|
-
this.separator = this.intl.timePickerTimeSeparator;
|
|
731
|
+
this.separator = computed(() => this.intl().timePickerTimeSeparator, ...(ngDevMode ? [{ debugName: "separator" }] : []));
|
|
693
732
|
this.hoursDecimalConf = DEFAULT_TIME_DECIMAL_PIPE_FORMAT;
|
|
694
733
|
this.maxHours = computed(() => {
|
|
695
734
|
if (this.enableMeridiemDisplay()) {
|
|
@@ -843,24 +882,24 @@ class TimePickerComponent extends BasePickerComponent {
|
|
|
843
882
|
});
|
|
844
883
|
}
|
|
845
884
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: TimePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
846
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: TimePickerComponent, isStandalone: true, selector: "lu-time-picker", inputs: { 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" }, providers: [
|
|
885
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", 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" }, providers: [
|
|
847
886
|
{
|
|
848
887
|
provide: NG_VALUE_ACCESSOR,
|
|
849
888
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
850
889
|
multi: true,
|
|
851
890
|
},
|
|
852
|
-
], 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\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-width: 1.5rem;--components-timepicker-padding: 0;--components-timepicker-paddingInput-inline: var(--pr-t-spacings-50);--components-timepicker-paddingInput-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-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:var(--components-timepicker-input-width);outline:none;color:inherit;background-color:transparent;text-align:center;padding-block:var(--components-timepicker-paddingInput-inline);padding-inline:var(--components-timepicker-paddingInput-block);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-paddingInput-inline) var(--components-timepicker-paddingInput-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{inline-size:calc(var(--components-timepicker-input-width) + var(--components-timepicker-paddingInput-block) * 2);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-paddingInput-inline) var(--components-timepicker-paddingInput-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: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-paddingInput-inline: var(--pr-t-spacings-25);--components-timepicker-paddingInput-block: var(--pr-t-spacings-75);--components-timepicker-input-height: 1.75rem;--components-timepicker-input-width: 1.25rem;--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", "displayArrows", "isReadonly", "hideValue", "disabled", "focused"], outputs: ["valueChange", "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 }); }
|
|
891
|
+
], 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-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: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 }); }
|
|
853
892
|
}
|
|
854
893
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
855
894
|
type: Component,
|
|
856
|
-
args: [{ selector: 'lu-time-picker', imports: [TimePickerPartComponent,
|
|
895
|
+
args: [{ selector: 'lu-time-picker', imports: [TimePickerPartComponent, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
857
896
|
{
|
|
858
897
|
provide: NG_VALUE_ACCESSOR,
|
|
859
898
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
860
899
|
multi: true,
|
|
861
900
|
},
|
|
862
|
-
], 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\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-width: 1.5rem;--components-timepicker-padding: 0;--components-timepicker-paddingInput-inline: var(--pr-t-spacings-50);--components-timepicker-paddingInput-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-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:var(--components-timepicker-input-width);outline:none;color:inherit;background-color:transparent;text-align:center;padding-block:var(--components-timepicker-paddingInput-inline);padding-inline:var(--components-timepicker-paddingInput-block);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-paddingInput-inline) var(--components-timepicker-paddingInput-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{inline-size:calc(var(--components-timepicker-input-width) + var(--components-timepicker-paddingInput-block) * 2);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-paddingInput-inline) var(--components-timepicker-paddingInput-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: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-paddingInput-inline: var(--pr-t-spacings-25);--components-timepicker-paddingInput-block: var(--pr-t-spacings-75);--components-timepicker-input-height: 1.75rem;--components-timepicker-input-width: 1.25rem;--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"] }]
|
|
863
|
-
}], propDecorators: { 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"] }] } });
|
|
901
|
+
], 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-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: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"] }]
|
|
902
|
+
}], 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"] }] } });
|
|
864
903
|
|
|
865
904
|
/**
|
|
866
905
|
* Generated bundle index. Do not edit.
|