@designsystem-se/af 38.2.0 → 38.2.1-beta.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/components/digi-form-select-filter.js +84 -47
- package/dist/cjs/digi-arbetsformedlingen.cjs.js +1 -1
- package/dist/cjs/digi-button_11.cjs.entry.js +1194 -0
- package/dist/cjs/digi-calendar-datepicker.cjs.entry.js +7 -7
- package/dist/cjs/digi-code-block_3.cjs.entry.js +6 -6
- package/dist/cjs/digi-dialog.cjs.entry.js +6 -6
- package/dist/cjs/digi-footer-card.cjs.entry.js +29 -0
- package/dist/cjs/digi-footer.cjs.entry.js +74 -0
- package/dist/cjs/digi-form-error-list.cjs.entry.js +6 -6
- package/dist/cjs/digi-form-file-upload.cjs.entry.js +9 -10
- package/dist/cjs/digi-form-input-search.cjs.entry.js +6 -7
- package/dist/cjs/digi-form-receipt.cjs.entry.js +6 -6
- package/dist/cjs/digi-header-avatar.cjs.entry.js +114 -0
- package/dist/cjs/digi-header-navigation-item.cjs.entry.js +27 -0
- package/dist/cjs/digi-header-navigation.cjs.entry.js +228 -0
- package/dist/cjs/digi-header-notification.cjs.entry.js +23 -0
- package/dist/cjs/digi-header.cjs.entry.js +115 -0
- package/dist/cjs/digi-icon-accessibility-universal.cjs.entry.js +30 -0
- package/dist/cjs/digi-icon-bars.cjs.entry.js +30 -0
- package/dist/cjs/digi-icon-bell-filled.cjs.entry.js +30 -0
- package/dist/cjs/digi-icon-envelope.cjs.entry.js +30 -0
- package/dist/cjs/{digi-link-external.cjs.entry.js → digi-icon-external-link-alt_2.cjs.entry.js} +24 -0
- package/dist/cjs/digi-icon-globe.cjs.entry.js +30 -0
- package/dist/cjs/digi-icon-sign.cjs.entry.js +30 -0
- package/dist/cjs/digi-icon-x.cjs.entry.js +30 -0
- package/dist/cjs/digi-layout-block_2.cjs.entry.js +92 -0
- package/dist/cjs/digi-link.cjs.entry.js +75 -0
- package/dist/cjs/digi-logo.cjs.entry.js +49 -0
- package/dist/cjs/digi-media-image_2.cjs.entry.js +167 -0
- package/dist/cjs/digi-navigation-pagination.cjs.entry.js +6 -6
- package/dist/cjs/digi-navigation-sidebar-button.cjs.entry.js +30 -0
- package/dist/cjs/digi-notification-alert.cjs.entry.js +6 -6
- package/dist/cjs/digi-notification-error-page.cjs.entry.js +6 -6
- package/dist/cjs/digi-title-logo.cjs.entry.js +133 -0
- package/dist/cjs/digi-tools-feedback.cjs.entry.js +6 -6
- package/dist/cjs/digi-typography.cjs.entry.js +26 -0
- package/dist/cjs/digi-util-breakpoint-observer.cjs.entry.js +48 -0
- package/dist/cjs/footer-card-variation.enum-99555edc.js +8 -0
- package/dist/cjs/{form-input-type.enum-9c8ee12a.js → form-input-type.enum-1fb2180a.js} +14 -0
- package/dist/cjs/{form-file-upload-variation.enum-634cfae8.js → form-validation-message-variation.enum-c5ec3e2d.js} +7 -0
- package/dist/cjs/index-7a477838.js +84 -20
- package/dist/cjs/index.cjs.js +73 -73
- package/dist/cjs/layout-container-max-width.enum-7e637f44.js +21 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/logo-color.enum-76f6c506.js +7 -0
- package/dist/cjs/{typography-variation.enum-c0ef9190.js → typography-variation.enum-9aab5027.js} +28 -33
- package/dist/collection/components/_form/form-select-filter/form-select-filter.js +85 -48
- package/dist/digi-arbetsformedlingen/design-tokens/components/_logo.variables.scss +2 -0
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/index.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/{p-8833044b.entry.js → p-02731621.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-0ef5ec06.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-10261517.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-97f66789.entry.js → p-25371300.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-2c685e4f.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-300aa9ef.js +1 -0
- package/dist/digi-arbetsformedlingen/p-3887bb40.js +1 -0
- package/dist/digi-arbetsformedlingen/p-3efa2f0b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-47ab0b39.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-4e9f2f05.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-ddd659bf.entry.js → p-655cda00.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-6abd8d58.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-7e77bbe7.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-7e85c9e3.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-8713df13.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-8d9f4f10.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-8ef41ad9.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-18880083.entry.js → p-986a1582.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-9dd41cc4.js +1 -0
- package/dist/digi-arbetsformedlingen/p-a0c77dff.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-a2008b0a.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-e5bd5a7e.entry.js → p-b3283953.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-beba49c2.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-bf80a488.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-a186888d.entry.js → p-c3e0f6dd.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-c553b73b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c604694f.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-7f155bd5.entry.js → p-c604a480.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-c64b4626.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c7a512ee.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c7d079d0.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c9dfda73.js +1 -0
- package/dist/digi-arbetsformedlingen/p-d6d7b1d8.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-db246e29.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-39468f49.entry.js → p-de22ce43.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-ecc2e481.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-ee88e3f1.js +1 -0
- package/dist/digi-arbetsformedlingen/p-f2e16531.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-f5bcd77b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-f87c0b45.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-fa77fcf7.entry.js +1 -0
- package/dist/esm/digi-arbetsformedlingen.js +1 -1
- package/dist/esm/digi-button_11.entry.js +1180 -0
- package/dist/esm/digi-calendar-datepicker.entry.js +6 -6
- package/dist/esm/digi-code-block_3.entry.js +6 -6
- package/dist/esm/digi-dialog.entry.js +6 -6
- package/dist/esm/digi-footer-card.entry.js +25 -0
- package/dist/esm/digi-footer.entry.js +70 -0
- package/dist/esm/digi-form-error-list.entry.js +6 -6
- package/dist/esm/digi-form-file-upload.entry.js +1 -2
- package/dist/esm/digi-form-input-search.entry.js +1 -2
- package/dist/esm/digi-form-receipt.entry.js +6 -6
- package/dist/esm/digi-header-avatar.entry.js +110 -0
- package/dist/esm/digi-header-navigation-item.entry.js +23 -0
- package/dist/esm/digi-header-navigation.entry.js +224 -0
- package/dist/esm/digi-header-notification.entry.js +19 -0
- package/dist/esm/digi-header.entry.js +111 -0
- package/dist/esm/digi-icon-accessibility-universal.entry.js +26 -0
- package/dist/esm/digi-icon-bars.entry.js +26 -0
- package/dist/esm/digi-icon-bell-filled.entry.js +26 -0
- package/dist/esm/digi-icon-envelope.entry.js +26 -0
- package/dist/esm/{digi-link-external.entry.js → digi-icon-external-link-alt_2.entry.js} +25 -2
- package/dist/esm/digi-icon-globe.entry.js +26 -0
- package/dist/esm/digi-icon-sign.entry.js +26 -0
- package/dist/esm/digi-icon-x.entry.js +26 -0
- package/dist/esm/digi-layout-block_2.entry.js +87 -0
- package/dist/esm/digi-link.entry.js +71 -0
- package/dist/esm/digi-logo.entry.js +45 -0
- package/dist/esm/digi-media-image_2.entry.js +162 -0
- package/dist/esm/digi-navigation-pagination.entry.js +6 -6
- package/dist/esm/digi-navigation-sidebar-button.entry.js +26 -0
- package/dist/esm/digi-notification-alert.entry.js +6 -6
- package/dist/esm/digi-notification-error-page.entry.js +6 -6
- package/dist/esm/digi-title-logo.entry.js +129 -0
- package/dist/esm/digi-tools-feedback.entry.js +6 -6
- package/dist/esm/digi-typography.entry.js +22 -0
- package/dist/esm/digi-util-breakpoint-observer.entry.js +44 -0
- package/dist/esm/footer-card-variation.enum-cc732148.js +8 -0
- package/dist/esm/{form-input-type.enum-3da3db27.js → form-input-type.enum-a6bba983.js} +15 -1
- package/dist/esm/{form-file-upload-variation.enum-9c49ec5e.js → form-validation-message-variation.enum-f7835fc5.js} +8 -1
- package/dist/esm/index-148a7577.js +84 -20
- package/dist/esm/index.js +6 -6
- package/dist/esm/layout-container-max-width.enum-c40018ac.js +21 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/logo-color.enum-8593dca6.js +7 -0
- package/dist/esm/{typography-variation.enum-c85d7857.js → typography-variation.enum-fdda731c.js} +29 -34
- package/dist/types/components/_form/form-select-filter/form-select-filter.d.ts +22 -3
- package/dist/types/components.d.ts +2 -2
- package/hydrate/index.js +84 -47
- package/hydrate/index.mjs +84 -47
- package/package.json +1 -1
- package/dist/cjs/digi-button_27.cjs.entry.js +0 -1380
- package/dist/cjs/digi-form-input.cjs.entry.js +0 -194
- package/dist/cjs/digi-form-label_3.cjs.entry.js +0 -129
- package/dist/cjs/digi-form-select-filter.cjs.entry.js +0 -564
- package/dist/cjs/digi-icon-check.cjs.entry.js +0 -30
- package/dist/cjs/digi-icon-chevron-down.cjs.entry.js +0 -30
- package/dist/cjs/digi-icon-validation-error_2.cjs.entry.js +0 -53
- package/dist/cjs/form-input-search-variation.enum-e0e025b1.js +0 -15
- package/dist/cjs/form-input-variation.enum-c750520c.js +0 -29
- package/dist/cjs/form-validation-message-variation.enum-855ae0be.js +0 -8
- package/dist/digi-arbetsformedlingen/p-111fb07d.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-1f956af8.js +0 -1
- package/dist/digi-arbetsformedlingen/p-2788683e.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-2d2f6950.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-30dc159d.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-42ae53aa.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-4841b4e1.js +0 -1
- package/dist/digi-arbetsformedlingen/p-59073668.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-7933b555.js +0 -1
- package/dist/digi-arbetsformedlingen/p-82611050.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-82a74908.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-88b4d03a.js +0 -1
- package/dist/digi-arbetsformedlingen/p-905ccb30.js +0 -1
- package/dist/digi-arbetsformedlingen/p-9c053cf8.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-9dae073c.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-d595e8a3.js +0 -1
- package/dist/digi-arbetsformedlingen/p-eda570be.entry.js +0 -1
- package/dist/esm/digi-button_27.entry.js +0 -1350
- package/dist/esm/digi-form-input.entry.js +0 -190
- package/dist/esm/digi-form-label_3.entry.js +0 -123
- package/dist/esm/digi-form-select-filter.entry.js +0 -560
- package/dist/esm/digi-icon-check.entry.js +0 -26
- package/dist/esm/digi-icon-chevron-down.entry.js +0 -26
- package/dist/esm/digi-icon-validation-error_2.entry.js +0 -48
- package/dist/esm/form-input-search-variation.enum-6d8dc10a.js +0 -15
- package/dist/esm/form-input-variation.enum-64d9450f.js +0 -29
- package/dist/esm/form-validation-message-variation.enum-bcef8a9d.js +0 -8
package/dist/esm/{typography-variation.enum-c85d7857.js → typography-variation.enum-fdda731c.js}
RENAMED
|
@@ -49,13 +49,6 @@ var DialogVariation;
|
|
|
49
49
|
DialogVariation["SECONDARY"] = "secondary";
|
|
50
50
|
})(DialogVariation || (DialogVariation = {}));
|
|
51
51
|
|
|
52
|
-
var FooterCardVariation;
|
|
53
|
-
(function (FooterCardVariation) {
|
|
54
|
-
FooterCardVariation["NONE"] = "none";
|
|
55
|
-
FooterCardVariation["ICON"] = "icon";
|
|
56
|
-
FooterCardVariation["BORDER"] = "border";
|
|
57
|
-
})(FooterCardVariation || (FooterCardVariation = {}));
|
|
58
|
-
|
|
59
52
|
var FooterVariation;
|
|
60
53
|
(function (FooterVariation) {
|
|
61
54
|
FooterVariation["LARGE"] = "large";
|
|
@@ -72,6 +65,34 @@ var FormErrorListHeadingLevel;
|
|
|
72
65
|
FormErrorListHeadingLevel["H6"] = "h6";
|
|
73
66
|
})(FormErrorListHeadingLevel || (FormErrorListHeadingLevel = {}));
|
|
74
67
|
|
|
68
|
+
var FormInputMode;
|
|
69
|
+
(function (FormInputMode) {
|
|
70
|
+
FormInputMode["DEFAULT"] = "";
|
|
71
|
+
FormInputMode["NONE"] = "none";
|
|
72
|
+
FormInputMode["TEXT"] = "text";
|
|
73
|
+
FormInputMode["DECIMAL"] = "decimal";
|
|
74
|
+
FormInputMode["NUMERIC"] = "numeric";
|
|
75
|
+
FormInputMode["TEL"] = "tel";
|
|
76
|
+
FormInputMode["SEARCH"] = "search";
|
|
77
|
+
FormInputMode["EMAIL"] = "email";
|
|
78
|
+
FormInputMode["URL"] = "url";
|
|
79
|
+
})(FormInputMode || (FormInputMode = {}));
|
|
80
|
+
|
|
81
|
+
var FormInputValidation;
|
|
82
|
+
(function (FormInputValidation) {
|
|
83
|
+
FormInputValidation["SUCCESS"] = "success";
|
|
84
|
+
FormInputValidation["ERROR"] = "error";
|
|
85
|
+
FormInputValidation["WARNING"] = "warning";
|
|
86
|
+
FormInputValidation["NEUTRAL"] = "neutral";
|
|
87
|
+
})(FormInputValidation || (FormInputValidation = {}));
|
|
88
|
+
|
|
89
|
+
var FormInputVariation;
|
|
90
|
+
(function (FormInputVariation) {
|
|
91
|
+
FormInputVariation["SMALL"] = "small";
|
|
92
|
+
FormInputVariation["MEDIUM"] = "medium";
|
|
93
|
+
FormInputVariation["LARGE"] = "large";
|
|
94
|
+
})(FormInputVariation || (FormInputVariation = {}));
|
|
95
|
+
|
|
75
96
|
var FormFieldsetValidation;
|
|
76
97
|
(function (FormFieldsetValidation) {
|
|
77
98
|
FormFieldsetValidation["SUCCESS"] = "success";
|
|
@@ -177,32 +198,6 @@ var InfoCardHeadingLevel;
|
|
|
177
198
|
InfoCardHeadingLevel["H6"] = "h6";
|
|
178
199
|
})(InfoCardHeadingLevel || (InfoCardHeadingLevel = {}));
|
|
179
200
|
|
|
180
|
-
var LayoutBlockContainer;
|
|
181
|
-
(function (LayoutBlockContainer) {
|
|
182
|
-
LayoutBlockContainer["STATIC"] = "static";
|
|
183
|
-
LayoutBlockContainer["FLUID"] = "fluid";
|
|
184
|
-
LayoutBlockContainer["NONE"] = "none";
|
|
185
|
-
})(LayoutBlockContainer || (LayoutBlockContainer = {}));
|
|
186
|
-
|
|
187
|
-
var LayoutContainerVariation;
|
|
188
|
-
(function (LayoutContainerVariation) {
|
|
189
|
-
LayoutContainerVariation["STATIC"] = "static";
|
|
190
|
-
LayoutContainerVariation["FLUID"] = "fluid";
|
|
191
|
-
LayoutContainerVariation["NONE"] = "none";
|
|
192
|
-
})(LayoutContainerVariation || (LayoutContainerVariation = {}));
|
|
193
|
-
|
|
194
|
-
var LayoutContainerMaxWidth;
|
|
195
|
-
(function (LayoutContainerMaxWidth) {
|
|
196
|
-
LayoutContainerMaxWidth["WIDTH_1200"] = "1200";
|
|
197
|
-
LayoutContainerMaxWidth["WIDTH_1400"] = "1400";
|
|
198
|
-
})(LayoutContainerMaxWidth || (LayoutContainerMaxWidth = {}));
|
|
199
|
-
|
|
200
|
-
var LogoColor;
|
|
201
|
-
(function (LogoColor) {
|
|
202
|
-
LogoColor["PRIMARY"] = "primary";
|
|
203
|
-
LogoColor["SECONDARY"] = "secondary";
|
|
204
|
-
})(LogoColor || (LogoColor = {}));
|
|
205
|
-
|
|
206
201
|
var NotificationAlertHeadingLevel;
|
|
207
202
|
(function (NotificationAlertHeadingLevel) {
|
|
208
203
|
NotificationAlertHeadingLevel["H1"] = "h1";
|
|
@@ -268,4 +263,4 @@ var TypographyVariation;
|
|
|
268
263
|
TypographyVariation["LARGE"] = "large";
|
|
269
264
|
})(TypographyVariation || (TypographyVariation = {}));
|
|
270
265
|
|
|
271
|
-
export { BadgeNotificationType as B, CalendarDatepickerValidation as C, DialogHeadingLevel as D, ErrorPageStatusCodes as E,
|
|
266
|
+
export { BadgeNotificationType as B, CalendarDatepickerValidation as C, DialogHeadingLevel as D, ErrorPageStatusCodes as E, FooterVariation as F, HeaderCenterContentWidth as H, InfoCardMultiContainerHeadingLevel as I, NotificationAlertHeadingLevel as N, TitleLogoVariation as T, CodeBlockLanguage as a, DialogSize as b, DialogVariation as c, FormErrorListHeadingLevel as d, FormInputMode as e, FormInputValidation as f, FormInputVariation as g, FormFieldsetValidation as h, FormRadiobuttonLayout as i, FormRadiobuttonValidation as j, FormRadiobuttonVariation as k, FormReceiptHeadingLevel as l, FormReceiptType as m, FormReceiptVariation as n, FormSelectFilterValidation as o, InfoCardMultiHeadingLevel as p, InfoCardMultiVariation as q, InfoCardHeadingLevel as r, NotificationAlertSize as s, NotificationAlertVariation as t, ToolsFeedbackHeadingLevel as u, ToolsFeedbackType as v, FeedbackVariation as w, TypographyVariation as x };
|
|
@@ -20,6 +20,10 @@ export declare class FormSelectFilter {
|
|
|
20
20
|
private _toggleButton;
|
|
21
21
|
private _submitButton;
|
|
22
22
|
private _searchQuery;
|
|
23
|
+
/** True when `value` was set from outside (e.g. Angular CVA) — then value is selection master. */
|
|
24
|
+
private _valueIsMaster;
|
|
25
|
+
/** Guards internal `value` writes so they don't flip `_valueIsMaster`. */
|
|
26
|
+
private _updatingValueInternally;
|
|
23
27
|
/**
|
|
24
28
|
* En valfri beskrivningstext.
|
|
25
29
|
* @en An optional description text.
|
|
@@ -71,9 +75,14 @@ export declare class FormSelectFilter {
|
|
|
71
75
|
sortAlphabetically: boolean;
|
|
72
76
|
/**
|
|
73
77
|
* @ignore
|
|
78
|
+
* Propertyn `value` finns inte dokumenterad på komponentens sida på dokumentationswebben, utan
|
|
79
|
+
* är endast till för att användas tillsammans med Angulars Control Value Accessors (CVA).
|
|
80
|
+
* Används CVA för att hantera komponentens värden så ska inte afListItems användas för att
|
|
81
|
+
* påverka vilka val som är gjorda eller ej.
|
|
82
|
+
* Exempel på båda sätten att hantera datat finns i Angular Playground.
|
|
74
83
|
*/
|
|
75
84
|
value: IListItem[];
|
|
76
|
-
onValueChanged(
|
|
85
|
+
onValueChanged(newValue: IListItem[] | string): void;
|
|
77
86
|
/**
|
|
78
87
|
* Sätts till true om det ska gå att välja flera val från listan.
|
|
79
88
|
* @en Set to true if you should be able to choose multiple items from the list.
|
|
@@ -201,7 +210,18 @@ export declare class FormSelectFilter {
|
|
|
201
210
|
* @en Listens for when focus is set on the custom element and propagates it down to the toggle butto.
|
|
202
211
|
*/
|
|
203
212
|
focusOnElement(): void;
|
|
204
|
-
|
|
213
|
+
componentWillLoad(): void;
|
|
214
|
+
private bootstrapInitialValue;
|
|
215
|
+
/**
|
|
216
|
+
* Keep `value` and `afListItems[].selected` in sync.
|
|
217
|
+
* - If `value` was set externally (`_valueIsMaster`), value wins on list updates.
|
|
218
|
+
* - Otherwise selection is seeded from `afListItems[].selected` (React/vanilla data-as-master).
|
|
219
|
+
* Does not emit `afOnSelect` — that is reserved for user interaction so Angular Control Value Accessors
|
|
220
|
+
* does not get feedback loops on prop sync.
|
|
221
|
+
*/
|
|
222
|
+
syncValueAndSelectedListItems(whereDidTheChangeComeFrom: 'valueChange' | 'afListItemsChange'): void;
|
|
223
|
+
private applyValueToListItems;
|
|
224
|
+
private setValueInternally;
|
|
205
225
|
setClosed(focusToggleButton?: boolean): void;
|
|
206
226
|
setScroll(scrollY: number): void;
|
|
207
227
|
setOpen(): void;
|
|
@@ -210,7 +230,6 @@ export declare class FormSelectFilter {
|
|
|
210
230
|
toggleDropdown(): void;
|
|
211
231
|
inputItem(identifier: any, index: any): HTMLInputElement;
|
|
212
232
|
emitFilterClosedEvent(): void;
|
|
213
|
-
componentWillLoad(): void;
|
|
214
233
|
setFocusItem(): void;
|
|
215
234
|
setFocusSearch(): void;
|
|
216
235
|
incrementFocusItem(): void;
|
|
@@ -2203,7 +2203,7 @@ export namespace Components {
|
|
|
2203
2203
|
*/
|
|
2204
2204
|
"sortAlphabetically": boolean;
|
|
2205
2205
|
/**
|
|
2206
|
-
* @ignore
|
|
2206
|
+
* @ignore Propertyn `value` finns inte dokumenterad på komponentens sida på dokumentationswebben, utan är endast till för att användas tillsammans med Angulars Control Value Accessors (CVA). Används CVA för att hantera komponentens värden så ska inte afListItems användas för att påverka vilka val som är gjorda eller ej. Exempel på båda sätten att hantera datat finns i Angular Playground.
|
|
2207
2207
|
*/
|
|
2208
2208
|
"value": IListItem[];
|
|
2209
2209
|
}
|
|
@@ -13949,7 +13949,7 @@ declare namespace LocalJSX {
|
|
|
13949
13949
|
*/
|
|
13950
13950
|
"sortAlphabetically"?: boolean;
|
|
13951
13951
|
/**
|
|
13952
|
-
* @ignore
|
|
13952
|
+
* @ignore Propertyn `value` finns inte dokumenterad på komponentens sida på dokumentationswebben, utan är endast till för att användas tillsammans med Angulars Control Value Accessors (CVA). Används CVA för att hantera komponentens värden så ska inte afListItems användas för att påverka vilka val som är gjorda eller ej. Exempel på båda sätten att hantera datat finns i Angular Playground.
|
|
13953
13953
|
*/
|
|
13954
13954
|
"value"?: IListItem[];
|
|
13955
13955
|
}
|
package/hydrate/index.js
CHANGED
|
@@ -22986,6 +22986,10 @@ class FormSelectFilter {
|
|
|
22986
22986
|
this.afOnSelect = createEvent(this, "afOnSelect", 7);
|
|
22987
22987
|
this.afOnQueryChanged = createEvent(this, "afOnQueryChanged", 7);
|
|
22988
22988
|
this._searchQuery = '';
|
|
22989
|
+
/** True when `value` was set from outside (e.g. Angular CVA) — then value is selection master. */
|
|
22990
|
+
this._valueIsMaster = false;
|
|
22991
|
+
/** Guards internal `value` writes so they don't flip `_valueIsMaster`. */
|
|
22992
|
+
this._updatingValueInternally = false;
|
|
22989
22993
|
this.isOpen = false;
|
|
22990
22994
|
this.focusListItemIndex = 0;
|
|
22991
22995
|
this.focusInList = false;
|
|
@@ -23019,17 +23023,19 @@ class FormSelectFilter {
|
|
|
23019
23023
|
this.afFilterButtonAriaDescribedby = undefined;
|
|
23020
23024
|
this.afErrorMessageIsAlert = true;
|
|
23021
23025
|
}
|
|
23022
|
-
onValueChanged(
|
|
23023
|
-
|
|
23024
|
-
|
|
23025
|
-
|
|
23026
|
-
if (this.afMultipleItems) {
|
|
23027
|
-
this._selectedItems = [...noDuplicates];
|
|
23028
|
-
}
|
|
23029
|
-
else {
|
|
23030
|
-
this._selectedItems = [noDuplicates[0]];
|
|
23031
|
-
}
|
|
23026
|
+
onValueChanged(newValue) {
|
|
23027
|
+
let parsedValue;
|
|
23028
|
+
if (typeof newValue === 'string') {
|
|
23029
|
+
parsedValue = newValue ? JSON.parse(newValue) : [];
|
|
23032
23030
|
}
|
|
23031
|
+
else {
|
|
23032
|
+
parsedValue = newValue || [];
|
|
23033
|
+
}
|
|
23034
|
+
if (!this._updatingValueInternally) {
|
|
23035
|
+
this._valueIsMaster = true;
|
|
23036
|
+
}
|
|
23037
|
+
this.value = parsedValue;
|
|
23038
|
+
this.syncValueAndSelectedListItems('valueChange');
|
|
23033
23039
|
}
|
|
23034
23040
|
handleListItems() {
|
|
23035
23041
|
if (this.afListItems) {
|
|
@@ -23045,15 +23051,7 @@ class FormSelectFilter {
|
|
|
23045
23051
|
}
|
|
23046
23052
|
this.giveItemsValueIfNoneExist();
|
|
23047
23053
|
this.sortListAlphabetically();
|
|
23048
|
-
|
|
23049
|
-
if (selectedListItems && selectedListItems.length > 0) {
|
|
23050
|
-
this._selectedItems = [...selectedListItems];
|
|
23051
|
-
this.afOnSelect.emit(this._selectedItems);
|
|
23052
|
-
this.value = this._selectedItems;
|
|
23053
|
-
}
|
|
23054
|
-
else if (this.value && this.value.length > 0) {
|
|
23055
|
-
this._selectedItems = [...this.value];
|
|
23056
|
-
}
|
|
23054
|
+
this.syncValueAndSelectedListItems('afListItemsChange');
|
|
23057
23055
|
this.filterResults();
|
|
23058
23056
|
}
|
|
23059
23057
|
catch (e) {
|
|
@@ -23105,14 +23103,58 @@ class FormSelectFilter {
|
|
|
23105
23103
|
focusOnElement() {
|
|
23106
23104
|
this._toggleButton.focus();
|
|
23107
23105
|
}
|
|
23108
|
-
|
|
23109
|
-
|
|
23110
|
-
|
|
23111
|
-
|
|
23112
|
-
|
|
23113
|
-
|
|
23114
|
-
|
|
23115
|
-
|
|
23106
|
+
componentWillLoad() {
|
|
23107
|
+
/* Stencil @Watch does not run for the initial prop value.
|
|
23108
|
+
* Given that Angular Control Value Accessors writeValue often sets `value` before willLoad —
|
|
23109
|
+
* we need to force a value check here with bootstrapInitialValue .*/
|
|
23110
|
+
this.bootstrapInitialValue();
|
|
23111
|
+
this.handleListItems();
|
|
23112
|
+
}
|
|
23113
|
+
bootstrapInitialValue() {
|
|
23114
|
+
if (typeof this.value === 'string') {
|
|
23115
|
+
const parsed = this.value ? JSON.parse(this.value) : [];
|
|
23116
|
+
this._updatingValueInternally = true;
|
|
23117
|
+
this.value = parsed;
|
|
23118
|
+
this._updatingValueInternally = false;
|
|
23119
|
+
}
|
|
23120
|
+
if (Array.isArray(this.value) && this.value.length > 0) {
|
|
23121
|
+
this._valueIsMaster = true;
|
|
23122
|
+
}
|
|
23123
|
+
}
|
|
23124
|
+
/**
|
|
23125
|
+
* Keep `value` and `afListItems[].selected` in sync.
|
|
23126
|
+
* - If `value` was set externally (`_valueIsMaster`), value wins on list updates.
|
|
23127
|
+
* - Otherwise selection is seeded from `afListItems[].selected` (React/vanilla data-as-master).
|
|
23128
|
+
* Does not emit `afOnSelect` — that is reserved for user interaction so Angular Control Value Accessors
|
|
23129
|
+
* does not get feedback loops on prop sync.
|
|
23130
|
+
*/
|
|
23131
|
+
syncValueAndSelectedListItems(whereDidTheChangeComeFrom) {
|
|
23132
|
+
if (!this._afListItems) {
|
|
23133
|
+
return;
|
|
23134
|
+
}
|
|
23135
|
+
if (whereDidTheChangeComeFrom === 'afListItemsChange') {
|
|
23136
|
+
if (this._valueIsMaster) {
|
|
23137
|
+
this.applyValueToListItems(this.value);
|
|
23138
|
+
}
|
|
23139
|
+
else {
|
|
23140
|
+
this._selectedItems = this._afListItems.filter((item) => item.selected);
|
|
23141
|
+
this.setValueInternally([...this._selectedItems]);
|
|
23142
|
+
}
|
|
23143
|
+
return;
|
|
23144
|
+
}
|
|
23145
|
+
this.applyValueToListItems(this.value);
|
|
23146
|
+
}
|
|
23147
|
+
applyValueToListItems(value) {
|
|
23148
|
+
const selectedValues = new Set((value !== null && value !== void 0 ? value : []).map((item) => item.value));
|
|
23149
|
+
this._afListItems.forEach((item) => {
|
|
23150
|
+
item.selected = selectedValues.has(item.value);
|
|
23151
|
+
});
|
|
23152
|
+
this._selectedItems = this._afListItems.filter((item) => selectedValues.has(item.value));
|
|
23153
|
+
}
|
|
23154
|
+
setValueInternally(nextValue) {
|
|
23155
|
+
this._updatingValueInternally = true;
|
|
23156
|
+
this.value = nextValue;
|
|
23157
|
+
this._updatingValueInternally = false;
|
|
23116
23158
|
}
|
|
23117
23159
|
setClosed(focusToggleButton = false) {
|
|
23118
23160
|
this.isOpen = false;
|
|
@@ -23171,9 +23213,6 @@ class FormSelectFilter {
|
|
|
23171
23213
|
this.setClosed(true);
|
|
23172
23214
|
this.afOnFilterClosed.emit();
|
|
23173
23215
|
}
|
|
23174
|
-
componentWillLoad() {
|
|
23175
|
-
this.handleListItems();
|
|
23176
|
-
}
|
|
23177
23216
|
setFocusItem() {
|
|
23178
23217
|
const element = this.inputItem(`${this.afId}-select-filter-list`, this.focusListItemIndex);
|
|
23179
23218
|
if (element) {
|
|
@@ -23278,16 +23317,14 @@ class FormSelectFilter {
|
|
|
23278
23317
|
}
|
|
23279
23318
|
filterResults() {
|
|
23280
23319
|
if (this._searchQuery && this._searchQuery.length > 0) {
|
|
23281
|
-
this._filteredResult =
|
|
23282
|
-
|
|
23283
|
-
|
|
23284
|
-
|
|
23285
|
-
|
|
23286
|
-
})
|
|
23287
|
-
];
|
|
23320
|
+
this._filteredResult = this._afListItems.filter((item) => {
|
|
23321
|
+
return item.label
|
|
23322
|
+
.toLowerCase()
|
|
23323
|
+
.includes(this._searchQuery.toLowerCase());
|
|
23324
|
+
});
|
|
23288
23325
|
}
|
|
23289
23326
|
else {
|
|
23290
|
-
this._filteredResult =
|
|
23327
|
+
this._filteredResult = this._afListItems;
|
|
23291
23328
|
}
|
|
23292
23329
|
}
|
|
23293
23330
|
inputSearchKeyboardHandler(e) {
|
|
@@ -23307,7 +23344,7 @@ class FormSelectFilter {
|
|
|
23307
23344
|
}
|
|
23308
23345
|
resetSelectItems(close = false) {
|
|
23309
23346
|
this._selectedItems = [];
|
|
23310
|
-
this.
|
|
23347
|
+
this.setValueInternally([]);
|
|
23311
23348
|
this.afOnSelect.emit([]);
|
|
23312
23349
|
this._searchQuery = '';
|
|
23313
23350
|
this.filterResults();
|
|
@@ -23337,7 +23374,7 @@ class FormSelectFilter {
|
|
|
23337
23374
|
this._selectedItems = [item];
|
|
23338
23375
|
this.emitFilterClosedEvent();
|
|
23339
23376
|
}
|
|
23340
|
-
this.
|
|
23377
|
+
this.setValueInternally([...this._selectedItems]);
|
|
23341
23378
|
this.afOnSelect.emit(this._selectedItems);
|
|
23342
23379
|
this.filterResults();
|
|
23343
23380
|
}
|
|
@@ -23428,15 +23465,15 @@ class FormSelectFilter {
|
|
|
23428
23465
|
} }, hAsync("slot", { name: "empty-search-result" })))));
|
|
23429
23466
|
}
|
|
23430
23467
|
render() {
|
|
23431
|
-
return (hAsync(Host, { key: '
|
|
23468
|
+
return (hAsync(Host, { key: '1a07fd41c8f9ccc1fbd0ca768fd3f87fc719dec4', tabindex: -1 }, hAsync("div", { key: '6492705706e717048243892a3f8b269fa26dc6b9', class: Object.assign({ 'digi-form-select-filter': true }, this.cssModifiers), role: "application", id: `${this.afId}-identifier` }, hAsync("digi-form-label", { key: '99d0e29f7dad712882c0a3c5fd3f468af7dd5c55', afLabel: this.afFilterButtonTextLabel, afFor: `${this.afId}`, afId: `${this.afId}-label`, class: "digi-form-select-filter__label", afDescription: this.afDescription, afRequired: this.afRequired, afAnnounceIfOptional: this.afAnnounceIfOptional, afRequiredText: this.afRequiredText, afAnnounceIfOptionalText: this.afAnnounceIfOptionalText }), hAsync("digi-util-keydown-handler", { key: 'a53d9d63b71557554da9442511af10870e345263', onAfOnEsc: () => this.escHandler() }, hAsync("button", { key: '260c22654935d7422d5fc30a47fbd0c37ec00f0c', type: "button", id: `${this.afId}`, class: "digi-form-select-filter__toggle-button", onClick: () => this.toggleDropdown(), ref: (el) => (this._toggleButton = el), "aria-haspopup": "true", "aria-label": this.ariaLabel, "aria-describedby": `${this.afFilterButtonAriaDescribedby} ${this.afId}--validation-message`, "aria-controls": `${this.afId}-dropdown-menu`, "aria-expanded": this.isOpen }, hAsync("div", { key: 'b92a13d75d3e320a39ca99128354178c01c1ff0d', class: Object.assign({ 'digi-form-filter__toggle-button-wrapper': true }, this.cssModifiersToggleButtonWrapper) }, hAsync("digi-icon-check", { key: '37ab06f299d37c36516a7b809472bb300d244c18', class: Object.assign({ 'digi-form-select-filter__toggle-button-indicator': true }, this.cssModifiersToggleButtonIndicator), slot: "icon" }), hAsync("span", { key: 'ca373143f83ab3da2e6579b3a0e1e145a10d2235', class: "digi-form-select-filter__toggle-button-text" }, this.renderButtonLabel)), hAsync("digi-icon-chevron-down", { key: '1a62747454653ceafa650e329301a8975179d75d', class: "digi-form-select-filter__toggle-icon" })), hAsync("div", { key: 'b0cafd4ce8ad8017f60e8fab88417512a6698f20', id: `${this.afId}-dropdown-menu`, tabindex: this.isOpen ? '-1' : undefined, class: {
|
|
23432
23469
|
'digi-form-select-filter__dropdown': true,
|
|
23433
23470
|
'digi-form-select-filter__dropdown--right': this.afAlignRight,
|
|
23434
23471
|
'digi-form-select-filter__dropdown--hidden': !this.isOpen
|
|
23435
|
-
} }, hAsync("fieldset", { key: '
|
|
23472
|
+
} }, hAsync("fieldset", { key: 'f98295e8e804f93428489daf5844df9854ed6053' }, hAsync("div", { key: 'c614d142260b6eaa0b6ea643b34f135551aaf1ec', class: "digi-form-select-filter__header" }, hAsync("legend", { key: 'f1c94bf0ea6e3745d8965fbe5bfdf0a298d7b4f0', class: "digi-form-select-filter__legend" }, this.afFilterButtonTextLabel), hAsync("digi-form-input", { key: '6def27fd94b52e666c3e8dac4385ddf874f85bd1', afLabel: this.afName, afId: `${this.afId}-search`, afVariation: FormInputVariation.MEDIUM, afType: FormInputType.SEARCH, afValidation: FormInputValidation.NEUTRAL, onAfOnFocus: () => {
|
|
23436
23473
|
this.focusListItemIndex = 0;
|
|
23437
23474
|
}, onAfOnKeyup: (e) => {
|
|
23438
23475
|
this.inputSearchKeyboardHandler(e.detail);
|
|
23439
|
-
}, onAfOnInput: (e) => this.inputSearchInputHandler(e.detail), afValue: this._searchQuery, class: "digi-form-select-filter__search-input", afAriaControls: `${this.afId}-select-filter-list`, afAutocomplete: "off", afAriaAutocomplete: "none" }), this.renderEmptyStateBox()), hAsync("div", { key: '
|
|
23476
|
+
}, onAfOnInput: (e) => this.inputSearchInputHandler(e.detail), afValue: this._searchQuery, class: "digi-form-select-filter__search-input", afAriaControls: `${this.afId}-select-filter-list`, afAutocomplete: "off", afAriaAutocomplete: "none" }), this.renderEmptyStateBox()), hAsync("div", { key: 'bcfc446573bb4b8f88aabdde1a8b6da1a6ac51f7', class: "digi-form-select-filter__scroll" }, hAsync("digi-util-keydown-handler", { key: '656253e1dba64d2906ae9b195063300fe5cbd900', onAfOnDown: (e) => this.downHandler(e), onAfOnRight: (e) => this.downHandler(e), onAfOnUp: (e) => this.upHandler(e), onAfOnLeft: (e) => this.upHandler(e), onAfOnHome: (e) => this.homeHandler(e), onAfOnEnd: (e) => this.endHandler(e), onAfOnEnter: (e) => this.enterHandler(e), onAfOnSpace: (e) => this.spaceHandler(e), onAfOnTab: () => this.tabHandler(), onAfOnShiftTab: () => this.shiftHandler() }, hAsync("ul", { key: '4a42a8ee02e3921710aa00826b31558ed1f9a485', class: "digi-form-select-filter__list", "aria-labelledby": `${this.afId}`, id: `${this.afId}-select-filter-list`, role: this.afMultipleItems ? '' : 'radiogroup', "aria-invalid": this.afMultipleItems
|
|
23440
23477
|
? 'false'
|
|
23441
23478
|
: this.afValidation ===
|
|
23442
23479
|
FormSelectFilterValidation.ERROR
|
|
@@ -23445,11 +23482,11 @@ class FormSelectFilter {
|
|
|
23445
23482
|
? false
|
|
23446
23483
|
: this.afRequired
|
|
23447
23484
|
? 'true'
|
|
23448
|
-
: 'false' }, this.showNeutralValue && (hAsync("li", { key: '
|
|
23485
|
+
: 'false' }, this.showNeutralValue && (hAsync("li", { key: '40d30a579a332fec15b5c3f38865eacce0a8c2ee', class: "digi-form-select-filter__item", role: "radio", "aria-required": this.afMultipleItems
|
|
23449
23486
|
? 'false'
|
|
23450
23487
|
: this.afRequired
|
|
23451
23488
|
? 'true'
|
|
23452
|
-
: 'false', "aria-checked": this._selectedItems.length === 0 ? 'true' : 'false', onClick: () => this.resetSelectItems(true), tabIndex: 0, "aria-label": this.afFilterButtonText }, this._selectedItems.length === 0 && (hAsync("digi-icon-check", { key: '
|
|
23489
|
+
: 'false', "aria-checked": this._selectedItems.length === 0 ? 'true' : 'false', onClick: () => this.resetSelectItems(true), tabIndex: 0, "aria-label": this.afFilterButtonText }, this._selectedItems.length === 0 && (hAsync("digi-icon-check", { key: '43f446e70c707681dd1de50e11af511e8c4d060e', class: "digi-form-select-filter__item__icon", "aria-hidden": 'true' })), this.afFilterButtonText)), this._filteredResult &&
|
|
23453
23490
|
this._filteredResult.map((item, index) => {
|
|
23454
23491
|
return (hAsync("li", { class: "digi-form-select-filter__item", key: index, dir: item.dir, lang: item.lang, "aria-checked": this.isSelected(item.value) ? 'true' : 'false', role: this.afMultipleItems ? 'checkbox' : 'radio', "aria-required": this.afMultipleItems
|
|
23455
23492
|
? 'false'
|
|
@@ -23465,9 +23502,9 @@ class FormSelectFilter {
|
|
|
23465
23502
|
: index === 0
|
|
23466
23503
|
? 0
|
|
23467
23504
|
: -1 }, this.isSelected(item.value) && (hAsync("digi-icon-check", { class: "digi-form-select-filter__item__icon", "aria-hidden": 'true' })), item.label));
|
|
23468
|
-
}))))), this.afMultipleItems && (hAsync("div", { key: '
|
|
23505
|
+
}))))), this.afMultipleItems && (hAsync("div", { key: 'f94a71fb292baf936c9358e33316f1ee93ce37f3', class: "digi-form-select-filter__footer" }, !this.afHideResetButton && (hAsync("digi-button", { key: '305beb8e5f817d46d5f7b5364e4125c101cbaed5', "af-variation": "secondary", "af-aria-label": this.afResetButtonTextAriaLabel, onClick: () => this.resetSelectItems(), class: "digi-form-select-filter__reset-button" }, this.afResetButtonText)), hAsync("digi-util-keydown-handler", { key: '3bf7f1f1bcd2a4e07fd900ba4b6377decc617cd7', onAfOnUp: () => this.setFocusItem() }, hAsync("digi-button", { key: 'eaa1389239c8b5e93ecac2ed2f6ed09fcda81863', ref: (el) => (this._submitButton = el), "af-variation": "primary", "af-aria-label": this.afSubmitButtonTextAriaLabel, onClick: () => {
|
|
23469
23506
|
this.setClosed(true);
|
|
23470
|
-
}, class: "digi-form-select-filter__submit-button" }, this.afSubmitButtonText)))))), hAsync("div", { key: '
|
|
23507
|
+
}, class: "digi-form-select-filter__submit-button" }, this.afSubmitButtonText)))))), hAsync("div", { key: '213a685ba0d080e873721d526c1517e62f1779be', class: "digi-form-select__footer" }, hAsync("div", { key: '81b470b19af8e472e50a789a6116448b8204359e', "aria-atomic": "true", role: this.errorMessageIsAlert ? 'alert' : null, id: `${this.afId}--validation-message` }, this.showValidation() && (hAsync("digi-form-validation-message", { key: '457f29208d032eb29e7bb94c9db9fb9634866524', "af-variation": this.afValidation }, this.afValidationText)))))));
|
|
23471
23508
|
}
|
|
23472
23509
|
get hostElement() { return getElement(this); }
|
|
23473
23510
|
static get watchers() { return {
|