@crystaldesign/web-planner-logic 24.14.0-beta.1 → 24.14.0-beta.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/build/cjs/{DivaBoxPlanner-bcc31277.js → DivaBoxPlanner-2c3ad573.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-8ad93926.js → DivaStandardPlanner-2712c847.js} +111 -150
- package/build/cjs/{DoorPlanner-aa051061.js → DoorPlanner-660c92f8.js} +1 -1
- package/build/cjs/{Host3DSignalR-6a177ecc.js → Host3DSignalR-67d1bbd5.js} +1 -9
- package/build/cjs/{LiviqueWWSHandler-18ed722f.js → LiviqueWWSHandler-59d934f3.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-3295548a.js → PfisterWWSHandler-4792814e.js} +1 -13
- package/build/cjs/{PlannerHandler2D-2cd90ff1.js → PlannerHandler2D-a209c839.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-ac2bf9ba.js → SeriousBasketHandler-79c2b600.js} +1 -1
- package/build/cjs/{ShelfPlanner-52374110.js → ShelfPlanner-92294342.js} +1 -1
- package/build/cjs/{StandardWWSHandler-ab2a56e5.js → StandardWWSHandler-d6dfcbbe.js} +1 -1
- package/build/cjs/{index-44a63783.js → index-2bfc75a1.js} +308 -374
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-8bf401d7.js → DivaBoxPlanner-d8275f1e.js} +2 -2
- package/build/esm/{DivaStandardPlanner-3735c08d.js → DivaStandardPlanner-20b8fe29.js} +111 -150
- package/build/esm/{DoorPlanner-058cc697.js → DoorPlanner-c06b15c0.js} +1 -1
- package/build/esm/{Host3DSignalR-0c6f2cb2.js → Host3DSignalR-829f756b.js} +1 -9
- package/build/esm/{LiviqueWWSHandler-c2931ea0.js → LiviqueWWSHandler-d9eb5296.js} +1 -1
- package/build/esm/{PfisterWWSHandler-c00ff2d2.js → PfisterWWSHandler-cc0d15f9.js} +1 -13
- package/build/esm/{PlannerHandler2D-c617facc.js → PlannerHandler2D-91372ea4.js} +1 -1
- package/build/esm/{SeriousBasketHandler-5dafd20f.js → SeriousBasketHandler-da2d5909.js} +1 -1
- package/build/esm/{ShelfPlanner-655779a3.js → ShelfPlanner-601413ca.js} +1 -1
- package/build/esm/{StandardWWSHandler-1a0c3568.js → StandardWWSHandler-c72e0f32.js} +1 -1
- package/build/esm/{index-c35146d9.js → index-f240c58e.js} +308 -374
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/PfisterWWSHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +3 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-2bfc75a1.js');
|
|
6
6
|
require('@babel/runtime/helpers/asyncToGenerator');
|
|
7
7
|
require('@babel/runtime/helpers/classCallCheck');
|
|
8
8
|
require('@babel/runtime/helpers/createClass');
|
|
@@ -3,10 +3,10 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
3
3
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
4
4
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
5
5
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
6
|
-
import { V as Vector3, B as BoundingBox } from './index-
|
|
6
|
+
import { V as Vector3, B as BoundingBox } from './index-f240c58e.js';
|
|
7
7
|
import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
|
|
8
8
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
9
|
-
import { d as dockingPointHandlerInst, P as PlannerElementData, h as handler2D } from './PlannerHandler2D-
|
|
9
|
+
import { d as dockingPointHandlerInst, P as PlannerElementData, h as handler2D } from './PlannerHandler2D-91372ea4.js';
|
|
10
10
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
11
11
|
import '@babel/runtime/helpers/slicedToArray';
|
|
12
12
|
import 'axios';
|
|
@@ -3,8 +3,8 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
3
3
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
4
4
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
5
5
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
6
|
-
import { V as Vector3, c as Vector2, B as BoundingBox } from './index-
|
|
7
|
-
import { d as dockingPointHandlerInst, h as handler2D, P as PlannerElementData } from './PlannerHandler2D-
|
|
6
|
+
import { V as Vector3, c as Vector2, B as BoundingBox } from './index-f240c58e.js';
|
|
7
|
+
import { d as dockingPointHandlerInst, h as handler2D, P as PlannerElementData } from './PlannerHandler2D-91372ea4.js';
|
|
8
8
|
import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
|
|
9
9
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
10
10
|
import '@babel/runtime/helpers/slicedToArray';
|
|
@@ -120,10 +120,7 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
120
120
|
collisionPairs: []
|
|
121
121
|
};
|
|
122
122
|
this.plannerHasStaticBackground = plannerHasStaticBackground;
|
|
123
|
-
|
|
124
|
-
LOG.businessEvent('onPlannerChange', 'Planner', 'create Standard Planner plannerID: ' + plannerId + '; doHidePlanner: ' + (doHidePlanner ? 'true' : 'false') + '; doDisablePlanner2D: ' + (doDisablePlanner2D ? 'true' : 'false'), {
|
|
125
|
-
cat: catalog.catalogCodex
|
|
126
|
-
});
|
|
123
|
+
this.set.CatalogData;
|
|
127
124
|
}
|
|
128
125
|
|
|
129
126
|
/**
|
|
@@ -760,12 +757,8 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
760
757
|
case 0:
|
|
761
758
|
planDataString = DivaUtils.decodeBase64(setPlanData);
|
|
762
759
|
planData = JSON.parse(planDataString);
|
|
763
|
-
LOG.businessEvent('onPlannerChange', 'Planner', 'extendPlanner planData: ' + planDataString, {
|
|
764
|
-
cat: this.getCatalogData().catalogCodex,
|
|
765
|
-
accountId: this.getCatalogData().accountGuid
|
|
766
|
-
});
|
|
767
760
|
if (!(planData.v != null && planData.v == 2)) {
|
|
768
|
-
_context4.next =
|
|
761
|
+
_context4.next = 36;
|
|
769
762
|
break;
|
|
770
763
|
}
|
|
771
764
|
jsonElements = planData.set.elements;
|
|
@@ -773,12 +766,12 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
773
766
|
accElements = [];
|
|
774
767
|
oldElementidMapping = new Map(); //First reset planner element values in jsonElement so that every set is planned to be set to origin
|
|
775
768
|
i = 0;
|
|
776
|
-
case
|
|
769
|
+
case 8:
|
|
777
770
|
if (!(i < jsonElements.length)) {
|
|
778
|
-
_context4.next =
|
|
771
|
+
_context4.next = 32;
|
|
779
772
|
break;
|
|
780
773
|
}
|
|
781
|
-
_context4.prev =
|
|
774
|
+
_context4.prev = 9;
|
|
782
775
|
jsonElement = jsonElements[i];
|
|
783
776
|
plannerElement = new PlannerElementData(this.set.getSetId(), jsonElement.basketID, this.nextElementId, DivaStandardPlanner.plannerType);
|
|
784
777
|
oldElementidMapping.set(parseInt(jsonElement.elementID), plannerElement);
|
|
@@ -788,12 +781,12 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
788
781
|
data = this.set.getPlannerData(plannerElement.ElementId);
|
|
789
782
|
plannerElement.updatePlannerData(data);
|
|
790
783
|
if (this.doDisablePlanner2D) {
|
|
791
|
-
_context4.next =
|
|
784
|
+
_context4.next = 21;
|
|
792
785
|
break;
|
|
793
786
|
}
|
|
794
|
-
_context4.next =
|
|
787
|
+
_context4.next = 21;
|
|
795
788
|
return handler2D.loadSVG(plannerElement, this.set);
|
|
796
|
-
case
|
|
789
|
+
case 21:
|
|
797
790
|
plannerElement.WorldPosCenter = new Vector3(globalBoundingBox.WorldPos.x + globalBoundingBox.Size.x + jsonElement.x + 100, globalBoundingBox.WorldPos.y + jsonElement.y, globalBoundingBox.WorldPos.z + jsonElement.z);
|
|
798
791
|
plannerElement.RotDeg = jsonElement.rot;
|
|
799
792
|
if (plannerElement.IsDockedAccessoire) {
|
|
@@ -804,20 +797,20 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
804
797
|
elementsSortedbyPosNr[jsonElement.posNr - 1] = jsonElement;
|
|
805
798
|
plannerElement.PosNr = jsonElement.posNr;
|
|
806
799
|
}
|
|
807
|
-
_context4.next =
|
|
800
|
+
_context4.next = 29;
|
|
808
801
|
break;
|
|
809
|
-
case
|
|
810
|
-
_context4.prev =
|
|
811
|
-
_context4.t0 = _context4["catch"](
|
|
802
|
+
case 26:
|
|
803
|
+
_context4.prev = 26;
|
|
804
|
+
_context4.t0 = _context4["catch"](9);
|
|
812
805
|
LOG.error(new DivaError('Error initializing element nr ' + i + ' in the Standard Web Planner. PlanData V2', {
|
|
813
806
|
cause: _context4.t0,
|
|
814
807
|
code: 'WC_0012'
|
|
815
808
|
}));
|
|
816
|
-
case
|
|
809
|
+
case 29:
|
|
817
810
|
i++;
|
|
818
|
-
_context4.next =
|
|
811
|
+
_context4.next = 8;
|
|
819
812
|
break;
|
|
820
|
-
case
|
|
813
|
+
case 32:
|
|
821
814
|
elementsSortedbyPosNr = elementsSortedbyPosNr.concat(accElements);
|
|
822
815
|
for (i = 0; i < elementsSortedbyPosNr.length; i++) {
|
|
823
816
|
curElement = oldElementidMapping.get(elementsSortedbyPosNr[i].elementID);
|
|
@@ -839,17 +832,17 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
839
832
|
}
|
|
840
833
|
}
|
|
841
834
|
}
|
|
842
|
-
_context4.next =
|
|
835
|
+
_context4.next = 37;
|
|
843
836
|
break;
|
|
844
|
-
case
|
|
837
|
+
case 36:
|
|
845
838
|
LOG.error(new DivaError('The function extend Planner works only with products that are saved in the configurator 2.0', {
|
|
846
839
|
code: 'WC_0012'
|
|
847
840
|
}));
|
|
848
|
-
case
|
|
841
|
+
case 37:
|
|
849
842
|
case "end":
|
|
850
843
|
return _context4.stop();
|
|
851
844
|
}
|
|
852
|
-
}, _callee4, this, [[
|
|
845
|
+
}, _callee4, this, [[9, 26]]);
|
|
853
846
|
}));
|
|
854
847
|
function extendPlanner(_x7, _x8) {
|
|
855
848
|
return _extendPlanner.apply(this, arguments);
|
|
@@ -866,32 +859,28 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
866
859
|
case 0:
|
|
867
860
|
planDataString = DivaUtils.decodeBase64(setPlanData);
|
|
868
861
|
planData = JSON.parse(planDataString);
|
|
869
|
-
LOG.businessEvent('onPlannerChange', 'Planner', 'initPlanner planData: ' + planDataString, {
|
|
870
|
-
cat: this.getCatalogData().catalogCodex,
|
|
871
|
-
accountId: this.getCatalogData().accountGuid
|
|
872
|
-
});
|
|
873
862
|
if (!(planData.v != null && planData.v == 2)) {
|
|
874
|
-
_context5.next =
|
|
863
|
+
_context5.next = 57;
|
|
875
864
|
break;
|
|
876
865
|
}
|
|
877
866
|
LOG.debug('Initialize set Plan Data - V2\n' + planData, 'DivaStandardPlanner initPlanner');
|
|
878
867
|
if (!(!planData.set || !planData.set.elements || planData.set.elements.length == 0)) {
|
|
879
|
-
_context5.next =
|
|
868
|
+
_context5.next = 6;
|
|
880
869
|
break;
|
|
881
870
|
}
|
|
882
871
|
return _context5.abrupt("return");
|
|
883
|
-
case
|
|
872
|
+
case 6:
|
|
884
873
|
//Init new saved Plannings
|
|
885
874
|
jsonElements = planData.set.elements;
|
|
886
875
|
elementsSortedbyPosNr = [];
|
|
887
876
|
accElements = [];
|
|
888
877
|
i = 0;
|
|
889
|
-
case
|
|
878
|
+
case 10:
|
|
890
879
|
if (!(i < jsonElements.length)) {
|
|
891
|
-
_context5.next =
|
|
880
|
+
_context5.next = 34;
|
|
892
881
|
break;
|
|
893
882
|
}
|
|
894
|
-
_context5.prev =
|
|
883
|
+
_context5.prev = 11;
|
|
895
884
|
jsonElement = jsonElements[i];
|
|
896
885
|
elementID = parseInt(jsonElement.elementID);
|
|
897
886
|
plannerElement = new PlannerElementData(this.set.getSetId(), jsonElement.basketID, elementID, DivaStandardPlanner.plannerType);
|
|
@@ -901,12 +890,12 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
901
890
|
data = this.set.getPlannerData(plannerElement.ElementId);
|
|
902
891
|
plannerElement.updatePlannerData(data);
|
|
903
892
|
if (this.doDisablePlanner2D) {
|
|
904
|
-
_context5.next =
|
|
893
|
+
_context5.next = 23;
|
|
905
894
|
break;
|
|
906
895
|
}
|
|
907
|
-
_context5.next =
|
|
896
|
+
_context5.next = 23;
|
|
908
897
|
return handler2D.loadSVG(plannerElement, this.set);
|
|
909
|
-
case
|
|
898
|
+
case 23:
|
|
910
899
|
//Im neuen speichern ist die Position hinten link - nicht mehr im Centrum wie im alten Planer
|
|
911
900
|
//plannerElement.WorldPosCenter = new Vector3(jsonElement.x, jsonElement.y, jsonElement.z);
|
|
912
901
|
plannerElement.WorldPosCenter = new Vector3(this.plannerBoundingBox.WorldPos.x + jsonElement.x, this.plannerBoundingBox.WorldPos.y + jsonElement.y, this.plannerBoundingBox.WorldPos.z + jsonElement.z);
|
|
@@ -919,44 +908,44 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
919
908
|
elementsSortedbyPosNr[jsonElement.posNr - 1] = jsonElement;
|
|
920
909
|
plannerElement.PosNr = jsonElement.posNr;
|
|
921
910
|
}
|
|
922
|
-
_context5.next =
|
|
911
|
+
_context5.next = 31;
|
|
923
912
|
break;
|
|
924
|
-
case
|
|
925
|
-
_context5.prev =
|
|
926
|
-
_context5.t0 = _context5["catch"](
|
|
913
|
+
case 28:
|
|
914
|
+
_context5.prev = 28;
|
|
915
|
+
_context5.t0 = _context5["catch"](11);
|
|
927
916
|
LOG.error(new DivaError('Error initializing element nr ' + i + ' in the Standard Web Planner. PlanData V2', {
|
|
928
917
|
cause: _context5.t0,
|
|
929
918
|
code: 'WC_0012'
|
|
930
919
|
}));
|
|
931
|
-
case
|
|
920
|
+
case 31:
|
|
932
921
|
i++;
|
|
933
|
-
_context5.next =
|
|
922
|
+
_context5.next = 10;
|
|
934
923
|
break;
|
|
935
|
-
case
|
|
924
|
+
case 34:
|
|
936
925
|
onlyOneBaseElement = elementsSortedbyPosNr.length == 1; //Saves if only one base element is in the planning. All the others are only accessoires
|
|
937
926
|
elementsSortedbyPosNr = elementsSortedbyPosNr.concat(accElements);
|
|
938
927
|
i = 0;
|
|
939
|
-
case
|
|
928
|
+
case 37:
|
|
940
929
|
if (!(i < elementsSortedbyPosNr.length)) {
|
|
941
|
-
_context5.next =
|
|
930
|
+
_context5.next = 55;
|
|
942
931
|
break;
|
|
943
932
|
}
|
|
944
|
-
_context5.prev =
|
|
933
|
+
_context5.prev = 38;
|
|
945
934
|
if (!(i == 0 && onlyOneBaseElement && this.plannerHasStaticBackground)) {
|
|
946
|
-
_context5.next =
|
|
935
|
+
_context5.next = 43;
|
|
947
936
|
break;
|
|
948
937
|
}
|
|
949
938
|
//if the planner has a static background room and there is only one base element (ignore docked ACCs) then it should be forced positioned in the center of the room
|
|
950
939
|
element = this.plannerElements.get(elementsSortedbyPosNr[i].elementID);
|
|
951
940
|
if (element) element.WorldPosCenter = new Vector3(0, element.Height / 2, element.Depth / 2);
|
|
952
|
-
return _context5.abrupt("continue",
|
|
953
|
-
case
|
|
941
|
+
return _context5.abrupt("continue", 52);
|
|
942
|
+
case 43:
|
|
954
943
|
if (!(elementsSortedbyPosNr[i].DP == null || elementsSortedbyPosNr[i].DP.length == 0)) {
|
|
955
|
-
_context5.next =
|
|
944
|
+
_context5.next = 45;
|
|
956
945
|
break;
|
|
957
946
|
}
|
|
958
|
-
return _context5.abrupt("continue",
|
|
959
|
-
case
|
|
947
|
+
return _context5.abrupt("continue", 52);
|
|
948
|
+
case 45:
|
|
960
949
|
DPsInfo = elementsSortedbyPosNr[i].DP;
|
|
961
950
|
for (j = 0; j < DPsInfo.length; j++) {
|
|
962
951
|
dpInfo = DPsInfo[j];
|
|
@@ -972,68 +961,68 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
972
961
|
}
|
|
973
962
|
}
|
|
974
963
|
}
|
|
975
|
-
_context5.next =
|
|
964
|
+
_context5.next = 52;
|
|
976
965
|
break;
|
|
977
|
-
case
|
|
978
|
-
_context5.prev =
|
|
979
|
-
_context5.t1 = _context5["catch"](
|
|
966
|
+
case 49:
|
|
967
|
+
_context5.prev = 49;
|
|
968
|
+
_context5.t1 = _context5["catch"](38);
|
|
980
969
|
LOG.error(new DivaError('Error initializing dockingPoints of element with elementID ' + elementsSortedbyPosNr[i].elementID, {
|
|
981
970
|
cause: _context5.t1,
|
|
982
971
|
code: 'WC_0012'
|
|
983
972
|
}));
|
|
984
|
-
case
|
|
973
|
+
case 52:
|
|
985
974
|
i++;
|
|
986
|
-
_context5.next =
|
|
975
|
+
_context5.next = 37;
|
|
987
976
|
break;
|
|
988
|
-
case
|
|
989
|
-
_context5.next =
|
|
977
|
+
case 55:
|
|
978
|
+
_context5.next = 104;
|
|
990
979
|
break;
|
|
991
|
-
case
|
|
980
|
+
case 57:
|
|
992
981
|
LOG.debug('Initialize set Plan Data - old V1\n' + planData, 'DivaStandardPlanner initPlanner');
|
|
993
982
|
if (!(!planData.Sets || planData.Sets.length == 0 || !planData.Sets[0].Elements || planData.Sets[0].Elements.length == 0)) {
|
|
994
|
-
_context5.next =
|
|
983
|
+
_context5.next = 60;
|
|
995
984
|
break;
|
|
996
985
|
}
|
|
997
986
|
return _context5.abrupt("return");
|
|
998
|
-
case
|
|
987
|
+
case 60:
|
|
999
988
|
//Init old Plannings - saved with the old planner
|
|
1000
989
|
_jsonElements = planData.Sets[0].Elements;
|
|
1001
990
|
_elementsSortedbyPosNr = [];
|
|
1002
991
|
_accElements = []; //Zuerst initialisiere alle Elemente
|
|
1003
992
|
//Dann positioniere sie richtig
|
|
1004
993
|
i = 0;
|
|
1005
|
-
case
|
|
994
|
+
case 64:
|
|
1006
995
|
if (!(i < _jsonElements.length)) {
|
|
1007
|
-
_context5.next =
|
|
996
|
+
_context5.next = 94;
|
|
1008
997
|
break;
|
|
1009
998
|
}
|
|
1010
|
-
_context5.prev =
|
|
999
|
+
_context5.prev = 65;
|
|
1011
1000
|
_jsonElement = _jsonElements[i];
|
|
1012
1001
|
basketID = _jsonElement.BasketID;
|
|
1013
1002
|
if (this.set.getElementId(basketID) == -1) this.set.setElementId(basketID, Number(_jsonElement.ID));
|
|
1014
1003
|
elementId = this.set.getElementId(basketID);
|
|
1015
1004
|
_jsonElement.elementId = elementId;
|
|
1016
1005
|
if (!(elementId == -1)) {
|
|
1017
|
-
_context5.next =
|
|
1006
|
+
_context5.next = 74;
|
|
1018
1007
|
break;
|
|
1019
1008
|
}
|
|
1020
1009
|
LOG.error(new DivaError('Error when initializing planner. The elementID Was not saved in the article. ', {
|
|
1021
1010
|
code: 'WC_0012'
|
|
1022
1011
|
}));
|
|
1023
|
-
return _context5.abrupt("continue",
|
|
1024
|
-
case
|
|
1012
|
+
return _context5.abrupt("continue", 91);
|
|
1013
|
+
case 74:
|
|
1025
1014
|
_plannerElement = new PlannerElementData(this.set.getSetId(), basketID, elementId, DivaStandardPlanner.plannerType);
|
|
1026
1015
|
this.nextElementId = elementId + 1;
|
|
1027
1016
|
this.plannerElements.set(_plannerElement.ElementId, _plannerElement);
|
|
1028
1017
|
_data = this.set.getPlannerData(_plannerElement.ElementId);
|
|
1029
1018
|
_plannerElement.updatePlannerData(_data);
|
|
1030
1019
|
if (this.doDisablePlanner2D) {
|
|
1031
|
-
_context5.next =
|
|
1020
|
+
_context5.next = 82;
|
|
1032
1021
|
break;
|
|
1033
1022
|
}
|
|
1034
|
-
_context5.next =
|
|
1023
|
+
_context5.next = 82;
|
|
1035
1024
|
return handler2D.loadSVG(_plannerElement, this.set);
|
|
1036
|
-
case
|
|
1025
|
+
case 82:
|
|
1037
1026
|
//Achtung die Pos Infos im alten Planer waren Zentrumskoordinaten!!! Nicht hinten oben.
|
|
1038
1027
|
centerWorldPos = new Vector3(_jsonElement.PosX, _jsonElement.PosZ, _jsonElement.PosY);
|
|
1039
1028
|
_plannerElement.WorldPosCenter = new Vector3(this.plannerBoundingBox.WorldPos.x + centerWorldPos.x, this.plannerBoundingBox.WorldPos.y + centerWorldPos.y, this.plannerBoundingBox.WorldPos.z + centerWorldPos.z);
|
|
@@ -1050,34 +1039,34 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1050
1039
|
_elementsSortedbyPosNr[_jsonElement.PosNum - 1] = _jsonElement;
|
|
1051
1040
|
_plannerElement.PosNr = _jsonElement.PosNum;
|
|
1052
1041
|
}
|
|
1053
|
-
_context5.next =
|
|
1042
|
+
_context5.next = 91;
|
|
1054
1043
|
break;
|
|
1055
|
-
case
|
|
1056
|
-
_context5.prev =
|
|
1057
|
-
_context5.t2 = _context5["catch"](
|
|
1044
|
+
case 88:
|
|
1045
|
+
_context5.prev = 88;
|
|
1046
|
+
_context5.t2 = _context5["catch"](65);
|
|
1058
1047
|
LOG.error(new DivaError('Error initializing element nr ' + i + ' in the Standard Web Planner - Plan Data old Planner', {
|
|
1059
1048
|
cause: _context5.t2,
|
|
1060
1049
|
code: 'WC_0012'
|
|
1061
1050
|
}));
|
|
1062
|
-
case
|
|
1051
|
+
case 91:
|
|
1063
1052
|
i++;
|
|
1064
|
-
_context5.next =
|
|
1053
|
+
_context5.next = 64;
|
|
1065
1054
|
break;
|
|
1066
|
-
case
|
|
1055
|
+
case 94:
|
|
1067
1056
|
_elementsSortedbyPosNr = _elementsSortedbyPosNr.concat(_accElements);
|
|
1068
1057
|
//Dann werden die DockingPoints durchgegangen und die jeweils richtigen müssen gesucht werden.
|
|
1069
1058
|
i = 0;
|
|
1070
|
-
case
|
|
1059
|
+
case 96:
|
|
1071
1060
|
if (!(i < _elementsSortedbyPosNr.length)) {
|
|
1072
|
-
_context5.next =
|
|
1061
|
+
_context5.next = 104;
|
|
1073
1062
|
break;
|
|
1074
1063
|
}
|
|
1075
1064
|
if (!(_elementsSortedbyPosNr[i].DP == null || _elementsSortedbyPosNr[i].DP.length == 0)) {
|
|
1076
|
-
_context5.next =
|
|
1065
|
+
_context5.next = 99;
|
|
1077
1066
|
break;
|
|
1078
1067
|
}
|
|
1079
|
-
return _context5.abrupt("continue",
|
|
1080
|
-
case
|
|
1068
|
+
return _context5.abrupt("continue", 101);
|
|
1069
|
+
case 99:
|
|
1081
1070
|
_DPsInfo = _elementsSortedbyPosNr[i].DP;
|
|
1082
1071
|
for (j = 0; j < _DPsInfo.length; j++) {
|
|
1083
1072
|
_dpInfo = _DPsInfo[j];
|
|
@@ -1095,18 +1084,18 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1095
1084
|
}
|
|
1096
1085
|
}
|
|
1097
1086
|
}
|
|
1098
|
-
case
|
|
1087
|
+
case 101:
|
|
1099
1088
|
i++;
|
|
1100
|
-
_context5.next =
|
|
1089
|
+
_context5.next = 96;
|
|
1101
1090
|
break;
|
|
1102
|
-
case
|
|
1091
|
+
case 104:
|
|
1103
1092
|
this.updateAllElementsWorldPos();
|
|
1104
1093
|
this.updatePlannerPosNr();
|
|
1105
|
-
case
|
|
1094
|
+
case 106:
|
|
1106
1095
|
case "end":
|
|
1107
1096
|
return _context5.stop();
|
|
1108
1097
|
}
|
|
1109
|
-
}, _callee5, this, [[
|
|
1098
|
+
}, _callee5, this, [[11, 28], [38, 49], [65, 88]]);
|
|
1110
1099
|
}));
|
|
1111
1100
|
function initPlanner(_x9) {
|
|
1112
1101
|
return _initPlanner.apply(this, arguments);
|
|
@@ -1135,10 +1124,6 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1135
1124
|
case 0:
|
|
1136
1125
|
// _elementId: number, _setId: string, _basketId: string, elementInitProp: any, catalogElement: CatalogPlannerArticleData
|
|
1137
1126
|
plannerElement = new PlannerElementData(this.set.getSetId(), basketID, this.nextElementId, DivaStandardPlanner.plannerType /*, this.set.getSetId(), basketID, elementInitProp, catalogElement*/);
|
|
1138
|
-
LOG.businessEvent('onPlannerChange', 'Planner', 'addPlannerElement with elementID: ' + plannerElement.ElementId + '; basketID: ' + basketID), {
|
|
1139
|
-
cat: this.getCatalogData().catalogCodex,
|
|
1140
|
-
accountId: this.getCatalogData().accountGuid
|
|
1141
|
-
};
|
|
1142
1127
|
this.nextElementId++;
|
|
1143
1128
|
this.plannerElements.set(plannerElement.ElementId, plannerElement);
|
|
1144
1129
|
this.set.setElementId(basketID, plannerElement.ElementId);
|
|
@@ -1146,54 +1131,54 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1146
1131
|
plannerElement.updatePlannerData(data);
|
|
1147
1132
|
//Do load the svg
|
|
1148
1133
|
if (this.doDisablePlanner2D) {
|
|
1149
|
-
_context6.next =
|
|
1134
|
+
_context6.next = 9;
|
|
1150
1135
|
break;
|
|
1151
1136
|
}
|
|
1152
|
-
_context6.next =
|
|
1137
|
+
_context6.next = 9;
|
|
1153
1138
|
return handler2D.loadSVG(plannerElement, this.set);
|
|
1154
|
-
case
|
|
1139
|
+
case 9:
|
|
1155
1140
|
t = (_params$dockingPointI = params.dockingPointInfos) !== null && _params$dockingPointI !== void 0 ? _params$dockingPointI : [{
|
|
1156
1141
|
targetDockingPointId: params.targetDockingPointId,
|
|
1157
1142
|
targetElemIdToDock: params.targetElemIdToDock
|
|
1158
1143
|
}];
|
|
1159
1144
|
if (!(t !== null && t !== void 0 && (_t$ = t[0]) !== null && _t$ !== void 0 && _t$.targetElemIdToDock && t !== null && t !== void 0 && (_t$2 = t[0]) !== null && _t$2 !== void 0 && _t$2.targetDockingPointId)) {
|
|
1160
|
-
_context6.next =
|
|
1145
|
+
_context6.next = 15;
|
|
1161
1146
|
break;
|
|
1162
1147
|
}
|
|
1163
|
-
_context6.next =
|
|
1148
|
+
_context6.next = 13;
|
|
1164
1149
|
return this.addElementToWorld(plannerElement, t);
|
|
1165
|
-
case
|
|
1166
|
-
_context6.next =
|
|
1150
|
+
case 13:
|
|
1151
|
+
_context6.next = 27;
|
|
1167
1152
|
break;
|
|
1168
|
-
case
|
|
1153
|
+
case 15:
|
|
1169
1154
|
if (!(t !== null && t !== void 0 && (_t$3 = t[0]) !== null && _t$3 !== void 0 && _t$3.targetElemIdToDock)) {
|
|
1170
|
-
_context6.next =
|
|
1155
|
+
_context6.next = 20;
|
|
1171
1156
|
break;
|
|
1172
1157
|
}
|
|
1173
|
-
_context6.next =
|
|
1158
|
+
_context6.next = 18;
|
|
1174
1159
|
return this.addElementToWorld(plannerElement, t);
|
|
1175
|
-
case
|
|
1176
|
-
_context6.next =
|
|
1160
|
+
case 18:
|
|
1161
|
+
_context6.next = 27;
|
|
1177
1162
|
break;
|
|
1178
|
-
case
|
|
1163
|
+
case 20:
|
|
1179
1164
|
if (!params.oldPlannerTransform) {
|
|
1180
|
-
_context6.next =
|
|
1165
|
+
_context6.next = 25;
|
|
1181
1166
|
break;
|
|
1182
1167
|
}
|
|
1183
|
-
_context6.next =
|
|
1168
|
+
_context6.next = 23;
|
|
1184
1169
|
return this.addElementToWorld(plannerElement, undefined, undefined, undefined, undefined, {
|
|
1185
1170
|
forceSetToTrans: true,
|
|
1186
1171
|
transform: params.oldPlannerTransform
|
|
1187
1172
|
});
|
|
1188
|
-
case
|
|
1189
|
-
_context6.next =
|
|
1173
|
+
case 23:
|
|
1174
|
+
_context6.next = 27;
|
|
1190
1175
|
break;
|
|
1191
|
-
case
|
|
1192
|
-
_context6.next =
|
|
1176
|
+
case 25:
|
|
1177
|
+
_context6.next = 27;
|
|
1193
1178
|
return this.addElementToWorld(plannerElement);
|
|
1194
|
-
case
|
|
1179
|
+
case 27:
|
|
1195
1180
|
this.updatePlannerBoundingBox();
|
|
1196
|
-
case
|
|
1181
|
+
case 28:
|
|
1197
1182
|
case "end":
|
|
1198
1183
|
return _context6.stop();
|
|
1199
1184
|
}
|
|
@@ -1217,27 +1202,23 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1217
1202
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
1218
1203
|
while (1) switch (_context7.prev = _context7.next) {
|
|
1219
1204
|
case 0:
|
|
1220
|
-
LOG.businessEvent('onPlannerChange', 'Planner', 'copyPlannerElement', {
|
|
1221
|
-
cat: this.getCatalogData().catalogCodex,
|
|
1222
|
-
accountId: this.getCatalogData().accountGuid
|
|
1223
|
-
});
|
|
1224
1205
|
articlesToLoad = [];
|
|
1225
1206
|
articleCopyRelation.forEach(function (basketIDNewArticle, elementToCopyId) {
|
|
1226
1207
|
if (copyInfo == undefined || copyInfo.dpType == 'NO') articlesToLoad.push(basketIDNewArticle);
|
|
1227
1208
|
});
|
|
1228
1209
|
i = 0;
|
|
1229
|
-
case
|
|
1210
|
+
case 3:
|
|
1230
1211
|
if (!(i < articlesToLoad.length)) {
|
|
1231
|
-
_context7.next =
|
|
1212
|
+
_context7.next = 9;
|
|
1232
1213
|
break;
|
|
1233
1214
|
}
|
|
1234
|
-
_context7.next =
|
|
1215
|
+
_context7.next = 6;
|
|
1235
1216
|
return this.addPlannerElement(articlesToLoad[i], {});
|
|
1236
|
-
case
|
|
1217
|
+
case 6:
|
|
1237
1218
|
i++;
|
|
1238
|
-
_context7.next =
|
|
1219
|
+
_context7.next = 3;
|
|
1239
1220
|
break;
|
|
1240
|
-
case
|
|
1221
|
+
case 9:
|
|
1241
1222
|
case "end":
|
|
1242
1223
|
return _context7.stop();
|
|
1243
1224
|
}
|
|
@@ -1288,10 +1269,6 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1288
1269
|
}
|
|
1289
1270
|
return _context8.abrupt("return", {});
|
|
1290
1271
|
case 4:
|
|
1291
|
-
LOG.businessEvent('onPlannerChange', 'Planner', 'deletePlannerElement with elementId: ' + elementId, {
|
|
1292
|
-
cat: this.getCatalogData().catalogCodex,
|
|
1293
|
-
accountId: this.getCatalogData().accountGuid
|
|
1294
|
-
});
|
|
1295
1272
|
plannerElement = this.plannerElements.get(elementId);
|
|
1296
1273
|
parent = this.getParentElement(plannerElement);
|
|
1297
1274
|
prevPosNum = -1;
|
|
@@ -1351,7 +1328,7 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1351
1328
|
newElementToSelect: newSelElemIdPrev >= 0 ? newSelElemIdPrev : newSelElemIdNext >= 0 ? newSelElemIdNext : undefined,
|
|
1352
1329
|
transform: transform
|
|
1353
1330
|
});
|
|
1354
|
-
case
|
|
1331
|
+
case 24:
|
|
1355
1332
|
case "end":
|
|
1356
1333
|
return _context8.stop();
|
|
1357
1334
|
}
|
|
@@ -1474,10 +1451,6 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1474
1451
|
var plannerElement = this.plannerElements.get(elementId);
|
|
1475
1452
|
plannerElement === null || plannerElement === void 0 || plannerElement.updateDeltaTrans(deltaMove, deltaAngleDeg, rotCorrection, transState == 'END');
|
|
1476
1453
|
if (transState == 'START') {
|
|
1477
|
-
LOG.businessEvent('onPlannerChange', 'Planner', 'updatePlannerTrans_Start elementId: ' + elementId, {
|
|
1478
|
-
cat: this.getCatalogData().catalogCodex,
|
|
1479
|
-
accountId: this.getCatalogData().accountGuid
|
|
1480
|
-
});
|
|
1481
1454
|
if (plannerElement) {
|
|
1482
1455
|
var dpsToUndock = ['AVR', 'AVL'];
|
|
1483
1456
|
if (plannerElement.IsDockedAccessoire) dpsToUndock = dpsToUndock.concat(['AVO', 'AVU', 'AVN', 'AVS', 'AVC']);
|
|
@@ -1487,10 +1460,6 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1487
1460
|
}
|
|
1488
1461
|
}
|
|
1489
1462
|
} else if (transState == 'END') {
|
|
1490
|
-
LOG.businessEvent('onPlannerChange', 'Planner', 'updatePlannerTrans_End elementId: ' + elementId, {
|
|
1491
|
-
cat: this.getCatalogData().catalogCodex,
|
|
1492
|
-
accountId: this.getCatalogData().accountGuid
|
|
1493
|
-
});
|
|
1494
1463
|
var dockablePairs = dockingPointHandlerInst.searchDockableElementsInArea(plannerElement, this.getAllPlannerElements(), autoDockingDistance); //hier kann jetzt ein DP drinnen stehen - docke alle
|
|
1495
1464
|
if (dockablePairs != null && dockablePairs.size > 0) {
|
|
1496
1465
|
dockablePairs.forEach(function (dockPair, type) {
|
|
@@ -1514,10 +1483,6 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1514
1483
|
}, {
|
|
1515
1484
|
key: "destroyPlanner",
|
|
1516
1485
|
value: function destroyPlanner() {
|
|
1517
|
-
LOG.businessEvent('onPlannerChange', 'Planner', 'destroyPlanner', {
|
|
1518
|
-
cat: this.getCatalogData().catalogCodex,
|
|
1519
|
-
accountId: this.getCatalogData().accountGuid
|
|
1520
|
-
});
|
|
1521
1486
|
this.plannerElements.forEach(function (elem, elemId) {
|
|
1522
1487
|
elem.destroy();
|
|
1523
1488
|
});
|
|
@@ -1532,10 +1497,6 @@ var DivaStandardPlanner = /*#__PURE__*/function () {
|
|
|
1532
1497
|
value: function saveSetPlanner() {
|
|
1533
1498
|
var _this4 = this;
|
|
1534
1499
|
if (this.plannerElements.size == 0) return null;
|
|
1535
|
-
LOG.businessEvent('onPlannerChange', 'Planner', 'saveSetPlanner', {
|
|
1536
|
-
cat: this.getCatalogData().catalogCodex,
|
|
1537
|
-
accountId: this.getCatalogData().accountGuid
|
|
1538
|
-
});
|
|
1539
1500
|
var plannerElements = [];
|
|
1540
1501
|
this.plannerElements.forEach(function (elem, elemId) {
|
|
1541
1502
|
var dockingDPs = elem.getDockingDockingPoints();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
2
2
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
|
-
import './index-
|
|
4
|
+
import './index-f240c58e.js';
|
|
5
5
|
import DivaUtils from '@crystaldesign/diva-utils';
|
|
6
6
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
7
7
|
import '@babel/runtime/regenerator';
|
|
@@ -3,7 +3,7 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
3
3
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
4
4
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
5
5
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
6
|
-
import { R as Rendering, H as HQRenderScript } from './index-
|
|
6
|
+
import { R as Rendering, H as HQRenderScript } from './index-f240c58e.js';
|
|
7
7
|
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
8
8
|
import { HubConnectionBuilder, LogLevel } from '@microsoft/signalr';
|
|
9
9
|
import io from 'socket.io-client';
|
|
@@ -114,9 +114,6 @@ var Host3DSignalR = /*#__PURE__*/function () {
|
|
|
114
114
|
*/
|
|
115
115
|
_defineProperty(this, "newHQRenderScript", function (divaNr, hash, hqRenderScript) {
|
|
116
116
|
LOG.debug('Receive HQRenderScript: ' + hqRenderScript);
|
|
117
|
-
LOG.successTransaction('requestHQR', {
|
|
118
|
-
hash: hash
|
|
119
|
-
});
|
|
120
117
|
_this.plannerHandler3D.onReceiveHQRenderScript(hash, hqRenderScript);
|
|
121
118
|
});
|
|
122
119
|
/**
|
|
@@ -369,11 +366,6 @@ var Host3DSignalR = /*#__PURE__*/function () {
|
|
|
369
366
|
|
|
370
367
|
//Create options Request
|
|
371
368
|
var options3DHost = this.create3DHostRequestOption(params);
|
|
372
|
-
if (options3DHost.hqrenderscript) LOG.startTransaction({
|
|
373
|
-
event: 'requestHQR',
|
|
374
|
-
eventId: 'requestHQR',
|
|
375
|
-
message: params.planningHash
|
|
376
|
-
});
|
|
377
369
|
LOG.debug('request 3D (mediaType ' + ((_params$requestRender14 = params.requestRenderingParams) === null || _params$requestRender14 === void 0 ? void 0 : _params$requestRender14.mediaServiceSaveMode) + ') from 3D Host' + JSON.stringify(params));
|
|
378
370
|
if (options3DHost.rendering) {
|
|
379
371
|
LOG.startTransaction({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
2
2
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
|
-
import './index-
|
|
3
|
+
import './index-f240c58e.js';
|
|
4
4
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
5
5
|
import '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import '@babel/runtime/regenerator';
|