@nice2dev/ui 1.4.12 → 1.4.14
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 +42 -0
- package/dist/NiceSavedQueryPanel-C1nxEmMu.cjs +587 -0
- package/dist/data/NiceTreeGrid.mjs +619 -545
- 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 +26 -4
- package/dist/index.cjs +21 -21
- package/dist/index.d.ts +96 -4
- package/dist/index.mjs +935 -929
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/dist/NiceSavedQueryPanel-BSZhE-_l.cjs +0 -587
package/dist/data.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./NiceDataGrid-D3qRQSjy.cjs"),e=require("./NiceSavedQueryPanel-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./NiceDataGrid-D3qRQSjy.cjs"),e=require("./NiceSavedQueryPanel-C1nxEmMu.cjs"),r=require("./NicePivotGrid-Cxu5PECg.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
|
@@ -1691,7 +1691,10 @@ declare interface NiceTreeContextMenuItem {
|
|
|
1691
1691
|
disabled?: boolean;
|
|
1692
1692
|
}
|
|
1693
1693
|
|
|
1694
|
-
|
|
1694
|
+
/** Where a dropped row goes relative to the row it is dropped on. */
|
|
1695
|
+
declare type NiceTreeDropPosition = 'before' | 'inside' | 'after';
|
|
1696
|
+
|
|
1697
|
+
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, className, style, id, testId, 'data-testid': dataTestId, accessMode, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: NiceTreeGridProps<T>): default_2.JSX.Element | null;
|
|
1695
1698
|
|
|
1696
1699
|
/** What a `checkedSummary` function of {@link NiceTreeGrid} gets. */
|
|
1697
1700
|
export declare interface NiceTreeGridCheckedSummaryInfo<T = NiceTreeGridNode> {
|
|
@@ -1906,6 +1909,19 @@ export declare interface NiceTreeGridProps<T extends NiceTreeGridNode = NiceTree
|
|
|
1906
1909
|
* no menu.
|
|
1907
1910
|
*/
|
|
1908
1911
|
contextMenuItems?: (row: T) => NiceTreeGridMenuItem[] | undefined;
|
|
1912
|
+
/**
|
|
1913
|
+
* Rows can be dragged onto other rows (1.4.14): `true`, or per row. The pointer picks the spot —
|
|
1914
|
+
* the top quarter of a row drops before it, the bottom quarter after it, the middle inside it —
|
|
1915
|
+
* and Ctrl+Shift+↑ / ↓ / → / ← move the focused row from the keyboard. Needs `onRowDrop`.
|
|
1916
|
+
*/
|
|
1917
|
+
rowDraggable?: boolean | ((row: T) => boolean);
|
|
1918
|
+
/** Whether a dragged row may land `position` `target` (a row never drops into its own branch). */
|
|
1919
|
+
canDrop?: (dragged: T, target: T, position: NiceTreeDropPosition) => boolean;
|
|
1920
|
+
/**
|
|
1921
|
+
* A row dropped on another, by the pointer or the keyboard. The grid does not move it: update
|
|
1922
|
+
* `data`.
|
|
1923
|
+
*/
|
|
1924
|
+
onRowDrop?: (dragKey: string, dropKey: string, position: NiceTreeDropPosition) => void;
|
|
1909
1925
|
}
|
|
1910
1926
|
|
|
1911
1927
|
/** A built-in button in the rows of {@link NiceTreeGrid}. */
|
|
@@ -2021,10 +2037,16 @@ export declare interface NiceTreeViewProps extends NiceBaseProps {
|
|
|
2021
2037
|
showLines?: boolean;
|
|
2022
2038
|
/** Show a loading skeleton. */
|
|
2023
2039
|
loading?: boolean;
|
|
2024
|
-
/**
|
|
2040
|
+
/**
|
|
2041
|
+
* Drag-and-drop reordering. Where a node lands follows the pointer (1.4.14): the top quarter of a
|
|
2042
|
+
* row drops before it, the bottom quarter after it, the middle inside it; Ctrl+Shift+↑ / ↓ / → / ←
|
|
2043
|
+
* move the focused node from the keyboard.
|
|
2044
|
+
*/
|
|
2025
2045
|
draggable?: boolean;
|
|
2026
|
-
/** Called after a node is dropped. */
|
|
2027
|
-
onNodeDrop?: (dragKey: string, dropKey: string, position:
|
|
2046
|
+
/** Called after a node is dropped. The tree does not move it: update `nodes`. */
|
|
2047
|
+
onNodeDrop?: (dragKey: string, dropKey: string, position: NiceTreeDropPosition) => void;
|
|
2048
|
+
/** Whether a dragged node may land `position` the target node (never inside its own branch). */
|
|
2049
|
+
canDrop?: (dragKey: string, dropKey: string, position: NiceTreeDropPosition) => boolean;
|
|
2028
2050
|
/** Lazy loading: called when expanding a node with no children and leaf !== true. */
|
|
2029
2051
|
onLoadChildren?: (node: NiceTreeNode) => Promise<NiceTreeNode[]>;
|
|
2030
2052
|
/** Context menu items shown on right-click. */
|