@septkit/ui 0.0.58 → 0.0.60
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/diagram-layout/group-stack.js +13 -0
- package/dist/diagram-layout/grouping.js +33 -0
- package/dist/diagram-layout/index.js +6 -2
- package/dist/diagram-layout/use-diagram-layout.js +319 -0
- package/dist/diagram-layout/visibility-model.js +56 -0
- package/dist/dialecte/create-document-store.js +3 -3
- package/dist/external/.pnpm/{@dialecte_core@0.4.12 → @dialecte_core@0.4.16}/node_modules/@dialecte/core/dist/helpers.js +41 -41
- package/dist/external/.pnpm/@dialecte_core@0.4.16/node_modules/@dialecte/core/dist/index.js +3 -0
- package/dist/external/.pnpm/{@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/project-DkMkDgld.js → @dialecte_core@0.4.16/node_modules/@dialecte/core/dist/project-nvZv2ie8.js} +797 -745
- package/dist/external/.pnpm/{@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/utils-C5_11hqg.js → @dialecte_core@0.4.16/node_modules/@dialecte/core/dist/utils-BiEx1x59.js} +2 -2
- package/dist/external/.pnpm/{@dialecte_scl@0.3.15/node_modules/@dialecte/scl/dist/hooks-CLIa7kxj.js → @dialecte_scl@0.3.17/node_modules/@dialecte/scl/dist/hooks-BBGXNK0x.js} +31 -19
- package/dist/external/.pnpm/{@dialecte_scl@0.3.15 → @dialecte_scl@0.3.17}/node_modules/@dialecte/scl/dist/v2019C1/index.js +3 -3
- package/dist/index.d.ts +200 -2
- package/dist/index.js +6 -2
- package/dist/merge/build-view-model.js +17 -17
- package/dist/merge/merge-preflight.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/merge/merge.service.js +16 -20
- package/dist/merge/use-merge-session.js +101 -121
- package/dist/ui.css +1 -1
- package/package.json +3 -3
- package/dist/external/.pnpm/@dialecte_core@0.4.12/node_modules/@dialecte/core/dist/index.js +0 -3
- package/dist/merge/merge-correlate.js +0 -46
|
@@ -1,63 +1,62 @@
|
|
|
1
1
|
import { collectTemplateUuidWarnings as e, commitMerge as t, findScopeRoot as n, getAttributes as r, getPresentationScope as i, previewApply as a, reportLifecycle as o, snapshotTree as s, snapshotXml as c } from "./merge.service.js";
|
|
2
2
|
import { allGroups as l, buildChangeIndex as u, buildStructuralTree as d } from "./build-view-model.js";
|
|
3
|
-
import {
|
|
4
|
-
import { reactive as p, shallowRef as m } from "vue";
|
|
3
|
+
import { reactive as f, shallowRef as p } from "vue";
|
|
5
4
|
//#region lib/merge/use-merge-session.ts
|
|
6
|
-
function
|
|
7
|
-
let
|
|
5
|
+
function m(m) {
|
|
6
|
+
let h = p(), g = f(/* @__PURE__ */ new Map()), _ = p("target"), v = p(), y = p({
|
|
8
7
|
items: [],
|
|
9
8
|
meta: {},
|
|
10
9
|
index: {},
|
|
11
10
|
expanded: []
|
|
12
|
-
}),
|
|
13
|
-
function
|
|
11
|
+
}), b = p(), x = p(), S = p(!1), C = p([]);
|
|
12
|
+
function w() {
|
|
14
13
|
return {
|
|
15
|
-
verb:
|
|
16
|
-
scenario:
|
|
17
|
-
sourceQuery:
|
|
18
|
-
ref:
|
|
19
|
-
anchor:
|
|
14
|
+
verb: m.verb,
|
|
15
|
+
scenario: m.scenario,
|
|
16
|
+
sourceQuery: m.sourceQuery,
|
|
17
|
+
ref: m.sourceRef,
|
|
18
|
+
anchor: m.anchor
|
|
20
19
|
};
|
|
21
20
|
}
|
|
22
|
-
function
|
|
21
|
+
function T(e) {
|
|
23
22
|
return e === void 0 ? "accept" : typeof e == "string" ? e : e.action;
|
|
24
23
|
}
|
|
25
|
-
function
|
|
24
|
+
function E(e) {
|
|
26
25
|
return typeof e == "object" ? e.values : void 0;
|
|
27
26
|
}
|
|
28
|
-
async function
|
|
29
|
-
let t = await o(
|
|
30
|
-
|
|
31
|
-
for (let e of l(t)) e.suggestedAction && e.suggestedAction !== "accept" &&
|
|
32
|
-
await
|
|
27
|
+
async function D() {
|
|
28
|
+
let t = await o(m.targetDocument, w());
|
|
29
|
+
h.value = t, C.value = await e([m.sourceQuery, m.targetDocument.query]);
|
|
30
|
+
for (let e of l(t)) e.suggestedAction && e.suggestedAction !== "accept" && g.set(e.id, e.suggestedAction);
|
|
31
|
+
await R();
|
|
33
32
|
}
|
|
34
|
-
function
|
|
35
|
-
let n =
|
|
36
|
-
|
|
33
|
+
function O(e, t) {
|
|
34
|
+
let n = E(g.get(e));
|
|
35
|
+
g.set(e, n ? {
|
|
37
36
|
action: t,
|
|
38
37
|
values: n
|
|
39
|
-
} : t),
|
|
38
|
+
} : t), L();
|
|
40
39
|
}
|
|
41
|
-
function
|
|
42
|
-
let r =
|
|
43
|
-
...
|
|
40
|
+
function k(e, t, n) {
|
|
41
|
+
let r = g.get(e), i = {
|
|
42
|
+
...E(r),
|
|
44
43
|
[t]: n
|
|
45
44
|
};
|
|
46
|
-
|
|
47
|
-
action:
|
|
45
|
+
g.set(e, {
|
|
46
|
+
action: T(r),
|
|
48
47
|
values: i
|
|
49
|
-
}),
|
|
48
|
+
}), L();
|
|
50
49
|
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
50
|
+
function A(e) {
|
|
51
|
+
return T(g.get(e));
|
|
53
52
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
53
|
+
function j(e, t) {
|
|
54
|
+
return E(g.get(e))?.[t];
|
|
56
55
|
}
|
|
57
|
-
function
|
|
56
|
+
function M() {
|
|
58
57
|
let e = /* @__PURE__ */ new Map();
|
|
59
|
-
for (let [t, n] of
|
|
60
|
-
let r =
|
|
58
|
+
for (let [t, n] of g) {
|
|
59
|
+
let r = E(n);
|
|
61
60
|
r && e.set(t, {
|
|
62
61
|
action: "accept",
|
|
63
62
|
values: r
|
|
@@ -65,58 +64,39 @@ function h(h) {
|
|
|
65
64
|
}
|
|
66
65
|
return e;
|
|
67
66
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
let F, I
|
|
72
|
-
function
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
async function
|
|
76
|
-
if (!
|
|
77
|
-
let e = ++
|
|
78
|
-
|
|
79
|
-
let t =
|
|
80
|
-
doc:
|
|
81
|
-
target:
|
|
82
|
-
report:
|
|
67
|
+
function N(e) {
|
|
68
|
+
v.value = e, B();
|
|
69
|
+
}
|
|
70
|
+
let P, F, I = 0;
|
|
71
|
+
function L() {
|
|
72
|
+
F && clearTimeout(F), F = setTimeout(() => void R(), 150);
|
|
73
|
+
}
|
|
74
|
+
async function R() {
|
|
75
|
+
if (!h.value) return;
|
|
76
|
+
let e = ++I;
|
|
77
|
+
S.value = !0;
|
|
78
|
+
let t = M(), { prepared: r } = await a({
|
|
79
|
+
doc: m.targetDocument,
|
|
80
|
+
target: w(),
|
|
81
|
+
report: h.value,
|
|
83
82
|
decisions: t,
|
|
84
|
-
keepNameTypesFrom:
|
|
85
|
-
afterApply:
|
|
83
|
+
keepNameTypesFrom: _.value,
|
|
84
|
+
afterApply: m.afterApply
|
|
86
85
|
});
|
|
87
|
-
if (e !==
|
|
88
|
-
|
|
86
|
+
if (e !== I) {
|
|
87
|
+
r.discard();
|
|
89
88
|
return;
|
|
90
89
|
}
|
|
91
|
-
|
|
92
|
-
let
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
n && S.set(t, n.id);
|
|
102
|
-
}
|
|
103
|
-
let w = f({
|
|
104
|
-
report: g.value,
|
|
105
|
-
snapshot: _,
|
|
106
|
-
appliedRoots: x,
|
|
107
|
-
companionAnchors: S
|
|
108
|
-
}), E = u({
|
|
109
|
-
report: g.value,
|
|
110
|
-
correlation: w
|
|
111
|
-
});
|
|
112
|
-
b.value = await d({
|
|
113
|
-
tree: _,
|
|
114
|
-
changeByStagedId: E,
|
|
115
|
-
query: F.query,
|
|
116
|
-
instances: g.value.instances
|
|
117
|
-
}), y.value &&= B(y.value, b.value), C.value = !1, await V();
|
|
118
|
-
}
|
|
119
|
-
function B(e, t) {
|
|
90
|
+
P?.discard(), P = r;
|
|
91
|
+
let o = i(m.verb), c = await n(P.query, m.anchor, o.rootTag), l = await s(P.query, c), f = u({ report: h.value });
|
|
92
|
+
y.value = await d({
|
|
93
|
+
tree: l,
|
|
94
|
+
changeByStagedId: f,
|
|
95
|
+
query: P.query,
|
|
96
|
+
instances: h.value.instances
|
|
97
|
+
}), v.value &&= z(v.value, y.value), S.value = !1, await B();
|
|
98
|
+
}
|
|
99
|
+
function z(e, t) {
|
|
120
100
|
let n = Object.values(t.index);
|
|
121
101
|
if (e.node) {
|
|
122
102
|
let t = n.find((t) => t.node === e.node);
|
|
@@ -128,57 +108,57 @@ function h(h) {
|
|
|
128
108
|
}
|
|
129
109
|
return (e.previewRef.id ? t.index[e.previewRef.id] : void 0) ?? e;
|
|
130
110
|
}
|
|
131
|
-
async function
|
|
132
|
-
let e =
|
|
133
|
-
if (!e || !
|
|
134
|
-
|
|
111
|
+
async function B() {
|
|
112
|
+
let e = v.value;
|
|
113
|
+
if (!e || !P) {
|
|
114
|
+
b.value = void 0, x.value = void 0;
|
|
135
115
|
return;
|
|
136
116
|
}
|
|
137
|
-
let t = e.change === "target-only" && !!e.groupId &&
|
|
138
|
-
|
|
117
|
+
let t = e.change === "target-only" && !!e.groupId && T(g.get(e.groupId)) === "accept";
|
|
118
|
+
b.value = t ? "" : await c(P.query, e.previewRef), x.value = e.change === "added" ? "" : await H(e.previewRef);
|
|
139
119
|
}
|
|
140
|
-
async function
|
|
141
|
-
return
|
|
120
|
+
async function V(e) {
|
|
121
|
+
return P ? r(P.query, e) : {};
|
|
142
122
|
}
|
|
143
|
-
async function
|
|
123
|
+
async function H(e) {
|
|
144
124
|
try {
|
|
145
|
-
return await c(
|
|
125
|
+
return await c(m.targetDocument.query, e);
|
|
146
126
|
} catch {
|
|
147
127
|
return;
|
|
148
128
|
}
|
|
149
129
|
}
|
|
150
|
-
async function
|
|
151
|
-
|
|
152
|
-
doc:
|
|
153
|
-
target:
|
|
154
|
-
report:
|
|
155
|
-
decisions: new Map(
|
|
156
|
-
keepNameTypesFrom:
|
|
157
|
-
afterApply:
|
|
130
|
+
async function U() {
|
|
131
|
+
h.value && (P?.discard(), P = void 0, await t({
|
|
132
|
+
doc: m.targetDocument,
|
|
133
|
+
target: w(),
|
|
134
|
+
report: h.value,
|
|
135
|
+
decisions: new Map(g),
|
|
136
|
+
keepNameTypesFrom: _.value,
|
|
137
|
+
afterApply: m.afterApply
|
|
158
138
|
}));
|
|
159
139
|
}
|
|
160
|
-
function
|
|
161
|
-
|
|
140
|
+
function W(e) {
|
|
141
|
+
_.value = e, L();
|
|
162
142
|
}
|
|
163
143
|
return {
|
|
164
|
-
report:
|
|
165
|
-
decisions:
|
|
166
|
-
keepNameTypesFrom:
|
|
167
|
-
structuralTree:
|
|
168
|
-
previewXml:
|
|
169
|
-
previewBeforeXml:
|
|
170
|
-
previewLoading:
|
|
171
|
-
warnings:
|
|
172
|
-
load:
|
|
173
|
-
setDecision:
|
|
174
|
-
setValue:
|
|
175
|
-
decisionOf:
|
|
176
|
-
editedValue:
|
|
177
|
-
select:
|
|
178
|
-
stagedAttributes:
|
|
179
|
-
setKeepNameTypesFrom:
|
|
180
|
-
commit:
|
|
144
|
+
report: h,
|
|
145
|
+
decisions: g,
|
|
146
|
+
keepNameTypesFrom: _,
|
|
147
|
+
structuralTree: y,
|
|
148
|
+
previewXml: b,
|
|
149
|
+
previewBeforeXml: x,
|
|
150
|
+
previewLoading: S,
|
|
151
|
+
warnings: C,
|
|
152
|
+
load: D,
|
|
153
|
+
setDecision: O,
|
|
154
|
+
setValue: k,
|
|
155
|
+
decisionOf: A,
|
|
156
|
+
editedValue: j,
|
|
157
|
+
select: N,
|
|
158
|
+
stagedAttributes: V,
|
|
159
|
+
setKeepNameTypesFrom: W,
|
|
160
|
+
commit: U
|
|
181
161
|
};
|
|
182
162
|
}
|
|
183
163
|
//#endregion
|
|
184
|
-
export {
|
|
164
|
+
export { m as useMergeSession };
|