@nice2dev/ui 1.3.17 → 1.3.18
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 +71 -0
- package/README.md +2 -2
- package/dist/{NiceDataGrid-aNPAHsWy.cjs → NiceDataGrid-CFibAGHt.cjs} +1 -1
- package/dist/NiceForm-ChRj4r3f.cjs +1 -0
- package/dist/{NiceMention-CMqAGvO0.cjs → NiceMention-DNx3d9L7.cjs} +1 -1
- package/dist/NiceModuleLifecyclePanel-D8Q081R6.cjs +1 -0
- package/dist/{NiceSavedQueryPanel-JHrSlHAV.cjs → NiceSavedQueryPanel-BuRAgrBk.cjs} +1 -1
- package/dist/{NiceScheduler-2TwOZq-y.cjs → NiceScheduler-DAoo1eyo.cjs} +1 -1
- package/dist/{core-lazy-Cda-D35m.cjs → core-lazy-DohJQ33c.cjs} +1 -1
- package/dist/data/treeDragSession.mjs +52 -46
- package/dist/data.cjs +1 -1
- package/dist/editors/inputs/NiceAutocomplete.mjs +44 -46
- package/dist/editors/pickers/NiceDateTimePicker.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/index.cjs +113 -113
- package/dist/index.d.ts +111 -21
- package/dist/index.mjs +364 -359
- package/dist/navigation/NiceIconRail.mjs +74 -53
- package/dist/navigation/NiceNavShell.mjs +855 -807
- package/dist/navigation/NiceSetupWizard.mjs +287 -278
- package/dist/navigation/NiceSidebarNav.mjs +1487 -1144
- package/dist/navigation/navItemDrag.mjs +42 -0
- package/dist/navigation/navShellPane.mjs +16 -11
- package/dist/navigation/sidebarNavTypes.mjs +1 -0
- package/dist/navigation/sidebarSearch.mjs +28 -0
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +63 -21
- package/dist/style.css +2 -2
- package/package.json +4 -4
- package/dist/NiceForm-BtRBLffD.cjs +0 -1
- package/dist/NiceModuleLifecyclePanel-ugNtHimh.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -5201,6 +5201,13 @@ export { filterGroupToWhere }
|
|
|
5201
5201
|
|
|
5202
5202
|
export { filterNiceThemePacksByTag }
|
|
5203
5203
|
|
|
5204
|
+
/**
|
|
5205
|
+
* The items narrowed to `query` (already normalised): a matching item keeps everything under it, a
|
|
5206
|
+
* branch stays only when something below it matches. The ids of the branches above a match go into
|
|
5207
|
+
* `open` — they show open while the search lasts, whatever their stored state.
|
|
5208
|
+
*/
|
|
5209
|
+
export declare function filterSidebarItems<T extends SearchableItem<T>>(items: T[], query: string, open: Set<string>): T[];
|
|
5210
|
+
|
|
5204
5211
|
export { FilterToSqlOptions }
|
|
5205
5212
|
|
|
5206
5213
|
export declare type FilterType = 'brightness' | 'contrast' | 'saturation' | 'hue' | 'blur' | 'sharpen' | 'grayscale' | 'sepia' | 'invert' | 'vignette' | 'chromaKey' | 'colorCorrection';
|
|
@@ -14715,6 +14722,8 @@ export declare interface NiceIconRailItem {
|
|
|
14715
14722
|
/** A route the host opens when the button is pressed (no `onClick`). */
|
|
14716
14723
|
route?: string;
|
|
14717
14724
|
onClick?: () => void;
|
|
14725
|
+
/** A menu on right-click, the menu key or Shift+F10 (1.3.18) — e.g. moving or removing it. */
|
|
14726
|
+
menu?: NiceMenuItem[];
|
|
14718
14727
|
}
|
|
14719
14728
|
|
|
14720
14729
|
/** Props for the {@link NiceIconRail} component — a bar of icon buttons with captions. */
|
|
@@ -17643,6 +17652,16 @@ export declare function NiceNavShellPaneFooter({ children }: {
|
|
|
17643
17652
|
children?: ReactNode;
|
|
17644
17653
|
}): default_2.JSX.Element | null;
|
|
17645
17654
|
|
|
17655
|
+
/**
|
|
17656
|
+
* A header row of the page's own (1.3.18): in a merged tab it goes under this page's pane header and
|
|
17657
|
+
* stays put while the pane scrolls; anywhere else the children render where they stand. A host whose
|
|
17658
|
+
* pages publish into the shell's sticky header renders them here instead when
|
|
17659
|
+
* `useNiceNavShellPane()?.inSplit` — the mirror of {@link NiceNavShellPaneFooter}.
|
|
17660
|
+
*/
|
|
17661
|
+
export declare function NiceNavShellPaneHeader({ children }: {
|
|
17662
|
+
children?: ReactNode;
|
|
17663
|
+
}): default_2.JSX.Element | null;
|
|
17664
|
+
|
|
17646
17665
|
/** What a page rendered by NiceNavShell knows about its place. */
|
|
17647
17666
|
export declare interface NiceNavShellPaneInfo {
|
|
17648
17667
|
/** The route this content is rendered for. */
|
|
@@ -17656,6 +17675,12 @@ export declare interface NiceNavShellPaneInfo {
|
|
|
17656
17675
|
* renders into; `null` elsewhere (and before the pane has mounted).
|
|
17657
17676
|
*/
|
|
17658
17677
|
footerSlot: HTMLElement | null;
|
|
17678
|
+
/**
|
|
17679
|
+
* In a merged tab, the row under this pane's header that {@link NiceNavShellPaneHeader} renders
|
|
17680
|
+
* into — it stays put while the pane's content scrolls (1.3.18); `null` elsewhere (and before the
|
|
17681
|
+
* pane has mounted).
|
|
17682
|
+
*/
|
|
17683
|
+
headerSlot: HTMLElement | null;
|
|
17659
17684
|
}
|
|
17660
17685
|
|
|
17661
17686
|
export declare type NiceNavShellPersistence = 'memory' | 'localStorage' | 'session';
|
|
@@ -21284,26 +21309,6 @@ export declare interface NiceSensorGaugePanelProps extends NiceBaseProps {
|
|
|
21284
21309
|
animate?: boolean;
|
|
21285
21310
|
}
|
|
21286
21311
|
|
|
21287
|
-
/**
|
|
21288
|
-
* {@link NiceSetupWizard} — Advanced multi-step setup wizard with branching, quick mode, and schema-driven forms.
|
|
21289
|
-
*
|
|
21290
|
-
* @example
|
|
21291
|
-
* ```tsx
|
|
21292
|
-
* <NiceSetupWizard
|
|
21293
|
-
* layout="vertical"
|
|
21294
|
-
* steps={[
|
|
21295
|
-
* { id: 'welcome', title: 'Welcome', content: <WelcomeScreen /> },
|
|
21296
|
-
* { id: 'account', title: 'Account', fields: [
|
|
21297
|
-
* { id: 'email', type: 'email', label: 'Email', required: true },
|
|
21298
|
-
* { id: 'password', type: 'password', label: 'Password', required: true },
|
|
21299
|
-
* ]},
|
|
21300
|
-
* { id: 'preferences', title: 'Preferences', optional: true, quickModeSkip: true },
|
|
21301
|
-
* { id: 'done', title: 'Complete', content: <CompleteScreen /> },
|
|
21302
|
-
* ]}
|
|
21303
|
-
* onComplete={(values) => saveUser(values)}
|
|
21304
|
-
* />
|
|
21305
|
-
* ```
|
|
21306
|
-
*/
|
|
21307
21312
|
export declare const NiceSetupWizard: default_2.ForwardRefExoticComponent<NiceSetupWizardProps & default_2.RefAttributes<HTMLDivElement>> & {
|
|
21308
21313
|
displayName: string;
|
|
21309
21314
|
};
|
|
@@ -21428,7 +21433,8 @@ export declare interface NiceSetupWizardProps {
|
|
|
21428
21433
|
loadingText?: default_2.ReactNode;
|
|
21429
21434
|
/**
|
|
21430
21435
|
* The loading indicator — e.g. your brand's looping mark. Default: a spinner. It stops moving
|
|
21431
|
-
* for users who ask for reduced motion
|
|
21436
|
+
* for users who ask for reduced motion: CSS animations stop, and since 1.3.18 SVG (SMIL)
|
|
21437
|
+
* animations are paused too (the `Ntd*` icons hold still on their own).
|
|
21432
21438
|
*/
|
|
21433
21439
|
loadingIndicator?: default_2.ReactNode;
|
|
21434
21440
|
id?: string;
|
|
@@ -21512,6 +21518,11 @@ export declare type NiceShowcaseTab = 'about' | 'dashboard' | 'users' | 'data' |
|
|
|
21512
21518
|
/** Context-menu / gesture actions that can be selectively disabled (e.g. for guests). */
|
|
21513
21519
|
declare type NiceSidebarContextMenuAction = 'hide' | 'reorder' | 'rename' | 'newGroup' | 'collapseToggle';
|
|
21514
21520
|
|
|
21521
|
+
/**
|
|
21522
|
+
* NiceSidebarNav — the multi-mode navigation sidebar. Rows carried to the shortcuts or the
|
|
21523
|
+
* favourites (1.3.18) travel through a drag session: NiceNavShell's, which its tabs share, or —
|
|
21524
|
+
* on its own — one of the sidebar's.
|
|
21525
|
+
*/
|
|
21515
21526
|
export declare const NiceSidebarNav: ForwardRefExoticComponent<NiceSidebarNavProps & RefAttributes<HTMLDivElement>>;
|
|
21516
21527
|
|
|
21517
21528
|
export declare interface NiceSidebarNavProps {
|
|
@@ -21669,6 +21680,33 @@ export declare interface NiceSidebarNavProps {
|
|
|
21669
21680
|
railWidth?: number;
|
|
21670
21681
|
/** The bar's button of the page in view; default the one whose `route` is `activeRoute`. */
|
|
21671
21682
|
railActiveId?: string;
|
|
21683
|
+
/**
|
|
21684
|
+
* A last collapse level (1.3.18): past icons only, the sidebar folds to a column of the
|
|
21685
|
+
* shortcuts — `predefinedShortcuts`, then the user's (`shortcuts` in the preferences), which an
|
|
21686
|
+
* item's star and menu add and the button's own menu moves or removes. The footer then has two
|
|
21687
|
+
* buttons, a level down and a level up. Default `false`.
|
|
21688
|
+
*/
|
|
21689
|
+
shortcutsRail?: boolean;
|
|
21690
|
+
/**
|
|
21691
|
+
* The host's shortcuts (e.g. an administrator's), first on the shortcuts rail; the user cannot
|
|
21692
|
+
* remove or move them.
|
|
21693
|
+
*/
|
|
21694
|
+
predefinedShortcuts?: Omit<SidebarNavFavorite, 'addedAt'>[];
|
|
21695
|
+
/**
|
|
21696
|
+
* Whether users keep shortcuts of their own (default `true`). `false` — e.g. an administrator's
|
|
21697
|
+
* choice — leaves the rail to `predefinedShortcuts`: nothing offers to add one, and the stored ones
|
|
21698
|
+
* do not show.
|
|
21699
|
+
*/
|
|
21700
|
+
allowUserShortcuts?: boolean;
|
|
21701
|
+
/**
|
|
21702
|
+
* How far the sidebar is folded (controlled, 1.3.18). `collapsed` / `onCollapsedChange` keep
|
|
21703
|
+
* working: `'icons'` and `'rail'` are collapsed. `'rail'` needs `shortcutsRail`.
|
|
21704
|
+
*/
|
|
21705
|
+
collapseLevel?: SidebarNavCollapseLevel;
|
|
21706
|
+
/** How far the sidebar is folded at mount (uncontrolled; default `'expanded'`). */
|
|
21707
|
+
defaultCollapseLevel?: SidebarNavCollapseLevel;
|
|
21708
|
+
/** Called when the sidebar folds or unfolds a level. */
|
|
21709
|
+
onCollapseLevelChange?: (level: SidebarNavCollapseLevel) => void;
|
|
21672
21710
|
/**
|
|
21673
21711
|
* By role / By unit with two or more roles / units (1.3.13): a bar under the mode icons picks
|
|
21674
21712
|
* one and the tree shows its modules (`activeGroupId` in the preferences). `false` lists them
|
|
@@ -21687,6 +21725,21 @@ export declare interface NiceSidebarNavProps {
|
|
|
21687
21725
|
* `data` (By module first). Labels and icons of the parents come from `data` when they are in it.
|
|
21688
21726
|
*/
|
|
21689
21727
|
getFavoritePath?: (favorite: SidebarNavFavorite) => SidebarNavPathEntry[] | undefined;
|
|
21728
|
+
/**
|
|
21729
|
+
* A search box above the tree (1.3.18) that narrows whatever the current mode shows — the tree of
|
|
21730
|
+
* All / By role / By unit, the Favourites list. Empty, everything shows; typing hides what does not
|
|
21731
|
+
* match (label or tooltip, case and diacritics ignored) and opens the branches above each match,
|
|
21732
|
+
* whatever their stored state. The Search mode leaves the mode icons then. Default `false`.
|
|
21733
|
+
*/
|
|
21734
|
+
inlineSearch?: boolean;
|
|
21735
|
+
/** The search text (controlled). */
|
|
21736
|
+
searchText?: string;
|
|
21737
|
+
/** The search text at mount (uncontrolled). */
|
|
21738
|
+
defaultSearchText?: string;
|
|
21739
|
+
/** Called with the text as the user types it. */
|
|
21740
|
+
onSearchChange?: (text: string) => void;
|
|
21741
|
+
/** The box's placeholder. */
|
|
21742
|
+
searchPlaceholder?: string;
|
|
21690
21743
|
/** Extra CSS class on the root element */
|
|
21691
21744
|
className?: string;
|
|
21692
21745
|
/** Size variant */
|
|
@@ -26184,6 +26237,12 @@ export declare type NodeShape = 'rectangle' | 'rounded-rectangle' | 'circle' | '
|
|
|
26184
26237
|
/** Prevent importing entire library — enforce tree-shaking. */
|
|
26185
26238
|
export declare const noFullImport: ESLintRule;
|
|
26186
26239
|
|
|
26240
|
+
/**
|
|
26241
|
+
* Text as the search compares it: lower case, without diacritics (NFD, combining marks dropped).
|
|
26242
|
+
* "ł" has no decomposition in Unicode, so it is mapped by hand — "lodz" finds "Łódź".
|
|
26243
|
+
*/
|
|
26244
|
+
export declare function normalizeSidebarSearch(text: string): string;
|
|
26245
|
+
|
|
26187
26246
|
/**
|
|
26188
26247
|
* usePushNotifications — Push notification subscription management
|
|
26189
26248
|
*
|
|
@@ -27858,6 +27917,13 @@ export declare interface ScorecardCharacteristic {
|
|
|
27858
27917
|
|
|
27859
27918
|
export { ScreenOrientation_2 as ScreenOrientation }
|
|
27860
27919
|
|
|
27920
|
+
declare interface SearchableItem<T> {
|
|
27921
|
+
id: string;
|
|
27922
|
+
label: ReactNode;
|
|
27923
|
+
tooltip?: ReactNode;
|
|
27924
|
+
children?: T[];
|
|
27925
|
+
}
|
|
27926
|
+
|
|
27861
27927
|
/**
|
|
27862
27928
|
* Search documentation content
|
|
27863
27929
|
*/
|
|
@@ -28177,6 +28243,12 @@ export declare interface SidebarFavoriteTreeNode {
|
|
|
28177
28243
|
children: SidebarFavoriteTreeNode[];
|
|
28178
28244
|
}
|
|
28179
28245
|
|
|
28246
|
+
/** Whether an item's label or tooltip contains `query` (already normalised). */
|
|
28247
|
+
export declare function sidebarItemMatches(item: {
|
|
28248
|
+
label: ReactNode;
|
|
28249
|
+
tooltip?: ReactNode;
|
|
28250
|
+
}, query: string): boolean;
|
|
28251
|
+
|
|
28180
28252
|
declare type SidebarLevelShading = 'tint' | 'shade';
|
|
28181
28253
|
|
|
28182
28254
|
/**
|
|
@@ -28194,6 +28266,12 @@ export declare interface SidebarNavBranchColors {
|
|
|
28194
28266
|
levelColors?: string[];
|
|
28195
28267
|
}
|
|
28196
28268
|
|
|
28269
|
+
/**
|
|
28270
|
+
* How far NiceSidebarNav is folded (1.3.18): `'expanded'` — the tree; `'icons'` — icons only;
|
|
28271
|
+
* `'rail'` — only the shortcuts, as a column of buttons (with `shortcutsRail`).
|
|
28272
|
+
*/
|
|
28273
|
+
export declare type SidebarNavCollapseLevel = 'expanded' | 'icons' | 'rail';
|
|
28274
|
+
|
|
28197
28275
|
/** How the sidebar tree and NavShell's tabs show colour — see {@link SidebarNavUserPrefs.colorStyle}. */
|
|
28198
28276
|
export declare type SidebarNavColorStyle = 'theme' | 'bar' | 'fill';
|
|
28199
28277
|
|
|
@@ -28278,6 +28356,12 @@ export declare interface SidebarNavHelpers {
|
|
|
28278
28356
|
removeFavoriteList: (id: string) => void;
|
|
28279
28357
|
/** The list the Favourites view shows (1.3.13). */
|
|
28280
28358
|
setActiveFavoriteList: (id: string) => void;
|
|
28359
|
+
/** Puts an item on the user's shortcuts (1.3.18), at `index` (default the end); once only. */
|
|
28360
|
+
addShortcut: (fav: SidebarNavFavorite, index?: number) => void;
|
|
28361
|
+
/** Takes an item off the user's shortcuts (1.3.18). */
|
|
28362
|
+
removeShortcut: (id: string) => void;
|
|
28363
|
+
/** Moves one of the user's shortcuts to `index` (1.3.18). */
|
|
28364
|
+
moveShortcut: (id: string, index: number) => void;
|
|
28281
28365
|
/** The role / unit By role / By unit shows (1.3.13). */
|
|
28282
28366
|
setActiveGroup: (mode: 'by-role' | 'by-unit', id: string) => void;
|
|
28283
28367
|
setMaxDepth: (mode: SidebarNavMode, depth: number) => void;
|
|
@@ -28409,6 +28493,12 @@ export declare interface SidebarNavUserPrefs {
|
|
|
28409
28493
|
favoriteLists?: SidebarNavFavoriteList[];
|
|
28410
28494
|
/** The list the Favourites view shows (1.3.13); default the default list. */
|
|
28411
28495
|
activeFavoriteListId?: string;
|
|
28496
|
+
/**
|
|
28497
|
+
* The user's shortcuts (1.3.18): the buttons of the shortcuts rail, the sidebar's last collapse
|
|
28498
|
+
* level (`shortcutsRail`), after the host's `predefinedShortcuts`. Added from an item's star or
|
|
28499
|
+
* menu; kept as plain data — an icon only as an icon name.
|
|
28500
|
+
*/
|
|
28501
|
+
shortcuts?: SidebarNavFavorite[];
|
|
28412
28502
|
/**
|
|
28413
28503
|
* The user's answer to the first-run preferences (1.3.14): `'done'` (saved) or `'skipped'`.
|
|
28414
28504
|
* No default — absent means "not asked yet".
|