@configuratorware/configurator-frontendgui 1.56.2 → 1.57.1
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
|
@@ -14,8 +14,15 @@ var _Selectors = require("../Reducers/Configurator/Selectors");
|
|
|
14
14
|
var _Constant = require("../Constant");
|
|
15
15
|
var _createMessageInterface = require("../Utils/createMessageInterface");
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
+
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 }; })(); }
|
|
18
|
+
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"); }
|
|
19
|
+
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; }; }
|
|
20
|
+
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(); }); }
|
|
21
|
+
function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
|
|
22
|
+
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); }
|
|
17
23
|
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 }; })(); }
|
|
18
24
|
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); }
|
|
25
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
19
26
|
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); }
|
|
20
27
|
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); }); }; }
|
|
21
28
|
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; }
|
|
@@ -26,20 +33,21 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
26
33
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
27
34
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
28
35
|
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); }
|
|
29
|
-
function
|
|
36
|
+
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); }
|
|
37
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
38
|
+
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); }; }
|
|
30
39
|
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); }
|
|
31
40
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
32
41
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
33
42
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
34
|
-
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); }
|
|
35
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
36
43
|
var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractInteractionS) {
|
|
44
|
+
_inherits(InteractionService, _AbstractInteractionS);
|
|
45
|
+
var _super = _createSuper(InteractionService);
|
|
37
46
|
function InteractionService() {
|
|
38
47
|
_classCallCheck(this, InteractionService);
|
|
39
|
-
return
|
|
48
|
+
return _super.call(this);
|
|
40
49
|
}
|
|
41
|
-
|
|
42
|
-
return _createClass(InteractionService, [{
|
|
50
|
+
_createClass(InteractionService, [{
|
|
43
51
|
key: "init",
|
|
44
52
|
value: function init() {
|
|
45
53
|
_ServiceLocator.Services.store.observeStore(function (state) {
|
|
@@ -63,41 +71,42 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
63
71
|
}, {
|
|
64
72
|
key: "saveConfiguration",
|
|
65
73
|
value: function () {
|
|
66
|
-
var _saveConfiguration = _asyncToGenerator(/*#__PURE__*/
|
|
67
|
-
var ui, configurator, code
|
|
68
|
-
return
|
|
69
|
-
while (1) switch (_context.
|
|
74
|
+
var _saveConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
75
|
+
var ui, configurator, code;
|
|
76
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
77
|
+
while (1) switch (_context.prev = _context.next) {
|
|
70
78
|
case 0:
|
|
71
79
|
ui = _ServiceLocator.Services.ui, configurator = _ServiceLocator.Services.configurator;
|
|
72
80
|
ui.dismissError();
|
|
73
81
|
ui.beginWork('saveConfiguration');
|
|
74
82
|
ui.hide('optionlist');
|
|
75
83
|
ui.show('saveConfiguration');
|
|
76
|
-
_context.
|
|
77
|
-
_context.
|
|
84
|
+
_context.prev = 5;
|
|
85
|
+
_context.next = 8;
|
|
78
86
|
return configurator.captureAndSaveConfiguration(_configuration.SaveTypes.USER);
|
|
79
|
-
case
|
|
87
|
+
case 8:
|
|
80
88
|
code = configurator.state.configuration.code;
|
|
81
89
|
this.postMessageToContainer({
|
|
82
90
|
method: _createMessageInterface.METHOD_CONFIGURATION_SAVED,
|
|
83
91
|
code: code
|
|
84
92
|
});
|
|
85
|
-
_context.
|
|
93
|
+
_context.next = 16;
|
|
86
94
|
break;
|
|
87
|
-
case
|
|
88
|
-
_context.
|
|
89
|
-
|
|
95
|
+
case 12:
|
|
96
|
+
_context.prev = 12;
|
|
97
|
+
_context.t0 = _context["catch"](5);
|
|
90
98
|
// eslint-disable-next-line no-console
|
|
91
|
-
console.error(
|
|
99
|
+
console.error(_context.t0);
|
|
92
100
|
ui.reportError((0, _i18n.t)('saveConfiguration.error.savingFailed'));
|
|
93
|
-
case
|
|
94
|
-
_context.
|
|
101
|
+
case 16:
|
|
102
|
+
_context.prev = 16;
|
|
95
103
|
ui.endWork('saveConfiguration');
|
|
96
|
-
return _context.
|
|
97
|
-
case
|
|
98
|
-
|
|
104
|
+
return _context.finish(16);
|
|
105
|
+
case 19:
|
|
106
|
+
case "end":
|
|
107
|
+
return _context.stop();
|
|
99
108
|
}
|
|
100
|
-
}, _callee, this, [[
|
|
109
|
+
}, _callee, this, [[5, 12, 16, 19]]);
|
|
101
110
|
}));
|
|
102
111
|
function saveConfiguration() {
|
|
103
112
|
return _saveConfiguration.apply(this, arguments);
|
|
@@ -107,36 +116,37 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
107
116
|
}, {
|
|
108
117
|
key: "shareConfiguration",
|
|
109
118
|
value: function () {
|
|
110
|
-
var _shareConfiguration = _asyncToGenerator(/*#__PURE__*/
|
|
111
|
-
var ui, configurator
|
|
112
|
-
return
|
|
113
|
-
while (1) switch (_context2.
|
|
119
|
+
var _shareConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
120
|
+
var ui, configurator;
|
|
121
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
122
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
114
123
|
case 0:
|
|
115
124
|
ui = _ServiceLocator.Services.ui, configurator = _ServiceLocator.Services.configurator;
|
|
116
125
|
ui.dismissError();
|
|
117
126
|
ui.beginWork('shareConfiguration');
|
|
118
127
|
ui.hide('optionlist');
|
|
119
128
|
ui.show('shareConfiguration');
|
|
120
|
-
_context2.
|
|
121
|
-
_context2.
|
|
129
|
+
_context2.prev = 5;
|
|
130
|
+
_context2.next = 8;
|
|
122
131
|
return configurator.captureAndSaveConfiguration(_configuration.SaveTypes.SHARE);
|
|
123
|
-
case
|
|
124
|
-
_context2.
|
|
132
|
+
case 8:
|
|
133
|
+
_context2.next = 14;
|
|
125
134
|
break;
|
|
126
|
-
case
|
|
127
|
-
_context2.
|
|
128
|
-
|
|
135
|
+
case 10:
|
|
136
|
+
_context2.prev = 10;
|
|
137
|
+
_context2.t0 = _context2["catch"](5);
|
|
129
138
|
// eslint-disable-next-line no-console
|
|
130
|
-
console.error(
|
|
139
|
+
console.error(_context2.t0);
|
|
131
140
|
ui.reportError((0, _i18n.t)('shareConfiguration.error.savingFailed'));
|
|
132
|
-
case
|
|
133
|
-
_context2.
|
|
141
|
+
case 14:
|
|
142
|
+
_context2.prev = 14;
|
|
134
143
|
ui.endWork('shareConfiguration');
|
|
135
|
-
return _context2.
|
|
136
|
-
case
|
|
137
|
-
|
|
144
|
+
return _context2.finish(14);
|
|
145
|
+
case 17:
|
|
146
|
+
case "end":
|
|
147
|
+
return _context2.stop();
|
|
138
148
|
}
|
|
139
|
-
}, _callee2, null, [[
|
|
149
|
+
}, _callee2, null, [[5, 10, 14, 17]]);
|
|
140
150
|
}));
|
|
141
151
|
function shareConfiguration() {
|
|
142
152
|
return _shareConfiguration.apply(this, arguments);
|
|
@@ -146,10 +156,10 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
146
156
|
}, {
|
|
147
157
|
key: "mailConfiguration",
|
|
148
158
|
value: function () {
|
|
149
|
-
var _mailConfiguration = _asyncToGenerator(/*#__PURE__*/
|
|
150
|
-
var ui, configurator
|
|
151
|
-
return
|
|
152
|
-
while (1) switch (_context3.
|
|
159
|
+
var _mailConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
160
|
+
var ui, configurator;
|
|
161
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
162
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
153
163
|
case 0:
|
|
154
164
|
ui = _ServiceLocator.Services.ui, configurator = _ServiceLocator.Services.configurator;
|
|
155
165
|
ui.dismissError();
|
|
@@ -157,27 +167,28 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
157
167
|
ui.hide('optionlist');
|
|
158
168
|
ui.show('mailConfiguration');
|
|
159
169
|
ui.show('globalLoader');
|
|
160
|
-
_context3.
|
|
161
|
-
_context3.
|
|
170
|
+
_context3.prev = 6;
|
|
171
|
+
_context3.next = 9;
|
|
162
172
|
return configurator.captureAndSaveConfiguration(_configuration.SaveTypes.MAIL);
|
|
163
|
-
case
|
|
164
|
-
_context3.
|
|
173
|
+
case 9:
|
|
174
|
+
_context3.next = 15;
|
|
165
175
|
break;
|
|
166
|
-
case
|
|
167
|
-
_context3.
|
|
168
|
-
|
|
176
|
+
case 11:
|
|
177
|
+
_context3.prev = 11;
|
|
178
|
+
_context3.t0 = _context3["catch"](6);
|
|
169
179
|
// eslint-disable-next-line no-console
|
|
170
|
-
console.error(
|
|
180
|
+
console.error(_context3.t0);
|
|
171
181
|
ui.reportError((0, _i18n.t)('mailConfiguration.error.savingFailed'));
|
|
172
|
-
case
|
|
173
|
-
_context3.
|
|
182
|
+
case 15:
|
|
183
|
+
_context3.prev = 15;
|
|
174
184
|
ui.hide('globalLoader');
|
|
175
185
|
ui.endWork('mailConfiguration');
|
|
176
|
-
return _context3.
|
|
177
|
-
case
|
|
178
|
-
|
|
186
|
+
return _context3.finish(15);
|
|
187
|
+
case 19:
|
|
188
|
+
case "end":
|
|
189
|
+
return _context3.stop();
|
|
179
190
|
}
|
|
180
|
-
}, _callee3, null, [[
|
|
191
|
+
}, _callee3, null, [[6, 11, 15, 19]]);
|
|
181
192
|
}));
|
|
182
193
|
function mailConfiguration() {
|
|
183
194
|
return _mailConfiguration.apply(this, arguments);
|
|
@@ -187,10 +198,10 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
187
198
|
}, {
|
|
188
199
|
key: "printConfiguration",
|
|
189
200
|
value: function () {
|
|
190
|
-
var _printConfiguration = _asyncToGenerator(/*#__PURE__*/
|
|
191
|
-
var ui, configurator
|
|
192
|
-
return
|
|
193
|
-
while (1) switch (_context4.
|
|
201
|
+
var _printConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
202
|
+
var ui, configurator;
|
|
203
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
204
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
194
205
|
case 0:
|
|
195
206
|
ui = _ServiceLocator.Services.ui, configurator = _ServiceLocator.Services.configurator;
|
|
196
207
|
ui.dismissError();
|
|
@@ -198,27 +209,28 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
198
209
|
ui.hide('optionlist');
|
|
199
210
|
ui.show('printConfiguration');
|
|
200
211
|
ui.show('globalLoader');
|
|
201
|
-
_context4.
|
|
202
|
-
_context4.
|
|
212
|
+
_context4.prev = 6;
|
|
213
|
+
_context4.next = 9;
|
|
203
214
|
return configurator.captureAndSaveConfiguration(_configuration.SaveTypes.PRINT);
|
|
204
|
-
case
|
|
205
|
-
_context4.
|
|
215
|
+
case 9:
|
|
216
|
+
_context4.next = 15;
|
|
206
217
|
break;
|
|
207
|
-
case
|
|
208
|
-
_context4.
|
|
209
|
-
|
|
218
|
+
case 11:
|
|
219
|
+
_context4.prev = 11;
|
|
220
|
+
_context4.t0 = _context4["catch"](6);
|
|
210
221
|
// eslint-disable-next-line no-console
|
|
211
|
-
console.error(
|
|
222
|
+
console.error(_context4.t0);
|
|
212
223
|
ui.reportError((0, _i18n.t)('printConfiguration.error.savingFailed'));
|
|
213
|
-
case
|
|
214
|
-
_context4.
|
|
224
|
+
case 15:
|
|
225
|
+
_context4.prev = 15;
|
|
215
226
|
ui.endWork('printConfiguration');
|
|
216
227
|
ui.hide('globalLoader');
|
|
217
|
-
return _context4.
|
|
218
|
-
case
|
|
219
|
-
|
|
228
|
+
return _context4.finish(15);
|
|
229
|
+
case 19:
|
|
230
|
+
case "end":
|
|
231
|
+
return _context4.stop();
|
|
220
232
|
}
|
|
221
|
-
}, _callee4, null, [[
|
|
233
|
+
}, _callee4, null, [[6, 11, 15, 19]]);
|
|
222
234
|
}));
|
|
223
235
|
function printConfiguration() {
|
|
224
236
|
return _printConfiguration.apply(this, arguments);
|
|
@@ -238,35 +250,36 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
238
250
|
}, {
|
|
239
251
|
key: "adminSaveConfiguration",
|
|
240
252
|
value: function () {
|
|
241
|
-
var _adminSaveConfiguration = _asyncToGenerator(/*#__PURE__*/
|
|
242
|
-
var ui, configurator, configuration
|
|
243
|
-
return
|
|
244
|
-
while (1) switch (_context5.
|
|
253
|
+
var _adminSaveConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(saveType) {
|
|
254
|
+
var ui, configurator, configuration;
|
|
255
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
256
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
245
257
|
case 0:
|
|
246
258
|
ui = _ServiceLocator.Services.ui, configurator = _ServiceLocator.Services.configurator;
|
|
247
259
|
ui.dismissError();
|
|
248
260
|
ui.beginWork('adminSaveConfiguration');
|
|
249
261
|
ui.hide('optionlist');
|
|
250
|
-
_context5.
|
|
262
|
+
_context5.prev = 4;
|
|
251
263
|
configuration = configurator.prepareConfigurationForSave(true);
|
|
252
|
-
_context5.
|
|
264
|
+
_context5.next = 8;
|
|
253
265
|
return configurator.createMediaDataForConfiguration(configuration);
|
|
254
|
-
case
|
|
255
|
-
return _context5.
|
|
256
|
-
case
|
|
257
|
-
_context5.
|
|
258
|
-
|
|
266
|
+
case 8:
|
|
267
|
+
return _context5.abrupt("return", _ServiceLocator.Services.adminArea.saveConfiguration(configuration, saveType));
|
|
268
|
+
case 11:
|
|
269
|
+
_context5.prev = 11;
|
|
270
|
+
_context5.t0 = _context5["catch"](4);
|
|
259
271
|
// eslint-disable-next-line no-console
|
|
260
|
-
console.error(
|
|
272
|
+
console.error(_context5.t0);
|
|
261
273
|
ui.reportError((0, _i18n.t)('saveConfiguration.error.savingFailed'));
|
|
262
|
-
case
|
|
263
|
-
_context5.
|
|
274
|
+
case 15:
|
|
275
|
+
_context5.prev = 15;
|
|
264
276
|
ui.endWork('adminSaveConfiguration');
|
|
265
|
-
return _context5.
|
|
266
|
-
case
|
|
267
|
-
|
|
277
|
+
return _context5.finish(15);
|
|
278
|
+
case 18:
|
|
279
|
+
case "end":
|
|
280
|
+
return _context5.stop();
|
|
268
281
|
}
|
|
269
|
-
}, _callee5, null, [[
|
|
282
|
+
}, _callee5, null, [[4, 11, 15, 18]]);
|
|
270
283
|
}));
|
|
271
284
|
function adminSaveConfiguration(_x) {
|
|
272
285
|
return _adminSaveConfiguration.apply(this, arguments);
|
|
@@ -276,35 +289,36 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
276
289
|
}, {
|
|
277
290
|
key: "adminGetConfiguration",
|
|
278
291
|
value: function () {
|
|
279
|
-
var _adminGetConfiguration = _asyncToGenerator(/*#__PURE__*/
|
|
280
|
-
var ui, configurator, work, configuration
|
|
281
|
-
return
|
|
282
|
-
while (1) switch (_context6.
|
|
292
|
+
var _adminGetConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
293
|
+
var ui, configurator, work, configuration;
|
|
294
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
295
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
283
296
|
case 0:
|
|
284
297
|
ui = _ServiceLocator.Services.ui, configurator = _ServiceLocator.Services.configurator;
|
|
285
298
|
work = ui.beginWork('adminGetConfiguration');
|
|
286
299
|
ui.dismissError();
|
|
287
300
|
ui.hide('optionlist');
|
|
288
|
-
_context6.
|
|
301
|
+
_context6.prev = 4;
|
|
289
302
|
configuration = configurator.prepareConfigurationForSave(true);
|
|
290
|
-
_context6.
|
|
303
|
+
_context6.next = 8;
|
|
291
304
|
return configurator.createMediaDataForConfiguration(configuration);
|
|
292
|
-
case
|
|
293
|
-
return _context6.
|
|
294
|
-
case
|
|
295
|
-
_context6.
|
|
296
|
-
|
|
305
|
+
case 8:
|
|
306
|
+
return _context6.abrupt("return", configuration);
|
|
307
|
+
case 11:
|
|
308
|
+
_context6.prev = 11;
|
|
309
|
+
_context6.t0 = _context6["catch"](4);
|
|
297
310
|
// eslint-disable-next-line no-console
|
|
298
|
-
console.error(
|
|
311
|
+
console.error(_context6.t0);
|
|
299
312
|
ui.reportError((0, _i18n.t)('saveConfiguration.error.savingFailed'));
|
|
300
|
-
case
|
|
301
|
-
_context6.
|
|
313
|
+
case 15:
|
|
314
|
+
_context6.prev = 15;
|
|
302
315
|
work.done();
|
|
303
|
-
return _context6.
|
|
304
|
-
case
|
|
305
|
-
|
|
316
|
+
return _context6.finish(15);
|
|
317
|
+
case 18:
|
|
318
|
+
case "end":
|
|
319
|
+
return _context6.stop();
|
|
306
320
|
}
|
|
307
|
-
}, _callee6, null, [[
|
|
321
|
+
}, _callee6, null, [[4, 11, 15, 18]]);
|
|
308
322
|
}));
|
|
309
323
|
function adminGetConfiguration() {
|
|
310
324
|
return _adminGetConfiguration.apply(this, arguments);
|
|
@@ -314,44 +328,45 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
314
328
|
}, {
|
|
315
329
|
key: "addToCart",
|
|
316
330
|
value: function () {
|
|
317
|
-
var _addToCart = _asyncToGenerator(/*#__PURE__*/
|
|
318
|
-
var ui, configurator, overwriteConfiguration, extraData, result
|
|
319
|
-
return
|
|
320
|
-
while (1) switch (_context7.
|
|
331
|
+
var _addToCart = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
332
|
+
var ui, configurator, overwriteConfiguration, extraData, result;
|
|
333
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
334
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
321
335
|
case 0:
|
|
322
336
|
ui = _ServiceLocator.Services.ui, configurator = _ServiceLocator.Services.configurator;
|
|
323
337
|
ui.dismissError();
|
|
324
338
|
ui.beginWork('addToCart');
|
|
325
339
|
ui.hide('optionlist');
|
|
326
340
|
ui.show('addToCartPopUpLoader');
|
|
327
|
-
_context7.
|
|
341
|
+
_context7.prev = 5;
|
|
328
342
|
overwriteConfiguration = (0, _configuration.getConf)('fromBasket', false);
|
|
329
343
|
extraData = overwriteConfiguration ? {
|
|
330
344
|
code: _ServiceLocator.Services.configurator.state.configuration.code
|
|
331
345
|
} : {};
|
|
332
|
-
_context7.
|
|
346
|
+
_context7.next = 10;
|
|
333
347
|
return configurator.captureAndSaveConfiguration(_configuration.SaveTypes.CART, extraData);
|
|
334
|
-
case
|
|
335
|
-
result = _context7.
|
|
348
|
+
case 10:
|
|
349
|
+
result = _context7.sent;
|
|
336
350
|
_ServiceLocator.Services.configurator.addToCartCallback(result.data);
|
|
337
|
-
_context7.
|
|
351
|
+
_context7.next = 19;
|
|
338
352
|
break;
|
|
339
|
-
case
|
|
340
|
-
_context7.
|
|
341
|
-
|
|
353
|
+
case 14:
|
|
354
|
+
_context7.prev = 14;
|
|
355
|
+
_context7.t0 = _context7["catch"](5);
|
|
342
356
|
// eslint-disable-next-line no-console
|
|
343
|
-
console.error(
|
|
357
|
+
console.error(_context7.t0);
|
|
344
358
|
ui.reportError((0, _i18n.t)('saveConfiguration.error.savingFailed'));
|
|
345
|
-
throw
|
|
346
|
-
case
|
|
347
|
-
_context7.
|
|
359
|
+
throw _context7.t0;
|
|
360
|
+
case 19:
|
|
361
|
+
_context7.prev = 19;
|
|
348
362
|
ui.endWork('addToCart');
|
|
349
363
|
ui.hide('addToCartPopUpLoader');
|
|
350
|
-
return _context7.
|
|
351
|
-
case
|
|
352
|
-
|
|
364
|
+
return _context7.finish(19);
|
|
365
|
+
case 23:
|
|
366
|
+
case "end":
|
|
367
|
+
return _context7.stop();
|
|
353
368
|
}
|
|
354
|
-
}, _callee7, null, [[
|
|
369
|
+
}, _callee7, null, [[5, 14, 19, 23]]);
|
|
355
370
|
}));
|
|
356
371
|
function addToCart() {
|
|
357
372
|
return _addToCart.apply(this, arguments);
|
|
@@ -361,35 +376,35 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
361
376
|
}, {
|
|
362
377
|
key: "sendReceiveOfferRequest",
|
|
363
378
|
value: function () {
|
|
364
|
-
var _sendReceiveOfferRequest = _asyncToGenerator(/*#__PURE__*/
|
|
365
|
-
var configuration, data
|
|
366
|
-
return
|
|
367
|
-
while (1) switch (_context8.
|
|
379
|
+
var _sendReceiveOfferRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(formData) {
|
|
380
|
+
var configuration, data;
|
|
381
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
382
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
368
383
|
case 0:
|
|
369
384
|
if (!formData.hasError) {
|
|
370
|
-
_context8.
|
|
385
|
+
_context8.next = 2;
|
|
371
386
|
break;
|
|
372
387
|
}
|
|
373
|
-
return _context8.
|
|
374
|
-
case
|
|
375
|
-
_context8.
|
|
388
|
+
return _context8.abrupt("return", false);
|
|
389
|
+
case 2:
|
|
390
|
+
_context8.prev = 2;
|
|
376
391
|
_ServiceLocator.Services.ui.show('addToCartPopUpLoader');
|
|
377
|
-
_context8.
|
|
392
|
+
_context8.next = 6;
|
|
378
393
|
return _ServiceLocator.Services.configurator.captureAndSaveConfiguration(_configuration.SaveTypes.OFFERREQUEST);
|
|
379
|
-
case
|
|
394
|
+
case 6:
|
|
380
395
|
_ServiceLocator.Services.analytics.triggerEvent(_Constant.EventTypes.selected_amounts);
|
|
381
|
-
_context8.
|
|
396
|
+
_context8.next = 13;
|
|
382
397
|
break;
|
|
383
|
-
case
|
|
384
|
-
_context8.
|
|
385
|
-
|
|
398
|
+
case 9:
|
|
399
|
+
_context8.prev = 9;
|
|
400
|
+
_context8.t0 = _context8["catch"](2);
|
|
386
401
|
_ServiceLocator.Services.ui.reportError((0, _i18n.t)('receiveOfferForm.sentError'));
|
|
387
|
-
return _context8.
|
|
388
|
-
case
|
|
389
|
-
_context8.
|
|
402
|
+
return _context8.abrupt("return", false);
|
|
403
|
+
case 13:
|
|
404
|
+
_context8.prev = 13;
|
|
390
405
|
_ServiceLocator.Services.ui.hide('addToCartPopUpLoader');
|
|
391
|
-
return _context8.
|
|
392
|
-
case
|
|
406
|
+
return _context8.finish(13);
|
|
407
|
+
case 16:
|
|
393
408
|
configuration = _ServiceLocator.Services.configurator.state.configuration;
|
|
394
409
|
data = {
|
|
395
410
|
configurationCode: configuration.code,
|
|
@@ -402,30 +417,33 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
402
417
|
city: formData.city,
|
|
403
418
|
country: formData.country
|
|
404
419
|
};
|
|
405
|
-
_context8.
|
|
406
|
-
_context8.
|
|
420
|
+
_context8.prev = 18;
|
|
421
|
+
_context8.next = 21;
|
|
407
422
|
return _Api["default"].request({
|
|
408
423
|
url: 'receiveoffers/request',
|
|
409
424
|
method: 'post',
|
|
410
425
|
data: data
|
|
411
426
|
});
|
|
412
|
-
case
|
|
427
|
+
case 21:
|
|
413
428
|
this.postMessageToContainer({
|
|
414
429
|
method: _createMessageInterface.METHOD_REQUEST_OFFER_FORM_SENT,
|
|
415
430
|
code: configuration.code
|
|
416
431
|
});
|
|
417
|
-
_context8.
|
|
432
|
+
_context8.next = 28;
|
|
418
433
|
break;
|
|
419
|
-
case
|
|
420
|
-
_context8.
|
|
421
|
-
|
|
434
|
+
case 24:
|
|
435
|
+
_context8.prev = 24;
|
|
436
|
+
_context8.t1 = _context8["catch"](18);
|
|
422
437
|
_ServiceLocator.Services.ui.reportError((0, _i18n.t)('receiveOfferForm.sentError'));
|
|
423
|
-
return _context8.
|
|
424
|
-
case
|
|
438
|
+
return _context8.abrupt("return", false);
|
|
439
|
+
case 28:
|
|
425
440
|
_ServiceLocator.Services.ui.reportError((0, _i18n.t)('receiveOfferForm.sentOk'));
|
|
426
|
-
return _context8.
|
|
441
|
+
return _context8.abrupt("return", true);
|
|
442
|
+
case 30:
|
|
443
|
+
case "end":
|
|
444
|
+
return _context8.stop();
|
|
427
445
|
}
|
|
428
|
-
}, _callee8, this, [[
|
|
446
|
+
}, _callee8, this, [[2, 9, 13, 16], [18, 24]]);
|
|
429
447
|
}));
|
|
430
448
|
function sendReceiveOfferRequest(_x2) {
|
|
431
449
|
return _sendReceiveOfferRequest.apply(this, arguments);
|
|
@@ -455,34 +473,35 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
455
473
|
}, {
|
|
456
474
|
key: "saveWidgetConfiguration",
|
|
457
475
|
value: function () {
|
|
458
|
-
var _saveWidgetConfiguration = _asyncToGenerator(/*#__PURE__*/
|
|
459
|
-
var ui, configurator
|
|
460
|
-
return
|
|
461
|
-
while (1) switch (_context9.
|
|
476
|
+
var _saveWidgetConfiguration = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
477
|
+
var ui, configurator;
|
|
478
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
479
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
462
480
|
case 0:
|
|
463
481
|
ui = _ServiceLocator.Services.ui, configurator = _ServiceLocator.Services.configurator;
|
|
464
482
|
ui.dismissError();
|
|
465
483
|
ui.beginWork('saveConfiguration');
|
|
466
|
-
_context9.
|
|
467
|
-
_context9.
|
|
484
|
+
_context9.prev = 3;
|
|
485
|
+
_context9.next = 6;
|
|
468
486
|
return configurator.prepareAndSaveConfiguration(_configuration.SaveTypes.WIDGET);
|
|
469
|
-
case
|
|
470
|
-
_context9.
|
|
487
|
+
case 6:
|
|
488
|
+
_context9.next = 12;
|
|
471
489
|
break;
|
|
472
|
-
case
|
|
473
|
-
_context9.
|
|
474
|
-
|
|
490
|
+
case 8:
|
|
491
|
+
_context9.prev = 8;
|
|
492
|
+
_context9.t0 = _context9["catch"](3);
|
|
475
493
|
// eslint-disable-next-line no-console
|
|
476
|
-
console.error(
|
|
494
|
+
console.error(_context9.t0);
|
|
477
495
|
ui.reportError((0, _i18n.t)('saveConfiguration.error.savingFailed'));
|
|
478
|
-
case
|
|
479
|
-
_context9.
|
|
496
|
+
case 12:
|
|
497
|
+
_context9.prev = 12;
|
|
480
498
|
ui.endWork('saveConfiguration');
|
|
481
|
-
return _context9.
|
|
482
|
-
case
|
|
483
|
-
|
|
499
|
+
return _context9.finish(12);
|
|
500
|
+
case 15:
|
|
501
|
+
case "end":
|
|
502
|
+
return _context9.stop();
|
|
484
503
|
}
|
|
485
|
-
}, _callee9, null, [[
|
|
504
|
+
}, _callee9, null, [[3, 8, 12, 15]]);
|
|
486
505
|
}));
|
|
487
506
|
function saveWidgetConfiguration() {
|
|
488
507
|
return _saveWidgetConfiguration.apply(this, arguments);
|
|
@@ -521,7 +540,7 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
521
540
|
}, {
|
|
522
541
|
key: "createPdfUrl",
|
|
523
542
|
value: function () {
|
|
524
|
-
var _createPdfUrl = _asyncToGenerator(/*#__PURE__*/
|
|
543
|
+
var _createPdfUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee0() {
|
|
525
544
|
var documentType,
|
|
526
545
|
configuration,
|
|
527
546
|
queryParams,
|
|
@@ -532,8 +551,8 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
532
551
|
query,
|
|
533
552
|
queryString,
|
|
534
553
|
_args0 = arguments;
|
|
535
|
-
return
|
|
536
|
-
while (1) switch (_context0.
|
|
554
|
+
return _regeneratorRuntime().wrap(function _callee0$(_context0) {
|
|
555
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
537
556
|
case 0:
|
|
538
557
|
documentType = _args0.length > 0 && _args0[0] !== undefined ? _args0[0] : 'user';
|
|
539
558
|
configuration = _args0.length > 1 && _args0[1] !== undefined ? _args0[1] : (0, _Selectors.getConfiguration)(_ServiceLocator.Services.configurator.state);
|
|
@@ -554,7 +573,10 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
554
573
|
if (query.has('_cta_element')) {
|
|
555
574
|
queryString = queryString.concat('&_cta_element=' + query.get('_cta_element'));
|
|
556
575
|
}
|
|
557
|
-
return _context0.
|
|
576
|
+
return _context0.abrupt("return", "".concat((0, _configuration.getConf)('network.baseURL', '/'), "configurations/pdf/").concat(documentType, "/").concat(configuration.code, "?").concat(queryString));
|
|
577
|
+
case 12:
|
|
578
|
+
case "end":
|
|
579
|
+
return _context0.stop();
|
|
558
580
|
}
|
|
559
581
|
}, _callee0);
|
|
560
582
|
}));
|
|
@@ -566,16 +588,17 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
566
588
|
}, {
|
|
567
589
|
key: "printConfigurationAndOpenPdf",
|
|
568
590
|
value: function () {
|
|
569
|
-
var _printConfigurationAndOpenPdf = _asyncToGenerator(/*#__PURE__*/
|
|
570
|
-
return
|
|
571
|
-
while (1) switch (_context1.
|
|
591
|
+
var _printConfigurationAndOpenPdf = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee1() {
|
|
592
|
+
return _regeneratorRuntime().wrap(function _callee1$(_context1) {
|
|
593
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
572
594
|
case 0:
|
|
573
|
-
_context1.
|
|
595
|
+
_context1.next = 2;
|
|
574
596
|
return this.printConfiguration();
|
|
575
|
-
case 1:
|
|
576
|
-
_ServiceLocator.Services.interaction.showPdfDownloadDialog();
|
|
577
597
|
case 2:
|
|
578
|
-
|
|
598
|
+
_ServiceLocator.Services.interaction.showPdfDownloadDialog();
|
|
599
|
+
case 3:
|
|
600
|
+
case "end":
|
|
601
|
+
return _context1.stop();
|
|
579
602
|
}
|
|
580
603
|
}, _callee1, this);
|
|
581
604
|
}));
|
|
@@ -587,21 +610,22 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
587
610
|
}, {
|
|
588
611
|
key: "saveWidgetConfigurationAndOpenPdf",
|
|
589
612
|
value: function () {
|
|
590
|
-
var _saveWidgetConfigurationAndOpenPdf = _asyncToGenerator(/*#__PURE__*/
|
|
613
|
+
var _saveWidgetConfigurationAndOpenPdf = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
591
614
|
var pdfUrl;
|
|
592
|
-
return
|
|
593
|
-
while (1) switch (_context10.
|
|
615
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
616
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
594
617
|
case 0:
|
|
595
|
-
_context10.
|
|
618
|
+
_context10.next = 2;
|
|
596
619
|
return this.saveWidgetConfiguration();
|
|
597
|
-
case 1:
|
|
598
|
-
_context10.n = 2;
|
|
599
|
-
return this.createPdfUrl('widget');
|
|
600
620
|
case 2:
|
|
601
|
-
|
|
621
|
+
_context10.next = 4;
|
|
622
|
+
return this.createPdfUrl('widget');
|
|
623
|
+
case 4:
|
|
624
|
+
pdfUrl = _context10.sent;
|
|
602
625
|
window.open(pdfUrl);
|
|
603
|
-
case
|
|
604
|
-
|
|
626
|
+
case 6:
|
|
627
|
+
case "end":
|
|
628
|
+
return _context10.stop();
|
|
605
629
|
}
|
|
606
630
|
}, _callee10, this);
|
|
607
631
|
}));
|
|
@@ -613,16 +637,17 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
613
637
|
}, {
|
|
614
638
|
key: "saveWidgetConfigurationAndOpenConfigurator",
|
|
615
639
|
value: function () {
|
|
616
|
-
var _saveWidgetConfigurationAndOpenConfigurator = _asyncToGenerator(/*#__PURE__*/
|
|
617
|
-
return
|
|
618
|
-
while (1) switch (_context11.
|
|
640
|
+
var _saveWidgetConfigurationAndOpenConfigurator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
641
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
642
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
619
643
|
case 0:
|
|
620
|
-
_context11.
|
|
644
|
+
_context11.next = 2;
|
|
621
645
|
return this.saveWidgetConfiguration();
|
|
622
|
-
case 1:
|
|
623
|
-
this.openConfigurator();
|
|
624
646
|
case 2:
|
|
625
|
-
|
|
647
|
+
this.openConfigurator();
|
|
648
|
+
case 3:
|
|
649
|
+
case "end":
|
|
650
|
+
return _context11.stop();
|
|
626
651
|
}
|
|
627
652
|
}, _callee11, this);
|
|
628
653
|
}));
|
|
@@ -647,4 +672,5 @@ var InteractionService = exports["default"] = /*#__PURE__*/function (_AbstractIn
|
|
|
647
672
|
_ServiceLocator.Services.ui.show('pdfDownload');
|
|
648
673
|
}
|
|
649
674
|
}]);
|
|
675
|
+
return InteractionService;
|
|
650
676
|
}(_AbstractInteractionService["default"]);
|