@slotted/angular 0.1.0-beta.33 → 0.1.0-beta.35
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/docs/accordion.json +2 -0
- package/docs/accordion.md +1 -1
- package/docs/avatar.json +1 -0
- package/docs/avatar.md +1 -1
- package/docs/badge.json +1 -0
- package/docs/badge.md +1 -1
- package/docs/button.json +56 -2
- package/docs/button.md +8 -1
- package/docs/calendar.json +59 -0
- package/docs/calendar.md +8 -1
- package/docs/card.json +7 -0
- package/docs/card.md +1 -0
- package/docs/chart.json +32 -4
- package/docs/chart.md +9 -5
- package/docs/checkbox.json +8 -3
- package/docs/checkbox.md +3 -3
- package/docs/collapsible.json +33 -1
- package/docs/collapsible.md +5 -1
- package/docs/command-palette.json +2 -1
- package/docs/command-palette.md +1 -1
- package/docs/dashboard-grid.json +11 -3
- package/docs/dashboard-grid.md +3 -2
- package/docs/description-list.json +9 -1
- package/docs/description-list.md +2 -1
- package/docs/drawer.examples.md +167 -165
- package/docs/drawer.json +8 -8
- package/docs/entity-picker.json +3 -2
- package/docs/entity-picker.md +2 -2
- package/docs/floating-panel.json +203 -0
- package/docs/floating-panel.md +97 -0
- package/docs/form.json +1 -1
- package/docs/index.md +3 -1
- package/docs/inline-message.json +1 -0
- package/docs/inline-message.md +1 -1
- package/docs/kbd.json +1 -0
- package/docs/kbd.md +1 -1
- package/docs/link.json +1 -1
- package/docs/link.md +1 -1
- package/docs/list-item.json +31 -8
- package/docs/list-item.md +19 -6
- package/docs/list.json +13 -0
- package/docs/list.md +3 -1
- package/docs/listbox.json +13 -0
- package/docs/listbox.md +2 -1
- package/docs/markdown.json +1 -1
- package/docs/markdown.md +1 -1
- package/docs/message.json +17 -2
- package/docs/message.md +4 -2
- package/docs/meter.json +248 -0
- package/docs/meter.md +121 -0
- package/docs/page.json +21 -0
- package/docs/page.md +3 -1
- package/docs/progress-indicator.json +39 -1
- package/docs/progress-indicator.md +6 -1
- package/docs/prompt-composer.json +1 -1
- package/docs/radio-group.json +18 -1
- package/docs/radio-group.md +3 -1
- package/docs/rating.json +1 -0
- package/docs/rating.md +1 -1
- package/docs/section.json +28 -3
- package/docs/section.md +6 -3
- package/docs/segmented-control.json +5 -4
- package/docs/segmented-control.md +3 -3
- package/docs/side-navigation.json +8 -0
- package/docs/side-navigation.md +2 -1
- package/docs/slider.json +8 -0
- package/docs/slider.md +2 -1
- package/docs/sparkline.json +416 -1
- package/docs/sparkline.md +186 -2
- package/docs/stat-card.json +7 -0
- package/docs/stat-card.md +1 -0
- package/docs/switch.json +16 -0
- package/docs/switch.md +3 -1
- package/docs/table.json +39 -1
- package/docs/table.md +6 -1
- package/docs/tag.json +1 -0
- package/docs/tag.md +1 -1
- package/docs/tokens.md +1 -1
- package/docs/toolbar.json +2 -1
- package/docs/toolbar.md +1 -1
- package/docs/top-navigation.json +1 -0
- package/docs/top-navigation.md +1 -1
- package/docs/typography.json +15 -0
- package/docs/typography.md +3 -1
- package/fesm2022/slotted-angular-accordion.mjs +2 -2
- package/fesm2022/slotted-angular-accordion.mjs.map +1 -1
- package/fesm2022/slotted-angular-avatar.mjs +2 -2
- package/fesm2022/slotted-angular-avatar.mjs.map +1 -1
- package/fesm2022/slotted-angular-badge.mjs +2 -2
- package/fesm2022/slotted-angular-badge.mjs.map +1 -1
- package/fesm2022/slotted-angular-button.mjs +84 -28
- package/fesm2022/slotted-angular-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-calendar.mjs +114 -23
- package/fesm2022/slotted-angular-calendar.mjs.map +1 -1
- package/fesm2022/slotted-angular-card.mjs +15 -5
- package/fesm2022/slotted-angular-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-cascader.mjs +5 -5
- package/fesm2022/slotted-angular-cascader.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +47 -5
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-checkbox.mjs +2 -2
- package/fesm2022/slotted-angular-checkbox.mjs.map +1 -1
- package/fesm2022/slotted-angular-collapsible.mjs +69 -8
- package/fesm2022/slotted-angular-collapsible.mjs.map +1 -1
- package/fesm2022/slotted-angular-column-manager.mjs +1 -1
- package/fesm2022/slotted-angular-column-manager.mjs.map +1 -1
- package/fesm2022/slotted-angular-combobox.mjs +2 -2
- package/fesm2022/slotted-angular-combobox.mjs.map +1 -1
- package/fesm2022/slotted-angular-command-palette.mjs +11 -2
- package/fesm2022/slotted-angular-command-palette.mjs.map +1 -1
- package/fesm2022/slotted-angular-dashboard-grid.mjs +19 -5
- package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-grid.mjs +40 -15
- package/fesm2022/slotted-angular-data-grid.mjs.map +1 -1
- package/fesm2022/slotted-angular-data-list.mjs +2 -2
- package/fesm2022/slotted-angular-data-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-description-list.mjs +13 -6
- package/fesm2022/slotted-angular-description-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-detail-panel.mjs +1 -1
- package/fesm2022/slotted-angular-detail-panel.mjs.map +1 -1
- package/fesm2022/slotted-angular-drawer.mjs +2 -2
- package/fesm2022/slotted-angular-drawer.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +14 -2
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-filter-bar.mjs +4 -4
- package/fesm2022/slotted-angular-filter-bar.mjs.map +1 -1
- package/fesm2022/slotted-angular-floating-panel.mjs +257 -0
- package/fesm2022/slotted-angular-floating-panel.mjs.map +1 -0
- package/fesm2022/slotted-angular-form.mjs +2 -2
- package/fesm2022/slotted-angular-form.mjs.map +1 -1
- package/fesm2022/slotted-angular-import-export-center.mjs +1 -1
- package/fesm2022/slotted-angular-import-export-center.mjs.map +1 -1
- package/fesm2022/slotted-angular-inline-message.mjs +2 -2
- package/fesm2022/slotted-angular-inline-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-kbd.mjs +4 -4
- package/fesm2022/slotted-angular-kbd.mjs.map +1 -1
- package/fesm2022/slotted-angular-list-item.mjs +41 -6
- package/fesm2022/slotted-angular-list-item.mjs.map +1 -1
- package/fesm2022/slotted-angular-list.mjs +20 -4
- package/fesm2022/slotted-angular-list.mjs.map +1 -1
- package/fesm2022/slotted-angular-listbox.mjs +63 -6
- package/fesm2022/slotted-angular-listbox.mjs.map +1 -1
- package/fesm2022/slotted-angular-loading-overlay.mjs +2 -2
- package/fesm2022/slotted-angular-loading-overlay.mjs.map +1 -1
- package/fesm2022/slotted-angular-markdown.mjs +1 -1
- package/fesm2022/slotted-angular-markdown.mjs.map +1 -1
- package/fesm2022/slotted-angular-message.mjs +78 -36
- package/fesm2022/slotted-angular-message.mjs.map +1 -1
- package/fesm2022/slotted-angular-meter.mjs +108 -0
- package/fesm2022/slotted-angular-meter.mjs.map +1 -0
- package/fesm2022/slotted-angular-multi-select.mjs +2 -2
- package/fesm2022/slotted-angular-multi-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-notification-center.mjs +1 -1
- package/fesm2022/slotted-angular-notification-center.mjs.map +1 -1
- package/fesm2022/slotted-angular-page.mjs +49 -6
- package/fesm2022/slotted-angular-page.mjs.map +1 -1
- package/fesm2022/slotted-angular-progress-indicator.mjs +106 -7
- package/fesm2022/slotted-angular-progress-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-prompt-composer.mjs +24 -6
- package/fesm2022/slotted-angular-prompt-composer.mjs.map +1 -1
- package/fesm2022/slotted-angular-radio-group.mjs +45 -12
- package/fesm2022/slotted-angular-radio-group.mjs.map +1 -1
- package/fesm2022/slotted-angular-rating.mjs +6 -6
- package/fesm2022/slotted-angular-rating.mjs.map +1 -1
- package/fesm2022/slotted-angular-saved-views.mjs +1 -1
- package/fesm2022/slotted-angular-saved-views.mjs.map +1 -1
- package/fesm2022/slotted-angular-section.mjs +23 -6
- package/fesm2022/slotted-angular-section.mjs.map +1 -1
- package/fesm2022/slotted-angular-segmented-control.mjs +29 -7
- package/fesm2022/slotted-angular-segmented-control.mjs.map +1 -1
- package/fesm2022/slotted-angular-select.mjs +42 -18
- package/fesm2022/slotted-angular-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-side-navigation.mjs +29 -7
- package/fesm2022/slotted-angular-side-navigation.mjs.map +1 -1
- package/fesm2022/slotted-angular-slider.mjs +26 -16
- package/fesm2022/slotted-angular-slider.mjs.map +1 -1
- package/fesm2022/slotted-angular-sparkline.mjs +295 -4
- package/fesm2022/slotted-angular-sparkline.mjs.map +1 -1
- package/fesm2022/slotted-angular-split-button.mjs +4 -4
- package/fesm2022/slotted-angular-split-button.mjs.map +1 -1
- package/fesm2022/slotted-angular-stat-card.mjs +82 -28
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-status-indicator.mjs +2 -2
- package/fesm2022/slotted-angular-status-indicator.mjs.map +1 -1
- package/fesm2022/slotted-angular-switch.mjs +14 -4
- package/fesm2022/slotted-angular-switch.mjs.map +1 -1
- package/fesm2022/slotted-angular-table.mjs +77 -16
- package/fesm2022/slotted-angular-table.mjs.map +1 -1
- package/fesm2022/slotted-angular-tag.mjs +2 -2
- package/fesm2022/slotted-angular-tag.mjs.map +1 -1
- package/fesm2022/slotted-angular-tags-input.mjs +2 -2
- package/fesm2022/slotted-angular-tags-input.mjs.map +1 -1
- package/fesm2022/slotted-angular-toolbar.mjs +2 -2
- package/fesm2022/slotted-angular-toolbar.mjs.map +1 -1
- package/fesm2022/slotted-angular-top-navigation.mjs +2 -2
- package/fesm2022/slotted-angular-top-navigation.mjs.map +1 -1
- package/fesm2022/slotted-angular-tour.mjs +1 -1
- package/fesm2022/slotted-angular-tour.mjs.map +1 -1
- package/fesm2022/slotted-angular-transfer.mjs +1 -1
- package/fesm2022/slotted-angular-transfer.mjs.map +1 -1
- package/fesm2022/slotted-angular-typography.mjs +31 -6
- package/fesm2022/slotted-angular-typography.mjs.map +1 -1
- package/fesm2022/slotted-angular-upload.mjs +2 -2
- package/fesm2022/slotted-angular-upload.mjs.map +1 -1
- package/fesm2022/slotted-angular-wizard.mjs +1 -1
- package/fesm2022/slotted-angular-wizard.mjs.map +1 -1
- package/package.json +11 -3
- package/types/slotted-angular-button.d.ts +47 -5
- package/types/slotted-angular-button.d.ts.map +1 -1
- package/types/slotted-angular-calendar.d.ts +62 -5
- package/types/slotted-angular-calendar.d.ts.map +1 -1
- package/types/slotted-angular-card.d.ts +7 -1
- package/types/slotted-angular-card.d.ts.map +1 -1
- package/types/slotted-angular-chart.d.ts +10 -2
- package/types/slotted-angular-chart.d.ts.map +1 -1
- package/types/slotted-angular-checkbox.d.ts +3 -1
- package/types/slotted-angular-checkbox.d.ts.map +1 -1
- package/types/slotted-angular-collapsible.d.ts +29 -3
- package/types/slotted-angular-collapsible.d.ts.map +1 -1
- package/types/slotted-angular-command-palette.d.ts.map +1 -1
- package/types/slotted-angular-dashboard-grid.d.ts +9 -1
- package/types/slotted-angular-dashboard-grid.d.ts.map +1 -1
- package/types/slotted-angular-data-grid.d.ts +5 -1
- package/types/slotted-angular-data-grid.d.ts.map +1 -1
- package/types/slotted-angular-description-list.d.ts +11 -3
- package/types/slotted-angular-description-list.d.ts.map +1 -1
- package/types/slotted-angular-entity-picker.d.ts +1 -0
- package/types/slotted-angular-entity-picker.d.ts.map +1 -1
- package/types/slotted-angular-floating-panel.d.ts +82 -0
- package/types/slotted-angular-floating-panel.d.ts.map +1 -0
- package/types/slotted-angular-list-item.d.ts +33 -6
- package/types/slotted-angular-list-item.d.ts.map +1 -1
- package/types/slotted-angular-list.d.ts +43 -29
- package/types/slotted-angular-list.d.ts.map +1 -1
- package/types/slotted-angular-listbox.d.ts +7 -1
- package/types/slotted-angular-listbox.d.ts.map +1 -1
- package/types/slotted-angular-message.d.ts +17 -3
- package/types/slotted-angular-message.d.ts.map +1 -1
- package/types/slotted-angular-meter.d.ts +67 -0
- package/types/slotted-angular-meter.d.ts.map +1 -0
- package/types/slotted-angular-page.d.ts +33 -10
- package/types/slotted-angular-page.d.ts.map +1 -1
- package/types/slotted-angular-progress-indicator.d.ts +46 -2
- package/types/slotted-angular-progress-indicator.d.ts.map +1 -1
- package/types/slotted-angular-prompt-composer.d.ts +2 -0
- package/types/slotted-angular-prompt-composer.d.ts.map +1 -1
- package/types/slotted-angular-radio-group.d.ts +22 -4
- package/types/slotted-angular-radio-group.d.ts.map +1 -1
- package/types/slotted-angular-section.d.ts +18 -3
- package/types/slotted-angular-section.d.ts.map +1 -1
- package/types/slotted-angular-segmented-control.d.ts +8 -2
- package/types/slotted-angular-segmented-control.d.ts.map +1 -1
- package/types/slotted-angular-select.d.ts.map +1 -1
- package/types/slotted-angular-side-navigation.d.ts +14 -2
- package/types/slotted-angular-side-navigation.d.ts.map +1 -1
- package/types/slotted-angular-slider.d.ts +7 -1
- package/types/slotted-angular-slider.d.ts.map +1 -1
- package/types/slotted-angular-sparkline.d.ts +86 -4
- package/types/slotted-angular-sparkline.d.ts.map +1 -1
- package/types/slotted-angular-stat-card.d.ts +20 -2
- package/types/slotted-angular-stat-card.d.ts.map +1 -1
- package/types/slotted-angular-switch.d.ts +16 -2
- package/types/slotted-angular-switch.d.ts.map +1 -1
- package/types/slotted-angular-table.d.ts +32 -3
- package/types/slotted-angular-table.d.ts.map +1 -1
- package/types/slotted-angular-typography.d.ts +21 -2
- package/types/slotted-angular-typography.d.ts.map +1 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, output, inject, ElementRef, signal, computed, effect, untracked, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
3
|
+
import { injectMessages } from '@slotted/angular/i18n';
|
|
4
|
+
import { SlGlyph, SlIcon } from '@slotted/angular/icon';
|
|
5
|
+
import { stepPlace, cornerPlace, clampPlace } from '@slotted/core/floating-panel';
|
|
6
|
+
import { floatingPanelMessages } from '@slotted/core/i18n';
|
|
7
|
+
|
|
8
|
+
let titles = 0;
|
|
9
|
+
/**
|
|
10
|
+
* A tool that stays over the page while the page stays usable: a calculator,
|
|
11
|
+
* a notepad, a timer. It is non-modal by definition (no scrim, no focus trap,
|
|
12
|
+
* no inert page) and a named region rather than a dialog, so the shortcuts an
|
|
13
|
+
* application holds back while a dialog is open keep working. The reader moves
|
|
14
|
+
* it by its handle, with the pointer or with the arrow keys on its grip, and
|
|
15
|
+
* it stays whole inside the viewport; Escape inside it closes it and focus
|
|
16
|
+
* returns to the element that held it before it opened.
|
|
17
|
+
*/
|
|
18
|
+
class SlFloatingPanel {
|
|
19
|
+
/** Whether the panel is drawn. The page under it stays usable either way. */
|
|
20
|
+
open = input(false, /* @ts-ignore */
|
|
21
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
22
|
+
/** The region's name when no title names it. */
|
|
23
|
+
label = input(undefined, /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
25
|
+
/** The corner the panel first opens in, in the reading direction. */
|
|
26
|
+
defaultPlace = input('bottom-end', /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "defaultPlace" }] : /* istanbul ignore next */ []));
|
|
28
|
+
/** A controlled place, its top-left corner in viewport pixels; drawn inside the viewport. */
|
|
29
|
+
place = input(undefined, /* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "place" }] : /* istanbul ignore next */ []));
|
|
31
|
+
messages = input(undefined, /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
|
|
33
|
+
/** Asked with `false` on Escape inside the panel and on its close control. */
|
|
34
|
+
openChange = output();
|
|
35
|
+
/** Fired at the end of a move, by pointer or by key, for the application to store. */
|
|
36
|
+
placeChange = output();
|
|
37
|
+
t = injectMessages(floatingPanelMessages, this.messages);
|
|
38
|
+
titleId = `slotted-floating-panel-${String((titles += 1))}`;
|
|
39
|
+
native = inject(ElementRef).nativeElement;
|
|
40
|
+
own = signal(null, /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "own" }] : /* istanbul ignore next */ []));
|
|
42
|
+
live = signal(null, /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "live" }] : /* istanbul ignore next */ []));
|
|
44
|
+
opener = null;
|
|
45
|
+
shown = computed(() => this.live() ?? this.place() ?? this.own(), /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "shown" }] : /* istanbul ignore next */ []));
|
|
47
|
+
constructor() {
|
|
48
|
+
effect(() => {
|
|
49
|
+
if (!this.open())
|
|
50
|
+
return;
|
|
51
|
+
untracked(() => {
|
|
52
|
+
const active = this.native.ownerDocument.activeElement;
|
|
53
|
+
this.opener =
|
|
54
|
+
active instanceof HTMLElement && active !== active.ownerDocument.body ? active : null;
|
|
55
|
+
if (this.place() !== undefined || this.own() !== null)
|
|
56
|
+
return;
|
|
57
|
+
queueMicrotask(() => this.placeInCorner());
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/** Closes the panel and returns focus to the element that held it. */
|
|
62
|
+
close() {
|
|
63
|
+
this.openChange.emit(false);
|
|
64
|
+
this.opener?.focus();
|
|
65
|
+
}
|
|
66
|
+
/** Moves the panel one step for an arrow key, a larger one with Shift. */
|
|
67
|
+
move(event) {
|
|
68
|
+
const shown = this.shown();
|
|
69
|
+
if (shown === null)
|
|
70
|
+
return;
|
|
71
|
+
const next = stepPlace(shown, event.key, event.shiftKey);
|
|
72
|
+
if (next === null)
|
|
73
|
+
return;
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
this.commit(this.clamped(next));
|
|
76
|
+
}
|
|
77
|
+
/** Drags the panel from a press on its handle, the pointer captured. */
|
|
78
|
+
startDrag(event) {
|
|
79
|
+
const from = this.shown();
|
|
80
|
+
if (event.button !== 0 || from === null)
|
|
81
|
+
return;
|
|
82
|
+
if (event.target.closest('[data-part="close"]') !== null)
|
|
83
|
+
return;
|
|
84
|
+
const handle = event.currentTarget;
|
|
85
|
+
const pointer = { x: event.clientX, y: event.clientY };
|
|
86
|
+
handle.setPointerCapture(event.pointerId);
|
|
87
|
+
const onMove = (move) => this.live.set(this.clamped({
|
|
88
|
+
x: from.x + move.clientX - pointer.x,
|
|
89
|
+
y: from.y + move.clientY - pointer.y,
|
|
90
|
+
}));
|
|
91
|
+
const onEnd = (end) => {
|
|
92
|
+
onMove(end);
|
|
93
|
+
handle.removeEventListener('pointermove', onMove);
|
|
94
|
+
handle.removeEventListener('pointerup', onEnd);
|
|
95
|
+
handle.removeEventListener('pointercancel', onEnd);
|
|
96
|
+
const last = this.live();
|
|
97
|
+
this.live.set(null);
|
|
98
|
+
if (last !== null)
|
|
99
|
+
this.commit(last);
|
|
100
|
+
};
|
|
101
|
+
handle.addEventListener('pointermove', onMove);
|
|
102
|
+
handle.addEventListener('pointerup', onEnd);
|
|
103
|
+
handle.addEventListener('pointercancel', onEnd);
|
|
104
|
+
}
|
|
105
|
+
onKeydown(event) {
|
|
106
|
+
if (event.defaultPrevented || event.key !== 'Escape')
|
|
107
|
+
return;
|
|
108
|
+
event.stopPropagation();
|
|
109
|
+
this.close();
|
|
110
|
+
}
|
|
111
|
+
placeInCorner() {
|
|
112
|
+
const direction = getComputedStyle(this.native).direction === 'rtl' ? 'rtl' : 'ltr';
|
|
113
|
+
this.own.set(cornerPlace(this.defaultPlace(), this.size(), this.viewport(), 16, direction));
|
|
114
|
+
}
|
|
115
|
+
commit(next) {
|
|
116
|
+
if (this.place() === undefined)
|
|
117
|
+
this.own.set(next);
|
|
118
|
+
this.placeChange.emit(next);
|
|
119
|
+
}
|
|
120
|
+
clamped(next) {
|
|
121
|
+
return clampPlace(next, this.size(), this.viewport());
|
|
122
|
+
}
|
|
123
|
+
size() {
|
|
124
|
+
const box = this.native.getBoundingClientRect();
|
|
125
|
+
return { width: box.width, height: box.height };
|
|
126
|
+
}
|
|
127
|
+
viewport() {
|
|
128
|
+
const root = this.native.ownerDocument.documentElement;
|
|
129
|
+
return { width: root.clientWidth, height: root.clientHeight };
|
|
130
|
+
}
|
|
131
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
132
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: SlFloatingPanel, isStandalone: true, selector: "[slFloatingPanel]", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, defaultPlace: { classPropertyName: "defaultPlace", publicName: "defaultPlace", isSignal: true, isRequired: false, transformFunction: null }, place: { classPropertyName: "place", publicName: "place", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openChange: "openChange", placeChange: "placeChange" }, host: { attributes: { "data-ui": "floating-panel", "data-ui-floating-panel": "", "data-part": "root", "data-part-root": "", "role": "region" }, listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.hidden": "open() ? null : ''", "attr.aria-labelledby": "label() === undefined ? titleId : null", "attr.aria-label": "label() ?? null", "attr.data-dragging": "live() === null ? null : ''", "style.--_x": "shown() === null ? null : shown()!.x + 'px'", "style.--_y": "shown() === null ? null : shown()!.y + 'px'", "style.visibility": "shown() === null ? 'hidden' : null" } }, exportAs: ["slFloatingPanel"], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["@layer slotted.components{[data-ui-floating-panel][data-part-root]{background-color:var(--slotted-floating-panel-surface, var(--slotted-surface-raised, Canvas));border:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-border-color, var(--slotted-border-strong, CanvasText));border-radius:var(--slotted-floating-panel-radius, var(--slotted-radius-lg, 8px));box-shadow:var(--slotted-floating-panel-shadow, var(--slotted-shadow-lg, none));-webkit-backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);box-sizing:border-box;color:var(--slotted-text, CanvasText);display:flex;flex-direction:column;font-family:var(--slotted-font-family-sans, system-ui, sans-serif);font-size:var(--slotted-font-size-sm, .8125rem);inset-block-start:0;inset-inline-start:0;max-block-size:100dvh;max-inline-size:100vw;position:fixed;translate:clamp(0px,var(--_x, 0px),calc(100vw - 100%)) clamp(0px,var(--_y, 0px),calc(100dvh - 100%));z-index:var(--slotted-z-index-popover, 1000)}[data-ui-floating-panel][data-part-root]:dir(rtl){inset-inline-end:0;inset-inline-start:auto}[data-ui-floating-panel]>[data-part-handle]{align-items:center;border-block-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-rule-color, var(--slotted-border-subtle, ButtonBorder));cursor:grab;display:flex;gap:var(--slotted-space-3, .375rem);padding-block:var(--slotted-space-2, .25rem);padding-inline:var(--slotted-space-3, .375rem);touch-action:none;-webkit-user-select:none;user-select:none}[data-ui-floating-panel][data-dragging]>[data-part-handle]{cursor:grabbing}[data-ui-floating-panel]>[data-part-handle]>[data-part-title]{flex:1 1 auto;font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, system-ui, sans-serif) );font-size:inherit;font-weight:var(--slotted-font-weight-semibold, 600);margin:0;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]){align-items:center;appearance:none;background-color:transparent;block-size:var(--slotted-control-inner-size-md, 24px);border:0;border-radius:var(--slotted-radius-sm, 4px);color:var(--slotted-text-muted, GrayText);cursor:inherit;display:inline-flex;flex:none;inline-size:var(--slotted-control-inner-size-md, 24px);justify-content:center;padding:0}[data-ui-floating-panel]>[data-part-handle]>[data-part-close]{cursor:pointer}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):hover:not(:disabled){background-color:var(--slotted-tone-secondary-subtle-hover)}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-floating-panel]>[data-part-body]{min-block-size:0;overflow:auto;padding:var(--slotted-space-5, .75rem)}@media(prefers-reduced-transparency:reduce),(forced-colors:active){[data-ui-floating-panel][data-part-root]{-webkit-backdrop-filter:none;backdrop-filter:none}}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
133
|
+
}
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanel, decorators: [{
|
|
135
|
+
type: Component,
|
|
136
|
+
args: [{ selector: '[slFloatingPanel]', standalone: true, exportAs: 'slFloatingPanel', template: '<ng-content />', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
137
|
+
'data-ui': 'floating-panel',
|
|
138
|
+
'data-ui-floating-panel': '',
|
|
139
|
+
'data-part': 'root',
|
|
140
|
+
'data-part-root': '',
|
|
141
|
+
role: 'region',
|
|
142
|
+
'[attr.hidden]': "open() ? null : ''",
|
|
143
|
+
'[attr.aria-labelledby]': 'label() === undefined ? titleId : null',
|
|
144
|
+
'[attr.aria-label]': 'label() ?? null',
|
|
145
|
+
'[attr.data-dragging]': "live() === null ? null : ''",
|
|
146
|
+
'[style.--_x]': "shown() === null ? null : shown()!.x + 'px'",
|
|
147
|
+
'[style.--_y]': "shown() === null ? null : shown()!.y + 'px'",
|
|
148
|
+
'[style.visibility]': "shown() === null ? 'hidden' : null",
|
|
149
|
+
'(keydown)': 'onKeydown($event)',
|
|
150
|
+
}, styles: ["@layer slotted.components{[data-ui-floating-panel][data-part-root]{background-color:var(--slotted-floating-panel-surface, var(--slotted-surface-raised, Canvas));border:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-border-color, var(--slotted-border-strong, CanvasText));border-radius:var(--slotted-floating-panel-radius, var(--slotted-radius-lg, 8px));box-shadow:var(--slotted-floating-panel-shadow, var(--slotted-shadow-lg, none));-webkit-backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);backdrop-filter:var(--slotted-floating-panel-backdrop-filter, none);box-sizing:border-box;color:var(--slotted-text, CanvasText);display:flex;flex-direction:column;font-family:var(--slotted-font-family-sans, system-ui, sans-serif);font-size:var(--slotted-font-size-sm, .8125rem);inset-block-start:0;inset-inline-start:0;max-block-size:100dvh;max-inline-size:100vw;position:fixed;translate:clamp(0px,var(--_x, 0px),calc(100vw - 100%)) clamp(0px,var(--_y, 0px),calc(100dvh - 100%));z-index:var(--slotted-z-index-popover, 1000)}[data-ui-floating-panel][data-part-root]:dir(rtl){inset-inline-end:0;inset-inline-start:auto}[data-ui-floating-panel]>[data-part-handle]{align-items:center;border-block-end:var(--slotted-border-width-thin, 1px) solid var(--slotted-floating-panel-rule-color, var(--slotted-border-subtle, ButtonBorder));cursor:grab;display:flex;gap:var(--slotted-space-3, .375rem);padding-block:var(--slotted-space-2, .25rem);padding-inline:var(--slotted-space-3, .375rem);touch-action:none;-webkit-user-select:none;user-select:none}[data-ui-floating-panel][data-dragging]>[data-part-handle]{cursor:grabbing}[data-ui-floating-panel]>[data-part-handle]>[data-part-title]{flex:1 1 auto;font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, system-ui, sans-serif) );font-size:inherit;font-weight:var(--slotted-font-weight-semibold, 600);margin:0;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]){align-items:center;appearance:none;background-color:transparent;block-size:var(--slotted-control-inner-size-md, 24px);border:0;border-radius:var(--slotted-radius-sm, 4px);color:var(--slotted-text-muted, GrayText);cursor:inherit;display:inline-flex;flex:none;inline-size:var(--slotted-control-inner-size-md, 24px);justify-content:center;padding:0}[data-ui-floating-panel]>[data-part-handle]>[data-part-close]{cursor:pointer}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):hover:not(:disabled){background-color:var(--slotted-tone-secondary-subtle-hover)}[data-ui-floating-panel]>[data-part-handle]>:is([data-part-grip],[data-part-close]):focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-floating-panel]>[data-part-body]{min-block-size:0;overflow:auto;padding:var(--slotted-space-5, .75rem)}@media(prefers-reduced-transparency:reduce),(forced-colors:active){[data-ui-floating-panel][data-part-root]{-webkit-backdrop-filter:none;backdrop-filter:none}}}\n"] }]
|
|
151
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], defaultPlace: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPlace", required: false }] }], place: [{ type: i0.Input, args: [{ isSignal: true, alias: "place", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], openChange: [{ type: i0.Output, args: ["openChange"] }], placeChange: [{ type: i0.Output, args: ["placeChange"] }] } });
|
|
152
|
+
/**
|
|
153
|
+
* The bar the panel is moved by. A press that moves drags the panel; the grip
|
|
154
|
+
* at its start takes focus and moves it one step per arrow key, a larger one
|
|
155
|
+
* with Shift.
|
|
156
|
+
*/
|
|
157
|
+
class SlFloatingPanelHandle {
|
|
158
|
+
panel = inject(SlFloatingPanel);
|
|
159
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanelHandle, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
160
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: SlFloatingPanelHandle, isStandalone: true, selector: "[slFloatingPanelHandle]", host: { attributes: { "data-part": "handle", "data-part-handle": "" }, listeners: { "pointerdown": "panel.startDrag($event)" } }, ngImport: i0, template: `<button
|
|
161
|
+
type="button"
|
|
162
|
+
data-part="grip"
|
|
163
|
+
data-part-grip=""
|
|
164
|
+
[attr.aria-label]="panel.t('move')"
|
|
165
|
+
(keydown)="panel.move($event)"
|
|
166
|
+
>
|
|
167
|
+
<span slIcon><svg slGlyph name="grip-vertical"></svg></span>
|
|
168
|
+
</button>
|
|
169
|
+
<ng-content />`, isInline: true, dependencies: [{ kind: "component", type: SlGlyph, selector: "svg[slGlyph]", inputs: ["name", "solid"] }, { kind: "component", type: SlIcon, selector: "[slIcon]", inputs: ["directional", "label", "size", "tone"], exportAs: ["slIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
170
|
+
}
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanelHandle, decorators: [{
|
|
172
|
+
type: Component,
|
|
173
|
+
args: [{
|
|
174
|
+
selector: '[slFloatingPanelHandle]',
|
|
175
|
+
standalone: true,
|
|
176
|
+
imports: [SlGlyph, SlIcon],
|
|
177
|
+
template: `<button
|
|
178
|
+
type="button"
|
|
179
|
+
data-part="grip"
|
|
180
|
+
data-part-grip=""
|
|
181
|
+
[attr.aria-label]="panel.t('move')"
|
|
182
|
+
(keydown)="panel.move($event)"
|
|
183
|
+
>
|
|
184
|
+
<span slIcon><svg slGlyph name="grip-vertical"></svg></span>
|
|
185
|
+
</button>
|
|
186
|
+
<ng-content />`,
|
|
187
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
188
|
+
encapsulation: ViewEncapsulation.None,
|
|
189
|
+
host: {
|
|
190
|
+
'data-part': 'handle',
|
|
191
|
+
'data-part-handle': '',
|
|
192
|
+
'(pointerdown)': 'panel.startDrag($event)',
|
|
193
|
+
},
|
|
194
|
+
}]
|
|
195
|
+
}] });
|
|
196
|
+
/** The panel's name, which names the region when no `label` does. */
|
|
197
|
+
class SlFloatingPanelTitle {
|
|
198
|
+
panel = inject(SlFloatingPanel);
|
|
199
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanelTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
200
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlFloatingPanelTitle, isStandalone: true, selector: "[slFloatingPanelTitle]", host: { attributes: { "data-part": "title", "data-part-title": "" }, properties: { "attr.id": "panel.titleId" } }, ngImport: i0 });
|
|
201
|
+
}
|
|
202
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanelTitle, decorators: [{
|
|
203
|
+
type: Directive,
|
|
204
|
+
args: [{
|
|
205
|
+
selector: '[slFloatingPanelTitle]',
|
|
206
|
+
standalone: true,
|
|
207
|
+
host: { 'data-part': 'title', 'data-part-title': '', '[attr.id]': 'panel.titleId' },
|
|
208
|
+
}]
|
|
209
|
+
}] });
|
|
210
|
+
/** Closes the panel; focus returns to the element that held it before it opened. */
|
|
211
|
+
class SlFloatingPanelClose {
|
|
212
|
+
panel = inject(SlFloatingPanel);
|
|
213
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanelClose, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
214
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: SlFloatingPanelClose, isStandalone: true, selector: "button[slFloatingPanelClose]", host: { attributes: { "type": "button", "data-part": "close", "data-part-close": "" }, listeners: { "click": "panel.close()" }, properties: { "attr.aria-label": "panel.t('close')" } }, ngImport: i0, template: `<ng-content
|
|
215
|
+
><span slIcon><svg slGlyph name="x"></svg></span
|
|
216
|
+
></ng-content>`, isInline: true, dependencies: [{ kind: "component", type: SlGlyph, selector: "svg[slGlyph]", inputs: ["name", "solid"] }, { kind: "component", type: SlIcon, selector: "[slIcon]", inputs: ["directional", "label", "size", "tone"], exportAs: ["slIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
217
|
+
}
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanelClose, decorators: [{
|
|
219
|
+
type: Component,
|
|
220
|
+
args: [{
|
|
221
|
+
selector: 'button[slFloatingPanelClose]',
|
|
222
|
+
standalone: true,
|
|
223
|
+
imports: [SlGlyph, SlIcon],
|
|
224
|
+
template: `<ng-content
|
|
225
|
+
><span slIcon><svg slGlyph name="x"></svg></span
|
|
226
|
+
></ng-content>`,
|
|
227
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
228
|
+
encapsulation: ViewEncapsulation.None,
|
|
229
|
+
host: {
|
|
230
|
+
type: 'button',
|
|
231
|
+
'data-part': 'close',
|
|
232
|
+
'data-part-close': '',
|
|
233
|
+
'[attr.aria-label]': "panel.t('close')",
|
|
234
|
+
'(click)': 'panel.close()',
|
|
235
|
+
},
|
|
236
|
+
}]
|
|
237
|
+
}] });
|
|
238
|
+
/** What the tool holds. It scrolls when the panel is held shorter than it. */
|
|
239
|
+
class SlFloatingPanelBody {
|
|
240
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanelBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
241
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlFloatingPanelBody, isStandalone: true, selector: "[slFloatingPanelBody]", host: { attributes: { "data-part": "body", "data-part-body": "" } }, ngImport: i0 });
|
|
242
|
+
}
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFloatingPanelBody, decorators: [{
|
|
244
|
+
type: Directive,
|
|
245
|
+
args: [{
|
|
246
|
+
selector: '[slFloatingPanelBody]',
|
|
247
|
+
standalone: true,
|
|
248
|
+
host: { 'data-part': 'body', 'data-part-body': '' },
|
|
249
|
+
}]
|
|
250
|
+
}] });
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Generated bundle index. Do not edit.
|
|
254
|
+
*/
|
|
255
|
+
|
|
256
|
+
export { SlFloatingPanel, SlFloatingPanelBody, SlFloatingPanelClose, SlFloatingPanelHandle, SlFloatingPanelTitle };
|
|
257
|
+
//# sourceMappingURL=slotted-angular-floating-panel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slotted-angular-floating-panel.mjs","sources":["../../floating-panel/src/floating-panel.ts","../../floating-panel/src/slotted-angular-floating-panel.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n output,\n signal,\n untracked,\n ViewEncapsulation,\n} from '@angular/core';\nimport { injectMessages } from '@slotted/angular/i18n';\nimport { SlGlyph, SlIcon } from '@slotted/angular/icon';\nimport { clampPlace, cornerPlace, stepPlace } from '@slotted/core/floating-panel';\nimport type { FloatingCorner, FloatingPlace } from '@slotted/core/floating-panel';\nimport {\n floatingPanelMessages,\n type FloatingPanelMessages,\n type PartialMessages,\n} from '@slotted/core/i18n';\n\nexport type { FloatingCorner, FloatingPlace } from '@slotted/core/floating-panel';\n\nlet titles = 0;\n\n/**\n * A tool that stays over the page while the page stays usable: a calculator,\n * a notepad, a timer. It is non-modal by definition (no scrim, no focus trap,\n * no inert page) and a named region rather than a dialog, so the shortcuts an\n * application holds back while a dialog is open keep working. The reader moves\n * it by its handle, with the pointer or with the arrow keys on its grip, and\n * it stays whole inside the viewport; Escape inside it closes it and focus\n * returns to the element that held it before it opened.\n */\n@Component({\n selector: '[slFloatingPanel]',\n standalone: true,\n exportAs: 'slFloatingPanel',\n template: '<ng-content />',\n styleUrl: '../../../styles/src/floating-panel/floating-panel.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-ui': 'floating-panel',\n 'data-ui-floating-panel': '',\n 'data-part': 'root',\n 'data-part-root': '',\n role: 'region',\n '[attr.hidden]': \"open() ? null : ''\",\n '[attr.aria-labelledby]': 'label() === undefined ? titleId : null',\n '[attr.aria-label]': 'label() ?? null',\n '[attr.data-dragging]': \"live() === null ? null : ''\",\n '[style.--_x]': \"shown() === null ? null : shown()!.x + 'px'\",\n '[style.--_y]': \"shown() === null ? null : shown()!.y + 'px'\",\n '[style.visibility]': \"shown() === null ? 'hidden' : null\",\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class SlFloatingPanel {\n /** Whether the panel is drawn. The page under it stays usable either way. */\n readonly open = input(false);\n /** The region's name when no title names it. */\n readonly label = input<string | undefined>(undefined);\n /** The corner the panel first opens in, in the reading direction. */\n readonly defaultPlace = input<FloatingCorner>('bottom-end');\n /** A controlled place, its top-left corner in viewport pixels; drawn inside the viewport. */\n readonly place = input<FloatingPlace | undefined>(undefined);\n readonly messages = input<PartialMessages<FloatingPanelMessages> | undefined>(undefined);\n\n /** Asked with `false` on Escape inside the panel and on its close control. */\n readonly openChange = output<boolean>();\n /** Fired at the end of a move, by pointer or by key, for the application to store. */\n readonly placeChange = output<FloatingPlace>();\n\n readonly t = injectMessages(floatingPanelMessages, this.messages);\n readonly titleId = `slotted-floating-panel-${String((titles += 1))}`;\n\n private readonly native: HTMLElement = inject(ElementRef).nativeElement;\n private readonly own = signal<FloatingPlace | null>(null);\n protected readonly live = signal<FloatingPlace | null>(null);\n private opener: HTMLElement | null = null;\n\n protected readonly shown = computed(() => this.live() ?? this.place() ?? this.own());\n\n constructor() {\n effect(() => {\n if (!this.open()) return;\n untracked(() => {\n const active = this.native.ownerDocument.activeElement;\n this.opener =\n active instanceof HTMLElement && active !== active.ownerDocument.body ? active : null;\n if (this.place() !== undefined || this.own() !== null) return;\n queueMicrotask(() => this.placeInCorner());\n });\n });\n }\n\n /** Closes the panel and returns focus to the element that held it. */\n close() {\n this.openChange.emit(false);\n this.opener?.focus();\n }\n\n /** Moves the panel one step for an arrow key, a larger one with Shift. */\n move(event: KeyboardEvent) {\n const shown = this.shown();\n if (shown === null) return;\n\n const next = stepPlace(shown, event.key, event.shiftKey);\n if (next === null) return;\n event.preventDefault();\n this.commit(this.clamped(next));\n }\n\n /** Drags the panel from a press on its handle, the pointer captured. */\n startDrag(event: PointerEvent) {\n const from = this.shown();\n if (event.button !== 0 || from === null) return;\n if ((event.target as Element).closest('[data-part=\"close\"]') !== null) return;\n\n const handle = event.currentTarget as HTMLElement;\n const pointer = { x: event.clientX, y: event.clientY };\n handle.setPointerCapture(event.pointerId);\n\n const onMove = (move: PointerEvent) =>\n this.live.set(\n this.clamped({\n x: from.x + move.clientX - pointer.x,\n y: from.y + move.clientY - pointer.y,\n }),\n );\n const onEnd = (end: PointerEvent) => {\n onMove(end);\n handle.removeEventListener('pointermove', onMove);\n handle.removeEventListener('pointerup', onEnd);\n handle.removeEventListener('pointercancel', onEnd);\n const last = this.live();\n this.live.set(null);\n if (last !== null) this.commit(last);\n };\n handle.addEventListener('pointermove', onMove);\n handle.addEventListener('pointerup', onEnd);\n handle.addEventListener('pointercancel', onEnd);\n }\n\n protected onKeydown(event: KeyboardEvent) {\n if (event.defaultPrevented || event.key !== 'Escape') return;\n event.stopPropagation();\n this.close();\n }\n\n private placeInCorner() {\n const direction = getComputedStyle(this.native).direction === 'rtl' ? 'rtl' : 'ltr';\n this.own.set(cornerPlace(this.defaultPlace(), this.size(), this.viewport(), 16, direction));\n }\n\n private commit(next: FloatingPlace) {\n if (this.place() === undefined) this.own.set(next);\n this.placeChange.emit(next);\n }\n\n private clamped(next: FloatingPlace) {\n return clampPlace(next, this.size(), this.viewport());\n }\n\n private size() {\n const box = this.native.getBoundingClientRect();\n\n return { width: box.width, height: box.height };\n }\n\n private viewport() {\n const root = this.native.ownerDocument.documentElement;\n\n return { width: root.clientWidth, height: root.clientHeight };\n }\n}\n\n/**\n * The bar the panel is moved by. A press that moves drags the panel; the grip\n * at its start takes focus and moves it one step per arrow key, a larger one\n * with Shift.\n */\n@Component({\n selector: '[slFloatingPanelHandle]',\n standalone: true,\n imports: [SlGlyph, SlIcon],\n template: `<button\n type=\"button\"\n data-part=\"grip\"\n data-part-grip=\"\"\n [attr.aria-label]=\"panel.t('move')\"\n (keydown)=\"panel.move($event)\"\n >\n <span slIcon><svg slGlyph name=\"grip-vertical\"></svg></span>\n </button>\n <ng-content />`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'data-part': 'handle',\n 'data-part-handle': '',\n '(pointerdown)': 'panel.startDrag($event)',\n },\n})\nexport class SlFloatingPanelHandle {\n protected readonly panel = inject(SlFloatingPanel);\n}\n\n/** The panel's name, which names the region when no `label` does. */\n@Directive({\n selector: '[slFloatingPanelTitle]',\n standalone: true,\n host: { 'data-part': 'title', 'data-part-title': '', '[attr.id]': 'panel.titleId' },\n})\nexport class SlFloatingPanelTitle {\n protected readonly panel = inject(SlFloatingPanel);\n}\n\n/** Closes the panel; focus returns to the element that held it before it opened. */\n@Component({\n selector: 'button[slFloatingPanelClose]',\n standalone: true,\n imports: [SlGlyph, SlIcon],\n template: `<ng-content\n ><span slIcon><svg slGlyph name=\"x\"></svg></span\n ></ng-content>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n type: 'button',\n 'data-part': 'close',\n 'data-part-close': '',\n '[attr.aria-label]': \"panel.t('close')\",\n '(click)': 'panel.close()',\n },\n})\nexport class SlFloatingPanelClose {\n protected readonly panel = inject(SlFloatingPanel);\n}\n\n/** What the tool holds. It scrolls when the panel is held shorter than it. */\n@Directive({\n selector: '[slFloatingPanelBody]',\n standalone: true,\n host: { 'data-part': 'body', 'data-part-body': '' },\n})\nexport class SlFloatingPanelBody {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AA0BA,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;;;;AAQG;MAyBU,eAAe,CAAA;;IAEjB,IAAI,GAAG,KAAK,CAAC,KAAK;6EAAC;;IAEnB,KAAK,GAAG,KAAK,CAAqB,SAAS;8EAAC;;IAE5C,YAAY,GAAG,KAAK,CAAiB,YAAY;qFAAC;;IAElD,KAAK,GAAG,KAAK,CAA4B,SAAS;8EAAC;IACnD,QAAQ,GAAG,KAAK,CAAqD,SAAS;iFAAC;;IAG/E,UAAU,GAAG,MAAM,EAAW;;IAE9B,WAAW,GAAG,MAAM,EAAiB;IAErC,CAAC,GAAG,cAAc,CAAC,qBAAqB,EAAE,IAAI,CAAC,QAAQ,CAAC;IACxD,OAAO,GAAG,CAAA,uBAAA,EAA0B,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,CAAA,CAAE;AAEnD,IAAA,MAAM,GAAgB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa;IACtD,GAAG,GAAG,MAAM,CAAuB,IAAI;4EAAC;IACtC,IAAI,GAAG,MAAM,CAAuB,IAAI;6EAAC;IACpD,MAAM,GAAuB,IAAI;AAEtB,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI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AAS,EAAE,eAAe;AAC3B,qBAAA;AACF,iBAAA;;AAKD;MAMa,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,MAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;oBAChB,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,EAAE;AACpD,iBAAA;;;ACzPD;;AAEG;;"}
|
|
@@ -577,7 +577,7 @@ class SlForm {
|
|
|
577
577
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlForm, isStandalone: true, selector: "form[slForm]", inputs: { errorsInput: { classPropertyName: "errorsInput", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, defaultErrors: { classPropertyName: "defaultErrors", publicName: "defaultErrors", isSignal: true, isRequired: false, transformFunction: null }, validate: { classPropertyName: "validate", publicName: "validate", isSignal: true, isRequired: false, transformFunction: null }, errorFocus: { classPropertyName: "errorFocus", publicName: "errorFocus", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, summaryDescription: { classPropertyName: "summaryDescription", publicName: "summaryDescription", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, nativeValidation: { classPropertyName: "nativeValidation", publicName: "nativeValidation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, guardUnsaved: { classPropertyName: "guardUnsaved", publicName: "guardUnsaved", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { errorsChange: "errorsChange", formSubmit: "formSubmit" }, host: { attributes: { "data-ui": "form", "data-ui-form": "", "data-part": "root", "data-part-root": "" }, listeners: { "submit": "onSubmit($event)", "reset": "onReset()", "input": "onInput($event)", "focusout": "onFocusOut($event)" }, properties: { "attr.novalidate": "resolvedNativeValidation() ? null : ''", "attr.aria-busy": "submitting() ? 'true' : null", "attr.data-invalid": "hasAnyError() ? '' : null", "attr.data-loading": "submitting() ? '' : null", "attr.data-disabled": "disabled() ? '' : null" } }, providers: [{ provide: SlFormOwner, useExisting: forwardRef(() => SlForm) }], exportAs: ["slForm"], ngImport: i0, template: `@if (showsOwnSummary()) {
|
|
578
578
|
<div slFormSummary></div>
|
|
579
579
|
}
|
|
580
|
-
<ng-content />`, isInline: true, styles: ["@layer slotted.components{[data-ui-form][data-part-root]{--_font-size: var(--slotted-control-font-size-md, 13px);container-name:slotted-form;container-type:inline-size;color:var(--slotted-form-color, var(--slotted-text, CanvasText));display:block;font-family:var(--slotted-control-font-family, system-ui, sans-serif);inline-size:100%;min-inline-size:0}[data-ui-form][data-part-root][data-loading]{cursor:progress}[data-ui-form][data-part-summary]{background-color:var(--slotted-form-summary-background, var(--slotted-tone-danger-surface));border:var(--slotted-control-border-width, 1px) solid var(--slotted-form-summary-border-color, var(--slotted-tone-danger-border));border-inline-start-width:var(--slotted-border-width-thick, 2px);border-radius:var(--slotted-form-summary-radius, var(--slotted-radius-md, 6px));color:var(--slotted-form-summary-color, var(--slotted-tone-danger-text));display:block;font-size:var(--_font-size);margin-block-end:var(--slotted-space-6, 1rem);padding-block:var(--slotted-space-5, .75rem);padding-inline:var(--slotted-space-6, 1rem)}[data-ui-form][data-part-summary]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-form][data-part-summary]>[data-part-summary-title]{font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) );font-size:var(--_font-size);font-weight:var(--slotted-font-weight-semibold, 600);line-height:var(--slotted-line-height-md, 1.5);margin:0}[data-ui-form][data-part-summary]>[data-part-summary-list]{display:flex;flex-direction:column;gap:var(--slotted-space-2, .25rem);line-height:var(--slotted-line-height-sm, 1.45);list-style:none;margin-block:var(--slotted-space-3, .375rem) 0;max-block-size:calc(12em * var(--slotted-line-height-sm, 1.45));overflow-y:auto;padding-block:var(--slotted-space-1, .125rem);padding-inline-start:0}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]{color:inherit;text-decoration-line:underline;text-underline-offset:var(--slotted-space-1, .125rem)}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]:hover:not(:disabled){text-decoration-thickness:var(--slotted-border-width-thick, 2px)}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]:focus-visible{border-radius:var(--slotted-radius-xs, 2px);outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-form][data-part-root]>:
|
|
580
|
+
<ng-content />`, isInline: true, styles: ["@layer slotted.components{[data-ui-form][data-part-root]{--_font-size: var(--slotted-control-font-size-md, 13px);container-name:slotted-form;container-type:inline-size;color:var(--slotted-form-color, var(--slotted-text, CanvasText));display:block;font-family:var(--slotted-control-font-family, system-ui, sans-serif);inline-size:100%;min-inline-size:0}[data-ui-form][data-part-root][data-loading]{cursor:progress}[data-ui-form][data-part-summary]{background-color:var(--slotted-form-summary-background, var(--slotted-tone-danger-surface));border:var(--slotted-control-border-width, 1px) solid var(--slotted-form-summary-border-color, var(--slotted-tone-danger-border));border-inline-start-width:var(--slotted-border-width-thick, 2px);border-radius:var(--slotted-form-summary-radius, var(--slotted-radius-md, 6px));color:var(--slotted-form-summary-color, var(--slotted-tone-danger-text));display:block;font-size:var(--_font-size);margin-block-end:var(--slotted-space-6, 1rem);padding-block:var(--slotted-space-5, .75rem);padding-inline:var(--slotted-space-6, 1rem)}[data-ui-form][data-part-summary]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-form][data-part-summary]>[data-part-summary-title]{font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) );font-size:var(--_font-size);font-weight:var(--slotted-font-weight-semibold, 600);line-height:var(--slotted-line-height-md, 1.5);margin:0}[data-ui-form][data-part-summary]>[data-part-summary-list]{display:flex;flex-direction:column;gap:var(--slotted-space-2, .25rem);line-height:var(--slotted-line-height-sm, 1.45);list-style:none;margin-block:var(--slotted-space-3, .375rem) 0;max-block-size:calc(12em * var(--slotted-line-height-sm, 1.45));overflow-y:auto;padding-block:var(--slotted-space-1, .125rem);padding-inline-start:0}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]{color:inherit;text-decoration-line:underline;text-underline-offset:var(--slotted-space-1, .125rem)}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]:hover:not(:disabled){text-decoration-thickness:var(--slotted-border-width-thick, 2px)}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]:focus-visible{border-radius:var(--slotted-radius-xs, 2px);outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-form][data-part-root]>:where(:not([data-ui-form]:is([data-part-aside],[data-part-summary]),[type=hidden]))+:where(:not([data-ui-form]:is([data-part-aside],[data-part-summary],[data-part-actions]),[type=hidden])){margin-block-start:var(--slotted-form-field-gap, var(--slotted-space-6, 1rem))}[data-ui-form][data-part-root]>[data-ui-field-group]+[data-ui-field-group]{margin-block-start:var(--slotted-form-section-gap, var(--slotted-space-9, 2rem))}[data-ui-form][data-part-root]>:not([data-ui-form][data-part-aside]){max-inline-size:var(--slotted-form-measure, 40rem)}[data-ui-form][data-part-root]:has(>[data-ui-form][data-part-aside]){column-gap:var(--slotted-space-9, 2rem);display:grid;grid-auto-columns:minmax(0,var(--slotted-form-aside-size, 20rem));grid-template-columns:minmax(0,var(--slotted-form-measure, 40rem));justify-content:space-between}[data-ui-form][data-part-aside]{margin-block-start:var(--slotted-form-section-gap, var(--slotted-space-9, 2rem));min-inline-size:0}@container slotted-form (min-width: 75rem){[data-ui-form][data-part-root]:has(>[data-ui-form][data-part-aside])>*{grid-column:1}[data-ui-form][data-part-root]>[data-ui-form][data-part-aside]{align-self:start;grid-column:2;grid-row:1 / span 100;inset-block-start:calc(var(--slotted-page-sticky-top, 0px) + var(--slotted-space-6, 1rem));margin-block-start:0;position:sticky}}[data-ui-form][data-part-actions]{display:flex;flex-wrap:wrap;gap:var(--slotted-action-gap, 8px);justify-content:flex-end;margin-block-start:var(--slotted-space-8, 1.5rem)}[data-ui-form][data-part-actions][data-align=start]{justify-content:flex-start}[data-ui-form][data-part-actions][data-align=between]{justify-content:space-between}[data-ui-form][data-part-actions][data-align=stretch]>*{flex:1 1 0}@container slotted-form (max-width: 360px){[data-ui-form][data-part-actions]{flex-direction:column-reverse}[data-ui-form][data-part-actions]>*{inline-size:100%}}@media(forced-colors:active){[data-ui-form][data-part-summary]{border-color:CanvasText;border-inline-start-color:Highlight}}}\n"], dependencies: [{ kind: "component", type: SlFormSummary, selector: "[slFormSummary]", exportAs: ["slFormSummary"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
581
581
|
}
|
|
582
582
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlForm, decorators: [{
|
|
583
583
|
type: Component,
|
|
@@ -598,7 +598,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
598
598
|
'(reset)': 'onReset()',
|
|
599
599
|
'(input)': 'onInput($event)',
|
|
600
600
|
'(focusout)': 'onFocusOut($event)',
|
|
601
|
-
}, styles: ["@layer slotted.components{[data-ui-form][data-part-root]{--_font-size: var(--slotted-control-font-size-md, 13px);container-name:slotted-form;container-type:inline-size;color:var(--slotted-form-color, var(--slotted-text, CanvasText));display:block;font-family:var(--slotted-control-font-family, system-ui, sans-serif);inline-size:100%;min-inline-size:0}[data-ui-form][data-part-root][data-loading]{cursor:progress}[data-ui-form][data-part-summary]{background-color:var(--slotted-form-summary-background, var(--slotted-tone-danger-surface));border:var(--slotted-control-border-width, 1px) solid var(--slotted-form-summary-border-color, var(--slotted-tone-danger-border));border-inline-start-width:var(--slotted-border-width-thick, 2px);border-radius:var(--slotted-form-summary-radius, var(--slotted-radius-md, 6px));color:var(--slotted-form-summary-color, var(--slotted-tone-danger-text));display:block;font-size:var(--_font-size);margin-block-end:var(--slotted-space-6, 1rem);padding-block:var(--slotted-space-5, .75rem);padding-inline:var(--slotted-space-6, 1rem)}[data-ui-form][data-part-summary]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-form][data-part-summary]>[data-part-summary-title]{font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) );font-size:var(--_font-size);font-weight:var(--slotted-font-weight-semibold, 600);line-height:var(--slotted-line-height-md, 1.5);margin:0}[data-ui-form][data-part-summary]>[data-part-summary-list]{display:flex;flex-direction:column;gap:var(--slotted-space-2, .25rem);line-height:var(--slotted-line-height-sm, 1.45);list-style:none;margin-block:var(--slotted-space-3, .375rem) 0;max-block-size:calc(12em * var(--slotted-line-height-sm, 1.45));overflow-y:auto;padding-block:var(--slotted-space-1, .125rem);padding-inline-start:0}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]{color:inherit;text-decoration-line:underline;text-underline-offset:var(--slotted-space-1, .125rem)}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]:hover:not(:disabled){text-decoration-thickness:var(--slotted-border-width-thick, 2px)}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]:focus-visible{border-radius:var(--slotted-radius-xs, 2px);outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-form][data-part-root]>:
|
|
601
|
+
}, styles: ["@layer slotted.components{[data-ui-form][data-part-root]{--_font-size: var(--slotted-control-font-size-md, 13px);container-name:slotted-form;container-type:inline-size;color:var(--slotted-form-color, var(--slotted-text, CanvasText));display:block;font-family:var(--slotted-control-font-family, system-ui, sans-serif);inline-size:100%;min-inline-size:0}[data-ui-form][data-part-root][data-loading]{cursor:progress}[data-ui-form][data-part-summary]{background-color:var(--slotted-form-summary-background, var(--slotted-tone-danger-surface));border:var(--slotted-control-border-width, 1px) solid var(--slotted-form-summary-border-color, var(--slotted-tone-danger-border));border-inline-start-width:var(--slotted-border-width-thick, 2px);border-radius:var(--slotted-form-summary-radius, var(--slotted-radius-md, 6px));color:var(--slotted-form-summary-color, var(--slotted-tone-danger-text));display:block;font-size:var(--_font-size);margin-block-end:var(--slotted-space-6, 1rem);padding-block:var(--slotted-space-5, .75rem);padding-inline:var(--slotted-space-6, 1rem)}[data-ui-form][data-part-summary]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-form][data-part-summary]>[data-part-summary-title]{font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) );font-size:var(--_font-size);font-weight:var(--slotted-font-weight-semibold, 600);line-height:var(--slotted-line-height-md, 1.5);margin:0}[data-ui-form][data-part-summary]>[data-part-summary-list]{display:flex;flex-direction:column;gap:var(--slotted-space-2, .25rem);line-height:var(--slotted-line-height-sm, 1.45);list-style:none;margin-block:var(--slotted-space-3, .375rem) 0;max-block-size:calc(12em * var(--slotted-line-height-sm, 1.45));overflow-y:auto;padding-block:var(--slotted-space-1, .125rem);padding-inline-start:0}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]{color:inherit;text-decoration-line:underline;text-underline-offset:var(--slotted-space-1, .125rem)}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]:hover:not(:disabled){text-decoration-thickness:var(--slotted-border-width-thick, 2px)}[data-ui-form][data-part-summary]>[data-part-summary-list]>li>[data-part-summary-item]:focus-visible{border-radius:var(--slotted-radius-xs, 2px);outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui-form][data-part-root]>:where(:not([data-ui-form]:is([data-part-aside],[data-part-summary]),[type=hidden]))+:where(:not([data-ui-form]:is([data-part-aside],[data-part-summary],[data-part-actions]),[type=hidden])){margin-block-start:var(--slotted-form-field-gap, var(--slotted-space-6, 1rem))}[data-ui-form][data-part-root]>[data-ui-field-group]+[data-ui-field-group]{margin-block-start:var(--slotted-form-section-gap, var(--slotted-space-9, 2rem))}[data-ui-form][data-part-root]>:not([data-ui-form][data-part-aside]){max-inline-size:var(--slotted-form-measure, 40rem)}[data-ui-form][data-part-root]:has(>[data-ui-form][data-part-aside]){column-gap:var(--slotted-space-9, 2rem);display:grid;grid-auto-columns:minmax(0,var(--slotted-form-aside-size, 20rem));grid-template-columns:minmax(0,var(--slotted-form-measure, 40rem));justify-content:space-between}[data-ui-form][data-part-aside]{margin-block-start:var(--slotted-form-section-gap, var(--slotted-space-9, 2rem));min-inline-size:0}@container slotted-form (min-width: 75rem){[data-ui-form][data-part-root]:has(>[data-ui-form][data-part-aside])>*{grid-column:1}[data-ui-form][data-part-root]>[data-ui-form][data-part-aside]{align-self:start;grid-column:2;grid-row:1 / span 100;inset-block-start:calc(var(--slotted-page-sticky-top, 0px) + var(--slotted-space-6, 1rem));margin-block-start:0;position:sticky}}[data-ui-form][data-part-actions]{display:flex;flex-wrap:wrap;gap:var(--slotted-action-gap, 8px);justify-content:flex-end;margin-block-start:var(--slotted-space-8, 1.5rem)}[data-ui-form][data-part-actions][data-align=start]{justify-content:flex-start}[data-ui-form][data-part-actions][data-align=between]{justify-content:space-between}[data-ui-form][data-part-actions][data-align=stretch]>*{flex:1 1 0}@container slotted-form (max-width: 360px){[data-ui-form][data-part-actions]{flex-direction:column-reverse}[data-ui-form][data-part-actions]>*{inline-size:100%}}@media(forced-colors:active){[data-ui-form][data-part-summary]{border-color:CanvasText;border-inline-start-color:Highlight}}}\n"] }]
|
|
602
602
|
}], ctorParameters: () => [], propDecorators: { errorsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], defaultErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultErrors", required: false }] }], validate: [{ type: i0.Input, args: [{ isSignal: true, alias: "validate", required: false }] }], errorFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorFocus", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], summaryDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "summaryDescription", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], nativeValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "nativeValidation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], guardUnsaved: [{ type: i0.Input, args: [{ isSignal: true, alias: "guardUnsaved", required: false }] }], errorsChange: [{ type: i0.Output, args: ["errorsChange"] }], formSubmit: [{ type: i0.Output, args: ["formSubmit"] }] } });
|
|
603
603
|
function nameOf(target) {
|
|
604
604
|
if (!(target instanceof HTMLElement))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotted-angular-form.mjs","sources":["../../form/src/form-defaults.ts","../../form/src/form-actions.ts","../../form/src/form.ts","../../form/src/slotted-angular-form.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\nimport type { Signal } from '@angular/core';\nimport type { FormErrorEntry, FormErrors } from '@slotted/core/form';\n\n/**\n * When the form checks its own controls. `submit` is the default and\n * re-validates on every change afterwards: telling a reader an answer is wrong\n * before they have finished writing it is noise, and telling them nothing after\n * they have fixed it is worse.\n */\nexport type FormValidate = 'submit' | 'blur' | 'change' | 'none';\n\n/** Where focus goes after a submit that found something wrong. */\nexport type FormErrorFocus = 'summary' | 'control' | 'none';\n\n/** Whether the family renders the summary itself. */\nexport type FormSummaryMode = 'auto' | 'none';\n\n/** How the action row is arranged along the inline axis. */\nexport type FormActionsAlign = 'end' | 'start' | 'between' | 'stretch';\n\nexport interface FormDefaults {\n align: FormActionsAlign;\n errorFocus: FormErrorFocus;\n nativeValidation: boolean;\n summary: FormSummaryMode;\n summaryDescription: string | undefined;\n validate: FormValidate;\n}\n\nconst FALLBACK: FormDefaults = {\n align: 'end',\n errorFocus: 'summary',\n nativeValidation: false,\n summary: 'auto',\n summaryDescription: undefined,\n validate: 'submit',\n};\n\nexport const FORM_DEFAULTS = new InjectionToken<FormDefaults>('slotted form defaults', {\n providedIn: 'root',\n factory: () => FALLBACK,\n});\n\n/**\n * An application decides once how its forms behave: when they validate, where\n * focus goes after a failed submit, and how its action row is arranged. A form\n * that states any of them itself still wins. The summary's heading comes from\n * the language in force (`provideSlotted`).\n */\nexport function provideFormDefaults(defaults: Partial<FormDefaults>) {\n return {\n provide: FORM_DEFAULTS,\n useFactory: (): FormDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\nexport function injectFormDefaults(): FormDefaults {\n return inject(FORM_DEFAULTS);\n}\n\n/** One validation failure Angular reported, as the registry receives it. */\nexport interface FormErrorMessageContext {\n /** The `name` the control is submitted under, which is the key in the group. */\n name: string;\n /** The key `AbstractControl.errors` used — `required`, `minlength`, and so on. */\n key: string;\n /** Whatever the validator put beside the key. */\n detail: unknown;\n}\n\n/**\n * How a Reactive Forms validation failure the application's own validator\n * reports becomes a sentence.\n *\n * Angular's validators report a key and a shape — `{ required: true }`,\n * `{ minlength: { requiredLength: 8, actualLength: 3 } }` — and never a\n * message. The built-in keys (`required`, `email`, `min`, `max`, `minlength`,\n * `maxlength`, `pattern`) are written by the `form` catalog's `errors.*`\n * messages in the language in force; a validator the application adds names\n * its own message here, and an entry for a built-in key replaces the catalog's.\n */\nexport type FormErrorMessages = Record<string, (context: FormErrorMessageContext) => string>;\n\nexport const SL_FORM_ERROR_MESSAGES = new InjectionToken<FormErrorMessages>(\n 'slotted form error messages',\n { providedIn: 'root', factory: () => ({}) },\n);\n\n/** Names the sentences the application's own validators are written as. */\nexport function provideFormErrorMessages(messages: FormErrorMessages) {\n return { provide: SL_FORM_ERROR_MESSAGES, useValue: messages };\n}\n\nexport function injectFormErrorMessages(): FormErrorMessages {\n return inject(SL_FORM_ERROR_MESSAGES);\n}\n\n/**\n * What the summary needs from the form around it.\n *\n * It is an abstract class rather than an import so the two classes can depend\n * on each other without a cycle — the shape `field` and `text-field` already\n * have.\n */\nexport abstract class SlFormOwner {\n abstract readonly entries: Signal<readonly FormErrorEntry[]>;\n abstract readonly errors: Signal<FormErrors>;\n abstract readonly summaryId: Signal<string>;\n abstract readonly resolvedSummaryTitle: Signal<string>;\n abstract readonly resolvedSummaryDescription: Signal<string | undefined>;\n abstract readonly resolvedAlign: Signal<FormActionsAlign>;\n /** Called by whichever summary is on the page, so focus can reach the region. */\n abstract registerSummary(element: HTMLElement | null): void;\n}\n","import { computed, Directive, inject, input } from '@angular/core';\n\nimport { SlFormOwner } from './form-defaults';\nimport type { FormActionsAlign } from './form-defaults';\n\n/**\n * The row a form's actions stand in.\n *\n * `inline` can end-align a row of buttons. What it cannot do without a query\n * the consumer writes for every form is the reflow: below the form's own\n * container width every action takes the whole width, in a column, with the\n * primary one first — a reader's thumb is at the bottom of a phone and their\n * eye at the end of a row.\n */\n@Directive({\n selector: '[slFormActions]',\n standalone: true,\n exportAs: 'slFormActions',\n host: {\n // The family's identifier on the part: its rules reach it by name, never as any descendant.\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'actions',\n 'data-part-actions': '',\n '[attr.data-align]': 'resolvedAlign()',\n },\n})\nexport class SlFormActions {\n /** Defaults to the form's own `align`, then to the token, then to `end`. */\n readonly align = input<FormActionsAlign | undefined>(undefined);\n\n private readonly form = inject(SlFormOwner, { optional: true });\n\n protected readonly resolvedAlign = computed(\n () => this.align() ?? this.form?.resolvedAlign() ?? 'end',\n );\n}\n\n/**\n * What the form says about the whole record — a live preview, a summary in\n * words, a help panel — beside the column of fields on a wide form, and after\n * the last field on a narrow one.\n */\n@Directive({\n selector: '[slFormAside]',\n standalone: true,\n exportAs: 'slFormAside',\n host: {\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'aside',\n 'data-part-aside': '',\n },\n})\nexport class SlFormAside {}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { AfterViewInit, OnInit } from '@angular/core';\nimport { ControlContainer } from '@angular/forms';\nimport type { AbstractControl, FormArray, FormGroup } from '@angular/forms';\nimport { injectMessages } from '@slotted/angular/i18n';\nimport {\n collectValidity,\n hasErrors,\n isDirty,\n mergeErrors,\n namedControls,\n normalizeErrors,\n orderErrors,\n withoutError,\n} from '@slotted/core/form';\nimport type { FormErrorInput, FormErrors } from '@slotted/core/form';\nimport { formMessages, type FormMessages, type PartialMessages } from '@slotted/core/i18n';\nimport { createControllable } from '@slotted/core/state';\nimport type { ChangeReason, ChangeRequest } from '@slotted/core/state';\n\nimport { injectFormDefaults, injectFormErrorMessages, SlFormOwner } from './form-defaults';\nimport type {\n FormActionsAlign,\n FormErrorFocus,\n FormSummaryMode,\n FormValidate,\n} from './form-defaults';\n\nexport type {\n FormActionsAlign,\n FormDefaults,\n FormErrorFocus,\n FormErrorMessageContext,\n FormErrorMessages,\n FormSummaryMode,\n FormValidate,\n} from './form-defaults';\n\nlet summaryCounter = 0;\n\n/**\n * The summary of everything wrong with the form: a focusable region with a\n * heading, and a link per error pointing at the control it is about.\n *\n * It is the GOV.UK error summary, item for item — \"move keyboard focus to the\n * error summary\", \"include the heading\", \"link to each of the answers that have\n * validation errors\", \"make sure the error messages in the error summary are\n * worded the same as those which appear next to the inputs\". The last one is\n * free here: one map feeds the summary and the field.\n *\n * The form renders this itself under `summary=\"auto\"`. A consumer who wants it\n * somewhere else writes `summary=\"none\"` and puts `slFormSummary` on their own\n * element.\n */\n@Component({\n selector: '[slFormSummary]',\n standalone: true,\n exportAs: 'slFormSummary',\n template: `<h2 data-part=\"summary-title\" data-part-summary-title=\"\" [attr.id]=\"form.summaryId()\">\n {{ form.resolvedSummaryTitle() }}\n </h2>\n @if (form.resolvedSummaryDescription(); as description) {\n <p>{{ description }}</p>\n }\n <ul data-part=\"summary-list\" data-part-summary-list=\"\">\n @for (entry of form.entries(); track entry.name) {\n @for (message of entry.messages; track message) {\n <li>\n @if (entry.id) {\n <a\n data-part=\"summary-item\"\n data-part-summary-item=\"\"\n [attr.href]=\"'#' + entry.id\"\n (click)=\"focus($event, entry.id)\"\n >\n {{ message }}\n </a>\n } @else {\n <span data-part=\"summary-item\" data-part-summary-item=\"\">{{ message }}</span>\n }\n </li>\n }\n }\n </ul>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n // The family's identifier on the part: its rules reach it by name, never as any descendant.\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'summary',\n 'data-part-summary': '',\n role: 'alert',\n tabindex: '-1',\n '[attr.aria-labelledby]': 'form.summaryId()',\n },\n})\nexport class SlFormSummary implements AfterViewInit {\n protected readonly form = inject(SlFormOwner);\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n ngAfterViewInit() {\n this.form.registerSummary(this.element);\n }\n\n /**\n * The fragment is not followed. A link that navigated would write the\n * control's identifier into the address bar and add an entry to the history\n * of a page that never left; focusing the control is the whole of what the\n * link is for, and the browser scrolls it into view with the focus.\n */\n protected focus(event: Event, id: string) {\n const target = this.element.ownerDocument.getElementById(id);\n if (target === null) return;\n event.preventDefault();\n target.focus();\n }\n}\n\n/**\n * A form, its errors and its row of actions.\n *\n * **It owns the errors and nothing else.** `docs/component-features.md` § 6 puts\n * the boundary there: the family coordinates submission, validation, global\n * messages and focus \"without owning each framework's state\". Values come from\n * `FormData`, validity from `checkValidity()` and from Reactive Forms, and the\n * values themselves stay with whichever of the two owns them.\n *\n * **`novalidate` is written, and constraint validation still runs.** The\n * attribute stops the browser drawing its own bubble beside a control whose\n * error the `field` is already showing; `checkValidity()` is called explicitly\n * and each control's `validationMessage` is the platform's localized string.\n *\n * **Reactive Forms is the second source.** When there is a `ControlContainer`,\n * every control is marked touched at submit and each failing one becomes a\n * sentence: a built-in validator's through the catalog's `errors.*` messages,\n * an application's own through `SL_FORM_ERROR_MESSAGES`.\n *\n * **Signal Forms needs nothing here.** Angular 22's `[field]` binds a control\n * through its `ControlValueAccessor`, which every Slotted control provides, so\n * they work under it today and this family adds no second integration.\n */\n@Component({\n selector: 'form[slForm]',\n standalone: true,\n exportAs: 'slForm',\n imports: [SlFormSummary],\n template: `@if (showsOwnSummary()) {\n <div slFormSummary></div>\n }\n <ng-content />`,\n styleUrl: '../../../styles/src/form/form.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: SlFormOwner, useExisting: forwardRef(() => SlForm) }],\n host: {\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.novalidate]': \"resolvedNativeValidation() ? null : ''\",\n '[attr.aria-busy]': \"submitting() ? 'true' : null\",\n '[attr.data-invalid]': \"hasAnyError() ? '' : null\",\n '[attr.data-loading]': \"submitting() ? '' : null\",\n '[attr.data-disabled]': \"disabled() ? '' : null\",\n '(submit)': 'onSubmit($event)',\n '(reset)': 'onReset()',\n '(input)': 'onInput($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class SlForm implements SlFormOwner, OnInit {\n /**\n * Present means the consumer owns the error map, for the life of the\n * component. Keyed by the `name` attribute of the control each error is about.\n */\n readonly errorsInput = input<FormErrorInput | undefined>(undefined, { alias: 'errors' });\n /** The errors an uncontrolled form starts from, read once. */\n readonly defaultErrors = input<FormErrorInput | undefined>(undefined);\n\n readonly validate = input<FormValidate | undefined>(undefined);\n readonly errorFocus = input<FormErrorFocus | undefined>(undefined);\n readonly summary = input<FormSummaryMode | undefined>(undefined);\n readonly summaryDescription = input<string | undefined>(undefined);\n readonly align = input<FormActionsAlign | undefined>(undefined);\n /**\n * Words laid over the catalog of the language in force, key by key: the\n * summary's heading (`summaryTitle`) and the built-in validators' sentences\n * (`errors.*`).\n */\n readonly messages = input<PartialMessages<FormMessages> | undefined>(undefined);\n /** Lets the browser draw its own validation bubble. Off by default. */\n readonly nativeValidation = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (raw) => (raw === undefined ? undefined : booleanAttribute(raw)),\n });\n /** Marks the form and every control in it as unavailable. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /**\n * Marks the form busy for work the family did not start — a mutation a\n * consumer's own client is running. It is merged with the family's own\n * submission, so either one puts the root in its busy state.\n */\n readonly loading = input(false, { transform: booleanAttribute });\n /**\n * Registers a `beforeunload` guard while anything in the form has been\n * edited. Off by default: a guard nobody asked for is a trap.\n */\n readonly guardUnsaved = input(false, { transform: booleanAttribute });\n\n /** One output for one transition, carrying the reason and `cancel()`. */\n readonly errorsChange = output<ChangeRequest<FormErrors>>();\n /**\n * Emitted when the form submits and nothing is wrong with it. The values are\n * read from `FormData`, and `errors` is how a handler publishes what a server\n * answered.\n */\n readonly formSubmit = output<{\n values: Record<string, FormDataEntryValue | FormDataEntryValue[]>;\n event: SubmitEvent;\n /** Publishes a server's answer, and moves focus the way a failed submit does. */\n errors: (errors: FormErrorInput) => void;\n /** Holds the form in its busy state until the promise settles. */\n pending: (work: Promise<FormErrorInput | void>) => void;\n }>();\n\n private readonly element = inject<ElementRef<HTMLFormElement>>(ElementRef).nativeElement;\n private readonly defaults = injectFormDefaults();\n private readonly errorMessages = injectFormErrorMessages();\n /** The family's words in the language in force, with this form's `messages` laid over them. */\n readonly t = injectMessages(formMessages, this.messages);\n /** The Reactive Forms group around this element, when a consumer wrote one. */\n private readonly container = inject(ControlContainer, { optional: true, self: true });\n private readonly writtenNoValidate = inject(new HostAttributeToken('novalidate'), {\n optional: true,\n });\n\n private readonly own = signal<FormErrors>({});\n private readonly controls = signal<{ name: string; id: string | undefined }[]>([]);\n private summaryElement: HTMLElement | null = null;\n /** Set when a publish should be followed by the focus a failed submit moves. */\n private pendingFocus = false;\n private readonly ownSubmitting = signal(false);\n /** Either the family's own submission or a consumer's own work. */\n protected readonly submitting = computed(() => this.ownSubmitting() || this.loading());\n private readonly submitted = signal(false);\n\n private readonly external = computed(() => normalizeErrors(this.errorsInput()));\n private readonly controlled = computed(() => this.errorsInput() !== undefined);\n\n readonly errors = computed(() => (this.controlled() ? this.external() : this.own()));\n readonly entries = computed(() => orderErrors(this.errors(), this.controls()));\n protected readonly hasAnyError = computed(() => hasErrors(this.errors()));\n\n readonly summaryId = signal(`slotted-form-summary-${(summaryCounter += 1)}`);\n readonly resolvedSummaryTitle = computed(() => this.t('summaryTitle'));\n readonly resolvedSummaryDescription = computed(\n () => this.summaryDescription() ?? this.defaults.summaryDescription,\n );\n readonly resolvedAlign = computed(() => this.align() ?? this.defaults.align);\n protected readonly resolvedValidate = computed(() => this.validate() ?? this.defaults.validate);\n protected readonly resolvedErrorFocus = computed(\n () => this.errorFocus() ?? this.defaults.errorFocus,\n );\n protected readonly resolvedSummary = computed(() => this.summary() ?? this.defaults.summary);\n protected readonly resolvedNativeValidation = computed(\n () =>\n this.nativeValidation() ??\n (this.writtenNoValidate === null ? this.defaults.nativeValidation : false),\n );\n protected readonly showsOwnSummary = computed(\n () => this.resolvedSummary() === 'auto' && this.entries().length > 0,\n );\n\n constructor() {\n this.attachUnloadGuard();\n }\n\n ngOnInit() {\n this.own.set(normalizeErrors(this.defaultErrors()));\n this.readControls();\n }\n\n /**\n * The summary says when it exists, and takes the focus a failed submit asked\n * for. The move waits for the region rather than racing it: the errors and\n * the element that shows them are published in the same change, and a\n * `focus()` called before the region rendered would land on nothing.\n */\n registerSummary(element: HTMLElement | null) {\n this.summaryElement = element;\n if (element === null || !this.pendingFocus) return;\n this.pendingFocus = false;\n element.focus();\n }\n\n /** Runs validation now and publishes what it found. */\n validateNow(): FormErrors {\n const found = this.collect();\n this.publish(found, 'programmatic', undefined);\n return found;\n }\n\n /** Submits as though the submit button had been pressed. */\n submit() {\n this.element.requestSubmit();\n }\n\n /** Resets the controls and clears the errors. */\n reset() {\n this.element.reset();\n }\n\n /** Moves focus where a failed submit would have moved it. */\n focusFirstError() {\n const focus = this.resolvedErrorFocus();\n if (focus === 'none') return;\n if (focus === 'summary' && this.summaryElement !== null) {\n this.summaryElement.focus();\n return;\n }\n const first = this.entries()[0];\n if (first === undefined) return;\n const control = this.element.elements.namedItem(first.name);\n const element = control instanceof RadioNodeList ? control[0] : control;\n if (element instanceof HTMLElement) element.focus();\n }\n\n protected onSubmit(event: SubmitEvent) {\n this.submitted.set(true);\n this.readControls();\n\n if (this.submitting()) {\n /* A second submit while one is pending is refused. */\n event.preventDefault();\n return;\n }\n\n const found = this.resolvedValidate() === 'none' ? this.external() : this.collect();\n\n if (hasErrors(found)) {\n event.preventDefault();\n this.publish(found, 'submit', event);\n return;\n }\n\n this.publish({}, 'submit', event);\n event.preventDefault();\n\n const data = new FormData(this.element);\n const values: Record<string, FormDataEntryValue | FormDataEntryValue[]> = {};\n for (const key of new Set(data.keys())) {\n const all = data.getAll(key);\n values[key] = all.length > 1 ? all : (all[0] as FormDataEntryValue);\n }\n\n this.formSubmit.emit({\n values,\n event,\n errors: (errors) => this.publish(normalizeErrors(errors), 'submit', event),\n pending: (work) => {\n this.ownSubmitting.set(true);\n void work\n .then((settled) => {\n if (settled !== undefined && settled !== null) {\n this.publish(normalizeErrors(settled), 'submit', event);\n }\n })\n .finally(() => this.ownSubmitting.set(false));\n },\n });\n }\n\n protected onReset() {\n this.submitted.set(false);\n this.publish({}, 'clear', undefined);\n }\n\n /**\n * A server error is dropped when the control it names is edited. After a\n * failed submit under `validate=\"change\"`, the whole form is checked again\n * instead, because a reader who has seen the list is fixing it.\n */\n protected onInput(event: Event) {\n const name = nameOf(event.target);\n if (name === null) return;\n\n if (this.resolvedValidate() === 'change' && this.submitted()) {\n this.publish(this.collect(), 'keyboard', event, false);\n return;\n }\n const next = withoutError(this.errors(), name);\n if (next !== this.errors()) this.publish(next, 'keyboard', event, false);\n }\n\n /**\n * On blur only the control that lost focus is checked. Running the whole form\n * would tell a reader that six fields they have not reached yet are wrong,\n * which is the noise `validate=\"submit\"` exists to avoid.\n */\n protected onFocusOut(event: Event) {\n if (this.resolvedValidate() !== 'blur') return;\n const name = nameOf(event.target);\n if (name === null) return;\n\n const found = this.collect();\n const messages = found[name];\n const next =\n messages === undefined\n ? withoutError(this.errors(), name)\n : mergeErrors(this.errors(), { [name]: messages });\n if (next !== this.errors()) this.publish(next, 'keyboard', event, false);\n }\n\n /**\n * Three sources, latest last: whatever a server sent, the platform's own\n * constraint validation, and Reactive Forms.\n */\n private collect(): FormErrors {\n return mergeErrors(this.external(), collectValidity(this.element), this.angularErrors());\n }\n\n /**\n * Every failing control in the group around this form, as a sentence. Angular\n * reports a key and a shape and never a message, because a message is the\n * application's and so is its language; the registry is where it is written.\n */\n private angularErrors(): FormErrors {\n const group = this.container?.control as FormGroup | FormArray | null | undefined;\n if (group === null || group === undefined) return {};\n group.markAllAsTouched();\n\n const found: Record<string, string[]> = {};\n for (const [name, control] of Object.entries(\n group.controls as Record<string, AbstractControl>,\n )) {\n const errors = control.errors;\n if (errors === null || control.disabled) continue;\n const messages = Object.entries(errors)\n .map(\n ([key, detail]) =>\n this.errorMessages[key]?.({ name, key, detail }) ?? this.builtInMessage(key, detail),\n )\n .filter((message): message is string => typeof message === 'string');\n if (messages.length > 0) found[name] = messages;\n }\n return found;\n }\n\n /**\n * The sentence for one of Angular's own validators, from the catalog; for a\n * key the catalog does not know, nothing — the application's validator names\n * its own message through `SL_FORM_ERROR_MESSAGES`.\n */\n private builtInMessage(key: string, detail: unknown): string | undefined {\n const shape = (detail ?? {}) as { min?: unknown; max?: unknown; requiredLength?: unknown };\n switch (key) {\n case 'required':\n return this.t('errors.required');\n case 'email':\n return this.t('errors.email');\n case 'min':\n return this.t('errors.min', { min: Number(shape.min) });\n case 'max':\n return this.t('errors.max', { max: Number(shape.max) });\n case 'minlength':\n return this.t('errors.minlength', { length: Number(shape.requiredLength) });\n case 'maxlength':\n return this.t('errors.maxlength', { length: Number(shape.requiredLength) });\n case 'pattern':\n return this.t('errors.pattern');\n default:\n return undefined;\n }\n }\n\n private readControls() {\n this.controls.set(namedControls(this.element));\n }\n\n private publish(\n next: FormErrors,\n reason: ChangeReason,\n source: Event | undefined,\n moveFocus = true,\n ) {\n this.readControls();\n\n let cancelled = false;\n const state = createControllable<FormErrors>({\n controlled: undefined,\n initial: this.errors(),\n equals: sameErrors,\n onRequest: (pending) => {\n this.errorsChange.emit(pending);\n cancelled = pending.cancelled;\n },\n });\n state.request(next, reason, source);\n if (cancelled) return;\n\n if (!this.controlled()) this.own.set(next);\n\n if (!moveFocus || !hasErrors(next) || this.resolvedErrorFocus() === 'none') return;\n /* A summary that has not been rendered yet takes the focus when it is, and\n one that is already on the page takes it now. */\n if (this.resolvedErrorFocus() === 'summary' && this.summaryElement === null) {\n this.pendingFocus = true;\n return;\n }\n this.focusFirstError();\n }\n\n /**\n * The guard nobody else ships. It is off by default, because a page that\n * refuses to close after a reader typed one character is a trap.\n */\n private attachUnloadGuard() {\n const onBeforeUnload = (event: BeforeUnloadEvent) => {\n if (!this.guardUnsaved() || this.submitting()) return;\n if (!isDirty(this.element)) return;\n event.preventDefault();\n };\n\n window.addEventListener('beforeunload', onBeforeUnload);\n inject(DestroyRef).onDestroy(() => window.removeEventListener('beforeunload', onBeforeUnload));\n }\n}\n\nfunction nameOf(target: EventTarget | null): string | null {\n if (!(target instanceof HTMLElement)) return null;\n const name = (target as { name?: string }).name;\n return typeof name === 'string' && name !== '' ? name : null;\n}\n\nfunction sameErrors(a: FormErrors, b: FormErrors) {\n const names = Object.keys(a);\n if (names.length !== Object.keys(b).length) return false;\n return names.every(\n (name) =>\n b[name] !== undefined &&\n a[name]!.length === b[name]!.length &&\n a[name]!.every((message, index) => message === b[name]![index]),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AA8BA,MAAM,QAAQ,GAAiB;AAC7B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,gBAAgB,EAAE,KAAK;AACvB,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,kBAAkB,EAAE,SAAS;AAC7B,IAAA,QAAQ,EAAE,QAAQ;CACnB;MAEY,aAAa,GAAG,IAAI,cAAc,CAAe,uBAAuB,EAAE;AACrF,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,QAAQ;AACxB,CAAA;AAED;;;;;AAKG;AACG,SAAU,mBAAmB,CAAC,QAA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,CAAC,IAAI,CAAE,CAAC,KAAK,CAAC,CAAC,CAClE;AACH;;AC7iBA;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"slotted-angular-form.mjs","sources":["../../form/src/form-defaults.ts","../../form/src/form-actions.ts","../../form/src/form.ts","../../form/src/slotted-angular-form.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\nimport type { Signal } from '@angular/core';\nimport type { FormErrorEntry, FormErrors } from '@slotted/core/form';\n\n/**\n * When the form checks its own controls. `submit` is the default and\n * re-validates on every change afterwards: telling a reader an answer is wrong\n * before they have finished writing it is noise, and telling them nothing after\n * they have fixed it is worse.\n */\nexport type FormValidate = 'submit' | 'blur' | 'change' | 'none';\n\n/** Where focus goes after a submit that found something wrong. */\nexport type FormErrorFocus = 'summary' | 'control' | 'none';\n\n/** Whether the family renders the summary itself. */\nexport type FormSummaryMode = 'auto' | 'none';\n\n/** How the action row is arranged along the inline axis. */\nexport type FormActionsAlign = 'end' | 'start' | 'between' | 'stretch';\n\nexport interface FormDefaults {\n align: FormActionsAlign;\n errorFocus: FormErrorFocus;\n nativeValidation: boolean;\n summary: FormSummaryMode;\n summaryDescription: string | undefined;\n validate: FormValidate;\n}\n\nconst FALLBACK: FormDefaults = {\n align: 'end',\n errorFocus: 'summary',\n nativeValidation: false,\n summary: 'auto',\n summaryDescription: undefined,\n validate: 'submit',\n};\n\nexport const FORM_DEFAULTS = new InjectionToken<FormDefaults>('slotted form defaults', {\n providedIn: 'root',\n factory: () => FALLBACK,\n});\n\n/**\n * An application decides once how its forms behave: when they validate, where\n * focus goes after a failed submit, and how its action row is arranged. A form\n * that states any of them itself still wins. The summary's heading comes from\n * the language in force (`provideSlotted`).\n */\nexport function provideFormDefaults(defaults: Partial<FormDefaults>) {\n return {\n provide: FORM_DEFAULTS,\n useFactory: (): FormDefaults => ({ ...FALLBACK, ...defaults }),\n };\n}\n\nexport function injectFormDefaults(): FormDefaults {\n return inject(FORM_DEFAULTS);\n}\n\n/** One validation failure Angular reported, as the registry receives it. */\nexport interface FormErrorMessageContext {\n /** The `name` the control is submitted under, which is the key in the group. */\n name: string;\n /** The key `AbstractControl.errors` used — `required`, `minlength`, and so on. */\n key: string;\n /** Whatever the validator put beside the key. */\n detail: unknown;\n}\n\n/**\n * How a Reactive Forms validation failure the application's own validator\n * reports becomes a sentence.\n *\n * Angular's validators report a key and a shape — `{ required: true }`,\n * `{ minlength: { requiredLength: 8, actualLength: 3 } }` — and never a\n * message. The built-in keys (`required`, `email`, `min`, `max`, `minlength`,\n * `maxlength`, `pattern`) are written by the `form` catalog's `errors.*`\n * messages in the language in force; a validator the application adds names\n * its own message here, and an entry for a built-in key replaces the catalog's.\n */\nexport type FormErrorMessages = Record<string, (context: FormErrorMessageContext) => string>;\n\nexport const SL_FORM_ERROR_MESSAGES = new InjectionToken<FormErrorMessages>(\n 'slotted form error messages',\n { providedIn: 'root', factory: () => ({}) },\n);\n\n/** Names the sentences the application's own validators are written as. */\nexport function provideFormErrorMessages(messages: FormErrorMessages) {\n return { provide: SL_FORM_ERROR_MESSAGES, useValue: messages };\n}\n\nexport function injectFormErrorMessages(): FormErrorMessages {\n return inject(SL_FORM_ERROR_MESSAGES);\n}\n\n/**\n * What the summary needs from the form around it.\n *\n * It is an abstract class rather than an import so the two classes can depend\n * on each other without a cycle — the shape `field` and `text-field` already\n * have.\n */\nexport abstract class SlFormOwner {\n abstract readonly entries: Signal<readonly FormErrorEntry[]>;\n abstract readonly errors: Signal<FormErrors>;\n abstract readonly summaryId: Signal<string>;\n abstract readonly resolvedSummaryTitle: Signal<string>;\n abstract readonly resolvedSummaryDescription: Signal<string | undefined>;\n abstract readonly resolvedAlign: Signal<FormActionsAlign>;\n /** Called by whichever summary is on the page, so focus can reach the region. */\n abstract registerSummary(element: HTMLElement | null): void;\n}\n","import { computed, Directive, inject, input } from '@angular/core';\n\nimport { SlFormOwner } from './form-defaults';\nimport type { FormActionsAlign } from './form-defaults';\n\n/**\n * The row a form's actions stand in.\n *\n * `inline` can end-align a row of buttons. What it cannot do without a query\n * the consumer writes for every form is the reflow: below the form's own\n * container width every action takes the whole width, in a column, with the\n * primary one first — a reader's thumb is at the bottom of a phone and their\n * eye at the end of a row.\n */\n@Directive({\n selector: '[slFormActions]',\n standalone: true,\n exportAs: 'slFormActions',\n host: {\n // The family's identifier on the part: its rules reach it by name, never as any descendant.\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'actions',\n 'data-part-actions': '',\n '[attr.data-align]': 'resolvedAlign()',\n },\n})\nexport class SlFormActions {\n /** Defaults to the form's own `align`, then to the token, then to `end`. */\n readonly align = input<FormActionsAlign | undefined>(undefined);\n\n private readonly form = inject(SlFormOwner, { optional: true });\n\n protected readonly resolvedAlign = computed(\n () => this.align() ?? this.form?.resolvedAlign() ?? 'end',\n );\n}\n\n/**\n * What the form says about the whole record — a live preview, a summary in\n * words, a help panel — beside the column of fields on a wide form, and after\n * the last field on a narrow one.\n */\n@Directive({\n selector: '[slFormAside]',\n standalone: true,\n exportAs: 'slFormAside',\n host: {\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'aside',\n 'data-part-aside': '',\n },\n})\nexport class SlFormAside {}\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n forwardRef,\n HostAttributeToken,\n inject,\n input,\n output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { AfterViewInit, OnInit } from '@angular/core';\nimport { ControlContainer } from '@angular/forms';\nimport type { AbstractControl, FormArray, FormGroup } from '@angular/forms';\nimport { injectMessages } from '@slotted/angular/i18n';\nimport {\n collectValidity,\n hasErrors,\n isDirty,\n mergeErrors,\n namedControls,\n normalizeErrors,\n orderErrors,\n withoutError,\n} from '@slotted/core/form';\nimport type { FormErrorInput, FormErrors } from '@slotted/core/form';\nimport { formMessages, type FormMessages, type PartialMessages } from '@slotted/core/i18n';\nimport { createControllable } from '@slotted/core/state';\nimport type { ChangeReason, ChangeRequest } from '@slotted/core/state';\n\nimport { injectFormDefaults, injectFormErrorMessages, SlFormOwner } from './form-defaults';\nimport type {\n FormActionsAlign,\n FormErrorFocus,\n FormSummaryMode,\n FormValidate,\n} from './form-defaults';\n\nexport type {\n FormActionsAlign,\n FormDefaults,\n FormErrorFocus,\n FormErrorMessageContext,\n FormErrorMessages,\n FormSummaryMode,\n FormValidate,\n} from './form-defaults';\n\nlet summaryCounter = 0;\n\n/**\n * The summary of everything wrong with the form: a focusable region with a\n * heading, and a link per error pointing at the control it is about.\n *\n * It is the GOV.UK error summary, item for item — \"move keyboard focus to the\n * error summary\", \"include the heading\", \"link to each of the answers that have\n * validation errors\", \"make sure the error messages in the error summary are\n * worded the same as those which appear next to the inputs\". The last one is\n * free here: one map feeds the summary and the field.\n *\n * The form renders this itself under `summary=\"auto\"`. A consumer who wants it\n * somewhere else writes `summary=\"none\"` and puts `slFormSummary` on their own\n * element.\n */\n@Component({\n selector: '[slFormSummary]',\n standalone: true,\n exportAs: 'slFormSummary',\n template: `<h2 data-part=\"summary-title\" data-part-summary-title=\"\" [attr.id]=\"form.summaryId()\">\n {{ form.resolvedSummaryTitle() }}\n </h2>\n @if (form.resolvedSummaryDescription(); as description) {\n <p>{{ description }}</p>\n }\n <ul data-part=\"summary-list\" data-part-summary-list=\"\">\n @for (entry of form.entries(); track entry.name) {\n @for (message of entry.messages; track message) {\n <li>\n @if (entry.id) {\n <a\n data-part=\"summary-item\"\n data-part-summary-item=\"\"\n [attr.href]=\"'#' + entry.id\"\n (click)=\"focus($event, entry.id)\"\n >\n {{ message }}\n </a>\n } @else {\n <span data-part=\"summary-item\" data-part-summary-item=\"\">{{ message }}</span>\n }\n </li>\n }\n }\n </ul>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n // The family's identifier on the part: its rules reach it by name, never as any descendant.\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'summary',\n 'data-part-summary': '',\n role: 'alert',\n tabindex: '-1',\n '[attr.aria-labelledby]': 'form.summaryId()',\n },\n})\nexport class SlFormSummary implements AfterViewInit {\n protected readonly form = inject(SlFormOwner);\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n ngAfterViewInit() {\n this.form.registerSummary(this.element);\n }\n\n /**\n * The fragment is not followed. A link that navigated would write the\n * control's identifier into the address bar and add an entry to the history\n * of a page that never left; focusing the control is the whole of what the\n * link is for, and the browser scrolls it into view with the focus.\n */\n protected focus(event: Event, id: string) {\n const target = this.element.ownerDocument.getElementById(id);\n if (target === null) return;\n event.preventDefault();\n target.focus();\n }\n}\n\n/**\n * A form, its errors and its row of actions.\n *\n * **It owns the errors and nothing else.** `docs/component-features.md` § 6 puts\n * the boundary there: the family coordinates submission, validation, global\n * messages and focus \"without owning each framework's state\". Values come from\n * `FormData`, validity from `checkValidity()` and from Reactive Forms, and the\n * values themselves stay with whichever of the two owns them.\n *\n * **`novalidate` is written, and constraint validation still runs.** The\n * attribute stops the browser drawing its own bubble beside a control whose\n * error the `field` is already showing; `checkValidity()` is called explicitly\n * and each control's `validationMessage` is the platform's localized string.\n *\n * **Reactive Forms is the second source.** When there is a `ControlContainer`,\n * every control is marked touched at submit and each failing one becomes a\n * sentence: a built-in validator's through the catalog's `errors.*` messages,\n * an application's own through `SL_FORM_ERROR_MESSAGES`.\n *\n * **Signal Forms needs nothing here.** Angular 22's `[field]` binds a control\n * through its `ControlValueAccessor`, which every Slotted control provides, so\n * they work under it today and this family adds no second integration.\n */\n@Component({\n selector: 'form[slForm]',\n standalone: true,\n exportAs: 'slForm',\n imports: [SlFormSummary],\n template: `@if (showsOwnSummary()) {\n <div slFormSummary></div>\n }\n <ng-content />`,\n styleUrl: '../../../styles/src/form/form.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: SlFormOwner, useExisting: forwardRef(() => SlForm) }],\n host: {\n 'data-ui': 'form',\n 'data-ui-form': '',\n 'data-part': 'root',\n 'data-part-root': '',\n '[attr.novalidate]': \"resolvedNativeValidation() ? null : ''\",\n '[attr.aria-busy]': \"submitting() ? 'true' : null\",\n '[attr.data-invalid]': \"hasAnyError() ? '' : null\",\n '[attr.data-loading]': \"submitting() ? '' : null\",\n '[attr.data-disabled]': \"disabled() ? '' : null\",\n '(submit)': 'onSubmit($event)',\n '(reset)': 'onReset()',\n '(input)': 'onInput($event)',\n '(focusout)': 'onFocusOut($event)',\n },\n})\nexport class SlForm implements SlFormOwner, OnInit {\n /**\n * Present means the consumer owns the error map, for the life of the\n * component. Keyed by the `name` attribute of the control each error is about.\n */\n readonly errorsInput = input<FormErrorInput | undefined>(undefined, { alias: 'errors' });\n /** The errors an uncontrolled form starts from, read once. */\n readonly defaultErrors = input<FormErrorInput | undefined>(undefined);\n\n readonly validate = input<FormValidate | undefined>(undefined);\n readonly errorFocus = input<FormErrorFocus | undefined>(undefined);\n readonly summary = input<FormSummaryMode | undefined>(undefined);\n readonly summaryDescription = input<string | undefined>(undefined);\n readonly align = input<FormActionsAlign | undefined>(undefined);\n /**\n * Words laid over the catalog of the language in force, key by key: the\n * summary's heading (`summaryTitle`) and the built-in validators' sentences\n * (`errors.*`).\n */\n readonly messages = input<PartialMessages<FormMessages> | undefined>(undefined);\n /** Lets the browser draw its own validation bubble. Off by default. */\n readonly nativeValidation = input<boolean | undefined, boolean | string | undefined>(undefined, {\n transform: (raw) => (raw === undefined ? undefined : booleanAttribute(raw)),\n });\n /** Marks the form and every control in it as unavailable. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /**\n * Marks the form busy for work the family did not start — a mutation a\n * consumer's own client is running. It is merged with the family's own\n * submission, so either one puts the root in its busy state.\n */\n readonly loading = input(false, { transform: booleanAttribute });\n /**\n * Registers a `beforeunload` guard while anything in the form has been\n * edited. Off by default: a guard nobody asked for is a trap.\n */\n readonly guardUnsaved = input(false, { transform: booleanAttribute });\n\n /** One output for one transition, carrying the reason and `cancel()`. */\n readonly errorsChange = output<ChangeRequest<FormErrors>>();\n /**\n * Emitted when the form submits and nothing is wrong with it. The values are\n * read from `FormData`, and `errors` is how a handler publishes what a server\n * answered.\n */\n readonly formSubmit = output<{\n values: Record<string, FormDataEntryValue | FormDataEntryValue[]>;\n event: SubmitEvent;\n /** Publishes a server's answer, and moves focus the way a failed submit does. */\n errors: (errors: FormErrorInput) => void;\n /** Holds the form in its busy state until the promise settles. */\n pending: (work: Promise<FormErrorInput | void>) => void;\n }>();\n\n private readonly element = inject<ElementRef<HTMLFormElement>>(ElementRef).nativeElement;\n private readonly defaults = injectFormDefaults();\n private readonly errorMessages = injectFormErrorMessages();\n /** The family's words in the language in force, with this form's `messages` laid over them. */\n readonly t = injectMessages(formMessages, this.messages);\n /** The Reactive Forms group around this element, when a consumer wrote one. */\n private readonly container = inject(ControlContainer, { optional: true, self: true });\n private readonly writtenNoValidate = inject(new HostAttributeToken('novalidate'), {\n optional: true,\n });\n\n private readonly own = signal<FormErrors>({});\n private readonly controls = signal<{ name: string; id: string | undefined }[]>([]);\n private summaryElement: HTMLElement | null = null;\n /** Set when a publish should be followed by the focus a failed submit moves. */\n private pendingFocus = false;\n private readonly ownSubmitting = signal(false);\n /** Either the family's own submission or a consumer's own work. */\n protected readonly submitting = computed(() => this.ownSubmitting() || this.loading());\n private readonly submitted = signal(false);\n\n private readonly external = computed(() => normalizeErrors(this.errorsInput()));\n private readonly controlled = computed(() => this.errorsInput() !== undefined);\n\n readonly errors = computed(() => (this.controlled() ? this.external() : this.own()));\n readonly entries = computed(() => orderErrors(this.errors(), this.controls()));\n protected readonly hasAnyError = computed(() => hasErrors(this.errors()));\n\n readonly summaryId = signal(`slotted-form-summary-${(summaryCounter += 1)}`);\n readonly resolvedSummaryTitle = computed(() => this.t('summaryTitle'));\n readonly resolvedSummaryDescription = computed(\n () => this.summaryDescription() ?? this.defaults.summaryDescription,\n );\n readonly resolvedAlign = computed(() => this.align() ?? this.defaults.align);\n protected readonly resolvedValidate = computed(() => this.validate() ?? this.defaults.validate);\n protected readonly resolvedErrorFocus = computed(\n () => this.errorFocus() ?? this.defaults.errorFocus,\n );\n protected readonly resolvedSummary = computed(() => this.summary() ?? this.defaults.summary);\n protected readonly resolvedNativeValidation = computed(\n () =>\n this.nativeValidation() ??\n (this.writtenNoValidate === null ? this.defaults.nativeValidation : false),\n );\n protected readonly showsOwnSummary = computed(\n () => this.resolvedSummary() === 'auto' && this.entries().length > 0,\n );\n\n constructor() {\n this.attachUnloadGuard();\n }\n\n ngOnInit() {\n this.own.set(normalizeErrors(this.defaultErrors()));\n this.readControls();\n }\n\n /**\n * The summary says when it exists, and takes the focus a failed submit asked\n * for. The move waits for the region rather than racing it: the errors and\n * the element that shows them are published in the same change, and a\n * `focus()` called before the region rendered would land on nothing.\n */\n registerSummary(element: HTMLElement | null) {\n this.summaryElement = element;\n if (element === null || !this.pendingFocus) return;\n this.pendingFocus = false;\n element.focus();\n }\n\n /** Runs validation now and publishes what it found. */\n validateNow(): FormErrors {\n const found = this.collect();\n this.publish(found, 'programmatic', undefined);\n return found;\n }\n\n /** Submits as though the submit button had been pressed. */\n submit() {\n this.element.requestSubmit();\n }\n\n /** Resets the controls and clears the errors. */\n reset() {\n this.element.reset();\n }\n\n /** Moves focus where a failed submit would have moved it. */\n focusFirstError() {\n const focus = this.resolvedErrorFocus();\n if (focus === 'none') return;\n if (focus === 'summary' && this.summaryElement !== null) {\n this.summaryElement.focus();\n return;\n }\n const first = this.entries()[0];\n if (first === undefined) return;\n const control = this.element.elements.namedItem(first.name);\n const element = control instanceof RadioNodeList ? control[0] : control;\n if (element instanceof HTMLElement) element.focus();\n }\n\n protected onSubmit(event: SubmitEvent) {\n this.submitted.set(true);\n this.readControls();\n\n if (this.submitting()) {\n /* A second submit while one is pending is refused. */\n event.preventDefault();\n return;\n }\n\n const found = this.resolvedValidate() === 'none' ? this.external() : this.collect();\n\n if (hasErrors(found)) {\n event.preventDefault();\n this.publish(found, 'submit', event);\n return;\n }\n\n this.publish({}, 'submit', event);\n event.preventDefault();\n\n const data = new FormData(this.element);\n const values: Record<string, FormDataEntryValue | FormDataEntryValue[]> = {};\n for (const key of new Set(data.keys())) {\n const all = data.getAll(key);\n values[key] = all.length > 1 ? all : (all[0] as FormDataEntryValue);\n }\n\n this.formSubmit.emit({\n values,\n event,\n errors: (errors) => this.publish(normalizeErrors(errors), 'submit', event),\n pending: (work) => {\n this.ownSubmitting.set(true);\n void work\n .then((settled) => {\n if (settled !== undefined && settled !== null) {\n this.publish(normalizeErrors(settled), 'submit', event);\n }\n })\n .finally(() => this.ownSubmitting.set(false));\n },\n });\n }\n\n protected onReset() {\n this.submitted.set(false);\n this.publish({}, 'clear', undefined);\n }\n\n /**\n * A server error is dropped when the control it names is edited. After a\n * failed submit under `validate=\"change\"`, the whole form is checked again\n * instead, because a reader who has seen the list is fixing it.\n */\n protected onInput(event: Event) {\n const name = nameOf(event.target);\n if (name === null) return;\n\n if (this.resolvedValidate() === 'change' && this.submitted()) {\n this.publish(this.collect(), 'keyboard', event, false);\n return;\n }\n const next = withoutError(this.errors(), name);\n if (next !== this.errors()) this.publish(next, 'keyboard', event, false);\n }\n\n /**\n * On blur only the control that lost focus is checked. Running the whole form\n * would tell a reader that six fields they have not reached yet are wrong,\n * which is the noise `validate=\"submit\"` exists to avoid.\n */\n protected onFocusOut(event: Event) {\n if (this.resolvedValidate() !== 'blur') return;\n const name = nameOf(event.target);\n if (name === null) return;\n\n const found = this.collect();\n const messages = found[name];\n const next =\n messages === undefined\n ? withoutError(this.errors(), name)\n : mergeErrors(this.errors(), { [name]: messages });\n if (next !== this.errors()) this.publish(next, 'keyboard', event, false);\n }\n\n /**\n * Three sources, latest last: whatever a server sent, the platform's own\n * constraint validation, and Reactive Forms.\n */\n private collect(): FormErrors {\n return mergeErrors(this.external(), collectValidity(this.element), this.angularErrors());\n }\n\n /**\n * Every failing control in the group around this form, as a sentence. Angular\n * reports a key and a shape and never a message, because a message is the\n * application's and so is its language; the registry is where it is written.\n */\n private angularErrors(): FormErrors {\n const group = this.container?.control as FormGroup | FormArray | null | undefined;\n if (group === null || group === undefined) return {};\n group.markAllAsTouched();\n\n const found: Record<string, string[]> = {};\n for (const [name, control] of Object.entries(\n group.controls as Record<string, AbstractControl>,\n )) {\n const errors = control.errors;\n if (errors === null || control.disabled) continue;\n const messages = Object.entries(errors)\n .map(\n ([key, detail]) =>\n this.errorMessages[key]?.({ name, key, detail }) ?? this.builtInMessage(key, detail),\n )\n .filter((message): message is string => typeof message === 'string');\n if (messages.length > 0) found[name] = messages;\n }\n return found;\n }\n\n /**\n * The sentence for one of Angular's own validators, from the catalog; for a\n * key the catalog does not know, nothing — the application's validator names\n * its own message through `SL_FORM_ERROR_MESSAGES`.\n */\n private builtInMessage(key: string, detail: unknown): string | undefined {\n const shape = (detail ?? {}) as { min?: unknown; max?: unknown; requiredLength?: unknown };\n switch (key) {\n case 'required':\n return this.t('errors.required');\n case 'email':\n return this.t('errors.email');\n case 'min':\n return this.t('errors.min', { min: Number(shape.min) });\n case 'max':\n return this.t('errors.max', { max: Number(shape.max) });\n case 'minlength':\n return this.t('errors.minlength', { length: Number(shape.requiredLength) });\n case 'maxlength':\n return this.t('errors.maxlength', { length: Number(shape.requiredLength) });\n case 'pattern':\n return this.t('errors.pattern');\n default:\n return undefined;\n }\n }\n\n private readControls() {\n this.controls.set(namedControls(this.element));\n }\n\n private publish(\n next: FormErrors,\n reason: ChangeReason,\n source: Event | undefined,\n moveFocus = true,\n ) {\n this.readControls();\n\n let cancelled = false;\n const state = createControllable<FormErrors>({\n controlled: undefined,\n initial: this.errors(),\n equals: sameErrors,\n onRequest: (pending) => {\n this.errorsChange.emit(pending);\n cancelled = pending.cancelled;\n },\n });\n state.request(next, reason, source);\n if (cancelled) return;\n\n if (!this.controlled()) this.own.set(next);\n\n if (!moveFocus || !hasErrors(next) || this.resolvedErrorFocus() === 'none') return;\n /* A summary that has not been rendered yet takes the focus when it is, and\n one that is already on the page takes it now. */\n if (this.resolvedErrorFocus() === 'summary' && this.summaryElement === null) {\n this.pendingFocus = true;\n return;\n }\n this.focusFirstError();\n }\n\n /**\n * The guard nobody else ships. It is off by default, because a page that\n * refuses to close after a reader typed one character is a trap.\n */\n private attachUnloadGuard() {\n const onBeforeUnload = (event: BeforeUnloadEvent) => {\n if (!this.guardUnsaved() || this.submitting()) return;\n if (!isDirty(this.element)) return;\n event.preventDefault();\n };\n\n window.addEventListener('beforeunload', onBeforeUnload);\n inject(DestroyRef).onDestroy(() => window.removeEventListener('beforeunload', onBeforeUnload));\n }\n}\n\nfunction nameOf(target: EventTarget | null): string | null {\n if (!(target instanceof HTMLElement)) return null;\n const name = (target as { name?: string }).name;\n return typeof name === 'string' && name !== '' ? name : null;\n}\n\nfunction sameErrors(a: FormErrors, b: FormErrors) {\n const names = Object.keys(a);\n if (names.length !== Object.keys(b).length) return false;\n return names.every(\n (name) =>\n b[name] !== undefined &&\n a[name]!.length === b[name]!.length &&\n a[name]!.every((message, index) => message === b[name]![index]),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AA8BA,MAAM,QAAQ,GAAiB;AAC7B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,gBAAgB,EAAE,KAAK;AACvB,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,kBAAkB,EAAE,SAAS;AAC7B,IAAA,QAAQ,EAAE,QAAQ;CACnB;MAEY,aAAa,GAAG,IAAI,cAAc,CAAe,uBAAuB,EAAE;AACrF,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,QAAQ;AACxB,CAAA;AAED;;;;;AAKG;AACG,SAAU,mBAAmB,CAAC,QAA+B,EAAA;IACjE,OAAO;AACL,QAAA,OAAO,EAAE,aAAa;AACtB,QAAA,UAAU,EAAE,OAAqB,EAAE,GAAG,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAC;KAC/D;AACH;SAEgB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