open-grid 1.1.1 → 1.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +30 -1
  3. package/dist/{OpenGrid-yg4mw6Ge.js → OpenGrid-B0Spm0rU.js} +2777 -1878
  4. package/dist/OpenGrid-CuXj0isp.cjs +97 -0
  5. package/dist/open-grid-react.cjs +1 -1
  6. package/dist/open-grid-react.js +1 -1
  7. package/dist/open-grid-vue.cjs +1 -1
  8. package/dist/open-grid-vue.js +1 -1
  9. package/dist/open-grid.cjs +5 -5
  10. package/dist/open-grid.js +155 -152
  11. package/dist/types/core/CellEditManager.d.ts +2 -0
  12. package/dist/types/core/ChartManager.d.ts +2 -0
  13. package/dist/types/core/ContextMenu.d.ts +5 -1
  14. package/dist/types/core/DetailManager.d.ts +2 -0
  15. package/dist/types/core/ExportManager.d.ts +7 -0
  16. package/dist/types/core/FilterPanel.d.ts +4 -1
  17. package/dist/types/core/FilterSelect.d.ts +4 -1
  18. package/dist/types/core/FindBarManager.d.ts +6 -0
  19. package/dist/types/core/FormulaController.d.ts +2 -0
  20. package/dist/types/core/GridComposer.d.ts +5 -0
  21. package/dist/types/core/GridRenderer.d.ts +3 -0
  22. package/dist/types/core/KeyboardManager.d.ts +2 -0
  23. package/dist/types/core/MutationService.d.ts +2 -0
  24. package/dist/types/core/OpenGrid.d.ts +393 -34
  25. package/dist/types/core/Pagination.d.ts +6 -1
  26. package/dist/types/core/RangeSelectionManager.d.ts +2 -0
  27. package/dist/types/core/SortFilterManager.d.ts +2 -0
  28. package/dist/types/core/WorksheetManager.d.ts +4 -1
  29. package/dist/types/core/detail/DetailGlyph.d.ts +3 -1
  30. package/dist/types/core/i18n/LocaleRegistry.d.ts +0 -0
  31. package/dist/types/core/i18n/interpolate.d.ts +5 -0
  32. package/dist/types/core/i18n/locales/en.d.ts +166 -0
  33. package/dist/types/core/i18n/locales/ko.d.ts +166 -0
  34. package/dist/types/core/i18n/types.d.ts +249 -0
  35. package/dist/types/core/renderers/CellRenderer.d.ts +5 -0
  36. package/dist/types/core/types.d.ts +352 -96
  37. package/dist/types/index.d.ts +22 -0
  38. package/package.json +3 -1
  39. package/dist/OpenGrid-LcZ5iixx.cjs +0 -97
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to OPEN_GRID will be documented in this file.
4
4
 
5
+ ## [1.2.0] - 2026-07-05
6
+
7
+ ### Added
8
+ - **다국어(i18n) — 리소스 분리** / **Internationalization — separated resources.**
9
+ UI 문자열(라벨·aria-label·announce·툴팁·플레이스홀더)을 코어에서 분리해 로케일 카탈로그로 관리.
10
+ `SkinRegistry`/`IconRegistry`와 동형인 `LocaleRegistry`(전역 싱글턴 + 인스턴스별 child 체인 + never-throw 폴백).
11
+ - 옵션: `new OpenGrid(el, { locale: 'en', messages: { ... } })`
12
+ - 메서드: `grid.setLocale('en')` / `grid.getLocale()` / `grid.setMessage(key, value)` / `grid.t(key, params)`
13
+ - 등록: `localeRegistry.register('ja', { ... })`, `OpenGrid.defineLocale(id, messages)`
14
+ - 내장 로케일 `ko`(기본)·`en`. 폴백 체인 = 인스턴스 오버라이드 → 활성 로케일 → ko → 키 원문.
15
+ - `setLocale` 시 상주 크롬(페이지네이션·찾기 바) 재라벨 + 컨텍스트메뉴/필터패널 재구성 + `lang` 속성 갱신 + `localeChange` 이벤트.
16
+ - 공개 export: `LocaleRegistry`/`localeRegistry`/`t` + 타입 `LocaleMessages`/`PartialLocaleMessages`/`LocaleMessageKey`/`MessageValue`.
17
+
18
+ ### Changed
19
+ - **하위호환 보장** — 기본 로케일 `ko` 고정. `locale`/`messages` 미지정 시 렌더 결과는 이전과 동일(byte-identical).
20
+ 개발자 대면 오류 메시지(throw/console)와 숫자·날짜 포맷은 i18n 범위에서 제외(로그 안정성·별도 축).
21
+
22
+ ### Docs
23
+ - **TypeDoc API 문서 파이프라인** — `npm run docs`로 공개 API 문서 생성. 공개 표면에 한·영 병행 JSDoc.
24
+
5
25
  ## [1.1.1] - 2026-07-04
