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