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
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const COMMIT_KEYS = /* @__PURE__ */ new Set(["Enter"]);
|
|
4
|
+
function normalizePattern(i) {
|
|
5
|
+
const e = i.split("+").map((h) => h.trim()).filter(Boolean);
|
|
6
|
+
let s = false, t = false, r = false, n = false, o = "";
|
|
7
|
+
for (const h of e) {
|
|
8
|
+
const a = h.toLowerCase();
|
|
9
|
+
a === "ctrl" || a === "control" ? s = true : a === "alt" || a === "option" ? t = true : a === "shift" ? r = true : a === "meta" || a === "cmd" || a === "command" || a === "super" ? n = true : o = h;
|
|
10
|
+
}
|
|
11
|
+
return canon(o, s, t, r, n);
|
|
12
|
+
}
|
|
13
|
+
function strokeToPattern(i) {
|
|
14
|
+
return canon(i.key, i.ctrl, i.alt, i.shift, i.meta);
|
|
15
|
+
}
|
|
16
|
+
function strokeFromEvent(i) {
|
|
17
|
+
return { key: i.key, ctrl: i.ctrlKey, shift: i.shiftKey, alt: i.altKey, meta: i.metaKey, isComposing: i.isComposing ?? false };
|
|
18
|
+
}
|
|
19
|
+
function canon(i, e, s, t, r) {
|
|
20
|
+
const n = [];
|
|
21
|
+
e && n.push("Ctrl"), s && n.push("Alt"), t && n.push("Shift"), r && n.push("Meta");
|
|
22
|
+
const o = i.toLowerCase();
|
|
23
|
+
return [...n, o].join("+");
|
|
24
|
+
}
|
|
25
|
+
class KeyboardInteractionModel {
|
|
26
|
+
constructor() {
|
|
27
|
+
this._bindings = /* @__PURE__ */ new Map(), this._mouseCommands = /* @__PURE__ */ new Set(), this._mode = "nav";
|
|
28
|
+
}
|
|
29
|
+
register(e) {
|
|
30
|
+
const s = this._storeKey(e.mode, normalizePattern(e.pattern)), t = this._bindings.get(s);
|
|
31
|
+
return t ? { conflict: t } : (this._bindings.set(s, e), {});
|
|
32
|
+
}
|
|
33
|
+
declareMouseCommand(e) {
|
|
34
|
+
this._mouseCommands.add(e);
|
|
35
|
+
}
|
|
36
|
+
resolve(e, s) {
|
|
37
|
+
if (this._guardIme(s)) return null;
|
|
38
|
+
const t = strokeToPattern(s), r = this._bindings.get(this._storeKey(e, t)) ?? this._bindings.get(this._storeKey("*", t));
|
|
39
|
+
return r ? r.commandId : null;
|
|
40
|
+
}
|
|
41
|
+
mode() {
|
|
42
|
+
return this._mode;
|
|
43
|
+
}
|
|
44
|
+
setMode(e) {
|
|
45
|
+
this._mode = e;
|
|
46
|
+
}
|
|
47
|
+
parityReport() {
|
|
48
|
+
const e = /* @__PURE__ */ new Set();
|
|
49
|
+
for (const t of this._bindings.values()) e.add(t.commandId);
|
|
50
|
+
const s = [];
|
|
51
|
+
for (const t of this._mouseCommands) e.has(t) || s.push(t);
|
|
52
|
+
return s.sort(), { mouseOnly: s, covered: this._mouseCommands.size - s.length, total: this._mouseCommands.size };
|
|
53
|
+
}
|
|
54
|
+
size() {
|
|
55
|
+
return this._bindings.size;
|
|
56
|
+
}
|
|
57
|
+
_guardIme(e) {
|
|
58
|
+
return e.isComposing && COMMIT_KEYS.has(e.key);
|
|
59
|
+
}
|
|
60
|
+
_storeKey(e, s) {
|
|
61
|
+
return `${e}|${s}`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
class LiveRegionController {
|
|
65
|
+
constructor(e) {
|
|
66
|
+
this._polite = /* @__PURE__ */ new Map(), this._assertive = /* @__PURE__ */ new Map(), this._timer = null, this._userBusy = false, this._disposed = false, this._spoken = 0, this._coalesced = 0, this._dropped = 0, this._render = e.render, this._t = e.t ?? ((s) => s), this._debounceMs = e.debounceMs ?? 150, this._assertiveImmediate = e.assertiveImmediate ?? true, this._schedule = e.schedule ?? ((s, t) => setTimeout(s, t)), this._cancel = e.cancel ?? ((s) => clearTimeout(s));
|
|
67
|
+
}
|
|
68
|
+
enqueue(e) {
|
|
69
|
+
if (this._disposed) return;
|
|
70
|
+
const s = e.channel === "assertive" ? this._assertive : this._polite;
|
|
71
|
+
if (s.has(e.mergeKey) && this._coalesced++, s.set(e.mergeKey, e), e.channel === "assertive" && this._assertiveImmediate) {
|
|
72
|
+
this._flushAssertive();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this._scheduleFlush();
|
|
76
|
+
}
|
|
77
|
+
setUserBusy(e) {
|
|
78
|
+
const s = this._userBusy;
|
|
79
|
+
this._userBusy = e, s && !e && this._scheduleFlush();
|
|
80
|
+
}
|
|
81
|
+
drop(e) {
|
|
82
|
+
let s = false;
|
|
83
|
+
this._polite.delete(e) && (s = true), this._assertive.delete(e) && (s = true), s && this._dropped++;
|
|
84
|
+
}
|
|
85
|
+
metrics() {
|
|
86
|
+
return { spoken: this._spoken, coalesced: this._coalesced, dropped: this._dropped };
|
|
87
|
+
}
|
|
88
|
+
dispose() {
|
|
89
|
+
this._timer != null && (this._cancel(this._timer), this._timer = null), this._polite.clear(), this._assertive.clear(), this._disposed = true;
|
|
90
|
+
}
|
|
91
|
+
_scheduleFlush() {
|
|
92
|
+
this._disposed || this._timer != null || (this._timer = this._schedule(() => {
|
|
93
|
+
this._timer = null, this._flush();
|
|
94
|
+
}, this._debounceMs));
|
|
95
|
+
}
|
|
96
|
+
_flush() {
|
|
97
|
+
this._disposed || (this._flushAssertive(), this._flushPolite());
|
|
98
|
+
}
|
|
99
|
+
_flushAssertive() {
|
|
100
|
+
if (this._assertive.size === 0) return;
|
|
101
|
+
const e = [...this._assertive.values()].sort((s, t) => t.priority - s.priority);
|
|
102
|
+
this._assertive.clear();
|
|
103
|
+
for (const s of e) this._speak(s);
|
|
104
|
+
}
|
|
105
|
+
_flushPolite() {
|
|
106
|
+
if (this._polite.size === 0) return;
|
|
107
|
+
const e = [], s = /* @__PURE__ */ new Map();
|
|
108
|
+
for (const [t, r] of this._polite) this._userBusy && r.background ? s.set(t, r) : e.push(r);
|
|
109
|
+
this._polite = s, e.sort((t, r) => r.priority - t.priority);
|
|
110
|
+
for (const t of e) this._speak(t);
|
|
111
|
+
}
|
|
112
|
+
_speak(e) {
|
|
113
|
+
const s = this._t(e.messageKey, e.params);
|
|
114
|
+
this._render.announce(e.channel, s), this._spoken++;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
const RESERVED_PREFIXES = ["og:", "og-"];
|
|
118
|
+
function isReserved(i) {
|
|
119
|
+
return RESERVED_PREFIXES.some((e) => i.startsWith(e));
|
|
120
|
+
}
|
|
121
|
+
function spiMajor(i) {
|
|
122
|
+
const e = i.lastIndexOf("@"), s = e >= 0 ? i.slice(e + 1) : i;
|
|
123
|
+
return s.split(".")[0] ?? s;
|
|
124
|
+
}
|
|
125
|
+
function spiCompatible(i, e) {
|
|
126
|
+
return spiMajor(i) === spiMajor(e);
|
|
127
|
+
}
|
|
128
|
+
function buildEntry(i, e, s, t, r) {
|
|
129
|
+
const n = { key: i, value: e, origin: s, priority: t.priority ?? 0, seq: r };
|
|
130
|
+
return t.pluginId !== void 0 && (n.pluginId = t.pluginId), t.spiVersion !== void 0 && (n.spiVersion = t.spiVersion), t.deprecated !== void 0 && (n.deprecated = t.deprecated), n;
|
|
131
|
+
}
|
|
132
|
+
class TypedRegistry {
|
|
133
|
+
constructor(e = {}) {
|
|
134
|
+
this._map = /* @__PURE__ */ new Map(), this._seq = 0, this._disposed = false, this._warned = /* @__PURE__ */ new Set(), this._cfg = e;
|
|
135
|
+
}
|
|
136
|
+
_warn(e, s) {
|
|
137
|
+
const t = `[OpenGrid] ${s}`, r = `${e}::${s}`;
|
|
138
|
+
return this._warned.has(r) || (this._warned.add(r), (this._cfg.onWarn ?? ((o) => {
|
|
139
|
+
typeof console < "u" && console.warn(o);
|
|
140
|
+
}))(t)), t;
|
|
141
|
+
}
|
|
142
|
+
register(e, s, t = {}) {
|
|
143
|
+
if (this._disposed) return { ok: false, action: "rejected", reason: "disposed" };
|
|
144
|
+
if (typeof e != "string" || e.length === 0) return { ok: false, action: "rejected", reason: "invalid-key" };
|
|
145
|
+
const r = t.origin ?? "user";
|
|
146
|
+
if (isReserved(e) && r !== "builtin") return { ok: false, action: "rejected", reason: "reserved-namespace", warning: this._warn(e, `reserved namespace: '${e}' 는 og:* 코어 예약 대역입니다(origin:'builtin' 만 점유).`) };
|
|
147
|
+
if (this._cfg.spi && t.spiVersion !== void 0 && !spiCompatible(this._cfg.spi.version, t.spiVersion)) return { ok: false, action: "rejected", reason: "spi-mismatch", warning: this._warn(e, `SPI major 불일치: '${e}' 선언 ${t.spiVersion}, 코어 ${this._cfg.spi.name}@${this._cfg.spi.version}.`) };
|
|
148
|
+
const n = this._map.get(e);
|
|
149
|
+
return n && !this._resolveConflict(n, t) ? { ok: false, action: "kept", reason: "protected-builtin", warning: this._warn(e, `'${e}' 는 ${n.origin === "builtin" ? "내장(built-in) 보호" : "override 미지정"} — 덮으려면 { override:true }.`) } : (this._map.set(e, buildEntry(e, s, r, t, this._seq++)), { ok: true, action: n ? "replaced" : "added" });
|
|
150
|
+
}
|
|
151
|
+
_resolveConflict(e, s) {
|
|
152
|
+
return e.origin === "builtin" && s.override !== true ? false : this._cfg.duplicatePolicy === "explicit-override" ? s.override === true : true;
|
|
153
|
+
}
|
|
154
|
+
get(e) {
|
|
155
|
+
var _a;
|
|
156
|
+
return (_a = this._map.get(e)) == null ? void 0 : _a.value;
|
|
157
|
+
}
|
|
158
|
+
require(e, s) {
|
|
159
|
+
const t = this.get(e);
|
|
160
|
+
if (t !== void 0) return t;
|
|
161
|
+
if (s !== void 0) return s;
|
|
162
|
+
if (this._cfg.placeholder) return this._cfg.placeholder(e);
|
|
163
|
+
}
|
|
164
|
+
has(e) {
|
|
165
|
+
return this._map.has(e);
|
|
166
|
+
}
|
|
167
|
+
list() {
|
|
168
|
+
return [...this._map.keys()];
|
|
169
|
+
}
|
|
170
|
+
entries() {
|
|
171
|
+
return [...this._map.values()];
|
|
172
|
+
}
|
|
173
|
+
unregister(e) {
|
|
174
|
+
return this._map.delete(e);
|
|
175
|
+
}
|
|
176
|
+
disposePlugin(e) {
|
|
177
|
+
let s = 0;
|
|
178
|
+
for (const [t, r] of this._map) r.pluginId === e && (this._map.delete(t), s++);
|
|
179
|
+
return s;
|
|
180
|
+
}
|
|
181
|
+
dispose() {
|
|
182
|
+
this._map.clear(), this._warned.clear(), this._disposed = true;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const VISUAL_EQUIV_SPI = { name: "IVisualEquivProvider", version: "1" };
|
|
186
|
+
class VisualEquivRegistry {
|
|
187
|
+
constructor(e) {
|
|
188
|
+
const s = { spi: VISUAL_EQUIV_SPI };
|
|
189
|
+
e !== void 0 && (s.onWarn = e), this._reg = new TypedRegistry(s), this._onWarn = e;
|
|
190
|
+
}
|
|
191
|
+
register(e, s) {
|
|
192
|
+
return this._reg.register(e.kind, e, s);
|
|
193
|
+
}
|
|
194
|
+
has(e) {
|
|
195
|
+
return this._reg.has(e);
|
|
196
|
+
}
|
|
197
|
+
get(e) {
|
|
198
|
+
return this._reg.get(e);
|
|
199
|
+
}
|
|
200
|
+
list() {
|
|
201
|
+
return this._reg.list();
|
|
202
|
+
}
|
|
203
|
+
describe(e, s) {
|
|
204
|
+
var _a;
|
|
205
|
+
const t = this._reg.get(e);
|
|
206
|
+
return t ? t.describe(s) : ((_a = this._onWarn) == null ? void 0 : _a.call(this, `[VisualEquivRegistry] describe("${e}"): no text-equivalent provider registered for this kind (returned an empty string).`), "");
|
|
207
|
+
}
|
|
208
|
+
disposePlugin(e) {
|
|
209
|
+
return this._reg.disposePlugin(e);
|
|
210
|
+
}
|
|
211
|
+
dispose() {
|
|
212
|
+
this._reg.dispose();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
exports.KeyboardInteractionModel = KeyboardInteractionModel, exports.LiveRegionController = LiveRegionController, exports.VisualEquivRegistry = VisualEquivRegistry, exports.strokeFromEvent = strokeFromEvent;
|
|
216
|
+
//# sourceMappingURL=open-grid-a11y.cjs.map
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
const d = /* @__PURE__ */ new Set(["Enter"]);
|
|
2
|
+
function c(i) {
|
|
3
|
+
const e = i.split("+").map((h) => h.trim()).filter(Boolean);
|
|
4
|
+
let s = false, t = false, r = false, n = false, o = "";
|
|
5
|
+
for (const h of e) {
|
|
6
|
+
const a = h.toLowerCase();
|
|
7
|
+
a === "ctrl" || a === "control" ? s = true : a === "alt" || a === "option" ? t = true : a === "shift" ? r = true : a === "meta" || a === "cmd" || a === "command" || a === "super" ? n = true : o = h;
|
|
8
|
+
}
|
|
9
|
+
return u(o, s, t, r, n);
|
|
10
|
+
}
|
|
11
|
+
function _(i) {
|
|
12
|
+
return u(i.key, i.ctrl, i.alt, i.shift, i.meta);
|
|
13
|
+
}
|
|
14
|
+
function f(i) {
|
|
15
|
+
return { key: i.key, ctrl: i.ctrlKey, shift: i.shiftKey, alt: i.altKey, meta: i.metaKey, isComposing: i.isComposing ?? false };
|
|
16
|
+
}
|
|
17
|
+
function u(i, e, s, t, r) {
|
|
18
|
+
const n = [];
|
|
19
|
+
e && n.push("Ctrl"), s && n.push("Alt"), t && n.push("Shift"), r && n.push("Meta");
|
|
20
|
+
const o = i.toLowerCase();
|
|
21
|
+
return [...n, o].join("+");
|
|
22
|
+
}
|
|
23
|
+
class p {
|
|
24
|
+
constructor() {
|
|
25
|
+
this._bindings = /* @__PURE__ */ new Map(), this._mouseCommands = /* @__PURE__ */ new Set(), this._mode = "nav";
|
|
26
|
+
}
|
|
27
|
+
register(e) {
|
|
28
|
+
const s = this._storeKey(e.mode, c(e.pattern)), t = this._bindings.get(s);
|
|
29
|
+
return t ? { conflict: t } : (this._bindings.set(s, e), {});
|
|
30
|
+
}
|
|
31
|
+
declareMouseCommand(e) {
|
|
32
|
+
this._mouseCommands.add(e);
|
|
33
|
+
}
|
|
34
|
+
resolve(e, s) {
|
|
35
|
+
if (this._guardIme(s)) return null;
|
|
36
|
+
const t = _(s), r = this._bindings.get(this._storeKey(e, t)) ?? this._bindings.get(this._storeKey("*", t));
|
|
37
|
+
return r ? r.commandId : null;
|
|
38
|
+
}
|
|
39
|
+
mode() {
|
|
40
|
+
return this._mode;
|
|
41
|
+
}
|
|
42
|
+
setMode(e) {
|
|
43
|
+
this._mode = e;
|
|
44
|
+
}
|
|
45
|
+
parityReport() {
|
|
46
|
+
const e = /* @__PURE__ */ new Set();
|
|
47
|
+
for (const t of this._bindings.values()) e.add(t.commandId);
|
|
48
|
+
const s = [];
|
|
49
|
+
for (const t of this._mouseCommands) e.has(t) || s.push(t);
|
|
50
|
+
return s.sort(), { mouseOnly: s, covered: this._mouseCommands.size - s.length, total: this._mouseCommands.size };
|
|
51
|
+
}
|
|
52
|
+
size() {
|
|
53
|
+
return this._bindings.size;
|
|
54
|
+
}
|
|
55
|
+
_guardIme(e) {
|
|
56
|
+
return e.isComposing && d.has(e.key);
|
|
57
|
+
}
|
|
58
|
+
_storeKey(e, s) {
|
|
59
|
+
return `${e}|${s}`;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
class m {
|
|
63
|
+
constructor(e) {
|
|
64
|
+
this._polite = /* @__PURE__ */ new Map(), this._assertive = /* @__PURE__ */ new Map(), this._timer = null, this._userBusy = false, this._disposed = false, this._spoken = 0, this._coalesced = 0, this._dropped = 0, this._render = e.render, this._t = e.t ?? ((s) => s), this._debounceMs = e.debounceMs ?? 150, this._assertiveImmediate = e.assertiveImmediate ?? true, this._schedule = e.schedule ?? ((s, t) => setTimeout(s, t)), this._cancel = e.cancel ?? ((s) => clearTimeout(s));
|
|
65
|
+
}
|
|
66
|
+
enqueue(e) {
|
|
67
|
+
if (this._disposed) return;
|
|
68
|
+
const s = e.channel === "assertive" ? this._assertive : this._polite;
|
|
69
|
+
if (s.has(e.mergeKey) && this._coalesced++, s.set(e.mergeKey, e), e.channel === "assertive" && this._assertiveImmediate) {
|
|
70
|
+
this._flushAssertive();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
this._scheduleFlush();
|
|
74
|
+
}
|
|
75
|
+
setUserBusy(e) {
|
|
76
|
+
const s = this._userBusy;
|
|
77
|
+
this._userBusy = e, s && !e && this._scheduleFlush();
|
|
78
|
+
}
|
|
79
|
+
drop(e) {
|
|
80
|
+
let s = false;
|
|
81
|
+
this._polite.delete(e) && (s = true), this._assertive.delete(e) && (s = true), s && this._dropped++;
|
|
82
|
+
}
|
|
83
|
+
metrics() {
|
|
84
|
+
return { spoken: this._spoken, coalesced: this._coalesced, dropped: this._dropped };
|
|
85
|
+
}
|
|
86
|
+
dispose() {
|
|
87
|
+
this._timer != null && (this._cancel(this._timer), this._timer = null), this._polite.clear(), this._assertive.clear(), this._disposed = true;
|
|
88
|
+
}
|
|
89
|
+
_scheduleFlush() {
|
|
90
|
+
this._disposed || this._timer != null || (this._timer = this._schedule(() => {
|
|
91
|
+
this._timer = null, this._flush();
|
|
92
|
+
}, this._debounceMs));
|
|
93
|
+
}
|
|
94
|
+
_flush() {
|
|
95
|
+
this._disposed || (this._flushAssertive(), this._flushPolite());
|
|
96
|
+
}
|
|
97
|
+
_flushAssertive() {
|
|
98
|
+
if (this._assertive.size === 0) return;
|
|
99
|
+
const e = [...this._assertive.values()].sort((s, t) => t.priority - s.priority);
|
|
100
|
+
this._assertive.clear();
|
|
101
|
+
for (const s of e) this._speak(s);
|
|
102
|
+
}
|
|
103
|
+
_flushPolite() {
|
|
104
|
+
if (this._polite.size === 0) return;
|
|
105
|
+
const e = [], s = /* @__PURE__ */ new Map();
|
|
106
|
+
for (const [t, r] of this._polite) this._userBusy && r.background ? s.set(t, r) : e.push(r);
|
|
107
|
+
this._polite = s, e.sort((t, r) => r.priority - t.priority);
|
|
108
|
+
for (const t of e) this._speak(t);
|
|
109
|
+
}
|
|
110
|
+
_speak(e) {
|
|
111
|
+
const s = this._t(e.messageKey, e.params);
|
|
112
|
+
this._render.announce(e.channel, s), this._spoken++;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const g = ["og:", "og-"];
|
|
116
|
+
function v(i) {
|
|
117
|
+
return g.some((e) => i.startsWith(e));
|
|
118
|
+
}
|
|
119
|
+
function l(i) {
|
|
120
|
+
const e = i.lastIndexOf("@"), s = e >= 0 ? i.slice(e + 1) : i;
|
|
121
|
+
return s.split(".")[0] ?? s;
|
|
122
|
+
}
|
|
123
|
+
function y(i, e) {
|
|
124
|
+
return l(i) === l(e);
|
|
125
|
+
}
|
|
126
|
+
function w(i, e, s, t, r) {
|
|
127
|
+
const n = { key: i, value: e, origin: s, priority: t.priority ?? 0, seq: r };
|
|
128
|
+
return t.pluginId !== void 0 && (n.pluginId = t.pluginId), t.spiVersion !== void 0 && (n.spiVersion = t.spiVersion), t.deprecated !== void 0 && (n.deprecated = t.deprecated), n;
|
|
129
|
+
}
|
|
130
|
+
class b {
|
|
131
|
+
constructor(e = {}) {
|
|
132
|
+
this._map = /* @__PURE__ */ new Map(), this._seq = 0, this._disposed = false, this._warned = /* @__PURE__ */ new Set(), this._cfg = e;
|
|
133
|
+
}
|
|
134
|
+
_warn(e, s) {
|
|
135
|
+
const t = `[OpenGrid] ${s}`, r = `${e}::${s}`;
|
|
136
|
+
return this._warned.has(r) || (this._warned.add(r), (this._cfg.onWarn ?? ((o) => {
|
|
137
|
+
typeof console < "u" && console.warn(o);
|
|
138
|
+
}))(t)), t;
|
|
139
|
+
}
|
|
140
|
+
register(e, s, t = {}) {
|
|
141
|
+
if (this._disposed) return { ok: false, action: "rejected", reason: "disposed" };
|
|
142
|
+
if (typeof e != "string" || e.length === 0) return { ok: false, action: "rejected", reason: "invalid-key" };
|
|
143
|
+
const r = t.origin ?? "user";
|
|
144
|
+
if (v(e) && r !== "builtin") return { ok: false, action: "rejected", reason: "reserved-namespace", warning: this._warn(e, `reserved namespace: '${e}' 는 og:* 코어 예약 대역입니다(origin:'builtin' 만 점유).`) };
|
|
145
|
+
if (this._cfg.spi && t.spiVersion !== void 0 && !y(this._cfg.spi.version, t.spiVersion)) return { ok: false, action: "rejected", reason: "spi-mismatch", warning: this._warn(e, `SPI major 불일치: '${e}' 선언 ${t.spiVersion}, 코어 ${this._cfg.spi.name}@${this._cfg.spi.version}.`) };
|
|
146
|
+
const n = this._map.get(e);
|
|
147
|
+
return n && !this._resolveConflict(n, t) ? { ok: false, action: "kept", reason: "protected-builtin", warning: this._warn(e, `'${e}' 는 ${n.origin === "builtin" ? "내장(built-in) 보호" : "override 미지정"} — 덮으려면 { override:true }.`) } : (this._map.set(e, w(e, s, r, t, this._seq++)), { ok: true, action: n ? "replaced" : "added" });
|
|
148
|
+
}
|
|
149
|
+
_resolveConflict(e, s) {
|
|
150
|
+
return e.origin === "builtin" && s.override !== true ? false : this._cfg.duplicatePolicy === "explicit-override" ? s.override === true : true;
|
|
151
|
+
}
|
|
152
|
+
get(e) {
|
|
153
|
+
var _a;
|
|
154
|
+
return (_a = this._map.get(e)) == null ? void 0 : _a.value;
|
|
155
|
+
}
|
|
156
|
+
require(e, s) {
|
|
157
|
+
const t = this.get(e);
|
|
158
|
+
if (t !== void 0) return t;
|
|
159
|
+
if (s !== void 0) return s;
|
|
160
|
+
if (this._cfg.placeholder) return this._cfg.placeholder(e);
|
|
161
|
+
}
|
|
162
|
+
has(e) {
|
|
163
|
+
return this._map.has(e);
|
|
164
|
+
}
|
|
165
|
+
list() {
|
|
166
|
+
return [...this._map.keys()];
|
|
167
|
+
}
|
|
168
|
+
entries() {
|
|
169
|
+
return [...this._map.values()];
|
|
170
|
+
}
|
|
171
|
+
unregister(e) {
|
|
172
|
+
return this._map.delete(e);
|
|
173
|
+
}
|
|
174
|
+
disposePlugin(e) {
|
|
175
|
+
let s = 0;
|
|
176
|
+
for (const [t, r] of this._map) r.pluginId === e && (this._map.delete(t), s++);
|
|
177
|
+
return s;
|
|
178
|
+
}
|
|
179
|
+
dispose() {
|
|
180
|
+
this._map.clear(), this._warned.clear(), this._disposed = true;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
const I = { name: "IVisualEquivProvider", version: "1" };
|
|
184
|
+
class C {
|
|
185
|
+
constructor(e) {
|
|
186
|
+
const s = { spi: I };
|
|
187
|
+
e !== void 0 && (s.onWarn = e), this._reg = new b(s), this._onWarn = e;
|
|
188
|
+
}
|
|
189
|
+
register(e, s) {
|
|
190
|
+
return this._reg.register(e.kind, e, s);
|
|
191
|
+
}
|
|
192
|
+
has(e) {
|
|
193
|
+
return this._reg.has(e);
|
|
194
|
+
}
|
|
195
|
+
get(e) {
|
|
196
|
+
return this._reg.get(e);
|
|
197
|
+
}
|
|
198
|
+
list() {
|
|
199
|
+
return this._reg.list();
|
|
200
|
+
}
|
|
201
|
+
describe(e, s) {
|
|
202
|
+
var _a;
|
|
203
|
+
const t = this._reg.get(e);
|
|
204
|
+
return t ? t.describe(s) : ((_a = this._onWarn) == null ? void 0 : _a.call(this, `[VisualEquivRegistry] describe("${e}"): no text-equivalent provider registered for this kind (returned an empty string).`), "");
|
|
205
|
+
}
|
|
206
|
+
disposePlugin(e) {
|
|
207
|
+
return this._reg.disposePlugin(e);
|
|
208
|
+
}
|
|
209
|
+
dispose() {
|
|
210
|
+
this._reg.dispose();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
export {
|
|
214
|
+
p as KeyboardInteractionModel,
|
|
215
|
+
m as LiveRegionController,
|
|
216
|
+
C as VisualEquivRegistry,
|
|
217
|
+
f as strokeFromEvent
|
|
218
|
+
};
|
|
219
|
+
//# sourceMappingURL=open-grid-a11y.js.map
|
package/dist/open-grid-base.css
CHANGED
|
@@ -1778,6 +1778,15 @@
|
|
|
1778
1778
|
font-size: 12px;
|
|
1779
1779
|
}
|
|
1780
1780
|
|
|
1781
|
+
/* ── 질감 축: 크롬에만 칠함. !important = 인라인 background 단축 속성을 이기려고(header.css T2) */
|
|
1782
|
+
.og-container[data-og-texture] .og-header-cell,
|
|
1783
|
+
.og-container[data-og-texture] .og-footer,
|
|
1784
|
+
.og-container[data-og-texture] .og-footer-bar,
|
|
1785
|
+
.og-container[data-og-texture] .og-pagination {
|
|
1786
|
+
background-image: var(--og-texture-bg) !important;
|
|
1787
|
+
background-size: var(--og-texture-size) !important;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1781
1790
|
.og-vue-wrapper[data-v-a9841021] {
|
|
1782
1791
|
display: block;
|
|
1783
1792
|
box-sizing: border-box;
|
|
@@ -73,20 +73,11 @@
|
|
|
73
73
|
filter: none;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
/* 정렬 가능 힌트 —
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
base.css:218 `.og-header-cell.og-sortable{cursor:pointer}` 도 같은 이유로 죽어 있다.
|
|
82
|
-
코어가 대신 인라인으로 `cursor: pointer` 를 쓴다(GridRenderer.ts:434).
|
|
83
|
-
금지선(코어 JS 수정 0)이라 클래스를 붙일 수 없으므로 **살아 있는 인라인 값을 직접 읽는다**(인터랙션).
|
|
84
|
-
|
|
85
|
-
▸ [미정] 본 구현에서 제대로 고치려면 코어 JS 한 줄이다 —
|
|
86
|
-
GridRenderer.ts if (sortable) th.classList.add('og-sortable');
|
|
87
|
-
그 한 줄을 허용하면 아래 `[style*=...]` 수법은 필요 없어지고 base.css:218 도 같이 살아난다.
|
|
88
|
-
허용 안 하면 이 수법으로 남는다. 선택지 둘 다 화면은 같다. */
|
|
89
|
-
[data-og-header] .og-header-cell[style*="cursor: pointer"]::after {
|
|
76
|
+
/* 정렬 가능 힌트 — 눌러보기 전에 정렬 가능한지 보이게 한다. T3 (::after 는 인라인 목록에 없다)
|
|
77
|
+
코어가 정렬 가능한 머리글 칸에 `og-sortable` 클래스를 단다(정렬된 칸의 `og-sorted` 와 같은 가족).
|
|
78
|
+
예전에는 코어가 이 클래스를 달지 않아 인라인 `cursor: pointer` 문자열로 가려냈다 — 인라인 표기가
|
|
79
|
+
바뀌면 깨지는 길이라 클래스로 바꿨다. 고르는 칸은 같아 화면은 그대로다. */
|
|
80
|
+
[data-og-header] .og-header-cell.og-sortable::after {
|
|
90
81
|
content: '\21C5';
|
|
91
82
|
position: absolute;
|
|
92
83
|
right: var(--og-header-hint-inset, 9px);
|
|
@@ -101,7 +92,7 @@
|
|
|
101
92
|
pointer-events: none;
|
|
102
93
|
transition: opacity var(--og-transition-fast);
|
|
103
94
|
}
|
|
104
|
-
[data-og-header] .og-header-cell
|
|
95
|
+
[data-og-header] .og-header-cell.og-sortable:hover::after { opacity: 0.7; }
|
|
105
96
|
[data-og-header] .og-header-cell.og-sorted::after { content: none; }
|
|
106
97
|
|
|
107
98
|
/* 리사이즈 손잡이 — base 는 본문용 --og-border-color 를 쓴다. 헤더 극성이 본문과 다른 테마에서
|
package/dist/open-grid-react.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime"), React = require("react"), OpenGrid = require("./OpenGrid-
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime"), React = require("react"), OpenGrid = require("./OpenGrid-BUYQs1_w.cjs");
|
|
4
4
|
function OpenGridReact({ data: e, columns: r, height: t = 400, width: u = "100%", editable: i = false, sortable: p = true, filterable: o = true, rowNumber: l = false, checkColumn: d = false, stateColumn: y = false, draggable: R = false, frozenColumns: x = 0, theme: s = "default", options: E, style: T, className: $, onReady: g, onDataChange: O, onCellClick: G, onRowClick: j, onEditEnd: a, onSortChange: b, onFilterChange: q, onRowDrop: S }) {
|
|
5
5
|
const c = React.useRef(null), n = React.useRef(null), M = { height: typeof t == "number" ? `${t}px` : t, width: typeof u == "number" ? `${u}px` : u, display: "block", boxSizing: "border-box", ...T };
|
|
6
6
|
return React.useEffect(() => {
|
package/dist/open-grid-react.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as W } from "react/jsx-runtime";
|
|
2
2
|
import J, { useRef as u, useEffect as f } from "react";
|
|
3
|
-
import { O as K } from "./OpenGrid-
|
|
3
|
+
import { O as K } from "./OpenGrid-BmagF0yo.js";
|
|
4
4
|
function q({ data: r, columns: e, height: t = 400, width: c = "100%", editable: o = false, sortable: l = true, filterable: y = true, rowNumber: d = false, checkColumn: O = false, stateColumn: R = false, draggable: x = false, frozenColumns: G = 0, theme: s = "default", options: z, style: A, className: B, onReady: D, onDataChange: m, onCellClick: a, onRowClick: $, onEditEnd: b, onSortChange: j, onFilterChange: v, onRowDrop: S }) {
|
|
5
5
|
const i = u(null), n = u(null), H = { height: typeof t == "number" ? `${t}px` : t, width: typeof c == "number" ? `${c}px` : c, display: "block", boxSizing: "border-box", ...A };
|
|
6
6
|
return f(() => {
|
package/dist/open-grid-vue.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const vue = require("vue"), OpenGrid$1 = require("./OpenGrid-
|
|
3
|
+
const vue = require("vue"), OpenGrid$1 = require("./OpenGrid-BUYQs1_w.cjs"), _sfc_main = vue.defineComponent({ __name: "OpenGrid", props: { data: { default: () => [] }, columns: {}, height: { default: 400 }, width: { default: "100%" }, editable: { type: Boolean, default: false }, sortable: { type: Boolean, default: true }, filterable: { type: Boolean, default: true }, rowNumber: { type: Boolean, default: false }, checkColumn: { type: Boolean, default: false }, stateColumn: { type: Boolean, default: false }, draggable: { type: Boolean, default: false }, frozenColumns: { default: 0 }, theme: { default: "default" }, options: {} }, emits: ["update:data", "ready", "cell-click", "row-click", "edit-end", "sort-change", "filter-change", "row-check"], setup(n, { expose: u, emit: r }) {
|
|
4
4
|
const e = n, o = r, c = vue.ref(), a = vue.shallowRef(null);
|
|
5
5
|
let i = null;
|
|
6
6
|
const s = vue.computed(() => ({ height: typeof e.height == "number" ? `${e.height}px` : e.height, width: typeof e.width == "number" ? `${e.width}px` : e.width }));
|
package/dist/open-grid-vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, ref as p, shallowRef as m, computed as h, onMounted as g, watch as d, onUnmounted as y, openBlock as b, createElementBlock as v, normalizeStyle as C } from "vue";
|
|
2
|
-
import { O as k } from "./OpenGrid-
|
|
2
|
+
import { O as k } from "./OpenGrid-BmagF0yo.js";
|
|
3
3
|
const w = f({ __name: "OpenGrid", props: { data: { default: () => [] }, columns: {}, height: { default: 400 }, width: { default: "100%" }, editable: { type: Boolean, default: false }, sortable: { type: Boolean, default: true }, filterable: { type: Boolean, default: true }, rowNumber: { type: Boolean, default: false }, checkColumn: { type: Boolean, default: false }, stateColumn: { type: Boolean, default: false }, draggable: { type: Boolean, default: false }, frozenColumns: { default: 0 }, theme: { default: "default" }, options: {} }, emits: ["update:data", "ready", "cell-click", "row-click", "edit-end", "sort-change", "filter-change", "row-check"], setup(n, { expose: u, emit: r }) {
|
|
4
4
|
const e = n, o = r, c = p(), a = m(null);
|
|
5
5
|
let i = null;
|
package/dist/open-grid.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const OpenGrid = require("./OpenGrid-
|
|
3
|
+
const OpenGrid = require("./OpenGrid-BUYQs1_w.cjs"), Registry = require("./Registry-D74ZmdDz.cjs");
|
|
4
4
|
class GridShuttle {
|
|
5
5
|
constructor(t, e, n, o = {}) {
|
|
6
6
|
this._left = t, this._right = e;
|
|
@@ -37,7 +37,7 @@ function createGridShuttle(E, t, e, n) {
|
|
|
37
37
|
}
|
|
38
38
|
class OrgChart {
|
|
39
39
|
constructor(t, e) {
|
|
40
|
-
this._data = [], this._roots = [], this._expandedKeys = /* @__PURE__ */ new Set(), this._selectedId = null, this._container = typeof t == "string" ? document.querySelector(t) : t, this._opts = { nodeWidth: 160, nodeHeight: 72, levelGap: 52, siblingGap: 20, expandOnLoad: true, onNodeClick: () => {
|
|
40
|
+
this._data = [], this._roots = [], this._expandedKeys = /* @__PURE__ */ new Set(), this._selectedId = null, this._destroyed = false, this._container = typeof t == "string" ? document.querySelector(t) : t, this._opts = { nodeWidth: 160, nodeHeight: 72, levelGap: 52, siblingGap: 20, expandOnLoad: true, onNodeClick: () => {
|
|
41
41
|
}, ...e }, this._container.classList.add("og-orgchart");
|
|
42
42
|
}
|
|
43
43
|
setData(t) {
|
|
@@ -60,6 +60,9 @@ class OrgChart {
|
|
|
60
60
|
collapseAll() {
|
|
61
61
|
this._expandedKeys.clear(), this._rebuild();
|
|
62
62
|
}
|
|
63
|
+
destroy() {
|
|
64
|
+
this._destroyed || (this._destroyed = true, this._container.innerHTML = "", this._container.classList.remove("og-orgchart"), this._data = [], this._roots = [], this._expandedKeys.clear(), this._selectedId = null);
|
|
65
|
+
}
|
|
63
66
|
_toggle(t) {
|
|
64
67
|
this._expandedKeys.has(t) ? this._expandedKeys.delete(t) : this._expandedKeys.add(t), this._rebuild();
|
|
65
68
|
}
|
package/dist/open-grid.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b, t as T } from "./OpenGrid-
|
|
2
|
-
import { D, I, L, O, S, i, l, r, s } from "./OpenGrid-
|
|
1
|
+
import { b, t as T } from "./OpenGrid-BmagF0yo.js";
|
|
2
|
+
import { D, I, L, O, S, i, l, r, s } from "./OpenGrid-BmagF0yo.js";
|
|
3
3
|
import { R, T as T2, i as i2 } from "./Registry-CPJYOqCn.js";
|
|
4
4
|
class C {
|
|
5
5
|
constructor(t, e, r2, o = {}) {
|
|
@@ -37,7 +37,7 @@ function v(E, t, e, r2) {
|
|
|
37
37
|
}
|
|
38
38
|
class N {
|
|
39
39
|
constructor(t, e) {
|
|
40
|
-
this._data = [], this._roots = [], this._expandedKeys = /* @__PURE__ */ new Set(), this._selectedId = null, this._container = typeof t == "string" ? document.querySelector(t) : t, this._opts = { nodeWidth: 160, nodeHeight: 72, levelGap: 52, siblingGap: 20, expandOnLoad: true, onNodeClick: () => {
|
|
40
|
+
this._data = [], this._roots = [], this._expandedKeys = /* @__PURE__ */ new Set(), this._selectedId = null, this._destroyed = false, this._container = typeof t == "string" ? document.querySelector(t) : t, this._opts = { nodeWidth: 160, nodeHeight: 72, levelGap: 52, siblingGap: 20, expandOnLoad: true, onNodeClick: () => {
|
|
41
41
|
}, ...e }, this._container.classList.add("og-orgchart");
|
|
42
42
|
}
|
|
43
43
|
setData(t) {
|
|
@@ -60,6 +60,9 @@ class N {
|
|
|
60
60
|
collapseAll() {
|
|
61
61
|
this._expandedKeys.clear(), this._rebuild();
|
|
62
62
|
}
|
|
63
|
+
destroy() {
|
|
64
|
+
this._destroyed || (this._destroyed = true, this._container.innerHTML = "", this._container.classList.remove("og-orgchart"), this._data = [], this._roots = [], this._expandedKeys.clear(), this._selectedId = null);
|
|
65
|
+
}
|
|
63
66
|
_toggle(t) {
|
|
64
67
|
this._expandedKeys.has(t) ? this._expandedKeys.delete(t) : this._expandedKeys.add(t), this._rebuild();
|
|
65
68
|
}
|