react-gridix 0.2.1 → 0.2.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 +1 -79
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2122,64 +2122,7 @@ The Styling demo loads Tailwind from its CDN, so it needs an internet connection
|
|
|
2122
2122
|
|
|
2123
2123
|
---
|
|
2124
2124
|
|
|
2125
|
-
## 8.
|
|
2126
|
-
|
|
2127
|
-
### Project layout
|
|
2128
|
-
|
|
2129
|
-
```
|
|
2130
|
-
src/
|
|
2131
|
-
index.ts Public exports
|
|
2132
|
-
components/Checkbox/ Checkbox.tsx, checkbox.css
|
|
2133
|
-
components/DataGrid/
|
|
2134
|
-
DataGrid.tsx The grid (state, rendering, keyboard, selection, server mode, virtualization)
|
|
2135
|
-
types.ts All public types, with doc comments
|
|
2136
|
-
ColumnFilter.tsx The filter indicator and its popup (text, number, date, select)
|
|
2137
|
-
ColumnMenu.tsx The "Columns" show / hide menu
|
|
2138
|
-
Popup.tsx Portal popup used by the two above
|
|
2139
|
-
filters.ts Filter kinds, matching and select options
|
|
2140
|
-
dates.ts Date parsing and formatting helpers
|
|
2141
|
-
csv.ts CSV building and download
|
|
2142
|
-
hooks.ts useControlled and a layout-effect helper
|
|
2143
|
-
paths.ts Dot notation: FieldPath, getByPath, setByPath
|
|
2144
|
-
utils.ts Small helpers
|
|
2145
|
-
datagrid.css Layout and component styles (zero specificity)
|
|
2146
|
-
themes.css The 8 themes
|
|
2147
|
-
demo/ Playground (not published)
|
|
2148
|
-
examples/ One file per demo page
|
|
2149
|
-
vite.config.ts Library build
|
|
2150
|
-
vite.demo.config.ts Playground dev server
|
|
2151
|
-
```
|
|
2152
|
-
|
|
2153
|
-
### Scripts
|
|
2154
|
-
|
|
2155
|
-
| Command | Does |
|
|
2156
|
-
| --- | --- |
|
|
2157
|
-
| `npm run dev` | Starts the demo playground using the library source |
|
|
2158
|
-
| `npm run typecheck` | Runs the TypeScript compiler without emitting files |
|
|
2159
|
-
| `npm run build` | Builds `dist/`: ES module, CommonJS, bundled type definitions and `style.css` |
|
|
2160
|
-
|
|
2161
|
-
### Testing the built package in another app
|
|
2162
|
-
|
|
2163
|
-
```bash
|
|
2164
|
-
npm run build
|
|
2165
|
-
npm pack # creates react-gridix-0.1.0.tgz
|
|
2166
|
-
# in another project:
|
|
2167
|
-
npm install /path/to/react-gridix-0.1.0.tgz
|
|
2168
|
-
```
|
|
2169
|
-
|
|
2170
|
-
### Publishing to npm
|
|
2171
|
-
|
|
2172
|
-
1. Create an npm account, enable two-factor authentication, and run `npm login`.
|
|
2173
|
-
2. Check the name is free with `npm view react-gridix`. If taken, rename the package, for example `@yourname/react-gridix` (scoped packages need `npm publish --access public`).
|
|
2174
|
-
3. In `package.json` fill in `author`, `repository`, `homepage` and `bugs`, and put your name in the `LICENSE` file (it says `YOUR NAME`).
|
|
2175
|
-
4. Run `npm run typecheck` and `npm run build`. `prepublishOnly` runs both automatically on `npm publish`. Confirm `dist/` contains `react-gridix.js`, `react-gridix.cjs`, `index.d.ts` and `style.css`.
|
|
2176
|
-
5. Run `npm publish --dry-run` and check that only `dist/`, `package.json`, `README.md` and `LICENSE` are listed.
|
|
2177
|
-
6. Run `npm publish`.
|
|
2178
|
-
7. For later releases bump the version first (`npm version patch`, `minor` or `major`). npm will not accept the same version twice. This release changes defaults (see [section 10](#10-migrating-from-the-earlier-version)), so a `minor` bump while below 1.0 (or `major` after) is appropriate.
|
|
2179
|
-
|
|
2180
|
-
---
|
|
2181
|
-
|
|
2182
|
-
## 9. Troubleshooting
|
|
2125
|
+
## 8. Troubleshooting
|
|
2183
2126
|
|
|
2184
2127
|
| Problem | Cause and fix |
|
|
2185
2128
|
| --- | --- |
|
|
@@ -2222,27 +2165,6 @@ npm install /path/to/react-gridix-0.1.0.tgz
|
|
|
2222
2165
|
|
|
2223
2166
|
---
|
|
2224
2167
|
|
|
2225
|
-
## 10. Migrating from the earlier version
|
|
2226
|
-
|
|
2227
|
-
### Renamed: react-gridix
|
|
2228
|
-
|
|
2229
|
-
The library is now **`react-gridix`**, and every CSS prefix changed from `rk` to `rg`.
|
|
2230
|
-
|
|
2231
|
-
| Before | Now |
|
|
2232
|
-
| --- | --- |
|
|
2233
|
-
| `npm install react-ui-kit` | `npm install react-gridix` |
|
|
2234
|
-
| `import ... from "react-ui-kit"` | `import ... from "react-gridix"` |
|
|
2235
|
-
| `import "react-ui-kit/style.css"` | `import "react-gridix/style.css"` |
|
|
2236
|
-
| CSS variables `--rk-header-bg`, `--rk-primary`, ... | `--rg-header-bg`, `--rg-primary`, ... |
|
|
2237
|
-
| Classes `.rk-grid__row`, `.rk-checkbox`, ... | `.rg-grid__row`, `.rg-checkbox`, ... |
|
|
2238
|
-
| Theme selector `[data-rk-theme="brand"]` | `[data-rg-theme="brand"]` |
|
|
2239
|
-
|
|
2240
|
-
Search your project's CSS for `rk-` and replace it with `rg-`. A one-line fix in a Unix shell: `sed -i 's/\brk-/rg-/g' src/**/*.css`.
|
|
2241
|
-
|
|
2242
|
-
### Other changes
|
|
2243
|
-
|
|
2244
|
-
Also new in this release: `filterDebounce`, a smaller default checkbox (17px instead of 20px, with a tighter gap and a narrower selection column), a calendar for date cells and date filters, the `sequence` column type, `rowAnimationClassName`, and re-tuned theme colours (stronger header contrast, clearer inputs in the dark themes).
|
|
2245
|
-
|
|
2246
2168
|
### Changed defaults
|
|
2247
2169
|
|
|
2248
2170
|
Three defaults changed so that every feature is opt-in.
|