@nice2dev/ui 1.0.8 → 1.0.10
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/dist/NiceErrorBoundary-B5nF-OVn.cjs +1 -0
- package/dist/NiceErrorBoundary-D75yr_WE.js +762 -0
- package/dist/NiceForm-CKoJA6NG.js +5131 -0
- package/dist/NiceForm-D7xnpnRJ.cjs +382 -0
- package/dist/NiceForm.css +1 -0
- package/dist/NiceModal-1QX7NhyH.js +95 -0
- package/dist/NiceModal-CAwsKVQ2.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-C9xMSjOF.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-CMrPbSw9.js +5249 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -0
- package/dist/NicePagination-DbE-uOkl.js +171 -0
- package/dist/NicePagination-DlealakT.cjs +1 -0
- package/dist/NicePinCodeInput-B8cI8zu8.js +11830 -0
- package/dist/NicePinCodeInput-SGQaHvpE.cjs +419 -0
- package/dist/NicePinCodeInput.css +1 -1
- package/dist/NiceSavedQueryPanel-CZ5bYOe_.js +6449 -0
- package/dist/NiceSavedQueryPanel-Ce2s060j.cjs +596 -0
- package/dist/NiceTabs-DvOmxKyQ.cjs +1 -0
- package/dist/NiceTabs-DzLHzwuA.js +1636 -0
- package/dist/NiceWindow-CVgkxcCz.cjs +1 -0
- package/dist/NiceWindow-DeC83yfE.js +1409 -0
- package/dist/charts-BAS21jkC.js +4621 -0
- package/dist/charts-DShUbWrP.cjs +759 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.d.ts +42 -45
- package/dist/charts.mjs +1 -1
- package/dist/core-C2ZmWe_u.cjs +96 -0
- package/dist/core-Da43q-pO.js +22094 -0
- package/dist/data-branching-CJlrg8qf.cjs +1 -0
- package/dist/data-branching-DCUwI53s.js +6121 -0
- package/dist/data-branching.cjs +1 -1
- package/dist/data-branching.d.ts +1 -38
- package/dist/data-branching.mjs +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +206 -192
- package/dist/data.mjs +1 -1
- package/dist/devops-CXynFG3X.cjs +17 -0
- package/dist/devops-D0TfzV5B.js +7660 -0
- package/dist/devops.cjs +1 -1
- package/dist/devops.d.ts +1 -38
- package/dist/devops.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +311 -393
- package/dist/editors.mjs +61 -64
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.d.ts +3 -44
- package/dist/feedback.mjs +11 -10
- package/dist/index-B8wxZ8Ps.cjs +5192 -0
- package/dist/index-pAuGTbuB.js +57319 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2248 -11140
- package/dist/index.mjs +880 -1018
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.d.ts +7 -39
- package/dist/lazy.mjs +24 -24
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +151 -216
- package/dist/navigation.mjs +46 -40
- package/dist/no-code-B5bzduNP.cjs +332 -0
- package/dist/no-code-D8RJ7lx0.js +7064 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.d.ts +1 -38
- package/dist/no-code.mjs +1 -1
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.d.ts +13 -45
- package/dist/overlays.mjs +260 -250
- package/package.json +4 -2
package/dist/data.d.ts
CHANGED
|
@@ -2,8 +2,12 @@ import { default as default_2 } from 'react';
|
|
|
2
2
|
import { ForwardedRef } from 'react';
|
|
3
3
|
import { ForwardRefExoticComponent } from 'react';
|
|
4
4
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
|
+
import { NiceBaseProps } from '@nice2dev/ui-core';
|
|
6
|
+
import { NiceDataSource } from '@nice2dev/ui-core';
|
|
7
|
+
import { NiceSize } from '@nice2dev/ui-core';
|
|
5
8
|
import { ReactNode } from 'react';
|
|
6
9
|
import { RefAttributes } from 'react';
|
|
10
|
+
import { TracelessMode } from '@nice2dev/ui-core';
|
|
7
11
|
|
|
8
12
|
declare interface AIFilter {
|
|
9
13
|
field: string;
|
|
@@ -40,7 +44,7 @@ export declare interface BankStatementItem {
|
|
|
40
44
|
/** Value date (settlement) */
|
|
41
45
|
valueDate?: Date | string;
|
|
42
46
|
/** Description / reference */
|
|
43
|
-
description
|
|
47
|
+
description?: string;
|
|
44
48
|
/** Transaction amount (positive=credit, negative=debit) */
|
|
45
49
|
amount: number;
|
|
46
50
|
/** ISO currency code */
|
|
@@ -61,6 +65,8 @@ export declare interface BankStatementItem {
|
|
|
61
65
|
matchedEntryIds?: string[];
|
|
62
66
|
/** AI confidence (0-100) */
|
|
63
67
|
confidence?: number;
|
|
68
|
+
/** ID of suggested matching book entry. */
|
|
69
|
+
suggestedMatch?: string;
|
|
64
70
|
/** Excluded from reconciliation */
|
|
65
71
|
excluded?: boolean;
|
|
66
72
|
}
|
|
@@ -76,7 +82,11 @@ export declare interface BookEntry {
|
|
|
76
82
|
/** Document date */
|
|
77
83
|
documentDate?: Date | string;
|
|
78
84
|
/** Description / posting text */
|
|
79
|
-
description
|
|
85
|
+
description?: string;
|
|
86
|
+
/** Reference / document code (alternative display when `description` is omitted). */
|
|
87
|
+
reference?: string;
|
|
88
|
+
/** GL account or bank account code. */
|
|
89
|
+
account?: string;
|
|
80
90
|
/** Amount (positive=debit, negative=credit for bank account) */
|
|
81
91
|
amount: number;
|
|
82
92
|
/** ISO currency code */
|
|
@@ -129,8 +139,6 @@ export declare function computeAggregate(rows: Record<string, any>[], field: str
|
|
|
129
139
|
|
|
130
140
|
export declare function escapeCsvField(val: string): string;
|
|
131
141
|
|
|
132
|
-
declare type Listener<Args extends unknown[]> = (...args: Args) => void;
|
|
133
|
-
|
|
134
142
|
/**
|
|
135
143
|
* Match confidence level.
|
|
136
144
|
*/
|
|
@@ -204,7 +212,8 @@ declare interface ModuleEmptyState {
|
|
|
204
212
|
declare interface ModuleEnumOption {
|
|
205
213
|
value: string | number;
|
|
206
214
|
label: string;
|
|
207
|
-
|
|
215
|
+
/** Visual variant — semantic name or any CSS color string. */
|
|
216
|
+
color?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'secondary' | 'default' | (string & {});
|
|
208
217
|
icon?: React.ReactNode;
|
|
209
218
|
}
|
|
210
219
|
|
|
@@ -225,8 +234,8 @@ declare type ModuleExportFormat = 'csv' | 'excel' | 'pdf' | 'json';
|
|
|
225
234
|
declare interface ModuleFilterCondition {
|
|
226
235
|
field: string;
|
|
227
236
|
operator: ModuleFilterOperator;
|
|
228
|
-
value:
|
|
229
|
-
valueTo?:
|
|
237
|
+
value: unknown;
|
|
238
|
+
valueTo?: unknown;
|
|
230
239
|
}
|
|
231
240
|
|
|
232
241
|
/** Filter group with AND/OR logic. */
|
|
@@ -257,7 +266,7 @@ declare interface ModuleGridColumn<T = any> {
|
|
|
257
266
|
/** Cell renderer type */
|
|
258
267
|
type?: ModuleCellRendererType;
|
|
259
268
|
/** Custom cell renderer function */
|
|
260
|
-
render?: (value:
|
|
269
|
+
render?: (value: unknown, row: T, index: number) => React.ReactNode;
|
|
261
270
|
/** Cell alignment */
|
|
262
271
|
align?: 'left' | 'center' | 'right';
|
|
263
272
|
/** Hide column by default */
|
|
@@ -267,13 +276,15 @@ declare interface ModuleGridColumn<T = any> {
|
|
|
267
276
|
/** Enable inline editing */
|
|
268
277
|
editable?: boolean;
|
|
269
278
|
/** Custom inline editor */
|
|
270
|
-
editor?: (value:
|
|
279
|
+
editor?: (value: unknown, row: T, onChange: (val: unknown) => void) => React.ReactNode;
|
|
271
280
|
/** Enum options for badge/select renderers */
|
|
272
281
|
enumOptions?: ModuleEnumOption[];
|
|
273
282
|
/** Format pattern (date: 'YYYY-MM-DD', number: '#,##0.00', currency: 'PLN') */
|
|
274
283
|
format?: string;
|
|
275
284
|
/** Currency code for currency renderer */
|
|
276
285
|
currencyCode?: string;
|
|
286
|
+
/** Alias for `currencyCode`. */
|
|
287
|
+
currency?: string;
|
|
277
288
|
/** Max rating for rating renderer */
|
|
278
289
|
maxRating?: number;
|
|
279
290
|
/** Link URL template (use {{field}} for values) */
|
|
@@ -328,7 +339,7 @@ declare interface ModuleGridResponse<T> {
|
|
|
328
339
|
declare interface ModuleGroupedRow<T = any> {
|
|
329
340
|
isGroup: true;
|
|
330
341
|
groupKey: string;
|
|
331
|
-
groupValue:
|
|
342
|
+
groupValue: unknown;
|
|
332
343
|
groupLabel: string;
|
|
333
344
|
count: number;
|
|
334
345
|
aggregates?: Record<string, number>;
|
|
@@ -362,40 +373,9 @@ declare interface ModuleViewPreferences {
|
|
|
362
373
|
displayDensity?: 'compact' | 'normal' | 'comfortable';
|
|
363
374
|
}
|
|
364
375
|
|
|
365
|
-
/**
|
|
366
|
-
* Per-component visibility & interaction level used by the access control system.
|
|
367
|
-
* - `'full'` — fully interactive (default)
|
|
368
|
-
* - `'readOnly'` — renders but cannot be edited
|
|
369
|
-
* - `'disabled'` — renders greyed-out
|
|
370
|
-
* - `'hidden'` — not rendered at all
|
|
371
|
-
*/
|
|
372
|
-
declare type NiceAccessMode = 'full' | 'readOnly' | 'disabled' | 'hidden';
|
|
373
|
-
|
|
374
376
|
/** Supported aggregate functions for column footers. */
|
|
375
377
|
declare type NiceAggregateType = 'sum' | 'avg' | 'count' | 'min' | 'max';
|
|
376
378
|
|
|
377
|
-
/** Base props inherited by every NiceToDev component. */
|
|
378
|
-
declare interface NiceBaseProps {
|
|
379
|
-
/** Additional CSS class name(s). */
|
|
380
|
-
className?: string;
|
|
381
|
-
/** Inline style object. */
|
|
382
|
-
style?: React.CSSProperties;
|
|
383
|
-
/** HTML `id` attribute. When omitted a stable auto-generated id is used. */
|
|
384
|
-
id?: string;
|
|
385
|
-
/** Tooltip text shown on hover. */
|
|
386
|
-
title?: string;
|
|
387
|
-
/** Test identifier for integration / e2e test selectors. */
|
|
388
|
-
'data-testid'?: string;
|
|
389
|
-
/** Controls component visibility and interaction — see {@link NiceAccessMode}. */
|
|
390
|
-
accessMode?: NiceAccessMode;
|
|
391
|
-
/**
|
|
392
|
-
* Visual presentation style override.
|
|
393
|
-
* When set, overrides the global `displayStyle` from `NiceThemeProvider`.
|
|
394
|
-
* @see NiceDisplayStyle
|
|
395
|
-
*/
|
|
396
|
-
displayStyle?: NiceDisplayStyle;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
379
|
export declare function NiceCardView<T extends NiceCardViewItem>({ items, renderCard, columns, gap, searchable, searchField, searchPlaceholder, loading, emptyText, onCardClick, className, style, accessMode, id, }: NiceCardViewProps<T>): JSX_2.Element | null;
|
|
400
380
|
|
|
401
381
|
/** An item displayed by the {@link NiceCardView} component. */
|
|
@@ -440,7 +420,7 @@ declare interface NiceColumnState {
|
|
|
440
420
|
/** Conditional formatting rule for cells. */
|
|
441
421
|
declare interface NiceConditionalFormat<T = any> {
|
|
442
422
|
/** Condition to apply formatting */
|
|
443
|
-
when: (value:
|
|
423
|
+
when: (value: unknown, row: T, field: string) => boolean;
|
|
444
424
|
/** CSS class to apply */
|
|
445
425
|
className?: string;
|
|
446
426
|
/** Inline styles to apply */
|
|
@@ -477,7 +457,7 @@ declare interface NiceConditionalFormatRule {
|
|
|
477
457
|
};
|
|
478
458
|
}
|
|
479
459
|
|
|
480
|
-
export declare function NiceDataGrid<T extends Record<string, any>>({ columns, data: dataProp, keyField, dataSource, sortable, sortField: controlledSortField, sortDirection: controlledSortDir, onSort, selectable, selectedKeys: controlledSelected, onSelectionChange, pagination, pageSize: initPageSize, page: controlledPage, onPageChange, totalRows, searchable, searchPlaceholder, virtualScroll, rowHeight, groupBy, groupRender, onCellEdit, exportCsv, exportFilename, detailRow, expandedRowKeys: controlledExpandedRows, onExpandedRowChange, columnReorder, 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, stateStorageKey, initialState, onStateChange, flashRowKeys, flashDuration, autoFitColumns, showColumnStats, rowIndicator, frozenRows, className, style, accessMode, id, displayStyle, }: NiceDataGridProps<T>): JSX_2.Element | null;
|
|
460
|
+
export declare function NiceDataGrid<T extends Record<string, any>>({ columns, data: dataProp, keyField, dataSource, sortable, sortField: controlledSortField, sortDirection: controlledSortDir, onSort, 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, bulkActions, onBulkDelete, exportCsv, exportFilename, detailRow, expandedRowKeys: controlledExpandedRows, onExpandedRowChange, columnReorder, 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, stateStorageKey, initialState, onStateChange, flashRowKeys, flashDuration, autoFitColumns, showColumnStats, rowIndicator, frozenRows, className, style, accessMode, id, displayStyle, }: NiceDataGridProps<T>): JSX_2.Element | null;
|
|
481
461
|
|
|
482
462
|
export declare namespace NiceDataGrid {
|
|
483
463
|
var displayName: string;
|
|
@@ -519,6 +499,22 @@ declare interface NiceDataGridAIRef<T> {
|
|
|
519
499
|
generateInsights: () => Promise<string[]>;
|
|
520
500
|
}
|
|
521
501
|
|
|
502
|
+
/** Bulk action button shown in {@link NiceDataGrid} toolbar when rows are selected. */
|
|
503
|
+
declare interface NiceDataGridBulkAction<T = any> {
|
|
504
|
+
/** Unique key for the action. */
|
|
505
|
+
key: string;
|
|
506
|
+
/** Visible label. */
|
|
507
|
+
label: string;
|
|
508
|
+
/** Optional icon node. */
|
|
509
|
+
icon?: React.ReactNode;
|
|
510
|
+
/** Visual variant. */
|
|
511
|
+
variant?: 'primary' | 'success' | 'warning' | 'danger' | 'secondary' | 'ghost';
|
|
512
|
+
/** Disable the action based on current selection. */
|
|
513
|
+
disabled?: (selectedKeys: string[], rows: T[]) => boolean;
|
|
514
|
+
/** Handler invoked with selected row keys and the matching rows. */
|
|
515
|
+
onClick: (selectedKeys: string[], rows: T[]) => void;
|
|
516
|
+
}
|
|
517
|
+
|
|
522
518
|
/** Column definition for {@link NiceDataGrid}. */
|
|
523
519
|
export declare interface NiceDataGridColumn<T = any> {
|
|
524
520
|
field: string;
|
|
@@ -527,7 +523,7 @@ export declare interface NiceDataGridColumn<T = any> {
|
|
|
527
523
|
minWidth?: number;
|
|
528
524
|
sortable?: boolean;
|
|
529
525
|
filterable?: boolean;
|
|
530
|
-
render?: (value:
|
|
526
|
+
render?: (value: unknown, row: T, index: number) => React.ReactNode;
|
|
531
527
|
align?: 'left' | 'center' | 'right';
|
|
532
528
|
hidden?: boolean;
|
|
533
529
|
/** Pin column to left or right edge */
|
|
@@ -535,7 +531,7 @@ export declare interface NiceDataGridColumn<T = any> {
|
|
|
535
531
|
/** Allow inline cell editing via double-click */
|
|
536
532
|
editable?: boolean;
|
|
537
533
|
/** Custom inline editor */
|
|
538
|
-
editor?: (value:
|
|
534
|
+
editor?: (value: unknown, row: T, onChange: (val: unknown) => void) => React.ReactNode;
|
|
539
535
|
/** Footer aggregation */
|
|
540
536
|
aggregate?: NiceAggregateType;
|
|
541
537
|
/** Custom aggregate label */
|
|
@@ -558,7 +554,7 @@ export declare interface NiceDataGridColumn<T = any> {
|
|
|
558
554
|
min?: number;
|
|
559
555
|
max?: number;
|
|
560
556
|
pattern?: RegExp;
|
|
561
|
-
custom?: (value:
|
|
557
|
+
custom?: (value: unknown, row: T) => boolean | string;
|
|
562
558
|
};
|
|
563
559
|
/** Tooltip for column header */
|
|
564
560
|
headerTooltip?: string;
|
|
@@ -567,7 +563,7 @@ export declare interface NiceDataGridColumn<T = any> {
|
|
|
567
563
|
}
|
|
568
564
|
|
|
569
565
|
/**
|
|
570
|
-
* Props for the NiceDataGrid component
|
|
566
|
+
* Props for the NiceDataGrid component � a full-featured data table with sorting,
|
|
571
567
|
* filtering, pagination, virtual scrolling, grouping, inline editing, master/detail and more.
|
|
572
568
|
*/
|
|
573
569
|
export declare interface NiceDataGridProps<T extends Record<string, any> = any> extends NiceBaseProps {
|
|
@@ -600,8 +596,28 @@ export declare interface NiceDataGridProps<T extends Record<string, any> = any>
|
|
|
600
596
|
rowHeight?: number;
|
|
601
597
|
groupBy?: string;
|
|
602
598
|
/** Custom group header renderer */
|
|
603
|
-
groupRender?: (groupValue:
|
|
604
|
-
onCellEdit?: (rowKey: string, field: string, newValue:
|
|
599
|
+
groupRender?: (groupValue: unknown, rows: T[]) => React.ReactNode;
|
|
600
|
+
onCellEdit?: (rowKey: string, field: string, newValue: unknown) => void;
|
|
601
|
+
/** Editing mode. `'inline'` (default) edits a single cell in place; `'popup'` opens a NiceForm-based dialog for the whole row (or a subset defined by `formItems`). */
|
|
602
|
+
editMode?: 'inline' | 'popup';
|
|
603
|
+
/** Form item definitions for popup-edit mode. When omitted, auto-derived from `columns` (skipping non-editable). Use `field` to map back to the row data. */
|
|
604
|
+
formItems?: NiceFormItem[];
|
|
605
|
+
/** Number of columns for the popup form. Defaults to 2. */
|
|
606
|
+
formColumns?: number;
|
|
607
|
+
/** Modal title for popup edit. Defaults to `'Edit row'`. */
|
|
608
|
+
editFormTitle?: string;
|
|
609
|
+
/** Escape-hatch: extra props forwarded to the underlying `NiceForm` in the popup (e.g. `labelPosition`, `gap`, `size`, `responsiveColumns`). Aligns with the `NiceFormDesigner` standard. */
|
|
610
|
+
formProps?: Partial<Omit<NiceFormProps, 'items' | 'data' | 'onFieldChange' | 'onSubmit' | 'columns' | 'showActions' | 'submitLabel'>>;
|
|
611
|
+
/** Called when the popup form is submitted with the merged row. */
|
|
612
|
+
onRowEdit?: (rowKey: string, updatedRow: T) => void;
|
|
613
|
+
/** Called when user requests a new row (toolbar button). When provided a "+ Add" button is shown and the popup is opened with empty data. */
|
|
614
|
+
onRowAdd?: (newRow: T) => void;
|
|
615
|
+
/** Called when user clicks the row delete action. When provided, a delete column is rendered. */
|
|
616
|
+
onRowDelete?: (rowKey: string, row: T) => void;
|
|
617
|
+
/** Bulk action items shown in toolbar when one or more rows are selected. */
|
|
618
|
+
bulkActions?: NiceDataGridBulkAction<T>[];
|
|
619
|
+
/** Called when user clicks the built-in "Bulk delete" action (only if {@link bulkActions} not provided). */
|
|
620
|
+
onBulkDelete?: (selectedKeys: string[], rows: T[]) => void;
|
|
605
621
|
exportCsv?: boolean;
|
|
606
622
|
exportFilename?: string;
|
|
607
623
|
/** Render detail content for an expanded row */
|
|
@@ -649,12 +665,12 @@ export declare interface NiceDataGridProps<T extends Record<string, any> = any>
|
|
|
649
665
|
clipboard?: boolean;
|
|
650
666
|
/** Default clipboard format */
|
|
651
667
|
clipboardFormat?: ClipboardFormat;
|
|
652
|
-
/** Callback before copy
|
|
668
|
+
/** Callback before copy � return false to cancel */
|
|
653
669
|
onBeforeCopy?: (data: T[], fields: string[]) => boolean | void;
|
|
654
670
|
/** Callback after copy */
|
|
655
671
|
onCopy?: (data: T[], fields: string[], format: ClipboardFormat) => void;
|
|
656
672
|
/** Callback on paste */
|
|
657
|
-
onPaste?: (data:
|
|
673
|
+
onPaste?: (data: unknown[][], startCell: CellPosition) => void;
|
|
658
674
|
/** Quick filter chips */
|
|
659
675
|
quickFilters?: QuickFilter<T>[];
|
|
660
676
|
/** Active quick filter keys */
|
|
@@ -693,65 +709,112 @@ declare interface NiceDataGridState {
|
|
|
693
709
|
expandedGroups?: string[];
|
|
694
710
|
}
|
|
695
711
|
|
|
696
|
-
/**
|
|
697
|
-
* Universal data source interface for Nice2Dev UI data components.
|
|
698
|
-
* All data-bound components (NiceDataGrid, NiceList, NiceForm, etc.) accept a `NiceDataSource`.
|
|
699
|
-
* Create one via `createArrayDataSource`, `createRestDataSource`, `createODataDataSource`,
|
|
700
|
-
* `createGraphQLDataSource`, or `createCustomDataSource`.
|
|
701
|
-
*/
|
|
702
|
-
declare interface NiceDataSource<T = any> {
|
|
703
|
-
/** Field name used as unique row key. */
|
|
704
|
-
readonly keyField: string;
|
|
705
|
-
/** True when insert/update/remove are available. */
|
|
706
|
-
readonly writable: boolean;
|
|
707
|
-
load(options?: NiceLoadOptions): Promise<NiceLoadResult<T>>;
|
|
708
|
-
byKey(key: unknown): Promise<T | undefined>;
|
|
709
|
-
insert?(item: Partial<T>): Promise<T>;
|
|
710
|
-
update?(key: unknown, changes: Partial<T>): Promise<T>;
|
|
711
|
-
remove?(key: unknown): Promise<void>;
|
|
712
|
-
on<K extends keyof NiceDataSourceEventMap>(event: K, handler: Listener<NiceDataSourceEventMap[K]>): () => void;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
/** Events emitted by all NiceDataSource implementations. */
|
|
716
|
-
declare type NiceDataSourceEventMap = {
|
|
717
|
-
changed: [];
|
|
718
|
-
loading: [boolean];
|
|
719
|
-
error: [Error | null];
|
|
720
|
-
loaded: [NiceLoadResult<unknown>];
|
|
721
|
-
};
|
|
722
|
-
|
|
723
|
-
/**
|
|
724
|
-
* Cross-component visual presentation style.
|
|
725
|
-
* Each style maps 1:1 to a ThemeVariantConfig preset controlling
|
|
726
|
-
* buttons, inputs, cards, badges, tabs, toggles, tooltips, tables, etc.
|
|
727
|
-
*/
|
|
728
|
-
declare type NiceDisplayStyle = 'default' | 'minimal' | 'rounded' | 'sharp' | 'glass' | 'neumorphic' | 'playful' | 'enterprise' | 'modern3d' | 'brutalist' | 'luxe' | 'pill' | 'flat' | 'editorial' | 'dashboard' | 'softCloud' | 'cosmic' | 'corporate' | 'bank' | 'government' | 'military' | 'legal' | 'medical' | 'swiss' | 'scandinavian' | 'bauhaus' | 'notebook' | 'origami' | 'watercolor' | 'monochrome' | 'paper' | 'zen' | 'terminal' | 'hacker' | 'retro8bit' | 'synthwave' | 'cyberpunk' | 'steampunk' | 'vapor' | 'neon' | 'windows95' | 'material' | 'fluent' | 'cupertino' | 'ant' | 'bootstrap' | 'chakra' | 'notion' | 'linear' | 'vercel' | 'candy' | 'bubblegum' | 'cartoon' | 'kawaii' | 'circus' | 'gaming' | 'kiddo' | 'disco' | 'clown';
|
|
729
|
-
|
|
730
|
-
/** A single filter condition in the {@link NiceFilterBuilder} tree. */
|
|
731
|
-
declare type NiceFilterCondition = {
|
|
732
|
-
type: 'condition';
|
|
733
|
-
field: string;
|
|
734
|
-
operator: NiceFilterOperator;
|
|
735
|
-
value: unknown;
|
|
736
|
-
};
|
|
737
|
-
|
|
738
|
-
/** A group of conditions joined by AND/OR logic in the {@link NiceFilterBuilder}. */
|
|
739
|
-
declare type NiceFilterGroup = {
|
|
740
|
-
type: 'group';
|
|
741
|
-
logic: 'and' | 'or';
|
|
742
|
-
items: (NiceFilterCondition | NiceFilterGroup)[];
|
|
743
|
-
};
|
|
744
|
-
|
|
745
|
-
/** Comparison operators available in the {@link NiceFilterBuilder}. */
|
|
746
|
-
declare type NiceFilterOperator = '=' | '<>' | '<' | '<=' | '>' | '>=' | 'contains' | 'notcontains' | 'startswith' | 'endswith' | 'between' | 'isblank' | 'isnotblank' | (string & {});
|
|
747
|
-
|
|
748
712
|
declare interface NiceFilterState {
|
|
749
713
|
[key: string]: unknown;
|
|
750
714
|
}
|
|
751
715
|
|
|
716
|
+
/** Describes a single field in a {@link NiceForm} layout. */
|
|
717
|
+
declare interface NiceFormItem {
|
|
718
|
+
field: string;
|
|
719
|
+
label?: string;
|
|
720
|
+
colSpan?: number;
|
|
721
|
+
required?: boolean;
|
|
722
|
+
/** Static visibility flag � set to false to always hide. */
|
|
723
|
+
visible?: boolean;
|
|
724
|
+
/**
|
|
725
|
+
* Dynamic visibility: evaluated against current form data.
|
|
726
|
+
* Example: `(data) => data.country === 'PL'`
|
|
727
|
+
*/
|
|
728
|
+
visibleWhen?: (data: Record<string, any>) => boolean;
|
|
729
|
+
render?: (value: unknown, onChange: (v: unknown) => void) => default_2.ReactNode;
|
|
730
|
+
hint?: string;
|
|
731
|
+
/** Group name � fields with the same group are rendered together under a section header. */
|
|
732
|
+
group?: string;
|
|
733
|
+
/** Tab name � fields with the same tab are rendered together under a tab. Tabs take precedence over groups for top-level structure. */
|
|
734
|
+
tab?: string;
|
|
735
|
+
/** Field type for auto-rendering (text, number, select, etc.). */
|
|
736
|
+
type?: string;
|
|
737
|
+
/** Options for select/radio type fields. */
|
|
738
|
+
options?: Array<{
|
|
739
|
+
label: string;
|
|
740
|
+
value: string | number;
|
|
741
|
+
} | string>;
|
|
742
|
+
/** Mask pattern for `type: 'masked'`. */
|
|
743
|
+
mask?: string;
|
|
744
|
+
/** Placeholder text shown when no value is selected/entered. */
|
|
745
|
+
placeholder?: string;
|
|
746
|
+
/** Default value applied when no value exists in `data`. */
|
|
747
|
+
defaultValue?: unknown;
|
|
748
|
+
/** Disable this field individually. */
|
|
749
|
+
disabled?: boolean;
|
|
750
|
+
/** Render this field in read-only mode individually. */
|
|
751
|
+
readOnly?: boolean;
|
|
752
|
+
/** Hide this field (alias of `visible: false`). */
|
|
753
|
+
hidden?: boolean;
|
|
754
|
+
/**
|
|
755
|
+
* Optional unit / currency code rendered as a suffix for `type: 'currency'`
|
|
756
|
+
* or `type: 'number'` (e.g. `'PLN'`, `'$'`, `'kg'`). Defaults to `'PLN'`
|
|
757
|
+
* for currency.
|
|
758
|
+
*/
|
|
759
|
+
unit?: string;
|
|
760
|
+
/** Decimal precision for `type: 'number'` / `type: 'currency'`. Default 2 for currency, 0 for number. */
|
|
761
|
+
precision?: number;
|
|
762
|
+
/** Stepper increment for `type: 'number'` / `type: 'currency'`. Default 100 for currency, 1 for number. */
|
|
763
|
+
step?: number;
|
|
764
|
+
/** For `type: 'address'` � render sub-fields in 1 or 2 columns. Default 2. */
|
|
765
|
+
columns?: 1 | 2;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/** Props for the {@link NiceForm} component � a declarative, data-driven form layout. */
|
|
769
|
+
declare interface NiceFormProps extends NiceBaseProps {
|
|
770
|
+
items: NiceFormItem[];
|
|
771
|
+
/** Inline form data. Ignored when `dataSource` + `recordKey` are provided. */
|
|
772
|
+
data?: Record<string, any>;
|
|
773
|
+
/** Field change callback. Ignored when `dataSource` is provided. */
|
|
774
|
+
onFieldChange?: (field: string, value: unknown) => void;
|
|
775
|
+
onSubmit?: (data: Record<string, any>) => void;
|
|
776
|
+
/**
|
|
777
|
+
* Two-way data source binding.
|
|
778
|
+
* When provided together with `recordKey`, the form loads and edits
|
|
779
|
+
* a single record from the source. `data`/`onFieldChange` are ignored.
|
|
780
|
+
*/
|
|
781
|
+
dataSource?: NiceDataSource;
|
|
782
|
+
/** Key of the record to load/edit. */
|
|
783
|
+
recordKey?: unknown;
|
|
784
|
+
columns?: number;
|
|
785
|
+
/**
|
|
786
|
+
* Responsive columns: map of min-width breakpoint (px) ? column count.
|
|
787
|
+
* Example: `{ 0: 1, 600: 2, 1024: 3 }` ? 1 col on small, 2 on medium, 3 on large.
|
|
788
|
+
*/
|
|
789
|
+
responsiveColumns?: Record<number, number>;
|
|
790
|
+
gap?: number | string;
|
|
791
|
+
labelPosition?: 'top' | 'left';
|
|
792
|
+
size?: NiceSize;
|
|
793
|
+
readOnly?: boolean;
|
|
794
|
+
disabled?: boolean;
|
|
795
|
+
/** Auto-save delay in ms. When set, form auto-saves after this many ms of inactivity. */
|
|
796
|
+
autoSaveDelay?: number;
|
|
797
|
+
/** Callback when dirty state changes. */
|
|
798
|
+
onDirtyChange?: (isDirty: boolean) => void;
|
|
799
|
+
/** When true, render Submit/Reset buttons at the bottom. */
|
|
800
|
+
showActions?: boolean;
|
|
801
|
+
/** Custom Submit button label. */
|
|
802
|
+
submitLabel?: string;
|
|
803
|
+
/** Custom Reset button label. */
|
|
804
|
+
resetLabel?: string;
|
|
805
|
+
/**
|
|
806
|
+
* When provided, a Cancel button is rendered on the LEFT side of the
|
|
807
|
+
* actions row. Used by popup hosts (NiceDataGrid edit popup, NiceKanban
|
|
808
|
+
* edit popup, etc.) to dismiss the modal without submitting.
|
|
809
|
+
*/
|
|
810
|
+
onCancel?: () => void;
|
|
811
|
+
/** Custom Cancel button label. */
|
|
812
|
+
cancelLabel?: string;
|
|
813
|
+
}
|
|
814
|
+
|
|
752
815
|
export declare const NiceKanbanBoard: default_2.ForwardRefExoticComponent<NiceKanbanBoardProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
753
816
|
|
|
754
|
-
/** Props for the {@link NiceKanbanBoard} component
|
|
817
|
+
/** Props for the {@link NiceKanbanBoard} component � a drag-and-drop kanban board with columns, WIP limits, and custom card rendering. */
|
|
755
818
|
export declare interface NiceKanbanBoardProps extends NiceBaseProps, TracelessStorageProps {
|
|
756
819
|
/** Column definitions. */
|
|
757
820
|
columns: NiceKanbanColumn[];
|
|
@@ -779,6 +842,22 @@ export declare interface NiceKanbanBoardProps extends NiceBaseProps, TracelessSt
|
|
|
779
842
|
collapsedColumns?: (string | number)[];
|
|
780
843
|
/** Callback when collapsed columns change */
|
|
781
844
|
onCollapsedColumnsChange?: (keys: (string | number)[]) => void;
|
|
845
|
+
/** Form items for the built-in popup editor. When provided clicking a card opens a NiceForm modal. */
|
|
846
|
+
formItems?: NiceFormItem[];
|
|
847
|
+
/** Number of columns for the popup form. Defaults to 1. */
|
|
848
|
+
formColumns?: number;
|
|
849
|
+
/** Escape-hatch: extra props forwarded to the underlying `NiceForm` in the popup (e.g. `labelPosition`, `gap`, `size`, `responsiveColumns`). */
|
|
850
|
+
formProps?: Partial<Omit<NiceFormProps, 'items' | 'data' | 'onFieldChange' | 'columns'>>;
|
|
851
|
+
/** Modal title for editing an existing card. Defaults to "Edit card". */
|
|
852
|
+
editCardTitle?: string;
|
|
853
|
+
/** Modal title for creating a new card. Defaults to "New card". */
|
|
854
|
+
newCardTitle?: string;
|
|
855
|
+
/** Called when an existing card is saved from the popup form. */
|
|
856
|
+
onCardEdit?: (cardKey: string | number, updated: NiceKanbanCard) => void;
|
|
857
|
+
/** Called when a new card is saved from the popup form. */
|
|
858
|
+
onCardCreate?: (newCard: NiceKanbanCard) => void;
|
|
859
|
+
/** Called when the user requests deletion from the popup form. */
|
|
860
|
+
onCardDelete?: (cardKey: string | number) => void;
|
|
782
861
|
}
|
|
783
862
|
|
|
784
863
|
/** A card on the {@link NiceKanbanBoard}. */
|
|
@@ -794,7 +873,7 @@ export declare interface NiceKanbanCard {
|
|
|
794
873
|
/** Sort order within column. */
|
|
795
874
|
order?: number;
|
|
796
875
|
/** Additional data fields. */
|
|
797
|
-
[extra: string]:
|
|
876
|
+
[extra: string]: unknown;
|
|
798
877
|
}
|
|
799
878
|
|
|
800
879
|
/** A column (swimlane) on the {@link NiceKanbanBoard}. */
|
|
@@ -827,7 +906,7 @@ declare interface NiceListItem {
|
|
|
827
906
|
/** Trailing badge content. */
|
|
828
907
|
badge?: default_2.ReactNode;
|
|
829
908
|
/** Additional data fields (index signature). */
|
|
830
|
-
[key: string]:
|
|
909
|
+
[key: string]: unknown;
|
|
831
910
|
}
|
|
832
911
|
|
|
833
912
|
/** Props for the {@link NiceList} component — a versatile list with selection, grouping, search, reorder, and swipe actions. */
|
|
@@ -875,31 +954,6 @@ export declare interface NiceListProps extends NiceBaseProps {
|
|
|
875
954
|
}[];
|
|
876
955
|
}
|
|
877
956
|
|
|
878
|
-
/** Parameters sent to `load()`. All optional — adapters use what they support. */
|
|
879
|
-
declare interface NiceLoadOptions {
|
|
880
|
-
filter?: NiceFilterGroup;
|
|
881
|
-
sort?: NiceSortExpression[];
|
|
882
|
-
skip?: number;
|
|
883
|
-
take?: number;
|
|
884
|
-
search?: string;
|
|
885
|
-
searchFields?: string[];
|
|
886
|
-
select?: string[];
|
|
887
|
-
expand?: string[];
|
|
888
|
-
group?: {
|
|
889
|
-
field: string;
|
|
890
|
-
direction?: NiceSortDirection;
|
|
891
|
-
}[];
|
|
892
|
-
/** Arbitrary parameters forwarded to the adapter (e.g. custom query strings). */
|
|
893
|
-
customParams?: Record<string, unknown>;
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
/** Result returned by {@link NiceDataSource.load}. */
|
|
897
|
-
declare interface NiceLoadResult<T> {
|
|
898
|
-
data: T[];
|
|
899
|
-
totalCount: number;
|
|
900
|
-
summary?: Record<string, unknown>;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
957
|
/**
|
|
904
958
|
* NiceModuleGrid — Enterprise data grid for OmniVerk ERP modules.
|
|
905
959
|
*
|
|
@@ -1031,7 +1085,7 @@ export declare interface NiceModuleGridProps<T extends Record<string, any> = any
|
|
|
1031
1085
|
/** Enable inline editing */
|
|
1032
1086
|
editable?: boolean;
|
|
1033
1087
|
/** Cell edit handler */
|
|
1034
|
-
onCellEdit?: (rowKey: string, field: string, value:
|
|
1088
|
+
onCellEdit?: (rowKey: string, field: string, value: unknown, row: T) => Promise<boolean> | boolean;
|
|
1035
1089
|
/** Row edit handler */
|
|
1036
1090
|
onRowEdit?: (rowKey: string, values: Partial<T>, row: T) => Promise<boolean> | boolean;
|
|
1037
1091
|
/** Edit mode: cell or row */
|
|
@@ -1116,7 +1170,7 @@ declare interface NicePivotField {
|
|
|
1116
1170
|
/** Aggregation function applied in the data area. */
|
|
1117
1171
|
summaryType?: 'sum' | 'count' | 'avg' | 'min' | 'max';
|
|
1118
1172
|
/** Custom value formatter. */
|
|
1119
|
-
format?: (value:
|
|
1173
|
+
format?: (value: unknown) => string;
|
|
1120
1174
|
}
|
|
1121
1175
|
|
|
1122
1176
|
export declare const NicePivotGrid: default_2.FC<NicePivotGridProps>;
|
|
@@ -1173,9 +1227,13 @@ export declare const NiceReconciliationView: default_2.ForwardRefExoticComponent
|
|
|
1173
1227
|
*/
|
|
1174
1228
|
export declare interface NiceReconciliationViewProps extends NiceBaseProps {
|
|
1175
1229
|
/** Bank statement items */
|
|
1176
|
-
statements
|
|
1230
|
+
statements?: BankStatementItem[];
|
|
1231
|
+
/** Alias for `statements`. */
|
|
1232
|
+
bankTransactions?: BankStatementItem[];
|
|
1177
1233
|
/** Book entries from ledger */
|
|
1178
|
-
entries
|
|
1234
|
+
entries?: BookEntry[];
|
|
1235
|
+
/** Alias for `entries`. */
|
|
1236
|
+
accountingEntries?: BookEntry[];
|
|
1179
1237
|
/** Existing matches (controlled) */
|
|
1180
1238
|
matches?: ReconciliationMatch[];
|
|
1181
1239
|
/** Initial matches (uncontrolled) */
|
|
@@ -1184,12 +1242,18 @@ export declare interface NiceReconciliationViewProps extends NiceBaseProps {
|
|
|
1184
1242
|
suggestions?: AISuggestion[];
|
|
1185
1243
|
/** Reconciliation config */
|
|
1186
1244
|
config?: ReconciliationConfig;
|
|
1245
|
+
/** Currency code (alias placed on top-level for convenience). */
|
|
1246
|
+
currency?: string;
|
|
1247
|
+
/** Show AI confidence column. */
|
|
1248
|
+
showConfidence?: boolean;
|
|
1187
1249
|
/** Statement panel config */
|
|
1188
1250
|
statementPanelConfig?: PanelConfig;
|
|
1189
1251
|
/** Entry panel config */
|
|
1190
1252
|
entryPanelConfig?: PanelConfig;
|
|
1191
1253
|
/** Called when items are matched */
|
|
1192
|
-
onMatch?: OnMatchCallback;
|
|
1254
|
+
onMatch?: OnMatchCallback | ((statementId: string, entryId: string) => void);
|
|
1255
|
+
/** Auto-match all using a minimum confidence threshold. */
|
|
1256
|
+
onAutoMatch?: (minConfidence: number) => void;
|
|
1193
1257
|
/** Called when match is removed */
|
|
1194
1258
|
onUnmatch?: OnUnmatchCallback;
|
|
1195
1259
|
/** Called for batch actions */
|
|
@@ -1283,18 +1347,6 @@ export declare interface NiceSavedQueryPanelProps extends NiceBaseProps {
|
|
|
1283
1347
|
|
|
1284
1348
|
declare type NiceSavedQueryUpdate = Partial<NiceSavedQueryCreate>;
|
|
1285
1349
|
|
|
1286
|
-
/** T-shirt sizing used across all components for consistent visual density. */
|
|
1287
|
-
declare type NiceSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
1288
|
-
|
|
1289
|
-
/** Sort direction for data source queries. */
|
|
1290
|
-
declare type NiceSortDirection = 'asc' | 'desc';
|
|
1291
|
-
|
|
1292
|
-
/** A single sort expression: field name + direction. */
|
|
1293
|
-
declare interface NiceSortExpression {
|
|
1294
|
-
field: string;
|
|
1295
|
-
direction: NiceSortDirection;
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
1350
|
declare interface NiceSortState {
|
|
1299
1351
|
field: string;
|
|
1300
1352
|
direction: 'asc' | 'desc';
|
|
@@ -1324,9 +1376,9 @@ export declare interface NiceSpreadsheetCell {
|
|
|
1324
1376
|
readOnly?: boolean;
|
|
1325
1377
|
/** Comment / note for this cell. */
|
|
1326
1378
|
comment?: string;
|
|
1327
|
-
/** Merge span
|
|
1379
|
+
/** Merge span � how many columns this cell covers. */
|
|
1328
1380
|
colSpan?: number;
|
|
1329
|
-
/** Merge span
|
|
1381
|
+
/** Merge span � how many rows this cell covers. */
|
|
1330
1382
|
rowSpan?: number;
|
|
1331
1383
|
/** Whether this cell is hidden by a merge (covered by another cell). */
|
|
1332
1384
|
mergedInto?: string;
|
|
@@ -1335,7 +1387,7 @@ export declare interface NiceSpreadsheetCell {
|
|
|
1335
1387
|
/** Primitive cell value type in the {@link NiceSpreadsheet}. */
|
|
1336
1388
|
declare type NiceSpreadsheetCellValue = string | number | boolean | null;
|
|
1337
1389
|
|
|
1338
|
-
/** Props for the {@link NiceSpreadsheet} component
|
|
1390
|
+
/** Props for the {@link NiceSpreadsheet} component � an Excel-like spreadsheet with formulas, multi-sheet tabs, toolbar, and frozen panes. */
|
|
1339
1391
|
export declare interface NiceSpreadsheetProps extends NiceBaseProps {
|
|
1340
1392
|
/** Sheet data (controlled). */
|
|
1341
1393
|
sheets?: NiceSpreadsheetSheet[];
|
|
@@ -1388,9 +1440,9 @@ declare interface NiceSpreadsheetSheet {
|
|
|
1388
1440
|
name: string;
|
|
1389
1441
|
/** Cell map keyed by address (e.g. "A1", "B3"). */
|
|
1390
1442
|
data: Record<string, NiceSpreadsheetCell>;
|
|
1391
|
-
/** Column width overrides (0-based index
|
|
1443
|
+
/** Column width overrides (0-based index ? px). */
|
|
1392
1444
|
colWidths?: Record<number, number>;
|
|
1393
|
-
/** Row height overrides (0-based index
|
|
1445
|
+
/** Row height overrides (0-based index ? px). */
|
|
1394
1446
|
rowHeights?: Record<number, number>;
|
|
1395
1447
|
/** Number of top rows frozen. */
|
|
1396
1448
|
frozenRows?: number;
|
|
@@ -1836,7 +1888,7 @@ export declare interface ReconciliationMatch {
|
|
|
1836
1888
|
/**
|
|
1837
1889
|
* Reconciliation match status.
|
|
1838
1890
|
*/
|
|
1839
|
-
export declare type ReconciliationStatus = 'matched' | 'partial' | 'unmatched' | 'excluded';
|
|
1891
|
+
export declare type ReconciliationStatus = 'matched' | 'partial' | 'unmatched' | 'excluded' | 'suggested';
|
|
1840
1892
|
|
|
1841
1893
|
/**
|
|
1842
1894
|
* Reconciliation summary statistics.
|
|
@@ -1946,44 +1998,6 @@ export declare interface SuggestionFactor {
|
|
|
1946
1998
|
entryValue?: string;
|
|
1947
1999
|
}
|
|
1948
2000
|
|
|
1949
|
-
/**
|
|
1950
|
-
* @fileoverview Traceless™ — Zero-Trace Privacy Architecture
|
|
1951
|
-
* @module @nice2dev/ui/core/traceless
|
|
1952
|
-
*
|
|
1953
|
-
* Traceless™ is OmniVerk's flagship privacy feature that allows complete control
|
|
1954
|
-
* over client-side storage (cookies, localStorage, sessionStorage).
|
|
1955
|
-
*
|
|
1956
|
-
* "Żadnych śladów. Żadnych cookies. Żadnego localStorage. Żadnego bannera. Traceless."
|
|
1957
|
-
*
|
|
1958
|
-
* @example
|
|
1959
|
-
* ```tsx
|
|
1960
|
-
* import { TracelessProvider, useTracelessPolicy, StorageAdapter } from '@nice2dev/ui';
|
|
1961
|
-
*
|
|
1962
|
-
* // In your app root:
|
|
1963
|
-
* <TracelessProvider>
|
|
1964
|
-
* <App />
|
|
1965
|
-
* </TracelessProvider>
|
|
1966
|
-
*
|
|
1967
|
-
* // In components:
|
|
1968
|
-
* const { mode, canUseCookies, canUseLocalStorage } = useTracelessPolicy();
|
|
1969
|
-
* const storage = useStorageAdapter();
|
|
1970
|
-
* storage.set('key', 'value'); // Automatically respects policy
|
|
1971
|
-
* ```
|
|
1972
|
-
*/
|
|
1973
|
-
/**
|
|
1974
|
-
* Privacy storage modes from most private to most permissive.
|
|
1975
|
-
*
|
|
1976
|
-
* | Mode | Cookies | localStorage | sessionStorage | Consent Banner |
|
|
1977
|
-
* |------------|---------|--------------|----------------|----------------|
|
|
1978
|
-
* | traceless | ❌ | ❌ | ❌ | ❌ Never |
|
|
1979
|
-
* | ephemeral | ❌ | ❌ | ✅ | ❌ Never |
|
|
1980
|
-
* | private | 1 auth | ❌ | ✅ | ❌ Exempt |
|
|
1981
|
-
* | balanced | ❌ | ✅ | ✅ | ⚠️ Maybe |
|
|
1982
|
-
* | full | ✅ | ✅ | ✅ | ✅ Required |
|
|
1983
|
-
* | custom | Config | Config | Config | Config |
|
|
1984
|
-
*/
|
|
1985
|
-
declare type TracelessMode = 'traceless' | 'ephemeral' | 'private' | 'balanced' | 'full' | 'custom';
|
|
1986
|
-
|
|
1987
2001
|
/**
|
|
1988
2002
|
* Standard props that can be added to any component to support Traceless policy.
|
|
1989
2003
|
*/
|
package/dist/data.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as a, a as s, b as c, c as r, d as N, e as d, f as o, g as t, h as l, i as n, j as G, k as p, l as T, m as g, n as v, o as w, p as V, q as b } from "./NiceSavedQueryPanel-
|
|
1
|
+
import { N as a, a as s, b as c, c as r, d as N, e as d, f as o, g as t, h as l, i as n, j as G, k as p, l as T, m as g, n as v, o as w, p as V, q as b } from "./NiceSavedQueryPanel-CZ5bYOe_.js";
|
|
2
2
|
export {
|
|
3
3
|
a as NiceCardView,
|
|
4
4
|
s as NiceDataGrid,
|