open-grid 1.1.1 → 1.2.1
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 +32 -0
- package/README.md +30 -1
- package/dist/OpenGrid-0r_543Kj.cjs +7192 -0
- package/dist/OpenGrid-HmhGVC2V.js +7203 -0
- package/dist/open-grid-react.cjs +27 -1
- package/dist/open-grid-react.js +22 -82
- package/dist/open-grid-vue.cjs +31 -1
- package/dist/open-grid-vue.js +29 -79
- package/dist/open-grid.cjs +272 -6
- package/dist/open-grid.js +174 -260
- package/dist/types/core/CellEditManager.d.ts +75 -0
- package/dist/types/core/CellEventHandler.d.ts +99 -2
- package/dist/types/core/ChartManager.d.ts +53 -3
- package/dist/types/core/ContextMenu.d.ts +48 -3
- package/dist/types/core/CrossGridController.d.ts +86 -15
- package/dist/types/core/CrossGridRegistry.d.ts +36 -2
- package/dist/types/core/DetailManager.d.ts +108 -15
- package/dist/types/core/ExportManager.d.ts +73 -1
- package/dist/types/core/ExtensionPointRegistry.d.ts +160 -14
- package/dist/types/core/FilterPanel.d.ts +21 -3
- package/dist/types/core/FilterSelect.d.ts +41 -14
- package/dist/types/core/FindBarManager.d.ts +32 -0
- package/dist/types/core/FlatRowModel.d.ts +54 -11
- package/dist/types/core/FooterManager.d.ts +53 -1
- package/dist/types/core/FormulaController.d.ts +141 -10
- package/dist/types/core/GridComposer.d.ts +57 -4
- package/dist/types/core/GridRenderer.d.ts +3 -0
- package/dist/types/core/GridShuttle.d.ts +44 -4
- package/dist/types/core/GroupTreeManager.d.ts +86 -2
- package/dist/types/core/IconRegistry.d.ts +56 -9
- package/dist/types/core/KeyboardManager.d.ts +90 -4
- package/dist/types/core/MaskingEngine.d.ts +10 -9
- package/dist/types/core/MutationService.d.ts +115 -10
- package/dist/types/core/OpenGrid.d.ts +393 -34
- package/dist/types/core/OrgChart.d.ts +56 -1
- package/dist/types/core/OverrideKernel.d.ts +59 -15
- package/dist/types/core/Pagination.d.ts +44 -5
- package/dist/types/core/RangeSelectionManager.d.ts +123 -7
- package/dist/types/core/RenderController.d.ts +56 -0
- package/dist/types/core/RowManager.d.ts +55 -0
- package/dist/types/core/SkinRegistry.d.ts +51 -15
- package/dist/types/core/SortFilterManager.d.ts +82 -1
- package/dist/types/core/TriggerManager.d.ts +46 -0
- package/dist/types/core/WorksheetManager.d.ts +65 -3
- package/dist/types/core/XmlConverter.d.ts +56 -23
- package/dist/types/core/chart/types.d.ts +107 -10
- package/dist/types/core/detail/DetailGlyph.d.ts +3 -1
- package/dist/types/core/editors/CellEditor.d.ts +29 -2
- package/dist/types/core/formula/types.d.ts +71 -8
- 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/range/RangeQuery.d.ts +24 -2
- package/dist/types/core/renderers/CellRenderer.d.ts +105 -8
- package/dist/types/core/types.d.ts +352 -96
- package/dist/types/index.d.ts +22 -0
- package/dist/xlsx.min-BQ1o3sB6.cjs +11793 -0
- package/dist/{xlsx.min-Wavxcamn.js → xlsx.min-Bbz2ZypC.js} +453 -566
- package/package.json +4 -1
- package/dist/OpenGrid-LcZ5iixx.cjs +0 -97
- package/dist/OpenGrid-yg4mw6Ge.js +0 -9505
- package/dist/xlsx.min-Bx-LxWOf.cjs +0 -138
|
@@ -1,29 +1,84 @@
|
|
|
1
1
|
import { DataLayer } from './DataLayer.js';
|
|
2
|
+
/**
|
|
3
|
+
* 행 선택(selection)과 체크(checkbox) 상태를 관리하는 매니저. / Manages row selection and checkbox state.
|
|
4
|
+
*
|
|
5
|
+
* 두 상태는 서로 독립적이다 — 선택은 활성/포커스 개념(단일 행만 유지 가능),
|
|
6
|
+
* 체크는 다중 표시(예: 체크박스 컬럼)를 위한 별도 집합이다.
|
|
7
|
+
* / The two states are independent — selection tracks an active/focus concept
|
|
8
|
+
* (can be limited to a single row), while checks are a separate set for
|
|
9
|
+
* multi-marking (e.g. a checkbox column).
|
|
10
|
+
*/
|
|
2
11
|
export declare class RowManager<T extends Record<string, any> = any> {
|
|
3
12
|
private _selectedRows;
|
|
4
13
|
private _checkedRows;
|
|
5
14
|
private _data;
|
|
6
15
|
constructor(data: DataLayer<T>);
|
|
16
|
+
/** 선택된 행 인덱스 집합(원본 참조). / Set of selected row indexes (live reference). */
|
|
7
17
|
get selectedRows(): Set<number>;
|
|
18
|
+
/** 체크된 행 인덱스 집합(원본 참조). / Set of checked row indexes (live reference). */
|
|
8
19
|
get checkedRows(): Set<number>;
|
|
20
|
+
/**
|
|
21
|
+
* 단일 행만 선택한다(기존 선택은 모두 해제). / Select exactly one row (clears any prior selection).
|
|
22
|
+
*
|
|
23
|
+
* @param ri - 선택할 행의 flat index / Flat index of the row to select
|
|
24
|
+
*/
|
|
9
25
|
selectSingle(ri: number): void;
|
|
26
|
+
/**
|
|
27
|
+
* 지정 행의 선택 상태를 토글한다(다중 선택 누적). / Toggle a row's selection state (accumulates for multi-select).
|
|
28
|
+
*
|
|
29
|
+
* @param ri - 토글할 행의 flat index / Flat index of the row to toggle
|
|
30
|
+
*/
|
|
10
31
|
selectToggle(ri: number): void;
|
|
32
|
+
/** 모든 행 선택을 해제한다. / Clear every row selection. */
|
|
11
33
|
clearSelection(): void;
|
|
34
|
+
/**
|
|
35
|
+
* 지정 행의 체크 상태를 설정한다. / Set the checked state of a single row.
|
|
36
|
+
*
|
|
37
|
+
* @param ri - 대상 행의 flat index / Flat index of the target row
|
|
38
|
+
* @param checked - 체크 여부 / Whether the row should be checked
|
|
39
|
+
*/
|
|
12
40
|
check(ri: number, checked: boolean): void;
|
|
41
|
+
/**
|
|
42
|
+
* 전체 행을 체크하거나 전체 해제한다. / Check or uncheck every row.
|
|
43
|
+
*
|
|
44
|
+
* @param checked - `true` 면 전체 체크, `false` 면 전체 해제 / `true` to check all, `false` to clear all
|
|
45
|
+
* @param totalRows - 전체 행 수(체크 시 0..totalRows-1 을 채움) / Total row count (when checking, fills indexes 0..totalRows-1)
|
|
46
|
+
*/
|
|
13
47
|
checkAll(checked: boolean, totalRows: number): void;
|
|
48
|
+
/**
|
|
49
|
+
* 특정 컬럼 값이 주어진 목록에 포함된 행들을 체크한다. / Check every row whose column value is in the given list.
|
|
50
|
+
*
|
|
51
|
+
* @param field - 값을 비교할 컬럼 field 명 / Column field to compare values against
|
|
52
|
+
* @param values - 매칭 대상 값 목록 / Values to match against
|
|
53
|
+
*/
|
|
14
54
|
checkByValue(field: string, values: any[]): void;
|
|
55
|
+
/** 모든 체크를 해제한다. / Clear every checked row. */
|
|
15
56
|
uncheckAll(): void;
|
|
57
|
+
/** @internal 미구현 스텁(rowId 기반 체크 API 예약). / @internal Unimplemented stub (reserved for a rowId-based check API). */
|
|
16
58
|
checkById(_ids: string[]): void;
|
|
59
|
+
/** @internal 미구현 스텁(rowId 기반 체크 추가 API 예약). / @internal Unimplemented stub (reserved for a rowId-based add-check API). */
|
|
17
60
|
addCheckById(_ids: string[]): void;
|
|
61
|
+
/** @internal 미구현 스텁(rowId 기반 체크 해제 API 예약). / @internal Unimplemented stub (reserved for a rowId-based uncheck API). */
|
|
18
62
|
uncheckById(_ids: string[]): void;
|
|
63
|
+
/** 현재 선택된 행 데이터 배열을 반환한다(존재하지 않는 인덱스는 제외). / Return the currently selected row data (indexes with no backing row are skipped). */
|
|
19
64
|
getSelections(): T[];
|
|
65
|
+
/** 체크된 행을 `{ row, rowIndex }` 쌍의 배열로 반환한다. / Return checked rows as an array of `{ row, rowIndex }` pairs. */
|
|
20
66
|
getChecked(): Array<{
|
|
21
67
|
row: T;
|
|
22
68
|
rowIndex: number;
|
|
23
69
|
}>;
|
|
70
|
+
/** 체크된 행의 데이터만 배열로 반환한다. / Return only the row data of checked rows. */
|
|
24
71
|
getAllChecked(): T[];
|
|
72
|
+
/** 활성(선택) 행의 인덱스를 반환한다(없으면 -1). / Return the active (selected) row's index, or -1 if none. */
|
|
25
73
|
getActiveRow(): number;
|
|
74
|
+
/**
|
|
75
|
+
* 지정 행을 활성 상태로 만든다(단일 선택과 동일 동작). / Make the given row active (same effect as single-select).
|
|
76
|
+
*
|
|
77
|
+
* @param index - 활성화할 행의 flat index / Flat index of the row to activate
|
|
78
|
+
*/
|
|
26
79
|
activate(index: number): void;
|
|
80
|
+
/** 선택을 해제한다(활성 행 없음). / Deselect (no active row). */
|
|
27
81
|
deselect(): void;
|
|
82
|
+
/** 선택·체크 상태를 모두 초기화한다(주로 `setData`/`clearData` 시 호출). / Reset both selection and check state (typically called on `setData`/`clearData`). */
|
|
28
83
|
reset(): void;
|
|
29
84
|
}
|
|
@@ -1,53 +1,89 @@
|
|
|
1
1
|
import { SkinTokenDelta } from './types.js';
|
|
2
|
+
/** 스킨 정의 결과. / Result of a skin definition. */
|
|
2
3
|
export interface SkinDefineResult {
|
|
3
|
-
/** 실제 등록된(가드레일 클램프가 반영된) 델타. */
|
|
4
|
+
/** 실제 등록된(가드레일 클램프가 반영된) 델타. / The actually registered delta (with guardrail clamps applied). */
|
|
4
5
|
readonly delta: SkinTokenDelta;
|
|
5
|
-
/** 접근성 가드레일이 조정한 토큰 경고(있으면 콘솔에도 출력). */
|
|
6
|
+
/** 접근성 가드레일이 조정한 토큰 경고(있으면 콘솔에도 출력). / Warnings for tokens adjusted by accessibility guardrails (also logged to console when present). */
|
|
6
7
|
readonly warnings: string[];
|
|
7
8
|
}
|
|
8
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* 스킨 델타가 색 리터럴을 담고 있는지 검사하고, 위반 시 던진다(FORM-only, Rule 2).
|
|
11
|
+
* / Assert a skin delta carries no color literal; throws on violation (FORM-only, Rule 2).
|
|
12
|
+
*
|
|
13
|
+
* @param id - 스킨 id / Skin id
|
|
14
|
+
* @param delta - 검사할 토큰 델타 / Token delta to validate
|
|
15
|
+
* @throws FORM 토큰이 아니거나 색 리터럴이 있으면 Error / Throws if a non-FORM token or a color literal is present
|
|
16
|
+
*/
|
|
9
17
|
export declare function assertFormOnly(id: string, delta: SkinTokenDelta): void;
|
|
10
18
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
19
|
+
* 접근성 가드레일(불변식) 적용 — 정의 시점 클램프(§6.4).
|
|
20
|
+
* / Apply accessibility guardrails (invariants) — clamp at definition time (§6.4).
|
|
21
|
+
*
|
|
22
|
+
* - focus-width < 2px → 2px 로 클램프(가시 포커스 비협상). / clamp to 2px (visible focus is non-negotiable).
|
|
13
23
|
* - focus-style: none → solid.
|
|
24
|
+
*
|
|
14
25
|
* 반환은 조정된 델타 + 경고 목록(silent override 아님 — 무엇을 클램프했는지 알린다).
|
|
26
|
+
* / Returns the adjusted delta plus a warning list (not a silent override — it reports what was clamped).
|
|
27
|
+
*
|
|
28
|
+
* @param id - 스킨 id / Skin id
|
|
29
|
+
* @param delta - 조정할 토큰 델타 / Token delta to adjust
|
|
30
|
+
* @returns 조정된 델타 + 경고 목록 / Adjusted delta plus warnings
|
|
15
31
|
*/
|
|
16
32
|
export declare function applyGuardrails(id: string, delta: SkinTokenDelta): SkinDefineResult;
|
|
17
33
|
/**
|
|
18
34
|
* 프로세스 전역 스킨 등록소. defineSkin(사용자) 는 검증+가드레일+`<style>` 주입,
|
|
19
35
|
* registerBuiltin(내장) 은 검증+가드레일만(CSS 는 skins.css 정적 번들 소유).
|
|
36
|
+
* / Process-global skin registry. `define` (user) does validation + guardrails + `<style>` injection;
|
|
37
|
+
* `registerBuiltin` (built-in) does validation + guardrails only (CSS is owned by the skins.css static bundle).
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* skinRegistry.define('my-skin', { '--og-radius-md': '10px', '--og-border-style': 'solid' });
|
|
20
41
|
*/
|
|
21
42
|
export declare class SkinRegistry {
|
|
22
43
|
private _skins;
|
|
23
44
|
private _styleEl;
|
|
24
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* 내장 스킨 등록(주입 없음 — CSS 는 skins.css 가 전달). 검증/가드레일은 동일 적용.
|
|
47
|
+
* / Register a built-in skin (no injection — CSS is delivered by skins.css). Validation/guardrails still apply.
|
|
48
|
+
*
|
|
49
|
+
* @param id - 스킨 id / Skin id
|
|
50
|
+
* @param delta - FORM 토큰 델타 / FORM token delta
|
|
51
|
+
*/
|
|
25
52
|
registerBuiltin(id: string, delta: SkinTokenDelta): void;
|
|
26
53
|
/**
|
|
27
54
|
* 사용자 스킨 등록. FORM-only 검증 + 가드레일 클램프 후 런타임 `<style>` 로
|
|
28
55
|
* `.og-container[data-og-skin="id"]` 블록을 주입(브라우저 환경). 반환은 조정 결과.
|
|
56
|
+
* / Register a user skin. After FORM-only validation and guardrail clamps, injects a
|
|
57
|
+
* `.og-container[data-og-skin="id"]` block via a runtime `<style>` (browser env). Returns the adjusted result.
|
|
58
|
+
*
|
|
59
|
+
* @param id - 스킨 id / Skin id
|
|
60
|
+
* @param delta - FORM 토큰 델타 / FORM token delta
|
|
61
|
+
* @returns 조정된 델타 + 경고 목록 / Adjusted delta plus warnings
|
|
29
62
|
*/
|
|
30
63
|
define(id: string, delta: SkinTokenDelta): SkinDefineResult;
|
|
64
|
+
/** 스킨 id 등록 여부. / Whether a skin id is registered. */
|
|
31
65
|
has(id: string): boolean;
|
|
66
|
+
/** 등록된 스킨 델타 조회(없으면 undefined). / Get a registered skin delta (undefined if absent). */
|
|
32
67
|
get(id: string): SkinTokenDelta | undefined;
|
|
33
|
-
/** 등록된 모든 스킨 id(내장 + 사용자). */
|
|
68
|
+
/** 등록된 모든 스킨 id(내장 + 사용자). / All registered skin ids (built-in + user). */
|
|
34
69
|
list(): string[];
|
|
35
70
|
/** 런타임 `<style>` 주입(테스트/SSR 등 document 없으면 no-op). 같은 태그를 누적 사용. */
|
|
36
71
|
private _inject;
|
|
37
72
|
}
|
|
38
|
-
/** Sharp/Gothic — 엔터프라이즈 고밀도·각짐(§3.1).
|
|
73
|
+
/** Sharp/Gothic — 엔터프라이즈 고밀도·각짐(§3.1). / Sharp/Gothic — enterprise high-density, squared corners (§3.1). */
|
|
39
74
|
export declare const SKIN_SHARP: SkinTokenDelta;
|
|
40
|
-
/** Rounded — 소비자 SaaS 소프트(§3.2).
|
|
75
|
+
/** Rounded — 소비자 SaaS 소프트(§3.2). / Rounded — consumer-SaaS soft look (§3.2). */
|
|
41
76
|
export declare const SKIN_ROUNDED: SkinTokenDelta;
|
|
42
|
-
/** Stitch — 핸드크래프트(§3.3).
|
|
77
|
+
/** Stitch — 핸드크래프트(§3.3). 색(리넨/자수)은 theme 축. / Stitch — handcrafted look (§3.3); color (linen/embroidery) lives on the theme axis. */
|
|
43
78
|
export declare const SKIN_STITCH: SkinTokenDelta;
|
|
44
|
-
/** Flat/Minimal — 플랫 2.0(§3.5).
|
|
79
|
+
/** Flat/Minimal — 플랫 2.0(§3.5). / Flat/Minimal — flat 2.0 (§3.5). */
|
|
45
80
|
export declare const SKIN_FLAT: SkinTokenDelta;
|
|
46
|
-
/** High-Contrast — 접근성 우선·레퍼런스(§3.6).
|
|
81
|
+
/** High-Contrast — 접근성 우선·레퍼런스(§3.6). / High-Contrast — accessibility-first reference skin (§3.6). */
|
|
47
82
|
export declare const SKIN_HIGH_CONTRAST: SkinTokenDelta;
|
|
48
|
-
/** Material/Elevated —
|
|
83
|
+
/** Material/Elevated — 중간 반경 + 정직한 그림자 엘리베이션. / Material/Elevated — medium radius plus honest shadow elevation. */
|
|
49
84
|
export declare const SKIN_MATERIAL: SkinTokenDelta;
|
|
50
|
-
/** 내장 스킨 카탈로그(
|
|
85
|
+
/** 내장 스킨 카탈로그(확정 6종). id → 델타. / Built-in skin catalog (6 finalized skins). id → delta. */
|
|
51
86
|
export declare const BUILTIN_SKINS: ReadonlyArray<readonly [string, SkinTokenDelta]>;
|
|
52
|
-
/** 프로세스 전역 기본 레지스트리 — 내장 스킨을 부트스트랩 등록(주입 없음, CSS=skins.css).
|
|
87
|
+
/** 프로세스 전역 기본 레지스트리 — 내장 스킨을 부트스트랩 등록(주입 없음, CSS=skins.css).
|
|
88
|
+
* / Process-global default registry — bootstraps the built-in skins (no injection; CSS=skins.css). */
|
|
53
89
|
export declare const skinRegistry: SkinRegistry;
|
|
@@ -3,35 +3,116 @@ import { ColumnLayout } from './ColumnLayout.js';
|
|
|
3
3
|
import { VirtualScroll } from './VirtualScroll.js';
|
|
4
4
|
import { Pagination } from './Pagination.js';
|
|
5
5
|
import { SortItem, FilterItem } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* {@link SortFilterManager} 의존성 주입 계약. / Dependency-injection contract for {@link SortFilterManager}.
|
|
8
|
+
*
|
|
9
|
+
* 호스트 그리드가 데이터/렌더/i18n 접근을 함수로 넘겨 매니저를 데이터 소스와 분리한다.
|
|
10
|
+
* / The host grid passes data/render/i18n access as functions, decoupling the manager
|
|
11
|
+
* from its data source.
|
|
12
|
+
*/
|
|
6
13
|
export interface SortFilterDeps<T extends Record<string, any>> {
|
|
14
|
+
/** 현재 데이터 레이어 조회. / Look up the current data layer. */
|
|
7
15
|
getData: () => DataLayer<T>;
|
|
16
|
+
/** 현재 컬럼 레이아웃 조회. / Look up the current column layout. */
|
|
8
17
|
getColLayout: () => ColumnLayout<T>;
|
|
18
|
+
/** 통합검색(find) 필터 문자열 조회. / Look up the current find-filter string. */
|
|
9
19
|
getFindFilter: () => string;
|
|
20
|
+
/** 가상 스크롤 인스턴스 조회(없으면 `null`). / Look up the virtual-scroll instance (or `null`). */
|
|
10
21
|
getVs: () => VirtualScroll | null;
|
|
22
|
+
/** 페이지네이션 인스턴스 조회(없으면 `null`). / Look up the pagination instance (or `null`). */
|
|
11
23
|
getPagination: () => Pagination | null;
|
|
24
|
+
/** 현재 그리드 옵션 조회. / Look up the current grid options. */
|
|
12
25
|
getOptions: () => any;
|
|
26
|
+
/** 헤더(정렬/필터 표시)를 다시 그린다. / Re-render the header (sort/filter indicators). */
|
|
13
27
|
renderHeader: () => void;
|
|
28
|
+
/** 바디를 다시 그린다. / Re-render the body. */
|
|
14
29
|
doRender: () => void;
|
|
30
|
+
/** 스크린리더용 상태 안내. / Announce a status message for screen readers. */
|
|
15
31
|
announce: (msg: string) => void;
|
|
32
|
+
/** i18n: 정렬 상태어 + announce 해석. / i18n: resolve sort state words + announce. */
|
|
33
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
34
|
+
/** 그리드 이벤트를 발행한다. / Emit a grid event. */
|
|
16
35
|
emit: (event: string, ...args: any[]) => void;
|
|
17
|
-
/** C0.5/§2.5: 정렬/필터 후 F1 범위 선택을 rowId 집합 기준으로 재투영(해제 아님).
|
|
36
|
+
/** C0.5/§2.5: 정렬/필터 후 F1 범위 선택을 rowId 집합 기준으로 재투영(해제 아님).
|
|
37
|
+
* / C0.5/§2.5: after sort/filter, re-project the F1 range selection by its rowId
|
|
38
|
+
* set instead of clearing it. */
|
|
18
39
|
onReproject?: () => void;
|
|
19
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* 정렬·필터 상태와 적용을 담당하는 매니저. / Manages sort/filter state and their application.
|
|
43
|
+
*
|
|
44
|
+
* 정렬 목록(`SortItem[]`)과 컬럼별 필터(`FilterItem[]`)를 소유하고, 데이터 레이어에
|
|
45
|
+
* 적용한 뒤 헤더/바디 재렌더와 관련 이벤트 발행까지 처리한다.
|
|
46
|
+
* / Owns the sort list (`SortItem[]`) and per-column filters (`FilterItem[]`), applies
|
|
47
|
+
* them to the data layer, and drives header/body re-render plus related event emission.
|
|
48
|
+
*/
|
|
20
49
|
export declare class SortFilterManager<T extends Record<string, any> = any> {
|
|
21
50
|
private _sortList;
|
|
22
51
|
private _filters;
|
|
23
52
|
private _d;
|
|
24
53
|
constructor(deps: SortFilterDeps<T>);
|
|
54
|
+
/** 현재 정렬 목록(원본 참조). / Current sort list (live reference). */
|
|
25
55
|
get sortList(): SortItem[];
|
|
56
|
+
/** 컬럼 field 별 필터 목록(원본 참조). / Filter items keyed by column field (live reference). */
|
|
26
57
|
get filters(): Record<string, FilterItem[]>;
|
|
58
|
+
/**
|
|
59
|
+
* 헤더 정렬 클릭을 처리한다(단일/다중 정렬 토글). / Handle a header sort click (toggles single/multi sort).
|
|
60
|
+
*
|
|
61
|
+
* 같은 필드를 다시 클릭하면 asc→desc→해제 순으로 순환한다. `shiftKey` 와
|
|
62
|
+
* `multiSort` 옵션이 모두 켜져야 다중 정렬 목록에 누적된다.
|
|
63
|
+
* / Re-clicking the same field cycles asc → desc → removed. Multi-sort only
|
|
64
|
+
* accumulates when both `shiftKey` and the `multiSort` option are on.
|
|
65
|
+
*
|
|
66
|
+
* @param field - 정렬 대상 컬럼 field 명 / Column field to sort by
|
|
67
|
+
* @param shiftKey - 다중 정렬 결합 키(Shift) 눌림 여부 / Whether the multi-sort modifier (Shift) was held
|
|
68
|
+
*/
|
|
27
69
|
handleSortClick(field: string, shiftKey: boolean): void;
|
|
70
|
+
/**
|
|
71
|
+
* 프로그램적으로 정렬을 설정한다(단일 필드+방향, 또는 전체 정렬 목록). / Set sort programmatically (single field+direction, or a full sort list).
|
|
72
|
+
*
|
|
73
|
+
* @param fieldOrList - 정렬할 필드명, 또는 대체할 전체 `SortItem[]` / Field to sort by, or a full `SortItem[]` to replace the current list
|
|
74
|
+
* @param dir - `fieldOrList` 가 문자열일 때의 정렬 방향(기본 `'asc'`) / Sort direction when `fieldOrList` is a string (default `'asc'`)
|
|
75
|
+
* @example
|
|
76
|
+
* mgr.sort('name', 'desc');
|
|
77
|
+
* mgr.sort([{ field: 'age', dir: 'asc' }]);
|
|
78
|
+
*/
|
|
28
79
|
sort(fieldOrList: string | SortItem[], dir?: 'asc' | 'desc'): void;
|
|
80
|
+
/** 모든 정렬을 해제한다. / Clear all sorting. */
|
|
29
81
|
resetSort(): void;
|
|
82
|
+
/**
|
|
83
|
+
* 초기 정렬 목록을 조용히 적용한다(렌더/이벤트 없이 데이터만). / Silently seed the initial sort list (data only, no render/events).
|
|
84
|
+
*
|
|
85
|
+
* @param sortList - 초기화 시 적용할 정렬 목록 / Sort list to apply at initialization
|
|
86
|
+
*/
|
|
30
87
|
initSort(sortList: SortItem[]): void;
|
|
88
|
+
/** 현재 정렬 목록의 복사본을 반환한다. / Return a copy of the current sort list. */
|
|
31
89
|
getSortState(): SortItem[];
|
|
90
|
+
/**
|
|
91
|
+
* 특정 컬럼의 필터를 설정하고 적용한다. / Set and apply the filter for one column.
|
|
92
|
+
*
|
|
93
|
+
* @param field - 필터를 적용할 컬럼 field 명 / Column field to filter
|
|
94
|
+
* @param filterItems - 적용할 필터 조건 목록 / Filter conditions to apply
|
|
95
|
+
*/
|
|
32
96
|
setFilter(field: string, filterItems: FilterItem[]): void;
|
|
97
|
+
/**
|
|
98
|
+
* 필터를 해제한다(필드 지정 시 해당 필드만, 생략 시 전체). / Clear filters (one field if given, otherwise all).
|
|
99
|
+
*
|
|
100
|
+
* @param field - 해제할 컬럼 field 명. 생략하면 전체 필터 해제 / Column field to clear; omit to clear every filter
|
|
101
|
+
*/
|
|
33
102
|
resetFilter(field?: string): void;
|
|
103
|
+
/** 현재 컬럼별 필터 상태의 복사본을 반환한다. / Return a copy of the current per-column filter state. */
|
|
34
104
|
getFilterState(): Record<string, FilterItem[]>;
|
|
105
|
+
/**
|
|
106
|
+
* 저장된 필터 상태를 복원하고 재적용한다(헤더/바디 재렌더는 호출측 책임). / Restore a saved filter state and reapply it (caller is responsible for header/body re-render).
|
|
107
|
+
*
|
|
108
|
+
* @param state - 복원할 컬럼별 필터 상태 / Per-column filter state to restore
|
|
109
|
+
*/
|
|
35
110
|
restoreFilter(state: Record<string, FilterItem[]>): void;
|
|
111
|
+
/**
|
|
112
|
+
* 통합검색 + 컬럼 필터를 데이터 레이어에 적용하고 행수를 재투영한다. / Apply find-filter and column filters to the data layer, then re-project row counts.
|
|
113
|
+
*
|
|
114
|
+
* 정렬과 달리 이 메서드는 헤더/바디를 직접 재렌더하지 않는다(호출측이 필요 시 처리).
|
|
115
|
+
* / Unlike sorting, this does not re-render header/body itself (callers handle that as needed).
|
|
116
|
+
*/
|
|
36
117
|
applyFilters(): void;
|
|
37
118
|
}
|
|
@@ -1,9 +1,55 @@
|
|
|
1
1
|
import { TriggerContext, TriggerHandler, TriggerEvent } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* before/after 트리거 훅 레지스트리. / Registry for before/after trigger hooks.
|
|
4
|
+
*
|
|
5
|
+
* 그리드 연산(`operation`) 앞뒤로 사용자 핸들러를 실행한다. `before:*` 훅은
|
|
6
|
+
* 컨텍스트를 `cancel()` 하여 연산을 취소할 수 있고, `after:*` 훅 뒤에는 `complete`
|
|
7
|
+
* 훅이 추가로 실행된다.
|
|
8
|
+
* / Runs user handlers around grid operations. A `before:*` hook may cancel the
|
|
9
|
+
* operation via `ctx.cancel()`; after any `after:*` hook, registered `complete`
|
|
10
|
+
* hooks also fire.
|
|
11
|
+
*/
|
|
2
12
|
export declare class TriggerManager {
|
|
3
13
|
private _triggers;
|
|
14
|
+
/**
|
|
15
|
+
* 트리거 이벤트에 핸들러를 등록한다. / Register a handler for a trigger event.
|
|
16
|
+
*
|
|
17
|
+
* @param event - 트리거 이벤트명(예: `before:setValue`) / Trigger event name (e.g. `before:setValue`)
|
|
18
|
+
* @param handler - 실행할 핸들러 / Handler to run
|
|
19
|
+
*/
|
|
4
20
|
add(event: TriggerEvent | string, handler: TriggerHandler): void;
|
|
21
|
+
/**
|
|
22
|
+
* 등록된 핸들러를 제거한다. / Remove a previously registered handler.
|
|
23
|
+
*
|
|
24
|
+
* @param event - 트리거 이벤트명 / Trigger event name
|
|
25
|
+
* @param handler - 제거할 핸들러(등록 시와 동일 참조) / Handler to remove (same reference used at registration)
|
|
26
|
+
*/
|
|
5
27
|
remove(event: TriggerEvent | string, handler: TriggerHandler): void;
|
|
28
|
+
/**
|
|
29
|
+
* 특정 이벤트 또는 전체 트리거를 해제한다. / Clear one event's triggers, or all of them.
|
|
30
|
+
*
|
|
31
|
+
* @param event - 지우려는 이벤트명. 생략하면 전체 삭제 / Event to clear; omit to clear everything
|
|
32
|
+
*/
|
|
6
33
|
clear(event?: TriggerEvent | string): void;
|
|
34
|
+
/**
|
|
35
|
+
* 트리거 실행용 컨텍스트 객체를 생성한다. / Build a context object for trigger execution.
|
|
36
|
+
*
|
|
37
|
+
* @param operation - 연산 이름 / Operation name
|
|
38
|
+
* @param args - 연산 인자 배열 / Operation argument array
|
|
39
|
+
* @returns `cancel()` 로 취소 가능한 트리거 컨텍스트 / A trigger context cancellable via `cancel()`
|
|
40
|
+
*/
|
|
7
41
|
mkCtx(operation: string, args: any[]): TriggerContext;
|
|
42
|
+
/**
|
|
43
|
+
* 이벤트에 등록된 핸들러를 순차 실행한다. / Run handlers registered for an event, in order.
|
|
44
|
+
*
|
|
45
|
+
* `before:*` 훅 중 하나라도 `ctx.cancel()` 을 호출하면 즉시 중단하고 `false` 를
|
|
46
|
+
* 반환한다. `after:*` 이벤트는 완료 후 `complete` 훅도 실행한다.
|
|
47
|
+
* / If any `before:*` hook calls `ctx.cancel()`, execution stops immediately and
|
|
48
|
+
* returns `false`. For `after:*` events, `complete` hooks also run afterward.
|
|
49
|
+
*
|
|
50
|
+
* @param event - 실행할 이벤트명 / Event name to run
|
|
51
|
+
* @param ctx - 트리거 컨텍스트 / Trigger context
|
|
52
|
+
* @returns 취소되지 않았으면 `true` / `true` unless the operation was cancelled
|
|
53
|
+
*/
|
|
8
54
|
exec(event: string, ctx: TriggerContext): boolean;
|
|
9
55
|
}
|
|
@@ -1,23 +1,85 @@
|
|
|
1
1
|
import { ColumnDef, WorksheetState } from './types.js';
|
|
2
|
+
/** 시트 전환 시 호출되는 콜백. / Callback invoked when the active sheet switches. */
|
|
2
3
|
export type SwitchCallback<T> = (name: string, state: WorksheetState<T>) => void;
|
|
4
|
+
/** i18n: 탭 UI aria 해석기(주입 없으면 전역 t). / i18n: tab-UI aria resolver (global t when not injected). */
|
|
5
|
+
export type WorksheetT = (key: string, params?: Record<string, string | number>) => string;
|
|
6
|
+
/**
|
|
7
|
+
* 그리드 다중 워크시트(탭) 관리자. / Manages the grid's multiple worksheets (tabs).
|
|
8
|
+
*
|
|
9
|
+
* 시트별로 독립적인 `columns`/`data` 를 `Map` 으로 보유하고, 탭 클릭 시
|
|
10
|
+
* `onSwitch` 콜백을 통해 `OpenGrid.setData`/`applyColumns` 로 화면을 전환시킨다.
|
|
11
|
+
* 탭 UI는 그리드 컨테이너 하단에 `.og-sheet-tabs` 영역으로 삽입된다.
|
|
12
|
+
* / Holds independent `columns`/`data` per sheet in a `Map`; a tab click drives the
|
|
13
|
+
* `onSwitch` callback, which the caller uses to run `OpenGrid.setData`/`applyColumns`.
|
|
14
|
+
* The tab UI is inserted as a `.og-sheet-tabs` region at the bottom of the grid container.
|
|
15
|
+
*/
|
|
3
16
|
export declare class WorksheetManager<T extends Record<string, any> = any> {
|
|
4
17
|
private _sheets;
|
|
5
18
|
private _active;
|
|
6
19
|
private _tabBar;
|
|
7
20
|
private _onSwitch;
|
|
8
|
-
|
|
21
|
+
private _t;
|
|
22
|
+
constructor(container: HTMLElement, onSwitch: SwitchCallback<T>, t?: WorksheetT);
|
|
23
|
+
/**
|
|
24
|
+
* 새 시트를 추가한다. / Add a new sheet.
|
|
25
|
+
*
|
|
26
|
+
* 첫 번째로 추가되는 시트는 자동으로 활성화된다. / The first sheet ever added is auto-activated.
|
|
27
|
+
*
|
|
28
|
+
* @param name - 시트 이름(고유해야 함) / Sheet name (must be unique)
|
|
29
|
+
* @param columns - 시트 컬럼 정의(기본 빈 배열) / Sheet column definitions (default empty array)
|
|
30
|
+
* @param data - 시트 초기 데이터(기본 빈 배열) / Initial sheet data (default empty array)
|
|
31
|
+
*/
|
|
9
32
|
add(name: string, columns?: ColumnDef<T>[], data?: T[]): void;
|
|
33
|
+
/**
|
|
34
|
+
* 시트를 제거한다. / Remove a sheet.
|
|
35
|
+
*
|
|
36
|
+
* 마지막 남은 시트는 제거할 수 없다(예외 발생). 활성 시트를 제거하면 남은 시트 중
|
|
37
|
+
* 첫 번째로 자동 전환한다. / The last remaining sheet cannot be removed (throws).
|
|
38
|
+
* Removing the active sheet auto-switches to the first remaining sheet.
|
|
39
|
+
*
|
|
40
|
+
* @param name - 제거할 시트 이름 / Name of the sheet to remove
|
|
41
|
+
*/
|
|
10
42
|
remove(name: string): void;
|
|
43
|
+
/**
|
|
44
|
+
* 시트 이름을 변경한다. / Rename a sheet.
|
|
45
|
+
*
|
|
46
|
+
* 삽입 순서(`Map` 순회 순서) 유지를 위해 내부적으로 시트 맵을 재구성한다.
|
|
47
|
+
* / Internally rebuilds the sheet map to preserve insertion order (`Map` iteration order).
|
|
48
|
+
*
|
|
49
|
+
* @param oldName - 기존 시트 이름 / Current sheet name
|
|
50
|
+
* @param newName - 새 시트 이름(고유해야 함) / New sheet name (must be unique)
|
|
51
|
+
*/
|
|
11
52
|
rename(oldName: string, newName: string): void;
|
|
53
|
+
/**
|
|
54
|
+
* 지정 시트를 활성화하고 `onSwitch` 콜백을 실행한다. / Activate the given sheet and invoke the `onSwitch` callback.
|
|
55
|
+
*
|
|
56
|
+
* @param name - 활성화할 시트 이름 / Name of the sheet to activate
|
|
57
|
+
*/
|
|
12
58
|
switch(name: string): void;
|
|
59
|
+
/**
|
|
60
|
+
* 시트 상태를 조회한다. / Look up a sheet's state.
|
|
61
|
+
*
|
|
62
|
+
* @param name - 조회할 시트 이름 / Name of the sheet to look up
|
|
63
|
+
* @returns 시트 상태, 없으면 `undefined` / The sheet state, or `undefined`
|
|
64
|
+
*/
|
|
13
65
|
get(name: string): WorksheetState<T> | undefined;
|
|
66
|
+
/** 등록된 모든 시트 이름 목록(삽입 순서). / Names of all registered sheets, in insertion order. */
|
|
14
67
|
getNames(): string[];
|
|
68
|
+
/** 현재 활성 시트 이름. / Name of the currently active sheet. */
|
|
15
69
|
getActive(): string;
|
|
16
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* 지정 시트의 데이터를 갱신한다(그리드 편집 동기화용). / Update a sheet's data (for syncing grid edits back).
|
|
72
|
+
*
|
|
73
|
+
* @param name - 갱신할 시트 이름 / Name of the sheet to update
|
|
74
|
+
* @param data - 새 데이터 배열 / New data array
|
|
75
|
+
*/
|
|
17
76
|
syncData(name: string, data: T[]): void;
|
|
77
|
+
/** 탭 바 DOM 을 제거한다. / Remove the tab-bar DOM. */
|
|
18
78
|
destroy(): void;
|
|
79
|
+
/** @internal 탭 바 컨테이너를 생성해 그리드 컨테이너에 삽입한다. / Creates the tab-bar container and appends it to the grid container. */
|
|
19
80
|
private _buildTabBar;
|
|
81
|
+
/** @internal 탭 바를 전체 재렌더한다(시트 목록 + '+' 버튼). / Fully re-renders the tab bar (sheet list + '+' button). */
|
|
20
82
|
private _renderTabs;
|
|
21
|
-
/** 탭 더블클릭 → input으로 전환해 이름
|
|
83
|
+
/** @internal 탭 더블클릭 → input으로 전환해 이름 변경. / Double-click on a tab switches it to an input for inline rename. */
|
|
22
84
|
private _startRename;
|
|
23
85
|
}
|
|
@@ -1,74 +1,104 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* XmlConverter — XML ↔ 그리드 데이터 양방향 변환 유틸리티.
|
|
3
|
+
* / XmlConverter — bidirectional XML ↔ grid-data conversion utility.
|
|
3
4
|
*
|
|
4
|
-
* 지원
|
|
5
|
+
* 지원 포맷 / Supported formats:
|
|
5
6
|
* A. Element 방식 <row><name>홍길동</name></row>
|
|
6
7
|
* B. Attribute 방식 <row name="홍길동" />
|
|
7
8
|
* C. SAP BAPI XML 응답 <RETURN><TYPE>S</TYPE><BELNR>...</BELNR></RETURN>
|
|
8
9
|
* D. SAP IDoc XML <IDOC><E1HEADER SEGMENT="1"><BUKRS>1000</BUKRS></IDOC>
|
|
9
10
|
*
|
|
10
11
|
* 외부 의존성 없음 — 브라우저 내장 DOMParser 사용.
|
|
12
|
+
* / No external dependency — uses the browser's built-in DOMParser.
|
|
11
13
|
*/
|
|
14
|
+
/** XML → 데이터 파싱 옵션. / Options for parsing XML into data. */
|
|
12
15
|
export interface XmlParseOptions {
|
|
13
|
-
/** 루트 엘리먼트
|
|
16
|
+
/** 루트 엘리먼트 태그명. 생략 시 문서 루트 자동 사용. / Root element tag name; falls back to the document root when omitted. */
|
|
14
17
|
rootTag?: string;
|
|
15
|
-
/** 행 엘리먼트
|
|
18
|
+
/** 행 엘리먼트 태그명. 생략 시 루트의 첫 번째 자식 자동 감지. / Row element tag name; auto-detected from the root's first child when omitted. */
|
|
16
19
|
rowTag?: string;
|
|
17
|
-
/** 값 추출 방식: 'element' | 'attribute' | 'auto'(기본) */
|
|
20
|
+
/** 값 추출 방식: 'element' | 'attribute' | 'auto'(기본). / Value extraction mode: 'element' | 'attribute' | 'auto' (default). @defaultValue 'auto' */
|
|
18
21
|
mode?: 'element' | 'attribute' | 'auto';
|
|
19
|
-
/** XML 태그명 → 그리드 field명
|
|
22
|
+
/** XML 태그명 → 그리드 field명 매핑. 생략 시 태그명 그대로 사용. / XML tag name → grid field name map; tag names are used as-is when omitted. */
|
|
20
23
|
fieldMap?: Record<string, string>;
|
|
21
|
-
/** 텍스트 값 앞뒤 공백
|
|
24
|
+
/** 텍스트 값 앞뒤 공백 제거. 기본 true. / Trim whitespace around text values. Default true. @defaultValue true */
|
|
22
25
|
trim?: boolean;
|
|
23
26
|
}
|
|
27
|
+
/** 데이터 → XML 직렬화 옵션. / Options for serializing data into XML. */
|
|
24
28
|
export interface XmlStringifyOptions {
|
|
25
|
-
/** 루트
|
|
29
|
+
/** 루트 태그명. 기본 'rows'. / Root tag name. Default 'rows'. @defaultValue 'rows' */
|
|
26
30
|
rootTag?: string;
|
|
27
|
-
/** 행
|
|
31
|
+
/** 행 태그명. 기본 'row'. / Row tag name. Default 'row'. @defaultValue 'row' */
|
|
28
32
|
rowTag?: string;
|
|
29
|
-
/** 출력 방식: 'element'(기본) | 'attribute' */
|
|
33
|
+
/** 출력 방식: 'element'(기본) | 'attribute'. / Output mode: 'element' (default) | 'attribute'. @defaultValue 'element' */
|
|
30
34
|
mode?: 'element' | 'attribute';
|
|
31
|
-
/** 그리드 field명 → XML 태그명
|
|
35
|
+
/** 그리드 field명 → XML 태그명 매핑. / Grid field name → XML tag name map. */
|
|
32
36
|
fieldMap?: Record<string, string>;
|
|
33
|
-
/** XML 선언부 포함
|
|
37
|
+
/** XML 선언부 포함 여부. 기본 true. / Whether to include the XML declaration. Default true. @defaultValue true */
|
|
34
38
|
declaration?: boolean;
|
|
35
|
-
/** 들여쓰기 공백
|
|
39
|
+
/** 들여쓰기 공백 수. 기본 2. / Indentation space count. Default 2. @defaultValue 2 */
|
|
36
40
|
indent?: number;
|
|
37
|
-
/** null/undefined 처리
|
|
41
|
+
/** null/undefined 처리 문자열. 기본 ''. / String used for null/undefined values. Default ''. @defaultValue '' */
|
|
38
42
|
nullAs?: string;
|
|
39
|
-
/** 출력에서 제외할 필드
|
|
43
|
+
/** 출력에서 제외할 필드 목록. / Field names to exclude from the output. */
|
|
40
44
|
excludeFields?: string[];
|
|
41
45
|
}
|
|
46
|
+
/** SAP XML 파싱 결과 구조. / Result structure of SAP XML parsing. */
|
|
42
47
|
export interface SapParseResult {
|
|
48
|
+
/** 문서 헤더(DOCUMENTHEADER) 필드 맵. / Document header (DOCUMENTHEADER) field map. */
|
|
43
49
|
header: Record<string, string>;
|
|
50
|
+
/** 라인 아이템 행 배열. / Line-item row array. */
|
|
44
51
|
items: Record<string, string>[];
|
|
52
|
+
/** RETURN 메시지 행 배열(복수). / RETURN message rows (may be multiple). */
|
|
45
53
|
returns: Record<string, string>[];
|
|
54
|
+
/** 파싱에 사용한 원본 Document(선택). / The source Document used for parsing (optional). */
|
|
46
55
|
raw?: Document;
|
|
47
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* XML ↔ 그리드 데이터 변환기(정적 메서드 모음). / XML ↔ grid-data converter (static methods).
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* const rows = XmlConverter.parse('<rows><row><name>Kim</name></row></rows>');
|
|
62
|
+
* const xml = XmlConverter.stringify(rows);
|
|
63
|
+
*/
|
|
48
64
|
export declare class XmlConverter {
|
|
49
65
|
/**
|
|
50
|
-
* XML 문자열을 파싱하여 그리드 데이터 배열로 변환.
|
|
51
|
-
*
|
|
66
|
+
* XML 문자열을 파싱하여 그리드 데이터 배열로 변환. Element / Attribute 방식 자동 감지.
|
|
67
|
+
* / Parse an XML string into a grid-data array. Auto-detects element vs. attribute style.
|
|
52
68
|
*
|
|
53
|
-
* @
|
|
69
|
+
* @param xml - 파싱할 XML 문자열 / XML string to parse
|
|
70
|
+
* @param options - 파싱 옵션 / Parse options
|
|
71
|
+
* @returns 행 객체 배열 / Array of row objects
|
|
72
|
+
* @throws XML 파싱 오류 시 Error 발생 / Throws an Error on XML parse failure
|
|
54
73
|
*/
|
|
55
74
|
static parse(xml: string, options?: XmlParseOptions): Record<string, any>[];
|
|
56
75
|
/**
|
|
57
|
-
* 그리드 데이터 배열을 XML 문자열로 직렬화.
|
|
76
|
+
* 그리드 데이터 배열을 XML 문자열로 직렬화. / Serialize a grid-data array into an XML string.
|
|
77
|
+
*
|
|
78
|
+
* @param data - 직렬화할 행 배열 / Row array to serialize
|
|
79
|
+
* @param options - 직렬화 옵션 / Serialize options
|
|
80
|
+
* @returns XML 문자열 / XML string
|
|
58
81
|
*/
|
|
59
82
|
static stringify(data: Record<string, any>[], options?: XmlStringifyOptions): string;
|
|
60
83
|
/**
|
|
61
84
|
* SAP BAPI XML 응답을 파싱하여 { header, items, returns } 구조로 반환.
|
|
85
|
+
* / Parse a SAP BAPI XML response into a { header, items, returns } structure.
|
|
62
86
|
*
|
|
63
|
-
* 지원
|
|
87
|
+
* 지원 패턴 / Supported patterns:
|
|
64
88
|
* <DOCUMENTHEADER>...</DOCUMENTHEADER>
|
|
65
89
|
* <ACCOUNTGL><ITEM>...</ITEM></ACCOUNTGL>
|
|
66
90
|
* <RETURN><TYPE>S</TYPE><MESSAGE>...</MESSAGE></RETURN>
|
|
91
|
+
*
|
|
92
|
+
* @param xml - SAP BAPI XML 응답 문자열 / SAP BAPI XML response string
|
|
93
|
+
* @returns 파싱 결과 구조 / Parsed result structure
|
|
67
94
|
*/
|
|
68
95
|
static parseSap(xml: string): SapParseResult;
|
|
69
96
|
/**
|
|
70
|
-
* BAPI 페이로드 객체를 SAP XML 형식으로 직렬화.
|
|
71
|
-
* sapGenPayload()
|
|
97
|
+
* BAPI 페이로드 객체를 SAP XML 형식으로 직렬화. sapGenPayload() 결과 또는 단일 document 객체를 받음.
|
|
98
|
+
* / Serialize a BAPI payload object into SAP XML. Accepts a sapGenPayload() result or a single document object.
|
|
99
|
+
*
|
|
100
|
+
* @param payload - BAPI 페이로드 객체 / BAPI payload object
|
|
101
|
+
* @returns SAP XML 문자열 / SAP XML string
|
|
72
102
|
*/
|
|
73
103
|
static stringifySap(payload: {
|
|
74
104
|
BAPI_FUNCTION?: string;
|
|
@@ -77,8 +107,11 @@ export declare class XmlConverter {
|
|
|
77
107
|
[key: string]: any;
|
|
78
108
|
}): string;
|
|
79
109
|
/**
|
|
80
|
-
* sapGenPayload()의 { totalDocuments, documents[] } 결과를
|
|
81
|
-
*
|
|
110
|
+
* sapGenPayload() 의 { totalDocuments, documents[] } 결과를 다건 BAPI XML 로 직렬화.
|
|
111
|
+
* / Serialize a sapGenPayload() { totalDocuments, documents[] } result into a multi-document BAPI XML.
|
|
112
|
+
*
|
|
113
|
+
* @param payload - documents 배열을 담은 페이로드 / Payload holding the documents array
|
|
114
|
+
* @returns 다건 BAPI XML 문자열 / Multi-document BAPI XML string
|
|
82
115
|
*/
|
|
83
116
|
static stringifySapBatch(payload: {
|
|
84
117
|
documents: any[];
|