@crystaldesign/web-planner-logic 26.12.0-beta.5 → 26.12.0-beta.7
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-2c699ee3.js → DivaBoxPlanner-143d6027.js} +12 -9
- package/build/cjs/{DivaStandardPlanner-3d6a05bc.js → DivaStandardPlanner-85b2b3ec.js} +2 -2
- package/build/cjs/{DoorPlanner-adda9c0d.js → DoorPlanner-2350aacc.js} +1 -1
- package/build/cjs/{Host3DSignalR-6914541f.js → Host3DSignalR-dad3c3fd.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-635cffae.js → LiviqueWWSHandler-1efa9da7.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-d95419db.js → PfisterWWSHandler-be3ebeaa.js} +1 -1
- package/build/cjs/{PlannerHandler2D-b76ba907.js → PlannerHandler2D-1b4b06b0.js} +1 -1
- package/build/cjs/{SeriousBasketHandler-777904e8.js → SeriousBasketHandler-6d4d921a.js} +157 -77
- package/build/cjs/{ShelfPlanner-5ffd15a2.js → ShelfPlanner-8fa17486.js} +7 -7
- package/build/cjs/{StandardWWSHandler-e92acae6.js → StandardWWSHandler-c84a70a7.js} +1 -1
- package/build/cjs/{index-d516d2b2.js → index-9358200e.js} +2238 -758
- package/build/cjs/index.js +9 -1
- package/build/esm/{DivaBoxPlanner-6f0727a3.js → DivaBoxPlanner-8c20358a.js} +12 -9
- package/build/esm/{DivaStandardPlanner-7188da61.js → DivaStandardPlanner-75808b6c.js} +2 -2
- package/build/esm/{DoorPlanner-74bcd21d.js → DoorPlanner-b74f2c6a.js} +1 -1
- package/build/esm/{Host3DSignalR-bb6db8e6.js → Host3DSignalR-5af3fdc7.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-c4ba143d.js → LiviqueWWSHandler-12e6cecf.js} +1 -1
- package/build/esm/{PfisterWWSHandler-41b7b1b7.js → PfisterWWSHandler-670a6f34.js} +1 -1
- package/build/esm/{PlannerHandler2D-829ffceb.js → PlannerHandler2D-24994f37.js} +1 -1
- package/build/esm/{SeriousBasketHandler-0bb8ee55.js → SeriousBasketHandler-dbf84292.js} +157 -77
- package/build/esm/{ShelfPlanner-1406888d.js → ShelfPlanner-c3b5b34f.js} +7 -7
- package/build/esm/{StandardWWSHandler-a8045129.js → StandardWWSHandler-2193dbc6.js} +1 -1
- package/build/esm/{index-16a1a540.js → index-a2f44a31.js} +2231 -759
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +10 -0
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Articles/ArticleDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts +3 -0
- package/build/types/web-planner-logic/src/interface/Articles/PartListArticleToLoadType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts +2 -1
- package/build/types/web-planner-logic/src/interface/IDM/ArticleApi.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +5 -0
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +40 -0
- 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 +4 -0
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/ArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts +17 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts +20 -1
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Basket/SeriousBasketHandler.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.d.ts +8 -0
- package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/Basket/seriousSetName.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts +10 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts +31 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts +2 -2
- package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/ConfigTree/SummaryHandler.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +7 -0
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts +2 -0
- package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +22 -6
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts +9 -2
- package/build/types/web-planner-logic/src/model/Articles/Article/IDMCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts +1 -0
- package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts +31 -0
- package/build/types/web-planner-logic/src/model/Properties/propertySchemaRegistry.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts +34 -0
- package/build/types/web-planner-logic/src/model/Properties/propertyValueCodec.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/cloneArticle.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/cloneArticle.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/configTreeStepArticle.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/configTreeStepArticle.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/eanFormula.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/eanFormula.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/fallbackRowWarning.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/fallbackRowWarning.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/idmOpgParentNames.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmOpgParentNames.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/idmSerieStaleId.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/idmSerieStaleId.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/mergeOptionGroupConnectedSteps.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/mergeOptionGroupConnectedSteps.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/partlistChildInit.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/partlistChildInit.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/propertyEncodingsKnowhow.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/propertyEncodingsKnowhow.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/propertyValueCodec.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/propertyValueCodec.test.d.ts.map +1 -0
- package/build/types/web-planner-logic/src/test/staticVisibleOptionValues.test.d.ts +2 -0
- package/build/types/web-planner-logic/src/test/staticVisibleOptionValues.test.d.ts.map +1 -0
- package/package.json +3 -3
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-9358200e.js');
|
|
6
6
|
var planner2dCore = require('@crystaldesign/planner-2d-core');
|
|
7
7
|
require('@babel/runtime/helpers/slicedToArray');
|
|
8
8
|
require('@babel/runtime/helpers/asyncToGenerator');
|
|
@@ -37,6 +37,7 @@ exports.DivaSetHandler = index.setHandlerInstance;
|
|
|
37
37
|
exports.Grid = index.Grid;
|
|
38
38
|
exports.JsonDataCache = index.JsonDataCache;
|
|
39
39
|
exports.OptionCatalogData = index.OptionCatalogData;
|
|
40
|
+
exports.PROPERTY_SCHEMAS = index.PROPERTY_SCHEMAS;
|
|
40
41
|
exports.PlannerElementData = index.PlannerElementData;
|
|
41
42
|
exports.Rendering = index.Rendering;
|
|
42
43
|
exports.Vector2 = index.Vector2;
|
|
@@ -49,10 +50,17 @@ exports.bootNow = index.bootNow;
|
|
|
49
50
|
exports.bootRequestName = index.bootRequestName;
|
|
50
51
|
exports.collectStructureStepKeys = index.collectStructureStepKeys;
|
|
51
52
|
exports.creatRenderOrders = index.creatRenderOrders;
|
|
53
|
+
exports.decodePropertyValue = index.decodePropertyValue;
|
|
52
54
|
exports["default"] = index.DivaWebPlanner;
|
|
55
|
+
exports.editorKindOf = index.editorKindOf;
|
|
56
|
+
exports.encodePropertyValue = index.encodePropertyValue;
|
|
53
57
|
exports.getOrigProductId = index.getOrigProductId;
|
|
58
|
+
exports.getSeriousSetNamePlaceholder = index.getSeriousSetNamePlaceholder;
|
|
54
59
|
exports.headlessSession = index.headlessSession;
|
|
55
60
|
exports.loadAndRepairBasket = index.loadAndRepairBasket;
|
|
61
|
+
exports.propertyEncodingOf = index.propertyEncodingOf;
|
|
62
|
+
exports.propertyValueProblem = index.propertyValueProblem;
|
|
63
|
+
exports.rawStringOf = index.rawStringOf;
|
|
56
64
|
exports.runHeadlessArtifactPass = index.runHeadlessArtifactPass;
|
|
57
65
|
exports.runHeadlessArtifactPassBatch = index.runHeadlessArtifactPassBatch;
|
|
58
66
|
Object.defineProperty(exports, 'DockingPoint', {
|
|
@@ -3,11 +3,11 @@ 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 { c as Vector2, V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-
|
|
6
|
+
import { c as Vector2, V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-a2f44a31.js';
|
|
7
7
|
import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
|
|
8
8
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
9
9
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
10
|
-
import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-
|
|
10
|
+
import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-24994f37.js';
|
|
11
11
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
12
12
|
import 'axios';
|
|
13
13
|
import '@crystaldesign/basket-model';
|
|
@@ -1965,25 +1965,28 @@ var ConstructionRulesHandler = /*#__PURE__*/function () {
|
|
|
1965
1965
|
if (!optionHandler.has(elementId)) optionHandler.set(elementId, new Map());
|
|
1966
1966
|
(_optionHandler$get2 = optionHandler.get(elementId)) === null || _optionHandler$get2 === void 0 || _optionHandler$get2.set(option, curOptVisibilityInfo.doShow);
|
|
1967
1967
|
}
|
|
1968
|
-
this.constructionDebugStack.push({
|
|
1969
|
-
phase: this.debugPhase,
|
|
1970
|
-
elementId: elementId,
|
|
1971
|
-
action: 'show',
|
|
1972
|
-
option: option,
|
|
1973
|
-
value: curOptVisibilityInfo.doShow
|
|
1974
|
-
});
|
|
1975
1968
|
//initCfgValues mit allen gesammelten Optionen pro Element aufrufen
|
|
1976
1969
|
//Hier setze ich den Optionswert. Er darf nicht mehr geändert werden von Außen. Hier müsste in der Palette der auch gesetzt werden.
|
|
1977
1970
|
//Es kann sein, dass es im Konfigurationsbaum eine andere Option gibt (Glasdecke), die abhängig ist von einer Option, die nur beim Kopieren eines Elementes gesetzt wird (OPTOBEN).
|
|
1978
1971
|
//Wenn ich den Konfigurationsbaum NICHT update, dann kommt die Option Glasdecke als Konfiguratorschritt heraus.
|
|
1979
1972
|
//Wir brauchen eine Funktion,die NUR die verplanten artikel mit den Optionswerten auswerted.
|
|
1973
|
+
var unhidden = false;
|
|
1980
1974
|
if (this.hideOptionsForConstruction.has(elementId)) {
|
|
1981
1975
|
var index = this.hideOptionsForConstruction.get(elementId).indexOf(option); //Lösche diese Option aus dem hideForConstruction Array, da sie ja wieder angezeigt wird
|
|
1982
1976
|
if (index >= 0) {
|
|
1983
1977
|
var _this$hideOptionsForC;
|
|
1984
1978
|
(_this$hideOptionsForC = this.hideOptionsForConstruction.get(elementId)) === null || _this$hideOptionsForC === void 0 || _this$hideOptionsForC.splice(index, 1);
|
|
1979
|
+
unhidden = true;
|
|
1985
1980
|
}
|
|
1986
1981
|
}
|
|
1982
|
+
// A rule without a doShow value on an already-visible option changes nothing — no trail entry may claim it did.
|
|
1983
|
+
if (curOptVisibilityInfo.doShow != undefined || unhidden) this.constructionDebugStack.push({
|
|
1984
|
+
phase: this.debugPhase,
|
|
1985
|
+
elementId: elementId,
|
|
1986
|
+
action: 'show',
|
|
1987
|
+
option: option,
|
|
1988
|
+
value: curOptVisibilityInfo.doShow
|
|
1989
|
+
});
|
|
1987
1990
|
}
|
|
1988
1991
|
/**
|
|
1989
1992
|
* This function sets a specific Option to be hidden.
|
|
@@ -4,10 +4,10 @@ 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 { V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-
|
|
7
|
+
import { V as Vector3, P as PlannerElementData, B as BoundingBox } from './index-a2f44a31.js';
|
|
8
8
|
import DivaUtils, { DivaError, md5 } from '@crystaldesign/diva-utils';
|
|
9
9
|
import { computeDockedTransform } from '@crystaldesign/planner-2d-core';
|
|
10
|
-
import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-
|
|
10
|
+
import { d as dockingPointHandlerInst, h as handler2D } from './PlannerHandler2D-24994f37.js';
|
|
11
11
|
import '@babel/runtime/helpers/slicedToArray';
|
|
12
12
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
13
13
|
import 'axios';
|
|
@@ -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-a2f44a31.js';
|
|
5
5
|
import DivaUtils from '@crystaldesign/diva-utils';
|
|
6
6
|
import '@babel/runtime/helpers/slicedToArray';
|
|
7
7
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
@@ -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 { d as bootMark, R as Rendering, H as HQRenderScript } from './index-
|
|
6
|
+
import { d as bootMark, R as Rendering, H as HQRenderScript } from './index-a2f44a31.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';
|
|
@@ -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-a2f44a31.js';
|
|
4
4
|
import '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
6
6
|
import '@babel/runtime/helpers/defineProperty';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
2
2
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
3
|
-
import { a as articleHandlerInstance } from './index-
|
|
3
|
+
import { a as articleHandlerInstance } from './index-a2f44a31.js';
|
|
4
4
|
import { SAPOrderLineData } from '@crystaldesign/basket-model';
|
|
5
5
|
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
6
6
|
import '@babel/runtime/helpers/slicedToArray';
|
|
@@ -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 { c as Vector2 } from './index-
|
|
6
|
+
import { c as Vector2 } from './index-a2f44a31.js';
|
|
7
7
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
8
8
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
9
9
|
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
@@ -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-a2f44a31.js';
|
|
5
5
|
import DivaUtils from '@crystaldesign/diva-utils';
|
|
6
6
|
import '@babel/runtime/helpers/slicedToArray';
|
|
7
7
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
@@ -20,23 +20,36 @@ import '@crystaldesign/basket-handler';
|
|
|
20
20
|
import 'socket.io-client';
|
|
21
21
|
import '@crystaldesign/planner-2d-core';
|
|
22
22
|
|
|
23
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
24
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
25
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
26
|
+
|
|
27
|
+
/** An emitted formatted option that may become the main color: flagged with IS_MAIN_COLOR (explicit) or the API2 OPTBE_BOX fallback */
|
|
28
|
+
|
|
23
29
|
//Der in einem Set gemergte Optionsbaum
|
|
24
|
-
|
|
30
|
+
// API2 fallback for the main color used in the PDF; catalogs mark it explicitly with the option property IS_MAIN_COLOR
|
|
31
|
+
var MAIN_COLOR_OPTIONCODEX = 'OPTBE_BOX';
|
|
25
32
|
var StandardWWSHandler = /*#__PURE__*/function () {
|
|
26
33
|
function StandardWWSHandler() {
|
|
27
34
|
_classCallCheck(this, StandardWWSHandler);
|
|
28
|
-
_defineProperty(this, "
|
|
35
|
+
_defineProperty(this, "mainColorCandidates", []);
|
|
29
36
|
}
|
|
30
37
|
return _createClass(StandardWWSHandler, [{
|
|
31
38
|
key: "repairWWSFlags",
|
|
32
39
|
value: function repairWWSFlags(articles, orderLines) {
|
|
33
40
|
return orderLines;
|
|
34
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Builds the part list for the Serious PDF. Components are collected at any partlist depth: intermediate articles that
|
|
44
|
+
* only bundle further components without a price of their own (IDM "Hülsen") are not listed themselves, a priced parent
|
|
45
|
+
* (e.g. an IDM Vorzugskombi header) is listed with its own price next to its components, and the options of a component
|
|
46
|
+
* are looked up on its direct parent, which is the set article itself for flat (API2) partlists.
|
|
47
|
+
*/
|
|
35
48
|
}, {
|
|
36
49
|
key: "getWWSData",
|
|
37
50
|
value: function getWWSData(basket, set, orderSet, orderlines) {
|
|
38
51
|
var _this = this;
|
|
39
|
-
this.
|
|
52
|
+
this.mainColorCandidates = [];
|
|
40
53
|
var pos = set.CatalogData.summaryTabGroupPosition;
|
|
41
54
|
var isIDM = set.CatalogData.isIDMFormat;
|
|
42
55
|
var partListOrderLines = [];
|
|
@@ -52,10 +65,12 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
52
65
|
var articles = set.getDivaArticles();
|
|
53
66
|
var groupedPartlistArticles = [];
|
|
54
67
|
var usedOptionCodexes = [];
|
|
68
|
+
// set articles plus the parents of nested components, so catalog tab group codices resolve for both
|
|
69
|
+
var tabGroupLookupArticles = Object.values(articles);
|
|
55
70
|
var posNr = 1;
|
|
56
71
|
for (var iKey in articles) {
|
|
57
72
|
var article = articles[iKey];
|
|
58
|
-
var partlistArticles =
|
|
73
|
+
var partlistArticles = this.getPartlistComponents(article);
|
|
59
74
|
var partlistArticlesWithTabGroup = [];
|
|
60
75
|
groupedPartlistArticles.push({
|
|
61
76
|
article: article,
|
|
@@ -63,52 +78,65 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
63
78
|
partlistArticles: [],
|
|
64
79
|
letOthesMatch: true
|
|
65
80
|
});
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
var _iterator = _createForOfIteratorHelper(partlistArticles),
|
|
82
|
+
_step;
|
|
83
|
+
try {
|
|
84
|
+
var _loop = function _loop() {
|
|
85
|
+
var _partlistArticle$part, _partlistArticle$cata, _optionArticle$getArt, _optionArticle$getArt2;
|
|
86
|
+
var partlistArticle = _step.value;
|
|
87
|
+
var optionArticle = (_partlistArticle$part = partlistArticle.partListParentArticle) !== null && _partlistArticle$part !== void 0 ? _partlistArticle$part : article;
|
|
88
|
+
if (!tabGroupLookupArticles.includes(optionArticle)) tabGroupLookupArticles.push(optionArticle);
|
|
89
|
+
var preDefinedPosNr = (_partlistArticle$cata = partlistArticle.catalogArticle.orderPosNr) !== null && _partlistArticle$cata !== void 0 ? _partlistArticle$cata : null;
|
|
90
|
+
var tabGroup = (_optionArticle$getArt = (_optionArticle$getArt2 = optionArticle.getArticleOptionState((!isIDM ? 'OPT' : '') + partlistArticle.tabGroup)) === null || _optionArticle$getArt2 === void 0 ? void 0 : _optionArticle$getArt2.optionTabGroup) !== null && _optionArticle$getArt !== void 0 ? _optionArticle$getArt : partlistArticle.tabGroup;
|
|
91
|
+
if (preDefinedPosNr !== null) {
|
|
92
|
+
var existingentry = !preDefinedPosNr.endsWith(';') && groupedPartlistArticles.find(function (group) {
|
|
93
|
+
return (group.posNr == Number(preDefinedPosNr) || group.groupKey == preDefinedPosNr) && group.letOthesMatch;
|
|
79
94
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
var newPosNr = Number(preDefinedPosNr);
|
|
83
|
-
if (isNaN(newPosNr)) {
|
|
84
|
-
newPosNr = posNr;
|
|
85
|
-
letOthesMatch = false;
|
|
86
|
-
do {
|
|
87
|
-
newPosNr++;
|
|
88
|
-
} while (groupedPartlistArticles.find(function (group) {
|
|
89
|
-
return group.posNr == newPosNr;
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
groupedPartlistArticles.push({
|
|
93
|
-
article: article,
|
|
94
|
-
posNr: newPosNr,
|
|
95
|
-
letOthesMatch: letOthesMatch,
|
|
96
|
-
partlistArticles: [{
|
|
95
|
+
if (existingentry) {
|
|
96
|
+
existingentry.partlistArticles.push({
|
|
97
97
|
article: partlistArticle,
|
|
98
|
-
tabGroup: tabGroup
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
tabGroup: tabGroup,
|
|
99
|
+
optionArticle: optionArticle
|
|
100
|
+
});
|
|
101
|
+
} else {
|
|
102
|
+
var letOthesMatch = true;
|
|
103
|
+
var newPosNr = Number(preDefinedPosNr);
|
|
104
|
+
if (isNaN(newPosNr)) {
|
|
105
|
+
newPosNr = posNr;
|
|
106
|
+
letOthesMatch = false;
|
|
107
|
+
do {
|
|
108
|
+
newPosNr++;
|
|
109
|
+
} while (groupedPartlistArticles.find(function (group) {
|
|
110
|
+
return group.posNr == newPosNr;
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
groupedPartlistArticles.push({
|
|
114
|
+
article: article,
|
|
115
|
+
posNr: newPosNr,
|
|
116
|
+
letOthesMatch: letOthesMatch,
|
|
117
|
+
partlistArticles: [{
|
|
118
|
+
article: partlistArticle,
|
|
119
|
+
tabGroup: tabGroup,
|
|
120
|
+
optionArticle: optionArticle
|
|
121
|
+
}],
|
|
122
|
+
groupKey: preDefinedPosNr
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
partlistArticlesWithTabGroup.push({
|
|
127
|
+
article: partlistArticle,
|
|
128
|
+
tabGroup: tabGroup,
|
|
129
|
+
optionArticle: optionArticle
|
|
101
130
|
});
|
|
102
131
|
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
tabGroup: tabGroup
|
|
107
|
-
});
|
|
132
|
+
};
|
|
133
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
134
|
+
_loop();
|
|
108
135
|
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
136
|
+
} catch (err) {
|
|
137
|
+
_iterator.e(err);
|
|
138
|
+
} finally {
|
|
139
|
+
_iterator.f();
|
|
112
140
|
}
|
|
113
141
|
groupedPartlistArticles.find(function (group) {
|
|
114
142
|
return group.posNr === posNr;
|
|
@@ -120,23 +148,25 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
120
148
|
}));
|
|
121
149
|
}
|
|
122
150
|
if (pos) this.sort(pos, groupedPartlistArticles);
|
|
123
|
-
var
|
|
151
|
+
for (var _i = 0; _i < groupedPartlistArticles.length; _i++) {
|
|
124
152
|
var group = groupedPartlistArticles[_i];
|
|
125
|
-
var article = group.article;
|
|
126
153
|
var posNrCount = 1;
|
|
127
154
|
|
|
128
155
|
//get count of tabgroupOption - articles within each tabgroup
|
|
129
|
-
var
|
|
130
|
-
var
|
|
131
|
-
var
|
|
132
|
-
|
|
156
|
+
var _loop2 = function _loop2() {
|
|
157
|
+
var _optionArticle$getArt3, _optionArticle$getArt4;
|
|
158
|
+
var _group$partlistArticl = group.partlistArticles[j],
|
|
159
|
+
partListArticle = _group$partlistArticl.article,
|
|
160
|
+
optionArticle = _group$partlistArticl.optionArticle;
|
|
161
|
+
var tabGroup = (_optionArticle$getArt3 = (_optionArticle$getArt4 = optionArticle.getArticleOptionState((!isIDM ? 'OPT' : '') + partListArticle.tabGroup)) === null || _optionArticle$getArt4 === void 0 ? void 0 : _optionArticle$getArt4.optionTabGroup) !== null && _optionArticle$getArt3 !== void 0 ? _optionArticle$getArt3 : partListArticle.tabGroup;
|
|
133
162
|
var fountEntry = partListOrderLines.find(function (item) {
|
|
134
163
|
var _item$FormattedOption, _item$FormattedOption2, _this$getFormattedOpt;
|
|
135
|
-
return item.Name == partListArticle.name && item.ArticleNr == partListArticle.configArticleCodex && ((_item$FormattedOption = item.FormattedOptions) === null || _item$FormattedOption === void 0 ? void 0 : _item$FormattedOption[0]) && ((_item$FormattedOption2 = item.FormattedOptions) === null || _item$FormattedOption2 === void 0 ? void 0 : _item$FormattedOption2[0].Title) == ((_this$getFormattedOpt = _this.getFormattedOptions(partListArticle,
|
|
164
|
+
return item.Name == partListArticle.name && item.ArticleNr == partListArticle.configArticleCodex && ((_item$FormattedOption = item.FormattedOptions) === null || _item$FormattedOption === void 0 ? void 0 : _item$FormattedOption[0]) && ((_item$FormattedOption2 = item.FormattedOptions) === null || _item$FormattedOption2 === void 0 ? void 0 : _item$FormattedOption2[0].Title) == ((_this$getFormattedOpt = _this.getFormattedOptions(partListArticle, optionArticle, [], '', usedOptionCodexes)) === null || _this$getFormattedOpt === void 0 ? void 0 : _this$getFormattedOpt[0].Title);
|
|
136
165
|
});
|
|
166
|
+
var unitPrice = _this.unitPrice(partListArticle);
|
|
137
167
|
if (fountEntry) {
|
|
138
168
|
fountEntry.Quantity = fountEntry.Quantity + partListArticle.quantity;
|
|
139
|
-
fountEntry.FormattedPrice = DivaUtils.formatPrice(
|
|
169
|
+
fountEntry.FormattedPrice = DivaUtils.formatPrice(unitPrice * fountEntry.Quantity);
|
|
140
170
|
} else {
|
|
141
171
|
var colorCodices = [];
|
|
142
172
|
if (tabGroup && tabGroup !== 'Aktion' /* Aktion delete in 2024 */ && tabGroup !== 'BOX_AF_PARIS' || firstItem) {
|
|
@@ -145,14 +175,14 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
145
175
|
finalPosNr = _this$getFinalPosNr.finalPosNr,
|
|
146
176
|
newPosNrCount = _this$getFinalPosNr.newPosNrCount;
|
|
147
177
|
posNrCount = newPosNrCount;
|
|
148
|
-
var formattedOptions = _this.getFormattedOptions(partListArticle,
|
|
178
|
+
var formattedOptions = _this.getFormattedOptions(partListArticle, optionArticle, colorCodices, finalPosNr, usedOptionCodexes);
|
|
149
179
|
partListOrderLines.push({
|
|
150
180
|
ArticleNr: (_partListArticle$conf = partListArticle.configArticleCodex) !== null && _partListArticle$conf !== void 0 && _partListArticle$conf.startsWith('HIDE_CODEX') ? '' : (_partListArticle$conf2 = partListArticle.configArticleCodex) !== null && _partListArticle$conf2 !== void 0 ? _partListArticle$conf2 : partListArticle.articleCodex,
|
|
151
181
|
ColorCodices: colorCodices,
|
|
152
182
|
FormattedOptions: formattedOptions,
|
|
153
|
-
FormattedPrice: DivaUtils.formatPrice(
|
|
183
|
+
FormattedPrice: DivaUtils.formatPrice(unitPrice * partListArticle.quantity),
|
|
154
184
|
PosNr: finalPosNr,
|
|
155
|
-
Price:
|
|
185
|
+
Price: unitPrice,
|
|
156
186
|
Quantity: partListArticle.quantity,
|
|
157
187
|
TabGroup: tabGroup !== null && tabGroup !== void 0 ? tabGroup : ' ',
|
|
158
188
|
Name: partListArticle.name,
|
|
@@ -164,9 +194,9 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
164
194
|
formattedOptions: [],
|
|
165
195
|
ArticleNr: (_partListArticle$conf3 = partListArticle.configArticleCodex) !== null && _partListArticle$conf3 !== void 0 ? _partListArticle$conf3 : partListArticle.articleCodex,
|
|
166
196
|
ColorCodices: [],
|
|
167
|
-
FormattedPrice: DivaUtils.formatPrice(
|
|
197
|
+
FormattedPrice: DivaUtils.formatPrice(unitPrice * partListArticle.quantity),
|
|
168
198
|
PosNr: group.posNr + '.00',
|
|
169
|
-
Price:
|
|
199
|
+
Price: unitPrice,
|
|
170
200
|
Quantity: partListArticle.quantity,
|
|
171
201
|
TabGroup: 'SetArtikel',
|
|
172
202
|
Name: (_basket$SetName = basket.SetName) !== null && _basket$SetName !== void 0 ? _basket$SetName : partListArticle.name
|
|
@@ -175,11 +205,8 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
175
205
|
}
|
|
176
206
|
};
|
|
177
207
|
for (var j = 0; j < group.partlistArticles.length; j++) {
|
|
178
|
-
|
|
208
|
+
_loop2();
|
|
179
209
|
}
|
|
180
|
-
};
|
|
181
|
-
for (var _i = 0; _i < groupedPartlistArticles.length; _i++) {
|
|
182
|
-
_loop2();
|
|
183
210
|
}
|
|
184
211
|
for (var _i2 = 0; _i2 < partListOrderLines.length; _i2++) {
|
|
185
212
|
if (partListOrderLines[_i2].TabGroup && !partListGroups.includes(partListOrderLines[_i2].TabGroup)) {
|
|
@@ -190,7 +217,7 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
190
217
|
var partListOrderLinesSorted = [];
|
|
191
218
|
var _loop3 = function _loop3() {
|
|
192
219
|
var _DivaSummaryHandler$g;
|
|
193
|
-
var p = (_DivaSummaryHandler$g = summaryHandlerInstance.getTabgroupByOptionCodex(pos[_i3],
|
|
220
|
+
var p = (_DivaSummaryHandler$g = summaryHandlerInstance.getTabgroupByOptionCodex(pos[_i3], tabGroupLookupArticles)) !== null && _DivaSummaryHandler$g !== void 0 ? _DivaSummaryHandler$g : pos[_i3];
|
|
194
221
|
while (partListOrderLines.find(function (orderline) {
|
|
195
222
|
return orderline.TabGroup === p;
|
|
196
223
|
})) {
|
|
@@ -217,11 +244,46 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
217
244
|
return posA - posB;
|
|
218
245
|
});
|
|
219
246
|
if (firstItem) partListOrderLines.unshift(firstItem);
|
|
247
|
+
this.markMainColor();
|
|
220
248
|
return {
|
|
221
249
|
PartListOrderLines: partListOrderLines,
|
|
222
250
|
PartListGroups: partListGroups
|
|
223
251
|
};
|
|
224
252
|
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Components at any partlist depth. Articles that only bundle further components without a price of their own (IDM
|
|
256
|
+
* "Hülsen") are left out, also when the current configuration loads none of their components (e.g. no mattress chosen):
|
|
257
|
+
* an empty Hülse is not a part. A partlist parent with a price of its own stays a part, so its price is not lost.
|
|
258
|
+
*/
|
|
259
|
+
}, {
|
|
260
|
+
key: "getPartlistComponents",
|
|
261
|
+
value: function getPartlistComponents(article) {
|
|
262
|
+
return Object.values(article.getRecursivePartlistArticles()).filter(function (partlistArticle) {
|
|
263
|
+
return !partlistArticle.hasPartlistArticle || partlistArticle.mainPrice > 0;
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/** Unit price of a part: a partlist parent contributes only its own price, its components are listed themselves. */
|
|
268
|
+
}, {
|
|
269
|
+
key: "unitPrice",
|
|
270
|
+
value: function unitPrice(partListArticle) {
|
|
271
|
+
return partListArticle.hasPartlistArticle ? partListArticle.mainPrice : partListArticle.price;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* The first emitted option flagged with IS_MAIN_COLOR is the main color of the part list; without one, the first emitted
|
|
276
|
+
* OPTBE_BOX option (API2 fallback) is. Decided after all lines exist, so only options that really appear can be chosen.
|
|
277
|
+
*/
|
|
278
|
+
}, {
|
|
279
|
+
key: "markMainColor",
|
|
280
|
+
value: function markMainColor() {
|
|
281
|
+
var _this$mainColorCandid;
|
|
282
|
+
var mainColor = (_this$mainColorCandid = this.mainColorCandidates.find(function (candidate) {
|
|
283
|
+
return candidate.explicit;
|
|
284
|
+
})) !== null && _this$mainColorCandid !== void 0 ? _this$mainColorCandid : this.mainColorCandidates[0];
|
|
285
|
+
if (mainColor) mainColor.option.IsMainColor = true;
|
|
286
|
+
}
|
|
225
287
|
}, {
|
|
226
288
|
key: "getFinalPosNr",
|
|
227
289
|
value: function getFinalPosNr(group, posNrCount, partListArticle, firstItem) {
|
|
@@ -230,7 +292,8 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
230
292
|
//betriebsanleitung soll diese PosNr haben
|
|
231
293
|
finalPosNr = '1.99';
|
|
232
294
|
} else if (group.partlistArticles.length > 1) {
|
|
233
|
-
|
|
295
|
+
// string formatting: float arithmetic yields "1.1" for the 10th and "1.1400000000000001" for the 14th position
|
|
296
|
+
finalPosNr = "".concat(group.posNr, ".").concat(String(posNrCount).padStart(2, '0'));
|
|
234
297
|
posNrCount++;
|
|
235
298
|
} else {
|
|
236
299
|
finalPosNr = (group.posNr + '.00').toString();
|
|
@@ -248,14 +311,27 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
248
311
|
for (var i = 0; i < groupedPartlistArticles.length; i++) {
|
|
249
312
|
var partlistArticlesSorted = [];
|
|
250
313
|
var article = groupedPartlistArticles[i];
|
|
314
|
+
var lookupArticles = [article.article];
|
|
315
|
+
var _iterator2 = _createForOfIteratorHelper(article.partlistArticles),
|
|
316
|
+
_step2;
|
|
317
|
+
try {
|
|
318
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
319
|
+
var entry = _step2.value;
|
|
320
|
+
if (!lookupArticles.includes(entry.optionArticle)) lookupArticles.push(entry.optionArticle);
|
|
321
|
+
}
|
|
322
|
+
} catch (err) {
|
|
323
|
+
_iterator2.e(err);
|
|
324
|
+
} finally {
|
|
325
|
+
_iterator2.f();
|
|
326
|
+
}
|
|
251
327
|
for (var j = 0; j < pos.length; j++) {
|
|
252
328
|
var _DivaSummaryHandler$g2;
|
|
253
329
|
var indexesOf = [];
|
|
254
|
-
var p = (_DivaSummaryHandler$g2 = summaryHandlerInstance.getTabgroupByOptionCodex(pos[j],
|
|
330
|
+
var p = (_DivaSummaryHandler$g2 = summaryHandlerInstance.getTabgroupByOptionCodex(pos[j], lookupArticles)) !== null && _DivaSummaryHandler$g2 !== void 0 ? _DivaSummaryHandler$g2 : pos[j];
|
|
255
331
|
for (var m = 0; m < article.partlistArticles.length; m++) {
|
|
256
|
-
var
|
|
332
|
+
var _partListArticle$opti, _partListArticle$opti2;
|
|
257
333
|
var partListArticle = article.partlistArticles[m];
|
|
258
|
-
var tabGroup = (
|
|
334
|
+
var tabGroup = (_partListArticle$opti = (_partListArticle$opti2 = partListArticle.optionArticle.getArticleOptionState((!partListArticle.article.CatalogData.isIDMFormat ? 'OPT' : '') + partListArticle.tabGroup)) === null || _partListArticle$opti2 === void 0 ? void 0 : _partListArticle$opti2.optionTabGroup) !== null && _partListArticle$opti !== void 0 ? _partListArticle$opti : partListArticle.tabGroup;
|
|
259
335
|
if (tabGroup == p) {
|
|
260
336
|
indexesOf.push(m);
|
|
261
337
|
}
|
|
@@ -279,26 +355,30 @@ var StandardWWSHandler = /*#__PURE__*/function () {
|
|
|
279
355
|
var optionStates = summaryHandlerInstance.getOptionCodexesOfTabGroupForSummary(article, partListArticle, usedOptionCodexes, finalPosNr == '');
|
|
280
356
|
for (var i = 0; i < optionStates.length; i++) {
|
|
281
357
|
var optionState = optionStates[i];
|
|
282
|
-
if (optionState.optionCodex.startsWith('OPTBE_') || optionState.optionCodex.startsWith('OPTAB_') || optionState.option.addToWWS) {
|
|
358
|
+
if (optionState.optionCodex.startsWith('OPTBE_') || optionState.optionCodex.startsWith('OPTAB_') || optionState.option.addToWWS || optionState.option.isMainColor) {
|
|
283
359
|
var _optionState$vCodex;
|
|
284
360
|
var coloCodex = (_optionState$vCodex = optionState.vCodex) !== null && _optionState$vCodex !== void 0 ? _optionState$vCodex : optionState.valCodex;
|
|
285
361
|
if (coloCodex) {
|
|
286
362
|
var _optionState$val$grou, _optionState$val, _article$getMergesToO;
|
|
287
363
|
colorCodices.push(coloCodex);
|
|
288
|
-
var isMainColor = false;
|
|
289
|
-
if (!this.mainColorFound && optionState.optionCodex == MAIN_COLOR_OPTIONCODEX) {
|
|
290
|
-
isMainColor = true;
|
|
291
|
-
this.mainColorFound = true;
|
|
292
|
-
}
|
|
293
364
|
//IDM has no group name on the value itself: there the Bezugsgruppe is its own feature, merged into this one only for the view
|
|
294
365
|
var groupName = (_optionState$val$grou = (_optionState$val = optionState.val) === null || _optionState$val === void 0 ? void 0 : _optionState$val.groupName) !== null && _optionState$val$grou !== void 0 ? _optionState$val$grou : (_article$getMergesToO = article.getMergesToOPGParentOps(optionState.optionCodex)) === null || _article$getMergesToO === void 0 ? void 0 : _article$getMergesToO.valName;
|
|
295
|
-
|
|
366
|
+
var formattedOption = {
|
|
296
367
|
PosNr: finalPosNr,
|
|
297
368
|
Text: (groupName ? groupName + ' ' : '') + optionState.valName,
|
|
298
369
|
Title: optionState.optionOrigName,
|
|
299
370
|
Codex: optionState.vCodex && optionState.vCodex !== optionState.valName ? optionState.vCodex : '',
|
|
300
|
-
IsMainColor:
|
|
301
|
-
}
|
|
371
|
+
IsMainColor: false
|
|
372
|
+
};
|
|
373
|
+
formattedOptions.push(formattedOption);
|
|
374
|
+
// only options of real lines can become the main color; the dedupe probe (empty PosNr) discards its result
|
|
375
|
+
var explicit = !!optionState.option.isMainColor;
|
|
376
|
+
if (finalPosNr !== '' && (explicit || optionState.optionCodex == MAIN_COLOR_OPTIONCODEX)) {
|
|
377
|
+
this.mainColorCandidates.push({
|
|
378
|
+
option: formattedOption,
|
|
379
|
+
explicit: explicit
|
|
380
|
+
});
|
|
381
|
+
}
|
|
302
382
|
}
|
|
303
383
|
}
|
|
304
384
|
}
|
|
@@ -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 articleHandlerInstance, b as setHandlerInstance } from './index-
|
|
7
|
+
import { G as Grid, a as articleHandlerInstance, b as setHandlerInstance } from './index-a2f44a31.js';
|
|
8
8
|
import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
|
|
9
9
|
import '@babel/runtime/helpers/slicedToArray';
|
|
10
10
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
@@ -50,6 +50,12 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
50
50
|
//rule so the shelfplanner cells get disabled when the neighbour (AVL or AVR) is smaller. eg: Ben sulvag
|
|
51
51
|
_defineProperty(this, "disableCellsByElement", void 0);
|
|
52
52
|
_defineProperty(this, "montageOptions", []);
|
|
53
|
+
//true until the shelfaccessoires saved in the basket were restored into the cells (see restoreShelfAccessoires in the DivaSetHandler).
|
|
54
|
+
//until then no initAcc may be placed, they would occupy the cells of the saved accessoires
|
|
55
|
+
_defineProperty(this, "restorePending", void 0);
|
|
56
|
+
//accessoires of grids that were switched off by a grid rule, per gridIndex. They get placed again when the grid
|
|
57
|
+
//becomes active again - eg a shelf that is configured from 100cm to 50cm and back keeps its accessoires
|
|
58
|
+
_defineProperty(this, "stashedAccessoires", {});
|
|
53
59
|
/**
|
|
54
60
|
* Debug trail of shelf-planner mutations (the shelf equivalent of the box
|
|
55
61
|
* planner's constructionDebugStack): one entry per visibility flip, grid
|
|
@@ -59,12 +65,6 @@ var ShelfPlanner = /*#__PURE__*/function () {
|
|
|
59
65
|
*/
|
|
60
66
|
_defineProperty(this, "shelfDebugStack", []);
|
|
61
67
|
_defineProperty(this, "shelfDebugSeq", 0);
|
|
62
|
-
//true until the shelfaccessoires saved in the basket were restored into the cells (see restoreShelfAccessoires in the DivaSetHandler).
|
|
63
|
-
//until then no initAcc may be placed, they would occupy the cells of the saved accessoires
|
|
64
|
-
_defineProperty(this, "restorePending", void 0);
|
|
65
|
-
//accessoires of grids that were switched off by a grid rule, per gridIndex. They get placed again when the grid
|
|
66
|
-
//becomes active again - eg a shelf that is configured from 100cm to 50cm and back keeps its accessoires
|
|
67
|
-
_defineProperty(this, "stashedAccessoires", {});
|
|
68
68
|
this.article = article;
|
|
69
69
|
this.restorePending = !!article.shelfPlanData;
|
|
70
70
|
this.disableCellsByElement = data.DisableCells;
|
|
@@ -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-a2f44a31.js';
|
|
4
4
|
import '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
6
6
|
import '@babel/runtime/helpers/defineProperty';
|