@visma-swno/vsn-navigation 1.8.0-beta.1 → 1.8.0-beta.2
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.
|
@@ -160,9 +160,27 @@ export declare class VSNNavigation extends LitElement {
|
|
|
160
160
|
notificationActive: boolean;
|
|
161
161
|
/** When true, the side bar is opened */
|
|
162
162
|
open: boolean;
|
|
163
|
+
/** When true, the side bar is pinned */
|
|
164
|
+
pinned: boolean;
|
|
165
|
+
/** Enables the Pin/Unpin control in the footer dropdown */
|
|
166
|
+
pinToggleEnabled: boolean;
|
|
163
167
|
private _resolvedModules;
|
|
164
168
|
private _modulesLoading;
|
|
169
|
+
private _isMobile;
|
|
165
170
|
private _modulesLoadToken;
|
|
171
|
+
private _mobileQuery;
|
|
172
|
+
private _onMobileChange;
|
|
173
|
+
/** Ensures the persisted pin preference is restored at most once per component
|
|
174
|
+
instance — from the first render at which the authenticated user is known. */
|
|
175
|
+
private _pinPreferenceRestored;
|
|
176
|
+
/** Pinned is only effective on non-mobile viewports — mobile is always overlay. */
|
|
177
|
+
private get _effectivePinned();
|
|
178
|
+
/**
|
|
179
|
+
* The pinned (in-flow) layout is applied only while the pinned side bar is actually shown.
|
|
180
|
+
*/
|
|
181
|
+
private get _pinnedLayout();
|
|
182
|
+
/** The Pin/Unpin control is offered only when enabled and not on mobile. */
|
|
183
|
+
private get _pinControlVisible();
|
|
166
184
|
/** Set at close time: whether focus was inside the side-bar. Gates the focus
|
|
167
185
|
restore so we don't steal focus when the user closed the side-bar by
|
|
168
186
|
clicking a focusable element outside (e.g. a top-bar button). */
|
|
@@ -172,6 +190,7 @@ export declare class VSNNavigation extends LitElement {
|
|
|
172
190
|
private get _sidebarTree();
|
|
173
191
|
private get _topBarTree();
|
|
174
192
|
willUpdate(changed: Map<string, unknown>): void;
|
|
193
|
+
private _maybeRestorePinPreference;
|
|
175
194
|
private _onTopBarMenuItemChanged;
|
|
176
195
|
private _onSideBarMenuItemChanged;
|
|
177
196
|
private get _resolvedLang();
|
|
@@ -184,6 +203,10 @@ export declare class VSNNavigation extends LitElement {
|
|
|
184
203
|
updated(changed: Map<string, unknown>): void;
|
|
185
204
|
connectedCallback(): void;
|
|
186
205
|
disconnectedCallback(): void;
|
|
206
|
+
/**
|
|
207
|
+
* Toggle the pin state from the footer control.
|
|
208
|
+
*/
|
|
209
|
+
private _onPinToggle;
|
|
187
210
|
/** Toggles the side-bar: opens and focuses search when closed, closes when open.
|
|
188
211
|
* Shortcut: Cmd+O on Mac (Ctrl+O also accepted as a Safari fallback); Ctrl+O on all other platforms. */
|
|
189
212
|
private _onShortcut;
|
|
@@ -216,6 +239,14 @@ export declare type VsnNavigation = {
|
|
|
216
239
|
feedback?: FeedbackConfig | null;
|
|
217
240
|
/** Keep the module switcher permanently open (non-closable). Default false. */
|
|
218
241
|
moduleSwitcherAlwaysOpen?: boolean;
|
|
242
|
+
/** When true, the side bar is shown. On its own it opens as an overlay; combined
|
|
243
|
+
with `pinned` it is shown as a pinned column. Removing it hides the side bar. */
|
|
244
|
+
open?: boolean;
|
|
245
|
+
/** When true, the (open) side bar is pinned as part of the layout instead of
|
|
246
|
+
overlaying the page. Requires `open` to be visible; ignored on mobile. */
|
|
247
|
+
pinned?: boolean;
|
|
248
|
+
/** Enable the Pin/Unpin control in the footer dropdown */
|
|
249
|
+
pinToggleEnabled?: boolean;
|
|
219
250
|
};
|
|
220
251
|
|
|
221
252
|
export declare class VSNSkipToMain extends LitElement {
|