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