@agorapulse/ui-components 20.1.9 → 20.1.11

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.
@@ -1,7 +1,7 @@
1
1
  import { AvatarNetwork } from '@agorapulse/ui-components/avatar';
2
2
  import { agorapulseSymbol } from '@agorapulse/ui-symbol';
3
3
  import * as _angular_core from '@angular/core';
4
- import { OnInit, TemplateRef, ElementRef } from '@angular/core';
4
+ import { OnInit, TemplateRef } from '@angular/core';
5
5
  import * as i1 from '@agorapulse/ui-components/directives';
6
6
  import { BaseButtonDirective } from '@agorapulse/ui-components/directives';
7
7
 
@@ -11,6 +11,10 @@ type NavSelectorLeafActionClickedEvent = {
11
11
  /** Leaf on which the action has been clicked */
12
12
  leafUid: string;
13
13
  };
14
+ type NavSelectorCategoryEmptyStateActionEvent = {
15
+ /** Name of the action that has been clicked */
16
+ actionName: string;
17
+ };
14
18
  /**
15
19
  * As translation is not available in the DS, this all translations needed
16
20
  */
@@ -105,8 +109,19 @@ type NavSelectorCategory = {
105
109
  folded: boolean;
106
110
  /** Title of the empty state */
107
111
  emptyStateTitle?: string;
112
+ /** Action of the empty state */
113
+ emptyStateAction?: NavSelectorEmptyStateAction;
108
114
  type: 'CATEGORY';
109
115
  } & NavSelectorBaseNode;
116
+ /**
117
+ * Represent the action available in the empty state
118
+ */
119
+ type NavSelectorEmptyStateAction = {
120
+ name: string;
121
+ title: string;
122
+ id?: string;
123
+ symbolId?: agorapulseSymbol;
124
+ };
110
125
  type NavSelectorEntry = NavSelectorLeaf | NavSelectorGroup | NavSelectorCategory;
111
126
  /**
112
127
  * Represent details of a leaf, they are used to allow to display more specific information about the leaf
@@ -199,6 +214,8 @@ type InternalNavSelectorCategory = {
199
214
  folded: boolean;
200
215
  /** Title of the empty state */
201
216
  emptyStateTitle?: string;
217
+ /** Action of the empty state */
218
+ emptyStateAction?: NavSelectorEmptyStateAction;
202
219
  type: 'CATEGORY';
203
220
  } & InternalNavSelectorBaseNode;
204
221
  /**
@@ -293,7 +310,8 @@ declare class NavSelectorPopoverItemComponent {
293
310
  * It should be provided by the component to ensure that if many nav selectors are used in the same page, they don't share the same state.
294
311
  */
