@visma-swno/vsn-navigation 1.3.0-beta.3 → 1.3.0-beta.4
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.
|
@@ -34,6 +34,10 @@ export declare function isTreeLeaf(item: TreeItem): item is TreeLeaf;
|
|
|
34
34
|
|
|
35
35
|
export declare function isTreeParent(item: TreeItem): item is TreeParent;
|
|
36
36
|
|
|
37
|
+
export declare type ItemChangedEventDetail = TreeLeaf & {
|
|
38
|
+
previewExtraAttributes?: Record<string, any>;
|
|
39
|
+
};
|
|
40
|
+
|
|
37
41
|
/** Supported languages. Note: 'nb' and 'nn' are automatically mapped to 'no'. Non-supported languages will default to 'en' */
|
|
38
42
|
export declare type LanguageCode = 'en' | 'no' | 'nb' | 'nn' | 'sv' | 'nl' | 'fi' | 'da';
|
|
39
43
|
|
|
@@ -48,6 +52,11 @@ export declare type NavigationMenu = {
|
|
|
48
52
|
/** The list of items to show in the side menu and the breadcrumbs. Applications can
|
|
49
53
|
update it at any time, e.g. when the context changes, when the language changes */
|
|
50
54
|
items: TreeItem[];
|
|
55
|
+
/** Alternative set of items (e.g. for preview). When
|
|
56
|
+
previewItems is set, the sidebar always shows them. The topbar switches to
|
|
57
|
+
them once currentItem is found within previewItems. */
|
|
58
|
+
previewItems?: TreeItem[];
|
|
59
|
+
previewExtraAttributes?: Record<string, any>;
|
|
51
60
|
/** the item id corresponding to the current page. When it's found in items,
|
|
52
61
|
the breadcrumbs will update to reflect the path to the item and side menu will
|
|
53
62
|
expand and select that item. When it's not found in items, breadcrumbs will show
|
|
@@ -143,7 +152,6 @@ export declare class VSNNavigation extends LitElement {
|
|
|
143
152
|
notificationActive: boolean;
|
|
144
153
|
/** When true, the side bar is opened */
|
|
145
154
|
open: boolean;
|
|
146
|
-
private _currentItem;
|
|
147
155
|
private _resolvedModules;
|
|
148
156
|
private _modulesLoading;
|
|
149
157
|
private _modulesLoadToken;
|
|
@@ -153,11 +161,12 @@ export declare class VSNNavigation extends LitElement {
|
|
|
153
161
|
private _restoreFocusToToggle;
|
|
154
162
|
private _resolveModules;
|
|
155
163
|
static styles: CSSResult[];
|
|
164
|
+
private get _sidebarTree();
|
|
165
|
+
private get _topBarTree();
|
|
156
166
|
willUpdate(changed: Map<string, unknown>): void;
|
|
167
|
+
private _onTopBarMenuItemChanged;
|
|
168
|
+
private _onSideBarMenuItemChanged;
|
|
157
169
|
private get _resolvedLang();
|
|
158
|
-
private _getFirstLeafId;
|
|
159
|
-
/** Project tree into the shape the side-bar expects: top-level items lifted from the active module. */
|
|
160
|
-
private get _sideBarMenu();
|
|
161
170
|
private _onToggleSideBar;
|
|
162
171
|
/** Open the side-bar and, once rendered, focus the search field (if enabled).
|
|
163
172
|
Shared by the hamburger toggle and the keyboard shortcut. */
|