@g1cloud/entity-modeler-next 5.1.0 → 5.1.1

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.
@@ -403,14 +403,34 @@ function hy(e, t) {
403
403
  return i.join(`
404
404
  `).trim();
405
405
  }
406
- const yy = (e) => e && e[0].toLowerCase() + e.slice(1);
406
+ function Ei(e) {
407
+ return e.referenceOnly === !0;
408
+ }
409
+ function Sl(e) {
410
+ const t = /* @__PURE__ */ new Set();
411
+ for (const n of e.entities) Ei(n) && t.add(n.modelId);
412
+ return t;
413
+ }
414
+ function Hu(e) {
415
+ return e.entities.filter((t) => !Ei(t));
416
+ }
417
+ function zu(e, t = Sl(e)) {
418
+ return t.size === 0 ? e.associations : e.associations.filter((n) => !t.has(n.end1.entityRef) && !t.has(n.end2.entityRef));
419
+ }
420
+ function Fu(e, t) {
421
+ return t ? { ...e, entities: e.entities.map((n) => n.referenceOnly ? n : { ...n, referenceOnly: !0 }) } : e;
422
+ }
423
+ function yy(e, t) {
424
+ return Ei(e) || t === !0;
425
+ }
426
+ const vy = (e) => e && e[0].toLowerCase() + e.slice(1);
407
427
  function zs(e) {
408
428
  return e === "ZERO_OR_MORE_INSTANCES" || e === "ONE_OR_MORE_INSTANCES";
409
429
  }
