@ks-digital/designsystem-angular 0.0.1-alpha.68 → 0.0.1-alpha.69
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/ks-digital-designsystem-angular-__internals.mjs +9 -9
- package/fesm2022/ks-digital-designsystem-angular-alert.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-button.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-card.mjs +6 -6
- package/fesm2022/ks-digital-designsystem-angular-chip.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-details.mjs +9 -9
- package/fesm2022/ks-digital-designsystem-angular-dialog.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-forms.mjs +24 -24
- package/fesm2022/ks-digital-designsystem-angular-heading.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-link.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-pagination.mjs +6 -6
- package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-popover.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-search.mjs +12 -12
- package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs +142 -42
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-table.mjs +6 -6
- package/fesm2022/ks-digital-designsystem-angular-tabs.mjs +12 -12
- package/fesm2022/ks-digital-designsystem-angular-tag.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs +3 -3
- package/package.json +3 -2
- package/types/ks-digital-designsystem-angular-suggestion.d.ts +42 -7
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "https://github.com/ks-no/designsystem.git",
|
|
6
6
|
"directory": "packages/angular"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.0.1-alpha.
|
|
8
|
+
"version": "0.0.1-alpha.69",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"private": false,
|
|
11
11
|
"publishConfig": {
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"@angular/common": ">= 21.0.0 < 22.0.0",
|
|
20
|
-
"@angular/core": ">= 21.0.0 < 22.0.0"
|
|
20
|
+
"@angular/core": ">= 21.0.0 < 22.0.0",
|
|
21
|
+
"@angular/forms": ">= 21.0.0 < 22.0.0"
|
|
21
22
|
},
|
|
22
23
|
"module": "fesm2022/ks-digital-designsystem-angular.mjs",
|
|
23
24
|
"typings": "types/ks-digital-designsystem-angular.d.ts",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import * as _ks_digital_designsystem_angular_suggestion from '@ks-digital/designsystem-angular/suggestion';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { TemplateRef } from '@angular/core';
|
|
4
|
+
import { FormValueControl } from '@angular/forms/signals';
|
|
3
5
|
import * as i1 from '@ks-digital/designsystem-angular/__internals';
|
|
4
6
|
|
|
5
7
|
declare class SuggestionListEmpty {
|
|
@@ -46,6 +48,12 @@ type SuggestionItem = {
|
|
|
46
48
|
label: string;
|
|
47
49
|
value: string;
|
|
48
50
|
};
|
|
51
|
+
/** Value of the `value` model and Angular signal forms. Always primitive. */
|
|
52
|
+
type SuggestionValue = string | string[] | undefined;
|
|
53
|
+
/** Accepted by `[selected]`; items and raw option values are both allowed. */
|
|
54
|
+
type SuggestionSelectedInput = SuggestionItem | SuggestionItem[] | string | string[] | null | undefined;
|
|
55
|
+
/** Emitted by `(selectedChange)`. Always resolved items. */
|
|
56
|
+
type SuggestionSelected = SuggestionItem | SuggestionItem[] | undefined;
|
|
49
57
|
type SuggestionFilterArgs = {
|
|
50
58
|
index: number;
|
|
51
59
|
label: string;
|
|
@@ -56,7 +64,8 @@ type SuggestionFilterArgs = {
|
|
|
56
64
|
};
|
|
57
65
|
type SuggestionFilter = (args: SuggestionFilterArgs) => boolean;
|
|
58
66
|
|
|
59
|
-
declare
|
|
67
|
+
declare const UNSET: unique symbol;
|
|
68
|
+
declare class Suggestion implements FormValueControl<SuggestionValue> {
|
|
60
69
|
/**
|
|
61
70
|
* Allows the user to select multiple items
|
|
62
71
|
*
|
|
@@ -76,22 +85,48 @@ declare class Suggestion {
|
|
|
76
85
|
*/
|
|
77
86
|
filter: _angular_core.InputSignal<boolean | SuggestionFilter>;
|
|
78
87
|
/**
|
|
79
|
-
*
|
|
88
|
+
* Current value, as primitive option values. Bound by Angular signal forms.
|
|
80
89
|
*
|
|
81
90
|
* @default undefined
|
|
82
91
|
*/
|
|
83
|
-
|
|
84
|
-
|
|
92
|
+
readonly value: _angular_core.ModelSignal<SuggestionValue>;
|
|
93
|
+
/**
|
|
94
|
+
* Controlled selection. Accepts items or raw option values.
|
|
95
|
+
*
|
|
96
|
+
* @default undefined
|
|
97
|
+
*/
|
|
98
|
+
readonly selected: _angular_core.InputSignal<SuggestionSelectedInput | typeof UNSET>;
|
|
99
|
+
/**
|
|
100
|
+
* Emits the resolved selection whenever the user changes it.
|
|
101
|
+
*/
|
|
102
|
+
readonly selectedChange: _angular_core.OutputEmitterRef<SuggestionSelected>;
|
|
103
|
+
/**
|
|
104
|
+
* Form-control dirty state.
|
|
105
|
+
*
|
|
106
|
+
* @default false
|
|
107
|
+
*/
|
|
108
|
+
readonly dirty: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
109
|
+
/**
|
|
110
|
+
* Whether the control has been touched. Synced with Angular signal forms.
|
|
111
|
+
*
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
readonly touched: _angular_core.ModelSignal<boolean>;
|
|
115
|
+
protected selectedArray: _angular_core.Signal<_ks_digital_designsystem_angular_suggestion.SuggestionItem[]>;
|
|
85
116
|
private readonly suggestionElement;
|
|
117
|
+
private readonly labels;
|
|
118
|
+
private readonly query;
|
|
86
119
|
protected readonly suggestionList: _angular_core.Signal<SuggestionList | undefined>;
|
|
87
120
|
constructor();
|
|
88
121
|
protected onSelect(event: Event): void;
|
|
89
|
-
protected
|
|
122
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
90
123
|
protected onInput(event: Event): void;
|
|
124
|
+
private setValue;
|
|
125
|
+
private learnLabels;
|
|
91
126
|
private syncOptions;
|
|
92
127
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Suggestion, never>;
|
|
93
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Suggestion, "ksd-suggestion", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "creatable": { "alias": "creatable"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, { "
|
|
128
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Suggestion, "ksd-suggestion", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "creatable": { "alias": "creatable"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "dirty": { "alias": "dirty"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "selectedChange": "selectedChange"; "touched": "touchedChange"; }, ["suggestionList"], ["*"], true, [{ directive: typeof i1.HostSize; inputs: { "data-size": "data-size"; }; outputs: {}; }, { directive: typeof i1.HostColor; inputs: { "data-color": "data-color"; }; outputs: {}; }]>;
|
|
94
129
|
}
|
|
95
130
|
|
|
96
131
|
export { Suggestion, SuggestionList, SuggestionListEmpty, SuggestionListOption };
|
|
97
|
-
export type { SuggestionFilter, SuggestionFilterArgs, SuggestionItem };
|
|
132
|
+
export type { SuggestionFilter, SuggestionFilterArgs, SuggestionItem, SuggestionSelected, SuggestionSelectedInput, SuggestionValue };
|