iflow-engine 2.5.1 → 2.5.2
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/iflow-engine.es.js
CHANGED
|
@@ -87214,8 +87214,8 @@ class ur extends Bo {
|
|
|
87214
87214
|
this.unsubscribeLocale && (this.unsubscribeLocale(), this.unsubscribeLocale = null), this.closeSaveAsPresetModal(), this.closeDeletePresetConfirmModal(), super.destroy();
|
|
87215
87215
|
}
|
|
87216
87216
|
ensurePresetListWithInternalDefault() {
|
|
87217
|
-
const e = this.
|
|
87218
|
-
this.presetList = [...
|
|
87217
|
+
const e = this.presetList.filter((n) => n.id !== ur.INTERNAL_DEFAULT_PRESET_ID), t = e.some((n) => n.isDefault), i = this.createInternalDefaultPreset(!t);
|
|
87218
|
+
this.presetList = [...e, i], (!this.selectedPresetId || !this.presetList.some((n) => n.id === this.selectedPresetId)) && (this.selectedPresetId = i.id);
|
|
87219
87219
|
}
|
|
87220
87220
|
updateInternalDefaultPresetLabel() {
|
|
87221
87221
|
const e = this.presetList.findIndex((t) => t.id === ur.INTERNAL_DEFAULT_PRESET_ID);
|
|
@@ -87224,11 +87224,11 @@ class ur extends Bo {
|
|
|
87224
87224
|
presetName: Se("setting.defaultPresetLabel")
|
|
87225
87225
|
}, this.ensurePresetListWithInternalDefault());
|
|
87226
87226
|
}
|
|
87227
|
-
createInternalDefaultPreset() {
|
|
87227
|
+
createInternalDefaultPreset(e = !0) {
|
|
87228
87228
|
return {
|
|
87229
87229
|
id: ur.INTERNAL_DEFAULT_PRESET_ID,
|
|
87230
87230
|
presetName: Se("setting.defaultPresetLabel"),
|
|
87231
|
-
isDefault:
|
|
87231
|
+
isDefault: e,
|
|
87232
87232
|
settings: structuredClone(pM),
|
|
87233
87233
|
source: "sdk-default",
|
|
87234
87234
|
readonly: !1,
|
|
@@ -87236,10 +87236,7 @@ class ur extends Bo {
|
|
|
87236
87236
|
};
|
|
87237
87237
|
}
|
|
87238
87238
|
setPresetList(e) {
|
|
87239
|
-
|
|
87240
|
-
this.presetList = this.normalizePresetList(e), this.ensurePresetListWithInternalDefault();
|
|
87241
|
-
const i = !!t && this.presetList.some((n) => n.id === t);
|
|
87242
|
-
this.selectedPresetId = i ? t : this.resolveDefaultPresetId(this.presetList), !this.selectedPresetId && this.presetList.length > 0 && (this.selectedPresetId = this.presetList[0].id), this.applySelectedPresetFromList(), this.isDirty = !1, this.updateUndoRestoreVisibility(), this.isOpen() && this.reopenAtSamePosition();
|
|
87239
|
+
this.presetList = this.normalizePresetList(e), this.ensurePresetListWithInternalDefault(), this.selectedPresetId = this.resolveDefaultPresetId(this.presetList), !this.selectedPresetId && this.presetList.length > 0 && (this.selectedPresetId = this.presetList[0].id), this.applySelectedPresetFromList(), this.isDirty = !1, this.updateUndoRestoreVisibility(), this.isOpen() && this.reopenAtSamePosition();
|
|
87243
87240
|
}
|
|
87244
87241
|
getDialogPosition() {
|
|
87245
87242
|
if (this.savedPosition) {
|
|
@@ -87702,9 +87699,13 @@ class ur extends Bo {
|
|
|
87702
87699
|
}
|
|
87703
87700
|
const t = this.selectedPresetId, i = this.engineComponent?.getSettings() ?? structuredClone(this.settings), n = {
|
|
87704
87701
|
...this.presetList[e],
|
|
87705
|
-
settings: structuredClone(i)
|
|
87702
|
+
settings: structuredClone(i),
|
|
87703
|
+
isDefault: !0
|
|
87706
87704
|
};
|
|
87707
|
-
this.presetList = this.presetList.map((r, a) =>
|
|
87705
|
+
this.presetList = this.presetList.map((r, a) => ({
|
|
87706
|
+
...a === e ? n : r,
|
|
87707
|
+
isDefault: a === e
|
|
87708
|
+
})), this.ensurePresetListWithInternalDefault(), this.selectedPresetId = t, this.settings = structuredClone(i), this.isDirty = !1, this.updateUndoRestoreVisibility(), this.emit("setting:preset-saved", {
|
|
87708
87709
|
preset: structuredClone(n),
|
|
87709
87710
|
currentSettings: structuredClone(i),
|
|
87710
87711
|
timestamp: Date.now()
|
|
@@ -87719,12 +87720,12 @@ class ur extends Bo {
|
|
|
87719
87720
|
const n = this.engineComponent?.getSettings() ?? structuredClone(this.settings), r = {
|
|
87720
87721
|
id: `user-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
87721
87722
|
presetName: t,
|
|
87722
|
-
isDefault: !
|
|
87723
|
+
isDefault: !0,
|
|
87723
87724
|
settings: structuredClone(n),
|
|
87724
87725
|
source: "user",
|
|
87725
87726
|
readonly: !1
|
|
87726
87727
|
}, a = this.presetList.filter((o) => o.id !== ur.INTERNAL_DEFAULT_PRESET_ID);
|
|
87727
|
-
return this.presetList = [...a, r], this.ensurePresetListWithInternalDefault(), this.selectedPresetId = r.id, this.settings = structuredClone(n), this.isDirty = !1, this.updateUndoRestoreVisibility(), this.emit("setting:preset-saved", {
|
|
87728
|
+
return this.presetList = [...a.map((o) => ({ ...o, isDefault: !1 })), r], this.ensurePresetListWithInternalDefault(), this.selectedPresetId = r.id, this.settings = structuredClone(n), this.isDirty = !1, this.updateUndoRestoreVisibility(), this.emit("setting:preset-saved", {
|
|
87728
87729
|
preset: structuredClone(r),
|
|
87729
87730
|
currentSettings: structuredClone(n),
|
|
87730
87731
|
timestamp: Date.now()
|
|
@@ -90029,7 +90030,7 @@ class bH {
|
|
|
90029
90030
|
init() {
|
|
90030
90031
|
this.container.innerHTML = "", this.wrapper = document.createElement("div"), this.wrapper.className = "bim-engine-wrapper", this.container.appendChild(this.wrapper);
|
|
90031
90032
|
const e = document.createElement("div");
|
|
90032
|
-
e.className = "bim-engine-version", e.textContent = "v2.5.
|
|
90033
|
+
e.className = "bim-engine-version", e.textContent = "v2.5.2", this.wrapper.appendChild(e), this.sizeEl = document.createElement("div"), this.sizeEl.className = "bim-engine-size", this.wrapper.appendChild(this.sizeEl), this.updateClientSizeDisplay(), this.bindSizeObserver(), this.registry.container = this.container, this.registry.wrapper = this.wrapper, this.engine = new L2(this.wrapper, this.registry), this.dialog = new gM(this.wrapper, this.registry), this.rightKey = new uy(this.wrapper, this.registry), this.bottomDock = new D2(this.wrapper, this.registry), this.registry.bottomDock = this.bottomDock, this.measureDock = new O2(this.registry), this.registry.measureDock = this.measureDock, this.measureDock.init(), this.sectionDock = new U2(this.registry), this.registry.sectionDock = this.sectionDock, this.sectionDock.init(), this.walkDock = new z2(this.registry), this.registry.walkDock = this.walkDock, this.walkDock.init(), this.radialToolbar = new I2(this.wrapper, this.registry), this.measure = new H2(this.registry), this.sectionPlane = new V2(this.registry), this.sectionAxis = new G2(this.registry), this.sectionBox = new W2(this.registry), this.walkControl = new X2(this.registry), this.walkControl.init(), this.engineInfo = new j2(this.registry), this.engineInfo.init(), this.registry.engine3d = this.engine, this.registry.dialog = this.dialog, this.registry.rightKey = this.rightKey, this.registry.radialToolbar = this.radialToolbar, this.registry.measure = this.measure, this.registry.sectionPlane = this.sectionPlane, this.registry.sectionAxis = this.sectionAxis, this.registry.sectionBox = this.sectionBox, this.registry.walkControl = this.walkControl, this.registry.engineInfo = this.engineInfo, this.componentDetail = new q2(this.registry), this.registry.componentDetail = this.componentDetail, this.componentDetail.init(), this.aiChat = new Z2(this.registry), this.registry.aiChat = this.aiChat, this.aiChat.init(), this.constructTreeBtn = new Y9(this.wrapper, this.registry), this.registry.constructTree = this.constructTreeBtn, this.setting = new ur(this.registry), this.registry.setting = this.setting, this.setting.init(), this.updateTheme(ct.getTheme()), ct.subscribe((t) => {
|
|
90033
90034
|
this.updateTheme(t);
|
|
90034
90035
|
});
|
|
90035
90036
|
}
|
|
@@ -90124,7 +90125,7 @@ class MH {
|
|
|
90124
90125
|
init() {
|
|
90125
90126
|
this.container.innerHTML = "", this.wrapper = document.createElement("div"), this.wrapper.className = "bim-engine-wrapper", this.container.appendChild(this.wrapper);
|
|
90126
90127
|
const e = document.createElement("div");
|
|
90127
|
-
e.className = "bim-engine-version", e.textContent = "v2.5.
|
|
90128
|
+
e.className = "bim-engine-version", e.textContent = "v2.5.2", this.wrapper.appendChild(e), this.sizeEl = document.createElement("div"), this.sizeEl.className = "bim-engine-size", this.wrapper.appendChild(this.sizeEl), this.updateClientSizeDisplay(), this.bindSizeObserver(), this.registry.container = this.container, this.registry.wrapper = this.wrapper, this.engine = new L2(this.wrapper, this.registry), this.dialog = new gM(this.wrapper, this.registry), this.rightKey = new uy(this.wrapper, this.registry), this.bottomDock = new D2(this.wrapper, this.registry), this.registry.bottomDock = this.bottomDock, this.registry.engine3d = this.engine, this.registry.dialog = this.dialog, this.registry.rightKey = this.rightKey, this.measureDock = new O2(this.registry), this.registry.measureDock = this.measureDock, this.measureDock.init(), this.sectionDock = new U2(this.registry), this.registry.sectionDock = this.sectionDock, this.sectionDock.init(), this.walkDock = new z2(this.registry), this.registry.walkDock = this.walkDock, this.walkDock.init(), this.radialToolbar = new I2(this.wrapper, this.registry), this.measure = new H2(this.registry), this.sectionPlane = new V2(this.registry), this.sectionAxis = new G2(this.registry), this.sectionBox = new W2(this.registry), this.walkControl = new X2(this.registry), this.walkControl.init(), this.engineInfo = new j2(this.registry), this.engineInfo.init(), this.registry.radialToolbar = this.radialToolbar, this.registry.measure = this.measure, this.registry.sectionPlane = this.sectionPlane, this.registry.sectionAxis = this.sectionAxis, this.registry.sectionBox = this.sectionBox, this.registry.walkControl = this.walkControl, this.registry.engineInfo = this.engineInfo, this.componentDetail = new q2(this.registry), this.registry.componentDetail = this.componentDetail, this.componentDetail.init(), this.aiChat = new Z2(this.registry), this.registry.aiChat = this.aiChat, this.aiChat.init(), this.setting = new ur(this.registry), this.registry.setting = this.setting, this.setting.init(), this.updateTheme(ct.getTheme()), this.unsubscribeTheme = ct.subscribe((t) => {
|
|
90128
90129
|
this.updateTheme(t);
|
|
90129
90130
|
});
|
|
90130
90131
|
}
|