@iobroker/adapter-react-v5 3.1.34 → 3.2.0

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.
Files changed (244) hide show
  1. package/Components/404.js +0 -23
  2. package/Components/404.js.map +1 -1
  3. package/Components/ColorPicker.js +6 -37
  4. package/Components/ColorPicker.js.map +1 -1
  5. package/Components/ComplexCron.js +10 -84
  6. package/Components/ComplexCron.js.map +1 -1
  7. package/Components/CustomModal.js +29 -54
  8. package/Components/CustomModal.js.map +1 -1
  9. package/Components/FileBrowser.js +15 -265
  10. package/Components/FileBrowser.js.map +1 -1
  11. package/Components/FileViewer.js +7 -68
  12. package/Components/FileViewer.js.map +1 -1
  13. package/Components/Icon.d.ts +1 -1
  14. package/Components/Icon.js +2 -42
  15. package/Components/Icon.js.map +1 -1
  16. package/Components/IconPicker.js +6 -28
  17. package/Components/IconPicker.js.map +1 -1
  18. package/Components/IconSelector.js +3 -55
  19. package/Components/IconSelector.js.map +1 -1
  20. package/Components/Image.js +1 -38
  21. package/Components/Image.js.map +1 -1
  22. package/Components/JsonConfigComponent/ChipInput.js +66 -197
  23. package/Components/JsonConfigComponent/ChipInput.js.map +1 -1
  24. package/Components/JsonConfigComponent/ConfigAlive.js +0 -31
  25. package/Components/JsonConfigComponent/ConfigAlive.js.map +1 -1
  26. package/Components/JsonConfigComponent/ConfigAutocomplete.js +6 -39
  27. package/Components/JsonConfigComponent/ConfigAutocomplete.js.map +1 -1
  28. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js +6 -52
  29. package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.js.map +1 -1
  30. package/Components/JsonConfigComponent/ConfigCRON.js +5 -39
  31. package/Components/JsonConfigComponent/ConfigCRON.js.map +1 -1
  32. package/Components/JsonConfigComponent/ConfigCertificateSelect.js +4 -42
  33. package/Components/JsonConfigComponent/ConfigCertificateSelect.js.map +1 -1
  34. package/Components/JsonConfigComponent/ConfigCheckbox.js +0 -28
  35. package/Components/JsonConfigComponent/ConfigCheckbox.js.map +1 -1
  36. package/Components/JsonConfigComponent/ConfigChip.js +4 -33
  37. package/Components/JsonConfigComponent/ConfigChip.js.map +1 -1
  38. package/Components/JsonConfigComponent/ConfigColor.js +0 -34
  39. package/Components/JsonConfigComponent/ConfigColor.js.map +1 -1
  40. package/Components/JsonConfigComponent/ConfigCoordinates.js +0 -33
  41. package/Components/JsonConfigComponent/ConfigCoordinates.js.map +1 -1
  42. package/Components/JsonConfigComponent/ConfigCustom.js +14 -73
  43. package/Components/JsonConfigComponent/ConfigCustom.js.map +1 -1
  44. package/Components/JsonConfigComponent/ConfigDatePicker.js +0 -25
  45. package/Components/JsonConfigComponent/ConfigDatePicker.js.map +1 -1
  46. package/Components/JsonConfigComponent/ConfigFile.js +0 -46
  47. package/Components/JsonConfigComponent/ConfigFile.js.map +1 -1
  48. package/Components/JsonConfigComponent/ConfigFileSelector.js +7 -126
  49. package/Components/JsonConfigComponent/ConfigFileSelector.js.map +1 -1
  50. package/Components/JsonConfigComponent/ConfigFunc.js +0 -34
  51. package/Components/JsonConfigComponent/ConfigFunc.js.map +1 -1
  52. package/Components/JsonConfigComponent/ConfigGeneric.js +15 -110
  53. package/Components/JsonConfigComponent/ConfigGeneric.js.map +1 -1
  54. package/Components/JsonConfigComponent/ConfigIP.js +2 -35
  55. package/Components/JsonConfigComponent/ConfigIP.js.map +1 -1
  56. package/Components/JsonConfigComponent/ConfigImageUpload.js +4 -44
  57. package/Components/JsonConfigComponent/ConfigImageUpload.js.map +1 -1
  58. package/Components/JsonConfigComponent/ConfigInstanceSelect.js +1 -59
  59. package/Components/JsonConfigComponent/ConfigInstanceSelect.js.map +1 -1
  60. package/Components/JsonConfigComponent/ConfigJsonEditor.js +7 -40
  61. package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +1 -1
  62. package/Components/JsonConfigComponent/ConfigLanguage.js +2 -42
  63. package/Components/JsonConfigComponent/ConfigLanguage.js.map +1 -1
  64. package/Components/JsonConfigComponent/ConfigNumber.js +2 -45
  65. package/Components/JsonConfigComponent/ConfigNumber.js.map +1 -1
  66. package/Components/JsonConfigComponent/ConfigObjectId.js +6 -40
  67. package/Components/JsonConfigComponent/ConfigObjectId.js.map +1 -1
  68. package/Components/JsonConfigComponent/ConfigPanel.js +7 -91
  69. package/Components/JsonConfigComponent/ConfigPanel.js.map +1 -1
  70. package/Components/JsonConfigComponent/ConfigPassword.js +0 -42
  71. package/Components/JsonConfigComponent/ConfigPassword.js.map +1 -1
  72. package/Components/JsonConfigComponent/ConfigPattern.js +0 -25
  73. package/Components/JsonConfigComponent/ConfigPattern.js.map +1 -1
  74. package/Components/JsonConfigComponent/ConfigRoom.js +0 -34
  75. package/Components/JsonConfigComponent/ConfigRoom.js.map +1 -1
  76. package/Components/JsonConfigComponent/ConfigSelect.js +4 -34
  77. package/Components/JsonConfigComponent/ConfigSelect.js.map +1 -1
  78. package/Components/JsonConfigComponent/ConfigSelectSendTo.js +11 -67
  79. package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -1
  80. package/Components/JsonConfigComponent/ConfigSendto.js +8 -91
  81. package/Components/JsonConfigComponent/ConfigSendto.js.map +1 -1
  82. package/Components/JsonConfigComponent/ConfigSetState.js +0 -55
  83. package/Components/JsonConfigComponent/ConfigSetState.js.map +1 -1
  84. package/Components/JsonConfigComponent/ConfigSlider.js +0 -28
  85. package/Components/JsonConfigComponent/ConfigSlider.js.map +1 -1
  86. package/Components/JsonConfigComponent/ConfigStaticDivider.js +0 -21
  87. package/Components/JsonConfigComponent/ConfigStaticDivider.js.map +1 -1
  88. package/Components/JsonConfigComponent/ConfigStaticHeader.js +0 -24
  89. package/Components/JsonConfigComponent/ConfigStaticHeader.js.map +1 -1
  90. package/Components/JsonConfigComponent/ConfigStaticImage.js +0 -23
  91. package/Components/JsonConfigComponent/ConfigStaticImage.js.map +1 -1
  92. package/Components/JsonConfigComponent/ConfigStaticText.js +0 -31
  93. package/Components/JsonConfigComponent/ConfigStaticText.js.map +1 -1
  94. package/Components/JsonConfigComponent/ConfigTable.js +13 -105
  95. package/Components/JsonConfigComponent/ConfigTable.js.map +1 -1
  96. package/Components/JsonConfigComponent/ConfigTabs.js +2 -35
  97. package/Components/JsonConfigComponent/ConfigTabs.js.map +1 -1
  98. package/Components/JsonConfigComponent/ConfigText.js +0 -34
  99. package/Components/JsonConfigComponent/ConfigText.js.map +1 -1
  100. package/Components/JsonConfigComponent/ConfigTextSendTo.js +0 -37
  101. package/Components/JsonConfigComponent/ConfigTextSendTo.js.map +1 -1
  102. package/Components/JsonConfigComponent/ConfigTimePicker.js +0 -25
  103. package/Components/JsonConfigComponent/ConfigTimePicker.js.map +1 -1
  104. package/Components/JsonConfigComponent/ConfigTopic.js +0 -29
  105. package/Components/JsonConfigComponent/ConfigTopic.js.map +1 -1
  106. package/Components/JsonConfigComponent/ConfigUser.js +2 -40
  107. package/Components/JsonConfigComponent/ConfigUser.js.map +1 -1
  108. package/Components/JsonConfigComponent/index.js +5 -81
  109. package/Components/JsonConfigComponent/index.js.map +1 -1
  110. package/Components/Loader.js +2 -20
  111. package/Components/Loader.js.map +1 -1
  112. package/Components/Loaders/PT.js +2 -20
  113. package/Components/Loaders/PT.js.map +1 -1
  114. package/Components/Loaders/Vendor.js +2 -21
  115. package/Components/Loaders/Vendor.js.map +1 -1
  116. package/Components/Logo.js +6 -39
  117. package/Components/Logo.js.map +1 -1
  118. package/Components/MDUtils.js +3 -27
  119. package/Components/MDUtils.js.map +1 -1
  120. package/Components/ObjectBrowser.d.ts +1 -1
  121. package/Components/ObjectBrowser.js +181 -788
  122. package/Components/ObjectBrowser.js.map +1 -1
  123. package/Components/Router.js +7 -31
  124. package/Components/Router.js.map +1 -1
  125. package/Components/SaveCloseButtons.js +2 -32
  126. package/Components/SaveCloseButtons.js.map +1 -1
  127. package/Components/Schedule.js +29 -251
  128. package/Components/Schedule.js.map +1 -1
  129. package/Components/SelectWithIcon.d.ts +1 -1
  130. package/Components/SelectWithIcon.js +0 -48
  131. package/Components/SelectWithIcon.js.map +1 -1
  132. package/Components/SimpleCron/cron2text.js +45 -91
  133. package/Components/SimpleCron/cron2text.js.map +1 -1
  134. package/Components/SimpleCron/cronText.js +0 -6
  135. package/Components/SimpleCron/cronText.js.map +1 -1
  136. package/Components/SimpleCron/index.js +19 -102
  137. package/Components/SimpleCron/index.js.map +1 -1
  138. package/Components/SimpleCron/jquery.cron.locale.js +44 -24
  139. package/Components/SimpleCron/jquery.cron.locale.js.map +1 -1
  140. package/Components/TabContainer.js +2 -23
  141. package/Components/TabContainer.js.map +1 -1
  142. package/Components/TabContent.js +2 -22
  143. package/Components/TabContent.js.map +1 -1
  144. package/Components/TabHeader.js +1 -17
  145. package/Components/TabHeader.js.map +1 -1
  146. package/Components/TableResize.js +6 -51
  147. package/Components/TableResize.js.map +1 -1
  148. package/Components/TextWithIcon.js +0 -20
  149. package/Components/TextWithIcon.js.map +1 -1
  150. package/Components/ToggleThemeMenu.js +5 -13
  151. package/Components/ToggleThemeMenu.js.map +1 -1
  152. package/Components/TreeTable.js +4 -121
  153. package/Components/TreeTable.js.map +1 -1
  154. package/Components/UploadImage.js +17 -60
  155. package/Components/UploadImage.js.map +1 -1
  156. package/Components/Utils.js +87 -263
  157. package/Components/Utils.js.map +1 -1
  158. package/Components/copy-to-clipboard.js +16 -38
  159. package/Components/copy-to-clipboard.js.map +1 -1
  160. package/Components/withWidth.js +2 -10
  161. package/Components/withWidth.js.map +1 -1
  162. package/Connection.d.ts +1 -0
  163. package/Connection.js +156 -527
  164. package/Connection.js.map +1 -1
  165. package/Dialogs/ComplexCron.js +0 -34
  166. package/Dialogs/ComplexCron.js.map +1 -1
  167. package/Dialogs/Confirm.js +1 -39
  168. package/Dialogs/Confirm.js.map +1 -1
  169. package/Dialogs/Cron.js +1 -37
  170. package/Dialogs/Cron.js.map +1 -1
  171. package/Dialogs/Error.d.ts +1 -1
  172. package/Dialogs/Error.js +2 -29
  173. package/Dialogs/Error.js.map +1 -1
  174. package/Dialogs/FileSelect.js +2 -36
  175. package/Dialogs/FileSelect.js.map +1 -1
  176. package/Dialogs/Message.js +2 -27
  177. package/Dialogs/Message.js.map +1 -1
  178. package/Dialogs/SelectID.d.ts +1 -1
  179. package/Dialogs/SelectID.js +3 -40
  180. package/Dialogs/SelectID.js.map +1 -1
  181. package/Dialogs/SimpleCron.js +1 -33
  182. package/Dialogs/SimpleCron.js.map +1 -1
  183. package/Dialogs/TextInput.js +2 -34
  184. package/Dialogs/TextInput.js.map +1 -1
  185. package/GenericApp.js +55 -150
  186. package/GenericApp.js.map +1 -1
  187. package/Prompt.js +0 -2
  188. package/Prompt.js.map +1 -1
  189. package/README.md +11 -4
  190. package/Theme.js +7 -22
  191. package/Theme.js.map +1 -1
  192. package/i18n/uk.json +326 -0
  193. package/i18n.d.ts +2 -0
  194. package/i18n.js +9 -29
  195. package/i18n.js.map +1 -1
  196. package/icons/IconAdapter.d.ts +2 -2
  197. package/icons/IconAdapter.js +2 -6
  198. package/icons/IconAdapter.js.map +1 -1
  199. package/icons/IconAlias.d.ts +2 -2
  200. package/icons/IconAlias.js +2 -6
  201. package/icons/IconAlias.js.map +1 -1
  202. package/icons/IconChannel.d.ts +2 -2
  203. package/icons/IconChannel.js +2 -6
  204. package/icons/IconChannel.js.map +1 -1
  205. package/icons/IconClearFilter.d.ts +2 -2
  206. package/icons/IconClearFilter.js +0 -5
  207. package/icons/IconClearFilter.js.map +1 -1
  208. package/icons/IconClosed.d.ts +2 -2
  209. package/icons/IconClosed.js +0 -5
  210. package/icons/IconClosed.js.map +1 -1
  211. package/icons/IconCopy.d.ts +2 -2
  212. package/icons/IconCopy.js +0 -5
  213. package/icons/IconCopy.js.map +1 -1
  214. package/icons/IconDevice.d.ts +2 -2
  215. package/icons/IconDevice.js +0 -5
  216. package/icons/IconDevice.js.map +1 -1
  217. package/icons/IconDocument.d.ts +2 -2
  218. package/icons/IconDocument.js +0 -5
  219. package/icons/IconDocument.js.map +1 -1
  220. package/icons/IconDocumentReadOnly.d.ts +2 -2
  221. package/icons/IconDocumentReadOnly.js +0 -5
  222. package/icons/IconDocumentReadOnly.js.map +1 -1
  223. package/icons/IconExpert.d.ts +2 -2
  224. package/icons/IconExpert.js +0 -5
  225. package/icons/IconExpert.js.map +1 -1
  226. package/icons/IconFx.d.ts +2 -2
  227. package/icons/IconFx.js +0 -5
  228. package/icons/IconFx.js.map +1 -1
  229. package/icons/IconInstance.d.ts +2 -2
  230. package/icons/IconInstance.js +0 -5
  231. package/icons/IconInstance.js.map +1 -1
  232. package/icons/IconLogout.d.ts +2 -2
  233. package/icons/IconLogout.js +0 -5
  234. package/icons/IconLogout.js.map +1 -1
  235. package/icons/IconNoIcon.d.ts +2 -2
  236. package/icons/IconNoIcon.js +0 -5
  237. package/icons/IconNoIcon.js.map +1 -1
  238. package/icons/IconOpen.d.ts +2 -2
  239. package/icons/IconOpen.js +0 -5
  240. package/icons/IconOpen.js.map +1 -1
  241. package/icons/IconState.d.ts +2 -2
  242. package/icons/IconState.js +0 -6
  243. package/icons/IconState.js.map +1 -1
  244. package/package.json +15 -15