295
312
  declare class NavSelectorState {
296
- entries: _angular_core.WritableSignal<InternalNavSelectorEntry[]>;
313
+ _entries: _angular_core.WritableSignal<InternalNavSelectorEntry[]>;
314
+ entries: _angular_core.Signal<InternalNavSelectorEntry[]>;
297
315
  private multipleModeEnabled;
298
316
  private _texts;
299
317
  isMultipleModeEnabled: _angular_core.WritableSignal<boolean>;
@@ -302,7 +320,8 @@ declare class NavSelectorState {
302
320
  texts: _angular_core.Signal<NavSelectorTranslatedTexts>;
303
321
  expanded: _angular_core.WritableSignal<boolean>;
304
322
  previousSelectedUids: string[];
305
- selectedUidsChangeCallback: ((selectedUids: string[]) => void) | null;
323
+ private selectedUidsChangeCallback;
324
+ private newSelectedUids;
306
325
  constructor();
307
326
  updateMultiModeEnabled(enabled: boolean): void;
308
327
  initEntries(entries: NavSelectorEntry[], initialSelectedEntryUids: string[], detailsDisplayedLimit: number): void;
@@ -330,13 +349,12 @@ declare class NavSelectorState {
330
349
  updateDetailsDisplayedLimit(detailsDisplayedLimit: number): void;
331
350
  viewMore(leaf: InternalNavSelectorLeaf): void;
332
351
  viewLess(leaf: InternalNavSelectorLeaf): void;
352
+ resetFocus(): void;
333
353
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NavSelectorState, never>;
334
354
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<NavSelectorState>;
335
355
  }
336
356
 
337
357
  declare class NavSelectorComponent implements OnInit {
338
- navSelectorState: NavSelectorState;
339
- private el;
340
358
  navSelectorEntries: _angular_core.InputSignal<NavSelectorEntry[]>;
341
359
  translatedTexts: _angular_core.InputSignal<NavSelectorTranslatedTexts>;
342
360
  multipleModeEnabled: _angular_core.InputSignal<boolean>;
@@ -349,6 +367,7 @@ declare class NavSelectorComponent implements OnInit {
349
367
  expandedStateLocalStorageKey: _angular_core.InputSignal<string | undefined>;
350
368
  selectedEntryUids: _angular_core.ModelSignal<string[]>;
351
369
  actionClicked: _angular_core.OutputEmitterRef<NavSelectorLeafActionClickedEvent>;
370
+ emptyStateActionClicked: _angular_core.OutputEmitterRef<NavSelectorCategoryEmptyStateActionEvent>;
352
371
  headerProjection: _angular_core.Signal<TemplateRef<unknown> | undefined>;
353
372
  contentHeaderProjection: _angular_core.Signal<TemplateRef<unknown> | undefined>;
354
373
  footerProjection: _angular_core.Signal<TemplateRef<unknown> | undefined>;
@@ -357,9 +376,15 @@ declare class NavSelectorComponent implements OnInit {
357
376
  onExpansionStateChange: _angular_core.OutputEmitterRef<{
358
377
  expanded: boolean;
359
378
  }>;
379
+ navSelectorState: NavSelectorState;
380
+ private el;
360
381
  componentUid: string;
361
382
  ready: _angular_core.WritableSignal<boolean>;
362
- constructor(navSelectorState: NavSelectorState, el: ElementRef);
383
+ private expanded;
384
+ private entries;
385
+ private selectableEntryUids;
386
+ private existingSelectableUids;
387
+ constructor();
363
388
  ngOnInit(): void;
364
389
  onMinifiedSearchClicked(): void;
365
390
  onArrowDown(event: Event): void;
@@ -368,7 +393,7 @@ declare class NavSelectorComponent implements OnInit {
368
393
  private initializeExpandedState;
369
394
  clickExpandButton(): void;
370
395
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NavSelectorComponent, never>;
371
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NavSelectorComponent, "ap-nav-selector", never, { "navSelectorEntries": { "alias": "navSelectorEntries"; "required": true; "isSignal": true; }; "translatedTexts": { "alias": "translatedTexts"; "required": true; "isSignal": true; }; "multipleModeEnabled": { "alias": "multipleModeEnabled"; "required": false; "isSignal": true; }; "detailsDisplayedLimit": { "alias": "detailsDisplayedLimit"; "required": false; "isSignal": true; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; "forceExpanded": { "alias": "forceExpanded"; "required": false; "isSignal": true; }; "expandedStateLocalStorageKey": { "alias": "expandedStateLocalStorageKey"; "required": false; "isSignal": true; }; "selectedEntryUids": { "alias": "selectedEntryUids"; "required": true; "isSignal": true; }; }, { "selectedEntryUids": "selectedEntryUidsChange"; "actionClicked": "actionClicked"; "onExpansionStateChange": "onExpansionStateChange"; }, ["headerProjection", "contentHeaderProjection", "footerProjection"], never, true, never>;
396
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NavSelectorComponent, "ap-nav-selector", never, { "navSelectorEntries": { "alias": "navSelectorEntries"; "required": true; "isSignal": true; }; "translatedTexts": { "alias": "translatedTexts"; "required": true; "isSignal": true; }; "multipleModeEnabled": { "alias": "multipleModeEnabled"; "required": false; "isSignal": true; }; "detailsDisplayedLimit": { "alias": "detailsDisplayedLimit"; "required": false; "isSignal": true; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; "forceExpanded": { "alias": "forceExpanded"; "required": false; "isSignal": true; }; "expandedStateLocalStorageKey": { "alias": "expandedStateLocalStorageKey"; "required": false; "isSignal": true; }; "selectedEntryUids": { "alias": "selectedEntryUids"; "required": true; "isSignal": true; }; }, { "selectedEntryUids": "selectedEntryUidsChange"; "actionClicked": "actionClicked"; "emptyStateActionClicked": "emptyStateActionClicked"; "onExpansionStateChange": "onExpansionStateChange"; }, ["headerProjection", "contentHeaderProjection", "footerProjection"], never, true, never>;
372
397
  }
373
398
 
374
399
  export { NavSelectorComponent, NavSelectorPopoverItemComponent };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agorapulse/ui-components",
3
3
  "description": "Agorapulse UI Components Library",
4
- "version": "20.1.9",
4
+ "version": "20.1.11",
5
5
  "author": "Benoit Hediard",
6
6
  "repository": {
7
7
  "type": "git",
@@ -23,6 +23,7 @@
23
23
  "@ng-select/ng-select": "15.1.3",
24
24
  "@agorapulse/ngx-daterangepicker-material": "^6.0.5",
25
25
  "dayjs": "^1.11.6",
26
+ "es-toolkit": "1.39.8",
26
27
  "ngxtension": "4.1.0"
27
28
  },
28
29
  "module": "fesm2022/agorapulse-ui-components.mjs",
@@ -167,14 +168,14 @@
167
168
  "types": "./radio/index.d.ts",
168
169
  "default": "./fesm2022/agorapulse-ui-components-radio.mjs"
169
170
  },
170
- "./select": {
171
- "types": "./select/index.d.ts",
172
- "default": "./fesm2022/agorapulse-ui-components-select.mjs"
173
- },
174
171
  "./range-slider": {
175
172
  "types": "./range-slider/index.d.ts",
176
173
  "default": "./fesm2022/agorapulse-ui-components-range-slider.mjs"
177
174
  },
175
+ "./select": {
176
+ "types": "./select/index.d.ts",
177
+ "default": "./fesm2022/agorapulse-ui-components-select.mjs"
178
+ },
178
179
  "./slide-toggle": {
179
180
  "types": "./slide-toggle/index.d.ts",
180
181
  "default": "./fesm2022/agorapulse-ui-components-slide-toggle.mjs"
Binary file