@agorapulse/ui-components 18.0.30 → 18.0.32
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-18.0.32.tgz +0 -0
- package/button/button.component.d.ts +3 -0
- package/esm2022/button/button.component.mjs +3 -3
- package/esm2022/nav-selector/nav-selector-category/nav-selector-category.component.mjs +5 -4
- package/esm2022/nav-selector/nav-selector-group/nav-selector-group.component.mjs +5 -4
- package/esm2022/nav-selector/nav-selector-leaf/nav-selector-leaf.component.mjs +13 -6
- package/esm2022/nav-selector/nav-selector-leaf/nav-selector-leaf.presenter.mjs +1 -2
- package/esm2022/nav-selector/nav-selector-leaf-action/nav-selector-leaf-action.component.mjs +13 -0
- package/esm2022/nav-selector/nav-selector.component.mjs +5 -14
- package/esm2022/nav-selector/nav-selector.mjs +1 -1
- package/esm2022/nav-selector/nav-selector.state.mjs +4 -6
- package/esm2022/nav-selector/utils/leaf.utils.mjs +11 -1
- package/esm2022/nav-selector/utils/nav-selector.builder.mjs +3 -2
- package/esm2022/nav-selector/utils/nav-selector.multi-select.mjs +15 -8
- package/esm2022/nav-selector/utils/nav-selector.single-select.mjs +5 -2
- package/fesm2022/agorapulse-ui-components-button.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs +60 -35
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
- package/nav-selector/nav-selector-category/nav-selector-category.component.d.ts +3 -2
- package/nav-selector/nav-selector-group/nav-selector-group.component.d.ts +3 -2
- package/nav-selector/nav-selector-leaf/nav-selector-leaf.component.d.ts +4 -2
- package/nav-selector/nav-selector-leaf/nav-selector-leaf.presenter.d.ts +0 -1
- package/nav-selector/nav-selector-leaf-action/nav-selector-leaf-action.component.d.ts +7 -0
- package/nav-selector/nav-selector.component.d.ts +3 -3
- package/nav-selector/nav-selector.d.ts +34 -4
- package/nav-selector/nav-selector.state.d.ts +1 -3
- package/nav-selector/utils/leaf.utils.d.ts +2 -1
- package/package.json +1 -1
- package/agorapulse-ui-components-18.0.30.tgz +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { InternalNavSelectorCategory } from '../nav-selector';
|
|
2
|
+
import { InternalNavSelectorCategory, NavSelectorLeafActionClickedEvent } from '../nav-selector';
|
|
3
3
|
import { NavSelectorCategoryPresenter } from './nav-selector-category.presenter';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class NavSelectorCategoryComponent {
|
|
6
6
|
private el;
|
|
7
7
|
navSelectorCategoryPresenter: NavSelectorCategoryPresenter;
|
|
8
8
|
category: import("@angular/core").InputSignal<InternalNavSelectorCategory>;
|
|
9
|
+
actionClicked: import("@angular/core").OutputEmitterRef<NavSelectorLeafActionClickedEvent>;
|
|
9
10
|
foldSymbol: import("@angular/core").Signal<"chevron-down" | "chevron-up">;
|
|
10
11
|
foldedWithDelay: import("@angular/core").WritableSignal<boolean>;
|
|
11
12
|
animationState: import("@angular/core").Signal<"collapsed" | "expanded">;
|
|
@@ -22,5 +23,5 @@ export declare class NavSelectorCategoryComponent {
|
|
|
22
23
|
maxHeight: import("@angular/core").WritableSignal<string>;
|
|
23
24
|
private updateAliasBoundedClientRect;
|
|
24
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<NavSelectorCategoryComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NavSelectorCategoryComponent, "ap-nav-selector-category", never, { "category": { "alias": "category"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavSelectorCategoryComponent, "ap-nav-selector-category", never, { "category": { "alias": "category"; "required": true; "isSignal": true; }; }, { "actionClicked": "actionClicked"; }, never, never, true, never>;
|
|
26
27
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { InternalNavSelectorGroup } from '../nav-selector';
|
|
2
|
+
import { InternalNavSelectorGroup, NavSelectorLeafActionClickedEvent } from '../nav-selector';
|
|
3
3
|
import { NavSelectorGroupPresenter } from './nav-selector-group.presenter';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class NavSelectorGroupComponent {
|
|
6
6
|
private el;
|
|
7
7
|
navSelectorGroupPresenter: NavSelectorGroupPresenter;
|
|
8
8
|
group: import("@angular/core").InputSignal<InternalNavSelectorGroup>;
|
|
9
|
+
actionClicked: import("@angular/core").OutputEmitterRef<NavSelectorLeafActionClickedEvent>;
|
|
9
10
|
foldSymbol: import("@angular/core").Signal<"chevron-down" | "chevron-up">;
|
|
10
11
|
aliasEl: import("@angular/core").Signal<ElementRef<any> | undefined>;
|
|
11
12
|
aliasBoundedClientRect: import("@angular/core").WritableSignal<{
|
|
@@ -31,5 +32,5 @@ export declare class NavSelectorGroupComponent {
|
|
|
31
32
|
unfold(event: Event): void;
|
|
32
33
|
private updateAliasBoundedClientRect;
|
|
33
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<NavSelectorGroupComponent, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NavSelectorGroupComponent, "ap-nav-selector-group", never, { "group": { "alias": "group"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavSelectorGroupComponent, "ap-nav-selector-group", never, { "group": { "alias": "group"; "required": true; "isSignal": true; }; }, { "actionClicked": "actionClicked"; }, never, never, true, never>;
|
|
35
36
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { InternalNavSelectorLeaf, InternalNavSelectorLeafDetails } from '../nav-selector';
|
|
2
|
+
import { InternalNavSelectorLeaf, InternalNavSelectorLeafAction, InternalNavSelectorLeafDetails, NavSelectorLeafActionClickedEvent } from '../nav-selector';
|
|
3
3
|
import { NavSelectorLeafPresenter } from './nav-selector-leaf.presenter';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class NavSelectorLeafComponent {
|
|
6
6
|
private el;
|
|
7
7
|
navSelectorLeafPresenter: NavSelectorLeafPresenter;
|
|
8
8
|
leaf: import("@angular/core").InputSignal<InternalNavSelectorLeaf>;
|
|
9
|
+
actionClicked: import("@angular/core").OutputEmitterRef<NavSelectorLeafActionClickedEvent>;
|
|
9
10
|
initial: import("@angular/core").Signal<string>;
|
|
10
11
|
foldSymbol: import("@angular/core").Signal<"chevron-down" | "chevron-up">;
|
|
11
12
|
focused: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -37,7 +38,8 @@ export declare class NavSelectorLeafComponent {
|
|
|
37
38
|
fold(event: Event): void;
|
|
38
39
|
unfold(event: Event): void;
|
|
39
40
|
onDetailClicked(event: Event, detail: InternalNavSelectorLeafDetails): void;
|
|
41
|
+
onActionClicked(action: InternalNavSelectorLeafAction): void;
|
|
40
42
|
private updateAliasBoundedClientRect;
|
|
41
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<NavSelectorLeafComponent, never>;
|
|
42
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NavSelectorLeafComponent, "ap-nav-selector-leaf", never, { "leaf": { "alias": "leaf"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavSelectorLeafComponent, "ap-nav-selector-leaf", never, { "leaf": { "alias": "leaf"; "required": true; "isSignal": true; }; }, { "actionClicked": "actionClicked"; }, never, never, true, never>;
|
|
43
45
|
}
|
|
@@ -6,7 +6,6 @@ export declare class NavSelectorLeafPresenter {
|
|
|
6
6
|
expanded: import("@angular/core").Signal<boolean>;
|
|
7
7
|
texts: import("@angular/core").Signal<import("../nav-selector").NavSelectorTranslatedTexts>;
|
|
8
8
|
isMultipleModeEnabled: import("@angular/core").Signal<boolean>;
|
|
9
|
-
leafActionProjection: import("@angular/core").Signal<readonly import("@angular/core").TemplateRef<unknown>[] | undefined>;
|
|
10
9
|
expandedAfterDelay: import("@angular/core").Signal<boolean>;
|
|
11
10
|
constructor(navSelectorState: NavSelectorState);
|
|
12
11
|
selectLeaf(leaf: InternalNavSelectorLeaf): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InternalNavSelectorLeafAction } from '../nav-selector';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NavSelectorLeafActionComponent {
|
|
4
|
+
action: import("@angular/core").InputSignal<InternalNavSelectorLeafAction>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavSelectorLeafActionComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavSelectorLeafActionComponent, "ap-nav-selector-leaf-action", never, { "action": { "alias": "action"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementRef, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
-
import { NavSelectorEntry, NavSelectorTranslatedTexts } from './nav-selector';
|
|
2
|
+
import { NavSelectorEntry, NavSelectorLeafActionClickedEvent, NavSelectorTranslatedTexts } from './nav-selector';
|
|
3
3
|
import { NavSelectorState } from './nav-selector.state';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class NavSelectorComponent implements OnInit {
|
|
@@ -16,10 +16,10 @@ export declare class NavSelectorComponent implements OnInit {
|
|
|
16
16
|
forceExpanded: import("@angular/core").InputSignal<boolean>;
|
|
17
17
|
expandedStateLocalStorageKey: import("@angular/core").InputSignal<string | undefined>;
|
|
18
18
|
selectedEntryUids: import("@angular/core").ModelSignal<string[]>;
|
|
19
|
+
actionClicked: import("@angular/core").OutputEmitterRef<NavSelectorLeafActionClickedEvent>;
|
|
19
20
|
headerProjection: import("@angular/core").Signal<TemplateRef<unknown> | undefined>;
|
|
20
21
|
footerProjection: import("@angular/core").Signal<TemplateRef<unknown> | undefined>;
|
|
21
22
|
displayFooter: import("@angular/core").Signal<boolean>;
|
|
22
|
-
leafActionProjection: import("@angular/core").Signal<readonly TemplateRef<unknown>[]>;
|
|
23
23
|
expansionState: import("@angular/core").Signal<"expanded" | "minified">;
|
|
24
24
|
onExpansionStateChange: import("@angular/core").OutputEmitterRef<{
|
|
25
25
|
expanded: boolean;
|
|
@@ -35,5 +35,5 @@ export declare class NavSelectorComponent implements OnInit {
|
|
|
35
35
|
private initializeExpandedState;
|
|
36
36
|
clickExpandButton(): void;
|
|
37
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<NavSelectorComponent, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵ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"; "onExpansionStateChange": "onExpansionStateChange"; }, ["headerProjection", "footerProjection"
|
|
38
|
+
static ɵcmp: i0.ɵɵ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", "footerProjection"], never, true, never>;
|
|
39
39
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { AvatarNetwork } from '@agorapulse/ui-components/avatar';
|
|
2
|
+
export type NavSelectorLeafActionClickedEvent = {
|
|
3
|
+
/** Name of the action that has been clicked */
|
|
4
|
+
actionName: string;
|
|
5
|
+
/** Leaf on which the action has been clicked */
|
|
6
|
+
leafUid: string;
|
|
7
|
+
};
|
|
2
8
|
/**
|
|
3
9
|
* As translation is not available in the DS, this all translations needed
|
|
4
10
|
*/
|
|
@@ -31,6 +37,19 @@ export type NavSelectorBaseNode = {
|
|
|
31
37
|
/** Displayed name of the node */
|
|
32
38
|
alias: string;
|
|
33
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* Represent an action that can be performed on a leaf
|
|
42
|
+
*/
|
|
43
|
+
export type NavSelectorLeafAction = {
|
|
44
|
+
/** Action label to display */
|
|
45
|
+
label: string;
|
|
46
|
+
/** Technical name of the action, used to identify the action */
|
|
47
|
+
name: string;
|
|
48
|
+
/** Optional icon to display on the action */
|
|
49
|
+
icon: string | null;
|
|
50
|
+
/** Optional Status */
|
|
51
|
+
status: 'disabled' | null;
|
|
52
|
+
};
|
|
34
53
|
/**
|
|
35
54
|
* Represent final entry of the nav selector
|
|
36
55
|
*/
|
|
@@ -50,6 +69,8 @@ export type NavSelectorLeaf = {
|
|
|
50
69
|
featureLocked: boolean;
|
|
51
70
|
/** Sub elements of the leaf, they are optional */
|
|
52
71
|
details: NavSelectorLeafDetails[];
|
|
72
|
+
/** Optional actions that can be performed on the leaf */
|
|
73
|
+
actions: NavSelectorLeafAction[];
|
|
53
74
|
type: 'LEAF';
|
|
54
75
|
} & NavSelectorBaseNode;
|
|
55
76
|
/**
|
|
@@ -102,6 +123,16 @@ export type NodeAccessibility = {
|
|
|
102
123
|
/** In a tree, the deep level, starting from 1 */
|
|
103
124
|
ariaLevel: number;
|
|
104
125
|
};
|
|
126
|
+
export type InternalNavSelectorLeafAction = {
|
|
127
|
+
/** Action label to display */
|
|
128
|
+
label: string;
|
|
129
|
+
/** Technical name of the action, used to identify the action */
|
|
130
|
+
name: string;
|
|
131
|
+
/** Optional icon to display on the action */
|
|
132
|
+
icon: string | null;
|
|
133
|
+
/** Optional Status */
|
|
134
|
+
status: 'disabled' | null;
|
|
135
|
+
};
|
|
105
136
|
/**
|
|
106
137
|
* Represent a node
|
|
107
138
|
*/
|
|
@@ -157,11 +188,10 @@ export type InternalNavSelectorCategory = {
|
|
|
157
188
|
* Represent final entry of the nav selector
|
|
158
189
|
*/
|
|
159
190
|
export type InternalNavSelectorLeaf = {
|
|
160
|
-
/**
|
|
161
|
-
* Indicates if the actions dropdown could be display. Should not be display if the leaf has an error status.
|
|
162
|
-
* Note: only working if actions are projected in the nav selector component
|
|
163
|
-
*/
|
|
191
|
+
/** Indicates if the actions dropdown could be display. Should not be display if the leaf has an error status. */
|
|
164
192
|
actionsDisplayable: boolean;
|
|
193
|
+
/** Actions that can be performed on the leaf */
|
|
194
|
+
actions: InternalNavSelectorLeafAction[];
|
|
165
195
|
/** Picture url to display on the avatar, optional */
|
|
166
196
|
pictureUrl: string | null;
|
|
167
197
|
/** Indicates if the counter could be display. The leaf should not be disabled, feature locked or has token invalid */
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
1
|
import { InternalNavSelectorEntry, InternalNavSelectorLeaf, InternalNavSelectorLeafDetails, NavSelectorEntry, NavSelectorTranslatedTexts } from './nav-selector';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
/**
|
|
@@ -15,9 +14,9 @@ export declare class NavSelectorState {
|
|
|
15
14
|
search: import("@angular/core").WritableSignal<string>;
|
|
16
15
|
noResults: import("@angular/core").Signal<boolean>;
|
|
17
16
|
texts: import("@angular/core").Signal<NavSelectorTranslatedTexts>;
|
|
18
|
-
leafActionProjection: import("@angular/core").WritableSignal<readonly TemplateRef<unknown>[] | undefined>;
|
|
19
17
|
expanded: import("@angular/core").WritableSignal<boolean>;
|
|
20
18
|
expandedAfterDelay: import("@angular/core").WritableSignal<boolean>;
|
|
19
|
+
previousSelectedUids: string[];
|
|
21
20
|
selectedUidsChangeCallback: ((selectedUids: string[]) => void) | null;
|
|
22
21
|
constructor();
|
|
23
22
|
updateMultiModeEnabled(enabled: boolean): void;
|
|
@@ -40,7 +39,6 @@ export declare class NavSelectorState {
|
|
|
40
39
|
onArrowUp(): void;
|
|
41
40
|
private collectSelectedUids;
|
|
42
41
|
private getFoldingOptions;
|
|
43
|
-
updateLeafAction(leafActionProjection: ReadonlyArray<TemplateRef<unknown>>): void;
|
|
44
42
|
fold(entry: InternalNavSelectorEntry): void;
|
|
45
43
|
unfold(entry: InternalNavSelectorEntry): void;
|
|
46
44
|
updateDetailsDisplayedLimit(detailsDisplayedLimit: number): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InternalNavSelectorLeaf } from '../nav-selector';
|
|
1
|
+
import { InternalNavSelectorCategory, InternalNavSelectorEntry, InternalNavSelectorGroup, InternalNavSelectorLeaf } from '../nav-selector';
|
|
2
2
|
/**
|
|
3
3
|
* Utility type to extract keys of an object that are of type string, number or symbol which are the only type allowed in a Record
|
|
4
4
|
*/
|
|
@@ -15,4 +15,5 @@ export declare const isInternalNavSelectorEntryALeafFocusable: (leaf: InternalNa
|
|
|
15
15
|
parentFolded: boolean;
|
|
16
16
|
multipleMode: boolean;
|
|
17
17
|
}) => boolean;
|
|
18
|
+
export declare const computeFolded: (entry: InternalNavSelectorGroup | InternalNavSelectorCategory, children: InternalNavSelectorEntry[]) => boolean;
|
|
18
19
|
export {};
|
package/package.json
CHANGED
|
Binary file
|