@4sh/ui-kit 0.1.0
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/LICENSE +201 -0
- package/NOTICE +7 -0
- package/README.md +229 -0
- package/fesm2022/4sh-ui-kit-forms.mjs +501 -0
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-motion.mjs +155 -0
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs +61 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-theming.mjs +120 -0
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-types.mjs +12 -0
- package/fesm2022/4sh-ui-kit-types.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs +244 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs +160 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs +926 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs +34 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs +122 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs +95 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs +190 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs +151 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs +222 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs +164 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs +118 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs +205 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs +219 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs +1508 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs +300 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs +148 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs +102 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs +568 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs +85 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs +98 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs +201 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs +125 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs +234 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs +288 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs +679 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs +121 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs +61 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs +147 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs +484 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs +555 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs +168 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs +245 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs +296 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs +124 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs +92 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs +185 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs +146 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs +386 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs +868 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs +77 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs +577 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs +81 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs +340 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs +132 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs +389 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs +1406 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs +503 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs +84 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs +424 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs +120 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs +445 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit.mjs +16 -0
- package/fesm2022/4sh-ui-kit.mjs.map +1 -0
- package/package.json +287 -0
- package/styles/base/_base.scss +19 -0
- package/styles/base/_motion.scss +144 -0
- package/styles/base/_typography.scss +99 -0
- package/styles/generated/_tokens-breakpoint.scss +8 -0
- package/styles/generated/_tokens-metrics.scss +37 -0
- package/styles/generated/_tokens-primitives.scss +284 -0
- package/styles/generated/_tokens-responsive.scss +99 -0
- package/styles/generated/_tokens-semantics.scss +1274 -0
- package/styles/generated/_tokens-styles.scss +35 -0
- package/styles/generated/_tokens-transitions.scss +11 -0
- package/styles/generated/_tokens-typography.scss +14 -0
- package/styles/generated/_tokens.scss +10 -0
- package/styles/index.scss +25 -0
- package/styles/settings/_ui-config.scss +67 -0
- package/styles/utils/_functions.scss +67 -0
- package/styles/utils/_helpers.scss +129 -0
- package/styles/utils/_mixins.scss +186 -0
- package/styles/utils/_motion.scss +47 -0
- package/styles/utils/_overlay.scss +26 -0
- package/styles/utils.scss +15 -0
- package/styles.css +1 -0
- package/types/4sh-ui-kit-forms.d.ts +259 -0
- package/types/4sh-ui-kit-motion.d.ts +111 -0
- package/types/4sh-ui-kit-overlay.d.ts +31 -0
- package/types/4sh-ui-kit-theming.d.ts +54 -0
- package/types/4sh-ui-kit-types.d.ts +13 -0
- package/types/4sh-ui-kit-ui-accordion.d.ts +140 -0
- package/types/4sh-ui-kit-ui-alert.d.ts +89 -0
- package/types/4sh-ui-kit-ui-autocomplete.d.ts +411 -0
- package/types/4sh-ui-kit-ui-avatar-group.d.ts +17 -0
- package/types/4sh-ui-kit-ui-avatar.d.ts +55 -0
- package/types/4sh-ui-kit-ui-badge.d.ts +38 -0
- package/types/4sh-ui-kit-ui-breadcrumb.d.ts +131 -0
- package/types/4sh-ui-kit-ui-button-split.d.ts +102 -0
- package/types/4sh-ui-kit-ui-button.d.ts +91 -0
- package/types/4sh-ui-kit-ui-card.d.ts +102 -0
- package/types/4sh-ui-kit-ui-checkbox.d.ts +54 -0
- package/types/4sh-ui-kit-ui-chip.d.ts +114 -0
- package/types/4sh-ui-kit-ui-context-menu.d.ts +105 -0
- package/types/4sh-ui-kit-ui-datepicker.d.ts +539 -0
- package/types/4sh-ui-kit-ui-drawer.d.ts +147 -0
- package/types/4sh-ui-kit-ui-empty-state.d.ts +93 -0
- package/types/4sh-ui-kit-ui-field.d.ts +53 -0
- package/types/4sh-ui-kit-ui-file-upload.d.ts +268 -0
- package/types/4sh-ui-kit-ui-helper.d.ts +46 -0
- package/types/4sh-ui-kit-ui-icon.d.ts +69 -0
- package/types/4sh-ui-kit-ui-image.d.ts +88 -0
- package/types/4sh-ui-kit-ui-input-group.d.ts +54 -0
- package/types/4sh-ui-kit-ui-input-mask.d.ts +63 -0
- package/types/4sh-ui-kit-ui-input-number.d.ts +96 -0
- package/types/4sh-ui-kit-ui-input-otp.d.ts +130 -0
- package/types/4sh-ui-kit-ui-input-tags.d.ts +350 -0
- package/types/4sh-ui-kit-ui-input.d.ts +78 -0
- package/types/4sh-ui-kit-ui-label.d.ts +36 -0
- package/types/4sh-ui-kit-ui-link.d.ts +72 -0
- package/types/4sh-ui-kit-ui-menu.d.ts +235 -0
- package/types/4sh-ui-kit-ui-modal.d.ts +241 -0
- package/types/4sh-ui-kit-ui-nudger.d.ts +79 -0
- package/types/4sh-ui-kit-ui-paginator.d.ts +150 -0
- package/types/4sh-ui-kit-ui-popover.d.ts +125 -0
- package/types/4sh-ui-kit-ui-progress-bar.d.ts +82 -0
- package/types/4sh-ui-kit-ui-radio.d.ts +44 -0
- package/types/4sh-ui-kit-ui-rating.d.ts +90 -0
- package/types/4sh-ui-kit-ui-read-only.d.ts +70 -0
- package/types/4sh-ui-kit-ui-segment-control.d.ts +184 -0
- package/types/4sh-ui-kit-ui-select.d.ts +392 -0
- package/types/4sh-ui-kit-ui-separator.d.ts +43 -0
- package/types/4sh-ui-kit-ui-sidebar.d.ts +358 -0
- package/types/4sh-ui-kit-ui-skeleton.d.ts +52 -0
- package/types/4sh-ui-kit-ui-slider.d.ts +127 -0
- package/types/4sh-ui-kit-ui-spinner.d.ts +67 -0
- package/types/4sh-ui-kit-ui-stepper.d.ts +220 -0
- package/types/4sh-ui-kit-ui-table.d.ts +570 -0
- package/types/4sh-ui-kit-ui-tabs.d.ts +225 -0
- package/types/4sh-ui-kit-ui-tag.d.ts +46 -0
- package/types/4sh-ui-kit-ui-textarea.d.ts +61 -0
- package/types/4sh-ui-kit-ui-toast.d.ts +247 -0
- package/types/4sh-ui-kit-ui-toggle.d.ts +67 -0
- package/types/4sh-ui-kit-ui-tooltip.d.ts +167 -0
- package/types/4sh-ui-kit.d.ts +4 -0
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Injector, DestroyRef, signal, computed, afterNextRender, effect, input, booleanAttribute, Directive, isDevMode } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { NgControl, PristineChangeEvent, TouchedChangeEvent, StatusChangeEvent } from '@angular/forms';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Base class for form components (`ui-checkbox`, `ui-radio`, `ui-input`…).
|
|
8
|
+
*
|
|
9
|
+
* Implements `ControlValueAccessor` and mirrors the attached `NgControl` state
|
|
10
|
+
* into signals, so templates/styles can react to it declaratively:
|
|
11
|
+
*
|
|
12
|
+
* - `touched` / `dirty` / `pristine` / `untouched` — interaction state
|
|
13
|
+
* - `controlInvalid` / `controlErrors` — validation state
|
|
14
|
+
* - `controlDisabled` — driven by `control.disable()`
|
|
15
|
+
* - `showError` — invalid AND (touched or dirty),
|
|
16
|
+
* the usual "when to paint red" rule
|
|
17
|
+
*
|
|
18
|
+
* The subscription is wired automatically after first render and cleaned up on
|
|
19
|
+
* destroy. Subclasses only have to:
|
|
20
|
+
* 1. implement `writeValue()` (form → view),
|
|
21
|
+
* 2. call `emitChange(value)` on user interaction (view → form),
|
|
22
|
+
* 3. call `emitTouch()` on blur,
|
|
23
|
+
* 4. declare the DI provider:
|
|
24
|
+
* `{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyComponent), multi: true }`.
|
|
25
|
+
*
|
|
26
|
+
* Works with reactive forms, template-driven forms, or standalone (no form at
|
|
27
|
+
* all — the signals simply keep their defaults).
|
|
28
|
+
*/
|
|
29
|
+
class BaseControlValueAccessor {
|
|
30
|
+
constructor() {
|
|
31
|
+
this.injector = inject(Injector);
|
|
32
|
+
this.destroyRef = inject(DestroyRef);
|
|
33
|
+
this.dirty = signal(false, /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "dirty" }] : /* istanbul ignore next */ []));
|
|
35
|
+
this.pristine = signal(true, /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "pristine" }] : /* istanbul ignore next */ []));
|
|
37
|
+
this.touched = signal(false, /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
39
|
+
this.untouched = signal(true, /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "untouched" }] : /* istanbul ignore next */ []));
|
|
41
|
+
/** Validation state of the attached control (false when no control). */
|
|
42
|
+
this.controlInvalid = signal(false, /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "controlInvalid" }] : /* istanbul ignore next */ []));
|
|
44
|
+
/** Validation errors of the attached control (null when valid / no control). */
|
|
45
|
+
this.controlErrors = signal(null, /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "controlErrors" }] : /* istanbul ignore next */ []));
|
|
47
|
+
/** Disabled state driven by the forms API (`control.disable()`), not by the `disabled` input. */
|
|
48
|
+
this.controlDisabled = signal(false, /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "controlDisabled" }] : /* istanbul ignore next */ []));
|
|
50
|
+
/** True when the error state should be surfaced to the user. */
|
|
51
|
+
this.showError = computed(() => this.controlInvalid() && (this.touched() || this.dirty()), /* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [{ debugName: "showError" }] : /* istanbul ignore next */ []));
|
|
53
|
+
this.onChange = () => {
|
|
54
|
+
/* noop until registered */
|
|
55
|
+
};
|
|
56
|
+
this.onTouched = () => {
|
|
57
|
+
/* noop until registered */
|
|
58
|
+
};
|
|
59
|
+
// NgControl injects lazily (after the directive tree is built) to avoid
|
|
60
|
+
// the classic NgControl ↔ value-accessor circular dependency.
|
|
61
|
+
afterNextRender(() => this.watchNgControlEvents());
|
|
62
|
+
}
|
|
63
|
+
registerOnChange(fn) {
|
|
64
|
+
this.onChange = fn;
|
|
65
|
+
}
|
|
66
|
+
registerOnTouched(fn) {
|
|
67
|
+
this.onTouched = fn;
|
|
68
|
+
}
|
|
69
|
+
setDisabledState(isDisabled) {
|
|
70
|
+
this.controlDisabled.set(isDisabled);
|
|
71
|
+
}
|
|
72
|
+
/** Propagate a user-driven value change to the form (view → form). */
|
|
73
|
+
emitChange(value) {
|
|
74
|
+
this.onChange(value);
|
|
75
|
+
}
|
|
76
|
+
/** Mark the control as touched (call on blur). */
|
|
77
|
+
emitTouch() {
|
|
78
|
+
this.onTouched();
|
|
79
|
+
this.touched.set(true);
|
|
80
|
+
this.untouched.set(false);
|
|
81
|
+
}
|
|
82
|
+
/** Mirror the NgControl state into the signals. Wired automatically; safe to call once manually if needed. */
|
|
83
|
+
watchNgControlEvents() {
|
|
84
|
+
const control = this.injector.get(NgControl, null, { optional: true, self: true })?.control;
|
|
85
|
+
if (!control)
|
|
86
|
+
return;
|
|
87
|
+
const mirror = () => {
|
|
88
|
+
this.pristine.set(control.pristine);
|
|
89
|
+
this.dirty.set(control.dirty);
|
|
90
|
+
this.touched.set(control.touched);
|
|
91
|
+
this.untouched.set(control.untouched);
|
|
92
|
+
this.controlInvalid.set(control.invalid);
|
|
93
|
+
this.controlErrors.set(control.errors);
|
|
94
|
+
};
|
|
95
|
+
// Signal-forms interop provides a fake NgControl without an `events`
|
|
96
|
+
// stream, but its getters read the field's signals: mirroring inside
|
|
97
|
+
// an effect tracks them and keeps the state live.
|
|
98
|
+
if (!control.events) {
|
|
99
|
+
effect(mirror, { injector: this.injector });
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
// Seed with the current state (events only fire on transitions).
|
|
103
|
+
mirror();
|
|
104
|
+
control.events.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {
|
|
105
|
+
if (event instanceof PristineChangeEvent) {
|
|
106
|
+
this.pristine.set(event.pristine);
|
|
107
|
+
this.dirty.set(!event.pristine);
|
|
108
|
+
}
|
|
109
|
+
else if (event instanceof TouchedChangeEvent) {
|
|
110
|
+
this.touched.set(event.touched);
|
|
111
|
+
this.untouched.set(!event.touched);
|
|
112
|
+
}
|
|
113
|
+
else if (event instanceof StatusChangeEvent) {
|
|
114
|
+
this.controlInvalid.set(event.status === 'INVALID');
|
|
115
|
+
this.controlErrors.set(control.errors);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
let nextUid = 0;
|
|
122
|
+
/**
|
|
123
|
+
* Base class for every standalone form control (`ui-checkbox`, `ui-toggle`,
|
|
124
|
+
* `ui-slider`, `ui-nudger`…): the CVA plumbing shared by all of them, without
|
|
125
|
+
* any "box" chrome (no label/helper/error message rendering).
|
|
126
|
+
*
|
|
127
|
+
* Provides the common inputs (aria*, id/name, required/disabled/readonly/
|
|
128
|
+
* invalid, tabindex), the auto-generated id machinery (`resolvedId`,
|
|
129
|
+
* `messageId`), the `modelValue` signal with the default `writeValue`, and the
|
|
130
|
+
* derived `isDisabled` / `isInvalid` states. Extends `BaseControlValueAccessor`:
|
|
131
|
+
* subclasses call `emitChange` / `emitTouch` on user interaction.
|
|
132
|
+
*
|
|
133
|
+
* Decorated with `@Directive()` (no selector) so the signal inputs are inherited
|
|
134
|
+
* correctly by the concrete components.
|
|
135
|
+
*/
|
|
136
|
+
class BaseFieldControl extends BaseControlValueAccessor {
|
|
137
|
+
constructor() {
|
|
138
|
+
super(...arguments);
|
|
139
|
+
/** Accessible name when no visible label is provided. */
|
|
140
|
+
this.ariaLabel = input(/* @ts-ignore */
|
|
141
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
142
|
+
/** id of an external element that labels this control. */
|
|
143
|
+
this.ariaLabelledBy = input(/* @ts-ignore */
|
|
144
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
145
|
+
/** id forwarded to the native input (auto-generated when omitted). */
|
|
146
|
+
this.inputId = input(/* @ts-ignore */
|
|
147
|
+
...(ngDevMode ? [undefined, { debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
148
|
+
/** name forwarded to the native input. */
|
|
149
|
+
this.name = input(/* @ts-ignore */
|
|
150
|
+
...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
|
|
151
|
+
/** Required marker (*) + native required attribute. */
|
|
152
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
153
|
+
/** Disables the field (native attribute). */
|
|
154
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
155
|
+
/** Read-only (native attribute). */
|
|
156
|
+
this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
157
|
+
/** Forces the error styling (automatic when the attached control is invalid and touched/dirty). */
|
|
158
|
+
this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
159
|
+
/** tabindex forwarded to the native input. */
|
|
160
|
+
this.tabindex = input(/* @ts-ignore */
|
|
161
|
+
...(ngDevMode ? [undefined, { debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
162
|
+
/** @ignore Auto-generated unique id (prefix branded via `uidPrefix`). */
|
|
163
|
+
this.uid = `${this.uidPrefix()}-${nextUid++}`;
|
|
164
|
+
/** @ignore Current value (written by the form or by user input). */
|
|
165
|
+
this.modelValue = signal(undefined, /* @ts-ignore */
|
|
166
|
+
...(ngDevMode ? [{ debugName: "modelValue" }] : /* istanbul ignore next */ []));
|
|
167
|
+
/** @ignore */
|
|
168
|
+
this.resolvedId = computed(() => this.inputId() ?? this.uid, /* @ts-ignore */
|
|
169
|
+
...(ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []));
|
|
170
|
+
/** @ignore id of the message (for aria-describedby). */
|
|
171
|
+
this.messageId = computed(() => `${this.resolvedId()}-message`, /* @ts-ignore */
|
|
172
|
+
...(ngDevMode ? [{ debugName: "messageId" }] : /* istanbul ignore next */ []));
|
|
173
|
+
/** @ignore Input disabled OR control disabled (form API). */
|
|
174
|
+
this.isDisabled = computed(() => this.disabled() || this.controlDisabled(), /* @ts-ignore */
|
|
175
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
176
|
+
/** @ignore Explicit error OR invalid control worth surfacing. */
|
|
177
|
+
this.isInvalid = computed(() => this.invalid() || this.showError(), /* @ts-ignore */
|
|
178
|
+
...(ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []));
|
|
179
|
+
}
|
|
180
|
+
writeValue(value) {
|
|
181
|
+
this.modelValue.set(value);
|
|
182
|
+
}
|
|
183
|
+
/** @ignore Prefix of the auto-generated id — override to brand it per component. */
|
|
184
|
+
uidPrefix() {
|
|
185
|
+
return 'ui-field';
|
|
186
|
+
}
|
|
187
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BaseFieldControl, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
188
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BaseFieldControl, isStandalone: true, inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
189
|
+
}
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BaseFieldControl, decorators: [{
|
|
191
|
+
type: Directive
|
|
192
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }] } });
|
|
193
|
+
/**
|
|
194
|
+
* Base class for "box" form fields (`ui-input`, `ui-input-number`,
|
|
195
|
+
* `ui-input-mask`, `ui-textarea`…).
|
|
196
|
+
*
|
|
197
|
+
* Extends `BaseFieldControl` with the box-specific inputs (label, helper,
|
|
198
|
+
* error, size, level) and the derived state (effective level, displayed
|
|
199
|
+
* message/value). Subclasses only handle their own `<input>` (specific
|
|
200
|
+
* parsing/formatting) and call `emitChange` / `emitTouch`.
|
|
201
|
+
*/
|
|
202
|
+
class BaseFormField extends BaseFieldControl {
|
|
203
|
+
constructor() {
|
|
204
|
+
super(...arguments);
|
|
205
|
+
/** Label (rendered via `ui-label`). */
|
|
206
|
+
this.label = input(/* @ts-ignore */
|
|
207
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
208
|
+
/** Helper text under the field (rendered via `ui-helper`). */
|
|
209
|
+
this.helperText = input(/* @ts-ignore */
|
|
210
|
+
...(ngDevMode ? [undefined, { debugName: "helperText" }] : /* istanbul ignore next */ []));
|
|
211
|
+
/** Error message shown in place of the helper when the field is in error. */
|
|
212
|
+
this.errorText = input(/* @ts-ignore */
|
|
213
|
+
...(ngDevMode ? [undefined, { debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
214
|
+
/** Size. */
|
|
215
|
+
this.size = input('default', /* @ts-ignore */
|
|
216
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
217
|
+
/** Explicit validation status (`error` is forced when the control is invalid + touched). */
|
|
218
|
+
this.level = input('default', /* @ts-ignore */
|
|
219
|
+
...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
|
|
220
|
+
/** @ignore Effective level: error when invalid, otherwise the requested `level`. */
|
|
221
|
+
this.effectiveLevel = computed(() => (this.isInvalid() ? 'error' : this.level()), /* @ts-ignore */
|
|
222
|
+
...(ngDevMode ? [{ debugName: "effectiveLevel" }] : /* istanbul ignore next */ []));
|
|
223
|
+
/** @ignore Displayed message: errorText when in error (if provided), otherwise helperText. */
|
|
224
|
+
this.displayMessage = computed(() => this.isInvalid() && this.errorText() ? this.errorText() : this.helperText(), /* @ts-ignore */
|
|
225
|
+
...(ngDevMode ? [{ debugName: "displayMessage" }] : /* istanbul ignore next */ []));
|
|
226
|
+
/** @ignore Value shown in the input (string). Override for specific formatting. */
|
|
227
|
+
this.displayValue = computed(() => {
|
|
228
|
+
const v = this.modelValue();
|
|
229
|
+
return v === undefined || v === null ? '' : String(v);
|
|
230
|
+
}, /* @ts-ignore */
|
|
231
|
+
...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
|
|
232
|
+
}
|
|
233
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BaseFormField, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
234
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BaseFormField, isStandalone: true, inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
235
|
+
}
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BaseFormField, decorators: [{
|
|
237
|
+
type: Directive
|
|
238
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }] } });
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Standard dropdown-panel anchoring shared by the overlay form fields
|
|
242
|
+
* (`ui-select`, `ui-autocomplete`, `ui-input-tags`, `ui-datepicker`):
|
|
243
|
+
* below the field, flipped above when `autoFlip`.
|
|
244
|
+
*/
|
|
245
|
+
function dropdownOverlayPositions(autoFlip) {
|
|
246
|
+
const below = {
|
|
247
|
+
originX: 'start',
|
|
248
|
+
originY: 'bottom',
|
|
249
|
+
overlayX: 'start',
|
|
250
|
+
overlayY: 'top',
|
|
251
|
+
offsetY: 8
|
|
252
|
+
};
|
|
253
|
+
const above = {
|
|
254
|
+
originX: 'start',
|
|
255
|
+
originY: 'top',
|
|
256
|
+
overlayX: 'start',
|
|
257
|
+
overlayY: 'bottom',
|
|
258
|
+
offsetY: -8
|
|
259
|
+
};
|
|
260
|
+
return autoFlip ? [below, above] : [below];
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Pure masking engine shared by `ui-input-mask` and `ui-datepicker` (auto-formatting the typed
|
|
265
|
+
* date). Same precedent as `overlay-positions.ts` in this folder: framework-free functions, no
|
|
266
|
+
* class/Directive/Component, reusable by any form component that needs literal-inserting input
|
|
267
|
+
* masking. Extracted from `ui-input-mask.ts` — behavior is a byte-for-byte copy, only `this.mask()`
|
|
268
|
+
* /`this.ranges()`/`this.slotChar()` become explicit parameters.
|
|
269
|
+
*/
|
|
270
|
+
/** Mask tokens → accepted character class. */
|
|
271
|
+
const MASK_TOKENS = {
|
|
272
|
+
'9': /[0-9]/, // digit
|
|
273
|
+
a: /[a-zA-Z]/, // letter
|
|
274
|
+
'*': /[a-zA-Z0-9]/, // alphanumeric
|
|
275
|
+
};
|
|
276
|
+
/** Parse the `ranges` input (`"1-31 1-12 1900-2100"`) into one bound per numeric segment. */
|
|
277
|
+
function parseMaskRanges(ranges) {
|
|
278
|
+
return ranges
|
|
279
|
+
.trim()
|
|
280
|
+
.split(/\s+/)
|
|
281
|
+
.map((part) => {
|
|
282
|
+
const m = /^(\d+)-(\d+)$/.exec(part);
|
|
283
|
+
return m ? { min: Number(m[1]), max: Number(m[2]) } : null;
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Resolve the mask template into slots: literals, input slots, and the `ranges` bounds attached
|
|
288
|
+
* to every slot of the numeric segment (consecutive `9` tokens) it belongs to.
|
|
289
|
+
*/
|
|
290
|
+
function buildMaskSlots(mask, bounds, tokens = MASK_TOKENS) {
|
|
291
|
+
const slots = [];
|
|
292
|
+
const segments = [];
|
|
293
|
+
let segment = null;
|
|
294
|
+
for (const m of mask) {
|
|
295
|
+
const rgx = tokens[m];
|
|
296
|
+
const slot = rgx ? { char: null, rgx } : { char: m };
|
|
297
|
+
slots.push(slot);
|
|
298
|
+
if (rgx && m === '9') {
|
|
299
|
+
if (!segment)
|
|
300
|
+
segments.push((segment = []));
|
|
301
|
+
segment.push(slot);
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
segment = null;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
segments.forEach((seg, i) => {
|
|
308
|
+
const range = bounds[i];
|
|
309
|
+
if (!range)
|
|
310
|
+
return;
|
|
311
|
+
seg.forEach((slot, pos) => (slot.bound = { ...range, pos, len: seg.length }));
|
|
312
|
+
});
|
|
313
|
+
return slots;
|
|
314
|
+
}
|
|
315
|
+
/** Keep only the data characters (alphanumeric) of a raw input string. */
|
|
316
|
+
function extractMaskData(raw) {
|
|
317
|
+
return raw.replace(/[^a-zA-Z0-9]/g, '');
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Can `ch` fill this slot? It must match the token class and — when the segment is bounded —
|
|
321
|
+
* the digits typed so far plus `ch` must still admit at least one in-range completion of the
|
|
322
|
+
* remaining positions (`2` then `4` is refused on `0-23`, `2` then `3` is accepted).
|
|
323
|
+
*/
|
|
324
|
+
function acceptsMaskChar(slot, segment, ch) {
|
|
325
|
+
if (!slot.rgx?.test(ch))
|
|
326
|
+
return false;
|
|
327
|
+
const bound = slot.bound;
|
|
328
|
+
if (!bound)
|
|
329
|
+
return true;
|
|
330
|
+
const scale = 10 ** (bound.len - bound.pos - 1);
|
|
331
|
+
const low = Number(segment + ch) * scale;
|
|
332
|
+
return low <= bound.max && low + scale - 1 >= bound.min;
|
|
333
|
+
}
|
|
334
|
+
/** Apply the mask template to a sequence of data characters (fills empty positions with `slotChar`). */
|
|
335
|
+
function applyMaskTemplate(slots, data, slotChar) {
|
|
336
|
+
let di = 0;
|
|
337
|
+
let display = '';
|
|
338
|
+
let masked = '';
|
|
339
|
+
let lastFilled = 0;
|
|
340
|
+
let used = '';
|
|
341
|
+
const tokenIndices = [];
|
|
342
|
+
// Characters already accepted in the current numeric segment (drives the bounds check).
|
|
343
|
+
let segment = '';
|
|
344
|
+
for (const slot of slots) {
|
|
345
|
+
if (slot.char !== null) {
|
|
346
|
+
display += slot.char;
|
|
347
|
+
masked += slot.char;
|
|
348
|
+
continue;
|
|
349
|
+
}
|
|
350
|
+
tokenIndices.push(display.length); // index of this token position in `display`
|
|
351
|
+
if (!slot.bound || slot.bound.pos === 0)
|
|
352
|
+
segment = '';
|
|
353
|
+
while (di < data.length && !acceptsMaskChar(slot, segment, data[di]))
|
|
354
|
+
di++;
|
|
355
|
+
if (di < data.length) {
|
|
356
|
+
display += data[di];
|
|
357
|
+
masked += data[di];
|
|
358
|
+
used += data[di];
|
|
359
|
+
if (slot.bound)
|
|
360
|
+
segment += data[di];
|
|
361
|
+
di++;
|
|
362
|
+
lastFilled = masked.length;
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
display += slotChar;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
// Masked value = up to the last typed character (no trailing literals/slots).
|
|
369
|
+
return { display, masked: masked.slice(0, lastFilled), data: used, tokenIndices };
|
|
370
|
+
}
|
|
371
|
+
/** Caret position for `n` typed data characters (literals skipped, end-of-text once all filled). */
|
|
372
|
+
function caretForMask(tokenIndices, n, length) {
|
|
373
|
+
if (n <= 0)
|
|
374
|
+
return tokenIndices[0] ?? 0;
|
|
375
|
+
if (n >= tokenIndices.length)
|
|
376
|
+
return length; // all filled → end
|
|
377
|
+
return tokenIndices[n]; // next input position (literals skipped)
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Auto-format-as-you-type variant of {@link applyMaskTemplate}: inserts a literal separator as
|
|
381
|
+
* soon as the segment right before it is complete, without ever padding unfilled positions with
|
|
382
|
+
* a filler character (unlike `applyMaskTemplate`, meant for a field that displays the full
|
|
383
|
+
* template at rest). Used by `ui-datepicker`'s typeable trigger to auto-insert "/" as digits are
|
|
384
|
+
* typed, the same way a card-expiry field auto-inserts its "/".
|
|
385
|
+
*/
|
|
386
|
+
function autoFormatSegments(slots, data) {
|
|
387
|
+
let di = 0;
|
|
388
|
+
let text = '';
|
|
389
|
+
let segment = '';
|
|
390
|
+
let atSegmentEnd = false;
|
|
391
|
+
const tokenIndices = [];
|
|
392
|
+
for (const slot of slots) {
|
|
393
|
+
if (slot.char !== null) {
|
|
394
|
+
if (atSegmentEnd)
|
|
395
|
+
text += slot.char;
|
|
396
|
+
atSegmentEnd = false;
|
|
397
|
+
continue;
|
|
398
|
+
}
|
|
399
|
+
tokenIndices.push(text.length);
|
|
400
|
+
if (!slot.bound || slot.bound.pos === 0)
|
|
401
|
+
segment = '';
|
|
402
|
+
while (di < data.length && !acceptsMaskChar(slot, segment, data[di]))
|
|
403
|
+
di++;
|
|
404
|
+
if (di >= data.length)
|
|
405
|
+
break; // no more data: stop, no filler
|
|
406
|
+
text += data[di];
|
|
407
|
+
if (slot.bound)
|
|
408
|
+
segment += data[di];
|
|
409
|
+
atSegmentEnd = !!slot.bound && slot.bound.pos === slot.bound.len - 1;
|
|
410
|
+
di++;
|
|
411
|
+
}
|
|
412
|
+
return { text, tokenIndices };
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Shared option-resolution helpers for list-based form fields
|
|
417
|
+
* (`ui-select`, `ui-autocomplete`, `ui-input-tags`).
|
|
418
|
+
*
|
|
419
|
+
* Options can be primitives or objects; `optionValue` / `optionLabel` /
|
|
420
|
+
* `optionDisabled` are (dot-path) fields read on object options, and `dataKey`
|
|
421
|
+
* drives object equality. The accessors are passed as thunks so the resolver
|
|
422
|
+
* stays reactive when bound to signal inputs.
|
|
423
|
+
*/
|
|
424
|
+
function createOptionResolver(fields) {
|
|
425
|
+
const isObject = (option) => typeof option === 'object' && option !== null;
|
|
426
|
+
const getField = (target, path) => {
|
|
427
|
+
if (!path || !isObject(target))
|
|
428
|
+
return undefined;
|
|
429
|
+
return path.split('.').reduce((acc, key) => (isObject(acc) ? acc[key] : undefined), target);
|
|
430
|
+
};
|
|
431
|
+
const asText = (value) => value === null || value === undefined ? null : String(value);
|
|
432
|
+
const resolveValue = (option) => {
|
|
433
|
+
const field = fields.optionValue();
|
|
434
|
+
if (field && isObject(option))
|
|
435
|
+
return getField(option, field);
|
|
436
|
+
return option;
|
|
437
|
+
};
|
|
438
|
+
const resolveLabel = (option) => {
|
|
439
|
+
const field = fields.optionLabel();
|
|
440
|
+
if (field && isObject(option))
|
|
441
|
+
return asText(getField(option, field));
|
|
442
|
+
if (isObject(option) && 'label' in option)
|
|
443
|
+
return asText(option['label']);
|
|
444
|
+
return asText(option);
|
|
445
|
+
};
|
|
446
|
+
const resolveDisabled = (option) => {
|
|
447
|
+
const field = fields.optionDisabled();
|
|
448
|
+
if (field && isObject(option))
|
|
449
|
+
return !!getField(option, field);
|
|
450
|
+
if (isObject(option) && 'disabled' in option)
|
|
451
|
+
return !!option['disabled'];
|
|
452
|
+
return false;
|
|
453
|
+
};
|
|
454
|
+
const equals = (a, b) => {
|
|
455
|
+
const key = fields.dataKey();
|
|
456
|
+
if (key && isObject(a) && isObject(b))
|
|
457
|
+
return a[key] === b[key];
|
|
458
|
+
return a === b;
|
|
459
|
+
};
|
|
460
|
+
const toEntry = (option) => ({
|
|
461
|
+
value: resolveValue(option),
|
|
462
|
+
label: resolveLabel(option) ?? '',
|
|
463
|
+
disabled: resolveDisabled(option),
|
|
464
|
+
original: option,
|
|
465
|
+
});
|
|
466
|
+
return { toEntry, getField, resolveValue, resolveLabel, resolveDisabled, asText, equals };
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Substitutes the `{0}` token of a (possibly user-overridden) label with a value.
|
|
471
|
+
* Plain split/join — never interprets `$` sequences in `value` (unlike `String.replace`).
|
|
472
|
+
*/
|
|
473
|
+
function formatLabel(template, value) {
|
|
474
|
+
return template.split('{0}').join(String(value));
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// Dev-only a11y guard shared by form controls that require an accessible name
|
|
478
|
+
// (`ariaLabel`/`ariaLabelledBy`/`label`). Centralizes the "how to warn" (console + dev-mode
|
|
479
|
+
// gating) so each component only supplies its own trigger condition and message text.
|
|
480
|
+
function warnMissingAccessibleName(componentTag, message) {
|
|
481
|
+
if (isDevMode()) {
|
|
482
|
+
console.warn(`[${componentTag}] ${message}`);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/*
|
|
487
|
+
* Public API Surface of ui-kit/forms
|
|
488
|
+
*
|
|
489
|
+
* Shared form infrastructure: the base classes every `ui-*` field inherits
|
|
490
|
+
* from, plus the helpers those fields rely on. Importing a field component
|
|
491
|
+
* (e.g. `@4sh/ui-kit/ui-input`) pulls this in automatically — you only import
|
|
492
|
+
* from here directly when building your OWN field on top of the kit's
|
|
493
|
+
* conventions.
|
|
494
|
+
*/
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Generated bundle index. Do not edit.
|
|
498
|
+
*/
|
|
499
|
+
|
|
500
|
+
export { BaseControlValueAccessor, BaseFieldControl, BaseFormField, MASK_TOKENS, acceptsMaskChar, applyMaskTemplate, autoFormatSegments, buildMaskSlots, caretForMask, createOptionResolver, dropdownOverlayPositions, extractMaskData, formatLabel, parseMaskRanges, warnMissingAccessibleName };
|
|
501
|
+
//# sourceMappingURL=4sh-ui-kit-forms.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-forms.mjs","sources":["../../../projects/ui-kit/forms/src/lib/base-control-value-accessor.ts","../../../projects/ui-kit/forms/src/lib/base-form-field.ts","../../../projects/ui-kit/forms/src/lib/overlay-positions.ts","../../../projects/ui-kit/forms/src/lib/mask-engine.ts","../../../projects/ui-kit/forms/src/lib/option-resolver.ts","../../../projects/ui-kit/forms/src/lib/format-label.ts","../../../projects/ui-kit/forms/src/lib/warn-missing-accessible-name.ts","../../../projects/ui-kit/forms/src/public-api.ts","../../../projects/ui-kit/forms/src/4sh-ui-kit-forms.ts"],"sourcesContent":["import { afterNextRender, computed, DestroyRef, effect, inject, Injector, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n ControlValueAccessor,\n NgControl,\n PristineChangeEvent,\n StatusChangeEvent,\n TouchedChangeEvent,\n ValidationErrors,\n} from '@angular/forms';\n\n/**\n * Base class for form components (`ui-checkbox`, `ui-radio`, `ui-input`…).\n *\n * Implements `ControlValueAccessor` and mirrors the attached `NgControl` state\n * into signals, so templates/styles can react to it declaratively:\n *\n * - `touched` / `dirty` / `pristine` / `untouched` — interaction state\n * - `controlInvalid` / `controlErrors` — validation state\n * - `controlDisabled` — driven by `control.disable()`\n * - `showError` — invalid AND (touched or dirty),\n * the usual \"when to paint red\" rule\n *\n * The subscription is wired automatically after first render and cleaned up on\n * destroy. Subclasses only have to:\n * 1. implement `writeValue()` (form → view),\n * 2. call `emitChange(value)` on user interaction (view → form),\n * 3. call `emitTouch()` on blur,\n * 4. declare the DI provider:\n * `{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MyComponent), multi: true }`.\n *\n * Works with reactive forms, template-driven forms, or standalone (no form at\n * all — the signals simply keep their defaults).\n */\nexport abstract class BaseControlValueAccessor<T> implements ControlValueAccessor {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n readonly dirty = signal(false);\n readonly pristine = signal(true);\n readonly touched = signal(false);\n readonly untouched = signal(true);\n /** Validation state of the attached control (false when no control). */\n readonly controlInvalid = signal(false);\n /** Validation errors of the attached control (null when valid / no control). */\n readonly controlErrors = signal<ValidationErrors | null>(null);\n /** Disabled state driven by the forms API (`control.disable()`), not by the `disabled` input. */\n readonly controlDisabled = signal(false);\n /** True when the error state should be surfaced to the user. */\n readonly showError = computed(() => this.controlInvalid() && (this.touched() || this.dirty()));\n\n protected onChange: (value: T) => void = () => {\n /* noop until registered */\n };\n protected onTouched: () => void = () => {\n /* noop until registered */\n };\n\n constructor() {\n // NgControl injects lazily (after the directive tree is built) to avoid\n // the classic NgControl ↔ value-accessor circular dependency.\n afterNextRender(() => this.watchNgControlEvents());\n }\n\n /** Write the form value into the component state (form → view). */\n abstract writeValue(value: T): void;\n\n registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.controlDisabled.set(isDisabled);\n }\n\n /** Propagate a user-driven value change to the form (view → form). */\n protected emitChange(value: T): void {\n this.onChange(value);\n }\n\n /** Mark the control as touched (call on blur). */\n protected emitTouch(): void {\n this.onTouched();\n this.touched.set(true);\n this.untouched.set(false);\n }\n\n /** Mirror the NgControl state into the signals. Wired automatically; safe to call once manually if needed. */\n protected watchNgControlEvents(): void {\n const control = this.injector.get(NgControl, null, { optional: true, self: true })?.control;\n if (!control) return;\n\n const mirror = () => {\n this.pristine.set(control.pristine);\n this.dirty.set(control.dirty);\n this.touched.set(control.touched);\n this.untouched.set(control.untouched);\n this.controlInvalid.set(control.invalid);\n this.controlErrors.set(control.errors);\n };\n\n // Signal-forms interop provides a fake NgControl without an `events`\n // stream, but its getters read the field's signals: mirroring inside\n // an effect tracks them and keeps the state live.\n if (!control.events) {\n effect(mirror, { injector: this.injector });\n return;\n }\n\n // Seed with the current state (events only fire on transitions).\n mirror();\n\n control.events.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {\n if (event instanceof PristineChangeEvent) {\n this.pristine.set(event.pristine);\n this.dirty.set(!event.pristine);\n } else if (event instanceof TouchedChangeEvent) {\n this.touched.set(event.touched);\n this.untouched.set(!event.touched);\n } else if (event instanceof StatusChangeEvent) {\n this.controlInvalid.set(event.status === 'INVALID');\n this.controlErrors.set(control.errors);\n }\n });\n }\n}\n","import { booleanAttribute, computed, Directive, input, signal } from '@angular/core';\nimport { BaseControlValueAccessor } from './base-control-value-accessor';\nimport { UiFeedbackLevel } from '@4sh/ui-kit/types';\n\nexport type FieldSize = 'default' | 'small';\n/** Visual validation status (subset of `UiFeedbackLevel`, shared with `ui-helper`). */\nexport type FieldLevel = Extract<UiFeedbackLevel, 'default' | 'success' | 'error'>;\n\nlet nextUid = 0;\n\n/**\n * Base class for every standalone form control (`ui-checkbox`, `ui-toggle`,\n * `ui-slider`, `ui-nudger`…): the CVA plumbing shared by all of them, without\n * any \"box\" chrome (no label/helper/error message rendering).\n *\n * Provides the common inputs (aria*, id/name, required/disabled/readonly/\n * invalid, tabindex), the auto-generated id machinery (`resolvedId`,\n * `messageId`), the `modelValue` signal with the default `writeValue`, and the\n * derived `isDisabled` / `isInvalid` states. Extends `BaseControlValueAccessor`:\n * subclasses call `emitChange` / `emitTouch` on user interaction.\n *\n * Decorated with `@Directive()` (no selector) so the signal inputs are inherited\n * correctly by the concrete components.\n */\n@Directive()\nexport abstract class BaseFieldControl<T> extends BaseControlValueAccessor<T> {\n /** Accessible name when no visible label is provided. */\n ariaLabel = input<string>();\n /** id of an external element that labels this control. */\n ariaLabelledBy = input<string>();\n /** id forwarded to the native input (auto-generated when omitted). */\n inputId = input<string>();\n /** name forwarded to the native input. */\n name = input<string>();\n /** Required marker (*) + native required attribute. */\n required = input(false, { transform: booleanAttribute });\n /** Disables the field (native attribute). */\n disabled = input(false, { transform: booleanAttribute });\n /** Read-only (native attribute). */\n readonly = input(false, { transform: booleanAttribute });\n /** Forces the error styling (automatic when the attached control is invalid and touched/dirty). */\n invalid = input(false, { transform: booleanAttribute });\n /** tabindex forwarded to the native input. */\n tabindex = input<number>();\n\n /** @ignore Auto-generated unique id (prefix branded via `uidPrefix`). */\n protected readonly uid = `${this.uidPrefix()}-${nextUid++}`;\n /** @ignore Current value (written by the form or by user input). */\n protected readonly modelValue = signal<T | undefined>(undefined);\n\n /** @ignore */\n protected readonly resolvedId = computed(() => this.inputId() ?? this.uid);\n /** @ignore id of the message (for aria-describedby). */\n protected readonly messageId = computed(() => `${this.resolvedId()}-message`);\n /** @ignore Input disabled OR control disabled (form API). */\n protected readonly isDisabled = computed(() => this.disabled() || this.controlDisabled());\n /** @ignore Explicit error OR invalid control worth surfacing. */\n protected readonly isInvalid = computed(() => this.invalid() || this.showError());\n\n writeValue(value: T): void {\n this.modelValue.set(value);\n }\n\n /** @ignore Prefix of the auto-generated id — override to brand it per component. */\n protected uidPrefix(): string {\n return 'ui-field';\n }\n}\n\n/**\n * Base class for \"box\" form fields (`ui-input`, `ui-input-number`,\n * `ui-input-mask`, `ui-textarea`…).\n *\n * Extends `BaseFieldControl` with the box-specific inputs (label, helper,\n * error, size, level) and the derived state (effective level, displayed\n * message/value). Subclasses only handle their own `<input>` (specific\n * parsing/formatting) and call `emitChange` / `emitTouch`.\n */\n@Directive()\nexport abstract class BaseFormField<T> extends BaseFieldControl<T> {\n /** Label (rendered via `ui-label`). */\n label = input<string>();\n /** Helper text under the field (rendered via `ui-helper`). */\n helperText = input<string>();\n /** Error message shown in place of the helper when the field is in error. */\n errorText = input<string>();\n /** Size. */\n size = input<FieldSize>('default');\n /** Explicit validation status (`error` is forced when the control is invalid + touched). */\n level = input<FieldLevel>('default');\n\n /** @ignore Effective level: error when invalid, otherwise the requested `level`. */\n protected readonly effectiveLevel = computed<FieldLevel>(() => (this.isInvalid() ? 'error' : this.level()));\n /** @ignore Displayed message: errorText when in error (if provided), otherwise helperText. */\n protected readonly displayMessage = computed(() =>\n this.isInvalid() && this.errorText() ? this.errorText() : this.helperText(),\n );\n /** @ignore Value shown in the input (string). Override for specific formatting. */\n protected readonly displayValue = computed(() => {\n const v = this.modelValue();\n return v === undefined || v === null ? '' : String(v);\n });\n}\n","import {ConnectedPosition} from '@angular/cdk/overlay';\n\n/**\n * Standard dropdown-panel anchoring shared by the overlay form fields\n * (`ui-select`, `ui-autocomplete`, `ui-input-tags`, `ui-datepicker`):\n * below the field, flipped above when `autoFlip`.\n */\nexport function dropdownOverlayPositions(autoFlip: boolean): ConnectedPosition[] {\n const below: ConnectedPosition = {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetY: 8\n };\n const above: ConnectedPosition = {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetY: -8\n };\n return autoFlip ? [below, above] : [below];\n}\n","/**\n * Pure masking engine shared by `ui-input-mask` and `ui-datepicker` (auto-formatting the typed\n * date). Same precedent as `overlay-positions.ts` in this folder: framework-free functions, no\n * class/Directive/Component, reusable by any form component that needs literal-inserting input\n * masking. Extracted from `ui-input-mask.ts` — behavior is a byte-for-byte copy, only `this.mask()`\n * /`this.ranges()`/`this.slotChar()` become explicit parameters.\n */\n\n/** Mask tokens → accepted character class. */\nexport const MASK_TOKENS: Record<string, RegExp> = {\n '9': /[0-9]/, // digit\n a: /[a-zA-Z]/, // letter\n '*': /[a-zA-Z0-9]/, // alphanumeric\n};\n\nexport interface MaskBounds {\n min: number;\n max: number;\n}\n\nexport interface MaskSlot {\n char: string | null;\n rgx?: RegExp;\n bound?: MaskBounds & { pos: number; len: number };\n}\n\nexport interface MaskBuildResult {\n display: string;\n masked: string;\n data: string;\n tokenIndices: number[];\n}\n\n/** Parse the `ranges` input (`\"1-31 1-12 1900-2100\"`) into one bound per numeric segment. */\nexport function parseMaskRanges(ranges: string): (MaskBounds | null)[] {\n return ranges\n .trim()\n .split(/\\s+/)\n .map((part) => {\n const m = /^(\\d+)-(\\d+)$/.exec(part);\n return m ? { min: Number(m[1]), max: Number(m[2]) } : null;\n });\n}\n\n/**\n * Resolve the mask template into slots: literals, input slots, and the `ranges` bounds attached\n * to every slot of the numeric segment (consecutive `9` tokens) it belongs to.\n */\nexport function buildMaskSlots(\n mask: string,\n bounds: (MaskBounds | null)[],\n tokens: Record<string, RegExp> = MASK_TOKENS,\n): MaskSlot[] {\n const slots: MaskSlot[] = [];\n const segments: MaskSlot[][] = [];\n let segment: MaskSlot[] | null = null;\n\n for (const m of mask) {\n const rgx = tokens[m];\n const slot: MaskSlot = rgx ? { char: null, rgx } : { char: m };\n slots.push(slot);\n if (rgx && m === '9') {\n if (!segment) segments.push((segment = []));\n segment.push(slot);\n } else {\n segment = null;\n }\n }\n\n segments.forEach((seg, i) => {\n const range = bounds[i];\n if (!range) return;\n seg.forEach((slot, pos) => (slot.bound = { ...range, pos, len: seg.length }));\n });\n\n return slots;\n}\n\n/** Keep only the data characters (alphanumeric) of a raw input string. */\nexport function extractMaskData(raw: string): string {\n return raw.replace(/[^a-zA-Z0-9]/g, '');\n}\n\n/**\n * Can `ch` fill this slot? It must match the token class and — when the segment is bounded —\n * the digits typed so far plus `ch` must still admit at least one in-range completion of the\n * remaining positions (`2` then `4` is refused on `0-23`, `2` then `3` is accepted).\n */\nexport function acceptsMaskChar(slot: MaskSlot, segment: string, ch: string): boolean {\n if (!slot.rgx?.test(ch)) return false;\n const bound = slot.bound;\n if (!bound) return true;\n const scale = 10 ** (bound.len - bound.pos - 1);\n const low = Number(segment + ch) * scale;\n return low <= bound.max && low + scale - 1 >= bound.min;\n}\n\n/** Apply the mask template to a sequence of data characters (fills empty positions with `slotChar`). */\nexport function applyMaskTemplate(slots: MaskSlot[], data: string, slotChar: string): MaskBuildResult {\n let di = 0;\n let display = '';\n let masked = '';\n let lastFilled = 0;\n let used = '';\n const tokenIndices: number[] = [];\n // Characters already accepted in the current numeric segment (drives the bounds check).\n let segment = '';\n\n for (const slot of slots) {\n if (slot.char !== null) {\n display += slot.char;\n masked += slot.char;\n continue;\n }\n tokenIndices.push(display.length); // index of this token position in `display`\n if (!slot.bound || slot.bound.pos === 0) segment = '';\n while (di < data.length && !acceptsMaskChar(slot, segment, data[di])) di++;\n if (di < data.length) {\n display += data[di];\n masked += data[di];\n used += data[di];\n if (slot.bound) segment += data[di];\n di++;\n lastFilled = masked.length;\n } else {\n display += slotChar;\n }\n }\n // Masked value = up to the last typed character (no trailing literals/slots).\n return { display, masked: masked.slice(0, lastFilled), data: used, tokenIndices };\n}\n\n/** Caret position for `n` typed data characters (literals skipped, end-of-text once all filled). */\nexport function caretForMask(tokenIndices: number[], n: number, length: number): number {\n if (n <= 0) return tokenIndices[0] ?? 0;\n if (n >= tokenIndices.length) return length; // all filled → end\n return tokenIndices[n]; // next input position (literals skipped)\n}\n\n/**\n * Auto-format-as-you-type variant of {@link applyMaskTemplate}: inserts a literal separator as\n * soon as the segment right before it is complete, without ever padding unfilled positions with\n * a filler character (unlike `applyMaskTemplate`, meant for a field that displays the full\n * template at rest). Used by `ui-datepicker`'s typeable trigger to auto-insert \"/\" as digits are\n * typed, the same way a card-expiry field auto-inserts its \"/\".\n */\nexport function autoFormatSegments(slots: MaskSlot[], data: string): { text: string; tokenIndices: number[] } {\n let di = 0;\n let text = '';\n let segment = '';\n let atSegmentEnd = false;\n const tokenIndices: number[] = [];\n\n for (const slot of slots) {\n if (slot.char !== null) {\n if (atSegmentEnd) text += slot.char;\n atSegmentEnd = false;\n continue;\n }\n tokenIndices.push(text.length);\n if (!slot.bound || slot.bound.pos === 0) segment = '';\n while (di < data.length && !acceptsMaskChar(slot, segment, data[di])) di++;\n if (di >= data.length) break; // no more data: stop, no filler\n text += data[di];\n if (slot.bound) segment += data[di];\n atSegmentEnd = !!slot.bound && slot.bound.pos === slot.bound.len - 1;\n di++;\n }\n return { text, tokenIndices };\n}\n","/**\n * Shared option-resolution helpers for list-based form fields\n * (`ui-select`, `ui-autocomplete`, `ui-input-tags`).\n *\n * Options can be primitives or objects; `optionValue` / `optionLabel` /\n * `optionDisabled` are (dot-path) fields read on object options, and `dataKey`\n * drives object equality. The accessors are passed as thunks so the resolver\n * stays reactive when bound to signal inputs.\n */\n\n/** Normalized option: resolved value/label/disabled + the original option. */\nexport interface OptionEntry {\n value: unknown;\n label: string;\n disabled: boolean;\n original: unknown;\n}\n\n/** Field accessors (typically the component's signal inputs). */\nexport interface OptionResolverFields {\n optionValue: () => string | undefined;\n optionLabel: () => string | undefined;\n optionDisabled: () => string | undefined;\n dataKey: () => string | undefined;\n}\n\nexport interface OptionResolver {\n /** Normalizes an option into an {@link OptionEntry}. */\n toEntry(option: unknown): OptionEntry;\n\n /** Reads a (dot-path) field from an object (`undefined` otherwise). */\n getField(target: unknown, path: string | undefined): unknown;\n\n /** Model value of an option (`optionValue` field, or the option itself). */\n resolveValue(option: unknown): unknown;\n\n /** Display label of an option (`optionLabel` field, `label` key, or text). */\n resolveLabel(option: unknown): string | null;\n\n /** Disabled flag of an option (`optionDisabled` field, or `disabled` key). */\n resolveDisabled(option: unknown): boolean;\n\n /** `String(value)`, or `null` for null/undefined. */\n asText(value: unknown): string | null;\n\n /** Value equality — by `dataKey` for objects, strict otherwise. */\n equals(a: unknown, b: unknown): boolean;\n}\n\nexport function createOptionResolver(fields: OptionResolverFields): OptionResolver {\n const isObject = (option: unknown): option is Record<string, unknown> =>\n typeof option === 'object' && option !== null;\n\n const getField = (target: unknown, path: string | undefined): unknown => {\n if (!path || !isObject(target)) return undefined;\n return path.split('.').reduce<unknown>((acc, key) => (isObject(acc) ? acc[key] : undefined), target);\n };\n\n const asText = (value: unknown): string | null =>\n value === null || value === undefined ? null : String(value);\n\n const resolveValue = (option: unknown): unknown => {\n const field = fields.optionValue();\n if (field && isObject(option)) return getField(option, field);\n return option;\n };\n\n const resolveLabel = (option: unknown): string | null => {\n const field = fields.optionLabel();\n if (field && isObject(option)) return asText(getField(option, field));\n if (isObject(option) && 'label' in option) return asText(option['label']);\n return asText(option);\n };\n\n const resolveDisabled = (option: unknown): boolean => {\n const field = fields.optionDisabled();\n if (field && isObject(option)) return !!getField(option, field);\n if (isObject(option) && 'disabled' in option) return !!option['disabled'];\n return false;\n };\n\n const equals = (a: unknown, b: unknown): boolean => {\n const key = fields.dataKey();\n if (key && isObject(a) && isObject(b)) return a[key] === b[key];\n return a === b;\n };\n\n const toEntry = (option: unknown): OptionEntry => ({\n value: resolveValue(option),\n label: resolveLabel(option) ?? '',\n disabled: resolveDisabled(option),\n original: option,\n });\n\n return {toEntry, getField, resolveValue, resolveLabel, resolveDisabled, asText, equals};\n}\n","/**\n * Substitutes the `{0}` token of a (possibly user-overridden) label with a value.\n * Plain split/join — never interprets `$` sequences in `value` (unlike `String.replace`).\n */\nexport function formatLabel(template: string, value: string | number): string {\n return template.split('{0}').join(String(value));\n}\n","import { isDevMode } from '@angular/core';\n\n// Dev-only a11y guard shared by form controls that require an accessible name\n// (`ariaLabel`/`ariaLabelledBy`/`label`). Centralizes the \"how to warn\" (console + dev-mode\n// gating) so each component only supplies its own trigger condition and message text.\nexport function warnMissingAccessibleName(componentTag: string, message: string): void {\n if (isDevMode()) {\n console.warn(`[${componentTag}] ${message}`);\n }\n}\n","/*\n * Public API Surface of ui-kit/forms\n *\n * Shared form infrastructure: the base classes every `ui-*` field inherits\n * from, plus the helpers those fields rely on. Importing a field component\n * (e.g. `@4sh/ui-kit/ui-input`) pulls this in automatically — you only import\n * from here directly when building your OWN field on top of the kit's\n * conventions.\n */\n\nexport * from './lib/base-control-value-accessor';\nexport * from './lib/base-form-field';\nexport * from './lib/overlay-positions';\nexport * from './lib/mask-engine';\nexport * from './lib/option-resolver';\nexport * from './lib/format-label';\nexport * from './lib/warn-missing-accessible-name';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAWA;;;;;;;;;;;;;;;;;;;;;;AAsBG;MACmB,wBAAwB,CAAA;AAwB1C,IAAA,WAAA,GAAA;AAvBiB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAEvC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,IAAI;qFAAC;QACvB,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,KAAK;oFAAC;QACvB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,IAAI;sFAAC;;QAExB,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,KAAK;2FAAC;;QAE9B,IAAA,CAAA,aAAa,GAAG,MAAM,CAA0B,IAAI;0FAAC;;QAErD,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,KAAK;4FAAC;;QAE/B,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,KAAK,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;sFAAC;QAEpF,IAAA,CAAA,QAAQ,GAAuB,MAAK;;AAE9C,QAAA,CAAC;QACS,IAAA,CAAA,SAAS,GAAe,MAAK;;AAEvC,QAAA,CAAC;;;QAKG,eAAe,CAAC,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;IACtD;AAKA,IAAA,gBAAgB,CAAC,EAAsB,EAAA;AACnC,QAAA,IAAI,CAAC,QAAQ,GAAG,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