@trismegisto/angular 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/fesm2022/trismegisto-angular-avatar-group.mjs +15 -3
- package/fesm2022/trismegisto-angular-avatar-group.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-bulk-input.mjs +1 -1
- package/fesm2022/trismegisto-angular-bulk-input.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-button.mjs +3 -10
- package/fesm2022/trismegisto-angular-button.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-code-viewer.mjs +0 -1
- package/fesm2022/trismegisto-angular-code-viewer.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-combobox-multi.mjs +4 -11
- package/fesm2022/trismegisto-angular-combobox-multi.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-combobox.mjs +5 -16
- package/fesm2022/trismegisto-angular-combobox.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-command-palette.mjs +28 -4
- package/fesm2022/trismegisto-angular-command-palette.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-data-grid.mjs +4 -4
- package/fesm2022/trismegisto-angular-data-grid.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-date-picker.mjs +6 -64
- package/fesm2022/trismegisto-angular-date-picker.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-dialog.mjs +1 -1
- package/fesm2022/trismegisto-angular-dialog.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-drag-drop.mjs +8 -1
- package/fesm2022/trismegisto-angular-drag-drop.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-event-calendar.mjs +1 -1
- package/fesm2022/trismegisto-angular-event-calendar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-filter-bar.mjs +1 -1
- package/fesm2022/trismegisto-angular-filter-bar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-i18n.mjs +1 -9
- package/fesm2022/trismegisto-angular-i18n.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-icon.mjs +2 -90
- package/fesm2022/trismegisto-angular-icon.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-kanban.mjs +130 -12
- package/fesm2022/trismegisto-angular-kanban.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-list-editor.mjs +1 -1
- package/fesm2022/trismegisto-angular-list-editor.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-message-scroller.mjs +1 -1
- package/fesm2022/trismegisto-angular-message-scroller.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-message.mjs +1 -1
- package/fesm2022/trismegisto-angular-message.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-popover.mjs +3 -3
- package/fesm2022/trismegisto-angular-popover.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-property-view.mjs +1 -1
- package/fesm2022/trismegisto-angular-property-view.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-radio.mjs +4 -11
- package/fesm2022/trismegisto-angular-radio.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-rich-text.mjs +1 -1
- package/fesm2022/trismegisto-angular-rich-text.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-session-recovery.mjs +11 -13
- package/fesm2022/trismegisto-angular-session-recovery.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-settings.mjs +1 -1
- package/fesm2022/trismegisto-angular-settings.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-shortcut-list.mjs +1 -1
- package/fesm2022/trismegisto-angular-shortcut-list.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-sidebar.mjs +0 -4
- package/fesm2022/trismegisto-angular-sidebar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-stat-group.mjs +1 -1
- package/fesm2022/trismegisto-angular-stat-group.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-state-page.mjs +1 -8
- package/fesm2022/trismegisto-angular-state-page.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-state-screen.mjs +1 -1
- package/fesm2022/trismegisto-angular-state-screen.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-stepper.mjs +34 -32
- package/fesm2022/trismegisto-angular-stepper.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-switch.mjs +4 -11
- package/fesm2022/trismegisto-angular-switch.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-tab-bar.mjs +46 -2
- package/fesm2022/trismegisto-angular-tab-bar.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-tag.mjs +3 -11
- package/fesm2022/trismegisto-angular-tag.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-textarea.mjs +4 -11
- package/fesm2022/trismegisto-angular-textarea.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-theme-builder.mjs +5 -3
- package/fesm2022/trismegisto-angular-theme-builder.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-theme.mjs +1 -1
- package/fesm2022/trismegisto-angular-theme.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-wizard.mjs +1 -1
- package/fesm2022/trismegisto-angular-wizard.mjs.map +1 -1
- package/fesm2022/trismegisto-angular-workspace.mjs +5 -1
- package/fesm2022/trismegisto-angular-workspace.mjs.map +1 -1
- package/fesm2022/trismegisto-angular.mjs +3 -4
- package/fesm2022/trismegisto-angular.mjs.map +1 -1
- package/package.json +5 -13
- package/types/trismegisto-angular-avatar-group.d.ts +11 -2
- package/types/trismegisto-angular-avatar-group.d.ts.map +1 -1
- package/types/trismegisto-angular-button.d.ts +1 -3
- package/types/trismegisto-angular-button.d.ts.map +1 -1
- package/types/trismegisto-angular-code-viewer.d.ts.map +1 -1
- package/types/trismegisto-angular-combobox-multi.d.ts +2 -4
- package/types/trismegisto-angular-combobox-multi.d.ts.map +1 -1
- package/types/trismegisto-angular-combobox.d.ts +1 -5
- package/types/trismegisto-angular-combobox.d.ts.map +1 -1
- package/types/trismegisto-angular-command-palette.d.ts +10 -1
- package/types/trismegisto-angular-command-palette.d.ts.map +1 -1
- package/types/trismegisto-angular-data-grid.d.ts +0 -9
- package/types/trismegisto-angular-data-grid.d.ts.map +1 -1
- package/types/trismegisto-angular-date-picker.d.ts +2 -17
- package/types/trismegisto-angular-date-picker.d.ts.map +1 -1
- package/types/trismegisto-angular-drag-drop.d.ts +8 -0
- package/types/trismegisto-angular-drag-drop.d.ts.map +1 -1
- package/types/trismegisto-angular-i18n.d.ts +1 -7
- package/types/trismegisto-angular-i18n.d.ts.map +1 -1
- package/types/trismegisto-angular-icon.d.ts +2 -5
- package/types/trismegisto-angular-icon.d.ts.map +1 -1
- package/types/trismegisto-angular-kanban.d.ts +57 -5
- package/types/trismegisto-angular-kanban.d.ts.map +1 -1
- package/types/trismegisto-angular-popover.d.ts +1 -1
- package/types/trismegisto-angular-popover.d.ts.map +1 -1
- package/types/trismegisto-angular-radio.d.ts +1 -3
- package/types/trismegisto-angular-radio.d.ts.map +1 -1
- package/types/trismegisto-angular-reorder-list.d.ts +0 -5
- package/types/trismegisto-angular-reorder-list.d.ts.map +1 -1
- package/types/trismegisto-angular-session-recovery.d.ts +6 -6
- package/types/trismegisto-angular-sidebar.d.ts +0 -2
- package/types/trismegisto-angular-sidebar.d.ts.map +1 -1
- package/types/trismegisto-angular-state-page.d.ts +1 -7
- package/types/trismegisto-angular-state-page.d.ts.map +1 -1
- package/types/trismegisto-angular-stepper.d.ts.map +1 -1
- package/types/trismegisto-angular-switch.d.ts +1 -3
- package/types/trismegisto-angular-switch.d.ts.map +1 -1
- package/types/trismegisto-angular-tab-bar.d.ts +11 -0
- package/types/trismegisto-angular-tab-bar.d.ts.map +1 -1
- package/types/trismegisto-angular-tag.d.ts +2 -4
- package/types/trismegisto-angular-tag.d.ts.map +1 -1
- package/types/trismegisto-angular-textarea.d.ts +1 -3
- package/types/trismegisto-angular-textarea.d.ts.map +1 -1
- package/types/trismegisto-angular-theme-builder.d.ts.map +1 -1
- package/types/trismegisto-angular-theme.d.ts +4 -3
- package/types/trismegisto-angular-theme.d.ts.map +1 -1
- package/types/trismegisto-angular-workspace.d.ts +0 -2
- package/types/trismegisto-angular-workspace.d.ts.map +1 -1
- package/types/trismegisto-angular.d.ts +3 -4
- package/types/trismegisto-angular.d.ts.map +1 -1
- package/fesm2022/trismegisto-angular-deprecation.mjs +0 -26
- package/fesm2022/trismegisto-angular-deprecation.mjs.map +0 -1
- package/fesm2022/trismegisto-angular-field.mjs +0 -35
- package/fesm2022/trismegisto-angular-field.mjs.map +0 -1
- package/types/trismegisto-angular-deprecation.d.ts +0 -11
- package/types/trismegisto-angular-deprecation.d.ts.map +0 -1
- package/types/trismegisto-angular-field.d.ts +0 -18
- package/types/trismegisto-angular-field.d.ts.map +0 -1
|
@@ -5,7 +5,6 @@ import { HERMES_MESSAGES } from '@trismegisto/angular/i18n';
|
|
|
5
5
|
import { ICON_ANGLE, ICON_CALENDAR, ICON_CHECK, ICON_EXCLAMATION_TRIANGLE, useHermesIcons, IconComponent } from '@trismegisto/angular/icon';
|
|
6
6
|
import { HermesFormFieldBase, DateRangeValidators } from '@trismegisto/angular/forms';
|
|
7
7
|
import { isPlatformBrowser } from '@angular/common';
|
|
8
|
-
import { warnDeprecated } from '@trismegisto/angular/deprecation';
|
|
9
8
|
|
|
10
9
|
const DATE_PICKER_ICONS = [ICON_ANGLE, ICON_CALENDAR, ICON_CHECK, ICON_EXCLAMATION_TRIANGLE];
|
|
11
10
|
|
|
@@ -480,20 +479,10 @@ let sequence = 0;
|
|
|
480
479
|
* Acessibilidade dos atalhos: lista (`<ul>`) nomeada ("Atalhos de intervalo") de botões alternáveis;
|
|
481
480
|
* o que corresponde ao intervalo atual tem `aria-pressed="true"` e uma marca ✓ visível (não só cor).
|
|
482
481
|
* Eles vêm antes do calendário na ordem de Tab; ao abrir, o foco continua indo para o dia.
|
|
483
|
-
*
|
|
484
|
-
* Legado 0.1.x, depreciado: `[startControl]`/`[endControl]` ou `[(start)]`/`[(end)]`.
|
|
485
482
|
*/
|
|
486
483
|
class DateRangePickerComponent extends HermesFormFieldBase {
|
|
487
484
|
#icons = useHermesIcons(DATE_PICKER_ICONS);
|
|
488
485
|
value = model(EMPTY_DATE_RANGE, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
489
|
-
/** @deprecated desde 0.2.0 — use `formControlName`/`[(ngModel)]`/`[(value)]` com `DateRange`. */
|
|
490
|
-
startControl = input(null, ...(ngDevMode ? [{ debugName: "startControl" }] : /* istanbul ignore next */ []));
|
|
491
|
-
/** @deprecated desde 0.2.0 — idem `startControl`. */
|
|
492
|
-
endControl = input(null, ...(ngDevMode ? [{ debugName: "endControl" }] : /* istanbul ignore next */ []));
|
|
493
|
-
/** @deprecated desde 0.2.0 — use `[(value)]` com `DateRange`. */
|
|
494
|
-
start = model(null, ...(ngDevMode ? [{ debugName: "start" }] : /* istanbul ignore next */ []));
|
|
495
|
-
/** @deprecated desde 0.2.0 — use `[(value)]` com `DateRange`. */
|
|
496
|
-
end = model(null, ...(ngDevMode ? [{ debugName: "end" }] : /* istanbul ignore next */ []));
|
|
497
486
|
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
498
487
|
labelHidden = input(false, { ...(ngDevMode ? { debugName: "labelHidden" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
499
488
|
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
@@ -516,22 +505,9 @@ class DateRangePickerComponent extends HermesFormFieldBase {
|
|
|
516
505
|
frame = viewChild.required('frame');
|
|
517
506
|
startInput = viewChild.required('startInput');
|
|
518
507
|
calendar = viewChild(CalendarComponent, ...(ngDevMode ? [{ debugName: "calendar" }] : /* istanbul ignore next */ []));
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
this.legacyTick();
|
|
523
|
-
const legacy = this.startControl();
|
|
524
|
-
return toIsoDate(legacy ? legacy.value : this.value()?.start);
|
|
525
|
-
}, ...(ngDevMode ? [{ debugName: "startValue" }] : /* istanbul ignore next */ []));
|
|
526
|
-
endValue = computed(() => {
|
|
527
|
-
this.legacyTick();
|
|
528
|
-
const legacy = this.endControl();
|
|
529
|
-
return toIsoDate(legacy ? legacy.value : this.value()?.end);
|
|
530
|
-
}, ...(ngDevMode ? [{ debugName: "endValue" }] : /* istanbul ignore next */ []));
|
|
531
|
-
rangeDisabled = computed(() => {
|
|
532
|
-
this.legacyTick();
|
|
533
|
-
return this.isDisabled() || !!this.startControl()?.disabled || !!this.endControl()?.disabled;
|
|
534
|
-
}, ...(ngDevMode ? [{ debugName: "rangeDisabled" }] : /* istanbul ignore next */ []));
|
|
508
|
+
startValue = computed(() => toIsoDate(this.value()?.start), ...(ngDevMode ? [{ debugName: "startValue" }] : /* istanbul ignore next */ []));
|
|
509
|
+
endValue = computed(() => toIsoDate(this.value()?.end), ...(ngDevMode ? [{ debugName: "endValue" }] : /* istanbul ignore next */ []));
|
|
510
|
+
rangeDisabled = computed(() => this.isDisabled(), ...(ngDevMode ? [{ debugName: "rangeDisabled" }] : /* istanbul ignore next */ []));
|
|
535
511
|
rangeRequired = computed(() => this.isRequired() || !!this.activeControl()?.hasValidator(DateRangeValidators.required), ...(ngDevMode ? [{ debugName: "rangeRequired" }] : /* istanbul ignore next */ []));
|
|
536
512
|
typedStart = signal('', ...(ngDevMode ? [{ debugName: "typedStart" }] : /* istanbul ignore next */ []));
|
|
537
513
|
typedEnd = signal('', ...(ngDevMode ? [{ debugName: "typedEnd" }] : /* istanbul ignore next */ []));
|
|
@@ -582,10 +558,6 @@ class DateRangePickerComponent extends HermesFormFieldBase {
|
|
|
582
558
|
describedBy = computed(() => [this.hint() ? this.hintId : '', this.rangeError() ? this.errorId : ''].filter(Boolean).join(' ') || null, ...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
|
|
583
559
|
constructor() {
|
|
584
560
|
super();
|
|
585
|
-
effect(() => {
|
|
586
|
-
if (this.startControl() || this.endControl())
|
|
587
|
-
warnDeprecated('`[startControl]`/`[endControl]` em <hm-date-range-picker>', '`formControlName`/`[(value)]` com `DateRange`');
|
|
588
|
-
});
|
|
589
561
|
effect(() => {
|
|
590
562
|
const s = this.startValue();
|
|
591
563
|
if (this.editing !== 'start')
|
|
@@ -596,26 +568,6 @@ class DateRangePickerComponent extends HermesFormFieldBase {
|
|
|
596
568
|
if (this.editing !== 'end')
|
|
597
569
|
this.typedEnd.set(formatDisplayDate(e, this.pattern()));
|
|
598
570
|
});
|
|
599
|
-
// Legado `[startControl]`/`[endControl]`: acompanha os valores de fora.
|
|
600
|
-
effect((onCleanup) => {
|
|
601
|
-
const controls = [this.startControl(), this.endControl()].filter((c) => !!c);
|
|
602
|
-
const subs = controls.map((c) => c.events.subscribe(() => this.legacyTick.update((n) => n + 1)));
|
|
603
|
-
onCleanup(() => subs.forEach((s) => s.unsubscribe()));
|
|
604
|
-
});
|
|
605
|
-
// Legado `[(start)]`/`[(end)]`: o que vier de fora entra no `value`. Só propaga MUDANÇA (a 1ª
|
|
606
|
-
// leitura, null/null, não pode apagar um valor que chegou pelo formulário).
|
|
607
|
-
let previous = EMPTY_DATE_RANGE;
|
|
608
|
-
effect(() => {
|
|
609
|
-
const next = { start: this.start(), end: this.end() };
|
|
610
|
-
if (next.start === previous.start && next.end === previous.end)
|
|
611
|
-
return;
|
|
612
|
-
previous = next;
|
|
613
|
-
untracked(() => {
|
|
614
|
-
const current = this.value() ?? EMPTY_DATE_RANGE;
|
|
615
|
-
if (current.start !== next.start || current.end !== next.end)
|
|
616
|
-
this.value.set(next);
|
|
617
|
-
});
|
|
618
|
-
});
|
|
619
571
|
}
|
|
620
572
|
/** Formulário sem valor inicial escreve `null`; o componente trabalha sempre com as duas pontas. */
|
|
621
573
|
writeValue(value) {
|
|
@@ -657,26 +609,16 @@ class DateRangePickerComponent extends HermesFormFieldBase {
|
|
|
657
609
|
this.parseError.set('');
|
|
658
610
|
this.commitEdge(edge, iso);
|
|
659
611
|
}
|
|
660
|
-
/** Grava uma ponta
|
|
661
|
-
* `model` daquela ponta. */
|
|
612
|
+
/** Grava uma ponta no `value` (formulário / two-way). */
|
|
662
613
|
commitEdge(edge, iso) {
|
|
663
614
|
if ((edge === 'start' ? this.startValue() : this.endValue()) === iso)
|
|
664
615
|
return;
|
|
665
616
|
const out = fromIsoDate(iso, this.valueFormat());
|
|
666
|
-
const legacy = edge === 'start' ? this.startControl() : this.endControl();
|
|
667
|
-
if (legacy) {
|
|
668
|
-
const empty = legacy.defaultValue === '' ? '' : null;
|
|
669
|
-
legacy.setValue(out ?? empty);
|
|
670
|
-
legacy.markAsDirty();
|
|
671
|
-
}
|
|
672
|
-
(edge === 'start' ? this.start : this.end).set(out);
|
|
673
617
|
const current = this.value() ?? EMPTY_DATE_RANGE;
|
|
674
618
|
this.commit(edge === 'start' ? { ...current, start: out } : { ...current, end: out });
|
|
675
619
|
}
|
|
676
620
|
touchAll() {
|
|
677
621
|
this.markTouched();
|
|
678
|
-
this.startControl()?.markAsTouched();
|
|
679
|
-
this.endControl()?.markAsTouched();
|
|
680
622
|
}
|
|
681
623
|
toggle(edge = 'start') {
|
|
682
624
|
if (this.rangeDisabled())
|
|
@@ -750,12 +692,12 @@ class DateRangePickerComponent extends HermesFormFieldBase {
|
|
|
750
692
|
return this.frame().nativeElement;
|
|
751
693
|
}
|
|
752
694
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: DateRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
753
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: DateRangePickerComponent, isStandalone: true, selector: "hm-date-range-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null },
|
|
695
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.24", type: DateRangePickerComponent, isStandalone: true, selector: "hm-date-range-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, labelHidden: { classPropertyName: "labelHidden", publicName: "labelHidden", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null }, presets: { classPropertyName: "presets", publicName: "presets", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, viewQueries: [{ propertyName: "frame", first: true, predicate: ["frame"], descendants: true, isSignal: true }, { propertyName: "startInput", first: true, predicate: ["startInput"], descendants: true, isSignal: true }, { propertyName: "calendar", first: true, predicate: CalendarComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"hm-field\" role=\"group\" [attr.aria-labelledby]=\"id + '-label'\">\n <div class=\"hm-field__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-field__label\" [id]=\"id + '-label'\">{{ label() }}</span>\n @if (rangeRequired()) {\n <span class=\"hm-field__required\">{{ fieldText.required }}</span>\n }\n </div>\n\n <div\n #frame\n class=\"hm-field__frame hm-date-picker__frame hm-date-range\"\n [class.hm-field__frame--invalid]=\"rangeError()\"\n [class.hm-field__frame--disabled]=\"rangeDisabled()\"\n >\n <input\n #startInput\n class=\"hm-field__control hm-date-range__input\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n [attr.maxlength]=\"dateLength()\"\n [attr.size]=\"dateLength()\"\n [value]=\"typedStart()\"\n [attr.placeholder]=\"text.placeholder\"\n [attr.aria-label]=\"label() + ' \u2014 ' + text.start\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"rangeRequired() ? 'true' : null\"\n [attr.aria-invalid]=\"rangeError() ? 'true' : null\"\n [disabled]=\"rangeDisabled()\"\n (input)=\"onInput('start', $event)\"\n (blur)=\"onBlur('start')\"\n (keydown)=\"onKeydown('start', $event)\"\n />\n <span class=\"hm-date-range__sep\" aria-hidden=\"true\">\u2013</span>\n <input\n class=\"hm-field__control hm-date-range__input\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n [attr.maxlength]=\"dateLength()\"\n [attr.size]=\"dateLength()\"\n [value]=\"typedEnd()\"\n [attr.placeholder]=\"text.placeholder\"\n [attr.aria-label]=\"label() + ' \u2014 ' + text.end\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"rangeRequired() ? 'true' : null\"\n [attr.aria-invalid]=\"rangeError() ? 'true' : null\"\n [disabled]=\"rangeDisabled()\"\n (input)=\"onInput('end', $event)\"\n (blur)=\"onBlur('end')\"\n (keydown)=\"onKeydown('end', $event)\"\n />\n <button\n type=\"button\"\n class=\"hm-field__action\"\n [attr.aria-label]=\"text.openCalendar + ': ' + label()\"\n [attr.aria-expanded]=\"open()\"\n aria-haspopup=\"dialog\"\n [disabled]=\"rangeDisabled()\"\n (click)=\"toggle()\"\n >\n <hm-icon shape=\"calendar\" />\n </button>\n </div>\n\n @if (hint()) {\n <p class=\"hm-field__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (rangeError()) {\n <p class=\"hm-field__error\" [id]=\"errorId\" role=\"alert\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ rangeError() }}\n </p>\n }\n</div>\n\n@if (open()) {\n <hm-date-popover [anchorEl]=\"frameEl()\" [label]=\"label()\" (closed)=\"close()\" (ready)=\"onPopoverReady()\">\n <div class=\"hm-date-range__body\" [class.hm-date-range__body--presets]=\"presetViews().length\">\n <!-- Atalhos (`presets`): lista nomeada de bot\u00F5es altern\u00E1veis; o ativo tem aria-pressed e \u2713. -->\n @if (presetViews().length) {\n <ul class=\"hm-date-range__presets\" [attr.aria-label]=\"presetsLabel()\">\n @for (preset of presetViews(); track $index) {\n <li>\n <button\n type=\"button\"\n class=\"hm-date-range__preset\"\n [class.hm-date-range__preset--active]=\"preset.active\"\n [attr.aria-pressed]=\"preset.active\"\n [disabled]=\"!preset.range\"\n (click)=\"applyPreset(preset.range)\"\n >\n <span class=\"hm-date-range__preset-check\" aria-hidden=\"true\">\n @if (preset.active) {\n <hm-icon shape=\"check\" />\n }\n </span>\n {{ preset.label }}\n </button>\n </li>\n }\n </ul>\n }\n <hm-calendar\n [rangeStart]=\"startValue()\"\n [rangeEnd]=\"endValue()\"\n [min]=\"min()\"\n [max]=\"max()\"\n (picked)=\"onPicked($event)\"\n (cleared)=\"onCleared()\"\n />\n </div>\n </hm-date-popover>\n}\n", dependencies: [{ kind: "component", type: IconComponent, selector: "hm-icon", inputs: ["shape", "direction", "size", "solid", "badge", "status", "flip", "inverse", "label"] }, { kind: "component", type: CalendarComponent, selector: "hm-calendar", inputs: ["selected", "rangeStart", "rangeEnd", "min", "max"], outputs: ["picked", "cleared"] }, { kind: "component", type: DatePopoverComponent, selector: "hm-date-popover", inputs: ["anchorEl", "label"], outputs: ["closed", "ready"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
754
696
|
}
|
|
755
697
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.24", ngImport: i0, type: DateRangePickerComponent, decorators: [{
|
|
756
698
|
type: Component,
|
|
757
699
|
args: [{ selector: 'hm-date-range-picker', imports: [IconComponent, CalendarComponent, DatePopoverComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"hm-field\" role=\"group\" [attr.aria-labelledby]=\"id + '-label'\">\n <div class=\"hm-field__label-row\" [class.hm-visually-hidden]=\"labelHidden()\">\n <span class=\"hm-field__label\" [id]=\"id + '-label'\">{{ label() }}</span>\n @if (rangeRequired()) {\n <span class=\"hm-field__required\">{{ fieldText.required }}</span>\n }\n </div>\n\n <div\n #frame\n class=\"hm-field__frame hm-date-picker__frame hm-date-range\"\n [class.hm-field__frame--invalid]=\"rangeError()\"\n [class.hm-field__frame--disabled]=\"rangeDisabled()\"\n >\n <input\n #startInput\n class=\"hm-field__control hm-date-range__input\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n [attr.maxlength]=\"dateLength()\"\n [attr.size]=\"dateLength()\"\n [value]=\"typedStart()\"\n [attr.placeholder]=\"text.placeholder\"\n [attr.aria-label]=\"label() + ' \u2014 ' + text.start\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"rangeRequired() ? 'true' : null\"\n [attr.aria-invalid]=\"rangeError() ? 'true' : null\"\n [disabled]=\"rangeDisabled()\"\n (input)=\"onInput('start', $event)\"\n (blur)=\"onBlur('start')\"\n (keydown)=\"onKeydown('start', $event)\"\n />\n <span class=\"hm-date-range__sep\" aria-hidden=\"true\">\u2013</span>\n <input\n class=\"hm-field__control hm-date-range__input\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n [attr.maxlength]=\"dateLength()\"\n [attr.size]=\"dateLength()\"\n [value]=\"typedEnd()\"\n [attr.placeholder]=\"text.placeholder\"\n [attr.aria-label]=\"label() + ' \u2014 ' + text.end\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-required]=\"rangeRequired() ? 'true' : null\"\n [attr.aria-invalid]=\"rangeError() ? 'true' : null\"\n [disabled]=\"rangeDisabled()\"\n (input)=\"onInput('end', $event)\"\n (blur)=\"onBlur('end')\"\n (keydown)=\"onKeydown('end', $event)\"\n />\n <button\n type=\"button\"\n class=\"hm-field__action\"\n [attr.aria-label]=\"text.openCalendar + ': ' + label()\"\n [attr.aria-expanded]=\"open()\"\n aria-haspopup=\"dialog\"\n [disabled]=\"rangeDisabled()\"\n (click)=\"toggle()\"\n >\n <hm-icon shape=\"calendar\" />\n </button>\n </div>\n\n @if (hint()) {\n <p class=\"hm-field__hint\" [id]=\"hintId\">{{ hint() }}</p>\n }\n @if (rangeError()) {\n <p class=\"hm-field__error\" [id]=\"errorId\" role=\"alert\">\n <hm-icon shape=\"exclamation-triangle\" />\n {{ rangeError() }}\n </p>\n }\n</div>\n\n@if (open()) {\n <hm-date-popover [anchorEl]=\"frameEl()\" [label]=\"label()\" (closed)=\"close()\" (ready)=\"onPopoverReady()\">\n <div class=\"hm-date-range__body\" [class.hm-date-range__body--presets]=\"presetViews().length\">\n <!-- Atalhos (`presets`): lista nomeada de bot\u00F5es altern\u00E1veis; o ativo tem aria-pressed e \u2713. -->\n @if (presetViews().length) {\n <ul class=\"hm-date-range__presets\" [attr.aria-label]=\"presetsLabel()\">\n @for (preset of presetViews(); track $index) {\n <li>\n <button\n type=\"button\"\n class=\"hm-date-range__preset\"\n [class.hm-date-range__preset--active]=\"preset.active\"\n [attr.aria-pressed]=\"preset.active\"\n [disabled]=\"!preset.range\"\n (click)=\"applyPreset(preset.range)\"\n >\n <span class=\"hm-date-range__preset-check\" aria-hidden=\"true\">\n @if (preset.active) {\n <hm-icon shape=\"check\" />\n }\n </span>\n {{ preset.label }}\n </button>\n </li>\n }\n </ul>\n }\n <hm-calendar\n [rangeStart]=\"startValue()\"\n [rangeEnd]=\"endValue()\"\n [min]=\"min()\"\n [max]=\"max()\"\n (picked)=\"onPicked($event)\"\n (cleared)=\"onCleared()\"\n />\n </div>\n </hm-date-popover>\n}\n" }]
|
|
758
|
-
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }],
|
|
700
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], labelHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelHidden", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], frame: [{ type: i0.ViewChild, args: ['frame', { isSignal: true }] }], startInput: [{ type: i0.ViewChild, args: ['startInput', { isSignal: true }] }], calendar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CalendarComponent), { isSignal: true }] }] } });
|
|
759
701
|
|
|
760
702
|
// Ponto de import `@trismegisto/angular/date-picker` (secundário do ng-packagr): o que o public-api e as outras pastas usam
|
|
761
703
|
// daqui. Gerado em 2026-10-03; ao criar arquivo público novo na pasta, acrescente a linha.
|