@4sh/ui-kit 0.16.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.fr.md +10 -10
- package/README.md +10 -10
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
- package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-types.mjs +0 -12
- package/fesm2022/4sh-ui-kit.mjs +3 -15
- package/fesm2022/4sh-ui-kit.mjs.map +1 -1
- package/mcp/data/component-api.json +299 -2
- package/mcp/data/text-search-docs.json +149 -9
- package/mcp/data/ui-config.json +378 -1
- package/mcp/index.js +8190 -2876
- package/mcp/package.json +1 -1
- package/package.json +5 -1
- package/styles/component-vars.scss +22 -1
- package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
- package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
- package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
- package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
- package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
- package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
- package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
- package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
- package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
- package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
- package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
- package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
- package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
- package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
- package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
- package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
- package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
- package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
- package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
- package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
- package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
- package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
- package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
- package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
- package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
- package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
- package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
- package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
- package/types/4sh-ui-kit-forms.d.ts +275 -194
- package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
- package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
- package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
- package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
- package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
- package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
- package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
- package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
- package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
- package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
- package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
- package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
- package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
- package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
- package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
- package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
- package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
- package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
- package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
- package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
- package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
- package/types/4sh-ui-kit-motion.d.ts +117 -67
- package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
- package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
- package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
- package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
- package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
- package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
- package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
- package/types/4sh-ui-kit-overlay.d.ts +6 -6
- package/types/4sh-ui-kit-ripple.d.ts +99 -74
- package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
- package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
- package/types/4sh-ui-kit-theming.d.ts +27 -29
- package/types/4sh-ui-kit-types.d.ts +6 -5
- package/types/4sh-ui-kit.d.ts +4 -3
- package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
import { ControlValueAccessor, ValidationErrors } from "@angular/forms";
|
|
5
|
+
import { UiFeedbackLevel } from "@4sh/ui-kit/types";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import { ConnectedPosition } from "@angular/cdk/overlay";
|
|
6
8
|
/**
|
|
7
9
|
* Base class for form components (`ui-checkbox`, `ui-radio`, `ui-input`…).
|
|
8
10
|
*
|
|
@@ -26,47 +28,46 @@ import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
|
26
28
|
* Works with reactive forms, template-driven forms, or standalone (no form at
|
|
27
29
|
* all — the signals simply keep their defaults).
|
|
28
30
|
*/
|
|
29
|
-
declare abstract class BaseControlValueAccessor<T> implements ControlValueAccessor {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
31
|
+
export declare abstract class BaseControlValueAccessor<T> implements ControlValueAccessor {
|
|
32
|
+
private readonly injector;
|
|
33
|
+
private readonly destroyRef;
|
|
34
|
+
readonly dirty: import("@angular/core").WritableSignal<boolean>;
|
|
35
|
+
readonly pristine: import("@angular/core").WritableSignal<boolean>;
|
|
36
|
+
readonly touched: import("@angular/core").WritableSignal<boolean>;
|
|
37
|
+
readonly untouched: import("@angular/core").WritableSignal<boolean>;
|
|
38
|
+
/** Validation state of the attached control (false when no control). */
|
|
39
|
+
readonly controlInvalid: import("@angular/core").WritableSignal<boolean>;
|
|
40
|
+
/** Validation errors of the attached control (null when valid / no control). */
|
|
41
|
+
readonly controlErrors: import("@angular/core").WritableSignal<ValidationErrors | null>;
|
|
42
|
+
/** Disabled state driven by the forms API (`control.disable()`), not by the `disabled` input. */
|
|
43
|
+
readonly controlDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
44
|
+
/** True when the error state should be surfaced to the user. */
|
|
45
|
+
readonly showError: import("@angular/core").Signal<boolean>;
|
|
46
|
+
protected onChange: (value: T) => void;
|
|
47
|
+
protected onTouched: () => void;
|
|
48
|
+
constructor();
|
|
49
|
+
/** Write the form value into the component state (form → view). */
|
|
50
|
+
abstract writeValue(value: T): void;
|
|
51
|
+
registerOnChange(fn: (value: T) => void): void;
|
|
52
|
+
registerOnTouched(fn: () => void): void;
|
|
53
|
+
setDisabledState(isDisabled: boolean): void;
|
|
54
|
+
/** Propagate a user-driven value change to the form (view → form). */
|
|
55
|
+
protected emitChange(value: T): void;
|
|
56
|
+
/** Mark the control as touched (call on blur). */
|
|
57
|
+
protected emitTouch(): void;
|
|
58
|
+
/** Mirror the NgControl state into the signals. Wired automatically; safe to call once manually if needed. */
|
|
59
|
+
protected watchNgControlEvents(): void;
|
|
58
60
|
}
|
|
59
|
-
|
|
60
|
-
type FieldSize = 'default' | 'small';
|
|
61
|
+
export type FieldSize = 'default' | 'small';
|
|
61
62
|
/** Visual validation status (subset of `UiFeedbackLevel`, shared with `ui-helper`). */
|
|
62
|
-
type FieldLevel = Extract<UiFeedbackLevel, 'default' | 'success' | 'error'>;
|
|
63
|
+
export type FieldLevel = Extract<UiFeedbackLevel, 'default' | 'success' | 'error'>;
|
|
63
64
|
/**
|
|
64
65
|
* Placement of the floating label ("float label" mode):
|
|
65
66
|
* - `over`: rises above the box, where a classic label sits,
|
|
66
67
|
* - `in`: rises to a band reserved at the top **inside** the box,
|
|
67
68
|
* - `on`: rises **onto** the top border, notching it.
|
|
68
69
|
*/
|
|
69
|
-
type FieldFloatLabel = 'over' | 'in' | 'on';
|
|
70
|
+
export type FieldFloatLabel = 'over' | 'in' | 'on';
|
|
70
71
|
/**
|
|
71
72
|
* Base class for every standalone form control (`ui-checkbox`, `ui-toggle`,
|
|
72
73
|
* `ui-slider`, `ui-nudger`…): the CVA plumbing shared by all of them, without
|
|
@@ -81,42 +82,88 @@ type FieldFloatLabel = 'over' | 'in' | 'on';
|
|
|
81
82
|
* Decorated with `@Directive()` (no selector) so the signal inputs are inherited
|
|
82
83
|
* correctly by the concrete components.
|
|
83
84
|
*/
|
|
84
|
-
declare abstract class BaseFieldControl<T> extends BaseControlValueAccessor<T> {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
85
|
+
export declare abstract class BaseFieldControl<T> extends BaseControlValueAccessor<T> {
|
|
86
|
+
/** Accessible name when no visible label is provided. */
|
|
87
|
+
ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
88
|
+
/** id of an external element that labels this control. */
|
|
89
|
+
ariaLabelledBy: import("@angular/core").InputSignal<string | undefined>;
|
|
90
|
+
/** id forwarded to the native input (auto-generated when omitted). */
|
|
91
|
+
inputId: import("@angular/core").InputSignal<string | undefined>;
|
|
92
|
+
/** name forwarded to the native input. */
|
|
93
|
+
name: import("@angular/core").InputSignal<string | undefined>;
|
|
94
|
+
/** Required marker (*) + native required attribute. */
|
|
95
|
+
required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
96
|
+
/** Disables the field (native attribute). */
|
|
97
|
+
disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
98
|
+
/** Read-only (native attribute). */
|
|
99
|
+
readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
100
|
+
/** Forces the error styling (automatic when the attached control is invalid and touched/dirty). */
|
|
101
|
+
invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
102
|
+
/** tabindex forwarded to the native input. */
|
|
103
|
+
tabindex: import("@angular/core").InputSignal<number | undefined>;
|
|
104
|
+
/** @ignore Auto-generated unique id (prefix branded via `uidPrefix`). */
|
|
105
|
+
protected readonly uid: string;
|
|
106
|
+
/** @ignore Current value (written by the form or by user input). */
|
|
107
|
+
protected readonly modelValue: import("@angular/core").WritableSignal<T | undefined>;
|
|
108
|
+
/** @ignore */
|
|
109
|
+
protected readonly resolvedId: import("@angular/core").Signal<string>;
|
|
110
|
+
/** @ignore id of the message (for aria-describedby). */
|
|
111
|
+
protected readonly messageId: import("@angular/core").Signal<string>;
|
|
112
|
+
/** @ignore Input disabled OR control disabled (form API). */
|
|
113
|
+
protected readonly isDisabled: import("@angular/core").Signal<boolean>;
|
|
114
|
+
/** @ignore Explicit error OR invalid control worth surfacing. */
|
|
115
|
+
protected readonly isInvalid: import("@angular/core").Signal<boolean>;
|
|
116
|
+
writeValue(value: T): void;
|
|
117
|
+
/** @ignore Prefix of the auto-generated id — override to brand it per component. */
|
|
118
|
+
protected uidPrefix(): string;
|
|
119
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFieldControl<any>, never>;
|
|
120
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFieldControl<any>, never, never, {
|
|
121
|
+
"ariaLabel": {
|
|
122
|
+
"alias": "ariaLabel";
|
|
123
|
+
"required": false;
|
|
124
|
+
"isSignal": true;
|
|
125
|
+
};
|
|
126
|
+
"ariaLabelledBy": {
|
|
127
|
+
"alias": "ariaLabelledBy";
|
|
128
|
+
"required": false;
|
|
129
|
+
"isSignal": true;
|
|
130
|
+
};
|
|
131
|
+
"inputId": {
|
|
132
|
+
"alias": "inputId";
|
|
133
|
+
"required": false;
|
|
134
|
+
"isSignal": true;
|
|
135
|
+
};
|
|
136
|
+
"name": {
|
|
137
|
+
"alias": "name";
|
|
138
|
+
"required": false;
|
|
139
|
+
"isSignal": true;
|
|
140
|
+
};
|
|
141
|
+
"required": {
|
|
142
|
+
"alias": "required";
|
|
143
|
+
"required": false;
|
|
144
|
+
"isSignal": true;
|
|
145
|
+
};
|
|
146
|
+
"disabled": {
|
|
147
|
+
"alias": "disabled";
|
|
148
|
+
"required": false;
|
|
149
|
+
"isSignal": true;
|
|
150
|
+
};
|
|
151
|
+
"readonly": {
|
|
152
|
+
"alias": "readonly";
|
|
153
|
+
"required": false;
|
|
154
|
+
"isSignal": true;
|
|
155
|
+
};
|
|
156
|
+
"invalid": {
|
|
157
|
+
"alias": "invalid";
|
|
158
|
+
"required": false;
|
|
159
|
+
"isSignal": true;
|
|
160
|
+
};
|
|
161
|
+
"tabindex": {
|
|
162
|
+
"alias": "tabindex";
|
|
163
|
+
"required": false;
|
|
164
|
+
"isSignal": true;
|
|
165
|
+
};
|
|
166
|
+
}, {}, never, never, true, never>;
|
|
120
167
|
}
|
|
121
168
|
/**
|
|
122
169
|
* Base class for "box" form fields (`ui-input`, `ui-input-number`,
|
|
@@ -127,48 +174,87 @@ declare abstract class BaseFieldControl<T> extends BaseControlValueAccessor<T> {
|
|
|
127
174
|
* message/value). Subclasses only handle their own `<input>` (specific
|
|
128
175
|
* parsing/formatting) and call `emitChange` / `emitTouch`.
|
|
129
176
|
*/
|
|
130
|
-
declare abstract class BaseFormField<T> extends BaseFieldControl<T> {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
177
|
+
export declare abstract class BaseFormField<T> extends BaseFieldControl<T> {
|
|
178
|
+
/** Label (rendered via `ui-label`). */
|
|
179
|
+
label: import("@angular/core").InputSignal<string | undefined>;
|
|
180
|
+
/** Helper text under the field (rendered via `ui-helper`). */
|
|
181
|
+
helperText: import("@angular/core").InputSignal<string | undefined>;
|
|
182
|
+
/** Error message shown in place of the helper when the field is in error. */
|
|
183
|
+
errorText: import("@angular/core").InputSignal<string | undefined>;
|
|
184
|
+
/** Prefixes the message under the field (helper or error) with a decorative icon. */
|
|
185
|
+
showMessageIcon: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
186
|
+
/** Overrides the glyph shown by `showMessageIcon`. */
|
|
187
|
+
messageIcon: import("@angular/core").InputSignal<string | undefined>;
|
|
188
|
+
/** Size. */
|
|
189
|
+
size: import("@angular/core").InputSignal<FieldSize>;
|
|
190
|
+
/** Explicit validation status (`error` is forced when the control is invalid + touched). */
|
|
191
|
+
level: import("@angular/core").InputSignal<FieldLevel>;
|
|
192
|
+
/**
|
|
193
|
+
* Floating label placement. Unset = classic label above the box.
|
|
194
|
+
*
|
|
195
|
+
* The label then plays the placeholder role while at rest, so the native
|
|
196
|
+
* `placeholder` is neutralised (see `hasFloatLabel`).
|
|
197
|
+
*/
|
|
198
|
+
floatLabel: import("@angular/core").InputSignal<FieldFloatLabel | undefined>;
|
|
199
|
+
/** @ignore There is a label to float: a `floatLabel` alone has nothing to move. */
|
|
200
|
+
protected readonly hasFloatLabel: import("@angular/core").Signal<boolean>;
|
|
201
|
+
/** @ignore Effective level: error when invalid, otherwise the requested `level`. */
|
|
202
|
+
protected readonly effectiveLevel: import("@angular/core").Signal<FieldLevel>;
|
|
203
|
+
/** @ignore Displayed message: errorText when in error (if provided), otherwise helperText. */
|
|
204
|
+
protected readonly displayMessage: import("@angular/core").Signal<string | undefined>;
|
|
205
|
+
/** @ignore Value shown in the input (string). Override for specific formatting. */
|
|
206
|
+
protected readonly displayValue: import("@angular/core").Signal<string>;
|
|
207
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseFormField<any>, never>;
|
|
208
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFormField<any>, never, never, {
|
|
209
|
+
"label": {
|
|
210
|
+
"alias": "label";
|
|
211
|
+
"required": false;
|
|
212
|
+
"isSignal": true;
|
|
213
|
+
};
|
|
214
|
+
"helperText": {
|
|
215
|
+
"alias": "helperText";
|
|
216
|
+
"required": false;
|
|
217
|
+
"isSignal": true;
|
|
218
|
+
};
|
|
219
|
+
"errorText": {
|
|
220
|
+
"alias": "errorText";
|
|
221
|
+
"required": false;
|
|
222
|
+
"isSignal": true;
|
|
223
|
+
};
|
|
224
|
+
"showMessageIcon": {
|
|
225
|
+
"alias": "showMessageIcon";
|
|
226
|
+
"required": false;
|
|
227
|
+
"isSignal": true;
|
|
228
|
+
};
|
|
229
|
+
"messageIcon": {
|
|
230
|
+
"alias": "messageIcon";
|
|
231
|
+
"required": false;
|
|
232
|
+
"isSignal": true;
|
|
233
|
+
};
|
|
234
|
+
"size": {
|
|
235
|
+
"alias": "size";
|
|
236
|
+
"required": false;
|
|
237
|
+
"isSignal": true;
|
|
238
|
+
};
|
|
239
|
+
"level": {
|
|
240
|
+
"alias": "level";
|
|
241
|
+
"required": false;
|
|
242
|
+
"isSignal": true;
|
|
243
|
+
};
|
|
244
|
+
"floatLabel": {
|
|
245
|
+
"alias": "floatLabel";
|
|
246
|
+
"required": false;
|
|
247
|
+
"isSignal": true;
|
|
248
|
+
};
|
|
249
|
+
}, {}, never, never, true, never>;
|
|
162
250
|
}
|
|
163
|
-
|
|
164
251
|
/**
|
|
165
252
|
* Standard dropdown-panel anchoring shared by the overlay form fields
|
|
166
253
|
* (`ui-select`, `ui-autocomplete`, `ui-input-tags`, `ui-datepicker`):
|
|
167
254
|
* below the field, flipped above when `autoFlip`, flipped horizontally
|
|
168
255
|
* (right-aligned) whenever there isn't enough room on the right.
|
|
169
256
|
*/
|
|
170
|
-
declare function dropdownOverlayPositions(autoFlip: boolean): ConnectedPosition[];
|
|
171
|
-
|
|
257
|
+
export declare function dropdownOverlayPositions(autoFlip: boolean): ConnectedPosition[];
|
|
172
258
|
/**
|
|
173
259
|
* Pure masking engine shared by `ui-input-mask` and `ui-datepicker` (auto-formatting the typed
|
|
174
260
|
* date). Same precedent as `overlay-positions.ts` in this folder: framework-free functions, no
|
|
@@ -177,34 +263,34 @@ declare function dropdownOverlayPositions(autoFlip: boolean): ConnectedPosition[
|
|
|
177
263
|
* /`this.ranges()`/`this.slotChar()` become explicit parameters.
|
|
178
264
|
*/
|
|
179
265
|
/** Mask tokens → accepted character class. */
|
|
180
|
-
declare const MASK_TOKENS: Record<string, RegExp>;
|
|
181
|
-
interface MaskBounds {
|
|
182
|
-
|
|
183
|
-
|
|
266
|
+
export declare const MASK_TOKENS: Record<string, RegExp>;
|
|
267
|
+
export interface MaskBounds {
|
|
268
|
+
min: number;
|
|
269
|
+
max: number;
|
|
184
270
|
}
|
|
185
|
-
interface MaskSlot {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
271
|
+
export interface MaskSlot {
|
|
272
|
+
char: string | null;
|
|
273
|
+
rgx?: RegExp;
|
|
274
|
+
bound?: MaskBounds & {
|
|
275
|
+
pos: number;
|
|
276
|
+
len: number;
|
|
277
|
+
};
|
|
192
278
|
}
|
|
193
|
-
interface MaskBuildResult {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
279
|
+
export interface MaskBuildResult {
|
|
280
|
+
display: string;
|
|
281
|
+
masked: string;
|
|
282
|
+
data: string;
|
|
283
|
+
tokenIndices: number[];
|
|
198
284
|
}
|
|
199
285
|
/** Parse the `ranges` input (`"1-31 1-12 1900-2100"`) into one bound per numeric segment. */
|
|
200
|
-
declare function parseMaskRanges(ranges: string): (MaskBounds | null)[];
|
|
286
|
+
export declare function parseMaskRanges(ranges: string): (MaskBounds | null)[];
|
|
201
287
|
/**
|
|
202
288
|
* Resolve the mask template into slots: literals, input slots, and the `ranges` bounds attached
|
|
203
289
|
* to every slot of the numeric segment (consecutive `9` tokens) it belongs to.
|
|
204
290
|
*/
|
|
205
|
-
declare function buildMaskSlots(mask: string, bounds: (MaskBounds | null)[], tokens?: Record<string, RegExp>): MaskSlot[];
|
|
291
|
+
export declare function buildMaskSlots(mask: string, bounds: (MaskBounds | null)[], tokens?: Record<string, RegExp>): MaskSlot[];
|
|
206
292
|
/** Keep only the data characters (alphanumeric) of a raw input string. */
|
|
207
|
-
declare function extractMaskData(raw: string): string;
|
|
293
|
+
export declare function extractMaskData(raw: string): string;
|
|
208
294
|
/**
|
|
209
295
|
* Can `ch` fill this slot? It must match the token class and — when the segment is bounded
|
|
210
296
|
* AND `enforceBounds` — the digits typed so far plus `ch` must still admit at least one in-range
|
|
@@ -218,11 +304,11 @@ declare function extractMaskData(raw: string): string;
|
|
|
218
304
|
* over after a deletion, that same skip can discard a still-valid residual digit and misalign
|
|
219
305
|
* every segment after it. See `autoFormatSegments`.
|
|
220
306
|
*/
|
|
221
|
-
declare function acceptsMaskChar(slot: MaskSlot, segment: string, ch: string, enforceBounds?: boolean): boolean;
|
|
307
|
+
export declare function acceptsMaskChar(slot: MaskSlot, segment: string, ch: string, enforceBounds?: boolean): boolean;
|
|
222
308
|
/** Apply the mask template to a sequence of data characters (fills empty positions with `slotChar`). */
|
|
223
|
-
declare function applyMaskTemplate(slots: MaskSlot[], data: string, slotChar: string): MaskBuildResult;
|
|
309
|
+
export declare function applyMaskTemplate(slots: MaskSlot[], data: string, slotChar: string): MaskBuildResult;
|
|
224
310
|
/** Caret position for `n` typed data characters (literals skipped, end-of-text once all filled). */
|
|
225
|
-
declare function caretForMask(tokenIndices: number[], n: number, length: number): number;
|
|
311
|
+
export declare function caretForMask(tokenIndices: number[], n: number, length: number): number;
|
|
226
312
|
/**
|
|
227
313
|
* Auto-format-as-you-type variant of {@link applyMaskTemplate}: inserts a literal separator as
|
|
228
314
|
* soon as the segment right before it is complete, without ever padding unfilled positions with
|
|
@@ -230,14 +316,13 @@ declare function caretForMask(tokenIndices: number[], n: number, length: number)
|
|
|
230
316
|
* template at rest). Used by `ui-datepicker`'s typeable trigger to auto-insert "/" as digits are
|
|
231
317
|
* typed, the same way a card-expiry field auto-inserts its "/".
|
|
232
318
|
*/
|
|
233
|
-
declare function autoFormatSegments(slots: MaskSlot[], data: string, { enforceBounds }?: {
|
|
234
|
-
|
|
319
|
+
export declare function autoFormatSegments(slots: MaskSlot[], data: string, { enforceBounds }?: {
|
|
320
|
+
enforceBounds?: boolean;
|
|
235
321
|
}): {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
322
|
+
text: string;
|
|
323
|
+
tokenIndices: number[];
|
|
324
|
+
dataEnd: number;
|
|
239
325
|
};
|
|
240
|
-
|
|
241
326
|
/**
|
|
242
327
|
* Pure date helpers (no framework dependency), shared by every field that has to cross
|
|
243
328
|
* the `Date` ↔ ISO-string boundary — `ui-datepicker`, which parses what the user types,
|
|
@@ -249,24 +334,24 @@ declare function autoFormatSegments(slots: MaskSlot[], data: string, { enforceBo
|
|
|
249
334
|
* helpers a field is built on. Serializing a `Date` from its LOCAL components rather than
|
|
250
335
|
* through `toISOString()` is the subtle part, and it must not be re-derived twice.
|
|
251
336
|
*/
|
|
252
|
-
declare function startOfDay(d: Date): Date;
|
|
253
|
-
declare function firstOfMonth(d: Date): Date;
|
|
254
|
-
declare function isSameDay(a: Date | null | undefined, b: Date | null | undefined): boolean;
|
|
255
|
-
declare function addDays(d: Date, n: number): Date;
|
|
256
|
-
declare function addMonths(d: Date, n: number): Date;
|
|
337
|
+
export declare function startOfDay(d: Date): Date;
|
|
338
|
+
export declare function firstOfMonth(d: Date): Date;
|
|
339
|
+
export declare function isSameDay(a: Date | null | undefined, b: Date | null | undefined): boolean;
|
|
340
|
+
export declare function addDays(d: Date, n: number): Date;
|
|
341
|
+
export declare function addMonths(d: Date, n: number): Date;
|
|
257
342
|
/** Build a Date and reject overflowed components (e.g. 31 Feb). */
|
|
258
|
-
declare function finalizeParsed(year: number, month: number, day: number, h: number, min: number): Date | null;
|
|
343
|
+
export declare function finalizeParsed(year: number, month: number, day: number, h: number, min: number): Date | null;
|
|
259
344
|
/** Serialize a `Date` to `"yyyy-MM-dd"` from its LOCAL components — never `toISOString()`
|
|
260
345
|
* (which converts to UTC and can shift the day by ±1 depending on the timezone). */
|
|
261
|
-
declare function toIsoDate(d: Date): string;
|
|
346
|
+
export declare function toIsoDate(d: Date): string;
|
|
262
347
|
/** `"HH:mm"` — the shape a native `<input type="time">` reads and writes. */
|
|
263
|
-
declare function toIsoTime(d: Date): string;
|
|
348
|
+
export declare function toIsoTime(d: Date): string;
|
|
264
349
|
/** `"yyyy-MM-ddTHH:mm"` — date part built the same local, never-UTC way as {@link toIsoDate}. */
|
|
265
|
-
declare function toIsoDateTime(d: Date): string;
|
|
350
|
+
export declare function toIsoDateTime(d: Date): string;
|
|
266
351
|
/** Strict `"yyyy-MM-dd"` parser (rejects anything else, incl. overflowed dates via `finalizeParsed`). */
|
|
267
|
-
declare function parseIsoDate(s: string): Date | null;
|
|
352
|
+
export declare function parseIsoDate(s: string): Date | null;
|
|
268
353
|
/** Strict `"yyyy-MM-ddTHH:mm"` parser (`showTime`/`timeOnly` round-trip). */
|
|
269
|
-
declare function parseIsoDateTime(s: string): Date | null;
|
|
354
|
+
export declare function parseIsoDateTime(s: string): Date | null;
|
|
270
355
|
/**
|
|
271
356
|
* Strict `"HH:mm"` parser, anchored on `reference` (default: today).
|
|
272
357
|
*
|
|
@@ -274,12 +359,11 @@ declare function parseIsoDateTime(s: string): Date | null;
|
|
|
274
359
|
* what `ui-datepicker` does in `timeOnly` mode — it too carries a full `Date` — so both
|
|
275
360
|
* components hand back the same shape.
|
|
276
361
|
*/
|
|
277
|
-
declare function parseIsoTime(s: string, reference?: Date): Date | null;
|
|
362
|
+
export declare function parseIsoTime(s: string, reference?: Date): Date | null;
|
|
278
363
|
/** Accepts a `Date` as-is, or parses a `"yyyy-MM-dd"` string — used to let config inputs
|
|
279
364
|
* (`minDate`/`maxDate`/`disabledDates`) take either shape. Invalid strings degrade to `null`
|
|
280
365
|
* (no constraint) rather than throwing: a malformed config shouldn't crash the picker. */
|
|
281
|
-
declare function normalizeDateInput(v: Date | string | null | undefined): Date | null;
|
|
282
|
-
|
|
366
|
+
export declare function normalizeDateInput(v: Date | string | null | undefined): Date | null;
|
|
283
367
|
/**
|
|
284
368
|
* Shared option-resolution helpers for list-based form fields
|
|
285
369
|
* (`ui-select`, `ui-autocomplete`, `ui-input-tags`).
|
|
@@ -290,45 +374,43 @@ declare function normalizeDateInput(v: Date | string | null | undefined): Date |
|
|
|
290
374
|
* stays reactive when bound to signal inputs.
|
|
291
375
|
*/
|
|
292
376
|
/** Normalized option: resolved value/label/disabled + the original option. */
|
|
293
|
-
interface OptionEntry {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
377
|
+
export interface OptionEntry {
|
|
378
|
+
value: unknown;
|
|
379
|
+
label: string;
|
|
380
|
+
disabled: boolean;
|
|
381
|
+
original: unknown;
|
|
298
382
|
}
|
|
299
383
|
/** Field accessors (typically the component's signal inputs). */
|
|
300
|
-
interface OptionResolverFields {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
384
|
+
export interface OptionResolverFields {
|
|
385
|
+
optionValue: () => string | undefined;
|
|
386
|
+
optionLabel: () => string | undefined;
|
|
387
|
+
optionDisabled: () => string | undefined;
|
|
388
|
+
dataKey: () => string | undefined;
|
|
305
389
|
}
|
|
306
|
-
interface OptionResolver {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
390
|
+
export interface OptionResolver {
|
|
391
|
+
/** Normalizes an option into an {@link OptionEntry}. */
|
|
392
|
+
toEntry(option: unknown): OptionEntry;
|
|
393
|
+
/** Reads a (dot-path) field from an object (`undefined` otherwise). */
|
|
394
|
+
getField(target: unknown, path: string | undefined): unknown;
|
|
395
|
+
/** Model value of an option (`optionValue` field, or the option itself). */
|
|
396
|
+
resolveValue(option: unknown): unknown;
|
|
397
|
+
/** Display label of an option (`optionLabel` field, `label` key, or text). */
|
|
398
|
+
resolveLabel(option: unknown): string | null;
|
|
399
|
+
/** Disabled flag of an option (`optionDisabled` field, or `disabled` key). */
|
|
400
|
+
resolveDisabled(option: unknown): boolean;
|
|
401
|
+
/** `String(value)`, or `null` for null/undefined. */
|
|
402
|
+
asText(value: unknown): string | null;
|
|
403
|
+
/** Value equality — by `dataKey` for objects, strict otherwise. */
|
|
404
|
+
equals(a: unknown, b: unknown): boolean;
|
|
321
405
|
}
|
|
322
|
-
declare function createOptionResolver(fields: OptionResolverFields): OptionResolver;
|
|
323
|
-
|
|
406
|
+
export declare function createOptionResolver(fields: OptionResolverFields): OptionResolver;
|
|
324
407
|
/**
|
|
325
|
-
* Substitutes the `{0}`
|
|
326
|
-
*
|
|
408
|
+
* Substitutes the `{0}`, `{1}`… tokens of a (possibly user-overridden) label with the values, in
|
|
409
|
+
* one pass: a value never gets its own tokens substituted, and its `$` sequences are never
|
|
410
|
+
* interpreted. A token without a matching value is left as is.
|
|
327
411
|
*/
|
|
328
|
-
declare function formatLabel(template: string,
|
|
329
|
-
|
|
330
|
-
declare function warnMissingAccessibleName(componentTag: string, message: string): void;
|
|
331
|
-
|
|
412
|
+
export declare function formatLabel(template: string, ...values: (string | number)[]): string;
|
|
413
|
+
export declare function warnMissingAccessibleName(componentTag: string, message: string): void;
|
|
332
414
|
/**
|
|
333
415
|
* Reports the events through which the browser may write a value into a native
|
|
334
416
|
* `<input>`/`<textarea>` without an `input` event:
|
|
@@ -343,15 +425,14 @@ declare function warnMissingAccessibleName(componentTag: string, message: string
|
|
|
343
425
|
* focus already reaches the host's own `(input)` handler: `hasFocus()` tells
|
|
344
426
|
* it apart from a keystroke.
|
|
345
427
|
*/
|
|
346
|
-
declare class UiBrowserFill {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
428
|
+
export declare class UiBrowserFill {
|
|
429
|
+
/** Emitted with the change/animation event that may reveal a fill. */
|
|
430
|
+
readonly browserFill: import("@angular/core").OutputEmitterRef<Event>;
|
|
431
|
+
protected onAnimationStart(event: AnimationEvent): void;
|
|
432
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiBrowserFill, never>;
|
|
433
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UiBrowserFill, "[uiBrowserFill]", never, {}, {
|
|
434
|
+
"browserFill": "browserFill";
|
|
435
|
+
}, never, never, true, never>;
|
|
352
436
|
}
|
|
353
437
|
/** Whether `element` holds the focus (works inside a shadow root). */
|
|
354
|
-
declare function hasFocus(element: Element): boolean;
|
|
355
|
-
|
|
356
|
-
export { BaseControlValueAccessor, BaseFieldControl, BaseFormField, MASK_TOKENS, UiBrowserFill, acceptsMaskChar, addDays, addMonths, applyMaskTemplate, autoFormatSegments, buildMaskSlots, caretForMask, createOptionResolver, dropdownOverlayPositions, extractMaskData, finalizeParsed, firstOfMonth, formatLabel, hasFocus, isSameDay, normalizeDateInput, parseIsoDate, parseIsoDateTime, parseIsoTime, parseMaskRanges, startOfDay, toIsoDate, toIsoDateTime, toIsoTime, warnMissingAccessibleName };
|
|
357
|
-
export type { FieldFloatLabel, FieldLevel, FieldSize, MaskBounds, MaskBuildResult, MaskSlot, OptionEntry, OptionResolver, OptionResolverFields };
|
|
438
|
+
export declare function hasFocus(element: Element): boolean;
|