@elyx-code/project-logic-tree 0.0.6180 → 0.0.6182
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.js +22 -12
- package/dist/index.umd.cjs +37 -37
- package/dist/tree/state/change-set.d.ts +2 -0
- package/dist/tree/state/store.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29121,6 +29121,13 @@ class A {
|
|
|
29121
29121
|
this.remove(d);
|
|
29122
29122
|
});
|
|
29123
29123
|
}
|
|
29124
|
+
async attemptAutocloseAsync(s, e) {
|
|
29125
|
+
var t;
|
|
29126
|
+
return this.autoclose && this.autoCloseActionName && this.autoCloseActionName === s && (this.self && e === ((t = this.self) == null ? void 0 : t.id) || !this.self) && await this.closeAsync(), this;
|
|
29127
|
+
}
|
|
29128
|
+
async closeAsync() {
|
|
29129
|
+
return this.open = !1, !this.isValid && this.self && !this.added[this.self.id] && !this.updated[this.self.id] && this.removed[this.self.id], this.isEmpty ? (this.project.discardChangeSet(this), this) : (this.discardOrphans(), await this.project.closeChangeSet(this), this);
|
|
29130
|
+
}
|
|
29124
29131
|
attemptAutoclose(s, e) {
|
|
29125
29132
|
var t;
|
|
29126
29133
|
return this.autoclose && this.autoCloseActionName && this.autoCloseActionName === s && (this.self && e === ((t = this.self) == null ? void 0 : t.id) || !this.self) && this.close(), this;
|
|
@@ -66447,7 +66454,8 @@ const Pn = {}, bs = {}, Zs = {
|
|
|
66447
66454
|
enrich: !0,
|
|
66448
66455
|
mock: !1,
|
|
66449
66456
|
ignoreCache: !1,
|
|
66450
|
-
onFetch: async () => null
|
|
66457
|
+
onFetch: async () => null,
|
|
66458
|
+
manuallyInit: !1
|
|
66451
66459
|
};
|
|
66452
66460
|
function rJ(i, { enrich: s } = { enrich: !0 }) {
|
|
66453
66461
|
const e = i.project, t = i.record, r = new ip(e), a = /* @__PURE__ */ new Set();
|
|
@@ -66529,16 +66537,18 @@ async function iJ(i, s = Zs) {
|
|
|
66529
66537
|
}
|
|
66530
66538
|
};
|
|
66531
66539
|
}
|
|
66532
|
-
return console.log("Fetching project from external API"), new Promise(
|
|
66533
|
-
|
|
66534
|
-
|
|
66535
|
-
|
|
66536
|
-
|
|
66537
|
-
|
|
66538
|
-
|
|
66539
|
-
|
|
66540
|
-
|
|
66541
|
-
|
|
66540
|
+
return console.log("Fetching project from external API"), new Promise(
|
|
66541
|
+
async (r) => {
|
|
66542
|
+
if (e.onFetch) {
|
|
66543
|
+
const a = await e.onFetch(i.id);
|
|
66544
|
+
if (a) {
|
|
66545
|
+
r({ data: a });
|
|
66546
|
+
return;
|
|
66547
|
+
}
|
|
66548
|
+
} else
|
|
66549
|
+
r({ data: null });
|
|
66550
|
+
}
|
|
66551
|
+
);
|
|
66542
66552
|
}
|
|
66543
66553
|
function up(i) {
|
|
66544
66554
|
const s = new b(i);
|
|
@@ -66654,7 +66664,7 @@ async function Xq(i, s = Zs) {
|
|
|
66654
66664
|
let a;
|
|
66655
66665
|
return e.mock ? a = nJ(om, {
|
|
66656
66666
|
enrich: !!e.enrich
|
|
66657
|
-
}) : a = rJ(r.data, {
|
|
66667
|
+
}) : r.data instanceof b ? a = r.data : a = rJ(r.data, {
|
|
66658
66668
|
enrich: !!e.enrich
|
|
66659
66669
|
}), Pn[i.id] = a, i.id && delete bs[i.id], a;
|
|
66660
66670
|
}
|