@nice2dev/ui 1.0.19 → 1.0.21
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 +105 -0
- package/dist/NiceErrorBoundary-B9UWIYPz.js +770 -0
- package/dist/NiceErrorBoundary-Bzx-bOeb.cjs +1 -0
- package/dist/NiceErrorBoundary-CFJh1FyM.js +770 -0
- package/dist/NiceErrorBoundary-DvA00DOz.cjs +1 -0
- package/dist/NiceErrorBoundary-XNceAa-3.cjs +1 -0
- package/dist/NiceErrorBoundary-eTwBEuSH.js +770 -0
- package/dist/NiceErrorBoundary-qp4IJ18o.js +770 -0
- package/dist/NiceErrorBoundary-uT48n_F7.cjs +1 -0
- package/dist/NiceForm-B1Okz7SW.cjs +382 -0
- package/dist/NiceForm-BE8vt5k6.js +5383 -0
- package/dist/NiceForm-BXHPoTcH.cjs +382 -0
- package/dist/NiceForm-BzKlOWJa.js +5383 -0
- package/dist/NiceForm-DL7Kxsi2.js +5383 -0
- package/dist/NiceForm-DYPj-XoP.cjs +382 -0
- package/dist/NiceForm-DZ8jwtA8.cjs +382 -0
- package/dist/NiceForm-D_XZxq3a.js +5383 -0
- package/dist/NiceForm.css +1 -1
- package/dist/NiceModal-0Sg2HxIb.cjs +1 -0
- package/dist/NiceModal-BOkmGqPj.cjs +1 -0
- package/dist/NiceModal-BRih_XEH.js +95 -0
- package/dist/NiceModal-C-yKNnig.cjs +1 -0
- package/dist/NiceModal-C4HIsjrn.js +95 -0
- package/dist/NiceModal-DSabJ81z.js +95 -0
- package/dist/NiceModal-DieswZtd.cjs +1 -0
- package/dist/NiceModal-DjN1yXgw.js +95 -0
- package/dist/NiceModuleLifecyclePanel-95lS8pXO.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-C4jlm9tl.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-CEfeJxw_.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-D4xWUswk.js +6777 -0
- package/dist/NiceModuleLifecyclePanel-L5FNYzF9.js +6781 -0
- package/dist/NiceModuleLifecyclePanel-LdYOMLA6.js +6777 -0
- package/dist/NiceModuleLifecyclePanel-jDzEfvDM.js +6553 -0
- package/dist/NiceModuleLifecyclePanel-sBJLlhJp.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/NicePagination-B2TC6MTL.cjs +1 -0
- package/dist/NicePagination-BAywVGwT.js +171 -0
- package/dist/NicePagination-BT8UWXYG.js +171 -0
- package/dist/NicePagination-CJqksuAl.cjs +1 -0
- package/dist/NicePagination-CiWxbXT9.cjs +1 -0
- package/dist/NicePagination-DnnypBiE.js +171 -0
- package/dist/NicePagination-F8NyMfgc.cjs +1 -0
- package/dist/NicePagination-d6vm1ce3.js +171 -0
- package/dist/NicePinCodeInput-BY_tgKaU.cjs +419 -0
- package/dist/NicePinCodeInput-Bo8Ahkae.js +12240 -0
- package/dist/NicePinCodeInput-CpPtHZsK.js +12240 -0
- package/dist/NicePinCodeInput-Cpa01Yfg.cjs +419 -0
- package/dist/NicePinCodeInput-DDK6qqFW.js +12240 -0
- package/dist/NicePinCodeInput-DdXTdocN.js +12240 -0
- package/dist/NicePinCodeInput-JvYd_LB_.cjs +419 -0
- package/dist/NicePinCodeInput-qAO9tRhm.cjs +419 -0
- package/dist/NiceSavedQueryPanel-BOBULytX.js +6455 -0
- package/dist/NiceSavedQueryPanel-CTfC-qwV.cjs +596 -0
- package/dist/NiceSavedQueryPanel-CpcjQZDl.cjs +596 -0
- package/dist/NiceSavedQueryPanel-Dryck7pv.js +6584 -0
- package/dist/NiceSavedQueryPanel-DtgcsEls.js +6584 -0
- package/dist/NiceSavedQueryPanel-DuonbEem.js +6584 -0
- package/dist/NiceSavedQueryPanel-MdKdGYNg.cjs +596 -0
- package/dist/NiceSavedQueryPanel-TUoWkvpW.cjs +596 -0
- package/dist/NiceTabs-BjBtazRn.cjs +1 -0
- package/dist/NiceTabs-C-VQXNIa.cjs +1 -0
- package/dist/NiceTabs-CJ8G2t0-.js +1657 -0
- package/dist/NiceTabs-D91-vW_P.js +1657 -0
- package/dist/NiceTabs-DirTIQjD.cjs +1 -0
- package/dist/NiceTabs-dwNCzbJ2.cjs +1 -0
- package/dist/NiceTabs-nQEYYbsV.js +1657 -0
- package/dist/NiceTabs-v7HfeXIw.js +1657 -0
- package/dist/NiceWindow-BMiF-so6.cjs +1 -0
- package/dist/NiceWindow-C677O__r.js +1418 -0
- package/dist/NiceWindow-CmgJGE4d.js +1418 -0
- package/dist/NiceWindow-CysIgnn3.js +1418 -0
- package/dist/NiceWindow-D6SjpDc4.cjs +1 -0
- package/dist/NiceWindow-DUTRQOaP.js +1418 -0
- package/dist/NiceWindow-D_h01zyu.cjs +1 -0
- package/dist/NiceWindow-fcTJOlYf.cjs +1 -0
- package/dist/charts-8Bqzj1TE.js +4657 -0
- package/dist/charts-CFn-7PzC.cjs +761 -0
- package/dist/charts-CJlMAHJG.cjs +761 -0
- package/dist/charts-CLbJ4Zjq.js +4657 -0
- package/dist/charts-CUMpSAQe.cjs +761 -0
- package/dist/charts-CX4jiyVh.cjs +761 -0
- package/dist/charts-CYpqDxHd.js +4657 -0
- package/dist/charts-P6qura0j.js +4657 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-BFu5opn6.js +23131 -0
- package/dist/core-BfeyB9A8.cjs +96 -0
- package/dist/core-BgGSTko-.js +22401 -0
- package/dist/core-Bit5kLWQ.cjs +96 -0
- package/dist/core-D0ElqRZA.cjs +96 -0
- package/dist/core-DDJKu5LZ.cjs +96 -0
- package/dist/core-DICON6Z7.js +23129 -0
- package/dist/core-XsWxyBHD.js +22767 -0
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.mjs +3 -3
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.mjs +2 -2
- package/dist/index-B-WxtREy.js +65040 -0
- package/dist/index-ByDRtfrm.js +65050 -0
- package/dist/index-CQIDqjZp.cjs +5194 -0
- package/dist/index-CXVXf_HY.cjs +5194 -0
- package/dist/index-CtikFbFa.js +64337 -0
- package/dist/index-DnfPyuXA.cjs +5194 -0
- package/dist/index-DxO61OUF.cjs +5194 -0
- package/dist/index-xVJiF843.js +65040 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +294 -5
- package/dist/index.mjs +875 -861
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +3 -3
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +35 -2
- package/dist/navigation.mjs +22 -22
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +2 -2
- package/dist/style.css +3 -3
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ import { createUserPreferencesStore } from '@nice2dev/ui-core';
|
|
|
63
63
|
import { createWebSocketDataSource } from '@nice2dev/ui-core';
|
|
64
64
|
import { createZustandAdapter } from '@nice2dev/ui-core';
|
|
65
65
|
import { CrossTabMessage } from '@nice2dev/ui-core';
|
|
66
|
+
import { CSSProperties } from 'react';
|
|
66
67
|
import { default as default_2 } from 'react';
|
|
67
68
|
import { DEFAULT_VARIANT_CONFIG } from '@nice2dev/ui-core';
|
|
68
69
|
import { DENSITY_VALUES } from '@nice2dev/ui-core';
|
|
@@ -1766,6 +1767,20 @@ export { buildFormFieldAria }
|
|
|
1766
1767
|
/** Build the iCalendar text body for the given events. */
|
|
1767
1768
|
export declare function buildIcs(events: NiceIcsEvent[], options?: ExportIcsOptions): string;
|
|
1768
1769
|
|
|
1770
|
+
/** Build resolved `SidebarNavView` items with translated labels. */
|
|
1771
|
+
export declare function buildPrefsCategoryViews(t: (key: string, defaultValue: string) => string): SidebarNavView[];
|
|
1772
|
+
|
|
1773
|
+
/**
|
|
1774
|
+
* Returns a `Record<route, ReactNode>` of the built-in sidebar preference
|
|
1775
|
+
* routes (`preferences/general`, `preferences/display`, `preferences/order`,
|
|
1776
|
+
* `preferences/hidden`, `preferences/reset`) — ready to be merged into
|
|
1777
|
+
* `NiceNavShell`'s `routes` prop.
|
|
1778
|
+
*
|
|
1779
|
+
* NavShell auto-merges these when `includeSidebarPreferenceRoutes` is left at
|
|
1780
|
+
* its default `true`. Call this manually when you want fine-grained control.
|
|
1781
|
+
*/
|
|
1782
|
+
export declare function buildSidebarPrefsRoutes(): Record<string, ReactNode>;
|
|
1783
|
+
|
|
1769
1784
|
/** Bulk operation */
|
|
1770
1785
|
export declare interface BulkOperation {
|
|
1771
1786
|
id: string;
|
|
@@ -15672,7 +15687,9 @@ export declare interface NiceNavShellApi {
|
|
|
15672
15687
|
* any embedded `NiceTopNav` (`forceMobileLayout={isMobile}`) so the hamburger
|
|
15673
15688
|
* switch happens at the same width the sidebar disappears. */
|
|
15674
15689
|
isMobile: boolean;
|
|
15675
|
-
openRoute: (route: string, opts?: Partial<NiceNavShellTab>
|
|
15690
|
+
openRoute: (route: string, opts?: Partial<NiceNavShellTab> & {
|
|
15691
|
+
forceNew?: boolean;
|
|
15692
|
+
}) => void;
|
|
15676
15693
|
closeTab: (id: string) => void;
|
|
15677
15694
|
closeOthers: (id: string) => void;
|
|
15678
15695
|
closeAll: () => void;
|
|
@@ -15680,6 +15697,59 @@ export declare interface NiceNavShellApi {
|
|
|
15680
15697
|
setDirty: (id: string, dirty?: boolean) => void;
|
|
15681
15698
|
}
|
|
15682
15699
|
|
|
15700
|
+
export declare function NiceNavShellHome({ userName, userId, openTabs, routes, routeLabels, routeIcons, shortcuts, onNavigate, showGreeting, showOpenTabs, showShortcuts, showRoutes, maxItemsPerSection, header, footer, className, style, }: NiceNavShellHomeProps): default_2.ReactElement;
|
|
15701
|
+
|
|
15702
|
+
export declare namespace NiceNavShellHome {
|
|
15703
|
+
var displayName: string;
|
|
15704
|
+
}
|
|
15705
|
+
|
|
15706
|
+
/** Props for {@link NiceNavShellHome} — default `homeContent` rendered by NiceNavShell. */
|
|
15707
|
+
export declare interface NiceNavShellHomeProps {
|
|
15708
|
+
/** Display name used in the greeting. */
|
|
15709
|
+
userName?: string;
|
|
15710
|
+
/** User id used to derive shortcuts from NiceSidebarNav's localStorage prefs when `shortcuts` is omitted. */
|
|
15711
|
+
userId?: string;
|
|
15712
|
+
/** Currently open tabs (typically NavShell's `tabs` minus the home tab). */
|
|
15713
|
+
openTabs?: NiceNavShellTab[];
|
|
15714
|
+
/** Map of all available routes (just the keys are read). */
|
|
15715
|
+
routes?: Record<string, unknown>;
|
|
15716
|
+
/** Per-route label overrides. */
|
|
15717
|
+
routeLabels?: Record<string, ReactNode>;
|
|
15718
|
+
/** Per-route icon overrides. */
|
|
15719
|
+
routeIcons?: Record<string, ReactNode>;
|
|
15720
|
+
/** Explicit shortcut list. When set, suppresses auto-derived sidebar favorites. */
|
|
15721
|
+
shortcuts?: NiceNavShellHomeShortcut[];
|
|
15722
|
+
/** Called when a tile is clicked. Receives the route key. */
|
|
15723
|
+
onNavigate?: (route: string) => void;
|
|
15724
|
+
/** Default `true`. */
|
|
15725
|
+
showGreeting?: boolean;
|
|
15726
|
+
/** Default `true`. */
|
|
15727
|
+
showOpenTabs?: boolean;
|
|
15728
|
+
/** Default `true`. */
|
|
15729
|
+
showShortcuts?: boolean;
|
|
15730
|
+
/** Default `true`. */
|
|
15731
|
+
showRoutes?: boolean;
|
|
15732
|
+
/** Cap per section. Default `12`. */
|
|
15733
|
+
maxItemsPerSection?: number;
|
|
15734
|
+
/** Custom header content (replaces the greeting block). */
|
|
15735
|
+
header?: ReactNode;
|
|
15736
|
+
/** Custom footer content (e.g. announcement banner). */
|
|
15737
|
+
footer?: ReactNode;
|
|
15738
|
+
className?: string;
|
|
15739
|
+
style?: CSSProperties;
|
|
15740
|
+
}
|
|
15741
|
+
|
|
15742
|
+
/** A pinned shortcut tile rendered in the shortcuts section. */
|
|
15743
|
+
export declare interface NiceNavShellHomeShortcut {
|
|
15744
|
+
id: string;
|
|
15745
|
+
label: ReactNode;
|
|
15746
|
+
icon?: ReactNode;
|
|
15747
|
+
/** Route to navigate to when clicked. Ignored if `onClick` is given. */
|
|
15748
|
+
route?: string;
|
|
15749
|
+
/** Override the default navigate behaviour. */
|
|
15750
|
+
onClick?: () => void;
|
|
15751
|
+
}
|
|
15752
|
+
|
|
15683
15753
|
export declare type NiceNavShellPersistence = 'memory' | 'localStorage' | 'session';
|
|
15684
15754
|
|
|
15685
15755
|
export declare interface NiceNavShellProps {
|
|
@@ -15706,8 +15776,37 @@ export declare interface NiceNavShellProps {
|
|
|
15706
15776
|
sidebarUserId?: string;
|
|
15707
15777
|
/** Active route highlighted in the sidebar (defaults to `activeRoute`). */
|
|
15708
15778
|
sidebarActiveRoute?: string;
|
|
15709
|
-
/**
|
|
15710
|
-
|
|
15779
|
+
/**
|
|
15780
|
+
* Fired when a view is clicked anywhere in the sidebar (desktop or mobile).
|
|
15781
|
+
*
|
|
15782
|
+
* The optional third arg carries the sidebar's `leftClickBehavior` pref
|
|
15783
|
+
* (or `forceNew: true` when the "Open in new tab" context-menu action is
|
|
15784
|
+
* used). NavShell honours it automatically when `autoOpenSidebarRoutes`
|
|
15785
|
+
* is enabled — handlers can ignore it for backward compat.
|
|
15786
|
+
*/
|
|
15787
|
+
onSidebarNavigate?: (route: string, view: SidebarNavView, opts?: {
|
|
15788
|
+
forceNew?: boolean;
|
|
15789
|
+
}) => void;
|
|
15790
|
+
/**
|
|
15791
|
+
* When true (default when tabs are enabled), NavShell auto-calls
|
|
15792
|
+
* `openRoute(route, { forceNew })` whenever the sidebar fires
|
|
15793
|
+
* `onNavigate`. Disable to keep the legacy "consumer must wire up
|
|
15794
|
+
* navigation manually" behaviour.
|
|
15795
|
+
*/
|
|
15796
|
+
autoOpenSidebarRoutes?: boolean;
|
|
15797
|
+
/**
|
|
15798
|
+
* Resolves a route key to a URL. Forwarded to the auto-rendered
|
|
15799
|
+
* `NiceSidebarNav` so its right-click context menu can show "Open in
|
|
15800
|
+
* new browser tab" and "Copy link".
|
|
15801
|
+
*/
|
|
15802
|
+
routeToUrl?: (route: string) => string;
|
|
15803
|
+
/**
|
|
15804
|
+
* Auto-merge the built-in sidebar preference page routes
|
|
15805
|
+
* (`preferences/general`, `/display`, `/order`, `/hidden`, `/reset`) into
|
|
15806
|
+
* `routes`. Defaults to `true` when `sidebarData` is provided. User-defined
|
|
15807
|
+
* routes with matching keys still win.
|
|
15808
|
+
*/
|
|
15809
|
+
includeSidebarPreferenceRoutes?: boolean;
|
|
15711
15810
|
/**
|
|
15712
15811
|
* Viewport breakpoint (px). At or below this width, the desktop sidebar is
|
|
15713
15812
|
* hidden and the navigation is delegated to the top-nav hamburger drawer
|
|
@@ -15768,6 +15867,34 @@ export declare interface NiceNavShellProps {
|
|
|
15768
15867
|
initialTabs?: NiceNavShellTab[];
|
|
15769
15868
|
/** Routes auto-opened as pinned on first mount. */
|
|
15770
15869
|
pinnedRoutes?: string[];
|
|
15870
|
+
/** Pin a non-closable Home tab as the first tab. Default `true` (when tabs are enabled). */
|
|
15871
|
+
showHomeTab?: boolean;
|
|
15872
|
+
/** Route key for the Home tab. Default `'home'`. */
|
|
15873
|
+
homeRoute?: string;
|
|
15874
|
+
/** Icon rendered in the Home tab. Defaults to a built-in inline house SVG. */
|
|
15875
|
+
homeIcon?: ReactNode;
|
|
15876
|
+
/** Optional label next to the icon. Default `undefined` (icon-only tab). */
|
|
15877
|
+
homeLabel?: ReactNode;
|
|
15878
|
+
/** Content rendered for the Home route. Defaults to a smart `NiceNavShellHome` dashboard. */
|
|
15879
|
+
homeContent?: ReactNode;
|
|
15880
|
+
/** Display name passed to the default Home dashboard greeting. Ignored when `homeContent` is set. */
|
|
15881
|
+
homeUserName?: string;
|
|
15882
|
+
/** Extra props forwarded to the default `NiceNavShellHome` dashboard. Ignored when `homeContent` is set. */
|
|
15883
|
+
homeDashboardProps?: Partial<NiceNavShellHomeProps>;
|
|
15884
|
+
/** Render a sticky header above the route content. Default `false`. */
|
|
15885
|
+
showStickyHeader?: boolean;
|
|
15886
|
+
/** Content rendered in the sticky header slot — accepts any React node (NiceMenu, buttons, dashboards). */
|
|
15887
|
+
stickyHeaderContent?: ReactNode;
|
|
15888
|
+
/** Render a sticky footer below the route content. Default `false`. */
|
|
15889
|
+
showStickyFooter?: boolean;
|
|
15890
|
+
/** Content rendered in the sticky footer slot — accepts any React node. */
|
|
15891
|
+
stickyFooterContent?: ReactNode;
|
|
15892
|
+
/** Show the built-in `?` button in the embedded top-nav and wire the default help flow. Default `false`. */
|
|
15893
|
+
showHelpButton?: boolean;
|
|
15894
|
+
/** Override default help steps. When omitted, NavShell auto-generates steps from visible elements. */
|
|
15895
|
+
helpSteps?: NiceTutorialStep[];
|
|
15896
|
+
/** Disable individual default steps by key. */
|
|
15897
|
+
helpStepsExclude?: Array<'topNav' | 'sidebar' | 'tabs' | 'content'>;
|
|
15771
15898
|
className?: string;
|
|
15772
15899
|
contentClassName?: string;
|
|
15773
15900
|
'data-testid'?: string;
|
|
@@ -18986,8 +19113,25 @@ export declare interface NiceSidebarNavProps {
|
|
|
18986
19113
|
userId?: string;
|
|
18987
19114
|
/** Currently active route (for item highlighting) */
|
|
18988
19115
|
activeRoute?: string;
|
|
18989
|
-
/**
|
|
18990
|
-
|
|
19116
|
+
/**
|
|
19117
|
+
* Called when user clicks a navigable view.
|
|
19118
|
+
*
|
|
19119
|
+
* `opts.forceNew` mirrors the user's `leftClickBehavior` preference (or the
|
|
19120
|
+
* "Open in new tab" context-menu action). Hosts that don't care about this
|
|
19121
|
+
* — e.g. a single-pane layout — can ignore the third argument; nothing else
|
|
19122
|
+
* changes for them.
|
|
19123
|
+
*/
|
|
19124
|
+
onNavigate?: (route: string, view: SidebarNavView, opts?: {
|
|
19125
|
+
forceNew?: boolean;
|
|
19126
|
+
}) => void;
|
|
19127
|
+
/**
|
|
19128
|
+
* Resolves a route key to a URL. When provided, the right-click menu shows
|
|
19129
|
+
* "Open in new browser tab" (via `window.open`) and "Copy link". When
|
|
19130
|
+
* omitted, both items are hidden.
|
|
19131
|
+
*/
|
|
19132
|
+
routeToUrl?: (route: string) => string;
|
|
19133
|
+
/** Enable the right-click context menu on view nodes. Default `true`. */
|
|
19134
|
+
contextMenu?: boolean;
|
|
18991
19135
|
/**
|
|
18992
19136
|
* Override the initial enableModeIcons flag.
|
|
18993
19137
|
* Can be toggled later via Preferences.
|
|
@@ -19047,6 +19191,58 @@ export declare interface NiceSidebarNavProps {
|
|
|
19047
19191
|
'data-testid'?: string;
|
|
19048
19192
|
}
|
|
19049
19193
|
|
|
19194
|
+
export declare function NiceSidebarPrefsDisplay({ userId: userIdProp, }?: NiceSidebarPrefsDisplayProps): default_2.ReactElement;
|
|
19195
|
+
|
|
19196
|
+
export declare namespace NiceSidebarPrefsDisplay {
|
|
19197
|
+
var displayName: string;
|
|
19198
|
+
}
|
|
19199
|
+
|
|
19200
|
+
export declare interface NiceSidebarPrefsDisplayProps {
|
|
19201
|
+
userId?: string;
|
|
19202
|
+
}
|
|
19203
|
+
|
|
19204
|
+
export declare function NiceSidebarPrefsGeneral({ userId: userIdProp, }?: NiceSidebarPrefsGeneralProps): default_2.ReactElement;
|
|
19205
|
+
|
|
19206
|
+
export declare namespace NiceSidebarPrefsGeneral {
|
|
19207
|
+
var displayName: string;
|
|
19208
|
+
}
|
|
19209
|
+
|
|
19210
|
+
export declare interface NiceSidebarPrefsGeneralProps {
|
|
19211
|
+
/** Explicit override — used when consuming this page outside a NavShell scope. */
|
|
19212
|
+
userId?: string;
|
|
19213
|
+
}
|
|
19214
|
+
|
|
19215
|
+
export declare function NiceSidebarPrefsHidden({ userId: userIdProp, }?: NiceSidebarPrefsHiddenProps): default_2.ReactElement;
|
|
19216
|
+
|
|
19217
|
+
export declare namespace NiceSidebarPrefsHidden {
|
|
19218
|
+
var displayName: string;
|
|
19219
|
+
}
|
|
19220
|
+
|
|
19221
|
+
export declare interface NiceSidebarPrefsHiddenProps {
|
|
19222
|
+
userId?: string;
|
|
19223
|
+
}
|
|
19224
|
+
|
|
19225
|
+
export declare function NiceSidebarPrefsOrder({ userId: userIdProp, data: dataProp, }?: NiceSidebarPrefsOrderProps): default_2.ReactElement;
|
|
19226
|
+
|
|
19227
|
+
export declare namespace NiceSidebarPrefsOrder {
|
|
19228
|
+
var displayName: string;
|
|
19229
|
+
}
|
|
19230
|
+
|
|
19231
|
+
export declare interface NiceSidebarPrefsOrderProps {
|
|
19232
|
+
userId?: string;
|
|
19233
|
+
data?: SidebarNavDataNode[];
|
|
19234
|
+
}
|
|
19235
|
+
|
|
19236
|
+
export declare function NiceSidebarPrefsReset({ userId: userIdProp, }?: NiceSidebarPrefsResetProps): default_2.ReactElement;
|
|
19237
|
+
|
|
19238
|
+
export declare namespace NiceSidebarPrefsReset {
|
|
19239
|
+
var displayName: string;
|
|
19240
|
+
}
|
|
19241
|
+
|
|
19242
|
+
export declare interface NiceSidebarPrefsResetProps {
|
|
19243
|
+
userId?: string;
|
|
19244
|
+
}
|
|
19245
|
+
|
|
19050
19246
|
export { NiceSignalRConfig }
|
|
19051
19247
|
|
|
19052
19248
|
export declare const NiceSignature: default_2.ForwardRefExoticComponent<NiceSignatureProps & default_2.RefAttributes<NiceSignatureRef>>;
|
|
@@ -21219,6 +21415,16 @@ export declare interface NiceTopNavProps {
|
|
|
21219
21415
|
settingsMenuItems?: UserMenuItem[];
|
|
21220
21416
|
/** Settings button aria-label / tooltip. */
|
|
21221
21417
|
settingsLabel?: string;
|
|
21418
|
+
/**
|
|
21419
|
+
* Show a built-in `?` help button in the right cluster. Used by
|
|
21420
|
+
* `NiceNavShell` to launch the contextual help walkthrough.
|
|
21421
|
+
* Default `false`.
|
|
21422
|
+
*/
|
|
21423
|
+
showHelpButton?: boolean;
|
|
21424
|
+
/** Help button click handler — required when `showHelpButton` is true. */
|
|
21425
|
+
onHelpClick?: () => void;
|
|
21426
|
+
/** Help button aria-label / tooltip. Defaults to translated "Help". */
|
|
21427
|
+
helpLabel?: string;
|
|
21222
21428
|
/**
|
|
21223
21429
|
* Wrap search + language + theme pickers in a collapsible cluster with a
|
|
21224
21430
|
* chevron toggle. When `true` (default), the cluster starts collapsed and
|
|
@@ -23766,6 +23972,9 @@ export { PreferencesStorageAdapter }
|
|
|
23766
23972
|
|
|
23767
23973
|
export { PreferencesSyncAdapter }
|
|
23768
23974
|
|
|
23975
|
+
/** Ordered list of preference categories rendered as a navigable tree. */
|
|
23976
|
+
export declare const PREFS_CATEGORIES: SidebarPrefsCategory[];
|
|
23977
|
+
|
|
23769
23978
|
/**
|
|
23770
23979
|
* Preload all heavy components
|
|
23771
23980
|
*
|
|
@@ -25108,6 +25317,9 @@ export declare type ShapeType = 'rectangle' | 'ellipse' | 'polygon' | 'freehand'
|
|
|
25108
25317
|
|
|
25109
25318
|
export declare const ShopifyConnector: ConnectorDefinition;
|
|
25110
25319
|
|
|
25320
|
+
/** Route keys produced by {@link buildSidebarPrefsRoutes}. */
|
|
25321
|
+
export declare const SIDEBAR_PREFS_ROUTE_KEYS: ReadonlyArray<string>;
|
|
25322
|
+
|
|
25111
25323
|
/**
|
|
25112
25324
|
* Top-level data node: one data source with all its navigation children.
|
|
25113
25325
|
* modules → used in 'all' mode (depth: source → module → view)
|
|
@@ -25146,6 +25358,26 @@ export declare interface SidebarNavFavorite {
|
|
|
25146
25358
|
addedAt: number;
|
|
25147
25359
|
}
|
|
25148
25360
|
|
|
25361
|
+
export declare interface SidebarNavHelpers {
|
|
25362
|
+
setMode: (mode: SidebarNavMode) => void;
|
|
25363
|
+
setEnableModeIcons: (enabled: boolean) => void;
|
|
25364
|
+
toggleMode: (mode: SidebarNavMode) => void;
|
|
25365
|
+
pinSource: (mode: SidebarNavMode, sourceId: string) => void;
|
|
25366
|
+
unpinSource: (mode: SidebarNavMode, sourceId: string) => void;
|
|
25367
|
+
hideItem: (item: SidebarNavHiddenItem) => void;
|
|
25368
|
+
restoreItem: (id: string) => void;
|
|
25369
|
+
addFavorite: (fav: SidebarNavFavorite) => void;
|
|
25370
|
+
removeFavorite: (id: string) => void;
|
|
25371
|
+
setMaxDepth: (mode: SidebarNavMode, depth: number) => void;
|
|
25372
|
+
toggleCollapse: (nodeId: string) => void;
|
|
25373
|
+
setAutoExpand: (v: boolean) => void;
|
|
25374
|
+
/** Set the user's preferred left-click behaviour for sidebar items. */
|
|
25375
|
+
setLeftClickBehavior: (v: 'focus-existing' | 'open-new') => void;
|
|
25376
|
+
/** Replace the per-mode ordering of item ids. Pass `null` to clear (revert to data-defined order). */
|
|
25377
|
+
reorderItems: (mode: SidebarNavMode, orderedIds: string[] | null) => void;
|
|
25378
|
+
resetAll: () => void;
|
|
25379
|
+
}
|
|
25380
|
+
|
|
25149
25381
|
export declare interface SidebarNavHiddenItem {
|
|
25150
25382
|
/** The id of the hidden entity (source/module/view/role/unit id) */
|
|
25151
25383
|
id: string;
|
|
@@ -25213,6 +25445,22 @@ export declare interface SidebarNavUserPrefs {
|
|
|
25213
25445
|
collapsedIds: string[];
|
|
25214
25446
|
/** Start everything expanded (default: true) */
|
|
25215
25447
|
autoExpand: boolean;
|
|
25448
|
+
/**
|
|
25449
|
+
* What left-click does when the route is already open in a tab.
|
|
25450
|
+
* - `'focus-existing'` (default): focus the existing tab (no duplicate)
|
|
25451
|
+
* - `'open-new'`: always open a new tab (duplicates allowed)
|
|
25452
|
+
*
|
|
25453
|
+
* Communicated to the host via the third arg of `onNavigate`
|
|
25454
|
+
* (`{ forceNew: boolean }`). NavShell honours it when
|
|
25455
|
+
* `autoOpenSidebarRoutes` is enabled.
|
|
25456
|
+
*/
|
|
25457
|
+
leftClickBehavior: 'focus-existing' | 'open-new';
|
|
25458
|
+
/**
|
|
25459
|
+
* User-chosen ordering of item ids for each mode. Items not present
|
|
25460
|
+
* keep their original (data-defined) order after the listed ones.
|
|
25461
|
+
* Edited from the "Order" page in preferences.
|
|
25462
|
+
*/
|
|
25463
|
+
itemOrder: Partial<Record<SidebarNavMode, string[]>>;
|
|
25216
25464
|
}
|
|
25217
25465
|
|
|
25218
25466
|
/** A single navigable view / entity view */
|
|
@@ -25229,6 +25477,39 @@ export declare interface SidebarNavView {
|
|
|
25229
25477
|
moduleId?: string;
|
|
25230
25478
|
}
|
|
25231
25479
|
|
|
25480
|
+
/**
|
|
25481
|
+
* Definition of a single navigable preferences category. Mirrors the shape
|
|
25482
|
+
* of a `SidebarNavView` so it can be rendered by the existing sidebar tree
|
|
25483
|
+
* code without special-casing.
|
|
25484
|
+
*/
|
|
25485
|
+
export declare interface SidebarPrefsCategory {
|
|
25486
|
+
id: string;
|
|
25487
|
+
/** Route key — passed to `onNavigate`. Convention: `preferences/<slug>`. */
|
|
25488
|
+
route: string;
|
|
25489
|
+
/** Translation key for the visible label. */
|
|
25490
|
+
labelKey: string;
|
|
25491
|
+
/** English fallback for the label. */
|
|
25492
|
+
labelDefault: string;
|
|
25493
|
+
/** Inline SVG icon node. */
|
|
25494
|
+
icon: ReactNode;
|
|
25495
|
+
}
|
|
25496
|
+
|
|
25497
|
+
export declare function SidebarPrefsScopeProvider({ userId, data, children, }: SidebarPrefsScopeProviderProps): default_2.ReactElement;
|
|
25498
|
+
|
|
25499
|
+
export declare interface SidebarPrefsScopeProviderProps extends SidebarPrefsScopeValue {
|
|
25500
|
+
children: ReactNode;
|
|
25501
|
+
}
|
|
25502
|
+
|
|
25503
|
+
/**
|
|
25504
|
+
* Shared scope wiring needed by the preferences pages rendered as NavShell
|
|
25505
|
+
* routes. NavShell sets this whenever `sidebarUserId` and/or `sidebarData`
|
|
25506
|
+
* are provided; pages also accept explicit prop overrides.
|
|
25507
|
+
*/
|
|
25508
|
+
export declare interface SidebarPrefsScopeValue {
|
|
25509
|
+
userId?: string;
|
|
25510
|
+
data?: SidebarNavDataNode[];
|
|
25511
|
+
}
|
|
25512
|
+
|
|
25232
25513
|
export declare interface SignalRLiveChartSourceConfig {
|
|
25233
25514
|
/** SignalR hub connection. */
|
|
25234
25515
|
hubConnection: {
|
|
@@ -27537,6 +27818,14 @@ export { useShowAt }
|
|
|
27537
27818
|
|
|
27538
27819
|
export { UseShowAtOptions }
|
|
27539
27820
|
|
|
27821
|
+
export declare function useSidebarNavPrefs(userId: string | undefined, initialEnableModeIcons: boolean | undefined, controlledPrefs: Partial<SidebarNavUserPrefs> | undefined, onChange: ((prefs: SidebarNavUserPrefs) => void) | undefined): [SidebarNavUserPrefs, SidebarNavHelpers];
|
|
27822
|
+
|
|
27823
|
+
/** Resolve `{ userId, data }` for a preferences page. Props override context. */
|
|
27824
|
+
export declare function useSidebarPrefsScope(overrides?: SidebarPrefsScopeValue): SidebarPrefsScopeValue;
|
|
27825
|
+
|
|
27826
|
+
/** Shortcut for pages that only need the userId. */
|
|
27827
|
+
export declare function useSidebarUserId(override?: string): string | undefined;
|
|
27828
|
+
|
|
27540
27829
|
/**
|
|
27541
27830
|
* Hook to get a namespaced storage adapter.
|
|
27542
27831
|
*/
|