@configuratorware/configurator-admingui 1.56.2 → 1.56.5
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/Api.js +12 -8
- package/App/Config/app.js +3 -3
- package/App/Data.js +11 -9
- package/App/ErrorBoundary.js +9 -7
- package/App/Main.js +11 -9
- package/App/Reducers/Api/Actions.js +1 -0
- package/App/Reducers/Entity/Actions.js +4 -4
- package/App/Services/WindowCommunication.js +2 -1
- package/App/TestHelpers.js +13 -9
- package/App/i18n.js +3 -3
- package/App/index.js +8 -6
- package/App/initServices.js +4 -2
- package/Components/CallToActionField.js +30 -19
- package/Components/CopyPaste.js +10 -8
- package/Components/DefaultForm.js +8 -6
- package/Components/DefaultList.js +20 -17
- package/Components/DefaultScreen.js +9 -7
- package/Components/Form.js +15 -12
- package/Components/FormFragments/AttributeValueChip.js +17 -16
- package/Components/FormFragments/AutoComplete.js +18 -16
- package/Components/FormFragments/AutocompleteEntity.js +16 -14
- package/Components/FormFragments/Chip.js +15 -14
- package/Components/FormFragments/DynSourceInput.js +9 -7
- package/Components/FormFragments/File.js +4 -4
- package/Components/FormFragments/InlineAddButton.js +14 -12
- package/Components/FormFragments/InputArray.js +18 -16
- package/Components/FormFragments/IntlInput.js +17 -13
- package/Components/FormFragments/NestedDataComponent.js +15 -13
- package/Components/FormFragments/SetInput.js +10 -8
- package/Components/FormFragments/SimpleNestedData.js +8 -6
- package/Components/FormFragments/SimpleTable.js +13 -11
- package/Components/FormFragments/Tabs.js +15 -13
- package/Components/FormFragments/TwoSideSelect.js +17 -13
- package/Components/GeneralFragments/ConfigurationEditor.js +35 -24
- package/Components/GeneralFragments/ConfiguratorOverlay.js +8 -6
- package/Components/GeneralFragments/Image.js +10 -8
- package/Components/GeneralFragments/MiniPopup.js +11 -9
- package/Components/LicenseInfo.js +8 -6
- package/Components/List.js +17 -15
- package/Components/ListColumnFilter.js +15 -13
- package/Components/Menu.js +11 -9
- package/Components/ModalContainer.js +9 -7
- package/Components/OrderList.js +14 -12
- package/Components/Pagination.js +14 -12
- package/Components/SearchBar.js +11 -9
- package/Components/TranslateComponent.js +14 -11
- package/Screens/ApiKeys/Containers/Edit.js +26 -15
- package/Screens/Attribute/__tests/AttributeScreen.js +1 -1
- package/Screens/AttributeValue/__tests/AttributeValueScreen.js +1 -1
- package/Screens/Channel/__tests/ChannelScreen.js +1 -1
- package/Screens/ColorPalettes/Components/DefaultColorSwitch.js +9 -7
- package/Screens/ColorPalettes/Reducers/Reducer.js +1 -0
- package/Screens/ConfigurationTypeEditor/Screen.js +8 -6
- package/Screens/ConfigurationWorkflowStatus/Containers/List.js +14 -10
- package/Screens/ConfigurationWorkflowStatus/Screen.js +8 -6
- package/Screens/Creator/Components/BaseConfigurationEditor.js +15 -11
- package/Screens/Creator/Components/CheckData/ApiCalls.js +17 -6
- package/Screens/Creator/Components/CheckData/CheckData.js +39 -30
- package/Screens/Creator/Components/CheckData/Translations.js +5 -5
- package/Screens/Creator/Components/ComponentEditor.js +27 -19
- package/Screens/Creator/Components/OptionclassificationEditor.js +49 -39
- package/Screens/Creator/Components/Rules/Containers/Edit.js +17 -12
- package/Screens/Creator/Components/Rules/Containers/RuleForms/AdditionalOption.js +8 -6
- package/Screens/Creator/Components/Rules/Containers/RuleForms/AttributeValueGroupAutoSwitch.js +8 -6
- package/Screens/Creator/Components/Rules/Containers/RuleForms/DefaultOption.js +8 -6
- package/Screens/Creator/Components/Rules/Containers/RuleForms/ItemAttributeMatch.js +8 -6
- package/Screens/Creator/Components/Rules/Containers/RuleForms/ItemAttributeMaxSum.js +8 -6
- package/Screens/Creator/Components/Rules/Containers/RuleForms/OptionClassificationMaxAmount.js +8 -6
- package/Screens/Creator/Components/Rules/Containers/RuleForms/OptionClassificationMinAmount.js +8 -6
- package/Screens/Creator/Components/Rules/Containers/RuleForms/OptionDependency.js +8 -6
- package/Screens/Creator/Components/Rules/Containers/RuleForms/OptionExclusion.js +8 -6
- package/Screens/Creator/Components/Rules/Containers/RuleForms/OptionMaxAmount.js +8 -6
- package/Screens/Creator/Components/Rules/Containers/RuleForms/RuleForm.js +9 -7
- package/Screens/Creator/Components/Rules/index.js +8 -6
- package/Screens/Creator/Components/VisualizationAndMediaData/ApiCalls.js +18 -7
- package/Screens/Creator/Components/VisualizationAndMediaData/Components/ImageEditTools.js +75 -64
- package/Screens/Creator/Components/VisualizationAndMediaData/Components/PathStructure.js +1 -1
- package/Screens/Creator/Components/VisualizationAndMediaData/VisualizationAndMediaData.js +181 -164
- package/Screens/Creator/Containers/Edit.js +19 -15
- package/Screens/Creator/Reducers/ConfigurationActions.js +49 -39
- package/Screens/Demo/Screen.js +10 -8
- package/Screens/Designer/Components/DesignDataTransfer.js +67 -54
- package/Screens/Designer/Components/TemplateDefaultList.js +27 -25
- package/Screens/Designer/Components/TemplateList.js +14 -12
- package/Screens/Designer/Containers/Edit.js +37 -26
- package/Screens/Designer/SubScreens/DesignAreas/Components/ColorPalettes.js +22 -18
- package/Screens/Designer/SubScreens/DesignAreas/Components/FormArray.js +15 -13
- package/Screens/Designer/SubScreens/DesignAreas/Components/MaskEditorField/MaskEditorCanvas.js +27 -19
- package/Screens/Designer/SubScreens/DesignAreas/Components/MaskEditorField/MaskEditorField.js +25 -17
- package/Screens/Designer/SubScreens/DesignAreas/Components/MaskEditorField/withFileUpload.js +27 -19
- package/Screens/Designer/SubScreens/DesignAreas/Containers/FormProductionMethods.js +20 -18
- package/Screens/Designer/SubScreens/DesignAreas/Utils/getMaskSrcByType.js +2 -1
- package/Screens/Designer/SubScreens/Designviews/Reducers/Actions.js +19 -8
- package/Screens/Designer/SubScreens/Visualization/ApiCalls.js +28 -14
- package/Screens/Designer/SubScreens/Visualization/Components/AreaEditor.js +58 -44
- package/Screens/Designer/SubScreens/Visualization/Components/ExpansionContainer.js +9 -7
- package/Screens/Designer/SubScreens/Visualization/Components/Three2DEditor.js +83 -62
- package/Screens/Designer/SubScreens/Visualization/Components/VisualizationContainer.js +10 -8
- package/Screens/Designer/SubScreens/Visualization/Containers/Edit/Edit.js +116 -99
- package/Screens/Designer/SubScreens/Visualization/Containers/Edit/VisualizationUtils.js +29 -21
- package/Screens/Designer/SubScreens/Visualization/Containers/List.js +8 -6
- package/Screens/Finder/Reducers/Actions.js +22 -13
- package/Screens/Font/Reducers/Actions.js +4 -3
- package/Screens/ImageGallery/Containers/Edit.js +8 -6
- package/Screens/ImageGallery/Containers/List.js +36 -23
- package/Screens/ImageGallery/ImageTags/TagsEditorPopup.js +8 -6
- package/Screens/ImageGallery/Reducers/Actions.js +1 -0
- package/Screens/Inspirations/Reducers/Actions.js +18 -7
- package/Screens/Item/ApiCalls.js +19 -8
- package/Screens/Item/Components/AttributeEditorPopup.js +8 -6
- package/Screens/Item/Components/CopyCreatorItemDialog.js +26 -15
- package/Screens/Item/Components/ExportCreatorItemDialog.js +26 -15
- package/Screens/Item/Components/Images/ItemImageUploadDialog.js +31 -22
- package/Screens/Item/Components/ImportItemDialog.js +29 -21
- package/Screens/Item/Components/ListItemStatusEditor.js +25 -14
- package/Screens/Item/Components/Variants/VariantsAutocomplete.js +64 -53
- package/Screens/Item/Components/Variants/VariantsEditor.js +28 -26
- package/Screens/Item/Components/Variants/VariantsEditorDialog.js +8 -6
- package/Screens/Item/Components/Variants/VariantsEditorPopup.js +24 -14
- package/Screens/Item/Components/Variants/VariantsSelection.js +13 -11
- package/Screens/Item/Components/Variants/VariantsSortFilter.js +18 -16
- package/Screens/Item/Containers/Edit.js +31 -21
- package/Screens/Item/DataStructures/Prices/ActionHelpers.js +4 -4
- package/Screens/Login/Screen.js +15 -12
- package/Screens/Login/__tests/LoginScreen.js +2 -2
- package/Screens/ProductionView/Components/ConfigurationDataSheet.js +8 -6
- package/Screens/ProductionView/Containers/List.js +11 -8
- package/Screens/ReceiveOfferRequests/Components/ConfigurationDataSheet.js +8 -6
- package/Screens/ReceiveOfferRequests/Containers/List.js +8 -6
- package/Screens/Savedconfigurations/Components/ConfigurationDataSheet.js +8 -6
- package/Screens/Savedconfigurations/Containers/List.js +15 -10
- package/Screens/Setting/Containers/Edit.js +8 -6
- package/Screens/TranslationFileHandling/Containers/Edit.js +57 -45
- package/Screens/User/__tests/UserScreen.js +1 -1
- package/UIComponents/AutoComplete.js +12 -10
- package/UIComponents/ChipInput.js +14 -12
- package/UIComponents/IconMenu.js +12 -10
- package/UIComponents/InlineHelp/index.js +8 -6
- package/UIComponents/Pagination.js +12 -10
- package/UIComponents/SelectField.js +8 -6
- package/UIComponents/Table/Table.js +15 -13
- package/UIComponents/Table/TableBody.js +8 -6
- package/UIComponents/Table/TableHead.js +8 -6
- package/UIComponents/Table/TableRow.js +8 -6
- package/Utils/Async/Deferred.js +4 -2
- package/Utils/Async/newestRequest.js +23 -14
- package/Utils/Decorators/Observable.js +2 -1
- package/Utils/FunDraw/createMask.js +17 -7
- package/Utils/FunDraw/funDraw.js +71 -54
- package/Utils/FunDraw/movableObject.js +21 -12
- package/Utils/HOCs/AsyncProps.js +24 -16
- package/Utils/HOCs/LocalState.js +11 -9
- package/Utils/Request/lazyFetch.js +46 -38
- package/default.js +1 -1
- package/dev.js +1 -1
- package/package.json +3 -3
|
@@ -27,8 +27,15 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
27
27
|
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; }
|
|
28
28
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
29
29
|
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); }
|
|
30
|
+
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 }; })(); }
|
|
31
|
+
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"); }
|
|
32
|
+
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; }; }
|
|
33
|
+
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(); }); }
|
|
34
|
+
function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
|
|
35
|
+
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); }
|
|
30
36
|
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 }; })(); }
|
|
31
37
|
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); }
|
|
38
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
32
39
|
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); }
|
|
33
40
|
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); }); }; }
|
|
34
41
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
@@ -101,13 +108,13 @@ var ComponentEditor = exports.ComponentEditor = function ComponentEditor(_ref) {
|
|
|
101
108
|
var _Api$create = _Api["default"].create(),
|
|
102
109
|
request = _Api$create.request,
|
|
103
110
|
cancel = _Api$create.cancel;
|
|
104
|
-
_asyncToGenerator(/*#__PURE__*/
|
|
105
|
-
var result
|
|
106
|
-
return
|
|
107
|
-
while (1) switch (_context.
|
|
111
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
112
|
+
var result;
|
|
113
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
114
|
+
while (1) switch (_context.prev = _context.next) {
|
|
108
115
|
case 0:
|
|
109
|
-
_context.
|
|
110
|
-
_context.
|
|
116
|
+
_context.prev = 0;
|
|
117
|
+
_context.next = 3;
|
|
111
118
|
return request({
|
|
112
119
|
method: 'get',
|
|
113
120
|
url: "/creator_views",
|
|
@@ -117,24 +124,25 @@ var ComponentEditor = exports.ComponentEditor = function ComponentEditor(_ref) {
|
|
|
117
124
|
}
|
|
118
125
|
}
|
|
119
126
|
});
|
|
120
|
-
case
|
|
121
|
-
result = _context.
|
|
127
|
+
case 3:
|
|
128
|
+
result = _context.sent;
|
|
122
129
|
setCreatorViewList((0, _get["default"])(result, 'data.data'));
|
|
123
|
-
_context.
|
|
130
|
+
_context.next = 11;
|
|
124
131
|
break;
|
|
125
|
-
case
|
|
126
|
-
_context.
|
|
127
|
-
|
|
128
|
-
dispatch((0, _Actions.networkError)('creator_views', 'creator_views',
|
|
132
|
+
case 7:
|
|
133
|
+
_context.prev = 7;
|
|
134
|
+
_context.t0 = _context["catch"](0);
|
|
135
|
+
dispatch((0, _Actions.networkError)('creator_views', 'creator_views', _context.t0));
|
|
129
136
|
setError((0, _i18n.T)('componentEditor.error.viewListNotAvailable'));
|
|
130
|
-
case
|
|
131
|
-
_context.
|
|
137
|
+
case 11:
|
|
138
|
+
_context.prev = 11;
|
|
132
139
|
setLoading(false);
|
|
133
|
-
return _context.
|
|
134
|
-
case
|
|
135
|
-
|
|
140
|
+
return _context.finish(11);
|
|
141
|
+
case 14:
|
|
142
|
+
case "end":
|
|
143
|
+
return _context.stop();
|
|
136
144
|
}
|
|
137
|
-
}, _callee, null, [[0,
|
|
145
|
+
}, _callee, null, [[0, 7, 11, 14]]);
|
|
138
146
|
}))();
|
|
139
147
|
return cancel;
|
|
140
148
|
}, [itemId, dispatch, component]);
|
|
@@ -35,13 +35,13 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
35
35
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
36
36
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
37
37
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
38
|
-
function
|
|
38
|
+
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); }
|
|
39
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
40
|
+
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); }; }
|
|
39
41
|
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); }
|
|
40
42
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
41
43
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
42
44
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
43
|
-
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); }
|
|
44
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
45
45
|
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; }
|
|
46
46
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
47
47
|
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); }
|
|
@@ -55,26 +55,27 @@ var OptionActionButton = function OptionActionButton(_ref) {
|
|
|
55
55
|
}, /*#__PURE__*/_react["default"].createElement(IconComponent, null)));
|
|
56
56
|
};
|
|
57
57
|
var OptionclassificationEditorOptionTile = /*#__PURE__*/function (_React$Component) {
|
|
58
|
+
_inherits(OptionclassificationEditorOptionTile, _React$Component);
|
|
59
|
+
var _super = _createSuper(OptionclassificationEditorOptionTile);
|
|
58
60
|
function OptionclassificationEditorOptionTile() {
|
|
59
61
|
var _this;
|
|
60
62
|
_classCallCheck(this, OptionclassificationEditorOptionTile);
|
|
61
63
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
62
64
|
args[_key] = arguments[_key];
|
|
63
65
|
}
|
|
64
|
-
_this =
|
|
65
|
-
_defineProperty(_this, "remove", function () {
|
|
66
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
67
|
+
_defineProperty(_assertThisInitialized(_this), "remove", function () {
|
|
66
68
|
_this.props.onRemoveOption(_this.props.option);
|
|
67
69
|
});
|
|
68
|
-
_defineProperty(_this, "openSettingsDialog", function () {
|
|
70
|
+
_defineProperty(_assertThisInitialized(_this), "openSettingsDialog", function () {
|
|
69
71
|
_this.props.onEditOption(_this.props.option);
|
|
70
72
|
});
|
|
71
|
-
_defineProperty(_this, "openPriceDialog", function () {
|
|
73
|
+
_defineProperty(_assertThisInitialized(_this), "openPriceDialog", function () {
|
|
72
74
|
_this.props.onEditPrice(_this.props.option);
|
|
73
75
|
});
|
|
74
76
|
return _this;
|
|
75
77
|
}
|
|
76
|
-
|
|
77
|
-
return _createClass(OptionclassificationEditorOptionTile, [{
|
|
78
|
+
_createClass(OptionclassificationEditorOptionTile, [{
|
|
78
79
|
key: "render",
|
|
79
80
|
value: function render() {
|
|
80
81
|
var _this$props = this.props,
|
|
@@ -106,6 +107,7 @@ var OptionclassificationEditorOptionTile = /*#__PURE__*/function (_React$Compone
|
|
|
106
107
|
})));
|
|
107
108
|
}
|
|
108
109
|
}]);
|
|
110
|
+
return OptionclassificationEditorOptionTile;
|
|
109
111
|
}(_react["default"].Component);
|
|
110
112
|
var SortableList = (0, _reactSortableHoc.SortableContainer)(function (props) {
|
|
111
113
|
return /*#__PURE__*/_react["default"].createElement("ul", null, props.children);
|
|
@@ -137,16 +139,18 @@ var OptionTile = function OptionTile(_ref2) {
|
|
|
137
139
|
}));
|
|
138
140
|
};
|
|
139
141
|
var OptionclassificationEditorItem = /*#__PURE__*/function (_React$Component2) {
|
|
142
|
+
_inherits(OptionclassificationEditorItem, _React$Component2);
|
|
143
|
+
var _super2 = _createSuper(OptionclassificationEditorItem);
|
|
140
144
|
function OptionclassificationEditorItem(props) {
|
|
141
145
|
var _this2;
|
|
142
146
|
_classCallCheck(this, OptionclassificationEditorItem);
|
|
143
|
-
_this2 =
|
|
144
|
-
_defineProperty(_this2, "toggle", function () {
|
|
147
|
+
_this2 = _super2.call(this, props);
|
|
148
|
+
_defineProperty(_assertThisInitialized(_this2), "toggle", function () {
|
|
145
149
|
return _this2.setState({
|
|
146
150
|
open: !_this2.state.open
|
|
147
151
|
});
|
|
148
152
|
});
|
|
149
|
-
_defineProperty(_this2, "removeOption", function (option) {
|
|
153
|
+
_defineProperty(_assertThisInitialized(_this2), "removeOption", function (option) {
|
|
150
154
|
// do the change on a cloned optionclassification
|
|
151
155
|
var component = _lodash["default"].cloneDeep(_this2.props.optionclassification);
|
|
152
156
|
_lodash["default"].remove(component.selectableOptions, {
|
|
@@ -154,22 +158,22 @@ var OptionclassificationEditorItem = /*#__PURE__*/function (_React$Component2) {
|
|
|
154
158
|
});
|
|
155
159
|
_this2.props.onChange(component);
|
|
156
160
|
});
|
|
157
|
-
_defineProperty(_this2, "change", function (field, value) {
|
|
161
|
+
_defineProperty(_assertThisInitialized(_this2), "change", function (field, value) {
|
|
158
162
|
// do the change on a cloned optionclassification
|
|
159
163
|
var component = _lodash["default"].cloneDeep(_this2.props.optionclassification);
|
|
160
164
|
component[field] = value;
|
|
161
165
|
_this2.props.onChange(component);
|
|
162
166
|
});
|
|
163
|
-
_defineProperty(_this2, "addOption", function () {
|
|
167
|
+
_defineProperty(_assertThisInitialized(_this2), "addOption", function () {
|
|
164
168
|
_this2.props.onAddOption(_this2.props.optionclassification);
|
|
165
169
|
});
|
|
166
|
-
_defineProperty(_this2, "editOption", function (option) {
|
|
170
|
+
_defineProperty(_assertThisInitialized(_this2), "editOption", function (option) {
|
|
167
171
|
_this2.props.onEditOption(_this2.props.optionclassification, option);
|
|
168
172
|
});
|
|
169
|
-
_defineProperty(_this2, "editOptionPrice", function (option) {
|
|
173
|
+
_defineProperty(_assertThisInitialized(_this2), "editOptionPrice", function (option) {
|
|
170
174
|
_this2.props.onEditOptionPrice(_this2.props.optionclassification, option);
|
|
171
175
|
});
|
|
172
|
-
_defineProperty(_this2, "onSortEnd", function (_ref3) {
|
|
176
|
+
_defineProperty(_assertThisInitialized(_this2), "onSortEnd", function (_ref3) {
|
|
173
177
|
var oldIndex = _ref3.oldIndex,
|
|
174
178
|
newIndex = _ref3.newIndex;
|
|
175
179
|
var component = _this2.props.optionclassification;
|
|
@@ -185,8 +189,7 @@ var OptionclassificationEditorItem = /*#__PURE__*/function (_React$Component2) {
|
|
|
185
189
|
};
|
|
186
190
|
return _this2;
|
|
187
191
|
}
|
|
188
|
-
|
|
189
|
-
return _createClass(OptionclassificationEditorItem, [{
|
|
192
|
+
_createClass(OptionclassificationEditorItem, [{
|
|
190
193
|
key: "render",
|
|
191
194
|
value: function render() {
|
|
192
195
|
var _this3 = this;
|
|
@@ -252,16 +255,19 @@ var OptionclassificationEditorItem = /*#__PURE__*/function (_React$Component2) {
|
|
|
252
255
|
}))))));
|
|
253
256
|
}
|
|
254
257
|
}]);
|
|
258
|
+
return OptionclassificationEditorItem;
|
|
255
259
|
}(_react["default"].Component);
|
|
256
260
|
var OptionclassificationEditor = /*#__PURE__*/function (_React$Component3) {
|
|
261
|
+
_inherits(OptionclassificationEditor, _React$Component3);
|
|
262
|
+
var _super3 = _createSuper(OptionclassificationEditor);
|
|
257
263
|
function OptionclassificationEditor() {
|
|
258
264
|
var _this4;
|
|
259
265
|
_classCallCheck(this, OptionclassificationEditor);
|
|
260
266
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
261
267
|
args[_key2] = arguments[_key2];
|
|
262
268
|
}
|
|
263
|
-
_this4 =
|
|
264
|
-
_defineProperty(_this4, "change", function (oc) {
|
|
269
|
+
_this4 = _super3.call.apply(_super3, [this].concat(args));
|
|
270
|
+
_defineProperty(_assertThisInitialized(_this4), "change", function (oc) {
|
|
265
271
|
// do the change on a cloned value
|
|
266
272
|
var value = _lodash["default"].cloneDeep(_this4.props.value);
|
|
267
273
|
var index = _lodash["default"].findIndex(value, {
|
|
@@ -272,19 +278,18 @@ var OptionclassificationEditor = /*#__PURE__*/function (_React$Component3) {
|
|
|
272
278
|
}
|
|
273
279
|
_this4.props.onChange(_this4.props.name, value);
|
|
274
280
|
});
|
|
275
|
-
_defineProperty(_this4, "addOption", function (component) {
|
|
281
|
+
_defineProperty(_assertThisInitialized(_this4), "addOption", function (component) {
|
|
276
282
|
_this4.props.showOptionSelection(true, component);
|
|
277
283
|
});
|
|
278
|
-
_defineProperty(_this4, "editOption", function (component, option) {
|
|
284
|
+
_defineProperty(_assertThisInitialized(_this4), "editOption", function (component, option) {
|
|
279
285
|
_this4.props.showOptionEditor(true, component, option);
|
|
280
286
|
});
|
|
281
|
-
_defineProperty(_this4, "editOptionPrice", function (component, option) {
|
|
287
|
+
_defineProperty(_assertThisInitialized(_this4), "editOptionPrice", function (component, option) {
|
|
282
288
|
_this4.props.showOptionPriceEditor(true, component, option);
|
|
283
289
|
});
|
|
284
290
|
return _this4;
|
|
285
291
|
}
|
|
286
|
-
|
|
287
|
-
return _createClass(OptionclassificationEditor, [{
|
|
292
|
+
_createClass(OptionclassificationEditor, [{
|
|
288
293
|
key: "render",
|
|
289
294
|
value: function render() {
|
|
290
295
|
var _this5 = this;
|
|
@@ -322,31 +327,33 @@ var OptionclassificationEditor = /*#__PURE__*/function (_React$Component3) {
|
|
|
322
327
|
}), /*#__PURE__*/_react["default"].createElement(OptionSelection, otherProps), /*#__PURE__*/_react["default"].createElement(OptionEditor, otherProps), /*#__PURE__*/_react["default"].createElement(_OptionPriceEditor["default"], otherProps));
|
|
323
328
|
}
|
|
324
329
|
}]);
|
|
330
|
+
return OptionclassificationEditor;
|
|
325
331
|
}(_react["default"].Component);
|
|
326
332
|
var OptionSelection = /*#__PURE__*/function (_React$Component4) {
|
|
333
|
+
_inherits(OptionSelection, _React$Component4);
|
|
334
|
+
var _super4 = _createSuper(OptionSelection);
|
|
327
335
|
function OptionSelection() {
|
|
328
336
|
var _this6;
|
|
329
337
|
_classCallCheck(this, OptionSelection);
|
|
330
338
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
331
339
|
args[_key3] = arguments[_key3];
|
|
332
340
|
}
|
|
333
|
-
_this6 =
|
|
334
|
-
_defineProperty(_this6, "closeOptionSelection", function () {
|
|
341
|
+
_this6 = _super4.call.apply(_super4, [this].concat(args));
|
|
342
|
+
_defineProperty(_assertThisInitialized(_this6), "closeOptionSelection", function () {
|
|
335
343
|
_this6.props.showOptionSelection(false);
|
|
336
344
|
});
|
|
337
|
-
_defineProperty(_this6, "setOptionSelection", function () {
|
|
345
|
+
_defineProperty(_assertThisInitialized(_this6), "setOptionSelection", function () {
|
|
338
346
|
_this6.props.commitOptions();
|
|
339
347
|
});
|
|
340
|
-
_defineProperty(_this6, "change", function (name, value) {
|
|
348
|
+
_defineProperty(_assertThisInitialized(_this6), "change", function (name, value) {
|
|
341
349
|
_this6.props.setOptions(value);
|
|
342
350
|
});
|
|
343
|
-
_defineProperty(_this6, "searchChange", function (text) {
|
|
351
|
+
_defineProperty(_assertThisInitialized(_this6), "searchChange", function (text) {
|
|
344
352
|
_this6.props.fetchOptions(text);
|
|
345
353
|
});
|
|
346
354
|
return _this6;
|
|
347
355
|
}
|
|
348
|
-
|
|
349
|
-
return _createClass(OptionSelection, [{
|
|
356
|
+
_createClass(OptionSelection, [{
|
|
350
357
|
key: "componentWillReceiveProps",
|
|
351
358
|
value: function componentWillReceiveProps(props) {
|
|
352
359
|
if (!this.props.showOptionSelectionDialog && props.showOptionSelectionDialog) {
|
|
@@ -416,28 +423,30 @@ var OptionSelection = /*#__PURE__*/function (_React$Component4) {
|
|
|
416
423
|
}));
|
|
417
424
|
}
|
|
418
425
|
}]);
|
|
426
|
+
return OptionSelection;
|
|
419
427
|
}(_react["default"].Component);
|
|
420
428
|
var OptionEditor = /*#__PURE__*/function (_React$Component5) {
|
|
429
|
+
_inherits(OptionEditor, _React$Component5);
|
|
430
|
+
var _super5 = _createSuper(OptionEditor);
|
|
421
431
|
function OptionEditor() {
|
|
422
432
|
var _this7;
|
|
423
433
|
_classCallCheck(this, OptionEditor);
|
|
424
434
|
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
425
435
|
args[_key4] = arguments[_key4];
|
|
426
436
|
}
|
|
427
|
-
_this7 =
|
|
428
|
-
_defineProperty(_this7, "closeOptionEditor", function () {
|
|
437
|
+
_this7 = _super5.call.apply(_super5, [this].concat(args));
|
|
438
|
+
_defineProperty(_assertThisInitialized(_this7), "closeOptionEditor", function () {
|
|
429
439
|
_this7.props.showOptionEditor(false);
|
|
430
440
|
});
|
|
431
|
-
_defineProperty(_this7, "setOptionData", function () {
|
|
441
|
+
_defineProperty(_assertThisInitialized(_this7), "setOptionData", function () {
|
|
432
442
|
_this7.props.commitOptionData();
|
|
433
443
|
});
|
|
434
|
-
_defineProperty(_this7, "change", function (name, value) {
|
|
444
|
+
_defineProperty(_assertThisInitialized(_this7), "change", function (name, value) {
|
|
435
445
|
_this7.props.setOptionData(name, value);
|
|
436
446
|
});
|
|
437
447
|
return _this7;
|
|
438
448
|
}
|
|
439
|
-
|
|
440
|
-
return _createClass(OptionEditor, [{
|
|
449
|
+
_createClass(OptionEditor, [{
|
|
441
450
|
key: "render",
|
|
442
451
|
value: function render() {
|
|
443
452
|
var _this$props5 = this.props,
|
|
@@ -469,6 +478,7 @@ var OptionEditor = /*#__PURE__*/function (_React$Component5) {
|
|
|
469
478
|
})));
|
|
470
479
|
}
|
|
471
480
|
}]);
|
|
481
|
+
return OptionEditor;
|
|
472
482
|
}(_react["default"].Component);
|
|
473
483
|
function mapStateToProps(state) {
|
|
474
484
|
var baseConfigurationData = state.baseConfigurationData,
|
|
@@ -21,13 +21,13 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
21
21
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
22
22
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
23
23
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
24
|
-
function
|
|
24
|
+
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); }
|
|
25
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
26
|
+
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); }; }
|
|
25
27
|
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); }
|
|
26
28
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
27
29
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
28
30
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
29
|
-
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); }
|
|
30
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
31
31
|
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; }
|
|
32
32
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
33
33
|
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); }
|
|
@@ -86,21 +86,22 @@ var RuleTypeItem = (0, _withStyles["default"])(ruleTypeItemStyles)(function (_re
|
|
|
86
86
|
}, (0, _i18n.T)("ruleEditor.ruleTypes.".concat(ruleType.identifier, ".name")));
|
|
87
87
|
});
|
|
88
88
|
var RuleTypeList = /*#__PURE__*/function (_Component) {
|
|
89
|
+
_inherits(RuleTypeList, _Component);
|
|
90
|
+
var _super = _createSuper(RuleTypeList);
|
|
89
91
|
function RuleTypeList() {
|
|
90
92
|
var _this;
|
|
91
93
|
_classCallCheck(this, RuleTypeList);
|
|
92
94
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
93
95
|
args[_key] = arguments[_key];
|
|
94
96
|
}
|
|
95
|
-
_this =
|
|
96
|
-
_defineProperty(_this, "onChange", function (ruleType) {
|
|
97
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
98
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (ruleType) {
|
|
97
99
|
_this.props.setRuleType(ruleType);
|
|
98
100
|
_this.props.onChange && _this.props.onChange(_this.props.name, ruleType);
|
|
99
101
|
});
|
|
100
102
|
return _this;
|
|
101
103
|
}
|
|
102
|
-
|
|
103
|
-
return _createClass(RuleTypeList, [{
|
|
104
|
+
_createClass(RuleTypeList, [{
|
|
104
105
|
key: "componentDidMount",
|
|
105
106
|
value: function componentDidMount() {
|
|
106
107
|
this.props.loadRuleTypes();
|
|
@@ -125,6 +126,7 @@ var RuleTypeList = /*#__PURE__*/function (_Component) {
|
|
|
125
126
|
})));
|
|
126
127
|
}
|
|
127
128
|
}]);
|
|
129
|
+
return RuleTypeList;
|
|
128
130
|
}(_react.Component);
|
|
129
131
|
var ConnectedRuleList = (0, _reactRedux.connect)(function (_ref3) {
|
|
130
132
|
var dataBySource = _ref3.dataBySource,
|
|
@@ -144,14 +146,16 @@ var ConnectedRuleList = (0, _reactRedux.connect)(function (_ref3) {
|
|
|
144
146
|
};
|
|
145
147
|
})(RuleTypeList);
|
|
146
148
|
var RuleForm = /*#__PURE__*/function (_Component2) {
|
|
149
|
+
_inherits(RuleForm, _Component2);
|
|
150
|
+
var _super2 = _createSuper(RuleForm);
|
|
147
151
|
function RuleForm() {
|
|
148
152
|
var _this3;
|
|
149
153
|
_classCallCheck(this, RuleForm);
|
|
150
154
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
151
155
|
args[_key2] = arguments[_key2];
|
|
152
156
|
}
|
|
153
|
-
_this3 =
|
|
154
|
-
_defineProperty(_this3, "onChange", function (field, value) {
|
|
157
|
+
_this3 = _super2.call.apply(_super2, [this].concat(args));
|
|
158
|
+
_defineProperty(_assertThisInitialized(_this3), "onChange", function (field, value) {
|
|
155
159
|
/*const [ containerField, subField ] = field.split('.');
|
|
156
160
|
// merge the data field instead of replacing it
|
|
157
161
|
if (containerField && subField) {
|
|
@@ -162,13 +166,12 @@ var RuleForm = /*#__PURE__*/function (_Component2) {
|
|
|
162
166
|
|
|
163
167
|
return _this3.props.setData(field, value);
|
|
164
168
|
});
|
|
165
|
-
_defineProperty(_this3, "submit", function () {
|
|
169
|
+
_defineProperty(_assertThisInitialized(_this3), "submit", function () {
|
|
166
170
|
_this3.props.postData();
|
|
167
171
|
});
|
|
168
172
|
return _this3;
|
|
169
173
|
}
|
|
170
|
-
|
|
171
|
-
return _createClass(RuleForm, [{
|
|
174
|
+
_createClass(RuleForm, [{
|
|
172
175
|
key: "renderList",
|
|
173
176
|
value: function renderList() {
|
|
174
177
|
return /*#__PURE__*/_react["default"].createElement(ConnectedRuleList, {
|
|
@@ -183,6 +186,7 @@ var RuleForm = /*#__PURE__*/function (_Component2) {
|
|
|
183
186
|
if (!ruleType) {
|
|
184
187
|
return null; // nothing to render if no rule type selected
|
|
185
188
|
}
|
|
189
|
+
|
|
186
190
|
var Form = _RuleForms.formsByType[ruleType.identifier];
|
|
187
191
|
if (!Form) {
|
|
188
192
|
return /*#__PURE__*/_react["default"].createElement("div", null, "Form does not exist for the rule type '", ruleType.identifier, "'. Create one first.");
|
|
@@ -210,5 +214,6 @@ var RuleForm = /*#__PURE__*/function (_Component2) {
|
|
|
210
214
|
});
|
|
211
215
|
}
|
|
212
216
|
}]);
|
|
217
|
+
return RuleForm;
|
|
213
218
|
}(_react.Component);
|
|
214
219
|
var _default = exports["default"] = (0, _DefaultConnectedForm.connectDefault)(RuleForm, _Actions.REDUCER_NAME, _Actions["default"].setFieldData, _Actions["default"].postData, _Actions["default"].hideDetails, _Actions["default"].customAction);
|
|
@@ -17,13 +17,13 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
17
17
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
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); }
|
|
20
|
-
function
|
|
20
|
+
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); }
|
|
21
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
22
|
+
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); }; }
|
|
21
23
|
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); }
|
|
22
24
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
23
25
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
26
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
25
|
-
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); }
|
|
26
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
27
27
|
var keyPath = function keyPath(key) {
|
|
28
28
|
return "ruleEditor.ruleTypes.additionaloption.".concat(key);
|
|
29
29
|
};
|
|
@@ -36,12 +36,13 @@ var formFields = [(0, _RuleForm.createTextDescriptor)(keyPath('optionText')), (0
|
|
|
36
36
|
label: keyPath('dataOptionLabel')
|
|
37
37
|
}))];
|
|
38
38
|
var AdditionalOption = exports["default"] = /*#__PURE__*/function (_React$Component) {
|
|
39
|
+
_inherits(AdditionalOption, _React$Component);
|
|
40
|
+
var _super = _createSuper(AdditionalOption);
|
|
39
41
|
function AdditionalOption() {
|
|
40
42
|
_classCallCheck(this, AdditionalOption);
|
|
41
|
-
return
|
|
43
|
+
return _super.apply(this, arguments);
|
|
42
44
|
}
|
|
43
|
-
|
|
44
|
-
return _createClass(AdditionalOption, [{
|
|
45
|
+
_createClass(AdditionalOption, [{
|
|
45
46
|
key: "render",
|
|
46
47
|
value: function render() {
|
|
47
48
|
var optionA = (0, _lodash.get)(this.props, 'data.option.value.label', inlineLabel('optionLabel'));
|
|
@@ -54,4 +55,5 @@ var AdditionalOption = exports["default"] = /*#__PURE__*/function (_React$Compon
|
|
|
54
55
|
}));
|
|
55
56
|
}
|
|
56
57
|
}]);
|
|
58
|
+
return AdditionalOption;
|
|
57
59
|
}(_react["default"].Component);
|
package/Screens/Creator/Components/Rules/Containers/RuleForms/AttributeValueGroupAutoSwitch.js
CHANGED
|
@@ -17,13 +17,13 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
17
17
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
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); }
|
|
20
|
-
function
|
|
20
|
+
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); }
|
|
21
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
22
|
+
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); }; }
|
|
21
23
|
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); }
|
|
22
24
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
23
25
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
26
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
25
|
-
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); }
|
|
26
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
27
27
|
var keyPath = function keyPath(key) {
|
|
28
28
|
return "ruleEditor.ruleTypes.attribute_value_group_auto_switch.".concat(key);
|
|
29
29
|
};
|
|
@@ -38,12 +38,13 @@ var formFields = [(0, _RuleForm.createTextDescriptor)(keyPath('attributeText')),
|
|
|
38
38
|
labelPlacement: 'end'
|
|
39
39
|
}))];
|
|
40
40
|
var AttributeValueGroupAutoSwitch = exports["default"] = /*#__PURE__*/function (_React$Component) {
|
|
41
|
+
_inherits(AttributeValueGroupAutoSwitch, _React$Component);
|
|
42
|
+
var _super = _createSuper(AttributeValueGroupAutoSwitch);
|
|
41
43
|
function AttributeValueGroupAutoSwitch() {
|
|
42
44
|
_classCallCheck(this, AttributeValueGroupAutoSwitch);
|
|
43
|
-
return
|
|
45
|
+
return _super.apply(this, arguments);
|
|
44
46
|
}
|
|
45
|
-
|
|
46
|
-
return _createClass(AttributeValueGroupAutoSwitch, [{
|
|
47
|
+
_createClass(AttributeValueGroupAutoSwitch, [{
|
|
47
48
|
key: "render",
|
|
48
49
|
value: function render() {
|
|
49
50
|
var attribute = (0, _lodash.get)(this.props, 'data.data.value.attribute_identifier', inlineLabel('attributeLabel'));
|
|
@@ -54,4 +55,5 @@ var AttributeValueGroupAutoSwitch = exports["default"] = /*#__PURE__*/function (
|
|
|
54
55
|
}));
|
|
55
56
|
}
|
|
56
57
|
}]);
|
|
58
|
+
return AttributeValueGroupAutoSwitch;
|
|
57
59
|
}(_react["default"].Component);
|
|
@@ -17,13 +17,13 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
17
17
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
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); }
|
|
20
|
-
function
|
|
20
|
+
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); }
|
|
21
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
22
|
+
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); }; }
|
|
21
23
|
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); }
|
|
22
24
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
23
25
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
26
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
25
|
-
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); }
|
|
26
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
27
27
|
var keyPath = function keyPath(key) {
|
|
28
28
|
return "ruleEditor.ruleTypes.defaultoption.".concat(key);
|
|
29
29
|
};
|
|
@@ -34,12 +34,13 @@ var formFields = [(0, _RuleForm.createTextDescriptor)(keyPath('optionText')), (0
|
|
|
34
34
|
label: keyPath('optionLabel')
|
|
35
35
|
}))];
|
|
36
36
|
var DefaultOption = exports["default"] = /*#__PURE__*/function (_React$Component) {
|
|
37
|
+
_inherits(DefaultOption, _React$Component);
|
|
38
|
+
var _super = _createSuper(DefaultOption);
|
|
37
39
|
function DefaultOption() {
|
|
38
40
|
_classCallCheck(this, DefaultOption);
|
|
39
|
-
return
|
|
41
|
+
return _super.apply(this, arguments);
|
|
40
42
|
}
|
|
41
|
-
|
|
42
|
-
return _createClass(DefaultOption, [{
|
|
43
|
+
_createClass(DefaultOption, [{
|
|
43
44
|
key: "render",
|
|
44
45
|
value: function render() {
|
|
45
46
|
var option = (0, _lodash.get)(this.props, 'data.data.value.option_identifier', inlineLabel('optionLabel'));
|
|
@@ -50,4 +51,5 @@ var DefaultOption = exports["default"] = /*#__PURE__*/function (_React$Component
|
|
|
50
51
|
}));
|
|
51
52
|
}
|
|
52
53
|
}]);
|
|
54
|
+
return DefaultOption;
|
|
53
55
|
}(_react["default"].Component);
|
|
@@ -17,13 +17,13 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
17
17
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
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); }
|
|
20
|
-
function
|
|
20
|
+
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); }
|
|
21
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
22
|
+
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); }; }
|
|
21
23
|
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); }
|
|
22
24
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
23
25
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
26
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
25
|
-
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); }
|
|
26
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
27
27
|
var keyPath = function keyPath(key) {
|
|
28
28
|
return "ruleEditor.ruleTypes.itemattributematch.".concat(key);
|
|
29
29
|
};
|
|
@@ -34,12 +34,13 @@ var formFields = [(0, _RuleForm.createTextDescriptor)(keyPath('attributeText')),
|
|
|
34
34
|
label: keyPath('attributeLabel')
|
|
35
35
|
}))];
|
|
36
36
|
var ItemAttributeMatch = exports["default"] = /*#__PURE__*/function (_React$Component) {
|
|
37
|
+
_inherits(ItemAttributeMatch, _React$Component);
|
|
38
|
+
var _super = _createSuper(ItemAttributeMatch);
|
|
37
39
|
function ItemAttributeMatch() {
|
|
38
40
|
_classCallCheck(this, ItemAttributeMatch);
|
|
39
|
-
return
|
|
41
|
+
return _super.apply(this, arguments);
|
|
40
42
|
}
|
|
41
|
-
|
|
42
|
-
return _createClass(ItemAttributeMatch, [{
|
|
43
|
+
_createClass(ItemAttributeMatch, [{
|
|
43
44
|
key: "render",
|
|
44
45
|
value: function render() {
|
|
45
46
|
var attribute = (0, _lodash.get)(this.props, 'data.data.value.attribute_identifier', inlineLabel('attributeLabel'));
|
|
@@ -50,4 +51,5 @@ var ItemAttributeMatch = exports["default"] = /*#__PURE__*/function (_React$Comp
|
|
|
50
51
|
}));
|
|
51
52
|
}
|
|
52
53
|
}]);
|
|
54
|
+
return ItemAttributeMatch;
|
|
53
55
|
}(_react["default"].Component);
|