@configuratorware/configurator-admingui 1.56.2 → 1.56.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App/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
|
@@ -14,15 +14,22 @@ var _i18n = require("../App/i18n");
|
|
|
14
14
|
var _lodash = require("lodash");
|
|
15
15
|
var _CircularProgress = _interopRequireDefault(require("@material-ui/core/CircularProgress"));
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
-
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
|
|
17
|
+
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); }
|
|
18
18
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
19
19
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20
20
|
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; } }
|
|
21
21
|
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; }
|
|
22
22
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
23
23
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
24
|
+
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 }; })(); }
|
|
25
|
+
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"); }
|
|
26
|
+
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; }; }
|
|
27
|
+
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(); }); }
|
|
28
|
+
function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
|
|
29
|
+
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); }
|
|
24
30
|
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 }; })(); }
|
|
25
31
|
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); }
|
|
32
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
26
33
|
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); }
|
|
27
34
|
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); }); }; }
|
|
28
35
|
var ctaFields = [{
|
|
@@ -44,16 +51,19 @@ var sourceConfig = {
|
|
|
44
51
|
},
|
|
45
52
|
value: 'value'
|
|
46
53
|
};
|
|
47
|
-
var loadDefaultClient = (0, _newestRequest.newestRequest)(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/
|
|
54
|
+
var loadDefaultClient = (0, _newestRequest.newestRequest)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
48
55
|
var response;
|
|
49
|
-
return
|
|
50
|
-
while (1) switch (_context.
|
|
56
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
57
|
+
while (1) switch (_context.prev = _context.next) {
|
|
51
58
|
case 0:
|
|
52
|
-
_context.
|
|
59
|
+
_context.next = 2;
|
|
53
60
|
return (0, _lazyFetch.lazyFetch)(_Actions.URL);
|
|
54
|
-
case
|
|
55
|
-
response = _context.
|
|
56
|
-
return _context.
|
|
61
|
+
case 2:
|
|
62
|
+
response = _context.sent;
|
|
63
|
+
return _context.abrupt("return", response.data);
|
|
64
|
+
case 4:
|
|
65
|
+
case "end":
|
|
66
|
+
return _context.stop();
|
|
57
67
|
}
|
|
58
68
|
}, _callee);
|
|
59
69
|
})));
|
|
@@ -71,20 +81,20 @@ var CallToActionField = exports.CallToActionField = (0, _reactRedux.connect)()(f
|
|
|
71
81
|
loading = _useState4[0],
|
|
72
82
|
setLoading = _useState4[1];
|
|
73
83
|
(0, _react.useEffect)(function () {
|
|
74
|
-
_asyncToGenerator(/*#__PURE__*/
|
|
84
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
75
85
|
var defaultClient, defaultCTALabel;
|
|
76
|
-
return
|
|
77
|
-
while (1) switch (_context2.
|
|
86
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
87
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
78
88
|
case 0:
|
|
79
89
|
if (!dynamicDefaultLabel) {
|
|
80
|
-
_context2.
|
|
90
|
+
_context2.next = 10;
|
|
81
91
|
break;
|
|
82
92
|
}
|
|
83
93
|
setLoading(true);
|
|
84
|
-
_context2.
|
|
94
|
+
_context2.next = 4;
|
|
85
95
|
return loadDefaultClient();
|
|
86
|
-
case
|
|
87
|
-
defaultClient = _context2.
|
|
96
|
+
case 4:
|
|
97
|
+
defaultClient = _context2.sent;
|
|
88
98
|
defaultCTALabel = (0, _i18n.T)("callToActionDefault.".concat((0, _lodash.get)(defaultClient, 'callToAction')));
|
|
89
99
|
setSource([{
|
|
90
100
|
value: '',
|
|
@@ -93,16 +103,17 @@ var CallToActionField = exports.CallToActionField = (0, _reactRedux.connect)()(f
|
|
|
93
103
|
translate: false
|
|
94
104
|
}].concat(ctaFields));
|
|
95
105
|
setLoading(false);
|
|
96
|
-
_context2.
|
|
106
|
+
_context2.next = 11;
|
|
97
107
|
break;
|
|
98
|
-
case
|
|
108
|
+
case 10:
|
|
99
109
|
setSource([{
|
|
100
110
|
value: '',
|
|
101
111
|
label: 'Default',
|
|
102
112
|
id: 'Default'
|
|
103
113
|
}].concat(ctaFields));
|
|
104
|
-
case
|
|
105
|
-
|
|
114
|
+
case 11:
|
|
115
|
+
case "end":
|
|
116
|
+
return _context2.stop();
|
|
106
117
|
}
|
|
107
118
|
}, _callee2);
|
|
108
119
|
}))();
|
package/Components/CopyPaste.js
CHANGED
|
@@ -14,36 +14,37 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
14
14
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
15
|
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); } }
|
|
16
16
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
-
function
|
|
17
|
+
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); }
|
|
18
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
19
|
+
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); }; }
|
|
18
20
|
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); }
|
|
19
21
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
20
22
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
23
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
22
|
-
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); }
|
|
23
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
24
24
|
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; }
|
|
25
25
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
26
26
|
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); }
|
|
27
27
|
var CopyPaste = /*#__PURE__*/function (_React$Component) {
|
|
28
|
+
_inherits(CopyPaste, _React$Component);
|
|
29
|
+
var _super = _createSuper(CopyPaste);
|
|
28
30
|
function CopyPaste(props) {
|
|
29
31
|
var _this;
|
|
30
32
|
_classCallCheck(this, CopyPaste);
|
|
31
|
-
_this =
|
|
32
|
-
_defineProperty(_this, "copy", function () {
|
|
33
|
+
_this = _super.call(this, props);
|
|
34
|
+
_defineProperty(_assertThisInitialized(_this), "copy", function () {
|
|
33
35
|
var data = _lodash["default"].cloneDeep(_this.props.data);
|
|
34
36
|
if (!_lodash["default"].isEmpty(data)) {
|
|
35
37
|
CopyPaste.dataByType[_this.type] = data;
|
|
36
38
|
}
|
|
37
39
|
});
|
|
38
|
-
_defineProperty(_this, "paste", function () {
|
|
40
|
+
_defineProperty(_assertThisInitialized(_this), "paste", function () {
|
|
39
41
|
var data = _lodash["default"].cloneDeep(CopyPaste.dataByType[_this.type]);
|
|
40
42
|
_this.props.paste(data);
|
|
41
43
|
});
|
|
42
44
|
_this.type = props.type || 'global';
|
|
43
45
|
return _this;
|
|
44
46
|
}
|
|
45
|
-
|
|
46
|
-
return _createClass(CopyPaste, [{
|
|
47
|
+
_createClass(CopyPaste, [{
|
|
47
48
|
key: "render",
|
|
48
49
|
value: function render() {
|
|
49
50
|
var disabled = _lodash["default"].isEmpty(CopyPaste.dataByType[this.type]);
|
|
@@ -66,6 +67,7 @@ var CopyPaste = /*#__PURE__*/function (_React$Component) {
|
|
|
66
67
|
}));
|
|
67
68
|
}
|
|
68
69
|
}]);
|
|
70
|
+
return CopyPaste;
|
|
69
71
|
}(_react["default"].Component);
|
|
70
72
|
_defineProperty(CopyPaste, "dataByType", {});
|
|
71
73
|
CopyPaste.propTypes = {
|
|
@@ -16,20 +16,21 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
16
16
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
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); }
|
|
19
|
-
function
|
|
19
|
+
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); }
|
|
20
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
21
|
+
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); }; }
|
|
20
22
|
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); }
|
|
21
23
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
22
24
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
25
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
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
26
|
var DefaultForm = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
27
|
+
_inherits(DefaultForm, _Component);
|
|
28
|
+
var _super = _createSuper(DefaultForm);
|
|
27
29
|
function DefaultForm() {
|
|
28
30
|
_classCallCheck(this, DefaultForm);
|
|
29
|
-
return
|
|
31
|
+
return _super.apply(this, arguments);
|
|
30
32
|
}
|
|
31
|
-
|
|
32
|
-
return _createClass(DefaultForm, [{
|
|
33
|
+
_createClass(DefaultForm, [{
|
|
33
34
|
key: "render",
|
|
34
35
|
value: function render() {
|
|
35
36
|
var _this$props = this.props,
|
|
@@ -59,6 +60,7 @@ var DefaultForm = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
59
60
|
}) : /*#__PURE__*/_react["default"].createElement("div", null, (0, _i18n.T)('Loading entity data'), "...");
|
|
60
61
|
}
|
|
61
62
|
}]);
|
|
63
|
+
return DefaultForm;
|
|
62
64
|
}(_react.Component);
|
|
63
65
|
var generateDefaultForm = exports.generateDefaultForm = function generateDefaultForm() {
|
|
64
66
|
var formFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -18,13 +18,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
18
18
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
19
19
|
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); } }
|
|
20
20
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
21
|
-
function
|
|
21
|
+
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); }
|
|
22
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
23
|
+
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); }; }
|
|
22
24
|
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); }
|
|
23
25
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
24
26
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
25
27
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
26
|
-
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); }
|
|
27
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
28
28
|
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; }
|
|
29
29
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
30
30
|
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); }
|
|
@@ -42,11 +42,13 @@ var LoadingInfo = (0, _withStyles["default"])(function (theme) {
|
|
|
42
42
|
}, children);
|
|
43
43
|
});
|
|
44
44
|
var DefaultList = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
45
|
+
_inherits(DefaultList, _Component);
|
|
46
|
+
var _super = _createSuper(DefaultList);
|
|
45
47
|
function DefaultList(props) {
|
|
46
48
|
var _this;
|
|
47
49
|
_classCallCheck(this, DefaultList);
|
|
48
|
-
_this =
|
|
49
|
-
_defineProperty(_this, "onRowSelection", function (selectedRows, event) {
|
|
50
|
+
_this = _super.call(this, props);
|
|
51
|
+
_defineProperty(_assertThisInitialized(_this), "onRowSelection", function (selectedRows, event) {
|
|
50
52
|
_this.setState({
|
|
51
53
|
selectedRows: selectedRows
|
|
52
54
|
});
|
|
@@ -65,16 +67,16 @@ var DefaultList = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
65
67
|
_this.props.hideDetails();
|
|
66
68
|
}
|
|
67
69
|
});
|
|
68
|
-
_defineProperty(_this, "clearSelection", function () {
|
|
70
|
+
_defineProperty(_assertThisInitialized(_this), "clearSelection", function () {
|
|
69
71
|
_this.setState({
|
|
70
72
|
selectedRows: []
|
|
71
73
|
});
|
|
72
74
|
});
|
|
73
|
-
_defineProperty(_this, "reloadList", function () {
|
|
75
|
+
_defineProperty(_assertThisInitialized(_this), "reloadList", function () {
|
|
74
76
|
_this.clearSelection();
|
|
75
77
|
_this.props.loadList(_this.state.listParams);
|
|
76
78
|
});
|
|
77
|
-
_defineProperty(_this, "updateListParams", function (params) {
|
|
79
|
+
_defineProperty(_assertThisInitialized(_this), "updateListParams", function (params) {
|
|
78
80
|
var listParams = _this.state.listParams;
|
|
79
81
|
var mergedParams = _lodash["default"].merge({}, listParams, params);
|
|
80
82
|
!_lodash["default"].isEqual(mergedParams, listParams) && _this.setState({
|
|
@@ -83,7 +85,7 @@ var DefaultList = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
83
85
|
_this.reloadList();
|
|
84
86
|
});
|
|
85
87
|
});
|
|
86
|
-
_defineProperty(_this, "removeListParams", function (params) {
|
|
88
|
+
_defineProperty(_assertThisInitialized(_this), "removeListParams", function (params) {
|
|
87
89
|
var listParams = _this.state.listParams;
|
|
88
90
|
_this.setState({
|
|
89
91
|
listParams: _lodash["default"].omit(listParams, params)
|
|
@@ -91,17 +93,18 @@ var DefaultList = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
91
93
|
_this.reloadList();
|
|
92
94
|
});
|
|
93
95
|
});
|
|
94
|
-
_defineProperty(_this, "onSearchChange", function (searchText) {
|
|
96
|
+
_defineProperty(_assertThisInitialized(_this), "onSearchChange", function (searchText) {
|
|
95
97
|
var _query;
|
|
96
98
|
var query = searchText === null || searchText === void 0 ? void 0 : searchText.replace(/\s+/g, ''); // deleting spaces from query text
|
|
97
99
|
if (((_query = query) === null || _query === void 0 ? void 0 : _query.charAt(query.length - 1)) === ',') {
|
|
98
100
|
query = query.substring(0, query.length - 1); // delete last character if it is ','
|
|
99
101
|
}
|
|
102
|
+
|
|
100
103
|
query ? _this.updateListParams({
|
|
101
104
|
query: query
|
|
102
105
|
}) : _this.removeListParams('query');
|
|
103
106
|
});
|
|
104
|
-
_defineProperty(_this, "onPaginationChange", function (_ref2) {
|
|
107
|
+
_defineProperty(_assertThisInitialized(_this), "onPaginationChange", function (_ref2) {
|
|
105
108
|
var first = _ref2.first,
|
|
106
109
|
rowsPerPage = _ref2.rowsPerPage;
|
|
107
110
|
_this.setState({
|
|
@@ -115,7 +118,7 @@ var DefaultList = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
115
118
|
limit: rowsPerPage
|
|
116
119
|
});
|
|
117
120
|
});
|
|
118
|
-
_defineProperty(_this, "onFilterChange", function (column, value, filterKey) {
|
|
121
|
+
_defineProperty(_assertThisInitialized(_this), "onFilterChange", function (column, value, filterKey) {
|
|
119
122
|
var entity = _this.props.listParams.entity;
|
|
120
123
|
var key = filterKey || "".concat(entity, ".").concat(column);
|
|
121
124
|
if (value && value.length > 0) {
|
|
@@ -127,7 +130,7 @@ var DefaultList = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
127
130
|
_this.removeListParams(["filters[\"".concat(key, "\"]")]);
|
|
128
131
|
}
|
|
129
132
|
});
|
|
130
|
-
_defineProperty(_this, "onSortChange", function (column, dir, sortKey) {
|
|
133
|
+
_defineProperty(_assertThisInitialized(_this), "onSortChange", function (column, dir, sortKey) {
|
|
131
134
|
var entity = _this.props.listParams.entity;
|
|
132
135
|
if (dir) {
|
|
133
136
|
_this.updateListParams({
|
|
@@ -138,7 +141,7 @@ var DefaultList = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
138
141
|
_this.removeListParams(['orderby', 'orderdir']);
|
|
139
142
|
}
|
|
140
143
|
});
|
|
141
|
-
_defineProperty(_this, "onDeleteItems", function () {
|
|
144
|
+
_defineProperty(_assertThisInitialized(_this), "onDeleteItems", function () {
|
|
142
145
|
var idsToDelete = _lodash["default"].isArray(_this.state.selectedRows) ? _this.state.selectedRows.map(function (row) {
|
|
143
146
|
return _this.props.list.data[row].id;
|
|
144
147
|
}) : _this.state.selectedRows === 'all' ? _this.props.list.data.map(function (e) {
|
|
@@ -146,7 +149,7 @@ var DefaultList = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
146
149
|
}) : false;
|
|
147
150
|
idsToDelete && _lodash["default"].isFunction(_this.props.onDeleteItems) && _this.props.onDeleteItems(idsToDelete);
|
|
148
151
|
});
|
|
149
|
-
_defineProperty(_this, "onShownColumnsChange", function (shownColumns) {
|
|
152
|
+
_defineProperty(_assertThisInitialized(_this), "onShownColumnsChange", function (shownColumns) {
|
|
150
153
|
_this.props.setConfig({
|
|
151
154
|
shownColumns: shownColumns
|
|
152
155
|
});
|
|
@@ -171,8 +174,7 @@ var DefaultList = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
171
174
|
};
|
|
172
175
|
return _this;
|
|
173
176
|
}
|
|
174
|
-
|
|
175
|
-
return _createClass(DefaultList, [{
|
|
177
|
+
_createClass(DefaultList, [{
|
|
176
178
|
key: "componentDidUpdate",
|
|
177
179
|
value: function componentDidUpdate(prevProps) {
|
|
178
180
|
if (this.props.selected && !_lodash["default"].isEqual(prevProps.selected, this.props.selected)) {
|
|
@@ -252,6 +254,7 @@ var DefaultList = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
252
254
|
}, listProps), this.props.children), error ? /*#__PURE__*/_react["default"].createElement(LoadingInfo, null, (0, _i18n.T)('Listing failed due to the following error'), ": ", error.message) : !list ? /*#__PURE__*/_react["default"].createElement(LoadingInfo, null, (0, _i18n.T)('Loading data'), "...") : !total && /*#__PURE__*/_react["default"].createElement(LoadingInfo, null, (0, _i18n.T)('There are no records')));
|
|
253
255
|
}
|
|
254
256
|
}]);
|
|
257
|
+
return DefaultList;
|
|
255
258
|
}(_react.Component);
|
|
256
259
|
_defineProperty(DefaultList, "defaultProps", {
|
|
257
260
|
config: {},
|
|
@@ -40,25 +40,27 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
40
40
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
41
41
|
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); } }
|
|
42
42
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
43
|
-
function
|
|
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
|
+
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); }; }
|
|
44
46
|
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); }
|
|
45
47
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
46
48
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
47
49
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
48
|
-
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); }
|
|
49
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
50
50
|
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; }
|
|
51
51
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
52
52
|
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); }
|
|
53
53
|
var DefaultScreen = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
54
|
+
_inherits(DefaultScreen, _Component);
|
|
55
|
+
var _super = _createSuper(DefaultScreen);
|
|
54
56
|
function DefaultScreen() {
|
|
55
57
|
var _this;
|
|
56
58
|
_classCallCheck(this, DefaultScreen);
|
|
57
59
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
58
60
|
args[_key] = arguments[_key];
|
|
59
61
|
}
|
|
60
|
-
_this =
|
|
61
|
-
_defineProperty(_this, "routerWillLeave", function (nextLocation) {
|
|
62
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
63
|
+
_defineProperty(_assertThisInitialized(_this), "routerWillLeave", function (nextLocation) {
|
|
62
64
|
var unsavedEntityAction = _this.props.unsavedEntityAction;
|
|
63
65
|
if (!unsavedEntityAction || nextLocation.state && nextLocation.state.canLeave) {
|
|
64
66
|
_this.props.showDetails && _this.props.hideDetailsAction();
|
|
@@ -76,8 +78,7 @@ var DefaultScreen = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
76
78
|
});
|
|
77
79
|
return _this;
|
|
78
80
|
}
|
|
79
|
-
|
|
80
|
-
return _createClass(DefaultScreen, [{
|
|
81
|
+
_createClass(DefaultScreen, [{
|
|
81
82
|
key: "componentDidMount",
|
|
82
83
|
value: function componentDidMount() {
|
|
83
84
|
this.props.showDetails && this.props.hideDetailsAction();
|
|
@@ -117,6 +118,7 @@ var DefaultScreen = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
117
118
|
}, otherProps));
|
|
118
119
|
}
|
|
119
120
|
}]);
|
|
121
|
+
return DefaultScreen;
|
|
120
122
|
}(_react.Component);
|
|
121
123
|
_defineProperty(DefaultScreen, "defaultProps", {
|
|
122
124
|
title: null,
|
package/Components/Form.js
CHANGED
|
@@ -33,13 +33,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
33
33
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
34
34
|
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); } }
|
|
35
35
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
36
|
-
function
|
|
36
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
37
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
38
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
37
39
|
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
38
40
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
39
41
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
40
42
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
41
|
-
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); }
|
|
42
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
43
43
|
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; }
|
|
44
44
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
45
45
|
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); }
|
|
@@ -155,25 +155,27 @@ var Form = exports.Form = function Form(props) {
|
|
|
155
155
|
});
|
|
156
156
|
};
|
|
157
157
|
var ConfigurableForm = exports.ConfigurableForm = /*#__PURE__*/function (_Component) {
|
|
158
|
+
_inherits(ConfigurableForm, _Component);
|
|
159
|
+
var _super = _createSuper(ConfigurableForm);
|
|
158
160
|
function ConfigurableForm() {
|
|
159
161
|
var _this;
|
|
160
162
|
_classCallCheck(this, ConfigurableForm);
|
|
161
163
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
162
164
|
args[_key] = arguments[_key];
|
|
163
165
|
}
|
|
164
|
-
_this =
|
|
165
|
-
_defineProperty(_this, "onSubmit", _this.props.onSubmit);
|
|
166
|
-
_defineProperty(_this, "onCancel", _this.props.onCancel);
|
|
167
|
-
_defineProperty(_this, "onChange", function (name, value) {
|
|
166
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
167
|
+
_defineProperty(_assertThisInitialized(_this), "onSubmit", _this.props.onSubmit);
|
|
168
|
+
_defineProperty(_assertThisInitialized(_this), "onCancel", _this.props.onCancel);
|
|
169
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (name, value) {
|
|
168
170
|
return _this.props.onChange(name, value);
|
|
169
171
|
});
|
|
170
|
-
_defineProperty(_this, "onAction", function (type, data) {
|
|
172
|
+
_defineProperty(_assertThisInitialized(_this), "onAction", function (type, data) {
|
|
171
173
|
return _this.props.onAction(type, data);
|
|
172
174
|
});
|
|
173
|
-
_defineProperty(_this, "onKeyPress", function (e) {
|
|
175
|
+
_defineProperty(_assertThisInitialized(_this), "onKeyPress", function (e) {
|
|
174
176
|
return e.charCode === 13 && _this.props.onSubmit();
|
|
175
177
|
});
|
|
176
|
-
_defineProperty(_this, "renderWrappedInput", function (input, key) {
|
|
178
|
+
_defineProperty(_assertThisInitialized(_this), "renderWrappedInput", function (input, key) {
|
|
177
179
|
var data = _this.props.data;
|
|
178
180
|
if (!input) {
|
|
179
181
|
throw new Error('No input defined!');
|
|
@@ -225,6 +227,7 @@ var ConfigurableForm = exports.ConfigurableForm = /*#__PURE__*/function (_Compon
|
|
|
225
227
|
dataReference: data // update fields with no direct data binding (technical wrappers)
|
|
226
228
|
});
|
|
227
229
|
}
|
|
230
|
+
|
|
228
231
|
if (input.calculateProps) {
|
|
229
232
|
props = _objectSpread(_objectSpread({}, props), input.calculateProps({
|
|
230
233
|
props: props,
|
|
@@ -239,8 +242,7 @@ var ConfigurableForm = exports.ConfigurableForm = /*#__PURE__*/function (_Compon
|
|
|
239
242
|
});
|
|
240
243
|
return _this;
|
|
241
244
|
}
|
|
242
|
-
|
|
243
|
-
return _createClass(ConfigurableForm, [{
|
|
245
|
+
_createClass(ConfigurableForm, [{
|
|
244
246
|
key: "componentDidMount",
|
|
245
247
|
value: function componentDidMount() {
|
|
246
248
|
if (this.props.submitOnEnter) {
|
|
@@ -279,5 +281,6 @@ var ConfigurableForm = exports.ConfigurableForm = /*#__PURE__*/function (_Compon
|
|
|
279
281
|
}), children, innerElementBottom));
|
|
280
282
|
}
|
|
281
283
|
}]);
|
|
284
|
+
return ConfigurableForm;
|
|
282
285
|
}(_react.Component);
|
|
283
286
|
var _default = exports["default"] = ConfigurableForm;
|
|
@@ -13,42 +13,43 @@ var _i18n = require("../../App/i18n");
|
|
|
13
13
|
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 _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
15
|
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); }
|
|
16
|
-
function _readOnlyError(r) { throw new TypeError('"' + r + '" is read-only'); }
|
|
17
16
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
18
17
|
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); } }
|
|
19
18
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
20
|
-
function
|
|
19
|
+
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); }
|
|
20
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
21
|
+
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
22
|
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
23
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
23
24
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
25
|
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
26
|
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
27
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
29
28
|
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
29
|
var AttributeValueChip = /*#__PURE__*/function (_React$Component) {
|
|
30
|
+
_inherits(AttributeValueChip, _React$Component);
|
|
31
|
+
var _super = _createSuper(AttributeValueChip);
|
|
31
32
|
function AttributeValueChip() {
|
|
32
33
|
var _this;
|
|
33
34
|
_classCallCheck(this, AttributeValueChip);
|
|
34
35
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
35
36
|
args[_key] = arguments[_key];
|
|
36
37
|
}
|
|
37
|
-
_this =
|
|
38
|
-
_defineProperty(_this, "state", {
|
|
38
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
39
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
39
40
|
placeholder: ''
|
|
40
41
|
});
|
|
41
|
-
_defineProperty(_this, "isNumericAttributeType", function () {
|
|
42
|
+
_defineProperty(_assertThisInitialized(_this), "isNumericAttributeType", function () {
|
|
42
43
|
var type = (0, _lodash.get)(_this.props, 'schema._data.attributedatatype.value');
|
|
43
44
|
return type === 'integer' || type === 'number';
|
|
44
45
|
});
|
|
45
|
-
_defineProperty(_this, "loadSourceDebounced", (0, _lodash.debounce)(_this.loadSource, 300));
|
|
46
|
-
_defineProperty(_this, "onUpdateInput", function (query) {
|
|
46
|
+
_defineProperty(_assertThisInitialized(_this), "loadSourceDebounced", (0, _lodash.debounce)(_this.loadSource, 300));
|
|
47
|
+
_defineProperty(_assertThisInitialized(_this), "onUpdateInput", function (query) {
|
|
47
48
|
if (query !== '') {
|
|
48
49
|
_this.loadSourceDebounced(query);
|
|
49
50
|
}
|
|
50
51
|
});
|
|
51
|
-
_defineProperty(_this, "onRequestAdd", function (chip) {
|
|
52
|
+
_defineProperty(_assertThisInitialized(_this), "onRequestAdd", function (chip) {
|
|
52
53
|
var _this$props = _this.props,
|
|
53
54
|
name = _this$props.name,
|
|
54
55
|
source = _this$props.source,
|
|
@@ -78,7 +79,7 @@ var AttributeValueChip = /*#__PURE__*/function (_React$Component) {
|
|
|
78
79
|
items.push(item);
|
|
79
80
|
onChange(name, items);
|
|
80
81
|
});
|
|
81
|
-
_defineProperty(_this, "onRequestDelete", function (text, idx) {
|
|
82
|
+
_defineProperty(_assertThisInitialized(_this), "onRequestDelete", function (text, idx) {
|
|
82
83
|
var _this$props2 = _this.props,
|
|
83
84
|
name = _this$props2.name,
|
|
84
85
|
onChange = _this$props2.onChange,
|
|
@@ -89,7 +90,7 @@ var AttributeValueChip = /*#__PURE__*/function (_React$Component) {
|
|
|
89
90
|
onChange(name, items);
|
|
90
91
|
}
|
|
91
92
|
});
|
|
92
|
-
_defineProperty(_this, "onFocus", function (evt) {
|
|
93
|
+
_defineProperty(_assertThisInitialized(_this), "onFocus", function (evt) {
|
|
93
94
|
_this.loadInitialSource();
|
|
94
95
|
var placeholder = (0, _i18n.t)(_this.isNumericAttributeType() ? 'item.attributes.searchOrAddNumbericAttributeValue' : 'item.attributes.searchOrAddAttributeValue');
|
|
95
96
|
_this.setState({
|
|
@@ -98,14 +99,14 @@ var AttributeValueChip = /*#__PURE__*/function (_React$Component) {
|
|
|
98
99
|
var onFocus = _this.props.onFocus;
|
|
99
100
|
onFocus && onFocus(evt);
|
|
100
101
|
});
|
|
101
|
-
_defineProperty(_this, "onBlur", function (evt) {
|
|
102
|
+
_defineProperty(_assertThisInitialized(_this), "onBlur", function (evt) {
|
|
102
103
|
var onBlur = _this.props.onBlur;
|
|
103
104
|
_this.setState({
|
|
104
105
|
placeholder: null
|
|
105
106
|
});
|
|
106
107
|
onBlur && onBlur(evt);
|
|
107
108
|
});
|
|
108
|
-
_defineProperty(_this, "onInputEnterKey", function (evt) {
|
|
109
|
+
_defineProperty(_assertThisInitialized(_this), "onInputEnterKey", function (evt) {
|
|
109
110
|
_this.triggerChange({
|
|
110
111
|
id: null,
|
|
111
112
|
value: evt.target.value,
|
|
@@ -114,8 +115,7 @@ var AttributeValueChip = /*#__PURE__*/function (_React$Component) {
|
|
|
114
115
|
});
|
|
115
116
|
return _this;
|
|
116
117
|
}
|
|
117
|
-
|
|
118
|
-
return _createClass(AttributeValueChip, [{
|
|
118
|
+
_createClass(AttributeValueChip, [{
|
|
119
119
|
key: "loadInitialSource",
|
|
120
120
|
value: function loadInitialSource() {
|
|
121
121
|
var _this$props3 = this.props,
|
|
@@ -198,6 +198,7 @@ var AttributeValueChip = /*#__PURE__*/function (_React$Component) {
|
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
}]);
|
|
201
|
+
return AttributeValueChip;
|
|
201
202
|
}(_react["default"].Component);
|
|
202
203
|
_defineProperty(AttributeValueChip, "propTypes", {
|
|
203
204
|
sourceConfig: _ChipInput.propTypes.dataSourceConfig
|