@nice2dev/ui 1.0.24 → 1.0.25
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/NiceErrorBoundary-CVybqo3l.js +770 -0
- package/dist/NiceErrorBoundary-D0NwBkFl.cjs +1 -0
- package/dist/NiceForm-BrBaLUkv.js +5386 -0
- package/dist/NiceForm-DoiApS60.cjs +382 -0
- package/dist/NiceModal-C582SiK7.cjs +1 -0
- package/dist/NiceModal-sFJw1CWm.js +95 -0
- package/dist/NiceModuleLifecyclePanel-D22ycAMQ.js +6817 -0
- package/dist/NiceModuleLifecyclePanel-shRuDyp3.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/NicePagination-CtyaW_b4.cjs +1 -0
- package/dist/NicePagination-hGlKrWYL.js +171 -0
- package/dist/NicePinCodeInput-DPUlM3E1.cjs +696 -0
- package/dist/NicePinCodeInput-xSuOVhE8.js +13097 -0
- package/dist/NiceSavedQueryPanel-DzB0g0ak.cjs +596 -0
- package/dist/NiceSavedQueryPanel-Mz4jAsGJ.js +6893 -0
- package/dist/NiceTabs-1o8cpB_-.js +1657 -0
- package/dist/NiceTabs-B-FDOecP.cjs +1 -0
- package/dist/NiceWindow-9zQsi0zF.cjs +1 -0
- package/dist/NiceWindow-Dq-xx9cw.js +1592 -0
- package/dist/charts-DNQXBPGB.js +4657 -0
- package/dist/charts-IP38F-wh.cjs +761 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-C7CI2mWz.js +25248 -0
- package/dist/core-CjUAwZ6z.cjs +122 -0
- package/dist/data-branching-Bv-f_gZk.cjs +1 -0
- package/dist/data-branching-CNi8vtZ1.js +6133 -0
- package/dist/data-branching.cjs +1 -1
- package/dist/data-branching.mjs +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +19 -1
- package/dist/data.mjs +1 -1
- package/dist/devops-ZWKP6vRh.cjs +17 -0
- package/dist/devops-draw6Jrm.js +7684 -0
- package/dist/devops.cjs +1 -1
- package/dist/devops.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-BkLJ4tzy.js +68026 -0
- package/dist/index-CwOe80Ws.cjs +5518 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +104 -1
- package/dist/index.mjs +757 -753
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +24 -24
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +23 -0
- package/dist/navigation.mjs +4 -4
- package/dist/no-code-BndAN6hG.cjs +332 -0
- package/dist/no-code-DKYzw5If.js +7133 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.mjs +1 -1
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +2 -2
- package/dist/style.css +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3127,6 +3127,9 @@ export { deprecateProp }
|
|
|
3127
3127
|
|
|
3128
3128
|
export { deprecateSymbol }
|
|
3129
3129
|
|
|
3130
|
+
/** Derive {@link NiceExportColumn}s from the view's bound cells, falling back to data keys. */
|
|
3131
|
+
export declare function deriveExportColumns(view: NiceViewDefinition, rows: Array<Record<string, unknown>>): NiceExportColumn[];
|
|
3132
|
+
|
|
3130
3133
|
/** Deserialize and validate a module manifest from JSON. */
|
|
3131
3134
|
export declare function deserializeManifest(json: string): NiceModuleManifest;
|
|
3132
3135
|
|
|
@@ -4458,6 +4461,13 @@ export declare function exportToPDF<T extends Record<string, unknown>>(data: T[]
|
|
|
4458
4461
|
*/
|
|
4459
4462
|
export declare function exportToXLSX<T extends Record<string, unknown>>(data: T[], columns: NiceExportColumn[], options?: NiceXLSXOptions): ArrayBuffer;
|
|
4460
4463
|
|
|
4464
|
+
/**
|
|
4465
|
+
* Export a view + data to the given format. CSV/XLSX/PDF delegate to the
|
|
4466
|
+
* dep-free {@link NiceExport} utilities; HTML/DOCX are produced here. Pass
|
|
4467
|
+
* `options.onExport` to hand high-fidelity output to a host library.
|
|
4468
|
+
*/
|
|
4469
|
+
export declare function exportView(view: NiceViewDefinition, data: unknown, format: NiceViewExportFormat, options?: NiceViewExportOptions): Promise<void>;
|
|
4470
|
+
|
|
4461
4471
|
export declare interface Expression {
|
|
4462
4472
|
id: string;
|
|
4463
4473
|
name: string;
|
|
@@ -10408,7 +10418,7 @@ export declare interface NiceDataDiffViewerProps extends NiceBaseProps {
|
|
|
10408
10418
|
onSelectRecord?: (table: string, recordId: string) => void;
|
|
10409
10419
|
}
|
|
10410
10420
|
|
|
10411
|
-
export declare function NiceDataGrid<T extends Record<string, any>>({ columns, data: dataProp, keyField, dataSource, sortable, sortField: controlledSortField, sortDirection: controlledSortDir, onSort, showAdvancedFilter, advancedFilter, onAdvancedFilterChange, filterFields, filterPresets, onSaveFilterPreset, onDeleteFilterPreset, selectable, selectedKeys: controlledSelected, onSelectionChange, pagination, pageSize: initPageSize, page: controlledPage, onPageChange, totalRows, searchable, searchPlaceholder, virtualScroll, rowHeight, groupBy, groupRender, onCellEdit, editMode, formItems, formColumns, editFormTitle, formProps, onRowEdit, onRowAdd, onRowDelete: _onRowDelete, bulkActions, onBulkDelete, exportCsv, exportFilename, detailRow, expandedRowKeys: controlledExpandedRows, onExpandedRowChange, columnReorder: _columnReorder, onColumnReorder: _onColumnReorder, columnResize, rowDraggable, onRowReorder, striped, compact, loading: loadingProp, emptyText, toolbar, onRowClick, pinnedTopKeys, pinnedBottomKeys, colSpan: colSpanFn, showStatusBar, contextMenuItems, onContextMenuAction, printFriendly, keyboardNavigation, focusedCell: controlledFocusedCell, onFocusedCellChange, cellRangeSelection, selectedCellRange: controlledCellRange, onCellRangeChange, clipboard, clipboardFormat, onBeforeCopy, onCopy, onPaste, quickFilters, activeQuickFilters: controlledQuickFilters, onQuickFilterChange, columnGroups: _columnGroups, stateStorageKey, initialState, onStateChange, flashRowKeys, flashDuration, autoFitColumns: _autoFitColumns, showColumnStats: _showColumnStats, rowIndicator, frozenRows: _frozenRows, className, style, accessMode, id, displayStyle, }: NiceDataGridProps<T>): default_2.JSX.Element | null;
|
|
10421
|
+
export declare function NiceDataGrid<T extends Record<string, any>>({ columns, data: dataProp, keyField, dataSource, sortable, sortField: controlledSortField, sortDirection: controlledSortDir, onSort, showAdvancedFilter, advancedFilter, onAdvancedFilterChange, filterFields, filterPresets, onSaveFilterPreset, onDeleteFilterPreset, selectable, selectedKeys: controlledSelected, onSelectionChange, pagination, pageSize: initPageSize, page: controlledPage, onPageChange, totalRows, autoPagination, stickyHeader, stickyFooter, searchable, searchPlaceholder, virtualScroll, rowHeight, groupBy, groupRender, onCellEdit, editMode, formItems, formColumns, editFormTitle, formProps, onRowEdit, onRowAdd, onRowDelete: _onRowDelete, bulkActions, onBulkDelete, exportCsv, exportFilename, detailRow, expandedRowKeys: controlledExpandedRows, onExpandedRowChange, columnReorder: _columnReorder, onColumnReorder: _onColumnReorder, columnResize, rowDraggable, onRowReorder, striped, compact, loading: loadingProp, emptyText, toolbar, onRowClick, pinnedTopKeys, pinnedBottomKeys, colSpan: colSpanFn, showStatusBar, contextMenuItems, onContextMenuAction, printFriendly, keyboardNavigation, focusedCell: controlledFocusedCell, onFocusedCellChange, cellRangeSelection, selectedCellRange: controlledCellRange, onCellRangeChange, clipboard, clipboardFormat, onBeforeCopy, onCopy, onPaste, quickFilters, activeQuickFilters: controlledQuickFilters, onQuickFilterChange, columnGroups: _columnGroups, stateStorageKey, initialState, onStateChange, flashRowKeys, flashDuration, autoFitColumns: _autoFitColumns, showColumnStats: _showColumnStats, rowIndicator, frozenRows: _frozenRows, className, style, accessMode, id, displayStyle, }: NiceDataGridProps<T>): default_2.JSX.Element | null;
|
|
10412
10422
|
|
|
10413
10423
|
export declare namespace NiceDataGrid {
|
|
10414
10424
|
var displayName: string;
|
|
@@ -10552,6 +10562,24 @@ export declare interface NiceDataGridProps<T extends Record<string, any> = any>
|
|
|
10552
10562
|
page?: number;
|
|
10553
10563
|
onPageChange?: (page: number) => void;
|
|
10554
10564
|
totalRows?: number;
|
|
10565
|
+
/**
|
|
10566
|
+
* Auto-fit pagination: the grid fills 100% of its container height and the
|
|
10567
|
+
* page size is computed from the available height ÷ `rowHeight` (recomputed on
|
|
10568
|
+
* resize). The page-size control renders as an informational label instead of
|
|
10569
|
+
* a select. Default `false`.
|
|
10570
|
+
*/
|
|
10571
|
+
autoPagination?: boolean;
|
|
10572
|
+
/**
|
|
10573
|
+
* Keep the column header visible while scrolling the grid's own content.
|
|
10574
|
+
* Engages only when the grid scrolls internally (bounded height / autoPagination);
|
|
10575
|
+
* otherwise the header scrolls with the page. Default `true`.
|
|
10576
|
+
*/
|
|
10577
|
+
stickyHeader?: boolean;
|
|
10578
|
+
/**
|
|
10579
|
+
* Keep the aggregate/summary footer row pinned while scrolling the grid's own
|
|
10580
|
+
* content (same engagement rule as `stickyHeader`). Default `true`.
|
|
10581
|
+
*/
|
|
10582
|
+
stickyFooter?: boolean;
|
|
10555
10583
|
searchable?: boolean;
|
|
10556
10584
|
searchPlaceholder?: string;
|
|
10557
10585
|
virtualScroll?: boolean;
|
|
@@ -16255,6 +16283,13 @@ export declare interface NiceNavShellProps {
|
|
|
16255
16283
|
helpSteps?: NiceTutorialStep[];
|
|
16256
16284
|
/** Disable individual default steps by key. */
|
|
16257
16285
|
helpStepsExclude?: Array<'topNav' | 'sidebar' | 'tabs' | 'content'>;
|
|
16286
|
+
/**
|
|
16287
|
+
* Background opacity 0–1 (default `1` = opaque) for the shell chrome — applied
|
|
16288
|
+
* to the content body and forwarded to the embedded top-nav and sidebar — so
|
|
16289
|
+
* a translucent shell can sit over a wallpaper / floating UI. Exposed as the
|
|
16290
|
+
* `--nice-shell-surface-alpha` CSS variable.
|
|
16291
|
+
*/
|
|
16292
|
+
surfaceOpacity?: number;
|
|
16258
16293
|
className?: string;
|
|
16259
16294
|
contentClassName?: string;
|
|
16260
16295
|
'data-testid'?: string;
|
|
@@ -19504,6 +19539,13 @@ export declare interface NiceSetupWizardProps {
|
|
|
19504
19539
|
layout?: SetupWizardLayout;
|
|
19505
19540
|
/** Size */
|
|
19506
19541
|
size?: NiceSize;
|
|
19542
|
+
/**
|
|
19543
|
+
* When set, the wizard self-applies this theme (preset name or NiceTheme) by
|
|
19544
|
+
* wrapping itself in a scoped NiceThemeProvider — so it themes correctly even
|
|
19545
|
+
* when rendered outside an app-level provider (e.g. a standalone /setup page).
|
|
19546
|
+
* Omit it when the wizard is already inside a NiceThemeProvider.
|
|
19547
|
+
*/
|
|
19548
|
+
theme?: NiceTheme | string;
|
|
19507
19549
|
/** Whether quick mode is enabled by default */
|
|
19508
19550
|
defaultQuickMode?: boolean;
|
|
19509
19551
|
/** Allow toggling quick mode */
|
|
@@ -19681,6 +19723,21 @@ export declare interface NiceSidebarNavProps {
|
|
|
19681
19723
|
showFavorites?: boolean;
|
|
19682
19724
|
/** Allow the footer Preferences view/mode. Default `!minimal`. */
|
|
19683
19725
|
showFooterPreferences?: boolean;
|
|
19726
|
+
/**
|
|
19727
|
+
* **Sticky full-height** — when `true` (default) the sidebar sticks to the
|
|
19728
|
+
* viewport and spans the full screen height (`position: sticky; top: 0;
|
|
19729
|
+
* height: 100vh`), so the collapse button sits in the screen's bottom-left
|
|
19730
|
+
* corner regardless of body/content height. Set `false` when a parent layout
|
|
19731
|
+
* (e.g. NiceNavShell) already provides the full-height column. Ignored in
|
|
19732
|
+
* `embedded` mode. Default `true`.
|
|
19733
|
+
*/
|
|
19734
|
+
sticky?: boolean;
|
|
19735
|
+
/**
|
|
19736
|
+
* Background opacity of the sidebar surface, 0–1 (default `1` = opaque).
|
|
19737
|
+
* Lower it for glassmorphism / floating-button backdrops; exposed as the
|
|
19738
|
+
* `--nice-sidebar-surface-alpha` CSS variable consumed by the background.
|
|
19739
|
+
*/
|
|
19740
|
+
surfaceOpacity?: number;
|
|
19684
19741
|
/**
|
|
19685
19742
|
* **Embedded mode** — render the sidebar inside another container (e.g. a
|
|
19686
19743
|
* mobile drawer / hamburger menu). Forces full width, drops the footer with
|
|
@@ -21768,6 +21825,9 @@ export declare interface NiceTopNavProps {
|
|
|
21768
21825
|
borderBottom?: boolean;
|
|
21769
21826
|
elevated?: boolean;
|
|
21770
21827
|
sticky?: boolean;
|
|
21828
|
+
/** Background opacity 0–1 (default `1` = opaque). Lower for glass/floating UI;
|
|
21829
|
+
* exposed as the `--nice-topnav-surface-alpha` CSS variable. */
|
|
21830
|
+
surfaceOpacity?: number;
|
|
21771
21831
|
variant?: NiceTopNavVariant;
|
|
21772
21832
|
accentBar?: boolean;
|
|
21773
21833
|
accentBarColor?: string;
|
|
@@ -23106,6 +23166,8 @@ export declare interface NiceViewDefinition {
|
|
|
23106
23166
|
id: string;
|
|
23107
23167
|
/** Display name */
|
|
23108
23168
|
name: string;
|
|
23169
|
+
/** What kind of view this is (drives editor mode + export). Default `'form'`. */
|
|
23170
|
+
kind?: NiceViewKind;
|
|
23109
23171
|
/** Schema version */
|
|
23110
23172
|
version: number;
|
|
23111
23173
|
/** ERP module this view belongs to */
|
|
@@ -23175,6 +23237,12 @@ export declare interface NiceViewEditorProps extends NiceStandardProps {
|
|
|
23175
23237
|
entities?: NiceEntityLike[];
|
|
23176
23238
|
/** Save callback (shows a Save button when provided). */
|
|
23177
23239
|
onSave?: (view: NiceViewDefinition) => void;
|
|
23240
|
+
/**
|
|
23241
|
+
* Optional host export hook for `report`/`print`/`grid` views. When provided
|
|
23242
|
+
* it takes over from the built-in dep-free exporters (e.g. to produce
|
|
23243
|
+
* high-fidelity DOCX/XLSX with the consumer's own library).
|
|
23244
|
+
*/
|
|
23245
|
+
onExport?: NiceViewExportOptions['onExport'];
|
|
23178
23246
|
/** Editor height. Default `560`. */
|
|
23179
23247
|
height?: number | string;
|
|
23180
23248
|
/** Optional "?" guided tour. Off by default; `true` uses the built-in tour. */
|
|
@@ -23189,6 +23257,21 @@ export declare interface NiceViewEventBinding {
|
|
|
23189
23257
|
actions: NiceViewAction[];
|
|
23190
23258
|
}
|
|
23191
23259
|
|
|
23260
|
+
/** Supported export formats. */
|
|
23261
|
+
export declare type NiceViewExportFormat = 'pdf' | 'docx' | 'csv' | 'xlsx' | 'html';
|
|
23262
|
+
|
|
23263
|
+
export declare interface NiceViewExportOptions {
|
|
23264
|
+
/** File name (without extension). Defaults to the view name. */
|
|
23265
|
+
fileName?: string;
|
|
23266
|
+
/** Override columns; otherwise derived from the view, then from the data. */
|
|
23267
|
+
columns?: NiceExportColumn[];
|
|
23268
|
+
/**
|
|
23269
|
+
* Host takeover for high-fidelity export. When provided it is called instead
|
|
23270
|
+
* of the built-in exporter and is responsible for producing the file.
|
|
23271
|
+
*/
|
|
23272
|
+
onExport?: (view: NiceViewDefinition, rows: Array<Record<string, unknown>>, format: NiceViewExportFormat) => void | Promise<void>;
|
|
23273
|
+
}
|
|
23274
|
+
|
|
23192
23275
|
export declare class NiceViewFetcher {
|
|
23193
23276
|
private readonly config;
|
|
23194
23277
|
constructor(config: NiceViewFetcherConfig);
|
|
@@ -23294,6 +23377,18 @@ export declare interface NiceViewHotReloadConfig {
|
|
|
23294
23377
|
authToken?: string;
|
|
23295
23378
|
}
|
|
23296
23379
|
|
|
23380
|
+
/**
|
|
23381
|
+
* What a view IS — drives the editor mode, scaffolding and export options:
|
|
23382
|
+
* - `form` / `detail` — record entry / read-only record
|
|
23383
|
+
* - `grid` — tabular register
|
|
23384
|
+
* - `dashboard` — widgets/KPIs
|
|
23385
|
+
* - `content` — free page (e.g. a frontpage)
|
|
23386
|
+
* - `report` — banded, data-bound report (exportable to PDF/XLSX/…)
|
|
23387
|
+
* - `print` — a print/document template (the "wydruk")
|
|
23388
|
+
* - `mix` — a mixed composition of the above
|
|
23389
|
+
*/
|
|
23390
|
+
export declare type NiceViewKind = 'form' | 'grid' | 'detail' | 'dashboard' | 'content' | 'report' | 'print' | 'mix';
|
|
23391
|
+
|
|
23297
23392
|
/** Layout types for container cells. */
|
|
23298
23393
|
export declare type NiceViewLayoutType = 'grid' | 'tabs' | 'splitter' | 'accordion' | 'stack' | 'container';
|
|
23299
23394
|
|
|
@@ -25323,6 +25418,9 @@ export declare interface Resolution {
|
|
|
25323
25418
|
|
|
25324
25419
|
export { resolveDisplayStyleConfig }
|
|
25325
25420
|
|
|
25421
|
+
/** Resolve the primary record array from a view data store or a plain array. */
|
|
25422
|
+
export declare function resolveExportRows(view: NiceViewDefinition, data: unknown): Array<Record<string, unknown>>;
|
|
25423
|
+
|
|
25326
25424
|
/** Resolve permissions for a set of user roles. */
|
|
25327
25425
|
export declare function resolvePermissions(userRoleIds: string[], policy: NiceRbacPolicy): NiceResolvedPermissions;
|
|
25328
25426
|
|
|
@@ -28988,6 +29086,11 @@ export declare type ViewMode = 'grid' | 'list' | 'masonry' | 'details';
|
|
|
28988
29086
|
|
|
28989
29087
|
declare type ViewMode_2 = 'split' | 'unified' | 'fields';
|
|
28990
29088
|
|
|
29089
|
+
/** Render a view + data as a standalone HTML document (used for the html/docx formats). */
|
|
29090
|
+
export declare function viewToHtml(view: NiceViewDefinition, data: unknown, options?: {
|
|
29091
|
+
columns?: NiceExportColumn[];
|
|
29092
|
+
}): string;
|
|
29093
|
+
|
|
28991
29094
|
/** Validation severity. */
|
|
28992
29095
|
export declare type ViewValidationSeverity = 'error' | 'warning' | 'info';
|
|
28993
29096
|
|