@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/data.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./NiceDataGrid-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./NiceDataGrid-B1AOjgjm.cjs"),e=require("./NiceSavedQueryPanel-ChY4HwpM.cjs"),r=require("./NicePivotGrid-B_7iQJys.cjs");exports.NiceDataGrid=i.NiceDataGrid;exports.applyColumnOrder=i.applyColumnOrder;exports.buildColumnGroupSegments=i.buildColumnGroupSegments;exports.buildGridState=i.buildGridState;exports.computeAggregate=i.computeAggregate;exports.escapeCsvField=i.escapeCsvField;exports.formatNumberPattern=i.formatNumberPattern;exports.measureColumnContentWidth=i.measureColumnContentWidth;exports.readStoredGridState=i.readStoredGridState;exports.writeStoredGridState=i.writeStoredGridState;exports.NiceDataGridAI=e.NiceDataGridAI;exports.NiceKanbanBoard=e.NiceKanbanBoard;exports.NiceList=e.NiceList;exports.NiceModuleGrid=e.NiceModuleGrid;exports.NiceReconciliationView=e.NiceReconciliationView;exports.NiceSavedQueryPanel=e.NiceSavedQueryPanel;exports.NiceSpreadsheet=e.NiceSpreadsheet;exports.NiceTable=e.NiceTable;exports.NiceTileView=e.NiceTileView;exports.NiceTreeGrid=e.NiceTreeGrid;exports.NiceTreeList=e.NiceTreeList;exports.NiceTreeView=e.NiceTreeView;exports.NicePivotGrid=r.NicePivotGrid;exports.NicePivotGridFieldChooser=r.NicePivotGridFieldChooser;
|
package/dist/data.d.ts
CHANGED
|
@@ -841,7 +841,14 @@ declare interface NiceFormItem {
|
|
|
841
841
|
* Example: `(data) => data.country === 'PL'`
|
|
842
842
|
*/
|
|
843
843
|
visibleWhen?: (data: Record<string, any>) => boolean;
|
|
844
|
-
|
|
844
|
+
/**
|
|
845
|
+
* Draws the field's control. `field` (1.4.15) carries the id its label points to and the label's
|
|
846
|
+
* own id — give the control `id={field.id}` or `aria-labelledby={field.labelId}`.
|
|
847
|
+
*/
|
|
848
|
+
render?: (value: unknown, onChange: (v: unknown) => void, field: {
|
|
849
|
+
id: string;
|
|
850
|
+
labelId: string;
|
|
851
|
+
}) => default_2.ReactNode;
|
|
845
852
|
hint?: string;
|
|
846
853
|
/** Group name — fields with the same group are rendered together under a section header. */
|
|
847
854
|
group?: string;
|
|
@@ -1422,6 +1429,24 @@ export declare interface NiceReconciliationViewProps extends NiceBaseProps {
|
|
|
1422
1429
|
style?: React.CSSProperties;
|
|
1423
1430
|
}
|
|
1424
1431
|
|
|
1432
|
+
declare interface NiceRowEditDialogProps {
|
|
1433
|
+
/** A new row (Add) or an existing one (Save). */
|
|
1434
|
+
isNew?: boolean;
|
|
1435
|
+
/** The dialog's title (default "Add row" / "Edit row"). */
|
|
1436
|
+
title?: string;
|
|
1437
|
+
/** The form's fields (`rowEditFormItems(columns, keyField)` derives them from grid columns). */
|
|
1438
|
+
items?: NiceFormItem[];
|
|
1439
|
+
/** The row's values as edited. */
|
|
1440
|
+
data: Record<string, unknown>;
|
|
1441
|
+
/** Form columns (default 2). */
|
|
1442
|
+
columns?: number;
|
|
1443
|
+
/** More NiceForm props. */
|
|
1444
|
+
formProps?: Partial<NiceFormProps>;
|
|
1445
|
+
onFieldChange: (field: string, value: unknown) => void;
|
|
1446
|
+
onSubmit: (data: Record<string, unknown>) => void;
|
|
1447
|
+
onClose: () => void;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1425
1450
|
declare interface NiceSavedQuery {
|
|
1426
1451
|
id: string;
|
|
1427
1452
|
name: string;
|
|
@@ -1691,7 +1716,10 @@ declare interface NiceTreeContextMenuItem {
|
|
|
1691
1716
|
disabled?: boolean;
|
|
1692
1717
|
}
|
|
1693
1718
|
|
|
1694
|
-
|
|
1719
|
+
/** Where a dropped row goes relative to the row it is dropped on. */
|
|
1720
|
+
declare type NiceTreeDropPosition = 'before' | 'inside' | 'after';
|
|
1721
|
+
|
|
1722
|
+
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;
|
|
1695
1723
|
|
|
1696
1724
|
/** What a `checkedSummary` function of {@link NiceTreeGrid} gets. */
|
|
1697
1725
|
export declare interface NiceTreeGridCheckedSummaryInfo<T = NiceTreeGridNode> {
|
|
@@ -1906,6 +1934,35 @@ export declare interface NiceTreeGridProps<T extends NiceTreeGridNode = NiceTree
|
|
|
1906
1934
|
* no menu.
|
|
1907
1935
|
*/
|
|
1908
1936
|
contextMenuItems?: (row: T) => NiceTreeGridMenuItem[] | undefined;
|
|
1937
|
+
/**
|
|
1938
|
+
* Rows can be dragged onto other rows (1.4.14): `true`, or per row. The pointer picks the spot —
|
|
1939
|
+
* the top quarter of a row drops before it, the bottom quarter after it, the middle inside it —
|
|
1940
|
+
* and Ctrl+Shift+↑ / ↓ / → / ← move the focused row from the keyboard. Needs `onRowDrop`.
|
|
1941
|
+
*/
|
|
1942
|
+
rowDraggable?: boolean | ((row: T) => boolean);
|
|
1943
|
+
/** Whether a dragged row may land `position` `target` (a row never drops into its own branch). */
|
|
1944
|
+
canDrop?: (dragged: T, target: T, position: NiceTreeDropPosition) => boolean;
|
|
1945
|
+
/**
|
|
1946
|
+
* A row dropped on another, by the pointer or the keyboard. The grid does not move it: update
|
|
1947
|
+
* `data`.
|
|
1948
|
+
*/
|
|
1949
|
+
onRowDrop?: (dragKey: string, dropKey: string, position: NiceTreeDropPosition) => void;
|
|
1950
|
+
/**
|
|
1951
|
+
* `'popup'` (1.4.15 — OmniVerk wishlist #4): a double click or F2 on a row opens its values in a
|
|
1952
|
+
* dialog, as in NiceDataGrid (a NiceForm with `formItems`, else fields from the columns); Save
|
|
1953
|
+
* hands them to `onRowEdit`.
|
|
1954
|
+
*/
|
|
1955
|
+
editMode?: 'popup';
|
|
1956
|
+
/** The dialog's fields (default: the visible columns but the key, typed by `dataType`). */
|
|
1957
|
+
formItems?: NiceFormItem[];
|
|
1958
|
+
/** The dialog form's columns (default 2). */
|
|
1959
|
+
formColumns?: number;
|
|
1960
|
+
/** The dialog's title (default "Edit row"). */
|
|
1961
|
+
editFormTitle?: string;
|
|
1962
|
+
/** More props of the dialog's NiceForm. */
|
|
1963
|
+
formProps?: NiceRowEditDialogProps['formProps'];
|
|
1964
|
+
/** A row edited in the dialog. The grid does not change `data` itself. */
|
|
1965
|
+
onRowEdit?: (key: string, row: T) => void;
|
|
1909
1966
|
}
|
|
1910
1967
|
|
|
1911
1968
|
/** A built-in button in the rows of {@link NiceTreeGrid}. */
|
|
@@ -2021,10 +2078,16 @@ export declare interface NiceTreeViewProps extends NiceBaseProps {
|
|
|
2021
2078
|
showLines?: boolean;
|
|
2022
2079
|
/** Show a loading skeleton. */
|
|
2023
2080
|
loading?: boolean;
|
|
2024
|
-
/**
|
|
2081
|
+
/**
|
|
2082
|
+
* Drag-and-drop reordering. Where a node lands follows the pointer (1.4.14): the top quarter of a
|
|
2083
|
+
* row drops before it, the bottom quarter after it, the middle inside it; Ctrl+Shift+↑ / ↓ / → / ←
|
|
2084
|
+
* move the focused node from the keyboard.
|
|
2085
|
+
*/
|
|
2025
2086
|
draggable?: boolean;
|
|
2026
|
-
/** Called after a node is dropped. */
|
|
2027
|
-
onNodeDrop?: (dragKey: string, dropKey: string, position:
|
|
2087
|
+
/** Called after a node is dropped. The tree does not move it: update `nodes`. */
|
|
2088
|
+
onNodeDrop?: (dragKey: string, dropKey: string, position: NiceTreeDropPosition) => void;
|
|
2089
|
+
/** Whether a dragged node may land `position` the target node (never inside its own branch). */
|
|
2090
|
+
canDrop?: (dragKey: string, dropKey: string, position: NiceTreeDropPosition) => boolean;
|
|
2028
2091
|
/** Lazy loading: called when expanding a node with no children and leaf !== true. */
|
|
2029
2092
|
onLoadChildren?: (node: NiceTreeNode) => Promise<NiceTreeNode[]>;
|
|
2030
2093
|
/** Context menu items shown on right-click. */
|