@toolbox-web/grid-react 0.6.0 → 0.8.0

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.
Files changed (105) hide show
  1. package/README.md +158 -2
  2. package/chunks/feature-registry-Y3KvnN54.js +26 -0
  3. package/chunks/multi-sort-Ae2VVdZb.js +3 -0
  4. package/features/clipboard.d.ts +18 -0
  5. package/features/clipboard.d.ts.map +1 -0
  6. package/features/clipboard.js +6 -0
  7. package/features/column-virtualization.d.ts +16 -0
  8. package/features/column-virtualization.d.ts.map +1 -0
  9. package/features/column-virtualization.js +6 -0
  10. package/features/context-menu.d.ts +16 -0
  11. package/features/context-menu.d.ts.map +1 -0
  12. package/features/context-menu.js +6 -0
  13. package/features/editing.d.ts +16 -0
  14. package/features/editing.d.ts.map +1 -0
  15. package/features/editing.js +3 -0
  16. package/features/export.d.ts +16 -0
  17. package/features/export.d.ts.map +1 -0
  18. package/features/export.js +6 -0
  19. package/features/filtering.d.ts +16 -0
  20. package/features/filtering.d.ts.map +1 -0
  21. package/features/filtering.js +6 -0
  22. package/features/grouping-columns.d.ts +16 -0
  23. package/features/grouping-columns.d.ts.map +1 -0
  24. package/features/grouping-columns.js +6 -0
  25. package/features/grouping-rows.d.ts +16 -0
  26. package/features/grouping-rows.d.ts.map +1 -0
  27. package/features/grouping-rows.js +6 -0
  28. package/features/index.d.ts +1 -0
  29. package/features/index.d.ts.map +1 -0
  30. package/features/index.js +22 -0
  31. package/features/master-detail.d.ts +18 -0
  32. package/features/master-detail.d.ts.map +1 -0
  33. package/features/master-detail.js +6 -0
  34. package/features/multi-sort.d.ts +22 -0
  35. package/features/multi-sort.d.ts.map +1 -0
  36. package/features/pinned-columns.d.ts +16 -0
  37. package/features/pinned-columns.d.ts.map +1 -0
  38. package/features/pinned-columns.js +6 -0
  39. package/features/pinned-rows.d.ts +16 -0
  40. package/features/pinned-rows.d.ts.map +1 -0
  41. package/features/pinned-rows.js +6 -0
  42. package/features/pivot.d.ts +16 -0
  43. package/features/pivot.d.ts.map +1 -0
  44. package/features/pivot.js +3 -0
  45. package/features/print.d.ts +16 -0
  46. package/features/print.d.ts.map +1 -0
  47. package/features/print.js +3 -0
  48. package/features/reorder.d.ts +16 -0
  49. package/features/reorder.d.ts.map +1 -0
  50. package/features/reorder.js +6 -0
  51. package/features/responsive.d.ts +16 -0
  52. package/features/responsive.d.ts.map +1 -0
  53. package/features/responsive.js +6 -0
  54. package/features/row-reorder.d.ts +16 -0
  55. package/features/row-reorder.d.ts.map +1 -0
  56. package/features/row-reorder.js +3 -0
  57. package/features/selection.d.ts +16 -0
  58. package/features/selection.d.ts.map +1 -0
  59. package/features/selection.js +3 -0
  60. package/features/server-side.d.ts +16 -0
  61. package/features/server-side.d.ts.map +1 -0
  62. package/features/server-side.js +3 -0
  63. package/features/sorting.d.ts +1 -0
  64. package/features/sorting.d.ts.map +1 -0
  65. package/features/sorting.js +1 -0
  66. package/features/tree.d.ts +16 -0
  67. package/features/tree.d.ts.map +1 -0
  68. package/features/tree.js +6 -0
  69. package/features/undo-redo.d.ts +18 -0
  70. package/features/undo-redo.d.ts.map +1 -0
  71. package/features/undo-redo.js +6 -0
  72. package/features/visibility.d.ts +16 -0
  73. package/features/visibility.d.ts.map +1 -0
  74. package/features/visibility.js +6 -0
  75. package/index.d.ts +6 -3
  76. package/index.d.ts.map +1 -1
  77. package/index.js +625 -430
  78. package/lib/column-shorthand.d.ts +59 -0
  79. package/lib/column-shorthand.d.ts.map +1 -0
  80. package/lib/context-types.d.ts +1 -1
  81. package/lib/data-grid.d.ts +118 -26
  82. package/lib/data-grid.d.ts.map +1 -1
  83. package/lib/event-props.d.ts +305 -0
  84. package/lib/event-props.d.ts.map +1 -0
  85. package/lib/feature-props.d.ts +329 -0
  86. package/lib/feature-props.d.ts.map +1 -0
  87. package/lib/feature-registry.d.ts +56 -0
  88. package/lib/feature-registry.d.ts.map +1 -0
  89. package/lib/grid-column.d.ts +1 -1
  90. package/lib/grid-detail-panel.d.ts +3 -0
  91. package/lib/grid-detail-panel.d.ts.map +1 -1
  92. package/lib/grid-responsive-card.d.ts +3 -0
  93. package/lib/grid-responsive-card.d.ts.map +1 -1
  94. package/lib/grid-type-registry.d.ts +1 -1
  95. package/lib/grid-type-registry.d.ts.map +1 -1
  96. package/lib/react-column-config.d.ts +1 -1
  97. package/lib/react-grid-adapter.d.ts +1 -1
  98. package/lib/react-grid-adapter.d.ts.map +1 -1
  99. package/lib/use-grid-event.d.ts +23 -19
  100. package/lib/use-grid-event.d.ts.map +1 -1
  101. package/lib/use-grid.d.ts +46 -2
  102. package/lib/use-grid.d.ts.map +1 -1
  103. package/lib/use-sync-plugins.d.ts +21 -0
  104. package/lib/use-sync-plugins.d.ts.map +1 -0
  105. package/package.json +11 -1
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Print feature for @toolbox-web/grid-react
3
+ *
4
+ * Import this module to enable the `print` prop on DataGrid.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * import '@toolbox-web/grid-react/features/print';
9
+ *
10
+ * <DataGrid print />
11
+ * ```
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=print.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"print.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/print.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,3 @@
1
+ import { PrintPlugin as e } from "@toolbox-web/grid/plugins/print";
2
+ import { r as t } from "../chunks/feature-registry-Y3KvnN54.js";
3
+ t("print", (r) => r === !0 ? new e() : new e(r ?? void 0));
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Column Reorder feature for @toolbox-web/grid-react
3
+ *
4
+ * Import this module to enable the `reorder` prop on DataGrid.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * import '@toolbox-web/grid-react/features/reorder';
9
+ *
10
+ * <DataGrid reorder />
11
+ * ```
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=reorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reorder.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/reorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,6 @@
1
+ import { ReorderPlugin as o } from "@toolbox-web/grid/plugins/reorder";
2
+ import { r as t } from "../chunks/feature-registry-Y3KvnN54.js";
3
+ t("reorder", (r) => {
4
+ const e = typeof r == "boolean" ? {} : r ?? {};
5
+ return new o(e);
6
+ });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Responsive feature for @toolbox-web/grid-react
3
+ *
4
+ * Import this module to enable the `responsive` prop on DataGrid.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * import '@toolbox-web/grid-react/features/responsive';
9
+ *
10
+ * <DataGrid responsive={{ breakpoint: 700 }} />
11
+ * ```
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=responsive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/responsive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,6 @@
1
+ import { ResponsivePlugin as r } from "@toolbox-web/grid/plugins/responsive";
2
+ import { r as s } from "../chunks/feature-registry-Y3KvnN54.js";
3
+ s("responsive", (e) => {
4
+ const o = typeof e == "boolean" ? {} : e ?? {};
5
+ return new r(o);
6
+ });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Row Reorder feature for @toolbox-web/grid-react
3
+ *
4
+ * Import this module to enable the `rowReorder` prop on DataGrid.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * import '@toolbox-web/grid-react/features/row-reorder';
9
+ *
10
+ * <DataGrid rowReorder />
11
+ * ```
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=row-reorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-reorder.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/row-reorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,3 @@
1
+ import { RowReorderPlugin as e } from "@toolbox-web/grid/plugins/row-reorder";
2
+ import { r as o } from "../chunks/feature-registry-Y3KvnN54.js";
3
+ o("rowReorder", (r) => r === !0 ? new e() : new e(r ?? void 0));
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Selection feature for @toolbox-web/grid-react
3
+ *
4
+ * Import this module to enable the `selection` prop on DataGrid.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * import '@toolbox-web/grid-react/features/selection';
9
+ *
10
+ * <DataGrid selection="range" />
11
+ * ```
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,3 @@
1
+ import { SelectionPlugin as r } from "@toolbox-web/grid/plugins/selection";
2
+ import { r as t } from "../chunks/feature-registry-Y3KvnN54.js";
3
+ t("selection", (e) => e === "cell" || e === "row" || e === "range" ? new r({ mode: e }) : new r(e ?? void 0));
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Server-side feature for @toolbox-web/grid-react
3
+ *
4
+ * Import this module to enable the `serverSide` prop on DataGrid.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * import '@toolbox-web/grid-react/features/server-side';
9
+ *
10
+ * <DataGrid serverSide={{ dataSource: async (params) => fetchData(params) }} />
11
+ * ```
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=server-side.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-side.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/server-side.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,3 @@
1
+ import { ServerSidePlugin as e } from "@toolbox-web/grid/plugins/server-side";
2
+ import { r as i } from "../chunks/feature-registry-Y3KvnN54.js";
3
+ i("serverSide", (r) => new e(r ?? void 0));
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=sorting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sorting.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/sorting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ import "../chunks/multi-sort-Ae2VVdZb.js";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Tree Data feature for @toolbox-web/grid-react
3
+ *
4
+ * Import this module to enable the `tree` prop on DataGrid.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * import '@toolbox-web/grid-react/features/tree';
9
+ *
10
+ * <DataGrid tree={{ childrenField: 'children' }} />
11
+ * ```
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,6 @@
1
+ import { TreePlugin as o } from "@toolbox-web/grid/plugins/tree";
2
+ import { r as t } from "../chunks/feature-registry-Y3KvnN54.js";
3
+ t("tree", (e) => {
4
+ const r = typeof e == "boolean" ? {} : e ?? {};
5
+ return new o(r);
6
+ });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Undo/Redo feature for @toolbox-web/grid-react
3
+ *
4
+ * Import this module to enable the `undoRedo` prop on DataGrid.
5
+ * Requires the editing feature to be enabled.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * import '@toolbox-web/grid-react/features/editing';
10
+ * import '@toolbox-web/grid-react/features/undo-redo';
11
+ *
12
+ * <DataGrid editing="dblclick" undoRedo={{ maxHistorySize: 100 }} />
13
+ * ```
14
+ *
15
+ * @packageDocumentation
16
+ */
17
+ export {};
18
+ //# sourceMappingURL=undo-redo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undo-redo.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/undo-redo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
@@ -0,0 +1,6 @@
1
+ import { UndoRedoPlugin as r } from "@toolbox-web/grid/plugins/undo-redo";
2
+ import { r as t } from "../chunks/feature-registry-Y3KvnN54.js";
3
+ t("undoRedo", (o) => {
4
+ const e = typeof o == "boolean" ? {} : o ?? {};
5
+ return new r(e);
6
+ });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Column Visibility feature for @toolbox-web/grid-react
3
+ *
4
+ * Import this module to enable the `visibility` prop on DataGrid.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * import '@toolbox-web/grid-react/features/visibility';
9
+ *
10
+ * <DataGrid visibility />
11
+ * ```
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=visibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/features/visibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,6 @@
1
+ import { VisibilityPlugin as t } from "@toolbox-web/grid/plugins/visibility";
2
+ import { r as o } from "../chunks/feature-registry-Y3KvnN54.js";
3
+ o("visibility", (i) => {
4
+ const r = typeof i == "boolean" ? {} : i ?? {};
5
+ return new t(r);
6
+ });
package/index.d.ts CHANGED
@@ -1,14 +1,17 @@
1
1
  export { DataGrid } from './lib/data-grid';
2
+ export type { DataGridProps, DataGridRef } from './lib/data-grid';
2
3
  export { GridColumn } from './lib/grid-column';
3
4
  export { GridDetailPanel, type DetailPanelContext, type GridDetailPanelProps } from './lib/grid-detail-panel';
4
5
  export { GridResponsiveCard, type GridResponsiveCardProps, type ResponsiveCardContext, } from './lib/grid-responsive-card';
5
6
  export { GridToolButtons, type GridToolButtonsProps } from './lib/grid-tool-button';
6
7
  export { GridToolPanel, type GridToolPanelProps, type ToolPanelContext } from './lib/grid-tool-panel';
8
+ export type { AllFeatureProps, FeatureProps, SSRProps } from './lib/feature-props';
9
+ export type { ColumnShorthand } from './lib/column-shorthand';
10
+ export type { EventHandler, EventProps } from './lib/event-props';
7
11
  export { GridTypeProvider, useGridTypeDefaults, useTypeDefault, type GridTypeProviderProps, type ReactTypeDefault, type TypeDefaultsMap, } from './lib/grid-type-registry';
8
12
  export type { ReactColumnConfig, ReactGridConfig } from './lib/react-column-config';
9
- export { useGrid } from './lib/use-grid';
13
+ export { useGrid, type ExportMethods, type SelectionMethods, type UseGridReturn } from './lib/use-grid';
10
14
  export { useGridEvent } from './lib/use-grid-event';
11
- export { ReactGridAdapter, getRegisteredFields } from './lib/react-grid-adapter';
15
+ export { ReactGridAdapter } from './lib/react-grid-adapter';
12
16
  export type { GridCellContext, GridDetailContext, GridEditorContext, GridToolPanelContext } from './lib/context-types';
13
- export type { CellRenderContext, ColumnConfig, ColumnEditorContext, GridConfig } from '../../../dist/libs/grid/index.d.ts';
14
17
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../libs/grid-react/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,YAAY,CAAC;AAGpB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,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