@crystaldesign/diva-backoffice 25.13.0-beta.40 → 25.13.0-beta.41
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/build/esm/index.js +502 -364
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/ErrorDisplay.d.ts +12 -0
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/ErrorDisplay.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/types.d.ts +30 -0
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/useUploadState.d.ts +2 -2
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/useUploadState.d.ts.map +1 -1
- package/package.json +9 -9
package/build/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import React, { createElement, createContext, useState, useEffect, useRef, useMemo, forwardRef, useImperativeHandle, useCallback, createRef, useReducer, useContext, memo, useDeferredValue } from 'react';
|
|
3
3
|
import 'antd/dist/reset.css';
|
|
4
|
-
import { Divider, Form as Form$2, Button, Input as Input$1, Popover, Typography, Progress, Select as Select$1, Avatar, Spin, Radio, Space, Dropdown, DatePicker, Checkbox as Checkbox$1, InputNumber, Modal as Modal$2, Tabs, Cascader, Descriptions, Row, Col, Tooltip as Tooltip$1, Collapse, List as List$1, Skeleton, Alert, Card, Upload as Upload$2, Table as Table$1, Switch, Popconfirm, Image, Slider, Breadcrumb, Result as Result$1, message, Layout, Drawer, ConfigProvider, theme } from 'antd';
|
|
4
|
+
import { Divider, Form as Form$2, Button, Input as Input$1, Popover, Typography, Progress, Select as Select$1, Avatar, Spin, Radio, Space, Dropdown, DatePicker, Checkbox as Checkbox$1, InputNumber, Modal as Modal$2, Tabs, Cascader, Descriptions, Row, Col, Tooltip as Tooltip$1, Collapse, List as List$1, Skeleton, Alert, Card, Upload as Upload$2, Table as Table$1, Switch, Popconfirm, Image, Slider, Breadcrumb, Result as Result$1, message, Tag, Layout, Drawer, ConfigProvider, theme } from 'antd';
|
|
5
5
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
6
6
|
import { observer } from 'mobx-react-lite';
|
|
7
7
|
import { getLogger, DivaError, useTranslation, useDivaCore, DivaUtils } from '@crystaldesign/diva-core';
|
|
@@ -157,8 +157,8 @@ import PushpinOutlined from '@ant-design/icons/lib/icons/PushpinOutlined';
|
|
|
157
157
|
function _createForOfIteratorHelper$o(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$o(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
158
158
|
function _unsupportedIterableToArray$o(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$o(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$o(r, a) : void 0; } }
|
|
159
159
|
function _arrayLikeToArray$o(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; }
|
|
160
|
-
function ownKeys$
|
|
161
|
-
function _objectSpread$
|
|
160
|
+
function ownKeys$18(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
161
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$18(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$18(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
162
162
|
var LOG$f = getLogger('Backoffice', 'ApplyMapping');
|
|
163
163
|
function applyMapping (_ref) {
|
|
164
164
|
var mappable = _ref.mappable,
|
|
@@ -179,10 +179,10 @@ function applyMapping (_ref) {
|
|
|
179
179
|
var newValue = {};
|
|
180
180
|
newValue[newKey] = valueToAdd;
|
|
181
181
|
if ((startValue === null || startValue === void 0 ? void 0 : startValue[newKey]) != undefined) {
|
|
182
|
-
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$
|
|
182
|
+
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$18(_objectSpread$18({}, startValue[newKey]), valueToAdd);else startValue[newKey] = type == 'addToSourceValue' ? startValue[newKey] + valueToAdd : valueToAdd;
|
|
183
183
|
return startValue;
|
|
184
184
|
}
|
|
185
|
-
if (newIdx == 1) return _objectSpread$
|
|
185
|
+
if (newIdx == 1) return _objectSpread$18(_objectSpread$18({}, startValue), newValue);
|
|
186
186
|
return _getTarget(idx + 1, keys, startValue, newValue);
|
|
187
187
|
};
|
|
188
188
|
returnValue = _getTarget(0, key.split('.'), returnValue, value);
|
|
@@ -485,8 +485,8 @@ function getLeafColumns(columns) {
|
|
|
485
485
|
});
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
function ownKeys$
|
|
489
|
-
function _objectSpread$
|
|
488
|
+
function ownKeys$17(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
489
|
+
function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$17(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$17(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
490
490
|
var LOG$e = getLogger('Backoffice', 'ApiHandler');
|
|
491
491
|
var jp = require('jsonpath');
|
|
492
492
|
var _default$d = /*#__PURE__*/function () {
|
|
@@ -665,7 +665,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
665
665
|
_context2.next = 20;
|
|
666
666
|
return fetch(finalUrl, {
|
|
667
667
|
method: this._updateMethod,
|
|
668
|
-
headers: _objectSpread$
|
|
668
|
+
headers: _objectSpread$17(_objectSpread$17({}, jwt ? {
|
|
669
669
|
Authorization: 'Bearer ' + jwt
|
|
670
670
|
} : {}), {}, {
|
|
671
671
|
'Content-Type': 'application/json'
|
|
@@ -758,7 +758,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
758
758
|
rootStore: this._rootStore,
|
|
759
759
|
fallBackToParams: true
|
|
760
760
|
});
|
|
761
|
-
if (data) createData = _objectSpread$
|
|
761
|
+
if (data) createData = _objectSpread$17({}, data);
|
|
762
762
|
} else if (data !== undefined) {
|
|
763
763
|
createData = applyMapping({
|
|
764
764
|
mappable: data,
|
|
@@ -1020,7 +1020,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1020
1020
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1021
1021
|
case 2:
|
|
1022
1022
|
jwt = (_this$_rootStore5 = this._rootStore) === null || _this$_rootStore5 === void 0 ? void 0 : _this$_rootStore5.dataStore.jwt;
|
|
1023
|
-
url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1023
|
+
url = filterServerSide ? parseServersideFilters(_objectSpread$17(_objectSpread$17({}, filterServerSide), {}, {
|
|
1024
1024
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1025
1025
|
baseUrl: this._readListUrl,
|
|
1026
1026
|
prefilter: prefilter
|
|
@@ -1040,7 +1040,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1040
1040
|
});
|
|
1041
1041
|
case 6:
|
|
1042
1042
|
response = _context8.sent;
|
|
1043
|
-
return _context8.abrupt("return", _objectSpread$
|
|
1043
|
+
return _context8.abrupt("return", _objectSpread$17(_objectSpread$17({}, response), {}, {
|
|
1044
1044
|
data: response.data.map(function (d) {
|
|
1045
1045
|
return _this2.aplyJsonPath(d, _this2._readJsonPath);
|
|
1046
1046
|
})
|
|
@@ -1064,7 +1064,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1064
1064
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1065
1065
|
}
|
|
1066
1066
|
(_this$_rootStore6 = this._rootStore) === null || _this$_rootStore6 === void 0 ? void 0 : _this$_rootStore6.dataStore.jwt;
|
|
1067
|
-
var url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1067
|
+
var url = filterServerSide ? parseServersideFilters(_objectSpread$17(_objectSpread$17({}, filterServerSide), {}, {
|
|
1068
1068
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1069
1069
|
baseUrl: this._readListUrl,
|
|
1070
1070
|
prefilter: prefilter
|
|
@@ -1271,8 +1271,8 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1271
1271
|
}]);
|
|
1272
1272
|
}(_default$d);
|
|
1273
1273
|
|
|
1274
|
-
function ownKeys$
|
|
1275
|
-
function _objectSpread$
|
|
1274
|
+
function ownKeys$16(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1275
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$16(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$16(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1276
1276
|
function _callSuper$5(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1277
1277
|
function _isNativeReflectConstruct$5() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1278
1278
|
var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
@@ -1371,7 +1371,7 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1371
1371
|
_context2.next = 5;
|
|
1372
1372
|
return fetch(this._createUrl + '?ref=true', {
|
|
1373
1373
|
method: this._createMethod,
|
|
1374
|
-
headers: _objectSpread$
|
|
1374
|
+
headers: _objectSpread$16({}, jwt ? {
|
|
1375
1375
|
Authorization: 'Bearer ' + jwt
|
|
1376
1376
|
} : {}),
|
|
1377
1377
|
body: data
|
|
@@ -1749,8 +1749,8 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1749
1749
|
}]);
|
|
1750
1750
|
}(_default$d);
|
|
1751
1751
|
|
|
1752
|
-
function ownKeys$
|
|
1753
|
-
function _objectSpread$
|
|
1752
|
+
function ownKeys$15(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1753
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$15(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$15(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1754
1754
|
var _default$7 = /*#__PURE__*/function () {
|
|
1755
1755
|
function _default(root) {
|
|
1756
1756
|
_classCallCheck(this, _default);
|
|
@@ -1786,7 +1786,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1786
1786
|
var _i$permission;
|
|
1787
1787
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
1788
1788
|
});
|
|
1789
|
-
config = _objectSpread$
|
|
1789
|
+
config = _objectSpread$15(_objectSpread$15({}, config), {}, {
|
|
1790
1790
|
items: filteredItems
|
|
1791
1791
|
});
|
|
1792
1792
|
}
|
|
@@ -14660,8 +14660,8 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
14660
14660
|
}]);
|
|
14661
14661
|
}();
|
|
14662
14662
|
|
|
14663
|
-
function ownKeys$
|
|
14664
|
-
function _objectSpread$
|
|
14663
|
+
function ownKeys$14(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14664
|
+
function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$14(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$14(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14665
14665
|
function _createForOfIteratorHelper$m(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$m(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
14666
14666
|
function _unsupportedIterableToArray$m(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$m(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$m(r, a) : void 0; } }
|
|
14667
14667
|
function _arrayLikeToArray$m(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; }
|
|
@@ -14772,7 +14772,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
14772
14772
|
if (index >= 0) {
|
|
14773
14773
|
this._additionalMenuElements[index] = {
|
|
14774
14774
|
key: key,
|
|
14775
|
-
element: _objectSpread$
|
|
14775
|
+
element: _objectSpread$14(_objectSpread$14({}, this._additionalMenuElements[index].element), {}, {
|
|
14776
14776
|
items: items,
|
|
14777
14777
|
selected: selected
|
|
14778
14778
|
})
|
|
@@ -14823,7 +14823,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
14823
14823
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
14824
14824
|
this.root.navigate('/' + path);
|
|
14825
14825
|
}
|
|
14826
|
-
this._menuElement1 = _objectSpread$
|
|
14826
|
+
this._menuElement1 = _objectSpread$14(_objectSpread$14({}, this.menuElement1), {}, {
|
|
14827
14827
|
selected: this._selectedMenuKeys[0]
|
|
14828
14828
|
});
|
|
14829
14829
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -15079,7 +15079,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
15079
15079
|
return items.filter(function (item) {
|
|
15080
15080
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
15081
15081
|
}).map(function (item) {
|
|
15082
|
-
return _objectSpread$
|
|
15082
|
+
return _objectSpread$14(_objectSpread$14({}, item), {}, {
|
|
15083
15083
|
items: item.items ? _this5.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
15084
15084
|
subMenu: item.subMenu ? _this5.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
15085
15085
|
});
|
|
@@ -16308,8 +16308,8 @@ var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
16308
16308
|
return _createClass(_default);
|
|
16309
16309
|
}(_default$d);
|
|
16310
16310
|
|
|
16311
|
-
function ownKeys$
|
|
16312
|
-
function _objectSpread$
|
|
16311
|
+
function ownKeys$13(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16312
|
+
function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$13(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$13(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16313
16313
|
var LOG$c = getLogger('Backoffice', 'ContextStore');
|
|
16314
16314
|
|
|
16315
16315
|
/**
|
|
@@ -16344,7 +16344,7 @@ var ContextStore = /*#__PURE__*/function () {
|
|
|
16344
16344
|
key: "updateContext",
|
|
16345
16345
|
value: function updateContext(contextId, updates) {
|
|
16346
16346
|
var currentState = this.contexts.get(contextId) || {};
|
|
16347
|
-
var updatedState = _objectSpread$
|
|
16347
|
+
var updatedState = _objectSpread$13(_objectSpread$13({}, currentState), updates);
|
|
16348
16348
|
this.contexts.set(contextId, updatedState);
|
|
16349
16349
|
LOG$c.debug("Updated context ".concat(contextId), {
|
|
16350
16350
|
updatedState: updatedState
|
|
@@ -16976,8 +16976,8 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
16976
16976
|
}]);
|
|
16977
16977
|
}();
|
|
16978
16978
|
|
|
16979
|
-
function ownKeys$
|
|
16980
|
-
function _objectSpread$
|
|
16979
|
+
function ownKeys$12(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16980
|
+
function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$12(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$12(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16981
16981
|
function _createForOfIteratorHelper$k(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$k(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
16982
16982
|
function _unsupportedIterableToArray$k(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$k(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$k(r, a) : void 0; } }
|
|
16983
16983
|
function _arrayLikeToArray$k(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; }
|
|
@@ -17093,7 +17093,7 @@ function useFormData (_ref) {
|
|
|
17093
17093
|
multipleEditingData = inboundData;
|
|
17094
17094
|
}
|
|
17095
17095
|
return {
|
|
17096
|
-
loadedData: _onLoadFields(_objectSpread$
|
|
17096
|
+
loadedData: _onLoadFields(_objectSpread$12({}, dt)),
|
|
17097
17097
|
multipleEditingData: multipleEditingData
|
|
17098
17098
|
};
|
|
17099
17099
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -17120,7 +17120,7 @@ function useFormData (_ref) {
|
|
|
17120
17120
|
setFieldErrors = _useState20[1];
|
|
17121
17121
|
useEffect(function () {
|
|
17122
17122
|
var _loadedData$_id2;
|
|
17123
|
-
setState(_objectSpread$
|
|
17123
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17124
17124
|
data: loadedData,
|
|
17125
17125
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
17126
17126
|
update: !!((_loadedData$_id2 = loadedData === null || loadedData === void 0 ? void 0 : loadedData._id) !== null && _loadedData$_id2 !== void 0 ? _loadedData$_id2 : loadedData === null || loadedData === void 0 ? void 0 : loadedData.ID),
|
|
@@ -17222,7 +17222,7 @@ function useFormData (_ref) {
|
|
|
17222
17222
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
17223
17223
|
while (1) switch (_context2.prev = _context2.next) {
|
|
17224
17224
|
case 0:
|
|
17225
|
-
newData = merge(_objectSpread$
|
|
17225
|
+
newData = merge(_objectSpread$12({}, state.data), values);
|
|
17226
17226
|
if (!skipApi) {
|
|
17227
17227
|
_context2.next = 3;
|
|
17228
17228
|
break;
|
|
@@ -17232,7 +17232,7 @@ function useFormData (_ref) {
|
|
|
17232
17232
|
root.actions.toggleLoading('saving_form');
|
|
17233
17233
|
_context2.prev = 4;
|
|
17234
17234
|
_context2.next = 7;
|
|
17235
|
-
return setDynamicFields(_objectSpread$
|
|
17235
|
+
return setDynamicFields(_objectSpread$12({}, state.data), newData);
|
|
17236
17236
|
case 7:
|
|
17237
17237
|
newData = _context2.sent;
|
|
17238
17238
|
_context2.next = 10;
|
|
@@ -17247,7 +17247,7 @@ function useFormData (_ref) {
|
|
|
17247
17247
|
root.actions.toggleLoading('saving_form');
|
|
17248
17248
|
throw _context2.t0;
|
|
17249
17249
|
case 17:
|
|
17250
|
-
setState(_objectSpread$
|
|
17250
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17251
17251
|
loading: true
|
|
17252
17252
|
}));
|
|
17253
17253
|
finalData = state.data;
|
|
@@ -17300,14 +17300,14 @@ function useFormData (_ref) {
|
|
|
17300
17300
|
_context2.next = 47;
|
|
17301
17301
|
break;
|
|
17302
17302
|
}
|
|
17303
|
-
setFieldErrors(_objectSpread$
|
|
17303
|
+
setFieldErrors(_objectSpread$12(_objectSpread$12({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
17304
17304
|
return _context2.abrupt("return", undefined);
|
|
17305
17305
|
case 47:
|
|
17306
17306
|
throw _context2.t1;
|
|
17307
17307
|
case 48:
|
|
17308
17308
|
_context2.prev = 48;
|
|
17309
17309
|
root.actions.toggleLoading('saving_form');
|
|
17310
|
-
setState(_objectSpread$
|
|
17310
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17311
17311
|
data: finalData,
|
|
17312
17312
|
loading: false
|
|
17313
17313
|
}));
|
|
@@ -17337,7 +17337,7 @@ function useFormData (_ref) {
|
|
|
17337
17337
|
}
|
|
17338
17338
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
17339
17339
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
17340
|
-
var wholeData = Object.assign(_objectSpread$
|
|
17340
|
+
var wholeData = Object.assign(_objectSpread$12({}, state.data), _objectSpread$12({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
17341
17341
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
17342
17342
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
17343
17343
|
setHiddenRequiredDisabled(newState);
|
|
@@ -17355,14 +17355,14 @@ function useFormData (_ref) {
|
|
|
17355
17355
|
var item = getItem(id !== null && id !== void 0 ? id : '');
|
|
17356
17356
|
item === null || item === void 0 || (_item$onValueChange = item.onValueChange) === null || _item$onValueChange === void 0 || _item$onValueChange.call(item, value, item, state.form);
|
|
17357
17357
|
}
|
|
17358
|
-
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$
|
|
17358
|
+
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$12({}, state.data), state.form.getFieldsValue(), mergeCustomizer);
|
|
17359
17359
|
if (id) {
|
|
17360
17360
|
setFieldInObject(id, data, value);
|
|
17361
|
-
var newFieldErrors = _objectSpread$
|
|
17361
|
+
var newFieldErrors = _objectSpread$12({}, fieldErrors);
|
|
17362
17362
|
delete newFieldErrors[id.toString()];
|
|
17363
17363
|
setFieldErrors(newFieldErrors);
|
|
17364
17364
|
}
|
|
17365
|
-
setState(_objectSpread$
|
|
17365
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17366
17366
|
data: data
|
|
17367
17367
|
}));
|
|
17368
17368
|
return data;
|
|
@@ -17412,12 +17412,12 @@ function useFormData (_ref) {
|
|
|
17412
17412
|
var _value$value;
|
|
17413
17413
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
17414
17414
|
if (configuration.itemSelectorReset) {
|
|
17415
|
-
setState(_objectSpread$
|
|
17415
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17416
17416
|
data: _defineProperty({}, name, val)
|
|
17417
17417
|
}));
|
|
17418
17418
|
} else {
|
|
17419
|
-
setState(_objectSpread$
|
|
17420
|
-
data: _objectSpread$
|
|
17419
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17420
|
+
data: _objectSpread$12(_objectSpread$12({}, state.data), {}, _defineProperty({}, name, val))
|
|
17421
17421
|
}));
|
|
17422
17422
|
}
|
|
17423
17423
|
setSelectedItemsIndex(idx);
|
|
@@ -17428,12 +17428,12 @@ function useFormData (_ref) {
|
|
|
17428
17428
|
var val = _ref6.value;
|
|
17429
17429
|
if (value === val) {
|
|
17430
17430
|
if (configuration.itemSelectorReset) {
|
|
17431
|
-
setState(_objectSpread$
|
|
17431
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17432
17432
|
data: _defineProperty({}, name, val)
|
|
17433
17433
|
}));
|
|
17434
17434
|
} else {
|
|
17435
|
-
setState(_objectSpread$
|
|
17436
|
-
data: _objectSpread$
|
|
17435
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17436
|
+
data: _objectSpread$12(_objectSpread$12({}, state.data), {}, _defineProperty({}, name, val))
|
|
17437
17437
|
}));
|
|
17438
17438
|
}
|
|
17439
17439
|
setSelectedItemsIndex(idx);
|
|
@@ -17711,7 +17711,7 @@ function useFormData (_ref) {
|
|
|
17711
17711
|
for (var i = 0; i < configuration.tools.length; i++) {
|
|
17712
17712
|
var _tool$defaultOpen;
|
|
17713
17713
|
var tool = configuration.tools[i];
|
|
17714
|
-
tools.push(_objectSpread$
|
|
17714
|
+
tools.push(_objectSpread$12(_objectSpread$12({}, tool), {}, {
|
|
17715
17715
|
parameters: {
|
|
17716
17716
|
data: state.data
|
|
17717
17717
|
},
|
|
@@ -17830,7 +17830,7 @@ function useFormData (_ref) {
|
|
|
17830
17830
|
})) return;
|
|
17831
17831
|
setRemovedMedias([].concat(_toConsumableArray(removedMedias), [media]));
|
|
17832
17832
|
};
|
|
17833
|
-
return _objectSpread$
|
|
17833
|
+
return _objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17834
17834
|
getIsHidden: getIsHidden,
|
|
17835
17835
|
setUsedPreset: setUsedPreset,
|
|
17836
17836
|
configuration: configuration,
|
|
@@ -17947,8 +17947,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
17947
17947
|
};
|
|
17948
17948
|
|
|
17949
17949
|
var _excluded$9 = ["key", "name"];
|
|
17950
|
-
function ownKeys$
|
|
17951
|
-
function _objectSpread$
|
|
17950
|
+
function ownKeys$11(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17951
|
+
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$11(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$11(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17952
17952
|
var FormList$2 = function FormList(_ref) {
|
|
17953
17953
|
var _item$initialValue;
|
|
17954
17954
|
var value = _ref.value,
|
|
@@ -18006,7 +18006,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
18006
18006
|
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
18007
18007
|
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
18008
18008
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
18009
|
-
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$
|
|
18009
|
+
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$11(_objectSpread$11({}, restField), {}, {
|
|
18010
18010
|
id: n.join(),
|
|
18011
18011
|
key: n.join(),
|
|
18012
18012
|
name: n,
|
|
@@ -18018,7 +18018,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
18018
18018
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
18019
18019
|
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
18020
18020
|
hidden: hidden
|
|
18021
|
-
}), getElement(_objectSpread$
|
|
18021
|
+
}), getElement(_objectSpread$11(_objectSpread$11({}, i), {}, {
|
|
18022
18022
|
name: n
|
|
18023
18023
|
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
18024
18024
|
})
|
|
@@ -18252,8 +18252,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
18252
18252
|
var css_248z$x = ".wrapper-GVe2h {\n display: flex;\n flex-direction: row;\n gap: 12px;\n}\n\n.button-group-GYt-T {\n display: flex;\n flex-direction: row;\n gap: 12px;\n margin: 0 12px;\n}\n";
|
|
18253
18253
|
styleInject(css_248z$x);
|
|
18254
18254
|
|
|
18255
|
-
function ownKeys
|
|
18256
|
-
function _objectSpread
|
|
18255
|
+
function ownKeys$10(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18256
|
+
function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$10(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$10(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18257
18257
|
var SubTitle = function SubTitle(_ref) {
|
|
18258
18258
|
var _item$orientation, _item$buttonIds;
|
|
18259
18259
|
var item = _ref.item,
|
|
@@ -18262,7 +18262,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
18262
18262
|
t = _useTranslation.t;
|
|
18263
18263
|
return /*#__PURE__*/jsx(Divider, {
|
|
18264
18264
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
18265
|
-
style: _objectSpread
|
|
18265
|
+
style: _objectSpread$10({}, item.style),
|
|
18266
18266
|
children: /*#__PURE__*/jsxs("div", {
|
|
18267
18267
|
className: wrapper$6,
|
|
18268
18268
|
children: [Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name), ((_item$buttonIds = item.buttonIds) === null || _item$buttonIds === void 0 ? void 0 : _item$buttonIds.length) && item.buttonIds.map(function (b) {
|
|
@@ -18531,8 +18531,8 @@ var css_248z$w = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\
|
|
|
18531
18531
|
styleInject(css_248z$w);
|
|
18532
18532
|
|
|
18533
18533
|
var _excluded$8 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title", "sharedState"];
|
|
18534
|
-
function ownKeys
|
|
18535
|
-
function _objectSpread
|
|
18534
|
+
function ownKeys$$(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18535
|
+
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$$(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$$(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18536
18536
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
18537
18537
|
var apiInterface = _ref.apiInterface,
|
|
18538
18538
|
selectMapping = _ref.selectMapping,
|
|
@@ -18559,7 +18559,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
|
18559
18559
|
return /*#__PURE__*/jsxs("div", {
|
|
18560
18560
|
ref: ref,
|
|
18561
18561
|
className: classnames(title ? wrapper$5 : undefined),
|
|
18562
|
-
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread
|
|
18562
|
+
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$$(_objectSpread$$({}, selectProps), {}, {
|
|
18563
18563
|
showSearch: search,
|
|
18564
18564
|
loading: state.loading,
|
|
18565
18565
|
options: state.options,
|
|
@@ -19176,8 +19176,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
19176
19176
|
}]);
|
|
19177
19177
|
}(_default$d);
|
|
19178
19178
|
|
|
19179
|
-
function ownKeys$
|
|
19180
|
-
function _objectSpread$
|
|
19179
|
+
function ownKeys$_(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19180
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$_(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$_(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19181
19181
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
19182
19182
|
function useSelectClientRelationCatalog (_ref) {
|
|
19183
19183
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -19346,7 +19346,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
19346
19346
|
case 22:
|
|
19347
19347
|
supplierData = _context2.sent;
|
|
19348
19348
|
case 23:
|
|
19349
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
19349
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$_(_objectSpread$_({}, _selectedSupplier), {}, {
|
|
19350
19350
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
19351
19351
|
}), supplierData);
|
|
19352
19352
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -19567,8 +19567,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
19567
19567
|
function _createForOfIteratorHelper$i(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$i(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
19568
19568
|
function _unsupportedIterableToArray$i(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$i(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$i(r, a) : void 0; } }
|
|
19569
19569
|
function _arrayLikeToArray$i(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; }
|
|
19570
|
-
function ownKeys$
|
|
19571
|
-
function _objectSpread$
|
|
19570
|
+
function ownKeys$Z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19571
|
+
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$Z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$Z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19572
19572
|
function useSelectData (_ref) {
|
|
19573
19573
|
var data = _ref.data,
|
|
19574
19574
|
onChange = _ref.onChange,
|
|
@@ -19751,7 +19751,7 @@ function useSelectData (_ref) {
|
|
|
19751
19751
|
setFetching(true);
|
|
19752
19752
|
serverSideParams = {
|
|
19753
19753
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
19754
|
-
return _objectSpread$
|
|
19754
|
+
return _objectSpread$Z(_objectSpread$Z({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
19755
19755
|
}, {}) : {
|
|
19756
19756
|
_id: [value, 'contains']
|
|
19757
19757
|
},
|
|
@@ -20043,8 +20043,8 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
20043
20043
|
var css_248z$t = ".wrapper-WStAk {\n display: flex;\n flex-direction: column;\n}\n.header-wrapper-gWQuH {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-left: 64px;\n}\n\n.buttons-wrapper-7ebR9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n}\n";
|
|
20044
20044
|
styleInject(css_248z$t);
|
|
20045
20045
|
|
|
20046
|
-
function ownKeys$
|
|
20047
|
-
function _objectSpread$
|
|
20046
|
+
function ownKeys$Y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20047
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$Y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$Y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20048
20048
|
var LOG$9 = getLogger('Backoffice', 'Translation Form');
|
|
20049
20049
|
function useTranslationHook (item, state) {
|
|
20050
20050
|
var root = useStore();
|
|
@@ -20177,7 +20177,7 @@ function useTranslationHook (item, state) {
|
|
|
20177
20177
|
case 0:
|
|
20178
20178
|
_context2.next = 2;
|
|
20179
20179
|
return apiHandler.create({
|
|
20180
|
-
locales: _objectSpread$
|
|
20180
|
+
locales: _objectSpread$Y({
|
|
20181
20181
|
de: {},
|
|
20182
20182
|
it: {},
|
|
20183
20183
|
fr: {},
|
|
@@ -20226,8 +20226,8 @@ function useTranslationHook (item, state) {
|
|
|
20226
20226
|
};
|
|
20227
20227
|
}
|
|
20228
20228
|
|
|
20229
|
-
function ownKeys$
|
|
20230
|
-
function _objectSpread$
|
|
20229
|
+
function ownKeys$X(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20230
|
+
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$X(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$X(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20231
20231
|
var Translation = function Translation(_ref) {
|
|
20232
20232
|
var item = _ref.item,
|
|
20233
20233
|
state = _ref.state,
|
|
@@ -20278,7 +20278,7 @@ var Translation = function Translation(_ref) {
|
|
|
20278
20278
|
var hidden = state.getIsHidden(i, data);
|
|
20279
20279
|
var newAbsoluteName = absoluteName !== '' ? [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n)) : n;
|
|
20280
20280
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
20281
|
-
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$
|
|
20281
|
+
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$X(_objectSpread$X({}, i), {}, {
|
|
20282
20282
|
name: n
|
|
20283
20283
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden, currentLang) : /*#__PURE__*/jsx(Form$2.Item, {
|
|
20284
20284
|
id: idx.toString(),
|
|
@@ -20291,7 +20291,7 @@ var Translation = function Translation(_ref) {
|
|
|
20291
20291
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
20292
20292
|
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
20293
20293
|
hidden: hidden,
|
|
20294
|
-
children: getElement(_objectSpread$
|
|
20294
|
+
children: getElement(_objectSpread$X(_objectSpread$X({}, i), {}, {
|
|
20295
20295
|
name: n
|
|
20296
20296
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden)
|
|
20297
20297
|
})
|
|
@@ -20634,7 +20634,7 @@ function Media (_ref) {
|
|
|
20634
20634
|
});
|
|
20635
20635
|
}
|
|
20636
20636
|
|
|
20637
|
-
var Text = function Text(_ref) {
|
|
20637
|
+
var Text$1 = function Text(_ref) {
|
|
20638
20638
|
var item = _ref.item;
|
|
20639
20639
|
var _useTranslation = useTranslation(),
|
|
20640
20640
|
t = _useTranslation.t;
|
|
@@ -20643,13 +20643,13 @@ var Text = function Text(_ref) {
|
|
|
20643
20643
|
children: t(item.text)
|
|
20644
20644
|
});
|
|
20645
20645
|
};
|
|
20646
|
-
var Text$
|
|
20646
|
+
var Text$2 = observer(Text$1);
|
|
20647
20647
|
|
|
20648
20648
|
function _createForOfIteratorHelper$h(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$h(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
20649
20649
|
function _unsupportedIterableToArray$h(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$h(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$h(r, a) : void 0; } }
|
|
20650
20650
|
function _arrayLikeToArray$h(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; }
|
|
20651
|
-
function ownKeys$
|
|
20652
|
-
function _objectSpread$
|
|
20651
|
+
function ownKeys$W(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20652
|
+
function _objectSpread$W(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$W(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$W(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20653
20653
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
|
|
20654
20654
|
var _isReadonly, _state$hiddenRequired;
|
|
20655
20655
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -20684,7 +20684,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20684
20684
|
}
|
|
20685
20685
|
});
|
|
20686
20686
|
case 'selectSimple':
|
|
20687
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
20687
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$W(_objectSpread$W({}, item), {}, {
|
|
20688
20688
|
disabled: disabled,
|
|
20689
20689
|
onChange: function onChange(value) {
|
|
20690
20690
|
_onChange(absoluteName, value);
|
|
@@ -20896,7 +20896,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20896
20896
|
value: item.value,
|
|
20897
20897
|
options: item.options.map(function (o) {
|
|
20898
20898
|
var _o$disabled;
|
|
20899
|
-
return _objectSpread$
|
|
20899
|
+
return _objectSpread$W(_objectSpread$W({}, o), {}, {
|
|
20900
20900
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, state.data)
|
|
20901
20901
|
});
|
|
20902
20902
|
}),
|
|
@@ -20917,7 +20917,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20917
20917
|
},
|
|
20918
20918
|
icon: item.icon,
|
|
20919
20919
|
callback: function callback(data) {
|
|
20920
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
20920
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$W(_objectSpread$W({}, state.data), data));
|
|
20921
20921
|
}
|
|
20922
20922
|
});
|
|
20923
20923
|
case 'media':
|
|
@@ -20928,7 +20928,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20928
20928
|
value: item.value
|
|
20929
20929
|
});
|
|
20930
20930
|
case 'text':
|
|
20931
|
-
return /*#__PURE__*/jsx(Text$
|
|
20931
|
+
return /*#__PURE__*/jsx(Text$2, {
|
|
20932
20932
|
item: item
|
|
20933
20933
|
});
|
|
20934
20934
|
default:
|
|
@@ -20938,7 +20938,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20938
20938
|
var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20939
20939
|
var _useTranslation = useTranslation(),
|
|
20940
20940
|
t = _useTranslation.t;
|
|
20941
|
-
return /*#__PURE__*/jsx(Input$1, _objectSpread$
|
|
20941
|
+
return /*#__PURE__*/jsx(Input$1, _objectSpread$W(_objectSpread$W({}, props), {}, {
|
|
20942
20942
|
ref: ref,
|
|
20943
20943
|
disabled: true,
|
|
20944
20944
|
value: t(props.translationPrefix + '.' + props.value)
|
|
@@ -20957,8 +20957,8 @@ function isReadonly(item, data) {
|
|
|
20957
20957
|
return false;
|
|
20958
20958
|
}
|
|
20959
20959
|
|
|
20960
|
-
function ownKeys$
|
|
20961
|
-
function _objectSpread$
|
|
20960
|
+
function ownKeys$V(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20961
|
+
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$V(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$V(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20962
20962
|
function _createForOfIteratorHelper$g(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$g(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
20963
20963
|
function _unsupportedIterableToArray$g(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$g(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$g(r, a) : void 0; } }
|
|
20964
20964
|
function _arrayLikeToArray$g(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; }
|
|
@@ -21008,13 +21008,13 @@ var Presets = function Presets(_ref) {
|
|
|
21008
21008
|
} finally {
|
|
21009
21009
|
_iterator.f();
|
|
21010
21010
|
}
|
|
21011
|
-
var data = _objectSpread$
|
|
21011
|
+
var data = _objectSpread$V(_objectSpread$V({}, form.getFieldsValue(names)), {}, {
|
|
21012
21012
|
newPresetName: newPresetName
|
|
21013
21013
|
});
|
|
21014
21014
|
data.dpi = parseInt(data.dpi);
|
|
21015
21015
|
data.organization = root.getGlobalValue('organizationId');
|
|
21016
21016
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
21017
|
-
var dt = _objectSpread$
|
|
21017
|
+
var dt = _objectSpread$V(_objectSpread$V({}, form.getFieldsValue(names)), {}, {
|
|
21018
21018
|
name: newPresetName
|
|
21019
21019
|
});
|
|
21020
21020
|
setPresets({
|
|
@@ -21508,8 +21508,8 @@ function getLabel(item, t) {
|
|
|
21508
21508
|
}
|
|
21509
21509
|
var Form$1 = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
21510
21510
|
|
|
21511
|
-
function ownKeys$
|
|
21512
|
-
function _objectSpread$
|
|
21511
|
+
function ownKeys$U(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21512
|
+
function _objectSpread$U(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$U(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$U(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21513
21513
|
function _createForOfIteratorHelper$f(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$f(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
21514
21514
|
function _unsupportedIterableToArray$f(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$f(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$f(r, a) : void 0; } }
|
|
21515
21515
|
function _arrayLikeToArray$f(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; }
|
|
@@ -21711,7 +21711,7 @@ function useRoleSelectorData (_ref) {
|
|
|
21711
21711
|
roles.forEach(function (r) {
|
|
21712
21712
|
//check if after the changes the role is selected
|
|
21713
21713
|
if (value.includes(r._id)) {
|
|
21714
|
-
var newValue = _objectSpread$
|
|
21714
|
+
var newValue = _objectSpread$U(_objectSpread$U({}, r), {}, {
|
|
21715
21715
|
selected: true
|
|
21716
21716
|
});
|
|
21717
21717
|
//add it to the new list as selected role
|
|
@@ -21747,7 +21747,7 @@ function useRoleSelectorData (_ref) {
|
|
|
21747
21747
|
}
|
|
21748
21748
|
}
|
|
21749
21749
|
} else {
|
|
21750
|
-
var _newValue = _objectSpread$
|
|
21750
|
+
var _newValue = _objectSpread$U(_objectSpread$U({}, r), {}, {
|
|
21751
21751
|
selected: false
|
|
21752
21752
|
});
|
|
21753
21753
|
//add it to the new list as unselected role
|
|
@@ -21951,7 +21951,7 @@ function _updateRoles() {
|
|
|
21951
21951
|
userRole = userRoles.find(function (r) {
|
|
21952
21952
|
return r._id == role._id;
|
|
21953
21953
|
});
|
|
21954
|
-
newRole = _objectSpread$
|
|
21954
|
+
newRole = _objectSpread$U({}, role);
|
|
21955
21955
|
if (userRole) {
|
|
21956
21956
|
newRole.selected = true;
|
|
21957
21957
|
newRole.inherited = userRole.inherited;
|
|
@@ -22171,7 +22171,7 @@ function _fetchOptions() {
|
|
|
22171
22171
|
case 4:
|
|
22172
22172
|
result = _context11.sent;
|
|
22173
22173
|
options = result.data.map(function (d) {
|
|
22174
|
-
return _objectSpread$
|
|
22174
|
+
return _objectSpread$U(_objectSpread$U({}, d), {}, {
|
|
22175
22175
|
label: d.displayName,
|
|
22176
22176
|
value: d._id,
|
|
22177
22177
|
isLeaf: !d.hasChildren
|
|
@@ -22273,8 +22273,8 @@ var parent = "parent-NZJ3S";
|
|
|
22273
22273
|
var css_248z$s = ".permission-Button-XctsZ {\n position: relative;\n top: 25px;\n left: -30px;\n float: right;\n height: 20px;\n z-index: 1000;\n}\n.select-lzft- {\n width: 100%;\n}\n.loadingOption-qCkRw {\n margin-top: 11px;\n padding-left: 500px;\n}\n.scroller-lrdk9 {\n overflow: auto;\n height: 100%;\n}\n\n.skeleton--xCI0 {\n padding-left: 25px;\n padding-bottom: 10px;\n}\n.filterField-1kU1O {\n display: flex;\n gap: 10px;\n}\n.filterField-1kU1O button {\n height: 32px;\n}\n.filterField-1kU1O div {\n height: 32px;\n}\n\n.parent-scroll-GmaL9 {\n overflow: auto;\n padding: 24px;\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.parent-NZJ3S {\n overflow: auto;\n padding: 24px;\n height: 100%;\n}\n\n.parent-scroll-GmaL9 .ant-spin-container {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component__outerdiv {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component {\n height: 100% !important;\n}\n";
|
|
22274
22274
|
styleInject(css_248z$s);
|
|
22275
22275
|
|
|
22276
|
-
function ownKeys$
|
|
22277
|
-
function _objectSpread$
|
|
22276
|
+
function ownKeys$T(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22277
|
+
function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$T(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$T(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22278
22278
|
function _createForOfIteratorHelper$e(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$e(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
22279
22279
|
function _unsupportedIterableToArray$e(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$e(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$e(r, a) : void 0; } }
|
|
22280
22280
|
function _arrayLikeToArray$e(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; }
|
|
@@ -22334,8 +22334,8 @@ function _generateCSV() {
|
|
|
22334
22334
|
break;
|
|
22335
22335
|
}
|
|
22336
22336
|
_context2.next = 21;
|
|
22337
|
-
return generateCSV(_objectSpread$
|
|
22338
|
-
mappingData: _objectSpread$
|
|
22337
|
+
return generateCSV(_objectSpread$T(_objectSpread$T({}, exportParams.children), {}, {
|
|
22338
|
+
mappingData: _objectSpread$T(_objectSpread$T({}, parent), {}, {
|
|
22339
22339
|
parentId: exportParams.mappingData._id
|
|
22340
22340
|
})
|
|
22341
22341
|
}), csvData);
|
|
@@ -22443,8 +22443,8 @@ function _downloadFile() {
|
|
|
22443
22443
|
return _downloadFile.apply(this, arguments);
|
|
22444
22444
|
}
|
|
22445
22445
|
|
|
22446
|
-
function ownKeys$
|
|
22447
|
-
function _objectSpread$
|
|
22446
|
+
function ownKeys$S(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22447
|
+
function _objectSpread$S(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$S(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$S(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22448
22448
|
function _createForOfIteratorHelper$d(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$d(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
22449
22449
|
function _unsupportedIterableToArray$d(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$d(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$d(r, a) : void 0; } }
|
|
22450
22450
|
function _arrayLikeToArray$d(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; }
|
|
@@ -22863,7 +22863,7 @@ function useRelationSelectorData (_ref) {
|
|
|
22863
22863
|
var activeItem = _step.value;
|
|
22864
22864
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
22865
22865
|
addedObjects.push(addedData);
|
|
22866
|
-
getSplittedItems(_objectSpread$
|
|
22866
|
+
getSplittedItems(_objectSpread$S(_objectSpread$S({}, activeItem), {}, {
|
|
22867
22867
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
22868
22868
|
}));
|
|
22869
22869
|
ret = true;
|
|
@@ -23068,8 +23068,8 @@ function useRelationSelectorData (_ref) {
|
|
|
23068
23068
|
};
|
|
23069
23069
|
}
|
|
23070
23070
|
|
|
23071
|
-
function ownKeys$
|
|
23072
|
-
function _objectSpread$
|
|
23071
|
+
function ownKeys$R(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23072
|
+
function _objectSpread$R(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$R(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$R(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23073
23073
|
function _createForOfIteratorHelper$c(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$c(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
23074
23074
|
function _unsupportedIterableToArray$c(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$c(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$c(r, a) : void 0; } }
|
|
23075
23075
|
function _arrayLikeToArray$c(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; }
|
|
@@ -23202,7 +23202,7 @@ function ActionButton (_ref) {
|
|
|
23202
23202
|
_iterator2.f();
|
|
23203
23203
|
}
|
|
23204
23204
|
_context.next = 19;
|
|
23205
|
-
return apiInterface.update(_objectSpread$
|
|
23205
|
+
return apiInterface.update(_objectSpread$R(_objectSpread$R({}, data), {}, {
|
|
23206
23206
|
state: toSwitch
|
|
23207
23207
|
}), data);
|
|
23208
23208
|
case 19:
|
|
@@ -23359,14 +23359,14 @@ function _simpleChangeValue() {
|
|
|
23359
23359
|
break;
|
|
23360
23360
|
}
|
|
23361
23361
|
for (i = 0; i < action.newValues.length; i++) {
|
|
23362
|
-
fieldsToUpdate = _objectSpread$
|
|
23362
|
+
fieldsToUpdate = _objectSpread$R(_objectSpread$R({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
23363
23363
|
}
|
|
23364
23364
|
if (!apiInterface.canUpdate) {
|
|
23365
23365
|
_context2.next = 9;
|
|
23366
23366
|
break;
|
|
23367
23367
|
}
|
|
23368
23368
|
_context2.next = 7;
|
|
23369
|
-
return apiInterface.update(_objectSpread$
|
|
23369
|
+
return apiInterface.update(_objectSpread$R({}, fieldsToUpdate), data);
|
|
23370
23370
|
case 7:
|
|
23371
23371
|
response = _context2.sent;
|
|
23372
23372
|
return _context2.abrupt("return", response);
|
|
@@ -23381,7 +23381,7 @@ function _simpleChangeValue() {
|
|
|
23381
23381
|
return _simpleChangeValue.apply(this, arguments);
|
|
23382
23382
|
}
|
|
23383
23383
|
function A(props) {
|
|
23384
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
23384
|
+
return /*#__PURE__*/jsx("a", _objectSpread$R({}, props));
|
|
23385
23385
|
}
|
|
23386
23386
|
|
|
23387
23387
|
function _createForOfIteratorHelper$b(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$b(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -23519,8 +23519,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
23519
23519
|
var css_248z$r = ".diva-component-DIVA_BACKOFFICE_NEW .title-cl-ZAj2y {\n color: black;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .description-m3mNY {\n color: grey;\n flex: 1 1 100%;\n margin-left: 25px;\n margin-top: -25px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-group-xWnj- {\n /* border-bottom: 1px solid black; */\n margin-bottom: 40px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .delete-item-otdSr {\n cursor: pointer;\n position: relative;\n float: right;\n top: 13px;\n margin-right: 20px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .newscroller-INKeD {\n overflow: auto;\n height: 400px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-collapse-header--6FgU div {\n flex-wrap: wrap !important;\n}\n.diva-component-DIVA_BACKOFFICE_NEW a .item-title--BTvC {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.85);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-desc-DBiiF {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.45);\n}\n";
|
|
23520
23520
|
styleInject(css_248z$r);
|
|
23521
23521
|
|
|
23522
|
-
function ownKeys$
|
|
23523
|
-
function _objectSpread$
|
|
23522
|
+
function ownKeys$Q(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23523
|
+
function _objectSpread$Q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$Q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$Q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23524
23524
|
var DropDown = function DropDown(_ref) {
|
|
23525
23525
|
var _curItem$data$length;
|
|
23526
23526
|
var split = _ref.split,
|
|
@@ -23552,7 +23552,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
23552
23552
|
});
|
|
23553
23553
|
return /*#__PURE__*/jsx(Collapse, {
|
|
23554
23554
|
onChange: function onChange() {
|
|
23555
|
-
return getSplittedItems(_objectSpread$
|
|
23555
|
+
return getSplittedItems(_objectSpread$Q(_objectSpread$Q({}, item.item), {}, {
|
|
23556
23556
|
parentId: item.parentId
|
|
23557
23557
|
}), 0);
|
|
23558
23558
|
},
|
|
@@ -23810,8 +23810,8 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
23810
23810
|
};
|
|
23811
23811
|
var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
|
|
23812
23812
|
|
|
23813
|
-
function ownKeys$
|
|
23814
|
-
function _objectSpread$
|
|
23813
|
+
function ownKeys$P(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23814
|
+
function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$P(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$P(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23815
23815
|
function useFormListData (_ref) {
|
|
23816
23816
|
var _configuration$defaul;
|
|
23817
23817
|
var id = _ref.id,
|
|
@@ -23891,7 +23891,7 @@ function useFormListData (_ref) {
|
|
|
23891
23891
|
if (updated.length == state.length) {
|
|
23892
23892
|
newState = state.map(function (s, i) {
|
|
23893
23893
|
var _updated$find;
|
|
23894
|
-
return _objectSpread$
|
|
23894
|
+
return _objectSpread$P(_objectSpread$P({}, s), {}, {
|
|
23895
23895
|
data: (_updated$find = updated.find(function (u) {
|
|
23896
23896
|
return u.index == i;
|
|
23897
23897
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -24028,8 +24028,8 @@ var FormList = function FormList(_ref, ref) {
|
|
|
24028
24028
|
};
|
|
24029
24029
|
var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
24030
24030
|
|
|
24031
|
-
function ownKeys$
|
|
24032
|
-
function _objectSpread$
|
|
24031
|
+
function ownKeys$O(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24032
|
+
function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$O(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$O(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24033
24033
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
24034
24034
|
function useSelectOrCreateData (_ref) {
|
|
24035
24035
|
var id = _ref.id,
|
|
@@ -24126,7 +24126,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
24126
24126
|
_context.next = 7;
|
|
24127
24127
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
24128
24128
|
filters: (_configuration$select3 = configuration.selectMapping) !== null && _configuration$select3 !== void 0 && _configuration$select3.searchField ? (_configuration$select4 = configuration.selectMapping) === null || _configuration$select4 === void 0 ? void 0 : _configuration$select4.searchField.reduce(function (filter, field) {
|
|
24129
|
-
return _objectSpread$
|
|
24129
|
+
return _objectSpread$O(_objectSpread$O({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
24130
24130
|
}, {}) : {
|
|
24131
24131
|
_id: [value, 'contains']
|
|
24132
24132
|
},
|
|
@@ -24437,8 +24437,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
24437
24437
|
});
|
|
24438
24438
|
};
|
|
24439
24439
|
|
|
24440
|
-
function ownKeys$
|
|
24441
|
-
function _objectSpread$
|
|
24440
|
+
function ownKeys$N(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24441
|
+
function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$N(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$N(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24442
24442
|
function useListData (_ref) {
|
|
24443
24443
|
var id = _ref.id,
|
|
24444
24444
|
data = _ref.data;
|
|
@@ -24481,7 +24481,7 @@ function useListData (_ref) {
|
|
|
24481
24481
|
case 3:
|
|
24482
24482
|
result = _context.sent;
|
|
24483
24483
|
setListData(result.data.map(parseField));
|
|
24484
|
-
initData = _objectSpread$
|
|
24484
|
+
initData = _objectSpread$N({}, data);
|
|
24485
24485
|
setUpdatedObject(initData);
|
|
24486
24486
|
setLoading(false);
|
|
24487
24487
|
case 8:
|
|
@@ -24522,7 +24522,7 @@ function useListData (_ref) {
|
|
|
24522
24522
|
});
|
|
24523
24523
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
24524
24524
|
var parsedField = field.field.split('.');
|
|
24525
|
-
item.itemUpdate = _objectSpread$
|
|
24525
|
+
item.itemUpdate = _objectSpread$N(_objectSpread$N({}, field), {}, {
|
|
24526
24526
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
24527
24527
|
});
|
|
24528
24528
|
});
|
|
@@ -24553,16 +24553,16 @@ function useListData (_ref) {
|
|
|
24553
24553
|
console.error('field with more than 2 parts not allowed');
|
|
24554
24554
|
return;
|
|
24555
24555
|
}
|
|
24556
|
-
var updObj = _objectSpread$
|
|
24556
|
+
var updObj = _objectSpread$N({}, updatedObject);
|
|
24557
24557
|
if (fields.length === 1) {
|
|
24558
|
-
updObj = _objectSpread$
|
|
24558
|
+
updObj = _objectSpread$N(_objectSpread$N({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
24559
24559
|
} else if (fields.length === 2) {
|
|
24560
24560
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
24561
24561
|
return v.id === item.id.trim();
|
|
24562
24562
|
});
|
|
24563
24563
|
if (updatedField) {
|
|
24564
|
-
var updatedFieldCopy = _objectSpread$
|
|
24565
|
-
updObj = _objectSpread$
|
|
24564
|
+
var updatedFieldCopy = _objectSpread$N(_objectSpread$N({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
24565
|
+
updObj = _objectSpread$N(_objectSpread$N({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
24566
24566
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
24567
24567
|
})));
|
|
24568
24568
|
}
|
|
@@ -24571,11 +24571,11 @@ function useListData (_ref) {
|
|
|
24571
24571
|
var acItems = listData;
|
|
24572
24572
|
for (var i = 0; i < acItems.length; i++) {
|
|
24573
24573
|
if (i == index) {
|
|
24574
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
24574
|
+
acItems[i].itemUpdate = _objectSpread$N(_objectSpread$N({}, acItems[i].itemUpdate), {}, {
|
|
24575
24575
|
value: value
|
|
24576
24576
|
});
|
|
24577
24577
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
24578
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
24578
|
+
acItems[i].itemUpdate = _objectSpread$N(_objectSpread$N({}, acItems[i].itemUpdate), {}, {
|
|
24579
24579
|
value: !value
|
|
24580
24580
|
});
|
|
24581
24581
|
}
|
|
@@ -25089,8 +25089,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
25089
25089
|
};
|
|
25090
25090
|
}
|
|
25091
25091
|
|
|
25092
|
-
function ownKeys$
|
|
25093
|
-
function _objectSpread$
|
|
25092
|
+
function ownKeys$M(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25093
|
+
function _objectSpread$M(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$M(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$M(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25094
25094
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
25095
25095
|
var id = _ref.id,
|
|
25096
25096
|
data = _ref.data,
|
|
@@ -25198,12 +25198,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
25198
25198
|
}
|
|
25199
25199
|
function onEnter(e) {
|
|
25200
25200
|
if (e.key != 'Enter') return;
|
|
25201
|
-
setCrop(_objectSpread$
|
|
25201
|
+
setCrop(_objectSpread$M(_objectSpread$M({}, crop), {}, {
|
|
25202
25202
|
unit: 'px',
|
|
25203
25203
|
width: Number(widthInputElement.current.value),
|
|
25204
25204
|
height: Number(heightInputElement.current.value)
|
|
25205
25205
|
}));
|
|
25206
|
-
setCompletedCrop(_objectSpread$
|
|
25206
|
+
setCompletedCrop(_objectSpread$M(_objectSpread$M({}, crop), {}, {
|
|
25207
25207
|
unit: 'px',
|
|
25208
25208
|
width: Number(widthInputElement.current.value),
|
|
25209
25209
|
height: Number(heightInputElement.current.value)
|
|
@@ -25281,8 +25281,8 @@ var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
|
25281
25281
|
function _createForOfIteratorHelper$a(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$a(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
25282
25282
|
function _unsupportedIterableToArray$a(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$a(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$a(r, a) : void 0; } }
|
|
25283
25283
|
function _arrayLikeToArray$a(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; }
|
|
25284
|
-
function ownKeys$
|
|
25285
|
-
function _objectSpread$
|
|
25284
|
+
function ownKeys$L(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25285
|
+
function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$L(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$L(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25286
25286
|
function useDescriptions (_ref) {
|
|
25287
25287
|
var id = _ref.id;
|
|
25288
25288
|
var root = useStore();
|
|
@@ -25375,7 +25375,7 @@ function _getDisplayData() {
|
|
|
25375
25375
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
25376
25376
|
while (1) switch (_context4.prev = _context4.next) {
|
|
25377
25377
|
case 0:
|
|
25378
|
-
displayData = _objectSpread$
|
|
25378
|
+
displayData = _objectSpread$L({}, data);
|
|
25379
25379
|
_iterator = _createForOfIteratorHelper$a(items);
|
|
25380
25380
|
_context4.prev = 2;
|
|
25381
25381
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -25651,8 +25651,8 @@ var FileUploadWrapper$1 = function FileUploadWrapper(_ref) {
|
|
|
25651
25651
|
};
|
|
25652
25652
|
var FileUploadBeta = observer(FileUploadWrapper$1);
|
|
25653
25653
|
|
|
25654
|
-
function ownKeys$
|
|
25655
|
-
function _objectSpread$
|
|
25654
|
+
function ownKeys$K(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25655
|
+
function _objectSpread$K(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$K(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$K(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25656
25656
|
function useGridData (_ref) {
|
|
25657
25657
|
var id = _ref.id,
|
|
25658
25658
|
data = _ref.data;
|
|
@@ -25695,11 +25695,11 @@ function useGridData (_ref) {
|
|
|
25695
25695
|
function reducer(state, action) {
|
|
25696
25696
|
switch (action.type) {
|
|
25697
25697
|
case 'update':
|
|
25698
|
-
return _objectSpread$
|
|
25698
|
+
return _objectSpread$K(_objectSpread$K({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$K(_objectSpread$K({}, action.data), {}, {
|
|
25699
25699
|
buffer: Buffer.from(action.data.buffer)
|
|
25700
25700
|
})));
|
|
25701
25701
|
case 'delete':
|
|
25702
|
-
var newState = _objectSpread$
|
|
25702
|
+
var newState = _objectSpread$K({}, state);
|
|
25703
25703
|
delete newState[action.data.divaNr];
|
|
25704
25704
|
return newState;
|
|
25705
25705
|
default:
|
|
@@ -25786,8 +25786,8 @@ var Grid = function Grid(_ref) {
|
|
|
25786
25786
|
});
|
|
25787
25787
|
};
|
|
25788
25788
|
|
|
25789
|
-
function ownKeys$
|
|
25790
|
-
function _objectSpread$
|
|
25789
|
+
function ownKeys$J(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25790
|
+
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$J(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$J(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25791
25791
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
25792
25792
|
var id = _ref.id;
|
|
25793
25793
|
var root = useStore();
|
|
@@ -25906,7 +25906,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
25906
25906
|
onRemove: onRemove,
|
|
25907
25907
|
customRequest: customRequest,
|
|
25908
25908
|
fileList: fileList.map(function (f) {
|
|
25909
|
-
return _objectSpread$
|
|
25909
|
+
return _objectSpread$J(_objectSpread$J({}, f), {}, {
|
|
25910
25910
|
url: f.url
|
|
25911
25911
|
});
|
|
25912
25912
|
}),
|
|
@@ -25994,8 +25994,8 @@ var TableSummary = function TableSummary(_ref) {
|
|
|
25994
25994
|
});
|
|
25995
25995
|
};
|
|
25996
25996
|
|
|
25997
|
-
function ownKeys$
|
|
25998
|
-
function _objectSpread$
|
|
25997
|
+
function ownKeys$I(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25998
|
+
function _objectSpread$I(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$I(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$I(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25999
25999
|
function getExpandedRowRenderer (config, root) {
|
|
26000
26000
|
return function (record) {
|
|
26001
26001
|
var data = record;
|
|
@@ -26017,7 +26017,7 @@ function customSubTable(columns, datasource) {
|
|
|
26017
26017
|
// map custom columns to antd columns
|
|
26018
26018
|
var antcols = columns.map(function (col) {
|
|
26019
26019
|
var _col$width;
|
|
26020
|
-
return _objectSpread$
|
|
26020
|
+
return _objectSpread$I(_objectSpread$I({}, col), {}, {
|
|
26021
26021
|
title: col.title,
|
|
26022
26022
|
dataIndex: col.field,
|
|
26023
26023
|
key: col.field,
|
|
@@ -26729,8 +26729,8 @@ function LinkCell (_ref) {
|
|
|
26729
26729
|
|
|
26730
26730
|
var _excluded$7 = ["index"],
|
|
26731
26731
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
26732
|
-
function ownKeys$
|
|
26733
|
-
function _objectSpread$
|
|
26732
|
+
function ownKeys$H(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26733
|
+
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$H(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$H(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26734
26734
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
26735
26735
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
26736
26736
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -26744,7 +26744,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
26744
26744
|
component: false,
|
|
26745
26745
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
26746
26746
|
value: form,
|
|
26747
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
26747
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$H({}, props))
|
|
26748
26748
|
})
|
|
26749
26749
|
});
|
|
26750
26750
|
};
|
|
@@ -26797,7 +26797,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
26797
26797
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
26798
26798
|
longDescriptionType = 'text';
|
|
26799
26799
|
}
|
|
26800
|
-
var modifiedColumn = _objectSpread$
|
|
26800
|
+
var modifiedColumn = _objectSpread$H(_objectSpread$H({}, column), {}, {
|
|
26801
26801
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
26802
26802
|
});
|
|
26803
26803
|
if (column) {
|
|
@@ -26810,40 +26810,40 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
26810
26810
|
};
|
|
26811
26811
|
switch (modifiedColumn.type) {
|
|
26812
26812
|
case 'boolean':
|
|
26813
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
26813
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$H({}, cellProps));
|
|
26814
26814
|
break;
|
|
26815
26815
|
case 'text':
|
|
26816
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
26816
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$H({}, cellProps));
|
|
26817
26817
|
break;
|
|
26818
26818
|
case 'select':
|
|
26819
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
26819
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$H({}, cellProps));
|
|
26820
26820
|
case 'media':
|
|
26821
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
26821
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$H({}, cellProps));
|
|
26822
26822
|
break;
|
|
26823
26823
|
case 'mediaItem':
|
|
26824
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
26824
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$H({}, cellProps));
|
|
26825
26825
|
break;
|
|
26826
26826
|
case 'unixTimeStamp':
|
|
26827
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
26827
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$H({}, cellProps));
|
|
26828
26828
|
break;
|
|
26829
26829
|
case 'unixTimeStampCheck':
|
|
26830
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
26830
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$H({}, cellProps));
|
|
26831
26831
|
break;
|
|
26832
26832
|
case 'icon':
|
|
26833
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
26833
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$H({}, cellProps));
|
|
26834
26834
|
break;
|
|
26835
26835
|
case 'progress':
|
|
26836
|
-
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$
|
|
26836
|
+
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$H({}, cellProps));
|
|
26837
26837
|
break;
|
|
26838
26838
|
case 'link':
|
|
26839
|
-
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$
|
|
26839
|
+
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$H({}, cellProps));
|
|
26840
26840
|
break;
|
|
26841
26841
|
default:
|
|
26842
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
26842
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$H({}, cellProps));
|
|
26843
26843
|
break;
|
|
26844
26844
|
}
|
|
26845
26845
|
}
|
|
26846
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
26846
|
+
return /*#__PURE__*/jsx("td", _objectSpread$H(_objectSpread$H({}, restProps), {}, {
|
|
26847
26847
|
children: childNode
|
|
26848
26848
|
}));
|
|
26849
26849
|
};
|
|
@@ -27038,7 +27038,7 @@ var spinner = "spinner-00VcK";
|
|
|
27038
27038
|
var css_248z$l = ".container-2r-OJ {\n display: flex;\n gap: 40px; /* Distribute the columns evenly */\n}\n\n.column-yZ2Qc {\n padding: 10px;\n}\n\n.column1-9viTK .column-yZ2Qc {\n flex: 8;\n}\n\n.column2-pCnEz .column-yZ2Qc {\n flex: 1;\n}\n\n.column3-QZDVv .column-yZ2Qc {\n flex: 3;\n}\n\n.spinner-00VcK {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n";
|
|
27039
27039
|
styleInject(css_248z$l);
|
|
27040
27040
|
|
|
27041
|
-
var Panel = Collapse.Panel;
|
|
27041
|
+
var Panel$1 = Collapse.Panel;
|
|
27042
27042
|
function AGHistogram (_ref) {
|
|
27043
27043
|
var height = _ref.height,
|
|
27044
27044
|
width = _ref.width;
|
|
@@ -27146,7 +27146,7 @@ function AGHistogram (_ref) {
|
|
|
27146
27146
|
collapsible: collapsible,
|
|
27147
27147
|
activeKey: activeKeys,
|
|
27148
27148
|
onChange: handleOnChange,
|
|
27149
|
-
children: /*#__PURE__*/jsx(Panel, {
|
|
27149
|
+
children: /*#__PURE__*/jsx(Panel$1, {
|
|
27150
27150
|
header: headerText,
|
|
27151
27151
|
children: /*#__PURE__*/jsxs("div", {
|
|
27152
27152
|
className: container$5,
|
|
@@ -27195,8 +27195,8 @@ var SMChart = function SMChart(props) {
|
|
|
27195
27195
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
27196
27196
|
};
|
|
27197
27197
|
|
|
27198
|
-
function ownKeys$
|
|
27199
|
-
function _objectSpread$
|
|
27198
|
+
function ownKeys$G(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27199
|
+
function _objectSpread$G(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$G(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$G(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27200
27200
|
function _createForOfIteratorHelper$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$5(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
27201
27201
|
function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(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$5(r, a) : void 0; } }
|
|
27202
27202
|
function _arrayLikeToArray$5(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; }
|
|
@@ -27394,7 +27394,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
27394
27394
|
// Convert to Dayjs
|
|
27395
27395
|
(_state$globalFilter4 = state.globalFilter) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4.timeStamp) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4['toTimeStamp']) !== null && _state$globalFilter4 !== void 0 && _state$globalFilter4[0] ? dayjs((_state$globalFilter5 = state.globalFilter) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5.timeStamp) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5['toTimeStamp']) === null || _state$globalFilter5 === void 0 ? void 0 : _state$globalFilter5[0]) : dayjs(new Date()) // Convert to Dayjs
|
|
27396
27396
|
]
|
|
27397
|
-
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
27397
|
+
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$G(_objectSpread$G({}, (_state$configuration$5 = state.configuration.filter) === null || _state$configuration$5 === void 0 ? void 0 : _state$configuration$5.select.settings), {}, {
|
|
27398
27398
|
style: {
|
|
27399
27399
|
minWidth: '200px'
|
|
27400
27400
|
},
|
|
@@ -27499,7 +27499,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
27499
27499
|
},
|
|
27500
27500
|
dataSource: data,
|
|
27501
27501
|
loading: state.loading,
|
|
27502
|
-
pagination: _objectSpread$
|
|
27502
|
+
pagination: _objectSpread$G(_objectSpread$G({}, state.pagination), {}, {
|
|
27503
27503
|
showTotal: function showTotal(total, range) {
|
|
27504
27504
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
27505
27505
|
},
|
|
@@ -27819,7 +27819,7 @@ function BulkAction(_ref6) {
|
|
|
27819
27819
|
}
|
|
27820
27820
|
_context4.t0 = data;
|
|
27821
27821
|
_context4.next = 11;
|
|
27822
|
-
return apiInterface.update(_objectSpread$
|
|
27822
|
+
return apiInterface.update(_objectSpread$G(_objectSpread$G({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
27823
27823
|
case 11:
|
|
27824
27824
|
_context4.t1 = _context4.sent;
|
|
27825
27825
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -27932,8 +27932,8 @@ function SelectionText(_ref8) {
|
|
|
27932
27932
|
});
|
|
27933
27933
|
}
|
|
27934
27934
|
|
|
27935
|
-
function ownKeys$
|
|
27936
|
-
function _objectSpread$
|
|
27935
|
+
function ownKeys$F(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27936
|
+
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$F(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$F(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27937
27937
|
function getColumnFilterProps (_ref) {
|
|
27938
27938
|
var filter = _ref.filter,
|
|
27939
27939
|
title = _ref.title;
|
|
@@ -28296,7 +28296,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
28296
28296
|
});
|
|
28297
28297
|
},
|
|
28298
28298
|
options: filter.map(function (f) {
|
|
28299
|
-
return _objectSpread$
|
|
28299
|
+
return _objectSpread$F(_objectSpread$F({}, f), {}, {
|
|
28300
28300
|
label: t(f.label)
|
|
28301
28301
|
});
|
|
28302
28302
|
})
|
|
@@ -28345,7 +28345,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
28345
28345
|
setDisplaySelectedvalues = _useState4[1];
|
|
28346
28346
|
var options = [];
|
|
28347
28347
|
options = filter.map(function (f) {
|
|
28348
|
-
return _objectSpread$
|
|
28348
|
+
return _objectSpread$F(_objectSpread$F({}, f), {}, {
|
|
28349
28349
|
label: t(f.label)
|
|
28350
28350
|
});
|
|
28351
28351
|
});
|
|
@@ -28419,8 +28419,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
28419
28419
|
};
|
|
28420
28420
|
};
|
|
28421
28421
|
|
|
28422
|
-
function ownKeys$
|
|
28423
|
-
function _objectSpread$
|
|
28422
|
+
function ownKeys$E(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28423
|
+
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$E(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$E(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28424
28424
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
28425
28425
|
var columns = configuration.columns.filter(function (c) {
|
|
28426
28426
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -28473,7 +28473,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
28473
28473
|
}
|
|
28474
28474
|
function mapColumn(column, onUpdate) {
|
|
28475
28475
|
var _column$field, _column$children;
|
|
28476
|
-
return _objectSpread$
|
|
28476
|
+
return _objectSpread$E(_objectSpread$E(_objectSpread$E({}, column), {}, {
|
|
28477
28477
|
hidden: false,
|
|
28478
28478
|
width: column.width || 100,
|
|
28479
28479
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
@@ -28523,8 +28523,8 @@ function updateData (_ref) {
|
|
|
28523
28523
|
};
|
|
28524
28524
|
}
|
|
28525
28525
|
|
|
28526
|
-
function ownKeys$
|
|
28527
|
-
function _objectSpread$
|
|
28526
|
+
function ownKeys$D(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28527
|
+
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$D(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$D(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28528
28528
|
function applyFilterAndSortation (_ref) {
|
|
28529
28529
|
var data = _ref.data,
|
|
28530
28530
|
filters = _ref.filters,
|
|
@@ -28539,7 +28539,7 @@ function applyFilterAndSortation (_ref) {
|
|
|
28539
28539
|
processedData = sort(sorter || [], processedData);
|
|
28540
28540
|
return {
|
|
28541
28541
|
data: processedData,
|
|
28542
|
-
pagination: _objectSpread$
|
|
28542
|
+
pagination: _objectSpread$D(_objectSpread$D({}, pagination), {}, {
|
|
28543
28543
|
total: processedData.length
|
|
28544
28544
|
})
|
|
28545
28545
|
};
|
|
@@ -28624,8 +28624,8 @@ function filter(f, data) {
|
|
|
28624
28624
|
}
|
|
28625
28625
|
|
|
28626
28626
|
var _excluded$6 = ["_id"];
|
|
28627
|
-
function ownKeys$
|
|
28628
|
-
function _objectSpread$
|
|
28627
|
+
function ownKeys$C(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28628
|
+
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$C(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$C(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28629
28629
|
function useTableData$1 (_ref) {
|
|
28630
28630
|
var _configuration$apiInt;
|
|
28631
28631
|
var id = _ref.id;
|
|
@@ -28680,7 +28680,7 @@ function useTableData$1 (_ref) {
|
|
|
28680
28680
|
var _configuration$create;
|
|
28681
28681
|
if (!dataRow) return;
|
|
28682
28682
|
var id = v4();
|
|
28683
|
-
var processedDataRow = unflatten(_objectSpread$
|
|
28683
|
+
var processedDataRow = unflatten(_objectSpread$C({
|
|
28684
28684
|
_id: id,
|
|
28685
28685
|
ID: id
|
|
28686
28686
|
}, dataRow));
|
|
@@ -28692,11 +28692,11 @@ function useTableData$1 (_ref) {
|
|
|
28692
28692
|
newData = _updateData.data;
|
|
28693
28693
|
_updateData.prevDataRow;
|
|
28694
28694
|
_updateData.index;
|
|
28695
|
-
var newState = _objectSpread$
|
|
28695
|
+
var newState = _objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28696
28696
|
data: newData
|
|
28697
28697
|
});
|
|
28698
28698
|
if (!filterServerSide) {
|
|
28699
|
-
var res = applyFilterAndSortation(_objectSpread$
|
|
28699
|
+
var res = applyFilterAndSortation(_objectSpread$C(_objectSpread$C({}, filterData), {}, {
|
|
28700
28700
|
data: newData
|
|
28701
28701
|
}));
|
|
28702
28702
|
newState.data = res.data;
|
|
@@ -28708,33 +28708,33 @@ function useTableData$1 (_ref) {
|
|
|
28708
28708
|
var formData = new FormData();
|
|
28709
28709
|
processedDataRow._id;
|
|
28710
28710
|
var value = _objectWithoutProperties(processedDataRow, _excluded$6);
|
|
28711
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
28711
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28712
28712
|
filterContex: filterContex,
|
|
28713
28713
|
value: JSON.stringify([value])
|
|
28714
28714
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
28715
28715
|
if (d && d.Result && d.Result == 'Success') return;
|
|
28716
|
-
setState(_objectSpread$
|
|
28716
|
+
setState(_objectSpread$C({}, oldState));
|
|
28717
28717
|
});
|
|
28718
28718
|
}, [state, catalogItem, filterData]);
|
|
28719
28719
|
useEffect(function () {
|
|
28720
28720
|
if (!catalogItem) return;
|
|
28721
|
-
setState(_objectSpread$
|
|
28721
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28722
28722
|
loading: true,
|
|
28723
|
-
mappingData: _objectSpread$
|
|
28723
|
+
mappingData: _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28724
28724
|
filterContex: filterContex
|
|
28725
28725
|
})
|
|
28726
28726
|
}));
|
|
28727
28727
|
if (!filterServerSide) {
|
|
28728
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
28728
|
+
apiHandler.readList(configuration.mapping, _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28729
28729
|
filterContex: filterContex
|
|
28730
28730
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
28731
28731
|
var newData = data.data.map(function (d) {
|
|
28732
|
-
return _objectSpread$
|
|
28732
|
+
return _objectSpread$C(_objectSpread$C({}, d), {}, {
|
|
28733
28733
|
_id: d._id || d.ID || nanoid()
|
|
28734
28734
|
});
|
|
28735
28735
|
});
|
|
28736
28736
|
onChange({
|
|
28737
|
-
pagination: _objectSpread$
|
|
28737
|
+
pagination: _objectSpread$C({}, state.pagination),
|
|
28738
28738
|
filters: {},
|
|
28739
28739
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
28740
28740
|
return c.defaultSortOrder;
|
|
@@ -28750,7 +28750,7 @@ function useTableData$1 (_ref) {
|
|
|
28750
28750
|
});
|
|
28751
28751
|
} else {
|
|
28752
28752
|
onChange({
|
|
28753
|
-
pagination: _objectSpread$
|
|
28753
|
+
pagination: _objectSpread$C({}, state.pagination),
|
|
28754
28754
|
filters: {},
|
|
28755
28755
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
28756
28756
|
return c.defaultSortOrder;
|
|
@@ -28766,17 +28766,17 @@ function useTableData$1 (_ref) {
|
|
|
28766
28766
|
}
|
|
28767
28767
|
}, [filterContex, catalogItem]);
|
|
28768
28768
|
var onChange = function onChange(p, dataParam) {
|
|
28769
|
-
setState(_objectSpread$
|
|
28769
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28770
28770
|
loading: true
|
|
28771
28771
|
}));
|
|
28772
28772
|
if (!filterServerSide) {
|
|
28773
28773
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
28774
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
28774
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$C(_objectSpread$C({}, p), {}, {
|
|
28775
28775
|
data: unfilteredData
|
|
28776
28776
|
})),
|
|
28777
28777
|
data = _applyFilterAndSortat.data,
|
|
28778
28778
|
pagination = _applyFilterAndSortat.pagination;
|
|
28779
|
-
setState(_objectSpread$
|
|
28779
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28780
28780
|
data: data,
|
|
28781
28781
|
pagination: pagination,
|
|
28782
28782
|
loading: false,
|
|
@@ -28787,20 +28787,20 @@ function useTableData$1 (_ref) {
|
|
|
28787
28787
|
sorter: p.sorter
|
|
28788
28788
|
});
|
|
28789
28789
|
} else {
|
|
28790
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
28790
|
+
apiHandler.readList(configuration.mapping, _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28791
28791
|
filterContex: filterContex
|
|
28792
28792
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
28793
|
-
setState(_objectSpread$
|
|
28793
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28794
28794
|
data: data.data.map(function (dt) {
|
|
28795
|
-
return _objectSpread$
|
|
28795
|
+
return _objectSpread$C(_objectSpread$C({}, dt), {}, {
|
|
28796
28796
|
_id: dt._id || dt.ID || nanoid()
|
|
28797
28797
|
});
|
|
28798
28798
|
}),
|
|
28799
|
-
pagination: _objectSpread$
|
|
28799
|
+
pagination: _objectSpread$C(_objectSpread$C({}, p.pagination), {}, {
|
|
28800
28800
|
total: data.total
|
|
28801
28801
|
}),
|
|
28802
28802
|
loading: false,
|
|
28803
|
-
mappingData: _objectSpread$
|
|
28803
|
+
mappingData: _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28804
28804
|
filterContex: filterContex
|
|
28805
28805
|
})
|
|
28806
28806
|
}));
|
|
@@ -28821,7 +28821,7 @@ function useTableData$1 (_ref) {
|
|
|
28821
28821
|
filters['_id'] = [id, 'eq', false];
|
|
28822
28822
|
_context.next = 4;
|
|
28823
28823
|
return apiHandler.readList(configuration.mapping, {
|
|
28824
|
-
pagination: _objectSpread$
|
|
28824
|
+
pagination: _objectSpread$C({}, state.pagination),
|
|
28825
28825
|
columns: configuration.columns,
|
|
28826
28826
|
filters: filters,
|
|
28827
28827
|
sorter: filterData.sorter
|
|
@@ -28840,7 +28840,7 @@ function useTableData$1 (_ref) {
|
|
|
28840
28840
|
};
|
|
28841
28841
|
}();
|
|
28842
28842
|
var onSelect = function onSelect(keys) {
|
|
28843
|
-
setState(_objectSpread$
|
|
28843
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28844
28844
|
selected: keys
|
|
28845
28845
|
}));
|
|
28846
28846
|
};
|
|
@@ -28850,7 +28850,7 @@ function useTableData$1 (_ref) {
|
|
|
28850
28850
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
28851
28851
|
while (1) switch (_context3.prev = _context3.next) {
|
|
28852
28852
|
case 0:
|
|
28853
|
-
setState(_objectSpread$
|
|
28853
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28854
28854
|
deleting: true
|
|
28855
28855
|
}));
|
|
28856
28856
|
newData = _toConsumableArray(state.data);
|
|
@@ -28865,7 +28865,7 @@ function useTableData$1 (_ref) {
|
|
|
28865
28865
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
28866
28866
|
return nd._id === state.selected[index];
|
|
28867
28867
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
28868
|
-
mappingData = _objectSpread$
|
|
28868
|
+
mappingData = _objectSpread$C(_objectSpread$C({}, mappingData), state.mappingData);
|
|
28869
28869
|
_context2.next = 5;
|
|
28870
28870
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid);
|
|
28871
28871
|
case 5:
|
|
@@ -28915,7 +28915,7 @@ function useTableData$1 (_ref) {
|
|
|
28915
28915
|
}
|
|
28916
28916
|
_context3.next = 18;
|
|
28917
28917
|
return apiHandler.readList(configuration.mapping, {
|
|
28918
|
-
pagination: _objectSpread$
|
|
28918
|
+
pagination: _objectSpread$C(_objectSpread$C({}, state.pagination), {}, {
|
|
28919
28919
|
current: current
|
|
28920
28920
|
}),
|
|
28921
28921
|
columns: configuration.columns,
|
|
@@ -28927,11 +28927,11 @@ function useTableData$1 (_ref) {
|
|
|
28927
28927
|
newData = data.data;
|
|
28928
28928
|
total = data.total;
|
|
28929
28929
|
case 21:
|
|
28930
|
-
setState(_objectSpread$
|
|
28930
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28931
28931
|
selected: [],
|
|
28932
28932
|
deleting: false,
|
|
28933
28933
|
data: newData,
|
|
28934
|
-
pagination: _objectSpread$
|
|
28934
|
+
pagination: _objectSpread$C(_objectSpread$C({}, state.pagination), {}, {
|
|
28935
28935
|
current: current,
|
|
28936
28936
|
total: total
|
|
28937
28937
|
})
|
|
@@ -28947,12 +28947,12 @@ function useTableData$1 (_ref) {
|
|
|
28947
28947
|
};
|
|
28948
28948
|
}();
|
|
28949
28949
|
function setLoading() {
|
|
28950
|
-
setState(_objectSpread$
|
|
28950
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28951
28951
|
loading: true
|
|
28952
28952
|
}));
|
|
28953
28953
|
}
|
|
28954
|
-
return _objectSpread$
|
|
28955
|
-
configuration: _objectSpread$
|
|
28954
|
+
return _objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28955
|
+
configuration: _objectSpread$C(_objectSpread$C({}, configuration), {}, {
|
|
28956
28956
|
title: undefined
|
|
28957
28957
|
}),
|
|
28958
28958
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -29064,8 +29064,8 @@ function objectHash (obj) {
|
|
|
29064
29064
|
function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
29065
29065
|
function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(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$4(r, a) : void 0; } }
|
|
29066
29066
|
function _arrayLikeToArray$4(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; }
|
|
29067
|
-
function ownKeys$
|
|
29068
|
-
function _objectSpread$
|
|
29067
|
+
function ownKeys$B(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29068
|
+
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$B(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29069
29069
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
29070
29070
|
function useTableData (_ref) {
|
|
29071
29071
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$filter4, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -29124,7 +29124,7 @@ function useTableData (_ref) {
|
|
|
29124
29124
|
var _useState13 = useState({
|
|
29125
29125
|
loading: true,
|
|
29126
29126
|
deleting: false,
|
|
29127
|
-
pagination: _objectSpread$
|
|
29127
|
+
pagination: _objectSpread$B({
|
|
29128
29128
|
current: 1,
|
|
29129
29129
|
pageSize: 20,
|
|
29130
29130
|
total: 0,
|
|
@@ -29133,7 +29133,7 @@ function useTableData (_ref) {
|
|
|
29133
29133
|
selected: [],
|
|
29134
29134
|
canDelete: !!apiHandler.canDelete,
|
|
29135
29135
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
29136
|
-
mappingData: _objectSpread$
|
|
29136
|
+
mappingData: _objectSpread$B(_objectSpread$B({}, parentData), {}, {
|
|
29137
29137
|
prefilter: {
|
|
29138
29138
|
select: globalFilter.select
|
|
29139
29139
|
},
|
|
@@ -29144,7 +29144,7 @@ function useTableData (_ref) {
|
|
|
29144
29144
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
29145
29145
|
state = _useState14[0],
|
|
29146
29146
|
setState = _useState14[1];
|
|
29147
|
-
var mappingData = _objectSpread$
|
|
29147
|
+
var mappingData = _objectSpread$B(_objectSpread$B(_objectSpread$B({}, parentData), state.data), {}, {
|
|
29148
29148
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
29149
29149
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
29150
29150
|
});
|
|
@@ -29183,7 +29183,7 @@ function useTableData (_ref) {
|
|
|
29183
29183
|
}
|
|
29184
29184
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
29185
29185
|
var newInitData = initData;
|
|
29186
|
-
var newState = _objectSpread$
|
|
29186
|
+
var newState = _objectSpread$B({}, state);
|
|
29187
29187
|
var selected = [];
|
|
29188
29188
|
if (configuration.deselectOnUpdate == false) {
|
|
29189
29189
|
selected = state.selected;
|
|
@@ -29200,7 +29200,7 @@ function useTableData (_ref) {
|
|
|
29200
29200
|
dataRow: dataRow
|
|
29201
29201
|
}),
|
|
29202
29202
|
_data = _updateData.data;
|
|
29203
|
-
newState = _objectSpread$
|
|
29203
|
+
newState = _objectSpread$B(_objectSpread$B({}, newState), {}, {
|
|
29204
29204
|
data: _data,
|
|
29205
29205
|
selected: selected
|
|
29206
29206
|
});
|
|
@@ -29212,8 +29212,8 @@ function useTableData (_ref) {
|
|
|
29212
29212
|
dataRow: dataRow
|
|
29213
29213
|
}),
|
|
29214
29214
|
nextInitData = _updateData2.data;
|
|
29215
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
29216
|
-
filters: _objectSpread$
|
|
29215
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, filterData), {}, {
|
|
29216
|
+
filters: _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter6 = configuration.filter) !== null && _configuration$filter6 !== void 0 && (_configuration$filter6 = _configuration$filter6.toggle) !== null && _configuration$filter6 !== void 0 && _configuration$filter6.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
|
|
29217
29217
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && (_configuration$filter7 = _configuration$filter7.toggle) !== null && _configuration$filter7 !== void 0 && _configuration$filter7.inQuery ? {
|
|
29218
29218
|
genericProps: globalFilter.toggle
|
|
29219
29219
|
} : undefined), {}, {
|
|
@@ -29223,7 +29223,7 @@ function useTableData (_ref) {
|
|
|
29223
29223
|
_data2 = _applyFilterAndSortat.data,
|
|
29224
29224
|
pagination = _applyFilterAndSortat.pagination;
|
|
29225
29225
|
newInitData = nextInitData;
|
|
29226
|
-
newState = _objectSpread$
|
|
29226
|
+
newState = _objectSpread$B(_objectSpread$B({}, newState), {}, {
|
|
29227
29227
|
pagination: pagination,
|
|
29228
29228
|
data: _data2,
|
|
29229
29229
|
selected: selected
|
|
@@ -29233,8 +29233,8 @@ function useTableData (_ref) {
|
|
|
29233
29233
|
if (apiHandler.canCreate) {
|
|
29234
29234
|
apiCreate(data).then(function (res) {
|
|
29235
29235
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
29236
|
-
initData && setInitData(_objectSpread$
|
|
29237
|
-
setState(_objectSpread$
|
|
29236
|
+
initData && setInitData(_objectSpread$B({}, initData));
|
|
29237
|
+
setState(_objectSpread$B({}, state));
|
|
29238
29238
|
}
|
|
29239
29239
|
});
|
|
29240
29240
|
}
|
|
@@ -29247,7 +29247,7 @@ function useTableData (_ref) {
|
|
|
29247
29247
|
var triggerRefresh = function triggerRefresh() {
|
|
29248
29248
|
var _configuration$filter8;
|
|
29249
29249
|
setError(undefined);
|
|
29250
|
-
var newGlobalFilter = _objectSpread$
|
|
29250
|
+
var newGlobalFilter = _objectSpread$B({}, globalFilter);
|
|
29251
29251
|
//on refresh update default filter, since global value can change
|
|
29252
29252
|
if ((_configuration$filter8 = configuration.filter) !== null && _configuration$filter8 !== void 0 && _configuration$filter8["default"]) {
|
|
29253
29253
|
var _configuration$filter9;
|
|
@@ -29258,7 +29258,7 @@ function useTableData (_ref) {
|
|
|
29258
29258
|
newGlobalFilter["default"] = _defaultFilter;
|
|
29259
29259
|
setGlobaFilter(newGlobalFilter);
|
|
29260
29260
|
}
|
|
29261
|
-
onChange(_objectSpread$
|
|
29261
|
+
onChange(_objectSpread$B({
|
|
29262
29262
|
pagination: state.pagination
|
|
29263
29263
|
}, filterData), newGlobalFilter, true);
|
|
29264
29264
|
};
|
|
@@ -29276,7 +29276,7 @@ function useTableData (_ref) {
|
|
|
29276
29276
|
order: c.defaultSortOrder
|
|
29277
29277
|
};
|
|
29278
29278
|
});
|
|
29279
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
29279
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29280
29280
|
loading: false
|
|
29281
29281
|
}));else {
|
|
29282
29282
|
onChange({
|
|
@@ -29319,7 +29319,7 @@ function useTableData (_ref) {
|
|
|
29319
29319
|
case 0:
|
|
29320
29320
|
filters = {};
|
|
29321
29321
|
filters['_id'] = [id, 'eq', false];
|
|
29322
|
-
ssf = _objectSpread$
|
|
29322
|
+
ssf = _objectSpread$B({
|
|
29323
29323
|
pagination: {
|
|
29324
29324
|
current: 1,
|
|
29325
29325
|
pageSize: 1
|
|
@@ -29330,7 +29330,7 @@ function useTableData (_ref) {
|
|
|
29330
29330
|
genericProps: globalFilter.toggle
|
|
29331
29331
|
} : undefined);
|
|
29332
29332
|
_context2.next = 5;
|
|
29333
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
29333
|
+
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), ssf);
|
|
29334
29334
|
case 5:
|
|
29335
29335
|
data = _context2.sent;
|
|
29336
29336
|
return _context2.abrupt("return", data);
|
|
@@ -29374,12 +29374,12 @@ function useTableData (_ref) {
|
|
|
29374
29374
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
29375
29375
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
29376
29376
|
overwriteMappingData = _args3.length > 4 ? _args3[4] : undefined;
|
|
29377
|
-
setState(_objectSpread$
|
|
29377
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29378
29378
|
mappingData: overwriteMappingData !== null && overwriteMappingData !== void 0 ? overwriteMappingData : state.mappingData,
|
|
29379
29379
|
loading: true
|
|
29380
29380
|
}));
|
|
29381
29381
|
currentData = initData;
|
|
29382
|
-
filterData = _objectSpread$
|
|
29382
|
+
filterData = _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, prefilter.search), ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.applyDefaultValue) !== false || ((_configuration$filter12 = configuration.filter) === null || _configuration$filter12 === void 0 || (_configuration$filter12 = _configuration$filter12.select) === null || _configuration$filter12 === void 0 ? void 0 : _configuration$filter12.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter13 = (_configuration$filter14 = configuration.filter) === null || _configuration$filter14 === void 0 || (_configuration$filter14 = _configuration$filter14.select) === null || _configuration$filter14 === void 0 ? void 0 : _configuration$filter14.filterField) !== null && _configuration$filter13 !== void 0 ? _configuration$filter13 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
|
|
29383
29383
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
|
|
29384
29384
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
29385
29385
|
_ref7[0];
|
|
@@ -29387,7 +29387,7 @@ function useTableData (_ref) {
|
|
|
29387
29387
|
return v != null;
|
|
29388
29388
|
}));
|
|
29389
29389
|
currentFilterHash = objectHash(filterData);
|
|
29390
|
-
currentPagination = _objectSpread$
|
|
29390
|
+
currentPagination = _objectSpread$B(_objectSpread$B({}, p.pagination), {}, {
|
|
29391
29391
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
29392
29392
|
});
|
|
29393
29393
|
filterHash.current = currentFilterHash;
|
|
@@ -29395,7 +29395,7 @@ function useTableData (_ref) {
|
|
|
29395
29395
|
_context3.next = 21;
|
|
29396
29396
|
break;
|
|
29397
29397
|
}
|
|
29398
|
-
ssf = _objectSpread$
|
|
29398
|
+
ssf = _objectSpread$B({
|
|
29399
29399
|
pagination: currentPagination,
|
|
29400
29400
|
columns: configuration.columns,
|
|
29401
29401
|
filters: filterData,
|
|
@@ -29404,12 +29404,12 @@ function useTableData (_ref) {
|
|
|
29404
29404
|
genericProps: prefilter.toggle
|
|
29405
29405
|
} : undefined);
|
|
29406
29406
|
_context3.next = 15;
|
|
29407
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
29407
|
+
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$B(_objectSpread$B({}, mappingData), overwriteMappingData), ssf, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid, parseFilter(!(configuration !== null && configuration !== void 0 && (_configuration$filter16 = configuration.filter) !== null && _configuration$filter16 !== void 0 && (_configuration$filter16 = _configuration$filter16.toggle) !== null && _configuration$filter16 !== void 0 && _configuration$filter16.inQuery) ? (_prefilter$toggle = prefilter.toggle) !== null && _prefilter$toggle !== void 0 ? _prefilter$toggle : {} : {}, (_parseFilter = parseFilter(p.filters, undefined)) === null || _parseFilter === void 0 ? void 0 : _parseFilter.slice(1, -1)));
|
|
29408
29408
|
case 15:
|
|
29409
29409
|
data = _context3.sent;
|
|
29410
|
-
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, _objectSpread$
|
|
29410
|
+
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, _objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), ssf);
|
|
29411
29411
|
currentData = data.data;
|
|
29412
|
-
currentPagination = _objectSpread$
|
|
29412
|
+
currentPagination = _objectSpread$B(_objectSpread$B({}, currentPagination), {}, {
|
|
29413
29413
|
total: data.total
|
|
29414
29414
|
});
|
|
29415
29415
|
_context3.next = 30;
|
|
@@ -29426,7 +29426,7 @@ function useTableData (_ref) {
|
|
|
29426
29426
|
currentData = _data3.data;
|
|
29427
29427
|
setInitData(currentData);
|
|
29428
29428
|
case 27:
|
|
29429
|
-
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$
|
|
29429
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$B(_objectSpread$B({}, p), {}, {
|
|
29430
29430
|
pagination: currentPagination,
|
|
29431
29431
|
filters: filterData,
|
|
29432
29432
|
data: currentData,
|
|
@@ -29435,11 +29435,11 @@ function useTableData (_ref) {
|
|
|
29435
29435
|
currentData = _data4;
|
|
29436
29436
|
currentPagination = pagination;
|
|
29437
29437
|
case 30:
|
|
29438
|
-
setState(_objectSpread$
|
|
29438
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29439
29439
|
loading: false,
|
|
29440
29440
|
data: currentData,
|
|
29441
29441
|
pagination: currentPagination,
|
|
29442
|
-
mappingData: _objectSpread$
|
|
29442
|
+
mappingData: _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, parentData), state.mappingData), overwriteMappingData), {}, {
|
|
29443
29443
|
prefilter: prefilter
|
|
29444
29444
|
}),
|
|
29445
29445
|
currentFetchUrl: currentUrl
|
|
@@ -29461,7 +29461,7 @@ function useTableData (_ref) {
|
|
|
29461
29461
|
};
|
|
29462
29462
|
}();
|
|
29463
29463
|
var onSelect = function onSelect(keys) {
|
|
29464
|
-
setState(_objectSpread$
|
|
29464
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29465
29465
|
selected: keys
|
|
29466
29466
|
}));
|
|
29467
29467
|
};
|
|
@@ -29472,7 +29472,7 @@ function useTableData (_ref) {
|
|
|
29472
29472
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
29473
29473
|
while (1) switch (_context5.prev = _context5.next) {
|
|
29474
29474
|
case 0:
|
|
29475
|
-
setState(_objectSpread$
|
|
29475
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29476
29476
|
deleting: true
|
|
29477
29477
|
}));
|
|
29478
29478
|
newData = _toConsumableArray(state.data);
|
|
@@ -29512,7 +29512,7 @@ function useTableData (_ref) {
|
|
|
29512
29512
|
} finally {
|
|
29513
29513
|
_iterator.f();
|
|
29514
29514
|
}
|
|
29515
|
-
mappingData = _objectSpread$
|
|
29515
|
+
mappingData = _objectSpread$B(_objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), mapToggle);
|
|
29516
29516
|
deleteResult = undefined;
|
|
29517
29517
|
_context4.prev = 7;
|
|
29518
29518
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -29602,12 +29602,12 @@ function useTableData (_ref) {
|
|
|
29602
29602
|
break;
|
|
29603
29603
|
}
|
|
29604
29604
|
_context5.next = 25;
|
|
29605
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
29606
|
-
pagination: _objectSpread$
|
|
29605
|
+
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), _objectSpread$B({
|
|
29606
|
+
pagination: _objectSpread$B(_objectSpread$B({}, state.pagination), {}, {
|
|
29607
29607
|
current: current
|
|
29608
29608
|
}),
|
|
29609
29609
|
columns: configuration.columns,
|
|
29610
|
-
filters: _objectSpread$
|
|
29610
|
+
filters: _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter17 = configuration.filter) !== null && _configuration$filter17 !== void 0 && (_configuration$filter17 = _configuration$filter17.toggle) !== null && _configuration$filter17 !== void 0 && _configuration$filter17.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
|
|
29611
29611
|
sorter: filterData.sorter
|
|
29612
29612
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter18 = configuration.filter) !== null && _configuration$filter18 !== void 0 && (_configuration$filter18 = _configuration$filter18.toggle) !== null && _configuration$filter18 !== void 0 && _configuration$filter18.inQuery ? {
|
|
29613
29613
|
genericProps: globalFilter.toggle
|
|
@@ -29618,11 +29618,11 @@ function useTableData (_ref) {
|
|
|
29618
29618
|
total = data.total;
|
|
29619
29619
|
case 28:
|
|
29620
29620
|
setInitData(newInitData);
|
|
29621
|
-
setState(_objectSpread$
|
|
29621
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29622
29622
|
selected: [],
|
|
29623
29623
|
deleting: false,
|
|
29624
29624
|
data: newData,
|
|
29625
|
-
pagination: _objectSpread$
|
|
29625
|
+
pagination: _objectSpread$B(_objectSpread$B({}, state.pagination), {}, {
|
|
29626
29626
|
current: current === 0 ? 1 : current,
|
|
29627
29627
|
total: total
|
|
29628
29628
|
})
|
|
@@ -29643,14 +29643,14 @@ function useTableData (_ref) {
|
|
|
29643
29643
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
29644
29644
|
return;
|
|
29645
29645
|
}
|
|
29646
|
-
var newGlobalFilter = _objectSpread$
|
|
29646
|
+
var newGlobalFilter = _objectSpread$B({}, globalFilter);
|
|
29647
29647
|
if (value !== null && value !== void 0 && value.length) {
|
|
29648
29648
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
29649
29649
|
} else {
|
|
29650
29650
|
newGlobalFilter.select = {};
|
|
29651
29651
|
}
|
|
29652
29652
|
setGlobaFilter(newGlobalFilter);
|
|
29653
|
-
onChange(_objectSpread$
|
|
29653
|
+
onChange(_objectSpread$B({
|
|
29654
29654
|
pagination: state.pagination
|
|
29655
29655
|
}, filterData), newGlobalFilter);
|
|
29656
29656
|
};
|
|
@@ -29661,16 +29661,16 @@ function useTableData (_ref) {
|
|
|
29661
29661
|
return;
|
|
29662
29662
|
}
|
|
29663
29663
|
var toggleFilter = {};
|
|
29664
|
-
var mappingData = _objectSpread$
|
|
29664
|
+
var mappingData = _objectSpread$B({}, state.mappingData);
|
|
29665
29665
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
29666
29666
|
mappingData[f] = !globalFilter.toggle && configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : undefined;
|
|
29667
29667
|
toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
29668
29668
|
});
|
|
29669
|
-
var newGlobalFilter = _objectSpread$
|
|
29669
|
+
var newGlobalFilter = _objectSpread$B(_objectSpread$B({}, globalFilter), {}, {
|
|
29670
29670
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
29671
29671
|
});
|
|
29672
29672
|
setGlobaFilter(newGlobalFilter);
|
|
29673
|
-
onChange(_objectSpread$
|
|
29673
|
+
onChange(_objectSpread$B({
|
|
29674
29674
|
pagination: state.pagination
|
|
29675
29675
|
}, filterData), newGlobalFilter, true, true, mappingData);
|
|
29676
29676
|
};
|
|
@@ -29683,7 +29683,7 @@ function useTableData (_ref) {
|
|
|
29683
29683
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
29684
29684
|
return;
|
|
29685
29685
|
}
|
|
29686
|
-
var newGlobalFilter = _objectSpread$
|
|
29686
|
+
var newGlobalFilter = _objectSpread$B(_objectSpread$B({}, globalFilter), {}, {
|
|
29687
29687
|
search: {}
|
|
29688
29688
|
});
|
|
29689
29689
|
if (value) {
|
|
@@ -29697,7 +29697,7 @@ function useTableData (_ref) {
|
|
|
29697
29697
|
});
|
|
29698
29698
|
}
|
|
29699
29699
|
setGlobaFilter(newGlobalFilter);
|
|
29700
|
-
onChange(_objectSpread$
|
|
29700
|
+
onChange(_objectSpread$B({
|
|
29701
29701
|
pagination: state.pagination
|
|
29702
29702
|
}, filterData), newGlobalFilter);
|
|
29703
29703
|
};
|
|
@@ -29707,20 +29707,20 @@ function useTableData (_ref) {
|
|
|
29707
29707
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
29708
29708
|
return;
|
|
29709
29709
|
}
|
|
29710
|
-
var newGlobalFilter = _objectSpread$
|
|
29710
|
+
var newGlobalFilter = _objectSpread$B({}, globalFilter);
|
|
29711
29711
|
newGlobalFilter.timeStamp = {
|
|
29712
29712
|
fromTimeStamp: [from],
|
|
29713
29713
|
toTimeStamp: [to]
|
|
29714
29714
|
};
|
|
29715
29715
|
if (!configuration.filter.period.onlyAsMappingData) setGlobaFilter(newGlobalFilter);
|
|
29716
|
-
onChange(_objectSpread$
|
|
29716
|
+
onChange(_objectSpread$B({
|
|
29717
29717
|
pagination: state.pagination
|
|
29718
|
-
}, filterData), undefined, true, undefined, _objectSpread$
|
|
29718
|
+
}, filterData), undefined, true, undefined, _objectSpread$B(_objectSpread$B({}, state.mappingData), {}, {
|
|
29719
29719
|
from: from,
|
|
29720
29720
|
to: to
|
|
29721
29721
|
}));
|
|
29722
29722
|
};
|
|
29723
|
-
return _objectSpread$
|
|
29723
|
+
return _objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29724
29724
|
title: title,
|
|
29725
29725
|
configuration: configuration,
|
|
29726
29726
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -29762,8 +29762,8 @@ function StandardTable (_ref) {
|
|
|
29762
29762
|
});
|
|
29763
29763
|
}
|
|
29764
29764
|
|
|
29765
|
-
function ownKeys$
|
|
29766
|
-
function _objectSpread$
|
|
29765
|
+
function ownKeys$A(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29766
|
+
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$A(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29767
29767
|
function Table (props) {
|
|
29768
29768
|
var root = useStore();
|
|
29769
29769
|
var variant = useMemo(function () {
|
|
@@ -29771,15 +29771,15 @@ function Table (props) {
|
|
|
29771
29771
|
return config.variant;
|
|
29772
29772
|
}, [props.id]);
|
|
29773
29773
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
29774
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
29774
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$A({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$A({}, props))]
|
|
29775
29775
|
});
|
|
29776
29776
|
}
|
|
29777
29777
|
|
|
29778
29778
|
function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
29779
29779
|
function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(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$3(r, a) : void 0; } }
|
|
29780
29780
|
function _arrayLikeToArray$3(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; }
|
|
29781
|
-
function ownKeys$
|
|
29782
|
-
function _objectSpread$
|
|
29781
|
+
function ownKeys$z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29782
|
+
function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29783
29783
|
function useAGGrid (_ref) {
|
|
29784
29784
|
var id = _ref.id,
|
|
29785
29785
|
filter = _ref.filter,
|
|
@@ -29873,7 +29873,7 @@ function useAGGrid (_ref) {
|
|
|
29873
29873
|
value = _ref3[1];
|
|
29874
29874
|
if (_idx == 0) {
|
|
29875
29875
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
29876
|
-
rdat.push(_objectSpread$
|
|
29876
|
+
rdat.push(_objectSpread$z(_objectSpread$z({}, rd), {}, {
|
|
29877
29877
|
grouping: [idx.toString()]
|
|
29878
29878
|
}));
|
|
29879
29879
|
var sp = key.split(':');
|
|
@@ -30016,8 +30016,8 @@ var value = "value-FCA-6";
|
|
|
30016
30016
|
var css_248z$k = ".overlay-lm0tm {\n position: absolute;\n z-index: 1;\n background-color: rgba(247,247,247,0.45882);\n height: 60vh;\n width: 100%;\n}\n.loader-LaXZy {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 50px;\n height: 50px;\n border: 3px solid rgba(0, 0, 0, 0.3);\n border-radius: 50%;\n border-top-color: #fff;\n animation: spin-qUdpu 1s ease-in-out infinite;\n -webkit-animation: spin-qUdpu 1s ease-in-out infinite;\n}\n.flex-yQdda {\n display: flex;\n}\n\n.bar-Y663f {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin-top: 7%;\n}\n\n.value-FCA-6 {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: -moz-fit-content;\n width: fit-content;\n}\n@keyframes spin-qUdpu {\n to {\n -webkit-transform: rotate(360deg);\n }\n}\n";
|
|
30017
30017
|
styleInject(css_248z$k);
|
|
30018
30018
|
|
|
30019
|
-
function ownKeys$
|
|
30020
|
-
function _objectSpread$
|
|
30019
|
+
function ownKeys$y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30020
|
+
function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30021
30021
|
var AGChart = function AGChart(_ref) {
|
|
30022
30022
|
var data = _ref.data;
|
|
30023
30023
|
var groupedData = [];
|
|
@@ -30025,11 +30025,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
30025
30025
|
data.forEach(function (dt) {
|
|
30026
30026
|
if (dt.count == 0) return;
|
|
30027
30027
|
if (groupedData.length > dt.grouping[0]) {
|
|
30028
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
30028
|
+
groupedData[dt.grouping[0]].push(_objectSpread$y(_objectSpread$y({}, dt), {}, {
|
|
30029
30029
|
count: Number(dt.count)
|
|
30030
30030
|
}));
|
|
30031
30031
|
} else {
|
|
30032
|
-
groupedData.push([_objectSpread$
|
|
30032
|
+
groupedData.push([_objectSpread$y(_objectSpread$y({}, dt), {}, {
|
|
30033
30033
|
count: Number(dt.count)
|
|
30034
30034
|
})]);
|
|
30035
30035
|
}
|
|
@@ -30070,8 +30070,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
30070
30070
|
});
|
|
30071
30071
|
};
|
|
30072
30072
|
|
|
30073
|
-
function ownKeys$
|
|
30074
|
-
function _objectSpread$
|
|
30073
|
+
function ownKeys$x(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30074
|
+
function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$x(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30075
30075
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
30076
30076
|
var id = _ref.id,
|
|
30077
30077
|
filter = _ref.filter,
|
|
@@ -30164,7 +30164,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
30164
30164
|
});
|
|
30165
30165
|
});
|
|
30166
30166
|
}
|
|
30167
|
-
return _objectSpread$
|
|
30167
|
+
return _objectSpread$x(_objectSpread$x({}, column), {}, {
|
|
30168
30168
|
cellRenderer: renderer
|
|
30169
30169
|
});
|
|
30170
30170
|
});
|
|
@@ -30434,8 +30434,8 @@ var CustomText = function CustomText(_ref) {
|
|
|
30434
30434
|
};
|
|
30435
30435
|
var CustomText$1 = observer(CustomText);
|
|
30436
30436
|
|
|
30437
|
-
function ownKeys$
|
|
30438
|
-
function _objectSpread$
|
|
30437
|
+
function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30438
|
+
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30439
30439
|
function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
30440
30440
|
function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(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$2(r, a) : void 0; } }
|
|
30441
30441
|
function _arrayLikeToArray$2(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; }
|
|
@@ -30498,7 +30498,7 @@ function useFilterBoxData (id) {
|
|
|
30498
30498
|
} finally {
|
|
30499
30499
|
_iterator.f();
|
|
30500
30500
|
}
|
|
30501
|
-
return _objectSpread$
|
|
30501
|
+
return _objectSpread$w(_objectSpread$w({}, state), ob);
|
|
30502
30502
|
}
|
|
30503
30503
|
return {
|
|
30504
30504
|
configuration: configuration,
|
|
@@ -30512,8 +30512,8 @@ function useFilterBoxData (id) {
|
|
|
30512
30512
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
30513
30513
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(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$1(r, a) : void 0; } }
|
|
30514
30514
|
function _arrayLikeToArray$1(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; }
|
|
30515
|
-
function ownKeys$
|
|
30516
|
-
function _objectSpread$
|
|
30515
|
+
function ownKeys$v(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30516
|
+
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30517
30517
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
30518
30518
|
var id = _ref.id,
|
|
30519
30519
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -30541,7 +30541,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
30541
30541
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
30542
30542
|
mode: "single",
|
|
30543
30543
|
apiInterface: filter.requestOptions,
|
|
30544
|
-
wholeData: _objectSpread$
|
|
30544
|
+
wholeData: _objectSpread$v(_objectSpread$v({}, state.filter), {}, {
|
|
30545
30545
|
tab: tab
|
|
30546
30546
|
}),
|
|
30547
30547
|
mapping: filter.requestMapping,
|
|
@@ -30773,8 +30773,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
30773
30773
|
return false;
|
|
30774
30774
|
});
|
|
30775
30775
|
|
|
30776
|
-
function ownKeys$
|
|
30777
|
-
function _objectSpread$
|
|
30776
|
+
function ownKeys$u(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30777
|
+
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30778
30778
|
function useUIBuilderData (id) {
|
|
30779
30779
|
var save = undefined;
|
|
30780
30780
|
var root = useStore();
|
|
@@ -30806,7 +30806,7 @@ function useUIBuilderData (id) {
|
|
|
30806
30806
|
var configuration = _useMemo.configuration;
|
|
30807
30807
|
useEffect(function () {
|
|
30808
30808
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
30809
|
-
return setFilter(_objectSpread$
|
|
30809
|
+
return setFilter(_objectSpread$u(_objectSpread$u({}, filter), {}, {
|
|
30810
30810
|
sessionGuid: res
|
|
30811
30811
|
}));
|
|
30812
30812
|
});
|
|
@@ -30829,8 +30829,8 @@ function useUIBuilderData (id) {
|
|
|
30829
30829
|
};
|
|
30830
30830
|
}
|
|
30831
30831
|
|
|
30832
|
-
function ownKeys$
|
|
30833
|
-
function _objectSpread$
|
|
30832
|
+
function ownKeys$t(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30833
|
+
function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30834
30834
|
function UIBuilder(_ref) {
|
|
30835
30835
|
var id = _ref.id;
|
|
30836
30836
|
var state = useUIBuilderData(id);
|
|
@@ -30857,7 +30857,7 @@ function UIBuilder(_ref) {
|
|
|
30857
30857
|
override = {
|
|
30858
30858
|
value: newFilter[item.field],
|
|
30859
30859
|
setValue: function setValue(newVal) {
|
|
30860
|
-
var newFilter = _objectSpread$
|
|
30860
|
+
var newFilter = _objectSpread$t({}, state.filter);
|
|
30861
30861
|
newFilter[item.field] = newVal;
|
|
30862
30862
|
state.setFilter(newFilter);
|
|
30863
30863
|
}
|
|
@@ -30905,7 +30905,7 @@ function UIBuilder(_ref) {
|
|
|
30905
30905
|
case 'AGGrid':
|
|
30906
30906
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
30907
30907
|
id: item.id,
|
|
30908
|
-
filter: _objectSpread$
|
|
30908
|
+
filter: _objectSpread$t({
|
|
30909
30909
|
optionCodices: JSON.stringify(state.data)
|
|
30910
30910
|
}, state.filter),
|
|
30911
30911
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -31065,8 +31065,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
31065
31065
|
};
|
|
31066
31066
|
var OrgItem$1 = observer(OrgItem);
|
|
31067
31067
|
|
|
31068
|
-
function ownKeys$
|
|
31069
|
-
function _objectSpread$
|
|
31068
|
+
function ownKeys$s(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31069
|
+
function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$s(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$s(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31070
31070
|
function useTransformJson (_ref) {
|
|
31071
31071
|
var id = _ref.id;
|
|
31072
31072
|
var _useState = useState(),
|
|
@@ -31132,7 +31132,7 @@ function useTransformJson (_ref) {
|
|
|
31132
31132
|
}();
|
|
31133
31133
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
31134
31134
|
var _data$children;
|
|
31135
|
-
return _objectSpread$
|
|
31135
|
+
return _objectSpread$s(_objectSpread$s({}, data), {}, {
|
|
31136
31136
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
31137
31137
|
data: data,
|
|
31138
31138
|
configuration: configuration,
|
|
@@ -31793,8 +31793,8 @@ function useCatalogEditor (id) {
|
|
|
31793
31793
|
};
|
|
31794
31794
|
}
|
|
31795
31795
|
|
|
31796
|
-
function ownKeys$
|
|
31797
|
-
function _objectSpread$
|
|
31796
|
+
function ownKeys$r(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31797
|
+
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$r(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31798
31798
|
function DragDropUpload(_ref) {
|
|
31799
31799
|
var api2Params = _ref.api2Params,
|
|
31800
31800
|
catalogId = _ref.catalogId,
|
|
@@ -31902,7 +31902,7 @@ function DragDropUpload(_ref) {
|
|
|
31902
31902
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
31903
31903
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
31904
31904
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
31905
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
31905
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$r(_objectSpread$r({}, props), {}, {
|
|
31906
31906
|
children: [/*#__PURE__*/jsx("p", {
|
|
31907
31907
|
className: "ant-upload-drag-icon",
|
|
31908
31908
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -32119,12 +32119,12 @@ function CatalogEditor(_ref) {
|
|
|
32119
32119
|
}
|
|
32120
32120
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
32121
32121
|
|
|
32122
|
-
function ownKeys$
|
|
32123
|
-
function _objectSpread$
|
|
32122
|
+
function ownKeys$q(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32123
|
+
function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32124
32124
|
var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(props, ref) {
|
|
32125
32125
|
var _root$contentStore$bo, _root$contentStore$ri;
|
|
32126
32126
|
var root = useStore();
|
|
32127
|
-
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$
|
|
32127
|
+
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$q(_objectSpread$q({}, props), {}, {
|
|
32128
32128
|
ref: ref,
|
|
32129
32129
|
darkMode: root.contentStore.theme == 'darkmode',
|
|
32130
32130
|
jwt: root.dataStore.jwt,
|
|
@@ -32135,8 +32135,8 @@ var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(pro
|
|
|
32135
32135
|
});
|
|
32136
32136
|
var Spreadsheet = observer(SpreadsheetWrapper);
|
|
32137
32137
|
|
|
32138
|
-
function ownKeys$
|
|
32139
|
-
function _objectSpread$
|
|
32138
|
+
function ownKeys$p(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32139
|
+
function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$p(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32140
32140
|
|
|
32141
32141
|
// Type definition for the context state
|
|
32142
32142
|
|
|
@@ -32158,14 +32158,14 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
32158
32158
|
loading: loading,
|
|
32159
32159
|
setOptions: function setOptions(options) {
|
|
32160
32160
|
var state = root.contextStore.getContext('enricher');
|
|
32161
|
-
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$
|
|
32161
|
+
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$p(_objectSpread$p({}, state[stateKey]), {}, {
|
|
32162
32162
|
options: options,
|
|
32163
32163
|
loading: false
|
|
32164
32164
|
})));
|
|
32165
32165
|
},
|
|
32166
32166
|
setLoading: function setLoading(loading) {
|
|
32167
32167
|
var state = root.contextStore.getContext('enricher');
|
|
32168
|
-
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$
|
|
32168
|
+
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$p(_objectSpread$p({}, state[stateKey]), {}, {
|
|
32169
32169
|
loading: loading
|
|
32170
32170
|
})));
|
|
32171
32171
|
}
|
|
@@ -32270,7 +32270,7 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
32270
32270
|
}, [urlPackageId, getContext().packageId, setSelectedPackage]);
|
|
32271
32271
|
|
|
32272
32272
|
// Return context + handlers
|
|
32273
|
-
return _objectSpread$
|
|
32273
|
+
return _objectSpread$p(_objectSpread$p({}, getContext()), {}, {
|
|
32274
32274
|
setSelectedSerie: setSelectedSerie,
|
|
32275
32275
|
setSelectedItem: setSelectedItem,
|
|
32276
32276
|
setSelectedFeature: setSelectedFeature,
|
|
@@ -32619,8 +32619,8 @@ function createTranslatedColumnConfig(field, headerName, languages) {
|
|
|
32619
32619
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
32620
32620
|
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; } }
|
|
32621
32621
|
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; }
|
|
32622
|
-
function ownKeys$
|
|
32623
|
-
function _objectSpread$
|
|
32622
|
+
function ownKeys$o(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32623
|
+
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32624
32624
|
|
|
32625
32625
|
/**
|
|
32626
32626
|
* Props for the useTools hook
|
|
@@ -32656,7 +32656,7 @@ var useTools = function useTools(_ref) {
|
|
|
32656
32656
|
conditionalTools = _ref.conditionalTools;
|
|
32657
32657
|
var root = useStore();
|
|
32658
32658
|
var createTool = function createTool(tool) {
|
|
32659
|
-
return _objectSpread$
|
|
32659
|
+
return _objectSpread$o({
|
|
32660
32660
|
startWidth: 600,
|
|
32661
32661
|
defaultPinned: true,
|
|
32662
32662
|
defaultOpen: false
|
|
@@ -32690,12 +32690,12 @@ var useTools = function useTools(_ref) {
|
|
|
32690
32690
|
name: 'Konfigurator',
|
|
32691
32691
|
type: 'Configurator',
|
|
32692
32692
|
where: 'right',
|
|
32693
|
-
parameters: _objectSpread$
|
|
32693
|
+
parameters: _objectSpread$o({
|
|
32694
32694
|
catalogId: catalogId,
|
|
32695
32695
|
packageId: packageId,
|
|
32696
32696
|
isIDMData: !isApi2 ? '1' : undefined
|
|
32697
32697
|
}, parameters),
|
|
32698
|
-
elementProps: catalogId ? _objectSpread$
|
|
32698
|
+
elementProps: catalogId ? _objectSpread$o({
|
|
32699
32699
|
// open configurator for idm catalog
|
|
32700
32700
|
useIDMService: true,
|
|
32701
32701
|
catalogId: catalogId,
|
|
@@ -32709,7 +32709,7 @@ var useTools = function useTools(_ref) {
|
|
|
32709
32709
|
// open configurator for api2 package (configurator light)
|
|
32710
32710
|
loadMask: true,
|
|
32711
32711
|
initItem: item === null || item === void 0 ? void 0 : item.typeNo
|
|
32712
|
-
} : _objectSpread$
|
|
32712
|
+
} : _objectSpread$o({
|
|
32713
32713
|
// open configurator for idm package
|
|
32714
32714
|
useEnricherService: true,
|
|
32715
32715
|
loadPackage: true,
|
|
@@ -35190,8 +35190,8 @@ function getConfig(t) {
|
|
|
35190
35190
|
};
|
|
35191
35191
|
}
|
|
35192
35192
|
|
|
35193
|
-
function ownKeys$
|
|
35194
|
-
function _objectSpread$
|
|
35193
|
+
function ownKeys$n(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35194
|
+
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35195
35195
|
var ExclusivitySerie = function ExclusivitySerie() {
|
|
35196
35196
|
var _useTranslation = useTranslation(),
|
|
35197
35197
|
t = _useTranslation.t,
|
|
@@ -35329,7 +35329,7 @@ var ExclusivityTable = observer(function (_ref) {
|
|
|
35329
35329
|
if (type === 'eitems' && !selectedSerie) {
|
|
35330
35330
|
return oldDataRef.current;
|
|
35331
35331
|
}
|
|
35332
|
-
var newData = _objectSpread$
|
|
35332
|
+
var newData = _objectSpread$n(_objectSpread$n({}, baseApplicationData), {}, {
|
|
35333
35333
|
subTypeId: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id
|
|
35334
35334
|
});
|
|
35335
35335
|
oldDataRef.current = newData;
|
|
@@ -35777,8 +35777,8 @@ var isDefaultValue = function isDefaultValue(value, type) {
|
|
|
35777
35777
|
return value === getDefaultValue(type);
|
|
35778
35778
|
};
|
|
35779
35779
|
|
|
35780
|
-
function ownKeys$
|
|
35781
|
-
function _objectSpread$
|
|
35780
|
+
function ownKeys$m(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35781
|
+
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35782
35782
|
/**
|
|
35783
35783
|
* Custom hook to manage price factor state and logic
|
|
35784
35784
|
* @param props - Hook configuration
|
|
@@ -35815,7 +35815,7 @@ function usePriceFactor(_ref) {
|
|
|
35815
35815
|
var updateEntries = function updateEntries(newTypeEntries) {
|
|
35816
35816
|
setHasChangedCurrentType(true);
|
|
35817
35817
|
setEntries(function (prev) {
|
|
35818
|
-
return _objectSpread$
|
|
35818
|
+
return _objectSpread$m(_objectSpread$m({}, prev), {}, _defineProperty(_defineProperty({}, type, newTypeEntries), type === 'factor' ? 'discount' : 'factor', []));
|
|
35819
35819
|
});
|
|
35820
35820
|
};
|
|
35821
35821
|
var handleModalOpen = useCallback(function () {
|
|
@@ -35852,7 +35852,7 @@ function usePriceFactor(_ref) {
|
|
|
35852
35852
|
// Always ensure at least one entry when switching types
|
|
35853
35853
|
var newEntries = hasChangedCurrentType ? [] : entries[newType];
|
|
35854
35854
|
setEntries(function (prev) {
|
|
35855
|
-
return _objectSpread$
|
|
35855
|
+
return _objectSpread$m(_objectSpread$m({}, prev), {}, _defineProperty({}, newType, newEntries.length > 0 ? newEntries : [{
|
|
35856
35856
|
value: getDefaultValue(newType),
|
|
35857
35857
|
isValid: true
|
|
35858
35858
|
}]));
|
|
@@ -36288,8 +36288,8 @@ var css_248z$d = ".input-leHam {\n position: relative;\n width: 200px;\n heig
|
|
|
36288
36288
|
styleInject(css_248z$d);
|
|
36289
36289
|
|
|
36290
36290
|
var _excluded$5 = ["onSave", "value"];
|
|
36291
|
-
function ownKeys$
|
|
36292
|
-
function _objectSpread$
|
|
36291
|
+
function ownKeys$l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
36292
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
36293
36293
|
function PriceFactorInput(_ref) {
|
|
36294
36294
|
var _onSave = _ref.onSave,
|
|
36295
36295
|
value = _ref.value,
|
|
@@ -36305,7 +36305,7 @@ function PriceFactorInput(_ref) {
|
|
|
36305
36305
|
title: props.tooltip,
|
|
36306
36306
|
children: /*#__PURE__*/jsx("div", {
|
|
36307
36307
|
className: classnames(input, 'price-factor-input', props.className, _defineProperty({}, disabled$1, props.disabled)),
|
|
36308
|
-
children: /*#__PURE__*/jsx(PriceFactorCellRenderer, _objectSpread$
|
|
36308
|
+
children: /*#__PURE__*/jsx(PriceFactorCellRenderer, _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
36309
36309
|
isNotInAGGrid: true,
|
|
36310
36310
|
value: innerValue,
|
|
36311
36311
|
onSave: function onSave(data, value) {
|
|
@@ -36381,8 +36381,8 @@ function Setting(_ref) {
|
|
|
36381
36381
|
});
|
|
36382
36382
|
}
|
|
36383
36383
|
|
|
36384
|
-
function ownKeys$
|
|
36385
|
-
function _objectSpread$
|
|
36384
|
+
function ownKeys$k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
36385
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
36386
36386
|
var Prices = observer(function (_ref) {
|
|
36387
36387
|
var _pricelist$seriePrice;
|
|
36388
36388
|
var organizationId = _ref.organizationId,
|
|
@@ -36405,8 +36405,8 @@ var Prices = observer(function (_ref) {
|
|
|
36405
36405
|
if (!selectedSerie) return;
|
|
36406
36406
|
|
|
36407
36407
|
// Create copies of the objects to modify
|
|
36408
|
-
var newFactors = _objectSpread$
|
|
36409
|
-
var serieFactors = _objectSpread$
|
|
36408
|
+
var newFactors = _objectSpread$k({}, pricelist.pfgPricefactors);
|
|
36409
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
36410
36410
|
if (value.length === 0) {
|
|
36411
36411
|
// Remove the empty price feature group
|
|
36412
36412
|
delete serieFactors[priceFeatureGroupItem];
|
|
@@ -36437,7 +36437,7 @@ var Prices = observer(function (_ref) {
|
|
|
36437
36437
|
var updatePfgPriority = useCallback(function (priceFeatureGroupItem, value) {
|
|
36438
36438
|
var _newPriority$selected;
|
|
36439
36439
|
if (!selectedSerie) return;
|
|
36440
|
-
var newPriority = _objectSpread$
|
|
36440
|
+
var newPriority = _objectSpread$k({}, pricelist.pfgPricefactorsPriority);
|
|
36441
36441
|
var seriesPriority = new Set((_newPriority$selected = newPriority[selectedSerie.serieNo]) !== null && _newPriority$selected !== void 0 ? _newPriority$selected : []);
|
|
36442
36442
|
if (value === true) {
|
|
36443
36443
|
seriesPriority.add(priceFeatureGroupItem);
|
|
@@ -36456,7 +36456,7 @@ var Prices = observer(function (_ref) {
|
|
|
36456
36456
|
var updatePgPriority = useCallback(function (priceFeatureGroupItem, value) {
|
|
36457
36457
|
var _newPriority$selected2;
|
|
36458
36458
|
if (!selectedSerie) return;
|
|
36459
|
-
var newPriority = _objectSpread$
|
|
36459
|
+
var newPriority = _objectSpread$k({}, pricelist.pgPricefactorsPriority);
|
|
36460
36460
|
var seriesPriority = new Set((_newPriority$selected2 = newPriority[selectedSerie.serieNo]) !== null && _newPriority$selected2 !== void 0 ? _newPriority$selected2 : []);
|
|
36461
36461
|
if (value === true) {
|
|
36462
36462
|
seriesPriority.add(priceFeatureGroupItem);
|
|
@@ -36476,8 +36476,8 @@ var Prices = observer(function (_ref) {
|
|
|
36476
36476
|
if (!selectedSerie) return;
|
|
36477
36477
|
|
|
36478
36478
|
// Create copies of the objects to modify
|
|
36479
|
-
var newFactors = _objectSpread$
|
|
36480
|
-
var serieFactors = _objectSpread$
|
|
36479
|
+
var newFactors = _objectSpread$k({}, pricelist.pgPricefactors);
|
|
36480
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
36481
36481
|
if (value.length === 0) {
|
|
36482
36482
|
// Remove the empty price feature group
|
|
36483
36483
|
delete serieFactors[priceFeatureGroupItem];
|
|
@@ -36509,8 +36509,8 @@ var Prices = observer(function (_ref) {
|
|
|
36509
36509
|
if (!selectedSerie) return;
|
|
36510
36510
|
|
|
36511
36511
|
// Create copies of the objects to modify
|
|
36512
|
-
var newFactors = _objectSpread$
|
|
36513
|
-
var serieFactors = _objectSpread$
|
|
36512
|
+
var newFactors = _objectSpread$k({}, pricelist.articlePricefactors);
|
|
36513
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
36514
36514
|
if (value.length === 0) {
|
|
36515
36515
|
// Remove the empty article price factor
|
|
36516
36516
|
delete serieFactors[typeNo];
|
|
@@ -36542,8 +36542,8 @@ var Prices = observer(function (_ref) {
|
|
|
36542
36542
|
if (!selectedSerie) return;
|
|
36543
36543
|
|
|
36544
36544
|
// Create copies of the objects to modify
|
|
36545
|
-
var newFactors = _objectSpread$
|
|
36546
|
-
var serieFactors = _objectSpread$
|
|
36545
|
+
var newFactors = _objectSpread$k({}, pricelist.typeKeyPricefactors);
|
|
36546
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
36547
36547
|
if (value.length === 0) {
|
|
36548
36548
|
// Remove the empty article price factor
|
|
36549
36549
|
delete serieFactors[typeKey];
|
|
@@ -36575,7 +36575,7 @@ var Prices = observer(function (_ref) {
|
|
|
36575
36575
|
if (!selectedSerie) return;
|
|
36576
36576
|
|
|
36577
36577
|
// Create a copy of the object to modify
|
|
36578
|
-
var newFactors = _objectSpread$
|
|
36578
|
+
var newFactors = _objectSpread$k({}, pricelist.seriePricefactors);
|
|
36579
36579
|
if (value.length === 0) {
|
|
36580
36580
|
// Remove the empty serie price factor
|
|
36581
36581
|
delete newFactors[selectedSerie.serieNo];
|
|
@@ -37347,12 +37347,12 @@ function getFormItemProps(props) {
|
|
|
37347
37347
|
}
|
|
37348
37348
|
|
|
37349
37349
|
var _excluded$3 = ["disabled"];
|
|
37350
|
-
function ownKeys$
|
|
37351
|
-
function _objectSpread$
|
|
37350
|
+
function ownKeys$j(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
37351
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37352
37352
|
function Checkbox(_ref) {
|
|
37353
37353
|
var disabled = _ref.disabled,
|
|
37354
37354
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
37355
|
-
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$
|
|
37355
|
+
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$j(_objectSpread$j({}, getFormItemProps(props)), {}, {
|
|
37356
37356
|
valuePropName: "checked",
|
|
37357
37357
|
children: /*#__PURE__*/jsx(Checkbox$1, {
|
|
37358
37358
|
disabled: disabled
|
|
@@ -37361,13 +37361,13 @@ function Checkbox(_ref) {
|
|
|
37361
37361
|
}
|
|
37362
37362
|
|
|
37363
37363
|
var _excluded$2 = ["disabled", "placeholder"];
|
|
37364
|
-
function ownKeys$
|
|
37365
|
-
function _objectSpread$
|
|
37364
|
+
function ownKeys$i(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
37365
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37366
37366
|
function Input(_ref) {
|
|
37367
37367
|
var disabled = _ref.disabled,
|
|
37368
37368
|
placeholder = _ref.placeholder,
|
|
37369
37369
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
37370
|
-
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$
|
|
37370
|
+
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$i(_objectSpread$i({}, getFormItemProps(props)), {}, {
|
|
37371
37371
|
children: /*#__PURE__*/jsx(Input$1, {
|
|
37372
37372
|
disabled: disabled,
|
|
37373
37373
|
placeholder: placeholder
|
|
@@ -37379,8 +37379,8 @@ var uploadDraggerWrapper = "upload-dragger-wrapper-xZiDJ";
|
|
|
37379
37379
|
var css_248z$a = ".upload-dragger-wrapper-xZiDJ {\n min-height: 220px;\n}\n";
|
|
37380
37380
|
styleInject(css_248z$a);
|
|
37381
37381
|
|
|
37382
|
-
function ownKeys$
|
|
37383
|
-
function _objectSpread$
|
|
37382
|
+
function ownKeys$h(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
37383
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37384
37384
|
/**
|
|
37385
37385
|
* Handles file selection and optional auto-zipping
|
|
37386
37386
|
*
|
|
@@ -37484,7 +37484,7 @@ function _validateFile() {
|
|
|
37484
37484
|
return _validateFile.apply(this, arguments);
|
|
37485
37485
|
}
|
|
37486
37486
|
function toUploadFile(file) {
|
|
37487
|
-
return _objectSpread$
|
|
37487
|
+
return _objectSpread$h(_objectSpread$h({}, file), {}, {
|
|
37488
37488
|
uid: file.name,
|
|
37489
37489
|
name: file.name,
|
|
37490
37490
|
status: 'done',
|
|
@@ -37556,8 +37556,8 @@ var DraggerComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
37556
37556
|
});
|
|
37557
37557
|
|
|
37558
37558
|
var _excluded$1 = ["acceptedFileTypes", "disabled", "autoZip", "required", "hint"];
|
|
37559
|
-
function ownKeys$
|
|
37560
|
-
function _objectSpread$
|
|
37559
|
+
function ownKeys$g(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
37560
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37561
37561
|
function Dragger(_ref) {
|
|
37562
37562
|
var _props$rules;
|
|
37563
37563
|
var acceptedFileTypes = _ref.acceptedFileTypes,
|
|
@@ -37568,7 +37568,7 @@ function Dragger(_ref) {
|
|
|
37568
37568
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
37569
37569
|
var _useTranslation = useTranslation(),
|
|
37570
37570
|
t = _useTranslation.t;
|
|
37571
|
-
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$
|
|
37571
|
+
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$g(_objectSpread$g({}, getFormItemProps(props)), {}, {
|
|
37572
37572
|
rules: [].concat(_toConsumableArray((_props$rules = props.rules) !== null && _props$rules !== void 0 ? _props$rules : []), [{
|
|
37573
37573
|
validator: function validator(_, value) {
|
|
37574
37574
|
return validateFile(acceptedFileTypes, t, value);
|
|
@@ -37642,8 +37642,8 @@ function useForm(_ref) {
|
|
|
37642
37642
|
};
|
|
37643
37643
|
}
|
|
37644
37644
|
|
|
37645
|
-
function ownKeys$
|
|
37646
|
-
function _objectSpread$
|
|
37645
|
+
function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
37646
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37647
37647
|
/**
|
|
37648
37648
|
* Form component that renders form fields based on configuration
|
|
37649
37649
|
*
|
|
@@ -37699,15 +37699,15 @@ function FormItem(_ref2) {
|
|
|
37699
37699
|
var field = _ref2.field;
|
|
37700
37700
|
switch (field.type) {
|
|
37701
37701
|
case 'dragger':
|
|
37702
|
-
return /*#__PURE__*/createElement(Dragger, _objectSpread$
|
|
37702
|
+
return /*#__PURE__*/createElement(Dragger, _objectSpread$f(_objectSpread$f({}, field), {}, {
|
|
37703
37703
|
key: field.name
|
|
37704
37704
|
}));
|
|
37705
37705
|
case 'checkbox':
|
|
37706
|
-
return /*#__PURE__*/createElement(Checkbox, _objectSpread$
|
|
37706
|
+
return /*#__PURE__*/createElement(Checkbox, _objectSpread$f(_objectSpread$f({}, field), {}, {
|
|
37707
37707
|
key: field.name
|
|
37708
37708
|
}));
|
|
37709
37709
|
case 'input':
|
|
37710
|
-
return /*#__PURE__*/createElement(Input, _objectSpread$
|
|
37710
|
+
return /*#__PURE__*/createElement(Input, _objectSpread$f(_objectSpread$f({}, field), {}, {
|
|
37711
37711
|
key: field.name
|
|
37712
37712
|
}));
|
|
37713
37713
|
default:
|
|
@@ -37717,7 +37717,9 @@ function FormItem(_ref2) {
|
|
|
37717
37717
|
|
|
37718
37718
|
var uploadModalFooter = "upload-modal-footer-W5737";
|
|
37719
37719
|
var uploadButton = "upload-button-QkWYP";
|
|
37720
|
-
var
|
|
37720
|
+
var errorGroup = "error-group-lmQSx";
|
|
37721
|
+
var errorItem = "error-item-kyNLD";
|
|
37722
|
+
var css_248z$9 = ".upload-modal-footer-W5737 {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 10px;\n}\n\n.upload-modal-footer-W5737 > .upload-button-QkWYP {\n width: 300px;\n}\n\n.error-group-lmQSx {\n margin-bottom: 8px;\n}\n\n.error-item-kyNLD {\n padding: 4px 0;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.row-index-jmU3D {\n font-weight: 600;\n margin-right: 8px;\n}\n";
|
|
37721
37723
|
styleInject(css_248z$9);
|
|
37722
37724
|
|
|
37723
37725
|
/**
|
|
@@ -37802,7 +37804,7 @@ function useUploadModal(_ref) {
|
|
|
37802
37804
|
var onSave = /*#__PURE__*/function () {
|
|
37803
37805
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(values) {
|
|
37804
37806
|
var _formData$get;
|
|
37805
|
-
var formData, requestQueryParams, uploadUrl, startTime, fileSize, estimatedUploadTimeMs, progressInterval, updateProgressBasedOnTime, response,
|
|
37807
|
+
var formData, requestQueryParams, uploadUrl, startTime, fileSize, estimatedUploadTimeMs, progressInterval, updateProgressBasedOnTime, response, _responseData$errors$, _responseData$errors$2, _responseData$errors$3, _responseData$errors$4, responseData, hasPartialErrors, _formRef$current2, errorMessage, errorResponse;
|
|
37806
37808
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
37807
37809
|
while (1) switch (_context.prev = _context.next) {
|
|
37808
37810
|
case 0:
|
|
@@ -37858,7 +37860,7 @@ function useUploadModal(_ref) {
|
|
|
37858
37860
|
});
|
|
37859
37861
|
case 21:
|
|
37860
37862
|
if (!response.ok) {
|
|
37861
|
-
_context.next =
|
|
37863
|
+
_context.next = 29;
|
|
37862
37864
|
break;
|
|
37863
37865
|
}
|
|
37864
37866
|
_context.next = 24;
|
|
@@ -37867,45 +37869,51 @@ function useUploadModal(_ref) {
|
|
|
37867
37869
|
});
|
|
37868
37870
|
case 24:
|
|
37869
37871
|
responseData = _context.sent;
|
|
37870
|
-
|
|
37871
|
-
(
|
|
37872
|
-
|
|
37873
|
-
|
|
37872
|
+
// Check for partial errors in successful responses
|
|
37873
|
+
hasPartialErrors = responseData.errors && (((_responseData$errors$ = responseData.errors.add) === null || _responseData$errors$ === void 0 ? void 0 : _responseData$errors$.length) || ((_responseData$errors$2 = responseData.errors.update) === null || _responseData$errors$2 === void 0 ? void 0 : _responseData$errors$2.length) || ((_responseData$errors$3 = responseData.errors.remove) === null || _responseData$errors$3 === void 0 ? void 0 : _responseData$errors$3.length) || ((_responseData$errors$4 = responseData.errors.restore) === null || _responseData$errors$4 === void 0 ? void 0 : _responseData$errors$4.length));
|
|
37874
|
+
if (hasPartialErrors) {
|
|
37875
|
+
setError(responseData.errors);
|
|
37876
|
+
} else {
|
|
37877
|
+
onUploadComplete === null || onUploadComplete === void 0 || onUploadComplete(responseData);
|
|
37878
|
+
(_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 || _formRef$current2.reset();
|
|
37879
|
+
setCurrentFile(undefined);
|
|
37880
|
+
}
|
|
37881
|
+
_context.next = 42;
|
|
37874
37882
|
break;
|
|
37875
|
-
case
|
|
37883
|
+
case 29:
|
|
37876
37884
|
errorMessage = t('backoffice.idmEnricher.import.uploadfailed');
|
|
37877
|
-
_context.prev =
|
|
37878
|
-
_context.next =
|
|
37885
|
+
_context.prev = 30;
|
|
37886
|
+
_context.next = 33;
|
|
37879
37887
|
return response.json();
|
|
37880
|
-
case
|
|
37888
|
+
case 33:
|
|
37881
37889
|
errorResponse = _context.sent;
|
|
37882
37890
|
errorMessage = errorResponse.error || errorResponse.message || errorMessage;
|
|
37883
|
-
_context.next =
|
|
37891
|
+
_context.next = 40;
|
|
37884
37892
|
break;
|
|
37885
|
-
case
|
|
37886
|
-
_context.prev =
|
|
37887
|
-
_context.t0 = _context["catch"](
|
|
37893
|
+
case 37:
|
|
37894
|
+
_context.prev = 37;
|
|
37895
|
+
_context.t0 = _context["catch"](30);
|
|
37888
37896
|
errorMessage = response.statusText || errorMessage;
|
|
37889
|
-
case
|
|
37897
|
+
case 40:
|
|
37890
37898
|
setError(errorMessage);
|
|
37891
37899
|
setProgress(0);
|
|
37892
|
-
case
|
|
37893
|
-
_context.next =
|
|
37900
|
+
case 42:
|
|
37901
|
+
_context.next = 48;
|
|
37894
37902
|
break;
|
|
37895
|
-
case
|
|
37896
|
-
_context.prev =
|
|
37903
|
+
case 44:
|
|
37904
|
+
_context.prev = 44;
|
|
37897
37905
|
_context.t1 = _context["catch"](13);
|
|
37898
37906
|
setError(_context.t1 instanceof Error ? _context.t1.message : t('backoffice.idmEnricher.import.uploadfailed'));
|
|
37899
37907
|
setProgress(0);
|
|
37900
|
-
case
|
|
37901
|
-
_context.prev =
|
|
37908
|
+
case 48:
|
|
37909
|
+
_context.prev = 48;
|
|
37902
37910
|
setLoading(false);
|
|
37903
|
-
return _context.finish(
|
|
37904
|
-
case
|
|
37911
|
+
return _context.finish(48);
|
|
37912
|
+
case 51:
|
|
37905
37913
|
case "end":
|
|
37906
37914
|
return _context.stop();
|
|
37907
37915
|
}
|
|
37908
|
-
}, _callee, null, [[13,
|
|
37916
|
+
}, _callee, null, [[13, 44, 48, 51], [30, 37]]);
|
|
37909
37917
|
}));
|
|
37910
37918
|
return function onSave(_x) {
|
|
37911
37919
|
return _ref2.apply(this, arguments);
|
|
@@ -37922,6 +37930,132 @@ function useUploadModal(_ref) {
|
|
|
37922
37930
|
};
|
|
37923
37931
|
}
|
|
37924
37932
|
|
|
37933
|
+
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
37934
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37935
|
+
var Panel = Collapse.Panel;
|
|
37936
|
+
var Text = Typography.Text;
|
|
37937
|
+
/**
|
|
37938
|
+
* Component to display structured bulk operation errors in a collapsible format
|
|
37939
|
+
* Groups errors by operation type and field, showing row indices for each error
|
|
37940
|
+
*/
|
|
37941
|
+
function ErrorDisplay(_ref) {
|
|
37942
|
+
var errors = _ref.errors;
|
|
37943
|
+
var _useTranslation = useTranslation$1(),
|
|
37944
|
+
t = _useTranslation.t;
|
|
37945
|
+
if (!errors) {
|
|
37946
|
+
return null;
|
|
37947
|
+
}
|
|
37948
|
+
var operationTypes = [{
|
|
37949
|
+
key: 'add',
|
|
37950
|
+
label: t('backoffice.uploadModal.operations.add')
|
|
37951
|
+
}, {
|
|
37952
|
+
key: 'update',
|
|
37953
|
+
label: t('backoffice.uploadModal.operations.update')
|
|
37954
|
+
}, {
|
|
37955
|
+
key: 'remove',
|
|
37956
|
+
label: t('backoffice.uploadModal.operations.remove')
|
|
37957
|
+
}, {
|
|
37958
|
+
key: 'restore',
|
|
37959
|
+
label: t('backoffice.uploadModal.operations.restore')
|
|
37960
|
+
}];
|
|
37961
|
+
var renderFieldErrors = function renderFieldErrors(fieldErrors, fieldName, operationType) {
|
|
37962
|
+
return fieldErrors.map(function (fieldError, idx) {
|
|
37963
|
+
return /*#__PURE__*/jsxs("div", {
|
|
37964
|
+
className: errorItem,
|
|
37965
|
+
children: [/*#__PURE__*/jsx(Tag, {
|
|
37966
|
+
color: "blue",
|
|
37967
|
+
children: operationType
|
|
37968
|
+
}), /*#__PURE__*/jsx(Tag, {
|
|
37969
|
+
color: "orange",
|
|
37970
|
+
children: t('backoffice.uploadModal.row', {
|
|
37971
|
+
rowNumber: fieldError.index + 1
|
|
37972
|
+
})
|
|
37973
|
+
}), fieldError.errorTexts.map(function (errorText, textIdx) {
|
|
37974
|
+
return /*#__PURE__*/jsx(Text, {
|
|
37975
|
+
children: errorText
|
|
37976
|
+
}, textIdx);
|
|
37977
|
+
})]
|
|
37978
|
+
}, idx);
|
|
37979
|
+
});
|
|
37980
|
+
};
|
|
37981
|
+
var renderFieldPanels = function renderFieldPanels() {
|
|
37982
|
+
// Collect all errors from all operation types and group by field
|
|
37983
|
+
var allFieldGroups = new Map();
|
|
37984
|
+
operationTypes.forEach(function (_ref2) {
|
|
37985
|
+
var key = _ref2.key,
|
|
37986
|
+
label = _ref2.label;
|
|
37987
|
+
var operationErrors = errors[key];
|
|
37988
|
+
if (!operationErrors || operationErrors.length === 0) {
|
|
37989
|
+
return;
|
|
37990
|
+
}
|
|
37991
|
+
operationErrors.forEach(function (error) {
|
|
37992
|
+
if (error.errors && error.errors.length > 0) {
|
|
37993
|
+
error.errors.forEach(function (fieldError) {
|
|
37994
|
+
var fieldName = fieldError.field;
|
|
37995
|
+
if (!allFieldGroups.has(fieldName)) {
|
|
37996
|
+
allFieldGroups.set(fieldName, []);
|
|
37997
|
+
}
|
|
37998
|
+
allFieldGroups.get(fieldName).push({
|
|
37999
|
+
operationType: label,
|
|
38000
|
+
errors: [_objectSpread$e(_objectSpread$e({}, error), {}, {
|
|
38001
|
+
errorTexts: fieldError.errorTexts
|
|
38002
|
+
})]
|
|
38003
|
+
});
|
|
38004
|
+
});
|
|
38005
|
+
} else if (error.error) {
|
|
38006
|
+
// Handle general errors without specific field
|
|
38007
|
+
var fieldName = t('backoffice.uploadModal.general');
|
|
38008
|
+
if (!allFieldGroups.has(fieldName)) {
|
|
38009
|
+
allFieldGroups.set(fieldName, []);
|
|
38010
|
+
}
|
|
38011
|
+
allFieldGroups.get(fieldName).push({
|
|
38012
|
+
operationType: label,
|
|
38013
|
+
errors: [_objectSpread$e(_objectSpread$e({}, error), {}, {
|
|
38014
|
+
errorTexts: [error.error]
|
|
38015
|
+
})]
|
|
38016
|
+
});
|
|
38017
|
+
}
|
|
38018
|
+
});
|
|
38019
|
+
});
|
|
38020
|
+
if (allFieldGroups.size === 0) {
|
|
38021
|
+
return null;
|
|
38022
|
+
}
|
|
38023
|
+
return Array.from(allFieldGroups.entries()).map(function (_ref3) {
|
|
38024
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
38025
|
+
fieldName = _ref4[0],
|
|
38026
|
+
fieldData = _ref4[1];
|
|
38027
|
+
var totalErrors = fieldData.reduce(function (sum, data) {
|
|
38028
|
+
return sum + data.errors.length;
|
|
38029
|
+
}, 0);
|
|
38030
|
+
return /*#__PURE__*/jsx(Panel, {
|
|
38031
|
+
header: t('backoffice.uploadModal.fieldHeader', {
|
|
38032
|
+
fieldName: fieldName,
|
|
38033
|
+
errorCount: totalErrors
|
|
38034
|
+
}),
|
|
38035
|
+
children: fieldData.map(function (data, idx) {
|
|
38036
|
+
return /*#__PURE__*/jsx("div", {
|
|
38037
|
+
className: errorGroup,
|
|
38038
|
+
children: renderFieldErrors(data.errors, fieldName, data.operationType)
|
|
38039
|
+
}, idx);
|
|
38040
|
+
})
|
|
38041
|
+
}, fieldName);
|
|
38042
|
+
});
|
|
38043
|
+
};
|
|
38044
|
+
var fieldPanels = renderFieldPanels();
|
|
38045
|
+
if (!fieldPanels || fieldPanels.length === 0) {
|
|
38046
|
+
return null;
|
|
38047
|
+
}
|
|
38048
|
+
return /*#__PURE__*/jsx(Alert, {
|
|
38049
|
+
message: t('backoffice.uploadModal.partialErrors'),
|
|
38050
|
+
description: /*#__PURE__*/jsx(Collapse, {
|
|
38051
|
+
size: "small",
|
|
38052
|
+
children: fieldPanels
|
|
38053
|
+
}),
|
|
38054
|
+
type: "warning",
|
|
38055
|
+
showIcon: true
|
|
38056
|
+
});
|
|
38057
|
+
}
|
|
38058
|
+
|
|
37925
38059
|
/**
|
|
37926
38060
|
* Modal component for file uploads with progress tracking and form support
|
|
37927
38061
|
*
|
|
@@ -37998,17 +38132,20 @@ function UploadModal(_ref) {
|
|
|
37998
38132
|
message: t('backoffice.idmEnricher.import.uploadsuccess'),
|
|
37999
38133
|
type: "success",
|
|
38000
38134
|
showIcon: true
|
|
38001
|
-
}), !loading && error && /*#__PURE__*/jsx(Alert, {
|
|
38002
|
-
message:
|
|
38135
|
+
}), !loading && error && (typeof error === 'string' ? /*#__PURE__*/jsx(Alert, {
|
|
38136
|
+
message: t('backoffice.idmEnricher.import.uploaderror'),
|
|
38003
38137
|
description: error,
|
|
38004
38138
|
type: "error",
|
|
38005
38139
|
showIcon: true
|
|
38006
|
-
})
|
|
38140
|
+
}) : /*#__PURE__*/jsx(ErrorDisplay, {
|
|
38141
|
+
errors: error
|
|
38142
|
+
})), /*#__PURE__*/jsx(Form, {
|
|
38007
38143
|
ref: formRef,
|
|
38008
38144
|
fields: fields,
|
|
38009
38145
|
onFinish: onSave,
|
|
38010
38146
|
children: /*#__PURE__*/jsx(UploadModalFooter, {
|
|
38011
38147
|
progress: progress,
|
|
38148
|
+
error: !!error,
|
|
38012
38149
|
loading: loading,
|
|
38013
38150
|
onClose: onModalClose,
|
|
38014
38151
|
currentFile: currentFile
|
|
@@ -38031,15 +38168,16 @@ function UploadModal(_ref) {
|
|
|
38031
38168
|
function UploadModalFooter(_ref2) {
|
|
38032
38169
|
var progress = _ref2.progress,
|
|
38033
38170
|
loading = _ref2.loading,
|
|
38171
|
+
error = _ref2.error,
|
|
38034
38172
|
onClose = _ref2.onClose,
|
|
38035
38173
|
currentFile = _ref2.currentFile;
|
|
38036
38174
|
var _useTranslation2 = useTranslation$1(),
|
|
38037
38175
|
t = _useTranslation2.t;
|
|
38038
|
-
var buttonText = loading ? t('backoffice.idmEnricher.import.inprogress') : progress === 100 ? t('backoffice.idmEnricher.import.finish') : t('backoffice.idmEnricher.import.cancel');
|
|
38176
|
+
var buttonText = loading ? t('backoffice.idmEnricher.import.inprogress') : progress === 100 && !error ? t('backoffice.idmEnricher.import.finish') : t('backoffice.idmEnricher.import.cancel');
|
|
38039
38177
|
return /*#__PURE__*/jsxs("div", {
|
|
38040
38178
|
className: uploadModalFooter,
|
|
38041
38179
|
children: [/*#__PURE__*/jsx(Button, {
|
|
38042
|
-
type: progress !== 100 ? 'default' : 'primary',
|
|
38180
|
+
type: progress !== 100 || error ? 'default' : 'primary',
|
|
38043
38181
|
onClick: onClose,
|
|
38044
38182
|
disabled: loading,
|
|
38045
38183
|
children: buttonText
|