open-grid 1.6.0 → 1.7.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 +62 -0
- package/dist/ExportProgressView-9Kt1SQxv.js +48 -0
- package/dist/ExportProgressView-B59uHIwt.cjs +48 -0
- package/dist/LcpMergeOrderer-BdUtV67j.js +114 -0
- package/dist/LcpMergeOrderer-C_ANVkGk.cjs +113 -0
- package/dist/OpenGrid-BUYQs1_w.cjs +9806 -0
- package/dist/OpenGrid-BmagF0yo.js +9819 -0
- package/dist/XlsxChannel-DOeHeP7h.cjs +95 -0
- package/dist/XlsxChannel-DdaiytFR.js +95 -0
- package/dist/XlsxWorkbookWriter-BTNtZ80J.js +199 -0
- package/dist/XlsxWorkbookWriter-_u5stfg4.cjs +198 -0
- package/dist/{index-Brnev66-.js → index-B9_g5Eg3.js} +2 -2
- package/dist/{index-B_e5BXnW.cjs → index-CnyumyPV.cjs} +2 -2
- package/dist/open-grid-a11y.cjs +216 -0
- package/dist/open-grid-a11y.js +219 -0
- package/dist/open-grid-base.css +9 -0
- package/dist/open-grid-header.css +6 -15
- 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 -2
- package/dist/open-grid.js +6 -3
- package/dist/sinks-BWkWQexV.js +149 -0
- package/dist/sinks-DPK0VxYG.cjs +143 -0
- package/dist/types/a11y/index.d.ts +37 -0
- package/dist/types/core/CFRenderBridge.d.ts +5 -1
- package/dist/types/core/CellEditManager.d.ts +26 -2
- package/dist/types/core/CellEventHandler.d.ts +6 -2
- package/dist/types/core/ColumnLayout.d.ts +11 -3
- package/dist/types/core/DataLayer.d.ts +48 -1
- package/dist/types/core/DetailManager.d.ts +43 -2
- package/dist/types/core/ExportManager.d.ts +26 -6
- package/dist/types/core/FindBarManager.d.ts +6 -2
- package/dist/types/core/FlatRowModel.d.ts +69 -3
- package/dist/types/core/FooterManager.d.ts +43 -1
- package/dist/types/core/FormulaController.d.ts +4 -4
- package/dist/types/core/GridComposer.d.ts +11 -1
- package/dist/types/core/GridRenderer.d.ts +84 -19
- package/dist/types/core/GroupTreeManager.d.ts +6 -4
- package/dist/types/core/KeyboardManager.d.ts +3 -2
- package/dist/types/core/MergeEngine.d.ts +45 -5
- package/dist/types/core/MutationService.d.ts +14 -17
- package/dist/types/core/OpenGrid.d.ts +350 -12
- package/dist/types/core/OrgChart.d.ts +24 -0
- package/dist/types/core/RangeSelectionManager.d.ts +23 -2
- package/dist/types/core/RenderController.d.ts +126 -8
- package/dist/types/core/RowDragDrop.d.ts +2 -0
- package/dist/types/core/SortFilterManager.d.ts +18 -2
- package/dist/types/core/VirtualScroll.d.ts +12 -0
- package/dist/types/core/WorksheetManager.d.ts +2 -2
- package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +321 -20
- package/dist/types/core/a11y/LiveRegionController.d.ts +229 -27
- package/dist/types/core/a11y/VisualEquivRegistry.d.ts +199 -14
- package/dist/types/core/appearance/TextureRegistry.d.ts +10 -0
- package/dist/types/core/cf/CFRule.d.ts +145 -22
- package/dist/types/core/coordinate/CellTextPolicy.d.ts +58 -0
- package/dist/types/core/coordinate/ColumnGeometry.d.ts +60 -0
- package/dist/types/core/coordinate/ColumnWindow.d.ts +40 -0
- package/dist/types/core/coordinate/ColumnWindowPolicy.d.ts +89 -0
- package/dist/types/core/coordinate/ExtraColumns.d.ts +39 -0
- package/dist/types/core/coordinate/RangeRectCalculator.d.ts +35 -0
- package/dist/types/core/coordinate/ViewportHeightJudge.d.ts +28 -0
- package/dist/types/core/coordinate/geometryPorts.d.ts +250 -0
- package/dist/types/core/coordinate/ports.d.ts +5 -0
- package/dist/types/core/domain/footer/FooterValues.d.ts +50 -0
- package/dist/types/core/domain/footer/ports.d.ts +31 -0
- package/dist/types/core/domain/render/RenderPlanner.d.ts +17 -0
- package/dist/types/core/domain/render/RenderRequest.d.ts +91 -0
- package/dist/types/core/domain/render/ports.d.ts +169 -0
- package/dist/types/core/domain/resize/ResizeGesture.d.ts +25 -0
- package/dist/types/core/domain/resize/ResizeHitZone.d.ts +23 -0
- package/dist/types/core/domain/resize/ports.d.ts +64 -0
- package/dist/types/core/domain/sort/ComparisonOrderer.d.ts +11 -0
- package/dist/types/core/domain/sort/LcpMergeOrderer.d.ts +15 -0
- package/dist/types/core/domain/sort/RankIndex.d.ts +74 -0
- package/dist/types/core/domain/sort/SortCostEstimate.d.ts +36 -0
- package/dist/types/core/domain/sort/SortKeyColumn.d.ts +89 -0
- package/dist/types/core/domain/sort/SortKeyStore.d.ts +34 -0
- package/dist/types/core/domain/sort/Sorter.d.ts +54 -0
- package/dist/types/core/domain/sort/SyncSortRunner.d.ts +9 -0
- package/dist/types/core/domain/sort/commonPrefix.d.ts +5 -0
- package/dist/types/core/domain/sort/ports.d.ts +140 -0
- package/dist/types/core/export/ExportProgressView.d.ts +28 -0
- package/dist/types/core/export/channels/XlsxChannel.d.ts +29 -0
- package/dist/types/core/export/channels/XlsxWorkbookWriter.d.ts +17 -0
- package/dist/types/core/export/index.d.ts +2 -0
- package/dist/types/core/export/sinks.d.ts +81 -0
- package/dist/types/core/host/archCheck.d.ts +16 -1
- package/dist/types/core/i18n/locales/en.d.ts +6 -0
- package/dist/types/core/i18n/locales/ko.d.ts +6 -0
- package/dist/types/core/i18n/types.d.ts +8 -0
- package/dist/types/core/render/FooterView.d.ts +121 -0
- package/dist/types/core/render/GeometryApplier.d.ts +55 -0
- package/dist/types/core/render/HorizontalReveal.d.ts +26 -0
- package/dist/types/core/render/RangeOverlayAdapter.d.ts +10 -0
- package/dist/types/core/render/RenderScheduler.d.ts +225 -0
- package/dist/types/core/render/ResizeSinkAdapter.d.ts +35 -0
- package/dist/types/core/render/ScrollFollower.d.ts +34 -0
- package/dist/types/core/render/ScrollObserver.d.ts +47 -0
- package/dist/types/core/render/ScrollbarGutter.d.ts +19 -0
- package/dist/types/core/render/body/BodyEventRouter.d.ts +58 -0
- package/dist/types/core/render/body/BodyRowSet.d.ts +28 -0
- package/dist/types/core/render/body/BodyView.d.ts +185 -0
- package/dist/types/core/render/body/CellLocator.d.ts +36 -0
- package/dist/types/core/render/body/CellRegistry.d.ts +24 -0
- package/dist/types/core/render/body/ColumnPaintPlan.d.ts +19 -0
- package/dist/types/core/render/body/ExtraCellPainters.d.ts +20 -0
- package/dist/types/core/render/body/rows/BodyRowContext.d.ts +138 -0
- package/dist/types/core/render/body/rows/DataRowPainter.d.ts +58 -0
- package/dist/types/core/render/body/rows/DetailRowPainter.d.ts +24 -0
- package/dist/types/core/render/body/rows/GroupRowPainter.d.ts +32 -0
- package/dist/types/core/render/body/rows/RowPainterTable.d.ts +24 -0
- package/dist/types/core/render/body/rows/WindowLayout.d.ts +38 -0
- package/dist/types/core/render/dom.d.ts +10 -0
- package/dist/types/core/render/header/HeaderSortIndicator.d.ts +39 -0
- package/dist/types/core/render/header/HeaderView.d.ts +84 -0
- package/dist/types/core/render/header/ResizeHandleBinder.d.ts +110 -0
- package/dist/types/core/render/ports.d.ts +218 -0
- package/dist/types/core/renderers/CellRenderer.d.ts +7 -0
- package/dist/types/core/types.d.ts +572 -22
- package/dist/types/index.d.ts +31 -1
- package/dist/types/vue/OpenGrid.vue.d.ts +2 -2
- package/package.json +8 -9
- package/dist/OpenGrid-DgZtbVD0.cjs +0 -7390
- package/dist/OpenGrid-E11B7Xa7.js +0 -7403
|
@@ -7,6 +7,7 @@ import { RowManager } from './RowManager.js';
|
|
|
7
7
|
import { GroupTreeManager } from './GroupTreeManager.js';
|
|
8
8
|
import { TriggerManager } from './TriggerManager.js';
|
|
9
9
|
import { GridOptions, Position } from './types.js';
|
|
10
|
+
import { IRenderRequest } from './domain/render/ports.js';
|
|
10
11
|
/**
|
|
11
12
|
* R4(§3.4, R-9a/R-9b): 모든 데이터 변경의 mutate→render→emit 꼬리를 단일 초크포인트
|
|
12
13
|
* `commit(spec)` 로 수렴시키기 위한 명시 데이터계약(CommitSpec DTO). 각 mutator 의
|
|
@@ -23,28 +24,24 @@ import { GridOptions, Position } from './types.js';
|
|
|
23
24
|
* / Updates the VS/Pagination row count. `'count'` = current row count
|
|
24
25
|
* (insert/delete/push/unshift), `'zero'` = 0 (clearData). Omitted = no update
|
|
25
26
|
* (writeCell/setData — row count unchanged, or handled inline).
|
|
26
|
-
* - `renderMode` : 'sync-window'
|
|
27
|
-
* 'full'
|
|
27
|
+
* - `renderMode` : 'sync-window'=보이는 범위 그리기 요청(insert/delete/write/endBatch),
|
|
28
|
+
* 'full'=본문 비우기 요청 rows:'clear'(clearData),
|
|
28
29
|
* 'async-vs'=명령형 렌더 없음. setData 는 setTotalRows/rebuild 로 VS 가
|
|
29
30
|
* rAF 스케줄(비동기)하므로 `commit` 은 동기 `_doRender` 를 **하지 않는다**.
|
|
30
|
-
* / `'sync-window'` =
|
|
31
|
-
* `'full'` =
|
|
31
|
+
* / `'sync-window'` = a visible-range render request (insert/delete/write/endBatch),
|
|
32
|
+
* `'full'` = a clear-body request, rows:'clear' (clearData), `'async-vs'` = no imperative render.
|
|
32
33
|
* For setData, VS schedules via rAF through setTotalRows/rebuild, so `commit`
|
|
33
34
|
* **does not** invoke a synchronous `_doRender`.
|
|
34
35
|
* - `emitBeforeRender` : true=emit 을 render 앞에(writeCell/endBatch — 현행 순서), 기본 false=render 먼저(insert/delete).
|
|
35
36
|
* / `true` = emit before render (writeCell/endBatch — current order); default
|
|
36
37
|
* `false` = render first (insert/delete).
|
|
37
38
|
* - `emitPayload` : `emit('dataChange', …)` 페이로드 지연 평가(thunk). getData() 시점을
|
|
38
|
-
* 현행과 동일(render 뒤 or 앞)하게
|
|
39
|
+
* 현행과 동일(render 뒤 or 앞)하게 유지. `onDataChange` 옵션은 이 emit 의 리스너로만
|
|
40
|
+
* 불린다(한 번) — 커밋이 옵션을 따로 부르지 않는다.
|
|
39
41
|
* / Lazily-evaluated (thunk) payload for `emit('dataChange', …)`. Keeps the
|
|
40
42
|
* `getData()` evaluation point identical to current behavior (before or after
|
|
41
|
-
* render)
|
|
42
|
-
*
|
|
43
|
-
* - `fireOnDataChangeExplicitly` : true=`_options.onDataChange?.()` 를 **명시 재호출**(bound listener 와 합쳐 DOUBLE-fire).
|
|
44
|
-
* row mutator=true, setData/clearData=false(bound listener 로 ONCE).
|
|
45
|
-
* / `true` = **explicitly re-invokes** `_options.onDataChange?.()` (combined with
|
|
46
|
-
* the bound listener, this DOUBLE-fires). Row mutators = `true`;
|
|
47
|
-
* setData/clearData = `false` (bound listener fires ONCE).
|
|
43
|
+
* render). The `onDataChange` option is invoked only as a listener of this emit
|
|
44
|
+
* (once) — the commit never calls the option separately.
|
|
48
45
|
* - `flushFormula` : true=emit 전에 `_flushFormulaRecalc()`(writeCell/endBatch).
|
|
49
46
|
* / `true` = calls `_flushFormulaRecalc()` right before emit (writeCell/endBatch).
|
|
50
47
|
* - `preRender` : render 직전 훅(deleteRow 의 removedRowId invalidate 루프).
|
|
@@ -64,7 +61,6 @@ export interface CommitSpec {
|
|
|
64
61
|
renderMode: 'sync-window' | 'full' | 'async-vs';
|
|
65
62
|
emitBeforeRender?: boolean;
|
|
66
63
|
emitPayload: () => any;
|
|
67
|
-
fireOnDataChangeExplicitly?: boolean;
|
|
68
64
|
flushFormula?: boolean;
|
|
69
65
|
preRender?: () => void;
|
|
70
66
|
coalescable?: boolean;
|
|
@@ -113,10 +109,11 @@ export interface MutationServiceDeps<T extends Record<string, any> = any> {
|
|
|
113
109
|
applyFilters: () => void;
|
|
114
110
|
/** writeCell/endBatch 커밋 emit 직전 수식 dirty seed 소비. / Consume formula dirty seeds right before the writeCell/endBatch commit emit. */
|
|
115
111
|
flushFormula: () => void;
|
|
116
|
-
/**
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
/**
|
|
113
|
+
* 그리기 요청을 낸다. 'sync-window' 는 보이는 범위, 'full'(clearData) 은 본문 비우기 요청. 서비스는 렌더 내부를 모른다.
|
|
114
|
+
* / Submit a render request: 'sync-window' = visible range, 'full' (clearData) = clear the body. The service has no knowledge of render internals.
|
|
115
|
+
*/
|
|
116
|
+
submitRender: (req: IRenderRequest) => void;
|
|
120
117
|
/** setData: 수식 dirty seed clear + RecalcCoordinator 재생성(rowId 재발급 대응). / setData: clears formula dirty seeds and recreates the RecalcCoordinator (to cope with rowId reissuance). */
|
|
121
118
|
resetFormulaState: () => void;
|
|
122
119
|
/** writeCell: 값이 바뀐 셀을 수식 dirty seed 로 적립(kind==='data' 일 때만). / writeCell: accumulates a changed cell as a formula dirty seed (only when kind === 'data'). */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from './EventEmitter.js';
|
|
2
2
|
import { PartialLocaleMessages, LocaleMessageKey, MessageValue } from './i18n/types.js';
|
|
3
|
-
import { SkinTokenDelta, GridOptions, OpenGridInstance, ColumnDef, SortItem, FilterItem, ExportOptions, Position, TriggerHandler, TriggerEvent, OverrideApi, OverrideCallOptions, CellRange, RangeStats } from './types.js';
|
|
3
|
+
import { SkinTokenDelta, GridOptions, OpenGridInstance, ColumnDef, ColumnOrGroup, PrintOptions, GridEventMap, SortItem, FilterItem, ExportOptions, Position, TriggerHandler, TriggerEvent, OverrideApi, OverrideCallOptions, CellRange, RangeStats } from './types.js';
|
|
4
4
|
import { FilterSelectConfig } from './FilterSelect.js';
|
|
5
5
|
import { MergeCell } from './MergeEngine.js';
|
|
6
6
|
import { RendererFactory } from './renderers/CellRenderer.js';
|
|
@@ -74,6 +74,14 @@ export interface RealtimeWireOptions {
|
|
|
74
74
|
*/
|
|
75
75
|
debounceMs?: number;
|
|
76
76
|
}
|
|
77
|
+
export interface OpenGrid<T extends Record<string, any> = any> {
|
|
78
|
+
on<K extends keyof GridEventMap<T>>(event: K, handler: (e: GridEventMap<T>[K]) => void): this;
|
|
79
|
+
on(event: string, handler: (...args: any[]) => void): this;
|
|
80
|
+
once<K extends keyof GridEventMap<T>>(event: K, handler: (e: GridEventMap<T>[K]) => void): this;
|
|
81
|
+
once(event: string, handler: (...args: any[]) => void): this;
|
|
82
|
+
off<K extends keyof GridEventMap<T>>(event: K, handler?: (e: GridEventMap<T>[K]) => void): this;
|
|
83
|
+
off(event: string, handler?: (...args: any[]) => void): this;
|
|
84
|
+
}
|
|
77
85
|
/**
|
|
78
86
|
* OPEN_GRID 코어 그리드 클래스.
|
|
79
87
|
*
|
|
@@ -127,6 +135,8 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
127
135
|
private _vs;
|
|
128
136
|
private _ro;
|
|
129
137
|
private _renderer;
|
|
138
|
+
private _scheduler;
|
|
139
|
+
private _sortIndicator;
|
|
130
140
|
private _appearance;
|
|
131
141
|
/**
|
|
132
142
|
* R12c: per-instance 아이콘 오버라이드 레지스트리(전역 iconRegistry 의 child). 첫 setIcon 때 지연 생성.
|
|
@@ -207,6 +217,8 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
207
217
|
private _filterPanel;
|
|
208
218
|
private _filterSelect;
|
|
209
219
|
private _pagination;
|
|
220
|
+
/** 사용자가 정한 행 높이(생성 옵션 또는 마지막 setRowHeight). 기본 밀도로 돌아갈 때 쓴다. / The user's row height; restored by the default density. */
|
|
221
|
+
private _userRowHeight?;
|
|
210
222
|
private _dnd;
|
|
211
223
|
private _mergeEngine;
|
|
212
224
|
private _liveRegion;
|
|
@@ -427,14 +439,199 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
427
439
|
* 静态全局的 strategy 槽。
|
|
428
440
|
*/
|
|
429
441
|
private static _defaultStrategies;
|
|
442
|
+
/**
|
|
443
|
+
* 요소 `el` 과 그 자손에 붙어 있는 그리드를 문서 순서대로 돌려준다(파괴한 그리드는 빠진다).
|
|
444
|
+
* 화면의 한 영역에 어떤 그리드가 떠 있는지 알아야 할 때 쓴다 — 그리드를 전역 변수에 따로 담아 둘 필요가 없다.
|
|
445
|
+
*
|
|
446
|
+
* Returns the grids mounted on element `el` and its descendants, in document order (destroyed grids
|
|
447
|
+
* are excluded). Use it when you need to know which grids live in an area of the page — no need to
|
|
448
|
+
* keep grids in global variables.
|
|
449
|
+
*
|
|
450
|
+
* 要素 `el` とその子孫に載っているグリッドを文書順に返します(破棄したグリッドは含みません)。
|
|
451
|
+
* 画面のある領域にどのグリッドがあるかを知りたいときに使います — グリッドをグローバル変数に別途保持する必要はありません。
|
|
452
|
+
*
|
|
453
|
+
* 按文档顺序返回挂在元素 `el` 及其后代上的表格(已销毁的表格不包含在内)。
|
|
454
|
+
* 需要知道页面某个区域里有哪些表格时使用 — 不必把表格另存到全局变量里。
|
|
455
|
+
*
|
|
456
|
+
* @param el - 찾을 범위의 뿌리 요소(자기 자신 포함)
|
|
457
|
+
*
|
|
458
|
+
* Root element of the search (itself included)
|
|
459
|
+
*
|
|
460
|
+
* 探す範囲のルート要素(自身を含む)
|
|
461
|
+
*
|
|
462
|
+
* 查找范围的根元素(包含其自身)
|
|
463
|
+
*
|
|
464
|
+
* @returns 살아 있는 그리드 목록
|
|
465
|
+
*
|
|
466
|
+
* The live grids
|
|
467
|
+
*
|
|
468
|
+
* 生きているグリッドの一覧
|
|
469
|
+
*
|
|
470
|
+
* 仍存活的表格列表
|
|
471
|
+
*
|
|
472
|
+
* @example
|
|
473
|
+
* const grids = OpenGrid.instancesIn(document.getElementById('page')!);
|
|
474
|
+
* console.log(`이 영역의 그리드 ${grids.length}개`);
|
|
475
|
+
*/
|
|
476
|
+
static instancesIn(el: Element): OpenGrid<any>[];
|
|
477
|
+
/**
|
|
478
|
+
* 요소 `el` 과 그 자손에 붙어 있는 그리드를 모두 파괴한다. 화면의 한 영역을 갈아 끼우기 **전에** 부르면
|
|
479
|
+
* 그 안의 그리드가 남긴 옵저버·타이머·실시간 구독까지 정리된다(SPA 라우트 전환, 탭 닫기 등).
|
|
480
|
+
*
|
|
481
|
+
* Destroys every grid mounted on element `el` and its descendants. Call it **before** replacing an
|
|
482
|
+
* area of the page and the grids inside it release their observers, timers and realtime
|
|
483
|
+
* subscriptions too (SPA route change, closing a tab, etc.).
|
|
484
|
+
*
|
|
485
|
+
* 要素 `el` とその子孫に載っているグリッドをすべて破棄します。画面のある領域を差し替える**前に**呼ぶと、
|
|
486
|
+
* その中のグリッドが残したオブザーバ・タイマー・リアルタイム購読まで片付きます(SPA のルート切り替え、タブを閉じるときなど)。
|
|
487
|
+
*
|
|
488
|
+
* 销毁挂在元素 `el` 及其后代上的所有表格。在替换页面某个区域**之前**调用,
|
|
489
|
+
* 其中表格留下的观察器、定时器、实时订阅也会一并清理(SPA 路由切换、关闭标签页等)。
|
|
490
|
+
*
|
|
491
|
+
* 한 그리드의 `destroy()` 가 예외를 던져도 나머지는 끝까지 정리한 뒤 그 예외를 던진다(여럿이면 `errors` 에 모은 Error).
|
|
492
|
+
*
|
|
493
|
+
* Even if one grid's `destroy()` throws, the rest are still cleaned up, then that error is thrown
|
|
494
|
+
* (several failures become one Error carrying them in `errors`).
|
|
495
|
+
*
|
|
496
|
+
* あるグリッドの `destroy()` が例外を投げても残りは最後まで片付け、そのあとでその例外を投げます(複数なら `errors` にまとめた Error)。
|
|
497
|
+
*
|
|
498
|
+
* 即使某个表格的 `destroy()` 抛出异常,其余表格也会清理到底,之后再抛出该异常(多个时合并为带 `errors` 的 Error)。
|
|
499
|
+
*
|
|
500
|
+
* @param el - 정리할 범위의 뿌리 요소(자기 자신 포함)
|
|
501
|
+
*
|
|
502
|
+
* Root element of the area to clean up (itself included)
|
|
503
|
+
*
|
|
504
|
+
* 片付ける範囲のルート要素(自身を含む)
|
|
505
|
+
*
|
|
506
|
+
* 要清理范围的根元素(包含其自身)
|
|
507
|
+
*
|
|
508
|
+
* @example
|
|
509
|
+
* OpenGrid.destroyAllIn(stage);
|
|
510
|
+
* stage.innerHTML = nextScreenHtml;
|
|
511
|
+
*/
|
|
512
|
+
static destroyAllIn(el: Element): void;
|
|
513
|
+
/**
|
|
514
|
+
* 앞으로 만들 모든 그리드에 override 레이어를 걸고, 그 등록을 되돌리는 함수를 돌려준다.
|
|
515
|
+
* 화면(컴포넌트)이 사라질 때 그 함수를 부르면 그 뒤에 만드는 그리드에는 더 이상 걸리지 않는다.
|
|
516
|
+
* 이미 만든 그리드는 그대로다 — 그 그리드에서 벗기려면 `grid.restore(name)` 이나 `destroy()` 를 쓴다.
|
|
517
|
+
* 체이닝이 필요하면 `OpenGrid.defaultOverride` 를 쓴다(같은 등록, 반환값만 다르다).
|
|
518
|
+
*
|
|
519
|
+
* Applies an override layer to every grid created from now on, and returns a function that undoes
|
|
520
|
+
* this registration. Call it when the screen (component) goes away and grids created afterwards no
|
|
521
|
+
* longer get the layer. Grids that already exist keep it — to remove it from such a grid use
|
|
522
|
+
* `grid.restore(name)` or `destroy()`. For chaining use `OpenGrid.defaultOverride` (same
|
|
523
|
+
* registration, different return value).
|
|
524
|
+
*
|
|
525
|
+
* これから作るすべてのグリッドに override レイヤーを掛け、その登録を取り消す関数を返します。
|
|
526
|
+
* 画面(コンポーネント)が消えるときにその関数を呼べば、その後に作るグリッドにはもう掛かりません。
|
|
527
|
+
* すでに作ったグリッドはそのままです — そのグリッドから外すには `grid.restore(name)` か `destroy()` を使います。
|
|
528
|
+
* チェーンが必要なら `OpenGrid.defaultOverride` を使います(同じ登録で、戻り値だけが違います)。
|
|
529
|
+
*
|
|
530
|
+
* 给此后创建的所有表格挂上 override 层,并返回一个撤销这次注册的函数。
|
|
531
|
+
* 画面(组件)消失时调用这个函数,之后再创建的表格就不会再挂上它。
|
|
532
|
+
* 已经创建的表格保持原样 — 要从那个表格上去掉,请用 `grid.restore(name)` 或 `destroy()`。
|
|
533
|
+
* 需要链式调用时请用 `OpenGrid.defaultOverride`(注册相同,只是返回值不同)。
|
|
534
|
+
*
|
|
535
|
+
* @param name - 대상 공개 메서드 이름
|
|
536
|
+
*
|
|
537
|
+
* Target public method name
|
|
538
|
+
*
|
|
539
|
+
* 対象となる公開メソッド名
|
|
540
|
+
*
|
|
541
|
+
* 目标公开方法名
|
|
542
|
+
*
|
|
543
|
+
* @param fn - override 레이어 함수(첫 인자 orig)
|
|
544
|
+
*
|
|
545
|
+
* Override layer function (first arg = orig)
|
|
546
|
+
*
|
|
547
|
+
* override レイヤー関数(第 1 引数が orig)
|
|
548
|
+
*
|
|
549
|
+
* override 层函数(第 1 个参数为 orig)
|
|
550
|
+
*
|
|
551
|
+
* @param opts - 재진입/에러 정책
|
|
552
|
+
*
|
|
553
|
+
* Reentrancy & error policy
|
|
554
|
+
*
|
|
555
|
+
* 再入/エラーのポリシー
|
|
556
|
+
*
|
|
557
|
+
* 重入/错误的策略
|
|
558
|
+
*
|
|
559
|
+
* @returns 이 등록 하나만 되돌리는 함수(여러 번 불러도 탈 없음)
|
|
560
|
+
*
|
|
561
|
+
* A function that undoes only this registration (safe to call more than once)
|
|
562
|
+
*
|
|
563
|
+
* この登録ひとつだけを取り消す関数(何度呼んでも問題ありません)
|
|
564
|
+
*
|
|
565
|
+
* 只撤销这一次注册的函数(多次调用也没问题)
|
|
566
|
+
*
|
|
567
|
+
* @example
|
|
568
|
+
* // 앱 시작 때 한 번 — 그 뒤 만드는 모든 그리드에 걸린다.
|
|
569
|
+
* const off = OpenGrid.addDefaultOverride('getDisplayValue', (orig, ri, field) => orig(ri, field).toUpperCase());
|
|
570
|
+
* // 그 규칙이 더 필요 없어질 때(마이크로프론트엔드 언마운트, 테스트 정리 등)
|
|
571
|
+
* off();
|
|
572
|
+
* // 컴포넌트 수명에 묶을 때는 그리드를 만드는 컴포넌트보다 먼저 등록돼야 한다.
|
|
573
|
+
* // React 는 자식 effect 가 부모보다 먼저 돌므로, 부모 useEffect 에서 등록하면 자식이 이미 만든 그리드에는 걸리지 않는다.
|
|
574
|
+
*/
|
|
575
|
+
static addDefaultOverride(name: string, fn: OverrideLayer, opts?: OverrideCallOptions): () => void;
|
|
576
|
+
/**
|
|
577
|
+
* 앞으로 만들 모든 그리드에 strategy 슬롯을 걸고, 그 등록을 되돌리는 함수를 돌려준다.
|
|
578
|
+
* 쓰임새와 규칙은 `addDefaultOverride` 와 같다(이미 만든 그리드는 그대로).
|
|
579
|
+
* 체이닝이 필요하면 `OpenGrid.defaults.strategy` 를 쓴다.
|
|
580
|
+
*
|
|
581
|
+
* Applies a strategy slot to every grid created from now on, and returns a function that undoes
|
|
582
|
+
* this registration. Usage and rules are the same as `addDefaultOverride` (grids that already exist
|
|
583
|
+
* keep it). For chaining use `OpenGrid.defaults.strategy`.
|
|
584
|
+
*
|
|
585
|
+
* これから作るすべてのグリッドに strategy スロットを掛け、その登録を取り消す関数を返します。
|
|
586
|
+
* 使い方と規則は `addDefaultOverride` と同じです(すでに作ったグリッドはそのまま)。
|
|
587
|
+
* チェーンが必要なら `OpenGrid.defaults.strategy` を使います。
|
|
588
|
+
*
|
|
589
|
+
* 给此后创建的所有表格挂上 strategy 槽,并返回一个撤销这次注册的函数。
|
|
590
|
+
* 用法和规则与 `addDefaultOverride` 相同(已经创建的表格保持原样)。
|
|
591
|
+
* 需要链式调用时请用 `OpenGrid.defaults.strategy`。
|
|
592
|
+
*
|
|
593
|
+
* @param slot - strategy 슬롯 이름
|
|
594
|
+
*
|
|
595
|
+
* Strategy slot name
|
|
596
|
+
*
|
|
597
|
+
* strategy スロット名
|
|
598
|
+
*
|
|
599
|
+
* strategy 槽名
|
|
600
|
+
*
|
|
601
|
+
* @param fn - 슬롯에 꽂을 함수
|
|
602
|
+
*
|
|
603
|
+
* Function to plug into the slot
|
|
604
|
+
*
|
|
605
|
+
* スロットに差し込む関数
|
|
606
|
+
*
|
|
607
|
+
* 插入该槽的函数
|
|
608
|
+
*
|
|
609
|
+
* @returns 이 등록 하나만 되돌리는 함수(여러 번 불러도 탈 없음)
|
|
610
|
+
*
|
|
611
|
+
* A function that undoes only this registration (safe to call more than once)
|
|
612
|
+
*
|
|
613
|
+
* この登録ひとつだけを取り消す関数(何度呼んでも問題ありません)
|
|
614
|
+
*
|
|
615
|
+
* 只撤销这一次注册的函数(多次调用也没问题)
|
|
616
|
+
*
|
|
617
|
+
* @example
|
|
618
|
+
* const off = OpenGrid.addDefaultStrategy('displayFormatter', companyFormatter);
|
|
619
|
+
* // 화면을 떠날 때
|
|
620
|
+
* off();
|
|
621
|
+
*/
|
|
622
|
+
static addDefaultStrategy(slot: string, fn: Function): () => void;
|
|
430
623
|
/**
|
|
431
624
|
* 정적: 모든 신규 그리드에 적용될 override 레이어 등록.
|
|
625
|
+
* 나중에 되돌려야 하면 되돌리는 함수를 돌려주는 `OpenGrid.addDefaultOverride` 를 쓴다.
|
|
432
626
|
*
|
|
433
627
|
* Static: register an override layer applied to every newly created grid.
|
|
628
|
+
* If you need to undo it later, use `OpenGrid.addDefaultOverride`, which returns an undo function.
|
|
434
629
|
*
|
|
435
630
|
* 静的: すべての新規グリッドに適用される override レイヤーを登録。
|
|
631
|
+
* 後で取り消す必要があれば、取り消し関数を返す `OpenGrid.addDefaultOverride` を使います。
|
|
436
632
|
*
|
|
437
633
|
* 静态: 注册应用到所有新建表格的 override 层。
|
|
634
|
+
* 之后需要撤销时,请用会返回撤销函数的 `OpenGrid.addDefaultOverride`。
|
|
438
635
|
*
|
|
439
636
|
* @param name - 대상 공개 메서드 이름
|
|
440
637
|
*
|
|
@@ -474,12 +671,16 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
474
671
|
static defaultOverride(name: string, fn: OverrideLayer, opts?: OverrideCallOptions): typeof OpenGrid;
|
|
475
672
|
/**
|
|
476
673
|
* 정적 전역 defaults 네임스페이스 (strategy 슬롯).
|
|
674
|
+
* 나중에 되돌려야 하면 되돌리는 함수를 돌려주는 `OpenGrid.addDefaultStrategy` 를 쓴다.
|
|
477
675
|
*
|
|
478
676
|
* Static global defaults namespace (strategy slots).
|
|
677
|
+
* If you need to undo it later, use `OpenGrid.addDefaultStrategy`, which returns an undo function.
|
|
479
678
|
*
|
|
480
679
|
* 静的グローバルな defaults 名前空間(strategy スロット)。
|
|
680
|
+
* 後で取り消す必要があれば、取り消し関数を返す `OpenGrid.addDefaultStrategy` を使います。
|
|
481
681
|
*
|
|
482
682
|
* 静态全局的 defaults 命名空间(strategy 槽)。
|
|
683
|
+
* 之后需要撤销时,请用会返回撤销函数的 `OpenGrid.addDefaultStrategy`。
|
|
483
684
|
*/
|
|
484
685
|
static defaults: {
|
|
485
686
|
strategy(slot: string, fn: Function): typeof OpenGrid;
|
|
@@ -982,7 +1183,7 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
982
1183
|
*
|
|
983
1184
|
* 工作表的数据
|
|
984
1185
|
*/
|
|
985
|
-
addWorksheet(name: string, columns?:
|
|
1186
|
+
addWorksheet(name: string, columns?: ColumnOrGroup<T>[], data?: T[]): void;
|
|
986
1187
|
/**
|
|
987
1188
|
* 워크시트를 제거한다.
|
|
988
1189
|
*
|
|
@@ -1579,6 +1780,40 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
1579
1780
|
* 返回指定索引的行对象(单件查询用)。
|
|
1580
1781
|
*/
|
|
1581
1782
|
getRowAt(rowIndex: number): T;
|
|
1783
|
+
/**
|
|
1784
|
+
* 화면 순서로 늘어놓은 **전체** 목록(그룹 머리·트리·상세 칸 포함)에서 `flatIndex` 번째 줄의 데이터 행을 돌려준다. 이 번호는 스크롤 위치와 무관하다 — 지금 창에 보이는 줄 가운데 몇 번째가 아니다. 그룹 머리·상세 칸이면 `null`, 트리 줄이면 그 노드의 데이터 행.
|
|
1785
|
+
* `getRowAt(rowIndex)` 는 데이터의 표시 순서라 그룹·트리·상세가 켜지면 둘이 다른 줄을 가리킨다.
|
|
1786
|
+
*
|
|
1787
|
+
* Returns the data row on the `flatIndex`-th line of the **whole** list laid out in on-screen order (group heads, tree rows and detail slots included). The number does not depend on the scroll position — it is not a position among the lines currently visible in the viewport. `null` for group heads and detail slots; for tree lines, that node's data row.
|
|
1788
|
+
* `getRowAt(rowIndex)` uses the data's display order, so with grouping, tree or detail on the two point at different lines.
|
|
1789
|
+
*
|
|
1790
|
+
* 画面順に並べた**全体**の一覧(グループ見出し・ツリー・詳細欄を含む)で `flatIndex` 番目の行のデータ行を返します。この番号はスクロール位置と関係ありません — いま窓に見えている行の中での何番目かではありません。グループ見出し・詳細欄なら `null`、ツリーの行ならそのノードのデータ行。
|
|
1791
|
+
* `getRowAt(rowIndex)` はデータの表示順なので、グループ・ツリー・詳細が有効だと両者は別の行を指します。
|
|
1792
|
+
*
|
|
1793
|
+
* 在按画面顺序排列的**完整**列表(包括分组标题、树、详情栏)中,返回第 `flatIndex` 行的数据行。这个编号与滚动位置无关 — 不是当前窗口中可见行里的第几行。分组标题、详情栏返回 `null`;树的行返回该节点的数据行。
|
|
1794
|
+
* `getRowAt(rowIndex)` 使用数据的显示顺序,启用分组、树、详情时两者指向不同的行。
|
|
1795
|
+
*
|
|
1796
|
+
* @param flatIndex - 화면 순서 전체 목록에서의 줄 번호(0부터, 스크롤과 무관)
|
|
1797
|
+
*
|
|
1798
|
+
* Line number in the whole on-screen-order list (0-based, independent of scrolling)
|
|
1799
|
+
*
|
|
1800
|
+
* 画面順の全体一覧での行番号(0 始まり、スクロールと無関係)
|
|
1801
|
+
*
|
|
1802
|
+
* 在画面顺序完整列表中的行号(从 0 开始,与滚动无关)
|
|
1803
|
+
*
|
|
1804
|
+
* @returns 데이터 행, 없으면 `null`
|
|
1805
|
+
*
|
|
1806
|
+
* The data row, or `null`
|
|
1807
|
+
*
|
|
1808
|
+
* データ行、なければ `null`
|
|
1809
|
+
*
|
|
1810
|
+
* 数据行,没有则为 `null`
|
|
1811
|
+
*
|
|
1812
|
+
* @example
|
|
1813
|
+
* const row = grid.getFlatRow(3); // 전체 목록의 넷째 줄(스크롤해도 같은 줄)
|
|
1814
|
+
* if (row) console.log(row.name);
|
|
1815
|
+
*/
|
|
1816
|
+
getFlatRow(flatIndex: number): T | null;
|
|
1582
1817
|
/**
|
|
1583
1818
|
* 화면상의 행 위치(flat/visual index)와 실제 데이터 행을 서로 변환해 주는 리졸버를 돌려준다. 그룹 헤더·
|
|
1584
1819
|
* 트리 자식·상세 패널 같은 의사(pseudo) 행이 섞여 index 와 데이터가 어긋날 때, "이 index 가 진짜 데이터 행인가,
|
|
@@ -2193,7 +2428,7 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
2193
2428
|
*
|
|
2194
2429
|
* 把列构成的整体换成新定义并重新绘制。按画面模式整体更换要展示的列集合时使用(单个的添加/删除用 insertColumn/deleteColumn)。
|
|
2195
2430
|
*/
|
|
2196
|
-
applyColumns(columns:
|
|
2431
|
+
applyColumns(columns: ColumnOrGroup<T>[]): void;
|
|
2197
2432
|
/**
|
|
2198
2433
|
* 컬럼 1개를 삽입한다.
|
|
2199
2434
|
*
|
|
@@ -2804,10 +3039,64 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
2804
3039
|
*
|
|
2805
3040
|
* 打开打印用的窗口。
|
|
2806
3041
|
*/
|
|
2807
|
-
print(options?:
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
3042
|
+
print(options?: PrintOptions): void;
|
|
3043
|
+
/**
|
|
3044
|
+
* 페이지당 행 수를 바꾸고 1쪽으로 돌아간다(`pagination: true` 일 때). 페이지 바의 행 수 목록을 고른 것과 같다.
|
|
3045
|
+
* 페이징을 켜지 않은 그리드에서는 화면은 그대로이고 값만 기억해 두었다가 페이징을 켤 때 쓴다.
|
|
3046
|
+
*
|
|
3047
|
+
* Changes the rows per page and returns to page 1 (when `pagination: true`) — the same as picking a
|
|
3048
|
+
* size in the pager's rows-per-page list. On a grid without pagination nothing changes on screen; the
|
|
3049
|
+
* value is remembered and used when pagination is turned on.
|
|
3050
|
+
*
|
|
3051
|
+
* 1 ページあたりの行数を変えて 1 ページ目に戻ります(`pagination: true` のとき)。ページバーの行数リストで選ぶのと同じです。
|
|
3052
|
+
* ページングを有効にしていないグリッドでは画面は変わらず、値だけを覚えておいてページングを有効にしたときに使います。
|
|
3053
|
+
*
|
|
3054
|
+
* 修改每页行数并回到第 1 页(`pagination: true` 时)。与在分页栏的行数列表中选择相同。
|
|
3055
|
+
* 没有启用分页的表格上画面不变,只记住这个值,在启用分页时使用。
|
|
3056
|
+
*
|
|
3057
|
+
* @param size - 페이지당 행 수(1 이상의 정수)
|
|
3058
|
+
*
|
|
3059
|
+
* Rows per page (an integer of 1 or more)
|
|
3060
|
+
*
|
|
3061
|
+
* 1 ページあたりの行数(1 以上の整数)
|
|
3062
|
+
*
|
|
3063
|
+
* 每页行数(1 以上的整数)
|
|
3064
|
+
*
|
|
3065
|
+
* @throws RangeError — `size` 가 1 이상의 정수가 아닐 때
|
|
3066
|
+
*
|
|
3067
|
+
* RangeError — when `size` is not an integer of 1 or more
|
|
3068
|
+
*
|
|
3069
|
+
* RangeError — `size` が 1 以上の整数でないとき
|
|
3070
|
+
*
|
|
3071
|
+
* RangeError — `size` 不是 1 以上的整数时
|
|
3072
|
+
*
|
|
3073
|
+
* @example
|
|
3074
|
+
* grid.setPageSize(50);
|
|
3075
|
+
*/
|
|
3076
|
+
setPageSize(size: number): void;
|
|
3077
|
+
/**
|
|
3078
|
+
* 찾기 바를 열고 입력 칸에 포커스한다(Ctrl+F 와 같다). 단추로 찾기를 열게 할 때 쓴다.
|
|
3079
|
+
*
|
|
3080
|
+
* Opens the find bar and focuses its input (same as Ctrl+F). Use it to open search from a button.
|
|
3081
|
+
*
|
|
3082
|
+
* 検索バーを開いて入力欄にフォーカスします(Ctrl+F と同じ)。ボタンから検索を開かせたいときに使います。
|
|
3083
|
+
*
|
|
3084
|
+
* 打开查找栏并让输入框获得焦点(与 Ctrl+F 相同)。想用按钮打开查找时使用。
|
|
3085
|
+
*
|
|
3086
|
+
* @example
|
|
3087
|
+
* searchButton.addEventListener('click', () => grid.openFindBar());
|
|
3088
|
+
*/
|
|
3089
|
+
openFindBar(): void;
|
|
3090
|
+
/**
|
|
3091
|
+
* 찾기 바를 닫고 찾기로 걸러 낸 것을 푼다(모든 행이 다시 보인다).
|
|
3092
|
+
*
|
|
3093
|
+
* Closes the find bar and clears the find filter (all rows show again).
|
|
3094
|
+
*
|
|
3095
|
+
* 検索バーを閉じ、検索での絞り込みを解除します(すべての行が再び表示されます)。
|
|
3096
|
+
*
|
|
3097
|
+
* 关闭查找栏并解除查找的筛选(所有行重新显示)。
|
|
3098
|
+
*/
|
|
3099
|
+
closeFindBar(): void;
|
|
2811
3100
|
/**
|
|
2812
3101
|
* 데이터 배열 변환.
|
|
2813
3102
|
*
|
|
@@ -2849,15 +3138,15 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
2849
3138
|
*/
|
|
2850
3139
|
jumpToRow(rowIndex: number): void;
|
|
2851
3140
|
/**
|
|
2852
|
-
*
|
|
3141
|
+
* 필드 이름의 컬럼이 보이게 가로로 스크롤한다(가로 가상화로 칸이 DOM 에 없어도 됨). 없는 필드·숨은 컬럼이면 아무 일 없음.
|
|
2853
3142
|
*
|
|
2854
|
-
*
|
|
3143
|
+
* Scroll horizontally so the column with this field is visible (works even when column virtualization keeps its cells out of the DOM). Unknown or hidden fields do nothing.
|
|
2855
3144
|
*
|
|
2856
|
-
*
|
|
3145
|
+
* フィールド名の列が見えるように横スクロールします(列の仮想化でセルが DOM に無くても動きます)。存在しない・非表示の列なら何もしません。
|
|
2857
3146
|
*
|
|
2858
|
-
*
|
|
3147
|
+
* 横向滚动使该字段的列可见(即使列虚拟化使其单元格不在 DOM 中也可)。不存在或隐藏的字段不做任何事。
|
|
2859
3148
|
*/
|
|
2860
|
-
jumpToCol(
|
|
3149
|
+
jumpToCol(field: string): void;
|
|
2861
3150
|
/**
|
|
2862
3151
|
* 현재 스크롤 좌표.
|
|
2863
3152
|
*
|
|
@@ -3190,21 +3479,29 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
3190
3479
|
* ('comfortable') 보여 줄 때 쓴다. 행 높이·안쪽 여백 토큰만 조정하는 순수 가산적 변경이라 색·형태·질감은
|
|
3191
3480
|
* 전혀 건드리지 않는다. 밀도는 행 높이를 바꾸므로 좌표를 다시 계산해야 할 때 창 크기 변경과 똑같은 경로로
|
|
3192
3481
|
* 재배치한다. 없는 이름을 넘겨도 안전하게 기본값으로 되돌아간다(throw 안 함).
|
|
3482
|
+
* 보통 모드의 행 높이도 밀도 값으로 바뀌고, 기본('default')으로 돌아가면 사용자가 정한 행 높이(생성 옵션
|
|
3483
|
+
* `rowHeight` 또는 마지막 `setRowHeight`)로 돌아온다.
|
|
3193
3484
|
*
|
|
3194
3485
|
* Change how tightly rows are packed (density) — show the same data more compactly ('compact') or with
|
|
3195
3486
|
* more breathing room ('comfortable'). It adjusts only row-height/padding tokens (purely additive), never
|
|
3196
3487
|
* touching color/form/texture. Because density changes row height, it relayouts via the same path as a
|
|
3197
3488
|
* window resize when needed. An unknown name safely falls back to the default (never throws).
|
|
3489
|
+
* The normal-mode row height follows the density too; back at 'default' it returns to the user's row
|
|
3490
|
+
* height (the `rowHeight` option or the last `setRowHeight`).
|
|
3198
3491
|
*
|
|
3199
3492
|
* 行間の詰まり具合(密度)を変えます — 同じデータを画面によりぎっしり('compact')、またはゆったり('comfortable')
|
|
3200
3493
|
* 見せるときに使います。行の高さ・内側の余白のトークンだけを調整する純粋に加算的な変更なので、色・形状・質感には
|
|
3201
3494
|
* いっさい触れません。密度は行の高さを変えるため、座標を計算し直す必要があるときはウィンドウのサイズ変更と同じ経路で
|
|
3202
3495
|
* 再配置します。存在しない名前を渡しても安全に既定値へ戻ります(throw しません)。
|
|
3496
|
+
* 通常モードの行の高さも密度の値に変わり、既定('default')に戻ると利用者が決めた行の高さ(生成オプション
|
|
3497
|
+
* `rowHeight` または最後の `setRowHeight`)に戻ります。
|
|
3203
3498
|
*
|
|
3204
3499
|
* 改变行间的紧密程度(密度)— 想把同样的数据在画面上显示得更密('compact')或更宽松('comfortable')
|
|
3205
3500
|
* 时使用。它只调整行高、内侧留白的 token,是纯粹加算式的变更,完全不碰颜色、形状、质感。
|
|
3206
3501
|
* 因为密度会改变行高,需要重新计算坐标时,以与窗口尺寸变更相同的路径重新布局。
|
|
3207
3502
|
* 传入不存在的名称也会安全地回到默认值(不会 throw)。
|
|
3503
|
+
* 普通模式的行高也会随密度改变;回到默认('default')时恢复为用户设定的行高(创建选项 `rowHeight`
|
|
3504
|
+
* 或最后一次 `setRowHeight`)。
|
|
3208
3505
|
*
|
|
3209
3506
|
* @param name - 밀도 값 id(예 'compact', 'comfortable')
|
|
3210
3507
|
*
|
|
@@ -3215,24 +3512,65 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
3215
3512
|
* 密度的值 id(例 'compact'、'comfortable')
|
|
3216
3513
|
*/
|
|
3217
3514
|
setDensity(name: string): void;
|
|
3515
|
+
/**
|
|
3516
|
+
* 보통 모드의 행 높이(px)를 바꾸고 다시 배치한다. 이 값은 「사용자가 정한 행 높이」로 기억되어, 밀도를 기본(`setDensity('default')`)으로 되돌릴 때도 이 값으로 돌아온다.
|
|
3517
|
+
* 밀도 프리셋 대신 딱 맞는 높이가 필요할 때 쓴다.
|
|
3518
|
+
*
|
|
3519
|
+
* Changes the normal-mode row height (px) and lays out again. The value is remembered as "the user's row height", so returning the density to default (`setDensity('default')`) also comes back to it.
|
|
3520
|
+
* Use it when you need an exact height instead of a density preset.
|
|
3521
|
+
*
|
|
3522
|
+
* 通常モードの行の高さ(px)を変えて配置し直します。この値は「利用者が決めた行の高さ」として覚えられ、密度を既定(`setDensity('default')`)に戻したときもこの値に戻ります。
|
|
3523
|
+
* 密度のプリセットではなく、ぴったりの高さが必要なときに使います。
|
|
3524
|
+
*
|
|
3525
|
+
* 修改普通模式的行高(px)并重新布局。这个值会被记为「用户设定的行高」,把密度恢复为默认(`setDensity('default')`)时也会回到这个值。
|
|
3526
|
+
* 需要精确高度而不是密度预设时使用。
|
|
3527
|
+
*
|
|
3528
|
+
* @param px - 행 높이(1 이상의 유한수)
|
|
3529
|
+
*
|
|
3530
|
+
* Row height (a finite number of 1 or more)
|
|
3531
|
+
*
|
|
3532
|
+
* 行の高さ(1 以上の有限の数)
|
|
3533
|
+
*
|
|
3534
|
+
* 行高(1 以上的有限数)
|
|
3535
|
+
*
|
|
3536
|
+
* @throws RangeError — `px` 가 1 이상의 유한수가 아닐 때
|
|
3537
|
+
*
|
|
3538
|
+
* RangeError — when `px` is not a finite number of 1 or more
|
|
3539
|
+
*
|
|
3540
|
+
* RangeError — `px` が 1 以上の有限の数でないとき
|
|
3541
|
+
*
|
|
3542
|
+
* RangeError — `px` 不是 1 以上的有限数时
|
|
3543
|
+
*
|
|
3544
|
+
* @example
|
|
3545
|
+
* grid.setRowHeight(44); // 터치 화면에서 손가락으로 누르기 좋게
|
|
3546
|
+
*/
|
|
3547
|
+
setRowHeight(px: number): void;
|
|
3548
|
+
private _applyRowHeight;
|
|
3218
3549
|
/**
|
|
3219
3550
|
* 배경 질감을 바꾼다 — 밋밋한 배경 대신 리넨('linen')·종이결('paper-grain')·모눈('graph') 같은 결을 깔고
|
|
3220
3551
|
* 싶을 때 쓴다. 배경 페인트만 바꾸는 순수 가산적 변경이라 행 위치는 그대로다(재배치 없음). 색·형태·밀도 축과
|
|
3221
3552
|
* 따로 논다. 없는 이름을 넘겨도 안전하게 기본(질감 없음)으로 되돌아간다(throw 안 함).
|
|
3553
|
+
* 결은 머리글·바닥글·페이지 바에만 깔리고 데이터 칸 뒤에는 깔리지 않는다. 테마가 머리글에 깐 무늬가 있으면
|
|
3554
|
+
* 질감이 우선한다(색은 그대로).
|
|
3222
3555
|
*
|
|
3223
3556
|
* Change the background texture — lay a grain like linen ('linen'), paper ('paper-grain'), or a grid
|
|
3224
3557
|
* ('graph') over the plain background. It only repaints the background (purely additive), so row positions
|
|
3225
3558
|
* stay put (no relayout). Independent of the color/form/density axes. An unknown name safely falls back to
|
|
3226
3559
|
* none (never throws).
|
|
3560
|
+
* The grain goes on the header, footer and pager only, never behind data cells. If the theme draws a
|
|
3561
|
+
* pattern on the header, the texture takes precedence (colors stay the same).
|
|
3227
3562
|
*
|
|
3228
3563
|
* 背景の質感を変えます — のっぺりした背景の代わりに、リネン('linen')・紙目('paper-grain')・方眼('graph')といった
|
|
3229
3564
|
* 風合いを敷きたいときに使います。背景のペイントだけを変える純粋に加算的な変更なので、行の位置はそのままです
|
|
3230
3565
|
* (再配置なし)。色・形状・密度の各軸とは独立しています。存在しない名前を渡しても安全に既定(質感なし)へ戻ります
|
|
3231
3566
|
* (throw しません)。
|
|
3567
|
+
* 風合いは見出し・フッター・ページバーにだけ敷かれ、データのセルの後ろには敷かれません。テーマが見出しに
|
|
3568
|
+
* 模様を敷いている場合は質感が優先されます(色はそのまま)。
|
|
3232
3569
|
*
|
|
3233
3570
|
* 改变背景的质感 — 想在平淡的背景上铺一层亚麻('linen')、纸纹('paper-grain')、方格('graph')这类
|
|
3234
3571
|
* 纹理时使用。它只改变背景的绘制,是纯粹加算式的变更,因此行的位置保持不变(无需重新布局)。
|
|
3235
3572
|
* 与颜色、形状、密度各轴互不相干。传入不存在的名称也会安全地回到默认(无质感)(不会 throw)。
|
|
3573
|
+
* 纹理只铺在表头、表尾和分页栏上,不会铺在数据单元格后面。如果主题在表头铺了图案,质感优先(颜色不变)。
|
|
3236
3574
|
*
|
|
3237
3575
|
* @param name - 질감 값 id(예 'linen', 'paper-grain', 'graph')
|
|
3238
3576
|
*
|
|
@@ -212,6 +212,7 @@ export declare class OrgChart {
|
|
|
212
212
|
private _roots;
|
|
213
213
|
private _expandedKeys;
|
|
214
214
|
private _selectedId;
|
|
215
|
+
private _destroyed;
|
|
215
216
|
/**
|
|
216
217
|
* @param selector - 마운트할 컨테이너 셀렉터 문자열 또는 엘리먼트
|
|
217
218
|
*
|
|
@@ -322,6 +323,29 @@ export declare class OrgChart {
|
|
|
322
323
|
* 折叠所有节点(仅显示根节点)。初次打开较大的组织架构图,想先展示最上层结构时调用。
|
|
323
324
|
*/
|
|
324
325
|
collapseAll(): void;
|
|
326
|
+
/**
|
|
327
|
+
* 조직도를 파괴한다: 컨테이너 내용을 비우고 `og-orgchart` 클래스를 떼며, 붙들던 데이터를 놓는다.
|
|
328
|
+
* 같은 요소를 다른 화면(그리드 등)에 다시 쓰기 전에 부른다. 두 번 불러도 탈 없다.
|
|
329
|
+
* `setTheme`/`setSkin` 으로 건 속성은 사용자가 정한 것이라 남긴다(`OpenGrid.destroy()` 와 같은 방침).
|
|
330
|
+
*
|
|
331
|
+
* Destroys the org chart: empties the container, removes the `og-orgchart` class and releases the
|
|
332
|
+
* data it held. Call it before reusing the same element for another view (a grid, etc.). Safe to
|
|
333
|
+
* call more than once. Attributes set through `setTheme`/`setSkin` are the caller's choice and are
|
|
334
|
+
* left in place (same policy as `OpenGrid.destroy()`).
|
|
335
|
+
*
|
|
336
|
+
* 組織図を破棄します: コンテナの中身を空にし、`og-orgchart` クラスを外し、保持していたデータを手放します。
|
|
337
|
+
* 同じ要素を別の画面(グリッドなど)に使い直す前に呼びます。何度呼んでも問題ありません。
|
|
338
|
+
* `setTheme`/`setSkin` で付けた属性は利用者が決めたものなので残します(`OpenGrid.destroy()` と同じ方針)。
|
|
339
|
+
*
|
|
340
|
+
* 销毁组织架构图: 清空容器内容、去掉 `og-orgchart` 类,并释放它持有的数据。
|
|
341
|
+
* 在把同一个元素改用于别的画面(表格等)之前调用。多次调用也没问题。
|
|
342
|
+
* 通过 `setTheme`/`setSkin` 设置的属性是使用者的选择,因此保留(与 `OpenGrid.destroy()` 的方针相同)。
|
|
343
|
+
*
|
|
344
|
+
* @example
|
|
345
|
+
* chart.destroy();
|
|
346
|
+
* const grid = new OpenGrid(sameElement, { columns });
|
|
347
|
+
*/
|
|
348
|
+
destroy(): void;
|
|
325
349
|
private _toggle;
|
|
326
350
|
private _rebuild;
|
|
327
351
|
private _calcLayout;
|