@dineug/erd-editor 3.1.3 → 3.1.5
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 +16 -15
- package/dist/components/erd/canvas/Canvas.styles.d.ts +1 -0
- package/dist/engine/modules/editor/actions.d.ts +2 -0
- package/dist/engine/modules/editor/atom.actions.d.ts +11 -0
- package/dist/engine.js +19 -19
- package/dist/erd-editor.js +5414 -5387
- package/dist/{schemaGCService-SoMd6Ovy.js → schemaGCService-cq1CENnM.js} +4132 -4128
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -199,19 +199,19 @@ type ShortcutOption = {
|
|
|
199
199
|
};
|
|
200
200
|
|
|
201
201
|
const defaultKeyBindingMap: KeyBindingMap = {
|
|
202
|
-
addTable: [{ shortcut: 'Alt+KeyN' }]
|
|
203
|
-
addColumn: [{ shortcut: 'Alt+Enter' }]
|
|
204
|
-
addMemo: [{ shortcut: 'Alt+KeyM' }]
|
|
205
|
-
removeTable: [{ shortcut: '$mod+Backspace' }, { shortcut: '$mod+Delete' }]
|
|
206
|
-
removeColumn: [{ shortcut: 'Alt+Backspace' }, { shortcut: 'Alt+Delete' }]
|
|
207
|
-
primaryKey: [{ shortcut: 'Alt+KeyK' }]
|
|
208
|
-
selectAllTable: [{ shortcut: '$mod+Alt+KeyA' }]
|
|
209
|
-
selectAllColumn: [{ shortcut: 'Alt+KeyA' }]
|
|
210
|
-
relationshipZeroOne: [{ shortcut: '$mod+Alt+Digit1' }]
|
|
211
|
-
relationshipZeroN: [{ shortcut: '$mod+Alt+Digit2' }]
|
|
212
|
-
relationshipOneOnly: [{ shortcut: '$mod+Alt+Digit3' }]
|
|
213
|
-
relationshipOneN: [{ shortcut: '$mod+Alt+Digit4' }]
|
|
214
|
-
tableProperties: [{ shortcut: 'Alt+Space' }]
|
|
202
|
+
addTable: [{ shortcut: 'Alt+KeyN' }],
|
|
203
|
+
addColumn: [{ shortcut: 'Alt+Enter' }],
|
|
204
|
+
addMemo: [{ shortcut: 'Alt+KeyM' }],
|
|
205
|
+
removeTable: [{ shortcut: '$mod+Backspace' }, { shortcut: '$mod+Delete' }],
|
|
206
|
+
removeColumn: [{ shortcut: 'Alt+Backspace' }, { shortcut: 'Alt+Delete' }],
|
|
207
|
+
primaryKey: [{ shortcut: 'Alt+KeyK' }],
|
|
208
|
+
selectAllTable: [{ shortcut: '$mod+Alt+KeyA' }],
|
|
209
|
+
selectAllColumn: [{ shortcut: 'Alt+KeyA' }],
|
|
210
|
+
relationshipZeroOne: [{ shortcut: '$mod+Alt+Digit1' }],
|
|
211
|
+
relationshipZeroN: [{ shortcut: '$mod+Alt+Digit2' }],
|
|
212
|
+
relationshipOneOnly: [{ shortcut: '$mod+Alt+Digit3' }],
|
|
213
|
+
relationshipOneN: [{ shortcut: '$mod+Alt+Digit4' }],
|
|
214
|
+
tableProperties: [{ shortcut: 'Alt+Space' }],
|
|
215
215
|
};
|
|
216
216
|
|
|
217
217
|
// example
|
|
@@ -229,7 +229,7 @@ Switches `Control` key depending on the environment.
|
|
|
229
229
|
|
|
230
230
|
### Shortcut Table
|
|
231
231
|
|
|
232
|
-
Uses keyboard event `key, code` properties.
|
|
232
|
+
Uses keyboard event `key, code` properties.
|
|
233
233
|
Use `code` for absolute positions and `key` for input values.
|
|
234
234
|
|
|
235
235
|
| Windows | macOS | `key` | `code` |
|
|
@@ -455,7 +455,7 @@ editor.setSchemaSQL('Schema SQL...');
|
|
|
455
455
|
|
|
456
456
|
## getSchemaSQL
|
|
457
457
|
|
|
458
|
-
Extracts the current editor state into a schema SQL.
|
|
458
|
+
Extracts the current editor state into a schema SQL.
|
|
459
459
|
If `databaseVendor` is not specified, it operates based on the currently set vendor.
|
|
460
460
|
|
|
461
461
|
```ts
|
|
@@ -474,5 +474,6 @@ const schemaSQL = editor.getSchemaSQL();
|
|
|
474
474
|
|
|
475
475
|
- [Web App](https://erd-editor.io)
|
|
476
476
|
- [VSCode Extension](https://marketplace.visualstudio.com/items?itemName=dineug.vuerd-vscode)
|
|
477
|
+
- [IntelliJ Plugin](https://plugins.jetbrains.com/plugin/23594-erd-editor)
|
|
477
478
|
- [Editing Guide](https://docs.erd-editor.io/docs/category/guides)
|
|
478
479
|
- [API](https://docs.erd-editor.io/docs/api/erd-editor-element)
|
|
@@ -29,6 +29,7 @@ export declare const ActionType: {
|
|
|
29
29
|
readonly dragstartColumn: "editor.dragstartColumn";
|
|
30
30
|
readonly dragendColumn: "editor.dragendColumn";
|
|
31
31
|
readonly sharedMouseTracker: "editor.sharedMouseTracker";
|
|
32
|
+
readonly validationIds: "editor.validationIds";
|
|
32
33
|
};
|
|
33
34
|
export type ActionType = ValuesType<typeof ActionType>;
|
|
34
35
|
export type ActionMap = {
|
|
@@ -94,5 +95,6 @@ export type ActionMap = {
|
|
|
94
95
|
x: number;
|
|
95
96
|
y: number;
|
|
96
97
|
};
|
|
98
|
+
[ActionType.validationIds]: void;
|
|
97
99
|
};
|
|
98
100
|
export type ReducerType<T extends keyof ActionMap> = Reducer<RootState, T, ActionMap, EngineContext>;
|
|
@@ -199,6 +199,11 @@ export declare const sharedMouseTrackerAction: {
|
|
|
199
199
|
toString(): string;
|
|
200
200
|
type: string;
|
|
201
201
|
};
|
|
202
|
+
export declare const validationIdsAction: {
|
|
203
|
+
(payload: void): import("@dineug/r-html").AnyAction<void>;
|
|
204
|
+
toString(): string;
|
|
205
|
+
type: string;
|
|
206
|
+
};
|
|
202
207
|
export declare const editorReducers: {
|
|
203
208
|
"editor.changeHasHistory": ReducerType<"editor.changeHasHistory">;
|
|
204
209
|
"editor.selectAll": ReducerType<"editor.selectAll">;
|
|
@@ -225,6 +230,7 @@ export declare const editorReducers: {
|
|
|
225
230
|
"editor.dragstartColumn": ReducerType<"editor.dragstartColumn">;
|
|
226
231
|
"editor.dragendColumn": ReducerType<"editor.dragendColumn">;
|
|
227
232
|
"editor.sharedMouseTracker": ReducerType<"editor.sharedMouseTracker">;
|
|
233
|
+
"editor.validationIds": ReducerType<"editor.validationIds">;
|
|
228
234
|
};
|
|
229
235
|
export declare const actions: {
|
|
230
236
|
changeHasHistoryAction: {
|
|
@@ -426,4 +432,9 @@ export declare const actions: {
|
|
|
426
432
|
toString(): string;
|
|
427
433
|
type: string;
|
|
428
434
|
};
|
|
435
|
+
validationIdsAction: {
|
|
436
|
+
(payload: void): import("@dineug/r-html").AnyAction<void>;
|
|
437
|
+
toString(): string;
|
|
438
|
+
type: string;
|
|
439
|
+
};
|
|
429
440
|
};
|
package/dist/engine.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { D as A, E as w, u as x, O as E, F as l, J as
|
|
1
|
+
import { D as A, E as w, u as x, O as E, F as l, J as I, p as G, bs as d, I as p, Y as O, c_ as T, br as $, aA as j, d4 as k, d5 as F, U as J, d6 as R, cS as V } from "./schemaGCService-cq1CENnM.js";
|
|
2
2
|
/*!
|
|
3
3
|
* @dineug/erd-editor
|
|
4
|
-
* @version 3.1.
|
|
4
|
+
* @version 3.1.5 | Fri Jan 26 2024
|
|
5
5
|
* @author SeungHwan-Lee <dineug2@gmail.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/
|
|
8
8
|
const b = {
|
|
9
9
|
change: "change"
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
const o = /* @__PURE__ */ new Set(),
|
|
11
|
+
function D(u) {
|
|
12
|
+
const o = /* @__PURE__ */ new Set(), t = A(u, !1), S = w(t), c = new x(), m = new E((e) => t.subscribe((a) => e.next(a))).pipe(l(p), I(200)), n = /* @__PURE__ */ new Set(), f = new V(), g = (e) => (n.has(e) || n.add(e), () => {
|
|
13
13
|
n.delete(e);
|
|
14
14
|
}), i = (e, a) => {
|
|
15
|
-
n.forEach((
|
|
16
|
-
const h = Reflect.get(
|
|
17
|
-
|
|
15
|
+
n.forEach((s) => {
|
|
16
|
+
const h = Reflect.get(s, e);
|
|
17
|
+
O(h, a);
|
|
18
18
|
});
|
|
19
19
|
}, y = (e) => {
|
|
20
|
-
const a =
|
|
21
|
-
|
|
22
|
-
(
|
|
20
|
+
const a = T(e);
|
|
21
|
+
t.dispatchSync($(j(a) ? "{}" : a)), f.run(d(t.state)).then((s) => {
|
|
22
|
+
(s.tableIds.length || s.tableColumnIds.length || s.relationshipIds.length || s.indexIds.length || s.indexColumnIds.length || s.memoIds.length) && (k(t.state, s), t.dispatchSync(F()), i(b.change, void 0));
|
|
23
23
|
});
|
|
24
24
|
}, r = (e) => {
|
|
25
25
|
c.next([e].flat());
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
Array.from(o).forEach((e) => e.unsubscribe()), o.clear(), n.clear(),
|
|
26
|
+
}, v = (e) => {
|
|
27
|
+
J(() => r(e));
|
|
28
|
+
}, C = () => {
|
|
29
|
+
Array.from(o).forEach((e) => e.unsubscribe()), o.clear(), n.clear(), t.destroy(), S.destroy();
|
|
30
30
|
};
|
|
31
|
-
return o.add(
|
|
31
|
+
return o.add(m.subscribe(() => i(b.change, void 0))).add(c.pipe(l(p), G((e) => e.map((a) => R(a, "tags")))).subscribe(t.dispatchSync)), Object.freeze({
|
|
32
32
|
get value() {
|
|
33
|
-
return d(
|
|
33
|
+
return d(t.state);
|
|
34
34
|
},
|
|
35
35
|
on: g,
|
|
36
36
|
setInitialValue: y,
|
|
37
|
-
dispatch:
|
|
37
|
+
dispatch: v,
|
|
38
38
|
dispatchSync: r,
|
|
39
|
-
destroy:
|
|
39
|
+
destroy: C
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
D as createReplicationStore
|
|
44
44
|
};
|