@dineug/erd-editor 3.1.4 → 3.1.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/README.md +16 -15
- package/dist/components/erd/canvas/Canvas.styles.d.ts +1 -0
- package/dist/engine.js +11 -11
- package/dist/erd-editor.js +1880 -1853
- package/dist/{schemaGCService-SG9sYyYd.js → schemaGCService-VAGUTqzO.js} +2822 -2820
- 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)
|
package/dist/engine.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { D as A, E as w, u as x, O as E, F as l, J as I, p 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-VAGUTqzO.js";
|
|
2
2
|
/*!
|
|
3
3
|
* @dineug/erd-editor
|
|
4
|
-
* @version 3.1.
|
|
4
|
+
* @version 3.1.6 | Sun Jan 28 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
|
|
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
15
|
n.forEach((s) => {
|
|
16
16
|
const h = Reflect.get(s, e);
|
|
17
|
-
|
|
17
|
+
O(h, a);
|
|
18
18
|
});
|
|
19
19
|
}, y = (e) => {
|
|
20
|
-
const a =
|
|
21
|
-
t.dispatchSync(
|
|
20
|
+
const a = T(e);
|
|
21
|
+
t.dispatchSync($(j(a) ? "{}" : a)), f.run(d(t.state)).then((s) => {
|
|
22
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
26
|
}, v = (e) => {
|
|
27
27
|
J(() => r(e));
|
|
28
28
|
}, C = () => {
|
|
29
|
-
Array.from(
|
|
29
|
+
Array.from(o).forEach((e) => e.unsubscribe()), o.clear(), n.clear(), t.destroy(), S.destroy();
|
|
30
30
|
};
|
|
31
|
-
return
|
|
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
33
|
return d(t.state);
|
|
34
34
|
},
|
|
@@ -40,5 +40,5 @@ function z(u) {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
D as createReplicationStore
|
|
44
44
|
};
|