@@ -1,76 +1,42 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports["default"] = void 0;
11
-
12
9
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
13
-
14
10
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
15
-
16
11
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
17
-
18
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
19
-
20
13
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
21
-
22
14
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
23
-
24
15
  var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
25
-
26
16
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
27
-
28
17
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
29
-
30
18
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
31
-
32
19
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
33
-
34
20
  var _react = _interopRequireWildcard(require("react"));
35
-
36
21
  var _propTypes = _interopRequireDefault(require("prop-types"));
37
-
38
22
  var _styles = require("@mui/styles");
39
-
40
23
  var _clsx = _interopRequireDefault(require("clsx"));
41
-
42
24
  var _FormHelperText = _interopRequireDefault(require("@mui/material/FormHelperText"));
43
-
44
25
  var _material = require("@mui/material");
45
-
46
26
  var _Add = _interopRequireDefault(require("@mui/icons-material/Add"));
47
-
48
27
  var _Delete = _interopRequireDefault(require("@mui/icons-material/Delete"));
49
-
50
28
  var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
51
-
52
29
  var _ArrowUpward = _interopRequireDefault(require("@mui/icons-material/ArrowUpward"));
53
-
54
30
  var _ArrowDownward = _interopRequireDefault(require("@mui/icons-material/ArrowDownward"));
