@dineug/erd-editor 3.9.1 → 3.10.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/README.md +46 -9
- package/dist/components/erd/Erd.d.ts +1 -0
- package/dist/components/erd/canvas/relationship-group/relationship/Relationship.d.ts +2 -0
- package/dist/components/erd/canvas/relationship-group/relationship/RelationshipActionLabel.d.ts +32 -0
- package/dist/components/erd/canvas/table/cellLayout.d.ts +11 -0
- package/dist/components/erd/canvas/table/column/Column.d.ts +7 -0
- package/dist/components/erd/canvas/table/goToErd.d.ts +3 -10
- package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +11 -0
- package/dist/components/erd/goToErdTarget.d.ts +85 -0
- package/dist/components/erd/table-properties/TableProperties.d.ts +2 -0
- package/dist/components/erd/table-properties/TableProperties.styles.d.ts +24 -2
- package/dist/components/erd/table-properties/table-properties-indexes/TablePropertiesIndexes.d.ts +2 -0
- package/dist/components/erd/table-properties/table-properties-indexes/TablePropertiesIndexes.styles.d.ts +32 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.d.ts +7 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-checkbox-column/IndexesCheckboxColumn.styles.d.ts +5 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.d.ts +7 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-column/IndexesColumn.styles.d.ts +3 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.d.ts +7 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-index/IndexesIndex.styles.d.ts +6 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-key/IndexesKey.d.ts +15 -0
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-key/IndexesKey.styles.d.ts +13 -0
- package/dist/components/erd-editor/ErdEditor.d.ts +1 -1
- package/dist/components/find-replace/FindReplace.d.ts +13 -0
- package/dist/components/find-replace/FindReplace.styles.d.ts +27 -0
- package/dist/components/find-replace/fieldIcon.d.ts +5 -0
- package/dist/components/find-replace/matchTarget.d.ts +26 -0
- package/dist/components/find-replace/panelLayout.d.ts +17 -0
- package/dist/components/primitives/icon/icons.d.ts +10 -1
- package/dist/components/quick-search/QuickSearch.styles.d.ts +6 -0
- package/dist/components/quick-search/actions.d.ts +23 -0
- package/dist/components/quick-search/hangul.d.ts +73 -0
- package/dist/components/quick-search/paletteQuery.d.ts +37 -0
- package/dist/components/quick-search/scopedActions.d.ts +41 -0
- package/dist/components/visualization/table/column/Column.d.ts +4 -0
- package/dist/constants/layout.d.ts +13 -0
- package/dist/constants/open.d.ts +1 -0
- package/dist/constants/schema.d.ts +13 -0
- package/dist/engine/index.d.ts +1 -1
- package/dist/engine/index.js +20 -14
- package/dist/engine/modules/relationship/actions.d.ts +13 -0
- package/dist/engine/modules/relationship/atom.actions.d.ts +54 -0
- package/dist/engine/modules/relationship/fkColumns.d.ts +20 -3
- package/dist/engine/modules/relationship/generator.actions.d.ts +5 -2
- package/dist/engine/modules/relationship/history.d.ts +2 -0
- package/dist/engine/modules/relationship/hooks.d.ts +11 -0
- package/dist/engine/modules/table-column/hooks.d.ts +6 -0
- package/dist/engine/replication-store.d.ts +15 -1
- package/dist/engine/rx-operators/flushOnNotifier.d.ts +6 -0
- package/dist/engine/shared-store.d.ts +2 -2
- package/dist/engine/store-hooks.d.ts +8 -0
- package/dist/erd-editor.umd.js +1038 -481
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7151 -5306
- package/dist/konva/scene/metrics.d.ts +5 -0
- package/dist/{store-hooks-DuNN9ZKu.js → loadValue-Mdc5K4qO.js} +4002 -3426
- package/dist/peer/index.d.ts +1 -1
- package/dist/peer/index.js +77 -80
- package/dist/schemaGCService-CZtGFh2z.js +42 -0
- package/dist/services/schema-gc/schemaGCService.d.ts +5 -0
- package/dist/shared-store-D82WVL5a.js +1129 -0
- package/dist/utils/calcTable.d.ts +9 -1
- package/dist/utils/emitter.d.ts +13 -0
- package/dist/utils/find-replace/findMatches.d.ts +90 -0
- package/dist/utils/find-replace/index.d.ts +5 -0
- package/dist/utils/find-replace/matcher.d.ts +53 -0
- package/dist/utils/find-replace/present.d.ts +22 -0
- package/dist/utils/find-replace/replaceActions.d.ts +20 -0
- package/dist/utils/generator-code/utils.d.ts +12 -1
- package/dist/utils/keyboard-shortcut/index.d.ts +8 -1
- package/dist/utils/loadValue.d.ts +7 -0
- package/dist/utils/referentialAction.d.ts +21 -0
- package/dist/utils/schema-aml-parser/types.d.ts +6 -0
- package/dist/utils/schema-dbml-parser/types.d.ts +3 -0
- package/dist/utils/schema-sql/Databricks.d.ts +5 -0
- package/dist/utils/schema-sql/MSSQL.d.ts +5 -0
- package/dist/utils/schema-sql/MariaDB.d.ts +5 -0
- package/dist/utils/schema-sql/MySQL.d.ts +5 -0
- package/dist/utils/schema-sql/Oracle.d.ts +5 -0
- package/dist/utils/schema-sql/index.d.ts +5 -0
- package/dist/utils/schema-sql/utils.d.ts +19 -0
- package/dist/utils/schema-sql-parser/index.d.ts +5 -1
- package/dist/utils/table-clipboard/payload.d.ts +3 -0
- package/dist/utils/tableKeys.d.ts +46 -0
- package/dist/workers/elkLayout.shared-worker.js +1 -1
- package/dist/workers/exportPng.shared-worker.js +29 -27
- package/dist/workers/schemaGC.shared-worker.js +1 -1
- package/package.json +9 -8
- package/dist/schemaGCService-_8A8Oh9Q.js +0 -38
- package/dist/shared-store-CtJL8B4I.js +0 -1072
package/dist/peer/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { COLUMN_MIN_WIDTH, MEMO_MIN_HEIGHT, MEMO_MIN_WIDTH, } from '../constants/layout';
|
|
2
|
-
export { BracketType, CanvasType, ColumnOption, ColumnType, Database, Language, NameCase, OrderType, RelationshipType, SaveSettingType, Show, } from '../constants/schema';
|
|
2
|
+
export { BracketType, CanvasType, ColumnOption, ColumnType, Database, Language, NameCase, OrderType, ReferentialAction, RelationshipType, SaveSettingType, Show, } from '../constants/schema';
|
|
3
3
|
export { type DatabaseVendor, DatabaseVendorList, DatabaseVendorToDatabase, } from '../constants/sql/database';
|
|
4
4
|
export { type ActionType, ChangeActionTypes, SharedFollowingActionTypes, StreamActionTypes, } from '../engine/actions';
|
|
5
5
|
export { createEngineContext, type EngineContext } from '../engine/context';
|
package/dist/peer/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
3
|
-
import { isEmpty as ue } from "es-toolkit/compat";
|
|
1
|
+
import { D as e, Ea as t, Ia as n, Jn as r, K as i, Kt as a, L as o, La as s, Ln as ee, Ma as c, N as l, Na as u, Nn as d, Oi as f, On as p, Pa as m, Qn as h, R as g, Ra as _, Rt as v, T as y, Ta as b, Tn as x, U as S, Ui as C, Va as w, Vi as T, Wa as E, Xn as D, Zn as te, _ as O, _a as k, an as A, ba as j, bn as M, ca as ne, dn as re, hn as ie, ja as ae, ka as N, kn as P, mr as F, nt as I, sa as L, sr as R, t as z, ui as B, un as V, va as H, wa as U, x as W, xa as G, y as K, ya as q } from "../loadValue-Mdc5K4qO.js";
|
|
2
|
+
import { c as J, d as oe, f as se, l as ce, n as le, t as ue } from "../shared-store-D82WVL5a.js";
|
|
4
3
|
//#region src/engine/presence.ts
|
|
5
|
-
var de =
|
|
4
|
+
var de = d / 3, fe = (e) => {
|
|
6
5
|
e?.unref?.();
|
|
7
6
|
}, pe = [
|
|
8
7
|
"sharedMouseTrackerMap",
|
|
@@ -17,16 +16,16 @@ function me(e) {
|
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
function he(e) {
|
|
20
|
-
let t = "",
|
|
21
|
-
let r =
|
|
22
|
-
i
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
}),
|
|
26
|
-
t &&
|
|
19
|
+
let t = "", n = (n) => {
|
|
20
|
+
let r = J(e.state.editor.focusTable), i = ce(r);
|
|
21
|
+
(i !== t || n) && (t = i, e.dispatch(R({ focus: r })));
|
|
22
|
+
}, r = e.subscribe((e) => {
|
|
23
|
+
n(e.some((e) => e.type === h.type));
|
|
24
|
+
}), i = setInterval(() => {
|
|
25
|
+
t && n(!0);
|
|
27
26
|
}, de);
|
|
28
|
-
return fe(
|
|
29
|
-
|
|
27
|
+
return fe(i), Object.freeze({ destroy: () => {
|
|
28
|
+
r(), clearInterval(i);
|
|
30
29
|
} });
|
|
31
30
|
}
|
|
32
31
|
//#endregion
|
|
@@ -46,9 +45,9 @@ var _e = 2, Y = 10, X = (e) => Math.round(e.length * Y) + _e, Z = {
|
|
|
46
45
|
destroyed: "this document session was closed; open the document again"
|
|
47
46
|
}, Q = class extends Error {
|
|
48
47
|
constructor(e, t) {
|
|
49
|
-
super(ve[e]),
|
|
48
|
+
super(ve[e]), K(this, "code", void 0), K(this, "operation", void 0), this.name = "PeerStoreError", this.code = e, this.operation = t;
|
|
50
49
|
}
|
|
51
|
-
}, $ =
|
|
50
|
+
}, $ = k(W), ye = k(e), be = k([
|
|
52
51
|
"table.add",
|
|
53
52
|
"column.add",
|
|
54
53
|
"memo.add",
|
|
@@ -85,62 +84,62 @@ function xe(e) {
|
|
|
85
84
|
}
|
|
86
85
|
function Se(e) {
|
|
87
86
|
if (!e) return [];
|
|
88
|
-
let { tableId: t, columnId: n, focusType:
|
|
89
|
-
return n === void 0 ? [
|
|
87
|
+
let { tableId: t, columnId: n, focusType: i } = e;
|
|
88
|
+
return n === void 0 ? [D({
|
|
90
89
|
tableId: t,
|
|
91
|
-
focusType:
|
|
92
|
-
})] : [
|
|
90
|
+
focusType: i
|
|
91
|
+
})] : [r({
|
|
93
92
|
tableId: t,
|
|
94
93
|
columnId: n,
|
|
95
|
-
focusType:
|
|
94
|
+
focusType: i,
|
|
96
95
|
$mod: !1,
|
|
97
96
|
shiftKey: !1
|
|
98
97
|
})];
|
|
99
98
|
}
|
|
100
|
-
function Ce({ nickname: e, toWidth: t = X, presence:
|
|
101
|
-
let
|
|
99
|
+
function Ce({ nickname: e, toWidth: t = X, presence: n = !0, readonly: r = !1 }) {
|
|
100
|
+
let i = null, a = oe(O({ toWidth: t }), {
|
|
102
101
|
manualStreamFlush: !0,
|
|
103
102
|
observable: !1,
|
|
104
|
-
getHistory: (e) => (
|
|
105
|
-
}),
|
|
106
|
-
|
|
103
|
+
getHistory: (e) => (i = xe(se(e)), i.history)
|
|
104
|
+
}), o = () => i?.getPushes() ?? 0, s = () => i?.getLimit() ?? 0, c = ue(a, { getNickname: () => e }, { manualStreamFlush: !0 }), l = ge(a, c), u = /* @__PURE__ */ new Set(), d = a.state.editor.id, f = r, p = !1, m = null, g = !1, _ = 0, v = [], y = [], b = null;
|
|
105
|
+
a.dispatchSync(ee({
|
|
107
106
|
width: 0,
|
|
108
107
|
height: 0
|
|
109
108
|
}));
|
|
110
|
-
let
|
|
111
|
-
|
|
112
|
-
e.some((e) => $(e.type)) &&
|
|
113
|
-
for (let t of Array.from(
|
|
109
|
+
let x = n ? he(a) : null, S = () => {
|
|
110
|
+
m ||= c.subscribe((e) => {
|
|
111
|
+
e.some((e) => $(e.type)) && _++;
|
|
112
|
+
for (let t of Array.from(u)) V(t, e);
|
|
114
113
|
});
|
|
115
|
-
},
|
|
116
|
-
if (
|
|
114
|
+
}, C = (e) => {
|
|
115
|
+
if (p) throw new Q(Z.destroyed, e);
|
|
117
116
|
}, T = (e) => {
|
|
118
|
-
if (
|
|
117
|
+
if (b) throw Error(`${e} cannot run inside a group`);
|
|
119
118
|
}, D = (e) => {
|
|
120
|
-
if (
|
|
121
|
-
},
|
|
122
|
-
let e =
|
|
119
|
+
if (C(e), f) throw new Q(Z.readonly, e);
|
|
120
|
+
}, k = () => {
|
|
121
|
+
let e = s();
|
|
123
122
|
if (!e) return;
|
|
124
|
-
let t =
|
|
125
|
-
for (; t > e;) t -=
|
|
126
|
-
for (;
|
|
127
|
-
},
|
|
128
|
-
D("dispatch"),
|
|
129
|
-
let n =
|
|
130
|
-
|
|
131
|
-
let
|
|
123
|
+
let t = v.reduce((e, { historyEntries: t }) => e + t, 0);
|
|
124
|
+
for (; t > e;) t -= v.shift().historyEntries;
|
|
125
|
+
for (; v.length > e;) v.splice(v.findIndex(({ historyEntries: e }) => !e), 1);
|
|
126
|
+
}, A = (e, t = {}) => {
|
|
127
|
+
D("dispatch"), S();
|
|
128
|
+
let n = _, r = o(), i = E(a.state, a.context, [...Se(t.focus), ...e]);
|
|
129
|
+
a.dispatchSync(i), i.some((e) => ye(e.type)) && l.flush();
|
|
130
|
+
let s = {
|
|
132
131
|
label: t.label ?? null,
|
|
133
132
|
actions: i.filter((e) => $(e.type)),
|
|
134
133
|
createdIds: i.filter((e) => be(e.type)).map((e) => e.payload.id),
|
|
135
|
-
batches:
|
|
136
|
-
historyEntries:
|
|
134
|
+
batches: _ - n,
|
|
135
|
+
historyEntries: o() - r
|
|
137
136
|
};
|
|
138
|
-
return
|
|
139
|
-
label:
|
|
140
|
-
historyEntries:
|
|
141
|
-
}),
|
|
142
|
-
},
|
|
143
|
-
if (D("group"),
|
|
137
|
+
return b ? (b.unit.historyEntries += s.historyEntries, b.dispatched = !0) : v.push({
|
|
138
|
+
label: s.label,
|
|
139
|
+
historyEntries: s.historyEntries
|
|
140
|
+
}), s.historyEntries && (y = []), b || k(), s;
|
|
141
|
+
}, j = (e, t) => {
|
|
142
|
+
if (D("group"), b) return t();
|
|
144
143
|
let n = {
|
|
145
144
|
unit: {
|
|
146
145
|
label: e,
|
|
@@ -148,51 +147,49 @@ function Ce({ nickname: e, toWidth: t = X, presence: r = !0, readonly: i = !1 })
|
|
|
148
147
|
},
|
|
149
148
|
dispatched: !1
|
|
150
149
|
};
|
|
151
|
-
|
|
150
|
+
b = n;
|
|
152
151
|
try {
|
|
153
152
|
return t();
|
|
154
153
|
} finally {
|
|
155
|
-
|
|
154
|
+
b = null, n.dispatched && (v.push(n.unit), k());
|
|
156
155
|
}
|
|
157
|
-
},
|
|
156
|
+
}, M = (e, t) => {
|
|
158
157
|
for (let n = 0; n < e.historyEntries; n++) t();
|
|
159
|
-
|
|
158
|
+
l.flush();
|
|
160
159
|
};
|
|
161
160
|
return Object.freeze({
|
|
162
|
-
editorId:
|
|
161
|
+
editorId: d,
|
|
163
162
|
get value() {
|
|
164
|
-
return
|
|
163
|
+
return w(a.state);
|
|
165
164
|
},
|
|
166
165
|
get state() {
|
|
167
|
-
return
|
|
166
|
+
return a.state;
|
|
168
167
|
},
|
|
169
168
|
get isReadonly() {
|
|
170
|
-
return
|
|
169
|
+
return f;
|
|
171
170
|
},
|
|
172
171
|
get isDestroyed() {
|
|
173
|
-
return
|
|
172
|
+
return p;
|
|
174
173
|
},
|
|
175
174
|
setReadonly: (e) => {
|
|
176
|
-
|
|
175
|
+
f = e;
|
|
177
176
|
},
|
|
178
177
|
setInitialValue: (e) => {
|
|
179
|
-
|
|
180
|
-
let t = ee(e);
|
|
181
|
-
o.dispatchSync(G(), R(ue(t) ? "{}" : t)), o.resetHistory(), y = [], b = [];
|
|
178
|
+
C("setInitialValue"), T("setInitialValue"), a.dispatchSync(te(), I(z(e))), a.resetHistory(), v = [], y = [];
|
|
182
179
|
},
|
|
183
180
|
mergeClock: (e) => {
|
|
184
|
-
|
|
181
|
+
a.context.clock.merge(e);
|
|
185
182
|
},
|
|
186
|
-
dispatch:
|
|
183
|
+
dispatch: A,
|
|
187
184
|
receive: (e) => {
|
|
188
|
-
|
|
185
|
+
p || c.dispatchSync(e);
|
|
189
186
|
},
|
|
190
|
-
group:
|
|
187
|
+
group: j,
|
|
191
188
|
undo: () => {
|
|
192
|
-
D("undo"), T("undo"),
|
|
193
|
-
let e = [], t =
|
|
194
|
-
for (; t && !t.historyEntries;) t.label !== null && e.push(t.label), t =
|
|
195
|
-
return t ? (
|
|
189
|
+
D("undo"), T("undo"), S();
|
|
190
|
+
let e = [], t = v.pop();
|
|
191
|
+
for (; t && !t.historyEntries;) t.label !== null && e.push(t.label), t = v.pop();
|
|
192
|
+
return t ? (M(t, a.undo), y.push(t), {
|
|
196
193
|
label: t.label,
|
|
197
194
|
entries: t.historyEntries,
|
|
198
195
|
skipped: e
|
|
@@ -203,9 +200,9 @@ function Ce({ nickname: e, toWidth: t = X, presence: r = !0, readonly: i = !1 })
|
|
|
203
200
|
};
|
|
204
201
|
},
|
|
205
202
|
redo: () => {
|
|
206
|
-
D("redo"), T("redo"),
|
|
207
|
-
let e =
|
|
208
|
-
return e ? (
|
|
203
|
+
D("redo"), T("redo"), S();
|
|
204
|
+
let e = y.pop();
|
|
205
|
+
return e ? (M(e, a.redo), v.push(e), {
|
|
209
206
|
label: e.label,
|
|
210
207
|
entries: e.historyEntries,
|
|
211
208
|
skipped: []
|
|
@@ -215,16 +212,16 @@ function Ce({ nickname: e, toWidth: t = X, presence: r = !0, readonly: i = !1 })
|
|
|
215
212
|
skipped: []
|
|
216
213
|
};
|
|
217
214
|
},
|
|
218
|
-
subscribe: (e) => (
|
|
219
|
-
|
|
215
|
+
subscribe: (e) => (C("subscribe"), u.add(e), g || (g = !0, m ? a.dispatchSync(h()) : S()), () => {
|
|
216
|
+
u.delete(e);
|
|
220
217
|
}),
|
|
221
218
|
flushStreamBuffers: () => {
|
|
222
|
-
|
|
219
|
+
p || l.flush();
|
|
223
220
|
},
|
|
224
221
|
destroy: () => {
|
|
225
|
-
|
|
222
|
+
p || (p = !0, x?.destroy(), m?.(), m = null, u.clear(), c.destroy(), a.destroy(), me(a.state.editor), v = [], y = []);
|
|
226
223
|
}
|
|
227
224
|
});
|
|
228
225
|
}
|
|
229
226
|
//#endregion
|
|
230
|
-
export {
|
|
227
|
+
export { G as BracketType, H as COLUMN_MIN_WIDTH, U as CanvasType, W as ChangeActionTypes, b as ColumnOption, t as ColumnType, N as Database, L as DatabaseVendorList, ne as DatabaseVendorToDatabase, T as FocusType, ae as Language, q as MEMO_MIN_HEIGHT, j as MEMO_MIN_WIDTH, c as NameCase, u as OrderType, Q as PeerStoreError, Z as PeerStoreErrorCode, m as ReferentialAction, n as RelationshipType, s as SaveSettingType, C as SelectType, y as SharedFollowingActionTypes, _ as Show, e as StreamActionTypes, f as bHas, O as createEngineContext, Ce as createPeerStore, le as createSchemaSQL, X as defaultToWidth, i as editorActions$, P as indexActions, S as indexActions$, p as indexColumnActions, g as indexColumnActions$, B as measureTableSize, x as memoActions, A as memoActions$, M as relationshipActions, o as relationshipActions$, F as settingsActions, l as settingsActions$, ie as tableActions, a as tableActions$, re as tableColumnActions, v as tableColumnActions$ };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Ha as e, Ua as t, _a as n } from "./loadValue-Mdc5K4qO.js";
|
|
2
|
+
import { DateTime as r } from "luxon";
|
|
3
|
+
//#region src/services/schema-gc/procGC.ts
|
|
4
|
+
function i({ collections: t }, { tableIds: n, tableColumnIds: r, relationshipIds: i, indexIds: a, indexColumnIds: o, memoIds: s }) {
|
|
5
|
+
e(t).collection("tableEntities").removeMany(n), e(t).collection("tableColumnEntities").removeMany(r), e(t).collection("relationshipEntities").removeMany(i), e(t).collection("indexEntities").removeMany(a), e(t).collection("indexColumnEntities").removeMany(o), e(t).collection("memoEntities").removeMany(s);
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/services/schema-gc/schemaGCService.ts
|
|
9
|
+
var a = 3, o = class {
|
|
10
|
+
async run(e) {
|
|
11
|
+
return s(e);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
function s(a) {
|
|
15
|
+
let o = JSON.parse(a), s = t(o), { doc: { tableIds: l, memoIds: u, indexIds: d, relationshipIds: f }, collections: p } = s, m = n(l), h = n(u), g = n(d), _ = n(f), v = c(r.now()), y = e(p).collection("tableEntities"), b = e(p).collection("tableColumnEntities"), x = e(p).collection("indexEntities"), S = e(p).collection("indexColumnEntities"), C = e(p).collection("relationshipEntities"), w = e(p).collection("memoEntities"), T = new Set(y.selectAll().filter(v(m)).map(({ id: e }) => e)), E = /* @__PURE__ */ new Set(), D = new Set(C.selectAll().filter(v(_)).map(({ id: e }) => e)), O = new Set(x.selectAll().filter(v(g)).map(({ id: e }) => e)), k = /* @__PURE__ */ new Set(), A = new Set(w.selectAll().filter(v(h)).map(({ id: e }) => e));
|
|
16
|
+
b.selectAll().filter(({ tableId: e }) => T.has(e)).forEach(({ id: e }) => E.add(e)), C.selectAll().filter(({ id: e, start: t, end: n }) => !D.has(e) && (T.has(t.tableId) || T.has(n.tableId))).forEach(({ id: e }) => D.add(e)), x.selectAll().filter(({ id: e, tableId: t }) => !O.has(e) && T.has(t)).forEach(({ id: e }) => O.add(e)), S.selectAll().filter(({ indexId: e }) => O.has(e)).forEach(({ id: e }) => k.add(e)), i(s, {
|
|
17
|
+
tableIds: [...T],
|
|
18
|
+
tableColumnIds: [...E],
|
|
19
|
+
relationshipIds: [...D],
|
|
20
|
+
indexIds: [...O],
|
|
21
|
+
indexColumnIds: [...k],
|
|
22
|
+
memoIds: [...A]
|
|
23
|
+
});
|
|
24
|
+
let j = n(y.selectAll().map(({ id: e }) => e)), M = n(x.selectAll().map(({ id: e }) => e));
|
|
25
|
+
return b.selectAll().filter(({ tableId: e, id: t, meta: n }) => !j(e) && v(() => !1)({
|
|
26
|
+
id: t,
|
|
27
|
+
meta: n
|
|
28
|
+
})).forEach(({ id: e }) => E.add(e)), S.selectAll().filter(({ indexId: e, id: t, meta: n }) => !M(e) && v(() => !1)({
|
|
29
|
+
id: t,
|
|
30
|
+
meta: n
|
|
31
|
+
})).forEach(({ id: e }) => k.add(e)), {
|
|
32
|
+
tableIds: [...T],
|
|
33
|
+
tableColumnIds: [...E],
|
|
34
|
+
relationshipIds: [...D],
|
|
35
|
+
indexIds: [...O],
|
|
36
|
+
indexColumnIds: [...k],
|
|
37
|
+
memoIds: [...A]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
var c = (e) => (t) => ({ id: n, meta: i }) => !t(n) && a < Math.floor(e.diff(r.fromMillis(i.updateAt), "days").toObject().days ?? 0);
|
|
41
|
+
//#endregion
|
|
42
|
+
export { s as n, i as r, o as t };
|
|
@@ -2,4 +2,9 @@ import { GCIds } from '.';
|
|
|
2
2
|
export declare class SchemaGCService {
|
|
3
3
|
run(source: string): Promise<GCIds>;
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* The ids of what the collector removes from a document. The service answers
|
|
7
|
+
* them behind a promise, for a worker; a replica collects them as it loads.
|
|
8
|
+
*/
|
|
9
|
+
export declare function collectGCIds(source: string): GCIds;
|
|
5
10
|
//# sourceMappingURL=schemaGCService.d.ts.map
|