@visma-swno/vsn-navigation 1.3.0-beta.3 → 1.3.0-beta.5

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,6 +1,7 @@
1
1
  import { CSSResult } from 'lit';
2
2
  import { LitElement } from 'lit';
3
3
  import { TemplateResult } from 'lit-html';
4
+ import { VSNSkipToMain } from './vsn-skip-to-main.ts';
4
5
 
5
6
  export declare type AppModules = {
6
7
  /** Current module id (to be ignored from the list of modules) */
@@ -34,6 +35,10 @@ export declare function isTreeLeaf(item: TreeItem): item is TreeLeaf;
34
35
 
35
36
  export declare function isTreeParent(item: TreeItem): item is TreeParent;
36
37
 
38
+ export declare type ItemChangedEventDetail = TreeLeaf & {
39
+ previewExtraAttributes?: Record<string, any>;
40
+ };
41
+
37
42
  /** Supported languages. Note: 'nb' and 'nn' are automatically mapped to 'no'. Non-supported languages will default to 'en' */
38
43
  export declare type LanguageCode = 'en' | 'no' | 'nb' | 'nn' | 'sv' | 'nl' | 'fi' | 'da';
39
44
 
@@ -48,6 +53,11 @@ export declare type NavigationMenu = {
48
53
  /** The list of items to show in the side menu and the breadcrumbs. Applications can
49
54
  update it at any time, e.g. when the context changes, when the language changes */
50
55
  items: TreeItem[];
56
+ /** Alternative set of items (e.g. for preview). When
57
+ previewItems is set, the sidebar always shows them. The topbar switches to
58
+ them once currentItem is found within previewItems. */
59
+ previewItems?: TreeItem[];
60
+ previewExtraAttributes?: Record<string, any>;
51
61
  /** the item id corresponding to the current page. When it's found in items,
52
62
  the breadcrumbs will update to reflect the path to the item and side menu will
53
63
  expand and select that item. When it's not found in items, breadcrumbs will show
@@ -143,7 +153,6 @@ export declare class VSNNavigation extends LitElement {
143
153
  notificationActive: boolean;
144
154
  /** When true, the side bar is opened */
145
155
  open: boolean;
146
- private _currentItem;
147
156
  private _resolvedModules;
148
157
  private _modulesLoading;
149
158
  private _modulesLoadToken;
@@ -153,11 +162,12 @@ export declare class VSNNavigation extends LitElement {
153
162
  private _restoreFocusToToggle;
154
163
  private _resolveModules;
155
164
  static styles: CSSResult[];
165
+ private get _sidebarTree();
166
+ private get _topBarTree();
156
167
  willUpdate(changed: Map<string, unknown>): void;
168
+ private _onTopBarMenuItemChanged;
169
+ private _onSideBarMenuItemChanged;
157
170
  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
171
  private _onToggleSideBar;
162
172
  /** Open the side-bar and, once rendered, focus the search field (if enabled).
163
173
  Shared by the hamburger toggle and the keyboard shortcut. */
@@ -197,4 +207,6 @@ export declare type VsnNavigation = {
197
207
  feedback?: FeedbackConfig | null;
198
208
  };
199
209
 
210
+ export { VSNSkipToMain }
211
+
200
212
  export { }