@nice2dev/ui 1.4.3 → 1.4.5

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/data.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./NiceDataGrid-CrKDzMM1.cjs"),e=require("./NiceSavedQueryPanel-C5Ab_NWx.cjs"),r=require("./NicePivotGrid-Cnkr9WkC.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./NiceDataGrid-mrnaLHQk.cjs"),e=require("./NiceSavedQueryPanel-U1-yaw-Q.cjs"),r=require("./NicePivotGrid-Cnkr9WkC.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,7 @@ declare interface NiceTreeContextMenuItem {
1691
1691
  disabled?: boolean;
1692
1692
  }
1693
1693
 
1694
- 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, className, style, id, testId, 'data-testid': dataTestId, accessMode, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: NiceTreeGridProps<T>): default_2.JSX.Element | null;
1694
+ 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, className, style, id, testId, 'data-testid': dataTestId, accessMode, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: NiceTreeGridProps<T>): default_2.JSX.Element | null;
1695
1695
 
1696
1696
  /** What a `checkedSummary` function of {@link NiceTreeGrid} gets. */
1697
1697
  export declare interface NiceTreeGridCheckedSummaryInfo<T = NiceTreeGridNode> {
@@ -1720,6 +1720,19 @@ export declare interface NiceTreeGridCheckInfo<T = NiceTreeGridNode> {
1720
1720
  halfCheckedKeys: string[];
1721
1721
  }
1722
1722
 
1723
+ /** An entry of a {@link NiceTreeGridProps.contextMenuItems} menu (1.4.5). */
1724
+ export declare interface NiceTreeGridMenuItem {
1725
+ id: string;
1726
+ label?: default_2.ReactNode;
1727
+ /** NiceIcon name. */
1728
+ icon?: string;
1729
+ disabled?: boolean;
1730
+ danger?: boolean;
1731
+ /** A line between entries instead of an entry. */
1732
+ divider?: boolean;
1733
+ onSelect?: () => void;
1734
+ }
1735
+
1723
1736
  /** A row node in the {@link NiceTreeGrid} (supports index-signature for dynamic fields). */
1724
1737
  export declare interface NiceTreeGridNode {
1725
1738
  [field: string]: unknown;
@@ -1887,6 +1900,12 @@ export declare interface NiceTreeGridProps<T extends NiceTreeGridNode = NiceTree
1887
1900
  toolbar?: default_2.ReactNode;
1888
1901
  /** Called when a row is clicked. */
1889
1902
  onRowClick?: (row: T) => void;
1903
+ /**
1904
+ * A row's context menu (1.4.5): opened by a right click, Shift+F10 or the Menu key on the row;
1905
+ * the arrows move in it, Enter picks, Escape closes it and gives focus back to the row. No items,
1906
+ * no menu.
1907
+ */
1908
+ contextMenuItems?: (row: T) => NiceTreeGridMenuItem[] | undefined;
1890
1909
  }
1891
1910
 
1892
1911
  /** A built-in button in the rows of {@link NiceTreeGrid}. */