@opencorestack/opengridx 0.1.6 → 0.1.7
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 +15 -0
- package/README.md +9 -0
- package/dist/index.d.ts +6 -0
- package/dist/opengridx.es.js +6 -6
- package/dist/opengridx.es.js.map +1 -1
- package/dist/opengridx.umd.js +4 -4
- package/dist/opengridx.umd.js.map +1 -1
- package/docs/API_REFERENCE.md +177 -0
- package/docs/README.md +60 -0
- package/docs/components/cell.md +44 -0
- package/docs/components/column-group-header.md +57 -0
- package/docs/components/column-resize.md +63 -0
- package/docs/components/column-visibility.md +61 -0
- package/docs/components/datagrid.md +70 -0
- package/docs/components/filter-panel.md +26 -0
- package/docs/components/header.md +39 -0
- package/docs/components/pagination.md +34 -0
- package/docs/components/row.md +31 -0
- package/docs/components/toolbar.md +40 -0
- package/docs/components/tooltip.md +68 -0
- package/docs/customization/slots-api.md +227 -0
- package/docs/customization/theming.md +293 -0
- package/docs/features/aggregation-pivot.md +79 -0
- package/docs/features/cell-spanning.md +520 -0
- package/docs/features/clipboard.md +76 -0
- package/docs/features/custom-pagination.md +143 -0
- package/docs/features/data-source.md +72 -0
- package/docs/features/editing-reordering.md +99 -0
- package/docs/features/export-guide.md +434 -0
- package/docs/features/filtering.md +83 -0
- package/docs/features/infinite-scroll.md +87 -0
- package/docs/features/list-view.md +65 -0
- package/docs/features/loading-states.md +68 -0
- package/docs/features/master-detail.md +46 -0
- package/docs/features/pinning.md +67 -0
- package/docs/features/selection.md +70 -0
- package/docs/features/sorting-pagination.md +66 -0
- package/docs/features/state-persistence.md +67 -0
- package/docs/features/tree-data-grouping.md +67 -0
- package/docs/features/virtualization.md +188 -0
- package/docs/roadmap.md +71 -0
- package/lib/components/Cell/Cell.css +119 -0
- package/lib/components/Cell/Cell.tsx +264 -0
- package/lib/components/Cell/GridEditInputCell.css +62 -0
- package/lib/components/Cell/GridEditInputCell.tsx +152 -0
- package/lib/components/ColumnGroupHeader/ColumnGroupHeader.css +67 -0
- package/lib/components/ColumnGroupHeader/ColumnGroupHeader.tsx +220 -0
- package/lib/components/ColumnResizeHandle/ColumnResizeHandle.css +31 -0
- package/lib/components/ColumnResizeHandle/ColumnResizeHandle.tsx +85 -0
- package/lib/components/ColumnVisibilityPanel/ColumnVisibilityPanel.css +137 -0
- package/lib/components/ColumnVisibilityPanel/ColumnVisibilityPanel.tsx +190 -0
- package/lib/components/DataGrid/DataGrid.css +224 -0
- package/lib/components/DataGrid/DataGrid.tsx +2253 -0
- package/lib/components/DetailPanel/DetailPanel.css +36 -0
- package/lib/components/DetailPanel/DetailPanel.tsx +34 -0
- package/lib/components/FilterPanel/FilterPanel.css +196 -0
- package/lib/components/FilterPanel/FilterPanel.tsx +183 -0
- package/lib/components/FilterPanel/index.ts +1 -0
- package/lib/components/Header/ColumnMenu.css +68 -0
- package/lib/components/Header/ColumnMenu.tsx +249 -0
- package/lib/components/Header/Header.css +224 -0
- package/lib/components/Header/Header.tsx +516 -0
- package/lib/components/ListView/ListView.css +112 -0
- package/lib/components/ListView/ListViewRow.tsx +63 -0
- package/lib/components/Pagination/Pagination.css +91 -0
- package/lib/components/Pagination/Pagination.tsx +151 -0
- package/lib/components/QuickFilter/QuickFilter.css +23 -0
- package/lib/components/QuickFilter/QuickFilter.tsx +79 -0
- package/lib/components/Row/Row.css +126 -0
- package/lib/components/Row/Row.tsx +377 -0
- package/lib/components/Skeleton/Skeleton.css +55 -0
- package/lib/components/Skeleton/Skeleton.tsx +22 -0
- package/lib/components/SkeletonRow/SkeletonRow.css +32 -0
- package/lib/components/SkeletonRow/SkeletonRow.tsx +89 -0
- package/lib/components/SkeletonRow/index.ts +1 -0
- package/lib/components/Toolbar/GlobalSearch.css +113 -0
- package/lib/components/Toolbar/GlobalSearch.tsx +120 -0
- package/lib/components/Toolbar/GridToolbar.css +204 -0
- package/lib/components/Toolbar/GridToolbar.tsx +647 -0
- package/lib/components/Toolbar/PivotPanel.css +212 -0
- package/lib/components/Toolbar/PivotPanel.tsx +239 -0
- package/lib/components/Tooltip/Tooltip.css +59 -0
- package/lib/components/Tooltip/Tooltip.tsx +106 -0
- package/lib/components/ui/Button.css +89 -0
- package/lib/components/ui/Button.tsx +39 -0
- package/lib/components/ui/Checkbox.css +71 -0
- package/lib/components/ui/Checkbox.tsx +66 -0
- package/lib/components/ui/DragHandleIcon.css +19 -0
- package/lib/components/ui/DragHandleIcon.tsx +18 -0
- package/lib/components/ui/ExpandIcon.css +38 -0
- package/lib/components/ui/ExpandIcon.tsx +75 -0
- package/lib/components/ui/Input.css +59 -0
- package/lib/components/ui/Input.tsx +45 -0
- package/lib/components/ui/index.ts +15 -0
- package/lib/hooks/core/useDataGrid.ts +392 -0
- package/lib/hooks/core/useGridApiRef.ts +10 -0
- package/lib/hooks/features/useAggregation.ts +143 -0
- package/lib/hooks/features/useGridClipboard.ts +133 -0
- package/lib/hooks/features/useGridDataSource.ts +190 -0
- package/lib/hooks/features/useGridEditing.ts +100 -0
- package/lib/hooks/features/useGridSpanning.ts +349 -0
- package/lib/hooks/features/usePivot.ts +149 -0
- package/lib/hooks/useColumnReorder.ts +114 -0
- package/lib/hooks/useRowGrouping.ts +302 -0
- package/lib/hooks/useRowReorder.ts +83 -0
- package/lib/hooks/useTreeData.ts +323 -0
- package/lib/index.ts +106 -0
- package/lib/state/index.ts +17 -0
- package/lib/state/types.ts +48 -0
- package/lib/state/useGridStateStorage.ts +113 -0
- package/lib/styles/base/reset.css +21 -0
- package/lib/styles/base/variables.css +161 -0
- package/lib/styles/opengridx.css +27 -0
- package/lib/styles/opengridx.css.d.ts +4 -0
- package/lib/theme/DataGridThemeProvider.tsx +276 -0
- package/lib/theme/defaultStyles.ts +0 -0
- package/lib/theme/index.ts +21 -0
- package/lib/theme/presets.ts +148 -0
- package/lib/theme/types.ts +155 -0
- package/lib/types/index.ts +764 -0
- package/lib/utils/export/exportToExcelAdvanced.ts +516 -0
- package/lib/utils/export/index.ts +550 -0
- package/lib/utils/filtering/index.ts +240 -0
- package/lib/utils/pinning/index.ts +282 -0
- package/lib/utils/sorting/index.ts +55 -0
- package/lib/utils/virtualization/index.ts +106 -0
- package/lib/vite-env.d.ts +1 -0
- package/llms.txt +2 -1
- package/package.json +13 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [0.1.7] — March 13, 2026 🐛✨
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **`exportable` Property**: Added `exportable?: boolean` to `GridColDef`. This allows excluding specific columns (like action buttons, menus, or images) from all export formats (CSV, Excel, JSON, and Print).
|
|
12
|
+
- **AI-Native Integration**: The published npm package now includes raw source code (`lib/`) and full documentation (`docs/`). This allows AI agents (Cursor, Windsurf, Copilot) to "see" the implementation patterns and documentation inside `node_modules`, leading to significantly better code generation for downstream users.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- Fixed an issue where the main wrapper `className` would erroneously include extra whitespace (e.g. `ogx `) when no optional classes were active.
|
|
16
|
+
- Fixed an issue where `onRowOrderChange` drag-and-drop visuals didn't actually update in the `EventsDemo` component examples because it was referencing a static array instead of React State.
|
|
17
|
+
- Corrected a TypeScript regression where `headerClassName` comment structure was accidentally broken during the previous update.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- Refined the npm package publication files: `docs/research` and `docs/assets` (large binary images) are now excluded to keep the package size lean while retaining all high-value documentation for humans and AI.
|
|
21
|
+
|
|
22
|
+
|
|
8
23
|
## [0.1.6] — March 12, 2026 🎨
|
|
9
24
|
|
|
10
25
|
### Added
|
package/README.md
CHANGED
|
@@ -77,9 +77,18 @@ export default function App() {
|
|
|
77
77
|
- **Clipboard**: `Ctrl+C` / `Cmd+C` copies selected rows as TSV for Excel/Sheets.
|
|
78
78
|
- **Accessibility**: WCAG 2.1 AA — full ARIA roles and keyboard navigation.
|
|
79
79
|
- **Theming**: CSS variable API with 5 built-in themes + custom theme support.
|
|
80
|
+
- **AI-Native Integration**: Shipped with raw `lib/` source and `docs/` inside the npm package, allowing AI agents (Cursor, Copilot, Windsurf) to flawlessly implement features by "seeing" the internal logic.
|
|
80
81
|
|
|
81
82
|
---
|
|
82
83
|
|
|
84
|
+
## 🤖 AI-Powered Implementation
|
|
85
|
+
|
|
86
|
+
OpenGridX is built for the era of AI-native development. When you install `@opencorestack/opengridx`, we include the full raw source code and markdown documentation in your `node_modules`.
|
|
87
|
+
|
|
88
|
+
This means that **Cursor**, **GitHub Copilot**, **Windsurf**, and other AI agents can read the actual implementation patterns and docs to accurately help you build complex features like server-side tree data or pivot tables without guessing.
|
|
89
|
+
|
|
90
|
+
> **Tip for Cursor/Copilot users:** If your AI is struggling, tell it to "Read the docs and source in `./node_modules/@opencorestack/opengridx/docs`" for instant context.
|
|
91
|
+
|
|
83
92
|
## 📐 API Reference
|
|
84
93
|
|
|
85
94
|
### Core Props
|
package/dist/index.d.ts
CHANGED
|
@@ -540,6 +540,12 @@ export declare interface GridColDef<R extends GridRowModel = GridRowModel> {
|
|
|
540
540
|
* headerClassName: 'my-header'
|
|
541
541
|
*/
|
|
542
542
|
headerClassName?: string;
|
|
543
|
+
/**
|
|
544
|
+
* If false, this column is excluded from all exports (CSV, Excel, JSON, Print).
|
|
545
|
+
* Useful for action columns with buttons.
|
|
546
|
+
* @default true
|
|
547
|
+
*/
|
|
548
|
+
exportable?: boolean;
|
|
543
549
|
}
|
|
544
550
|
|
|
545
551
|
/**
|
package/dist/opengridx.es.js
CHANGED
|
@@ -4051,7 +4051,7 @@ function tl(n) {
|
|
|
4051
4051
|
"div",
|
|
4052
4052
|
{
|
|
4053
4053
|
ref: _n,
|
|
4054
|
-
className:
|
|
4054
|
+
className: ["ogx", Qt, d && "ogx--auto-height", br && "ogx--row-spanning", an && "ogx--list-view"].filter(Boolean).join(" "),
|
|
4055
4055
|
style: {
|
|
4056
4056
|
...Tt,
|
|
4057
4057
|
height: X ?? Tt?.height,
|
|
@@ -5431,7 +5431,7 @@ function ll(n, o, e = {}) {
|
|
|
5431
5431
|
console.warn("No rows to export");
|
|
5432
5432
|
return;
|
|
5433
5433
|
}
|
|
5434
|
-
const u = o.filter((h) => !(h.field === "__check__" || h.field === "__actions__"));
|
|
5434
|
+
const u = o.filter((h) => !(h.exportable === !1 || h.field === "__check__" || h.field === "__actions__"));
|
|
5435
5435
|
let g = "";
|
|
5436
5436
|
if (i) {
|
|
5437
5437
|
const h = u.map((x) => Jt(x.headerName || x.field));
|
|
@@ -5477,7 +5477,7 @@ function sl(n, o, e = {}) {
|
|
|
5477
5477
|
console.warn("No rows to export");
|
|
5478
5478
|
return;
|
|
5479
5479
|
}
|
|
5480
|
-
const u = o.filter((h) => !(h.field === "__check__" || h.field === "__actions__"));
|
|
5480
|
+
const u = o.filter((h) => !(h.exportable === !1 || h.field === "__check__" || h.field === "__actions__"));
|
|
5481
5481
|
let g = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">';
|
|
5482
5482
|
if (g += "<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>", g += `<x:Name>${i}</x:Name>`, g += "<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->", g += '<meta charset="UTF-8"></head><body>', g += '<table border="1">', l && (g += "<thead><tr>", u.forEach((h) => {
|
|
5483
5483
|
g += `<th>${_t(h.headerName || h.field)}</th>`;
|
|
@@ -5514,7 +5514,7 @@ function al(n, o, e = {}) {
|
|
|
5514
5514
|
console.warn("No rows to export");
|
|
5515
5515
|
return;
|
|
5516
5516
|
}
|
|
5517
|
-
const s = o.filter((x) => !(x.field === "__check__" || x.field === "__actions__")), u = d.map((x) => {
|
|
5517
|
+
const s = o.filter((x) => !(x.exportable === !1 || x.field === "__check__" || x.field === "__actions__")), u = d.map((x) => {
|
|
5518
5518
|
const c = {};
|
|
5519
5519
|
return s.forEach((f) => {
|
|
5520
5520
|
let w = x[f.field];
|
|
@@ -5579,7 +5579,7 @@ async function dl(n, o, e) {
|
|
|
5579
5579
|
r.document.body.innerHTML = "<h3>No rows to export</h3>";
|
|
5580
5580
|
return;
|
|
5581
5581
|
}
|
|
5582
|
-
const g = o.filter((c) => !(c.field === "__check__" || c.field === "__actions__"));
|
|
5582
|
+
const g = o.filter((c) => !(c.exportable === !1 || c.field === "__check__" || c.field === "__actions__"));
|
|
5583
5583
|
let h = `
|
|
5584
5584
|
<!DOCTYPE html>
|
|
5585
5585
|
<html>
|
|
@@ -5696,7 +5696,7 @@ async function cl(n, o, e = {}) {
|
|
|
5696
5696
|
} = e, f = (await import("exceljs")).default, w = new f.Workbook();
|
|
5697
5697
|
w.creator = "OpenGridX", w.created = /* @__PURE__ */ new Date();
|
|
5698
5698
|
const m = o.filter(
|
|
5699
|
-
(k) => k.field !== "__check__" && k.field !== "__actions__" && !k.isSpacer
|
|
5699
|
+
(k) => k.exportable !== !1 && k.field !== "__check__" && k.field !== "__actions__" && !k.isSpacer
|
|
5700
5700
|
), N = n, I = c && c.length > 0 ? n.filter((k) => c.includes(k.id)) : n, j = i ?? [{ name: "Data", rows: "all", includeHeaders: !0, includeSummary: !1 }], C = /* @__PURE__ */ new Map();
|
|
5701
5701
|
for (const k of j) {
|
|
5702
5702
|
if ("type" in k && k.type === "summary") {
|