@materialui-reactjs/admin 1.0.6 → 2.0.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.
Files changed (116) hide show
  1. package/CHANGELOG.md +292 -0
  2. package/LICENSE +21 -0
  3. package/README.md +584 -453
  4. package/dist/Common-1GAoFU4L.js +261 -0
  5. package/dist/Common-BBYXssMH.cjs +11 -0
  6. package/dist/Env-DoS-iQjs.cjs +1 -0
  7. package/dist/Env-SHztUA3s.js +16 -0
  8. package/dist/HeaderUpdate-DIwc8EAA.cjs +1 -0
  9. package/dist/{chunks/HeaderUpdate-DuS-gHNR.js → HeaderUpdate-UXncZcAD.js} +8 -4
  10. package/dist/SortableItem-C3KzO8Xh.cjs +1 -0
  11. package/dist/SpinnerLoader-BujLjvC3.cjs +1 -0
  12. package/dist/{chunks/SpinnerLoader-h8RDIarB.js → SpinnerLoader-CyhOQC6d.js} +2 -2
  13. package/dist/UDragFile-BqGt1-gK.js +96 -0
  14. package/dist/UDragFile-oJ05zNLR.cjs +1 -0
  15. package/dist/Validator-BcydBvOg.cjs +1 -0
  16. package/dist/{chunks/Validator-CXYkI7vJ.js → Validator-aKlMgoxl.js} +50 -42
  17. package/dist/assets/css/form.css +1 -1
  18. package/dist/assets/css/index.css +1 -1
  19. package/dist/common-CHDJQ2Ca.cjs +1 -0
  20. package/dist/common-DVWX6AUQ.js +19 -0
  21. package/dist/components/echarts/index.cjs +1 -0
  22. package/dist/components/echarts/index.js +1 -1
  23. package/dist/components/form/AdvancedMultiSelect.d.ts +6 -3
  24. package/dist/components/form/AsxhUImages.d.ts +1 -1
  25. package/dist/components/form/BoxAddRow.d.ts +11 -1
  26. package/dist/components/form/CheckTreeBox.d.ts +12 -3
  27. package/dist/components/form/DateInput.d.ts +2 -1
  28. package/dist/components/form/EfFile.d.ts +2 -1
  29. package/dist/components/form/EfImage.d.ts +1 -1
  30. package/dist/components/form/EfImages.d.ts +1 -1
  31. package/dist/components/form/PImage.d.ts +1 -1
  32. package/dist/components/form/SelectAddRowBox.d.ts +9 -5
  33. package/dist/components/form/UDragFile.d.ts +1 -1
  34. package/dist/components/form/UFile.d.ts +1 -1
  35. package/dist/components/form/UFiles.d.ts +1 -1
  36. package/dist/components/form/UImages.d.ts +1 -1
  37. package/dist/components/form/index.cjs +1 -0
  38. package/dist/components/form/index.js +2 -2
  39. package/dist/components/loader/SpinnerLoader.d.ts +5 -1
  40. package/dist/components/loader/index.cjs +1 -0
  41. package/dist/components/loader/index.js +1 -2
  42. package/dist/components/meta/CardTable.d.ts +7 -3
  43. package/dist/components/meta/CardTable.types.d.ts +51 -0
  44. package/dist/components/meta/CusTooltip.d.ts +1 -1
  45. package/dist/components/meta/Head.d.ts +1 -1
  46. package/dist/components/meta/HeaderUpdate.d.ts +5 -1
  47. package/dist/components/meta/ModalForm.d.ts +41 -11
  48. package/dist/components/meta/Navtabs.d.ts +1 -1
  49. package/dist/components/meta/SearchBox.d.ts +6 -4
  50. package/dist/components/meta/SortableItem.d.ts +1 -1
  51. package/dist/components/meta/index.cjs +1 -0
  52. package/dist/components/meta/index.d.ts +1 -0
  53. package/dist/components/meta/index.js +3 -3
  54. package/dist/components/sidebar/Sidebar.types.d.ts +9 -7
  55. package/dist/components/sidebar/index.cjs +1 -0
  56. package/dist/components/sidebar/index.js +1 -1
  57. package/dist/components/single/Detail.d.ts +8 -3
  58. package/dist/components/single/Fields.d.ts +10 -4
  59. package/dist/components/single/Import.d.ts +8 -3
  60. package/dist/components/single/List.d.ts +18 -3
  61. package/dist/components/single/Update.d.ts +8 -3
  62. package/dist/components/single/UpdateDetail.d.ts +3 -2
  63. package/dist/components/single/UpdateTableDetail.d.ts +3 -3
  64. package/dist/components/single/index.cjs +1 -0
  65. package/dist/components/single/index.js +1 -1
  66. package/dist/components/top-navbar/index.cjs +1 -0
  67. package/dist/components/top-navbar/index.js +78 -2
  68. package/dist/echarts-Dla22xas.cjs +1 -0
  69. package/dist/{chunks/form-CPkpL5eA.js → form-BNAbGCXe.js} +6860 -6794
  70. package/dist/form-DUL_O4IY.cjs +65 -0
  71. package/dist/hook/common.d.ts +65 -0
  72. package/dist/hook/detail.cjs +1 -0
  73. package/dist/hook/detail.d.ts +9 -15
  74. package/dist/hook/detail.js +1 -11
  75. package/dist/hook/fields.cjs +1 -0
  76. package/dist/hook/fields.d.ts +6 -14
  77. package/dist/hook/fields.js +1 -11
  78. package/dist/hook/import.d.ts +6 -11
  79. package/dist/hook/index.cjs +1 -0
  80. package/dist/hook/index.d.ts +28 -20
  81. package/dist/hook/index.js +13 -10
  82. package/dist/hook/update.cjs +1 -0
  83. package/dist/hook/update.d.ts +9 -17
  84. package/dist/hook/update.js +2 -2
  85. package/dist/index.cjs +1 -0
  86. package/dist/index.d.ts +16 -0
  87. package/dist/index.js +14 -11
  88. package/dist/meta-CXHXSPbq.cjs +1 -0
  89. package/dist/{chunks/meta-4qPWijBT.js → meta-Dhll5zt9.js} +45 -39
  90. package/dist/rolldown-runtime-BocRIvOZ.cjs +1 -0
  91. package/dist/{chunks/sidebar-Dj4Xr9du.js → sidebar-CVORMKBY.js} +9 -12
  92. package/dist/sidebar-G5Ody16K.cjs +1 -0
  93. package/dist/{chunks/single-CRF61o_U.js → single-CqD5cgNi.js} +353 -259
  94. package/dist/single-CsUaxEjQ.cjs +1 -0
  95. package/dist/style.cjs +0 -0
  96. package/dist/style.d.ts +0 -0
  97. package/dist/style.js +0 -0
  98. package/dist/types/Menu.d.ts +25 -0
  99. package/dist/utils/Common.d.ts +124 -16
  100. package/dist/utils/CusRoute.d.ts +21 -1
  101. package/dist/utils/Env.d.ts +23 -2
  102. package/dist/utils/Group.d.ts +12 -1
  103. package/dist/utils/Validator.d.ts +34 -12
  104. package/dist/utils/index.cjs +11 -0
  105. package/dist/utils/index.d.ts +2 -1
  106. package/dist/utils/index.js +181 -149
  107. package/package.json +190 -163
  108. package/dist/chunks/Common-BURf0rBN.js +0 -222
  109. package/dist/chunks/Env-DRXhvUcb.js +0 -16
  110. package/dist/chunks/UDragFile-BnUR3riq.js +0 -92
  111. package/dist/chunks/loader-BUiOnhOH.js +0 -1
  112. package/dist/chunks/top-navbar-Bob0gMUh.js +0 -78
  113. package/scripts/postinstall.cjs +0 -80
  114. /package/dist/{chunks/SortableItem-B4-Zsso3.js → SortableItem-B4-Zsso3.js} +0 -0
  115. /package/dist/{chunks/echarts-CRmndsxC.js → echarts-CRmndsxC.js} +0 -0
  116. /package/dist/{components/meta/Pdfviewer.d.ts → hook/import.cjs} +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,292 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.4.0] - 2026-09-27
