@nice2dev/ui 1.4.13 → 1.4.15
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 +108 -0
- package/dist/{NiceColorPicker-BLwYNSXJ.cjs → NiceColorPicker-79rkvaSk.cjs} +1 -1
- package/dist/NiceDataGrid-B1AOjgjm.cjs +10 -0
- package/dist/NiceForm-fmePSeA9.cjs +1 -0
- package/dist/{NiceHtmlEditor-BzECmDO3.cjs → NiceHtmlEditor-By7R1wRo.cjs} +1 -1
- package/dist/{NiceMention-CYRqPKGU.cjs → NiceMention-i7n2BoMw.cjs} +1 -1
- package/dist/{NiceModuleLifecyclePanel-CiYbPcHV.cjs → NiceModuleLifecyclePanel-DVHQuhc-.cjs} +1 -1
- package/dist/{NicePagination-BAxwqeEd.cjs → NicePagination-D9JguOl0.cjs} +1 -1
- package/dist/NicePivotGrid-B_7iQJys.cjs +2 -0
- package/dist/NiceSavedQueryPanel-ChY4HwpM.cjs +587 -0
- package/dist/{NiceScheduler-BqYiHPvz.cjs → NiceScheduler-B2DamQ_L.cjs} +1 -1
- package/dist/backup/NiceBackupScheduler.mjs +171 -119
- package/dist/charts/NiceOrganizationChart.mjs +159 -59
- package/dist/charts/orgChartExport.mjs +71 -0
- package/dist/charts/tidyTree.mjs +43 -0
- package/dist/charts-C3Q3r8Yz.cjs +918 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.d.ts +9 -0
- package/dist/{core-lazy-BQexApr7.cjs → core-lazy-ChKRuEPb.cjs} +1 -1
- package/dist/data/NiceDataGrid.mjs +301 -320
- package/dist/data/NiceRowEditDialog.mjs +57 -0
- package/dist/data/NiceTreeGrid.mjs +670 -551
- package/dist/data/NiceTreeView.mjs +222 -180
- package/dist/data/treeRowDrop.mjs +130 -0
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +68 -5
- package/dist/{devops-cgRBnZVX.cjs → devops-o6Zm0VKB.cjs} +3 -3
- package/dist/devops.cjs +1 -1
- package/dist/editors/forms/NiceForm.mjs +216 -167
- package/dist/editors/inputs/NiceUpload.mjs +238 -238
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +13 -1
- package/dist/feedback.cjs +1 -1
- package/dist/index.cjs +254 -254
- package/dist/index.d.ts +293 -8
- package/dist/index.mjs +980 -966
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.d.ts +11 -1
- package/dist/navigation.cjs +1 -1
- package/dist/no-code/NiceDataMapper.mjs +398 -361
- package/dist/no-code-CN_q6TcB.cjs +331 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.d.ts +11 -1
- package/dist/style.css +1 -1
- package/dist/tools/NicePermissionMatrix.mjs +171 -138
- package/dist/tools/NiceRoleEditor.mjs +334 -297
- package/package.json +4 -4
- package/dist/NiceDataGrid-D3qRQSjy.cjs +0 -10
- package/dist/NiceForm-BWb4LTQJ.cjs +0 -1
- package/dist/NicePivotGrid-Cxu5PECg.cjs +0 -152
- package/dist/NiceSavedQueryPanel-BSZhE-_l.cjs +0 -587
- package/dist/charts-BzlvCCg9.cjs +0 -768
- package/dist/no-code-B1jzfUF5.cjs +0 -331
package/dist/index.d.ts
CHANGED
|
@@ -81,6 +81,7 @@ import { deserializeTheme } from '@nice2dev/ui-core';
|
|
|
81
81
|
import { detectGamepadFamily } from '@nice2dev/ui-core';
|
|
82
82
|
import { Dispatch } from 'react';
|
|
83
83
|
import { DisplayPreferences } from '@nice2dev/ui-core';
|
|
84
|
+
import { DragEvent as DragEvent_2 } from 'react';
|
|
84
85
|
import { endMark } from '@nice2dev/ui-core';
|
|
85
86
|
import { evaluateValidation } from '@nice2dev/ui-core';
|
|
86
87
|
import { evaluateValidationRule } from '@nice2dev/ui-core';
|
|
@@ -1763,7 +1764,10 @@ export declare interface BackupScheduleConfig {
|
|
|
1763
1764
|
enabled: boolean;
|
|
1764
1765
|
cron: string;
|
|
1765
1766
|
scope: BackupScope;
|
|
1767
|
+
/** Backups kept; 0 keeps all of them (1.4.15). */
|
|
1766
1768
|
retentionCount: number;
|
|
1769
|
+
/** Backups are kept this many days (1.4.15); absent: no limit by age. */
|
|
1770
|
+
retentionDays?: number;
|
|
1767
1771
|
compressionLevel: BackupCompressionLevel;
|
|
1768
1772
|
targets: BackupStorageTarget[];
|
|
1769
1773
|
notifyOnFailure?: boolean;
|
|
@@ -7540,6 +7544,9 @@ export declare const NICE_THEME_PICKER_PRESETS: NiceThemeDescriptor[];
|
|
|
7540
7544
|
|
|
7541
7545
|
export { NICE_THEME_PRESETS }
|
|
7542
7546
|
|
|
7547
|
+
/** The type the dragged row's key travels under (plus `text/plain`, which Firefox needs to start). */
|
|
7548
|
+
export declare const NICE_TREE_ROW_MIME = "application/x-nice-tree-row";
|
|
7549
|
+
|
|
7543
7550
|
export { NiceA11yConfig }
|
|
7544
7551
|
|
|
7545
7552
|
export { NiceA11yProvider }
|
|
@@ -8661,7 +8668,7 @@ export declare interface NiceBackupRestoreDialogProps {
|
|
|
8661
8668
|
onClose?: () => void;
|
|
8662
8669
|
}
|
|
8663
8670
|
|
|
8664
|
-
export declare function NiceBackupScheduler({ value: valueProp, defaultValue, onChange, onSave, loading, className, style, }: NiceBackupSchedulerProps): default_2.JSX.Element;
|
|
8671
|
+
export declare function NiceBackupScheduler({ value: valueProp, defaultValue, onChange, onSave, scopes, targets, showCompression, showNotifications, showRetentionDays, showReset, loading, className, style, }: NiceBackupSchedulerProps): default_2.JSX.Element;
|
|
8665
8672
|
|
|
8666
8673
|
export declare interface NiceBackupSchedulerProps {
|
|
8667
8674
|
/** Current schedule configuration (controlled). Omit it to let the scheduler keep its own. */
|
|
@@ -8672,6 +8679,21 @@ export declare interface NiceBackupSchedulerProps {
|
|
|
8672
8679
|
onChange?: (value: BackupScheduleConfig) => void;
|
|
8673
8680
|
/** Called when user saves */
|
|
8674
8681
|
onSave?: (value: BackupScheduleConfig) => void;
|
|
8682
|
+
/** The scopes offered (1.4.15; default all) — only what the host can back up. */
|
|
8683
|
+
scopes?: readonly BackupScope[];
|
|
8684
|
+
/** The storage targets offered (1.4.15; default all). */
|
|
8685
|
+
targets?: readonly BackupStorageTarget[];
|
|
8686
|
+
/** Show the compression level (default true). */
|
|
8687
|
+
showCompression?: boolean;
|
|
8688
|
+
/** Show the notifications card (default true). */
|
|
8689
|
+
showNotifications?: boolean;
|
|
8690
|
+
/** Show the retention in days next to the count of backups kept (1.4.15, default true). */
|
|
8691
|
+
showRetentionDays?: boolean;
|
|
8692
|
+
/**
|
|
8693
|
+
* Show "Reset" next to "Save" (default true): it brings back the schedule as it was when the
|
|
8694
|
+
* scheduler opened or was last saved.
|
|
8695
|
+
*/
|
|
8696
|
+
showReset?: boolean;
|
|
8675
8697
|
/** Loading (disable save button) */
|
|
8676
8698
|
loading?: boolean;
|
|
8677
8699
|
className?: string;
|
|
@@ -11979,8 +12001,18 @@ declare interface NiceDataGridState {
|
|
|
11979
12001
|
export declare const NiceDataMapper: default_2.FC<NiceDataMapperProps>;
|
|
11980
12002
|
|
|
11981
12003
|
export declare interface NiceDataMapperProps extends NiceBaseProps {
|
|
11982
|
-
/**
|
|
12004
|
+
/**
|
|
12005
|
+
* The mapping (controlled since 1.4.15 — it was read once, at mount): feed `onMappingChange` back.
|
|
12006
|
+
* Without it and `defaultMapping`, a sample mapping shows.
|
|
12007
|
+
*/
|
|
11983
12008
|
mapping?: MappingDefinition;
|
|
12009
|
+
/** The mapping at mount when uncontrolled (1.4.15). */
|
|
12010
|
+
defaultMapping?: MappingDefinition;
|
|
12011
|
+
/**
|
|
12012
|
+
* `'mapping'` (1.4.15): only the column mapping — no tabs, no name field, no Save — for a plain
|
|
12013
|
+
* "file columns → entity fields" step. Default `'full'`.
|
|
12014
|
+
*/
|
|
12015
|
+
mode?: 'full' | 'mapping';
|
|
11984
12016
|
/** Available source schemas */
|
|
11985
12017
|
sourceSchemas?: SchemaInfo[];
|
|
11986
12018
|
/** Available target schemas */
|
|
@@ -14122,7 +14154,14 @@ export declare interface NiceFormItem {
|
|
|
14122
14154
|
* Example: `(data) => data.country === 'PL'`
|
|
14123
14155
|
*/
|
|
14124
14156
|
visibleWhen?: (data: Record<string, any>) => boolean;
|
|
14125
|
-
|
|
14157
|
+
/**
|
|
14158
|
+
* Draws the field's control. `field` (1.4.15) carries the id its label points to and the label's
|
|
14159
|
+
* own id — give the control `id={field.id}` or `aria-labelledby={field.labelId}`.
|
|
14160
|
+
*/
|
|
14161
|
+
render?: (value: unknown, onChange: (v: unknown) => void, field: {
|
|
14162
|
+
id: string;
|
|
14163
|
+
labelId: string;
|
|
14164
|
+
}) => default_2.ReactNode;
|
|
14126
14165
|
hint?: string;
|
|
14127
14166
|
/** Group name — fields with the same group are rendered together under a section header. */
|
|
14128
14167
|
group?: string;
|
|
@@ -18832,6 +18871,15 @@ export declare interface NiceOrganizationChartProps extends NiceStandardProps {
|
|
|
18832
18871
|
direction?: 'top-down' | 'left-right';
|
|
18833
18872
|
/** Allow branches to be collapsed. */
|
|
18834
18873
|
collapsible?: boolean;
|
|
18874
|
+
/** Zoom out / in and fit the chart into view, from a small toolbar (1.4.15). */
|
|
18875
|
+
zoomable?: boolean;
|
|
18876
|
+
/**
|
|
18877
|
+
* Export the chart from the toolbar (1.4.15): `true` for SVG and PNG, or the formats. Drawn from
|
|
18878
|
+
* `data` as a tidy tree — a custom `renderNode` exports in the default look.
|
|
18879
|
+
*/
|
|
18880
|
+
exportable?: boolean | Array<'svg' | 'png'>;
|
|
18881
|
+
/** An export, instead of downloading it (`svg`: the document text, `png`: the image). */
|
|
18882
|
+
onExport?: (format: 'svg' | 'png', data: string | Blob) => void;
|
|
18835
18883
|
}
|
|
18836
18884
|
|
|
18837
18885
|
export { NiceOrganizationProfile }
|
|
@@ -18879,6 +18927,31 @@ export declare interface NiceOrganizationProfileFormProps extends NiceBaseProps
|
|
|
18879
18927
|
saving?: boolean;
|
|
18880
18928
|
}
|
|
18881
18929
|
|
|
18930
|
+
/** A node of the chart, as NiceOrganizationChart takes it. */
|
|
18931
|
+
export declare interface NiceOrgChartExportNode {
|
|
18932
|
+
key: string;
|
|
18933
|
+
label: string;
|
|
18934
|
+
children?: readonly NiceOrgChartExportNode[];
|
|
18935
|
+
}
|
|
18936
|
+
|
|
18937
|
+
export declare interface NiceOrgChartExportOptions {
|
|
18938
|
+
/** Top-down (default) or left-right. */
|
|
18939
|
+
direction?: 'top-down' | 'left-right';
|
|
18940
|
+
/** Box height (40) and its least width (120); a box grows with its label. */
|
|
18941
|
+
nodeHeight?: number;
|
|
18942
|
+
minNodeWidth?: number;
|
|
18943
|
+
/** Colours — the page's tokens are not there in a file. */
|
|
18944
|
+
background?: string;
|
|
18945
|
+
boxFill?: string;
|
|
18946
|
+
boxStroke?: string;
|
|
18947
|
+
lineColor?: string;
|
|
18948
|
+
textColor?: string;
|
|
18949
|
+
fontFamily?: string;
|
|
18950
|
+
fontSize?: number;
|
|
18951
|
+
/** PNG: pixels per unit (2). */
|
|
18952
|
+
scale?: number;
|
|
18953
|
+
}
|
|
18954
|
+
|
|
18882
18955
|
/** A node in the {@link NiceOrganizationChart} hierarchy. */
|
|
18883
18956
|
export declare interface NiceOrgNode {
|
|
18884
18957
|
/** Unique key. */
|
|
@@ -19296,12 +19369,21 @@ export declare interface NicePermissionMatrixProps {
|
|
|
19296
19369
|
onCellChange?: (roleId: string, actionId: string, granted: boolean) => void;
|
|
19297
19370
|
/** Whether to show "select all" row/column controls. */
|
|
19298
19371
|
showBulkActions?: boolean;
|
|
19299
|
-
/**
|
|
19372
|
+
/**
|
|
19373
|
+
* Whether to allow tristate (true/false/inherited). Without it (1.4.15) a cell switches between
|
|
19374
|
+
* granted and not set — a cleared cell is removed from `value`, never written as `false` (which
|
|
19375
|
+
* shows as "Denied").
|
|
19376
|
+
*/
|
|
19300
19377
|
tristate?: boolean;
|
|
19301
19378
|
/** Whether the matrix is read-only. */
|
|
19302
19379
|
readOnly?: boolean;
|
|
19303
19380
|
/** Whether the matrix is disabled. */
|
|
19304
19381
|
disabled?: boolean;
|
|
19382
|
+
/**
|
|
19383
|
+
* The matrix's height limit (1.4.15): beyond it the rows scroll under the header, which stays,
|
|
19384
|
+
* as the role column stays when the actions scroll sideways.
|
|
19385
|
+
*/
|
|
19386
|
+
maxHeight?: number | string;
|
|
19305
19387
|
/** Custom class name. */
|
|
19306
19388
|
className?: string;
|
|
19307
19389
|
/** Custom style. */
|
|
@@ -21104,6 +21186,16 @@ export declare interface NiceRoleEditorProps extends NiceBaseProps {
|
|
|
21104
21186
|
segmentLabel?: (segment: string, depth: number, path: readonly string[]) => string;
|
|
21105
21187
|
/** Whether a role can be changed (default: not `system`). */
|
|
21106
21188
|
canEditRole?: (role: NiceRoleDef) => boolean;
|
|
21189
|
+
/**
|
|
21190
|
+
* Whether people can be given or taken a role (1.4.15; default: as `canEditRole`). A built-in role
|
|
21191
|
+
* can then stay locked for its name and permissions while people still get it.
|
|
21192
|
+
*/
|
|
21193
|
+
canAssignRole?: (role: NiceRoleDef) => boolean;
|
|
21194
|
+
/**
|
|
21195
|
+
* Finds people to give a role to (1.4.15), for instances with too many to pass in `users`: called
|
|
21196
|
+
* as "Give this role to…" is typed in; the person picked joins `users` through `onUsersChange`.
|
|
21197
|
+
*/
|
|
21198
|
+
onSearchUsers?: (query: string) => Promise<NiceRoleUser[]>;
|
|
21107
21199
|
/** The id of a new role (default from its label: `sales-rep`). */
|
|
21108
21200
|
createRoleId?: (label: string, roles: readonly NiceRoleDef[]) => string;
|
|
21109
21201
|
/** Height of the editor (default 600px). */
|
|
@@ -21145,6 +21237,27 @@ export declare interface NiceRoomGridProps extends NiceBaseProps {
|
|
|
21145
21237
|
sensorReadings?: SensorReading[];
|
|
21146
21238
|
}
|
|
21147
21239
|
|
|
21240
|
+
/** The row edit dialog of the grids' `editMode="popup"`. */
|
|
21241
|
+
export declare function NiceRowEditDialog({ isNew, title, items, data, columns, formProps, onFieldChange, onSubmit, onClose, }: NiceRowEditDialogProps): default_2.ReactElement;
|
|
21242
|
+
|
|
21243
|
+
export declare interface NiceRowEditDialogProps {
|
|
21244
|
+
/** A new row (Add) or an existing one (Save). */
|
|
21245
|
+
isNew?: boolean;
|
|
21246
|
+
/** The dialog's title (default "Add row" / "Edit row"). */
|
|
21247
|
+
title?: string;
|
|
21248
|
+
/** The form's fields (`rowEditFormItems(columns, keyField)` derives them from grid columns). */
|
|
21249
|
+
items?: NiceFormItem[];
|
|
21250
|
+
/** The row's values as edited. */
|
|
21251
|
+
data: Record<string, unknown>;
|
|
21252
|
+
/** Form columns (default 2). */
|
|
21253
|
+
columns?: number;
|
|
21254
|
+
/** More NiceForm props. */
|
|
21255
|
+
formProps?: Partial<NiceFormProps>;
|
|
21256
|
+
onFieldChange: (field: string, value: unknown) => void;
|
|
21257
|
+
onSubmit: (data: Record<string, unknown>) => void;
|
|
21258
|
+
onClose: () => void;
|
|
21259
|
+
}
|
|
21260
|
+
|
|
21148
21261
|
export { NiceRTLConfig }
|
|
21149
21262
|
|
|
21150
21263
|
export { NiceRTLProvider }
|
|
@@ -24319,6 +24432,44 @@ export { NiceThemeVariantProvider }
|
|
|
24319
24432
|
|
|
24320
24433
|
export { NiceThemeVariantProviderProps }
|
|
24321
24434
|
|
|
24435
|
+
/** Where a node's box sits: its top-left corner and size, and its depth (0 for a root). */
|
|
24436
|
+
export declare interface NiceTidyTreeBox {
|
|
24437
|
+
x: number;
|
|
24438
|
+
y: number;
|
|
24439
|
+
width: number;
|
|
24440
|
+
height: number;
|
|
24441
|
+
depth: number;
|
|
24442
|
+
}
|
|
24443
|
+
|
|
24444
|
+
/**
|
|
24445
|
+
* A tidy tree layout (1.4.15 — OmniVerk wishlist #7 and #8): children keep their order, a parent
|
|
24446
|
+
* stands over the middle of its children, and every subtree has a band of its own, so branches never
|
|
24447
|
+
* overlap. Used by NiceOrganizationChart's export and NiceDiagramEditor's `'tree'` layout.
|
|
24448
|
+
*
|
|
24449
|
+
* React-free.
|
|
24450
|
+
*/
|
|
24451
|
+
/** A node of the tree to lay out. */
|
|
24452
|
+
export declare interface NiceTidyTreeNode {
|
|
24453
|
+
id: string;
|
|
24454
|
+
/** Its box (default `options.nodeWidth` × `options.nodeHeight`). */
|
|
24455
|
+
width?: number;
|
|
24456
|
+
height?: number;
|
|
24457
|
+
children?: readonly NiceTidyTreeNode[];
|
|
24458
|
+
}
|
|
24459
|
+
|
|
24460
|
+
export declare interface NiceTidyTreeOptions {
|
|
24461
|
+
/** Default box width (160). */
|
|
24462
|
+
nodeWidth?: number;
|
|
24463
|
+
/** Default box height (56). */
|
|
24464
|
+
nodeHeight?: number;
|
|
24465
|
+
/** Between siblings, and between subtrees (24). */
|
|
24466
|
+
siblingGap?: number;
|
|
24467
|
+
/** Between a parent and its children (48). */
|
|
24468
|
+
levelGap?: number;
|
|
24469
|
+
/** Top-down (default) or left-right. */
|
|
24470
|
+
direction?: 'TB' | 'LR';
|
|
24471
|
+
}
|
|
24472
|
+
|
|
24322
24473
|
export declare function NiceTileView<T extends NiceTileViewItem>({ items, tileWidth, tileHeight, direction, renderTile, onTileClick, loading, emptyText, className, style, 'data-testid': dataTestId, }: NiceTileViewProps<T>): default_2.JSX.Element;
|
|
24323
24474
|
|
|
24324
24475
|
/** A tile item displayed by the {@link NiceTileView} component. */
|
|
@@ -24906,7 +25057,16 @@ export declare interface NiceTreeContextMenuItem {
|
|
|
24906
25057
|
disabled?: boolean;
|
|
24907
25058
|
}
|
|
24908
25059
|
|
|
24909
|
-
|
|
25060
|
+
/** Where a dropped row goes relative to the row it is dropped on. */
|
|
25061
|
+
export declare type NiceTreeDropPosition = 'before' | 'inside' | 'after';
|
|
25062
|
+
|
|
25063
|
+
/** The row a drag is over and where it would land. */
|
|
25064
|
+
export declare interface NiceTreeDropTarget {
|
|
25065
|
+
key: string;
|
|
25066
|
+
position: NiceTreeDropPosition;
|
|
25067
|
+
}
|
|
25068
|
+
|
|
25069
|
+
export declare function NiceTreeGrid<T extends NiceTreeGridNode>({ columns, data, keyField, parentKeyField, nested, childrenField, expandedKeys: controlledExpanded, defaultExpandedKeys, onExpandedChange, hasChildren, loadChildren, rowActions, defaultExpandAll, sortable, sortField: controlledSortField, sortDirection: controlledSortDir, onSort, selectable, selectedKeys: controlledSelected, onSelectionChange, checkable, checkedKeys, defaultCheckedKeys, onCheckedChange, checkStrategy, isRowCheckable, isRowDisabled, checkboxPlacement, checkOnRowClick, showCheckedCount, checkedSummary, showSelectAll, showOnlyChecked: controlledOnlyChecked, defaultShowOnlyChecked, onShowOnlyCheckedChange, toolbarActions, searchable, searchPlaceholder, searchText, defaultSearchText, onSearchChange, searchFields, searchFilter, searchKeepDescendants, searchAutoExpand, highlightMatches, rowClassName, getRowLabel, virtualScroll, rowHeight, height, striped, compact, size, loading, disabled, readOnly, error, emptyText, toolbar, onRowClick, contextMenuItems, rowDraggable, canDrop, onRowDrop, editMode, formItems, formColumns, editFormTitle, formProps, onRowEdit, className, style, id, testId, 'data-testid': dataTestId, accessMode, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: NiceTreeGridProps<T>): default_2.JSX.Element | null;
|
|
24910
25070
|
|
|
24911
25071
|
/** What a `checkedSummary` function of {@link NiceTreeGrid} gets. */
|
|
24912
25072
|
export declare interface NiceTreeGridCheckedSummaryInfo<T = NiceTreeGridNode> {
|
|
@@ -25121,6 +25281,35 @@ export declare interface NiceTreeGridProps<T extends NiceTreeGridNode = NiceTree
|
|
|
25121
25281
|
* no menu.
|
|
25122
25282
|
*/
|
|
25123
25283
|
contextMenuItems?: (row: T) => NiceTreeGridMenuItem[] | undefined;
|
|
25284
|
+
/**
|
|
25285
|
+
* Rows can be dragged onto other rows (1.4.14): `true`, or per row. The pointer picks the spot —
|
|
25286
|
+
* the top quarter of a row drops before it, the bottom quarter after it, the middle inside it —
|
|
25287
|
+
* and Ctrl+Shift+↑ / ↓ / → / ← move the focused row from the keyboard. Needs `onRowDrop`.
|
|
25288
|
+
*/
|
|
25289
|
+
rowDraggable?: boolean | ((row: T) => boolean);
|
|
25290
|
+
/** Whether a dragged row may land `position` `target` (a row never drops into its own branch). */
|
|
25291
|
+
canDrop?: (dragged: T, target: T, position: NiceTreeDropPosition) => boolean;
|
|
25292
|
+
/**
|
|
25293
|
+
* A row dropped on another, by the pointer or the keyboard. The grid does not move it: update
|
|
25294
|
+
* `data`.
|
|
25295
|
+
*/
|
|
25296
|
+
onRowDrop?: (dragKey: string, dropKey: string, position: NiceTreeDropPosition) => void;
|
|
25297
|
+
/**
|
|
25298
|
+
* `'popup'` (1.4.15 — OmniVerk wishlist #4): a double click or F2 on a row opens its values in a
|
|
25299
|
+
* dialog, as in NiceDataGrid (a NiceForm with `formItems`, else fields from the columns); Save
|
|
25300
|
+
* hands them to `onRowEdit`.
|
|
25301
|
+
*/
|
|
25302
|
+
editMode?: 'popup';
|
|
25303
|
+
/** The dialog's fields (default: the visible columns but the key, typed by `dataType`). */
|
|
25304
|
+
formItems?: NiceFormItem[];
|
|
25305
|
+
/** The dialog form's columns (default 2). */
|
|
25306
|
+
formColumns?: number;
|
|
25307
|
+
/** The dialog's title (default "Edit row"). */
|
|
25308
|
+
editFormTitle?: string;
|
|
25309
|
+
/** More props of the dialog's NiceForm. */
|
|
25310
|
+
formProps?: NiceRowEditDialogProps['formProps'];
|
|
25311
|
+
/** A row edited in the dialog. The grid does not change `data` itself. */
|
|
25312
|
+
onRowEdit?: (key: string, row: T) => void;
|
|
25124
25313
|
}
|
|
25125
25314
|
|
|
25126
25315
|
/** A built-in button in the rows of {@link NiceTreeGrid}. */
|
|
@@ -25129,6 +25318,9 @@ export declare type NiceTreeGridRowAction = 'expandSubtree';
|
|
|
25129
25318
|
/** A built-in toolbar button of {@link NiceTreeGrid}. */
|
|
25130
25319
|
export declare type NiceTreeGridToolbarAction = 'expandAll' | 'collapseAll' | 'onlyChecked' | 'clearChecked';
|
|
25131
25320
|
|
|
25321
|
+
/** A keyboard move of a row: Ctrl+Shift+↑ / ↓ past a sibling, → into the one above, ← out a level. */
|
|
25322
|
+
export declare type NiceTreeKeyboardMove = 'up' | 'down' | 'in' | 'out';
|
|
25323
|
+
|
|
25132
25324
|
export declare function NiceTreeList<T extends NiceTreeListNode>({ columns, data, keyField, parentKeyField, expandedKeys: controlledExpanded, onExpandedChange, selectedKeys, onSelectionChange, selectable, sortable, loading, emptyText, className, style, accessMode, id, 'data-testid': dataTestId, }: NiceTreeListProps<T>): default_2.JSX.Element | null;
|
|
25133
25325
|
|
|
25134
25326
|
/** A tree-list node for the {@link NiceTreeList} component. */
|
|
@@ -25331,10 +25523,16 @@ export declare interface NiceTreeViewProps extends NiceBaseProps {
|
|
|
25331
25523
|
showLines?: boolean;
|
|
25332
25524
|
/** Show a loading skeleton. */
|
|
25333
25525
|
loading?: boolean;
|
|
25334
|
-
/**
|
|
25526
|
+
/**
|
|
25527
|
+
* Drag-and-drop reordering. Where a node lands follows the pointer (1.4.14): the top quarter of a
|
|
25528
|
+
* row drops before it, the bottom quarter after it, the middle inside it; Ctrl+Shift+↑ / ↓ / → / ←
|
|
25529
|
+
* move the focused node from the keyboard.
|
|
25530
|
+
*/
|
|
25335
25531
|
draggable?: boolean;
|
|
25336
|
-
/** Called after a node is dropped. */
|
|
25337
|
-
onNodeDrop?: (dragKey: string, dropKey: string, position:
|
|
25532
|
+
/** Called after a node is dropped. The tree does not move it: update `nodes`. */
|
|
25533
|
+
onNodeDrop?: (dragKey: string, dropKey: string, position: NiceTreeDropPosition) => void;
|
|
25534
|
+
/** Whether a dragged node may land `position` the target node (never inside its own branch). */
|
|
25535
|
+
canDrop?: (dragKey: string, dropKey: string, position: NiceTreeDropPosition) => boolean;
|
|
25338
25536
|
/** Lazy loading: called when expanding a node with no children and leaf !== true. */
|
|
25339
25537
|
onLoadChildren?: (node: NiceTreeNode) => Promise<NiceTreeNode[]>;
|
|
25340
25538
|
/** Context menu items shown on right-click. */
|
|
@@ -25681,6 +25879,11 @@ export declare interface NiceUploadHandle {
|
|
|
25681
25879
|
* export was retired in favour of this component. */
|
|
25682
25880
|
export declare interface NiceUploadProps extends NiceBaseProps {
|
|
25683
25881
|
accept?: string;
|
|
25882
|
+
/**
|
|
25883
|
+
* Several files at once, added to the ones chosen before. Default `true` — `false` for
|
|
25884
|
+
* `variant="button"` (1.4.15, OmniVerk wishlist #10): a button picks one file, a new pick replacing
|
|
25885
|
+
* the last. `onFilesAdded` hands over only the files just added.
|
|
25886
|
+
*/
|
|
25684
25887
|
multiple?: boolean;
|
|
25685
25888
|
maxFileSize?: number;
|
|
25686
25889
|
maxFiles?: number;
|
|
@@ -27181,6 +27384,12 @@ export declare interface OpenAPISpec {
|
|
|
27181
27384
|
/** The operators that fit a value. */
|
|
27182
27385
|
export declare function operatorsFor(type: NiceValueType): NiceQueryOperatorDef[];
|
|
27183
27386
|
|
|
27387
|
+
/** The chart as a PNG image (in a browser: SVG → image → canvas). */
|
|
27388
|
+
export declare function orgChartToPng(data: NiceOrgChartExportNode, options?: NiceOrgChartExportOptions): Promise<Blob>;
|
|
27389
|
+
|
|
27390
|
+
/** The chart as an SVG document. */
|
|
27391
|
+
export declare function orgChartToSvg(data: NiceOrgChartExportNode, options?: NiceOrgChartExportOptions): string;
|
|
27392
|
+
|
|
27184
27393
|
/** Moves the node with `id` out of its parent, right after it; a root stays. */
|
|
27185
27394
|
export declare function outdentTreeNode<T>(tree: readonly T[], id: string, options?: TreeEditOptions): T[];
|
|
27186
27395
|
|
|
@@ -27371,6 +27580,11 @@ export declare interface PermissionAction {
|
|
|
27371
27580
|
id: string;
|
|
27372
27581
|
label: string;
|
|
27373
27582
|
description?: string;
|
|
27583
|
+
/**
|
|
27584
|
+
* The group the action belongs to (1.4.15 — `Invoice` for `Invoice.Read`, `Invoice.Write`): the
|
|
27585
|
+
* matrix shows a header over each run of actions of one group, with a toggle for all of them.
|
|
27586
|
+
*/
|
|
27587
|
+
group?: string;
|
|
27374
27588
|
}
|
|
27375
27589
|
|
|
27376
27590
|
export declare type PermissionLevel = 'none' | 'read' | 'write' | 'delete' | 'admin';
|
|
@@ -27384,6 +27598,11 @@ export declare interface PermissionRole {
|
|
|
27384
27598
|
label: string;
|
|
27385
27599
|
description?: string;
|
|
27386
27600
|
icon?: default_2.ReactNode;
|
|
27601
|
+
/**
|
|
27602
|
+
* The row cannot be changed (1.4.15 — a built-in role): its cells are inert, it has no row
|
|
27603
|
+
* toggle, and the column and group toggles leave it out.
|
|
27604
|
+
*/
|
|
27605
|
+
readOnly?: boolean;
|
|
27387
27606
|
}
|
|
27388
27607
|
|
|
27389
27608
|
/** The permission catalog as a tree: groups from the codes (or `path`), permissions as leaves. */
|
|
@@ -28470,6 +28689,9 @@ declare interface RowContext {
|
|
|
28470
28689
|
index: number;
|
|
28471
28690
|
}
|
|
28472
28691
|
|
|
28692
|
+
/** The form fields for a grid's columns: every visible column but the key, typed by `dataType`. */
|
|
28693
|
+
export declare function rowEditFormItems<T>(columns: readonly NiceDataGridColumn<T>[], keyField: string): NiceFormItem[];
|
|
28694
|
+
|
|
28473
28695
|
export declare interface RuleAction {
|
|
28474
28696
|
id: string;
|
|
28475
28697
|
variable: string;
|
|
@@ -30570,6 +30792,12 @@ export declare type TicketStatus = 'new' | 'open' | 'pending' | 'on-hold' | 'res
|
|
|
30570
30792
|
|
|
30571
30793
|
declare type TicketType = 'question' | 'incident' | 'problem' | 'task' | 'feature-request' | 'bug';
|
|
30572
30794
|
|
|
30795
|
+
/**
|
|
30796
|
+
* The boxes of a forest laid out as tidy trees, side by side, starting at (0, 0). A node met twice
|
|
30797
|
+
* (a cycle, or a node with two parents) is laid out where it is met first.
|
|
30798
|
+
*/
|
|
30799
|
+
export declare function tidyTreeLayout(roots: readonly NiceTidyTreeNode[], options?: NiceTidyTreeOptions): Map<string, NiceTidyTreeBox>;
|
|
30800
|
+
|
|
30573
30801
|
export declare interface TimelineEvent {
|
|
30574
30802
|
id: string;
|
|
30575
30803
|
title: string;
|
|
@@ -31083,6 +31311,15 @@ declare type TransformType = 'direct' | 'format' | 'convert' | 'concat' | 'split
|
|
|
31083
31311
|
|
|
31084
31312
|
export declare type TransitionType = 'fade' | 'dissolve' | 'wipe' | 'slide' | 'zoom' | 'none';
|
|
31085
31313
|
|
|
31314
|
+
/**
|
|
31315
|
+
* Which part of a row a pointer at `clientY` is over: the top quarter is `before`, the bottom
|
|
31316
|
+
* quarter `after`, the middle `inside` — or the top and bottom halves when `nest` is false.
|
|
31317
|
+
*/
|
|
31318
|
+
export declare function treeDropPosition(clientY: number, rect: {
|
|
31319
|
+
top: number;
|
|
31320
|
+
height: number;
|
|
31321
|
+
}, nest?: boolean): NiceTreeDropPosition;
|
|
31322
|
+
|
|
31086
31323
|
/** A place in a tree: a parent (`null` for the roots) and a position among its children. */
|
|
31087
31324
|
export declare interface TreeDropTarget {
|
|
31088
31325
|
parentId: string | null;
|
|
@@ -31108,6 +31345,16 @@ export declare interface TreeEditOptions {
|
|
|
31108
31345
|
childrenField?: string;
|
|
31109
31346
|
}
|
|
31110
31347
|
|
|
31348
|
+
/** The move a key press asks for (Ctrl / ⌘ + Shift + an arrow; ← and → swap right-to-left). */
|
|
31349
|
+
export declare function treeKeyboardMove(e: Pick<KeyboardEvent, 'key' | 'ctrlKey' | 'metaKey' | 'shiftKey' | 'altKey'>, rtl?: boolean): NiceTreeKeyboardMove | null;
|
|
31350
|
+
|
|
31351
|
+
/**
|
|
31352
|
+
* Where a keyboard move of `key` lands, from where the row sits: its parent and its siblings in
|
|
31353
|
+
* order. `up` goes before the sibling above, `down` after the one below, `in` inside the sibling
|
|
31354
|
+
* above, `out` after its parent. `null` when there is nowhere to go.
|
|
31355
|
+
*/
|
|
31356
|
+
export declare function treeKeyboardTarget(move: NiceTreeKeyboardMove, key: string, parentKey: string | null, siblings: readonly string[]): NiceTreeDropTarget | null;
|
|
31357
|
+
|
|
31111
31358
|
export declare interface TreeMapNode {
|
|
31112
31359
|
id: string;
|
|
31113
31360
|
name: string;
|
|
@@ -32121,6 +32368,44 @@ export { useTreeFocus }
|
|
|
32121
32368
|
|
|
32122
32369
|
export { UseTreeFocusOptions }
|
|
32123
32370
|
|
|
32371
|
+
/** Row drag and drop for a tree: the dragged row, the spot it would land on, the handlers. */
|
|
32372
|
+
export declare function useTreeRowDrop(options: UseTreeRowDropOptions): UseTreeRowDropResult;
|
|
32373
|
+
|
|
32374
|
+
export declare interface UseTreeRowDropOptions {
|
|
32375
|
+
/** Rows can be dragged. */
|
|
32376
|
+
enabled: boolean;
|
|
32377
|
+
/** Matches a row element (it carries `data-key`); the innermost match under the pointer counts. */
|
|
32378
|
+
rowSelector: string;
|
|
32379
|
+
/** The part of a row whose box the pointer is measured against (default: the row). */
|
|
32380
|
+
rectOf?: (row: HTMLElement) => Element;
|
|
32381
|
+
/** Whether a row can be picked up (default: all). */
|
|
32382
|
+
canDrag?: (key: string) => boolean;
|
|
32383
|
+
/** Whether a row takes rows inside it — its middle is a drop zone (default: all). */
|
|
32384
|
+
canNest?: (key: string) => boolean;
|
|
32385
|
+
/** Whether `key` is `ancestor` or lies below it: no row drops into its own branch. */
|
|
32386
|
+
isWithin: (key: string, ancestor: string) => boolean;
|
|
32387
|
+
/** Whether the drop is allowed (default: all that `isWithin` leaves). */
|
|
32388
|
+
canDrop?: (dragKey: string, targetKey: string, position: NiceTreeDropPosition) => boolean;
|
|
32389
|
+
onDrop?: (dragKey: string, targetKey: string, position: NiceTreeDropPosition) => void;
|
|
32390
|
+
/** A row held under a drag for a while (to open it if it is closed). */
|
|
32391
|
+
onHoverOpen?: (key: string) => void;
|
|
32392
|
+
}
|
|
32393
|
+
|
|
32394
|
+
export declare interface UseTreeRowDropResult {
|
|
32395
|
+
/** The row being dragged. */
|
|
32396
|
+
dragKey: string | null;
|
|
32397
|
+
/** Where it would land now — only an allowed spot. */
|
|
32398
|
+
target: NiceTreeDropTarget | null;
|
|
32399
|
+
/** Spread on the element that holds the rows. */
|
|
32400
|
+
handlers: {
|
|
32401
|
+
onDragStart: (e: DragEvent_2<HTMLElement>) => void;
|
|
32402
|
+
onDragOver: (e: DragEvent_2<HTMLElement>) => void;
|
|
32403
|
+
onDragLeave: (e: DragEvent_2<HTMLElement>) => void;
|
|
32404
|
+
onDrop: (e: DragEvent_2<HTMLElement>) => void;
|
|
32405
|
+
onDragEnd: () => void;
|
|
32406
|
+
};
|
|
32407
|
+
}
|
|
32408
|
+
|
|
32124
32409
|
export declare function useUndoKeyboard<T = unknown>(manager: NiceUndoManager<T>): void;
|
|
32125
32410
|
|
|
32126
32411
|
export declare function useUndoManager<T = unknown>(): UndoContextValue<T>;
|