@zambon-dev/library 1.4.0 → 1.5.0
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/CHANGELOG.md +52 -1
- package/fesm2022/zambon-dev-library.mjs +96 -14
- package/fesm2022/zambon-dev-library.mjs.map +1 -1
- package/lib/components/catalog-select/catalog-select.component.d.ts +10 -0
- package/lib/components/sidebar/sidebar.component.d.ts +9 -0
- package/lib/models/sidebar/sidebar-configs.d.ts +11 -0
- package/lib/services/sidebar.service.d.ts +6 -0
- package/package.json +1 -1
|
@@ -98,7 +98,17 @@ export declare class CatalogSelectComponent extends BaseComponent implements OnI
|
|
|
98
98
|
private openDropdownOverlay;
|
|
99
99
|
private refreshSearch;
|
|
100
100
|
private resetMessages;
|
|
101
|
+
private resolveDisplay;
|
|
101
102
|
private syncDisplayFromCurrentValue;
|
|
103
|
+
/**
|
|
104
|
+
* Decides whether the display control has to be written again.
|
|
105
|
+
*
|
|
106
|
+
* The value on its own is not enough. Resetting a form clears the display control and then
|
|
107
|
+
* patches the same value back, so an unchanged value can still leave the display empty. That
|
|
108
|
+
* only happens when the stored value equals the control's initial value, which is why it used
|
|
109
|
+
* to show up on the default entry alone.
|
|
110
|
+
*/
|
|
111
|
+
private shouldRefreshDisplay;
|
|
102
112
|
private syncFormControlsEnabledDisabled;
|
|
103
113
|
private tryFilterFromDataset;
|
|
104
114
|
private updateFilters;
|
|
@@ -24,7 +24,16 @@ export declare class SidebarComponent extends BaseComponent implements AfterView
|
|
|
24
24
|
collapse(): void;
|
|
25
25
|
protected trackByFn(_index: number, item: SidebarMenu): number;
|
|
26
26
|
protected trackByRegion(_index: number, region: SidebarRegion): string;
|
|
27
|
+
/** Whether this top-level menu stands for an area rather than a destination of its own. */
|
|
28
|
+
private isArea;
|
|
29
|
+
private groupByRegionLabel;
|
|
30
|
+
private groupByRootMenus;
|
|
27
31
|
private groupIntoRegions;
|
|
32
|
+
/**
|
|
33
|
+
* Fetches the children of every area up front, because they are rendered flat rather than
|
|
34
|
+
* behind a click, so the lazy load a collapsible parent relies on would never be triggered.
|
|
35
|
+
*/
|
|
36
|
+
private loadAreaChildren;
|
|
28
37
|
private deactivate;
|
|
29
38
|
private updateShouldActivate;
|
|
30
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<SidebarComponent, never>;
|
|
@@ -5,6 +5,17 @@ export declare class SidebarConfigs {
|
|
|
5
5
|
/** Tooltip for items that open in a new browser tab. Rendered as-is, like {@link errorText}. */
|
|
6
6
|
externalLinkText: string;
|
|
7
7
|
loadingText: string;
|
|
8
|
+
/**
|
|
9
|
+
* Derive region headers from the menu tree instead of from {@link SidebarMenu.region}.
|
|
10
|
+
*
|
|
11
|
+
* With this on, a top-level menu that has children and no URL stops being a collapsible node
|
|
12
|
+
* and becomes an area header, with its children rendered flat beneath it as top-level items --
|
|
13
|
+
* icons included. The area is then a real menu row, so it carries its own translated label and
|
|
14
|
+
* its own order, and no `region` label has to be repeated across every item that belongs to it.
|
|
15
|
+
*
|
|
16
|
+
* Off by default: without it a top-level parent stays the collapsible group it has always been.
|
|
17
|
+
*/
|
|
18
|
+
shouldDeriveAreasFromRootMenus: boolean;
|
|
8
19
|
logoCollapsedPath?: string;
|
|
9
20
|
logoExpandedPath?: string;
|
|
10
21
|
constructor(options?: Partial<SidebarConfigs>);
|
|
@@ -16,6 +16,12 @@ export declare abstract class SidebarService {
|
|
|
16
16
|
private selectedMenu;
|
|
17
17
|
deselectAll(): void;
|
|
18
18
|
loadChildren(parentMenu: SidebarMenu): void;
|
|
19
|
+
/**
|
|
20
|
+
* Loads a parent's children and hands them back, for callers that need them before the user
|
|
21
|
+
* clicks -- a sidebar rendering areas flat has to have them up front. {@link loadChildren} is
|
|
22
|
+
* the fire-and-forget variant that also raises the loading and failure events.
|
|
23
|
+
*/
|
|
24
|
+
loadChildrenFor(parentMenu: SidebarMenu): Observable<SidebarMenu[]>;
|
|
19
25
|
loadRoot(): Observable<SidebarMenu[]>;
|
|
20
26
|
select(menu: SidebarMenu): void;
|
|
21
27
|
private deselectMenu;
|