410
- function Hu(e) {
430
+ function ju(e) {
411
431
  return e !== "EXACTLY_ONE_INSTANCE" && e !== "ONE_OR_MORE_INSTANCES";
412
432
  }
413
- function Sl(e) {
433
+ function Tl(e) {
414
434
  switch (e) {
415
435
  case "NO_INSTANCE_OR_ONE_INSTANCE":
416
436
  return "0..1";
@@ -422,12 +442,12 @@ function Sl(e) {
422
442
  return "1..*";
423
443
  }
424
444
  }
425
- function vy(e) {
445
+ function gy(e) {
426
446
  return /[^aeiou]y$/.test(e) ? `${e.slice(0, -1)}ies` : /(s|x|z|ch|sh)$/.test(e) ? `${e}es` : `${e}s`;
427
447
  }
428
448
  function Fs(e, t) {
429
- const n = yy(e);
430
- return t ? vy(n) : n;
449
+ const n = vy(e);
450
+ return t ? gy(n) : n;
431
451
  }
432
452
  function si(e, t) {
433
453
  if (!t.has(e)) return e;
@@ -436,26 +456,6 @@ function si(e, t) {
436
456
  if (!t.has(o)) return o;
437
457
  }
438
458
  }
439
- function Ei(e) {
440
- return e.referenceOnly === !0;
441
- }
442
- function Tl(e) {
443
- const t = /* @__PURE__ */ new Set();
444
- for (const n of e.entities) Ei(n) && t.add(n.modelId);
445
- return t;
446
- }
447
- function zu(e) {
448
- return e.entities.filter((t) => !Ei(t));
449
- }
450
- function Fu(e, t = Tl(e)) {
451
- return t.size === 0 ? e.associations : e.associations.filter((n) => !t.has(n.end1.entityRef) && !t.has(n.end2.entityRef));
452
- }
453
- function ju(e, t) {
454
- return t ? { ...e, entities: e.entities.map((n) => n.referenceOnly ? n : { ...n, referenceOnly: !0 }) } : e;
455
- }
456
- function gy(e, t) {
457
- return Ei(e) || t === !0;
458
- }
459
459
  function QP(e) {
460
460
  return e === "CLASS" ? "class" : "er";
461
461
  }
@@ -464,8 +464,8 @@ function xd(e, t, n) {
464
464
  return t === "class" ? Ry(o) : Ey(o, n);
465
465
  }
466
466
  function by(e) {
467
- const t = Tl(e);
468
- return t.size === 0 ? e : { ...e, entities: zu(e), associations: Fu(e, t) };
467
+ const t = Sl(e);
468
+ return t.size === 0 ? e : { ...e, entities: Hu(e), associations: zu(e, t) };
469
469
  }
470
470
  function Wi(e, t) {
471
471
  return (e ?? "").trim().replace(/[^0-9A-Za-z_]/g, "_").replace(/^(\d)/, "_$1") || t;
@@ -485,7 +485,7 @@ function Gu(e, t) {
485
485
  function _y(e) {
486
486
  return e.attrType === "RELATION_OWN" || e.attrType === "RELATION_REF" || e.derivedFrom != null;
487
487
  }
488
- const Rd = Sl;
488
+ const Rd = Tl;
489
489
  function Kr(e) {
490
490
  return e != null && Ku[e] != null;
491
491
  }
@@ -1524,7 +1524,7 @@ function am(e, t) {
1524
1524
  const n = e.entities.find((r) => r.modelId === t.end1.entityRef);
1525
1525
  if (!n) return [];
1526
1526
  if (n.stereotype === "JPA_EMBEDDABLE") return [];
1527
- const o = t.end1.entityRef === t.end2.entityRef, i = o ? !1 : t.identifying === !0, a = i || !o && !Hu(t.end1.multiplicity);
1527
+ const o = t.end1.entityRef === t.end2.entityRef, i = o ? !1 : t.identifying === !0, a = i || !o && !ju(t.end1.multiplicity);
1528
1528
  return n.attributes.filter((r) => r.identifier && (r.attrType === "NORMAL" || r.attrType === "RELATION_OWN")).sort((r, l) => r.order - l.order).map((r) => {
1529
1529
  const l = gv(n.name, r.name);
1530
1530
  return {
@@ -1772,7 +1772,7 @@ function hr(e, t) {
1772
1772
  }
1773
1773
  function yr(e, t) {
1774
1774
  var u, p, f, h, v, _, k, g, b;
1775
- const n = [], o = new Map(e.entities.map((w) => [w.modelId, w])), i = new Map(e.associations.map((w) => [w.modelId, w])), a = Tl(e), s = a.size === 0 ? e.entities : zu(e), r = Fu(e, a);
1775
+ const n = [], o = new Map(e.entities.map((w) => [w.modelId, w])), i = new Map(e.associations.map((w) => [w.modelId, w])), a = Sl(e), s = a.size === 0 ? e.entities : Hu(e), r = zu(e, a);
1776
1776
  for (const w of Md(s, (I) => I.name))
1777
1777
  for (const I of w) {
1778
1778
  const T = w.filter((A) => A !== I), O = Sd(I) && T.some(Sd), H = T.some((A) => !hv(I, A, e));
@@ -7180,7 +7180,7 @@ function Af(e, t) {
7180
7180
  if (!a) continue;
7181
7181
  const s = n.get(i.end1.entityRef);
7182
7182
  if ((s == null ? void 0 : s.stereotype) === "JPA_EMBEDDABLE") continue;
7183
- const r = i.end1.entityRef === i.end2.entityRef, l = i.identifying === !0 || !r && !Hu(i.end1.multiplicity);
7183
+ const r = i.end1.entityRef === i.end2.entityRef, l = i.identifying === !0 || !r && !ju(i.end1.multiplicity);
7184
7184
  for (const d of a.attributes)
7185
7185
  !d.attrType.startsWith("RELATION") || d.dbAttrs.length === 0 || !(((o = d.derivedFrom) == null ? void 0 : o.associationRef) === i.modelId || !d.derivedFrom && d.modelId === i.end2.attributeRef) || (d.notNull = l);
7186
7186
  }
@@ -19886,7 +19886,7 @@ function f3(e = VA(), t = {}) {
19886
19886
  embeddableCatalog: i.value,
19887
19887
  // CHK-DSN-5(dangling 인덱스 대상) 상속 컬럼 화이트리스트 출처. 빈 배열이면 상속 컬럼 미인지(로컬만 유효).
19888
19888
  superClassCatalog: r.value
19889
- })), De = () => ju(n.logical, A.value), ye = t.validationDebounceMs ?? 250;
19889
+ })), De = () => Fu(n.logical, A.value), ye = t.validationDebounceMs ?? 250;
19890
19890
  let _e, de = () => {
19891
19891
  };
19892
19892
  if (ye > 0) {
@@ -20414,7 +20414,7 @@ const th = Symbol("embedSlotCollapse"), Kc = (e, t) => `${e}:${t}`, nh = "all:",
20414
20414
  }
20415
20415
  const S = z(
20416
20416
  () => !!l && l.active.value && !l.relatedEntityIds.value.has(t.id) && !I.value
20417
- ), M = z(() => t.data.entity), V = z(() => gy(M.value, n == null ? void 0 : n.referenceOnlyDocument.value)), U = z(
20417
+ ), M = z(() => t.data.entity), V = z(() => yy(M.value, n == null ? void 0 : n.referenceOnlyDocument.value)), U = z(
20418
20418
  () => [...M.value.attributes].sort((C, $) => C.order - $.order)
20419
20419
  ), y = z(() => t.data.displayMode ?? "LOGICAL_PHYSICAL"), E = z(() => t.data.collapsed ?? !1), R = z(() => t.data.locked ?? !1), D = z(() => v.value && !R.value);
20420
20420
  function B() {
@@ -21458,7 +21458,7 @@ const td = Symbol("waypointController"), jC = ["d"], GC = ["d"], KC = ["d"], YC
21458
21458
  waypoints: () => v.value,
21459
21459
  sourceRowY: () => t.data.sourceColumnRef && !_.value ? t.sourceY : void 0,
21460
21460
  targetRowY: () => t.data.targetColumnRef && !k.value ? t.targetY : void 0
21461
- }), O = HC + 4, H = z(() => T.value ? OC(g.value, b.value) : (i == null ? void 0 : i.routingMode.value) === "orthogonal" ? ah(g.value, w.value, v.value, b.value, I.value, O) : rh(g.value, v.value, b.value)), A = z(() => T.value || !a.value ? [] : (i == null ? void 0 : i.routingMode.value) === "orthogonal" ? sh(g.value, w.value, v.value, b.value, I.value, O) : lh(g.value, v.value, b.value).map((de, pe) => ({ point: de, segIndex: pe }))), S = z(() => T.value || !a.value ? [] : v.value), M = Sl;
21461
+ }), O = HC + 4, H = z(() => T.value ? OC(g.value, b.value) : (i == null ? void 0 : i.routingMode.value) === "orthogonal" ? ah(g.value, w.value, v.value, b.value, I.value, O) : rh(g.value, v.value, b.value)), A = z(() => T.value || !a.value ? [] : (i == null ? void 0 : i.routingMode.value) === "orthogonal" ? sh(g.value, w.value, v.value, b.value, I.value, O) : lh(g.value, v.value, b.value).map((de, pe) => ({ point: de, segIndex: pe }))), S = z(() => T.value || !a.value ? [] : v.value), M = Tl;
21462
21462
  function V(de, pe) {
21463
21463
  f.value = de, h.value = { ...p.value[de] }, pe.target.setPointerCapture(pe.pointerId), pe.stopPropagation();
21464
21464
  }
@@ -26504,7 +26504,7 @@ const _M = {
26504
26504
  d.value ? o.expandAll() : o.collapseAll();
26505
26505
  }
26506
26506
  function u() {
26507
- const h = ju(o.state.logical, o.referenceOnlyDocument.value);
26507
+ const h = Fu(o.state.logical, o.referenceOnlyDocument.value);
26508
26508
  a.openModal({
26509
26509
  component: QM,
26510
26510
  bind: {
@@ -28122,7 +28122,7 @@ const _M = {
28122
28122
  "model-value": g.value[ne].multiplicity,
28123
28123
  items: O,
28124
28124
  "value-provider": E,
28125
- "label-provider": m(Sl),
28125
+ "label-provider": m(Tl),
28126
28126
  "onUpdate:modelValue": (se) => B(ne, { multiplicity: se })
28127
28127
  }, null, 8, ["model-value", "label-provider", "onUpdate:modelValue"])
28128
28128
  ]),
@@ -29236,6 +29236,7 @@ export {
29236
29236
  Dg as SYMBOLIC_OP_KINDS,
29237
29237
  Ib as SYMBOLIC_OP_SCHEMA,
29238
29238
  m3 as UI_LOCALES,
29239
+ Fu as applyDocumentReferenceOnly,
29239
29240
  l3 as buildAgentBatch,
29240
29241
  Fh as buildDiagramSvg,
29241
29242
  Ng as buildDiffMarks,
@@ -29262,7 +29263,7 @@ export {
29262
29263
  ig as mergeDiagram,
29263
29264
  Gy as mermaidErToImportSource,
29264
29265
  n3 as migrateLegacyMoney,
29265
- Sl as multiplicityLabel,
29266
+ Tl as multiplicityLabel,
29266
29267
  Ge as newId,
29267
29268
  Tu as packEntityBoxes,
29268
29269
  lv as parseDiagramJson,