@masterteam/components 0.0.266 → 0.0.268
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/masterteam-components-business-fields.mjs +5 -7
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-checkbox-field.mjs +6 -8
- package/fesm2022/masterteam-components-checkbox-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-color-picker-field.mjs +6 -8
- package/fesm2022/masterteam-components-color-picker-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-date-field.mjs +6 -8
- package/fesm2022/masterteam-components-date-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-editor-field.mjs +6 -8
- package/fesm2022/masterteam-components-editor-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +3 -62
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-field-validation.mjs +2 -8
- package/fesm2022/masterteam-components-field-validation.mjs.map +1 -1
- package/fesm2022/masterteam-components-icon-field.mjs +6 -8
- package/fesm2022/masterteam-components-icon-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-location-field.mjs +6 -8
- package/fesm2022/masterteam-components-location-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-multi-select-field.mjs +6 -8
- package/fesm2022/masterteam-components-multi-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-number-field.mjs +6 -8
- package/fesm2022/masterteam-components-number-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-pick-list-field.mjs +6 -8
- package/fesm2022/masterteam-components-pick-list-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-radio-cards-field.mjs +6 -8
- package/fesm2022/masterteam-components-radio-cards-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +5 -7
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-slider-field.mjs +5 -9
- package/fesm2022/masterteam-components-slider-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-text-field.mjs +6 -8
- package/fesm2022/masterteam-components-text-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-textarea-field.mjs +6 -8
- package/fesm2022/masterteam-components-textarea-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-upload-field.mjs +5 -7
- package/fesm2022/masterteam-components-upload-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-user-search-field.mjs +6 -8
- package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +64 -34
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +2 -4
- package/types/masterteam-components-checkbox-field.d.ts +2 -4
- package/types/masterteam-components-color-picker-field.d.ts +2 -4
- package/types/masterteam-components-date-field.d.ts +2 -4
- package/types/masterteam-components-editor-field.d.ts +2 -4
- package/types/masterteam-components-entities.d.ts +0 -14
- package/types/masterteam-components-icon-field.d.ts +2 -4
- package/types/masterteam-components-location-field.d.ts +2 -4
- package/types/masterteam-components-multi-select-field.d.ts +2 -4
- package/types/masterteam-components-number-field.d.ts +2 -4
- package/types/masterteam-components-pick-list-field.d.ts +2 -4
- package/types/masterteam-components-radio-cards-field.d.ts +2 -4
- package/types/masterteam-components-select-field.d.ts +2 -4
- package/types/masterteam-components-slider-field.d.ts +2 -2
- package/types/masterteam-components-text-field.d.ts +2 -4
- package/types/masterteam-components-textarea-field.d.ts +2 -4
- package/types/masterteam-components-upload-field.d.ts +2 -4
- package/types/masterteam-components-user-search-field.d.ts +2 -4
- package/types/masterteam-components.d.ts +33 -20
package/package.json
CHANGED
|
@@ -213,10 +213,8 @@ declare class SchedulePredecessorField implements ControlValueAccessor {
|
|
|
213
213
|
private readonly typeCellTpl;
|
|
214
214
|
private readonly lagCellTpl;
|
|
215
215
|
readonly label: _angular_core.InputSignal<string>;
|
|
216
|
-
/**
|
|
217
|
-
|
|
218
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
219
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
216
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
217
|
+
readonly fieldId: string;
|
|
220
218
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
221
219
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
222
220
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
@@ -6,10 +6,8 @@ import { isInvalid } from '@masterteam/components';
|
|
|
6
6
|
declare class CheckboxField implements ControlValueAccessor {
|
|
7
7
|
checkbox: Checkbox;
|
|
8
8
|
label: _angular_core.InputSignal<string | undefined>;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
12
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
9
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
10
|
+
readonly fieldId: string;
|
|
13
11
|
labelPosition: _angular_core.InputSignal<"top" | "start" | "end" | "bottom">;
|
|
14
12
|
placeholder: _angular_core.InputSignal<string | undefined>;
|
|
15
13
|
readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -6,10 +6,8 @@ import { isInvalid } from '@masterteam/components';
|
|
|
6
6
|
declare class ColorPickerField implements ControlValueAccessor {
|
|
7
7
|
colorPicker: ColorPicker;
|
|
8
8
|
label: _angular_core.InputSignal<string | undefined>;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
12
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
9
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
10
|
+
readonly fieldId: string;
|
|
13
11
|
appendTo: _angular_core.InputSignal<string>;
|
|
14
12
|
placeholder: _angular_core.InputSignal<string | undefined>;
|
|
15
13
|
class: _angular_core.InputSignal<string>;
|
|
@@ -9,10 +9,8 @@ declare class DateField implements ControlValueAccessor, OnInit, OnChanges {
|
|
|
9
9
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
10
10
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
11
11
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
15
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
12
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
13
|
+
readonly fieldId: string;
|
|
16
14
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
17
15
|
readonly class: _angular_core.InputSignal<string>;
|
|
18
16
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -5,10 +5,8 @@ import { isInvalid } from '@masterteam/components';
|
|
|
5
5
|
type EditorDirection = 'ltr' | 'rtl' | 'auto';
|
|
6
6
|
declare class EditorField implements ControlValueAccessor {
|
|
7
7
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
11
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
8
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
9
|
+
readonly fieldId: string;
|
|
12
10
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
13
11
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
14
12
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -956,9 +956,6 @@ interface EntitySlotGroup {
|
|
|
956
956
|
}
|
|
957
957
|
declare class EntitiesPreview {
|
|
958
958
|
private readonly transloco;
|
|
959
|
-
private readonly elementRef;
|
|
960
|
-
private readonly destroyRef;
|
|
961
|
-
private readonly zone;
|
|
962
959
|
/** Array of entity data to display */
|
|
963
960
|
readonly entities: _angular_core.InputSignal<EntityData[]>;
|
|
964
961
|
readonly attachmentShape: _angular_core.InputSignal<"compact" | "default">;
|
|
@@ -1017,17 +1014,6 @@ declare class EntitiesPreview {
|
|
|
1017
1014
|
* this cheap mapping re-runs when the key sets or tooltips change.
|
|
1018
1015
|
*/
|
|
1019
1016
|
protected readonly slotGroups: _angular_core.Signal<EntitySlotGroup[]>;
|
|
1020
|
-
/**
|
|
1021
|
-
* Whether the host is too narrow for the 24-column grid to stay legible.
|
|
1022
|
-
*
|
|
1023
|
-
* Measured rather than assumed: this component is narrow because of the
|
|
1024
|
-
* column layout it sits in, not because of the viewport, so a media query
|
|
1025
|
-
* would answer the wrong question — the same reason the stylesheet uses a
|
|
1026
|
-
* container query.
|
|
1027
|
-
*/
|
|
1028
|
-
private readonly hostWidth;
|
|
1029
|
-
protected readonly isNarrowHost: _angular_core.Signal<boolean>;
|
|
1030
|
-
constructor();
|
|
1031
1017
|
protected onSlotClick(source: MouseEvent, slot: EntitySlot): void;
|
|
1032
1018
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntitiesPreview, never>;
|
|
1033
1019
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesPreview, "mt-entities-preview", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; "stackOnNarrow": { "alias": "stackOnNarrow"; "required": false; "isSignal": true; }; "clickableKeys": { "alias": "clickableKeys"; "required": false; "isSignal": true; }; "activeKeys": { "alias": "activeKeys"; "required": false; "isSignal": true; }; "clickableTooltip": { "alias": "clickableTooltip"; "required": false; "isSignal": true; }; "activeTooltip": { "alias": "activeTooltip"; "required": false; "isSignal": true; }; }, { "entityClick": "entityClick"; }, never, never, true, never>;
|
|
@@ -12,10 +12,8 @@ interface IconFieldOption {
|
|
|
12
12
|
}
|
|
13
13
|
declare class IconField implements ControlValueAccessor {
|
|
14
14
|
readonly label: _angular_core.InputSignal<string>;
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
18
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
15
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
16
|
+
readonly fieldId: string;
|
|
19
17
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
20
18
|
icons: IconFieldOption[];
|
|
21
19
|
selectedIcon: _angular_core.WritableSignal<MTIcon | null>;
|
|
@@ -44,10 +44,8 @@ interface LocationFieldConfiguration {
|
|
|
44
44
|
declare class LocationField implements ControlValueAccessor, OnDestroy {
|
|
45
45
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
46
46
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
50
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
47
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
48
|
+
readonly fieldId: string;
|
|
51
49
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
52
50
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
53
51
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
@@ -13,10 +13,8 @@ declare class MultiSelectField implements ControlValueAccessor, OnInit, OnChange
|
|
|
13
13
|
ngAfterViewInit(): void;
|
|
14
14
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
15
15
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
19
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
16
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
17
|
+
readonly fieldId: string;
|
|
20
18
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
21
19
|
readonly class: _angular_core.InputSignal<string>;
|
|
22
20
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -9,10 +9,8 @@ declare class NumberField implements ControlValueAccessor, OnInit, OnChanges {
|
|
|
9
9
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
10
10
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
11
11
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
15
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
12
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
13
|
+
readonly fieldId: string;
|
|
16
14
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
17
15
|
readonly class: _angular_core.InputSignal<string>;
|
|
18
16
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -7,10 +7,8 @@ import { isInvalid } from '@masterteam/components';
|
|
|
7
7
|
declare class PickListField implements ControlValueAccessor, OnInit {
|
|
8
8
|
private readonly transloco;
|
|
9
9
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
13
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
10
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
11
|
+
readonly fieldId: string;
|
|
14
12
|
readonly class: _angular_core.InputSignal<string>;
|
|
15
13
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
16
14
|
readonly options: _angular_core.InputSignal<any[]>;
|
|
@@ -6,10 +6,8 @@ import { RadioItem } from '@masterteam/components/radio-cards';
|
|
|
6
6
|
declare class RadioCardsField implements ControlValueAccessor {
|
|
7
7
|
readonly circle: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
8
8
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
12
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
9
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
10
|
+
readonly fieldId: string;
|
|
13
11
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
14
12
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
15
13
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
@@ -29,10 +29,8 @@ declare class SelectField implements ControlValueAccessor, OnInit, OnChanges, Af
|
|
|
29
29
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
30
30
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
31
31
|
readonly label: _angular_core.InputSignal<string>;
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
35
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
32
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
33
|
+
readonly fieldId: string;
|
|
36
34
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
37
35
|
readonly hasPlaceholderPrefix: _angular_core.InputSignal<boolean>;
|
|
38
36
|
readonly class: _angular_core.InputSignal<string>;
|
|
@@ -16,7 +16,8 @@ declare class SliderField implements ControlValueAccessor {
|
|
|
16
16
|
readonly required: _angular_core.InputSignal<boolean>;
|
|
17
17
|
readonly ngControl: NgControl | null;
|
|
18
18
|
readonly hostClass: _angular_core.Signal<string>;
|
|
19
|
-
|
|
19
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
20
|
+
readonly fieldId: string;
|
|
20
21
|
readonly progressBgStyle: _angular_core.Signal<string>;
|
|
21
22
|
readonly numberInput: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
22
23
|
readonly requiredValidator: typeof Validators.required;
|
|
@@ -25,7 +26,6 @@ declare class SliderField implements ControlValueAccessor {
|
|
|
25
26
|
onTouched: () => void;
|
|
26
27
|
onModelChange: (value: number | null) => void;
|
|
27
28
|
isInvalid: typeof isInvalid;
|
|
28
|
-
private readonly defaultId;
|
|
29
29
|
constructor();
|
|
30
30
|
onValueChange(value: number | null): void;
|
|
31
31
|
private syncInputDisplay;
|
|
@@ -9,10 +9,8 @@ declare class TextField implements ControlValueAccessor, OnInit, OnChanges {
|
|
|
9
9
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
10
10
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
11
11
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
15
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
12
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
13
|
+
readonly fieldId: string;
|
|
16
14
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
17
15
|
readonly class: _angular_core.InputSignal<string>;
|
|
18
16
|
readonly type: _angular_core.InputSignal<string>;
|
|
@@ -8,10 +8,8 @@ declare class TextareaField implements ControlValueAccessor, OnInit, OnChanges {
|
|
|
8
8
|
readonly field: _angular_core.InputSignal<boolean>;
|
|
9
9
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
10
10
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
14
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
11
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
12
|
+
readonly fieldId: string;
|
|
15
13
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
16
14
|
readonly class: _angular_core.InputSignal<string>;
|
|
17
15
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -9,10 +9,8 @@ declare class UploadField implements ControlValueAccessor {
|
|
|
9
9
|
private readonly activeLang;
|
|
10
10
|
private readonly confirmationService;
|
|
11
11
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
15
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
12
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
13
|
+
readonly fieldId: string;
|
|
16
14
|
readonly title: _angular_core.InputSignal<string>;
|
|
17
15
|
readonly description: _angular_core.InputSignal<string>;
|
|
18
16
|
readonly endPoint: _angular_core.InputSignal<string>;
|
|
@@ -28,10 +28,8 @@ declare class UserSearchField implements ControlValueAccessor, OnInit, OnDestroy
|
|
|
28
28
|
*/
|
|
29
29
|
readonly hideUnlinkedHint: _angular_core.InputSignal<boolean>;
|
|
30
30
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
/** Shared by the input and its <label for>. See src/lib/utils/field-id. */
|
|
34
|
-
readonly fieldId: _angular_core.Signal<string>;
|
|
31
|
+
/** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */
|
|
32
|
+
readonly fieldId: string;
|
|
35
33
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
36
34
|
readonly class: _angular_core.InputSignal<string>;
|
|
37
35
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
@@ -1199,29 +1199,42 @@ declare const READABLE_DARK_INK = "#1f2937";
|
|
|
1199
1199
|
declare function readableTextOn(bgColor: string | null | undefined, dark?: string, light?: string): string;
|
|
1200
1200
|
|
|
1201
1201
|
/**
|
|
1202
|
-
*
|
|
1202
|
+
* A unique DOM id for a form field, shared by its control and its `<label for>`.
|
|
1203
1203
|
*
|
|
1204
|
-
*
|
|
1205
|
-
* inside a reactive form that resolves, but a stand-alone field with no control
|
|
1206
|
-
* and no label produced `id="undefined"` — literally, because Angular
|
|
1207
|
-
* stringifies. The global search input was exactly that case, which is why it
|
|
1208
|
-
* also had no associated `<label>` and reported as unlabelled in the
|
|
1209
|
-
* accessibility tree (findings L-03 and H-04).
|
|
1204
|
+
* Call it in a property initialiser, where an injection context exists:
|
|
1210
1205
|
*
|
|
1211
|
-
*
|
|
1212
|
-
*
|
|
1213
|
-
*
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
*
|
|
1219
|
-
*
|
|
1206
|
+
* ```ts
|
|
1207
|
+
* readonly fieldId = newFieldId('mt-text-field');
|
|
1208
|
+
* ```
|
|
1209
|
+
*
|
|
1210
|
+
* ---
|
|
1211
|
+
*
|
|
1212
|
+
* Fields used to bind `[id]="ngControl?.name || label()"`, which failed twice
|
|
1213
|
+
* over:
|
|
1214
|
+
*
|
|
1215
|
+
* 1. A field with no control and no label rendered `id="undefined"` —
|
|
1216
|
+
* literally, because Angular stringifies. The global search input was
|
|
1217
|
+
* exactly that, which is why it reported as unlabelled in the accessibility
|
|
1218
|
+
* tree (findings L-03, H-04).
|
|
1219
|
+
*
|
|
1220
|
+
* 2. **A control name is not unique on a page.** Measured on the forms
|
|
1221
|
+
* showcase: `country` on four elements, and 15 of 63 `<label for>` pointing
|
|
1222
|
+
* at an id shared by more than one. A label activates the FIRST element with
|
|
1223
|
+
* that id, so the third "Country" label focused the first Country field —
|
|
1224
|
+
* a wrong-field click for a sighted mouse user, not just a conformance note.
|
|
1225
|
+
*
|
|
1226
|
+
* The first attempt at this fix addressed only (1): it preferred the control
|
|
1227
|
+
* name and fell back to a generated id, which is precisely what produced the
|
|
1228
|
+
* duplicates in (2). Uniqueness has to be the default, not the fallback, so the
|
|
1229
|
+
* id is always generated and never derived from user-facing content.
|
|
1220
1230
|
*
|
|
1221
|
-
*
|
|
1222
|
-
*
|
|
1231
|
+
* `_IdGenerator` is the CDK service Angular Material uses for exactly this, and
|
|
1232
|
+
* CDK is already a dependency here. It salts with the application id, so an app
|
|
1233
|
+
* embedded alongside another Angular app cannot collide either. The underscore
|
|
1234
|
+
* marks it Angular-internal: if a future CDK moves it, the replacement is a
|
|
1235
|
+
* module-scoped counter and this file is the only thing that changes.
|
|
1223
1236
|
*/
|
|
1224
|
-
declare function
|
|
1237
|
+
declare function newFieldId(prefix: string): string;
|
|
1225
1238
|
|
|
1226
1239
|
/**
|
|
1227
1240
|
* Helpers for wall-clock values — the `HH:mm:ss` shape a `Time` property
|
|
@@ -1257,5 +1270,5 @@ declare class MTDateFormatPipe implements PipeTransform {
|
|
|
1257
1270
|
static ɵpipe: i0.ɵɵPipeDeclaration<MTDateFormatPipe, "mtDateFormat", true>;
|
|
1258
1271
|
}
|
|
1259
1272
|
|
|
1260
|
-
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DS_BLUE, DS_CHART_SERIES, DS_CONTROL_HEIGHT, DS_DEFAULT_PRIMARY_COLOR, DS_ERROR, DS_FONT_FAMILY, DS_GRAY, DS_INDIGO, DS_RADIUS, DS_SEMANTIC, DS_SHADOW, DS_SUCCESS, DS_WARNING, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, LookupModuleCheckListFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MT_DESIGN_IDENTITY_CLASS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, READABLE_DARK_INK, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, ScheduleItemSelectorFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, WCAG_AA_NORMAL_TEXT, applyDesignIdentityClass, changeBackgroundColor, changePrimaryColor, changeTextColor, clockTimeToSeconds, contrastRatio, createCustomValidator, createEntityAdapter, dsChartSeries, dsIdentityConfigs, endLoading, formatClockTime, generateTailwindPalette, getContrastColor, getLightColor, getMTDesignIdentity, handleApiRequest, isInvalid,
|
|
1273
|
+
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DS_BLUE, DS_CHART_SERIES, DS_CONTROL_HEIGHT, DS_DEFAULT_PRIMARY_COLOR, DS_ERROR, DS_FONT_FAMILY, DS_GRAY, DS_INDIGO, DS_RADIUS, DS_SEMANTIC, DS_SHADOW, DS_SUCCESS, DS_WARNING, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, LookupModuleCheckListFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MT_DESIGN_IDENTITY_CLASS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, READABLE_DARK_INK, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, ScheduleItemSelectorFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, WCAG_AA_NORMAL_TEXT, applyDesignIdentityClass, changeBackgroundColor, changePrimaryColor, changeTextColor, clockTimeToSeconds, contrastRatio, createCustomValidator, createEntityAdapter, dsChartSeries, dsIdentityConfigs, endLoading, formatClockTime, generateTailwindPalette, getContrastColor, getLightColor, getMTDesignIdentity, handleApiRequest, isInvalid, newFieldId, parseClockTime, pickAccessibleShade, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, readableTextOn, relativeLuminance, setLoadingError, setMTDesignIdentity, startLoading, toAngularDateFormat, toClockTimeParts, wrapValidatorWithMessage };
|
|
1261
1274
|
export type { ApiRequestConfig, BaseFieldConstructorConfig, ClockTimeParts, CrudCreateConfig, CrudDeleteConfig, CrudLoadConfig, CrudUpdateConfig, DSColorScale, DynamicFieldConfig, DynamicFormConfig, EntityAdapter, EntityListFieldRuntimeContext, FieldRelationAction, FieldRelationConfig, FieldState, FieldType, FormulaConditionConfig, FormulaConditionMode, FormulaRuntimeMessage, FormulaRuntimeMessageCode, FormulaValidationRuleConfig, FormulaValidationSeverity, LayoutConfig, LoadingStateShape, LookupCheckListPropertyConfig, LookupMatrixCellConfig, LookupModuleCheckListFieldRuntimeContext, LookupOptionItemConfig, MTDateFormatType, MTDateFormats, MTDesignIdentity, MTThemeOptions, PaletteShade, QueryResult, RequestContextConfig, Response, ResponsiveColSpan, ScheduleItemSelectorFieldRuntimeContext, SchedulePredecessorFieldRuntimeContext, SectionConfig, ValidatorType };
|