@colijnit/configurator 262.1.6 → 262.1.8
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.
|
Binary file
|
|
@@ -833,6 +833,12 @@ class ConfiguratorConnectorService {
|
|
|
833
833
|
get shouldShowLoader() {
|
|
834
834
|
return this._shouldShowLoader;
|
|
835
835
|
}
|
|
836
|
+
set instanceId(instanceId) {
|
|
837
|
+
this._instanceId = instanceId;
|
|
838
|
+
}
|
|
839
|
+
get instanceId() {
|
|
840
|
+
return this._instanceId;
|
|
841
|
+
}
|
|
836
842
|
controllerInitialized = new BehaviorSubject(false);
|
|
837
843
|
standAloneInstance = new BehaviorSubject(false);
|
|
838
844
|
connectionReset = new Subject();
|
|
@@ -858,6 +864,7 @@ class ConfiguratorConnectorService {
|
|
|
858
864
|
_initialized = false;
|
|
859
865
|
_boFactory = new BusinessObjectFactory();
|
|
860
866
|
_configuratorService;
|
|
867
|
+
_instanceId;
|
|
861
868
|
constructor(_appEventService, _settingsService, _loaderService, _utilitiesConnectorService) {
|
|
862
869
|
this._appEventService = _appEventService;
|
|
863
870
|
this._settingsService = _settingsService;
|
|
@@ -1187,8 +1194,10 @@ class ConfiguratorConnectorService {
|
|
|
1187
1194
|
console.error('error saving configurations');
|
|
1188
1195
|
}
|
|
1189
1196
|
}
|
|
1190
|
-
async storePreset(
|
|
1191
|
-
|
|
1197
|
+
async storePreset(showLoader = true) {
|
|
1198
|
+
if (this.instanceId) {
|
|
1199
|
+
return this._configuratorService.storePreset(this.instanceId, showLoader);
|
|
1200
|
+
}
|
|
1192
1201
|
}
|
|
1193
1202
|
async initForPreset(presetId, goodId, showLoader = true) {
|
|
1194
1203
|
return this._configuratorService.initForPreset(presetId, goodId, showLoader);
|
|
@@ -1364,6 +1373,7 @@ class ConfiguratorConnectorService {
|
|
|
1364
1373
|
_handleInstanceResponse(response) {
|
|
1365
1374
|
if (response && response.validationResult && response.validationResult.success) {
|
|
1366
1375
|
this._appEventService.instanceSet.next(response.resultObject);
|
|
1376
|
+
this.instanceId = response.resultObject;
|
|
1367
1377
|
}
|
|
1368
1378
|
return response;
|
|
1369
1379
|
}
|
|
@@ -2196,6 +2206,17 @@ class BuildFurnitureBaseService {
|
|
|
2196
2206
|
MaterialUtils.ClearCaches();
|
|
2197
2207
|
VariationUtils.ClearCache();
|
|
2198
2208
|
}
|
|
2209
|
+
cleanup() {
|
|
2210
|
+
ObjectUtils.DisposeObject(this.full3DObjectToUse);
|
|
2211
|
+
this.full3DObjectToUse = undefined;
|
|
2212
|
+
this._currentCustomFloorGroup = undefined;
|
|
2213
|
+
ObjectUtils.DisposeObject(this._activeChildElement);
|
|
2214
|
+
this._activeChildElement = undefined;
|
|
2215
|
+
this.placedAdjustables.length = 0;
|
|
2216
|
+
this.placedAddables.length = 0;
|
|
2217
|
+
this._adjustables.length = 0;
|
|
2218
|
+
this._addables.length = 0;
|
|
2219
|
+
}
|
|
2199
2220
|
async prepareInstanceForBuild(shouldCopyInstance, loadFromProject, looseOriginalConfiguration, result) {
|
|
2200
2221
|
if (shouldCopyInstance && !loadFromProject) {
|
|
2201
2222
|
const originalInstanceId = result.instanceId;
|
|
@@ -2645,17 +2666,6 @@ class BuildFurnitureBaseService {
|
|
|
2645
2666
|
// clean
|
|
2646
2667
|
this.cleanup();
|
|
2647
2668
|
}
|
|
2648
|
-
cleanup() {
|
|
2649
|
-
ObjectUtils.DisposeObject(this.full3DObjectToUse);
|
|
2650
|
-
this.full3DObjectToUse = undefined;
|
|
2651
|
-
this._currentCustomFloorGroup = undefined;
|
|
2652
|
-
ObjectUtils.DisposeObject(this._activeChildElement);
|
|
2653
|
-
this._activeChildElement = undefined;
|
|
2654
|
-
this.placedAdjustables.length = 0;
|
|
2655
|
-
this.placedAddables.length = 0;
|
|
2656
|
-
this._adjustables.length = 0;
|
|
2657
|
-
this._addables.length = 0;
|
|
2658
|
-
}
|
|
2659
2669
|
canConnectSelections(sel1, sel2) {
|
|
2660
2670
|
if (!sel1.decoNode || !sel2.decoNode) {
|
|
2661
2671
|
return false;
|
|
@@ -9631,7 +9641,7 @@ class ConfigurationPresetDialogComponent {
|
|
|
9631
9641
|
handleOpenDialog(mode) {
|
|
9632
9642
|
if (mode === PresetDialogMode.SAVE) {
|
|
9633
9643
|
const instanceId = this._instanceId;
|
|
9634
|
-
this._configuratorConnectorService.storePreset(
|
|
9644
|
+
this._configuratorConnectorService.storePreset().then((response) => {
|
|
9635
9645
|
if (response && response.validationResult && response.validationResult.success) {
|
|
9636
9646
|
this.instanceIdInput = response.resultObject;
|
|
9637
9647
|
this.dialogMode = mode;
|
|
@@ -11889,6 +11899,7 @@ class ConfiguratorComponent {
|
|
|
11889
11899
|
return;
|
|
11890
11900
|
}
|
|
11891
11901
|
this._configuratorConnectorService.cleanUp();
|
|
11902
|
+
this._buildFurnitureService.currentActiveService.cleanup(); // Clean up the threeD stuff.
|
|
11892
11903
|
this.showFullConfiguration = undefined;
|
|
11893
11904
|
this._configuratorEventService.skuSet.next(undefined);
|
|
11894
11905
|
this._configuratorEventService.instanceIdSet.next(undefined);
|