@dineug/erd-editor 3.2.5 → 3.2.6
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/dist/engine/replication-store.d.ts +2 -2
- package/dist/engine.js +24 -24
- package/dist/erd-editor.js +1080 -1069
- package/dist/{schemaGCService-IUzrsWjr.js → schemaGCService-0Skkcmc5.js} +558 -539
- package/dist/utils/emitter.d.ts +4 -5
- package/dist/utils/globalEmitter.d.ts +1 -32
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { Unsubscribe, ValuesType } from '../internal-types';
|
|
|
2
2
|
import { EngineContext } from './context';
|
|
3
3
|
import { AnyAction } from '@dineug/r-html';
|
|
4
4
|
|
|
5
|
-
type
|
|
5
|
+
type ListenerRecord = {
|
|
6
6
|
[P in keyof InternalActionMap]: (payload: InternalActionMap[P]) => void;
|
|
7
7
|
};
|
|
8
8
|
declare const InternalActionType: {
|
|
@@ -14,7 +14,7 @@ type InternalActionMap = {
|
|
|
14
14
|
};
|
|
15
15
|
export type ReplicationStore = {
|
|
16
16
|
readonly value: string;
|
|
17
|
-
on: (
|
|
17
|
+
on: (listeners: Partial<ListenerRecord>) => Unsubscribe;
|
|
18
18
|
setInitialValue: (value: string) => void;
|
|
19
19
|
dispatch: (actions: Array<AnyAction> | AnyAction) => void;
|
|
20
20
|
dispatchSync: (actions: Array<AnyAction> | AnyAction) => void;
|
package/dist/engine.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { D as
|
|
1
|
+
import { D as C, E as w, w as A, O as x, G as d, K as E, s as G, bv as h, J as l, Y as I, d4 as O, bu as T, aB as V, d9 as $, da as j, V as k, db as J, cY as R } from "./schemaGCService-0Skkcmc5.js";
|
|
2
2
|
/*!
|
|
3
3
|
* @dineug/erd-editor
|
|
4
|
-
* @version 3.2.
|
|
4
|
+
* @version 3.2.6 | Sat Nov 09 2024
|
|
5
5
|
* @author SeungHwan-Lee <dineug2@gmail.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
8
|
+
const Y = {
|
|
9
9
|
change: "change"
|
|
10
10
|
};
|
|
11
|
-
function B(
|
|
12
|
-
const o = /* @__PURE__ */ new Set(), t =
|
|
11
|
+
function B(p) {
|
|
12
|
+
const o = /* @__PURE__ */ new Set(), t = C(p, !1), b = w(t), c = new A(), u = new x((e) => t.subscribe((a) => e.next(a))).pipe(d(l), E(200)), n = /* @__PURE__ */ new Set(), m = new R(), S = (e) => (n.has(e) || n.add(e), () => {
|
|
13
13
|
n.delete(e);
|
|
14
|
-
}),
|
|
14
|
+
}), f = (e, a) => {
|
|
15
15
|
n.forEach((s) => {
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const r = Reflect.get(s, e);
|
|
17
|
+
I(r, a);
|
|
18
18
|
});
|
|
19
|
-
},
|
|
20
|
-
const a =
|
|
21
|
-
t.dispatchSync(V(
|
|
22
|
-
(s.tableIds.length || s.tableColumnIds.length || s.relationshipIds.length || s.indexIds.length || s.indexColumnIds.length || s.memoIds.length) && (
|
|
19
|
+
}, g = (e) => {
|
|
20
|
+
const a = O(e);
|
|
21
|
+
t.dispatchSync(T(V(a) ? "{}" : a)), m.run(h(t.state)).then((s) => {
|
|
22
|
+
(s.tableIds.length || s.tableColumnIds.length || s.relationshipIds.length || s.indexIds.length || s.indexColumnIds.length || s.memoIds.length) && ($(t.state, s), t.dispatchSync(j()));
|
|
23
23
|
});
|
|
24
|
-
},
|
|
24
|
+
}, i = (e) => {
|
|
25
25
|
c.next([e].flat());
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
Array.from(o).forEach((e) => e.unsubscribe()), o.clear(), n.clear(), t.destroy(),
|
|
26
|
+
}, y = (e) => {
|
|
27
|
+
k(() => i(e));
|
|
28
|
+
}, v = () => {
|
|
29
|
+
Array.from(o).forEach((e) => e.unsubscribe()), o.clear(), n.clear(), t.destroy(), b.destroy();
|
|
30
30
|
};
|
|
31
|
-
return o.add(
|
|
31
|
+
return o.add(u.subscribe(() => f(Y.change, void 0))).add(c.pipe(d(l), G((e) => e.map((a) => J(a, "tags")))).subscribe(t.dispatchSync)), Object.freeze({
|
|
32
32
|
get value() {
|
|
33
|
-
return
|
|
33
|
+
return h(t.state);
|
|
34
34
|
},
|
|
35
|
-
on:
|
|
36
|
-
setInitialValue:
|
|
37
|
-
dispatch:
|
|
38
|
-
dispatchSync:
|
|
39
|
-
destroy:
|
|
35
|
+
on: S,
|
|
36
|
+
setInitialValue: g,
|
|
37
|
+
dispatch: y,
|
|
38
|
+
dispatchSync: i,
|
|
39
|
+
destroy: v
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
export {
|