@iyulab/flex-table 0.35.0 → 0.36.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/CHANGELOG.md +24 -0
- package/README.md +40 -0
- package/dist/{flex-table-Y4GyDV0Y.js → flex-table-D5FjaSJV.js} +816 -127
- package/dist/flex-table.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/locale.d.ts +32 -0
- package/dist/react.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.36.0] - 2026-09-17
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **The table's own chrome text now goes through a locale namespace.** The filter menus, the
|
|
8
|
+
find-and-replace panel, the column menu and the empty-state message were written in English in the
|
|
9
|
+
source, so an application translated into another language showed thirty-one English strings in
|
|
10
|
+
the middle of its own UI — "Contains", "Starts with", "Match case", "Replace all" and the rest.
|
|
11
|
+
`flexTableLocale` is exported for consumers to register further languages or reword the built-in
|
|
12
|
+
ones:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { flexTableLocale } from '@iyulab/flex-table';
|
|
16
|
+
flexTableLocale.register('ja', { contains: '含む', startsWith: '前方一致' });
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
English and Korean ship with the package; other languages are added the same way. The filter
|
|
20
|
+
operators `AND` and `OR`, and the glyphs standing in for icons, are deliberately left alone —
|
|
21
|
+
they read the same in every language and translating them makes them harder to recognise.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- The package compiles against `ESNext` rather than `ES2021`, matching every sibling package in the
|
|
26
|
+
same family.
|
|
3
27
|
## [0.35.0] - 2026-09-15
|
|
4
28
|
|
|
5
29
|
### Changed
|
package/README.md
CHANGED
|
@@ -409,6 +409,46 @@ package dependency; CSS custom properties are resolved at render time, not impor
|
|
|
409
409
|
| ArrowUp / ArrowDown / Home / End (column menu) | Move between menu items |
|
|
410
410
|
| Escape (column menu) | Close the menu and return focus to its button |
|
|
411
411
|
|
|
412
|
+
## Localization
|
|
413
|
+
|
|
414
|
+
The text the table draws itself — filter menus, the find-and-replace panel, the column menu, the
|
|
415
|
+
empty-state message — resolves through a locale namespace. English and Korean ship with the package
|
|
416
|
+
and follow whatever locale `@iyulab/components` has active:
|
|
417
|
+
|
|
418
|
+
```ts
|
|
419
|
+
import { Locale } from '@iyulab/components';
|
|
420
|
+
|
|
421
|
+
Locale.set('ko'); // the table's own chrome follows
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
Register another language, or reword the built-in strings, through the exported namespace. Partial
|
|
425
|
+
tables are merged, so you only pass the keys you want to change:
|
|
426
|
+
|
|
427
|
+
```ts
|
|
428
|
+
import { flexTableLocale, type FlexTableMessageKey } from '@iyulab/flex-table';
|
|
429
|
+
|
|
430
|
+
flexTableLocale.register('ja', {
|
|
431
|
+
contains: '含む',
|
|
432
|
+
startsWith: '前方一致',
|
|
433
|
+
matchCase: '大文字と小文字を区別',
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
flexTableLocale.register('en', { replaceAll: 'Replace everything' }); // reword one string
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
Keys cover the column header and menu (`showHiddenColumns`, `columnMenu`, `cellActions`,
|
|
440
|
+
`noColumnsDefined`), cell comments (`addCommentPlaceholder`, `cancel`, `save`), the filter panel
|
|
441
|
+
(`clear`, `blankCells`, `emptyOnly`, `nonEmptyOnly`, `blankAll`, `all`, `contains`, `startsWith`,
|
|
442
|
+
`endsWith`, `wildcard`, `searchPlaceholder`, `valuePlaceholder`, `fromPlaceholder`,
|
|
443
|
+
`toPlaceholder`) and find-and-replace (`findPlaceholder`, `findPrevious`, `findNext`, `matchCase`,
|
|
444
|
+
`wholeCell`, `closeFind`, `replaceWithPlaceholder`, `replace`, `replaceAll`). `FlexTableMessageKey`
|
|
445
|
+
is exported, so a missing or misspelled key is a type error rather than a string that silently falls
|
|
446
|
+
back to its own name.
|
|
447
|
+
|
|
448
|
+
The filter operators `AND` and `OR` are not in the table, and neither are the glyphs that stand in
|
|
449
|
+
for icons. They read the same in every language, and translating them makes them harder to
|
|
450
|
+
recognise rather than easier.
|
|
451
|
+
|
|
412
452
|
## Accessibility
|
|
413
453
|
|
|
414
454
|
The baseline is **WCAG 2.2**. The table lists what this package **measures in tests** — it is not a
|