@ks-digital/designsystem-angular 0.0.1-alpha.8 → 0.0.1-alpha.80
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.md +29 -12
- package/__internals/README.md +3 -0
- package/alert/README.md +3 -0
- package/breadcrumbs/README.md +3 -0
- package/button/README.md +3 -0
- package/card/README.md +3 -0
- package/details/README.md +3 -0
- package/dialog/README.md +3 -0
- package/dropdown/README.md +3 -0
- package/error-summary/README.md +3 -0
- package/fesm2022/ks-digital-designsystem-angular-__internals.mjs +152 -0
- package/fesm2022/ks-digital-designsystem-angular-__internals.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-alert.mjs +60 -0
- package/fesm2022/ks-digital-designsystem-angular-alert.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs +87 -0
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-button.mjs +200 -0
- package/fesm2022/ks-digital-designsystem-angular-button.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-card.mjs +137 -0
- package/fesm2022/ks-digital-designsystem-angular-card.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-chip.mjs +77 -0
- package/fesm2022/ks-digital-designsystem-angular-chip.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-details.mjs +149 -0
- package/fesm2022/ks-digital-designsystem-angular-details.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-dialog.mjs +107 -0
- package/fesm2022/ks-digital-designsystem-angular-dialog.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs +148 -0
- package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs +84 -0
- package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-forms.mjs +514 -0
- package/fesm2022/ks-digital-designsystem-angular-forms.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-heading.mjs +70 -0
- package/fesm2022/ks-digital-designsystem-angular-heading.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-link.mjs +60 -0
- package/fesm2022/ks-digital-designsystem-angular-link.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-pagination.mjs +471 -0
- package/fesm2022/ks-digital-designsystem-angular-pagination.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs +42 -0
- package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-popover.mjs +148 -0
- package/fesm2022/ks-digital-designsystem-angular-popover.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-search.mjs +281 -0
- package/fesm2022/ks-digital-designsystem-angular-search.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs +79 -0
- package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +183 -0
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs +639 -0
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-table.mjs +248 -0
- package/fesm2022/ks-digital-designsystem-angular-table.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-tabs.mjs +325 -0
- package/fesm2022/ks-digital-designsystem-angular-tabs.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-tag.mjs +85 -0
- package/fesm2022/ks-digital-designsystem-angular-tag.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs +43 -0
- package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular.mjs +2 -0
- package/fesm2022/ks-digital-designsystem-angular.mjs.map +1 -0
- package/forms/README.md +3 -0
- package/heading/README.md +3 -0
- package/link/README.md +3 -0
- package/package.json +114 -28
- package/pagination/README.md +3 -0
- package/paragraph/README.md +3 -0
- package/popover/README.md +3 -0
- package/search/README.md +3 -0
- package/skeleton/README.md +3 -0
- package/spinner/README.md +3 -0
- package/suggestion/README.md +3 -0
- package/table/README.md +3 -0
- package/tabs/README.md +3 -0
- package/tag/README.md +3 -0
- package/types/ks-digital-designsystem-angular-__internals.d.ts +64 -0
- package/types/ks-digital-designsystem-angular-alert.d.ts +21 -0
- package/types/ks-digital-designsystem-angular-breadcrumbs.d.ts +29 -0
- package/types/ks-digital-designsystem-angular-button.d.ts +67 -0
- package/types/ks-digital-designsystem-angular-card.d.ts +39 -0
- package/types/ks-digital-designsystem-angular-chip.d.ts +30 -0
- package/types/ks-digital-designsystem-angular-details.d.ts +34 -0
- package/types/ks-digital-designsystem-angular-dialog.d.ts +40 -0
- package/types/ks-digital-designsystem-angular-dropdown.d.ts +44 -0
- package/types/ks-digital-designsystem-angular-error-summary.d.ts +17 -0
- package/types/ks-digital-designsystem-angular-forms.d.ts +146 -0
- package/types/ks-digital-designsystem-angular-heading.d.ts +22 -0
- package/types/ks-digital-designsystem-angular-link.d.ts +18 -0
- package/types/ks-digital-designsystem-angular-pagination.d.ts +141 -0
- package/types/ks-digital-designsystem-angular-paragraph.d.ts +5 -0
- package/types/ks-digital-designsystem-angular-popover.d.ts +44 -0
- package/types/ks-digital-designsystem-angular-search.d.ts +100 -0
- package/types/ks-digital-designsystem-angular-skeleton.d.ts +21 -0
- package/types/ks-digital-designsystem-angular-spinner.d.ts +42 -0
- package/types/ks-digital-designsystem-angular-suggestion.d.ts +198 -0
- package/types/ks-digital-designsystem-angular-table.d.ts +68 -0
- package/types/ks-digital-designsystem-angular-tabs.d.ts +105 -0
- package/types/ks-digital-designsystem-angular-tag.d.ts +30 -0
- package/types/ks-digital-designsystem-angular-validation-message.d.ts +5 -0
- package/types/ks-digital-designsystem-angular.d.ts +2 -0
- package/validation-message/README.md +3 -0
- package/dist/README.md +0 -43
- package/dist/fesm2022/ks-digital-designsystem-angular.mjs +0 -195
- package/dist/fesm2022/ks-digital-designsystem-angular.mjs.map +0 -1
- package/dist/index.d.ts +0 -75
|
@@ -0,0 +1,639 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component, afterRenderEffect, booleanAttribute, computed, contentChild, contentChildren, effect, input, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
4
|
+
import "@digdir/designsystemet-web";
|
|
5
|
+
import * as i1 from "@ks-digital/designsystem-angular/__internals";
|
|
6
|
+
import { HostColor, HostSize } from "@ks-digital/designsystem-angular/__internals";
|
|
7
|
+
var SuggestionListEmpty = class SuggestionListEmpty {
|
|
8
|
+
templateRef = viewChild("tpl", ...ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []);
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
10
|
+
minVersion: "12.0.0",
|
|
11
|
+
version: "22.2.2",
|
|
12
|
+
ngImport: i0,
|
|
13
|
+
type: SuggestionListEmpty,
|
|
14
|
+
deps: [],
|
|
15
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
16
|
+
});
|
|
17
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
18
|
+
minVersion: "17.2.0",
|
|
19
|
+
version: "22.2.2",
|
|
20
|
+
type: SuggestionListEmpty,
|
|
21
|
+
isStandalone: true,
|
|
22
|
+
selector: "ksd-suggestion-list-empty",
|
|
23
|
+
viewQueries: [{
|
|
24
|
+
propertyName: "templateRef",
|
|
25
|
+
first: true,
|
|
26
|
+
predicate: ["tpl"],
|
|
27
|
+
descendants: true,
|
|
28
|
+
isSignal: true
|
|
29
|
+
}],
|
|
30
|
+
ngImport: i0,
|
|
31
|
+
template: ` <ng-template #tpl><ng-content /></ng-template> `,
|
|
32
|
+
isInline: true,
|
|
33
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
37
|
+
minVersion: "12.0.0",
|
|
38
|
+
version: "22.2.2",
|
|
39
|
+
ngImport: i0,
|
|
40
|
+
type: SuggestionListEmpty,
|
|
41
|
+
decorators: [{
|
|
42
|
+
type: Component,
|
|
43
|
+
args: [{
|
|
44
|
+
selector: "ksd-suggestion-list-empty",
|
|
45
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
46
|
+
template: ` <ng-template #tpl><ng-content /></ng-template> `
|
|
47
|
+
}]
|
|
48
|
+
}],
|
|
49
|
+
propDecorators: { templateRef: [{
|
|
50
|
+
type: i0.ViewChild,
|
|
51
|
+
args: ["tpl", { isSignal: true }]
|
|
52
|
+
}] }
|
|
53
|
+
});
|
|
54
|
+
var SuggestionListOption = class SuggestionListOption {
|
|
55
|
+
templateRef = viewChild("tpl", ...ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []);
|
|
56
|
+
value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
57
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
58
|
+
minVersion: "12.0.0",
|
|
59
|
+
version: "22.2.2",
|
|
60
|
+
ngImport: i0,
|
|
61
|
+
type: SuggestionListOption,
|
|
62
|
+
deps: [],
|
|
63
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
64
|
+
});
|
|
65
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
66
|
+
minVersion: "17.2.0",
|
|
67
|
+
version: "22.2.2",
|
|
68
|
+
type: SuggestionListOption,
|
|
69
|
+
isStandalone: true,
|
|
70
|
+
selector: "ksd-suggestion-list-option",
|
|
71
|
+
inputs: { value: {
|
|
72
|
+
classPropertyName: "value",
|
|
73
|
+
publicName: "value",
|
|
74
|
+
isSignal: true,
|
|
75
|
+
isRequired: true,
|
|
76
|
+
transformFunction: null
|
|
77
|
+
} },
|
|
78
|
+
viewQueries: [{
|
|
79
|
+
propertyName: "templateRef",
|
|
80
|
+
first: true,
|
|
81
|
+
predicate: ["tpl"],
|
|
82
|
+
descendants: true,
|
|
83
|
+
isSignal: true
|
|
84
|
+
}],
|
|
85
|
+
ngImport: i0,
|
|
86
|
+
template: ` <ng-template #tpl><ng-content /></ng-template> `,
|
|
87
|
+
isInline: true,
|
|
88
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
92
|
+
minVersion: "12.0.0",
|
|
93
|
+
version: "22.2.2",
|
|
94
|
+
ngImport: i0,
|
|
95
|
+
type: SuggestionListOption,
|
|
96
|
+
decorators: [{
|
|
97
|
+
type: Component,
|
|
98
|
+
args: [{
|
|
99
|
+
selector: "ksd-suggestion-list-option",
|
|
100
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
101
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
102
|
+
imports: [],
|
|
103
|
+
template: ` <ng-template #tpl><ng-content /></ng-template> `
|
|
104
|
+
}]
|
|
105
|
+
}],
|
|
106
|
+
propDecorators: {
|
|
107
|
+
templateRef: [{
|
|
108
|
+
type: i0.ViewChild,
|
|
109
|
+
args: ["tpl", { isSignal: true }]
|
|
110
|
+
}],
|
|
111
|
+
value: [{
|
|
112
|
+
type: i0.Input,
|
|
113
|
+
args: [{
|
|
114
|
+
isSignal: true,
|
|
115
|
+
alias: "value",
|
|
116
|
+
required: true
|
|
117
|
+
}]
|
|
118
|
+
}]
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
var SuggestionList = class SuggestionList {
|
|
122
|
+
singular = input("%d forslag", ...ngDevMode ? [{ debugName: "singular" }] : /* istanbul ignore next */ []);
|
|
123
|
+
plural = input("%d forslag", ...ngDevMode ? [{ debugName: "plural" }] : /* istanbul ignore next */ []);
|
|
124
|
+
options = contentChildren(SuggestionListOption, {
|
|
125
|
+
...ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {},
|
|
126
|
+
descendants: true
|
|
127
|
+
});
|
|
128
|
+
empty = contentChild(SuggestionListEmpty, ...ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []);
|
|
129
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
130
|
+
minVersion: "12.0.0",
|
|
131
|
+
version: "22.2.2",
|
|
132
|
+
ngImport: i0,
|
|
133
|
+
type: SuggestionList,
|
|
134
|
+
deps: [],
|
|
135
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
136
|
+
});
|
|
137
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
138
|
+
minVersion: "17.2.0",
|
|
139
|
+
version: "22.2.2",
|
|
140
|
+
type: SuggestionList,
|
|
141
|
+
isStandalone: true,
|
|
142
|
+
selector: "ksd-suggestion-list",
|
|
143
|
+
inputs: {
|
|
144
|
+
singular: {
|
|
145
|
+
classPropertyName: "singular",
|
|
146
|
+
publicName: "singular",
|
|
147
|
+
isSignal: true,
|
|
148
|
+
isRequired: false,
|
|
149
|
+
transformFunction: null
|
|
150
|
+
},
|
|
151
|
+
plural: {
|
|
152
|
+
classPropertyName: "plural",
|
|
153
|
+
publicName: "plural",
|
|
154
|
+
isSignal: true,
|
|
155
|
+
isRequired: false,
|
|
156
|
+
transformFunction: null
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
host: { styleAttribute: "display: none;" },
|
|
160
|
+
queries: [{
|
|
161
|
+
propertyName: "options",
|
|
162
|
+
predicate: SuggestionListOption,
|
|
163
|
+
descendants: true,
|
|
164
|
+
isSignal: true
|
|
165
|
+
}, {
|
|
166
|
+
propertyName: "empty",
|
|
167
|
+
first: true,
|
|
168
|
+
predicate: SuggestionListEmpty,
|
|
169
|
+
descendants: true,
|
|
170
|
+
isSignal: true
|
|
171
|
+
}],
|
|
172
|
+
ngImport: i0,
|
|
173
|
+
template: ``,
|
|
174
|
+
isInline: true,
|
|
175
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
179
|
+
minVersion: "12.0.0",
|
|
180
|
+
version: "22.2.2",
|
|
181
|
+
ngImport: i0,
|
|
182
|
+
type: SuggestionList,
|
|
183
|
+
decorators: [{
|
|
184
|
+
type: Component,
|
|
185
|
+
args: [{
|
|
186
|
+
selector: "ksd-suggestion-list",
|
|
187
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
188
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
189
|
+
host: { style: "display: none;" },
|
|
190
|
+
template: ``
|
|
191
|
+
}]
|
|
192
|
+
}],
|
|
193
|
+
propDecorators: {
|
|
194
|
+
singular: [{
|
|
195
|
+
type: i0.Input,
|
|
196
|
+
args: [{
|
|
197
|
+
isSignal: true,
|
|
198
|
+
alias: "singular",
|
|
199
|
+
required: false
|
|
200
|
+
}]
|
|
201
|
+
}],
|
|
202
|
+
plural: [{
|
|
203
|
+
type: i0.Input,
|
|
204
|
+
args: [{
|
|
205
|
+
isSignal: true,
|
|
206
|
+
alias: "plural",
|
|
207
|
+
required: false
|
|
208
|
+
}]
|
|
209
|
+
}],
|
|
210
|
+
options: [{
|
|
211
|
+
type: i0.ContentChildren,
|
|
212
|
+
args: [i0.forwardRef(() => SuggestionListOption), {
|
|
213
|
+
descendants: true,
|
|
214
|
+
isSignal: true
|
|
215
|
+
}]
|
|
216
|
+
}],
|
|
217
|
+
empty: [{
|
|
218
|
+
type: i0.ContentChild,
|
|
219
|
+
args: [i0.forwardRef(() => SuggestionListEmpty), { isSignal: true }]
|
|
220
|
+
}]
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
const isSuggestionItem = (value) => typeof value === "object" && value !== null && "label" in value && "value" in value;
|
|
224
|
+
const sanitizeValues = (values) => values == null ? [] : Array.isArray(values) ? values : [values];
|
|
225
|
+
const toValues = (value) => value == null ? [] : Array.isArray(value) ? value : [value];
|
|
226
|
+
const labelEntries = (values) => sanitizeValues(values).filter(isSuggestionItem).map((item) => [item.value, item.label]);
|
|
227
|
+
const toValue = (values) => {
|
|
228
|
+
if (values == null) return void 0;
|
|
229
|
+
const primitives = sanitizeValues(values).map((value) => isSuggestionItem(value) ? value.value : value);
|
|
230
|
+
return Array.isArray(values) ? primitives : primitives[0];
|
|
231
|
+
};
|
|
232
|
+
const resolveItems = (value, labels) => toValues(value).map((optionValue) => ({
|
|
233
|
+
label: labels.get(optionValue) ?? optionValue,
|
|
234
|
+
value: optionValue
|
|
235
|
+
}));
|
|
236
|
+
const toSelected = (value, labels) => {
|
|
237
|
+
if (value == null) return void 0;
|
|
238
|
+
const items = resolveItems(value, labels);
|
|
239
|
+
return Array.isArray(value) ? items : items[0];
|
|
240
|
+
};
|
|
241
|
+
const sameValue = (left, right) => {
|
|
242
|
+
if (Array.isArray(left) && Array.isArray(right)) return left.length === right.length && left.every((value, index) => value === right[index]);
|
|
243
|
+
return left === right;
|
|
244
|
+
};
|
|
245
|
+
const nextSelected = (data, previous, multiple) => {
|
|
246
|
+
const value = data.value;
|
|
247
|
+
if (!multiple) return data.isConnected ? void 0 : value;
|
|
248
|
+
const previousValues = toValues(previous);
|
|
249
|
+
return data.isConnected ? previousValues.filter((previousValue) => previousValue !== value) : [...previousValues, value];
|
|
250
|
+
};
|
|
251
|
+
const defaultFilter = ({ label, input }) => label.toLowerCase().includes(input.value.trim().toLowerCase());
|
|
252
|
+
const UNSET = Symbol("unset");
|
|
253
|
+
var Suggestion = class Suggestion {
|
|
254
|
+
multiple = input(false, {
|
|
255
|
+
...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
|
|
256
|
+
transform: booleanAttribute
|
|
257
|
+
});
|
|
258
|
+
creatable = input(false, {
|
|
259
|
+
...ngDevMode ? { debugName: "creatable" } : /* istanbul ignore next */ {},
|
|
260
|
+
transform: booleanAttribute
|
|
261
|
+
});
|
|
262
|
+
filter = input(true, ...ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []);
|
|
263
|
+
value = model(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
264
|
+
selected = input(UNSET, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
265
|
+
selectedChange = output();
|
|
266
|
+
dirty = input(false, {
|
|
267
|
+
...ngDevMode ? { debugName: "dirty" } : /* istanbul ignore next */ {},
|
|
268
|
+
transform: booleanAttribute
|
|
269
|
+
});
|
|
270
|
+
touched = input(false, {
|
|
271
|
+
...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
|
|
272
|
+
transform: booleanAttribute
|
|
273
|
+
});
|
|
274
|
+
touch = output();
|
|
275
|
+
selectedArray = computed(() => resolveItems(this.value(), this.labels()), ...ngDevMode ? [{ debugName: "selectedArray" }] : /* istanbul ignore next */ []);
|
|
276
|
+
suggestionElement = viewChild("suggestionElement", ...ngDevMode ? [{ debugName: "suggestionElement" }] : /* istanbul ignore next */ []);
|
|
277
|
+
labels = signal(/* @__PURE__ */ new Map(), ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
|
|
278
|
+
query = signal("", ...ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []);
|
|
279
|
+
suggestionList = contentChild(SuggestionList, ...ngDevMode ? [{ debugName: "suggestionList" }] : /* istanbul ignore next */ []);
|
|
280
|
+
constructor() {
|
|
281
|
+
afterRenderEffect(() => {
|
|
282
|
+
this.query();
|
|
283
|
+
this.filter();
|
|
284
|
+
this.suggestionList()?.options();
|
|
285
|
+
this.syncOptions();
|
|
286
|
+
});
|
|
287
|
+
effect(() => {
|
|
288
|
+
const selected = this.selected();
|
|
289
|
+
if (selected === UNSET) return;
|
|
290
|
+
untracked(() => this.learnLabels(labelEntries(selected)));
|
|
291
|
+
const next = toValue(selected);
|
|
292
|
+
if (sameValue(next, untracked(() => this.value()))) return;
|
|
293
|
+
untracked(() => this.value.set(next));
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
onSelect(event) {
|
|
297
|
+
const customEvent = event;
|
|
298
|
+
customEvent.preventDefault();
|
|
299
|
+
const data = customEvent.detail;
|
|
300
|
+
if (!data) return;
|
|
301
|
+
this.learnLabels([[data.value, data.textContent?.trim() || data.value]]);
|
|
302
|
+
this.setValue(nextSelected(data, this.value(), this.multiple()));
|
|
303
|
+
}
|
|
304
|
+
onFocusOut(event) {
|
|
305
|
+
const suggestionElement = this.suggestionElement()?.nativeElement;
|
|
306
|
+
const nextTarget = event.relatedTarget;
|
|
307
|
+
if (suggestionElement && nextTarget instanceof Node && suggestionElement.contains(nextTarget)) return;
|
|
308
|
+
this.touch.emit();
|
|
309
|
+
}
|
|
310
|
+
onInput(event) {
|
|
311
|
+
const inputElement = event.target;
|
|
312
|
+
this.query.set(inputElement?.value ?? "");
|
|
313
|
+
}
|
|
314
|
+
setValue(value) {
|
|
315
|
+
if (sameValue(value, this.value())) return;
|
|
316
|
+
this.value.set(value);
|
|
317
|
+
this.selectedChange.emit(toSelected(value, this.labels()));
|
|
318
|
+
}
|
|
319
|
+
learnLabels(entries) {
|
|
320
|
+
this.labels.update((current) => {
|
|
321
|
+
let next = null;
|
|
322
|
+
for (const [value, label] of entries) {
|
|
323
|
+
if (current.get(value) === label) continue;
|
|
324
|
+
next ??= new Map(current);
|
|
325
|
+
next.set(value, label);
|
|
326
|
+
}
|
|
327
|
+
return next ?? current;
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
syncOptions() {
|
|
331
|
+
const suggestionElement = this.suggestionElement()?.nativeElement;
|
|
332
|
+
if (!suggestionElement) return;
|
|
333
|
+
const input = suggestionElement.querySelector("input");
|
|
334
|
+
const options = Array.from(suggestionElement.querySelectorAll("u-option:not([data-empty])"));
|
|
335
|
+
this.learnLabels(options.map((option) => [option.value, option.label || option.text || option.textContent?.trim() || option.value]));
|
|
336
|
+
const filter = this.filter();
|
|
337
|
+
const filterFn = filter === true ? defaultFilter : filter;
|
|
338
|
+
if (filterFn && input) {
|
|
339
|
+
let index = 0;
|
|
340
|
+
for (const option of options) {
|
|
341
|
+
option.disabled = !filterFn({
|
|
342
|
+
index,
|
|
343
|
+
input,
|
|
344
|
+
label: option.label,
|
|
345
|
+
optionElement: option,
|
|
346
|
+
text: option.text,
|
|
347
|
+
value: option.value
|
|
348
|
+
});
|
|
349
|
+
index++;
|
|
350
|
+
}
|
|
351
|
+
} else for (const option of options) option.disabled = false;
|
|
352
|
+
const visibleOptions = options.filter((option) => !option.disabled && !option.hidden);
|
|
353
|
+
const emptyOption = suggestionElement.querySelector("u-option[data-empty]");
|
|
354
|
+
if (!emptyOption) return;
|
|
355
|
+
if (visibleOptions.length === 0) {
|
|
356
|
+
emptyOption.removeAttribute("hidden");
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
emptyOption.setAttribute("hidden", "");
|
|
360
|
+
}
|
|
361
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
362
|
+
minVersion: "12.0.0",
|
|
363
|
+
version: "22.2.2",
|
|
364
|
+
ngImport: i0,
|
|
365
|
+
type: Suggestion,
|
|
366
|
+
deps: [],
|
|
367
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
368
|
+
});
|
|
369
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
370
|
+
minVersion: "17.0.0",
|
|
371
|
+
version: "22.2.2",
|
|
372
|
+
type: Suggestion,
|
|
373
|
+
isStandalone: true,
|
|
374
|
+
selector: "ksd-suggestion",
|
|
375
|
+
inputs: {
|
|
376
|
+
multiple: {
|
|
377
|
+
classPropertyName: "multiple",
|
|
378
|
+
publicName: "multiple",
|
|
379
|
+
isSignal: true,
|
|
380
|
+
isRequired: false,
|
|
381
|
+
transformFunction: null
|
|
382
|
+
},
|
|
383
|
+
creatable: {
|
|
384
|
+
classPropertyName: "creatable",
|
|
385
|
+
publicName: "creatable",
|
|
386
|
+
isSignal: true,
|
|
387
|
+
isRequired: false,
|
|
388
|
+
transformFunction: null
|
|
389
|
+
},
|
|
390
|
+
filter: {
|
|
391
|
+
classPropertyName: "filter",
|
|
392
|
+
publicName: "filter",
|
|
393
|
+
isSignal: true,
|
|
394
|
+
isRequired: false,
|
|
395
|
+
transformFunction: null
|
|
396
|
+
},
|
|
397
|
+
value: {
|
|
398
|
+
classPropertyName: "value",
|
|
399
|
+
publicName: "value",
|
|
400
|
+
isSignal: true,
|
|
401
|
+
isRequired: false,
|
|
402
|
+
transformFunction: null
|
|
403
|
+
},
|
|
404
|
+
selected: {
|
|
405
|
+
classPropertyName: "selected",
|
|
406
|
+
publicName: "selected",
|
|
407
|
+
isSignal: true,
|
|
408
|
+
isRequired: false,
|
|
409
|
+
transformFunction: null
|
|
410
|
+
},
|
|
411
|
+
dirty: {
|
|
412
|
+
classPropertyName: "dirty",
|
|
413
|
+
publicName: "dirty",
|
|
414
|
+
isSignal: true,
|
|
415
|
+
isRequired: false,
|
|
416
|
+
transformFunction: null
|
|
417
|
+
},
|
|
418
|
+
touched: {
|
|
419
|
+
classPropertyName: "touched",
|
|
420
|
+
publicName: "touched",
|
|
421
|
+
isSignal: true,
|
|
422
|
+
isRequired: false,
|
|
423
|
+
transformFunction: null
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
outputs: {
|
|
427
|
+
value: "valueChange",
|
|
428
|
+
selectedChange: "selectedChange",
|
|
429
|
+
touch: "touch"
|
|
430
|
+
},
|
|
431
|
+
queries: [{
|
|
432
|
+
propertyName: "suggestionList",
|
|
433
|
+
first: true,
|
|
434
|
+
predicate: SuggestionList,
|
|
435
|
+
descendants: true,
|
|
436
|
+
isSignal: true
|
|
437
|
+
}],
|
|
438
|
+
viewQueries: [{
|
|
439
|
+
propertyName: "suggestionElement",
|
|
440
|
+
first: true,
|
|
441
|
+
predicate: ["suggestionElement"],
|
|
442
|
+
descendants: true,
|
|
443
|
+
isSignal: true
|
|
444
|
+
}],
|
|
445
|
+
hostDirectives: [{
|
|
446
|
+
directive: i1.HostSize,
|
|
447
|
+
inputs: ["data-size", "data-size"]
|
|
448
|
+
}, {
|
|
449
|
+
directive: i1.HostColor,
|
|
450
|
+
inputs: ["data-color", "data-color"]
|
|
451
|
+
}],
|
|
452
|
+
ngImport: i0,
|
|
453
|
+
template: `
|
|
454
|
+
<ds-suggestion
|
|
455
|
+
#suggestionElement
|
|
456
|
+
class="ds-suggestion"
|
|
457
|
+
[attr.data-multiple]="multiple() || undefined"
|
|
458
|
+
[attr.data-creatable]="creatable() || undefined"
|
|
459
|
+
(comboboxbeforeselect)="onSelect($event)"
|
|
460
|
+
(focusout)="onFocusOut($event)"
|
|
461
|
+
(input)="onInput($event)"
|
|
462
|
+
>
|
|
463
|
+
@for (option of selectedArray(); track option.value) {
|
|
464
|
+
<data [attr.value]="option.value">{{ option.label }}</data>
|
|
465
|
+
}
|
|
466
|
+
<ng-content />
|
|
467
|
+
<u-datalist
|
|
468
|
+
popover="manual"
|
|
469
|
+
data-is-floating="true"
|
|
470
|
+
data-nofilter
|
|
471
|
+
[attr.data-sr-singular]="suggestionList()?.singular()"
|
|
472
|
+
[attr.data-sr-plural]="suggestionList()?.plural()"
|
|
473
|
+
>
|
|
474
|
+
@for (option of suggestionList()?.options() ?? []; track option) {
|
|
475
|
+
<u-option [value]="option.value()">
|
|
476
|
+
<ng-container *ngTemplateOutlet="option.templateRef()" />
|
|
477
|
+
</u-option>
|
|
478
|
+
}
|
|
479
|
+
@if (suggestionList()?.empty()?.templateRef(); as emptyTpl) {
|
|
480
|
+
<u-option data-empty value="" hidden>
|
|
481
|
+
<ng-container *ngTemplateOutlet="emptyTpl" />
|
|
482
|
+
</u-option>
|
|
483
|
+
}
|
|
484
|
+
</u-datalist>
|
|
485
|
+
</ds-suggestion>
|
|
486
|
+
`,
|
|
487
|
+
isInline: true,
|
|
488
|
+
styles: [":host{display:block}\n"],
|
|
489
|
+
dependencies: [{
|
|
490
|
+
kind: "directive",
|
|
491
|
+
type: NgTemplateOutlet,
|
|
492
|
+
selector: "[ngTemplateOutlet]",
|
|
493
|
+
inputs: [
|
|
494
|
+
"ngTemplateOutletContext",
|
|
495
|
+
"ngTemplateOutlet",
|
|
496
|
+
"ngTemplateOutletInjector"
|
|
497
|
+
]
|
|
498
|
+
}],
|
|
499
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
500
|
+
});
|
|
501
|
+
};
|
|
502
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
503
|
+
minVersion: "12.0.0",
|
|
504
|
+
version: "22.2.2",
|
|
505
|
+
ngImport: i0,
|
|
506
|
+
type: Suggestion,
|
|
507
|
+
decorators: [{
|
|
508
|
+
type: Component,
|
|
509
|
+
args: [{
|
|
510
|
+
selector: "ksd-suggestion",
|
|
511
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
512
|
+
hostDirectives: [{
|
|
513
|
+
directive: HostSize,
|
|
514
|
+
inputs: ["data-size"]
|
|
515
|
+
}, {
|
|
516
|
+
directive: HostColor,
|
|
517
|
+
inputs: ["data-color"]
|
|
518
|
+
}],
|
|
519
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
520
|
+
imports: [NgTemplateOutlet],
|
|
521
|
+
template: `
|
|
522
|
+
<ds-suggestion
|
|
523
|
+
#suggestionElement
|
|
524
|
+
class="ds-suggestion"
|
|
525
|
+
[attr.data-multiple]="multiple() || undefined"
|
|
526
|
+
[attr.data-creatable]="creatable() || undefined"
|
|
527
|
+
(comboboxbeforeselect)="onSelect($event)"
|
|
528
|
+
(focusout)="onFocusOut($event)"
|
|
529
|
+
(input)="onInput($event)"
|
|
530
|
+
>
|
|
531
|
+
@for (option of selectedArray(); track option.value) {
|
|
532
|
+
<data [attr.value]="option.value">{{ option.label }}</data>
|
|
533
|
+
}
|
|
534
|
+
<ng-content />
|
|
535
|
+
<u-datalist
|
|
536
|
+
popover="manual"
|
|
537
|
+
data-is-floating="true"
|
|
538
|
+
data-nofilter
|
|
539
|
+
[attr.data-sr-singular]="suggestionList()?.singular()"
|
|
540
|
+
[attr.data-sr-plural]="suggestionList()?.plural()"
|
|
541
|
+
>
|
|
542
|
+
@for (option of suggestionList()?.options() ?? []; track option) {
|
|
543
|
+
<u-option [value]="option.value()">
|
|
544
|
+
<ng-container *ngTemplateOutlet="option.templateRef()" />
|
|
545
|
+
</u-option>
|
|
546
|
+
}
|
|
547
|
+
@if (suggestionList()?.empty()?.templateRef(); as emptyTpl) {
|
|
548
|
+
<u-option data-empty value="" hidden>
|
|
549
|
+
<ng-container *ngTemplateOutlet="emptyTpl" />
|
|
550
|
+
</u-option>
|
|
551
|
+
}
|
|
552
|
+
</u-datalist>
|
|
553
|
+
</ds-suggestion>
|
|
554
|
+
`,
|
|
555
|
+
styles: [":host{display:block}\n"]
|
|
556
|
+
}]
|
|
557
|
+
}],
|
|
558
|
+
ctorParameters: () => [],
|
|
559
|
+
propDecorators: {
|
|
560
|
+
multiple: [{
|
|
561
|
+
type: i0.Input,
|
|
562
|
+
args: [{
|
|
563
|
+
isSignal: true,
|
|
564
|
+
alias: "multiple",
|
|
565
|
+
required: false
|
|
566
|
+
}]
|
|
567
|
+
}],
|
|
568
|
+
creatable: [{
|
|
569
|
+
type: i0.Input,
|
|
570
|
+
args: [{
|
|
571
|
+
isSignal: true,
|
|
572
|
+
alias: "creatable",
|
|
573
|
+
required: false
|
|
574
|
+
}]
|
|
575
|
+
}],
|
|
576
|
+
filter: [{
|
|
577
|
+
type: i0.Input,
|
|
578
|
+
args: [{
|
|
579
|
+
isSignal: true,
|
|
580
|
+
alias: "filter",
|
|
581
|
+
required: false
|
|
582
|
+
}]
|
|
583
|
+
}],
|
|
584
|
+
value: [{
|
|
585
|
+
type: i0.Input,
|
|
586
|
+
args: [{
|
|
587
|
+
isSignal: true,
|
|
588
|
+
alias: "value",
|
|
589
|
+
required: false
|
|
590
|
+
}]
|
|
591
|
+
}, {
|
|
592
|
+
type: i0.Output,
|
|
593
|
+
args: ["valueChange"]
|
|
594
|
+
}],
|
|
595
|
+
selected: [{
|
|
596
|
+
type: i0.Input,
|
|
597
|
+
args: [{
|
|
598
|
+
isSignal: true,
|
|
599
|
+
alias: "selected",
|
|
600
|
+
required: false
|
|
601
|
+
}]
|
|
602
|
+
}],
|
|
603
|
+
selectedChange: [{
|
|
604
|
+
type: i0.Output,
|
|
605
|
+
args: ["selectedChange"]
|
|
606
|
+
}],
|
|
607
|
+
dirty: [{
|
|
608
|
+
type: i0.Input,
|
|
609
|
+
args: [{
|
|
610
|
+
isSignal: true,
|
|
611
|
+
alias: "dirty",
|
|
612
|
+
required: false
|
|
613
|
+
}]
|
|
614
|
+
}],
|
|
615
|
+
touched: [{
|
|
616
|
+
type: i0.Input,
|
|
617
|
+
args: [{
|
|
618
|
+
isSignal: true,
|
|
619
|
+
alias: "touched",
|
|
620
|
+
required: false
|
|
621
|
+
}]
|
|
622
|
+
}],
|
|
623
|
+
touch: [{
|
|
624
|
+
type: i0.Output,
|
|
625
|
+
args: ["touch"]
|
|
626
|
+
}],
|
|
627
|
+
suggestionElement: [{
|
|
628
|
+
type: i0.ViewChild,
|
|
629
|
+
args: ["suggestionElement", { isSignal: true }]
|
|
630
|
+
}],
|
|
631
|
+
suggestionList: [{
|
|
632
|
+
type: i0.ContentChild,
|
|
633
|
+
args: [i0.forwardRef(() => SuggestionList), { isSignal: true }]
|
|
634
|
+
}]
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
export { Suggestion, SuggestionList, SuggestionListEmpty, SuggestionListOption };
|
|
638
|
+
|
|
639
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-suggestion.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-suggestion.mjs","names":[],"sources":["../../../../packages/angular/suggestion/src/suggestion-list-empty.ts","../../../../packages/angular/suggestion/src/suggestion-list-option.ts","../../../../packages/angular/suggestion/src/suggestion-list.ts","../../../../packages/angular/suggestion/src/suggestion.utils.ts","../../../../packages/angular/suggestion/src/suggestion.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n viewChild,\n} from '@angular/core'\n\n@Component({\n selector: 'ksd-suggestion-list-empty',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: ` <ng-template #tpl><ng-content /></ng-template> `,\n})\nexport class SuggestionListEmpty {\n /**\n * Hack to get the content from parent component so that we can\n * keep the dom structure needed without additional host elements\n */\n templateRef = viewChild<TemplateRef<unknown>>('tpl')\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n TemplateRef,\n viewChild,\n} from '@angular/core'\n\n@Component({\n selector: 'ksd-suggestion-list-option',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [],\n template: ` <ng-template #tpl><ng-content /></ng-template> `,\n})\nexport class SuggestionListOption {\n /**\n * Hack to get the content from parent component so that we can\n * keep the dom structure needed without additional host elements\n */\n templateRef = viewChild<TemplateRef<unknown>>('tpl')\n\n value = input.required<string>()\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n contentChildren,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n} from '@angular/core'\nimport { SuggestionListEmpty } from './suggestion-list-empty'\nimport { SuggestionListOption } from './suggestion-list-option'\n\n@Component({\n selector: 'ksd-suggestion-list',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n host: {\n style: 'display: none;',\n },\n template: ``,\n})\nexport class SuggestionList {\n /**\n * Screen reader announcement template for singular result count.\n *\n * @default '%d forslag'\n */\n readonly singular = input('%d forslag')\n\n /**\n * Screen reader announcement template for plural result count.\n *\n * @default '%d forslag'\n */\n readonly plural = input('%d forslag')\n\n readonly options = contentChildren(SuggestionListOption, {\n descendants: true,\n })\n\n readonly empty = contentChild(SuggestionListEmpty)\n}\n","import type {\n SuggestionItem,\n SuggestionSelected,\n SuggestionSelectedInput,\n SuggestionValue,\n} from './suggestion.types'\n\nexport const isSuggestionItem = (\n value: SuggestionItem | string | null | undefined,\n): value is SuggestionItem =>\n typeof value === 'object' &&\n value !== null &&\n 'label' in value &&\n 'value' in value\n\nconst sanitizeValues = (\n values: SuggestionSelectedInput,\n): Array<SuggestionItem | string> =>\n values == null ? [] : Array.isArray(values) ? values : [values]\n\nconst toValues = (value: SuggestionValue): string[] =>\n value == null ? [] : Array.isArray(value) ? value : [value]\n\n/** Option labels keyed by option value, learned from options and selections. */\nexport type SuggestionLabels = ReadonlyMap<string, string>\n\n/** Extracts the labels carried by any items passed to `[selected]`. */\nexport const labelEntries = (\n values: SuggestionSelectedInput,\n): Array<[string, string]> =>\n sanitizeValues(values)\n .filter(isSuggestionItem)\n .map((item) => [item.value, item.label])\n\n/** Normalizes anything accepted by `[selected]` into the primitive value model. */\nexport const toValue = (values: SuggestionSelectedInput): SuggestionValue => {\n if (values == null) return undefined\n\n const primitives = sanitizeValues(values).map((value) =>\n isSuggestionItem(value) ? value.value : value,\n )\n\n return Array.isArray(values) ? primitives : primitives[0]\n}\n\nexport const resolveItems = (\n value: SuggestionValue,\n labels: SuggestionLabels,\n): SuggestionItem[] =>\n toValues(value).map((optionValue) => ({\n label: labels.get(optionValue) ?? optionValue,\n value: optionValue,\n }))\n\n/** Resolves a primitive value into items, using known labels where available. */\nexport const toSelected = (\n value: SuggestionValue,\n labels: SuggestionLabels,\n): SuggestionSelected => {\n if (value == null) return undefined\n\n const items = resolveItems(value, labels)\n return Array.isArray(value) ? items : items[0]\n}\n\nexport const sameValue = (left: SuggestionValue, right: SuggestionValue) => {\n if (Array.isArray(left) && Array.isArray(right)) {\n return (\n left.length === right.length &&\n left.every((value, index) => value === right[index])\n )\n }\n\n return left === right\n}\n\nexport const nextSelected = (\n data: HTMLDataElement,\n previous: SuggestionValue,\n multiple: boolean,\n): SuggestionValue => {\n const value = data.value\n\n if (!multiple) return data.isConnected ? undefined : value\n\n const previousValues = toValues(previous)\n\n return data.isConnected\n ? previousValues.filter((previousValue) => previousValue !== value)\n : [...previousValues, value]\n}\n","import { NgTemplateOutlet } from '@angular/common'\nimport {\n afterRenderEffect,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n input,\n model,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core'\nimport type { FormValueControl } from '@angular/forms/signals'\n// Main entrypoint on purpose: u-datalist, which ds-suggestion filtering needs, has no subpath export\nimport '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\nimport { SuggestionList } from './suggestion-list'\nimport type {\n SuggestionFilter,\n SuggestionFilterArgs,\n SuggestionSelected,\n SuggestionSelectedInput,\n SuggestionValue,\n} from './suggestion.types'\nimport type { SuggestionLabels } from './suggestion.utils'\nimport {\n labelEntries,\n nextSelected,\n resolveItems,\n sameValue,\n toSelected,\n toValue,\n} from './suggestion.utils'\n\nconst defaultFilter = ({ label, input }: SuggestionFilterArgs) =>\n label.toLowerCase().includes(input.value.trim().toLowerCase())\n\n// Distinguishes an unbound `selected` from one explicitly bound to `undefined`.\nconst UNSET = Symbol('unset')\n\n@Component({\n selector: 'ksd-suggestion',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [NgTemplateOutlet],\n styles: `\n :host {\n display: block;\n }\n `,\n template: `\n <ds-suggestion\n #suggestionElement\n class=\"ds-suggestion\"\n [attr.data-multiple]=\"multiple() || undefined\"\n [attr.data-creatable]=\"creatable() || undefined\"\n (comboboxbeforeselect)=\"onSelect($event)\"\n (focusout)=\"onFocusOut($event)\"\n (input)=\"onInput($event)\"\n >\n @for (option of selectedArray(); track option.value) {\n <data [attr.value]=\"option.value\">{{ option.label }}</data>\n }\n <ng-content />\n <u-datalist\n popover=\"manual\"\n data-is-floating=\"true\"\n data-nofilter\n [attr.data-sr-singular]=\"suggestionList()?.singular()\"\n [attr.data-sr-plural]=\"suggestionList()?.plural()\"\n >\n @for (option of suggestionList()?.options() ?? []; track option) {\n <u-option [value]=\"option.value()\">\n <ng-container *ngTemplateOutlet=\"option.templateRef()\" />\n </u-option>\n }\n @if (suggestionList()?.empty()?.templateRef(); as emptyTpl) {\n <u-option data-empty value=\"\" hidden>\n <ng-container *ngTemplateOutlet=\"emptyTpl\" />\n </u-option>\n }\n </u-datalist>\n </ds-suggestion>\n `,\n})\nexport class Suggestion implements FormValueControl<SuggestionValue> {\n /**\n * Allows the user to select multiple items\n *\n * @default false\n */\n multiple = input(false, { transform: booleanAttribute })\n\n /**\n * Allows the user to create new items\n *\n * @default false\n */\n creatable = input(false, { transform: booleanAttribute })\n\n /**\n * Filter options; boolean or a custom callback.\n *\n * @default true\n */\n filter = input<boolean | SuggestionFilter>(true)\n\n /**\n * Current value, as primitive option values. Bound by Angular signal forms.\n *\n * @default undefined\n */\n readonly value = model<SuggestionValue>(undefined)\n\n /**\n * Controlled selection. Accepts items or raw option values.\n *\n * @default undefined\n */\n readonly selected = input<SuggestionSelectedInput | typeof UNSET>(UNSET)\n\n /**\n * Emits the resolved selection whenever the user changes it.\n */\n readonly selectedChange = output<SuggestionSelected>()\n\n /**\n * Form-control dirty state.\n *\n * @default false\n */\n readonly dirty = input(false, { transform: booleanAttribute })\n\n /**\n * Whether the control has been touched. Bound by Angular signal forms.\n *\n * @default false\n */\n readonly touched = input(false, { transform: booleanAttribute })\n\n /**\n * Emits when focus leaves the control, marking the bound form field as touched.\n */\n readonly touch = output<void>()\n\n protected selectedArray = computed(() =>\n resolveItems(this.value(), this.labels()),\n )\n private readonly suggestionElement =\n viewChild<ElementRef<HTMLElement>>('suggestionElement')\n private readonly labels = signal<SuggestionLabels>(new Map())\n private readonly query = signal('')\n protected readonly suggestionList = contentChild(SuggestionList)\n\n constructor() {\n // Runs after render, so projected options are present in the DOM.\n afterRenderEffect(() => {\n this.query()\n this.filter()\n this.suggestionList()?.options()\n this.syncOptions()\n })\n\n // Apply the controlled `selected` input, when bound, to the value model.\n effect(() => {\n const selected = this.selected()\n if (selected === UNSET) return\n\n untracked(() => this.learnLabels(labelEntries(selected)))\n\n const next = toValue(selected)\n if (\n sameValue(\n next,\n untracked(() => this.value()),\n )\n )\n return\n\n untracked(() => this.value.set(next))\n })\n }\n\n protected onSelect(event: Event) {\n const customEvent = event as CustomEvent<HTMLDataElement | undefined>\n customEvent.preventDefault()\n\n const data = customEvent.detail\n if (!data) return\n\n this.learnLabels([[data.value, data.textContent?.trim() || data.value]])\n this.setValue(nextSelected(data, this.value(), this.multiple()))\n }\n\n protected onFocusOut(event: FocusEvent) {\n const suggestionElement = this.suggestionElement()?.nativeElement\n const nextTarget = event.relatedTarget\n\n // Ignore focus changes within the composite widget; only mark touched\n // when focus leaves the suggestion control entirely.\n if (\n suggestionElement &&\n nextTarget instanceof Node &&\n suggestionElement.contains(nextTarget)\n ) {\n return\n }\n\n this.touch.emit()\n }\n\n protected onInput(event: Event) {\n const inputElement = event.target as HTMLInputElement | null\n this.query.set(inputElement?.value ?? '')\n }\n\n private setValue(value: SuggestionValue) {\n if (sameValue(value, this.value())) return\n\n this.value.set(value)\n this.selectedChange.emit(toSelected(value, this.labels()))\n }\n\n private learnLabels(entries: Iterable<readonly [string, string]>) {\n this.labels.update((current) => {\n let next: Map<string, string> | null = null\n\n for (const [value, label] of entries) {\n if (current.get(value) === label) continue\n\n next ??= new Map(current)\n next.set(value, label)\n }\n\n return next ?? current\n })\n }\n\n private syncOptions() {\n const suggestionElement = this.suggestionElement()?.nativeElement\n if (!suggestionElement) return\n\n const input = suggestionElement.querySelector<HTMLInputElement>('input')\n\n const options = Array.from(\n suggestionElement.querySelectorAll<HTMLOptionElement>(\n 'u-option:not([data-empty])',\n ),\n )\n\n this.learnLabels(\n options.map((option) => [\n option.value,\n option.label ||\n option.text ||\n option.textContent?.trim() ||\n option.value,\n ]),\n )\n\n const filter = this.filter()\n const filterFn = filter === true ? defaultFilter : filter\n\n if (filterFn && input) {\n let index = 0\n for (const option of options) {\n option.disabled = !filterFn({\n index,\n input,\n label: option.label,\n optionElement: option,\n text: option.text,\n value: option.value,\n })\n index++\n }\n } else {\n for (const option of options) {\n option.disabled = false\n }\n }\n\n const visibleOptions = options.filter(\n (option) => !option.disabled && !option.hidden,\n )\n const emptyOption = suggestionElement.querySelector<HTMLOptionElement>(\n 'u-option[data-empty]',\n )\n\n if (!emptyOption) return\n\n if (visibleOptions.length === 0) {\n emptyOption.removeAttribute('hidden')\n return\n }\n\n emptyOption.setAttribute('hidden', '')\n }\n}\n"],"mappings":";;;;;;AAYA,IAAa,sBAAb,MAAa,oBAAmB;CAK9B,cAAc,UAAgC,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CALzC,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAmB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAnB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAmB,cAAA;EAAA,UAAA;EAAA,aAAA,CAAA;GAAA,cAAA;GAAA,OAAA;GAAA,WAAA,CAAA,KAAA;GAAA,aAAA;GAAA,UAAA;EAAA,CAAA;EAAA,UAAA;EAAA,UAFpB;EAAkD,UAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAEjD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA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