6
26
 
7
27
  ### Added
package/README.md CHANGED
@@ -9,7 +9,7 @@ High-performance, framework-agnostic data grid with virtual scrolling, inline ed
9
9
 
10
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
11
11
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue)](https://www.typescriptlang.org/)
12
- [![npm](https://img.shields.io/badge/npm-1.0.4-orange)](https://www.npmjs.com/package/open-grid)
12
+ [![npm](https://img.shields.io/badge/npm-1.2.0-orange)](https://www.npmjs.com/package/open-grid)
13
13
 
14
14
  📖 **[개발 가이드](https://foxnail.kr/open-grid/demo/v2/guide/index.php)** — 설치부터 고급 API까지 단계별 가이드
15
15
  🔗 **[데모/홈페이지](https://foxnail.kr/open-grid/demo/v2/index.php)**
@@ -28,6 +28,7 @@ High-performance, framework-agnostic data grid with virtual scrolling, inline ed
28
28
  | Column Reorder (drag header, `columnReorder: true`) | ✅ |
29
29
  | Frozen Columns | ✅ |
30
30
  | Row/Column Groups (header merge) | ✅ |
31
+ | Localization / i18n (built-in `ko`·`en`, `setLocale`, custom locales) | ✅ |
31
32
  | Grouping + Summary (SUM/AVG/MIN/MAX/COUNT) | ✅ |
32
33
  | Tree Grid (flat → hierarchy, expand/collapse) | ✅ |
33
34
  | OrgChart (organization chart with theme) | ✅ |
@@ -350,6 +351,34 @@ CSS 변수로 완전한 테마 커스터마이즈 가능:
350
351
  }
351
352
  ```
352
353
 
354
+ ## Localization (i18n)
355
+
356
+ All built-in UI strings — labels, `aria-label`s, live-region announcements, tooltips, placeholders —
357
+ are kept in swappable locale catalogs, separated from the core. Ships with **`ko` (default) and `en`**.
358
+ Existing apps are unaffected: without a `locale`/`messages` option, output is byte-identical to before.
359
+
360
+ ```ts
361
+ import { OpenGrid, localeRegistry } from 'open-grid';
362
+
363
+ // 1) Pick a built-in locale per instance
364
+ const grid = new OpenGrid(el, { columns, locale: 'en' });
365
+
366
+ // 2) Switch at runtime (re-labels chrome, updates the `lang` attribute, emits `localeChange`)
367
+ grid.setLocale('ko');
368
+
369
+ // 3) Override just a few messages for one instance
370
+ new OpenGrid(el, { locale: 'en', messages: { contextMenu: { sortAsc: 'Sort A→Z' } } });
371
+
372
+ // 4) Register a custom locale globally (partial dictionaries are fine — missing keys fall back)
373
+ localeRegistry.register('ja', { contextMenu: { find: '検索' }, pagination: { rowsPerPage: '行/ページ:' } });
374
+ new OpenGrid(el, { locale: 'ja' });
375
+ ```
376
+
377
+ Fallback chain: instance override → active locale → `ko` (complete catalog) → raw key.
378
+ Number/date formatting and developer-facing error messages are intentionally out of scope
379
+ (use `Intl` and keep logs grep-stable). See the
380
+ [Localization guide](https://foxnail.kr/open-grid/demo/v2/guide/index.php) for the full key reference.
381
+
353
382
  ## Changelog
354
383
 
355
384
  ### v0.1.2 (2026-05-30)