@configuratorware/configurator-frontendgui 1.56.1 → 1.56.4
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/App/Error/ErrorBoundary.js +8 -6
- package/App/Frame.js +8 -6
- package/App/Modules/Creator/Components/ConfigurationvariantItem/index.js +10 -8
- package/App/Modules/Creator/Components/ConfigurationvariantSelection/index.js +10 -8
- package/App/Modules/Creator/Components/CustomTitleEditor/index.js +10 -8
- package/App/Modules/Creator/Components/ExternalVisualization/index.js +9 -7
- package/App/Modules/Creator/Components/FastConfigurationRow/index.js +8 -6
- package/App/Modules/Creator/Components/FastConfigurationSelect/index.js +8 -6
- package/App/Modules/Creator/Components/FullScreenView/FullScreenView.js +11 -10
- package/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +8 -6
- package/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +8 -6
- package/App/Modules/Creator/Components/Incompatibility/RuleComponent.js +9 -7
- package/App/Modules/Creator/Components/Incompatibility/index.js +9 -8
- package/App/Modules/Creator/Components/Option/index.js +1 -0
- package/App/Modules/Creator/Components/OptionAmount/index.js +14 -6
- package/App/Modules/Creator/Components/Optiondetail/ZoomImage/index.js +7 -6
- package/App/Modules/Creator/Components/Optiondetail/index.js +17 -15
- package/App/Modules/Creator/Components/OptionsList/index.js +12 -11
- package/App/Modules/Creator/Components/Price/index.js +8 -6
- package/App/Modules/Creator/Components/ProductPart/index.js +8 -7
- package/App/Modules/Creator/Components/Tools/index.js +8 -6
- package/App/Modules/Creator/Layouts/DefaultLayout.js +30 -28
- package/App/Modules/Designer/Components/AddGalleryImage/index.js +11 -9
- package/App/Modules/Designer/Components/AddGalleryImage/index.story.js +4 -4
- package/App/Modules/Designer/Components/AddGalleryImage/index.test.js +6 -6
- package/App/Modules/Designer/Components/AddVisualElement/index.js +8 -6
- package/App/Modules/Designer/Components/AddVisualElement/index.test.js +3 -3
- package/App/Modules/Designer/Components/CloseDesignEditor/index.js +8 -6
- package/App/Modules/Designer/Components/CloseGraphicsEditorButton/index.js +5 -4
- package/App/Modules/Designer/Components/ColorPalettes/index.js +26 -21
- package/App/Modules/Designer/Components/ColorPalettes/index.test.js +3 -3
- package/App/Modules/Designer/Components/DesignAreaControlbox/index.js +23 -20
- package/App/Modules/Designer/Components/DesignAreaControlbox/index.test.js +7 -7
- package/App/Modules/Designer/Components/Dialog/index.js +13 -10
- package/App/Modules/Designer/Components/FeedbackNotice/index.js +9 -7
- package/App/Modules/Designer/Components/FeedbackNotice/index.test.js +1 -1
- package/App/Modules/Designer/Components/FullScreenView/FullScreenView.js +7 -6
- package/App/Modules/Designer/Components/ImageColorPicker/ImageColorPicker.js +12 -10
- package/App/Modules/Designer/Components/ImageColorize/index.js +39 -29
- package/App/Modules/Designer/Components/ImageControlbox/index.js +16 -13
- package/App/Modules/Designer/Components/ImageEditDialog/ImageThumbnail.js +24 -14
- package/App/Modules/Designer/Components/ImageEditDialog/ImageUpload.js +85 -69
- package/App/Modules/Designer/Components/ImageEditDialog/index.js +45 -42
- package/App/Modules/Designer/Components/ImageLibraryThumbnail/index.js +9 -7
- package/App/Modules/Designer/Components/ObjectTools/index.js +8 -6
- package/App/Modules/Designer/Components/Select/index.js +8 -6
- package/App/Modules/Designer/Components/TextControlbox/index.js +26 -21
- package/App/Modules/Designer/Components/TextControlbox/index.test.js +10 -10
- package/App/Modules/Designer/Containers/AddVisualElement.js +21 -11
- package/App/Modules/Designer/Containers/ImageEditDialog.js +173 -157
- package/App/Modules/Designer/Designer.js +7 -6
- package/App/Modules/Designer/Layouts/DefaultLayout.js +20 -17
- package/App/Modules/Designer/Layouts/PopupAreaProvider.js +18 -15
- package/App/Modules/Designer/Utils/Transformers.js +23 -13
- package/App/Modules/Designer/setupDesigner.js +27 -16
- package/App/Modules/Designer/withActiveCanvas.js +10 -8
- package/App/Modules/Visualization/AlignTargetContainer.js +1 -0
- package/App/Modules/Visualization/CreatorAlignTarget.js +12 -11
- package/App/Modules/Visualization/DefaultVisualizationProvider.js +10 -8
- package/App/Modules/Visualization/DesignerAlignTarget.js +10 -9
- package/App/Reducers/Actions.js +44 -36
- package/App/Reducers/Configurator/Actions.js +92 -78
- package/App/Reducers/Configurator/Selectors.js +5 -5
- package/App/Reducers/Confirm/Actions.js +16 -6
- package/App/Reducers/DesignArea/Selectors.js +2 -1
- package/App/Reducers/ImageGallery/Actions.js +31 -18
- package/App/Reducers/ImageGallery/Reducer.js +1 -0
- package/App/Reducers/ImageGallery/Selectors.js +1 -0
- package/App/Reducers/UI/Actions.js +40 -26
- package/App/Routing.js +8 -6
- package/App/Screens/Configurator/Components/AmountSelection/index.js +11 -9
- package/App/Screens/Configurator/Components/CalculationWidget/index.js +19 -17
- package/App/Screens/Configurator/Components/CalculationWidget/index.test.js +8 -8
- package/App/Screens/Configurator/Components/Confirm/index.js +8 -6
- package/App/Screens/Configurator/Components/Error/index.js +9 -7
- package/App/Screens/Configurator/Components/FullScreenView/index.js +24 -21
- package/App/Screens/Configurator/Components/FullScreenView/index.test.js +2 -2
- package/App/Screens/Configurator/Components/ItemTile/ItemTile.js +13 -5
- package/App/Screens/Configurator/Components/PreviewPortal/index.js +10 -8
- package/App/Screens/Configurator/Components/Thumbnail/index.js +27 -24
- package/App/Screens/Configurator/Components/Thumbnail/index.test.js +2 -2
- package/App/Screens/Configurator/Containers/AmountPrice.js +6 -5
- package/App/Screens/Configurator/Containers/ConfigurationModeSwitch.js +19 -10
- package/App/Screens/DesignerProductPreview/DesignerProductPreviewManager.js +88 -73
- package/App/Screens/DesignerProductPreview/Screen.js +21 -14
- package/App/Screens/ItemOverview/Components/ItemOverview.js +47 -32
- package/App/ServiceLocator.js +4 -2
- package/App/Services/AdminareaCommunicationService.js +24 -14
- package/App/Services/AnalyticsService.js +48 -47
- package/App/Services/ConfiguratorService.js +142 -121
- package/App/Services/DesignDataService.js +619 -555
- package/App/Services/DesignerService.js +100 -79
- package/App/Services/InteractionService.js +236 -210
- package/App/Services/UIService.js +10 -7
- package/App/Services/VisualizationService.js +104 -86
- package/App/Shared/Components/AcceptDesign/index.js +19 -16
- package/App/Shared/Components/AcceptPrivacy/index.js +8 -6
- package/App/Shared/Components/AddToBasket/index.js +8 -6
- package/App/Shared/Components/AlertDialog/index.js +9 -7
- package/App/Shared/Components/AmountInput/index.js +24 -21
- package/App/Shared/Components/AmountPrice/index.js +128 -115
- package/App/Shared/Components/AmountPrice/index.test.js +5 -5
- package/App/Shared/Components/BulkNames/index.js +8 -6
- package/App/Shared/Components/ConfigurationOverview/index.js +8 -6
- package/App/Shared/Components/InformationTag/InformationTag.js +11 -9
- package/App/Shared/Components/LicenseNotice/LicenseNotice.js +8 -6
- package/App/Shared/Components/LoadConfiguration/index.js +9 -7
- package/App/Shared/Components/Notification/index.js +8 -6
- package/App/Shared/Components/PdfDownload/index.js +25 -15
- package/App/Shared/Components/PriceList/index.js +16 -13
- package/App/Shared/Components/PriceOverview/index.js +13 -10
- package/App/Shared/Components/ProductVariant/index.js +25 -22
- package/App/Shared/Components/ProductVariant/index.story.js +1 -0
- package/App/Shared/Components/ReceiveOfferForm/index.js +12 -10
- package/App/Shared/Components/ReceiveOfferForm/index.test.js +2 -2
- package/App/Shared/Components/SaveConfiguration/index.js +32 -22
- package/App/Shared/Components/Stepper/index.js +10 -8
- package/App/Shared/Components/ToolbarList/index.js +11 -9
- package/App/Shared/Components/VariantChooser/index.js +13 -10
- package/App/Shared/Containers/BulkNames.js +15 -13
- package/App/Shared/Containers/Header/index.js +15 -7
- package/App/Shared/Containers/LoadConfiguration/LoadConfiguration.js +22 -15
- package/App/Shared/Containers/ProductVariant/ProductVariant.js +23 -15
- package/App/Translations.js +56 -40
- package/App/Utils/Request/lazyFetch.js +27 -19
- package/App/configuration.js +4 -0
- package/App/index.js +24 -14
- package/Framework/Api.js +2 -1
- package/Framework/ComponentContainer.js +14 -11
- package/Framework/Components/Carousel/index.js +13 -11
- package/Framework/Components/Dialog/index.js +35 -33
- package/Framework/Components/DialogSelect/index.js +19 -16
- package/Framework/Components/Input/index.js +12 -10
- package/Framework/CustomError.js +6 -5
- package/Framework/Helpers/TransitionDetect.js +2 -1
- package/Framework/Services/AbstractAdminareaCommunicationService.js +2 -1
- package/Framework/Services/AbstractAsyncService.js +2 -1
- package/Framework/Services/AbstractConfiguratorService.js +2 -1
- package/Framework/Services/AbstractInteractionService.js +2 -1
- package/Framework/Services/AbstractStoreService.js +2 -1
- package/Framework/Services/AbstractUIService.js +2 -1
- package/Framework/Services/AbstractVisualizationService.js +2 -1
- package/Framework/Services/AsyncService.js +8 -6
- package/Framework/Services/StoreService.js +27 -17
- package/Framework/bindDecorator.js +7 -6
- package/Framework/i18n.js +10 -8
- package/Shared/ErrorTypes/DeferredError.js +6 -5
- package/Shared/HOCs/ResizeDetect/ResizeDetect.js +11 -9
- package/Utils/Async/AsyncManager.js +30 -20
- package/Utils/Async/Deferred.js +4 -2
- package/Utils/Decorators/Observable.js +2 -1
- package/Utils/Dev/HOCs/withFilePicker.js +10 -8
- package/Utils/Immutable/set.js +6 -6
- package/Utils/Test/mountWithState.js +1 -1
- package/package.json +4 -4
|
@@ -28,7 +28,7 @@ var _Selectors4 = require("../Reducers/DesignData/Selectors");
|
|
|
28
28
|
var _createMessageInterface = _interopRequireWildcard(require("../Utils/createMessageInterface"));
|
|
29
29
|
var _SvgFixers = require("../Modules/Designer/Utils/SvgFixers");
|
|
30
30
|
var _excluded = ["code"];
|
|
31
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var
|
|
31
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
32
32
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
33
33
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
34
34
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -36,8 +36,15 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
36
36
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
37
37
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
38
38
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
39
|
+
function _regeneratorRuntime() { "use strict"; var r = _regenerator(), e = r.m(_regeneratorRuntime), t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; function n(r) { var e = "function" == typeof r && r.constructor; return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); } var o = { "throw": 1, "return": 2, "break": 3, "continue": 3 }; function a(r) { var e, t; return function (n) { e || (e = { stop: function stop() { return t(n.a, 2); }, "catch": function _catch() { return n.v; }, abrupt: function abrupt(r, e) { return t(n.a, o[r], e); }, delegateYield: function delegateYield(r, o, a) { return e.resultName = o, t(n.d, _regeneratorValues(r), a); }, finish: function finish(r) { return t(n.f, r); } }, t = function t(r, _t, o) { n.p = e.prev, n.n = e.next; try { return r(_t, o); } finally { e.next = n.n; } }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; try { return r.call(this, e); } finally { n.p = e.prev, n.n = e.next; } }; } return (_regeneratorRuntime = function _regeneratorRuntime() { return { wrap: function wrap(e, t, n, o) { return r.w(a(e), t, n, o && o.reverse()); }, isGeneratorFunction: n, mark: r.m, awrap: function awrap(r, e) { return new _OverloadYield(r, e); }, AsyncIterator: _regeneratorAsyncIterator, async: function async(r, e, t, o, u) { return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u); }, keys: _regeneratorKeys, values: _regeneratorValues }; })(); }
|
|
40
|
+
function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
|
|
41
|
+
function _regeneratorKeys(e) { var n = Object(e), r = []; for (var t in n) r.unshift(t); return function e() { for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; return e.done = !0, e; }; }
|
|
42
|
+
function _regeneratorAsync(n, e, r, t, o) { var a = _regeneratorAsyncGen(n, e, r, t, o); return a.next().then(function (n) { return n.done ? n.value : a.next(); }); }
|
|
43
|
+
function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
|
|
44
|
+
function _regeneratorAsyncIterator(t, e) { function n(r, o, i, f) { try { var c = t[r](o), u = c.value; return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) { n("next", t, i, f); }, function (t) { n("throw", t, i, f); }) : e.resolve(u).then(function (t) { c.value = t, i(c); }, function (t) { return n("throw", t, i, f); }); } catch (t) { f(t); } } var r; this.next || (_regeneratorDefine2(_regeneratorAsyncIterator.prototype), _regeneratorDefine2(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { return this; })), _regeneratorDefine2(this, "_invoke", function (t, o, i) { function f() { return new e(function (e, r) { n(t, i, e, r); }); } return r = r ? r.then(f, f) : f(); }, !0); }
|
|
39
45
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
40
46
|
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
47
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
41
48
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
42
49
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
43
50
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -45,13 +52,13 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
45
52
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
46
53
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
47
54
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
48
|
-
function
|
|
55
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
56
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
57
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
49
58
|
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
50
59
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
51
60
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
52
61
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
53
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
54
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
55
62
|
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; } } }; }
|
|
56
63
|
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; } }
|
|
57
64
|
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; }
|
|
@@ -89,10 +96,12 @@ var getSelectedAmountsBySizes = function getSelectedAmountsBySizes(item, selecte
|
|
|
89
96
|
});
|
|
90
97
|
};
|
|
91
98
|
var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractConfigurator) {
|
|
99
|
+
_inherits(ConfiguratorService, _AbstractConfigurator);
|
|
100
|
+
var _super = _createSuper(ConfiguratorService);
|
|
92
101
|
function ConfiguratorService() {
|
|
93
102
|
var _this;
|
|
94
103
|
_classCallCheck(this, ConfiguratorService);
|
|
95
|
-
_this =
|
|
104
|
+
_this = _super.call(this);
|
|
96
105
|
_ServiceLocator.Services.store.observeStore(function (state) {
|
|
97
106
|
return state.configurator.configuration;
|
|
98
107
|
}, function () {
|
|
@@ -105,8 +114,7 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
105
114
|
}());
|
|
106
115
|
return _this;
|
|
107
116
|
}
|
|
108
|
-
|
|
109
|
-
return _createClass(ConfiguratorService, [{
|
|
117
|
+
_createClass(ConfiguratorService, [{
|
|
110
118
|
key: "init",
|
|
111
119
|
value: function init() {
|
|
112
120
|
var _this2 = this;
|
|
@@ -114,10 +122,10 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
114
122
|
if (!adminMode) {
|
|
115
123
|
var messageInterface = (0, _createMessageInterface["default"])();
|
|
116
124
|
messageInterface.addListener(_createMessageInterface.LISTENER_SWITCH_OPTIONS, /*#__PURE__*/function () {
|
|
117
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
125
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(event) {
|
|
118
126
|
var optionsJSON, optionsToSelect;
|
|
119
|
-
return
|
|
120
|
-
while (1) switch (_context.
|
|
127
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
128
|
+
while (1) switch (_context.prev = _context.next) {
|
|
121
129
|
case 0:
|
|
122
130
|
optionsJSON = (0, _get["default"])(event, 'data.options');
|
|
123
131
|
try {
|
|
@@ -127,8 +135,9 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
127
135
|
// eslint-disable-next-line no-console
|
|
128
136
|
console.error('Wrong JSON provided for switch_options:', optionsJSON);
|
|
129
137
|
}
|
|
130
|
-
case
|
|
131
|
-
|
|
138
|
+
case 2:
|
|
139
|
+
case "end":
|
|
140
|
+
return _context.stop();
|
|
132
141
|
}
|
|
133
142
|
}, _callee);
|
|
134
143
|
}));
|
|
@@ -137,35 +146,36 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
137
146
|
};
|
|
138
147
|
}());
|
|
139
148
|
messageInterface.addListener(_createMessageInterface.LISTENER_SAVE_CONFIGURATION, /*#__PURE__*/function () {
|
|
140
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/
|
|
141
|
-
var save_id, saveType, configuration, code
|
|
142
|
-
return
|
|
143
|
-
while (1) switch (_context2.
|
|
149
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(event) {
|
|
150
|
+
var save_id, saveType, configuration, code;
|
|
151
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
152
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
144
153
|
case 0:
|
|
145
154
|
save_id = (0, _get["default"])(event, 'data.save_id');
|
|
146
155
|
saveType = (0, _get["default"])(event, 'data.save_type') === _configuration2.SaveTypes.CART ? _configuration2.SaveTypes.CART : _configuration2.SaveTypes.USER;
|
|
147
|
-
_context2.
|
|
148
|
-
_context2.
|
|
156
|
+
_context2.prev = 2;
|
|
157
|
+
_context2.next = 5;
|
|
149
158
|
return _this2.captureAndSaveConfiguration(saveType);
|
|
150
|
-
case
|
|
151
|
-
configuration = _context2.
|
|
159
|
+
case 5:
|
|
160
|
+
configuration = _context2.sent;
|
|
152
161
|
code = (0, _get["default"])(configuration, 'data.code');
|
|
153
162
|
messageInterface.dispatch({
|
|
154
163
|
method: _createMessageInterface.METHOD_CONFIGURATION_SAVED_REMOTELY,
|
|
155
164
|
save_id: save_id,
|
|
156
165
|
code: code
|
|
157
166
|
});
|
|
158
|
-
_context2.
|
|
167
|
+
_context2.next = 13;
|
|
159
168
|
break;
|
|
160
|
-
case
|
|
161
|
-
_context2.
|
|
162
|
-
|
|
169
|
+
case 10:
|
|
170
|
+
_context2.prev = 10;
|
|
171
|
+
_context2.t0 = _context2["catch"](2);
|
|
163
172
|
// eslint-disable-next-line no-console
|
|
164
173
|
console.error('Saving configuration failed, save_id was ', save_id);
|
|
165
|
-
case
|
|
166
|
-
|
|
174
|
+
case 13:
|
|
175
|
+
case "end":
|
|
176
|
+
return _context2.stop();
|
|
167
177
|
}
|
|
168
|
-
}, _callee2, null, [[
|
|
178
|
+
}, _callee2, null, [[2, 10]]);
|
|
169
179
|
}));
|
|
170
180
|
return function (_x2) {
|
|
171
181
|
return _ref2.apply(this, arguments);
|
|
@@ -235,40 +245,41 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
235
245
|
}, {
|
|
236
246
|
key: "onConfigurationChange",
|
|
237
247
|
value: function () {
|
|
238
|
-
var _onConfigurationChange = _asyncToGenerator(/*#__PURE__*/
|
|
239
|
-
return
|
|
240
|
-
while (1) switch (_context3.
|
|
248
|
+
var _onConfigurationChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(configuration, prevConfiguration) {
|
|
249
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
250
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
241
251
|
case 0:
|
|
242
252
|
if (!(this.state.calculationIsEnabled && (!configuration.check_results ||
|
|
243
253
|
// no check results
|
|
244
254
|
configuration.check_results.status) &&
|
|
245
255
|
// or the check result status is ok
|
|
246
256
|
this.shouldInvalidateCalculation(prevConfiguration, configuration))) {
|
|
247
|
-
_context3.
|
|
257
|
+
_context3.next = 10;
|
|
248
258
|
break;
|
|
249
259
|
}
|
|
250
260
|
if (!(0, _Selectors.isCalculationAutoResolveEnabled)(this.state)) {
|
|
251
|
-
_context3.
|
|
261
|
+
_context3.next = 8;
|
|
252
262
|
break;
|
|
253
263
|
}
|
|
254
264
|
// disable automatic price updates to take direct control over error handling
|
|
255
265
|
_ServiceLocator.Services.store.dispatch((0, _Actions.setCalculationEnabled)(false));
|
|
256
266
|
// triggering the calculation directly to make sure it's synced
|
|
257
|
-
_context3.
|
|
267
|
+
_context3.next = 5;
|
|
258
268
|
return _ServiceLocator.Services.store.dispatch(configuratorActions.doCalculation());
|
|
259
|
-
case
|
|
269
|
+
case 5:
|
|
260
270
|
_ServiceLocator.Services.store.dispatch((0, _Actions.setCalculationEnabled)(true));
|
|
261
|
-
_context3.
|
|
271
|
+
_context3.next = 10;
|
|
262
272
|
break;
|
|
263
|
-
case
|
|
273
|
+
case 8:
|
|
264
274
|
_ServiceLocator.Services.store.dispatch(configuratorActions.invalidateCalculation());
|
|
265
275
|
_ServiceLocator.Services.store.dispatch(configuratorActions.doCalculation());
|
|
266
|
-
case
|
|
276
|
+
case 10:
|
|
267
277
|
if (this.shouldUpdateVisualization(prevConfiguration, configuration)) {
|
|
268
278
|
_ServiceLocator.Services.visualization.update(configuration);
|
|
269
279
|
}
|
|
270
|
-
case
|
|
271
|
-
|
|
280
|
+
case 11:
|
|
281
|
+
case "end":
|
|
282
|
+
return _context3.stop();
|
|
272
283
|
}
|
|
273
284
|
}, _callee3, this);
|
|
274
285
|
}));
|
|
@@ -383,11 +394,14 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
383
394
|
}, {
|
|
384
395
|
key: "saveConfiguration",
|
|
385
396
|
value: function () {
|
|
386
|
-
var _saveConfiguration = _asyncToGenerator(/*#__PURE__*/
|
|
387
|
-
return
|
|
388
|
-
while (1) switch (_context4.
|
|
397
|
+
var _saveConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(configuration, configurationtype) {
|
|
398
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
399
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
389
400
|
case 0:
|
|
390
|
-
return _context4.
|
|
401
|
+
return _context4.abrupt("return", _ServiceLocator.Services.store.dispatch(configuratorActions.saveConfiguration(configuration, configurationtype)));
|
|
402
|
+
case 1:
|
|
403
|
+
case "end":
|
|
404
|
+
return _context4.stop();
|
|
391
405
|
}
|
|
392
406
|
}, _callee4);
|
|
393
407
|
}));
|
|
@@ -399,7 +413,7 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
399
413
|
}, {
|
|
400
414
|
key: "getPreviewImagesForVariants",
|
|
401
415
|
value: function () {
|
|
402
|
-
var _getPreviewImagesForVariants = _asyncToGenerator(/*#__PURE__*/
|
|
416
|
+
var _getPreviewImagesForVariants = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
403
417
|
var options,
|
|
404
418
|
_options$size,
|
|
405
419
|
size,
|
|
@@ -417,10 +431,9 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
417
431
|
variants,
|
|
418
432
|
screenshots,
|
|
419
433
|
images,
|
|
420
|
-
_args5 = arguments
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
while (1) switch (_context5.p = _context5.n) {
|
|
434
|
+
_args5 = arguments;
|
|
435
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
436
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
424
437
|
case 0:
|
|
425
438
|
options = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
426
439
|
_ServiceLocator.Services.designData.closeDesignAreaEditor();
|
|
@@ -433,11 +446,11 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
433
446
|
configurationOptions = (0, _Selectors.getConfiguration)(this.state).optionclassifications;
|
|
434
447
|
cached = (0, _cached.getCached)('variantPreviewImages', designData, configurationOptions);
|
|
435
448
|
if (!cached.validate()) {
|
|
436
|
-
_context5.
|
|
449
|
+
_context5.next = 9;
|
|
437
450
|
break;
|
|
438
451
|
}
|
|
439
|
-
return _context5.
|
|
440
|
-
case
|
|
452
|
+
return _context5.abrupt("return", cached.getValue());
|
|
453
|
+
case 9:
|
|
441
454
|
memo = _ServiceLocator.Services.designData.createHighlightMemo(false);
|
|
442
455
|
designAreas = _ServiceLocator.Services.store.state.designArea.filteredDesignAreas; // use the first area as default if it's not defined through the production methods
|
|
443
456
|
defaultDesignAreaIdentifier = (0, _Selectors2.getDefaultDesignAreaIdentifierFromProductionMethod)(_ServiceLocator.Services.store.state) || (designAreas.length ? designAreas[0].identifier : null);
|
|
@@ -455,41 +468,42 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
455
468
|
if (!variants[0]) {
|
|
456
469
|
variants = [(0, _Selectors.getItem)(this.state).identifier];
|
|
457
470
|
}
|
|
458
|
-
_context5.
|
|
459
|
-
_context5.
|
|
471
|
+
_context5.prev = 19;
|
|
472
|
+
_context5.next = 22;
|
|
460
473
|
return _ServiceLocator.Services.visualization.getScreenshots({
|
|
461
474
|
areaList: usedAreas,
|
|
462
475
|
viewList: usedViews,
|
|
463
476
|
variantList: variants,
|
|
464
477
|
size: size
|
|
465
478
|
});
|
|
466
|
-
case
|
|
467
|
-
screenshots = _context5.
|
|
479
|
+
case 22:
|
|
480
|
+
screenshots = _context5.sent;
|
|
468
481
|
if (screenshots) {
|
|
469
|
-
_context5.
|
|
482
|
+
_context5.next = 25;
|
|
470
483
|
break;
|
|
471
484
|
}
|
|
472
|
-
return _context5.
|
|
473
|
-
case
|
|
485
|
+
return _context5.abrupt("return", {});
|
|
486
|
+
case 25:
|
|
474
487
|
images = {};
|
|
475
488
|
Object.keys(screenshots).forEach(function (identifier) {
|
|
476
489
|
images[variants.length === 1 ? variants[0] : identifier] = (0, _getFirstDataURLFromScreenshotsObj.getFirstDataURLFromScreenshotsObj)(screenshots[identifier]);
|
|
477
490
|
});
|
|
478
491
|
cached.setValue(images);
|
|
479
|
-
return _context5.
|
|
480
|
-
case
|
|
481
|
-
_context5.
|
|
482
|
-
|
|
492
|
+
return _context5.abrupt("return", images);
|
|
493
|
+
case 31:
|
|
494
|
+
_context5.prev = 31;
|
|
495
|
+
_context5.t0 = _context5["catch"](19);
|
|
483
496
|
// eslint-disable-next-line no-console
|
|
484
|
-
console.error('Error occurred while generating preview images:',
|
|
485
|
-
case
|
|
486
|
-
_context5.
|
|
497
|
+
console.error('Error occurred while generating preview images:', _context5.t0);
|
|
498
|
+
case 34:
|
|
499
|
+
_context5.prev = 34;
|
|
487
500
|
memo.restore();
|
|
488
|
-
return _context5.
|
|
489
|
-
case
|
|
490
|
-
|
|
501
|
+
return _context5.finish(34);
|
|
502
|
+
case 37:
|
|
503
|
+
case "end":
|
|
504
|
+
return _context5.stop();
|
|
491
505
|
}
|
|
492
|
-
}, _callee5, this, [[
|
|
506
|
+
}, _callee5, this, [[19, 31, 34, 37]]);
|
|
493
507
|
}));
|
|
494
508
|
function getPreviewImagesForVariants() {
|
|
495
509
|
return _getPreviewImagesForVariants.apply(this, arguments);
|
|
@@ -525,24 +539,24 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
525
539
|
}, {
|
|
526
540
|
key: "createMediaDataForConfiguration",
|
|
527
541
|
value: function () {
|
|
528
|
-
var _createMediaDataForConfiguration = _asyncToGenerator(/*#__PURE__*/
|
|
529
|
-
var mediaData, restorePlaceholderVisibility, memo, fontMapping, svgs, fullSvgs, usedAreas, designArea, filteredDesignAreas, usedViews, item, selectedAmounts, selectedVariants, selectedVariant, designViewList, screenshots, _iterator4, _step4, variant, variantImages, _keys, orderedImages, index, key
|
|
530
|
-
return
|
|
531
|
-
while (1) switch (_context6.
|
|
542
|
+
var _createMediaDataForConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(configuration) {
|
|
543
|
+
var mediaData, restorePlaceholderVisibility, memo, fontMapping, svgs, fullSvgs, usedAreas, designArea, filteredDesignAreas, usedViews, item, selectedAmounts, selectedVariants, selectedVariant, designViewList, screenshots, _iterator4, _step4, variant, variantImages, _keys, orderedImages, index, key;
|
|
544
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
545
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
532
546
|
case 0:
|
|
533
547
|
mediaData = {};
|
|
534
548
|
restorePlaceholderVisibility = this.togglePlaceholders(false);
|
|
535
549
|
memo = _ServiceLocator.Services.designData.createHighlightMemo(false);
|
|
536
550
|
fontMapping = (0, _Selectors3.getFontMapping)(_ServiceLocator.Services.store.state);
|
|
537
|
-
_context6.
|
|
551
|
+
_context6.next = 6;
|
|
538
552
|
return _ServiceLocator.Services.designData.getScreenshotsOfElements(fontMapping);
|
|
539
|
-
case
|
|
540
|
-
svgs = _context6.
|
|
553
|
+
case 6:
|
|
554
|
+
svgs = _context6.sent;
|
|
541
555
|
mediaData.designDataSnapshots = (0, _SvgFixers.prepareDesignDataSnapshots)(svgs);
|
|
542
|
-
_context6.
|
|
556
|
+
_context6.next = 10;
|
|
543
557
|
return _ServiceLocator.Services.designData.getScreenshots(fontMapping);
|
|
544
|
-
case
|
|
545
|
-
fullSvgs = _context6.
|
|
558
|
+
case 10:
|
|
559
|
+
fullSvgs = _context6.sent;
|
|
546
560
|
mediaData.printDesignData = (0, _SvgFixers.preparePrintDesignData)(fullSvgs);
|
|
547
561
|
usedAreas = Object.keys(fullSvgs);
|
|
548
562
|
designArea = _ServiceLocator.Services.store.state.designArea;
|
|
@@ -581,8 +595,8 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
581
595
|
}
|
|
582
596
|
designViewList = (0, _Selectors2.getDesignViewListForDesignAreas)(_ServiceLocator.Services.store.state);
|
|
583
597
|
mediaData.screenshots = {};
|
|
584
|
-
_context6.
|
|
585
|
-
_context6.
|
|
598
|
+
_context6.prev = 23;
|
|
599
|
+
_context6.next = 26;
|
|
586
600
|
return _ServiceLocator.Services.visualization.getScreenshots({
|
|
587
601
|
areaList: usedAreas,
|
|
588
602
|
// used in 2D visualization
|
|
@@ -591,8 +605,8 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
591
605
|
variantList: selectedVariants,
|
|
592
606
|
designViewList: designViewList // used in 2D visualization
|
|
593
607
|
});
|
|
594
|
-
case
|
|
595
|
-
screenshots = _context6.
|
|
608
|
+
case 26:
|
|
609
|
+
screenshots = _context6.sent;
|
|
596
610
|
if (screenshots) {
|
|
597
611
|
// make sure the order is kept on the server side
|
|
598
612
|
_iterator4 = _createForOfIteratorHelper(selectedVariants);
|
|
@@ -617,23 +631,26 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
617
631
|
}
|
|
618
632
|
}
|
|
619
633
|
mediaData.screenshots = screenshots;
|
|
620
|
-
_context6.
|
|
634
|
+
_context6.next = 34;
|
|
621
635
|
break;
|
|
622
|
-
case
|
|
623
|
-
_context6.
|
|
624
|
-
|
|
636
|
+
case 31:
|
|
637
|
+
_context6.prev = 31;
|
|
638
|
+
_context6.t0 = _context6["catch"](23);
|
|
625
639
|
// do not save in case of an error while generating screenshots
|
|
626
640
|
// eslint-disable-next-line no-console
|
|
627
|
-
console.error('Error occurred while generating screenshots:',
|
|
628
|
-
case
|
|
641
|
+
console.error('Error occurred while generating screenshots:', _context6.t0);
|
|
642
|
+
case 34:
|
|
629
643
|
memo.restore();
|
|
630
644
|
if (_typeof(configuration) === 'object') {
|
|
631
645
|
Object.assign(configuration, mediaData);
|
|
632
646
|
}
|
|
633
647
|
restorePlaceholderVisibility();
|
|
634
|
-
return _context6.
|
|
648
|
+
return _context6.abrupt("return", mediaData);
|
|
649
|
+
case 38:
|
|
650
|
+
case "end":
|
|
651
|
+
return _context6.stop();
|
|
635
652
|
}
|
|
636
|
-
}, _callee6, this, [[
|
|
653
|
+
}, _callee6, this, [[23, 31]]);
|
|
637
654
|
}));
|
|
638
655
|
function createMediaDataForConfiguration(_x7) {
|
|
639
656
|
return _createMediaDataForConfiguration.apply(this, arguments);
|
|
@@ -643,36 +660,38 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
643
660
|
}, {
|
|
644
661
|
key: "captureAndSaveConfiguration",
|
|
645
662
|
value: function () {
|
|
646
|
-
var _captureAndSaveConfiguration = _asyncToGenerator(/*#__PURE__*/
|
|
663
|
+
var _captureAndSaveConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(saveType) {
|
|
647
664
|
var extraData,
|
|
648
665
|
configuration,
|
|
649
|
-
_args7 = arguments
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
while (1) switch (_context7.p = _context7.n) {
|
|
666
|
+
_args7 = arguments;
|
|
667
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
668
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
653
669
|
case 0:
|
|
654
670
|
extraData = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
|
|
655
|
-
_context7.
|
|
656
|
-
_context7.
|
|
671
|
+
_context7.prev = 1;
|
|
672
|
+
_context7.next = 4;
|
|
657
673
|
return this.editNameAsync(saveType);
|
|
658
|
-
case
|
|
659
|
-
_context7.
|
|
674
|
+
case 4:
|
|
675
|
+
_context7.next = 10;
|
|
660
676
|
break;
|
|
661
|
-
case
|
|
662
|
-
_context7.
|
|
663
|
-
|
|
677
|
+
case 6:
|
|
678
|
+
_context7.prev = 6;
|
|
679
|
+
_context7.t0 = _context7["catch"](1);
|
|
664
680
|
// do not save if the name is not entered / confirmed
|
|
665
681
|
// eslint-disable-next-line no-console
|
|
666
682
|
console.error('Custom name editor not confirmed!');
|
|
667
|
-
return _context7.
|
|
668
|
-
case
|
|
683
|
+
return _context7.abrupt("return");
|
|
684
|
+
case 10:
|
|
669
685
|
configuration = this.prepareConfigurationForSave(false, extraData);
|
|
670
|
-
_context7.
|
|
686
|
+
_context7.next = 13;
|
|
671
687
|
return this.createMediaDataForConfiguration(configuration);
|
|
672
|
-
case
|
|
673
|
-
return _context7.
|
|
688
|
+
case 13:
|
|
689
|
+
return _context7.abrupt("return", this.saveConfiguration(configuration, saveType));
|
|
690
|
+
case 14:
|
|
691
|
+
case "end":
|
|
692
|
+
return _context7.stop();
|
|
674
693
|
}
|
|
675
|
-
}, _callee7, this, [[1,
|
|
694
|
+
}, _callee7, this, [[1, 6]]);
|
|
676
695
|
}));
|
|
677
696
|
function captureAndSaveConfiguration(_x8) {
|
|
678
697
|
return _captureAndSaveConfiguration.apply(this, arguments);
|
|
@@ -695,30 +714,30 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
695
714
|
}, {
|
|
696
715
|
key: "saveAndReloadConfiguration",
|
|
697
716
|
value: function () {
|
|
698
|
-
var _saveAndReloadConfiguration = _asyncToGenerator(/*#__PURE__*/
|
|
717
|
+
var _saveAndReloadConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(saveType) {
|
|
699
718
|
var tmpConfiguration, _configuration, _this$state, selectedoptionclassification, configuration, loadIdentifier, itemIdentifier;
|
|
700
|
-
return
|
|
701
|
-
while (1) switch (_context8.
|
|
719
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
720
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
702
721
|
case 0:
|
|
703
722
|
if (!this.state.configuration.item.identifier) {
|
|
704
|
-
_context8.
|
|
723
|
+
_context8.next = 6;
|
|
705
724
|
break;
|
|
706
725
|
}
|
|
707
726
|
tmpConfiguration = (0, _omit["default"])(this.state.configuration, ['code', 'date_created']);
|
|
708
|
-
_context8.
|
|
727
|
+
_context8.next = 4;
|
|
709
728
|
return this.saveConfiguration(tmpConfiguration, saveType);
|
|
710
|
-
case
|
|
729
|
+
case 4:
|
|
711
730
|
_configuration = this.state.configuration;
|
|
712
731
|
this.setLoadCode(_configuration.code);
|
|
713
|
-
case
|
|
732
|
+
case 6:
|
|
714
733
|
_this$state = this.state, selectedoptionclassification = _this$state.selectedoptionclassification, configuration = _this$state.configuration, loadIdentifier = _this$state.loadIdentifier;
|
|
715
734
|
itemIdentifier = configuration.item.identifier || loadIdentifier; // item identifier is required for the following actions
|
|
716
735
|
if (itemIdentifier) {
|
|
717
|
-
_context8.
|
|
736
|
+
_context8.next = 10;
|
|
718
737
|
break;
|
|
719
738
|
}
|
|
720
|
-
return _context8.
|
|
721
|
-
case
|
|
739
|
+
return _context8.abrupt("return");
|
|
740
|
+
case 10:
|
|
722
741
|
// reload inspirations
|
|
723
742
|
if ((0, _configuration2.getConf)('loadInspirations')) {
|
|
724
743
|
this.loadInspirations(itemIdentifier);
|
|
@@ -731,8 +750,9 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
731
750
|
if (configuration.item.identifier && selectedoptionclassification.identifier) {
|
|
732
751
|
this.loadOptions(configuration.item.identifier, selectedoptionclassification.identifier, configuration);
|
|
733
752
|
}
|
|
734
|
-
case
|
|
735
|
-
|
|
753
|
+
case 13:
|
|
754
|
+
case "end":
|
|
755
|
+
return _context8.stop();
|
|
736
756
|
}
|
|
737
757
|
}, _callee8, this);
|
|
738
758
|
}));
|
|
@@ -953,4 +973,5 @@ var ConfiguratorService = exports["default"] = /*#__PURE__*/function (_AbstractC
|
|
|
953
973
|
}
|
|
954
974
|
}
|
|
955
975
|
}]);
|
|
976
|
+
return ConfiguratorService;
|
|
956
977
|
}(_AbstractConfiguratorService["default"]);
|