@crystaldesign/web-planner-logic 24.11.0-rc.5 → 24.12.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-92d6249f.js → DivaBoxPlanner-c59ee416.js} +2 -2
- package/build/cjs/{DivaStandardPlanner-f087a60f.js → DivaStandardPlanner-e0c04f0c.js} +2 -2
- package/build/cjs/{DoorPlanner-a4ca5951.js → DoorPlanner-2b3e1289.js} +1 -1
- package/build/cjs/{Host3DSignalR-a9adc075.js → Host3DSignalR-22e2b075.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-316cece4.js → LiviqueWWSHandler-22b25127.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-6e08146b.js → PfisterWWSHandler-cb1313d4.js} +1 -1
- package/build/cjs/{PlannerHandler2D-2d461e53.js → PlannerHandler2D-b8f77cca.js} +1 -1
- package/build/cjs/{ProductBasketHandler-8e36ff91.js → ProductBasketHandler-2e320139.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-04124f62.js → SeriousBasketHandler-0c288b72.js} +1 -1
- package/build/cjs/{ShelfPlanner-2f53a82d.js → ShelfPlanner-e68dfee7.js} +1 -1
- package/build/cjs/{StandardWWSHandler-fba7941f.js → StandardWWSHandler-ac69df0a.js} +1 -1
- package/build/cjs/{index-3d16dede.js → index-696ee323.js} +158 -156
- package/build/cjs/index.js +1 -1
- package/build/esm/{DivaBoxPlanner-8f25edcf.js → DivaBoxPlanner-de566659.js} +2 -2
- package/build/esm/{DivaStandardPlanner-62388b41.js → DivaStandardPlanner-2154eb2b.js} +2 -2
- package/build/esm/{DoorPlanner-38549ddd.js → DoorPlanner-d1ab5366.js} +1 -1
- package/build/esm/{Host3DSignalR-0e4a7213.js → Host3DSignalR-0538553d.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-2e468114.js → LiviqueWWSHandler-89e77291.js} +1 -1
- package/build/esm/{PfisterWWSHandler-03b40f37.js → PfisterWWSHandler-8ca6de55.js} +1 -1
- package/build/esm/{PlannerHandler2D-16671325.js → PlannerHandler2D-66c2e087.js} +1 -1
- package/build/esm/{ProductBasketHandler-0890fc13.js → ProductBasketHandler-68a38a6d.js} +1 -1
- package/build/esm/{SeriousBasketHandler-3d6ac698.js → SeriousBasketHandler-3edc7e16.js} +1 -1
- package/build/esm/{ShelfPlanner-bf576f58.js → ShelfPlanner-e1e803b9.js} +1 -1
- package/build/esm/{StandardWWSHandler-223a1636.js → StandardWWSHandler-b84368c1.js} +1 -1
- package/build/esm/{index-85746c10.js → index-2bc7b211.js} +158 -156
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -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-2bc7b211.js';
|
|
7
|
+
import { d as dockingPointHandlerInst, h as handler2D, P as PlannerElementData } from './PlannerHandler2D-66c2e087.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';
|
|
@@ -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-2bc7b211.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-2bc7b211.js';
|
|
7
7
|
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
8
8
|
import * as signalR from '@microsoft/signalr';
|
|
9
9
|
import io from 'socket.io-client';
|
|
@@ -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-2bc7b211.js';
|
|
4
4
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
5
5
|
import '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import '@babel/runtime/regenerator';
|
|
@@ -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-2bc7b211.js';
|
|
4
4
|
import { SAPOrderLineData } from '@crystaldesign/basket-model';
|
|
5
5
|
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
6
6
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
@@ -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 { V as Vector3, c as Vector2, D as DockingPoint } from './index-
|
|
4
|
+
import { V as Vector3, c as Vector2, D as DockingPoint } from './index-2bc7b211.js';
|
|
5
5
|
import DivaUtils, { md5, DivaError } from '@crystaldesign/diva-utils';
|
|
6
6
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
7
7
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
2
2
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
|
-
import { p as productHandlerInstance } from './index-
|
|
3
|
+
import { p as productHandlerInstance } from './index-2bc7b211.js';
|
|
4
4
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
5
5
|
import '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import '@babel/runtime/regenerator';
|
|
@@ -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 { s as summaryHandlerInstance } from './index-
|
|
4
|
+
import { s as summaryHandlerInstance } from './index-2bc7b211.js';
|
|
5
5
|
import DivaUtils from '@crystaldesign/diva-utils';
|
|
6
6
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
7
7
|
import '@babel/runtime/regenerator';
|
|
@@ -4,7 +4,7 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
4
4
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
5
5
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
7
|
-
import { G as Grid, a as setHandlerInstance, b as articleHandlerInstance } from './index-
|
|
7
|
+
import { G as Grid, a as setHandlerInstance, b as articleHandlerInstance } from './index-2bc7b211.js';
|
|
8
8
|
import DivaUtils from '@crystaldesign/diva-utils';
|
|
9
9
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
10
10
|
import '@babel/runtime/helpers/slicedToArray';
|
|
@@ -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-2bc7b211.js';
|
|
4
4
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
5
5
|
import '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import '@babel/runtime/regenerator';
|
|
@@ -22557,7 +22557,6 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
22557
22557
|
}, {
|
|
22558
22558
|
key: "updateIDMSpecificFeature",
|
|
22559
22559
|
value: function updateIDMSpecificFeature(myArtOPS) {
|
|
22560
|
-
if (!this.parentHasSameOption(myArtOPS.optionCodex)) return;
|
|
22561
22560
|
if (myArtOPS.option.idmVariantenArt == 90) {
|
|
22562
22561
|
//R (Anschlusstyp R) - AVR
|
|
22563
22562
|
var newAVRFilter = [],
|
|
@@ -23543,7 +23542,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23543
23542
|
break;
|
|
23544
23543
|
}
|
|
23545
23544
|
_context.next = 4;
|
|
23546
|
-
return import('./ShelfPlanner-
|
|
23545
|
+
return import('./ShelfPlanner-e1e803b9.js');
|
|
23547
23546
|
case 4:
|
|
23548
23547
|
_yield$import = _context.sent;
|
|
23549
23548
|
ShelfPlanner = _yield$import["default"];
|
|
@@ -23607,6 +23606,7 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23607
23606
|
calcUnitPrice = 0,
|
|
23608
23607
|
calcUnit2Price = 0,
|
|
23609
23608
|
firstUnit2Param = 0,
|
|
23609
|
+
secondUnit2Param = 0,
|
|
23610
23610
|
idmPriceMeasureFactor = 1;
|
|
23611
23611
|
//CalcPreise berechnen
|
|
23612
23612
|
for (var i = 0; i < maxPriceOfGroupCodex.length; i++) {
|
|
@@ -23640,70 +23640,75 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23640
23640
|
if (!tmpOPT.useMaxPriceOfGroup) {
|
|
23641
23641
|
myArtOPS.calcPrice = myArtOPS.price * myArtOPS.quantity;
|
|
23642
23642
|
}
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
|
|
23647
|
-
|
|
23648
|
-
|
|
23649
|
-
|
|
23650
|
-
|
|
23651
|
-
|
|
23652
|
-
|
|
23653
|
-
|
|
23654
|
-
|
|
23655
|
-
|
|
23656
|
-
|
|
23657
|
-
|
|
23658
|
-
|
|
23659
|
-
|
|
23660
|
-
|
|
23661
|
-
|
|
23662
|
-
|
|
23663
|
-
|
|
23664
|
-
|
|
23665
|
-
|
|
23666
|
-
}
|
|
23667
|
-
if ((mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && this.parentHasSameOption(OP)) {
|
|
23668
|
-
var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
|
|
23669
|
-
if (freeTextMeasure || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
23670
|
-
if (calcUnitPrice != 0) {
|
|
23671
|
-
var quantity = 0;
|
|
23672
|
-
if (OP == 'OPTUMFANG') {
|
|
23673
|
-
mUnit = 'cm';
|
|
23674
|
-
quantity = this.calcWidth * 2 + this.calcDepth * 2;
|
|
23675
|
-
} else if (OP == 'OPTUMFANG_KREIS') {
|
|
23676
|
-
mUnit = 'cm';
|
|
23677
|
-
quantity = this.calcWidth * Math.PI;
|
|
23643
|
+
if (pUnit !== null && pUnit !== void 0 && pUnit.includes('2') && calcUnit2Price && firstUnit2Param && secondUnit2Param) {
|
|
23644
|
+
var unit2Price = this.getCalcPerUnit(pUnit, myArtOPS.calcPrice);
|
|
23645
|
+
myArtOPS.usedCalcPrice = unit2Price * firstUnit2Param * secondUnit2Param;
|
|
23646
|
+
} else {
|
|
23647
|
+
switch (pUnit) {
|
|
23648
|
+
case 'm':
|
|
23649
|
+
calcUnitPrice += myArtOPS.calcPrice / 100;
|
|
23650
|
+
break;
|
|
23651
|
+
case 'cm':
|
|
23652
|
+
calcUnitPrice += myArtOPS.calcPrice;
|
|
23653
|
+
break;
|
|
23654
|
+
case 'm2':
|
|
23655
|
+
calcUnit2Price += myArtOPS.calcPrice / 10000;
|
|
23656
|
+
break;
|
|
23657
|
+
case 'cm2':
|
|
23658
|
+
calcUnit2Price += myArtOPS.calcPrice;
|
|
23659
|
+
break;
|
|
23660
|
+
default:
|
|
23661
|
+
if (myArtOPS.isPercentage) {
|
|
23662
|
+
//hier myArtOPS.TargetOption auswerten
|
|
23663
|
+
if (myArtOPS.targetOption && myArtOPS.targetOption != '') ; else {
|
|
23664
|
+
myArtOPS.usedCalcPrice = myArtOPS.calcPrice;
|
|
23665
|
+
}
|
|
23678
23666
|
} else {
|
|
23679
|
-
|
|
23667
|
+
myArtOPS.usedCalcPrice = DivaUtils.decimalAdjust('round', myArtOPS.calcPrice, digits);
|
|
23680
23668
|
}
|
|
23681
|
-
|
|
23682
|
-
|
|
23683
|
-
|
|
23684
|
-
|
|
23685
|
-
|
|
23686
|
-
|
|
23687
|
-
|
|
23688
|
-
|
|
23689
|
-
|
|
23669
|
+
break;
|
|
23670
|
+
}
|
|
23671
|
+
if (mUnit || OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') {
|
|
23672
|
+
var freeTextMeasure = parseFloat(myArtOPS.freeText ? myArtOPS.freeText : '');
|
|
23673
|
+
if (freeTextMeasure || (OP == 'OPTUMFANG' || OP == 'OPTUMFANG_KREIS') && calcUnitPrice != 0) {
|
|
23674
|
+
if (calcUnitPrice != 0) {
|
|
23675
|
+
var quantity = 0;
|
|
23676
|
+
if (OP == 'OPTUMFANG') {
|
|
23677
|
+
mUnit = 'cm';
|
|
23678
|
+
quantity = this.calcWidth * 2 + this.calcDepth * 2;
|
|
23679
|
+
} else if (OP == 'OPTUMFANG_KREIS') {
|
|
23680
|
+
mUnit = 'cm';
|
|
23681
|
+
quantity = this.calcWidth * Math.PI;
|
|
23682
|
+
} else {
|
|
23683
|
+
quantity = freeTextMeasure;
|
|
23684
|
+
}
|
|
23685
|
+
if (mUnit == 'cm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity;else if (mUnit == 'm') myArtOPS.usedCalcPrice = calcUnitPrice * quantity * 100;
|
|
23686
|
+
} else if (calcUnit2Price != 0) {
|
|
23687
|
+
//for diamter option
|
|
23688
|
+
if (myArtOPS.option.diameter) {
|
|
23689
|
+
myArtOPS.usedCalcPrice = calcUnit2Price * this.calcWidth * this.calcDepth;
|
|
23690
23690
|
} else {
|
|
23691
|
-
|
|
23692
|
-
|
|
23693
|
-
|
|
23691
|
+
if (firstUnit2Param == 0) {
|
|
23692
|
+
firstUnit2Param = freeTextMeasure;
|
|
23693
|
+
if (mUnit == 'm') firstUnit2Param = firstUnit2Param * 100;
|
|
23694
|
+
} else {
|
|
23695
|
+
secondUnit2Param = freeTextMeasure;
|
|
23696
|
+
if (mUnit == 'm') secondUnit2Param = secondUnit2Param * 100;
|
|
23697
|
+
myArtOPS.usedCalcPrice = calcUnit2Price * firstUnit2Param * secondUnit2Param;
|
|
23698
|
+
}
|
|
23694
23699
|
}
|
|
23695
23700
|
}
|
|
23696
23701
|
}
|
|
23697
23702
|
}
|
|
23698
|
-
|
|
23699
|
-
|
|
23700
|
-
|
|
23701
|
-
|
|
23702
|
-
|
|
23703
|
-
|
|
23704
|
-
|
|
23705
|
-
|
|
23706
|
-
|
|
23703
|
+
if (OP == 'OPT95' && !!this.catalogArticle.widthHasPrice) {
|
|
23704
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcWidth;
|
|
23705
|
+
}
|
|
23706
|
+
if (OP == 'OPT96' && !!this.catalogArticle.depthHasPrice) {
|
|
23707
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcDepth;
|
|
23708
|
+
}
|
|
23709
|
+
if (OP == 'OPT97' && !!this.catalogArticle.heightHasPrice) {
|
|
23710
|
+
idmPriceMeasureFactor = idmPriceMeasureFactor * this.calcHeight;
|
|
23711
|
+
}
|
|
23707
23712
|
}
|
|
23708
23713
|
}
|
|
23709
23714
|
//jetzt nochmal prozentuelle Preise mit TargetOption berechnen
|
|
@@ -23802,10 +23807,19 @@ var DivaArticle = /*#__PURE__*/function () {
|
|
|
23802
23807
|
this.article.price = articleUsedCalcPrice;
|
|
23803
23808
|
}
|
|
23804
23809
|
}, {
|
|
23805
|
-
key: "
|
|
23806
|
-
value: function
|
|
23807
|
-
|
|
23808
|
-
|
|
23810
|
+
key: "getCalcPerUnit",
|
|
23811
|
+
value: function getCalcPerUnit(unit, calcPrice) {
|
|
23812
|
+
switch (unit) {
|
|
23813
|
+
case 'm':
|
|
23814
|
+
return calcPrice / 100;
|
|
23815
|
+
case 'cm':
|
|
23816
|
+
return calcPrice;
|
|
23817
|
+
case 'm2':
|
|
23818
|
+
return calcPrice / 10000;
|
|
23819
|
+
case 'cm2':
|
|
23820
|
+
return calcPrice;
|
|
23821
|
+
}
|
|
23822
|
+
return 0;
|
|
23809
23823
|
}
|
|
23810
23824
|
}, {
|
|
23811
23825
|
key: "getOptionPrice",
|
|
@@ -24957,89 +24971,72 @@ var DivaArticleHandler = /*#__PURE__*/function () {
|
|
|
24957
24971
|
}
|
|
24958
24972
|
}
|
|
24959
24973
|
}
|
|
24960
|
-
if (Object.keys(article.articleOptionStates).length === 0) {
|
|
24961
|
-
|
|
24962
|
-
|
|
24963
|
-
|
|
24964
|
-
|
|
24965
|
-
|
|
24966
|
-
|
|
24967
|
-
|
|
24968
|
-
|
|
24969
|
-
|
|
24970
|
-
|
|
24971
|
-
|
|
24972
|
-
|
|
24973
|
-
|
|
24974
|
-
//falls eine Golbale Option Initialisiert wird soll hier der Default value bei dessen abhängigen Optionen gesetzt werden deshalb 2. parameter = true
|
|
24975
|
-
article.checkDefaultGlobalOpt(_defineProperty({}, foundItem.opt.codex, foundItem.opv.codex), true);
|
|
24974
|
+
if (!(Object.keys(article.articleOptionStates).length === 0)) {
|
|
24975
|
+
//infos eines Basisconfigurats initialisieren
|
|
24976
|
+
if (!(Object.keys(variantValues).length === 0)) {
|
|
24977
|
+
//Hier werden dann die neuen OPT Werte beim aktuell selektierten Artikel gesetzt!
|
|
24978
|
+
for (attr in variantValues) {
|
|
24979
|
+
foundItem = article.checkOptionAndOptionValue(attr, variantValues[attr]);
|
|
24980
|
+
if (foundItem.opt) {
|
|
24981
|
+
if (foundItem.opv instanceof ArticleOptionValueData) {
|
|
24982
|
+
freeText = variantValues[attr + '_val'];
|
|
24983
|
+
article.setOP(foundItem.opt.codex, foundItem.opv, freeText, true);
|
|
24984
|
+
if ((_foundItem$opt = foundItem.opt) !== null && _foundItem$opt !== void 0 && _foundItem$opt.isDefaultValueForOptions) {
|
|
24985
|
+
//falls eine Golbale Option Initialisiert wird soll hier der Default value bei dessen abhängigen Optionen gesetzt werden deshalb 2. parameter = true
|
|
24986
|
+
article.checkDefaultGlobalOpt(_defineProperty({}, foundItem.opt.codex, foundItem.opv.codex), true);
|
|
24987
|
+
}
|
|
24976
24988
|
}
|
|
24977
24989
|
}
|
|
24978
24990
|
}
|
|
24979
24991
|
}
|
|
24980
|
-
}
|
|
24981
24992
|
|
|
24982
|
-
|
|
24983
|
-
|
|
24984
|
-
|
|
24985
|
-
|
|
24986
|
-
|
|
24987
|
-
|
|
24988
|
-
|
|
24989
|
-
|
|
24990
|
-
|
|
24991
|
-
|
|
24992
|
-
|
|
24993
|
-
|
|
24994
|
-
|
|
24995
|
-
|
|
24996
|
-
|
|
24997
|
-
|
|
24998
|
-
|
|
24999
|
-
|
|
25000
|
-
|
|
25001
|
-
|
|
25002
|
-
|
|
25003
|
-
|
|
25004
|
-
|
|
25005
|
-
|
|
25006
|
-
|
|
25007
|
-
|
|
25008
|
-
|
|
25009
|
-
|
|
25010
|
-
|
|
25011
|
-
|
|
25012
|
-
|
|
25013
|
-
|
|
25014
|
-
for (j = 0; j < possibleValues.length && value == undefined; j++) {
|
|
25015
|
-
possibleValue = possibleValues[j].replace(' cm', '').replace(' mm', '').replace(' m', '').replace('cm', '').replace('mm', '').replace('m', '');
|
|
25016
|
-
if (!isNaN(Number(possibleValue))) {
|
|
25017
|
-
value = possibleValue;
|
|
24993
|
+
//defaultValues for FreeText
|
|
24994
|
+
if (article.articleOptionStates) {
|
|
24995
|
+
for (_key in article.articleOptionStates) {
|
|
24996
|
+
myArtOPS = article.articleOptionStates[_key];
|
|
24997
|
+
value = undefined;
|
|
24998
|
+
optionValueCodex = Object.keys(myArtOPS.option.articleOptionValues)[0];
|
|
24999
|
+
if (variantItems && myArtOPS.isFreeText && myArtOPS.measureUnit) {
|
|
25000
|
+
for (i = 0; i < variantItems.length && value == undefined; i++) {
|
|
25001
|
+
variantItem = variantItems[i];
|
|
25002
|
+
if ('OPT' + variantItem.OPT == myArtOPS.optionCodex && variantItem.OPVName) {
|
|
25003
|
+
if (variantItem.MeasureValue) {
|
|
25004
|
+
//measureValue from new Bakset
|
|
25005
|
+
value = variantItem.MeasureValue;
|
|
25006
|
+
optionValueCodex = 'OPV' + variantItem.OPV;
|
|
25007
|
+
} else {
|
|
25008
|
+
//measureValue from old Bakset. we have to find out the value in the opvName // WCTODEL this code can be deleted after 1 year
|
|
25009
|
+
possibleValues = variantItem.OPVName.split(': ');
|
|
25010
|
+
for (j = 0; j < possibleValues.length && value == undefined; j++) {
|
|
25011
|
+
possibleValue = possibleValues[j].replace(' cm', '').replace(' mm', '').replace(' m', '').replace('cm', '').replace('mm', '').replace('m', '');
|
|
25012
|
+
if (!isNaN(Number(possibleValue))) {
|
|
25013
|
+
value = possibleValue;
|
|
25014
|
+
}
|
|
25015
|
+
}
|
|
25016
|
+
}
|
|
25017
|
+
}
|
|
25018
|
+
}
|
|
25019
|
+
} else if (variantItems && myArtOPS.isFreeText) {
|
|
25020
|
+
for (_i2 = 0; _i2 < variantItems.length && value == undefined; _i2++) {
|
|
25021
|
+
_variantItem = variantItems[_i2];
|
|
25022
|
+
if (_variantItem.isFreeText && _variantItem.FreeText && 'OPT' + _variantItem.OPT == myArtOPS.optionCodex) {
|
|
25023
|
+
value = _variantItem.FreeText;
|
|
25024
|
+
optionValueCodex = 'OPV' + _variantItem.OPV;
|
|
25018
25025
|
}
|
|
25019
25026
|
}
|
|
25020
25027
|
}
|
|
25021
|
-
|
|
25022
|
-
|
|
25023
|
-
|
|
25024
|
-
|
|
25025
|
-
|
|
25026
|
-
|
|
25027
|
-
|
|
25028
|
-
|
|
25028
|
+
if (value == undefined) {
|
|
25029
|
+
val = myArtOPS.option.freetextDefaultValue;
|
|
25030
|
+
if (val) {
|
|
25031
|
+
value = val;
|
|
25032
|
+
myArtOPS.freeText = val;
|
|
25033
|
+
}
|
|
25034
|
+
}
|
|
25035
|
+
if (value != undefined) article.setOP(myArtOPS.option.codex, myArtOPS.option.articleOptionValues[optionValueCodex], value, true);
|
|
25029
25036
|
}
|
|
25030
25037
|
}
|
|
25031
25038
|
}
|
|
25032
|
-
|
|
25033
|
-
val = myArtOPS.option.freetextDefaultValue;
|
|
25034
|
-
if (val) {
|
|
25035
|
-
value = val;
|
|
25036
|
-
myArtOPS.freeText = val;
|
|
25037
|
-
}
|
|
25038
|
-
}
|
|
25039
|
-
if (value != undefined) article.setOP(myArtOPS.option.codex, myArtOPS.option.articleOptionValues[optionValueCodex], value, true);
|
|
25040
|
-
_context8.next = 7;
|
|
25041
|
-
break;
|
|
25042
|
-
case 19:
|
|
25039
|
+
case 4:
|
|
25043
25040
|
case "end":
|
|
25044
25041
|
return _context8.stop();
|
|
25045
25042
|
}
|
|
@@ -28063,7 +28060,7 @@ var DivaSet = /*#__PURE__*/function () {
|
|
|
28063
28060
|
break;
|
|
28064
28061
|
}
|
|
28065
28062
|
_context4.next = 3;
|
|
28066
|
-
return import('./DoorPlanner-
|
|
28063
|
+
return import('./DoorPlanner-d1ab5366.js');
|
|
28067
28064
|
case 3:
|
|
28068
28065
|
_yield$import = _context4.sent;
|
|
28069
28066
|
DoorPlanner = _yield$import["default"];
|
|
@@ -33084,33 +33081,37 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33084
33081
|
key: "variantsEvaluator",
|
|
33085
33082
|
value: (function () {
|
|
33086
33083
|
var _variantsEvaluator = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee23(set, configItems, configStepKey, paletteType) {
|
|
33087
|
-
var _set$WebConfig, _set$
|
|
33088
|
-
var
|
|
33084
|
+
var _set$WebConfig, _set$ViewConfig, _configItems$;
|
|
33085
|
+
var opt, checkForProductsInStock, calcVariantsForPricePreview, previewType, _set$CatalogData$show, targetArticles, startTime, variants, endTime;
|
|
33089
33086
|
return _regeneratorRuntime.wrap(function _callee23$(_context25) {
|
|
33090
33087
|
while (1) switch (_context25.prev = _context25.next) {
|
|
33091
33088
|
case 0:
|
|
33089
|
+
opt = set.CatalogData.getOption(configItems[0].op);
|
|
33090
|
+
if (opt) {
|
|
33091
|
+
_context25.next = 3;
|
|
33092
|
+
break;
|
|
33093
|
+
}
|
|
33094
|
+
return _context25.abrupt("return", configItems);
|
|
33095
|
+
case 3:
|
|
33096
|
+
checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !(opt !== null && opt !== void 0 && opt.isDescribingState);
|
|
33092
33097
|
calcVariantsForPricePreview = false;
|
|
33093
|
-
checkForProductsInStock = ((_set$WebConfig = set.WebConfig) === null || _set$WebConfig === void 0 ? void 0 : _set$WebConfig.checkForProductsInStock) && !((_set$CatalogData$getO = set.CatalogData.getOption(configItems[0].op)) !== null && _set$CatalogData$getO !== void 0 && _set$CatalogData$getO.isDescribingState);
|
|
33094
33098
|
previewType = (_set$ViewConfig = set.ViewConfig) === null || _set$ViewConfig === void 0 ? void 0 : _set$ViewConfig.pricePreview;
|
|
33095
33099
|
if (previewType) {
|
|
33096
|
-
calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues;
|
|
33097
|
-
if (calcVariantsForPricePreview && (_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) {
|
|
33098
|
-
calcVariantsForPricePreview = !!configItems[0] && set.CatalogData.showPricePreviewOnlyOnOptions.includes(configItems[0].op);
|
|
33099
|
-
}
|
|
33100
|
+
calcVariantsForPricePreview = !set.dontCalcPricePreviewDueToPerformanceIssues && !opt.showOnSeparatTabgroup && (!((_set$CatalogData$show = set.CatalogData.showPricePreviewOnlyOnOptions) !== null && _set$CatalogData$show !== void 0 && _set$CatalogData$show.length) || set.CatalogData.showPricePreviewOnlyOnOptions.includes(opt.codex));
|
|
33100
33101
|
}
|
|
33101
33102
|
if (set.PlannerMode === 'BoxPlanner') calcVariantsForPricePreview = false;
|
|
33102
33103
|
if (paletteType == 'GAL' && ((_configItems$ = configItems[0]) === null || _configItems$ === void 0 ? void 0 : _configItems$.groupName) === undefined || paletteType == 'TEXTBOX' || paletteType == 'NUMBERBOX' || paletteType == 'RANGE') {
|
|
33103
33104
|
calcVariantsForPricePreview = false;
|
|
33104
33105
|
}
|
|
33105
33106
|
if (!(checkForProductsInStock || calcVariantsForPricePreview)) {
|
|
33106
|
-
_context25.next =
|
|
33107
|
+
_context25.next = 19;
|
|
33107
33108
|
break;
|
|
33108
33109
|
}
|
|
33109
33110
|
targetArticles = set.configTree.getTargetArticles(configStepKey);
|
|
33110
33111
|
startTime = new Date();
|
|
33111
|
-
_context25.next =
|
|
33112
|
+
_context25.next = 14;
|
|
33112
33113
|
return this.calcVariants(set, configItems, targetArticles);
|
|
33113
|
-
case
|
|
33114
|
+
case 14:
|
|
33114
33115
|
variants = _context25.sent;
|
|
33115
33116
|
endTime = new Date();
|
|
33116
33117
|
if (endTime.getTime() - startTime.getTime() > 1000) set.dontCalcPricePreviewDueToPerformanceIssues = true;
|
|
@@ -33120,9 +33121,9 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33120
33121
|
if (checkForProductsInStock) {
|
|
33121
33122
|
configItems = productHandlerInstance.checkProductInStock(configItems, variants, set.getDivaArticles(), targetArticles);
|
|
33122
33123
|
}
|
|
33123
|
-
case
|
|
33124
|
+
case 19:
|
|
33124
33125
|
return _context25.abrupt("return", configItems);
|
|
33125
|
-
case
|
|
33126
|
+
case 20:
|
|
33126
33127
|
case "end":
|
|
33127
33128
|
return _context25.stop();
|
|
33128
33129
|
}
|
|
@@ -33390,6 +33391,7 @@ var DivaSetHandler = /*#__PURE__*/function () {
|
|
|
33390
33391
|
value: function checkNotificationRules(set, targetArticles, visitedOptions, event) {
|
|
33391
33392
|
var _set$CatalogData$noti;
|
|
33392
33393
|
if (!((_set$CatalogData$noti = set.CatalogData.notificationsRules) !== null && _set$CatalogData$noti !== void 0 && _set$CatalogData$noti.length)) return;
|
|
33394
|
+
console.log('checking');
|
|
33393
33395
|
var allArticles = set.getDivaArticles(true);
|
|
33394
33396
|
var articles = {};
|
|
33395
33397
|
for (var i = 0; i < targetArticles.length; i++) {
|
|
@@ -35279,7 +35281,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35279
35281
|
break;
|
|
35280
35282
|
case 3:
|
|
35281
35283
|
_context13.next = 5;
|
|
35282
|
-
return import('./PfisterWWSHandler-
|
|
35284
|
+
return import('./PfisterWWSHandler-8ca6de55.js');
|
|
35283
35285
|
case 5:
|
|
35284
35286
|
_yield$import = _context13.sent;
|
|
35285
35287
|
PfisterWWSHandler = _yield$import["default"];
|
|
@@ -35287,7 +35289,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35287
35289
|
return _context13.abrupt("break", 33);
|
|
35288
35290
|
case 9:
|
|
35289
35291
|
_context13.next = 11;
|
|
35290
|
-
return import('./LiviqueWWSHandler-
|
|
35292
|
+
return import('./LiviqueWWSHandler-89e77291.js');
|
|
35291
35293
|
case 11:
|
|
35292
35294
|
_yield$import2 = _context13.sent;
|
|
35293
35295
|
LiviqueWWSHandler = _yield$import2["default"];
|
|
@@ -35295,7 +35297,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35295
35297
|
return _context13.abrupt("break", 33);
|
|
35296
35298
|
case 15:
|
|
35297
35299
|
_context13.next = 17;
|
|
35298
|
-
return import('./SeriousBasketHandler-
|
|
35300
|
+
return import('./SeriousBasketHandler-3edc7e16.js');
|
|
35299
35301
|
case 17:
|
|
35300
35302
|
_yield$import3 = _context13.sent;
|
|
35301
35303
|
SeriousWWSHandler = _yield$import3["default"];
|
|
@@ -35303,7 +35305,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35303
35305
|
return _context13.abrupt("break", 33);
|
|
35304
35306
|
case 21:
|
|
35305
35307
|
_context13.next = 23;
|
|
35306
|
-
return import('./ProductBasketHandler-
|
|
35308
|
+
return import('./ProductBasketHandler-68a38a6d.js');
|
|
35307
35309
|
case 23:
|
|
35308
35310
|
_yield$import4 = _context13.sent;
|
|
35309
35311
|
ProductWWSHandler = _yield$import4["default"];
|
|
@@ -35311,7 +35313,7 @@ var DivaBasketHandler = /*#__PURE__*/function () {
|
|
|
35311
35313
|
return _context13.abrupt("break", 33);
|
|
35312
35314
|
case 27:
|
|
35313
35315
|
_context13.next = 29;
|
|
35314
|
-
return import('./StandardWWSHandler-
|
|
35316
|
+
return import('./StandardWWSHandler-b84368c1.js');
|
|
35315
35317
|
case 29:
|
|
35316
35318
|
_yield$import5 = _context13.sent;
|
|
35317
35319
|
StandardWWSHandler = _yield$import5["default"];
|
|
@@ -36696,7 +36698,7 @@ var PlannerHandler3D = /*#__PURE__*/function () {
|
|
|
36696
36698
|
while (1) switch (_context3.prev = _context3.next) {
|
|
36697
36699
|
case 0:
|
|
36698
36700
|
_context3.next = 2;
|
|
36699
|
-
return import('./Host3DSignalR-
|
|
36701
|
+
return import('./Host3DSignalR-0538553d.js');
|
|
36700
36702
|
case 2:
|
|
36701
36703
|
_yield$import = _context3.sent;
|
|
36702
36704
|
Host3DSignalR = _yield$import["default"];
|
|
@@ -38245,7 +38247,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38245
38247
|
break;
|
|
38246
38248
|
case 8:
|
|
38247
38249
|
_context4.next = 10;
|
|
38248
|
-
return import('./DivaStandardPlanner-
|
|
38250
|
+
return import('./DivaStandardPlanner-2154eb2b.js');
|
|
38249
38251
|
case 10:
|
|
38250
38252
|
_yield$import = _context4.sent;
|
|
38251
38253
|
DivaStandardPlanner = _yield$import["default"];
|
|
@@ -38256,7 +38258,7 @@ var DivaPlannerHandler = /*#__PURE__*/function () {
|
|
|
38256
38258
|
return _context4.abrupt("break", 21);
|
|
38257
38259
|
case 15:
|
|
38258
38260
|
_context4.next = 17;
|
|
38259
|
-
return import('./DivaBoxPlanner-
|
|
38261
|
+
return import('./DivaBoxPlanner-de566659.js');
|
|
38260
38262
|
case 17:
|
|
38261
38263
|
_yield$import2 = _context4.sent;
|
|
38262
38264
|
DivaBoxPlanner = _yield$import2["default"];
|
package/build/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { h as CatalogPlannerArticleData, C as Cell, e as DivaArticle, g as DivaBasketHandler, f as DivaCatalogData, D as DockingPoint, G as Grid, O as OptionCatalogData, P as Product, R as Rendering, c as Vector2, V as Vector3, i as Vector4, j as creatRenderOrders, d as default, k as getOrigProductId, l as loadAndRepairBasket } from './index-
|
|
1
|
+
export { h as CatalogPlannerArticleData, C as Cell, e as DivaArticle, g as DivaBasketHandler, f as DivaCatalogData, D as DockingPoint, G as Grid, O as OptionCatalogData, P as Product, R as Rendering, c as Vector2, V as Vector3, i as Vector4, j as creatRenderOrders, d as default, k as getOrigProductId, l as loadAndRepairBasket } from './index-2bc7b211.js';
|
|
2
2
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
3
3
|
import '@babel/runtime/helpers/classCallCheck';
|
|
4
4
|
import '@babel/runtime/helpers/createClass';
|
|
@@ -342,7 +342,7 @@ export default class DivaArticle {
|
|
|
342
342
|
private getOptionTreeItem;
|
|
343
343
|
updateShelfPlannerState(): Promise<void>;
|
|
344
344
|
calcConfigPrice(maxPriceOfGroupCodex: string[], digits: number): void;
|
|
345
|
-
private
|
|
345
|
+
private getCalcPerUnit;
|
|
346
346
|
private getOptionPrice;
|
|
347
347
|
private getPriceRefs;
|
|
348
348
|
getValidValues(myValues: {
|