@agorapulse/ui-components 22.5.5 → 22.5.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agorapulse-ui-components-22.5.7-beta.1.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +103 -49
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-i18n.mjs +34 -2
- package/fesm2022/agorapulse-ui-components-i18n.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-input-search.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-input-search.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-labels-selector.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-labels-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs +11 -15
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-select.mjs +4 -189
- package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs +4 -48
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs.map +1 -1
- package/package.json +1 -1
- package/types/agorapulse-ui-components-filter-dropdown.d.ts +83 -59
- package/types/agorapulse-ui-components-i18n.d.ts +27 -2
- package/types/agorapulse-ui-components-select.d.ts +2 -38
- package/types/agorapulse-ui-components-selection-dropdown.d.ts +2 -14
- package/agorapulse-ui-components-22.5.5.tgz +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { AvatarNetwork } from '@agorapulse/ui-components/avatar';
|
|
2
2
|
import { Locale, FirstDayOfWeek, Period } from '@agorapulse/ui-components/datepicker';
|
|
3
|
+
import * as _agorapulse_ui_components_i18n from '@agorapulse/ui-components/i18n';
|
|
4
|
+
import { I18nOf } from '@agorapulse/ui-components/i18n';
|
|
5
|
+
import * as _agorapulse_ui_components_infobox from '@agorapulse/ui-components/infobox';
|
|
3
6
|
import { InfoboxType } from '@agorapulse/ui-components/infobox';
|
|
4
7
|
import dayjs from 'dayjs';
|
|
5
8
|
import { SelectLabelSingleDisplayType } from '@agorapulse/ui-components/select';
|
|
@@ -9,39 +12,43 @@ import * as _angular_core from '@angular/core';
|
|
|
9
12
|
import { ActionDropdownItem } from '@agorapulse/ui-components/action-dropdown';
|
|
10
13
|
import { DropdownOverlay } from '@agorapulse/ui-components/dropdown-base';
|
|
11
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Names the buttons of the filter dropdown footer and of its preset menu, as keys of the `i18n` input of
|
|
17
|
+
* `ap-filter-dropdown` and `ap-filter-dropdown-button`.
|
|
18
|
+
*/
|
|
19
|
+
type FilterDropdownActionKey = 'applyFilters' | 'clearFilters' | 'resetFilters' | 'savePreset' | 'saveNewPresets' | 'saveAsNewPreset' | 'updateExistingPreset';
|
|
12
20
|
type FilterDropdownType = 'checkbox' | 'radio' | 'toggle' | 'select' | 'date-range';
|
|
13
21
|
interface FilterDropdownItemCheckbox {
|
|
14
|
-
|
|
22
|
+
i18n: I18nOf<'label'>;
|
|
15
23
|
name: string;
|
|
16
24
|
disabled?: boolean;
|
|
17
25
|
}
|
|
18
26
|
interface FilterDropdownItemRadio {
|
|
19
|
-
|
|
27
|
+
i18n: I18nOf<'label'>;
|
|
20
28
|
radioId: string;
|
|
21
29
|
value: unknown;
|
|
22
30
|
disabled?: boolean;
|
|
23
31
|
}
|
|
24
32
|
interface FilterDropdownItemToggle {
|
|
25
|
-
|
|
33
|
+
i18n: I18nOf<'label'>;
|
|
26
34
|
name: string;
|
|
27
35
|
disabled?: boolean;
|
|
28
36
|
}
|
|
29
37
|
interface FilterDropdownItemSelect {
|
|
30
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Texts of the option: `label`, an optional `caption` line, `disabledTooltip` saying why the option is disabled,
|
|
40
|
+
* `badge`, and `group`, the title the option is listed under. Options are grouped by the translated `group` text;
|
|
41
|
+
* options without one are listed without a title.
|
|
42
|
+
*/
|
|
43
|
+
i18n: I18nOf<'label', 'caption' | 'disabledTooltip' | 'badge' | 'group'>;
|
|
31
44
|
value: unknown;
|
|
32
45
|
featureLocked?: boolean;
|
|
33
|
-
caption?: string;
|
|
34
46
|
avatarUrl?: string;
|
|
35
47
|
symbolId?: string;
|
|
36
48
|
disabled?: boolean;
|
|
37
|
-
/** Why the option is disabled, shown in a tooltip while it is. */
|
|
38
|
-
disabledTooltip?: string;
|
|
39
|
-
badgeText?: string;
|
|
40
49
|
network?: AvatarNetwork;
|
|
41
50
|
dividerEnabled?: boolean;
|
|
42
51
|
tagColor?: TagColor;
|
|
43
|
-
/** Title of the group the item is listed under; items without one are listed without a title. */
|
|
44
|
-
group?: string;
|
|
45
52
|
}
|
|
46
53
|
interface FilterDropdownValueCheckbox {
|
|
47
54
|
filterType: 'checkbox';
|
|
@@ -80,7 +87,7 @@ interface FilterValueEdit {
|
|
|
80
87
|
}
|
|
81
88
|
/** An optional link rendered before the infobox message (e.g. "Connect an Ad account"). */
|
|
82
89
|
interface FilterDropdownInfoboxLink {
|
|
83
|
-
|
|
90
|
+
i18n: I18nOf<'label'>;
|
|
84
91
|
/** When set, the link navigates to this URL. When omitted, activating it emits `infoboxLinkClick` instead. */
|
|
85
92
|
href?: string;
|
|
86
93
|
}
|
|
@@ -89,36 +96,31 @@ interface FilterDropdownInfoboxLink {
|
|
|
89
96
|
* Pass it to the `infobox` input to surface contextual information such as a link.
|
|
90
97
|
*/
|
|
91
98
|
interface FilterDropdownInfobox {
|
|
92
|
-
/** The message shown in the infobox. */
|
|
93
|
-
|
|
99
|
+
/** The `message` shown in the infobox and an optional `title` shown above it. */
|
|
100
|
+
i18n: I18nOf<'message', 'title'>;
|
|
94
101
|
/** The infobox style. Defaults to `'info'`. */
|
|
95
102
|
type?: InfoboxType;
|
|
96
|
-
/** An optional title shown above the message. */
|
|
97
|
-
title?: string;
|
|
98
103
|
/** An optional link rendered before the message. */
|
|
99
104
|
link?: FilterDropdownInfoboxLink;
|
|
100
105
|
}
|
|
106
|
+
type GroupTextRole = 'caption' | 'tooltip' | 'placeholder' | 'featureLockTooltip';
|
|
107
|
+
type SelectGroupTextRole = GroupTextRole | 'inlineLabel' | 'only' | 'searchPlaceholder';
|
|
101
108
|
interface FilterDropdownGroupBase {
|
|
102
109
|
/** Unique key to identify this filter in the output */
|
|
103
110
|
key: string;
|
|
104
|
-
/**
|
|
105
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Texts of the group: its `title`, an optional `caption` under the title, a `tooltip` shown on an "info" symbol
|
|
113
|
+
* next to the title, the input `placeholder`, and `featureLockTooltip` shown on the lock of a feature-locked group.
|
|
114
|
+
*/
|
|
115
|
+
i18n: I18nOf<'title', GroupTextRole>;
|
|
106
116
|
/**
|
|
107
117
|
* The *initial* expanded (open) / collapsed state of the filter group. Only applicable if `closable` is true.
|
|
108
118
|
* This seeds the state on the first render; afterwards the live expand/collapse state is owned by the component
|
|
109
119
|
* and is never written back to this config. Use the dropdown's `expandOnOpen` input to re-derive it on each open.
|
|
110
120
|
*/
|
|
111
121
|
expanded?: boolean;
|
|
112
|
-
/** An optional label to display under the filter group title */
|
|
113
|
-
label?: string;
|
|
114
|
-
/** An optional tooltip text that if presents has the symbol "info" next to the title and shows the tooltip on hover. */
|
|
115
|
-
tooltipText?: string;
|
|
116
|
-
/** An optional placeholder in the input value */
|
|
117
|
-
placeholder?: string;
|
|
118
122
|
/** Whether the group is feature locked */
|
|
119
123
|
featureLocked?: boolean;
|
|
120
|
-
/** Whether the group is feature locked */
|
|
121
|
-
featureLockTooltipText?: string;
|
|
122
124
|
}
|
|
123
125
|
interface FilterDropdownGroupCheckbox extends FilterDropdownGroupBase {
|
|
124
126
|
/** The type of the FilterDropdownGroupBase */
|
|
@@ -136,25 +138,27 @@ interface FilterDropdownGroupToggle extends FilterDropdownGroupBase {
|
|
|
136
138
|
item: FilterDropdownItemToggle;
|
|
137
139
|
}
|
|
138
140
|
interface FilterDropdownGroupSelectSingle extends FilterDropdownGroupBase {
|
|
139
|
-
/**
|
|
140
|
-
|
|
141
|
+
/**
|
|
142
|
+
* Texts of the group: those of every group, plus `inlineLabel` shown next to the selection, `searchPlaceholder`
|
|
143
|
+
* of the search input when `searchable`, and `only`, unused since a single-selection option has no "only" shortcut.
|
|
144
|
+
*/
|
|
145
|
+
i18n: I18nOf<'title', SelectGroupTextRole>;
|
|
141
146
|
/** The type of the FilterDropdownGroupBase */
|
|
142
147
|
filterType: 'select';
|
|
143
148
|
/** Whether the select allows single selection */
|
|
144
149
|
selectionType: 'single';
|
|
145
150
|
/** An optional type to determine the icon/avatar/symbol to display for each item. Only applicable for select filter groups. */
|
|
146
151
|
displayType: SelectLabelSingleDisplayType;
|
|
147
|
-
/** Unused: a single-selection option carries no "only" shortcut. */
|
|
148
|
-
onlyText?: string;
|
|
149
152
|
/** Whether the dropdown panel shows a search input to filter the options. */
|
|
150
153
|
searchable?: boolean;
|
|
151
|
-
/** An optional placeholder for the search input. Only applicable when `searchable` is true. */
|
|
152
|
-
searchPlaceholder?: string;
|
|
153
154
|
items: FilterDropdownItemSelect[];
|
|
154
155
|
}
|
|
155
156
|
interface FilterDropdownGroupSelectMultiple extends FilterDropdownGroupBase {
|
|
156
|
-
/**
|
|
157
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Texts of the group: those of every group, plus `inlineLabel` shown next to the selection, `searchPlaceholder`
|
|
159
|
+
* of the search input when `searchable`, and `only`, the label of the "only" shortcut, "Only" when omitted.
|
|
160
|
+
*/
|
|
161
|
+
i18n: I18nOf<'title', SelectGroupTextRole>;
|
|
158
162
|
/** The type of the FilterDropdownGroupBase */
|
|
159
163
|
filterType: 'select';
|
|
160
164
|
/** Whether the select allows single or multiple selection */
|
|
@@ -163,14 +167,10 @@ interface FilterDropdownGroupSelectMultiple extends FilterDropdownGroupBase {
|
|
|
163
167
|
displayType: SelectLabelSingleDisplayType;
|
|
164
168
|
/** Whether each option carries a shortcut narrowing the selection down to that option alone. */
|
|
165
169
|
onlyEnabled?: boolean;
|
|
166
|
-
/** The label of that shortcut, "Only" when omitted. */
|
|
167
|
-
onlyText?: string;
|
|
168
170
|
/** Default chip color in `tag` display mode — applies to items without a per-item `tagColor` and to the "+N" overflow chip. */
|
|
169
171
|
tagColor?: TagColor;
|
|
170
172
|
/** Whether the dropdown panel shows a search input to filter the options. */
|
|
171
173
|
searchable?: boolean;
|
|
172
|
-
/** An optional placeholder for the search input. Only applicable when `searchable` is true. */
|
|
173
|
-
searchPlaceholder?: string;
|
|
174
174
|
items: FilterDropdownItemSelect[];
|
|
175
175
|
}
|
|
176
176
|
interface FilterDropdownGroupDateRange extends FilterDropdownGroupBase {
|
|
@@ -272,6 +272,7 @@ declare class FilterState {
|
|
|
272
272
|
declare class FilterDropdownComponent implements DropdownOverlay {
|
|
273
273
|
private readonly panel;
|
|
274
274
|
readonly filterState: FilterState;
|
|
275
|
+
private readonly resolveTexts;
|
|
275
276
|
/**
|
|
276
277
|
* Seed the component state from its inputs. This is the ONLY reactive path and it is silent:
|
|
277
278
|
* it just copies inputs into `FilterState`. It never emits — emitting lives exclusively in the
|
|
@@ -281,6 +282,15 @@ declare class FilterDropdownComponent implements DropdownOverlay {
|
|
|
281
282
|
syncFromInputs: _angular_core.EffectRef;
|
|
282
283
|
/** An optional infobox shown at the bottom of the popup content, above the footer (e.g. a link). */
|
|
283
284
|
infobox: _angular_core.InputSignal<FilterDropdownInfobox | null>;
|
|
285
|
+
protected readonly infoboxView: _angular_core.Signal<{
|
|
286
|
+
type: _agorapulse_ui_components_infobox.InfoboxType;
|
|
287
|
+
title: string | undefined;
|
|
288
|
+
message: string;
|
|
289
|
+
link: {
|
|
290
|
+
href: string | undefined;
|
|
291
|
+
label: string;
|
|
292
|
+
} | undefined;
|
|
293
|
+
} | null>;
|
|
284
294
|
/**
|
|
285
295
|
* The filter groups to display: STRUCTURE only (keys, titles, options, locks, display type, and the
|
|
286
296
|
* optional initial `expanded` seed). Not a value binding — selection lives in `value`, never here.
|
|
@@ -319,15 +329,21 @@ declare class FilterDropdownComponent implements DropdownOverlay {
|
|
|
319
329
|
readonly placement: _angular_core.InputSignal<_floating_ui_utils.Placement | undefined>;
|
|
320
330
|
/** Extra class(es) set on the body-appended overlay pane, so a consumer can scope global styles to this dropdown. */
|
|
321
331
|
panelClass: _angular_core.InputSignal<string | string[]>;
|
|
322
|
-
/**
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
332
|
+
/**
|
|
333
|
+
* Texts of the dialog: `ariaLabel` names it, and each {@link FilterDropdownActionKey} words its button.
|
|
334
|
+
* A key left out falls back to its `ui-components.filters.*` default.
|
|
335
|
+
*/
|
|
336
|
+
readonly i18n: _angular_core.InputSignal<I18nOf<never, "ariaLabel" | FilterDropdownActionKey>>;
|
|
337
|
+
protected readonly texts: _angular_core.Signal<{
|
|
338
|
+
readonly ariaLabel: string;
|
|
339
|
+
readonly applyFilters: string;
|
|
340
|
+
readonly clearFilters: string;
|
|
341
|
+
readonly resetFilters: string;
|
|
342
|
+
readonly savePreset: string;
|
|
343
|
+
readonly saveNewPresets: string;
|
|
344
|
+
readonly saveAsNewPreset: string;
|
|
345
|
+
readonly updateExistingPreset: string;
|
|
346
|
+
}>;
|
|
331
347
|
/** Emits when a hrefless infobox link is activated, so a consumer can run an in-app action. */
|
|
332
348
|
infoboxLinkClick: _angular_core.OutputEmitterRef<void>;
|
|
333
349
|
/** Emits when the dropdown menu is opened */
|
|
@@ -382,20 +398,35 @@ declare class FilterDropdownComponent implements DropdownOverlay {
|
|
|
382
398
|
onUpdatePresets(): void;
|
|
383
399
|
protected onActionDropdownItemClick(item: ActionDropdownItem): void;
|
|
384
400
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FilterDropdownComponent, never>;
|
|
385
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterDropdownComponent, "ap-filter-dropdown", never, { "infobox": { "alias": "infobox"; "required": false; "isSignal": true; }; "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "savedValue": { "alias": "savedValue"; "required": false; "isSignal": true; }; "needApplyButton": { "alias": "needApplyButton"; "required": false; "isSignal": true; }; "needClearButton": { "alias": "needClearButton"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "expandOnOpen": { "alias": "expandOnOpen"; "required": false; "isSignal": true; }; "presetsFeatureLocked": { "alias": "presetsFeatureLocked"; "required": false; "isSignal": true; }; "savePresetsMode": { "alias": "savePresetsMode"; "required": false; "isSignal": true; }; "editingPresetsMode": { "alias": "editingPresetsMode"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "
|
|
401
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterDropdownComponent, "ap-filter-dropdown", never, { "infobox": { "alias": "infobox"; "required": false; "isSignal": true; }; "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "savedValue": { "alias": "savedValue"; "required": false; "isSignal": true; }; "needApplyButton": { "alias": "needApplyButton"; "required": false; "isSignal": true; }; "needClearButton": { "alias": "needClearButton"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "expandOnOpen": { "alias": "expandOnOpen"; "required": false; "isSignal": true; }; "presetsFeatureLocked": { "alias": "presetsFeatureLocked"; "required": false; "isSignal": true; }; "savePresetsMode": { "alias": "savePresetsMode"; "required": false; "isSignal": true; }; "editingPresetsMode": { "alias": "editingPresetsMode"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "i18n": { "alias": "i18n"; "required": false; "isSignal": true; }; }, { "infoboxLinkClick": "infoboxLinkClick"; "opened": "opened"; "closed": "closed"; "presetsLockedClicked": "presetsLockedClicked"; "saveNewPresets": "saveNewPresets"; "updatePresets": "updatePresets"; "applyFilters": "applyFilters"; "clearFilters": "clearFilters"; "resetFilters": "resetFilters"; "lockedFeatureClicked": "lockedFeatureClicked"; "filterDropdownGroupLockedClicked": "filterDropdownGroupLockedClicked"; }, never, never, true, never>;
|
|
386
402
|
}
|
|
387
403
|
|
|
388
404
|
declare class FilterDropdownButtonComponent {
|
|
389
405
|
private readonly filterDropdown;
|
|
390
406
|
isFilterCountActive: _angular_core.Signal<boolean>;
|
|
391
407
|
activeFilterCount: _angular_core.Signal<number>;
|
|
392
|
-
|
|
393
|
-
|
|
408
|
+
private readonly resolveTexts;
|
|
409
|
+
/**
|
|
410
|
+
* Texts of the filter: `trigger` words the button, defaulting to `ui-components.filters.trigger`, and each
|
|
411
|
+
* {@link FilterDropdownActionKey} goes as is to the dropdown, which applies its own defaults.
|
|
412
|
+
*/
|
|
413
|
+
readonly i18n: _angular_core.InputSignal<I18nOf<never, "trigger" | FilterDropdownActionKey>>;
|
|
414
|
+
protected readonly triggerText: _angular_core.Signal<string>;
|
|
415
|
+
protected readonly dropdownI18n: _angular_core.Signal<{
|
|
416
|
+
trigger?: _agorapulse_ui_components_i18n.TranslationRequest | undefined;
|
|
417
|
+
applyFilters?: _agorapulse_ui_components_i18n.TranslationRequest | undefined;
|
|
418
|
+
clearFilters?: _agorapulse_ui_components_i18n.TranslationRequest | undefined;
|
|
419
|
+
resetFilters?: _agorapulse_ui_components_i18n.TranslationRequest | undefined;
|
|
420
|
+
savePreset?: _agorapulse_ui_components_i18n.TranslationRequest | undefined;
|
|
421
|
+
saveNewPresets?: _agorapulse_ui_components_i18n.TranslationRequest | undefined;
|
|
422
|
+
saveAsNewPreset?: _agorapulse_ui_components_i18n.TranslationRequest | undefined;
|
|
423
|
+
updateExistingPreset?: _agorapulse_ui_components_i18n.TranslationRequest | undefined;
|
|
424
|
+
}>;
|
|
394
425
|
/** `name` and `data-test` of the trigger. Override when several filter buttons share a page. */
|
|
395
426
|
name: _angular_core.InputSignal<string>;
|
|
396
427
|
/**
|
|
397
428
|
* Set in tight containers such as a side nav header: the trigger becomes a square `ap-icon-button`.
|
|
398
|
-
* `
|
|
429
|
+
* The `trigger` text is then its accessible name, and the active-filter count is dropped — no counter slot.
|
|
399
430
|
*/
|
|
400
431
|
iconOnly: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
401
432
|
/** An optional infobox shown at the bottom of the popup content, above the footer (e.g. a link). */
|
|
@@ -430,13 +461,6 @@ declare class FilterDropdownButtonComponent {
|
|
|
430
461
|
readonly placement: _angular_core.InputSignal<_floating_ui_utils.Placement | undefined>;
|
|
431
462
|
/** Extra class(es) set on the body-appended overlay pane, so a consumer can scope global styles to this dropdown. */
|
|
432
463
|
panelClass: _angular_core.InputSignal<string | string[]>;
|
|
433
|
-
saveNewPresetsText: _angular_core.InputSignal<string>;
|
|
434
|
-
saveAsNewPresetText: _angular_core.InputSignal<string>;
|
|
435
|
-
savePresetText: _angular_core.InputSignal<string>;
|
|
436
|
-
updateExistingPresetText: _angular_core.InputSignal<string>;
|
|
437
|
-
resetFilterText: _angular_core.InputSignal<string>;
|
|
438
|
-
applyFiltersText: _angular_core.InputSignal<string>;
|
|
439
|
-
clearFilterText: _angular_core.InputSignal<string>;
|
|
440
464
|
/** Emits when a hrefless infobox link is activated, so a consumer can run an in-app action. */
|
|
441
465
|
infoboxLinkClick: _angular_core.OutputEmitterRef<void>;
|
|
442
466
|
/** Emits when the dropdown menu is opened */
|
|
@@ -460,8 +484,8 @@ declare class FilterDropdownButtonComponent {
|
|
|
460
484
|
/** Event emitted when a group with locked feature is clicked */
|
|
461
485
|
filterDropdownGroupLockedClicked: _angular_core.OutputEmitterRef<FilterDropdownGroup>;
|
|
462
486
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FilterDropdownButtonComponent, never>;
|
|
463
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterDropdownButtonComponent, "ap-filter-dropdown-button", never, { "
|
|
487
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterDropdownButtonComponent, "ap-filter-dropdown-button", never, { "i18n": { "alias": "i18n"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "infobox": { "alias": "infobox"; "required": false; "isSignal": true; }; "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "savedValue": { "alias": "savedValue"; "required": false; "isSignal": true; }; "needApplyButton": { "alias": "needApplyButton"; "required": false; "isSignal": true; }; "needClearButton": { "alias": "needClearButton"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "expandOnOpen": { "alias": "expandOnOpen"; "required": false; "isSignal": true; }; "presetsFeatureLocked": { "alias": "presetsFeatureLocked"; "required": false; "isSignal": true; }; "savePresetsMode": { "alias": "savePresetsMode"; "required": false; "isSignal": true; }; "editingPresetsMode": { "alias": "editingPresetsMode"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; }, { "infoboxLinkClick": "infoboxLinkClick"; "opened": "opened"; "closed": "closed"; "presetsLockedClicked": "presetsLockedClicked"; "saveNewPresets": "saveNewPresets"; "updatePresets": "updatePresets"; "applyFilters": "applyFilters"; "clearFilters": "clearFilters"; "resetFilters": "resetFilters"; "lockedFeatureClicked": "lockedFeatureClicked"; "filterDropdownGroupLockedClicked": "filterDropdownGroupLockedClicked"; }, never, never, true, never>;
|
|
464
488
|
}
|
|
465
489
|
|
|
466
490
|
export { FilterDropdownButtonComponent, FilterDropdownComponent };
|
|
467
|
-
export type { ExpandOnOpenPolicy, FilterDropdownGroup, FilterDropdownGroupCheckbox, FilterDropdownGroupDateRange, FilterDropdownGroupRadio, FilterDropdownGroupSelectMultiple, FilterDropdownGroupSelectSingle, FilterDropdownGroupToggle, FilterDropdownInfobox, FilterDropdownInfoboxLink, FilterDropdownItemCheckbox, FilterDropdownItemRadio, FilterDropdownItemSelect, FilterDropdownItemToggle, FilterDropdownOutput, FilterDropdownType, FilterDropdownValue, FilterDropdownValueCheckbox, FilterDropdownValueDateRange, FilterDropdownValueMultipleSelect, FilterDropdownValueRadio, FilterDropdownValueSingleSelect, FilterDropdownValueToggle, FilterValueEdit };
|
|
491
|
+
export type { ExpandOnOpenPolicy, FilterDropdownActionKey, FilterDropdownGroup, FilterDropdownGroupCheckbox, FilterDropdownGroupDateRange, FilterDropdownGroupRadio, FilterDropdownGroupSelectMultiple, FilterDropdownGroupSelectSingle, FilterDropdownGroupToggle, FilterDropdownInfobox, FilterDropdownInfoboxLink, FilterDropdownItemCheckbox, FilterDropdownItemRadio, FilterDropdownItemSelect, FilterDropdownItemToggle, FilterDropdownOutput, FilterDropdownType, FilterDropdownValue, FilterDropdownValueCheckbox, FilterDropdownValueDateRange, FilterDropdownValueMultipleSelect, FilterDropdownValueRadio, FilterDropdownValueSingleSelect, FilterDropdownValueToggle, FilterValueEdit };
|
|
@@ -89,6 +89,31 @@ declare class RawPipe implements PipeTransform {
|
|
|
89
89
|
static ɵpipe: i0.ɵɵPipeDeclaration<RawPipe, "apRaw", true>;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
/**
|
|
93
|
+
* The text roles a component renders: per role, the DS default key, or `null` when the role has no default.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* const ROLES = { title: null, placeholder: 'ui-components.select.placeholder' } as const satisfies TextRoles;
|
|
97
|
+
*/
|
|
98
|
+
type TextRoles = Readonly<Record<string, string | null>>;
|
|
99
|
+
/**
|
|
100
|
+
* Resolves every role of `roles` from `i18n` in one call: an absent role (`null` or `undefined`) takes its default key,
|
|
101
|
+
* an explicit request wins even when it renders empty. A model `i18n` carrying more roles than `roles` lists is accepted.
|
|
102
|
+
*/
|
|
103
|
+
type ResolveTexts = <R extends TextRoles>(i18n: Readonly<Partial<Record<keyof NoInfer<R> & string, TranslationRequest | null | undefined>>> | null | undefined, roles: R) => {
|
|
104
|
+
[K in keyof R]: string;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Call in an injection context; built on {@link injectTranslate}, so read inside a `computed` the texts follow language changes.
|
|
108
|
+
* Resolution rules: `design-specs/patterns/translation.md`.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* const ROLES = { title: null, placeholder: 'ui-components.select.placeholder' } as const satisfies TextRoles;
|
|
112
|
+
* const resolveTexts = injectResolveTexts();
|
|
113
|
+
* const texts = computed(() => resolveTexts(this.i18n(), ROLES));
|
|
114
|
+
*/
|
|
115
|
+
declare function injectResolveTexts(): ResolveTexts;
|
|
116
|
+
|
|
92
117
|
/**
|
|
93
118
|
* How the DS translates the texts it renders, provided by the consuming app.
|
|
94
119
|
*
|
|
@@ -140,5 +165,5 @@ declare function injectTranslate(): (request: TranslationRequest | null | undefi
|
|
|
140
165
|
*/
|
|
141
166
|
declare function injectLanguage(): Signal<string | undefined>;
|
|
142
167
|
|
|
143
|
-
export { DEFAULT_IS_KEY, RawPipe, UI_COMPONENTS_DEFAULT_TEXTS, UI_COMPONENTS_TRANSLATION, injectLanguage, injectTranslate, isKeyRequest, isRawText, provideUiComponentsTranslation, raw };
|
|
144
|
-
export type { I18nOf, RawText, TranslationKeyRequest, TranslationRequest, UiComponentsTranslation };
|
|
168
|
+
export { DEFAULT_IS_KEY, RawPipe, UI_COMPONENTS_DEFAULT_TEXTS, UI_COMPONENTS_TRANSLATION, injectLanguage, injectResolveTexts, injectTranslate, isKeyRequest, isRawText, provideUiComponentsTranslation, raw };
|
|
169
|
+
export type { I18nOf, RawText, TextRoles, TranslationKeyRequest, TranslationRequest, UiComponentsTranslation };
|
|
@@ -47,32 +47,21 @@ declare class SelectBaseDirective implements AfterViewInit, OnDestroy, FormField
|
|
|
47
47
|
declare class SelectMultipleDirective implements AfterViewInit, OnDestroy {
|
|
48
48
|
private readonly selectComponent;
|
|
49
49
|
private readonly elementRef;
|
|
50
|
-
private readonly injector;
|
|
51
50
|
private readonly originalDisabledState;
|
|
52
51
|
maxItemsTooltip: _angular_core.InputSignal<string | undefined>;
|
|
53
52
|
/** Pins items selected at open time to the top of the dropdown. Ignored when `groupBy` is set. */
|
|
54
53
|
pinnedItemsEnabled: _angular_core.InputSignal<boolean>;
|
|
55
|
-
/** Adds a "Select all" row above the options, acting on every visible option across groups. */
|
|
56
|
-
selectAllEnabled: _angular_core.InputSignal<boolean>;
|
|
57
|
-
/** Label of the "Select all" row. */
|
|
58
|
-
selectAllText: _angular_core.InputSignal<string>;
|
|
59
|
-
/** Count after the "Select all" label. `{selected}` and `{total}` are replaced; empty hides it. */
|
|
60
|
-
selectAllCountText: _angular_core.InputSignal<string>;
|
|
61
54
|
valueContainer: HTMLElement | null;
|
|
62
55
|
private readonly subs;
|
|
63
|
-
private selectAllRow;
|
|
64
56
|
constructor();
|
|
65
57
|
ngAfterViewInit(): void;
|
|
66
58
|
ngOnDestroy(): void;
|
|
67
59
|
onMousedown: (event: MouseEvent) => void;
|
|
68
60
|
private pinSelectedAtTop;
|
|
69
|
-
private mountSelectAll;
|
|
70
|
-
private syncActiveDescendant;
|
|
71
|
-
private unmountSelectAll;
|
|
72
61
|
private openAtTop;
|
|
73
62
|
private updateMaxItemsDisabledState;
|
|
74
63
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectMultipleDirective, never>;
|
|
75
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SelectMultipleDirective, "ng-select[apSelectMultiple]", never, { "maxItemsTooltip": { "alias": "maxItemsTooltip"; "required": false; "isSignal": true; }; "pinnedItemsEnabled": { "alias": "pinnedItemsEnabled"; "required": false; "isSignal": true; };
|
|
64
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SelectMultipleDirective, "ng-select[apSelectMultiple]", never, { "maxItemsTooltip": { "alias": "maxItemsTooltip"; "required": false; "isSignal": true; }; "pinnedItemsEnabled": { "alias": "pinnedItemsEnabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof SelectBaseDirective; inputs: { "inlineLabel": "inlineLabel"; "symbolId": "symbolId"; "clearable": "clearable"; }; outputs: {}; }]>;
|
|
76
65
|
}
|
|
77
66
|
|
|
78
67
|
declare class SelectSingleDirective implements AfterViewInit {
|
|
@@ -291,30 +280,5 @@ declare class ApSelectModule {
|
|
|
291
280
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<ApSelectModule>;
|
|
292
281
|
}
|
|
293
282
|
|
|
294
|
-
|
|
295
|
-
declare class DropdownSelectAllComponent {
|
|
296
|
-
readonly select: _angular_core.InputSignal<NgSelectComponent>;
|
|
297
|
-
readonly text: _angular_core.InputSignal<string>;
|
|
298
|
-
/** Appended to `text`. `{selected}` and `{total}` are replaced by the counts of the options it acts on. */
|
|
299
|
-
readonly countText: _angular_core.InputSignal<string>;
|
|
300
|
-
readonly marked: _angular_core.WritableSignal<boolean>;
|
|
301
|
-
/** Bumped by the owner on every selection or filter change, as `itemsList` is not reactive. */
|
|
302
|
-
private readonly version;
|
|
303
|
-
protected readonly targets: _angular_core.Signal<i12.NgOption[]>;
|
|
304
|
-
protected readonly visible: _angular_core.Signal<boolean>;
|
|
305
|
-
protected readonly checked: _angular_core.Signal<boolean>;
|
|
306
|
-
protected readonly indeterminate: _angular_core.Signal<boolean>;
|
|
307
|
-
protected readonly label: _angular_core.Signal<string>;
|
|
308
|
-
protected readonly ariaChecked: _angular_core.Signal<"true" | "false" | "mixed">;
|
|
309
|
-
get rowId(): string;
|
|
310
|
-
refresh(): void;
|
|
311
|
-
/** Handles a key before ng-select does, and returns whether it did. */
|
|
312
|
-
handleKey(event: KeyboardEvent): boolean;
|
|
313
|
-
private isAtFirstOption;
|
|
314
|
-
toggle(): void;
|
|
315
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropdownSelectAllComponent, never>;
|
|
316
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropdownSelectAllComponent, "ap-dropdown-select-all", never, { "select": { "alias": "select"; "required": true; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "countText": { "alias": "countText"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
export { ApSelectModule, DropdownCreateNewComponent, DropdownGroupItemComponent, DropdownItemMultipleOneLineComponent, DropdownItemMultipleTwoLinesComponent, DropdownItemSingleOneLineComponent, DropdownItemSingleTwoLinesComponent, DropdownSearchFormComponent, DropdownSelectAllComponent, SelectBaseDirective, SelectLabelMultipleComponent, SelectLabelSingleComponent, SelectMultipleDirective, SelectSingleDirective };
|
|
283
|
+
export { ApSelectModule, DropdownCreateNewComponent, DropdownGroupItemComponent, DropdownItemMultipleOneLineComponent, DropdownItemMultipleTwoLinesComponent, DropdownItemSingleOneLineComponent, DropdownItemSingleTwoLinesComponent, DropdownSearchFormComponent, SelectBaseDirective, SelectLabelMultipleComponent, SelectLabelSingleComponent, SelectMultipleDirective, SelectSingleDirective };
|
|
320
284
|
export type { SelectLabelMultipleDisplayType, SelectLabelSingleDisplayType };
|
|
@@ -57,7 +57,6 @@ type RenderRun = {
|
|
|
57
57
|
kind: 'group';
|
|
58
58
|
}>;
|
|
59
59
|
type SelectionDropdownMode = 'multiple' | 'single';
|
|
60
|
-
type SelectionState = 'selected' | 'partial' | 'unselected';
|
|
61
60
|
/** A dropdown of options on any trigger. `multiple` = checkbox rows with search; `single` = rows, closes on pick. */
|
|
62
61
|
declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
|
|
63
62
|
private static nextId;
|
|
@@ -98,12 +97,6 @@ declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
|
|
|
98
97
|
headerButtonText: _angular_core.InputSignal<string | undefined>;
|
|
99
98
|
/** Symbol ID for the header button */
|
|
100
99
|
headerButtonSymbolId: _angular_core.InputSignal<string | undefined>;
|
|
101
|
-
/** Adds a "Select all" row above the options, acting on every visible option across groups. Multiple mode only. */
|
|
102
|
-
selectAllEnabled: _angular_core.InputSignal<boolean>;
|
|
103
|
-
/** Label of the "Select all" row */
|
|
104
|
-
selectAllText: _angular_core.InputSignal<string>;
|
|
105
|
-
/** Count after the "Select all" label. `{selected}` and `{total}` are replaced; empty hides it. */
|
|
106
|
-
selectAllCountText: _angular_core.InputSignal<string>;
|
|
107
100
|
/** Placeholder text for the search input */
|
|
108
101
|
searchPlaceholderText: _angular_core.InputSignal<string>;
|
|
109
102
|
/** Text to display when no search results are found */
|
|
@@ -165,11 +158,7 @@ declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
|
|
|
165
158
|
* listbox, and the ungrouped items between two groups are collected into one rather than one each.
|
|
166
159
|
*/
|
|
167
160
|
protected readonly displayRuns: _angular_core.Signal<RenderRun[]>;
|
|
168
|
-
protected readonly groupSelectionStates: _angular_core.Signal<Record<string,
|
|
169
|
-
private readonly selectAllTargets;
|
|
170
|
-
protected readonly selectAllVisible: _angular_core.Signal<boolean>;
|
|
171
|
-
protected readonly selectAllLabel: _angular_core.Signal<string>;
|
|
172
|
-
protected readonly selectAllState: _angular_core.Signal<SelectionState>;
|
|
161
|
+
protected readonly groupSelectionStates: _angular_core.Signal<Record<string, "selected" | "partial" | "unselected">>;
|
|
173
162
|
constructor();
|
|
174
163
|
ngOnDestroy(): void;
|
|
175
164
|
/** Opens the dropdown menu at the specified trigger element */
|
|
@@ -222,7 +211,6 @@ declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
|
|
|
222
211
|
onSearchTermChange(term: string): void;
|
|
223
212
|
/** Handles group toggle events, selecting/deselecting all items within the group */
|
|
224
213
|
onGroupToggle(groupLabel: string, checked: boolean): void;
|
|
225
|
-
onSelectAllToggle(checked: boolean): void;
|
|
226
214
|
/** Stable track key for a render entry (item or group). */
|
|
227
215
|
protected entryKey(entry: RenderEntry): string;
|
|
228
216
|
/**
|
|
@@ -233,7 +221,7 @@ declare class SelectionDropdownComponent implements DropdownOverlay, OnDestroy {
|
|
|
233
221
|
/** Updates the filtered items based on search term */
|
|
234
222
|
private updateFilteredItems;
|
|
235
223
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectionDropdownComponent, never>;
|
|
236
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectionDropdownComponent, "ap-selection-dropdown", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "selectedSectionText": { "alias": "selectedSectionText"; "required": false; "isSignal": true; }; "optionsSectionText": { "alias": "optionsSectionText"; "required": false; "isSignal": true; }; "headerButtonId": { "alias": "headerButtonId"; "required": false; "isSignal": true; }; "footerButtonId": { "alias": "footerButtonId"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "searchEnabled": { "alias": "searchEnabled"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "footerButtonText": { "alias": "footerButtonText"; "required": false; "isSignal": true; }; "footerButtonSymbolId": { "alias": "footerButtonSymbolId"; "required": false; "isSignal": true; }; "headerButtonText": { "alias": "headerButtonText"; "required": false; "isSignal": true; }; "headerButtonSymbolId": { "alias": "headerButtonSymbolId"; "required": false; "isSignal": true; }; "
|
|
224
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectionDropdownComponent, "ap-selection-dropdown", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "selectedSectionText": { "alias": "selectedSectionText"; "required": false; "isSignal": true; }; "optionsSectionText": { "alias": "optionsSectionText"; "required": false; "isSignal": true; }; "headerButtonId": { "alias": "headerButtonId"; "required": false; "isSignal": true; }; "footerButtonId": { "alias": "footerButtonId"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "searchEnabled": { "alias": "searchEnabled"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "footerButtonText": { "alias": "footerButtonText"; "required": false; "isSignal": true; }; "footerButtonSymbolId": { "alias": "footerButtonSymbolId"; "required": false; "isSignal": true; }; "headerButtonText": { "alias": "headerButtonText"; "required": false; "isSignal": true; }; "headerButtonSymbolId": { "alias": "headerButtonSymbolId"; "required": false; "isSignal": true; }; "searchPlaceholderText": { "alias": "searchPlaceholderText"; "required": false; "isSignal": true; }; "noSearchResultsText": { "alias": "noSearchResultsText"; "required": false; "isSignal": true; }; "searchResultsText": { "alias": "searchResultsText"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; "selectionChange": "selectionChange"; "footerButtonClick": "footerButtonClick"; "headerButtonClick": "headerButtonClick"; "searchInputChange": "searchInputChange"; "searchTerm": "searchTermChange"; }, ["trigger"], never, true, never>;
|
|
237
225
|
}
|
|
238
226
|
|
|
239
227
|
/**
|
|
Binary file
|