@agorapulse/ui-components 22.0.29 → 22.0.30
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.0.30.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-nav-selector-testing.mjs +4 -2
- package/fesm2022/agorapulse-ui-components-nav-selector-testing.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs +279 -141
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
- package/package.json +1 -1
- package/types/agorapulse-ui-components-nav-selector-testing.d.ts +3 -1
- package/types/agorapulse-ui-components-nav-selector.d.ts +33 -1
- package/agorapulse-ui-components-22.0.29.tgz +0 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AvatarNetwork } from '@agorapulse/ui-components/avatar';
|
|
2
|
-
import { NavSelectorLeafAction, NavSelectorLeafDetails, NavSelectorLeaf } from '@agorapulse/ui-components/nav-selector';
|
|
2
|
+
import { NavSelectorLeafAction, NavSelectorLeafDetails, NavSelectorLeafTags, NavSelectorLeaf } from '@agorapulse/ui-components/nav-selector';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Usage Example:
|
|
@@ -35,6 +35,7 @@ declare function generateLeafElements(options: {
|
|
|
35
35
|
featureLockedFrequency?: number;
|
|
36
36
|
actions?: NavSelectorLeafAction[];
|
|
37
37
|
details?: Partial<NavSelectorLeafDetails>[];
|
|
38
|
+
tags?: NavSelectorLeafTags;
|
|
38
39
|
}, customizer?: (leaf: NavSelectorLeaf, index: number) => NavSelectorLeaf): NavSelectorLeaf[];
|
|
39
40
|
/**
|
|
40
41
|
* Utility function to generate group type elements with children
|
|
@@ -58,6 +59,7 @@ declare function generateGroupElements(options: {
|
|
|
58
59
|
featureLockedFrequency?: number;
|
|
59
60
|
actions?: NavSelectorLeafAction[];
|
|
60
61
|
details?: Partial<NavSelectorLeafDetails>[];
|
|
62
|
+
tags?: NavSelectorLeafTags;
|
|
61
63
|
}): any;
|
|
62
64
|
|
|
63
65
|
export { generateGroupElements, generateLeafElements };
|
|
@@ -42,6 +42,18 @@ interface NavSelectorTranslatedTexts {
|
|
|
42
42
|
viewMore: string;
|
|
43
43
|
/** Text of the button to show less details, it’s used when we limit the number of details displayed */
|
|
44
44
|
viewLess: string;
|
|
45
|
+
/** Text of the button opening the filter dropdown */
|
|
46
|
+
filter: string;
|
|
47
|
+
/** Text of the button clearing the filters inside the filter dropdown */
|
|
48
|
+
clearFilters: string;
|
|
49
|
+
/** Text of the button applying the filters picked inside the filter dropdown */
|
|
50
|
+
applyFilters: string;
|
|
51
|
+
/**
|
|
52
|
+
* Heading of each tag group inside the filter dropdown, keyed by tag name. Tag names are a structural taxonomy, not
|
|
53
|
+
* consumer data like the tag values are, so they need a translation of their own. Keying on `NavSelectorLeafTags`
|
|
54
|
+
* makes the compiler ask for one whenever a tag name is added.
|
|
55
|
+
*/
|
|
56
|
+
tagNames: Record<keyof NavSelectorLeafTags, string>;
|
|
45
57
|
}
|
|
46
58
|
/**
|
|
47
59
|
* Common interface for the NavSelector
|
|
@@ -69,6 +81,12 @@ type NavSelectorLeafAction = {
|
|
|
69
81
|
/** Whether to add a divider before this item */
|
|
70
82
|
dividerEnabled?: boolean;
|
|
71
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* Represent tags on a leaf. It can support many kind of tags so it is flexible
|
|
86
|
+
*/
|
|
87
|
+
type NavSelectorLeafTags = {
|
|
88
|
+
attributes: string[];
|
|
89
|
+
};
|
|
72
90
|
/**
|
|
73
91
|
* Represent final entry of the nav selector
|
|
74
92
|
*/
|
|
@@ -97,6 +115,8 @@ type NavSelectorLeaf = {
|
|
|
97
115
|
details: NavSelectorLeafDetails[];
|
|
98
116
|
/** Optional actions that can be performed on the leaf */
|
|
99
117
|
actions: NavSelectorLeafAction[];
|
|
118
|
+
/** List of tags */
|
|
119
|
+
tags: NavSelectorLeafTags;
|
|
100
120
|
type: 'LEAF';
|
|
101
121
|
} & NavSelectorBaseNode;
|
|
102
122
|
/**
|
|
@@ -244,6 +264,12 @@ type InternalNavSelectorCategory = {
|
|
|
244
264
|
avatarPictureUrlDisplayed: boolean;
|
|
245
265
|
type: 'CATEGORY';
|
|
246
266
|
} & InternalNavSelectorBaseNode;
|
|
267
|
+
/**
|
|
268
|
+
* Represent final tags of leaf. It can support many kind of tags so it is flexible.
|
|
269
|
+
*/
|
|
270
|
+
type InternalNavSelectorLeafTags = {
|
|
271
|
+
attributes: string[];
|
|
272
|
+
};
|
|
247
273
|
/**
|
|
248
274
|
* Represent final entry of the nav selector
|
|
249
275
|
*/
|
|
@@ -291,6 +317,8 @@ type InternalNavSelectorLeaf = {
|
|
|
291
317
|
/** Details of the leaf */
|
|
292
318
|
details: InternalNavSelectorLeafDetails[];
|
|
293
319
|
type: 'LEAF';
|
|
320
|
+
/** List of tags of the leaf */
|
|
321
|
+
tags: InternalNavSelectorLeafTags;
|
|
294
322
|
/** Indicates if the view more section should be display for details */
|
|
295
323
|
viewMoreDisplayable: boolean;
|
|
296
324
|
/** Indicates if the view more or view less button is displayed */
|
|
@@ -343,6 +371,8 @@ declare class NavSelectorState {
|
|
|
343
371
|
style: Signal<NavSelectorStyle>;
|
|
344
372
|
private multipleModeEnabled;
|
|
345
373
|
private _texts;
|
|
374
|
+
tagsFilterDisplayed: Signal<boolean>;
|
|
375
|
+
tagsFilters: _angular_core.WritableSignal<Partial<InternalNavSelectorLeafTags>>;
|
|
346
376
|
isMultipleModeEnabled: _angular_core.WritableSignal<boolean>;
|
|
347
377
|
search: _angular_core.WritableSignal<string>;
|
|
348
378
|
noResults: Signal<boolean>;
|
|
@@ -380,6 +410,8 @@ declare class NavSelectorState {
|
|
|
380
410
|
onArrowUp(): void;
|
|
381
411
|
private collectSelectedUids;
|
|
382
412
|
private getFoldingOptions;
|
|
413
|
+
filterTags(tags: InternalNavSelectorLeafTags): void;
|
|
414
|
+
clearFilterTags(): void;
|
|
383
415
|
fold(entry: InternalNavSelectorEntry): void;
|
|
384
416
|
unfold(entry: InternalNavSelectorEntry): void;
|
|
385
417
|
updateDetailsDisplayedLimit(detailsDisplayedLimit: number): void;
|
|
@@ -441,4 +473,4 @@ declare class NavSelectorComponent implements OnInit {
|
|
|
441
473
|
}
|
|
442
474
|
|
|
443
475
|
export { NavSelectorComponent, NavSelectorPopoverItemComponent };
|
|
444
|
-
export type { NavSelectorCategory, NavSelectorCategoryEmptyStateActionEvent, NavSelectorEntry, NavSelectorGroup, NavSelectorLeaf, NavSelectorLeafAction, NavSelectorLeafActionClickedEvent, NavSelectorLeafDetails, NavSelectorTranslatedTexts, NodeAccessibility };
|
|
476
|
+
export type { NavSelectorCategory, NavSelectorCategoryEmptyStateActionEvent, NavSelectorEntry, NavSelectorGroup, NavSelectorLeaf, NavSelectorLeafAction, NavSelectorLeafActionClickedEvent, NavSelectorLeafDetails, NavSelectorLeafTags, NavSelectorTranslatedTexts, NodeAccessibility };
|
|
Binary file
|