@g1cloud/entity-modeler-next 5.0.0-beta.43 → 5.0.0-beta.44
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/entity-modeler.js +119 -119
- package/dist/entity-modeler.umd.cjs +3 -3
- package/package.json +3 -1
package/dist/entity-modeler.js
CHANGED
|
@@ -14967,7 +14967,7 @@ function Qf(e, t) {
|
|
|
14967
14967
|
const q = k.dbAttrs.map((re, G) => {
|
|
14968
14968
|
if (G !== T) return re;
|
|
14969
14969
|
const ce = { ...re, ...L };
|
|
14970
|
-
for (const
|
|
14970
|
+
for (const be of Object.keys(L)) L[be] === void 0 && delete ce[be];
|
|
14971
14971
|
return ce;
|
|
14972
14972
|
});
|
|
14973
14973
|
n.value && e.setEmbedColumns(n.value.modelId, k.modelId, q);
|
|
@@ -14978,12 +14978,12 @@ function Qf(e, t) {
|
|
|
14978
14978
|
function ye(k, T) {
|
|
14979
14979
|
var re, G, ce;
|
|
14980
14980
|
if (k.attrType === "EMBED_PREDEF") {
|
|
14981
|
-
const
|
|
14982
|
-
return
|
|
14981
|
+
const be = (re = e.embeddableCatalog.value.find((_e) => _e.type === k.type)) == null ? void 0 : re.fields[T];
|
|
14982
|
+
return be ? { name: be.name, physicalName: be.physicalName, dataType: be.dataType, length: be.length, scale: be.scale, shareable: be.shareable, logicalName: be.logicalName } : void 0;
|
|
14983
14983
|
}
|
|
14984
14984
|
const L = (G = k.embedded) == null ? void 0 : G.embeddableRef;
|
|
14985
14985
|
if (!L) return;
|
|
14986
|
-
const q = (ce = e.state.logical.entities.find((
|
|
14986
|
+
const q = (ce = e.state.logical.entities.find((be) => be.modelId === L)) == null ? void 0 : ce.attributes.flatMap((be) => be.dbAttrs)[T];
|
|
14987
14987
|
return q ? { physicalName: q.physicalName, dataType: q.dataType, length: q.length, scale: q.scale, logicalName: q.logicalName } : void 0;
|
|
14988
14988
|
}
|
|
14989
14989
|
function Ie(k, T) {
|
|
@@ -16698,7 +16698,7 @@ const BE = ["aria-expanded", "placeholder"], UE = ["aria-selected", "onClick", "
|
|
|
16698
16698
|
]),
|
|
16699
16699
|
E("tbody", null, [
|
|
16700
16700
|
(R(!0), P(Ne, null, Xe(Ve.value, (G) => {
|
|
16701
|
-
var ce,
|
|
16701
|
+
var ce, be, _e, Ke, De, Be, Ue, U, le, ze;
|
|
16702
16702
|
return R(), P(Ne, {
|
|
16703
16703
|
key: G.modelId
|
|
16704
16704
|
}, [
|
|
@@ -16963,12 +16963,12 @@ const BE = ["aria-expanded", "placeholder"], UE = ["aria-selected", "onClick", "
|
|
|
16963
16963
|
width: "100%",
|
|
16964
16964
|
placeholder: u(v)(G) ?? u(n).t("em.attr.columnPlaceholder"),
|
|
16965
16965
|
disabled: u(y)(G),
|
|
16966
|
-
"model-value": ((
|
|
16966
|
+
"model-value": ((be = G.dbAttrs[0]) == null ? void 0 : be.physicalName) ?? "",
|
|
16967
16967
|
"onUpdate:modelValue": (de) => u($)(G, { physicalName: de })
|
|
16968
16968
|
}, null, 8, ["name", "placeholder", "disabled", "model-value", "onUpdate:modelValue"]),
|
|
16969
16969
|
Y(So, {
|
|
16970
16970
|
controller: u(n),
|
|
16971
|
-
"ref-id": (
|
|
16971
|
+
"ref-id": (_e = G.dbAttrs[0]) == null ? void 0 : _e.modelId
|
|
16972
16972
|
}, null, 8, ["controller", "ref-id"])
|
|
16973
16973
|
]),
|
|
16974
16974
|
E("td", {
|
|
@@ -18388,45 +18388,45 @@ function _D(e = dN(), t = {}) {
|
|
|
18388
18388
|
const q = Zn(k, T, L), re = zo(
|
|
18389
18389
|
n.logical,
|
|
18390
18390
|
k,
|
|
18391
|
-
(ce) => ce.map((
|
|
18391
|
+
(ce) => ce.map((be) => be.modelId === T ? { ...be, ...L } : be)
|
|
18392
18392
|
), G = Ci(re, k);
|
|
18393
18393
|
se(G.length ? wt("속성 수정", [q, ...G]) : q);
|
|
18394
18394
|
};
|
|
18395
18395
|
function Z(k) {
|
|
18396
|
-
const T = k.map((
|
|
18396
|
+
const T = k.map((_e) => n.layout.entityLayouts.find((Ke) => Ke.entityRef === _e)).filter((_e) => !!_e);
|
|
18397
18397
|
if (!T.length) return { location: { x: 40, y: 40 }, size: { width: 400, height: 300 } };
|
|
18398
18398
|
let L = 1 / 0, q = 1 / 0, re = -1 / 0, G = -1 / 0;
|
|
18399
|
-
for (const
|
|
18400
|
-
const Ke =
|
|
18401
|
-
L = Math.min(L,
|
|
18399
|
+
for (const _e of T) {
|
|
18400
|
+
const Ke = _e.geo.size.width || 220, De = _e.geo.size.height || 140;
|
|
18401
|
+
L = Math.min(L, _e.geo.location.x), q = Math.min(q, _e.geo.location.y), re = Math.max(re, _e.geo.location.x + Ke), G = Math.max(G, _e.geo.location.y + De);
|
|
18402
18402
|
}
|
|
18403
|
-
const ce = 40,
|
|
18403
|
+
const ce = 40, be = 28;
|
|
18404
18404
|
return {
|
|
18405
|
-
location: { x: L - ce, y: q - ce -
|
|
18406
|
-
size: { width: re - L + ce * 2, height: G - q + ce * 2 +
|
|
18405
|
+
location: { x: L - ce, y: q - ce - be },
|
|
18406
|
+
size: { width: re - L + ce * 2, height: G - q + ce * 2 + be }
|
|
18407
18407
|
};
|
|
18408
18408
|
}
|
|
18409
18409
|
function Q(k, T, L) {
|
|
18410
|
-
var
|
|
18411
|
-
const q = n.layout.groupLayouts.find((Ke) => Ke.groupRef === k), re = (q == null ? void 0 : q.geo.location) ?? T, G = T.x - re.x, ce = T.y - re.y,
|
|
18410
|
+
var _e;
|
|
18411
|
+
const q = n.layout.groupLayouts.find((Ke) => Ke.groupRef === k), re = (q == null ? void 0 : q.geo.location) ?? T, G = T.x - re.x, ce = T.y - re.y, be = [
|
|
18412
18412
|
Zu(k, T),
|
|
18413
18413
|
...L.map((Ke) => jo(Ke.id, Ke.location))
|
|
18414
18414
|
];
|
|
18415
18415
|
if (G || ce) {
|
|
18416
18416
|
const Ke = new Set(
|
|
18417
|
-
((
|
|
18417
|
+
((_e = n.logical.groups.find((De) => De.modelId === k)) == null ? void 0 : _e.memberEntityRefs) ?? []
|
|
18418
18418
|
);
|
|
18419
18419
|
for (const De of n.logical.associations) {
|
|
18420
18420
|
if (!Ke.has(De.end1.entityRef) || !Ke.has(De.end2.entityRef)) continue;
|
|
18421
18421
|
const Be = n.layout.associationLayouts.find((Ue) => Ue.associationRef === De.modelId);
|
|
18422
|
-
Be && Be.waypoints.length &&
|
|
18422
|
+
Be && Be.waypoints.length && be.push(fm(De.modelId, G, ce));
|
|
18423
18423
|
}
|
|
18424
18424
|
for (const De of (q == null ? void 0 : q.memberNoteRefs) ?? []) {
|
|
18425
18425
|
const Be = n.layout.notes.find((Ue) => Ue.modelId === De);
|
|
18426
|
-
Be &&
|
|
18426
|
+
Be && be.push(Mi(De, { x: Be.geo.location.x + G, y: Be.geo.location.y + ce }));
|
|
18427
18427
|
}
|
|
18428
18428
|
}
|
|
18429
|
-
return
|
|
18429
|
+
return be;
|
|
18430
18430
|
}
|
|
18431
18431
|
const X = rN({
|
|
18432
18432
|
state: n,
|
|
@@ -18572,17 +18572,17 @@ function _D(e = dN(), t = {}) {
|
|
|
18572
18572
|
if (ne(k)) return;
|
|
18573
18573
|
const L = Fu(k, T), q = n.logical.entities.find((ce) => ce.modelId === k), re = T.stereotype === "JPA_EMBEDDABLE" && !!q && q.stereotype !== "JPA_EMBEDDABLE", G = !!T.stereotype && T.stereotype !== "JPA_EMBEDDABLE" && !!q && q.stereotype === "JPA_EMBEDDABLE";
|
|
18574
18574
|
if (re && q) {
|
|
18575
|
-
const ce = q.attributes.filter((Be) => Be.identifier && !Be.derivedFrom).map((Be) => Zn(k, Be.modelId, { identifier: !1 })),
|
|
18575
|
+
const ce = q.attributes.filter((Be) => Be.identifier && !Be.derivedFrom).map((Be) => Zn(k, Be.modelId, { identifier: !1 })), be = zo(
|
|
18576
18576
|
{ ...n.logical, entities: n.logical.entities.map((Be) => Be.modelId === k ? { ...Be, stereotype: "JPA_EMBEDDABLE" } : Be) },
|
|
18577
18577
|
k,
|
|
18578
18578
|
(Be) => Be.map((Ue) => Ue.identifier && !Ue.derivedFrom ? { ...Ue, identifier: !1 } : Ue)
|
|
18579
|
-
),
|
|
18579
|
+
), _e = Ra(be, k), Ke = oN(n.logical, k), De = [L, ...ce, ..._e, ...Ke];
|
|
18580
18580
|
se(De.length > 1 ? wt("임베더블 변환", De) : L);
|
|
18581
18581
|
return;
|
|
18582
18582
|
}
|
|
18583
18583
|
if (G) {
|
|
18584
|
-
const ce = nN(n.logical, k),
|
|
18585
|
-
se(
|
|
18584
|
+
const ce = nN(n.logical, k), be = [L, ...ce];
|
|
18585
|
+
se(be.length > 1 ? wt("엔터티 전환", be) : L);
|
|
18586
18586
|
return;
|
|
18587
18587
|
}
|
|
18588
18588
|
se(L);
|
|
@@ -18596,32 +18596,32 @@ function _D(e = dN(), t = {}) {
|
|
|
18596
18596
|
removeEntity(k) {
|
|
18597
18597
|
if (ne(k)) return;
|
|
18598
18598
|
const T = Hu(k);
|
|
18599
|
-
if (!n.logical.entities.find((
|
|
18599
|
+
if (!n.logical.entities.find((_e) => _e.modelId === k)) {
|
|
18600
18600
|
se(T);
|
|
18601
18601
|
return;
|
|
18602
18602
|
}
|
|
18603
18603
|
const q = n.logical.associations.filter(
|
|
18604
|
-
(
|
|
18605
|
-
), re = new Set(q.map((
|
|
18606
|
-
for (const
|
|
18607
|
-
if (
|
|
18608
|
-
for (const Ke of
|
|
18609
|
-
Ke.embedded && re.has(Ke.embedded.associationRef) && G.push(bn(
|
|
18610
|
-
for (const
|
|
18611
|
-
if (
|
|
18612
|
-
const Ke = n.logical.entities.find((Be) => Be.modelId ===
|
|
18613
|
-
(Be) => Be.modelId ===
|
|
18604
|
+
(_e) => _e.end1.entityRef === k || _e.end2.entityRef === k
|
|
18605
|
+
), re = new Set(q.map((_e) => _e.modelId)), G = [];
|
|
18606
|
+
for (const _e of n.logical.entities)
|
|
18607
|
+
if (_e.modelId !== k)
|
|
18608
|
+
for (const Ke of _e.attributes)
|
|
18609
|
+
Ke.embedded && re.has(Ke.embedded.associationRef) && G.push(bn(_e.modelId, Ke.modelId));
|
|
18610
|
+
for (const _e of q) {
|
|
18611
|
+
if (_e.end1.entityRef === k || !_e.end1.attributeRef) continue;
|
|
18612
|
+
const Ke = n.logical.entities.find((Be) => Be.modelId === _e.end1.entityRef), De = Ke == null ? void 0 : Ke.attributes.find(
|
|
18613
|
+
(Be) => Be.modelId === _e.end1.attributeRef && Be.attrType === "RELATION_REF"
|
|
18614
18614
|
);
|
|
18615
18615
|
De && G.push(bn(Ke.modelId, De.modelId));
|
|
18616
18616
|
}
|
|
18617
18617
|
const ce = {
|
|
18618
18618
|
...n.logical,
|
|
18619
|
-
entities: n.logical.entities.filter((
|
|
18620
|
-
associations: n.logical.associations.filter((
|
|
18621
|
-
},
|
|
18622
|
-
q.filter((
|
|
18619
|
+
entities: n.logical.entities.filter((_e) => _e.modelId !== k),
|
|
18620
|
+
associations: n.logical.associations.filter((_e) => !re.has(_e.modelId))
|
|
18621
|
+
}, be = new Set(
|
|
18622
|
+
q.filter((_e) => _e.end1.entityRef === k && _e.end2.entityRef !== k).map((_e) => _e.end2.entityRef)
|
|
18623
18623
|
);
|
|
18624
|
-
for (const
|
|
18624
|
+
for (const _e of be) G.push(...Ra(ce, _e));
|
|
18625
18625
|
se(G.length ? wt("엔티티 삭제", [T, ...G]) : T);
|
|
18626
18626
|
},
|
|
18627
18627
|
setEntitySwatch(k, T) {
|
|
@@ -18711,20 +18711,20 @@ function _D(e = dN(), t = {}) {
|
|
|
18711
18711
|
dropNote(k, T, L) {
|
|
18712
18712
|
var G;
|
|
18713
18713
|
const q = ((G = n.layout.groupLayouts.find((ce) => {
|
|
18714
|
-
var
|
|
18715
|
-
return (
|
|
18714
|
+
var be;
|
|
18715
|
+
return (be = ce.memberNoteRefs) == null ? void 0 : be.includes(k);
|
|
18716
18716
|
})) == null ? void 0 : G.groupRef) ?? null, re = [Mi(k, T)];
|
|
18717
18717
|
q !== L && (q && re.push(km(q, k)), L && re.push(wm(L, k))), se(wt("이동", re));
|
|
18718
18718
|
},
|
|
18719
18719
|
addPredefinedEmbed(k, T) {
|
|
18720
18720
|
if (!S.value || ne(k)) return null;
|
|
18721
|
-
const L = i.value.find((
|
|
18721
|
+
const L = i.value.find((_e) => _e.type === T), q = n.logical.entities.find((_e) => _e.modelId === k);
|
|
18722
18722
|
if (!L || !q) return null;
|
|
18723
18723
|
const re = dn(q.attributes), G = Qe(), ce = L.fields.map(() => ({
|
|
18724
18724
|
modelId: Qe(),
|
|
18725
18725
|
physicalName: "",
|
|
18726
18726
|
dataType: ""
|
|
18727
|
-
})),
|
|
18727
|
+
})), be = {
|
|
18728
18728
|
modelId: G,
|
|
18729
18729
|
name: L.defaultName,
|
|
18730
18730
|
type: L.type,
|
|
@@ -18734,7 +18734,7 @@ function _D(e = dN(), t = {}) {
|
|
|
18734
18734
|
order: re,
|
|
18735
18735
|
dbAttrs: ce
|
|
18736
18736
|
};
|
|
18737
|
-
return se(kn(k,
|
|
18737
|
+
return se(kn(k, be)), G;
|
|
18738
18738
|
},
|
|
18739
18739
|
addAttribute(k, T = {}) {
|
|
18740
18740
|
if (!S.value || ne(k)) return null;
|
|
@@ -18754,8 +18754,8 @@ function _D(e = dN(), t = {}) {
|
|
|
18754
18754
|
// 사용자가 방금 만든 컬럼을 가리키므로 고칠 수 있는 자리다.
|
|
18755
18755
|
dbAttrs: T.dbAttrs ?? [{ modelId: Qe(), physicalName: G, dataType: "VARCHAR" }],
|
|
18756
18756
|
...T
|
|
18757
|
-
},
|
|
18758
|
-
return se(Ke.length ? wt("속성 추가", [
|
|
18757
|
+
}, be = kn(k, ce), _e = zo(n.logical, k, (De) => [...De, ce]), Ke = Ci(_e, k);
|
|
18758
|
+
return se(Ke.length ? wt("속성 추가", [be, ...Ke]) : be), re;
|
|
18759
18759
|
},
|
|
18760
18760
|
addDivider(k) {
|
|
18761
18761
|
if (!S.value || ne(k)) return null;
|
|
@@ -18781,10 +18781,10 @@ function _D(e = dN(), t = {}) {
|
|
|
18781
18781
|
});
|
|
18782
18782
|
},
|
|
18783
18783
|
setEmbedColumns(k, T, L) {
|
|
18784
|
-
var
|
|
18784
|
+
var _e, Ke;
|
|
18785
18785
|
if (ne(k)) return;
|
|
18786
|
-
const q = Zn(k, T, { dbAttrs: L }), re = (
|
|
18787
|
-
ce && G && (ce.end1.legacyEmbedRaw &&
|
|
18786
|
+
const q = Zn(k, T, { dbAttrs: L }), re = (_e = n.logical.entities.find((De) => De.modelId === k)) == null ? void 0 : _e.attributes.find((De) => De.modelId === T), G = (Ke = re == null ? void 0 : re.embedded) == null ? void 0 : Ke.associationRef, ce = G ? n.logical.associations.find((De) => De.modelId === G) : void 0, be = [];
|
|
18787
|
+
ce && G && (ce.end1.legacyEmbedRaw && be.push(cn(G, "end1", { legacyEmbedRaw: void 0 })), ce.end2.legacyEmbedRaw && be.push(cn(G, "end2", { legacyEmbedRaw: void 0 }))), se(be.length ? wt("임베드 컬럼 수정", [q, ...be]) : q);
|
|
18788
18788
|
},
|
|
18789
18789
|
removeAttribute(k, T) {
|
|
18790
18790
|
if (ne(k)) return;
|
|
@@ -18800,18 +18800,18 @@ function _D(e = dN(), t = {}) {
|
|
|
18800
18800
|
se(re.length ? wt("속성 삭제", [L, ...re]) : L);
|
|
18801
18801
|
},
|
|
18802
18802
|
removeAttributes(k, T) {
|
|
18803
|
-
var
|
|
18803
|
+
var be;
|
|
18804
18804
|
if (!T.length || ne(k)) return;
|
|
18805
18805
|
const L = T.filter(
|
|
18806
|
-
(
|
|
18806
|
+
(_e) => !es(n.logical, k, _e)
|
|
18807
18807
|
);
|
|
18808
18808
|
if (L.length < T.length && ve(m("em.attr.fkDeleteHint")), !L.length) return;
|
|
18809
|
-
const q = L.map((
|
|
18809
|
+
const q = L.map((_e) => bn(k, _e)), re = new Set(L), G = zo(
|
|
18810
18810
|
n.logical,
|
|
18811
18811
|
k,
|
|
18812
|
-
(
|
|
18812
|
+
(_e) => _e.filter((Ke) => !re.has(Ke.modelId))
|
|
18813
18813
|
), ce = [...q, ...Ci(G, k)];
|
|
18814
|
-
se(ce.length === 1 ? ce[0] : wt("속성 삭제", ce)), ((
|
|
18814
|
+
se(ce.length === 1 ? ce[0] : wt("속성 삭제", ce)), ((be = O.value) == null ? void 0 : be.kind) === "attribute" && O.value.entityId === k && (O.value = null);
|
|
18815
18815
|
},
|
|
18816
18816
|
setAttributeSwatches(k, T, L) {
|
|
18817
18817
|
T.length && (T.length === 1 ? se(Ha(k, T[0], L)) : se(
|
|
@@ -18881,21 +18881,21 @@ function _D(e = dN(), t = {}) {
|
|
|
18881
18881
|
}, ce = {
|
|
18882
18882
|
...n.logical,
|
|
18883
18883
|
associations: [...n.logical.associations, G]
|
|
18884
|
-
},
|
|
18885
|
-
|
|
18884
|
+
}, be = oa(ce, T, Qe), _e = be.add[0];
|
|
18885
|
+
_e && (G.end2.attributeRef = _e.modelId);
|
|
18886
18886
|
const Ke = {
|
|
18887
18887
|
associationRef: re,
|
|
18888
18888
|
waypoints: [],
|
|
18889
18889
|
sourceColumnRef: L,
|
|
18890
|
-
targetColumnRef: (
|
|
18891
|
-
}, De = as(G, Ke), Be = Ks(ce, T,
|
|
18890
|
+
targetColumnRef: (_e == null ? void 0 : _e.modelId) ?? q
|
|
18891
|
+
}, De = as(G, Ke), Be = Ks(ce, T, be);
|
|
18892
18892
|
return se(Be.length ? wt("관계 추가", [De, ...Be]) : De), re;
|
|
18893
18893
|
},
|
|
18894
18894
|
addEmbedAssociation(k, T) {
|
|
18895
18895
|
if (!S.value || ne(k)) return null;
|
|
18896
18896
|
const L = n.logical.entities.find((de) => de.modelId === k), q = n.logical.entities.find((de) => de.modelId === T);
|
|
18897
18897
|
if (!L || !q || q.stereotype !== "JPA_EMBEDDABLE") return null;
|
|
18898
|
-
const re = Qe(), G = Qe(), ce = Qe(),
|
|
18898
|
+
const re = Qe(), G = Qe(), ce = Qe(), be = dn(L.attributes), _e = Ed(q), Ke = (de) => de && de.charAt(0).toLowerCase() + de.slice(1), De = new Set(L.attributes.map((de) => de.name)), Be = Ke(q.name);
|
|
18899
18899
|
let Ue = Be;
|
|
18900
18900
|
for (let de = 2; De.has(Ue); de++) Ue = `${Be}${de}`;
|
|
18901
18901
|
const U = {
|
|
@@ -18906,8 +18906,8 @@ function _D(e = dN(), t = {}) {
|
|
|
18906
18906
|
attrType: "EMBED_OWN",
|
|
18907
18907
|
identifier: !1,
|
|
18908
18908
|
notNull: !1,
|
|
18909
|
-
order:
|
|
18910
|
-
dbAttrs:
|
|
18909
|
+
order: be,
|
|
18910
|
+
dbAttrs: _e,
|
|
18911
18911
|
embedded: { associationRef: re, embeddableRef: T }
|
|
18912
18912
|
}, le = {
|
|
18913
18913
|
modelId: re,
|
|
@@ -18955,9 +18955,9 @@ function _D(e = dN(), t = {}) {
|
|
|
18955
18955
|
}
|
|
18956
18956
|
}
|
|
18957
18957
|
if (!q || !re) return;
|
|
18958
|
-
const G = re.embedded.embeddableRef, ce = L.end2.entityRef === G ? "end2" : "end1",
|
|
18959
|
-
if (
|
|
18960
|
-
const
|
|
18958
|
+
const G = re.embedded.embeddableRef, ce = L.end2.entityRef === G ? "end2" : "end1", be = L[ce];
|
|
18959
|
+
if (be.multiplicity === T) return;
|
|
18960
|
+
const _e = (Ue) => Ue === "ZERO_OR_MORE_INSTANCES" || Ue === "ONE_OR_MORE_INSTANCES", Ke = _e(be.multiplicity), De = _e(T);
|
|
18961
18961
|
if (Ke === De) {
|
|
18962
18962
|
se(cn(k, ce, { multiplicity: T }));
|
|
18963
18963
|
return;
|
|
@@ -18968,7 +18968,7 @@ function _D(e = dN(), t = {}) {
|
|
|
18968
18968
|
Zn(q, re.modelId, { dbAttrs: [] }),
|
|
18969
18969
|
cn(k, ce, {
|
|
18970
18970
|
multiplicity: T,
|
|
18971
|
-
jpa: { ...
|
|
18971
|
+
jpa: { ...be.jpa, collectionType: ((Be = be.jpa) == null ? void 0 : Be.collectionType) ?? "LIST" }
|
|
18972
18972
|
})
|
|
18973
18973
|
])
|
|
18974
18974
|
);
|
|
@@ -18980,7 +18980,7 @@ function _D(e = dN(), t = {}) {
|
|
|
18980
18980
|
Zn(q, re.modelId, { dbAttrs: Ed(Ue) }),
|
|
18981
18981
|
cn(k, ce, {
|
|
18982
18982
|
multiplicity: T,
|
|
18983
|
-
jpa: { ...
|
|
18983
|
+
jpa: { ...be.jpa, collectionType: void 0, collectionTable: void 0, orderColumn: void 0 }
|
|
18984
18984
|
})
|
|
18985
18985
|
])
|
|
18986
18986
|
);
|
|
@@ -18994,12 +18994,12 @@ function _D(e = dN(), t = {}) {
|
|
|
18994
18994
|
return;
|
|
18995
18995
|
}
|
|
18996
18996
|
for (const ce of n.logical.entities) {
|
|
18997
|
-
const
|
|
18997
|
+
const be = ce.attributes.find((_e) => {
|
|
18998
18998
|
var Ke;
|
|
18999
|
-
return ((Ke =
|
|
18999
|
+
return ((Ke = _e.embedded) == null ? void 0 : Ke.associationRef) === k;
|
|
19000
19000
|
});
|
|
19001
|
-
if (
|
|
19002
|
-
se(wt("임베드 삭제", [L, bn(ce.modelId,
|
|
19001
|
+
if (be) {
|
|
19002
|
+
se(wt("임베드 삭제", [L, bn(ce.modelId, be.modelId)]));
|
|
19003
19003
|
return;
|
|
19004
19004
|
}
|
|
19005
19005
|
}
|
|
@@ -19008,16 +19008,16 @@ function _D(e = dN(), t = {}) {
|
|
|
19008
19008
|
associations: n.logical.associations.filter((ce) => ce.modelId !== k)
|
|
19009
19009
|
}, G = Ra(re, q);
|
|
19010
19010
|
if (T.end1.attributeRef) {
|
|
19011
|
-
const ce = n.logical.entities.find((
|
|
19012
|
-
(
|
|
19011
|
+
const ce = n.logical.entities.find((_e) => _e.modelId === T.end1.entityRef), be = ce == null ? void 0 : ce.attributes.find(
|
|
19012
|
+
(_e) => _e.modelId === T.end1.attributeRef && _e.attrType === "RELATION_REF"
|
|
19013
19013
|
);
|
|
19014
|
-
|
|
19014
|
+
be && G.push(bn(ce.modelId, be.modelId));
|
|
19015
19015
|
}
|
|
19016
19016
|
se(G.length ? wt("관계 삭제", [L, ...G]) : L);
|
|
19017
19017
|
},
|
|
19018
19018
|
setAssociationIdentifying(k, T) {
|
|
19019
19019
|
if (Re(k)) return;
|
|
19020
|
-
const L = n.logical.associations.find((
|
|
19020
|
+
const L = n.logical.associations.find((be) => be.modelId === k), q = Ms(k, { identifying: T });
|
|
19021
19021
|
if (!L || L.identifying === T) {
|
|
19022
19022
|
se(q);
|
|
19023
19023
|
return;
|
|
@@ -19025,7 +19025,7 @@ function _D(e = dN(), t = {}) {
|
|
|
19025
19025
|
const re = L.end2.entityRef, G = {
|
|
19026
19026
|
...n.logical,
|
|
19027
19027
|
associations: n.logical.associations.map(
|
|
19028
|
-
(
|
|
19028
|
+
(be) => be.modelId === k ? { ...be, identifying: T } : be
|
|
19029
19029
|
)
|
|
19030
19030
|
}, ce = Ra(G, re);
|
|
19031
19031
|
se(ce.length ? wt("식별 관계 변경", [q, ...ce]) : q);
|
|
@@ -19034,10 +19034,10 @@ function _D(e = dN(), t = {}) {
|
|
|
19034
19034
|
if (Re(k)) return;
|
|
19035
19035
|
const q = n.logical.associations.find((re) => re.modelId === k);
|
|
19036
19036
|
if (q && T === "end1" && "navigable" in L && L.navigable !== q.end1.navigable) {
|
|
19037
|
-
const re = n.logical.entities.find((
|
|
19037
|
+
const re = n.logical.entities.find((be) => be.modelId === q.end1.entityRef), G = n.logical.entities.find((be) => be.modelId === q.end2.entityRef), ce = (re == null ? void 0 : re.stereotype) === "JPA_EMBEDDABLE" || (G == null ? void 0 : G.stereotype) === "JPA_EMBEDDABLE";
|
|
19038
19038
|
if (re && G && !ce) {
|
|
19039
19039
|
if (L.navigable === !0 && !q.end1.attributeRef) {
|
|
19040
|
-
const
|
|
19040
|
+
const be = Rs(q.end2.multiplicity), _e = q.end1.navFieldNameHint || As(G.name, be), Ke = Jo(_e, new Set(re.attributes.map((U) => U.name))), De = Qe(), Be = dn(re.attributes), Ue = {
|
|
19041
19041
|
modelId: De,
|
|
19042
19042
|
name: Ke,
|
|
19043
19043
|
type: G.name,
|
|
@@ -19057,12 +19057,12 @@ function _D(e = dN(), t = {}) {
|
|
|
19057
19057
|
return;
|
|
19058
19058
|
}
|
|
19059
19059
|
if (L.navigable === !1 && q.end1.attributeRef) {
|
|
19060
|
-
const
|
|
19060
|
+
const be = q.end1.attributeRef, _e = re.attributes.find((De) => De.modelId === be && De.attrType === "RELATION_REF"), Ke = cn(k, "end1", {
|
|
19061
19061
|
...L,
|
|
19062
19062
|
attributeRef: void 0,
|
|
19063
|
-
navFieldNameHint: (
|
|
19063
|
+
navFieldNameHint: (_e == null ? void 0 : _e.name) ?? q.end1.navFieldNameHint
|
|
19064
19064
|
});
|
|
19065
|
-
se(
|
|
19065
|
+
se(_e ? wt("inverse nav 제거", [bn(q.end1.entityRef, be), Ke]) : Ke);
|
|
19066
19066
|
return;
|
|
19067
19067
|
}
|
|
19068
19068
|
}
|
|
@@ -19422,13 +19422,13 @@ const Ys = Symbol("groupHover"), ap = Symbol("groupDrag"), fi = Symbol("relation
|
|
|
19422
19422
|
function ce() {
|
|
19423
19423
|
L.value = null;
|
|
19424
19424
|
}
|
|
19425
|
-
const
|
|
19425
|
+
const be = he(null), _e = he(null);
|
|
19426
19426
|
function Ke(U, le) {
|
|
19427
|
-
D.value && (le.stopPropagation(), le.preventDefault(),
|
|
19427
|
+
D.value && (le.stopPropagation(), le.preventDefault(), _e.value = { id: U.modelId, dropIndex: -1, lineY: 0 }, le.target.setPointerCapture(le.pointerId));
|
|
19428
19428
|
}
|
|
19429
19429
|
function De(U) {
|
|
19430
|
-
if (!
|
|
19431
|
-
const le = Array.from(
|
|
19430
|
+
if (!_e.value || !be.value) return;
|
|
19431
|
+
const le = Array.from(be.value.querySelectorAll(".em-entity__op-row"));
|
|
19432
19432
|
if (!le.length) return;
|
|
19433
19433
|
let ze = le.length;
|
|
19434
19434
|
for (let nt = 0; nt < le.length; nt++) {
|
|
@@ -19439,18 +19439,18 @@ const Ys = Symbol("groupHover"), ap = Symbol("groupDrag"), fi = Symbol("relation
|
|
|
19439
19439
|
}
|
|
19440
19440
|
}
|
|
19441
19441
|
const de = le[le.length - 1], $e = ze < le.length ? le[ze].offsetTop : de.offsetTop + de.offsetHeight;
|
|
19442
|
-
|
|
19442
|
+
_e.value = { ..._e.value, dropIndex: ze, lineY: $e };
|
|
19443
19443
|
}
|
|
19444
19444
|
function Be() {
|
|
19445
|
-
const U =
|
|
19446
|
-
if (
|
|
19445
|
+
const U = _e.value;
|
|
19446
|
+
if (_e.value = null, !U || U.dropIndex < 0) return;
|
|
19447
19447
|
const ze = oe.value.findIndex(($e) => $e.modelId === U.id);
|
|
19448
19448
|
if (ze < 0) return;
|
|
19449
19449
|
const de = U.dropIndex - (ze < U.dropIndex ? 1 : 0);
|
|
19450
19450
|
de !== ze && (n == null || n.reorderOperations(t.id, [U.id], de));
|
|
19451
19451
|
}
|
|
19452
19452
|
function Ue() {
|
|
19453
|
-
|
|
19453
|
+
_e.value = null;
|
|
19454
19454
|
}
|
|
19455
19455
|
return (U, le) => {
|
|
19456
19456
|
var ze, de;
|
|
@@ -19656,20 +19656,20 @@ const Ys = Symbol("groupHover"), ap = Symbol("groupDrag"), fi = Symbol("relation
|
|
|
19656
19656
|
!x.value && me.value ? (R(), P("ul", {
|
|
19657
19657
|
key: 2,
|
|
19658
19658
|
ref_key: "opsUl",
|
|
19659
|
-
ref:
|
|
19659
|
+
ref: be,
|
|
19660
19660
|
class: "em-entity__ops"
|
|
19661
19661
|
}, [
|
|
19662
|
-
|
|
19662
|
+
_e.value && _e.value.dropIndex >= 0 ? (R(), P("div", {
|
|
19663
19663
|
key: 0,
|
|
19664
19664
|
class: "em-entity__drop-line",
|
|
19665
|
-
style: pt({ top: `${
|
|
19665
|
+
style: pt({ top: `${_e.value.lineY}px` }),
|
|
19666
19666
|
"aria-hidden": "true"
|
|
19667
19667
|
}, null, 4)) : ue("", !0),
|
|
19668
19668
|
(R(!0), P(Ne, null, Xe(oe.value, ($e) => {
|
|
19669
19669
|
var nt, Nt;
|
|
19670
19670
|
return R(), P("li", {
|
|
19671
19671
|
key: $e.modelId,
|
|
19672
|
-
class: Ae(["em-entity__op-row", { "is-dragging": ((nt =
|
|
19672
|
+
class: Ae(["em-entity__op-row", { "is-dragging": ((nt = _e.value) == null ? void 0 : nt.id) === $e.modelId, "is-diff-changed": !!((Nt = d.value) != null && Nt.changedOperationIds.has($e.modelId)) }]),
|
|
19673
19673
|
"data-op": $e.modelId
|
|
19674
19674
|
}, [
|
|
19675
19675
|
D.value ? (R(), P("span", {
|
|
@@ -24034,7 +24034,7 @@ const RT = {
|
|
|
24034
24034
|
const W = z.computedPosition ?? z.position, pe = z.dimensions ?? { width: 0, height: 0 };
|
|
24035
24035
|
return { x: W.x + pe.width / 2, y: W.y + pe.height / 2 };
|
|
24036
24036
|
}
|
|
24037
|
-
function
|
|
24037
|
+
function be(z) {
|
|
24038
24038
|
const W = z.node;
|
|
24039
24039
|
if (W) {
|
|
24040
24040
|
if (v.value = null, W.type === "group") {
|
|
@@ -24049,7 +24049,7 @@ const RT = {
|
|
|
24049
24049
|
y.value = fe(ce(W));
|
|
24050
24050
|
}
|
|
24051
24051
|
}
|
|
24052
|
-
function
|
|
24052
|
+
function _e(z) {
|
|
24053
24053
|
var Te;
|
|
24054
24054
|
y.value = null, f.value = null;
|
|
24055
24055
|
const W = (Te = z.nodes) != null && Te.length ? z.nodes : [z.node], pe = W.filter((je) => (je == null ? void 0 : je.type) === "group");
|
|
@@ -24389,8 +24389,8 @@ const RT = {
|
|
|
24389
24389
|
onConnect: Ke,
|
|
24390
24390
|
onConnectStart: W[1] || (W[1] = (pe) => d.value = !0),
|
|
24391
24391
|
onConnectEnd: W[2] || (W[2] = (pe) => d.value = !1),
|
|
24392
|
-
onNodeDrag:
|
|
24393
|
-
onNodeDragStop:
|
|
24392
|
+
onNodeDrag: be,
|
|
24393
|
+
onNodeDragStop: _e,
|
|
24394
24394
|
onNodeClick: Nt,
|
|
24395
24395
|
onEdgeClick: sn,
|
|
24396
24396
|
onSelectionChange: kt,
|
|
@@ -25560,16 +25560,16 @@ const RT = {
|
|
|
25560
25560
|
function ce(Be) {
|
|
25561
25561
|
return a.value.size > 1 && a.value.has(Be.modelId);
|
|
25562
25562
|
}
|
|
25563
|
-
function
|
|
25563
|
+
function be(Be, Ue) {
|
|
25564
25564
|
if (!o.value) return;
|
|
25565
25565
|
const U = ce(Be) ? n.selectedAttrIds.value : [Be.modelId];
|
|
25566
25566
|
n.setAttributeSwatches(o.value.modelId, U, Ue);
|
|
25567
25567
|
}
|
|
25568
|
-
const
|
|
25568
|
+
const _e = he(void 0);
|
|
25569
25569
|
function Ke(Be) {
|
|
25570
25570
|
if (!Be || !o.value) return;
|
|
25571
25571
|
const Ue = n.addPredefinedEmbed(o.value.modelId, Be);
|
|
25572
|
-
Ue && n.selectAttribute(o.value.modelId, Ue),
|
|
25572
|
+
Ue && n.selectAttribute(o.value.modelId, Ue), _e.value = void 0;
|
|
25573
25573
|
}
|
|
25574
25574
|
function De() {
|
|
25575
25575
|
if (!o.value) return;
|
|
@@ -25592,7 +25592,7 @@ const RT = {
|
|
|
25592
25592
|
key: 0,
|
|
25593
25593
|
width: "120px",
|
|
25594
25594
|
placeholder: u(n).t("em.attr.addEmbeddable"),
|
|
25595
|
-
"model-value":
|
|
25595
|
+
"model-value": _e.value,
|
|
25596
25596
|
items: u(D),
|
|
25597
25597
|
"value-provider": (U) => U.type,
|
|
25598
25598
|
"label-provider": u(w),
|
|
@@ -25995,7 +25995,7 @@ const RT = {
|
|
|
25995
25995
|
type: "button",
|
|
25996
25996
|
class: Ae(["em-swatch__chip em-swatch__none", { "is-on": G(U) === null }]),
|
|
25997
25997
|
title: u(n).t("em.swatch.none"),
|
|
25998
|
-
onClick: (Oe) =>
|
|
25998
|
+
onClick: (Oe) => be(U, null)
|
|
25999
25999
|
}, "∅", 10, fM),
|
|
26000
26000
|
(R(!0), P(Ne, null, Xe(u(Ro), (Oe) => (R(), P("button", {
|
|
26001
26001
|
key: Oe,
|
|
@@ -26003,7 +26003,7 @@ const RT = {
|
|
|
26003
26003
|
class: Ae(["em-swatch__chip", { "is-on": G(U) === Oe }]),
|
|
26004
26004
|
style: pt({ background: u(si)(Oe) }),
|
|
26005
26005
|
title: u(n).t(u(Ao)(Oe)),
|
|
26006
|
-
onClick: ($t) =>
|
|
26006
|
+
onClick: ($t) => be(U, Oe)
|
|
26007
26007
|
}, null, 14, pM))), 128)),
|
|
26008
26008
|
ce(U) ? (R(), P("span", hM, te(u(n).t("em.attr.batchHint", { n: u(a).size })), 1)) : ue("", !0)
|
|
26009
26009
|
])
|
|
@@ -27140,7 +27140,7 @@ const RT = {
|
|
|
27140
27140
|
if (!q)
|
|
27141
27141
|
a.value = re;
|
|
27142
27142
|
else if (re.length) {
|
|
27143
|
-
const G = new Set(a.value.map((
|
|
27143
|
+
const G = new Set(a.value.map((be) => be.seq)), ce = re.filter((be) => !G.has(be.seq));
|
|
27144
27144
|
ce.length && (a.value = [...a.value, ...ce]);
|
|
27145
27145
|
}
|
|
27146
27146
|
l.value = !0;
|
|
@@ -27182,18 +27182,18 @@ const RT = {
|
|
|
27182
27182
|
}));
|
|
27183
27183
|
});
|
|
27184
27184
|
function I(L) {
|
|
27185
|
-
var ce,
|
|
27185
|
+
var ce, be, _e, Ke, De, Be, Ue;
|
|
27186
27186
|
const q = v.value.get(L);
|
|
27187
27187
|
if (!q) return i.t("em.history.assocFallback");
|
|
27188
27188
|
if ((ce = q.description) != null && ce.trim()) return q.description.trim();
|
|
27189
|
-
const re = (Ke = (
|
|
27189
|
+
const re = (Ke = (_e = f.value.get((be = q.end1) == null ? void 0 : be.entityRef)) == null ? void 0 : _e.name) == null ? void 0 : Ke.trim(), G = (Ue = (Be = f.value.get((De = q.end2) == null ? void 0 : De.entityRef)) == null ? void 0 : Be.name) == null ? void 0 : Ue.trim();
|
|
27190
27190
|
return re && G ? `${re}→${G}` : i.t("em.history.assocFallback");
|
|
27191
27191
|
}
|
|
27192
27192
|
function b(L) {
|
|
27193
27193
|
var q, re, G, ce;
|
|
27194
27194
|
if (L.kind === "entity") return ((re = (q = f.value.get(L.ref)) == null ? void 0 : q.name) == null ? void 0 : re.trim()) || i.t("em.attr.nameless");
|
|
27195
27195
|
if (L.kind === "attribute" || L.kind === "operation" || L.kind === "index") {
|
|
27196
|
-
const
|
|
27196
|
+
const be = L.entityRef ? f.value.get(L.entityRef) : void 0, Ke = ((L.kind === "attribute" ? be == null ? void 0 : be.attributes : L.kind === "operation" ? be == null ? void 0 : be.operations : be == null ? void 0 : be.indexes) ?? []).find((Be) => Be.modelId === L.ref), De = (G = be == null ? void 0 : be.name) == null ? void 0 : G.trim();
|
|
27197
27197
|
return `${De ? De + "." : ""}${((ce = Ke == null ? void 0 : Ke.name) == null ? void 0 : ce.trim()) || L.ref}`;
|
|
27198
27198
|
}
|
|
27199
27199
|
return L.kind === "association" ? I(L.ref) : L.kind === "associationEnd" ? `${I(L.ref)}(${L.end})` : L.kind === "group" ? i.t("em.history.groupSubject", { name: g.value.get(L.ref) ?? L.ref }) : L.ref;
|
|
@@ -27436,10 +27436,10 @@ const RT = {
|
|
|
27436
27436
|
E("div", tL, [
|
|
27437
27437
|
p.value != null ? (R(), P(Ne, { key: 0 }, [
|
|
27438
27438
|
(G = fe.value) != null && G.entries.length ? (R(), P("ul", oL, [
|
|
27439
|
-
(R(!0), P(Ne, null, Xe(fe.value.entries, (ce,
|
|
27440
|
-
key:
|
|
27439
|
+
(R(!0), P(Ne, null, Xe(fe.value.entries, (ce, be) => (R(), P("li", {
|
|
27440
|
+
key: be,
|
|
27441
27441
|
class: Ae(["em-history__diff-entry", { "is-focusable": !!Me(ce.subject) }]),
|
|
27442
|
-
onClick: (
|
|
27442
|
+
onClick: (_e) => Z(ce.subject)
|
|
27443
27443
|
}, [
|
|
27444
27444
|
E("div", aL, [
|
|
27445
27445
|
Y(Fe, {
|
|
@@ -27452,26 +27452,26 @@ const RT = {
|
|
|
27452
27452
|
}, te(u(i).t(Q[ce.verb])), 3)
|
|
27453
27453
|
]),
|
|
27454
27454
|
ce.fields.length ? (R(), P("ul", rL, [
|
|
27455
|
-
(R(!0), P(Ne, null, Xe(ce.fields, (
|
|
27455
|
+
(R(!0), P(Ne, null, Xe(ce.fields, (_e, Ke) => (R(), P("li", {
|
|
27456
27456
|
key: Ke,
|
|
27457
27457
|
class: "em-history__field"
|
|
27458
27458
|
}, [
|
|
27459
|
-
E("span", lL, te(
|
|
27460
|
-
|
|
27461
|
-
|
|
27459
|
+
E("span", lL, te(_e.field), 1),
|
|
27460
|
+
_e.oldValue !== void 0 ? (R(), P("span", cL, te(me(_e.oldValue)), 1)) : ue("", !0),
|
|
27461
|
+
_e.oldValue !== void 0 ? (R(), We(Fe, {
|
|
27462
27462
|
key: 1,
|
|
27463
27463
|
name: "arrow-lr",
|
|
27464
27464
|
size: 10,
|
|
27465
27465
|
class: "em-history__arrow"
|
|
27466
27466
|
})) : ue("", !0),
|
|
27467
|
-
E("span", dL, te(me(
|
|
27467
|
+
E("span", dL, te(me(_e.value)), 1)
|
|
27468
27468
|
]))), 128))
|
|
27469
27469
|
])) : ue("", !0)
|
|
27470
27470
|
], 10, iL))), 128))
|
|
27471
27471
|
])) : (R(), P("p", nL, te(u(i).t("em.history.diff.empty")), 1))
|
|
27472
27472
|
], 64)) : s.value && !l.value ? (R(), P("p", uL, te(u(i).t("em.history.loading")), 1)) : r.value ? (R(), P("p", mL, te(r.value), 1)) : F.value.length === 0 ? (R(), P("p", fL, te(l.value ? u(i).t("em.history.emptyLoaded") : u(i).t("em.history.emptyNotLoaded")), 1)) : (R(), P("ul", pL, [
|
|
27473
27473
|
(R(!0), P(Ne, null, Xe(ee.value, (ce) => {
|
|
27474
|
-
var
|
|
27474
|
+
var be, _e, Ke;
|
|
27475
27475
|
return R(), P("li", {
|
|
27476
27476
|
key: ce.seq,
|
|
27477
27477
|
class: Ae(["em-history__group", [`is-${ce.kind ?? "edit"}`]])
|
|
@@ -27544,7 +27544,7 @@ const RT = {
|
|
|
27544
27544
|
E("button", {
|
|
27545
27545
|
type: "button",
|
|
27546
27546
|
class: "em-history__preview-toggle",
|
|
27547
|
-
disabled: !((
|
|
27547
|
+
disabled: !((be = et.value) != null && be.entries.length),
|
|
27548
27548
|
onClick: q[7] || (q[7] = (De) => qe.value = !qe.value)
|
|
27549
27549
|
}, [
|
|
27550
27550
|
Y(Fe, {
|
|
@@ -27552,7 +27552,7 @@ const RT = {
|
|
|
27552
27552
|
size: 11,
|
|
27553
27553
|
class: Ae(["em-history__chevron", { "is-open": qe.value }])
|
|
27554
27554
|
}, null, 8, ["class"]),
|
|
27555
|
-
rn(" " + te((
|
|
27555
|
+
rn(" " + te((_e = et.value) != null && _e.entries.length ? u(i).t("em.history.diff.restorePreview", { n: et.value.entries.length }) : u(i).t("em.history.diff.restorePreviewNone")), 1)
|
|
27556
27556
|
], 8, SL),
|
|
27557
27557
|
qe.value && ((Ke = et.value) != null && Ke.entries.length) ? (R(), P("ul", TL, [
|
|
27558
27558
|
(R(!0), P(Ne, null, Xe(et.value.entries, (De, Be) => (R(), P("li", {
|