@nice2dev/ui 1.3.8 → 1.3.9
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 +70 -0
- package/dist/NiceSavedQueryPanel-B8hVgWR2.cjs +587 -0
- package/dist/NiceSavedQueryPanel-BFtY9GOP.js +6002 -0
- package/dist/NiceTree.doc-AIR9cRQp.js +40 -0
- package/dist/NiceTree.doc-DGrIAx3G.cjs +16 -0
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +146 -12
- package/dist/data.mjs +1 -1
- package/dist/index.cjs +77 -77
- package/dist/index.css +1 -1
- package/dist/index.d.ts +145 -12
- package/dist/index.mjs +1062 -1099
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", n = "NiceTree", t = 'Planned, not built: a tree with `checkable` / `onCheck`. The built controls cover it — NiceTreeGrid `checkable` (columns, cascading checkboxes, informational rows, search) and NiceTreeView `showCheckboxes` with `selectionMode="multiple"`.', c = "display", o = "1.0.0", a = "planned", i = [{ name: "treeData", type: "TreeNode[]", required: !0, description: "Tree data" }, { name: "defaultExpandedKeys", type: "string[]", description: "Default expanded keys" }, { name: "defaultSelectedKeys", type: "string[]", description: "Default selected keys" }, { name: "defaultCheckedKeys", type: "string[]", description: "Default checked keys" }, { name: "checkable", type: "boolean", default: "false", description: "Show checkboxes" }, { name: "selectable", type: "boolean", default: "true", description: "Enable selection" }, { name: "draggable", type: "boolean", default: "false", description: "Enable drag and drop" }, { name: "showLine", type: "boolean", default: "false", description: "Show connection lines" }, { name: "showIcon", type: "boolean", default: "false", description: "Show icons" }, { name: "onSelect", type: "(keys: string[], info: object) => void", description: "Selection callback" }, { name: "onCheck", type: "(keys: string[], info: object) => void", description: "Check callback" }, { name: "onDrop", type: "(info: DropInfo) => void", description: "Drop callback" }], s = [{ title: "Tree", description: "Hierarchical tree", code: `<NiceTree
|
|
2
|
+
treeData={[
|
|
3
|
+
{
|
|
4
|
+
title: 'Parent',
|
|
5
|
+
key: 'parent',
|
|
6
|
+
children: [
|
|
7
|
+
{ title: 'Child 1', key: 'child1' },
|
|
8
|
+
{ title: 'Child 2', key: 'child2' }
|
|
9
|
+
]
|
|
10
|
+
}
|
|
11
|
+
]}
|
|
12
|
+
checkable
|
|
13
|
+
draggable
|
|
14
|
+
showLine
|
|
15
|
+
onSelect={(keys) => console.log('Selected:', keys)}
|
|
16
|
+
/>` }], l = { keyboard: ["Arrow keys to navigate", "Space to check", "Enter to select"], aria: ["Tree role", "Expanded/collapsed state"] }, r = ["NiceTreeGrid", "NiceTreeView", "NiceTreeSelect"], d = {
|
|
17
|
+
$schema: e,
|
|
18
|
+
name: n,
|
|
19
|
+
description: t,
|
|
20
|
+
category: c,
|
|
21
|
+
since: o,
|
|
22
|
+
status: a,
|
|
23
|
+
props: i,
|
|
24
|
+
examples: s,
|
|
25
|
+
accessibility: l,
|
|
26
|
+
seeAlso: r
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
e as $schema,
|
|
30
|
+
l as accessibility,
|
|
31
|
+
c as category,
|
|
32
|
+
d as default,
|
|
33
|
+
t as description,
|
|
34
|
+
s as examples,
|
|
35
|
+
n as name,
|
|
36
|
+
i as props,
|
|
37
|
+
r as seeAlso,
|
|
38
|
+
o as since,
|
|
39
|
+
a as status
|
|
40
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceTree",n='Planned, not built: a tree with `checkable` / `onCheck`. The built controls cover it — NiceTreeGrid `checkable` (columns, cascading checkboxes, informational rows, search) and NiceTreeView `showCheckboxes` with `selectionMode="multiple"`.',c="display",o="1.0.0",a="planned",i=[{name:"treeData",type:"TreeNode[]",required:!0,description:"Tree data"},{name:"defaultExpandedKeys",type:"string[]",description:"Default expanded keys"},{name:"defaultSelectedKeys",type:"string[]",description:"Default selected keys"},{name:"defaultCheckedKeys",type:"string[]",description:"Default checked keys"},{name:"checkable",type:"boolean",default:"false",description:"Show checkboxes"},{name:"selectable",type:"boolean",default:"true",description:"Enable selection"},{name:"draggable",type:"boolean",default:"false",description:"Enable drag and drop"},{name:"showLine",type:"boolean",default:"false",description:"Show connection lines"},{name:"showIcon",type:"boolean",default:"false",description:"Show icons"},{name:"onSelect",type:"(keys: string[], info: object) => void",description:"Selection callback"},{name:"onCheck",type:"(keys: string[], info: object) => void",description:"Check callback"},{name:"onDrop",type:"(info: DropInfo) => void",description:"Drop callback"}],s=[{title:"Tree",description:"Hierarchical tree",code:`<NiceTree
|
|
2
|
+
treeData={[
|
|
3
|
+
{
|
|
4
|
+
title: 'Parent',
|
|
5
|
+
key: 'parent',
|
|
6
|
+
children: [
|
|
7
|
+
{ title: 'Child 1', key: 'child1' },
|
|
8
|
+
{ title: 'Child 2', key: 'child2' }
|
|
9
|
+
]
|
|
10
|
+
}
|
|
11
|
+
]}
|
|
12
|
+
checkable
|
|
13
|
+
draggable
|
|
14
|
+
showLine
|
|
15
|
+
onSelect={(keys) => console.log('Selected:', keys)}
|
|
16
|
+
/>`}],l={keyboard:["Arrow keys to navigate","Space to check","Enter to select"],aria:["Tree role","Expanded/collapsed state"]},r=["NiceTreeGrid","NiceTreeView","NiceTreeSelect"],d={$schema:e,name:t,description:n,category:c,since:o,status:a,props:i,examples:s,accessibility:l,seeAlso:r};exports.$schema=e;exports.accessibility=l;exports.category=c;exports.default=d;exports.description=n;exports.examples=s;exports.name=t;exports.props=i;exports.seeAlso=r;exports.since=o;exports.status=a;
|
package/dist/data.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./NiceDataGrid-C_E6zIGS.cjs"),e=require("./NiceSavedQueryPanel-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./NiceDataGrid-C_E6zIGS.cjs"),e=require("./NiceSavedQueryPanel-B8hVgWR2.cjs"),r=require("./NicePivotGrid-CpsBxUhq.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
|
@@ -7,6 +7,7 @@ import { NiceComponentTutorial } from '@nice2dev/ui-core';
|
|
|
7
7
|
import { NiceDataSource } from '@nice2dev/ui-core';
|
|
8
8
|
import { NiceFilterGroup } from '@nice2dev/ui-core';
|
|
9
9
|
import { NiceSize } from '@nice2dev/ui-core';
|
|
10
|
+
import { NiceStandardProps } from '@nice2dev/ui-core';
|
|
10
11
|
import { ReactNode } from 'react';
|
|
11
12
|
import { RefAttributes } from 'react';
|
|
12
13
|
import { TracelessMode } from '@nice2dev/ui-core';
|
|
@@ -1651,6 +1652,33 @@ export declare interface NiceTileViewProps<T extends NiceTileViewItem = NiceTile
|
|
|
1651
1652
|
emptyText?: string;
|
|
1652
1653
|
}
|
|
1653
1654
|
|
|
1655
|
+
/**
|
|
1656
|
+
* treeCheck — the check state of a tree with cascading checkboxes, shared by NiceTreeGrid,
|
|
1657
|
+
* NiceTreeList and NiceTreeView.
|
|
1658
|
+
*
|
|
1659
|
+
* - A **check node** is a node that can carry a checkbox (`isCheckable`, default true).
|
|
1660
|
+
* - A **check leaf** is a check node without check nodes below it — a module whose children are
|
|
1661
|
+
* only informational rows is a leaf. The check state lives on the leaves; every other node's
|
|
1662
|
+
* state is derived from the leaves below it: checked when all are, indeterminate when some are.
|
|
1663
|
+
* - A node that is **not checkable** never has a checkbox and is never emitted. Above check
|
|
1664
|
+
* nodes (a group header) it is transparent: its ancestors count the leaves below it.
|
|
1665
|
+
* - A **locked** leaf (disabled, or below a disabled node with `inheritDisabled`) keeps its
|
|
1666
|
+
* state when an ancestor is toggled. A parent still shows checked only when all its leaves are,
|
|
1667
|
+
* locked ones included.
|
|
1668
|
+
*
|
|
1669
|
+
* The leaves of every node form one contiguous slice of `index.leaves` (pre-order), so states
|
|
1670
|
+
* and counts are O(1) from a prefix sum; building the index and emitting keys are O(n).
|
|
1671
|
+
*/
|
|
1672
|
+
export declare type NiceTreeCheckState = 'checked' | 'unchecked' | 'indeterminate';
|
|
1673
|
+
|
|
1674
|
+
/**
|
|
1675
|
+
* Which keys a checked tree reports:
|
|
1676
|
+
* - `'all'` — every check node whose leaves are all checked (parents and leaves);
|
|
1677
|
+
* - `'leaves'` — only the checked leaves;
|
|
1678
|
+
* - `'parents'` — the topmost fully checked nodes (a fully checked parent stands for its subtree).
|
|
1679
|
+
*/
|
|
1680
|
+
export declare type NiceTreeCheckStrategy = 'all' | 'leaves' | 'parents';
|
|
1681
|
+
|
|
1654
1682
|
/** A context-menu action for {@link NiceTreeView} nodes. */
|
|
1655
1683
|
declare interface NiceTreeContextMenuItem {
|
|
1656
1684
|
/** Unique key. */
|
|
@@ -1663,16 +1691,31 @@ declare interface NiceTreeContextMenuItem {
|
|
|
1663
1691
|
disabled?: boolean;
|
|
1664
1692
|
}
|
|
1665
1693
|
|
|
1666
|
-
export declare function NiceTreeGrid<T extends NiceTreeGridNode>({ columns, data, keyField, parentKeyField, nested, childrenField, expandedKeys: controlledExpanded, onExpandedChange, defaultExpandAll, sortable, sortField: controlledSortField, sortDirection: controlledSortDir, onSort, selectable, selectedKeys: controlledSelected, onSelectionChange, searchable, searchPlaceholder, striped, compact, size, loading, disabled, readOnly, error, emptyText, toolbar, onRowClick, className, style, }: NiceTreeGridProps<T>): default_2.JSX.Element;
|
|
1694
|
+
export declare function NiceTreeGrid<T extends NiceTreeGridNode>({ columns, data, keyField, parentKeyField, nested, childrenField, expandedKeys: controlledExpanded, defaultExpandedKeys, onExpandedChange, defaultExpandAll, sortable, sortField: controlledSortField, sortDirection: controlledSortDir, onSort, selectable, selectedKeys: controlledSelected, onSelectionChange, checkable, checkedKeys, defaultCheckedKeys, onCheckedChange, checkStrategy, isRowCheckable, isRowDisabled, checkboxPlacement, checkOnRowClick, showCheckedCount, 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, className, style, id, testId, 'data-testid': dataTestId, accessMode, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: NiceTreeGridProps<T>): default_2.JSX.Element | null;
|
|
1695
|
+
|
|
1696
|
+
/** What changed in a {@link NiceTreeGrid} check — the second argument of `onCheckedChange`. */
|
|
1697
|
+
export declare interface NiceTreeGridCheckInfo<T = NiceTreeGridNode> {
|
|
1698
|
+
/** A row's checkbox (or Space / a row click), the header's "select all", or "clear selection". */
|
|
1699
|
+
source: 'row' | 'selectAll' | 'clear';
|
|
1700
|
+
/** Whether rows went on. */
|
|
1701
|
+
checked: boolean;
|
|
1702
|
+
/** The toggled row (source `'row'`). */
|
|
1703
|
+
key?: string;
|
|
1704
|
+
row?: T;
|
|
1705
|
+
/** The checked leaves, whatever `checkStrategy` reports. */
|
|
1706
|
+
leafKeys: string[];
|
|
1707
|
+
/** Rows with checkboxes that are partly checked. */
|
|
1708
|
+
halfCheckedKeys: string[];
|
|
1709
|
+
}
|
|
1667
1710
|
|
|
1668
1711
|
/** A row node in the {@link NiceTreeGrid} (supports index-signature for dynamic fields). */
|
|
1669
1712
|
export declare interface NiceTreeGridNode {
|
|
1670
1713
|
[field: string]: unknown;
|
|
1671
1714
|
}
|
|
1672
1715
|
|
|
1673
|
-
/** Props for the {@link NiceTreeGrid} component — a hierarchical data grid with sorting, selection, search, and NiceDataGrid column features. */
|
|
1674
|
-
export declare interface NiceTreeGridProps<T extends NiceTreeGridNode = NiceTreeGridNode> extends
|
|
1675
|
-
/** Column definitions (reuses NiceDataGridColumn). */
|
|
1716
|
+
/** Props for the {@link NiceTreeGrid} component — a hierarchical data grid with sorting, selection, cascading checkboxes, search, and NiceDataGrid column features. */
|
|
1717
|
+
export declare interface NiceTreeGridProps<T extends NiceTreeGridNode = NiceTreeGridNode> extends NiceStandardProps {
|
|
1718
|
+
/** Column definitions (reuses NiceDataGridColumn). The tree (indent, expander, checkbox) sits in the first one. */
|
|
1676
1719
|
columns?: NiceDataGridColumn<T>[];
|
|
1677
1720
|
/** Row data. */
|
|
1678
1721
|
data?: T[];
|
|
@@ -1686,9 +1729,11 @@ export declare interface NiceTreeGridProps<T extends NiceTreeGridNode = NiceTree
|
|
|
1686
1729
|
childrenField?: string;
|
|
1687
1730
|
/** Currently expanded keys. */
|
|
1688
1731
|
expandedKeys?: string[];
|
|
1689
|
-
/**
|
|
1732
|
+
/** Rows expanded until the user expands or collapses one (uncontrolled). */
|
|
1733
|
+
defaultExpandedKeys?: string[];
|
|
1734
|
+
/** Called when expanded keys change. Not called for the rows a search opens. */
|
|
1690
1735
|
onExpandedChange?: (keys: string[]) => void;
|
|
1691
|
-
/** Expand all nodes by default. */
|
|
1736
|
+
/** Expand all nodes by default — also rows that arrive later, until the user toggles one. */
|
|
1692
1737
|
defaultExpandAll?: boolean;
|
|
1693
1738
|
/** Enable sorting. */
|
|
1694
1739
|
sortable?: boolean;
|
|
@@ -1698,16 +1743,92 @@ export declare interface NiceTreeGridProps<T extends NiceTreeGridNode = NiceTree
|
|
|
1698
1743
|
sortDirection?: SortDirection;
|
|
1699
1744
|
/** Called when sort changes. */
|
|
1700
1745
|
onSort?: (field: string, direction: SortDirection) => void;
|
|
1701
|
-
/**
|
|
1746
|
+
/**
|
|
1747
|
+
* Enable flat row selection: a checkbox per row, no cascade. With `checkable` the checkbox
|
|
1748
|
+
* belongs to the check and a row click toggles this selection (row highlight).
|
|
1749
|
+
*/
|
|
1702
1750
|
selectable?: boolean;
|
|
1703
1751
|
/** Currently selected keys. */
|
|
1704
1752
|
selectedKeys?: Set<string>;
|
|
1705
1753
|
/** Called when selection changes. */
|
|
1706
1754
|
onSelectionChange?: (keys: Set<string>) => void;
|
|
1755
|
+
/**
|
|
1756
|
+
* Cascading checkboxes: checking a parent checks every row below it, a parent shows checked
|
|
1757
|
+
* when all rows below it are and indeterminate when some are.
|
|
1758
|
+
*/
|
|
1759
|
+
checkable?: boolean;
|
|
1760
|
+
/** Checked keys (controlled). A parent key checks its whole subtree. */
|
|
1761
|
+
checkedKeys?: string[];
|
|
1762
|
+
/** Checked keys at mount (uncontrolled). */
|
|
1763
|
+
defaultCheckedKeys?: string[];
|
|
1764
|
+
/** Called with the checked keys (see `checkStrategy`) and what changed. */
|
|
1765
|
+
onCheckedChange?: (keys: string[], info: NiceTreeGridCheckInfo<T>) => void;
|
|
1766
|
+
/**
|
|
1767
|
+
* Which keys `onCheckedChange` reports: `'all'` (default) every fully checked row, parents
|
|
1768
|
+
* included; `'leaves'` only the checked rows with no checkboxes below them; `'parents'` the
|
|
1769
|
+
* topmost fully checked rows. Keys of rows not in `data` are kept.
|
|
1770
|
+
*/
|
|
1771
|
+
checkStrategy?: NiceTreeCheckStrategy;
|
|
1772
|
+
/**
|
|
1773
|
+
* `false` makes a row informational: no checkbox, never reported. Above checkable rows it is a
|
|
1774
|
+
* group header its ancestors count through; below a checkable row (a module's categories) the
|
|
1775
|
+
* checkable row counts as a leaf.
|
|
1776
|
+
*/
|
|
1777
|
+
isRowCheckable?: (row: T) => boolean;
|
|
1778
|
+
/** `true` locks a row and every row below it: their checks keep their state. */
|
|
1779
|
+
isRowDisabled?: (row: T) => boolean;
|
|
1780
|
+
/** Where the checkboxes go: after the expander in the tree column (default) or a column of their own. */
|
|
1781
|
+
checkboxPlacement?: 'tree' | 'column';
|
|
1782
|
+
/** A row click toggles the row's checkbox. */
|
|
1783
|
+
checkOnRowClick?: boolean;
|
|
1784
|
+
/** Show a "checked / total" badge on rows with checkboxes below them. */
|
|
1785
|
+
showCheckedCount?: boolean;
|
|
1786
|
+
/** A "select all" checkbox in the header — while searching, it acts on the results. Default true. */
|
|
1787
|
+
showSelectAll?: boolean;
|
|
1788
|
+
/** Show only the checked rows (controlled). */
|
|
1789
|
+
showOnlyChecked?: boolean;
|
|
1790
|
+
/** Show only the checked rows at mount (uncontrolled). */
|
|
1791
|
+
defaultShowOnlyChecked?: boolean;
|
|
1792
|
+
/** Called when "show selected only" is switched. */
|
|
1793
|
+
onShowOnlyCheckedChange?: (value: boolean) => void;
|
|
1794
|
+
/**
|
|
1795
|
+
* Built-in toolbar buttons: `true` for all that apply (expand all, collapse all and — when
|
|
1796
|
+
* `checkable` — show selected only, clear selection), or a list of them.
|
|
1797
|
+
*/
|
|
1798
|
+
toolbarActions?: boolean | NiceTreeGridToolbarAction[];
|
|
1707
1799
|
/** Show a search box. */
|
|
1708
1800
|
searchable?: boolean;
|
|
1709
1801
|
/** Search input placeholder. */
|
|
1710
1802
|
searchPlaceholder?: string;
|
|
1803
|
+
/** Search text (controlled). */
|
|
1804
|
+
searchText?: string;
|
|
1805
|
+
/** Search text at mount (uncontrolled). */
|
|
1806
|
+
defaultSearchText?: string;
|
|
1807
|
+
/** Called when the search text changes. */
|
|
1808
|
+
onSearchChange?: (text: string) => void;
|
|
1809
|
+
/** Fields the search looks in (default: the visible columns). */
|
|
1810
|
+
searchFields?: string[];
|
|
1811
|
+
/** Own match test, instead of a substring of `searchFields`. */
|
|
1812
|
+
searchFilter?: (row: T, query: string) => boolean;
|
|
1813
|
+
/** A matching row keeps all rows below it, not only the matching ones. */
|
|
1814
|
+
searchKeepDescendants?: boolean;
|
|
1815
|
+
/** Open the rows above every match while searching (default true); the user's own expansion comes back when the search is cleared. */
|
|
1816
|
+
searchAutoExpand?: boolean;
|
|
1817
|
+
/** Mark the matches in columns without a `render` (default true). */
|
|
1818
|
+
highlightMatches?: boolean;
|
|
1819
|
+
/** Extra class name of a row. */
|
|
1820
|
+
rowClassName?: string | ((row: T, index: number) => string | undefined);
|
|
1821
|
+
/** A row's name for its checkbox label (default: its first column's value). */
|
|
1822
|
+
getRowLabel?: (row: T) => string;
|
|
1823
|
+
/**
|
|
1824
|
+
* Render only the rows in view, for thousands of rows. Rows get a fixed height (`rowHeight`)
|
|
1825
|
+
* and long cells are cut with an ellipsis.
|
|
1826
|
+
*/
|
|
1827
|
+
virtualScroll?: boolean;
|
|
1828
|
+
/** Row height in px with `virtualScroll` (default 36). */
|
|
1829
|
+
rowHeight?: number;
|
|
1830
|
+
/** Height of the scrolling body with `virtualScroll` (default 480). */
|
|
1831
|
+
height?: number | string;
|
|
1711
1832
|
/** Alternate row coloring. */
|
|
1712
1833
|
striped?: boolean;
|
|
1713
1834
|
/** Reduced padding. */
|
|
@@ -1730,6 +1851,9 @@ export declare interface NiceTreeGridProps<T extends NiceTreeGridNode = NiceTree
|
|
|
1730
1851
|
onRowClick?: (row: T) => void;
|
|
1731
1852
|
}
|
|
1732
1853
|
|
|
1854
|
+
/** A built-in toolbar button of {@link NiceTreeGrid}. */
|
|
1855
|
+
export declare type NiceTreeGridToolbarAction = 'expandAll' | 'collapseAll' | 'onlyChecked' | 'clearChecked';
|
|
1856
|
+
|
|
1733
1857
|
export declare function NiceTreeList<T extends NiceTreeListNode>({ columns, data, keyField, parentKeyField, expandedKeys: controlledExpanded, onExpandedChange, selectedKeys, onSelectionChange, selectable, sortable, loading, emptyText, className, style, accessMode, id, }: NiceTreeListProps<T>): default_2.JSX.Element | null;
|
|
1734
1858
|
|
|
1735
1859
|
/** A tree-list node for the {@link NiceTreeList} component. */
|
|
@@ -1758,11 +1882,17 @@ export declare interface NiceTreeListProps<T extends NiceTreeListNode = NiceTree
|
|
|
1758
1882
|
expandedKeys?: string[];
|
|
1759
1883
|
/** Called when expanded keys change. */
|
|
1760
1884
|
onExpandedChange?: (keys: string[]) => void;
|
|
1761
|
-
/**
|
|
1885
|
+
/**
|
|
1886
|
+
* Currently selected keys. A parent key selects its whole subtree. The keys handed back are every
|
|
1887
|
+
* fully selected row, parents included, in document order; keys of rows not in `data` are kept.
|
|
1888
|
+
*/
|
|
1762
1889
|
selectedKeys?: string[];
|
|
1763
1890
|
/** Called when selection changes. */
|
|
1764
1891
|
onSelectionChange?: (keys: string[]) => void;
|
|
1765
|
-
/**
|
|
1892
|
+
/**
|
|
1893
|
+
* Enable row selection. Checking a parent row cascades to all its descendants; a parent shows
|
|
1894
|
+
* checked when all its descendants are, indeterminate when some are.
|
|
1895
|
+
*/
|
|
1766
1896
|
selectable?: boolean;
|
|
1767
1897
|
/** Enable column sorting (opt-in per column via `NiceDataGridColumn.sortable`). */
|
|
1768
1898
|
sortable?: boolean;
|
|
@@ -1782,9 +1912,9 @@ declare interface NiceTreeNode {
|
|
|
1782
1912
|
icon?: default_2.ReactNode;
|
|
1783
1913
|
/** Child nodes. */
|
|
1784
1914
|
children?: NiceTreeNode[];
|
|
1785
|
-
/** Disable the node. */
|
|
1915
|
+
/** Disable the node. With cascading checkboxes, its own checkbox keeps its state. */
|
|
1786
1916
|
disabled?: boolean;
|
|
1787
|
-
/**
|
|
1917
|
+
/** Expanded when the tree mounts (uncontrolled `expandedKeys` only). */
|
|
1788
1918
|
expanded?: boolean;
|
|
1789
1919
|
/** If true, children are loaded lazily via onLoadChildren. */
|
|
1790
1920
|
leaf?: boolean;
|
|
@@ -1803,7 +1933,11 @@ export declare interface NiceTreeViewProps extends NiceBaseProps {
|
|
|
1803
1933
|
* a title bar, toolbar or count. Pass any node; omit for no header.
|
|
1804
1934
|
*/
|
|
1805
1935
|
header?: default_2.ReactNode;
|
|
1806
|
-
/**
|
|
1936
|
+
/**
|
|
1937
|
+
* Currently selected node keys. With `showCheckboxes` and `selectionMode="multiple"` the
|
|
1938
|
+
* checkboxes cascade: a parent key checks its subtree, and the keys handed back are every fully
|
|
1939
|
+
* checked node, parents included, in document order.
|
|
1940
|
+
*/
|
|
1807
1941
|
selectedKeys?: string[];
|
|
1808
1942
|
/** Currently expanded node keys. */
|
|
1809
1943
|
expandedKeys?: string[];
|
package/dist/data.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { N as i, a as r, b as s, c as t, d, e as o, f as c, m as N, r as l, w as m } from "./NiceDataGrid-BSaBBoNr.js";
|
|
2
|
-
import { N as u, a as G, b as p, c as S, d as b, e as f, f as C, g, h as w, i as T, j as h, k as v } from "./NiceSavedQueryPanel-
|
|
2
|
+
import { N as u, a as G, b as p, c as S, d as b, e as f, f as C, g, h as w, i as T, j as h, k as v } from "./NiceSavedQueryPanel-BFtY9GOP.js";
|
|
3
3
|
import { N as x, a as V } from "./NicePivotGrid-99ZeQ9j6.js";
|
|
4
4
|
export {
|
|
5
5
|
i as NiceDataGrid,
|