@agile-team/mach-table 0.19.0 → 0.19.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agile-team/mach-table",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Enterprise-grade, framework-agnostic TypeScript data grid with virtualization, editing, grouping and extensibility",
5
5
  "keywords": [
6
6
  "data-grid",
@@ -70,5 +70,6 @@
70
70
  "typecheck": "tsc --noEmit",
71
71
  "test": "vitest run",
72
72
  "test:coverage": "vitest run --coverage"
73
- }
73
+ },
74
+ "readme": "<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/ChenyCHENYU/MachTable/main/assets/mach-table-logo.svg\" alt=\"MachTable\" width=\"760\" />\n</p>\n\n# @agile-team/mach-table\n\nEnterprise-grade, framework-independent TypeScript data grid. Zero runtime dependencies, virtualized rows and columns, polished cell/full-row editing, async validation, action columns, change tracking, versioned state and resilient infinite loading.\n\n```bash\npnpm add @agile-team/mach-table\n```\n\n```ts\nimport { createGrid } from \"@agile-team/mach-table\";\nimport \"@agile-team/mach-table/styles/mach-table.css\";\n\nconst api = createGrid(document.querySelector(\"#grid\")!, {\n columnDefs: [\n { field: \"id\", headerName: \"ID\", width: 120 },\n { field: \"name\", headerName: \"Name\", flex: 1, editable: true }\n ],\n rowData: [{ id: \"1\", name: \"MachTable\" }],\n rowKey: \"id\",\n enableColumnResize: true,\n stateKey: \"customer-list\"\n});\n\n// Required for native integrations when the host is removed.\napi.destroy();\n```\n\nComplex business workflows use first-class APIs instead of adapter-specific glue:\n\n```ts\nconst state = api.getState();\nawait api.saveChanges((changes) => orderApi.save(changes));\napi.rollbackChanges();\nconsole.info(api.getDiagnostics());\n\nawait api.applyTransactionAsync({ update: realtimeRows });\napi.applyState(state);\n```\n\n0.19 adds a lower-cost rendering pipeline and a smaller, more discoverable imperative surface without removing the flat 0.x API:\n\n```ts\napi.batch((grid) => {\n grid.rows.apply({ update: changedRows });\n grid.columns.setVisible(\"internalNote\", false);\n grid.refreshCells({ rowIds: changedIds, columns: [\"status\"] });\n});\n\nconsole.info(api.diagnostics.get().updates);\n```\n\nFor very large remote datasets, opt into random-access blocks. Sequential infinite loading remains the compatibility default:\n\n```ts\nconst options = {\n datasource,\n datasourceMode: \"block\" as const,\n datasourceRowCount: 1_000_000,\n blockSize: 200,\n maxBlocksInCache: 12,\n blockPrefetch: 1\n};\n\nawait api.rows.ensureLoaded(40_000, 40_200, { signal });\nconsole.info(api.rows.getCacheSnapshot());\n```\n\nWorker runtime helpers are intentionally split from the default entry:\n\n```ts\nimport { createWorkerDataProcessor, installGridDataWorker } from \"@agile-team/mach-table/worker\";\n```\n\n0.18 added governed runtime APIs, nested filters, named views, conflict-aware saves and performance evidence:\n\n```ts\nconst views = createGridViewManager(api, { scope: \"tenant:user:orders\" });\nawait views.save(\"My pending orders\");\n\nconst result = await api.saveChangesDetailed(orderApi.saveChanges);\nconsole.table(result.failures);\nconsole.table(result.conflicts);\nconsole.info(api.getDiagnostics().performance);\n```\n\n`GridState` v1 inputs migrate to v2 automatically. `GridFeature` manifests can declare `version`, `requires` and `conflicts`; invalid graphs are isolated before setup side effects run. JavaScript/JSON option patches are sanitized from the same metadata registry used by Core and framework adapters.\n\n0.13 added a built-in/headless column workbench and cancellable lazy trees:\n\n```ts\napi.openColumnWorkbench();\nconst columns = api.getColumnWorkbenchItems();\n\nconst treeOptions = {\n treeData: true,\n isTreeRowExpandable: ({ data }) => data.hasChildren,\n loadTreeChildren: ({ data, signal }) => catalogApi.children(data.id, { signal })\n};\n```\n\nXLSX stays outside Core; install `@agile-team/mach-table-xlsx` only on Excel routes.\n\nPolished editing and row actions are built in rather than adapter-specific:\n\n```ts\nimport { rowActionsColumn } from \"@agile-team/mach-table\";\n\nconst options = {\n editType: \"fullRow\" as const,\n columnDefs: [\n { field: \"name\", editable: true },\n { field: \"age\", editable: true, cellEditor: \"number\" },\n rowActionsColumn({ onView, onDelete, overflow: \"drawer\" })\n ]\n};\n```\n\nCell mode remains the default and renders a subtle pencil plus inline confirm/cancel controls. Use `editableIndicator: \"always\" | \"hover\" | \"none\"` to match the page density.\n\n0.14 removes common page glue with automatic GridState persistence, an explicit error overlay, compact row keys and framework-neutral toolbar commands:\n\n```ts\nimport { createMachTableCommands } from \"@agile-team/mach-table\";\n\nconst commands = createMachTableCommands({ getApi: () => api });\ncommands.search(\"pending\");\nawait commands.refresh();\n\napi.setOverlay(\"error\", () => \"Request failed. Please retry.\");\n```\n\n`rowKey: \"id\"` is shorthand for a stable field path; `getRowId` remains available for derived IDs and wins when both are present. `domLayout: \"autoHeight\"` is intended only for small client-side tables—normal virtual layout remains the large-data default.\n\nColumn resizing is deliberately opt-in. Set `enableColumnResize: true`; add `stateKey` to remember the complete workspace, or `columnStateKey` to remember only widths/order/visibility/pinning/sort. Pointer cancellation rolls back, completed drags persist once, and untouched automatic/flex columns remain responsive.\n\nFor framework applications use the official adapters:\n\n- Vue 3: [`@agile-team/mach-table-vue`](https://www.npmjs.com/package/@agile-team/mach-table-vue)\n- React 18+: [`@agile-team/mach-table-react`](https://www.npmjs.com/package/@agile-team/mach-table-react)\n\nDocumentation: [Quick start](https://github.com/ChenyCHENYU/MachTable/blob/main/docs/guide/getting-started.md) · [Enterprise integration](https://github.com/ChenyCHENYU/MachTable/blob/main/docs/guide/enterprise-integration.md) · [API](https://github.com/ChenyCHENYU/MachTable/tree/main/docs/api)\n\n> Overlay strings render as text by default. Prefer HTMLElement factories for rich content; enable `allowUnsafeOverlayHtml` only for fully trusted static markup.\n\nSource-available © ChenyCHENYU (Agile Team). Any use requires prior written authorization. See the [license](https://github.com/ChenyCHENYU/MachTable/blob/main/LICENSE) and [authorization process](https://github.com/ChenyCHENYU/MachTable/blob/main/LICENSING.md).\n"
74
75
  }