@jielga/tmdatagrid 1.0.0 → 1.0.2
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/README.md +8 -8
- package/dist/index.d.ts +225 -225
- package/dist/index.js +58 -50
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -2
- package/skills/appearance/SKILL.md +322 -0
- package/skills/cell-selection/SKILL.md +240 -0
- package/skills/columns/SKILL.md +261 -86
- package/skills/data/SKILL.md +289 -0
- package/skills/editing/SKILL.md +492 -0
- package/skills/editing/references/editing-api.md +124 -0
- package/skills/editing/references/editors-and-validation.md +198 -0
- package/skills/filtering/SKILL.md +344 -0
- package/skills/getting-started/SKILL.md +48 -27
- package/skills/grouping/SKILL.md +264 -0
- package/skills/options/SKILL.md +31 -20
- package/skills/rows/SKILL.md +369 -0
- package/skills/rows/references/rows-api.md +117 -0
- package/skills/server-side/SKILL.md +7 -7
- package/skills/testing/SKILL.md +12 -12
- package/src/tmdatagrid/TMDataGridContext.ts +2 -2
- package/src/tmdatagrid/components/TMDataGrid.module.css +2 -2
- package/src/tmdatagrid/components/TMDataGrid.tsx +5 -5
- package/src/tmdatagrid/components/TMDataGridCellEditor.tsx +4 -4
- package/src/tmdatagrid/components/TMDataGridColumnsPanel.tsx +2 -2
- package/src/tmdatagrid/components/TMDataGridDetailsColumn.tsx +6 -6
- package/src/tmdatagrid/components/TMDataGridEditActions.tsx +2 -2
- package/src/tmdatagrid/components/TMDataGridEditColumn.tsx +4 -4
- package/src/tmdatagrid/components/TMDataGridEntryRows.tsx +6 -6
- package/src/tmdatagrid/components/TMDataGridFilterPanel.tsx +6 -6
- package/src/tmdatagrid/components/TMDataGridFilterPills.module.css +2 -2
- package/src/tmdatagrid/components/TMDataGridFilterPills.tsx +1 -1
- package/src/tmdatagrid/components/TMDataGridFooter.module.css +1 -1
- package/src/tmdatagrid/components/TMDataGridFooter.tsx +12 -6
- package/src/tmdatagrid/components/TMDataGridGroupColumn.module.css +1 -1
- package/src/tmdatagrid/components/TMDataGridGroupColumn.tsx +5 -5
- package/src/tmdatagrid/components/TMDataGridHeaderCell.module.css +8 -8
- package/src/tmdatagrid/components/TMDataGridHeaderCell.tsx +12 -12
- package/src/tmdatagrid/components/TMDataGridRowNumberColumn.tsx +4 -4
- package/src/tmdatagrid/components/TMDataGridSearch.tsx +5 -5
- package/src/tmdatagrid/components/TMDataGridSelectColumn.tsx +8 -8
- package/src/tmdatagrid/components/TMDataGridTable.module.css +18 -18
- package/src/tmdatagrid/components/TMDataGridTable.tsx +116 -116
- package/src/tmdatagrid/components/TMDataGridToolbar.tsx +5 -5
- package/src/tmdatagrid/components/editors/TMDataGridBooleanEditor.tsx +1 -1
- package/src/tmdatagrid/components/editors/TMDataGridDateEditor.tsx +2 -2
- package/src/tmdatagrid/components/editors/TMDataGridMultiSelectEditor.tsx +1 -1
- package/src/tmdatagrid/components/editors/TMDataGridNumberEditor.tsx +1 -1
- package/src/tmdatagrid/components/editors/TMDataGridSelectEditor.tsx +2 -2
- package/src/tmdatagrid/components/editors/editorShared.ts +3 -3
- package/src/tmdatagrid/components/filters/DgDateRangeFilter.tsx +1 -1
- package/src/tmdatagrid/components/filters/DgRangeSliderFilter.tsx +1 -1
- package/src/tmdatagrid/components/filters/DgTriStateFilter.tsx +1 -1
- package/src/tmdatagrid/components/filters/TMDataGridFilterValueInput.tsx +2 -2
- package/src/tmdatagrid/components/sticky.module.css +8 -8
- package/src/tmdatagrid/core/autosize.ts +4 -4
- package/src/tmdatagrid/core/capabilities.ts +17 -17
- package/src/tmdatagrid/core/cellExport.ts +13 -13
- package/src/tmdatagrid/core/cellNavigation.ts +6 -6
- package/src/tmdatagrid/core/cellRange.ts +4 -4
- package/src/tmdatagrid/core/columnOptions.ts +2 -2
- package/src/tmdatagrid/core/columnOrdering.ts +2 -2
- package/src/tmdatagrid/core/columnUtils.ts +3 -3
- package/src/tmdatagrid/core/editEngine.ts +49 -49
- package/src/tmdatagrid/core/expanding.ts +5 -5
- package/src/tmdatagrid/core/filterControls.ts +5 -5
- package/src/tmdatagrid/core/filterOperators.ts +14 -14
- package/src/tmdatagrid/core/labels.ts +8 -8
- package/src/tmdatagrid/core/matchHighlight.ts +4 -4
- package/src/tmdatagrid/core/persistence.ts +8 -8
- package/src/tmdatagrid/core/quickSearch.ts +8 -8
- package/src/tmdatagrid/core/rowPinning.ts +3 -3
- package/src/tmdatagrid/core/rowSelection.ts +12 -12
- package/src/tmdatagrid/core/sizes.ts +1 -1
- package/src/tmdatagrid/core/summary.ts +3 -3
- package/src/tmdatagrid/useTMDataGrid.tsx +79 -79
- package/skills/features/SKILL.md +0 -352
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ export function Employees({ data }: { data: Employee[] }) {
|
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
Only the parts you render exist, and only the features you enable have state.
|
|
82
|
-
Pagination is opt-in via `enablePagination` (implied by `manualPagination`)
|
|
82
|
+
Pagination is opt-in via `enablePagination` (implied by `manualPagination`) -
|
|
83
83
|
by default every row renders, virtualized. A column that defines no filter
|
|
84
84
|
shows no filter control.
|
|
85
85
|
|
|
@@ -106,7 +106,7 @@ is the demo site that documents it.
|
|
|
106
106
|
|
|
107
107
|
| Path | Contents |
|
|
108
108
|
| ------------------- | ------------------------------------------------------------ |
|
|
109
|
-
| `index.ts` | The public API
|
|
109
|
+
| `index.ts` | The public API - the only entry point the package exposes |
|
|
110
110
|
| `useTMDataGrid.tsx` | The hook that builds the table, and the types it is built on |
|
|
111
111
|
| `core/` | Headless logic: filtering, ordering, persistence, capabilities |
|
|
112
112
|
| `components/` | The React chrome and its co-located CSS modules |
|
|
@@ -117,13 +117,13 @@ The demo site's examples live in [`src/examples/`](src/examples):
|
|
|
117
117
|
|
|
118
118
|
| Path | Contents |
|
|
119
119
|
| ----------------- | -------------------------------------------------------------- |
|
|
120
|
-
| `examplePages.ts` | The tree
|
|
120
|
+
| `examplePages.ts` | The tree - categories, topics, and the prose for every demo |
|
|
121
121
|
| `demos/` | One file per demo: one idea, no headings, no explanation |
|
|
122
122
|
| `data/` | Shared datasets, and the column set for demos about other things |
|
|
123
123
|
| `playground/` | The kitchen sink, every feature at once behind switches |
|
|
124
124
|
|
|
125
125
|
Adding a demo is adding a file under `demos/` and naming it from a topic in
|
|
126
|
-
`examplePages.ts`
|
|
126
|
+
`examplePages.ts` - the registry pairs each module with its own source through
|
|
127
127
|
`import.meta.glob`, so the code on screen cannot drift from the code running.
|
|
128
128
|
[`demos.test.tsx`](src/examples/demos.test.tsx) mounts every registered demo,
|
|
129
129
|
so a demo that stops working fails the suite whether or not it still compiles.
|
|
@@ -138,8 +138,8 @@ npm run test:watch
|
|
|
138
138
|
|
|
139
139
|
## Testing
|
|
140
140
|
|
|
141
|
-
For testing an application that *uses* the grid
|
|
142
|
-
attributes it publishes, and how to drive it from Playwright
|
|
141
|
+
For testing an application that *uses* the grid - the test ids, roles and ARIA
|
|
142
|
+
attributes it publishes, and how to drive it from Playwright - see
|
|
143
143
|
[Testing](src/docs/testing.md). What follows is about this repo's own suite.
|
|
144
144
|
|
|
145
145
|
Vitest with React Testing Library, in jsdom. Tests sit next to the code they
|
|
@@ -149,7 +149,7 @@ out of `src/tmdatagrid/` entirely.
|
|
|
149
149
|
|
|
150
150
|
Two things worth knowing before adding to them:
|
|
151
151
|
|
|
152
|
-
- `vitest.setup.ts` installs what jsdom does not provide
|
|
152
|
+
- `vitest.setup.ts` installs what jsdom does not provide - an in-memory
|
|
153
153
|
`Storage`, `matchMedia`, `ResizeObserver`, and element sizes. The last one
|
|
154
154
|
matters: without a measurable box, the virtualizer renders no rows at all.
|
|
155
155
|
- The Mantine provider in the harness runs with `env="test"`, which disables
|
|
@@ -180,7 +180,7 @@ works everywhere without putting `.js` extensions in the sources.
|
|
|
180
180
|
## Publishing
|
|
181
181
|
|
|
182
182
|
Releases are managed by [Changesets](https://github.com/changesets/changesets).
|
|
183
|
-
Nothing publishes from an ordinary push
|
|
183
|
+
Nothing publishes from an ordinary push - a release happens only when the
|
|
184
184
|
version PR is merged.
|
|
185
185
|
|
|
186
186
|
Describe your change in the same PR that makes it:
|