55
-
56
31
  var _FilterAlt = _interopRequireDefault(require("@mui/icons-material/FilterAlt"));
57
-
58
32
  var _FilterAltOff = _interopRequireDefault(require("@mui/icons-material/FilterAltOff"));
59
-
60
33
  var _i18n = _interopRequireDefault(require("../../i18n"));
61
-
62
34
  var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
63
-
64
35
  var _ConfigPanel = _interopRequireDefault(require("./ConfigPanel"));
65
-
66
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
67
-
68
37
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
69
-
70
38
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
71
-
72
39
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
73
-
74
40
  var styles = function styles(theme) {
75
41
  return {
76
42
  fullWidth: {
@@ -106,8 +72,8 @@ var styles = function styles(theme) {
106
72
  justifyContent: 'space-between'
107
73
  },
108
74
  highlight: theme.palette.mode === 'light' ? {
109
- color: theme.palette.secondary.main // backgroundColor: lighten(theme.palette.secondary.light, 0.85),
110
-
75
+ color: theme.palette.secondary.main
76
+ // backgroundColor: lighten(theme.palette.secondary.light, 0.85),
111
77
  } : {
112
78
  color: theme.palette.text.primary,
113
79
  backgroundColor: theme.palette.secondary.dark
@@ -140,14 +106,12 @@ var styles = function styles(theme) {
140
106
  }
141
107
  };
142
108
  };
143
-
144
109
  function objectToArray(object, nameOfFirstAttr, nameOfSecondAttr) {
145
110
  nameOfFirstAttr = nameOfFirstAttr || 'key';
146
111
  var array = [];
147
112
  Object.keys(object).forEach(function (key) {
148
113
  var item = {};
149
114
  item[nameOfFirstAttr] = key;
150
-
151
115
  if (nameOfSecondAttr) {
152
116
  item[nameOfSecondAttr] = object[key];
153
117
  array.push(item);
@@ -157,19 +121,15 @@ function objectToArray(object, nameOfFirstAttr, nameOfSecondAttr) {
157
121
  });
158
122
  return array;
159
123
  }
160
-
161
124
  function arrayToObject(array, nameOfFirstAttr, nameOfSecondAttr) {
162
125
  nameOfFirstAttr = nameOfFirstAttr || 'key';
163
126
  var object = {};
164
127
  array.forEach(function (row) {
165
128
  var key = row[nameOfFirstAttr];
166
-
167
129
  if (key === null || key === undefined) {
168
130
  key = '';
169
131
  }
170
-
171
132
  delete row[nameOfFirstAttr];
172
-
173
133
  if (nameOfSecondAttr) {
174
134
  object[key] = row[nameOfSecondAttr];
175
135
  } else {
@@ -178,29 +138,22 @@ function arrayToObject(array, nameOfFirstAttr, nameOfSecondAttr) {
178
138
  });
179
139
  return object;
180
140
  }
181
-
182
141
  var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
183
142
  (0, _inherits2["default"])(ConfigTable, _ConfigGeneric);
184
-
185
143
  var _super = _createSuper(ConfigTable);
186
-
187
144
  function ConfigTable(props) {
188
145
  var _this;
189
-
190
146
  (0, _classCallCheck2["default"])(this, ConfigTable);
191
147
  _this = _super.call(this, props);
192
148
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleRequestSort", function (property) {
193
149
  var orderCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
194
150
  var _this$state = _this.state,
195
- order = _this$state.order,
196
- orderBy = _this$state.orderBy;
197
-
151
+ order = _this$state.order,
152
+ orderBy = _this$state.orderBy;
198
153
  if (orderBy) {
199
154
  var isAsc = orderBy === property && order === 'asc';
200
155
  var newOrder = orderCheck ? order : isAsc ? 'desc' : 'asc';
201
-
202
156
  var newValue = _this.stableSort(newOrder, property);
203
-
204
157
  _this.setState({
205
158
  order: newOrder,
206
159
  orderBy: property,
@@ -218,7 +171,6 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
218
171
  });
219
172
  stabilizedThis.sort(function (a, b) {
220
173
  var order = comparator(a[0], b[0]);
221
-
222
174
  if (order !== 0) {
223
175
  return order;
224
176
  } else {
@@ -235,14 +187,12 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
235
187
  var visibleValue = JSON.parse(JSON.stringify(_this.state.visibleValue));
236
188
  newValue.splice(index, 1);
237
189
  var pos = visibleValue.indexOf(index);
238
-
239
190
  if (pos !== -1) {
240
191
  visibleValue.splice(pos, 1);
241
192
  visibleValue = visibleValue.map(function (i) {
242
193
  return i > index ? i - 1 : i;
243
194
  });
244
195
  }
245
-
246
196
  _this.setState({
247
197
  value: newValue,
248
198
  visibleValue: visibleValue,
@@ -257,18 +207,14 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
257
207
  _this.typingTimer && clearTimeout(_this.typingTimer);
258
208
  _this.typingTimer = setTimeout(function (value, updateVisible) {
259
209
  _this.typingTimer = null;
260
-
261
210
  if (_this.props.schema.objKeyName) {
262
211
  var objValue = arrayToObject(JSON.parse(JSON.stringify(value)), _this.props.schema.objKeyName, _this.props.schema.objValueName);
263
-
264
212
  _this.onChange(_this.props.attr, objValue);
265
213
  } else {
266
214
  _this.onChange(_this.props.attr, value);
267
215
  }
268
-
269
216
  if (updateVisible) {
270
217
  _this.applyFilter(false, value);
271
-
272
218
  _this.handleRequestSort(_this.state.orderBy, true);
273
219
  }
274
220
  }, 300, newValue, updateVisible);
@@ -279,7 +225,6 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
279
225
  var visibleValue = JSON.parse(JSON.stringify(_this.state.visibleValue));
280
226
  var newItem = schema.items && schema.items.reduce(function (accumulator, currentValue) {
281
227
  var defaultValue;
282
-
283
228
  if (currentValue.defaultFunc) {
284
229
  if (_this.props.custom) {
285
230
  defaultValue = currentValue.defaultFunc ? _this.executeCustom(currentValue.defaultFunc, _this.props.schema["default"], _this.props.data, _this.props.instanceObj, newValue.length, _this.props.data) : _this.props.schema["default"];
@@ -289,13 +234,11 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
289
234
  } else {
290
235
  defaultValue = currentValue["default"] === undefined ? null : currentValue["default"];
291
236
  }
292
-
293
237
  accumulator[currentValue.attr] = defaultValue;
294
238
  return accumulator;
295
239
  }, {});
296
240
  newValue.push(newItem);
297
241
  visibleValue.push(newValue.length - 1);
298
-
299
242
  _this.setState({
300
243
  value: newValue,
301
244
  visibleValue: visibleValue
@@ -311,9 +254,7 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
311
254
  });
312
255
  Object.keys(_this.filterRefs).forEach(function (attr) {
313
256
  var _this$filterRefs$attr;
314
-
315
257
  var valueInputRef = (_this$filterRefs$attr = _this.filterRefs[attr].current) === null || _this$filterRefs$attr === void 0 ? void 0 : _this$filterRefs$attr.children[0].children[0].value;
316
-
317
258
  if (!clear && valueInputRef) {
318
259
  valueInputRef = valueInputRef.toLowerCase();
319
260
  visibleValue = visibleValue.filter(function (idx) {
@@ -323,7 +264,6 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
323
264
  _this.filterRefs[attr].current.children[0].children[0].value = '';
324
265
  }
325
266
  });
326
-
327
267
  if (JSON.stringify(visibleValue) !== JSON.stringify(_this.state.visibleValue)) {
328
268
  _this.setState({
329
269
  visibleValue: visibleValue
@@ -332,16 +272,13 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
332
272
  });
333
273
  _this.filterRefs = {};
334
274
  _this.props.schema.items = _this.props.schema.items || [];
335
-
336
275
  _this.props.schema.items.forEach(function (el) {
337
276
  if (el.filter) {
338
277
  _this.filterRefs[el.attr] = /*#__PURE__*/(0, _react.createRef)();
339
278
  }
340
279
  });
341
-
342
280
  return _this;
343
281
  }
344
-
345
282
  (0, _createClass2["default"])(ConfigTable, [{
346
283
  key: "componentDidMount",
347
284
  value: function () {
@@ -353,29 +290,23 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
353
290
  case 0:
354
291
  (0, _get2["default"])((0, _getPrototypeOf2["default"])(ConfigTable.prototype), "componentDidMount", this).call(this);
355
292
  value = _ConfigGeneric2["default"].getValue(this.props.data, this.props.attr) || []; // if the list is given as an object
356
-
357
293
  if (this.props.schema.objKeyName) {
358
294
  value = objectToArray(value, this.props.schema.objKeyName, this.props.schema.objValueName);
359
295
  }
360
-
361
296
  if (!Array.isArray(value)) {
362
297
  value = [];
363
298
  }
364
-
365
299
  visibleValue = value.map(function (_, i) {
366
300
  return i;
367
301
  });
368
302
  this.setState({
369
303
  value: value,
370
304
  visibleValue: visibleValue,
371
- orderBy:
372
- /*this.props.schema.items.length ? this.props.schema.items[0].attr : */
373
- '',
305
+ orderBy: /*this.props.schema.items.length ? this.props.schema.items[0].attr : */'',
374
306
  order: 'asc',
375
307
  iteration: 0,
376
308
  filterOn: []
377
309
  });
378
-
379
310
  case 6:
380
311
  case "end":
381
312
  return _context.stop();
@@ -383,11 +314,9 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
383
314
  }
384
315
  }, _callee, this);
385
316
  }));
386
-
387
317
  function componentDidMount() {
388
318
  return _componentDidMount.apply(this, arguments);
389
319
  }
390
-
391
320
  return componentDidMount;
392
321
  }()
393
322
  }, {
@@ -401,17 +330,14 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
401
330
  key: "itemTable",
402
331
  value: function itemTable(attrItem, data, idx) {
403
332
  var _this2 = this;
404
-
405
333
  var value = this.state.value;
406
334
  var schema = this.props.schema;
407
335
  var schemaForAttribute = schema.items && schema.items.find(function (el) {
408
336
  return el.attr === attrItem;
409
337
  });
410
-
411
338
  if (!schemaForAttribute) {
412
339
  return null;
413
340
  }
414
-
415
341
  var schemaItem = {
416
342
  items: (0, _defineProperty2["default"])({}, attrItem, schemaForAttribute)
417
343
  };
@@ -436,7 +362,6 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
436
362
  onChange: function onChange(attr, valueChange) {
437
363
  var newObj = JSON.parse(JSON.stringify(value));
438
364
  newObj[idx][attr] = valueChange;
439
-
440
365
  _this2.setState({
441
366
  value: newObj
442
367
  }, function () {
@@ -452,16 +377,14 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
452
377
  key: "enhancedTableHead",
453
378
  value: function enhancedTableHead(buttonsWidth, doAnyFilterSet) {
454
379
  var _this3 = this;
455
-
456
380
  var _this$props = this.props,
457
- schema = _this$props.schema,
458
- classes = _this$props.classes;
381
+ schema = _this$props.schema,
382
+ classes = _this$props.classes;
459
383
  var _this$state2 = this.state,
460
- order = _this$state2.order,
461
- orderBy = _this$state2.orderBy;
384
+ order = _this$state2.order,
385
+ orderBy = _this$state2.orderBy;
462
386
  return /*#__PURE__*/_react["default"].createElement(_material.TableHead, null, /*#__PURE__*/_react["default"].createElement(_material.TableRow, null, schema.items && schema.items.map(function (headCell, i) {
463
387
  var _this3$filterRefs$hea, _this3$filterRefs$hea2, _this3$filterRefs$hea3, _this3$filterRefs$hea4;
464
-
465
388
  return /*#__PURE__*/_react["default"].createElement(_material.TableCell, {
466
389
  style: {
467
390
  width: typeof headCell.width === 'string' && headCell.width.endsWith('%') ? headCell.width : headCell.width
@@ -499,7 +422,6 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
499
422
  size: "small",
500
423
  onClick: function onClick() {
501
424
  _this3.filterRefs[headCell.attr].current.children[0].children[0].value = '';
502
-
503
425
  _this3.applyFilter();
504
426
  }
505
427
  }, /*#__PURE__*/_react["default"].createElement(_Close["default"], null)))
@@ -513,21 +435,17 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
513
435
  size: "small",
514
436
  onClick: function onClick() {
515
437
  var filterOn = (0, _toConsumableArray2["default"])(_this3.state.filterOn);
516
-
517
438
  var pos = _this3.state.filterOn.indexOf(headCell.attr);
518
-
519
439
  if (pos === -1) {
520
440
  filterOn.push(headCell.attr);
521
441
  } else {
522
442
  filterOn.splice(pos, 1);
523
443
  }
524
-
525
444
  _this3.setState({
526
445
  filterOn: filterOn
527
446
  }, function () {
528
447
  if (pos && _this3.filterRefs[headCell.attr].current.children[0].children[0].value) {
529
448
  _this3.filterRefs[headCell.attr].current.children[0].children[0].value = '';
530
-
531
449
  _this3.applyFilter();
532
450
  }
533
451
  });
@@ -550,10 +468,8 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
550
468
  key: "isAnyFilterSet",
551
469
  value: function isAnyFilterSet() {
552
470
  var _this4 = this;
553
-
554
471
  return Object.keys(this.filterRefs).find(function (attr) {
555
472
  var _this4$filterRefs$att;
556
-
557
473
  return (_this4$filterRefs$att = _this4.filterRefs[attr].current) === null || _this4$filterRefs$att === void 0 ? void 0 : _this4$filterRefs$att.children[0].children[0].value;
558
474
  });
559
475
  }
@@ -561,7 +477,6 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
561
477
  key: "onMoveUp",
562
478
  value: function onMoveUp(idx) {
563
479
  var _this5 = this;
564
-
565
480
  var value = JSON.parse(JSON.stringify(this.state.value));
566
481
  var item = value[idx];
567
482
  value.splice(idx, 1);
@@ -577,7 +492,6 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
577
492
  key: "onMoveDown",
578
493
  value: function onMoveDown(idx) {
579
494
  var _this6 = this;
580
-
581
495
  var value = JSON.parse(JSON.stringify(this.state.value));
582
496
  var item = value[idx];
583
497
  value.splice(idx, 1);
@@ -593,18 +507,15 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
593
507
  key: "renderItem",
594
508
  value: function renderItem(error, disabled, defaultValue) {
595
509
  var _this7 = this;
596
-
597
510
  var _this$props2 = this.props,
598
- classes = _this$props2.classes,
599
- schema = _this$props2.schema;
511
+ classes = _this$props2.classes,
512
+ schema = _this$props2.schema;
600
513
  var _this$state3 = this.state,
601
- value = _this$state3.value,
602
- visibleValue = _this$state3.visibleValue;
603
-
514
+ value = _this$state3.value,
515
+ visibleValue = _this$state3.visibleValue;
604
516
  if (!value) {
605
517
  return null;
606
518
  }
607
-
608
519
  var doAnyFilterSet = this.isAnyFilterSet();
609
520
  return /*#__PURE__*/_react["default"].createElement(_material.Paper, {
610
521
  className: classes.paper
@@ -703,7 +614,6 @@ var ConfigTable = /*#__PURE__*/function (_ConfigGeneric) {
703
614
  }]);
704
615
  return ConfigTable;
705
616
  }(_ConfigGeneric2["default"]);
706
-
707
617
  ConfigTable.propTypes = {
708
618
  socket: _propTypes["default"].object.isRequired,
709
619
  themeType: _propTypes["default"].string,
@@ -715,8 +625,6 @@ ConfigTable.propTypes = {
715
625
  onError: _propTypes["default"].func,
716
626
  onChange: _propTypes["default"].func
717
627
  };
718
-
719
628
  var _default = (0, _styles.withStyles)(styles)(ConfigTable);
720
-
721
629
  exports["default"] = _default;
722
630
  //# sourceMappingURL=ConfigTable.js.map