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
|
@@ -8,10 +8,14 @@ export interface ContextMenuActions {
|
|
|
8
8
|
onCsv: () => void;
|
|
9
9
|
onPrint: () => void;
|
|
10
10
|
}
|
|
11
|
+
/** i18n: 메시지 해석기 시그니처. / i18n: message resolver signature. */
|
|
12
|
+
export type ContextMenuT = (key: string, params?: Record<string, string | number>) => string;
|
|
13
|
+
/** 기본 메뉴 항목(ko 라벨) — i18n 미주입 폴백 + 구조 계약(테스트/공개 표면). / Default items (ko labels) — i18n fallback + structural contract. */
|
|
11
14
|
export declare const DEFAULT_CONTEXT_ITEMS: ContextMenuItem[];
|
|
12
15
|
export declare class ContextMenuManager {
|
|
13
16
|
private readonly _anchor;
|
|
14
17
|
private readonly _actions;
|
|
18
|
+
private readonly _t?;
|
|
15
19
|
private _el;
|
|
16
20
|
private _docClick;
|
|
17
21
|
private _docKey;
|
|
@@ -22,7 +26,7 @@ export declare class ContextMenuManager {
|
|
|
22
26
|
* @param _anchor 그리드 컨테이너 엘리먼트 — CSS 변수 상속 기준점
|
|
23
27
|
* @param _actions 기본 액션 핸들러 (OpenGrid에서 주입)
|
|
24
28
|
*/
|
|
25
|
-
constructor(_anchor: HTMLElement, _actions: ContextMenuActions);
|
|
29
|
+
constructor(_anchor: HTMLElement, _actions: ContextMenuActions, _t?: ContextMenuT | undefined);
|
|
26
30
|
open(e: MouseEvent, customItems?: ContextMenuItem[]): void;
|
|
27
31
|
close(): void;
|
|
28
32
|
destroy(): void;
|
|
@@ -19,6 +19,8 @@ export interface DetailManagerDeps<T extends Record<string, any> = any> {
|
|
|
19
19
|
doRenderFull: (n: number) => void;
|
|
20
20
|
emit: (ev: string, payload: any) => void;
|
|
21
21
|
announce: (msg: string) => void;
|
|
22
|
+
/** i18n: 깊이 한계/펼침·접힘 announce 메시지 해석. / i18n: resolve depth-limit & expand/collapse announces. */
|
|
23
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
22
24
|
/** 이 그리드 인스턴스의 중첩 깊이(0=최상위, 부모가 자식 생성 시 depth+1 주입). */
|
|
23
25
|
getDepth: () => number;
|
|
24
26
|
/** masterDetail.renderer 의 DetailRenderApi.grid 에 실어줄 인스턴스. */
|
|
@@ -11,6 +11,13 @@ export interface ExportDeps<T extends Record<string, any>> {
|
|
|
11
11
|
getWsManager: () => WorksheetManager<T> | null;
|
|
12
12
|
/** Phase 2: OverrideKernel.getStrategy 주입(슬롯 cellSerializer 도달용). */
|
|
13
13
|
getStrategy?: <F extends Function>(slot: string, fallback: F) => F;
|
|
14
|
+
/** i18n: 인쇄 요약행 해석(미주입 시 ko 폴백). / i18n: resolve print summary row (ko fallback when absent). */
|
|
15
|
+
t?: (key: string, params?: Record<string, string | number>) => string;
|
|
16
|
+
/** i18n: 로케일 포맷 메타(인쇄 lang·날짜 로케일·Excel 폰트). / i18n: locale format meta (print lang, date locale, Excel font). */
|
|
17
|
+
getMeta?: () => {
|
|
18
|
+
intlLocale: string;
|
|
19
|
+
exportFont?: string;
|
|
20
|
+
};
|
|
14
21
|
}
|
|
15
22
|
export declare class ExportManager<T extends Record<string, any> = any> {
|
|
16
23
|
private _d;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { FilterItem } from './types.js';
|
|
2
2
|
export type FilterApplyFn = (field: string, items: FilterItem[]) => void;
|
|
3
3
|
export type FilterClearFn = (field: string) => void;
|
|
4
|
+
/** i18n: 필터 라벨 로케일 해석기(주입 없으면 전역 t). / i18n: filter-label resolver (global t when not injected). */
|
|
5
|
+
export type FilterPanelT = (key: string, params?: Record<string, string | number>) => string;
|
|
4
6
|
/**
|
|
5
7
|
* 컬럼 헤더 필터 드롭다운 패널.
|
|
6
8
|
* 단일 인스턴스를 재사용(열릴 때 위치 재계산).
|
|
@@ -10,8 +12,9 @@ export declare class FilterPanel {
|
|
|
10
12
|
private _field;
|
|
11
13
|
private _onApply;
|
|
12
14
|
private _onClear;
|
|
15
|
+
private _t;
|
|
13
16
|
private _outsideHandler;
|
|
14
|
-
constructor(container: HTMLElement, onApply: FilterApplyFn, onClear: FilterClearFn);
|
|
17
|
+
constructor(container: HTMLElement, onApply: FilterApplyFn, onClear: FilterClearFn, t?: FilterPanelT);
|
|
15
18
|
open(field: string, anchorEl: HTMLElement, currentFilters: FilterItem[]): void;
|
|
16
19
|
close(): void;
|
|
17
20
|
get isOpen(): boolean;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { FilterItem } from './types.js';
|
|
2
|
+
/** i18n: 필터 셀렉트 라벨 해석기(주입 없으면 전역 t). / i18n: filter-select label resolver (global t when not injected). */
|
|
3
|
+
export type FilterSelectT = (key: string, params?: Record<string, string | number>) => string;
|
|
2
4
|
export interface FilterSelectOption {
|
|
3
5
|
value: string;
|
|
4
6
|
text: string;
|
|
@@ -74,7 +76,8 @@ export declare class FilterSelectPanel {
|
|
|
74
76
|
private _config;
|
|
75
77
|
private _onFilter;
|
|
76
78
|
private _onReset;
|
|
77
|
-
|
|
79
|
+
private _t;
|
|
80
|
+
constructor(container: HTMLElement, config: FilterSelectConfig, onFilter: FilterFn, onReset: ResetFn, gridId?: string, t?: FilterSelectT);
|
|
78
81
|
/**
|
|
79
82
|
* 컬럼의 옵션 목록을 계산한다.
|
|
80
83
|
*
|
|
@@ -9,16 +9,22 @@ export interface FindBarDeps<T extends Record<string, any>> {
|
|
|
9
9
|
getVs: () => VirtualScroll | null;
|
|
10
10
|
getPagination: () => Pagination | null;
|
|
11
11
|
doRender: () => void;
|
|
12
|
+
/** i18n: 메시지 해석(라벨/placeholder/aria/카운트 배지). / i18n: resolve labels/placeholder/aria/count badge. */
|
|
13
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
12
14
|
}
|
|
13
15
|
export declare class FindBarManager<T extends Record<string, any> = any> {
|
|
14
16
|
private _bar;
|
|
15
17
|
private _input;
|
|
16
18
|
private _count;
|
|
19
|
+
private _lbl;
|
|
20
|
+
private _close;
|
|
17
21
|
private _filter;
|
|
18
22
|
private _d;
|
|
19
23
|
constructor(deps: FindBarDeps<T>);
|
|
20
24
|
get findFilter(): string;
|
|
21
25
|
init(container: HTMLElement): void;
|
|
26
|
+
/** i18n: 상주 크롬 라벨을 활성 로케일로 다시 그린다(setLocale 경로). / i18n: repaint resident chrome labels in the active locale (setLocale path). */
|
|
27
|
+
refreshLabels(): void;
|
|
22
28
|
open(): void;
|
|
23
29
|
close(): void;
|
|
24
30
|
private _apply;
|
|
@@ -30,6 +30,8 @@ export interface FormulaControllerDeps<T extends Record<string, any> = any> {
|
|
|
30
30
|
emit: (event: string, payload?: any) => void;
|
|
31
31
|
/** aria-live announce(C8.1 공용 인프라). */
|
|
32
32
|
announce: (msg: string) => void;
|
|
33
|
+
/** i18n: 수식 오류 announce/셀 라벨 해석(formulaError.* 통합 키). / i18n: resolve formula error announce/labels. */
|
|
34
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
33
35
|
/** 현재 가시 범위 렌더(this._doRender(...this._visRange())). afterRecalc 가 !skipRender 시 유발. */
|
|
34
36
|
doRenderWindow: () => void;
|
|
35
37
|
}
|
|
@@ -16,6 +16,7 @@ import { GroupTreeManager } from './GroupTreeManager.js';
|
|
|
16
16
|
import { DetailManager } from './DetailManager.js';
|
|
17
17
|
import { ChartManager } from './ChartManager.js';
|
|
18
18
|
import { OverrideKernel } from './OverrideKernel.js';
|
|
19
|
+
import { LocaleRegistry } from './i18n/LocaleRegistry.js';
|
|
19
20
|
import { GridRenderer } from './GridRenderer.js';
|
|
20
21
|
import { VirtualScroll } from './VirtualScroll.js';
|
|
21
22
|
import { Pagination } from './Pagination.js';
|
|
@@ -50,6 +51,8 @@ export interface ComposerHost<T extends Record<string, any> = any> {
|
|
|
50
51
|
_detailMgr: DetailManager<T>;
|
|
51
52
|
_chartMgr: ChartManager;
|
|
52
53
|
_ovk: OverrideKernel;
|
|
54
|
+
/** i18n: per-instance 로케일 오버라이드 child(전역 localeRegistry 의 child). 미지정 시 null → 전역 직행. */
|
|
55
|
+
_locales: LocaleRegistry | null;
|
|
53
56
|
_renderer: GridRenderer | null;
|
|
54
57
|
_vs: VirtualScroll | null;
|
|
55
58
|
_pagination: Pagination | null;
|
|
@@ -60,6 +63,8 @@ export interface ComposerHost<T extends Record<string, any> = any> {
|
|
|
60
63
|
on(event: string, cb: (...args: any[]) => void): any;
|
|
61
64
|
off(event: string, cb: (...args: any[]) => void): any;
|
|
62
65
|
_announce(msg: string): void;
|
|
66
|
+
/** i18n: 메시지 해석(인스턴스 오버라이드 우선 → 활성 로케일 → ko → 키). / i18n: resolve a message. */
|
|
67
|
+
t(key: string, params?: Record<string, string | number>): string;
|
|
63
68
|
_doRender(startIndex: number, endIndex: number): void;
|
|
64
69
|
_visRange(): [number, number];
|
|
65
70
|
_renderHeader(): void;
|
|
@@ -61,6 +61,7 @@ export interface RendererCallbacks {
|
|
|
61
61
|
error: string | null;
|
|
62
62
|
approx: boolean;
|
|
63
63
|
} | null;
|
|
64
|
+
t?: (key: string, params?: Record<string, string | number>) => string;
|
|
64
65
|
}
|
|
65
66
|
/**
|
|
66
67
|
* F2(11_design_F2_v2.md §4/§5, C6/C10): renderBody 가 detail head/filler 분기·expander 셀을
|
|
@@ -92,6 +93,8 @@ export declare class GridRenderer {
|
|
|
92
93
|
private _ap;
|
|
93
94
|
private _cellMap;
|
|
94
95
|
get bodyWrapper(): HTMLElement;
|
|
96
|
+
/** i18n: 렌더 로케일 해석기 — cbs.t(인스턴스 로케일) 우선, 미주입 시 전역 t. / i18n: cbs.t (instance locale) first, global t otherwise. */
|
|
97
|
+
private _t;
|
|
95
98
|
constructor(root: HTMLElement, opts: RenderOptions, cbs: RendererCallbacks, appearance?: AppearanceResolver);
|
|
96
99
|
updateSize(totalHeight: number, headerHeight: number): void;
|
|
97
100
|
/** 현재 렌더된 헤더 영역의 실제 높이(px). 헤더 줄바꿈으로 늘어난 높이를 레이아웃에 반영할 때 사용. */
|
|
@@ -24,6 +24,8 @@ export interface KeyboardDeps<T extends Record<string, any>> {
|
|
|
24
24
|
handleRowDrop: (from: number, to: number) => void;
|
|
25
25
|
doRender: () => void;
|
|
26
26
|
announce: (msg: string) => void;
|
|
27
|
+
/** i18n: 행 이동 announce 해석. / i18n: resolve row-move announce. */
|
|
28
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
27
29
|
emit: (event: string, ...args: any[]) => void;
|
|
28
30
|
visRange: () => [number, number];
|
|
29
31
|
handleCellKeyEvt: (eventName: 'cellKeyDown' | 'cellKeyUp' | 'cellKeyPress', e: KeyboardEvent) => void;
|
|
@@ -66,6 +66,8 @@ export interface MutationServiceDeps<T extends Record<string, any> = any> {
|
|
|
66
66
|
emit: (event: string, payload?: any) => void;
|
|
67
67
|
/** aria-live announce (C8.1 공용 인프라). */
|
|
68
68
|
announce: (msg: string) => void;
|
|
69
|
+
/** i18n: 데이터 로드/스킵 announce 해석. / i18n: resolve data load/skip announces. */
|
|
70
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
69
71
|
/** sort/filter 재적용(setData). */
|
|
70
72
|
applyFilters: () => void;
|
|
71
73
|
/** writeCell/endBatch 커밋 emit 직전 수식 dirty seed 소비. */
|