@elyx-code/project-logic-tree 0.0.6950 → 0.0.6952
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/index.cjs +3 -3
- package/dist/index.js +1204 -430
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -180257,7 +180257,9 @@ const Ni = class Ni extends nn {
|
|
|
180257
180257
|
e
|
|
180258
180258
|
);
|
|
180259
180259
|
let h = null;
|
|
180260
|
-
i.entity && (h = r.get(
|
|
180260
|
+
i.entity && (h = r.get(
|
|
180261
|
+
i.entity
|
|
180262
|
+
));
|
|
180261
180263
|
let m = null;
|
|
180262
180264
|
i.foreignKeyRef && (m = r.get(
|
|
180263
180265
|
i.foreignKeyRef
|
|
@@ -180303,7 +180305,10 @@ const Ni = class Ni extends nn {
|
|
|
180303
180305
|
let a = JSON.parse(
|
|
180304
180306
|
JSON.stringify(i)
|
|
180305
180307
|
);
|
|
180306
|
-
const c = [], e = [], f = xRi(
|
|
180308
|
+
const c = [], e = [], f = xRi(
|
|
180309
|
+
a,
|
|
180310
|
+
r
|
|
180311
|
+
), h = an(
|
|
180307
180312
|
a
|
|
180308
180313
|
);
|
|
180309
180314
|
if (e.push(
|
|
@@ -180329,7 +180334,9 @@ const Ni = class Ni extends nn {
|
|
|
180329
180334
|
);
|
|
180330
180335
|
if (N.length) {
|
|
180331
180336
|
const V = N.length > 1 ? `entities with ids '${At(
|
|
180332
|
-
N.map(
|
|
180337
|
+
N.map(
|
|
180338
|
+
(B) => B.id
|
|
180339
|
+
),
|
|
180333
180340
|
"', '",
|
|
180334
180341
|
"' and '"
|
|
180335
180342
|
)}'` : `entity with id '${N[0].id}'`;
|
|
@@ -180352,7 +180359,9 @@ const Ni = class Ni extends nn {
|
|
|
180352
180359
|
}
|
|
180353
180360
|
const m = a.parent && r.get(
|
|
180354
180361
|
a.parent
|
|
180355
|
-
) || r.getBuiltIn(
|
|
180362
|
+
) || r.getBuiltIn(
|
|
180363
|
+
a.parent
|
|
180364
|
+
), b = m ? sp(m) : null;
|
|
180356
180365
|
if (b)
|
|
180357
180366
|
e.push(
|
|
180358
180367
|
new De({
|
|
@@ -180447,9 +180456,10 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180447
180456
|
// Therefore it is a data type whose structure is could still need to be inferred
|
|
180448
180457
|
// When a data type belong to a built in entity, it is considered resolved
|
|
180449
180458
|
get isResolved() {
|
|
180450
|
-
return [
|
|
180451
|
-
|
|
180452
|
-
|
|
180459
|
+
return [
|
|
180460
|
+
d.BuiltInBaseEntity,
|
|
180461
|
+
d.ActionDescriptor
|
|
180462
|
+
].includes(this.parent.type) || sp(this.parent) ? !0 : !(!this.entity && !this.isGroup && !this.foreignKeyRef && !this.foreignKeyAllowed);
|
|
180453
180463
|
}
|
|
180454
180464
|
validateGeneratedUpdate(i) {
|
|
180455
180465
|
return { errors: [], explanations: [], modifiedData: i };
|
|
@@ -180482,9 +180492,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180482
180492
|
const h = f.entity.afterAllChildrenInitialized(i);
|
|
180483
180493
|
r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
|
|
180484
180494
|
}), i == null || i.attemptAutoclose("sync-dependents", this.id), {
|
|
180485
|
-
updated: C(
|
|
180486
|
-
|
|
180487
|
-
|
|
180495
|
+
updated: C(
|
|
180496
|
+
r
|
|
180497
|
+
),
|
|
180498
|
+
added: C(
|
|
180499
|
+
a
|
|
180500
|
+
),
|
|
180501
|
+
removed: C(
|
|
180502
|
+
c
|
|
180503
|
+
),
|
|
180488
180504
|
affected: C(
|
|
180489
180505
|
e
|
|
180490
180506
|
),
|
|
@@ -180496,9 +180512,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180496
180512
|
onDetachedDependencyRemoved(i, r, a) {
|
|
180497
180513
|
const c = [], e = [], f = [], h = [];
|
|
180498
180514
|
return r === "entity-field" && this.setEntity(null, a), r === "foreign-key-ref-field" && this.setForeignKeyRef(null, a), {
|
|
180499
|
-
updated: C(
|
|
180500
|
-
|
|
180501
|
-
|
|
180515
|
+
updated: C(
|
|
180516
|
+
c
|
|
180517
|
+
),
|
|
180518
|
+
added: C(
|
|
180519
|
+
e
|
|
180520
|
+
),
|
|
180521
|
+
removed: C(
|
|
180522
|
+
f
|
|
180523
|
+
),
|
|
180502
180524
|
affected: C(
|
|
180503
180525
|
h
|
|
180504
180526
|
),
|
|
@@ -180513,9 +180535,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180513
180535
|
i,
|
|
180514
180536
|
a
|
|
180515
180537
|
), r === "foreign-key-ref-field" && this.setForeignKeyRef(i, a), {
|
|
180516
|
-
updated: C(
|
|
180517
|
-
|
|
180518
|
-
|
|
180538
|
+
updated: C(
|
|
180539
|
+
c
|
|
180540
|
+
),
|
|
180541
|
+
added: C(
|
|
180542
|
+
e
|
|
180543
|
+
),
|
|
180544
|
+
removed: C(
|
|
180545
|
+
f
|
|
180546
|
+
),
|
|
180519
180547
|
affected: C(
|
|
180520
180548
|
h
|
|
180521
180549
|
),
|
|
@@ -180530,13 +180558,16 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180530
180558
|
field: "entity-field"
|
|
180531
180559
|
/* EntityField */
|
|
180532
180560
|
}
|
|
180533
|
-
]), (c = (a = this.foreignKeyRef) == null ? void 0 : a.unsubscribeDependents) == null || c.call(
|
|
180534
|
-
|
|
180535
|
-
|
|
180536
|
-
|
|
180537
|
-
|
|
180538
|
-
|
|
180539
|
-
|
|
180561
|
+
]), (c = (a = this.foreignKeyRef) == null ? void 0 : a.unsubscribeDependents) == null || c.call(
|
|
180562
|
+
a,
|
|
180563
|
+
[
|
|
180564
|
+
{
|
|
180565
|
+
entity: this,
|
|
180566
|
+
field: "foreign-key-ref-field"
|
|
180567
|
+
/* ForeignKeyRefField */
|
|
180568
|
+
}
|
|
180569
|
+
]
|
|
180570
|
+
), this;
|
|
180540
180571
|
}
|
|
180541
180572
|
// Calls the 'subscribeDependents' method with itself as the only argument on any dependencies the current entity has
|
|
180542
180573
|
// It could be multiple
|
|
@@ -180593,7 +180624,10 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180593
180624
|
return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
|
|
180594
180625
|
}
|
|
180595
180626
|
snapshot() {
|
|
180596
|
-
const i = new Ni(
|
|
180627
|
+
const i = new Ni(
|
|
180628
|
+
this,
|
|
180629
|
+
this.project
|
|
180630
|
+
);
|
|
180597
180631
|
return this.apply(i);
|
|
180598
180632
|
}
|
|
180599
180633
|
/**
|
|
@@ -180616,9 +180650,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180616
180650
|
r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
|
|
180617
180651
|
}
|
|
180618
180652
|
return {
|
|
180619
|
-
updated: C(
|
|
180620
|
-
|
|
180621
|
-
|
|
180653
|
+
updated: C(
|
|
180654
|
+
r
|
|
180655
|
+
),
|
|
180656
|
+
added: C(
|
|
180657
|
+
a
|
|
180658
|
+
),
|
|
180659
|
+
removed: C(
|
|
180660
|
+
c
|
|
180661
|
+
),
|
|
180622
180662
|
affected: C(
|
|
180623
180663
|
e
|
|
180624
180664
|
),
|
|
@@ -180641,7 +180681,9 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180641
180681
|
updated: C(
|
|
180642
180682
|
a
|
|
180643
180683
|
),
|
|
180644
|
-
added: C(
|
|
180684
|
+
added: C(
|
|
180685
|
+
c
|
|
180686
|
+
),
|
|
180645
180687
|
removed: C(
|
|
180646
180688
|
e
|
|
180647
180689
|
),
|
|
@@ -180677,9 +180719,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180677
180719
|
);
|
|
180678
180720
|
}
|
|
180679
180721
|
return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.entity = h.entity, this.foreignKeyRef = h.foreignKeyRef, this.andChildrenGroup = h.andChildrenGroup ? [...h.andChildrenGroup] : null, this.orChildrenGroup = h.orChildrenGroup ? [...h.orChildrenGroup] : null, this.parent = h.parent, {
|
|
180680
|
-
updated: C(
|
|
180681
|
-
|
|
180682
|
-
|
|
180722
|
+
updated: C(
|
|
180723
|
+
a
|
|
180724
|
+
),
|
|
180725
|
+
added: C(
|
|
180726
|
+
c
|
|
180727
|
+
),
|
|
180728
|
+
removed: C(
|
|
180729
|
+
e
|
|
180730
|
+
),
|
|
180683
180731
|
affected: C(
|
|
180684
180732
|
f
|
|
180685
180733
|
),
|
|
@@ -180721,7 +180769,9 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180721
180769
|
throw r == null || r.attemptAutoclose(
|
|
180722
180770
|
D.UpdateWithShallowTransfer,
|
|
180723
180771
|
this.id
|
|
180724
|
-
), new Error(
|
|
180772
|
+
), new Error(
|
|
180773
|
+
`${this.type} with id '${this.id}' must have a 'parent'`
|
|
180774
|
+
);
|
|
180725
180775
|
if (i.entity) {
|
|
180726
180776
|
const e = te(i.entity), f = this.project.get(e);
|
|
180727
180777
|
f && (this.setEntity(f, r), this.metaSync({ inferred: !1 }, r));
|
|
@@ -180737,7 +180787,9 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180737
180787
|
} else
|
|
180738
180788
|
this.setForeignKeyRef(null, r);
|
|
180739
180789
|
return (a = i.andChildrenGroup) == null || a.forEach((e) => {
|
|
180740
|
-
const f = te(e), h = this.project.get(
|
|
180790
|
+
const f = te(e), h = this.project.get(
|
|
180791
|
+
f
|
|
180792
|
+
);
|
|
180741
180793
|
h && (this.addToAndGroup(h, r), h.setParent(this, r));
|
|
180742
180794
|
}), [...this.andChildrenGroup || []].forEach((e) => {
|
|
180743
180795
|
var h;
|
|
@@ -180745,7 +180797,9 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180745
180797
|
(m) => te(m) === e.id
|
|
180746
180798
|
)) || (this.removeChildGroup(e, r), e.removeFromParent(r));
|
|
180747
180799
|
}), (c = i.orChildrenGroup) == null || c.forEach((e) => {
|
|
180748
|
-
const f = te(e), h = this.project.get(
|
|
180800
|
+
const f = te(e), h = this.project.get(
|
|
180801
|
+
f
|
|
180802
|
+
);
|
|
180749
180803
|
h && (this.addToOrGroup(h, r), h.setParent(this, r));
|
|
180750
180804
|
}), [...this.orChildrenGroup || []].forEach((e) => {
|
|
180751
180805
|
var h;
|
|
@@ -180832,11 +180886,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180832
180886
|
`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
|
|
180833
180887
|
);
|
|
180834
180888
|
} else
|
|
180835
|
-
throw new Error(
|
|
180889
|
+
throw new Error(
|
|
180890
|
+
`${this.type} with id '${this.id}' must have a 'parent'`
|
|
180891
|
+
);
|
|
180836
180892
|
if (this.initialData.entity) {
|
|
180837
180893
|
const e = te(
|
|
180838
180894
|
this.initialData.entity
|
|
180839
|
-
), f = this.project.get(
|
|
180895
|
+
), f = this.project.get(
|
|
180896
|
+
e
|
|
180897
|
+
);
|
|
180840
180898
|
f && (f.type === d.DefinitionEntity && f.parent === this || (this.setEntity(f, null), f.type !== d.BuiltInBaseEntity && f.type !== d.PrimitiveEntity && i.push(f)));
|
|
180841
180899
|
}
|
|
180842
180900
|
if (this.initialData.foreignKeyRef) {
|
|
@@ -180848,9 +180906,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180848
180906
|
f && this.setForeignKeyRef(f, null);
|
|
180849
180907
|
}
|
|
180850
180908
|
return {
|
|
180851
|
-
updated: C(
|
|
180852
|
-
|
|
180853
|
-
|
|
180909
|
+
updated: C(
|
|
180910
|
+
i
|
|
180911
|
+
),
|
|
180912
|
+
added: C(
|
|
180913
|
+
r
|
|
180914
|
+
),
|
|
180915
|
+
removed: C(
|
|
180916
|
+
a
|
|
180917
|
+
),
|
|
180854
180918
|
affected: C(
|
|
180855
180919
|
c
|
|
180856
180920
|
),
|
|
@@ -180896,13 +180960,23 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180896
180960
|
i
|
|
180897
180961
|
);
|
|
180898
180962
|
}
|
|
180899
|
-
return (h = this.andChildrenGroup) != null && h.length && this.andChildrenGroup.sort(
|
|
180963
|
+
return (h = this.andChildrenGroup) != null && h.length && this.andChildrenGroup.sort(
|
|
180964
|
+
(A, _) => (A.index || 0) - (_.index || 0)
|
|
180965
|
+
), (m = this.orChildrenGroup) != null && m.length && this.orChildrenGroup.sort(
|
|
180966
|
+
(A, _) => (A.index || 0) - (_.index || 0)
|
|
180967
|
+
), this.entity && this.entity.type === d.DefinitionEntity && ((b = this.entity.parent) == null ? void 0 : b.id) !== this.id && this.metaSync({ inferred: !1 }, i), this.bestEffortClearIncompatibleProperties(i), this.entity && this.entity.type === d.DefinitionEntity && ((E = this.entity.parent) == null ? void 0 : E.id) === this.id && this.entity.afterAllChildrenInitialized(i), i == null || i.attemptAutoclose(
|
|
180900
180968
|
D.AfterAllChildrenInitialized,
|
|
180901
180969
|
this.id
|
|
180902
180970
|
), {
|
|
180903
|
-
updated: C(
|
|
180904
|
-
|
|
180905
|
-
|
|
180971
|
+
updated: C(
|
|
180972
|
+
r
|
|
180973
|
+
),
|
|
180974
|
+
added: C(
|
|
180975
|
+
a
|
|
180976
|
+
),
|
|
180977
|
+
removed: C(
|
|
180978
|
+
c
|
|
180979
|
+
),
|
|
180906
180980
|
affected: C(
|
|
180907
180981
|
e
|
|
180908
180982
|
),
|
|
@@ -180922,9 +180996,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180922
180996
|
)) {
|
|
180923
180997
|
const r = [this], a = [], c = [], e = [];
|
|
180924
180998
|
return this.parent.type === d.DataType ? (this.parentRelationType === Je.AndDataTypeGroup ? this.parent.addToAndGroup(this, i) : this.parentRelationType === Je.OrDataTypeGroup && this.parent.addToOrGroup(this, i), e.push(this.parent)) : this.parent.type === d.DefinitionEntity ? (this.parent.setAdditionalPropertiesDataType(this, i), e.push(this.parent)) : this.parent.type !== d.BuiltInBaseEntity && this.parent.setDataType(this, i), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
|
|
180925
|
-
updated: C(
|
|
180926
|
-
|
|
180927
|
-
|
|
180999
|
+
updated: C(
|
|
181000
|
+
r
|
|
181001
|
+
),
|
|
181002
|
+
added: C(
|
|
181003
|
+
a
|
|
181004
|
+
),
|
|
181005
|
+
removed: C(
|
|
181006
|
+
c
|
|
181007
|
+
),
|
|
180928
181008
|
affected: C(
|
|
180929
181009
|
e
|
|
180930
181010
|
),
|
|
@@ -180981,7 +181061,10 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
180981
181061
|
this.orChildrenGroup.splice(a, 1), c.remove({ ignoreUpstream: !0 }, r);
|
|
180982
181062
|
}
|
|
180983
181063
|
}
|
|
180984
|
-
return r == null || r.attemptAutoclose(
|
|
181064
|
+
return r == null || r.attemptAutoclose(
|
|
181065
|
+
D.RemoveChildGroup,
|
|
181066
|
+
this.id
|
|
181067
|
+
), this;
|
|
180985
181068
|
}
|
|
180986
181069
|
initChildren(i = this.project.addChangeSet(
|
|
180987
181070
|
new Z(
|
|
@@ -181006,7 +181089,13 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181006
181089
|
this.entity = Re(
|
|
181007
181090
|
this.initialData.entity,
|
|
181008
181091
|
this.project
|
|
181009
|
-
), (((a = (r = this.initialData.entity) == null ? void 0 : r.parent) == null ? void 0 : a.id) === this.id || ((e = (c = this.initialData.entity) == null ? void 0 : c.parent) == null ? void 0 : e.type) === d.GenericReference && ((h = (f = this.initialData.entity) == null ? void 0 : f.parent) == null ? void 0 : h.entityId) == this.id) && this.entity.setParent(
|
|
181092
|
+
), (((a = (r = this.initialData.entity) == null ? void 0 : r.parent) == null ? void 0 : a.id) === this.id || ((e = (c = this.initialData.entity) == null ? void 0 : c.parent) == null ? void 0 : e.type) === d.GenericReference && ((h = (f = this.initialData.entity) == null ? void 0 : f.parent) == null ? void 0 : h.entityId) == this.id) && this.entity.setParent(
|
|
181093
|
+
this,
|
|
181094
|
+
null
|
|
181095
|
+
), (b = (m = this.entity).initChildren) == null || b.call(
|
|
181096
|
+
m,
|
|
181097
|
+
i
|
|
181098
|
+
);
|
|
181010
181099
|
if (this.initialData.foreignKeyRef)
|
|
181011
181100
|
if (this.initialData.foreignKeyRef.type === d.GenericReference) {
|
|
181012
181101
|
const _ = this.project.findSubscribedInstanceFromReference(
|
|
@@ -181018,19 +181107,23 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181018
181107
|
this.initialData.foreignKeyRef,
|
|
181019
181108
|
this.project
|
|
181020
181109
|
), (A = (E = this.foreignKeyRef).initChildren) == null || A.call(E, i);
|
|
181021
|
-
return this.initialData.andChildrenGroup && (this.andChildrenGroup = this.initialData.andChildrenGroup.map(
|
|
181022
|
-
|
|
181023
|
-
|
|
181024
|
-
|
|
181025
|
-
|
|
181026
|
-
|
|
181027
|
-
|
|
181028
|
-
|
|
181029
|
-
|
|
181030
|
-
|
|
181031
|
-
|
|
181032
|
-
|
|
181033
|
-
|
|
181110
|
+
return this.initialData.andChildrenGroup && (this.andChildrenGroup = this.initialData.andChildrenGroup.map(
|
|
181111
|
+
(_) => {
|
|
181112
|
+
const N = Re(
|
|
181113
|
+
_,
|
|
181114
|
+
this.project
|
|
181115
|
+
);
|
|
181116
|
+
return N.setParent(this, null), N.initChildren(i), N;
|
|
181117
|
+
}
|
|
181118
|
+
)), this.initialData.orChildrenGroup && (this.orChildrenGroup = this.initialData.orChildrenGroup.map(
|
|
181119
|
+
(_) => {
|
|
181120
|
+
const N = Re(
|
|
181121
|
+
_,
|
|
181122
|
+
this.project
|
|
181123
|
+
);
|
|
181124
|
+
return N.setParent(this, null), N.initChildren(i), N;
|
|
181125
|
+
}
|
|
181126
|
+
)), this.subscribeToDependencies(), this.afterAllChildrenInitialized(i), i == null || i.attemptAutoclose("init-children", this.id), this;
|
|
181034
181127
|
}
|
|
181035
181128
|
subscribe() {
|
|
181036
181129
|
var i;
|
|
@@ -181122,10 +181215,19 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181122
181215
|
const m = this.parent;
|
|
181123
181216
|
m == null || m.removeDataType(i);
|
|
181124
181217
|
}
|
|
181125
|
-
return this.parent && this.parent.type !== d.BuiltInBaseEntity && r.push(this.parent), i == null || i.attemptAutoclose(
|
|
181126
|
-
|
|
181127
|
-
|
|
181128
|
-
|
|
181218
|
+
return this.parent && this.parent.type !== d.BuiltInBaseEntity && r.push(this.parent), i == null || i.attemptAutoclose(
|
|
181219
|
+
D.RemoveFromParent,
|
|
181220
|
+
this.id
|
|
181221
|
+
), {
|
|
181222
|
+
added: C(
|
|
181223
|
+
c
|
|
181224
|
+
),
|
|
181225
|
+
updated: C(
|
|
181226
|
+
r
|
|
181227
|
+
),
|
|
181228
|
+
removed: C(
|
|
181229
|
+
a
|
|
181230
|
+
),
|
|
181129
181231
|
affected: C(
|
|
181130
181232
|
e
|
|
181131
181233
|
),
|
|
@@ -181151,7 +181253,10 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181151
181253
|
)) {
|
|
181152
181254
|
const a = [], c = [], e = [], f = [];
|
|
181153
181255
|
if (r != null && r.hasRemoved(this.id))
|
|
181154
|
-
return r == null || r.attemptAutoclose(
|
|
181256
|
+
return r == null || r.attemptAutoclose(
|
|
181257
|
+
D.RemoveEntity,
|
|
181258
|
+
this.id
|
|
181259
|
+
), {
|
|
181155
181260
|
added: [],
|
|
181156
181261
|
updated: [],
|
|
181157
181262
|
removed: [],
|
|
@@ -181195,9 +181300,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181195
181300
|
e.push(...h.added), a.push(...h.updated), c.push(...h.removed), f.push(...h.affected);
|
|
181196
181301
|
}
|
|
181197
181302
|
return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
|
|
181198
|
-
added: C(
|
|
181199
|
-
|
|
181200
|
-
|
|
181303
|
+
added: C(
|
|
181304
|
+
e
|
|
181305
|
+
),
|
|
181306
|
+
updated: C(
|
|
181307
|
+
a
|
|
181308
|
+
),
|
|
181309
|
+
removed: C(
|
|
181310
|
+
c
|
|
181311
|
+
),
|
|
181201
181312
|
affected: C(
|
|
181202
181313
|
f
|
|
181203
181314
|
),
|
|
@@ -181220,10 +181331,28 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181220
181331
|
if (!this.checkCanEdit(this, i))
|
|
181221
181332
|
return ce.warn(
|
|
181222
181333
|
`[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
181223
|
-
), i == null || i.attemptAutoclose(
|
|
181334
|
+
), i == null || i.attemptAutoclose(
|
|
181335
|
+
D.RestoreEntity,
|
|
181336
|
+
this.id
|
|
181337
|
+
), {
|
|
181338
|
+
added: [],
|
|
181339
|
+
updated: [],
|
|
181340
|
+
removed: [],
|
|
181341
|
+
affected: [],
|
|
181342
|
+
self: this
|
|
181343
|
+
};
|
|
181224
181344
|
const r = [], a = [], c = [], e = [];
|
|
181225
181345
|
if (i != null && i.hasAdded(this.id))
|
|
181226
|
-
return i == null || i.attemptAutoclose(
|
|
181346
|
+
return i == null || i.attemptAutoclose(
|
|
181347
|
+
D.RestoreEntity,
|
|
181348
|
+
this.id
|
|
181349
|
+
), {
|
|
181350
|
+
added: [],
|
|
181351
|
+
updated: [],
|
|
181352
|
+
removed: [],
|
|
181353
|
+
affected: [],
|
|
181354
|
+
self: this
|
|
181355
|
+
};
|
|
181227
181356
|
if (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
|
|
181228
181357
|
const {
|
|
181229
181358
|
updated: h,
|
|
@@ -181236,7 +181365,10 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181236
181365
|
);
|
|
181237
181366
|
a.push(...h), c.push(...m), r.push(...b);
|
|
181238
181367
|
}), this.entity && this.entity.type === d.DefinitionEntity && this.entity.parent === this) {
|
|
181239
|
-
const { updated: f } = this.entity.restore(
|
|
181368
|
+
const { updated: f } = this.entity.restore(
|
|
181369
|
+
{},
|
|
181370
|
+
i
|
|
181371
|
+
);
|
|
181240
181372
|
a.push(...f);
|
|
181241
181373
|
}
|
|
181242
181374
|
if (this.andChildrenGroup && this.andChildrenGroup.forEach((f) => {
|
|
@@ -181266,9 +181398,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181266
181398
|
f.setDataType(this, i), a.push(f);
|
|
181267
181399
|
}
|
|
181268
181400
|
return i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
|
|
181269
|
-
added: C(
|
|
181270
|
-
|
|
181271
|
-
|
|
181401
|
+
added: C(
|
|
181402
|
+
r
|
|
181403
|
+
),
|
|
181404
|
+
updated: C(
|
|
181405
|
+
a
|
|
181406
|
+
),
|
|
181407
|
+
removed: C(
|
|
181408
|
+
c
|
|
181409
|
+
),
|
|
181272
181410
|
affected: C(
|
|
181273
181411
|
e
|
|
181274
181412
|
),
|
|
@@ -181361,7 +181499,9 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181361
181499
|
)) || null,
|
|
181362
181500
|
entity: (
|
|
181363
181501
|
// @ts-ignore
|
|
181364
|
-
((e = this.entity) == null ? void 0 : e.parent) === this ? this.entity.toJSON(
|
|
181502
|
+
((e = this.entity) == null ? void 0 : e.parent) === this ? this.entity.toJSON(
|
|
181503
|
+
i
|
|
181504
|
+
) : ((f = this.entity) == null ? void 0 : f.toReference()) || null
|
|
181365
181505
|
),
|
|
181366
181506
|
parent: this.parent.toReference()
|
|
181367
181507
|
});
|
|
@@ -181369,7 +181509,11 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181369
181509
|
toJSONClone(i = lt) {
|
|
181370
181510
|
var a, c, e, f, h, m, b, E, A, _;
|
|
181371
181511
|
let r;
|
|
181372
|
-
return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || cn(
|
|
181512
|
+
return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || cn(
|
|
181513
|
+
this,
|
|
181514
|
+
this.project,
|
|
181515
|
+
i.uuidStrategy
|
|
181516
|
+
), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
|
|
181373
181517
|
id: r,
|
|
181374
181518
|
version: x.UUID.uuid(),
|
|
181375
181519
|
createdAt: i.timestamp || G().toISOString(),
|
|
@@ -181393,10 +181537,16 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181393
181537
|
actionEntities: this.actionEntities,
|
|
181394
181538
|
foreignKeyRef: ((m = this.foreignKeyRef) == null ? void 0 : m.toJSONClone({ ...i, newId: null })) || null,
|
|
181395
181539
|
andChildrenGroup: ((b = this.andChildrenGroup) == null ? void 0 : b.map(
|
|
181396
|
-
(N) => N.toJSONClone({
|
|
181540
|
+
(N) => N.toJSONClone({
|
|
181541
|
+
...i,
|
|
181542
|
+
newId: null
|
|
181543
|
+
})
|
|
181397
181544
|
)) || null,
|
|
181398
181545
|
orChildrenGroup: ((E = this.orChildrenGroup) == null ? void 0 : E.map(
|
|
181399
|
-
(N) => N.toJSONClone({
|
|
181546
|
+
(N) => N.toJSONClone({
|
|
181547
|
+
...i,
|
|
181548
|
+
newId: null
|
|
181549
|
+
})
|
|
181400
181550
|
)) || null,
|
|
181401
181551
|
// @ts-ignore
|
|
181402
181552
|
entity: (
|
|
@@ -181450,8 +181600,12 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181450
181600
|
interactiveEntities: this.interactiveEntities,
|
|
181451
181601
|
actionEntities: this.actionEntities,
|
|
181452
181602
|
foreignKeyRef: ((c = this.foreignKeyRef) == null ? void 0 : c.toReference(i)) || null,
|
|
181453
|
-
andChildrenGroup: ((e = this.andChildrenGroup) == null ? void 0 : e.map(
|
|
181454
|
-
|
|
181603
|
+
andChildrenGroup: ((e = this.andChildrenGroup) == null ? void 0 : e.map(
|
|
181604
|
+
(m) => m.toReference(i)
|
|
181605
|
+
)) || null,
|
|
181606
|
+
orChildrenGroup: ((f = this.orChildrenGroup) == null ? void 0 : f.map(
|
|
181607
|
+
(m) => m.toReference(i)
|
|
181608
|
+
)) || null,
|
|
181455
181609
|
entity: ((h = this.entity) == null ? void 0 : h.toReference(i)) || null,
|
|
181456
181610
|
parent: this.parent.toReference(i)
|
|
181457
181611
|
};
|
|
@@ -181608,7 +181762,10 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181608
181762
|
}
|
|
181609
181763
|
else if (this.entity) {
|
|
181610
181764
|
const M = e.get(this.entity.id) || e.getBuiltIn(this.entity.id);
|
|
181611
|
-
b.setEntity(
|
|
181765
|
+
b.setEntity(
|
|
181766
|
+
M,
|
|
181767
|
+
i
|
|
181768
|
+
);
|
|
181612
181769
|
}
|
|
181613
181770
|
return i || b.captureVersion(), i == null || i.attemptAutoclose(D.CloneEntity, this.id), b;
|
|
181614
181771
|
}
|
|
@@ -181633,7 +181790,10 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181633
181790
|
if (!this.checkCanEdit(this, r))
|
|
181634
181791
|
return ce.warn(
|
|
181635
181792
|
`[${D.MergeDataTypes}] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
181636
|
-
), r == null || r.attemptAutoclose(
|
|
181793
|
+
), r == null || r.attemptAutoclose(
|
|
181794
|
+
D.MergeDataTypes,
|
|
181795
|
+
this.id
|
|
181796
|
+
), {
|
|
181637
181797
|
added: [],
|
|
181638
181798
|
updated: [],
|
|
181639
181799
|
removed: [],
|
|
@@ -181662,7 +181822,9 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181662
181822
|
if (m.implementSource) {
|
|
181663
181823
|
if (((V = i == null ? void 0 : i.entity) == null ? void 0 : V.id) === ie["primitive-entity"].enum.id) {
|
|
181664
181824
|
const J = new Set(this.options || []);
|
|
181665
|
-
((i == null ? void 0 : i.options) || []).forEach(
|
|
181825
|
+
((i == null ? void 0 : i.options) || []).forEach(
|
|
181826
|
+
(ae) => J.add(ae)
|
|
181827
|
+
), this.metaSync(
|
|
181666
181828
|
{
|
|
181667
181829
|
options: Array.from(J)
|
|
181668
181830
|
},
|
|
@@ -181708,12 +181870,21 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181708
181870
|
like: i == null ? void 0 : i.like
|
|
181709
181871
|
},
|
|
181710
181872
|
r
|
|
181711
|
-
), c.push(this))), ((B = i == null ? void 0 : i.foreignKeyRef) == null ? void 0 : B.id) !== ((M = this.foreignKeyRef) == null ? void 0 : M.id) && (m.implementSource && this.foreignKeyRef ? si(
|
|
181873
|
+
), c.push(this))), ((B = i == null ? void 0 : i.foreignKeyRef) == null ? void 0 : B.id) !== ((M = this.foreignKeyRef) == null ? void 0 : M.id) && (m.implementSource && this.foreignKeyRef ? si(
|
|
181874
|
+
this,
|
|
181875
|
+
i
|
|
181876
|
+
).compatible || (this.setForeignKeyRef(
|
|
181877
|
+
(i == null ? void 0 : i.foreignKeyRef) || null,
|
|
181878
|
+
r
|
|
181879
|
+
), r == null || r.add(this, H.Updated), c.push(this), [
|
|
181712
181880
|
...this.andChildrenGroup || [],
|
|
181713
181881
|
...this.orChildrenGroup || []
|
|
181714
181882
|
].forEach((ae) => {
|
|
181715
181883
|
this.removeChildGroup(ae, r), f.push(ae);
|
|
181716
|
-
}), this.setEntity(null, r)) : (this.setForeignKeyRef(
|
|
181884
|
+
}), this.setEntity(null, r)) : (this.setForeignKeyRef(
|
|
181885
|
+
(i == null ? void 0 : i.foreignKeyRef) || null,
|
|
181886
|
+
r
|
|
181887
|
+
), r == null || r.add(this, H.Updated), c.push(this), [
|
|
181717
181888
|
...this.andChildrenGroup || [],
|
|
181718
181889
|
...this.orChildrenGroup || []
|
|
181719
181890
|
].forEach((J) => {
|
|
@@ -181773,10 +181944,18 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181773
181944
|
},
|
|
181774
181945
|
r
|
|
181775
181946
|
), c.push(this)));
|
|
181776
|
-
const _ = si(
|
|
181947
|
+
const _ = si(
|
|
181948
|
+
this,
|
|
181949
|
+
i
|
|
181950
|
+
);
|
|
181777
181951
|
if (m.implementSource && _.compatible && A)
|
|
181778
|
-
return r == null || r.attemptAutoclose(
|
|
181779
|
-
|
|
181952
|
+
return r == null || r.attemptAutoclose(
|
|
181953
|
+
D.MergeDataTypes,
|
|
181954
|
+
this.id
|
|
181955
|
+
), {
|
|
181956
|
+
added: C(
|
|
181957
|
+
e
|
|
181958
|
+
),
|
|
181780
181959
|
updated: C(
|
|
181781
181960
|
c
|
|
181782
181961
|
),
|
|
@@ -181797,17 +181976,28 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181797
181976
|
r
|
|
181798
181977
|
), J = !0, i.orChildrenGroup.find(
|
|
181799
181978
|
(ee) => si(this, ee).exact
|
|
181800
|
-
) || (this.orChildrenGroup = null, this.chooseOneFromOrGroupAndApply(
|
|
181801
|
-
|
|
181979
|
+
) || (this.orChildrenGroup = null, this.chooseOneFromOrGroupAndApply(
|
|
181980
|
+
i,
|
|
181981
|
+
r
|
|
181982
|
+
))), !J) {
|
|
181983
|
+
const ae = [
|
|
181984
|
+
...i == null ? void 0 : i.orChildrenGroup
|
|
181985
|
+
];
|
|
181802
181986
|
this.orChildrenGroup = this.orChildrenGroup || [];
|
|
181803
181987
|
const ee = [...this.orChildrenGroup || []];
|
|
181804
181988
|
for (; ae.length > 0; ) {
|
|
181805
181989
|
const se = ae.shift();
|
|
181806
181990
|
let de = ee == null ? void 0 : ee.find(
|
|
181807
|
-
(z) => si(
|
|
181991
|
+
(z) => si(
|
|
181992
|
+
z,
|
|
181993
|
+
se
|
|
181994
|
+
).exact
|
|
181808
181995
|
);
|
|
181809
181996
|
if (de || (de = ee == null ? void 0 : ee.find(
|
|
181810
|
-
(z) => si(
|
|
181997
|
+
(z) => si(
|
|
181998
|
+
z,
|
|
181999
|
+
se
|
|
182000
|
+
).compatible
|
|
181811
182001
|
)), !de) {
|
|
181812
182002
|
const z = ae.findIndex(
|
|
181813
182003
|
(Y) => ee == null ? void 0 : ee.some(
|
|
@@ -181833,9 +182023,13 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181833
182023
|
if (de) {
|
|
181834
182024
|
const z = ee.indexOf(de);
|
|
181835
182025
|
z !== -1 && ee.splice(z, 1);
|
|
181836
|
-
const Y = de.merge(
|
|
181837
|
-
|
|
181838
|
-
|
|
182026
|
+
const Y = de.merge(
|
|
182027
|
+
se,
|
|
182028
|
+
r,
|
|
182029
|
+
{
|
|
182030
|
+
implementSource: m.implementSource
|
|
182031
|
+
}
|
|
182032
|
+
);
|
|
181839
182033
|
c.push(...Y.updated), e.push(...Y.added), f.push(...Y.removed), h.push(...Y.affected);
|
|
181840
182034
|
} else if (m.implementSource) {
|
|
181841
182035
|
const z = se.implement(
|
|
@@ -181857,8 +182051,14 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181857
182051
|
}
|
|
181858
182052
|
[...this.orChildrenGroup || []].forEach((se) => {
|
|
181859
182053
|
((i == null ? void 0 : i.orChildrenGroup) || []).find(
|
|
181860
|
-
(z) => si(
|
|
181861
|
-
|
|
182054
|
+
(z) => si(
|
|
182055
|
+
se,
|
|
182056
|
+
z
|
|
182057
|
+
).compatible
|
|
182058
|
+
) || (se.remove(
|
|
182059
|
+
{ ignoreUpstream: !1 },
|
|
182060
|
+
r
|
|
182061
|
+
), f.push(se));
|
|
181862
182062
|
});
|
|
181863
182063
|
}
|
|
181864
182064
|
}
|
|
@@ -181879,10 +182079,19 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181879
182079
|
((i == null ? void 0 : i.andChildrenGroup) || []).find(
|
|
181880
182080
|
(ee) => si(J, ee).compatible
|
|
181881
182081
|
) || (J.remove({ ignoreUpstream: !1 }, r), f.push(J));
|
|
181882
|
-
})), r == null || r.attemptAutoclose(
|
|
181883
|
-
|
|
181884
|
-
|
|
181885
|
-
|
|
182082
|
+
})), r == null || r.attemptAutoclose(
|
|
182083
|
+
D.MergeDataTypes,
|
|
182084
|
+
this.id
|
|
182085
|
+
), {
|
|
182086
|
+
updated: C(
|
|
182087
|
+
c
|
|
182088
|
+
),
|
|
182089
|
+
added: C(
|
|
182090
|
+
e
|
|
182091
|
+
),
|
|
182092
|
+
removed: C(
|
|
182093
|
+
f
|
|
182094
|
+
),
|
|
181886
182095
|
affected: C(
|
|
181887
182096
|
h
|
|
181888
182097
|
),
|
|
@@ -181902,7 +182111,10 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181902
182111
|
)) {
|
|
181903
182112
|
return this.checkCanEdit(this, r) ? (this.andChildrenGroup || (this.andChildrenGroup = []), this.andChildrenGroup.includes(i) || (this.andChildrenGroup.push(i), r == null || r.add(i, H.Affected), this.entity && this.setEntity(null, r), this.foreignKeyRef && this.setForeignKeyRef(null, r)), r == null || r.attemptAutoclose(D.AddToAndGroup, this.id), this) : (ce.warn(
|
|
181904
182113
|
`[${D.AddToAndGroup}] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
181905
|
-
), r == null || r.attemptAutoclose(
|
|
182114
|
+
), r == null || r.attemptAutoclose(
|
|
182115
|
+
D.AddToAndGroup,
|
|
182116
|
+
this.id
|
|
182117
|
+
), this);
|
|
181906
182118
|
}
|
|
181907
182119
|
// Add a child to the 'or' group
|
|
181908
182120
|
addToOrGroup(i, r = this.project.addChangeSet(
|
|
@@ -181917,7 +182129,10 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181917
182129
|
)) {
|
|
181918
182130
|
return this.checkCanEdit(this, r) ? (this.orChildrenGroup || (this.orChildrenGroup = []), this.orChildrenGroup.includes(i) || (this.orChildrenGroup.push(i), r == null || r.add(i, H.Affected), this.entity && this.setEntity(null, r), this.foreignKeyRef && this.setForeignKeyRef(null, r)), r == null || r.attemptAutoclose(D.AddToOrGroup, this.id), this) : (ce.warn(
|
|
181919
182131
|
`[${D.AddToOrGroup}] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
181920
|
-
), r == null || r.attemptAutoclose(
|
|
182132
|
+
), r == null || r.attemptAutoclose(
|
|
182133
|
+
D.AddToOrGroup,
|
|
182134
|
+
this.id
|
|
182135
|
+
), this);
|
|
181921
182136
|
}
|
|
181922
182137
|
setForeignKeyRef(i, r = this.project.addChangeSet(
|
|
181923
182138
|
new Z(
|
|
@@ -181937,7 +182152,7 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181937
182152
|
this.id
|
|
181938
182153
|
), this;
|
|
181939
182154
|
const a = this.foreignKeyRef;
|
|
181940
|
-
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (this.foreignKeyRef = i, r == null || r.add(this, H.Updated)), r == null || r.attemptAutoclose(
|
|
182155
|
+
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (this.foreignKeyRef = i, this.foreignKeyRef && this.setEntity(null, r), r == null || r.add(this, H.Updated)), r == null || r.attemptAutoclose(
|
|
181941
182156
|
D.SetDataTypeForeignKeyRef,
|
|
181942
182157
|
this.id
|
|
181943
182158
|
), this;
|
|
@@ -181961,11 +182176,14 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181961
182176
|
this.id
|
|
181962
182177
|
), this;
|
|
181963
182178
|
const a = this.entity;
|
|
181964
|
-
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (this.entity = i, r == null || r.add(this, H.Updated), a && (a.type === d.DefinitionEntity || a.type === d.LiteralValue || a.type === d.ActionDescriptor) && ((c = a.parent) == null ? void 0 : c.id) === this.id && (a == null || a.remove(
|
|
182179
|
+
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (this.entity = i, r == null || r.add(this, H.Updated), a && (a.type === d.DefinitionEntity || a.type === d.LiteralValue || a.type === d.ActionDescriptor) && ((c = a.parent) == null ? void 0 : c.id) === this.id && (a == null || a.remove(
|
|
182180
|
+
{ ignoreUpstream: !0 },
|
|
182181
|
+
r
|
|
182182
|
+
)), (e = this.orChildrenGroup) != null && e.length && this.entity && (this.orChildrenGroup.forEach((h) => {
|
|
181965
182183
|
this.removeChildGroup(h, r);
|
|
181966
182184
|
}), this.orChildrenGroup = null), (f = this.andChildrenGroup) != null && f.length && this.entity && (this.andChildrenGroup.forEach((h) => {
|
|
181967
182185
|
this.removeChildGroup(h, r);
|
|
181968
|
-
}), this.andChildrenGroup = null), this.foreignKeyRef && this.setForeignKeyRef(null, r)), r == null || r.attemptAutoclose(
|
|
182186
|
+
}), this.andChildrenGroup = null), this.foreignKeyRef && this.entity && this.setForeignKeyRef(null, r)), r == null || r.attemptAutoclose(
|
|
181969
182187
|
D.SetDataTypeEntityValue,
|
|
181970
182188
|
this.id
|
|
181971
182189
|
), this;
|
|
@@ -181978,9 +182196,7 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
181978
182196
|
let i = !1, r = !1;
|
|
181979
182197
|
if (this.parent.type !== d.DataType && this.parent.type !== d.ActionDescriptor && this.parent.type !== d.BuiltInBaseEntity && this.parent.type !== d.DefinitionEntity && this.parent.type !== d.FunctionDeclaration) {
|
|
181980
182198
|
r = !0;
|
|
181981
|
-
const c = (a = this.project.requestActiveDynamicValue(
|
|
181982
|
-
this.parent
|
|
181983
|
-
)) == null ? void 0 : a.value;
|
|
182199
|
+
const c = (a = this.project.requestActiveDynamicValue(this.parent)) == null ? void 0 : a.value;
|
|
181984
182200
|
c ? !c.valueAsType && (c.value === "" || c.value === null || un(c)) && (i = !0) : i = !0;
|
|
181985
182201
|
}
|
|
181986
182202
|
return (this.isObject() || !this.entity || this.entity.name === ye.Untyped) && (!r || r && i);
|
|
@@ -182077,9 +182293,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
182077
182293
|
},
|
|
182078
182294
|
r
|
|
182079
182295
|
), r == null || r.attemptAutoclose("infer-data-type-from-inputs", this.id), {
|
|
182080
|
-
updated: C(
|
|
182081
|
-
|
|
182082
|
-
|
|
182296
|
+
updated: C(
|
|
182297
|
+
c
|
|
182298
|
+
),
|
|
182299
|
+
added: C(
|
|
182300
|
+
a
|
|
182301
|
+
),
|
|
182302
|
+
removed: C(
|
|
182303
|
+
e
|
|
182304
|
+
),
|
|
182083
182305
|
affected: C(
|
|
182084
182306
|
f
|
|
182085
182307
|
),
|
|
@@ -182098,9 +182320,11 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
182098
182320
|
)) {
|
|
182099
182321
|
var f, h, m, b;
|
|
182100
182322
|
const r = [], a = [], c = [], e = [];
|
|
182101
|
-
if (this.entity && this.andChildrenGroup && this.andChildrenGroup.length === 0 && this.orChildrenGroup && this.orChildrenGroup.length === 0 ? ([...this.andChildrenGroup, ...this.orChildrenGroup].forEach(
|
|
182102
|
-
|
|
182103
|
-
|
|
182323
|
+
if (this.entity && this.andChildrenGroup && this.andChildrenGroup.length === 0 && this.orChildrenGroup && this.orChildrenGroup.length === 0 ? ([...this.andChildrenGroup, ...this.orChildrenGroup].forEach(
|
|
182324
|
+
(E) => {
|
|
182325
|
+
this.removeChildGroup(E, i);
|
|
182326
|
+
}
|
|
182327
|
+
), this.andChildrenGroup = null, this.orChildrenGroup = null, i == null || i.add(this, H.Updated), a.push(this)) : !this.entity && this.andChildrenGroup && this.orChildrenGroup && (((f = this.andChildrenGroup) == null ? void 0 : f.length) > 0 && ((h = this.orChildrenGroup) == null ? void 0 : h.length) === 0 ? this.orChildrenGroup = null : ((m = this.orChildrenGroup) == null ? void 0 : m.length) > 0 && ((b = this.andChildrenGroup) == null ? void 0 : b.length) === 0 && (this.andChildrenGroup = null)), this.entity && this.foreignKeyRef)
|
|
182104
182328
|
return i == null || i.attemptAutoclose(
|
|
182105
182329
|
"best-effort-clear-incompatible-properties",
|
|
182106
182330
|
this.id
|
|
@@ -182108,7 +182332,9 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
182108
182332
|
updated: C(
|
|
182109
182333
|
a
|
|
182110
182334
|
),
|
|
182111
|
-
added: C(
|
|
182335
|
+
added: C(
|
|
182336
|
+
r
|
|
182337
|
+
),
|
|
182112
182338
|
removed: C(
|
|
182113
182339
|
c
|
|
182114
182340
|
),
|
|
@@ -182130,9 +182356,15 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
182130
182356
|
"best-effort-clear-incompatible-properties",
|
|
182131
182357
|
this.id
|
|
182132
182358
|
), {
|
|
182133
|
-
updated: C(
|
|
182134
|
-
|
|
182135
|
-
|
|
182359
|
+
updated: C(
|
|
182360
|
+
a
|
|
182361
|
+
),
|
|
182362
|
+
added: C(
|
|
182363
|
+
r
|
|
182364
|
+
),
|
|
182365
|
+
removed: C(
|
|
182366
|
+
c
|
|
182367
|
+
),
|
|
182136
182368
|
affected: C(
|
|
182137
182369
|
e
|
|
182138
182370
|
),
|
|
@@ -182184,7 +182416,10 @@ Alternatively you can update the entity with 'update' action. Or replace it by f
|
|
|
182184
182416
|
h.length ? this.setEntity(h[0].entity, r) : f.length && this.setEntity(f[0].entity, r);
|
|
182185
182417
|
}
|
|
182186
182418
|
}
|
|
182187
|
-
return r == null || r.attemptAutoclose(
|
|
182419
|
+
return r == null || r.attemptAutoclose(
|
|
182420
|
+
"choose-one-from-or-group-and-apply",
|
|
182421
|
+
this.id
|
|
182422
|
+
), this;
|
|
182188
182423
|
}
|
|
182189
182424
|
implement(i, r = this.project.addChangeSet(
|
|
182190
182425
|
new Z(
|
|
@@ -182659,7 +182894,9 @@ const Ti = class Ti extends nn {
|
|
|
182659
182894
|
});
|
|
182660
182895
|
let m = null;
|
|
182661
182896
|
if (i.extends) {
|
|
182662
|
-
const A = te(
|
|
182897
|
+
const A = te(
|
|
182898
|
+
i.extends
|
|
182899
|
+
);
|
|
182663
182900
|
m = r.get(
|
|
182664
182901
|
A
|
|
182665
182902
|
);
|
|
@@ -182703,7 +182940,10 @@ const Ti = class Ti extends nn {
|
|
|
182703
182940
|
let a = JSON.parse(
|
|
182704
182941
|
JSON.stringify(i)
|
|
182705
182942
|
);
|
|
182706
|
-
const c = [], e = [], f = $Ri(
|
|
182943
|
+
const c = [], e = [], f = $Ri(
|
|
182944
|
+
a,
|
|
182945
|
+
r
|
|
182946
|
+
), h = ZF(a, r), m = an(
|
|
182707
182947
|
a
|
|
182708
182948
|
);
|
|
182709
182949
|
return e.push(
|
|
@@ -182732,9 +182972,11 @@ const Ti = class Ti extends nn {
|
|
|
182732
182972
|
return !!i && i.id !== this.id && !i.abstract;
|
|
182733
182973
|
}
|
|
182734
182974
|
get codeNativeValueValidation() {
|
|
182735
|
-
const i = [...this.implements].filter(
|
|
182736
|
-
(
|
|
182737
|
-
|
|
182975
|
+
const i = [...this.implements].filter(
|
|
182976
|
+
(a) => !this.implements.filter(
|
|
182977
|
+
(f) => f.id !== a.id
|
|
182978
|
+
).some((f) => !!f.implements.find((h) => h.id === a.id))
|
|
182979
|
+
);
|
|
182738
182980
|
return this._codeNativeValueValidation || (i == null ? void 0 : i.some(
|
|
182739
182981
|
(a) => a.codeNativeValueValidation
|
|
182740
182982
|
)) ? (a, c) => {
|
|
@@ -182824,9 +183066,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
182824
183066
|
const h = f.entity.afterAllChildrenInitialized(i);
|
|
182825
183067
|
r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
|
|
182826
183068
|
}), i == null || i.attemptAutoclose("sync-dependents", this.id), {
|
|
182827
|
-
updated: C(
|
|
182828
|
-
|
|
182829
|
-
|
|
183069
|
+
updated: C(
|
|
183070
|
+
r
|
|
183071
|
+
),
|
|
183072
|
+
added: C(
|
|
183073
|
+
a
|
|
183074
|
+
),
|
|
183075
|
+
removed: C(
|
|
183076
|
+
c
|
|
183077
|
+
),
|
|
182830
183078
|
affected: C(
|
|
182831
183079
|
e
|
|
182832
183080
|
),
|
|
@@ -182847,9 +183095,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
182847
183095
|
c.push(...m), e.push(...b), f.push(...E), h.push(...A);
|
|
182848
183096
|
}
|
|
182849
183097
|
return {
|
|
182850
|
-
updated: C(
|
|
182851
|
-
|
|
182852
|
-
|
|
183098
|
+
updated: C(
|
|
183099
|
+
c
|
|
183100
|
+
),
|
|
183101
|
+
added: C(
|
|
183102
|
+
e
|
|
183103
|
+
),
|
|
183104
|
+
removed: C(
|
|
183105
|
+
f
|
|
183106
|
+
),
|
|
182853
183107
|
affected: C(
|
|
182854
183108
|
h
|
|
182855
183109
|
),
|
|
@@ -182870,9 +183124,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
182870
183124
|
c.push(...m), e.push(...b), f.push(...E), h.push(...A);
|
|
182871
183125
|
}
|
|
182872
183126
|
return {
|
|
182873
|
-
updated: C(
|
|
182874
|
-
|
|
182875
|
-
|
|
183127
|
+
updated: C(
|
|
183128
|
+
c
|
|
183129
|
+
),
|
|
183130
|
+
added: C(
|
|
183131
|
+
e
|
|
183132
|
+
),
|
|
183133
|
+
removed: C(
|
|
183134
|
+
f
|
|
183135
|
+
),
|
|
182876
183136
|
affected: C(
|
|
182877
183137
|
h
|
|
182878
183138
|
),
|
|
@@ -182984,7 +183244,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
182984
183244
|
return this.knownVersions = this.knownVersions ? this.knownVersions.set(this.version, i) : (/* @__PURE__ */ new Map()).set(this.version, i), this.apply(i), this;
|
|
182985
183245
|
}
|
|
182986
183246
|
snapshot() {
|
|
182987
|
-
const i = new Ti(
|
|
183247
|
+
const i = new Ti(
|
|
183248
|
+
this,
|
|
183249
|
+
this.project
|
|
183250
|
+
);
|
|
182988
183251
|
return this.apply(i);
|
|
182989
183252
|
}
|
|
182990
183253
|
/**
|
|
@@ -183007,9 +183270,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183007
183270
|
r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
|
|
183008
183271
|
}
|
|
183009
183272
|
return {
|
|
183010
|
-
updated: C(
|
|
183011
|
-
|
|
183012
|
-
|
|
183273
|
+
updated: C(
|
|
183274
|
+
r
|
|
183275
|
+
),
|
|
183276
|
+
added: C(
|
|
183277
|
+
a
|
|
183278
|
+
),
|
|
183279
|
+
removed: C(
|
|
183280
|
+
c
|
|
183281
|
+
),
|
|
183013
183282
|
affected: C(
|
|
183014
183283
|
e
|
|
183015
183284
|
),
|
|
@@ -183032,7 +183301,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183032
183301
|
updated: C(
|
|
183033
183302
|
a
|
|
183034
183303
|
),
|
|
183035
|
-
added: C(
|
|
183304
|
+
added: C(
|
|
183305
|
+
c
|
|
183306
|
+
),
|
|
183036
183307
|
removed: C(
|
|
183037
183308
|
e
|
|
183038
183309
|
),
|
|
@@ -183068,9 +183339,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183068
183339
|
);
|
|
183069
183340
|
}
|
|
183070
183341
|
return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.defaultValue = h.defaultValue, this.dataType = h.dataType, this.implements = [...h.implements], this.parent = h.parent, {
|
|
183071
|
-
updated: C(
|
|
183072
|
-
|
|
183073
|
-
|
|
183342
|
+
updated: C(
|
|
183343
|
+
a
|
|
183344
|
+
),
|
|
183345
|
+
added: C(
|
|
183346
|
+
c
|
|
183347
|
+
),
|
|
183348
|
+
removed: C(
|
|
183349
|
+
e
|
|
183350
|
+
),
|
|
183074
183351
|
affected: C(
|
|
183075
183352
|
f
|
|
183076
183353
|
),
|
|
@@ -183111,24 +183388,34 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183111
183388
|
throw r == null || r.attemptAutoclose(
|
|
183112
183389
|
D.UpdateWithShallowTransfer,
|
|
183113
183390
|
this.id
|
|
183114
|
-
), new Error(
|
|
183391
|
+
), new Error(
|
|
183392
|
+
`${this.type} with id '${this.id}' must have a 'parent'`
|
|
183393
|
+
);
|
|
183115
183394
|
if (i.implements.forEach((c) => {
|
|
183116
|
-
const e = te(c), f = this.project.get(
|
|
183395
|
+
const e = te(c), f = this.project.get(
|
|
183396
|
+
e
|
|
183397
|
+
);
|
|
183117
183398
|
if (f)
|
|
183118
183399
|
this.addImplementation(f, r);
|
|
183119
183400
|
else
|
|
183120
183401
|
throw new Error(
|
|
183121
183402
|
`${Tr(this.type)} with id '${this.id}' has a 'implements' reference "${e}" which is missing in the project`
|
|
183122
183403
|
);
|
|
183123
|
-
}), this.implements.filter(
|
|
183124
|
-
|
|
183125
|
-
|
|
183126
|
-
|
|
183127
|
-
|
|
183128
|
-
|
|
183404
|
+
}), this.implements.filter(
|
|
183405
|
+
(c) => {
|
|
183406
|
+
const e = te(
|
|
183407
|
+
c
|
|
183408
|
+
);
|
|
183409
|
+
return !i.implements.find((f) => te(f) === e);
|
|
183410
|
+
}
|
|
183411
|
+
).forEach((c) => {
|
|
183129
183412
|
this.removeImplementation(c, r);
|
|
183130
183413
|
}), i.extends) {
|
|
183131
|
-
const c = te(
|
|
183414
|
+
const c = te(
|
|
183415
|
+
i.extends
|
|
183416
|
+
), e = this.project.get(
|
|
183417
|
+
c
|
|
183418
|
+
);
|
|
183132
183419
|
if (e)
|
|
183133
183420
|
this.setExtends(e, r);
|
|
183134
183421
|
else if (c)
|
|
@@ -183138,7 +183425,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183138
183425
|
} else
|
|
183139
183426
|
this.setExtends(null, r);
|
|
183140
183427
|
if (i.dataType) {
|
|
183141
|
-
const c = te(
|
|
183428
|
+
const c = te(
|
|
183429
|
+
i.dataType
|
|
183430
|
+
), e = this.project.get(c);
|
|
183142
183431
|
e && this.setDataType(e, r);
|
|
183143
183432
|
} else
|
|
183144
183433
|
this.setDataType(null, r);
|
|
@@ -183189,7 +183478,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183189
183478
|
);
|
|
183190
183479
|
}
|
|
183191
183480
|
if ((a = i.implements) == null || a.forEach((c) => {
|
|
183192
|
-
const e = te(c), f = this.project.get(
|
|
183481
|
+
const e = te(c), f = this.project.get(
|
|
183482
|
+
e
|
|
183483
|
+
);
|
|
183193
183484
|
if (f)
|
|
183194
183485
|
this.addImplementation(f, r);
|
|
183195
183486
|
else
|
|
@@ -183201,12 +183492,18 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183201
183492
|
const f = te(
|
|
183202
183493
|
e
|
|
183203
183494
|
);
|
|
183204
|
-
return !(i.implements || []).find((h) => te(
|
|
183495
|
+
return !(i.implements || []).find((h) => te(
|
|
183496
|
+
h
|
|
183497
|
+
) === f);
|
|
183205
183498
|
}
|
|
183206
183499
|
).forEach((e) => {
|
|
183207
183500
|
this.removeImplementation(e, r);
|
|
183208
183501
|
}), i.extends) {
|
|
183209
|
-
const c = te(
|
|
183502
|
+
const c = te(
|
|
183503
|
+
i.extends
|
|
183504
|
+
), e = this.project.get(
|
|
183505
|
+
c
|
|
183506
|
+
);
|
|
183210
183507
|
if (e)
|
|
183211
183508
|
this.setExtends(e, r);
|
|
183212
183509
|
else if (c)
|
|
@@ -183235,9 +183532,13 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183235
183532
|
`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
|
|
183236
183533
|
);
|
|
183237
183534
|
} else
|
|
183238
|
-
throw new Error(
|
|
183535
|
+
throw new Error(
|
|
183536
|
+
`${this.type} with id '${this.id}' must have a 'parent'`
|
|
183537
|
+
);
|
|
183239
183538
|
if ((this.initialData.implements || []).forEach((e) => {
|
|
183240
|
-
const f = te(e), h = this.project.get(
|
|
183539
|
+
const f = te(e), h = this.project.get(
|
|
183540
|
+
f
|
|
183541
|
+
);
|
|
183241
183542
|
if (h)
|
|
183242
183543
|
this.addImplementation(h, null), i.push(h);
|
|
183243
183544
|
else
|
|
@@ -183247,7 +183548,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183247
183548
|
}), this.initialData.extends) {
|
|
183248
183549
|
const e = te(
|
|
183249
183550
|
this.initialData.extends
|
|
183250
|
-
), f = this.project.get(
|
|
183551
|
+
), f = this.project.get(
|
|
183552
|
+
e
|
|
183553
|
+
);
|
|
183251
183554
|
if (f)
|
|
183252
183555
|
this.setExtends(f, null), i.push(f);
|
|
183253
183556
|
else if (e)
|
|
@@ -183256,9 +183559,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183256
183559
|
);
|
|
183257
183560
|
}
|
|
183258
183561
|
return {
|
|
183259
|
-
updated: C(
|
|
183260
|
-
|
|
183261
|
-
|
|
183562
|
+
updated: C(
|
|
183563
|
+
i
|
|
183564
|
+
),
|
|
183565
|
+
added: C(
|
|
183566
|
+
r
|
|
183567
|
+
),
|
|
183568
|
+
removed: C(
|
|
183569
|
+
a
|
|
183570
|
+
),
|
|
183262
183571
|
affected: C(
|
|
183263
183572
|
c
|
|
183264
183573
|
),
|
|
@@ -183300,7 +183609,13 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183300
183609
|
) && J.filter(
|
|
183301
183610
|
(ee) => (ee.index || 0) >= re && !ee.deleted
|
|
183302
183611
|
).forEach((ee) => {
|
|
183303
|
-
ee.metaSync(
|
|
183612
|
+
ee.metaSync(
|
|
183613
|
+
{ index: (ee.index || 0) + 1 },
|
|
183614
|
+
i
|
|
183615
|
+
), i == null || i.add(
|
|
183616
|
+
ee,
|
|
183617
|
+
H.Updated
|
|
183618
|
+
), r.push(ee);
|
|
183304
183619
|
}), this.metaSync(
|
|
183305
183620
|
{
|
|
183306
183621
|
index: re
|
|
@@ -183308,7 +183623,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183308
183623
|
i
|
|
183309
183624
|
);
|
|
183310
183625
|
}
|
|
183311
|
-
if (this.defaultValue && !this.project.diggestedBuiltInBaseEntitiesIds.has(this.id) && this.project.diggestedBuiltInBaseEntitiesIds.has(
|
|
183626
|
+
if (this.defaultValue && !this.project.diggestedBuiltInBaseEntitiesIds.has(this.id) && this.project.diggestedBuiltInBaseEntitiesIds.has(
|
|
183627
|
+
this.defaultValue.id
|
|
183628
|
+
)) {
|
|
183312
183629
|
const re = this.defaultValue.clone(i, this);
|
|
183313
183630
|
this.setDefaultValue(re, i);
|
|
183314
183631
|
}
|
|
@@ -183334,13 +183651,19 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183334
183651
|
} = this.syncWithExtension(i);
|
|
183335
183652
|
return r.push(...V), a.push(...B), c.push(...M), e.push(...k), !this.project.diggestedBuiltInBaseEntitiesIds.has(this.id) && this.project.initialized && (this.extends && ((q = this.extends) == null ? void 0 : q.interactive) === !0 && (this.interactive || (this.metaSync({ interactive: !0 }, i), r.push(this))), this.implements.every(
|
|
183336
183653
|
(re) => re.interactive === !0
|
|
183337
|
-
) && (this.interactive || (this.metaSync({ interactive: !0 }, i), r.push(this)))), i == null || i.attemptAutoclose(
|
|
183654
|
+
) && (this.interactive || (this.metaSync({ interactive: !0 }, i), r.push(this)))), this.parent.static && !this.static && this.metaSync({ static: !0 }, i), i == null || i.attemptAutoclose(
|
|
183338
183655
|
D.AfterAllChildrenInitialized,
|
|
183339
183656
|
this.id
|
|
183340
183657
|
), {
|
|
183341
|
-
updated: C(
|
|
183342
|
-
|
|
183343
|
-
|
|
183658
|
+
updated: C(
|
|
183659
|
+
r
|
|
183660
|
+
),
|
|
183661
|
+
added: C(
|
|
183662
|
+
a
|
|
183663
|
+
),
|
|
183664
|
+
removed: C(
|
|
183665
|
+
c
|
|
183666
|
+
),
|
|
183344
183667
|
affected: C(
|
|
183345
183668
|
e
|
|
183346
183669
|
),
|
|
@@ -183363,9 +183686,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183363
183686
|
this,
|
|
183364
183687
|
i
|
|
183365
183688
|
) : this.parent.addProperty(this, i), r.push(this.parent), this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
|
|
183366
|
-
updated: C(
|
|
183367
|
-
|
|
183368
|
-
|
|
183689
|
+
updated: C(
|
|
183690
|
+
r
|
|
183691
|
+
),
|
|
183692
|
+
added: C(
|
|
183693
|
+
a
|
|
183694
|
+
),
|
|
183695
|
+
removed: C(
|
|
183696
|
+
c
|
|
183697
|
+
),
|
|
183369
183698
|
affected: C(
|
|
183370
183699
|
e
|
|
183371
183700
|
),
|
|
@@ -183400,7 +183729,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183400
183729
|
D.AddImplementation
|
|
183401
183730
|
)
|
|
183402
183731
|
)) {
|
|
183403
|
-
return this.checkCanEdit(this, r) ? (this.implements.includes(i) || (this.implements.push(i), r == null || r.add(this, H.Updated)), r == null || r.attemptAutoclose(
|
|
183732
|
+
return this.checkCanEdit(this, r) ? (this.implements.includes(i) || (this.implements.push(i), r == null || r.add(this, H.Updated)), r == null || r.attemptAutoclose(
|
|
183733
|
+
D.AddImplementation,
|
|
183734
|
+
this.id
|
|
183735
|
+
), this) : (ce.warn(
|
|
183404
183736
|
`[addImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
183405
183737
|
), r == null || r.attemptAutoclose(
|
|
183406
183738
|
D.AddImplementation,
|
|
@@ -183440,7 +183772,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183440
183772
|
var a;
|
|
183441
183773
|
return this.checkCanEdit(this, r) ? (((a = this.extends) == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (this.extends = i, this.subscribeToDependencies(), r && (r == null || r.add(this, H.Updated))), r == null || r.attemptAutoclose(D.SetExtends, this.id), this) : (ce.warn(
|
|
183442
183774
|
`[setExtends] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
183443
|
-
), r == null || r.attemptAutoclose(
|
|
183775
|
+
), r == null || r.attemptAutoclose(
|
|
183776
|
+
D.SetExtends,
|
|
183777
|
+
this.id
|
|
183778
|
+
), this);
|
|
183444
183779
|
}
|
|
183445
183780
|
initChildren(i = this.project.addChangeSet(
|
|
183446
183781
|
new Z(
|
|
@@ -183557,10 +183892,19 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183557
183892
|
self: this
|
|
183558
183893
|
};
|
|
183559
183894
|
const r = [], a = [], c = [], e = [];
|
|
183560
|
-
return this.parent.type === d.DefinitionEntity && (this.parentRelationType === Hu.AllPropertiesImplementationTarget ? this.parent.removeAllPropertiesImplement(i) : this.parent.removeProperty(this, i), e.push(this.parent)), i == null || i.attemptAutoclose(
|
|
183561
|
-
|
|
183562
|
-
|
|
183563
|
-
|
|
183895
|
+
return this.parent.type === d.DefinitionEntity && (this.parentRelationType === Hu.AllPropertiesImplementationTarget ? this.parent.removeAllPropertiesImplement(i) : this.parent.removeProperty(this, i), e.push(this.parent)), i == null || i.attemptAutoclose(
|
|
183896
|
+
D.RemoveFromParent,
|
|
183897
|
+
this.id
|
|
183898
|
+
), {
|
|
183899
|
+
added: C(
|
|
183900
|
+
c
|
|
183901
|
+
),
|
|
183902
|
+
updated: C(
|
|
183903
|
+
r
|
|
183904
|
+
),
|
|
183905
|
+
removed: C(
|
|
183906
|
+
a
|
|
183907
|
+
),
|
|
183564
183908
|
affected: C(
|
|
183565
183909
|
e
|
|
183566
183910
|
),
|
|
@@ -183594,7 +183938,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183594
183938
|
owner: this,
|
|
183595
183939
|
errorReason: Be.ActionOwnerEntityNonDeletable,
|
|
183596
183940
|
rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
|
|
183597
|
-
}), r == null || r.attemptAutoclose(
|
|
183941
|
+
}), r == null || r.attemptAutoclose(
|
|
183942
|
+
D.RemoveEntity,
|
|
183943
|
+
this.id
|
|
183944
|
+
), {
|
|
183598
183945
|
added: [],
|
|
183599
183946
|
updated: [],
|
|
183600
183947
|
removed: [],
|
|
@@ -183603,7 +183950,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183603
183950
|
};
|
|
183604
183951
|
const a = [], c = [], e = [], f = [];
|
|
183605
183952
|
if (r != null && r.hasRemoved(this.id))
|
|
183606
|
-
return r == null || r.attemptAutoclose(
|
|
183953
|
+
return r == null || r.attemptAutoclose(
|
|
183954
|
+
D.RemoveEntity,
|
|
183955
|
+
this.id
|
|
183956
|
+
), {
|
|
183607
183957
|
added: [],
|
|
183608
183958
|
updated: [],
|
|
183609
183959
|
removed: [],
|
|
@@ -183644,9 +183994,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183644
183994
|
e.push(...m.added), a.push(...m.updated), c.push(...m.removed), f.push(...m.affected);
|
|
183645
183995
|
}
|
|
183646
183996
|
return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
|
|
183647
|
-
added: C(
|
|
183648
|
-
|
|
183649
|
-
|
|
183997
|
+
added: C(
|
|
183998
|
+
e
|
|
183999
|
+
),
|
|
184000
|
+
updated: C(
|
|
184001
|
+
a
|
|
184002
|
+
),
|
|
184003
|
+
removed: C(
|
|
184004
|
+
c
|
|
184005
|
+
),
|
|
183650
184006
|
affected: C(
|
|
183651
184007
|
f
|
|
183652
184008
|
),
|
|
@@ -183669,10 +184025,28 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183669
184025
|
if (!this.checkCanEdit(this, i))
|
|
183670
184026
|
return ce.warn(
|
|
183671
184027
|
`[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
183672
|
-
), i == null || i.attemptAutoclose(
|
|
183673
|
-
|
|
183674
|
-
|
|
183675
|
-
|
|
184028
|
+
), i == null || i.attemptAutoclose(
|
|
184029
|
+
D.RestoreEntity,
|
|
184030
|
+
this.id
|
|
184031
|
+
), {
|
|
184032
|
+
added: [],
|
|
184033
|
+
updated: [],
|
|
184034
|
+
removed: [],
|
|
184035
|
+
affected: [],
|
|
184036
|
+
self: this
|
|
184037
|
+
};
|
|
184038
|
+
const r = [], a = [], c = [], e = [];
|
|
184039
|
+
if (i != null && i.hasAdded(this.id))
|
|
184040
|
+
return i == null || i.attemptAutoclose(
|
|
184041
|
+
D.RestoreEntity,
|
|
184042
|
+
this.id
|
|
184043
|
+
), {
|
|
184044
|
+
added: [],
|
|
184045
|
+
updated: [],
|
|
184046
|
+
removed: [],
|
|
184047
|
+
affected: [],
|
|
184048
|
+
self: this
|
|
184049
|
+
};
|
|
183676
184050
|
if (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
|
|
183677
184051
|
const {
|
|
183678
184052
|
updated: h,
|
|
@@ -183699,9 +184073,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183699
184073
|
a.push(...f);
|
|
183700
184074
|
}
|
|
183701
184075
|
return this.parent.type === d.DefinitionEntity && (this.parentRelationType === Hu.AllPropertiesImplementationTarget ? this.parent.removeAllPropertiesImplement(i) : this.parent.addProperty(this, i), e.push(this.parent)), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
|
|
183702
|
-
added: C(
|
|
183703
|
-
|
|
183704
|
-
|
|
184076
|
+
added: C(
|
|
184077
|
+
r
|
|
184078
|
+
),
|
|
184079
|
+
updated: C(
|
|
184080
|
+
a
|
|
184081
|
+
),
|
|
184082
|
+
removed: C(
|
|
184083
|
+
c
|
|
184084
|
+
),
|
|
183705
184085
|
affected: C(
|
|
183706
184086
|
e
|
|
183707
184087
|
),
|
|
@@ -183782,7 +184162,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183782
184162
|
abstract: this.abstract,
|
|
183783
184163
|
hidden: this.hidden,
|
|
183784
184164
|
parentRelationType: this.parentRelationType,
|
|
183785
|
-
defaultValue: ((r = this.defaultValue) == null ? void 0 : r.toJSON(
|
|
184165
|
+
defaultValue: ((r = this.defaultValue) == null ? void 0 : r.toJSON(
|
|
184166
|
+
i
|
|
184167
|
+
)) || null,
|
|
183786
184168
|
dataType: ((a = this.dataType) == null ? void 0 : a.toJSON(i)) || null,
|
|
183787
184169
|
implements: this.implements.map(
|
|
183788
184170
|
(e) => e.toJSON(i)
|
|
@@ -183794,7 +184176,11 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183794
184176
|
toJSONClone(i = lt) {
|
|
183795
184177
|
var a, c, e, f, h, m, b;
|
|
183796
184178
|
let r;
|
|
183797
|
-
return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || cn(
|
|
184179
|
+
return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || cn(
|
|
184180
|
+
this,
|
|
184181
|
+
this.project,
|
|
184182
|
+
i.uuidStrategy
|
|
184183
|
+
), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
|
|
183798
184184
|
id: r,
|
|
183799
184185
|
version: x.UUID.uuid(),
|
|
183800
184186
|
createdAt: i.timestamp || G().toISOString(),
|
|
@@ -183825,7 +184211,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183825
184211
|
...i,
|
|
183826
184212
|
newId: null
|
|
183827
184213
|
})) || null,
|
|
183828
|
-
implements: this.implements.map((E) => this.project.getBuiltIn(E.id) ? E.toJSON(
|
|
184214
|
+
implements: this.implements.map((E) => this.project.getBuiltIn(E.id) ? E.toJSON(
|
|
184215
|
+
i.seenEntities
|
|
184216
|
+
) : E.toJSONClone({
|
|
183829
184217
|
...i,
|
|
183830
184218
|
newId: null
|
|
183831
184219
|
})),
|
|
@@ -183880,7 +184268,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183880
184268
|
parentRelationType: this.parentRelationType,
|
|
183881
184269
|
defaultValue: ((c = this.defaultValue) == null ? void 0 : c.toReference(i)) || null,
|
|
183882
184270
|
dataType: ((e = this.dataType) == null ? void 0 : e.toReference(i)) || null,
|
|
183883
|
-
implements: this.implements.map(
|
|
184271
|
+
implements: this.implements.map(
|
|
184272
|
+
(h) => h.toReference(i)
|
|
184273
|
+
),
|
|
183884
184274
|
extends: ((f = this.extends) == null ? void 0 : f.toReference(i)) || null,
|
|
183885
184275
|
parent: this.parent.toReference(i)
|
|
183886
184276
|
};
|
|
@@ -183891,7 +184281,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183891
184281
|
this.toShallowJSON(),
|
|
183892
184282
|
...((a = this.defaultValue) == null ? void 0 : a.toFlatJSON(i)) || [],
|
|
183893
184283
|
...((c = this.dataType) == null ? void 0 : c.toFlatJSON(i)) || [],
|
|
183894
|
-
...this.implements.flatMap(
|
|
184284
|
+
...this.implements.flatMap(
|
|
184285
|
+
(e) => e.toFlatJSON(i)
|
|
184286
|
+
),
|
|
183895
184287
|
...this.parent.toFlatJSON(i)
|
|
183896
184288
|
]);
|
|
183897
184289
|
}
|
|
@@ -183956,7 +184348,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
183956
184348
|
a.push(...c);
|
|
183957
184349
|
}
|
|
183958
184350
|
if (this.dataType) {
|
|
183959
|
-
const c = await this.dataType.getErrorsAsync({
|
|
184351
|
+
const c = await this.dataType.getErrorsAsync({
|
|
184352
|
+
tracker: r
|
|
184353
|
+
});
|
|
183960
184354
|
a.push(...c);
|
|
183961
184355
|
}
|
|
183962
184356
|
return a;
|
|
@@ -184098,9 +184492,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
184098
184492
|
if (!this.checkCanEdit(this, r))
|
|
184099
184493
|
return ce.warn(
|
|
184100
184494
|
`[setDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
184101
|
-
), r == null || r.attemptAutoclose(
|
|
184495
|
+
), r == null || r.attemptAutoclose(
|
|
184496
|
+
D.SetDataType,
|
|
184497
|
+
this.id
|
|
184498
|
+
), this;
|
|
184102
184499
|
const a = this.dataType;
|
|
184103
|
-
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove(
|
|
184500
|
+
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove(
|
|
184501
|
+
{ ignoreUpstream: !0 },
|
|
184502
|
+
r
|
|
184503
|
+
), this.dataType = i, this.subscribeToDependencies(), r == null || r.add(this, H.Affected)), r == null || r.attemptAutoclose(D.SetDataType, this.id), this;
|
|
184104
184504
|
}
|
|
184105
184505
|
removeDataType(i = this.project.addChangeSet(
|
|
184106
184506
|
new Z(
|
|
@@ -184112,9 +184512,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
184112
184512
|
D.RemoveDataType
|
|
184113
184513
|
)
|
|
184114
184514
|
)) {
|
|
184115
|
-
return this.checkCanEdit(this, i) ? (this.dataType && (this.dataType.remove({ ignoreUpstream: !0 }, i), i == null || i.add(this, H.Affected), this.dataType = null), i == null || i.attemptAutoclose(
|
|
184515
|
+
return this.checkCanEdit(this, i) ? (this.dataType && (this.dataType.remove({ ignoreUpstream: !0 }, i), i == null || i.add(this, H.Affected), this.dataType = null), i == null || i.attemptAutoclose(
|
|
184516
|
+
D.RemoveDataType,
|
|
184517
|
+
this.id
|
|
184518
|
+
), this) : (ce.warn(
|
|
184116
184519
|
`[removeDataType] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
184117
|
-
), i == null || i.attemptAutoclose(
|
|
184520
|
+
), i == null || i.attemptAutoclose(
|
|
184521
|
+
D.RemoveDataType,
|
|
184522
|
+
this.id
|
|
184523
|
+
), this);
|
|
184118
184524
|
}
|
|
184119
184525
|
getDataType(i = this.project.addChangeSet(
|
|
184120
184526
|
new Z(
|
|
@@ -184154,7 +184560,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
184154
184560
|
`[setDefaultValue] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
184155
184561
|
), r == null || r.attemptAutoclose("set-default-value", this.id), this;
|
|
184156
184562
|
const a = this.defaultValue;
|
|
184157
|
-
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove(
|
|
184563
|
+
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove(
|
|
184564
|
+
{ ignoreUpstream: !0 },
|
|
184565
|
+
r
|
|
184566
|
+
), this.defaultValue = i, r == null || r.add(this, H.Affected)), r == null || r.attemptAutoclose("set-default-value", this.id), this;
|
|
184158
184567
|
}
|
|
184159
184568
|
// The implemented entity's data-type constrains what kind of data-type this property can have
|
|
184160
184569
|
// If this property doesn't already have a data-type, it clone the implemented entity's data-type
|
|
@@ -184187,7 +184596,9 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
184187
184596
|
var J;
|
|
184188
184597
|
if (!M.dataType || !((J = M.dataType) != null && J.isResolved))
|
|
184189
184598
|
return !1;
|
|
184190
|
-
const k = this.implements.filter(
|
|
184599
|
+
const k = this.implements.filter(
|
|
184600
|
+
(ae) => ae.id !== M.id
|
|
184601
|
+
);
|
|
184191
184602
|
if (!k.length)
|
|
184192
184603
|
return !0;
|
|
184193
184604
|
const q = eo(
|
|
@@ -184244,7 +184655,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
184244
184655
|
k,
|
|
184245
184656
|
this.project
|
|
184246
184657
|
);
|
|
184247
|
-
q.hydrateAncestors(), q.addSelfToProject(i), q.initChildren(i), i == null || i.add(
|
|
184658
|
+
q.hydrateAncestors(), q.addSelfToProject(i), q.initChildren(i), i == null || i.add(
|
|
184659
|
+
q,
|
|
184660
|
+
H.Added
|
|
184661
|
+
), i || q.captureVersion(), this.setDefaultValue(q, i), a.push(q);
|
|
184248
184662
|
}
|
|
184249
184663
|
}
|
|
184250
184664
|
let m = !1, b = !1, E = !1, A = !1;
|
|
@@ -184259,9 +184673,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
184259
184673
|
},
|
|
184260
184674
|
i
|
|
184261
184675
|
), i == null || i.attemptAutoclose("sync-with-implementation", this.id), {
|
|
184262
|
-
updated: C(
|
|
184263
|
-
|
|
184264
|
-
|
|
184676
|
+
updated: C(
|
|
184677
|
+
r
|
|
184678
|
+
),
|
|
184679
|
+
added: C(
|
|
184680
|
+
a
|
|
184681
|
+
),
|
|
184682
|
+
removed: C(
|
|
184683
|
+
c
|
|
184684
|
+
),
|
|
184265
184685
|
affected: C(
|
|
184266
184686
|
e
|
|
184267
184687
|
),
|
|
@@ -184315,7 +184735,10 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
184315
184735
|
_,
|
|
184316
184736
|
this.project
|
|
184317
184737
|
);
|
|
184318
|
-
N.hydrateAncestors(), N.addSelfToProject(i), i == null || i.add(
|
|
184738
|
+
N.hydrateAncestors(), N.addSelfToProject(i), i == null || i.add(
|
|
184739
|
+
N,
|
|
184740
|
+
H.Added
|
|
184741
|
+
), N.afterAllChildrenInitialized(i), h = !0;
|
|
184319
184742
|
}
|
|
184320
184743
|
const m = si(
|
|
184321
184744
|
this.dataType,
|
|
@@ -184332,9 +184755,15 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
184332
184755
|
} else
|
|
184333
184756
|
this.extends.defaultValue ? this.extends.defaultValue && this.defaultValue && !gDi(this.defaultValue, this.extends.defaultValue) && (this.defaultValue.merge(this.extends.defaultValue, i), r.push(this.defaultValue)) : ((A = this.defaultValue) == null || A.remove({ ignoreUpstream: !0 }, i), this.defaultValue = null, e.push(this));
|
|
184334
184757
|
return i == null || i.attemptAutoclose("sync-with-extension", this.id), {
|
|
184335
|
-
updated: C(
|
|
184336
|
-
|
|
184337
|
-
|
|
184758
|
+
updated: C(
|
|
184759
|
+
r
|
|
184760
|
+
),
|
|
184761
|
+
added: C(
|
|
184762
|
+
a
|
|
184763
|
+
),
|
|
184764
|
+
removed: C(
|
|
184765
|
+
c
|
|
184766
|
+
),
|
|
184338
184767
|
affected: C(
|
|
184339
184768
|
e
|
|
184340
184769
|
),
|
|
@@ -184358,10 +184787,18 @@ This is likely an incorrect strategy, either the '${this.type}' entity doesn't n
|
|
|
184358
184787
|
this.project
|
|
184359
184788
|
);
|
|
184360
184789
|
if (e.hydrateAncestors(), e.addSelfToProject(i), i == null || i.add(e, H.Added), e.initChildren(i), this.dataType)
|
|
184361
|
-
if (this.project.diggestedBuiltInBaseEntitiesIds.has(
|
|
184362
|
-
|
|
184790
|
+
if (this.project.diggestedBuiltInBaseEntitiesIds.has(
|
|
184791
|
+
this.dataType.id
|
|
184792
|
+
))
|
|
184793
|
+
e.setDataType(this.dataType, i), i == null || i.add(
|
|
184794
|
+
e,
|
|
184795
|
+
H.Affected
|
|
184796
|
+
);
|
|
184363
184797
|
else {
|
|
184364
|
-
const f = this.dataType.clone(
|
|
184798
|
+
const f = this.dataType.clone(
|
|
184799
|
+
i,
|
|
184800
|
+
e
|
|
184801
|
+
);
|
|
184365
184802
|
e.setDataType(f, i);
|
|
184366
184803
|
}
|
|
184367
184804
|
if (this.defaultValue) {
|
|
@@ -185394,11 +185831,17 @@ const Pi = class Pi extends nn {
|
|
|
185394
185831
|
const f = [];
|
|
185395
185832
|
i.implements && i.implements.forEach((E) => {
|
|
185396
185833
|
f.push(
|
|
185397
|
-
r.get(E) || r.getBuiltIn(
|
|
185834
|
+
r.get(E) || r.getBuiltIn(
|
|
185835
|
+
E
|
|
185836
|
+
)
|
|
185398
185837
|
);
|
|
185399
185838
|
});
|
|
185400
185839
|
let h = null;
|
|
185401
|
-
i.extends && (h = r.get(
|
|
185840
|
+
i.extends && (h = r.get(
|
|
185841
|
+
i.extends
|
|
185842
|
+
) || r.getBuiltIn(
|
|
185843
|
+
i.extends
|
|
185844
|
+
));
|
|
185402
185845
|
const m = {
|
|
185403
185846
|
id: i.id,
|
|
185404
185847
|
version: x.UUID.uuid(),
|
|
@@ -185437,7 +185880,10 @@ const Pi = class Pi extends nn {
|
|
|
185437
185880
|
let a = JSON.parse(
|
|
185438
185881
|
JSON.stringify(i)
|
|
185439
185882
|
);
|
|
185440
|
-
const c = [], e = [], f = KRi(
|
|
185883
|
+
const c = [], e = [], f = KRi(
|
|
185884
|
+
a,
|
|
185885
|
+
r
|
|
185886
|
+
), h = FF(a, r), m = an(
|
|
185441
185887
|
a
|
|
185442
185888
|
);
|
|
185443
185889
|
e.push(
|
|
@@ -185490,12 +185936,14 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185490
185936
|
}
|
|
185491
185937
|
get allBaseMethodsFromOriginalParents() {
|
|
185492
185938
|
var a;
|
|
185493
|
-
const i = ((a = this.extends) == null ? void 0 : a.type) === d.DefinitionEntity ? this.extends.allMethods : [], r = [...i].filter(
|
|
185494
|
-
(
|
|
185495
|
-
|
|
185496
|
-
|
|
185497
|
-
|
|
185498
|
-
|
|
185939
|
+
const i = ((a = this.extends) == null ? void 0 : a.type) === d.DefinitionEntity ? this.extends.allMethods : [], r = [...i].filter(
|
|
185940
|
+
(c) => !i.some(
|
|
185941
|
+
(e) => {
|
|
185942
|
+
var f, h;
|
|
185943
|
+
return e.id !== c.id && (((f = e.implements) == null ? void 0 : f.id) === c.id || ((h = e.extends) == null ? void 0 : h.id) === c.id);
|
|
185944
|
+
}
|
|
185945
|
+
)
|
|
185946
|
+
);
|
|
185499
185947
|
return C([
|
|
185500
185948
|
...r,
|
|
185501
185949
|
...this.implements.flatMap((c) => {
|
|
@@ -185514,7 +185962,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185514
185962
|
const i = ((c = this.extends) == null ? void 0 : c.allProperties) || [], r = [...i].filter((e) => !i.some(
|
|
185515
185963
|
(f) => {
|
|
185516
185964
|
var h;
|
|
185517
|
-
return f.id !== e.id && (!!f.implements.find(
|
|
185965
|
+
return f.id !== e.id && (!!f.implements.find(
|
|
185966
|
+
(m) => m.id === e.id
|
|
185967
|
+
) || ((h = f.extends) == null ? void 0 : h.id) === e.id);
|
|
185518
185968
|
}
|
|
185519
185969
|
));
|
|
185520
185970
|
return C([
|
|
@@ -185524,7 +185974,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185524
185974
|
return [...f].filter((m) => !f.some(
|
|
185525
185975
|
(b) => {
|
|
185526
185976
|
var E;
|
|
185527
|
-
return b.id !== m.id && (!!b.implements.find(
|
|
185977
|
+
return b.id !== m.id && (!!b.implements.find(
|
|
185978
|
+
(A) => A.id === m.id
|
|
185979
|
+
) || ((E = b.extends) == null ? void 0 : E.id) === m.id);
|
|
185528
185980
|
}
|
|
185529
185981
|
));
|
|
185530
185982
|
})
|
|
@@ -185540,23 +185992,34 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185540
185992
|
(f) => !i.some(
|
|
185541
185993
|
(h) => {
|
|
185542
185994
|
var m;
|
|
185543
|
-
return h.id !== f.id && (!!h.implements.find(
|
|
185995
|
+
return h.id !== f.id && (!!h.implements.find(
|
|
185996
|
+
(b) => b.id === f.id
|
|
185997
|
+
) || ((m = h.extends) == null ? void 0 : m.id) === f.id);
|
|
185544
185998
|
}
|
|
185545
185999
|
)
|
|
185546
|
-
), a = this.implements.reduce(
|
|
185547
|
-
|
|
185548
|
-
|
|
185549
|
-
|
|
185550
|
-
|
|
185551
|
-
|
|
185552
|
-
|
|
185553
|
-
|
|
185554
|
-
|
|
185555
|
-
|
|
185556
|
-
|
|
185557
|
-
|
|
185558
|
-
|
|
185559
|
-
|
|
186000
|
+
), a = this.implements.reduce(
|
|
186001
|
+
(f, h) => {
|
|
186002
|
+
const m = h.implementedPropertiesFromOriginalParents, b = [
|
|
186003
|
+
...h.ownDeclaredProperties
|
|
186004
|
+
].filter((_) => !_.abstract), E = [
|
|
186005
|
+
...m,
|
|
186006
|
+
...b,
|
|
186007
|
+
...f
|
|
186008
|
+
];
|
|
186009
|
+
return [...E].filter(
|
|
186010
|
+
// Filter out properties which are implemented in the current entity
|
|
186011
|
+
(_) => !!!E.find(
|
|
186012
|
+
(V) => {
|
|
186013
|
+
var B;
|
|
186014
|
+
return !!V.implements.find(
|
|
186015
|
+
(M) => M.id === _.id
|
|
186016
|
+
) || ((B = V.extends) == null ? void 0 : B.id) === _.id;
|
|
186017
|
+
}
|
|
186018
|
+
)
|
|
186019
|
+
);
|
|
186020
|
+
},
|
|
186021
|
+
[]
|
|
186022
|
+
);
|
|
185560
186023
|
return C([
|
|
185561
186024
|
...r,
|
|
185562
186025
|
...a
|
|
@@ -185569,14 +186032,18 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185569
186032
|
(i, r) => r.type !== d.DefinitionEntity ? [] : [...[
|
|
185570
186033
|
...r.ownDeclaredMethods,
|
|
185571
186034
|
...r.allBaseMethodsFromExtendedAndImplementedEntities
|
|
185572
|
-
].filter(
|
|
186035
|
+
].filter(
|
|
186036
|
+
(c) => c.type !== d.ActionDescriptor
|
|
186037
|
+
), ...i],
|
|
185573
186038
|
[]
|
|
185574
186039
|
),
|
|
185575
186040
|
...this.implements.reduce(
|
|
185576
186041
|
(i, r) => r.type !== d.DefinitionEntity ? r.abstractMethods : [...[
|
|
185577
186042
|
...r.ownDeclaredMethods,
|
|
185578
186043
|
...r.allBaseMethodsFromExtendedAndImplementedEntities
|
|
185579
|
-
].filter(
|
|
186044
|
+
].filter(
|
|
186045
|
+
(c) => c.type !== d.ActionDescriptor
|
|
186046
|
+
), ...i],
|
|
185580
186047
|
[]
|
|
185581
186048
|
)
|
|
185582
186049
|
]);
|
|
@@ -185589,7 +186056,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185589
186056
|
].filter((e) => !e.abstract), r = [...i].filter((e) => !i.some(
|
|
185590
186057
|
(f) => {
|
|
185591
186058
|
var h;
|
|
185592
|
-
return f.id !== e.id && (!!f.implements.find(
|
|
186059
|
+
return f.id !== e.id && (!!f.implements.find(
|
|
186060
|
+
(m) => m.id === e.id
|
|
186061
|
+
) || ((h = f.extends) == null ? void 0 : h.id) === e.id);
|
|
185593
186062
|
}
|
|
185594
186063
|
));
|
|
185595
186064
|
return C(r);
|
|
@@ -185597,30 +186066,45 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185597
186066
|
get implementedPropertiesFromOriginalParents() {
|
|
185598
186067
|
return C(
|
|
185599
186068
|
[
|
|
185600
|
-
...(this.extends ? [this.extends] : []).reduce(
|
|
185601
|
-
|
|
185602
|
-
|
|
185603
|
-
|
|
185604
|
-
|
|
185605
|
-
|
|
185606
|
-
|
|
185607
|
-
|
|
185608
|
-
|
|
185609
|
-
|
|
185610
|
-
|
|
185611
|
-
|
|
185612
|
-
|
|
185613
|
-
|
|
186069
|
+
...(this.extends ? [this.extends] : []).reduce(
|
|
186070
|
+
(i, r) => {
|
|
186071
|
+
const a = r.implementedPropertiesFromOriginalParents, c = [
|
|
186072
|
+
...r.ownDeclaredProperties
|
|
186073
|
+
].filter((h) => !!h.abstract), e = [
|
|
186074
|
+
...a,
|
|
186075
|
+
...c,
|
|
186076
|
+
...i
|
|
186077
|
+
];
|
|
186078
|
+
return [...e].filter(
|
|
186079
|
+
// Filter out properties which are extended in the current entity
|
|
186080
|
+
(h) => !!!e.find(
|
|
186081
|
+
(b) => {
|
|
186082
|
+
var E;
|
|
186083
|
+
return ((E = b.extends) == null ? void 0 : E.id) === h.id || !!b.implements.find(
|
|
186084
|
+
(A) => A.id === h.id
|
|
186085
|
+
);
|
|
186086
|
+
}
|
|
186087
|
+
)
|
|
186088
|
+
);
|
|
186089
|
+
},
|
|
186090
|
+
[]
|
|
186091
|
+
),
|
|
185614
186092
|
...this.implements.reduce((i, r) => {
|
|
185615
|
-
const a = r.implementedPropertiesFromOriginalParents, c = [
|
|
185616
|
-
|
|
185617
|
-
), e = [
|
|
186093
|
+
const a = r.implementedPropertiesFromOriginalParents, c = [
|
|
186094
|
+
...r.ownDeclaredProperties
|
|
186095
|
+
].filter((h) => !!h.abstract), e = [
|
|
186096
|
+
...a,
|
|
186097
|
+
...c,
|
|
186098
|
+
...i
|
|
186099
|
+
];
|
|
185618
186100
|
return [...e].filter(
|
|
185619
186101
|
// Filter out properties which are implemented in the current entity
|
|
185620
186102
|
(h) => !!!e.find(
|
|
185621
186103
|
(b) => {
|
|
185622
186104
|
var E;
|
|
185623
|
-
return !!b.implements.find(
|
|
186105
|
+
return !!b.implements.find(
|
|
186106
|
+
(A) => A.id === h.id
|
|
186107
|
+
) || ((E = b.extends) == null ? void 0 : E.id) === h.id;
|
|
185624
186108
|
}
|
|
185625
186109
|
)
|
|
185626
186110
|
);
|
|
@@ -185637,7 +186121,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185637
186121
|
const a = [
|
|
185638
186122
|
...r.ownDeclaredMethods,
|
|
185639
186123
|
...r.extendedMethodsFromOriginalParents
|
|
185640
|
-
].filter(
|
|
186124
|
+
].filter(
|
|
186125
|
+
(c) => c.type !== d.ActionDescriptor
|
|
186126
|
+
);
|
|
185641
186127
|
return [...i, ...a];
|
|
185642
186128
|
},
|
|
185643
186129
|
[]
|
|
@@ -185649,8 +186135,12 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185649
186135
|
[
|
|
185650
186136
|
...(this.extends ? [this.extends] : []).reduce(
|
|
185651
186137
|
(i, r) => {
|
|
185652
|
-
const a = r.type === d.DefinitionEntity ? r.methods : [], c = [
|
|
185653
|
-
|
|
186138
|
+
const a = r.type === d.DefinitionEntity ? r.methods : [], c = [
|
|
186139
|
+
...r.abstractMethods
|
|
186140
|
+
].filter(
|
|
186141
|
+
(e) => !a.find(
|
|
186142
|
+
(f) => f.name === e.name
|
|
186143
|
+
)
|
|
185654
186144
|
);
|
|
185655
186145
|
return [...a, ...c, ...i];
|
|
185656
186146
|
},
|
|
@@ -185664,7 +186154,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185664
186154
|
);
|
|
185665
186155
|
}
|
|
185666
186156
|
get extendedProperties() {
|
|
185667
|
-
return this.properties.filter(
|
|
186157
|
+
return this.properties.filter(
|
|
186158
|
+
(i) => i.isExtendedProperty
|
|
186159
|
+
);
|
|
185668
186160
|
}
|
|
185669
186161
|
get ownDeclaredProperties() {
|
|
185670
186162
|
return this.properties.filter(
|
|
@@ -185716,9 +186208,15 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185716
186208
|
const h = f.entity.afterAllChildrenInitialized(i);
|
|
185717
186209
|
r.push(...h.updated), a.push(...h.added), c.push(...h.removed), e.push(...h.affected);
|
|
185718
186210
|
}), i == null || i.attemptAutoclose("sync-dependents", this.id), {
|
|
185719
|
-
updated: C(
|
|
185720
|
-
|
|
185721
|
-
|
|
186211
|
+
updated: C(
|
|
186212
|
+
r
|
|
186213
|
+
),
|
|
186214
|
+
added: C(
|
|
186215
|
+
a
|
|
186216
|
+
),
|
|
186217
|
+
removed: C(
|
|
186218
|
+
c
|
|
186219
|
+
),
|
|
185722
186220
|
affected: C(
|
|
185723
186221
|
e
|
|
185724
186222
|
),
|
|
@@ -185729,10 +186227,19 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185729
186227
|
// The field indicates which field of the current entity is the dependency
|
|
185730
186228
|
onDetachedDependencyRemoved(i, r, a) {
|
|
185731
186229
|
const c = [], e = [], f = [], h = [];
|
|
185732
|
-
return r === "implements" && (this.removeImplementation(
|
|
185733
|
-
|
|
185734
|
-
|
|
185735
|
-
|
|
186230
|
+
return r === "implements" && (this.removeImplementation(
|
|
186231
|
+
i,
|
|
186232
|
+
a
|
|
186233
|
+
), c.push(this)), r === "extends" && (this.setExtension(null, a), c.push(this)), {
|
|
186234
|
+
updated: C(
|
|
186235
|
+
c
|
|
186236
|
+
),
|
|
186237
|
+
added: C(
|
|
186238
|
+
e
|
|
186239
|
+
),
|
|
186240
|
+
removed: C(
|
|
186241
|
+
f
|
|
186242
|
+
),
|
|
185736
186243
|
affected: C(
|
|
185737
186244
|
h
|
|
185738
186245
|
),
|
|
@@ -185743,10 +186250,19 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185743
186250
|
// The field indicates which field of the current entity is the dependency
|
|
185744
186251
|
onDetachedDependencyRestored(i, r, a) {
|
|
185745
186252
|
const c = [], e = [], f = [], h = [];
|
|
185746
|
-
return r === "implements" && (this.addImplementation(
|
|
185747
|
-
|
|
185748
|
-
|
|
185749
|
-
|
|
186253
|
+
return r === "implements" && (this.addImplementation(
|
|
186254
|
+
i,
|
|
186255
|
+
a
|
|
186256
|
+
), c.push(this)), r === "extends" && (this.setExtension(i, a), c.push(this)), {
|
|
186257
|
+
updated: C(
|
|
186258
|
+
c
|
|
186259
|
+
),
|
|
186260
|
+
added: C(
|
|
186261
|
+
e
|
|
186262
|
+
),
|
|
186263
|
+
removed: C(
|
|
186264
|
+
f
|
|
186265
|
+
),
|
|
185750
186266
|
affected: C(
|
|
185751
186267
|
h
|
|
185752
186268
|
),
|
|
@@ -185852,9 +186368,15 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185852
186368
|
r.push(this.parent, ...f.updated), a.push(...f.added), c.push(...f.removed);
|
|
185853
186369
|
}
|
|
185854
186370
|
return {
|
|
185855
|
-
updated: C(
|
|
185856
|
-
|
|
185857
|
-
|
|
186371
|
+
updated: C(
|
|
186372
|
+
r
|
|
186373
|
+
),
|
|
186374
|
+
added: C(
|
|
186375
|
+
a
|
|
186376
|
+
),
|
|
186377
|
+
removed: C(
|
|
186378
|
+
c
|
|
186379
|
+
),
|
|
185858
186380
|
affected: C(
|
|
185859
186381
|
e
|
|
185860
186382
|
),
|
|
@@ -185877,7 +186399,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185877
186399
|
updated: C(
|
|
185878
186400
|
a
|
|
185879
186401
|
),
|
|
185880
|
-
added: C(
|
|
186402
|
+
added: C(
|
|
186403
|
+
c
|
|
186404
|
+
),
|
|
185881
186405
|
removed: C(
|
|
185882
186406
|
e
|
|
185883
186407
|
),
|
|
@@ -185913,9 +186437,15 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185913
186437
|
);
|
|
185914
186438
|
}
|
|
185915
186439
|
return this.metaSync(h.toShallowJSON(), null), this.previousVersion = h.previousVersion, this.version = h.version, this.createdAt = h.createdAt, this.author = h.author, this.deleted = h.deleted, this.properties = [...h.properties], this.methods = [...h.methods], this.abstractMethods = [...h.abstractMethods], this.extends = h.extends, this.implements = [...h.implements], this.allPropertiesImplement = h.allPropertiesImplement, this.additionalPropertiesDataType = h.additionalPropertiesDataType, this.parent = h.parent, {
|
|
185916
|
-
updated: C(
|
|
185917
|
-
|
|
185918
|
-
|
|
186440
|
+
updated: C(
|
|
186441
|
+
a
|
|
186442
|
+
),
|
|
186443
|
+
added: C(
|
|
186444
|
+
c
|
|
186445
|
+
),
|
|
186446
|
+
removed: C(
|
|
186447
|
+
e
|
|
186448
|
+
),
|
|
185919
186449
|
affected: C(
|
|
185920
186450
|
f
|
|
185921
186451
|
),
|
|
@@ -185954,9 +186484,13 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185954
186484
|
throw r == null || r.attemptAutoclose(
|
|
185955
186485
|
D.UpdateWithShallowTransfer,
|
|
185956
186486
|
this.id
|
|
185957
|
-
), new Error(
|
|
186487
|
+
), new Error(
|
|
186488
|
+
`${this.type} with id '${this.id}' must have a 'parent'`
|
|
186489
|
+
);
|
|
185958
186490
|
if (i.extends) {
|
|
185959
|
-
const f = te(
|
|
186491
|
+
const f = te(
|
|
186492
|
+
i.extends
|
|
186493
|
+
), h = this.project.get(f);
|
|
185960
186494
|
h && this.setExtension(h, r);
|
|
185961
186495
|
} else
|
|
185962
186496
|
this.setExtension(null, r);
|
|
@@ -185968,12 +186502,14 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185968
186502
|
throw new Error(
|
|
185969
186503
|
`${Tr(this.type)} with id '${this.id}' has a 'implements' reference "${h}" which is missing in the project`
|
|
185970
186504
|
);
|
|
185971
|
-
}), this.implements.filter(
|
|
185972
|
-
|
|
185973
|
-
|
|
185974
|
-
|
|
185975
|
-
|
|
185976
|
-
|
|
186505
|
+
}), this.implements.filter(
|
|
186506
|
+
(f) => {
|
|
186507
|
+
const h = te(
|
|
186508
|
+
f
|
|
186509
|
+
);
|
|
186510
|
+
return !i.implements.find((m) => te(m) === h);
|
|
186511
|
+
}
|
|
186512
|
+
).forEach((f) => {
|
|
185977
186513
|
this.removeImplementation(f, r);
|
|
185978
186514
|
}), i.methods.forEach((f) => {
|
|
185979
186515
|
const h = te(f), m = this.project.get(
|
|
@@ -185986,7 +186522,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185986
186522
|
}).forEach((f) => {
|
|
185987
186523
|
this.removeMethod(f, r);
|
|
185988
186524
|
}), i.properties.forEach((f) => {
|
|
185989
|
-
const h = te(f), m = this.project.get(
|
|
186525
|
+
const h = te(f), m = this.project.get(
|
|
186526
|
+
h
|
|
186527
|
+
);
|
|
185990
186528
|
m && this.addProperty(m, r);
|
|
185991
186529
|
}), this.properties.filter((f) => {
|
|
185992
186530
|
const h = te(f);
|
|
@@ -185996,14 +186534,18 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
185996
186534
|
}), i.allPropertiesImplement) {
|
|
185997
186535
|
const f = te(
|
|
185998
186536
|
i.allPropertiesImplement
|
|
185999
|
-
), h = this.project.get(
|
|
186537
|
+
), h = this.project.get(
|
|
186538
|
+
f
|
|
186539
|
+
);
|
|
186000
186540
|
h && this.setAllPropertiesImplement(h, r);
|
|
186001
186541
|
} else
|
|
186002
186542
|
this.setAllPropertiesImplement(null, r);
|
|
186003
186543
|
if (i.additionalPropertiesDataType) {
|
|
186004
186544
|
const f = te(
|
|
186005
186545
|
i.additionalPropertiesDataType
|
|
186006
|
-
), h = this.project.get(
|
|
186546
|
+
), h = this.project.get(
|
|
186547
|
+
f
|
|
186548
|
+
);
|
|
186007
186549
|
h && this.setAdditionalPropertiesDataType(h, r);
|
|
186008
186550
|
} else
|
|
186009
186551
|
this.setAdditionalPropertiesDataType(null, r);
|
|
@@ -186043,7 +186585,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186043
186585
|
);
|
|
186044
186586
|
}
|
|
186045
186587
|
if (i.extends) {
|
|
186046
|
-
const c = te(
|
|
186588
|
+
const c = te(
|
|
186589
|
+
i.extends
|
|
186590
|
+
), e = this.project.get(c);
|
|
186047
186591
|
if (e)
|
|
186048
186592
|
this.setExtension(e, r);
|
|
186049
186593
|
else
|
|
@@ -186065,7 +186609,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186065
186609
|
const f = te(
|
|
186066
186610
|
e
|
|
186067
186611
|
);
|
|
186068
|
-
return !(i.implements || []).find((h) => te(
|
|
186612
|
+
return !(i.implements || []).find((h) => te(
|
|
186613
|
+
h
|
|
186614
|
+
) === f);
|
|
186069
186615
|
}
|
|
186070
186616
|
).forEach((e) => {
|
|
186071
186617
|
this.removeImplementation(e, r);
|
|
@@ -186087,7 +186633,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186087
186633
|
`${this.type} with id '${this.id}' has a 'parent' reference '${e}' that isn't found in the project`
|
|
186088
186634
|
);
|
|
186089
186635
|
} else
|
|
186090
|
-
throw new Error(
|
|
186636
|
+
throw new Error(
|
|
186637
|
+
`${this.type} with id '${this.id}' must have a 'parent'`
|
|
186638
|
+
);
|
|
186091
186639
|
if (this.initialData.extends) {
|
|
186092
186640
|
const e = te(
|
|
186093
186641
|
this.initialData.extends
|
|
@@ -186103,9 +186651,15 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186103
186651
|
`${Tr(this.type)} with id '${this.id}' has a 'implements' reference "${f}" which is missing in the project`
|
|
186104
186652
|
);
|
|
186105
186653
|
}), {
|
|
186106
|
-
updated: C(
|
|
186107
|
-
|
|
186108
|
-
|
|
186654
|
+
updated: C(
|
|
186655
|
+
i
|
|
186656
|
+
),
|
|
186657
|
+
added: C(
|
|
186658
|
+
r
|
|
186659
|
+
),
|
|
186660
|
+
removed: C(
|
|
186661
|
+
a
|
|
186662
|
+
),
|
|
186109
186663
|
affected: C(
|
|
186110
186664
|
c
|
|
186111
186665
|
),
|
|
@@ -186176,7 +186730,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186176
186730
|
added: Y,
|
|
186177
186731
|
removed: oe
|
|
186178
186732
|
} = this.removeUnrecognizedMethods(i);
|
|
186179
|
-
r.push(...z), a.push(...Y), c.push(...oe), this.addSuggestions(), this.properties.
|
|
186733
|
+
r.push(...z), a.push(...Y), c.push(...oe), this.addSuggestions(), this.properties.forEach((fe) => {
|
|
186734
|
+
this.static && !fe.static && fe.metaSync({ static: !0 }, i);
|
|
186735
|
+
}), this.properties.sort((fe, Ee) => fe.index - Ee.index);
|
|
186180
186736
|
let he = this.project.getDefinitionEntities(
|
|
186181
186737
|
/* @__PURE__ */ new Set([this.id])
|
|
186182
186738
|
).filter(
|
|
@@ -186189,16 +186745,25 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186189
186745
|
}), he = he.filter(
|
|
186190
186746
|
(Ee) => Ee.name.toLowerCase() === this.name.toLowerCase()
|
|
186191
186747
|
)), he.length)) {
|
|
186192
|
-
const fe = rp(
|
|
186748
|
+
const fe = rp(
|
|
186749
|
+
this.name,
|
|
186750
|
+
he
|
|
186751
|
+
);
|
|
186193
186752
|
this.metaSync({ name: fe }, i);
|
|
186194
186753
|
}
|
|
186195
186754
|
return i == null || i.attemptAutoclose(
|
|
186196
186755
|
D.AfterAllChildrenInitialized,
|
|
186197
186756
|
this.id
|
|
186198
186757
|
), {
|
|
186199
|
-
updated: C(
|
|
186200
|
-
|
|
186201
|
-
|
|
186758
|
+
updated: C(
|
|
186759
|
+
r
|
|
186760
|
+
),
|
|
186761
|
+
added: C(
|
|
186762
|
+
a
|
|
186763
|
+
),
|
|
186764
|
+
removed: C(
|
|
186765
|
+
c
|
|
186766
|
+
),
|
|
186202
186767
|
affected: C(
|
|
186203
186768
|
e
|
|
186204
186769
|
),
|
|
@@ -186223,9 +186788,15 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186223
186788
|
} else
|
|
186224
186789
|
this.project.addDefinitionEntity(this);
|
|
186225
186790
|
return this.subscribe(), this.subscribeToDependencies(), i == null || i.attemptAutoclose("add-self-to-project", this.id), {
|
|
186226
|
-
updated: C(
|
|
186227
|
-
|
|
186228
|
-
|
|
186791
|
+
updated: C(
|
|
186792
|
+
r
|
|
186793
|
+
),
|
|
186794
|
+
added: C(
|
|
186795
|
+
a
|
|
186796
|
+
),
|
|
186797
|
+
removed: C(
|
|
186798
|
+
c
|
|
186799
|
+
),
|
|
186229
186800
|
affected: C(
|
|
186230
186801
|
e
|
|
186231
186802
|
),
|
|
@@ -186263,7 +186834,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186263
186834
|
var a;
|
|
186264
186835
|
return this.checkCanEdit(this, r) ? (((a = this.extends) == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (this.extends = i, this.subscribeToDependencies(), r && (r == null || r.add(this, H.Updated))), r == null || r.attemptAutoclose(D.SetExtension, this.id), this) : (ce.warn(
|
|
186265
186836
|
`[setExtension] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
186266
|
-
), r == null || r.attemptAutoclose(
|
|
186837
|
+
), r == null || r.attemptAutoclose(
|
|
186838
|
+
D.SetExtension,
|
|
186839
|
+
this.id
|
|
186840
|
+
), this);
|
|
186267
186841
|
}
|
|
186268
186842
|
addImplementation(i, r = this.project.addChangeSet(
|
|
186269
186843
|
new Z(
|
|
@@ -186275,7 +186849,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186275
186849
|
D.AddImplementation
|
|
186276
186850
|
)
|
|
186277
186851
|
)) {
|
|
186278
|
-
return this.checkCanEdit(this, r) ? (this.implements.includes(i) || (this.implements.push(i), this.subscribeToDependencies(), r == null || r.add(this, H.Updated)), r == null || r.attemptAutoclose(
|
|
186852
|
+
return this.checkCanEdit(this, r) ? (this.implements.includes(i) || (this.implements.push(i), this.subscribeToDependencies(), r == null || r.add(this, H.Updated)), r == null || r.attemptAutoclose(
|
|
186853
|
+
D.AddImplementation,
|
|
186854
|
+
this.id
|
|
186855
|
+
), this) : (ce.warn(
|
|
186279
186856
|
`[addImplementation] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
186280
186857
|
), r == null || r.attemptAutoclose(
|
|
186281
186858
|
D.AddImplementation,
|
|
@@ -186312,9 +186889,17 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186312
186889
|
D.RemoveProperty
|
|
186313
186890
|
)
|
|
186314
186891
|
)) {
|
|
186315
|
-
return this.checkCanEdit(this, r) ? (this.properties.includes(i) && (this.properties = this.properties.filter(
|
|
186892
|
+
return this.checkCanEdit(this, r) ? (this.properties.includes(i) && (this.properties = this.properties.filter(
|
|
186893
|
+
(a) => a.id !== i.id
|
|
186894
|
+
), r == null || r.add(this, H.Updated)), r == null || r.attemptAutoclose(
|
|
186895
|
+
D.RemoveProperty,
|
|
186896
|
+
this.id
|
|
186897
|
+
), this) : (ce.warn(
|
|
186316
186898
|
`[removeProperty] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
186317
|
-
), r == null || r.attemptAutoclose(
|
|
186899
|
+
), r == null || r.attemptAutoclose(
|
|
186900
|
+
D.RemoveProperty,
|
|
186901
|
+
this.id
|
|
186902
|
+
), this);
|
|
186318
186903
|
}
|
|
186319
186904
|
addMethod(i, r = this.project.addChangeSet(
|
|
186320
186905
|
new Z(
|
|
@@ -186344,7 +186929,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186344
186929
|
)) {
|
|
186345
186930
|
return this.checkCanEdit(this, r) ? (this.methods.includes(i) && (this.methods = this.methods.filter((a) => a.id !== i.id), r == null || r.add(this, H.Updated)), r == null || r.attemptAutoclose(D.RemoveMethod, this.id), this) : (ce.warn(
|
|
186346
186931
|
`[removeMethod] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
186347
|
-
), r == null || r.attemptAutoclose(
|
|
186932
|
+
), r == null || r.attemptAutoclose(
|
|
186933
|
+
D.RemoveMethod,
|
|
186934
|
+
this.id
|
|
186935
|
+
), this);
|
|
186348
186936
|
}
|
|
186349
186937
|
addProperty(i, r = this.project.addChangeSet(
|
|
186350
186938
|
new Z(
|
|
@@ -186360,7 +186948,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186360
186948
|
(a) => a.name !== i.name
|
|
186361
186949
|
), r == null || r.add(this, H.Updated)), r == null || r.attemptAutoclose(D.AddProperty, this.id), this) : (ce.warn(
|
|
186362
186950
|
`[addProperty] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
186363
|
-
), r == null || r.attemptAutoclose(
|
|
186951
|
+
), r == null || r.attemptAutoclose(
|
|
186952
|
+
D.AddProperty,
|
|
186953
|
+
this.id
|
|
186954
|
+
), this);
|
|
186364
186955
|
}
|
|
186365
186956
|
addSuggestedProperty(i) {
|
|
186366
186957
|
return this.suggestedProperties.includes(i) || this.suggestedProperties.push(i), this;
|
|
@@ -186388,7 +186979,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186388
186979
|
D.AddAbstractMethod
|
|
186389
186980
|
)
|
|
186390
186981
|
)) {
|
|
186391
|
-
return this.checkCanEdit(this, r) ? (this.abstractMethods.includes(i) || (this.abstractMethods.push(i), r == null || r.add(this, H.Updated)), r == null || r.attemptAutoclose(
|
|
186982
|
+
return this.checkCanEdit(this, r) ? (this.abstractMethods.includes(i) || (this.abstractMethods.push(i), r == null || r.add(this, H.Updated)), r == null || r.attemptAutoclose(
|
|
186983
|
+
D.AddAbstractMethod,
|
|
186984
|
+
this.id
|
|
186985
|
+
), this) : (ce.warn(
|
|
186392
186986
|
`[addAbstractMethod] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
186393
186987
|
), r == null || r.attemptAutoclose(
|
|
186394
186988
|
D.AddAbstractMethod,
|
|
@@ -186488,14 +187082,27 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186488
187082
|
), f = f.filter((E) => !E.isExtendedProperty);
|
|
186489
187083
|
const h = this.implementedPropertiesFromOriginalParents, m = this.getAllPropertiesImplements();
|
|
186490
187084
|
return f.filter((E) => this.interactive && !E.implements.length ? !1 : !E.implements.find(
|
|
186491
|
-
(_) => !!h.find(
|
|
187085
|
+
(_) => !!h.find(
|
|
187086
|
+
(N) => N.id === _.id
|
|
187087
|
+
) || !!m.find(
|
|
187088
|
+
(N) => N.id === _.id
|
|
187089
|
+
)
|
|
186492
187090
|
)).forEach((E) => {
|
|
186493
|
-
const A = E.remove(
|
|
187091
|
+
const A = E.remove(
|
|
187092
|
+
{ ignoreUpstream: !1 },
|
|
187093
|
+
i
|
|
187094
|
+
);
|
|
186494
187095
|
c.push(...A.removed), r.push(...A.updated);
|
|
186495
187096
|
}), i == null || i.attemptAutoclose("remove-unrecognized-properties", this.id), {
|
|
186496
|
-
updated: C(
|
|
186497
|
-
|
|
186498
|
-
|
|
187097
|
+
updated: C(
|
|
187098
|
+
r
|
|
187099
|
+
),
|
|
187100
|
+
added: C(
|
|
187101
|
+
a
|
|
187102
|
+
),
|
|
187103
|
+
removed: C(
|
|
187104
|
+
c
|
|
187105
|
+
),
|
|
186499
187106
|
affected: C(
|
|
186500
187107
|
e
|
|
186501
187108
|
),
|
|
@@ -186514,7 +187121,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186514
187121
|
)) {
|
|
186515
187122
|
const r = [], a = [], c = [], e = [];
|
|
186516
187123
|
let f = [...this.methods];
|
|
186517
|
-
f = f.filter(
|
|
187124
|
+
f = f.filter(
|
|
187125
|
+
(m) => m.parent.id === this.id
|
|
187126
|
+
), f = f.filter((m) => !m.isExtendedMethod);
|
|
186518
187127
|
const h = this.implementedMethodsFromOriginalParents;
|
|
186519
187128
|
return f = f.filter((m) => this.interactive && !m.implements ? !1 : !h.find(
|
|
186520
187129
|
(b) => {
|
|
@@ -186525,9 +187134,15 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186525
187134
|
const b = m.remove({ ignoreUpstream: !1 }, i);
|
|
186526
187135
|
c.push(...b.removed), r.push(...b.updated);
|
|
186527
187136
|
}), i == null || i.attemptAutoclose("remove-unrecognized-methods", this.id), {
|
|
186528
|
-
updated: C(
|
|
186529
|
-
|
|
186530
|
-
|
|
187137
|
+
updated: C(
|
|
187138
|
+
r
|
|
187139
|
+
),
|
|
187140
|
+
added: C(
|
|
187141
|
+
a
|
|
187142
|
+
),
|
|
187143
|
+
removed: C(
|
|
187144
|
+
c
|
|
187145
|
+
),
|
|
186531
187146
|
affected: C(
|
|
186532
187147
|
e
|
|
186533
187148
|
),
|
|
@@ -186549,52 +187164,62 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186549
187164
|
...this.allBaseMethodsFromExtendedAndImplementedEntities,
|
|
186550
187165
|
...f
|
|
186551
187166
|
];
|
|
186552
|
-
return h.filter(
|
|
186553
|
-
(
|
|
186554
|
-
|
|
186555
|
-
|
|
186556
|
-
|
|
186557
|
-
)).forEach((E) => {
|
|
186558
|
-
if (this.methods.find(
|
|
186559
|
-
(V) => {
|
|
186560
|
-
var B;
|
|
186561
|
-
return ((B = V.implements) == null ? void 0 : B.id) === E.id;
|
|
187167
|
+
return h.filter(
|
|
187168
|
+
(E) => !m.find(
|
|
187169
|
+
(_) => {
|
|
187170
|
+
var N;
|
|
187171
|
+
return ((N = _.implements) == null ? void 0 : N.id) === E.id;
|
|
186562
187172
|
}
|
|
186563
|
-
)
|
|
186564
|
-
|
|
186565
|
-
|
|
186566
|
-
|
|
186567
|
-
|
|
186568
|
-
|
|
186569
|
-
|
|
186570
|
-
|
|
186571
|
-
|
|
186572
|
-
|
|
186573
|
-
|
|
186574
|
-
|
|
186575
|
-
|
|
186576
|
-
|
|
186577
|
-
|
|
186578
|
-
|
|
186579
|
-
|
|
186580
|
-
|
|
186581
|
-
|
|
186582
|
-
|
|
186583
|
-
|
|
186584
|
-
|
|
186585
|
-
|
|
186586
|
-
|
|
186587
|
-
|
|
186588
|
-
|
|
187173
|
+
)
|
|
187174
|
+
).forEach(
|
|
187175
|
+
(E) => {
|
|
187176
|
+
if (this.methods.find(
|
|
187177
|
+
(V) => {
|
|
187178
|
+
var B;
|
|
187179
|
+
return ((B = V.implements) == null ? void 0 : B.id) === E.id;
|
|
187180
|
+
}
|
|
187181
|
+
))
|
|
187182
|
+
return;
|
|
187183
|
+
const _ = this.methods.find((V) => {
|
|
187184
|
+
var re, J;
|
|
187185
|
+
if (V.name === E.name && !V.implements)
|
|
187186
|
+
return !0;
|
|
187187
|
+
const B = pi(
|
|
187188
|
+
this,
|
|
187189
|
+
Ie.CRON_JOB
|
|
187190
|
+
), M = pi(
|
|
187191
|
+
this,
|
|
187192
|
+
Ie.HTTP_ENDPOINT
|
|
187193
|
+
), k = ((re = V.implements) == null ? void 0 : re.id) === ie["built-in-base-entity"].BUILT_IN_HTTP_ENDPOINT_ENTITY.methods.handler.id, q = ((J = V.implements) == null ? void 0 : J.id) === ie["built-in-base-entity"].BUILT_IN_CRON_JOB_ENTITY.methods.handler.id;
|
|
187194
|
+
return !!(B && !q && !M && k || M && !k && !B && q);
|
|
187195
|
+
});
|
|
187196
|
+
if (_ && _.type === d.FunctionDeclaration) {
|
|
187197
|
+
_.setImplements(E, i), _.metaSync(
|
|
187198
|
+
{
|
|
187199
|
+
name: E.name
|
|
187200
|
+
},
|
|
187201
|
+
i
|
|
187202
|
+
), i == null || i.add(
|
|
187203
|
+
_,
|
|
187204
|
+
H.Updated
|
|
187205
|
+
), i == null || i.add(this, H.Updated);
|
|
187206
|
+
return;
|
|
187207
|
+
}
|
|
187208
|
+
const N = E.implementAsFunctionDeclaration(i, this);
|
|
187209
|
+
a.push(N), i == null || i.add(N, H.Added), this.addMethod(N, i);
|
|
186589
187210
|
}
|
|
186590
|
-
|
|
186591
|
-
a.push(N), i == null || i.add(N, H.Added), this.addMethod(N, i);
|
|
186592
|
-
}), this.methods.sort((E, A) => E.index - A.index).forEach((E) => {
|
|
187211
|
+
), this.methods.sort((E, A) => E.index - A.index).forEach((E) => {
|
|
186593
187212
|
E.afterAllChildrenInitialized(i);
|
|
186594
187213
|
}), i == null || i.attemptAutoclose("sync-implementation-methods", this.id), {
|
|
186595
|
-
updated: C(
|
|
186596
|
-
|
|
186597
|
-
|
|
187214
|
+
updated: C(
|
|
187215
|
+
r
|
|
187216
|
+
),
|
|
187217
|
+
added: C(
|
|
187218
|
+
a
|
|
187219
|
+
),
|
|
187220
|
+
removed: C(
|
|
187221
|
+
c
|
|
187222
|
+
),
|
|
186598
187223
|
affected: C(
|
|
186599
187224
|
e
|
|
186600
187225
|
),
|
|
@@ -186631,7 +187256,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186631
187256
|
added: B,
|
|
186632
187257
|
removed: M,
|
|
186633
187258
|
affected: k
|
|
186634
|
-
} = E.syncWithImplementation(
|
|
187259
|
+
} = E.syncWithImplementation(
|
|
187260
|
+
i
|
|
187261
|
+
);
|
|
186635
187262
|
r.push(...V), a.push(...B), c.push(...M), e.push(...k);
|
|
186636
187263
|
return;
|
|
186637
187264
|
}
|
|
@@ -186643,7 +187270,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186643
187270
|
(V) => V.name === b.name && !!V.abstract && !V.implements
|
|
186644
187271
|
);
|
|
186645
187272
|
if (_) {
|
|
186646
|
-
_.addImplementation(b, i), _.metaSync(
|
|
187273
|
+
_.addImplementation(b, i), _.metaSync(
|
|
187274
|
+
{ abstract: !1 },
|
|
187275
|
+
i
|
|
187276
|
+
), _.afterAllChildrenInitialized(i);
|
|
186647
187277
|
return;
|
|
186648
187278
|
}
|
|
186649
187279
|
const N = b.implement(
|
|
@@ -186652,13 +187282,21 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186652
187282
|
x.UUID.uuid()
|
|
186653
187283
|
);
|
|
186654
187284
|
a.push(N), i == null || i.add(N, H.Added);
|
|
186655
|
-
}), this.properties.find(
|
|
186656
|
-
|
|
186657
|
-
|
|
186658
|
-
|
|
186659
|
-
|
|
186660
|
-
|
|
186661
|
-
|
|
187285
|
+
}), this.properties.find(
|
|
187286
|
+
(b) => {
|
|
187287
|
+
var E;
|
|
187288
|
+
return b.id === ((E = this.allPropertiesImplement) == null ? void 0 : E.id);
|
|
187289
|
+
}
|
|
187290
|
+
) && this.removeAllPropertiesImplement(i), i == null || i.attemptAutoclose("sync-implementation-properties", this.id), {
|
|
187291
|
+
updated: C(
|
|
187292
|
+
r
|
|
187293
|
+
),
|
|
187294
|
+
added: C(
|
|
187295
|
+
a
|
|
187296
|
+
),
|
|
187297
|
+
removed: C(
|
|
187298
|
+
c
|
|
187299
|
+
),
|
|
186662
187300
|
affected: C(
|
|
186663
187301
|
e
|
|
186664
187302
|
),
|
|
@@ -186693,9 +187331,15 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186693
187331
|
);
|
|
186694
187332
|
A.setExtends(E, i), A.initChildren(i), a.push(A), i == null || i.add(A, H.Added), this.addMethod(A, i);
|
|
186695
187333
|
}), i == null || i.attemptAutoclose("add-extended-methods", this.id), {
|
|
186696
|
-
updated: C(
|
|
186697
|
-
|
|
186698
|
-
|
|
187334
|
+
updated: C(
|
|
187335
|
+
r
|
|
187336
|
+
),
|
|
187337
|
+
added: C(
|
|
187338
|
+
a
|
|
187339
|
+
),
|
|
187340
|
+
removed: C(
|
|
187341
|
+
c
|
|
187342
|
+
),
|
|
186699
187343
|
affected: C(
|
|
186700
187344
|
e
|
|
186701
187345
|
),
|
|
@@ -186741,16 +187385,25 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186741
187385
|
(N) => !!E.implements.find((V) => V.id === N.id)
|
|
186742
187386
|
)
|
|
186743
187387
|
)) {
|
|
186744
|
-
const _ = E.remove(
|
|
187388
|
+
const _ = E.remove(
|
|
187389
|
+
{ ignoreUpstream: !1 },
|
|
187390
|
+
i
|
|
187391
|
+
);
|
|
186745
187392
|
c.push(..._.removed), r.push(..._.updated);
|
|
186746
187393
|
}
|
|
186747
187394
|
}), this.properties.forEach((E) => {
|
|
186748
187395
|
const A = E.afterAllChildrenInitialized(i);
|
|
186749
187396
|
r.push(...A.updated), e.push(...A.affected), a.push(...A.added), c.push(...A.removed);
|
|
186750
187397
|
}), i == null || i.attemptAutoclose("add-extended-properties", this.id), {
|
|
186751
|
-
updated: C(
|
|
186752
|
-
|
|
186753
|
-
|
|
187398
|
+
updated: C(
|
|
187399
|
+
r
|
|
187400
|
+
),
|
|
187401
|
+
added: C(
|
|
187402
|
+
a
|
|
187403
|
+
),
|
|
187404
|
+
removed: C(
|
|
187405
|
+
c
|
|
187406
|
+
),
|
|
186754
187407
|
affected: C(
|
|
186755
187408
|
e
|
|
186756
187409
|
),
|
|
@@ -186761,10 +187414,7 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186761
187414
|
// are references by a property or method (respectively) declared in this entity
|
|
186762
187415
|
addSuggestions() {
|
|
186763
187416
|
return this.implements.forEach((i) => {
|
|
186764
|
-
n5(
|
|
186765
|
-
this,
|
|
186766
|
-
i
|
|
186767
|
-
).forEach((c) => {
|
|
187417
|
+
n5(this, i).forEach((c) => {
|
|
186768
187418
|
const e = c.toJSON();
|
|
186769
187419
|
e.id = `_suggestion--parent--${this.id}--${c.id}`;
|
|
186770
187420
|
const f = Re(
|
|
@@ -186885,10 +187535,19 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186885
187535
|
const f = this.parent.setEntity(null, i);
|
|
186886
187536
|
r.push(f);
|
|
186887
187537
|
}
|
|
186888
|
-
return i == null || i.attemptAutoclose(
|
|
186889
|
-
|
|
186890
|
-
|
|
186891
|
-
|
|
187538
|
+
return i == null || i.attemptAutoclose(
|
|
187539
|
+
D.RemoveFromParent,
|
|
187540
|
+
this.id
|
|
187541
|
+
), {
|
|
187542
|
+
added: C(
|
|
187543
|
+
c
|
|
187544
|
+
),
|
|
187545
|
+
updated: C(
|
|
187546
|
+
r
|
|
187547
|
+
),
|
|
187548
|
+
removed: C(
|
|
187549
|
+
a
|
|
187550
|
+
),
|
|
186892
187551
|
affected: C(
|
|
186893
187552
|
e
|
|
186894
187553
|
),
|
|
@@ -186922,7 +187581,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186922
187581
|
owner: this,
|
|
186923
187582
|
errorReason: Be.ActionOwnerEntityNonDeletable,
|
|
186924
187583
|
rootAction: ((h = r == null ? void 0 : r.self) == null ? void 0 : h.id) === this.id && (r == null ? void 0 : r.actionName) === D.RemoveEntity
|
|
186925
|
-
}), r == null || r.attemptAutoclose(
|
|
187584
|
+
}), r == null || r.attemptAutoclose(
|
|
187585
|
+
D.RemoveEntity,
|
|
187586
|
+
this.id
|
|
187587
|
+
), {
|
|
186926
187588
|
added: [],
|
|
186927
187589
|
updated: [],
|
|
186928
187590
|
removed: [],
|
|
@@ -186931,7 +187593,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186931
187593
|
};
|
|
186932
187594
|
const a = [], c = [], e = [], f = [];
|
|
186933
187595
|
if (r != null && r.hasRemoved(this.id))
|
|
186934
|
-
return r == null || r.attemptAutoclose(
|
|
187596
|
+
return r == null || r.attemptAutoclose(
|
|
187597
|
+
D.RemoveEntity,
|
|
187598
|
+
this.id
|
|
187599
|
+
), {
|
|
186935
187600
|
added: [],
|
|
186936
187601
|
updated: [],
|
|
186937
187602
|
removed: [],
|
|
@@ -186994,9 +187659,15 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
186994
187659
|
e.push(...m.added), a.push(...m.updated), c.push(...m.removed), f.push(...m.affected);
|
|
186995
187660
|
}
|
|
186996
187661
|
return r == null || r.attemptAutoclose(D.RemoveEntity, this.id), {
|
|
186997
|
-
added: C(
|
|
186998
|
-
|
|
186999
|
-
|
|
187662
|
+
added: C(
|
|
187663
|
+
e
|
|
187664
|
+
),
|
|
187665
|
+
updated: C(
|
|
187666
|
+
a
|
|
187667
|
+
),
|
|
187668
|
+
removed: C(
|
|
187669
|
+
c
|
|
187670
|
+
),
|
|
187000
187671
|
affected: C(
|
|
187001
187672
|
f
|
|
187002
187673
|
),
|
|
@@ -187019,9 +187690,27 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187019
187690
|
if (!this.checkCanEdit(this, i))
|
|
187020
187691
|
return ce.warn(
|
|
187021
187692
|
`[restore] User is not allowed to edit this ${this.type} entity with id: ${this.id}`
|
|
187022
|
-
), i == null || i.attemptAutoclose(
|
|
187693
|
+
), i == null || i.attemptAutoclose(
|
|
187694
|
+
D.RestoreEntity,
|
|
187695
|
+
this.id
|
|
187696
|
+
), {
|
|
187697
|
+
added: [],
|
|
187698
|
+
updated: [],
|
|
187699
|
+
removed: [],
|
|
187700
|
+
affected: [],
|
|
187701
|
+
self: this
|
|
187702
|
+
};
|
|
187023
187703
|
const r = [], a = [], c = [], e = [];
|
|
187024
|
-
return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(
|
|
187704
|
+
return i != null && i.hasAdded(this.id) ? (i == null || i.attemptAutoclose(
|
|
187705
|
+
D.RestoreEntity,
|
|
187706
|
+
this.id
|
|
187707
|
+
), {
|
|
187708
|
+
added: [],
|
|
187709
|
+
updated: [],
|
|
187710
|
+
removed: [],
|
|
187711
|
+
affected: [],
|
|
187712
|
+
self: this
|
|
187713
|
+
}) : (this.subscribe(), this.project.unsubscribeDeletedInstance(this), this.metaSync({ deleted: !1 }, i), Object.values(this.detachedDependents).forEach((f) => {
|
|
187025
187714
|
const {
|
|
187026
187715
|
updated: h,
|
|
187027
187716
|
removed: m,
|
|
@@ -187033,7 +187722,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187033
187722
|
);
|
|
187034
187723
|
a.push(...h), c.push(...m), r.push(...b);
|
|
187035
187724
|
}), this.properties.forEach((f) => {
|
|
187036
|
-
const { updated: h } = f.restore(
|
|
187725
|
+
const { updated: h } = f.restore(
|
|
187726
|
+
{},
|
|
187727
|
+
i
|
|
187728
|
+
);
|
|
187037
187729
|
a.push(...h);
|
|
187038
187730
|
}), this.methods.forEach((f) => {
|
|
187039
187731
|
const { updated: h } = f.restore({}, i);
|
|
@@ -187045,15 +187737,24 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187045
187737
|
);
|
|
187046
187738
|
a.push(...h);
|
|
187047
187739
|
}), this.suggestedProperties.forEach((f) => {
|
|
187048
|
-
const { updated: h } = f.restore(
|
|
187740
|
+
const { updated: h } = f.restore(
|
|
187741
|
+
{},
|
|
187742
|
+
i
|
|
187743
|
+
);
|
|
187049
187744
|
a.push(...h);
|
|
187050
187745
|
}), this.suggestedMethods.forEach((f) => {
|
|
187051
187746
|
const { updated: h } = f.restore({}, i);
|
|
187052
187747
|
a.push(...h);
|
|
187053
187748
|
}), i == null || i.attemptAutoclose(D.RestoreEntity, this.id), {
|
|
187054
|
-
added: C(
|
|
187055
|
-
|
|
187056
|
-
|
|
187749
|
+
added: C(
|
|
187750
|
+
r
|
|
187751
|
+
),
|
|
187752
|
+
updated: C(
|
|
187753
|
+
a
|
|
187754
|
+
),
|
|
187755
|
+
removed: C(
|
|
187756
|
+
c
|
|
187757
|
+
),
|
|
187057
187758
|
affected: C(
|
|
187058
187759
|
e
|
|
187059
187760
|
),
|
|
@@ -187066,9 +187767,13 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187066
187767
|
this,
|
|
187067
187768
|
...((a = this.extends) == null ? void 0 : a.toFlat(i)) || [],
|
|
187068
187769
|
...this.implements.flatMap((c) => c.toFlat(i)),
|
|
187069
|
-
...this.properties.flatMap(
|
|
187770
|
+
...this.properties.flatMap(
|
|
187771
|
+
(c) => c.toFlat(i)
|
|
187772
|
+
),
|
|
187070
187773
|
...this.methods.flatMap((c) => c.toFlat(i)),
|
|
187071
|
-
...this.abstractMethods.flatMap(
|
|
187774
|
+
...this.abstractMethods.flatMap(
|
|
187775
|
+
(c) => c.toFlat(i)
|
|
187776
|
+
),
|
|
187072
187777
|
...this.parent.toFlat(i)
|
|
187073
187778
|
]);
|
|
187074
187779
|
}
|
|
@@ -187077,7 +187782,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187077
187782
|
return i.has(this.id) ? [] : (i.add(this.id), [
|
|
187078
187783
|
this.id,
|
|
187079
187784
|
...((a = this.extends) == null ? void 0 : a.toFlatIds(i)) || [],
|
|
187080
|
-
...this.implements.flatMap(
|
|
187785
|
+
...this.implements.flatMap(
|
|
187786
|
+
(c) => c.toFlatIds(i)
|
|
187787
|
+
),
|
|
187081
187788
|
...this.properties.flatMap(
|
|
187082
187789
|
(c) => c.toFlatIds(i)
|
|
187083
187790
|
),
|
|
@@ -187147,14 +187854,20 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187147
187854
|
implements: this.implements.map(
|
|
187148
187855
|
(e) => e.toJSON(i)
|
|
187149
187856
|
),
|
|
187150
|
-
extends: ((c = this.extends) == null ? void 0 : c.toJSON(
|
|
187857
|
+
extends: ((c = this.extends) == null ? void 0 : c.toJSON(
|
|
187858
|
+
i
|
|
187859
|
+
)) || null,
|
|
187151
187860
|
parent: this.parent.toReference()
|
|
187152
187861
|
});
|
|
187153
187862
|
}
|
|
187154
187863
|
toJSONClone(i = lt) {
|
|
187155
187864
|
var a, c, e, f, h, m, b, E, A, _;
|
|
187156
187865
|
let r;
|
|
187157
|
-
return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || cn(
|
|
187866
|
+
return (a = i.seenEntityMaps) != null && a.has(this.id) ? r = i.seenEntityMaps.get(this.id) : (r = i.newId || cn(
|
|
187867
|
+
this,
|
|
187868
|
+
this.project,
|
|
187869
|
+
i.uuidStrategy
|
|
187870
|
+
), i.seenEntityMaps && i.seenEntityMaps.set(this.id, r)), (c = i.seenEntities) != null && c.has(r) || (e = i.seenEntities) != null && e.has(this.id) ? this.toReference({ seenEntityMaps: i.seenEntityMaps }) : ((f = i.seenEntities) == null || f.add(r), (h = i.seenEntities) == null || h.add(this.id), {
|
|
187158
187871
|
id: r,
|
|
187159
187872
|
version: x.UUID.uuid(),
|
|
187160
187873
|
createdAt: i.timestamp || G().toISOString(),
|
|
@@ -187254,7 +187967,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187254
187967
|
abstractMethods: this.abstractMethods.map(
|
|
187255
187968
|
(h) => h.toReference(i)
|
|
187256
187969
|
),
|
|
187257
|
-
implements: this.implements.map(
|
|
187970
|
+
implements: this.implements.map(
|
|
187971
|
+
(h) => h.toReference(i)
|
|
187972
|
+
),
|
|
187258
187973
|
extends: ((f = this.extends) == null ? void 0 : f.toReference(i)) || null,
|
|
187259
187974
|
parent: this.parent.toReference(i)
|
|
187260
187975
|
};
|
|
@@ -187266,11 +187981,15 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187266
187981
|
...this.properties.flatMap(
|
|
187267
187982
|
(f) => f.toFlatJSON(i)
|
|
187268
187983
|
),
|
|
187269
|
-
...this.methods.flatMap(
|
|
187984
|
+
...this.methods.flatMap(
|
|
187985
|
+
(f) => f.toFlatJSON(i)
|
|
187986
|
+
),
|
|
187270
187987
|
...this.abstractMethods.flatMap(
|
|
187271
187988
|
(f) => f.toFlatJSON(i)
|
|
187272
187989
|
),
|
|
187273
|
-
...this.implements.flatMap(
|
|
187990
|
+
...this.implements.flatMap(
|
|
187991
|
+
(f) => f.toFlatJSON(i)
|
|
187992
|
+
),
|
|
187274
187993
|
...((a = this.extends) == null ? void 0 : a.toFlatJSON(i)) || [],
|
|
187275
187994
|
...this.parent.toFlatJSON(i),
|
|
187276
187995
|
...((c = this.additionalPropertiesDataType) == null ? void 0 : c.toFlatJSON(i)) || [],
|
|
@@ -187317,7 +188036,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187317
188036
|
...((c = this.additionalPropertiesDataType) == null ? void 0 : c.toFlatGenerationTarget(
|
|
187318
188037
|
i
|
|
187319
188038
|
)) || [],
|
|
187320
|
-
...((e = this.allPropertiesImplement) == null ? void 0 : e.toFlatGenerationTarget(
|
|
188039
|
+
...((e = this.allPropertiesImplement) == null ? void 0 : e.toFlatGenerationTarget(
|
|
188040
|
+
i
|
|
188041
|
+
)) || []
|
|
187321
188042
|
]);
|
|
187322
188043
|
}
|
|
187323
188044
|
// Clear the errors of this entity and all its nested entities recursively
|
|
@@ -187360,7 +188081,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187360
188081
|
tracker: r
|
|
187361
188082
|
})
|
|
187362
188083
|
), this.allPropertiesImplement && a.push(
|
|
187363
|
-
...await this.allPropertiesImplement.getErrorsAsync({
|
|
188084
|
+
...await this.allPropertiesImplement.getErrorsAsync({
|
|
188085
|
+
tracker: r
|
|
188086
|
+
})
|
|
187364
188087
|
), a;
|
|
187365
188088
|
}
|
|
187366
188089
|
getShallowErrors() {
|
|
@@ -187400,12 +188123,14 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187400
188123
|
c
|
|
187401
188124
|
));
|
|
187402
188125
|
A.methods = N;
|
|
187403
|
-
const V = (k = this.abstractMethods) == null ? void 0 : k.map(
|
|
187404
|
-
|
|
187405
|
-
|
|
187406
|
-
|
|
187407
|
-
|
|
187408
|
-
|
|
188126
|
+
const V = (k = this.abstractMethods) == null ? void 0 : k.map(
|
|
188127
|
+
(q, re) => this.project.diggestedBuiltInBaseEntitiesIds.has(q.id) ? q : q.clone(
|
|
188128
|
+
i,
|
|
188129
|
+
A,
|
|
188130
|
+
E + "-abstract-method-" + re + "-id",
|
|
188131
|
+
c
|
|
188132
|
+
)
|
|
188133
|
+
);
|
|
187409
188134
|
if (A.abstractMethods = V, this.additionalPropertiesDataType)
|
|
187410
188135
|
if (this.project.diggestedBuiltInBaseEntitiesIds.has(
|
|
187411
188136
|
this.additionalPropertiesDataType.id
|
|
@@ -187462,7 +188187,12 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187462
188187
|
"implement-definition-entity"
|
|
187463
188188
|
)
|
|
187464
188189
|
), a) {
|
|
187465
|
-
const c = Y_(
|
|
188190
|
+
const c = Y_(
|
|
188191
|
+
this,
|
|
188192
|
+
i,
|
|
188193
|
+
r,
|
|
188194
|
+
a
|
|
188195
|
+
);
|
|
187466
188196
|
return r == null || r.attemptAutoclose("implement-definition-entity", this.id), c;
|
|
187467
188197
|
}
|
|
187468
188198
|
getAllPropertiesImplements() {
|
|
@@ -187481,7 +188211,9 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187481
188211
|
var e;
|
|
187482
188212
|
const i = this.implements.filter(
|
|
187483
188213
|
(f) => f.type === d.DefinitionEntity || f.type === d.BuiltInBaseEntity && f.interactive
|
|
187484
|
-
), r = ((e = this.extends) == null ? void 0 : e.getAllInteractiveMethods()) || [], a = i.flatMap(
|
|
188214
|
+
), r = ((e = this.extends) == null ? void 0 : e.getAllInteractiveMethods()) || [], a = i.flatMap(
|
|
188215
|
+
(f) => f.getAllInteractiveMethods()
|
|
188216
|
+
);
|
|
187485
188217
|
return C([
|
|
187486
188218
|
...this.methods,
|
|
187487
188219
|
...r,
|
|
@@ -187539,7 +188271,13 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187539
188271
|
x.UUID.uuid(),
|
|
187540
188272
|
!0
|
|
187541
188273
|
);
|
|
187542
|
-
B && ((k = A.dataType) == null || k.merge(
|
|
188274
|
+
B && ((k = A.dataType) == null || k.merge(
|
|
188275
|
+
B,
|
|
188276
|
+
r
|
|
188277
|
+
), B.id !== ((q = A.dataType) == null ? void 0 : q.id) && B.remove(
|
|
188278
|
+
{ ignoreUpstream: !1 },
|
|
188279
|
+
r
|
|
188280
|
+
), A.dataType && (A.dataType.metaSync(
|
|
187543
188281
|
{
|
|
187544
188282
|
inferred: !0,
|
|
187545
188283
|
like: !0
|
|
@@ -187554,7 +188292,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187554
188292
|
)));
|
|
187555
188293
|
let M = null;
|
|
187556
188294
|
if (E.declaration && A.id !== ((re = E.declaration) == null ? void 0 : re.id) && (M = E.declaration), E.setDeclaration(A, r), r == null || r.add(E, H.Updated), M) {
|
|
187557
|
-
const { updated: J, removed: ae } = M.remove(
|
|
188295
|
+
const { updated: J, removed: ae } = M.remove(
|
|
188296
|
+
{ ignoreUpstream: !1 },
|
|
188297
|
+
r
|
|
188298
|
+
);
|
|
187558
188299
|
c.push(...J), e.push(...ae);
|
|
187559
188300
|
}
|
|
187560
188301
|
});
|
|
@@ -187592,7 +188333,13 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187592
188333
|
x.UUID.uuid(),
|
|
187593
188334
|
!0
|
|
187594
188335
|
);
|
|
187595
|
-
oe && ((re = A.dataType) == null || re.merge(
|
|
188336
|
+
oe && ((re = A.dataType) == null || re.merge(
|
|
188337
|
+
oe,
|
|
188338
|
+
r
|
|
188339
|
+
), oe.id !== ((J = A.dataType) == null ? void 0 : J.id) && oe.remove(
|
|
188340
|
+
{ ignoreUpstream: !1 },
|
|
188341
|
+
r
|
|
188342
|
+
), A.dataType && (A.dataType.metaSync(
|
|
187596
188343
|
{
|
|
187597
188344
|
inferred: !0,
|
|
187598
188345
|
like: !0
|
|
@@ -187629,22 +188376,40 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187629
188376
|
x.UUID.uuid(),
|
|
187630
188377
|
!0
|
|
187631
188378
|
);
|
|
187632
|
-
de && ((ee = B.dataType) == null || ee.merge(
|
|
188379
|
+
de && ((ee = B.dataType) == null || ee.merge(
|
|
188380
|
+
de,
|
|
188381
|
+
r
|
|
188382
|
+
), de.id !== ((se = B.dataType) == null ? void 0 : se.id) && de.remove(
|
|
188383
|
+
{ ignoreUpstream: !1 },
|
|
188384
|
+
r
|
|
188385
|
+
), B.dataType && (B.dataType.metaSync(
|
|
187633
188386
|
{
|
|
187634
188387
|
inferred: !0,
|
|
187635
188388
|
like: !0
|
|
187636
188389
|
},
|
|
187637
188390
|
r
|
|
187638
|
-
), B.setDataType(
|
|
188391
|
+
), B.setDataType(
|
|
188392
|
+
B.dataType,
|
|
188393
|
+
r
|
|
188394
|
+
), r == null || r.add(
|
|
187639
188395
|
B,
|
|
187640
188396
|
H.Affected
|
|
187641
188397
|
)));
|
|
187642
188398
|
}
|
|
187643
188399
|
return this.addProperty(B, r), E.setDeclaration(B, r), r == null || r.add(E, H.Updated), B;
|
|
187644
|
-
}), r == null || r.attemptAutoclose(
|
|
187645
|
-
|
|
187646
|
-
|
|
187647
|
-
|
|
188400
|
+
}), r == null || r.attemptAutoclose(
|
|
188401
|
+
"infer-definition-entity-from-inputs",
|
|
188402
|
+
this.id
|
|
188403
|
+
), {
|
|
188404
|
+
added: C(
|
|
188405
|
+
a
|
|
188406
|
+
),
|
|
188407
|
+
updated: C(
|
|
188408
|
+
c
|
|
188409
|
+
),
|
|
188410
|
+
removed: C(
|
|
188411
|
+
e
|
|
188412
|
+
),
|
|
187648
188413
|
affected: C(
|
|
187649
188414
|
f
|
|
187650
188415
|
),
|
|
@@ -187693,7 +188458,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187693
188458
|
this.id
|
|
187694
188459
|
), this;
|
|
187695
188460
|
const a = this.additionalPropertiesDataType;
|
|
187696
|
-
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove(
|
|
188461
|
+
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove(
|
|
188462
|
+
{ ignoreUpstream: !0 },
|
|
188463
|
+
r
|
|
188464
|
+
), this.additionalPropertiesDataType = i, this.subscribeToDependencies(), r == null || r.add(this, H.Affected)), r == null || r.attemptAutoclose(
|
|
187697
188465
|
D.SetAdditionalPropertiesDataType,
|
|
187698
188466
|
this.id
|
|
187699
188467
|
), this;
|
|
@@ -187739,7 +188507,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187739
188507
|
this.id
|
|
187740
188508
|
), this;
|
|
187741
188509
|
const a = this.allPropertiesImplement;
|
|
187742
|
-
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove(
|
|
188510
|
+
return (a == null ? void 0 : a.id) !== (i == null ? void 0 : i.id) && (a == null || a.remove(
|
|
188511
|
+
{ ignoreUpstream: !0 },
|
|
188512
|
+
r
|
|
188513
|
+
), this.allPropertiesImplement = i, this.subscribeToDependencies(), r == null || r.add(this, H.Affected)), r == null || r.attemptAutoclose(
|
|
187743
188514
|
D.SetAllPropertiesImplement,
|
|
187744
188515
|
this.id
|
|
187745
188516
|
), this;
|
|
@@ -187759,7 +188530,10 @@ Alternatively you can update the parent data-type entity with 'update' action to
|
|
|
187759
188530
|
var a;
|
|
187760
188531
|
return r.id === ((a = this.allPropertiesImplement) == null ? void 0 : a.id);
|
|
187761
188532
|
}
|
|
187762
|
-
) || this.allPropertiesImplement.remove(
|
|
188533
|
+
) || this.allPropertiesImplement.remove(
|
|
188534
|
+
{ ignoreUpstream: !0 },
|
|
188535
|
+
i
|
|
188536
|
+
), i == null || i.add(this, H.Affected), this.allPropertiesImplement = null), i == null || i.attemptAutoclose(
|
|
187763
188537
|
D.RemoveAllPropertiesImplement,
|
|
187764
188538
|
this.id
|
|
187765
188539
|
), this) : (ce.warn(
|