9
+
10
+ Ba lỗi chặn publish, tìm ra bằng cách **pack thật rồi cài vào một project sạch**
11
+ và typecheck với `skipLibCheck: false`. `npm run typecheck` bên trong repo không
12
+ bắt được loại lỗi này — nó chỉ chứng minh `.d.ts` nhất quán với source.
13
+
14
+ ### Fixed
15
+
16
+ - **Kiểu dùng chung không lấy được từ bất kỳ entry point nào.** `MenuPermissionItem`
17
+ (`types/Menu`) và `TableService` (`CardTable.types`) tồn tại nhưng không được
18
+ re-export: consumer muốn type object `service` mà `CardTable` yêu cầu thì buộc
19
+ phải tự viết lại cấu trúc. Đã export từ `src/index.ts` và `meta/index.ts`;
20
+ đồng thời thêm `hook` + kiểu của `utils` vào entry chính.
21
+ - **`Validator.d.ts` làm vỡ typecheck của consumer.** File này để lộ
22
+ `JQuery<HTMLInputElement>` và `JQuery.Promise<...>` — `@types/jquery` v4 đã bỏ
23
+ cả hai. Thay bằng alias nội bộ `Jq`/`JqPromise`. Lưu ý: phải ép kiểu ngay tại
24
+ `$.Deferred()`, nếu để suy ra thì `dts` vẫn ghi ra `JQuery.Promise`.
25
+ - **`ModalForm.d.ts` rò rỉ kiểu của `bootstrap`**, mà `@types/bootstrap` không
26
+ được khai ở đâu. Consumer phải tự cài thêm chỉ để typecheck. Thay bằng
27
+ interface tối thiểu `ModalInstance { hide(); show() }`.
28
+ - Thêm `*.tgz` vào `.gitignore` (artifact `npm pack` dễ bị commit nhầm).
29
+ - Thêm override `scripts/**` cho ESLint — đó là code Node, không phải browser.
30
+
31
+ ### Added
32
+
33
+ - **`npm run test:consumer`** — consumer smoke test: `npm pack`, cài tarball vào
34
+ thư mục tạm, cài peer deps, rồi `tsc --noEmit` với `skipLibCheck: false` trên
35
+ một file import **mọi** subpath trong `exports` cùng các kiểu dùng chung.
36
+ Chạy trong CI ngay sau `Build`.
37
+
38
+ Đây là gate chống lại đúng loại bug đã xảy ra ở bản này. Ba lỗi trên đều
39
+ lọt qua mọi gate sẵn có và chỉ lộ ra khi dùng thật; giờ nó thành check tự động
40
+ thay vì kiến thức miễng phí trong đầu.
41
+
42
+ ## [2.3.0] - 2026-09-27
43
+
44
+ Test coverage cho nhóm component form, rồi mới xoá `any` — làm đúng thứ tự để
45
+ mọi thay đổi hành vi đều có test bảo vệ.
46
+
47
+ ### Fixed
48
+
49
+ - **`BoxAddRow` rơi vào vòng lặp render vô hạn khi không truyền `data`.**
50
+ Giá trị mặc định `data = []` tạo một mảng **mới ở mỗi lần render**, nên
51
+ `useEffect([data])` luôn thấy tham chiếu khác → gọi `setRows` → render lại →
52
+ lặp lại. Component này sẽ **ăn 100% CPU** ngay khi dùng mà không truyền
53
+ `data`. Sửa bằng hằng `EMPTY_ROWS` ở module scope.
54
+ _(Phát hiện khi test chạy: process Node quay 330s CPU không dừng.)_
55
+ - **`BoxAddRow.addRow` đọc `rows` từ closure** — hai lần bấm trong cùng một batch
56
+ sẽ cùng thấy `rows` cũ và dòng thứ hai ghi đè dòng thứ nhất. Dùng `rowsRef`
57
+ để luôn đọc bản mới nhất, thay vì `setRows(prev => ...)` (bên trong updater
58
+ không được gọi `onChange` vì updater là hàm thuần, React có thể gọi lại).
59
+ - `SelectAddRowBox`: `detailRow` là `null`/`undefined` thì `setDetails` nhận
60
+ `null` vào state mà khai báo là mảng.
61
+
62
+ ### Changed
63
+
64
+ - Xoá `any` trong các component form đã có test: `CheckTreeBox` (thêm export
65
+ `TreeNode`), `AdvancedMultiSelect` (thêm `SelectValue`), `SelectAddRowBox`
66
+ (thêm export `DetailRow`, `rendeRowData` có chữ ký đầy đủ), `EfFile`, `DateInput`,
67
+ `BoxAddRow` (thêm export `Row` + helper `langValue`).
68
+ - `hook/common.ts` thêm `FormChangeHandler` — 8 component form dùng chung kiểu
69
+ này thay cho `(e: any) => void`.
70
+
71
+ ### Tests
72
+
73
+ Thêm 4 file test cho `BoxAddRow`, `AdvancedMultiSelect`, `CheckTreeBox`,
74
+ `SelectAddRowBox`, `DateInput`, `DateTimeInput`, `EfFile`.
75
+ MUI X DatePicker và elFinder (jQuery) được mock — chỉ test logic của component ta.
76
+
77
+ ### Metrics
78
+
79
+ | | Trước | Sau |
80
+ | ------------------- | -----: | ---------: |
81
+ | Coverage statements | 60.65% | **69.16%** |
82
+ | Coverage lines | 63.06% | **71.49%** |
83
+ | Coverage branch | 54.39% | **63.04%** |
84
+ | Test files | 29 | **32** |
85
+ | `any` trong `src` | 230 | **200** |
86
+ | ESLint warnings | 348 | **312** |
87
+
88
+ Còn 2 file runtime chưa có test: `Editor.tsx` (CKEditor + elFinder) và
89
+ `SelectAddRowBoxAdvanced.tsx`.
90
+
91
+ ## [2.2.0] - 2026-09-27
92
+
93
+ Type-safety pass focused on the **public API**. Runtime behaviour is unchanged.
94
+
95
+ ### Added
96
+
97
+ - **`src/hook/common.ts`** — nơi khai báo các kiểu và hàm dùng chung cho mọi
98
+ trang CRUD: `BasePropsType`, `FormValue`, `FormScalar`, `CrudItem`, `ItemState`,
99
+ `getItemId()`, `handleHookChange()`. Bốn file hook (`detail`, `fields`,
100
+ `import`, `update`) trước đây khai báo **bốn bản `PropsType` giống hệt** với
101
+ `menuData: any[]` / `user: any`, và ba bản `handleHookChange` copy-paste.
102
+ - `getItemId()` — đọc `id` an toàn khi `item` là sentinel `false` (nhánh 404).
103
+ `item?.id` không dùng được vì optional chaining không xử lý `false`.
104
+ - `ApiResponse<T>` + **function overloads** cho `callFetchApiToken`. Khi `isTry`
105
+ là `true` (mặc định) hàm luôn ném lỗi và **không bao giờ** trả `false`, nên
106
+ kiểu trả về là `ApiResponse<T>`; chỉ khi truyền `isTry: false` mới phải hẹp
107
+ kiểu trước khi đọc `.data`. Trước đây `any` che mất đúng yêu cầu này.
108
+ - `DateInput`, `StatusOption`, `getStatus()` — định nghĩa cho các helper định
109
+ dạng ngày và bảng trạng thái.
110
+ - `ModalFormProps` / `ModalFormBody` được export (trước: `ModalProps` nội bộ,
111
+ không ai dùng được).
112
+
113
+ ### Changed
114
+
115
+ - **BREAKING (types only):** `ModalForm` đổi từ 9 prop `any` sang kiểu cụ thể
116
+ (`RefObject<HTMLDivElement | null>`, `FormValue`, `React.CSSProperties`...).
117
+ `HeaderUpdate.itemId` thành tuỳ chọn — trang "thêm mới" không có bản ghi.
118
+ - `CusRoute.addGS` nhận `RouteElement = ReactNode | false` thay vì `any = false`.
119
+ - `UpdateDetail.render` / `UpdateTableDetail.render`: bỏ vòng bảo vệ
120
+ `((id && item) || !id) && (...)` trả về `false` — nhánh đó đã bị `Error404`
121
+ ở trên bắt hết, và làm kiểu `render()` không còn hợp lệ.
122
+
123
+ ### Fixed
124
+
125
+ - Gộp 3 bản trùng lặp: `handleHookChange` (3 file → 1), các hàm trạng thái
126
+ `getActiveStatus` / `getPublishStatus` / `getTrueFlaseStatus` (3 bản gần như
127
+ giống hệt → `getStatus`), và 4 hàm `formatDate*` (gom phần tách ngày vào
128
+ `dateParts`). `TableFormBody` nay re-export từ `ModalForm` thay vì định nghĩa
129
+ lại — trước đó chữ ký có thể lệch nhau.
130
+
131
+ ### Metrics
132
+
133
+ `any` trong `src`: **289 → 230** (−20%). ESLint warnings: **420 → 348**.
134
+ Không đổi hành vi runtime; 29/29 test file vẫn pass.
135
+
136
+ Phần còn lại tập trung ở `Validator.ts` (port jQuery, bản chất động) và các
137
+ component form (`SelectBox`, `CusForm`, `AdvancedMultiSelect`, `Editor`...).
138
+
139
+ ## [2.1.1] - 2026-09-27
140
+
141
+ ### Fixed
142
+
143
+ - **`dist/assets/css/index.css` phình từ 1.25 MB lên 27.7 MB.** Bản 2.1.0 bật
144
+ `@import` của `fontawesome-642-pro/css/all.min.css`; file đó khai báo 9 font
145
+ family × (ttf + woff2) và Vite 8 (Rolldown) gom tất cả thành data URI
146
+ base64 — **26.46 MB nhúng trong CSS**. Mọi consumer
147
+ `import "@materialui-reactjs/admin/style.css"` đều phải tải toàn bộ 26 MB đó.
148
+
149
+ Plugin `copy-fontawesome` giờ gỡ các data URI đó sau khi build, thay bằng
150
+ `url("../../fontawesome/webfonts/<file>")` trỏ tới bản font đã được copy sẵn.
151
+ Ánh xạ dựa trên **nội dung** file (khớp base64) nên không phụ thuộc thứ tự hay
152
+ tên file; data URI nào không khớp sẽ được giữ nguyên và build in cảnh báo.
153
+
154
+ Kết quả: `index.css` **27.70 MB → 1.65 MB**, tổng `dist` **42.76 MB → 16.71 MB**.
155
+ Phần còn lại (63 data URI) là sprite PNG/GIF nhỏ của elFinder và
156
+ `material-icons.woff2` — inline là hành vi mong muốn.
157
+
158
+ Ghi chú: `build.assetsInlineLimit` **không dùng được** ở đây; option này không
159
+ được gọi khi Vite 8/Rolldown xử lý `url()` trong CSS (đã thử cả dạng số lẫn
160
+ dạng hàm). Nếu bản Vite sau này hỗ trợ, có thể bỏ bước hậu kỳ này.
161
+
162
+ ## [2.1.0] - 2026-09-27
163
+
164
+ Type-safety pass plus a test-suite expansion. No new features; the public API
165
+ surface is the same, but several public **types** are now stricter, which can
166
+ surface compile errors in consumer code that was relying on `any`.
167
+
168
+ ### Added
169
+
170
+ - **Formatting is now enforced.** `npm run verify` runs
171
+ `format:check → lint → typecheck → test`, and CI gained a dedicated `Format`
172
+ step. Prettier was previously configured but never gated — 78 source files
173
+ failed `prettier --check`, and 36 of 94 mixed tabs and spaces. Everything is
174
+ now formatted, so `format:check` is a real gate rather than decoration.
175
+ - **New shared type modules.** `src/types/Menu.ts` (`MenuPermissionItem`) and
176
+ `src/components/meta/CardTable.types.ts` (`TableService`, `TableOptions`,
177
+ `TableColumnConfig`, `TableFilterConfig`, `TableFormBody`) replace inline
178
+ `any`-typed shapes.
179
+ - Test coverage for `src/components` and the hook/util helpers that previously
180
+ had none: `SingleIndex`, `SingleDetail` / `SingleUpdateDetail` /
181
+ `SingleUpdateTableDetail`, `SingleFields` / `SingleImport`, `CusForm`,
182
+ `SelectBox` / `SelectMBox`, `PImage` / `EfImage` / `EfImages` / `UDragFile`,
183
+ `Sidebar` / `SidebarItem`, all five ECharts wrappers, `ModalForm`, `NavTabs`,
184
+ `TopNavbar`, `BtnGroup`, `HeaderDetail`, `Head`, `PDFEmbed`, `SortableItem`,
185
+ `CusRoute`, and the `detail` / `fields` / `update` hooks. Overall statement
186
+ coverage goes from **32% to 61%** (190 → 386 tests).
187
+
188
+ ### Fixed
189
+
190
+ - **`handleDeleteOne` and `CardTable.handleDelete` used `GET` to delete.**
191
+ `GET` is defined as a safe, idempotent method, so a crawler, browser
192
+ prefetch, or proxy cache could trigger a destructive request. Both now send
193
+ `DELETE`.
194
+ - **`CardTable.handleChange` stored a `Promise` as the table filter.**
195
+ `handleParamChange` is `async` but its result was not awaited, so
196
+ `dataTb.filter` became a `Promise` object and every subsequent request
197
+ (pagination, search) sent the wrong query.
198
+ - **`SearchBox` read a literal `filter?.field` instead of `filter?.[field]`.**
199
+ Because the property name was a string literal, search inputs never showed
200
+ the value they were filtering by.
201
+ - **`RatioKeyVal` generated radio `id`s with `Math.random() % 10`.** With only
202
+ ten possible values, two radios in a group could collide, so `<label
203
+ htmlFor>` pointed at the wrong input and clicking a label selected the wrong
204
+ option; the id also changed on every re-render. Now uses `useId()`.
205
+ - **Empty `FileList` produced `undefined` instead of `null`.**
206
+ `files ? files[0] : null` kept `undefined` for an empty (but truthy)
207
+ `FileList`, and `JSON.stringify` then dropped the key entirely from the
208
+ request payload. Now `files?.[0] ?? null` in the `detail`, `fields` and
209
+ `update` hooks.
210
+ - **`SingleFields` could emit an unhandled promise rejection.** The API call
211
+ lives in a `setState` callback, which React does not await, so the error
212
+ bypassed the `try/catch` in `initDidMount` entirely. It is now caught at the
213
+ call site and surfaced through `showSweetAlertError`.
214
+
215
+ ### Changed
216
+
217
+ - **BREAKING (types only):** public prop/state types no longer carry an
218
+ `[key: string]: any` index signature. `PropsType`, `StateType` and
219
+ `StateTable` in `hook/index`, `CardTableProps`, and `SearchBoxProps` are
220
+ declared field by field, and `SpinnerLoader`'s `loading` prop is now
221
+ optional. Consumer code that passed extra, undeclared props will no longer
222
+ compile.
223
+ - **BREAKING (types only):** `CardTable`'s `frmBody` is now typed as a render
224
+ _function_ — `TableFormBody = (formData, onChange) => ReactNode` — which is
225
+ how `ModalForm` has always invoked it (`frmBody(formData, handleChange)`).
226
+ Passing a plain element crashed with "frmBody is not a function"; existing
227
+ tests missed it because they stubbed `ModalForm` out.
228
+ - `checkPermission` and `menuData` are typed with `MenuPermissionItem`, which
229
+ `MenuItem` now extends. `MenuItem.code` accepts `number | string` because the
230
+ function compares with `Number()` to tolerate string codes from the API.
231
+
232
+ ### Removed
233
+
234
+ - `src/components/meta/Pdfviewer.tsx` — 330 lines that were **entirely
235
+ commented out** and not referenced by any export. It was still typechecked
236
+ and lint-checked on every run for no benefit.
237
+
238
+ ## [2.0.0] - 2026-09-27
239
+
240
+ ### Added
241
+
242
+ - **CommonJS build.** `build.lib.formats` now emits both `es` and `cjs`.
243
+ Every subpath export gains a `require` condition, so the package works in
244
+ CommonJS toolchains (Jest default resolver, webpack 4, legacy Node).
245
+ `main` now points to `./dist/index.cjs`.
246
+ - `exports["./package.json"]` — lets tools such as `jest-resolver` read package
247
+ metadata through the exports map.
248
+ - `LICENSE` (MIT) and this changelog are now published in the tarball.
249
+ - ESLint (flat config) + Prettier, wired into `npm run verify`.
250
+ - GitHub Actions CI running lint → typecheck → test → build.
251
+ - Regression tests for `CardTable` pagination and `SingleUpdate` 403/404
252
+ branches (previously untested).
253
+
254
+ ### Fixed
255
+
256
+ - **DECLARED `ckeditor5` as a dependency.** `Editor.tsx` imports
257
+ `ckeditor5/ckeditor5.css`, but `ckeditor5` was never declared in
258
+ `package.json` — it only resolved because it was hoisted from
259
+ `@ckeditor/ckeditor5-react` → `@ckeditor/ckeditor5-integrations-common`.
260
+ A transitive bump or removal upstream would have broken `Editor` builds for
261
+ every consumer. Now declared as an **optional** peer dependency plus a dev
262
+ dependency for building/testing.
263
+ - **`CardTable` pagination no longer stalls.** `handleClickPage` set the new
264
+ page filter but never re-fetched, and the mount effect is guarded by
265
+ `didFetch.current` — so changing page left the previous rows on screen.
266
+ `fetchData` now accepts an explicit filter to avoid the stale-closure read of
267
+ `dataTb.filter`.
268
+ - `package-lock.json` is no longer git-ignored, so builds are reproducible.
269
+ - `src/service.ts` removed from `.gitignore` (it is source code, not a secret).
270
+
271
+ ### Changed
272
+
273
+ - **BREAKING: CSS is no longer auto-injected into the main entry.** The main
274
+ entry previously imported a ~1.4 MB stylesheet (material-dashboard,
275
+ jquery-ui, elFinder, icon fonts), which every consumer downloaded regardless
276
+ of which components they used.
277
+
278
+ ```diff
279
+ - import "@materialui-reactjs/admin";
280
+ + import "@materialui-reactjs/admin";
281
+ + import "@materialui-reactjs/admin/style.css";
282
+ ```
283
+
284
+ The emitted file path (`dist/assets/css/index.css`) is unchanged, so the
285
+ documented `@materialui-reactjs/admin/style.css` subpath keeps working.
286
+
287
+ - `engines.node` relaxed from `>=24` to `>=20.19.0` (Vite 8's actual floor), so
288
+ the package no longer excludes Node 20/22 LTS.
289
+
290
+ ## [1.0.6]
291
+
292
+ - Initial public release.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 @materialui-reactjs/admin contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.