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.
- package/CHANGELOG.md +20 -0
- package/README.md +30 -1
- package/dist/{OpenGrid-yg4mw6Ge.js → OpenGrid-B0Spm0rU.js} +2777 -1878
- package/dist/OpenGrid-CuXj0isp.cjs +97 -0
- package/dist/open-grid-react.cjs +1 -1
- package/dist/open-grid-react.js +1 -1
- package/dist/open-grid-vue.cjs +1 -1
- package/dist/open-grid-vue.js +1 -1
- package/dist/open-grid.cjs +5 -5
- package/dist/open-grid.js +155 -152
- package/dist/types/core/CellEditManager.d.ts +2 -0
- package/dist/types/core/ChartManager.d.ts +2 -0
- package/dist/types/core/ContextMenu.d.ts +5 -1
- package/dist/types/core/DetailManager.d.ts +2 -0
- package/dist/types/core/ExportManager.d.ts +7 -0
- package/dist/types/core/FilterPanel.d.ts +4 -1
- package/dist/types/core/FilterSelect.d.ts +4 -1
- package/dist/types/core/FindBarManager.d.ts +6 -0
- package/dist/types/core/FormulaController.d.ts +2 -0
- package/dist/types/core/GridComposer.d.ts +5 -0
- package/dist/types/core/GridRenderer.d.ts +3 -0
- package/dist/types/core/KeyboardManager.d.ts +2 -0
- package/dist/types/core/MutationService.d.ts +2 -0
- package/dist/types/core/OpenGrid.d.ts +393 -34
- package/dist/types/core/Pagination.d.ts +6 -1
- package/dist/types/core/RangeSelectionManager.d.ts +2 -0
- package/dist/types/core/SortFilterManager.d.ts +2 -0
- package/dist/types/core/WorksheetManager.d.ts +4 -1
- package/dist/types/core/detail/DetailGlyph.d.ts +3 -1
- package/dist/types/core/i18n/LocaleRegistry.d.ts +0 -0
- package/dist/types/core/i18n/interpolate.d.ts +5 -0
- package/dist/types/core/i18n/locales/en.d.ts +166 -0
- package/dist/types/core/i18n/locales/ko.d.ts +166 -0
- package/dist/types/core/i18n/types.d.ts +249 -0
- package/dist/types/core/renderers/CellRenderer.d.ts +5 -0
- package/dist/types/core/types.d.ts +352 -96
- package/dist/types/index.d.ts +22 -0
- package/package.json +3 -1
- package/dist/OpenGrid-LcZ5iixx.cjs +0 -97
|
@@ -5,6 +5,8 @@ export interface PageChangeEvent {
|
|
|
5
5
|
totalPages: number;
|
|
6
6
|
}
|
|
7
7
|
export type PageChangeFn = (e: PageChangeEvent) => void;
|
|
8
|
+
/** i18n: 페이지네이션 라벨 해석기(행/페이지·범위 배지·빈 상태). / i18n: pagination label resolver (rows-per-page, range badge, empty). */
|
|
9
|
+
export type PaginationT = (key: string, params?: Record<string, string | number>) => string;
|
|
8
10
|
/**
|
|
9
11
|
* 그리드 하단 페이지네이션 UI + 상태 관리.
|
|
10
12
|
* DataLayer의 _displayIndexes 슬라이싱을 담당.
|
|
@@ -15,7 +17,8 @@ export declare class Pagination {
|
|
|
15
17
|
private _pageSize;
|
|
16
18
|
private _totalRows;
|
|
17
19
|
private _onChange;
|
|
18
|
-
|
|
20
|
+
private _t;
|
|
21
|
+
constructor(container: HTMLElement, pageSize: number, onChange: PageChangeFn, t?: PaginationT);
|
|
19
22
|
get page(): number;
|
|
20
23
|
get pageSize(): number;
|
|
21
24
|
get totalPages(): number;
|
|
@@ -30,5 +33,7 @@ export declare class Pagination {
|
|
|
30
33
|
};
|
|
31
34
|
private _emit;
|
|
32
35
|
private _render;
|
|
36
|
+
/** i18n: 상주 크롬 라벨을 활성 로케일로 다시 그린다(setLocale 경로). / i18n: repaint resident chrome labels in the active locale (setLocale path). */
|
|
37
|
+
refreshLabels(): void;
|
|
33
38
|
destroy(): void;
|
|
34
39
|
}
|
|
@@ -23,6 +23,8 @@ export interface RangeSelectionDeps<T extends Record<string, any>> {
|
|
|
23
23
|
emit: (event: string, ...args: any[]) => void;
|
|
24
24
|
doRender: () => void;
|
|
25
25
|
announce: (msg: string) => void;
|
|
26
|
+
/** i18n: 범위 선택/채우기 announce·aria 해석. / i18n: resolve range selection/fill announce & aria. */
|
|
27
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
26
28
|
hasCellFormula?: (rowId: string, field: string) => boolean;
|
|
27
29
|
offsetFormula?: (rowId: string, field: string, dRow: number, dCol: number) => string;
|
|
28
30
|
setCellFormulaByRowId?: (rowId: string, field: string, formula: string) => void;
|
|
@@ -13,6 +13,8 @@ export interface SortFilterDeps<T extends Record<string, any>> {
|
|
|
13
13
|
renderHeader: () => void;
|
|
14
14
|
doRender: () => void;
|
|
15
15
|
announce: (msg: string) => void;
|
|
16
|
+
/** i18n: 정렬 상태어 + announce 해석. / i18n: resolve sort state words + announce. */
|
|
17
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
16
18
|
emit: (event: string, ...args: any[]) => void;
|
|
17
19
|
/** C0.5/§2.5: 정렬/필터 후 F1 범위 선택을 rowId 집합 기준으로 재투영(해제 아님). */
|
|
18
20
|
onReproject?: () => void;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { ColumnDef, WorksheetState } from './types.js';
|
|
2
2
|
export type SwitchCallback<T> = (name: string, state: WorksheetState<T>) => void;
|
|
3
|
+
/** i18n: 탭 UI aria 해석기(주입 없으면 전역 t). / i18n: tab-UI aria resolver (global t when not injected). */
|
|
4
|
+
export type WorksheetT = (key: string, params?: Record<string, string | number>) => string;
|
|
3
5
|
export declare class WorksheetManager<T extends Record<string, any> = any> {
|
|
4
6
|
private _sheets;
|
|
5
7
|
private _active;
|
|
6
8
|
private _tabBar;
|
|
7
9
|
private _onSwitch;
|
|
8
|
-
|
|
10
|
+
private _t;
|
|
11
|
+
constructor(container: HTMLElement, onSwitch: SwitchCallback<T>, t?: WorksheetT);
|
|
9
12
|
add(name: string, columns?: ColumnDef<T>[], data?: T[]): void;
|
|
10
13
|
remove(name: string): void;
|
|
11
14
|
rename(oldName: string, newName: string): void;
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
* 렌더 배선(GridRenderer expander 셀)이 이 모듈의 순수 함수/상수를 소비해 실제 DOM 속성을 채운다.
|
|
13
13
|
* 이 파일은 DOM 을 만들지 않는다 — 문자열/속성 값만 생성.
|
|
14
14
|
*/
|
|
15
|
+
/** i18n: 글리프 aria/툴팁 로케일 해석기(주입 없으면 전역 t). / i18n: glyph aria/tooltip resolver (global t when not injected). */
|
|
16
|
+
export type DetailGlyphT = (key: string, params?: Record<string, string | number>) => string;
|
|
15
17
|
/** 트리 셰브론(▸/▾)과 충돌하지 않는 전용 글리프(C10 기본값). */
|
|
16
18
|
export declare const DETAIL_GLYPH_COLLAPSED = "\u2295";
|
|
17
19
|
export declare const DETAIL_GLYPH_EXPANDED = "\u2296";
|
|
@@ -32,7 +34,7 @@ export interface DetailGlyphInfo {
|
|
|
32
34
|
* 펼침 여부에 따른 글리프/aria-label/title 조합을 반환한다. 트리 셰브론과 절대 겹치지 않는
|
|
33
35
|
* 문자셋만 사용(C10 R-DETAIL-GLYPH 하드 룰).
|
|
34
36
|
*/
|
|
35
|
-
export declare function getDetailGlyph(expanded: boolean): DetailGlyphInfo;
|
|
37
|
+
export declare function getDetailGlyph(expanded: boolean, t?: DetailGlyphT): DetailGlyphInfo;
|
|
36
38
|
/** NFR-5(1): 마스터 행 `aria-expanded` 값(문자열 — DOM setAttribute 그대로 사용). */
|
|
37
39
|
export declare function getMasterRowAriaExpanded(expanded: boolean): 'true' | 'false';
|
|
38
40
|
/**
|
|
Binary file
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `{name}` 명명 파라미터를 치환한다. `{{`→`{`, `}}`→`}` 이스케이프. 누락 파라미터는 플레이스홀더 유지.
|
|
3
|
+
* / Substitute `{name}` params. Escapes `{{`→`{`, `}}`→`}`. Missing params keep the placeholder.
|
|
4
|
+
*/
|
|
5
|
+
export declare function interpolate(template: string, params?: Readonly<Record<string, string | number>>): string;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { LocaleMeta } from '../types.js';
|
|
2
|
+
/** en 메시지 카탈로그. / en message catalog. */
|
|
3
|
+
export declare const EN_MESSAGES: {
|
|
4
|
+
contextMenu: {
|
|
5
|
+
sortAsc: string;
|
|
6
|
+
sortDesc: string;
|
|
7
|
+
find: string;
|
|
8
|
+
exportExcel: string;
|
|
9
|
+
exportCsv: string;
|
|
10
|
+
print: string;
|
|
11
|
+
};
|
|
12
|
+
filter: {
|
|
13
|
+
title: string;
|
|
14
|
+
opContains: string;
|
|
15
|
+
opEq: string;
|
|
16
|
+
opNe: string;
|
|
17
|
+
opStartsWith: string;
|
|
18
|
+
opEndsWith: string;
|
|
19
|
+
opGt: string;
|
|
20
|
+
opLt: string;
|
|
21
|
+
opGte: string;
|
|
22
|
+
opLte: string;
|
|
23
|
+
valuePlaceholder: string;
|
|
24
|
+
clear: string;
|
|
25
|
+
apply: string;
|
|
26
|
+
legend: string;
|
|
27
|
+
clearAria: string;
|
|
28
|
+
all: string;
|
|
29
|
+
};
|
|
30
|
+
findBar: {
|
|
31
|
+
label: string;
|
|
32
|
+
placeholder: string;
|
|
33
|
+
searchAria: string;
|
|
34
|
+
closeAria: string;
|
|
35
|
+
countBadge: (p: Readonly<Record<string, string | number>>) => string;
|
|
36
|
+
};
|
|
37
|
+
pagination: {
|
|
38
|
+
rowsPerPage: string;
|
|
39
|
+
rangeBadge: string;
|
|
40
|
+
empty: string;
|
|
41
|
+
};
|
|
42
|
+
drag: {
|
|
43
|
+
rowCount: (p: Readonly<Record<string, string | number>>) => string;
|
|
44
|
+
};
|
|
45
|
+
crossGrid: {
|
|
46
|
+
overlayAria: string;
|
|
47
|
+
title: string;
|
|
48
|
+
desc1: string;
|
|
49
|
+
desc2: string;
|
|
50
|
+
emptyOption: string;
|
|
51
|
+
scriptTitle: string;
|
|
52
|
+
copy: string;
|
|
53
|
+
copied: string;
|
|
54
|
+
copyFailed: string;
|
|
55
|
+
cancel: string;
|
|
56
|
+
applyMove: string;
|
|
57
|
+
scriptComment: string;
|
|
58
|
+
};
|
|
59
|
+
shuttle: {
|
|
60
|
+
toRight: string;
|
|
61
|
+
toLeft: string;
|
|
62
|
+
allRight: string;
|
|
63
|
+
allLeft: string;
|
|
64
|
+
};
|
|
65
|
+
tree: {
|
|
66
|
+
collapse: string;
|
|
67
|
+
expand: string;
|
|
68
|
+
};
|
|
69
|
+
detail: {
|
|
70
|
+
glyphLabel: string;
|
|
71
|
+
glyphTooltip: string;
|
|
72
|
+
expandAria: string;
|
|
73
|
+
collapseAria: string;
|
|
74
|
+
expandedAnnounce: string;
|
|
75
|
+
collapsedAnnounce: string;
|
|
76
|
+
collapsedAllAnnounce: string;
|
|
77
|
+
depthLimitOpen: string;
|
|
78
|
+
depthLimitSubgrid: string;
|
|
79
|
+
};
|
|
80
|
+
worksheet: {
|
|
81
|
+
addAria: string;
|
|
82
|
+
};
|
|
83
|
+
editor: {
|
|
84
|
+
datePick: string;
|
|
85
|
+
select: string;
|
|
86
|
+
cellPositionAnnounce: string;
|
|
87
|
+
};
|
|
88
|
+
cell: {
|
|
89
|
+
emptyValue: string;
|
|
90
|
+
revealTooltip: string;
|
|
91
|
+
revealAria: string;
|
|
92
|
+
radioAria: string;
|
|
93
|
+
barcodeAria: string;
|
|
94
|
+
};
|
|
95
|
+
row: {
|
|
96
|
+
selectAllAria: string;
|
|
97
|
+
selectAria: string;
|
|
98
|
+
moveAnnounce: string;
|
|
99
|
+
};
|
|
100
|
+
group: {
|
|
101
|
+
badge: string;
|
|
102
|
+
nullLabel: string;
|
|
103
|
+
};
|
|
104
|
+
pivot: {
|
|
105
|
+
totalLabel: string;
|
|
106
|
+
};
|
|
107
|
+
data: {
|
|
108
|
+
loadedAnnounce: (p: Readonly<Record<string, string | number>>) => string;
|
|
109
|
+
skippedCellsAnnounce: (p: Readonly<Record<string, string | number>>) => string;
|
|
110
|
+
};
|
|
111
|
+
range: {
|
|
112
|
+
selectionAnnounce: string;
|
|
113
|
+
formulaPreserved: (p: Readonly<Record<string, string | number>>) => string;
|
|
114
|
+
fillSkipped: (p: Readonly<Record<string, string | number>>) => string;
|
|
115
|
+
fillHandleAria: string;
|
|
116
|
+
};
|
|
117
|
+
sort: {
|
|
118
|
+
asc: string;
|
|
119
|
+
desc: string;
|
|
120
|
+
none: string;
|
|
121
|
+
announce: string;
|
|
122
|
+
};
|
|
123
|
+
chart: {
|
|
124
|
+
defaultTitle: string;
|
|
125
|
+
badgeSampled: string;
|
|
126
|
+
badgeAggregated: string;
|
|
127
|
+
badgePieFirstSeries: string;
|
|
128
|
+
badgeNegativesAbs: string;
|
|
129
|
+
badgeRangeFallback: string;
|
|
130
|
+
badgeEngineFallback: string;
|
|
131
|
+
announcePrefix: string;
|
|
132
|
+
a11ySummary: string;
|
|
133
|
+
a11ySummaryNoTitle: string;
|
|
134
|
+
a11yAltText: string;
|
|
135
|
+
a11yNoData: string;
|
|
136
|
+
tooltipEmpty: string;
|
|
137
|
+
canvasDefault: string;
|
|
138
|
+
};
|
|
139
|
+
formulaError: {
|
|
140
|
+
err: string;
|
|
141
|
+
ref: string;
|
|
142
|
+
cycle: string;
|
|
143
|
+
div0: string;
|
|
144
|
+
name: string;
|
|
145
|
+
value: string;
|
|
146
|
+
num: string;
|
|
147
|
+
fallback: string;
|
|
148
|
+
};
|
|
149
|
+
formula: {
|
|
150
|
+
cellErrorAnnounce: string;
|
|
151
|
+
ariaError: string;
|
|
152
|
+
ariaValue: string;
|
|
153
|
+
approxSuffix: string;
|
|
154
|
+
};
|
|
155
|
+
grid: {
|
|
156
|
+
containerAria: string;
|
|
157
|
+
emptyMessage: string;
|
|
158
|
+
filterTooltip: string;
|
|
159
|
+
detailRegion: string;
|
|
160
|
+
};
|
|
161
|
+
export: {
|
|
162
|
+
printSummary: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
/** en 포맷 메타. / en format meta. */
|
|
166
|
+
export declare const EN_META: LocaleMeta;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { LocaleMeta } from '../types.js';
|
|
2
|
+
/** ko 메시지 카탈로그. `satisfies` 로 키 완전성 컴파일 강제. / ko message catalog. `satisfies` enforces key completeness at compile time. */
|
|
3
|
+
export declare const KO_MESSAGES: {
|
|
4
|
+
contextMenu: {
|
|
5
|
+
sortAsc: string;
|
|
6
|
+
sortDesc: string;
|
|
7
|
+
find: string;
|
|
8
|
+
exportExcel: string;
|
|
9
|
+
exportCsv: string;
|
|
10
|
+
print: string;
|
|
11
|
+
};
|
|
12
|
+
filter: {
|
|
13
|
+
title: string;
|
|
14
|
+
opContains: string;
|
|
15
|
+
opEq: string;
|
|
16
|
+
opNe: string;
|
|
17
|
+
opStartsWith: string;
|
|
18
|
+
opEndsWith: string;
|
|
19
|
+
opGt: string;
|
|
20
|
+
opLt: string;
|
|
21
|
+
opGte: string;
|
|
22
|
+
opLte: string;
|
|
23
|
+
valuePlaceholder: string;
|
|
24
|
+
clear: string;
|
|
25
|
+
apply: string;
|
|
26
|
+
legend: string;
|
|
27
|
+
clearAria: string;
|
|
28
|
+
all: string;
|
|
29
|
+
};
|
|
30
|
+
findBar: {
|
|
31
|
+
label: string;
|
|
32
|
+
placeholder: string;
|
|
33
|
+
searchAria: string;
|
|
34
|
+
closeAria: string;
|
|
35
|
+
countBadge: string;
|
|
36
|
+
};
|
|
37
|
+
pagination: {
|
|
38
|
+
rowsPerPage: string;
|
|
39
|
+
rangeBadge: string;
|
|
40
|
+
empty: string;
|
|
41
|
+
};
|
|
42
|
+
drag: {
|
|
43
|
+
rowCount: string;
|
|
44
|
+
};
|
|
45
|
+
crossGrid: {
|
|
46
|
+
overlayAria: string;
|
|
47
|
+
title: string;
|
|
48
|
+
desc1: string;
|
|
49
|
+
desc2: string;
|
|
50
|
+
emptyOption: string;
|
|
51
|
+
scriptTitle: string;
|
|
52
|
+
copy: string;
|
|
53
|
+
copied: string;
|
|
54
|
+
copyFailed: string;
|
|
55
|
+
cancel: string;
|
|
56
|
+
applyMove: string;
|
|
57
|
+
scriptComment: string;
|
|
58
|
+
};
|
|
59
|
+
shuttle: {
|
|
60
|
+
toRight: string;
|
|
61
|
+
toLeft: string;
|
|
62
|
+
allRight: string;
|
|
63
|
+
allLeft: string;
|
|
64
|
+
};
|
|
65
|
+
tree: {
|
|
66
|
+
collapse: string;
|
|
67
|
+
expand: string;
|
|
68
|
+
};
|
|
69
|
+
detail: {
|
|
70
|
+
glyphLabel: string;
|
|
71
|
+
glyphTooltip: string;
|
|
72
|
+
expandAria: string;
|
|
73
|
+
collapseAria: string;
|
|
74
|
+
expandedAnnounce: string;
|
|
75
|
+
collapsedAnnounce: string;
|
|
76
|
+
collapsedAllAnnounce: string;
|
|
77
|
+
depthLimitOpen: string;
|
|
78
|
+
depthLimitSubgrid: string;
|
|
79
|
+
};
|
|
80
|
+
worksheet: {
|
|
81
|
+
addAria: string;
|
|
82
|
+
};
|
|
83
|
+
editor: {
|
|
84
|
+
datePick: string;
|
|
85
|
+
select: string;
|
|
86
|
+
cellPositionAnnounce: string;
|
|
87
|
+
};
|
|
88
|
+
cell: {
|
|
89
|
+
emptyValue: string;
|
|
90
|
+
revealTooltip: string;
|
|
91
|
+
revealAria: string;
|
|
92
|
+
radioAria: string;
|
|
93
|
+
barcodeAria: string;
|
|
94
|
+
};
|
|
95
|
+
row: {
|
|
96
|
+
selectAllAria: string;
|
|
97
|
+
selectAria: string;
|
|
98
|
+
moveAnnounce: string;
|
|
99
|
+
};
|
|
100
|
+
group: {
|
|
101
|
+
badge: string;
|
|
102
|
+
nullLabel: string;
|
|
103
|
+
};
|
|
104
|
+
pivot: {
|
|
105
|
+
totalLabel: string;
|
|
106
|
+
};
|
|
107
|
+
data: {
|
|
108
|
+
loadedAnnounce: string;
|
|
109
|
+
skippedCellsAnnounce: string;
|
|
110
|
+
};
|
|
111
|
+
range: {
|
|
112
|
+
selectionAnnounce: string;
|
|
113
|
+
formulaPreserved: string;
|
|
114
|
+
fillSkipped: string;
|
|
115
|
+
fillHandleAria: string;
|
|
116
|
+
};
|
|
117
|
+
sort: {
|
|
118
|
+
asc: string;
|
|
119
|
+
desc: string;
|
|
120
|
+
none: string;
|
|
121
|
+
announce: string;
|
|
122
|
+
};
|
|
123
|
+
chart: {
|
|
124
|
+
defaultTitle: string;
|
|
125
|
+
badgeSampled: string;
|
|
126
|
+
badgeAggregated: string;
|
|
127
|
+
badgePieFirstSeries: string;
|
|
128
|
+
badgeNegativesAbs: string;
|
|
129
|
+
badgeRangeFallback: string;
|
|
130
|
+
badgeEngineFallback: string;
|
|
131
|
+
announcePrefix: string;
|
|
132
|
+
a11ySummary: string;
|
|
133
|
+
a11ySummaryNoTitle: string;
|
|
134
|
+
a11yAltText: string;
|
|
135
|
+
a11yNoData: string;
|
|
136
|
+
tooltipEmpty: string;
|
|
137
|
+
canvasDefault: string;
|
|
138
|
+
};
|
|
139
|
+
formulaError: {
|
|
140
|
+
err: string;
|
|
141
|
+
ref: string;
|
|
142
|
+
cycle: string;
|
|
143
|
+
div0: string;
|
|
144
|
+
name: string;
|
|
145
|
+
value: string;
|
|
146
|
+
num: string;
|
|
147
|
+
fallback: string;
|
|
148
|
+
};
|
|
149
|
+
formula: {
|
|
150
|
+
cellErrorAnnounce: string;
|
|
151
|
+
ariaError: string;
|
|
152
|
+
ariaValue: string;
|
|
153
|
+
approxSuffix: string;
|
|
154
|
+
};
|
|
155
|
+
grid: {
|
|
156
|
+
containerAria: string;
|
|
157
|
+
emptyMessage: string;
|
|
158
|
+
filterTooltip: string;
|
|
159
|
+
detailRegion: string;
|
|
160
|
+
};
|
|
161
|
+
export: {
|
|
162
|
+
printSummary: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
/** ko 포맷 메타(Intl 태그·방향·수출 폰트). / ko format meta (Intl tag, direction, export font). */
|
|
166
|
+
export declare const KO_META: LocaleMeta;
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/** 보간 파라미터. 명명 파라미터만(위치 파라미터 금지 — 어순이 언어마다 다름). / Interpolation params. Named only (positional forbidden — word order differs per language). */
|
|
2
|
+
export type MessageParams = Readonly<Record<string, string | number>>;
|
|
3
|
+
/**
|
|
4
|
+
* 메시지 값: 평문 문자열('{name}' 보간) 또는 함수(복수형·조사 등 "문법이 데이터인" 케이스의 탈출구).
|
|
5
|
+
* ICU/CLDR 복수 엔진은 zero-dependency 정체성 때문에 도입하지 않는다(규칙은 로케일 파일에 둔다).
|
|
6
|
+
* / A message value: a plain string ('{name}' interpolation) or a function (escape hatch for
|
|
7
|
+
* plurals/particles where "grammar is data"). No ICU/CLDR plural engine (zero-dependency).
|
|
8
|
+
*/
|
|
9
|
+
export type MessageValue = string | ((params: MessageParams) => string);
|
|
10
|
+
/**
|
|
11
|
+
* 로케일 메시지 카탈로그(2단 중첩, 최상위 섹션 = 소비 UI 표면). 파라미터를 받는 값만 `MessageValue`
|
|
12
|
+
* (함수형 복수 허용), 정적 라벨은 `string`. 내장 ko 가 SSOT 이며 en 은 동일 키 집합을 갖는다.
|
|
13
|
+
* / The locale message catalog (2-level nested, top-level section = consuming UI surface). Only
|
|
14
|
+
* parameterized entries are `MessageValue` (allowing plural functions); static labels are
|
|
15
|
+
* `string`. Built-in ko is the SSOT; en carries the same key set.
|
|
16
|
+
*/
|
|
17
|
+
export interface LocaleMessages {
|
|
18
|
+
/** 우클릭 컨텍스트 메뉴 라벨. / Right-click context-menu labels. */
|
|
19
|
+
contextMenu: {
|
|
20
|
+
sortAsc: string;
|
|
21
|
+
sortDesc: string;
|
|
22
|
+
find: string;
|
|
23
|
+
exportExcel: string;
|
|
24
|
+
exportCsv: string;
|
|
25
|
+
print: string;
|
|
26
|
+
};
|
|
27
|
+
/** 필터 패널·필터 셀렉트 라벨. / Filter panel & filter-select labels. */
|
|
28
|
+
filter: {
|
|
29
|
+
title: string;
|
|
30
|
+
opContains: string;
|
|
31
|
+
opEq: string;
|
|
32
|
+
opNe: string;
|
|
33
|
+
opStartsWith: string;
|
|
34
|
+
opEndsWith: string;
|
|
35
|
+
opGt: string;
|
|
36
|
+
opLt: string;
|
|
37
|
+
opGte: string;
|
|
38
|
+
opLte: string;
|
|
39
|
+
valuePlaceholder: string;
|
|
40
|
+
clear: string;
|
|
41
|
+
apply: string;
|
|
42
|
+
legend: string;
|
|
43
|
+
clearAria: string;
|
|
44
|
+
all: string;
|
|
45
|
+
};
|
|
46
|
+
/** 찾기 바 라벨/placeholder/aria/카운트 배지. / Find-bar label/placeholder/aria/count badge. */
|
|
47
|
+
findBar: {
|
|
48
|
+
label: string;
|
|
49
|
+
placeholder: string;
|
|
50
|
+
searchAria: string;
|
|
51
|
+
closeAria: string;
|
|
52
|
+
/** 결과 개수 배지. 파라미터 {n}. / Result count badge. Param {n}. */
|
|
53
|
+
countBadge: MessageValue;
|
|
54
|
+
};
|
|
55
|
+
/** 페이지네이션 라벨/범위 배지/빈 상태. / Pagination labels/range badge/empty state. */
|
|
56
|
+
pagination: {
|
|
57
|
+
rowsPerPage: string;
|
|
58
|
+
/** 현재 범위 배지. 파라미터 {from} {to} {total}. / Current range badge. Params {from} {to} {total}. */
|
|
59
|
+
rangeBadge: MessageValue;
|
|
60
|
+
empty: string;
|
|
61
|
+
};
|
|
62
|
+
/** 행 드래그 고스트 라벨. / Row-drag ghost label. */
|
|
63
|
+
drag: {
|
|
64
|
+
/** 드래그 중 행 개수. 파라미터 {count}. / Rows being dragged. Param {count}. */
|
|
65
|
+
rowCount: MessageValue;
|
|
66
|
+
};
|
|
67
|
+
/** 크로스그리드 매핑 다이얼로그(디자인타임 헬퍼). / Cross-grid mapping dialog (design-time helper). */
|
|
68
|
+
crossGrid: {
|
|
69
|
+
overlayAria: string;
|
|
70
|
+
title: string;
|
|
71
|
+
desc1: string;
|
|
72
|
+
desc2: string;
|
|
73
|
+
emptyOption: string;
|
|
74
|
+
scriptTitle: string;
|
|
75
|
+
copy: string;
|
|
76
|
+
copied: string;
|
|
77
|
+
copyFailed: string;
|
|
78
|
+
cancel: string;
|
|
79
|
+
applyMove: string;
|
|
80
|
+
scriptComment: string;
|
|
81
|
+
};
|
|
82
|
+
/** 그리드↔그리드 셔틀 버튼 aria/tooltip. / Grid-to-grid shuttle button aria/tooltip. */
|
|
83
|
+
shuttle: {
|
|
84
|
+
toRight: string;
|
|
85
|
+
toLeft: string;
|
|
86
|
+
allRight: string;
|
|
87
|
+
allLeft: string;
|
|
88
|
+
};
|
|
89
|
+
/** 트리 노드 확장/접기 aria. / Tree node expand/collapse aria. */
|
|
90
|
+
tree: {
|
|
91
|
+
collapse: string;
|
|
92
|
+
expand: string;
|
|
93
|
+
};
|
|
94
|
+
/** 마스터/디테일 글리프·announce. / Master/detail glyph & announce. */
|
|
95
|
+
detail: {
|
|
96
|
+
glyphLabel: string;
|
|
97
|
+
glyphTooltip: string;
|
|
98
|
+
expandAria: string;
|
|
99
|
+
collapseAria: string;
|
|
100
|
+
expandedAnnounce: string;
|
|
101
|
+
collapsedAnnounce: string;
|
|
102
|
+
collapsedAllAnnounce: string;
|
|
103
|
+
/** 상세 패널 깊이 한계. 파라미터 {max}. / Detail depth limit. Param {max}. */
|
|
104
|
+
depthLimitOpen: MessageValue;
|
|
105
|
+
/** 서브그리드 깊이 한계. 파라미터 {max}. / Subgrid depth limit. Param {max}. */
|
|
106
|
+
depthLimitSubgrid: MessageValue;
|
|
107
|
+
};
|
|
108
|
+
/** 워크시트 탭 UI. / Worksheet tab UI. */
|
|
109
|
+
worksheet: {
|
|
110
|
+
addAria: string;
|
|
111
|
+
};
|
|
112
|
+
/** 인라인 에디터 aria/announce. / Inline editor aria/announce. */
|
|
113
|
+
editor: {
|
|
114
|
+
datePick: string;
|
|
115
|
+
select: string;
|
|
116
|
+
/** 편집 셀 위치 announce. 파라미터 {row} {col} {header} {value}. / Edited-cell position announce. Params {row} {col} {header} {value}. */
|
|
117
|
+
cellPositionAnnounce: MessageValue;
|
|
118
|
+
};
|
|
119
|
+
/** 셀 렌더러(마스킹·라디오·바코드·수식 빈값). / Cell renderer (masking/radio/barcode/formula empty). */
|
|
120
|
+
cell: {
|
|
121
|
+
emptyValue: string;
|
|
122
|
+
revealTooltip: string;
|
|
123
|
+
revealAria: string;
|
|
124
|
+
radioAria: string;
|
|
125
|
+
/** 바코드 셀 aria. 파라미터 {value}. / Barcode cell aria. Param {value}. */
|
|
126
|
+
barcodeAria: MessageValue;
|
|
127
|
+
};
|
|
128
|
+
/** 행 선택 aria + 행 이동 announce. / Row selection aria + row-move announce. */
|
|
129
|
+
row: {
|
|
130
|
+
selectAllAria: string;
|
|
131
|
+
/** 행 체크박스 aria. 파라미터 {n}. / Row checkbox aria. Param {n}. */
|
|
132
|
+
selectAria: MessageValue;
|
|
133
|
+
/** 행 이동 announce. 파라미터 {from} {to}. / Row-move announce. Params {from} {to}. */
|
|
134
|
+
moveAnnounce: MessageValue;
|
|
135
|
+
};
|
|
136
|
+
/** 그룹 행 배지/null 라벨. / Group-row badge / null label. */
|
|
137
|
+
group: {
|
|
138
|
+
/** 그룹 배지. 파라미터 {label} {count}. / Group badge. Params {label} {count}. */
|
|
139
|
+
badge: MessageValue;
|
|
140
|
+
nullLabel: string;
|
|
141
|
+
};
|
|
142
|
+
/** 피벗 총계 행. / Pivot total row. */
|
|
143
|
+
pivot: {
|
|
144
|
+
totalLabel: string;
|
|
145
|
+
};
|
|
146
|
+
/** 데이터 로드/스킵 announce. / Data load/skip announce. */
|
|
147
|
+
data: {
|
|
148
|
+
/** 데이터 로드 announce. 파라미터 {count}. / Data-loaded announce. Param {count}. */
|
|
149
|
+
loadedAnnounce: MessageValue;
|
|
150
|
+
/** 쓰기 대상 아닌 셀 스킵 announce. 파라미터 {count}. / Non-writable cells skipped announce. Param {count}. */
|
|
151
|
+
skippedCellsAnnounce: MessageValue;
|
|
152
|
+
};
|
|
153
|
+
/** 범위 선택 + 채우기 announce/aria. / Range selection + fill announce/aria. */
|
|
154
|
+
range: {
|
|
155
|
+
/** 범위 선택 announce. 파라미터 {r1} {c1} {r2} {c2} {n}. / Range selection announce. Params {r1} {c1} {r2} {c2} {n}. */
|
|
156
|
+
selectionAnnounce: MessageValue;
|
|
157
|
+
/** 수식 셀 보존 announce. 파라미터 {count}. / Formula cells preserved announce. Param {count}. */
|
|
158
|
+
formulaPreserved: MessageValue;
|
|
159
|
+
/** 채우기 스킵 announce. 파라미터 {count}. / Fill-skipped announce. Param {count}. */
|
|
160
|
+
fillSkipped: MessageValue;
|
|
161
|
+
fillHandleAria: string;
|
|
162
|
+
};
|
|
163
|
+
/** 정렬 상태어 + announce. / Sort state words + announce. */
|
|
164
|
+
sort: {
|
|
165
|
+
asc: string;
|
|
166
|
+
desc: string;
|
|
167
|
+
none: string;
|
|
168
|
+
/** 정렬 announce. 파라미터 {field} {dir}. / Sort announce. Params {field} {dir}. */
|
|
169
|
+
announce: MessageValue;
|
|
170
|
+
};
|
|
171
|
+
/** F4 차트 배지·announce·접근성 요약. / F4 chart badges/announce/a11y summary. */
|
|
172
|
+
chart: {
|
|
173
|
+
defaultTitle: string;
|
|
174
|
+
/** 샘플링 배지. 파라미터 {to} {from}. / Sampled badge. Params {to} {from}. */
|
|
175
|
+
badgeSampled: MessageValue;
|
|
176
|
+
/** 집계 배지. 파라미터 {op}. / Aggregated badge. Param {op}. */
|
|
177
|
+
badgeAggregated: MessageValue;
|
|
178
|
+
badgePieFirstSeries: string;
|
|
179
|
+
badgeNegativesAbs: string;
|
|
180
|
+
badgeRangeFallback: string;
|
|
181
|
+
/** 엔진 폴백 배지. 파라미터 {engine}. / Engine-fallback badge. Param {engine}. */
|
|
182
|
+
badgeEngineFallback: MessageValue;
|
|
183
|
+
/** 배지 announce 접두. 파라미터 {badges}. / Badge announce prefix. Param {badges}. */
|
|
184
|
+
announcePrefix: MessageValue;
|
|
185
|
+
/** 접근성 요약. 파라미터 {title} {categories} {series}. / A11y summary. Params {title} {categories} {series}. */
|
|
186
|
+
a11ySummary: MessageValue;
|
|
187
|
+
/** 무제목 접근성 요약. 파라미터 {categories} {series}. / Titleless a11y summary. Params {categories} {series}. */
|
|
188
|
+
a11ySummaryNoTitle: MessageValue;
|
|
189
|
+
/** 캔버스 대체 텍스트. 파라미터 {title} {categories} {series}. / Canvas alt text. Params {title} {categories} {series}. */
|
|
190
|
+
a11yAltText: MessageValue;
|
|
191
|
+
a11yNoData: string;
|
|
192
|
+
tooltipEmpty: string;
|
|
193
|
+
canvasDefault: string;
|
|
194
|
+
};
|
|
195
|
+
/** 사용자 노출 수식 오류 셀 라벨. / User-facing formula error cell labels. */
|
|
196
|
+
formulaError: {
|
|
197
|
+
err: string;
|
|
198
|
+
ref: string;
|
|
199
|
+
cycle: string;
|
|
200
|
+
div0: string;
|
|
201
|
+
name: string;
|
|
202
|
+
value: string;
|
|
203
|
+
num: string;
|
|
204
|
+
fallback: string;
|
|
205
|
+
};
|
|
206
|
+
/** 수식 셀 announce/aria(파라미터형). / Formula cell announce/aria (parameterized). */
|
|
207
|
+
formula: {
|
|
208
|
+
/** 셀 오류 announce. 파라미터 {field} {message}. / Cell error announce. Params {field} {message}. */
|
|
209
|
+
cellErrorAnnounce: MessageValue;
|
|
210
|
+
/** 수식 오류 셀 aria. 파라미터 {src} {message}. / Formula error cell aria. Params {src} {message}. */
|
|
211
|
+
ariaError: MessageValue;
|
|
212
|
+
/** 수식 값 셀 aria. 파라미터 {src} {value} {approx}. / Formula value cell aria. Params {src} {value} {approx}. */
|
|
213
|
+
ariaValue: MessageValue;
|
|
214
|
+
approxSuffix: string;
|
|
215
|
+
};
|
|
216
|
+
/** 컨테이너·빈 상태·헤더 필터 아이콘·디테일 영역 aria/tooltip. / Container/empty/header-filter/detail-region aria & tooltip. */
|
|
217
|
+
grid: {
|
|
218
|
+
containerAria: string;
|
|
219
|
+
emptyMessage: string;
|
|
220
|
+
filterTooltip: string;
|
|
221
|
+
detailRegion: string;
|
|
222
|
+
};
|
|
223
|
+
/** 인쇄/내보내기 문서 문구(포맷 파라미터형). / Print/export document strings (parameterized). */
|
|
224
|
+
export: {
|
|
225
|
+
/** 인쇄 요약행. 파라미터 {rows} {cols} {date}. / Print summary row. Params {rows} {cols} {date}. */
|
|
226
|
+
printSummary: MessageValue;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/** 부분 오버라이드(2단 딥머지, 카탈로그 위). / Partial override (2-level deep-merge over the catalog). */
|
|
230
|
+
export type PartialLocaleMessages = {
|
|
231
|
+
[S in keyof LocaleMessages]?: Partial<LocaleMessages[S]>;
|
|
232
|
+
};
|
|
233
|
+
/** dot-key 유니온(`'filter.apply'` 등) — 오타를 컴파일 에러화. / Dot-key union (e.g. `'filter.apply'`) — typos become compile errors. */
|
|
234
|
+
export type LocaleMessageKey = {
|
|
235
|
+
[S in keyof LocaleMessages]: `${S & string}.${keyof LocaleMessages[S] & string}`;
|
|
236
|
+
}[keyof LocaleMessages];
|
|
237
|
+
/** 로케일 포맷 파라미터(문자열 아님): Intl 태그·방향·수출 폰트. / Locale format params (non-string): Intl tag, direction, export font. */
|
|
238
|
+
export interface LocaleMeta {
|
|
239
|
+
/** BCP-47 태그(toLocaleString/lang/인쇄 템플릿용). 예 'ko-KR'. / BCP-47 tag (for toLocaleString/lang/print template). e.g. 'ko-KR'. */
|
|
240
|
+
readonly intlLocale: string;
|
|
241
|
+
/** 텍스트 방향(현 코어는 ltr 검증). / Text direction (core validated for ltr). */
|
|
242
|
+
readonly dir?: 'ltr' | 'rtl';
|
|
243
|
+
/** Excel 내보내기 기본 폰트. / Default font for Excel export. */
|
|
244
|
+
readonly exportFont?: string;
|
|
245
|
+
}
|
|
246
|
+
/** register() 결과 — 누락 키 정직 신호(막지 않음). / register() result — honest missing-key signal (never blocks). */
|
|
247
|
+
export interface LocaleRegisterResult {
|
|
248
|
+
readonly missingKeys: string[];
|
|
249
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ColumnDef, RendererDef } from '../types.js';
|
|
2
|
+
/** i18n: 렌더 컨텍스트 로케일 해석기(주입 없으면 전역 t). 인스턴스 로케일이 전역보다 우선.
|
|
3
|
+
* / i18n: render-context locale resolver (global t when not injected). Instance locale wins over global. */
|
|
4
|
+
export declare function ctxT(ctx: RenderContext, key: string, params?: Record<string, string | number>): string;
|
|
2
5
|
export interface RenderContext<T = any> {
|
|
3
6
|
value: any;
|
|
4
7
|
row: T;
|
|
@@ -7,6 +10,8 @@ export interface RenderContext<T = any> {
|
|
|
7
10
|
colIndex: number;
|
|
8
11
|
isSelected: boolean;
|
|
9
12
|
rowState: 'none' | 'added' | 'edited' | 'removed';
|
|
13
|
+
/** i18n: 인스턴스 로케일 해석기(GridRenderer/CellEditManager 가 주입, 미주입 시 전역 t 폴백). / i18n: instance locale resolver (injected; global-t fallback). */
|
|
14
|
+
t?: (key: string, params?: Record<string, string | number>) => string;
|
|
10
15
|
displayValue?: string | null;
|
|
11
16
|
/** R1b: per-instance displayFormatter 전략(값·필드·행 → 표시문자열|null). Number/Date 렌더러가
|
|
12
17
|
* ctx.value 위에 적용한다(모듈전역 없이 멀티그리드 격리). null 반환/미설정 시 기본 포맷 폴백.
|