@nice2dev/ui 1.3.3 → 1.3.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.
- package/CHANGELOG.md +31 -0
- package/dist/NiceModuleLifecyclePanel-CODg_uxV.js +7376 -0
- package/dist/NiceModuleLifecyclePanel-DUdks77F.cjs +1 -0
- package/dist/index.cjs +129 -129
- package/dist/index.css +1 -1
- package/dist/index.d.ts +52 -3
- package/dist/index.mjs +9605 -9497
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +19 -0
- package/dist/navigation.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -17287,6 +17287,9 @@ export declare interface NiceNavShellHomeShortcut {
|
|
|
17287
17287
|
onClick?: () => void;
|
|
17288
17288
|
}
|
|
17289
17289
|
|
|
17290
|
+
/** How NiceNavShell opens pages — see {@link SidebarNavUserPrefs.pageMode}. */
|
|
17291
|
+
export declare type NiceNavShellPageMode = 'auto' | 'single' | 'tabs';
|
|
17292
|
+
|
|
17290
17293
|
export declare type NiceNavShellPersistence = 'memory' | 'localStorage' | 'session';
|
|
17291
17294
|
|
|
17292
17295
|
export declare interface NiceNavShellProps {
|
|
@@ -17391,8 +17394,20 @@ export declare interface NiceNavShellProps {
|
|
|
17391
17394
|
* shortcuts grid, etc.).
|
|
17392
17395
|
*/
|
|
17393
17396
|
emptyState?: ReactNode;
|
|
17394
|
-
/**
|
|
17397
|
+
/**
|
|
17398
|
+
* `'enabled'` offers tabs: whether the strip shows is the user's choice (`pageMode`, set on the
|
|
17399
|
+
* General page of the sidebar preferences) — by default one page at a time in a browser tab,
|
|
17400
|
+
* which has tabs of its own, and tabs in an installed app (1.3.4; before, always tabs).
|
|
17401
|
+
* `'disabled'` (default) never shows tabs and just routes content.
|
|
17402
|
+
*/
|
|
17395
17403
|
tabsMode?: 'enabled' | 'disabled';
|
|
17404
|
+
/**
|
|
17405
|
+
* How pages open when `tabsMode="enabled"` (1.3.4): `'auto'` — tabs in an installed app, one
|
|
17406
|
+
* page at a time in a browser tab; `'single'`; `'tabs'`. Absent: the `pageMode` preference of
|
|
17407
|
+
* `sidebarUserId` (Preferences → General), so the user chooses. Pass it when your own `sidebar`
|
|
17408
|
+
* keeps its preferences elsewhere (e.g. on the server), or to fix the mode.
|
|
17409
|
+
*/
|
|
17410
|
+
pageMode?: NiceNavShellPageMode;
|
|
17396
17411
|
/** When `false` (default) navigating to an already-open route focuses it instead of duplicating. */
|
|
17397
17412
|
allowDuplicateTabs?: boolean;
|
|
17398
17413
|
/** Maximum number of tabs (oldest non-pinned auto-closes when exceeded). */
|
|
@@ -17461,6 +17476,12 @@ export declare interface NiceNavShellProps {
|
|
|
17461
17476
|
* is the whole page, a number — or give its parent one.
|
|
17462
17477
|
*/
|
|
17463
17478
|
height?: number | string;
|
|
17479
|
+
/**
|
|
17480
|
+
* Padding round the page in the body (1.3.4) — px or any CSS `padding` value. Default `10` px;
|
|
17481
|
+
* `0` for a page that fills the body edge to edge (an editor, a map). Also settable in CSS as
|
|
17482
|
+
* `--nice-nav-shell-content-padding`.
|
|
17483
|
+
*/
|
|
17484
|
+
contentPadding?: number | string;
|
|
17464
17485
|
className?: string;
|
|
17465
17486
|
contentClassName?: string;
|
|
17466
17487
|
'data-testid'?: string;
|
|
@@ -20961,6 +20982,11 @@ export declare interface NiceSidebarNavProps {
|
|
|
20961
20982
|
routeToUrl?: (route: string) => string;
|
|
20962
20983
|
/** Enable the right-click context menu on view nodes. Default `true`. */
|
|
20963
20984
|
contextMenu?: boolean;
|
|
20985
|
+
/**
|
|
20986
|
+
* Show "Open in new tab" in the context menu (1.3.4). Default `true`; NiceNavShell turns it off
|
|
20987
|
+
* for its built-in sidebar while it opens one page at a time.
|
|
20988
|
+
*/
|
|
20989
|
+
openInNewTab?: boolean;
|
|
20964
20990
|
/**
|
|
20965
20991
|
* Disable individual destructive context-menu actions (and the matching
|
|
20966
20992
|
* gestures). Listed actions render greyed-out; non-destructive actions
|
|
@@ -23179,6 +23205,11 @@ export declare interface NiceTopNavProps {
|
|
|
23179
23205
|
/** Fired when a view is clicked in the mobile sidebar drawer. Closes the drawer. `opts` as in
|
|
23180
23206
|
* NiceSidebarNav's `onNavigate` (new tab, colours, path). */
|
|
23181
23207
|
onSidebarNavigate?: (route: string, view: SidebarNavView, opts?: SidebarNavNavigateOptions) => void;
|
|
23208
|
+
/**
|
|
23209
|
+
* Show "Open in new tab" in the drawer sidebar's context menu (1.3.4, default `true`).
|
|
23210
|
+
* NiceNavShell turns it off while it opens one page at a time.
|
|
23211
|
+
*/
|
|
23212
|
+
sidebarOpenInNewTab?: boolean;
|
|
23182
23213
|
/**
|
|
23183
23214
|
* Force the narrow "2-row" mobile layout regardless of viewport width. Use
|
|
23184
23215
|
* from `NiceNavShell` to keep the breakpoint decision in one place when the
|
|
@@ -27178,6 +27209,8 @@ export declare interface SidebarNavHelpers {
|
|
|
27178
27209
|
reorderItems: (mode: SidebarNavMode, orderedIds: string[] | null) => void;
|
|
27179
27210
|
/** How level / branch colours show: a bar by each row (default) or the whole row filled. */
|
|
27180
27211
|
setColorStyle: (v: 'bar' | 'fill') => void;
|
|
27212
|
+
/** How NiceNavShell opens pages: automatically, one at a time or in tabs (1.3.4). */
|
|
27213
|
+
setPageMode: (v: NiceNavShellPageMode) => void;
|
|
27181
27214
|
resetAll: () => void;
|
|
27182
27215
|
}
|
|
27183
27216
|
|
|
@@ -27307,6 +27340,17 @@ export declare interface SidebarNavUserPrefs {
|
|
|
27307
27340
|
* `'fill'` the default.
|
|
27308
27341
|
*/
|
|
27309
27342
|
colorStyle: 'bar' | 'fill';
|
|
27343
|
+
/**
|
|
27344
|
+
* How NiceNavShell opens pages when it offers tabs (`tabsMode="enabled"`, 1.3.4):
|
|
27345
|
+
* - `'auto'` (default): in tabs in an installed app (a window of its own, no browser tab strip),
|
|
27346
|
+
* one page at a time in a browser tab — the browser has tabs already;
|
|
27347
|
+
* - `'single'`: one page at a time in the body;
|
|
27348
|
+
* - `'tabs'`: every page in a tab of the shell's strip.
|
|
27349
|
+
*
|
|
27350
|
+
* Set from the General page of the preferences; `preferences={{ pageMode: 'tabs' }}` makes tabs
|
|
27351
|
+
* the default (e.g. a desktop build).
|
|
27352
|
+
*/
|
|
27353
|
+
pageMode: NiceNavShellPageMode;
|
|
27310
27354
|
}
|
|
27311
27355
|
|
|
27312
27356
|
/**
|
|
@@ -27370,7 +27414,7 @@ export declare interface SidebarPrefsCategory {
|
|
|
27370
27414
|
icon: ReactNode;
|
|
27371
27415
|
}
|
|
27372
27416
|
|
|
27373
|
-
export declare function SidebarPrefsScopeProvider({ userId, data, children, }: SidebarPrefsScopeProviderProps): default_2.ReactElement;
|
|
27417
|
+
export declare function SidebarPrefsScopeProvider({ userId, data, tabsAvailable, children, }: SidebarPrefsScopeProviderProps): default_2.ReactElement;
|
|
27374
27418
|
|
|
27375
27419
|
export declare interface SidebarPrefsScopeProviderProps extends SidebarPrefsScopeValue {
|
|
27376
27420
|
children: ReactNode;
|
|
@@ -27384,6 +27428,11 @@ export declare interface SidebarPrefsScopeProviderProps extends SidebarPrefsScop
|
|
|
27384
27428
|
export declare interface SidebarPrefsScopeValue {
|
|
27385
27429
|
userId?: string;
|
|
27386
27430
|
data?: SidebarNavDataNode[];
|
|
27431
|
+
/**
|
|
27432
|
+
* Whether the NavShell around the pages offers tabs (`tabsMode="enabled"`, 1.3.4) — the General
|
|
27433
|
+
* page then lets the user choose how pages open. Unset outside a NavShell.
|
|
27434
|
+
*/
|
|
27435
|
+
tabsAvailable?: boolean;
|
|
27387
27436
|
}
|
|
27388
27437
|
|
|
27389
27438
|
export declare interface SignalRLiveChartSourceConfig {
|
|
@@ -29725,7 +29774,7 @@ export { UseShowAtOptions }
|
|
|
29725
29774
|
|
|
29726
29775
|
export declare function useSidebarNavPrefs(userId: string | undefined, initialEnableModeIcons: boolean | undefined, controlledPrefs: Partial<SidebarNavUserPrefs> | undefined, onChange: ((prefs: SidebarNavUserPrefs) => void) | undefined): [SidebarNavUserPrefs, SidebarNavHelpers];
|
|
29727
29776
|
|
|
29728
|
-
/** Resolve `{ userId, data }` for a preferences page. Props override context. */
|
|
29777
|
+
/** Resolve `{ userId, data, tabsAvailable }` for a preferences page. Props override context. */
|
|
29729
29778
|
export declare function useSidebarPrefsScope(overrides?: SidebarPrefsScopeValue): SidebarPrefsScopeValue;
|
|
29730
29779
|
|
|
29731
29780
|
/** Shortcut for pages that only need the userId. */
|