@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
|
@@ -24,32 +24,33 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
24
24
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
25
25
|
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); } }
|
|
26
26
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
27
|
-
function
|
|
27
|
+
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); }
|
|
28
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
29
|
+
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); }; }
|
|
28
30
|
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); }
|
|
29
31
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
30
32
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
31
33
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
32
|
-
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); }
|
|
33
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
34
34
|
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; }
|
|
35
35
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
36
36
|
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); }
|
|
37
37
|
var IntlInputHoc = function IntlInputHoc(IntlInputComponent) {
|
|
38
38
|
var IntlInputWrapper = /*#__PURE__*/function (_Component) {
|
|
39
|
+
_inherits(IntlInputWrapper, _Component);
|
|
40
|
+
var _super = _createSuper(IntlInputWrapper);
|
|
39
41
|
function IntlInputWrapper() {
|
|
40
42
|
var _this;
|
|
41
43
|
_classCallCheck(this, IntlInputWrapper);
|
|
42
44
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
45
|
args[_key] = arguments[_key];
|
|
44
46
|
}
|
|
45
|
-
_this =
|
|
46
|
-
_defineProperty(_this, "onChange", function (name, value) {
|
|
47
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
48
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (name, value) {
|
|
47
49
|
_this.props.onChange(name, value, _this.props.locale);
|
|
48
50
|
});
|
|
49
51
|
return _this;
|
|
50
52
|
}
|
|
51
|
-
|
|
52
|
-
return _createClass(IntlInputWrapper, [{
|
|
53
|
+
_createClass(IntlInputWrapper, [{
|
|
53
54
|
key: "render",
|
|
54
55
|
value: function render() {
|
|
55
56
|
return /*#__PURE__*/_react["default"].createElement(IntlInputComponent, _extends({}, this.props, {
|
|
@@ -57,18 +58,21 @@ var IntlInputHoc = function IntlInputHoc(IntlInputComponent) {
|
|
|
57
58
|
}));
|
|
58
59
|
}
|
|
59
60
|
}]);
|
|
61
|
+
return IntlInputWrapper;
|
|
60
62
|
}(_react.Component);
|
|
61
63
|
var IntlInput = /*#__PURE__*/function (_Component2) {
|
|
64
|
+
_inherits(IntlInput, _Component2);
|
|
65
|
+
var _super2 = _createSuper(IntlInput);
|
|
62
66
|
function IntlInput(props) {
|
|
63
67
|
var _this2;
|
|
64
68
|
_classCallCheck(this, IntlInput);
|
|
65
|
-
_this2 =
|
|
66
|
-
_defineProperty(_this2, "onToggle", function () {
|
|
69
|
+
_this2 = _super2.call(this, props);
|
|
70
|
+
_defineProperty(_assertThisInitialized(_this2), "onToggle", function () {
|
|
67
71
|
_this2.setState({
|
|
68
72
|
open: !_this2.state.open
|
|
69
73
|
});
|
|
70
74
|
});
|
|
71
|
-
_defineProperty(_this2, "onChange", function (name, value, locale) {
|
|
75
|
+
_defineProperty(_assertThisInitialized(_this2), "onChange", function (name, value, locale) {
|
|
72
76
|
var values = [].concat(_this2.props.value || []),
|
|
73
77
|
entity = _lodash["default"].find(values, {
|
|
74
78
|
language: locale
|
|
@@ -88,8 +92,7 @@ var IntlInputHoc = function IntlInputHoc(IntlInputComponent) {
|
|
|
88
92
|
_this2.locales = (0, _i18n.getAvailableLocales)();
|
|
89
93
|
return _this2;
|
|
90
94
|
}
|
|
91
|
-
|
|
92
|
-
return _createClass(IntlInput, [{
|
|
95
|
+
_createClass(IntlInput, [{
|
|
93
96
|
key: "render",
|
|
94
97
|
value: function render() {
|
|
95
98
|
var open = this.state.open;
|
|
@@ -111,7 +114,7 @@ var IntlInputHoc = function IntlInputHoc(IntlInputComponent) {
|
|
|
111
114
|
props.locale = _locale;
|
|
112
115
|
props.type = props.intl.type;
|
|
113
116
|
props.value = value;
|
|
114
|
-
tfs.push(/*#__PURE__*/_react["default"].createElement(IntlInputWrapper, _extends({}, props, {
|
|
117
|
+
tfs.push( /*#__PURE__*/_react["default"].createElement(IntlInputWrapper, _extends({}, props, {
|
|
115
118
|
onChange: this.onChange,
|
|
116
119
|
key: props.name + props.intl.name + locale
|
|
117
120
|
})));
|
|
@@ -134,6 +137,7 @@ var IntlInputHoc = function IntlInputHoc(IntlInputComponent) {
|
|
|
134
137
|
}, /*#__PURE__*/_react["default"].createElement(_TranslateIcon["default"], iconProps))));
|
|
135
138
|
}
|
|
136
139
|
}]);
|
|
140
|
+
return IntlInput;
|
|
137
141
|
}(_react.Component);
|
|
138
142
|
var mapStateToProps = function mapStateToProps(_ref) {
|
|
139
143
|
var i18n = _ref.i18n;
|
|
@@ -19,24 +19,26 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
19
19
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
20
20
|
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); } }
|
|
21
21
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
22
|
-
function
|
|
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
|
+
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); }; }
|
|
23
25
|
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); }
|
|
24
26
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
25
27
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
28
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
27
|
-
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); }
|
|
28
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
29
29
|
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; }
|
|
30
30
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
31
31
|
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); }
|
|
32
32
|
var nestedDataComponent = function nestedDataComponent(NestingComponent) {
|
|
33
33
|
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
34
34
|
var NestedDataHOC = /*#__PURE__*/function (_Component) {
|
|
35
|
+
_inherits(NestedDataHOC, _Component);
|
|
36
|
+
var _super = _createSuper(NestedDataHOC);
|
|
35
37
|
function NestedDataHOC(_props) {
|
|
36
38
|
var _this;
|
|
37
39
|
_classCallCheck(this, NestedDataHOC);
|
|
38
|
-
_this =
|
|
39
|
-
_defineProperty(_this, "initData", function (schema) {
|
|
40
|
+
_this = _super.call(this, _props);
|
|
41
|
+
_defineProperty(_assertThisInitialized(_this), "initData", function (schema) {
|
|
40
42
|
var data;
|
|
41
43
|
if (schema instanceof _Data["default"]) {
|
|
42
44
|
data = schema;
|
|
@@ -50,19 +52,19 @@ var nestedDataComponent = function nestedDataComponent(NestingComponent) {
|
|
|
50
52
|
data.addListener(_Data["default"].EventTypes.update, _this.onDataModified);
|
|
51
53
|
return data;
|
|
52
54
|
});
|
|
53
|
-
_defineProperty(_this, "onDataModified", function () {
|
|
55
|
+
_defineProperty(_assertThisInitialized(_this), "onDataModified", function () {
|
|
54
56
|
_this.forceUpdate();
|
|
55
57
|
});
|
|
56
|
-
_defineProperty(_this, "onChange", function (name, value) {
|
|
58
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (name, value) {
|
|
57
59
|
var schema = _this.state.schema;
|
|
58
60
|
schema[name] = value;
|
|
59
61
|
_this.changeListener && _this.changeListener(name, value, schema);
|
|
60
|
-
config.changeCustomizer && config.changeCustomizer.call(_this, name, value);
|
|
62
|
+
config.changeCustomizer && config.changeCustomizer.call(_assertThisInitialized(_this), name, value);
|
|
61
63
|
});
|
|
62
|
-
_defineProperty(_this, "setChangeListener", function (fn) {
|
|
64
|
+
_defineProperty(_assertThisInitialized(_this), "setChangeListener", function (fn) {
|
|
63
65
|
_this.changeListener = fn;
|
|
64
66
|
});
|
|
65
|
-
_defineProperty(_this, "onChangePick", function (names, valueObj) {
|
|
67
|
+
_defineProperty(_assertThisInitialized(_this), "onChangePick", function (names, valueObj) {
|
|
66
68
|
var schema = _this.state.schema;
|
|
67
69
|
// get the given properties from the value object
|
|
68
70
|
if ((0, _lodash.isArray)(names)) {
|
|
@@ -77,7 +79,7 @@ var nestedDataComponent = function nestedDataComponent(NestingComponent) {
|
|
|
77
79
|
schema.updateValues(mappedValues);
|
|
78
80
|
}
|
|
79
81
|
});
|
|
80
|
-
_defineProperty(_this, "renderWrappedInput", function (input, key) {
|
|
82
|
+
_defineProperty(_assertThisInitialized(_this), "renderWrappedInput", function (input, key) {
|
|
81
83
|
var _input = input,
|
|
82
84
|
name = _input.name;
|
|
83
85
|
var schema = _this.state.schema;
|
|
@@ -133,8 +135,7 @@ var nestedDataComponent = function nestedDataComponent(NestingComponent) {
|
|
|
133
135
|
};
|
|
134
136
|
return _this;
|
|
135
137
|
}
|
|
136
|
-
|
|
137
|
-
return _createClass(NestedDataHOC, [{
|
|
138
|
+
_createClass(NestedDataHOC, [{
|
|
138
139
|
key: "componentWillMount",
|
|
139
140
|
value: function componentWillMount() {
|
|
140
141
|
var schema = this.props.schema;
|
|
@@ -168,6 +169,7 @@ var nestedDataComponent = function nestedDataComponent(NestingComponent) {
|
|
|
168
169
|
}, props));
|
|
169
170
|
}
|
|
170
171
|
}]);
|
|
172
|
+
return NestedDataHOC;
|
|
171
173
|
}(_react.Component);
|
|
172
174
|
return NestedDataHOC;
|
|
173
175
|
};
|
|
@@ -24,26 +24,28 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
24
24
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
25
25
|
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); } }
|
|
26
26
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
27
|
-
function
|
|
27
|
+
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); }
|
|
28
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
29
|
+
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); }; }
|
|
28
30
|
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); }
|
|
29
31
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
30
32
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
31
33
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
32
|
-
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); }
|
|
33
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
34
34
|
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; }
|
|
35
35
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
36
36
|
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); }
|
|
37
37
|
var SetInputHoc = function SetInputHoc(ArrayInputComponent) {
|
|
38
38
|
var SetInput = /*#__PURE__*/function (_React$Component) {
|
|
39
|
+
_inherits(SetInput, _React$Component);
|
|
40
|
+
var _super = _createSuper(SetInput);
|
|
39
41
|
function SetInput() {
|
|
40
42
|
var _this;
|
|
41
43
|
_classCallCheck(this, SetInput);
|
|
42
44
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
45
|
args[_key] = arguments[_key];
|
|
44
46
|
}
|
|
45
|
-
_this =
|
|
46
|
-
_defineProperty(_this, "onChange", function (key, value) {
|
|
47
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
48
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (key, value) {
|
|
47
49
|
var values = _this.props.value ? _toConsumableArray(_this.props.value) : [];
|
|
48
50
|
var useObjects = _this.props.set.useObjects;
|
|
49
51
|
var _this$props = _this.props,
|
|
@@ -63,8 +65,7 @@ var SetInputHoc = function SetInputHoc(ArrayInputComponent) {
|
|
|
63
65
|
});
|
|
64
66
|
return _this;
|
|
65
67
|
}
|
|
66
|
-
|
|
67
|
-
return _createClass(SetInput, [{
|
|
68
|
+
_createClass(SetInput, [{
|
|
68
69
|
key: "render",
|
|
69
70
|
value: function render() {
|
|
70
71
|
var values = this.props.value;
|
|
@@ -91,7 +92,7 @@ var SetInputHoc = function SetInputHoc(ArrayInputComponent) {
|
|
|
91
92
|
props.onChange = this.onChange;
|
|
92
93
|
props.name = value;
|
|
93
94
|
props.value = (useObjects ? _lodash["default"].findIndex(values, (0, _Utils.generateObjectPropertyStringComparator)(valueKey, value)) : values.indexOf(value)) > -1;
|
|
94
|
-
tfs.push(/*#__PURE__*/_react["default"].createElement(ArrayInputComponent, _extends({}, props, {
|
|
95
|
+
tfs.push( /*#__PURE__*/_react["default"].createElement(ArrayInputComponent, _extends({}, props, {
|
|
95
96
|
key: props.name
|
|
96
97
|
})));
|
|
97
98
|
}
|
|
@@ -109,6 +110,7 @@ var SetInputHoc = function SetInputHoc(ArrayInputComponent) {
|
|
|
109
110
|
}, this.props.label), tfs);
|
|
110
111
|
}
|
|
111
112
|
}]);
|
|
113
|
+
return SetInput;
|
|
112
114
|
}(_react["default"].Component);
|
|
113
115
|
return (0, _styles.withTheme)()(SetInput);
|
|
114
116
|
};
|
|
@@ -17,20 +17,21 @@ 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 SimpleNestedData = /*#__PURE__*/function (_Component) {
|
|
28
|
+
_inherits(SimpleNestedData, _Component);
|
|
29
|
+
var _super = _createSuper(SimpleNestedData);
|
|
28
30
|
function SimpleNestedData() {
|
|
29
31
|
_classCallCheck(this, SimpleNestedData);
|
|
30
|
-
return
|
|
32
|
+
return _super.apply(this, arguments);
|
|
31
33
|
}
|
|
32
|
-
|
|
33
|
-
return _createClass(SimpleNestedData, [{
|
|
34
|
+
_createClass(SimpleNestedData, [{
|
|
34
35
|
key: "componentDidMount",
|
|
35
36
|
value: function componentDidMount() {
|
|
36
37
|
var _this$props = this.props,
|
|
@@ -55,6 +56,7 @@ var SimpleNestedData = /*#__PURE__*/function (_Component) {
|
|
|
55
56
|
}));
|
|
56
57
|
}
|
|
57
58
|
}]);
|
|
59
|
+
return SimpleNestedData;
|
|
58
60
|
}(_react.Component);
|
|
59
61
|
function changeCustomizer(name, value) {
|
|
60
62
|
var _this$props2 = this.props,
|
|
@@ -22,13 +22,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
22
22
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
23
23
|
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); } }
|
|
24
24
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
25
|
-
function
|
|
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
|
+
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); }; }
|
|
26
28
|
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); }
|
|
27
29
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
28
30
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
31
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
30
|
-
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); }
|
|
31
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
32
32
|
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; }
|
|
33
33
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
34
34
|
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); }
|
|
@@ -47,21 +47,23 @@ var tableStyle = {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
var SimpleTable = /*#__PURE__*/function (_Component) {
|
|
50
|
+
_inherits(SimpleTable, _Component);
|
|
51
|
+
var _super = _createSuper(SimpleTable);
|
|
50
52
|
function SimpleTable() {
|
|
51
53
|
var _this;
|
|
52
54
|
_classCallCheck(this, SimpleTable);
|
|
53
55
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
54
56
|
args[_key] = arguments[_key];
|
|
55
57
|
}
|
|
56
|
-
_this =
|
|
57
|
-
_defineProperty(_this, "state", {
|
|
58
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
59
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
58
60
|
filteredData: null,
|
|
59
61
|
filters: {},
|
|
60
62
|
order: {},
|
|
61
63
|
deleteConfirmDialogRowIndex: null,
|
|
62
64
|
selectedRows: []
|
|
63
65
|
});
|
|
64
|
-
_defineProperty(_this, "onFilterChange", function (fieldName, value) {
|
|
66
|
+
_defineProperty(_assertThisInitialized(_this), "onFilterChange", function (fieldName, value) {
|
|
65
67
|
if (value) {
|
|
66
68
|
_this.setState({
|
|
67
69
|
filters: _objectSpread(_objectSpread({}, _this.state.filters), {}, _defineProperty({}, fieldName, value))
|
|
@@ -72,7 +74,7 @@ var SimpleTable = /*#__PURE__*/function (_Component) {
|
|
|
72
74
|
});
|
|
73
75
|
}
|
|
74
76
|
});
|
|
75
|
-
_defineProperty(_this, "onSortChange", function (fieldName, dir) {
|
|
77
|
+
_defineProperty(_assertThisInitialized(_this), "onSortChange", function (fieldName, dir) {
|
|
76
78
|
if (dir) {
|
|
77
79
|
_this.setState({
|
|
78
80
|
order: _objectSpread(_objectSpread({}, _this.state.order), {}, _defineProperty({}, fieldName, dir))
|
|
@@ -83,7 +85,7 @@ var SimpleTable = /*#__PURE__*/function (_Component) {
|
|
|
83
85
|
});
|
|
84
86
|
}
|
|
85
87
|
});
|
|
86
|
-
_defineProperty(_this, "renderDeleteButton", function (rowIndex) {
|
|
88
|
+
_defineProperty(_assertThisInitialized(_this), "renderDeleteButton", function (rowIndex) {
|
|
87
89
|
return _this.props.onDeleteRow && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
88
90
|
onClick: function onClick(e) {
|
|
89
91
|
return e.stopPropagation() || _this.setState({
|
|
@@ -93,7 +95,7 @@ var SimpleTable = /*#__PURE__*/function (_Component) {
|
|
|
93
95
|
style: tableStyle.deleteButton
|
|
94
96
|
}, /*#__PURE__*/_react["default"].createElement(_DeleteForeverIcon["default"], null)), _this.state.deleteConfirmDialogRowIndex === rowIndex && _this.renderConfirmationDialog(rowIndex));
|
|
95
97
|
});
|
|
96
|
-
_defineProperty(_this, "renderConfirmationDialog", function (rowIndex) {
|
|
98
|
+
_defineProperty(_assertThisInitialized(_this), "renderConfirmationDialog", function (rowIndex) {
|
|
97
99
|
return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
98
100
|
title: (0, _i18n.T)('confirmationModal.titleSingle'),
|
|
99
101
|
open: _this.state.deleteConfirmDialogRowIndex !== null,
|
|
@@ -123,8 +125,7 @@ var SimpleTable = /*#__PURE__*/function (_Component) {
|
|
|
123
125
|
});
|
|
124
126
|
return _this;
|
|
125
127
|
}
|
|
126
|
-
|
|
127
|
-
return _createClass(SimpleTable, [{
|
|
128
|
+
_createClass(SimpleTable, [{
|
|
128
129
|
key: "componentDidUpdate",
|
|
129
130
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
130
131
|
var _this$state = this.state,
|
|
@@ -232,5 +233,6 @@ var SimpleTable = /*#__PURE__*/function (_Component) {
|
|
|
232
233
|
})));
|
|
233
234
|
}
|
|
234
235
|
}]);
|
|
236
|
+
return SimpleTable;
|
|
235
237
|
}(_react.Component);
|
|
236
238
|
var _default = exports["default"] = SimpleTable;
|
|
@@ -22,22 +22,24 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
22
22
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
23
23
|
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); } }
|
|
24
24
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
25
|
-
function
|
|
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
|
+
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); }; }
|
|
26
28
|
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); }
|
|
27
29
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
28
30
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
31
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
30
|
-
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); }
|
|
31
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
32
32
|
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; }
|
|
33
33
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
34
34
|
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); }
|
|
35
35
|
var InputTabs = /*#__PURE__*/function (_Component) {
|
|
36
|
+
_inherits(InputTabs, _Component);
|
|
37
|
+
var _super = _createSuper(InputTabs);
|
|
36
38
|
function InputTabs(_props) {
|
|
37
39
|
var _this;
|
|
38
40
|
_classCallCheck(this, InputTabs);
|
|
39
|
-
_this =
|
|
40
|
-
_defineProperty(_this, "initTabData", function (props) {
|
|
41
|
+
_this = _super.call(this, _props);
|
|
42
|
+
_defineProperty(_assertThisInitialized(_this), "initTabData", function (props) {
|
|
41
43
|
var _ref = props || _this.props,
|
|
42
44
|
source = _ref.source,
|
|
43
45
|
sourceConfig = _ref.sourceConfig;
|
|
@@ -50,10 +52,10 @@ var InputTabs = /*#__PURE__*/function (_Component) {
|
|
|
50
52
|
tabData: tabData
|
|
51
53
|
});
|
|
52
54
|
});
|
|
53
|
-
_defineProperty(_this, "assignTabValue", function () {
|
|
55
|
+
_defineProperty(_assertThisInitialized(_this), "assignTabValue", function () {
|
|
54
56
|
_this.props.tabs.assignTabValue && _this.props.tabs.assignTabValue(_this.state.tabValue, _this.props.schema);
|
|
55
57
|
});
|
|
56
|
-
_defineProperty(_this, "onChange", function (name, value) {
|
|
58
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (name, value) {
|
|
57
59
|
var tabs = _this.props.tabs;
|
|
58
60
|
var _this$state = _this.state,
|
|
59
61
|
tabData = _this$state.tabData,
|
|
@@ -71,7 +73,7 @@ var InputTabs = /*#__PURE__*/function (_Component) {
|
|
|
71
73
|
break;
|
|
72
74
|
}
|
|
73
75
|
});
|
|
74
|
-
_defineProperty(_this, "renderWrappedInput", function (input, key, filteredValue, filteredErrors, tabValue) {
|
|
76
|
+
_defineProperty(_assertThisInitialized(_this), "renderWrappedInput", function (input, key, filteredValue, filteredErrors, tabValue) {
|
|
75
77
|
var _this$props = _this.props,
|
|
76
78
|
value = _this$props.value,
|
|
77
79
|
error = _this$props.error,
|
|
@@ -98,7 +100,7 @@ var InputTabs = /*#__PURE__*/function (_Component) {
|
|
|
98
100
|
key: input.name + key
|
|
99
101
|
}));
|
|
100
102
|
});
|
|
101
|
-
_defineProperty(_this, "renderTab", function (tabValue) {
|
|
103
|
+
_defineProperty(_assertThisInitialized(_this), "renderTab", function (tabValue) {
|
|
102
104
|
var _this$state$tabData$t = _this.state.tabData[tabValue],
|
|
103
105
|
filteredValues = _this$state$tabData$t.filteredValues,
|
|
104
106
|
filteredErrors = _this$state$tabData$t.filteredErrors;
|
|
@@ -113,7 +115,7 @@ var InputTabs = /*#__PURE__*/function (_Component) {
|
|
|
113
115
|
throw new Error('Unhandled tab type: ' + tabs.type);
|
|
114
116
|
}
|
|
115
117
|
});
|
|
116
|
-
_defineProperty(_this, "filterValuesAndErrors", function (sourceItem, props) {
|
|
118
|
+
_defineProperty(_assertThisInitialized(_this), "filterValuesAndErrors", function (sourceItem, props) {
|
|
117
119
|
var _ref2 = props || _this.props,
|
|
118
120
|
tabs = _ref2.tabs,
|
|
119
121
|
value = _ref2.value,
|
|
@@ -136,7 +138,7 @@ var InputTabs = /*#__PURE__*/function (_Component) {
|
|
|
136
138
|
filteredErrors: filteredErrors
|
|
137
139
|
};
|
|
138
140
|
});
|
|
139
|
-
_defineProperty(_this, "onTabChange", function (tabValue) {
|
|
141
|
+
_defineProperty(_assertThisInitialized(_this), "onTabChange", function (tabValue) {
|
|
140
142
|
if (_this.state.tabValue !== tabValue) {
|
|
141
143
|
_this.setState({
|
|
142
144
|
tabValue: tabValue
|
|
@@ -151,8 +153,7 @@ var InputTabs = /*#__PURE__*/function (_Component) {
|
|
|
151
153
|
};
|
|
152
154
|
return _this;
|
|
153
155
|
}
|
|
154
|
-
|
|
155
|
-
return _createClass(InputTabs, [{
|
|
156
|
+
_createClass(InputTabs, [{
|
|
156
157
|
key: "componentWillMount",
|
|
157
158
|
value: function componentWillMount() {
|
|
158
159
|
var _this$props2 = this.props,
|
|
@@ -234,5 +235,6 @@ var InputTabs = /*#__PURE__*/function (_Component) {
|
|
|
234
235
|
}, label), component);
|
|
235
236
|
}
|
|
236
237
|
}]);
|
|
238
|
+
return InputTabs;
|
|
237
239
|
}(_react.Component);
|
|
238
240
|
var _default = exports["default"] = (0, _NestedDataComponent["default"])(InputTabs);
|
|
@@ -20,31 +20,32 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
20
20
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
21
21
|
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); } }
|
|
22
22
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
23
|
-
function
|
|
23
|
+
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); }
|
|
24
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
25
|
+
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); }; }
|
|
24
26
|
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); }
|
|
25
27
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
26
28
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
27
29
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
28
|
-
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); }
|
|
29
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
30
30
|
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; }
|
|
31
31
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
32
32
|
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); }
|
|
33
33
|
var Item = /*#__PURE__*/function (_React$Component) {
|
|
34
|
+
_inherits(Item, _React$Component);
|
|
35
|
+
var _super = _createSuper(Item);
|
|
34
36
|
function Item() {
|
|
35
37
|
var _this;
|
|
36
38
|
_classCallCheck(this, Item);
|
|
37
39
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
38
40
|
args[_key] = arguments[_key];
|
|
39
41
|
}
|
|
40
|
-
_this =
|
|
41
|
-
_defineProperty(_this, "onSelect", function () {
|
|
42
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
43
|
+
_defineProperty(_assertThisInitialized(_this), "onSelect", function () {
|
|
42
44
|
_this.props.onSelect(_this.props.item);
|
|
43
45
|
});
|
|
44
46
|
return _this;
|
|
45
47
|
}
|
|
46
|
-
|
|
47
|
-
return _createClass(Item, [{
|
|
48
|
+
_createClass(Item, [{
|
|
48
49
|
key: "renderContent",
|
|
49
50
|
value: function renderContent() {
|
|
50
51
|
var _this$props = this.props,
|
|
@@ -76,6 +77,7 @@ var Item = /*#__PURE__*/function (_React$Component) {
|
|
|
76
77
|
}, /*#__PURE__*/_react["default"].createElement(IconComponent, null)));
|
|
77
78
|
}
|
|
78
79
|
}]);
|
|
80
|
+
return Item;
|
|
79
81
|
}(_react["default"].Component);
|
|
80
82
|
_defineProperty(Item, "defaultProps", {
|
|
81
83
|
IconComponent: _ForwardIcon["default"]
|
|
@@ -91,26 +93,28 @@ var SortableList = (0, _reactSortableHoc.SortableContainer)(function (props) {
|
|
|
91
93
|
}, props.children);
|
|
92
94
|
});
|
|
93
95
|
var TwoSideSelect = /*#__PURE__*/function (_React$Component2) {
|
|
96
|
+
_inherits(TwoSideSelect, _React$Component2);
|
|
97
|
+
var _super2 = _createSuper(TwoSideSelect);
|
|
94
98
|
function TwoSideSelect() {
|
|
95
99
|
var _this2;
|
|
96
100
|
_classCallCheck(this, TwoSideSelect);
|
|
97
101
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
98
102
|
args[_key2] = arguments[_key2];
|
|
99
103
|
}
|
|
100
|
-
_this2 =
|
|
101
|
-
_defineProperty(_this2, "onSelect", function (item) {
|
|
104
|
+
_this2 = _super2.call.apply(_super2, [this].concat(args));
|
|
105
|
+
_defineProperty(_assertThisInitialized(_this2), "onSelect", function (item) {
|
|
102
106
|
var items = _this2.props.value || [];
|
|
103
107
|
items.push(item);
|
|
104
108
|
_this2.props.onChange(_this2.props.name, items);
|
|
105
109
|
});
|
|
106
|
-
_defineProperty(_this2, "onDelete", function (item) {
|
|
110
|
+
_defineProperty(_assertThisInitialized(_this2), "onDelete", function (item) {
|
|
107
111
|
var items = _this2.props.value || [];
|
|
108
112
|
_lodash["default"].remove(items, {
|
|
109
113
|
identifier: item.identifier
|
|
110
114
|
});
|
|
111
115
|
_this2.props.onChange(_this2.props.name, items);
|
|
112
116
|
});
|
|
113
|
-
_defineProperty(_this2, "onSortEnd", function (_ref) {
|
|
117
|
+
_defineProperty(_assertThisInitialized(_this2), "onSortEnd", function (_ref) {
|
|
114
118
|
var oldIndex = _ref.oldIndex,
|
|
115
119
|
newIndex = _ref.newIndex;
|
|
116
120
|
var items = (0, _reactSortableHoc.arrayMove)(_this2.props.value, oldIndex, newIndex);
|
|
@@ -118,8 +122,7 @@ var TwoSideSelect = /*#__PURE__*/function (_React$Component2) {
|
|
|
118
122
|
});
|
|
119
123
|
return _this2;
|
|
120
124
|
}
|
|
121
|
-
|
|
122
|
-
return _createClass(TwoSideSelect, [{
|
|
125
|
+
_createClass(TwoSideSelect, [{
|
|
123
126
|
key: "render",
|
|
124
127
|
value: function render() {
|
|
125
128
|
var _this3 = this;
|
|
@@ -182,5 +185,6 @@ var TwoSideSelect = /*#__PURE__*/function (_React$Component2) {
|
|
|
182
185
|
}))));
|
|
183
186
|
}
|
|
184
187
|
}]);
|
|
188
|
+
return TwoSideSelect;
|
|
185
189
|
}(_react["default"].Component);
|
|
186
190
|
var _default = exports["default"] = (0, _core.withTheme)()(TwoSideSelect);
|