@jh-grid/jhgrid-js 0.1.3 → 0.2.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.
package/README.md CHANGED
@@ -8,26 +8,22 @@ performance, editing, filtering, and frozen columns, running in your browser rig
8
8
 
9
9
  ![JH Grid screenshot](docs/images/jhgrid.png)
10
10
 
11
- > This repository distributes the **pre-built bundle** (`jhgrid.esm.js` / `jhgrid.js` /
12
- > `jhgrid.min.js`) plus its documentation, not the buildable source tree. See [`docs/`](docs/README.md)
13
- > for the full reference.
14
-
15
11
  ---
16
12
 
17
13
  ## Features
18
14
 
19
- - **Canvas rendering + 2D virtualization** smooth at 60/120/144Hz, HiDPI-aware
20
- - **Large-data loading** chunk-based async loading with prefetch & cache
21
- - **Frozen columns & scrollbars** left/right freezing with draggable vertical/horizontal scrollbars
22
- - **Selection & row operations** cell/range selection, single/multi row selection, row drag reorder
23
- - **Editing** inline editing, validation, undo/redo, TSV copy & paste
24
- - **Rich cell types** dropdown, multiselect, checkbox, date, richtext, image, button, plus custom editors/renderers
25
- - **Filtering & sorting** set filter, quick filter, single-column sort
26
- - **CRUD & change tracking** row/column add/delete with diff-based persistence
27
- - **Headers & styling** multi-level headers, conditional row/cell styling
28
- - **State & export** state snapshot/restore, CSV export, print preview
29
- - **i18n & accessibility** KO/JA/ZH localization, ARIA, keyboard navigation, high-contrast support
30
- - **Zero dependencies & theming** fully themeable with no runtime dependencies
15
+ - **Canvas rendering + 2D virtualization** - smooth at 60/120/144Hz, HiDPI-aware
16
+ - **Large-data loading** - chunk-based async loading with prefetch & cache
17
+ - **Frozen columns & scrollbars** - left/right freezing with draggable vertical/horizontal scrollbars
18
+ - **Selection & row operations** - cell/range selection, single/multi row selection, row drag reorder
19
+ - **Editing** - inline editing, validation, undo/redo, TSV copy & paste
20
+ - **Rich cell types** - dropdown, multiselect, checkbox, date, richtext, image, button, plus custom editors/renderers
21
+ - **Filtering & sorting** - set filter, quick filter, single-column sort
22
+ - **CRUD & change tracking** - row/column add/delete with diff-based persistence
23
+ - **Headers & styling** - multi-level headers, conditional row/cell styling
24
+ - **State & export** - state snapshot/restore, CSV export, print preview
25
+ - **i18n & accessibility** - KO/JA/ZH localization, ARIA, keyboard navigation, high-contrast support
26
+ - **Zero dependencies & theming** - fully themeable with no runtime dependencies
31
27
 
32
28
  ---
33
29
 
@@ -48,25 +44,27 @@ The package ships as **ES Modules only** and includes its own TypeScript declara
48
44
  modern Node ESM can consume it directly. CommonJS `require('@jh-grid/jhgrid-js')` is *not* supported; use a
49
45
  dynamic `await import('@jh-grid/jhgrid-js')` if you must load it from a CJS file.
50
46
 
51
- ### Option B: Static ES module (no bundler)
47
+ ### Option B: ES Module (source as-is)
52
48
 
53
- `jhgrid.esm.js` is a single self-contained ES module file: deploy it as-is as a static resource
54
- (e.g. from a Spring Boot static resource path) and import it directly, no build step required:
49
+ No build step or package manager: deploy the source as-is as a static resource and import it as
50
+ an ES Module (e.g. from a Spring Boot static resource path).
55
51
 
56
52
  ```html
57
53
  <script type="module">
58
- import { JHGrid } from '/static/jhgrid.esm.js';
54
+ import { JHGrid } from '/canvas-grid/index.js';
59
55
  </script>
60
56
  ```
61
57
 
62
58
  ### Option C: CDN (single bundled script)
63
59
 
64
- `jhgrid.min.js` is an IIFE build served straight from this repository via jsDelivr, no npm
65
- install required. Everything is exposed on a single global, `JHGrid` (the grid constructor is
60
+ A pre-bundled IIFE build is generated with `npm run build` (`esbuild`, see
61
+ `dist/jhgrid/dist/jhgrid.min.js`) and served straight from GitHub via jsDelivr, no npm publish
62
+ required. Everything is exposed on a single global, `JHGrid` (the grid constructor is
66
63
  `JHGrid.JHGrid`):
67
64
 
68
65
  ```html
69
- <!-- pin an exact tag/commit for production; @latest always serves the latest commit on that branch -->
66
+ <!-- pin an exact tag for production; @latest resolves to the newest git tag -->
67
+ <!-- dist/jhgrid/'s contents are pushed as the repo root, so the CDN path is dist/jhgrid.min.js -->
70
68
  <script src="https://cdn.jsdelivr.net/gh/JH-Grid/JHGrid@latest/dist/jhgrid.min.js"></script>
71
69
  <script>
72
70
  const grid = new JHGrid.JHGrid({
@@ -76,6 +74,10 @@ install required. Everything is exposed on a single global, `JHGrid` (the grid c
76
74
  </script>
77
75
  ```
78
76
 
77
+ Run `npm run build` (minified, for CDN/production) or `npm run build:dev` (unminified, for
78
+ debugging) after changing source files; the `dist/` output must be committed for jsDelivr to
79
+ serve it.
80
+
79
81
  ---
80
82
 
81
83
  ## Quick Start
@@ -149,14 +151,21 @@ const grid = new JHGrid({
149
151
  See [`fetchPage`](docs/api.md#fetchpage-single-callback-alternative) for a single-callback
150
152
  alternative to `fetchMeta`+`fetchData` when your backend already returns both together.
151
153
 
154
+ The kitchen-sink demo exercises every column type, renderer, and callback at once:
155
+
156
+ ```bash
157
+ node demo/server.mjs
158
+ # open http://localhost:8123/
159
+ ```
160
+
152
161
  ---
153
162
 
154
163
  ## Documentation
155
164
 
156
165
  **[Browse the docs online](https://jh-grid.github.io/JHGrid/)**, or read them directly in
157
- [`docs/`](docs/README.md):
166
+ [`docs/`](docs/README.md), since this README stays a quick landing page:
158
167
 
159
- - **[API Reference](docs/api.md)**: every constructor option, the data source interface, pagination, and all public methods
168
+ - **[API Reference](docs/api.md)**: every constructor option, the data source interface, pagination, and all public methods (filtering, sorting, row/column CRUD, editors, export)
160
169
  - **[Theming](docs/theming.md)**: the full theme object, styling with your own CSS via `--jhg-*` custom properties, and canvas motion tuning
161
170
  - **[Interaction Reference](docs/interaction.md)**: every mouse and keyboard interaction
162
171
  - **[Spring Boot Integration](docs/integration.md)**: backend API shape and SQL pagination