Skip to content

Commit a78b980

Browse files
committed
docs: changelog files for plugin projects
1 parent 17931a4 commit a78b980

File tree

4 files changed

+81
-8
lines changed

4 files changed

+81
-8
lines changed

packages/plugin-antd/CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@
44

55
## 1.0.0
66

7-
2025-9-15
7+
2025-10-5
88

9-
- 🆕 the first release of `@enum-plus/antd` library
9+
Initial release of `@enum-plus/plugin-antd`.
10+
11+
### ✨ Features
12+
13+
- Ant Design integration for `enum-plus`
14+
- `toSelect(config)`
15+
- Generates `{ value, label }[]` (or custom field names) for `<Select />`
16+
- Supports `firstOption` injection (e.g. “All” / “None”)
17+
- `toMenu()`
18+
- Produces `{ key, label }[]` compatible with `Menu` / `Dropdown`
19+
- `toFilter()`
20+
- Produces `{ text, value }[]` for `Table` column `filters`
21+
- `toValueMap()`
22+
- Generates `Record<EnumValue, { text: string }>` for Ant Design Pro (`ProFormSelect`, `ProTable`, etc.)

packages/plugin-i18next/CHANGELOG.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@
44

55
## 1.0.0
66

7-
2025-9-15
7+
2025-10-5
88

9-
- 🆕 the first release of `@enum-plus/i18next` library
9+
Initial release of `@enum-plus/plugin-i18next`.
10+
11+
### ✨ Features
12+
13+
- Seamless integration of `enum-plus` with `i18next`.
14+
- Global `localize` options:
15+
- `instance`: custom `i18next` instance (defaults to global).
16+
- `tOptions`: static object passed to `i18next.t`.
17+
- Functional `tOptions(key)` returning:
18+
- A dynamic options object, or
19+
- A final translated string (short‑circuit translation).
20+
- Supports enum item `label` fields as i18next keys (e.g. `week.monday`).
21+
- Supports enum type `name` localization key.
22+
23+
### Not Included
24+
25+
- Automatic UI repaint after language change.
26+
27+
> Please consider framework plugins like [@enum-plus/plugin-react](https://www.npmjs.com/package/@enum-plus/plugin-react) / [@enum-plus/plugin-vue](https://www.npmjs.com/package/@enum-plus/plugin-vue).

packages/plugin-react-i18next/CHANGELOG.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@
44

55
## 1.0.0
66

7-
2025-9-15
7+
2025-10-5
88

9-
- 🆕 the first release of `@enum-plus/i18next` library
9+
Initial release of `@enum-plus/plugin-react-i18next`.
10+
11+
### ✨ Features
12+
13+
- Seamless integration between `enum-plus` and `react-i18next`.
14+
- Enum item `label` fields can be i18next localization keys (e.g. `week.monday`).
15+
- Enum type `name` can also be a localization key (e.g. `weekDays.name`).
16+
- Automatic resolution of current language each time a label is accessed (no stale cache).
17+
- Global `localize` configuration:
18+
- `instance`: custom `i18next` instance (falls back to global default).
19+
- `tOptions`: static options object passed to `i18next.t`.
20+
- Functional `tOptions(key)`:
21+
- Return a dynamic options object, OR
22+
- Return a final translated string (short‑circuit translation pipeline).
23+
- Full control over translation logic by returning a string directly in `tOptions`.
24+
25+
### Not Included
26+
27+
- Automatic UI repaint after language change.
28+
29+
> Please consider framework plugins like [@enum-plus/plugin-react](https://www.npmjs.com/package/@enum-plus/plugin-react) / [@enum-plus/plugin-vue](https://www.npmjs.com/package/@enum-plus/plugin-vue).

packages/plugin-react/CHANGELOG.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@
44

55
## 1.0.0
66

7-
2025-9-18
7+
2025-10-5
88

9-
- 🆕 the first release of `@enum-plus/react` library
9+
Initial release of `@enum-plus/plugin-react`.
10+
11+
### ✨ Features
12+
13+
- React integration for `enum-plus` with automatic UI re-render on language change.
14+
- Two install entry points:
15+
- `i18nextPlugin` (uses a provided or global `i18next` instance).
16+
- `reactI18nextPlugin` (uses `useTranslation` hook from `react-i18next`).
17+
- Enum labels & enum name localize to React elements (not plain strings).
18+
- Dynamic translation options via `localize.tOptions`:
19+
- Static object form.
20+
- Function form returning:
21+
- A dynamic options object passed to `i18next.t`, or
22+
- A final translated string (short-circuit).
23+
- Global localization configuration fields:
24+
- `instance` (i18next instance)
25+
- `useTranslation` / `useTranslationOptions`
26+
- `tOptions`
27+
- `defaultSearchField` (for search helpers)
28+
- Search helper APIs for non-string labels:
29+
- `WeekEnum.isMatch(search, item)` (case-insensitive fuzzy match)
30+
- `WeekEnum.isMatchCaseSensitive(search, item)`
31+
- Works seamlessly with enum-generated option arrays (e.g. for `<Select />`).

0 commit comments

Comments
 (0)