@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
|
@@ -11,26 +11,27 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
11
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
12
|
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); }
|
|
13
13
|
var styles = function styles(theme) {
|
|
14
|
+
var _theme$orientation$po, _root;
|
|
14
15
|
return {
|
|
15
|
-
root:
|
|
16
|
+
root: (_root = {
|
|
16
17
|
marginTop: 46
|
|
17
|
-
}, theme.breakpoints.down('xs'), {
|
|
18
|
+
}, _defineProperty(_root, theme.breakpoints.down('xs'), {
|
|
18
19
|
maxHeight: 'calc(100% - 216px)'
|
|
19
|
-
}), theme.breakpoints.up('sm'), _defineProperty({}, theme.orientation.landscape, {
|
|
20
|
+
}), _defineProperty(_root, theme.breakpoints.up('sm'), _defineProperty({}, theme.orientation.landscape, {
|
|
20
21
|
marginTop: 0,
|
|
21
22
|
maxHeight: 'calc(100% - 172px)'
|
|
22
|
-
})), theme.orientation.landscape, {
|
|
23
|
+
})), _defineProperty(_root, theme.orientation.landscape, {
|
|
23
24
|
maxHeight: 'calc(100% - 136px)'
|
|
24
|
-
}), theme.orientation.portrait,
|
|
25
|
+
}), _defineProperty(_root, theme.orientation.portrait, (_theme$orientation$po = {
|
|
25
26
|
maxHeight: 'calc(100% - 216px)'
|
|
26
|
-
}, theme.breakpoints.up('sm'), {
|
|
27
|
+
}, _defineProperty(_theme$orientation$po, theme.breakpoints.up('sm'), {
|
|
27
28
|
maxHeight: 'calc(100% - 216px)'
|
|
28
|
-
}), theme.breakpoints.up('md'), {
|
|
29
|
+
}), _defineProperty(_theme$orientation$po, theme.breakpoints.up('md'), {
|
|
29
30
|
maxHeight: 'calc(100% - 172px)',
|
|
30
31
|
marginTop: 0
|
|
31
|
-
})), '@media (min-aspect-ratio: 13/9) and (min-height: 280px) and (max-width: 950px)', {
|
|
32
|
+
}), _theme$orientation$po)), _defineProperty(_root, '@media (min-aspect-ratio: 13/9) and (min-height: 280px) and (max-width: 950px)', {
|
|
32
33
|
maxHeight: '100%'
|
|
33
|
-
})
|
|
34
|
+
}), _root)
|
|
34
35
|
};
|
|
35
36
|
};
|
|
36
37
|
var DesignerAlignTarget = exports.DesignerAlignTarget = (0, _styles.withStyles)(styles, {
|
package/App/Reducers/Actions.js
CHANGED
|
@@ -9,8 +9,15 @@ var _isObject = _interopRequireDefault(require("lodash/isObject"));
|
|
|
9
9
|
var _AsyncManager = require("../../Utils/Async/AsyncManager");
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
11
|
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); }
|
|
12
|
+
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 }; })(); }
|
|
13
|
+
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"); }
|
|
14
|
+
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; }; }
|
|
15
|
+
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(); }); }
|
|
16
|
+
function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
|
|
17
|
+
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); }
|
|
12
18
|
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 }; })(); }
|
|
13
19
|
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); }
|
|
20
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
14
21
|
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); }
|
|
15
22
|
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); }); }; }
|
|
16
23
|
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); }
|
|
@@ -135,64 +142,65 @@ var asyncRequest = exports.asyncRequest = function asyncRequest(source, receiver
|
|
|
135
142
|
var extraData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
136
143
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
137
144
|
return /*#__PURE__*/function () {
|
|
138
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
139
|
-
var _options$requestManag, requestManager, _options$useLocalErro, useLocalErrorHandling, request, response
|
|
140
|
-
return
|
|
141
|
-
while (1) switch (_context.
|
|
145
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch) {
|
|
146
|
+
var _options$requestManag, requestManager, _options$useLocalErro, useLocalErrorHandling, request, response;
|
|
147
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
148
|
+
while (1) switch (_context.prev = _context.next) {
|
|
142
149
|
case 0:
|
|
143
150
|
_options$requestManag = options.requestManager, requestManager = _options$requestManag === void 0 ? defaultRequestManager : _options$requestManag, _options$useLocalErro = options.useLocalErrorHandling, useLocalErrorHandling = _options$useLocalErro === void 0 ? false : _options$useLocalErro;
|
|
144
151
|
request = requestManager.create(source);
|
|
145
|
-
_context.
|
|
146
|
-
_context.
|
|
152
|
+
_context.prev = 2;
|
|
153
|
+
_context.next = 5;
|
|
147
154
|
return request.call();
|
|
148
|
-
case
|
|
149
|
-
response = _context.
|
|
155
|
+
case 5:
|
|
156
|
+
response = _context.sent;
|
|
150
157
|
dispatch(receiveData(source, response.data));
|
|
151
|
-
return _context.
|
|
152
|
-
case
|
|
153
|
-
_context.
|
|
154
|
-
|
|
158
|
+
return _context.abrupt("return", receiver ? dispatch(receiver(response.data, extraData, response)) : response);
|
|
159
|
+
case 10:
|
|
160
|
+
_context.prev = 10;
|
|
161
|
+
_context.t0 = _context["catch"](2);
|
|
155
162
|
if (!request.isOutdated()) {
|
|
156
|
-
_context.
|
|
163
|
+
_context.next = 14;
|
|
157
164
|
break;
|
|
158
165
|
}
|
|
159
|
-
return _context.
|
|
160
|
-
case
|
|
166
|
+
return _context.abrupt("return");
|
|
167
|
+
case 14:
|
|
161
168
|
if (!useLocalErrorHandling) {
|
|
162
|
-
_context.
|
|
169
|
+
_context.next = 16;
|
|
163
170
|
break;
|
|
164
171
|
}
|
|
165
|
-
throw
|
|
166
|
-
case
|
|
167
|
-
if (!(0, _isObject["default"])(
|
|
168
|
-
_context.
|
|
172
|
+
throw _context.t0;
|
|
173
|
+
case 16:
|
|
174
|
+
if (!(0, _isObject["default"])(_context.t0.response)) {
|
|
175
|
+
_context.next = 22;
|
|
169
176
|
break;
|
|
170
177
|
}
|
|
171
|
-
if (
|
|
172
|
-
dispatch(requestError(source,
|
|
178
|
+
if (_context.t0.response.status === 404) {
|
|
179
|
+
dispatch(requestError(source, _context.t0));
|
|
173
180
|
}
|
|
174
|
-
if (!(0, _isObject["default"])(
|
|
175
|
-
_context.
|
|
181
|
+
if (!(0, _isObject["default"])(_context.t0.response.data)) {
|
|
182
|
+
_context.next = 21;
|
|
176
183
|
break;
|
|
177
184
|
}
|
|
178
185
|
// request error (generated by the server)
|
|
179
|
-
dispatch(receiveData(source,
|
|
180
|
-
return _context.
|
|
181
|
-
case
|
|
182
|
-
if (
|
|
183
|
-
dispatch(requestError(source,
|
|
186
|
+
dispatch(receiveData(source, _context.t0));
|
|
187
|
+
return _context.abrupt("return", receiver ? dispatch(receiver(_context.t0.response.data, extraData, _context.t0.response)) : _context.t0.response);
|
|
188
|
+
case 21:
|
|
189
|
+
if (_context.t0.response.status >= 400 && _context.t0.response.status < 500) {
|
|
190
|
+
dispatch(requestError(source, _context.t0));
|
|
184
191
|
}
|
|
185
|
-
case
|
|
186
|
-
if ((0, _Api.isCancelError)(
|
|
192
|
+
case 22:
|
|
193
|
+
if ((0, _Api.isCancelError)(_context.t0)) {
|
|
187
194
|
dispatch(cancelRequest(source));
|
|
188
195
|
} else {
|
|
189
|
-
dispatch(networkError(source,
|
|
196
|
+
dispatch(networkError(source, _context.t0));
|
|
190
197
|
}
|
|
191
|
-
throw
|
|
192
|
-
case
|
|
193
|
-
|
|
198
|
+
throw _context.t0;
|
|
199
|
+
case 24:
|
|
200
|
+
case "end":
|
|
201
|
+
return _context.stop();
|
|
194
202
|
}
|
|
195
|
-
}, _callee, null, [[
|
|
203
|
+
}, _callee, null, [[2, 10]]);
|
|
196
204
|
}));
|
|
197
205
|
return function (_x) {
|
|
198
206
|
return _ref.apply(this, arguments);
|
|
@@ -32,19 +32,25 @@ var _Transformers = require("../DesignArea/Transformers");
|
|
|
32
32
|
var _Reducer = require("../DesignData/Reducer");
|
|
33
33
|
var _Actions7 = require("../ConfigurationMode/Actions");
|
|
34
34
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
35
|
-
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
|
|
35
|
+
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); }
|
|
36
36
|
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; }
|
|
37
37
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
38
38
|
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; }
|
|
39
39
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
40
40
|
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); }
|
|
41
41
|
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); }
|
|
42
|
-
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; }; }
|
|
43
42
|
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; } } }; }
|
|
44
43
|
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; } }
|
|
45
44
|
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; }
|
|
45
|
+
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) { function t(_x9, _x0, _x1) { return _t.apply(this, arguments); } t.toString = function () { return _t.toString(); }; return t; }(function (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 }; })(); }
|
|
46
|
+
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"); }
|
|
47
|
+
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; }; }
|
|
48
|
+
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(); }); }
|
|
49
|
+
function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
|
|
50
|
+
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); }
|
|
46
51
|
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 }; })(); }
|
|
47
52
|
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); }
|
|
53
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
48
54
|
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); }
|
|
49
55
|
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); }); }; }
|
|
50
56
|
var RECEIVE_CONFIGURATION = exports.RECEIVE_CONFIGURATION = 'RECEIVE_CONFIGURATION';
|
|
@@ -85,10 +91,10 @@ var DELETE_SELECTED_AMOUNTS = exports.DELETE_SELECTED_AMOUNTS = 'DELETE_SELECTED
|
|
|
85
91
|
var receiveConfiguration = exports.receiveConfiguration = function receiveConfiguration(json, _ref) {
|
|
86
92
|
var checkValidation = _ref.checkValidation;
|
|
87
93
|
return /*#__PURE__*/function () {
|
|
88
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/
|
|
94
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch, getState) {
|
|
89
95
|
var prevState, action, _getState, configurator, configuration, selectedoptionclassification, loadIdentifier, _getAvailableConfigur, designerEnabled, initialDesignData;
|
|
90
|
-
return
|
|
91
|
-
while (1) switch (_context.
|
|
96
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
97
|
+
while (1) switch (_context.prev = _context.next) {
|
|
92
98
|
case 0:
|
|
93
99
|
prevState = getState();
|
|
94
100
|
dispatch(setCalculationEnabled(false));
|
|
@@ -123,24 +129,27 @@ var receiveConfiguration = exports.receiveConfiguration = function receiveConfig
|
|
|
123
129
|
applyVariantAmountPreSelection(configurator);
|
|
124
130
|
setDefaultSelectedVariantIdentifier((0, _Selectors.getConfigurator)(getState()), loadIdentifier);
|
|
125
131
|
if (!designerEnabled) {
|
|
126
|
-
_context.
|
|
132
|
+
_context.next = 24;
|
|
127
133
|
break;
|
|
128
134
|
}
|
|
129
|
-
_context.
|
|
135
|
+
_context.next = 19;
|
|
130
136
|
return dispatch((0, _Actions3.fetchFonts)());
|
|
131
|
-
case
|
|
137
|
+
case 19:
|
|
132
138
|
dispatch((0, _Actions5.addCustomFonts)((0, _Selectors3.getUsedCustomFontsInEditor)(getState())));
|
|
133
|
-
_context.
|
|
139
|
+
_context.next = 22;
|
|
134
140
|
return dispatch(loadDesignerData((0, _Selectors.getConfiguration)((0, _Selectors.getConfigurator)(getState()))));
|
|
135
|
-
case
|
|
141
|
+
case 22:
|
|
136
142
|
initialDesignData = (0, _Transformers.createInitialDesignDataFromDesignAreas)((0, _get["default"])(getState(), 'designArea.filteredDesignAreas') || [], (0, _Reducer.getDesignData)((0, _Selectors.getConfigurator)(getState())));
|
|
137
143
|
dispatch((0, _Actions6.setInitialDesignData)(initialDesignData));
|
|
138
|
-
case
|
|
144
|
+
case 24:
|
|
139
145
|
// enable calculation and trigger it
|
|
140
146
|
dispatch(setCalculationEnabled(true));
|
|
141
147
|
dispatch(invalidateCalculation());
|
|
142
148
|
dispatch(doCalculation((0, _Selectors.getConfiguration)((0, _Selectors.getConfigurator)(getState()))));
|
|
143
|
-
return _context.
|
|
149
|
+
return _context.abrupt("return", action);
|
|
150
|
+
case 28:
|
|
151
|
+
case "end":
|
|
152
|
+
return _context.stop();
|
|
144
153
|
}
|
|
145
154
|
}, _callee);
|
|
146
155
|
}));
|
|
@@ -151,10 +160,10 @@ var receiveConfiguration = exports.receiveConfiguration = function receiveConfig
|
|
|
151
160
|
};
|
|
152
161
|
var deleteMissingVariants = exports.deleteMissingVariants = function deleteMissingVariants(configurator) {
|
|
153
162
|
return /*#__PURE__*/function () {
|
|
154
|
-
var _ref3 = _asyncToGenerator(/*#__PURE__*/
|
|
155
|
-
var children, selectedAmounts, item, result, itemGroupChildren, _iterator, _step, itemGroup, flattenendSubChildren, selectedVariant
|
|
156
|
-
return
|
|
157
|
-
while (1) switch (_context2.
|
|
163
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(dispatch) {
|
|
164
|
+
var children, selectedAmounts, item, result, itemGroupChildren, _iterator, _step, itemGroup, flattenendSubChildren, selectedVariant;
|
|
165
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
166
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
158
167
|
case 0:
|
|
159
168
|
children = (0, _Selectors.getChildren)(configurator).map(function (variant) {
|
|
160
169
|
return variant.identifier;
|
|
@@ -179,29 +188,30 @@ var deleteMissingVariants = exports.deleteMissingVariants = function deleteMissi
|
|
|
179
188
|
result.push(item.identifier);
|
|
180
189
|
}
|
|
181
190
|
flattenendSubChildren = (0, _flatten["default"])(result);
|
|
182
|
-
|
|
183
|
-
case
|
|
184
|
-
if ((
|
|
185
|
-
_context2.
|
|
191
|
+
_context2.t0 = _regeneratorRuntime().keys(selectedAmounts);
|
|
192
|
+
case 8:
|
|
193
|
+
if ((_context2.t1 = _context2.t0()).done) {
|
|
194
|
+
_context2.next = 15;
|
|
186
195
|
break;
|
|
187
196
|
}
|
|
188
|
-
selectedVariant =
|
|
197
|
+
selectedVariant = _context2.t1.value;
|
|
189
198
|
if (selectedAmounts.hasOwnProperty(selectedVariant)) {
|
|
190
|
-
_context2.
|
|
199
|
+
_context2.next = 12;
|
|
191
200
|
break;
|
|
192
201
|
}
|
|
193
|
-
return _context2.
|
|
194
|
-
case
|
|
202
|
+
return _context2.abrupt("continue", 8);
|
|
203
|
+
case 12:
|
|
195
204
|
if (children.length !== 0 && children.indexOf(selectedVariant) === -1 && flattenendSubChildren.indexOf(selectedVariant) === -1) {
|
|
196
205
|
dispatch(deleteSelectedAmount(selectedVariant));
|
|
197
206
|
dispatch((0, _Actions2.reportError)((0, _i18n.t)('missingVariantError', {
|
|
198
207
|
selectedVariant: selectedVariant
|
|
199
208
|
})));
|
|
200
209
|
}
|
|
201
|
-
_context2.
|
|
210
|
+
_context2.next = 8;
|
|
202
211
|
break;
|
|
203
|
-
case
|
|
204
|
-
|
|
212
|
+
case 15:
|
|
213
|
+
case "end":
|
|
214
|
+
return _context2.stop();
|
|
205
215
|
}
|
|
206
216
|
}, _callee2);
|
|
207
217
|
}));
|
|
@@ -403,14 +413,14 @@ var receiveCodesnippets = exports.receiveCodesnippets = function receiveCodesnip
|
|
|
403
413
|
};
|
|
404
414
|
var fetchConfigurationForDesignerProductPreview = exports.fetchConfigurationForDesignerProductPreview = function fetchConfigurationForDesignerProductPreview() {
|
|
405
415
|
return /*#__PURE__*/function () {
|
|
406
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/
|
|
416
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(dispatch, getState) {
|
|
407
417
|
var itemIdentifier, _getAvailableConfigur2, designerEnabled, initialDesignData;
|
|
408
|
-
return
|
|
409
|
-
while (1) switch (_context3.
|
|
418
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
419
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
410
420
|
case 0:
|
|
411
421
|
itemIdentifier = getState().configurator.loadIdentifier;
|
|
412
422
|
dispatch(setCalculationEnabled(false));
|
|
413
|
-
_context3.
|
|
423
|
+
_context3.next = 4;
|
|
414
424
|
return dispatch(apiActions.fetchData('configuration/loadbyitemidentifier/' + itemIdentifier, function (json) {
|
|
415
425
|
return {
|
|
416
426
|
type: RECEIVE_CONFIGURATION,
|
|
@@ -418,21 +428,22 @@ var fetchConfigurationForDesignerProductPreview = exports.fetchConfigurationForD
|
|
|
418
428
|
receivedAt: Date.now()
|
|
419
429
|
};
|
|
420
430
|
}));
|
|
421
|
-
case
|
|
431
|
+
case 4:
|
|
422
432
|
setDefaultSelectedVariantIdentifier((0, _Selectors.getConfigurator)(getState()), itemIdentifier);
|
|
423
433
|
_getAvailableConfigur2 = (0, _Selectors2.getAvailableConfigurationModes)(getState()), designerEnabled = _getAvailableConfigur2.designer;
|
|
424
434
|
if (!designerEnabled) {
|
|
425
|
-
_context3.
|
|
435
|
+
_context3.next = 12;
|
|
426
436
|
break;
|
|
427
437
|
}
|
|
428
438
|
dispatch((0, _Actions7.selectConfigurationMode)('designer'));
|
|
429
|
-
_context3.
|
|
439
|
+
_context3.next = 10;
|
|
430
440
|
return dispatch(loadDesignerData((0, _Selectors.getConfiguration)((0, _Selectors.getConfigurator)(getState()))));
|
|
431
|
-
case
|
|
441
|
+
case 10:
|
|
432
442
|
initialDesignData = (0, _Transformers.createInitialDesignDataFromDesignAreas)((0, _get["default"])(getState(), 'designArea.filteredDesignAreas') || [], (0, _Reducer.getDesignData)((0, _Selectors.getConfigurator)(getState())));
|
|
433
443
|
dispatch((0, _Actions6.setInitialDesignData)(initialDesignData));
|
|
434
|
-
case
|
|
435
|
-
|
|
444
|
+
case 12:
|
|
445
|
+
case "end":
|
|
446
|
+
return _context3.stop();
|
|
436
447
|
}
|
|
437
448
|
}, _callee3);
|
|
438
449
|
}));
|
|
@@ -534,6 +545,7 @@ var fetchOptions = exports.fetchOptions = function fetchOptions(itemidentifier,
|
|
|
534
545
|
} // extraData
|
|
535
546
|
);
|
|
536
547
|
};
|
|
548
|
+
|
|
537
549
|
var switchOptionsBasic = exports.switchOptionsBasic = function switchOptionsBasic(configuration, switchedOptions) {
|
|
538
550
|
var noCheck = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
539
551
|
var config = {};
|
|
@@ -802,6 +814,7 @@ var selectOption = exports.selectOption = function selectOption(option) {
|
|
|
802
814
|
amount: isNaN(parseInt(option.amount)) ? 0 : option.amount,
|
|
803
815
|
check_results: null // it can mess the response, so should remove it.
|
|
804
816
|
}));
|
|
817
|
+
|
|
805
818
|
dispatch((0, _Actions2.setVisible)('optionDetails', showOptionDetails));
|
|
806
819
|
return dispatch(switchOptions(configuration, switchOptionData, false, refreshOptionlist, true));
|
|
807
820
|
};
|
|
@@ -889,40 +902,41 @@ var viewOptionDetails = exports.viewOptionDetails = function viewOptionDetails(o
|
|
|
889
902
|
};
|
|
890
903
|
var loadConfiguration = exports.loadConfiguration = function loadConfiguration() {
|
|
891
904
|
return /*#__PURE__*/function () {
|
|
892
|
-
var _ref6 = _asyncToGenerator(/*#__PURE__*/
|
|
893
|
-
var loadCode, action
|
|
894
|
-
return
|
|
895
|
-
while (1) switch (_context4.
|
|
905
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(dispatch, getState) {
|
|
906
|
+
var loadCode, action;
|
|
907
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
908
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
896
909
|
case 0:
|
|
897
910
|
loadCode = getState().configurator.loadCode;
|
|
898
911
|
if (loadCode) {
|
|
899
|
-
_context4.
|
|
912
|
+
_context4.next = 3;
|
|
900
913
|
break;
|
|
901
914
|
}
|
|
902
915
|
throw new Error((0, _i18n.t)('loadConfiguration.error.emptyCode'));
|
|
903
|
-
case
|
|
916
|
+
case 3:
|
|
904
917
|
dispatch((0, _Actions2.dismissError)());
|
|
905
918
|
dispatch((0, _Actions2.setWorkInProgress)('loadConfiguration', true));
|
|
906
|
-
_context4.
|
|
907
|
-
_context4.
|
|
919
|
+
_context4.prev = 5;
|
|
920
|
+
_context4.next = 8;
|
|
908
921
|
return dispatch(fetchConfigurationByCodeAsync(loadCode));
|
|
909
|
-
case
|
|
910
|
-
action = _context4.
|
|
922
|
+
case 8:
|
|
923
|
+
action = _context4.sent;
|
|
911
924
|
dispatch((0, _Actions2.setVisible)('loadConfiguration', false));
|
|
912
|
-
return _context4.
|
|
913
|
-
case
|
|
914
|
-
_context4.
|
|
915
|
-
|
|
925
|
+
return _context4.abrupt("return", action);
|
|
926
|
+
case 13:
|
|
927
|
+
_context4.prev = 13;
|
|
928
|
+
_context4.t0 = _context4["catch"](5);
|
|
916
929
|
dispatch((0, _Actions2.dismissError)()); // ignore original REQUEST_ERROR, should be handled by the caller
|
|
917
930
|
throw new Error((0, _i18n.t)('loadConfiguration.error.loadingFailed'));
|
|
918
|
-
case
|
|
919
|
-
_context4.
|
|
931
|
+
case 17:
|
|
932
|
+
_context4.prev = 17;
|
|
920
933
|
dispatch((0, _Actions2.setWorkInProgress)('loadConfiguration', false));
|
|
921
|
-
return _context4.
|
|
922
|
-
case
|
|
923
|
-
|
|
934
|
+
return _context4.finish(17);
|
|
935
|
+
case 20:
|
|
936
|
+
case "end":
|
|
937
|
+
return _context4.stop();
|
|
924
938
|
}
|
|
925
|
-
}, _callee4, null, [[
|
|
939
|
+
}, _callee4, null, [[5, 13, 17, 20]]);
|
|
926
940
|
}));
|
|
927
941
|
return function (_x6, _x7) {
|
|
928
942
|
return _ref6.apply(this, arguments);
|
|
@@ -938,38 +952,38 @@ var receiveDesignerData = exports.receiveDesignerData = function receiveDesigner
|
|
|
938
952
|
};
|
|
939
953
|
var loadDesignerData = exports.loadDesignerData = function loadDesignerData(configuration) {
|
|
940
954
|
return /*#__PURE__*/function () {
|
|
941
|
-
var _ref7 = _asyncToGenerator(/*#__PURE__*/
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
while (1) switch (_context5.p = _context5.n) {
|
|
955
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(dispatch) {
|
|
956
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
957
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
945
958
|
case 0:
|
|
946
959
|
if (!(!configuration || !configuration.item || !configuration.item.identifier)) {
|
|
947
|
-
_context5.
|
|
960
|
+
_context5.next = 2;
|
|
948
961
|
break;
|
|
949
962
|
}
|
|
950
|
-
return _context5.
|
|
951
|
-
case
|
|
963
|
+
return _context5.abrupt("return", dispatch((0, _Actions2.reportError)((0, _i18n.t)('loadConfigurationModes.error.missingItemIdentifier'))));
|
|
964
|
+
case 2:
|
|
952
965
|
dispatch((0, _Actions2.dismissError)());
|
|
953
966
|
dispatch((0, _Actions2.setWorkInProgress)('loadConfigurationModes', true));
|
|
954
|
-
_context5.
|
|
955
|
-
_context5.
|
|
967
|
+
_context5.prev = 4;
|
|
968
|
+
_context5.next = 7;
|
|
956
969
|
return dispatch(apiActions.postDataAsync('/configurationmodes/designer/getdata', {
|
|
957
970
|
configuration: configuration
|
|
958
971
|
}, receiveDesignerData));
|
|
959
|
-
case
|
|
960
|
-
return _context5.
|
|
961
|
-
case
|
|
962
|
-
_context5.
|
|
963
|
-
|
|
964
|
-
return _context5.
|
|
965
|
-
case
|
|
966
|
-
_context5.
|
|
972
|
+
case 7:
|
|
973
|
+
return _context5.abrupt("return", _context5.sent);
|
|
974
|
+
case 10:
|
|
975
|
+
_context5.prev = 10;
|
|
976
|
+
_context5.t0 = _context5["catch"](4);
|
|
977
|
+
return _context5.abrupt("return", dispatch((0, _Actions2.reportError)((0, _i18n.t)('loadConfigurationModes.error.loadingFailed'))));
|
|
978
|
+
case 13:
|
|
979
|
+
_context5.prev = 13;
|
|
967
980
|
dispatch((0, _Actions2.setWorkInProgress)('loadConfigurationModes', false));
|
|
968
|
-
return _context5.
|
|
969
|
-
case
|
|
970
|
-
|
|
981
|
+
return _context5.finish(13);
|
|
982
|
+
case 16:
|
|
983
|
+
case "end":
|
|
984
|
+
return _context5.stop();
|
|
971
985
|
}
|
|
972
|
-
}, _callee5, null, [[
|
|
986
|
+
}, _callee5, null, [[4, 10, 13, 16]]);
|
|
973
987
|
}));
|
|
974
988
|
return function (_x8) {
|
|
975
989
|
return _ref7.apply(this, arguments);
|
|
@@ -62,9 +62,9 @@ var getVisualizationSettings = exports.getVisualizationSettings = (0, _createSel
|
|
|
62
62
|
designer: (0, _get["default"])(settings, 'visualizationDesigner')
|
|
63
63
|
};
|
|
64
64
|
});
|
|
65
|
-
var
|
|
65
|
+
var findMaxChildrenCount = exports.findMaxChildrenCount = function findMaxChildrenCount(item) {
|
|
66
66
|
var children = (0, _get["default"])(item, 'itemGroup.children') || [];
|
|
67
|
-
return Math.max(children.length, children.length &&
|
|
67
|
+
return Math.max(children.length, children.length && findMaxChildrenCount(children[0]));
|
|
68
68
|
};
|
|
69
69
|
var getCurrentVisualizationSettings = exports.getCurrentVisualizationSettings = (0, _createSelector["default"])((0, _flow["default"])(getConfigurator, getVisualizationSettings), _Selectors.getSelectedConfigurationMode, function (visualizationSettings, configurationMode) {
|
|
70
70
|
return visualizationSettings[configurationMode] || 'default';
|
|
@@ -103,14 +103,14 @@ var hasMultipleVariantsSelected = exports.hasMultipleVariantsSelected = function
|
|
|
103
103
|
if (!(0, _get["default"])(firstSelectedVariant, 'itemGroup.children')) {
|
|
104
104
|
return true;
|
|
105
105
|
}
|
|
106
|
-
var multipleVariants = (0, _difference["default"])((0, _keys["default"])(selectedAmounts), (0, _values["default"])(
|
|
106
|
+
var multipleVariants = (0, _difference["default"])((0, _keys["default"])(selectedAmounts), (0, _values["default"])(getDeepestChildIdentifiers(firstSelectedVariant)));
|
|
107
107
|
if (multipleVariants.length > 0) {
|
|
108
108
|
return true;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
return false;
|
|
112
112
|
};
|
|
113
|
-
var
|
|
113
|
+
var getDeepestChildIdentifiers = exports.getDeepestChildIdentifiers = function getDeepestChildIdentifiers(item) {
|
|
114
114
|
if (!item.itemGroup || !item.itemGroup.children) {
|
|
115
115
|
return _defineProperty({}, item.itemgroupentryIdentifier, item.identifier);
|
|
116
116
|
}
|
|
@@ -120,7 +120,7 @@ var _getDeepestChildIdentifiers = exports.getDeepestChildIdentifiers = function
|
|
|
120
120
|
try {
|
|
121
121
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
122
122
|
var child = _step.value;
|
|
123
|
-
Object.assign(result,
|
|
123
|
+
Object.assign(result, getDeepestChildIdentifiers(child));
|
|
124
124
|
}
|
|
125
125
|
} catch (err) {
|
|
126
126
|
_iterator.e(err);
|
|
@@ -6,8 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.showConfirm = exports.isConfirmResult = exports.hideConfirm = exports.SHOW_CONFIRM = exports.HIDE_CONFIRM = void 0;
|
|
7
7
|
var _ServiceLocator = require("../../ServiceLocator");
|
|
8
8
|
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); }
|
|
9
|
+
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 }; })(); }
|
|
10
|
+
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"); }
|
|
11
|
+
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; }; }
|
|
12
|
+
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(); }); }
|
|
13
|
+
function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
|
|
14
|
+
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); }
|
|
9
15
|
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 }; })(); }
|
|
10
16
|
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); }
|
|
17
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
11
18
|
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); }
|
|
12
19
|
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); }); }; }
|
|
13
20
|
var SHOW_CONFIRM = exports.SHOW_CONFIRM = 'SHOW_CONFIRM';
|
|
@@ -16,9 +23,9 @@ var DEFAULT_NAME = 'confirmResult';
|
|
|
16
23
|
var showConfirm = exports.showConfirm = function showConfirm(message, okLabel, cancelLabel) {
|
|
17
24
|
var name = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_NAME;
|
|
18
25
|
return /*#__PURE__*/function () {
|
|
19
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
20
|
-
return
|
|
21
|
-
while (1) switch (_context.
|
|
26
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch) {
|
|
27
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
28
|
+
while (1) switch (_context.prev = _context.next) {
|
|
22
29
|
case 0:
|
|
23
30
|
dispatch({
|
|
24
31
|
type: SHOW_CONFIRM,
|
|
@@ -28,10 +35,13 @@ var showConfirm = exports.showConfirm = function showConfirm(message, okLabel, c
|
|
|
28
35
|
cancelLabel: cancelLabel
|
|
29
36
|
}
|
|
30
37
|
});
|
|
31
|
-
_context.
|
|
38
|
+
_context.next = 3;
|
|
32
39
|
return _ServiceLocator.Services.async.create(name);
|
|
33
|
-
case
|
|
34
|
-
return _context.
|
|
40
|
+
case 3:
|
|
41
|
+
return _context.abrupt("return", _context.sent);
|
|
42
|
+
case 4:
|
|
43
|
+
case "end":
|
|
44
|
+
return _context.stop();
|
|
35
45
|
}
|
|
36
46
|
}, _callee);
|
|
37
47
|
}));
|
|
@@ -483,8 +483,9 @@ function getSelectedViewName(designArea) {
|
|
|
483
483
|
(0, _get["default"])(designArea, 'identifier') ||
|
|
484
484
|
// fallback to the design area identifier (currently no known use case)
|
|
485
485
|
'default' // if no design area selected use the default view
|
|
486
|
-
;
|
|
486
|
+
;
|
|
487
487
|
}
|
|
488
|
+
|
|
488
489
|
var hasPlaceHolderImagesForActiveDesignArea = exports.hasPlaceHolderImagesForActiveDesignArea = function hasPlaceHolderImagesForActiveDesignArea(state) {
|
|
489
490
|
var designData = getDesignDataForSelectedDesignArea(state);
|
|
490
491
|
var canvasObjects = (0, _get["default"])(designData, 'canvasData.objects') || null;
|