@g1cloud/entity-modeler-next 5.0.6 → 5.0.7

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.
@@ -4178,7 +4178,7 @@ function Dl(e, t, n) {
4178
4178
  apply(i) {
4179
4179
  const a = Rt(i, e);
4180
4180
  o = a.attributes.map((r) => ({ ...r }));
4181
- const s = Ol(a.attributes, t, n);
4181
+ const s = Ol([...a.attributes].sort((r, l) => r.order - l.order), t, n);
4182
4182
  a.attributes.splice(0, a.attributes.length, ...s), a.attributes.forEach((r, l) => r.order = l);
4183
4183
  },
4184
4184
  invert(i) {
@@ -4267,7 +4267,7 @@ function Mm(e, t, n) {
4267
4267
  apply(i) {
4268
4268
  const a = Rt(i, e), s = a.operations ?? [];
4269
4269
  o = s.map((l) => ({ ...l }));
4270
- const r = Ol(s, t, n);
4270
+ const r = Ol([...s].sort((l, d) => l.order - d.order), t, n);
4271
4271
  s.splice(0, s.length, ...r), s.forEach((l, d) => l.order = d), a.operations = s;
4272
4272
  },
4273
4273
  invert(i) {
@@ -6088,7 +6088,9 @@ function UP(e, t, n = {}) {
6088
6088
  $.add(V.value.modelId), P.push(V.value);
6089
6089
  }
6090
6090
  if (N) break;
6091
- const w = (R ? T.value.attributes : T.value.operations ?? []).filter((A) => !$.has(A.modelId)), E = [...P, ...w];
6091
+ const w = [
6092
+ ...R ? T.value.attributes : T.value.operations ?? []
6093
+ ].sort((A, V) => A.order - V.order).filter((A) => !$.has(A.modelId)), E = [...P, ...w];
6092
6094
  if (E.forEach((A, V) => {
6093
6095
  A.order !== V && s.push(
6094
6096
  R ? { kind: "attribute.update", casUnit: "logical", containerRef: T.value.modelId, entityRef: T.value.modelId, attributeRef: A.modelId, patch: { order: V } } : { kind: "operation.update", casUnit: "logical", containerRef: T.value.modelId, entityRef: T.value.modelId, operationRef: A.modelId, patch: { order: V } }
@@ -18547,7 +18549,11 @@ function Pi(e, t, n) {
18547
18549
  function iR(e, t, n, o) {
18548
18550
  const i = e.entities.find((s) => s.modelId === t);
18549
18551
  if (!i) return [];
18550
- const a = Ol(i.attributes, n, o).map((s) => s.modelId);
18552
+ const a = Ol(
18553
+ [...i.attributes].sort((s, r) => s.order - r.order),
18554
+ n,
18555
+ o
18556
+ ).map((s) => s.modelId);
18551
18557
  return sf(e, t, a).map(
18552
18558
  (s) => Yn(s.entityId, s.attributeId, { dbAttrs: s.dbAttrs })
18553
18559
  );