@crystaldesign/diva-backoffice 25.13.0-beta.40 → 25.13.0-beta.42
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 +546 -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
|
}
|
|
@@ -9368,6 +9368,50 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9368
9368
|
hidden: function hidden(data) {
|
|
9369
9369
|
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9370
9370
|
}
|
|
9371
|
+
},
|
|
9372
|
+
// Theme Configuration
|
|
9373
|
+
{
|
|
9374
|
+
name: ['settings', 'theme', 'main'],
|
|
9375
|
+
label: t('backoffice.form.organizationdetails.items.theme.main'),
|
|
9376
|
+
type: 'input',
|
|
9377
|
+
tabgroup: t('backoffice.form.organizationdetails.items.theme.tabgroup'),
|
|
9378
|
+
placeholder: '#713434',
|
|
9379
|
+
permission: 'backoffice_admin_organizations'
|
|
9380
|
+
}, {
|
|
9381
|
+
name: ['settings', 'theme', 'light'],
|
|
9382
|
+
label: t('backoffice.form.organizationdetails.items.theme.main_light'),
|
|
9383
|
+
type: 'input',
|
|
9384
|
+
tabgroup: t('backoffice.form.organizationdetails.items.theme.tabgroup'),
|
|
9385
|
+
placeholder: '#e4b9b8',
|
|
9386
|
+
permission: 'backoffice_admin_organizations'
|
|
9387
|
+
}, {
|
|
9388
|
+
name: ['settings', 'theme', 'dark'],
|
|
9389
|
+
label: t('backoffice.form.organizationdetails.items.theme.main_dark'),
|
|
9390
|
+
type: 'input',
|
|
9391
|
+
tabgroup: t('backoffice.form.organizationdetails.items.theme.tabgroup'),
|
|
9392
|
+
placeholder: '#42090e',
|
|
9393
|
+
permission: 'backoffice_admin_organizations'
|
|
9394
|
+
}, {
|
|
9395
|
+
name: ['settings', 'theme', 'customCssVariables'],
|
|
9396
|
+
label: t('backoffice.form.organizationdetails.items.theme.custom.variables'),
|
|
9397
|
+
type: 'textarea',
|
|
9398
|
+
tabgroup: t('backoffice.form.organizationdetails.items.theme.tabgroup'),
|
|
9399
|
+
placeholder: '--my-custom-css-variable: #ff0000;',
|
|
9400
|
+
onLoad: function onLoad(data) {
|
|
9401
|
+
var _data$settings7;
|
|
9402
|
+
var customCssVariables = data === null || data === void 0 || (_data$settings7 = data.settings) === null || _data$settings7 === void 0 || (_data$settings7 = _data$settings7.theme) === null || _data$settings7 === void 0 ? void 0 : _data$settings7.customCssVariables;
|
|
9403
|
+
if (!customCssVariables || _typeof(customCssVariables) === 'object' && !Object.keys(customCssVariables).length) return data;
|
|
9404
|
+
if (_typeof(data.settings.theme.customCssVariables) === 'object') {
|
|
9405
|
+
data.settings.theme.customCssVariables = Object.entries(data.settings.theme.customCssVariables).map(function (_ref) {
|
|
9406
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
9407
|
+
key = _ref2[0],
|
|
9408
|
+
value = _ref2[1];
|
|
9409
|
+
return "".concat(key, ": ").concat(value, ";");
|
|
9410
|
+
}).join('\n');
|
|
9411
|
+
}
|
|
9412
|
+
return data;
|
|
9413
|
+
},
|
|
9414
|
+
permission: 'backoffice_admin_organizations'
|
|
9371
9415
|
}]
|
|
9372
9416
|
},
|
|
9373
9417
|
FromAffilateOrganizationDetails: {
|
|
@@ -14660,8 +14704,8 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
14660
14704
|
}]);
|
|
14661
14705
|
}();
|
|
14662
14706
|
|
|
14663
|
-
function ownKeys$
|
|
14664
|
-
function _objectSpread$
|
|
14707
|
+
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; }
|
|
14708
|
+
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
14709
|
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
14710
|
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
14711
|
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 +14816,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
14772
14816
|
if (index >= 0) {
|
|
14773
14817
|
this._additionalMenuElements[index] = {
|
|
14774
14818
|
key: key,
|
|
14775
|
-
element: _objectSpread$
|
|
14819
|
+
element: _objectSpread$14(_objectSpread$14({}, this._additionalMenuElements[index].element), {}, {
|
|
14776
14820
|
items: items,
|
|
14777
14821
|
selected: selected
|
|
14778
14822
|
})
|
|
@@ -14823,7 +14867,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
14823
14867
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
14824
14868
|
this.root.navigate('/' + path);
|
|
14825
14869
|
}
|
|
14826
|
-
this._menuElement1 = _objectSpread$
|
|
14870
|
+
this._menuElement1 = _objectSpread$14(_objectSpread$14({}, this.menuElement1), {}, {
|
|
14827
14871
|
selected: this._selectedMenuKeys[0]
|
|
14828
14872
|
});
|
|
14829
14873
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -15079,7 +15123,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
15079
15123
|
return items.filter(function (item) {
|
|
15080
15124
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
15081
15125
|
}).map(function (item) {
|
|
15082
|
-
return _objectSpread$
|
|
15126
|
+
return _objectSpread$14(_objectSpread$14({}, item), {}, {
|
|
15083
15127
|
items: item.items ? _this5.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
15084
15128
|
subMenu: item.subMenu ? _this5.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
15085
15129
|
});
|
|
@@ -16308,8 +16352,8 @@ var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
16308
16352
|
return _createClass(_default);
|
|
16309
16353
|
}(_default$d);
|
|
16310
16354
|
|
|
16311
|
-
function ownKeys$
|
|
16312
|
-
function _objectSpread$
|
|
16355
|
+
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; }
|
|
16356
|
+
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
16357
|
var LOG$c = getLogger('Backoffice', 'ContextStore');
|
|
16314
16358
|
|
|
16315
16359
|
/**
|
|
@@ -16344,7 +16388,7 @@ var ContextStore = /*#__PURE__*/function () {
|
|
|
16344
16388
|
key: "updateContext",
|
|
16345
16389
|
value: function updateContext(contextId, updates) {
|
|
16346
16390
|
var currentState = this.contexts.get(contextId) || {};
|
|
16347
|
-
var updatedState = _objectSpread$
|
|
16391
|
+
var updatedState = _objectSpread$13(_objectSpread$13({}, currentState), updates);
|
|
16348
16392
|
this.contexts.set(contextId, updatedState);
|
|
16349
16393
|
LOG$c.debug("Updated context ".concat(contextId), {
|
|
16350
16394
|
updatedState: updatedState
|
|
@@ -16976,8 +17020,8 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
16976
17020
|
}]);
|
|
16977
17021
|
}();
|
|
16978
17022
|
|
|
16979
|
-
function ownKeys$
|
|
16980
|
-
function _objectSpread$
|
|
17023
|
+
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; }
|
|
17024
|
+
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
17025
|
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
17026
|
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
17027
|
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 +17137,7 @@ function useFormData (_ref) {
|
|
|
17093
17137
|
multipleEditingData = inboundData;
|
|
17094
17138
|
}
|
|
17095
17139
|
return {
|
|
17096
|
-
loadedData: _onLoadFields(_objectSpread$
|
|
17140
|
+
loadedData: _onLoadFields(_objectSpread$12({}, dt)),
|
|
17097
17141
|
multipleEditingData: multipleEditingData
|
|
17098
17142
|
};
|
|
17099
17143
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -17120,7 +17164,7 @@ function useFormData (_ref) {
|
|
|
17120
17164
|
setFieldErrors = _useState20[1];
|
|
17121
17165
|
useEffect(function () {
|
|
17122
17166
|
var _loadedData$_id2;
|
|
17123
|
-
setState(_objectSpread$
|
|
17167
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17124
17168
|
data: loadedData,
|
|
17125
17169
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
17126
17170
|
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 +17266,7 @@ function useFormData (_ref) {
|
|
|
17222
17266
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
17223
17267
|
while (1) switch (_context2.prev = _context2.next) {
|
|
17224
17268
|
case 0:
|
|
17225
|
-
newData = merge(_objectSpread$
|
|
17269
|
+
newData = merge(_objectSpread$12({}, state.data), values);
|
|
17226
17270
|
if (!skipApi) {
|
|
17227
17271
|
_context2.next = 3;
|
|
17228
17272
|
break;
|
|
@@ -17232,7 +17276,7 @@ function useFormData (_ref) {
|
|
|
17232
17276
|
root.actions.toggleLoading('saving_form');
|
|
17233
17277
|
_context2.prev = 4;
|
|
17234
17278
|
_context2.next = 7;
|
|
17235
|
-
return setDynamicFields(_objectSpread$
|
|
17279
|
+
return setDynamicFields(_objectSpread$12({}, state.data), newData);
|
|
17236
17280
|
case 7:
|
|
17237
17281
|
newData = _context2.sent;
|
|
17238
17282
|
_context2.next = 10;
|
|
@@ -17247,7 +17291,7 @@ function useFormData (_ref) {
|
|
|
17247
17291
|
root.actions.toggleLoading('saving_form');
|
|
17248
17292
|
throw _context2.t0;
|
|
17249
17293
|
case 17:
|
|
17250
|
-
setState(_objectSpread$
|
|
17294
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17251
17295
|
loading: true
|
|
17252
17296
|
}));
|
|
17253
17297
|
finalData = state.data;
|
|
@@ -17300,14 +17344,14 @@ function useFormData (_ref) {
|
|
|
17300
17344
|
_context2.next = 47;
|
|
17301
17345
|
break;
|
|
17302
17346
|
}
|
|
17303
|
-
setFieldErrors(_objectSpread$
|
|
17347
|
+
setFieldErrors(_objectSpread$12(_objectSpread$12({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
17304
17348
|
return _context2.abrupt("return", undefined);
|
|
17305
17349
|
case 47:
|
|
17306
17350
|
throw _context2.t1;
|
|
17307
17351
|
case 48:
|
|
17308
17352
|
_context2.prev = 48;
|
|
17309
17353
|
root.actions.toggleLoading('saving_form');
|
|
17310
|
-
setState(_objectSpread$
|
|
17354
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17311
17355
|
data: finalData,
|
|
17312
17356
|
loading: false
|
|
17313
17357
|
}));
|
|
@@ -17337,7 +17381,7 @@ function useFormData (_ref) {
|
|
|
17337
17381
|
}
|
|
17338
17382
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
17339
17383
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
17340
|
-
var wholeData = Object.assign(_objectSpread$
|
|
17384
|
+
var wholeData = Object.assign(_objectSpread$12({}, state.data), _objectSpread$12({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
17341
17385
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
17342
17386
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
17343
17387
|
setHiddenRequiredDisabled(newState);
|
|
@@ -17355,14 +17399,14 @@ function useFormData (_ref) {
|
|
|
17355
17399
|
var item = getItem(id !== null && id !== void 0 ? id : '');
|
|
17356
17400
|
item === null || item === void 0 || (_item$onValueChange = item.onValueChange) === null || _item$onValueChange === void 0 || _item$onValueChange.call(item, value, item, state.form);
|
|
17357
17401
|
}
|
|
17358
|
-
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$
|
|
17402
|
+
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$12({}, state.data), state.form.getFieldsValue(), mergeCustomizer);
|
|
17359
17403
|
if (id) {
|
|
17360
17404
|
setFieldInObject(id, data, value);
|
|
17361
|
-
var newFieldErrors = _objectSpread$
|
|
17405
|
+
var newFieldErrors = _objectSpread$12({}, fieldErrors);
|
|
17362
17406
|
delete newFieldErrors[id.toString()];
|
|
17363
17407
|
setFieldErrors(newFieldErrors);
|
|
17364
17408
|
}
|
|
17365
|
-
setState(_objectSpread$
|
|
17409
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17366
17410
|
data: data
|
|
17367
17411
|
}));
|
|
17368
17412
|
return data;
|
|
@@ -17412,12 +17456,12 @@ function useFormData (_ref) {
|
|
|
17412
17456
|
var _value$value;
|
|
17413
17457
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
17414
17458
|
if (configuration.itemSelectorReset) {
|
|
17415
|
-
setState(_objectSpread$
|
|
17459
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17416
17460
|
data: _defineProperty({}, name, val)
|
|
17417
17461
|
}));
|
|
17418
17462
|
} else {
|
|
17419
|
-
setState(_objectSpread$
|
|
17420
|
-
data: _objectSpread$
|
|
17463
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17464
|
+
data: _objectSpread$12(_objectSpread$12({}, state.data), {}, _defineProperty({}, name, val))
|
|
17421
17465
|
}));
|
|
17422
17466
|
}
|
|
17423
17467
|
setSelectedItemsIndex(idx);
|
|
@@ -17428,12 +17472,12 @@ function useFormData (_ref) {
|
|
|
17428
17472
|
var val = _ref6.value;
|
|
17429
17473
|
if (value === val) {
|
|
17430
17474
|
if (configuration.itemSelectorReset) {
|
|
17431
|
-
setState(_objectSpread$
|
|
17475
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17432
17476
|
data: _defineProperty({}, name, val)
|
|
17433
17477
|
}));
|
|
17434
17478
|
} else {
|
|
17435
|
-
setState(_objectSpread$
|
|
17436
|
-
data: _objectSpread$
|
|
17479
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17480
|
+
data: _objectSpread$12(_objectSpread$12({}, state.data), {}, _defineProperty({}, name, val))
|
|
17437
17481
|
}));
|
|
17438
17482
|
}
|
|
17439
17483
|
setSelectedItemsIndex(idx);
|
|
@@ -17711,7 +17755,7 @@ function useFormData (_ref) {
|
|
|
17711
17755
|
for (var i = 0; i < configuration.tools.length; i++) {
|
|
17712
17756
|
var _tool$defaultOpen;
|
|
17713
17757
|
var tool = configuration.tools[i];
|
|
17714
|
-
tools.push(_objectSpread$
|
|
17758
|
+
tools.push(_objectSpread$12(_objectSpread$12({}, tool), {}, {
|
|
17715
17759
|
parameters: {
|
|
17716
17760
|
data: state.data
|
|
17717
17761
|
},
|
|
@@ -17830,7 +17874,7 @@ function useFormData (_ref) {
|
|
|
17830
17874
|
})) return;
|
|
17831
17875
|
setRemovedMedias([].concat(_toConsumableArray(removedMedias), [media]));
|
|
17832
17876
|
};
|
|
17833
|
-
return _objectSpread$
|
|
17877
|
+
return _objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17834
17878
|
getIsHidden: getIsHidden,
|
|
17835
17879
|
setUsedPreset: setUsedPreset,
|
|
17836
17880
|
configuration: configuration,
|
|
@@ -17947,8 +17991,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
17947
17991
|
};
|
|
17948
17992
|
|
|
17949
17993
|
var _excluded$9 = ["key", "name"];
|
|
17950
|
-
function ownKeys$
|
|
17951
|
-
function _objectSpread$
|
|
17994
|
+
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; }
|
|
17995
|
+
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
17996
|
var FormList$2 = function FormList(_ref) {
|
|
17953
17997
|
var _item$initialValue;
|
|
17954
17998
|
var value = _ref.value,
|
|
@@ -18006,7 +18050,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
18006
18050
|
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
18007
18051
|
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
18008
18052
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
18009
|
-
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$
|
|
18053
|
+
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$11(_objectSpread$11({}, restField), {}, {
|
|
18010
18054
|
id: n.join(),
|
|
18011
18055
|
key: n.join(),
|
|
18012
18056
|
name: n,
|
|
@@ -18018,7 +18062,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
18018
18062
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
18019
18063
|
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
18020
18064
|
hidden: hidden
|
|
18021
|
-
}), getElement(_objectSpread$
|
|
18065
|
+
}), getElement(_objectSpread$11(_objectSpread$11({}, i), {}, {
|
|
18022
18066
|
name: n
|
|
18023
18067
|
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
18024
18068
|
})
|
|
@@ -18252,8 +18296,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
18252
18296
|
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
18297
|
styleInject(css_248z$x);
|
|
18254
18298
|
|
|
18255
|
-
function ownKeys
|
|
18256
|
-
function _objectSpread
|
|
18299
|
+
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; }
|
|
18300
|
+
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
18301
|
var SubTitle = function SubTitle(_ref) {
|
|
18258
18302
|
var _item$orientation, _item$buttonIds;
|
|
18259
18303
|
var item = _ref.item,
|
|
@@ -18262,7 +18306,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
18262
18306
|
t = _useTranslation.t;
|
|
18263
18307
|
return /*#__PURE__*/jsx(Divider, {
|
|
18264
18308
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
18265
|
-
style: _objectSpread
|
|
18309
|
+
style: _objectSpread$10({}, item.style),
|
|
18266
18310
|
children: /*#__PURE__*/jsxs("div", {
|
|
18267
18311
|
className: wrapper$6,
|
|
18268
18312
|
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 +18575,8 @@ var css_248z$w = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\
|
|
|
18531
18575
|
styleInject(css_248z$w);
|
|
18532
18576
|
|
|
18533
18577
|
var _excluded$8 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title", "sharedState"];
|
|
18534
|
-
function ownKeys
|
|
18535
|
-
function _objectSpread
|
|
18578
|
+
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; }
|
|
18579
|
+
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
18580
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
18537
18581
|
var apiInterface = _ref.apiInterface,
|
|
18538
18582
|
selectMapping = _ref.selectMapping,
|
|
@@ -18559,7 +18603,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
|
18559
18603
|
return /*#__PURE__*/jsxs("div", {
|
|
18560
18604
|
ref: ref,
|
|
18561
18605
|
className: classnames(title ? wrapper$5 : undefined),
|
|
18562
|
-
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread
|
|
18606
|
+
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$$(_objectSpread$$({}, selectProps), {}, {
|
|
18563
18607
|
showSearch: search,
|
|
18564
18608
|
loading: state.loading,
|
|
18565
18609
|
options: state.options,
|
|
@@ -19176,8 +19220,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
19176
19220
|
}]);
|
|
19177
19221
|
}(_default$d);
|
|
19178
19222
|
|
|
19179
|
-
function ownKeys$
|
|
19180
|
-
function _objectSpread$
|
|
19223
|
+
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; }
|
|
19224
|
+
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
19225
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
19182
19226
|
function useSelectClientRelationCatalog (_ref) {
|
|
19183
19227
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -19346,7 +19390,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
19346
19390
|
case 22:
|
|
19347
19391
|
supplierData = _context2.sent;
|
|
19348
19392
|
case 23:
|
|
19349
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
19393
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$_(_objectSpread$_({}, _selectedSupplier), {}, {
|
|
19350
19394
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
19351
19395
|
}), supplierData);
|
|
19352
19396
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -19567,8 +19611,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
19567
19611
|
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
19612
|
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
19613
|
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$
|
|
19614
|
+
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; }
|
|
19615
|
+
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
19616
|
function useSelectData (_ref) {
|
|
19573
19617
|
var data = _ref.data,
|
|
19574
19618
|
onChange = _ref.onChange,
|
|
@@ -19751,7 +19795,7 @@ function useSelectData (_ref) {
|
|
|
19751
19795
|
setFetching(true);
|
|
19752
19796
|
serverSideParams = {
|
|
19753
19797
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
19754
|
-
return _objectSpread$
|
|
19798
|
+
return _objectSpread$Z(_objectSpread$Z({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
19755
19799
|
}, {}) : {
|
|
19756
19800
|
_id: [value, 'contains']
|
|
19757
19801
|
},
|
|
@@ -20043,8 +20087,8 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
20043
20087
|
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
20088
|
styleInject(css_248z$t);
|
|
20045
20089
|
|
|
20046
|
-
function ownKeys$
|
|
20047
|
-
function _objectSpread$
|
|
20090
|
+
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; }
|
|
20091
|
+
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
20092
|
var LOG$9 = getLogger('Backoffice', 'Translation Form');
|
|
20049
20093
|
function useTranslationHook (item, state) {
|
|
20050
20094
|
var root = useStore();
|
|
@@ -20177,7 +20221,7 @@ function useTranslationHook (item, state) {
|
|
|
20177
20221
|
case 0:
|
|
20178
20222
|
_context2.next = 2;
|
|
20179
20223
|
return apiHandler.create({
|
|
20180
|
-
locales: _objectSpread$
|
|
20224
|
+
locales: _objectSpread$Y({
|
|
20181
20225
|
de: {},
|
|
20182
20226
|
it: {},
|
|
20183
20227
|
fr: {},
|
|
@@ -20226,8 +20270,8 @@ function useTranslationHook (item, state) {
|
|
|
20226
20270
|
};
|
|
20227
20271
|
}
|
|
20228
20272
|
|
|
20229
|
-
function ownKeys$
|
|
20230
|
-
function _objectSpread$
|
|
20273
|
+
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; }
|
|
20274
|
+
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
20275
|
var Translation = function Translation(_ref) {
|
|
20232
20276
|
var item = _ref.item,
|
|
20233
20277
|
state = _ref.state,
|
|
@@ -20278,7 +20322,7 @@ var Translation = function Translation(_ref) {
|
|
|
20278
20322
|
var hidden = state.getIsHidden(i, data);
|
|
20279
20323
|
var newAbsoluteName = absoluteName !== '' ? [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n)) : n;
|
|
20280
20324
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
20281
|
-
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$
|
|
20325
|
+
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$X(_objectSpread$X({}, i), {}, {
|
|
20282
20326
|
name: n
|
|
20283
20327
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden, currentLang) : /*#__PURE__*/jsx(Form$2.Item, {
|
|
20284
20328
|
id: idx.toString(),
|
|
@@ -20291,7 +20335,7 @@ var Translation = function Translation(_ref) {
|
|
|
20291
20335
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
20292
20336
|
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
20293
20337
|
hidden: hidden,
|
|
20294
|
-
children: getElement(_objectSpread$
|
|
20338
|
+
children: getElement(_objectSpread$X(_objectSpread$X({}, i), {}, {
|
|
20295
20339
|
name: n
|
|
20296
20340
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden)
|
|
20297
20341
|
})
|
|
@@ -20634,7 +20678,7 @@ function Media (_ref) {
|
|
|
20634
20678
|
});
|
|
20635
20679
|
}
|
|
20636
20680
|
|
|
20637
|
-
var Text = function Text(_ref) {
|
|
20681
|
+
var Text$1 = function Text(_ref) {
|
|
20638
20682
|
var item = _ref.item;
|
|
20639
20683
|
var _useTranslation = useTranslation(),
|
|
20640
20684
|
t = _useTranslation.t;
|
|
@@ -20643,13 +20687,13 @@ var Text = function Text(_ref) {
|
|
|
20643
20687
|
children: t(item.text)
|
|
20644
20688
|
});
|
|
20645
20689
|
};
|
|
20646
|
-
var Text$
|
|
20690
|
+
var Text$2 = observer(Text$1);
|
|
20647
20691
|
|
|
20648
20692
|
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
20693
|
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
20694
|
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$
|
|
20695
|
+
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; }
|
|
20696
|
+
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
20697
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
|
|
20654
20698
|
var _isReadonly, _state$hiddenRequired;
|
|
20655
20699
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -20684,7 +20728,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20684
20728
|
}
|
|
20685
20729
|
});
|
|
20686
20730
|
case 'selectSimple':
|
|
20687
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
20731
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$W(_objectSpread$W({}, item), {}, {
|
|
20688
20732
|
disabled: disabled,
|
|
20689
20733
|
onChange: function onChange(value) {
|
|
20690
20734
|
_onChange(absoluteName, value);
|
|
@@ -20896,7 +20940,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20896
20940
|
value: item.value,
|
|
20897
20941
|
options: item.options.map(function (o) {
|
|
20898
20942
|
var _o$disabled;
|
|
20899
|
-
return _objectSpread$
|
|
20943
|
+
return _objectSpread$W(_objectSpread$W({}, o), {}, {
|
|
20900
20944
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, state.data)
|
|
20901
20945
|
});
|
|
20902
20946
|
}),
|
|
@@ -20917,7 +20961,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20917
20961
|
},
|
|
20918
20962
|
icon: item.icon,
|
|
20919
20963
|
callback: function callback(data) {
|
|
20920
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
20964
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$W(_objectSpread$W({}, state.data), data));
|
|
20921
20965
|
}
|
|
20922
20966
|
});
|
|
20923
20967
|
case 'media':
|
|
@@ -20928,7 +20972,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20928
20972
|
value: item.value
|
|
20929
20973
|
});
|
|
20930
20974
|
case 'text':
|
|
20931
|
-
return /*#__PURE__*/jsx(Text$
|
|
20975
|
+
return /*#__PURE__*/jsx(Text$2, {
|
|
20932
20976
|
item: item
|
|
20933
20977
|
});
|
|
20934
20978
|
default:
|
|
@@ -20938,7 +20982,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20938
20982
|
var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20939
20983
|
var _useTranslation = useTranslation(),
|
|
20940
20984
|
t = _useTranslation.t;
|
|
20941
|
-
return /*#__PURE__*/jsx(Input$1, _objectSpread$
|
|
20985
|
+
return /*#__PURE__*/jsx(Input$1, _objectSpread$W(_objectSpread$W({}, props), {}, {
|
|
20942
20986
|
ref: ref,
|
|
20943
20987
|
disabled: true,
|
|
20944
20988
|
value: t(props.translationPrefix + '.' + props.value)
|
|
@@ -20957,8 +21001,8 @@ function isReadonly(item, data) {
|
|
|
20957
21001
|
return false;
|
|
20958
21002
|
}
|
|
20959
21003
|
|
|
20960
|
-
function ownKeys$
|
|
20961
|
-
function _objectSpread$
|
|
21004
|
+
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; }
|
|
21005
|
+
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
21006
|
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
21007
|
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
21008
|
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 +21052,13 @@ var Presets = function Presets(_ref) {
|
|
|
21008
21052
|
} finally {
|
|
21009
21053
|
_iterator.f();
|
|
21010
21054
|
}
|
|
21011
|
-
var data = _objectSpread$
|
|
21055
|
+
var data = _objectSpread$V(_objectSpread$V({}, form.getFieldsValue(names)), {}, {
|
|
21012
21056
|
newPresetName: newPresetName
|
|
21013
21057
|
});
|
|
21014
21058
|
data.dpi = parseInt(data.dpi);
|
|
21015
21059
|
data.organization = root.getGlobalValue('organizationId');
|
|
21016
21060
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
21017
|
-
var dt = _objectSpread$
|
|
21061
|
+
var dt = _objectSpread$V(_objectSpread$V({}, form.getFieldsValue(names)), {}, {
|
|
21018
21062
|
name: newPresetName
|
|
21019
21063
|
});
|
|
21020
21064
|
setPresets({
|
|
@@ -21508,8 +21552,8 @@ function getLabel(item, t) {
|
|
|
21508
21552
|
}
|
|
21509
21553
|
var Form$1 = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
21510
21554
|
|
|
21511
|
-
function ownKeys$
|
|
21512
|
-
function _objectSpread$
|
|
21555
|
+
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; }
|
|
21556
|
+
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
21557
|
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
21558
|
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
21559
|
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 +21755,7 @@ function useRoleSelectorData (_ref) {
|
|
|
21711
21755
|
roles.forEach(function (r) {
|
|
21712
21756
|
//check if after the changes the role is selected
|
|
21713
21757
|
if (value.includes(r._id)) {
|
|
21714
|
-
var newValue = _objectSpread$
|
|
21758
|
+
var newValue = _objectSpread$U(_objectSpread$U({}, r), {}, {
|
|
21715
21759
|
selected: true
|
|
21716
21760
|
});
|
|
21717
21761
|
//add it to the new list as selected role
|
|
@@ -21747,7 +21791,7 @@ function useRoleSelectorData (_ref) {
|
|
|
21747
21791
|
}
|
|
21748
21792
|
}
|
|
21749
21793
|
} else {
|
|
21750
|
-
var _newValue = _objectSpread$
|
|
21794
|
+
var _newValue = _objectSpread$U(_objectSpread$U({}, r), {}, {
|
|
21751
21795
|
selected: false
|
|
21752
21796
|
});
|
|
21753
21797
|
//add it to the new list as unselected role
|
|
@@ -21951,7 +21995,7 @@ function _updateRoles() {
|
|
|
21951
21995
|
userRole = userRoles.find(function (r) {
|
|
21952
21996
|
return r._id == role._id;
|
|
21953
21997
|
});
|
|
21954
|
-
newRole = _objectSpread$
|
|
21998
|
+
newRole = _objectSpread$U({}, role);
|
|
21955
21999
|
if (userRole) {
|
|
21956
22000
|
newRole.selected = true;
|
|
21957
22001
|
newRole.inherited = userRole.inherited;
|
|
@@ -22171,7 +22215,7 @@ function _fetchOptions() {
|
|
|
22171
22215
|
case 4:
|
|
22172
22216
|
result = _context11.sent;
|
|
22173
22217
|
options = result.data.map(function (d) {
|
|
22174
|
-
return _objectSpread$
|
|
22218
|
+
return _objectSpread$U(_objectSpread$U({}, d), {}, {
|
|
22175
22219
|
label: d.displayName,
|
|
22176
22220
|
value: d._id,
|
|
22177
22221
|
isLeaf: !d.hasChildren
|
|
@@ -22273,8 +22317,8 @@ var parent = "parent-NZJ3S";
|
|
|
22273
22317
|
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
22318
|
styleInject(css_248z$s);
|
|
22275
22319
|
|
|
22276
|
-
function ownKeys$
|
|
22277
|
-
function _objectSpread$
|
|
22320
|
+
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; }
|
|
22321
|
+
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
22322
|
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
22323
|
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
22324
|
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 +22378,8 @@ function _generateCSV() {
|
|
|
22334
22378
|
break;
|
|
22335
22379
|
}
|
|
22336
22380
|
_context2.next = 21;
|
|
22337
|
-
return generateCSV(_objectSpread$
|
|
22338
|
-
mappingData: _objectSpread$
|
|
22381
|
+
return generateCSV(_objectSpread$T(_objectSpread$T({}, exportParams.children), {}, {
|
|
22382
|
+
mappingData: _objectSpread$T(_objectSpread$T({}, parent), {}, {
|
|
22339
22383
|
parentId: exportParams.mappingData._id
|
|
22340
22384
|
})
|
|
22341
22385
|
}), csvData);
|
|
@@ -22443,8 +22487,8 @@ function _downloadFile() {
|
|
|
22443
22487
|
return _downloadFile.apply(this, arguments);
|
|
22444
22488
|
}
|
|
22445
22489
|
|
|
22446
|
-
function ownKeys$
|
|
22447
|
-
function _objectSpread$
|
|
22490
|
+
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; }
|
|
22491
|
+
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
22492
|
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
22493
|
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
22494
|
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 +22907,7 @@ function useRelationSelectorData (_ref) {
|
|
|
22863
22907
|
var activeItem = _step.value;
|
|
22864
22908
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
22865
22909
|
addedObjects.push(addedData);
|
|
22866
|
-
getSplittedItems(_objectSpread$
|
|
22910
|
+
getSplittedItems(_objectSpread$S(_objectSpread$S({}, activeItem), {}, {
|
|
22867
22911
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
22868
22912
|
}));
|
|
22869
22913
|
ret = true;
|
|
@@ -23068,8 +23112,8 @@ function useRelationSelectorData (_ref) {
|
|
|
23068
23112
|
};
|
|
23069
23113
|
}
|
|
23070
23114
|
|
|
23071
|
-
function ownKeys$
|
|
23072
|
-
function _objectSpread$
|
|
23115
|
+
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; }
|
|
23116
|
+
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
23117
|
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
23118
|
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
23119
|
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 +23246,7 @@ function ActionButton (_ref) {
|
|
|
23202
23246
|
_iterator2.f();
|
|
23203
23247
|
}
|
|
23204
23248
|
_context.next = 19;
|
|
23205
|
-
return apiInterface.update(_objectSpread$
|
|
23249
|
+
return apiInterface.update(_objectSpread$R(_objectSpread$R({}, data), {}, {
|
|
23206
23250
|
state: toSwitch
|
|
23207
23251
|
}), data);
|
|
23208
23252
|
case 19:
|
|
@@ -23359,14 +23403,14 @@ function _simpleChangeValue() {
|
|
|
23359
23403
|
break;
|
|
23360
23404
|
}
|
|
23361
23405
|
for (i = 0; i < action.newValues.length; i++) {
|
|
23362
|
-
fieldsToUpdate = _objectSpread$
|
|
23406
|
+
fieldsToUpdate = _objectSpread$R(_objectSpread$R({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
23363
23407
|
}
|
|
23364
23408
|
if (!apiInterface.canUpdate) {
|
|
23365
23409
|
_context2.next = 9;
|
|
23366
23410
|
break;
|
|
23367
23411
|
}
|
|
23368
23412
|
_context2.next = 7;
|
|
23369
|
-
return apiInterface.update(_objectSpread$
|
|
23413
|
+
return apiInterface.update(_objectSpread$R({}, fieldsToUpdate), data);
|
|
23370
23414
|
case 7:
|
|
23371
23415
|
response = _context2.sent;
|
|
23372
23416
|
return _context2.abrupt("return", response);
|
|
@@ -23381,7 +23425,7 @@ function _simpleChangeValue() {
|
|
|
23381
23425
|
return _simpleChangeValue.apply(this, arguments);
|
|
23382
23426
|
}
|
|
23383
23427
|
function A(props) {
|
|
23384
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
23428
|
+
return /*#__PURE__*/jsx("a", _objectSpread$R({}, props));
|
|
23385
23429
|
}
|
|
23386
23430
|
|
|
23387
23431
|
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 +23563,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
23519
23563
|
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
23564
|
styleInject(css_248z$r);
|
|
23521
23565
|
|
|
23522
|
-
function ownKeys$
|
|
23523
|
-
function _objectSpread$
|
|
23566
|
+
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; }
|
|
23567
|
+
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
23568
|
var DropDown = function DropDown(_ref) {
|
|
23525
23569
|
var _curItem$data$length;
|
|
23526
23570
|
var split = _ref.split,
|
|
@@ -23552,7 +23596,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
23552
23596
|
});
|
|
23553
23597
|
return /*#__PURE__*/jsx(Collapse, {
|
|
23554
23598
|
onChange: function onChange() {
|
|
23555
|
-
return getSplittedItems(_objectSpread$
|
|
23599
|
+
return getSplittedItems(_objectSpread$Q(_objectSpread$Q({}, item.item), {}, {
|
|
23556
23600
|
parentId: item.parentId
|
|
23557
23601
|
}), 0);
|
|
23558
23602
|
},
|
|
@@ -23810,8 +23854,8 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
23810
23854
|
};
|
|
23811
23855
|
var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
|
|
23812
23856
|
|
|
23813
|
-
function ownKeys$
|
|
23814
|
-
function _objectSpread$
|
|
23857
|
+
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; }
|
|
23858
|
+
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
23859
|
function useFormListData (_ref) {
|
|
23816
23860
|
var _configuration$defaul;
|
|
23817
23861
|
var id = _ref.id,
|
|
@@ -23891,7 +23935,7 @@ function useFormListData (_ref) {
|
|
|
23891
23935
|
if (updated.length == state.length) {
|
|
23892
23936
|
newState = state.map(function (s, i) {
|
|
23893
23937
|
var _updated$find;
|
|
23894
|
-
return _objectSpread$
|
|
23938
|
+
return _objectSpread$P(_objectSpread$P({}, s), {}, {
|
|
23895
23939
|
data: (_updated$find = updated.find(function (u) {
|
|
23896
23940
|
return u.index == i;
|
|
23897
23941
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -24028,8 +24072,8 @@ var FormList = function FormList(_ref, ref) {
|
|
|
24028
24072
|
};
|
|
24029
24073
|
var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
24030
24074
|
|
|
24031
|
-
function ownKeys$
|
|
24032
|
-
function _objectSpread$
|
|
24075
|
+
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; }
|
|
24076
|
+
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
24077
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
24034
24078
|
function useSelectOrCreateData (_ref) {
|
|
24035
24079
|
var id = _ref.id,
|
|
@@ -24126,7 +24170,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
24126
24170
|
_context.next = 7;
|
|
24127
24171
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
24128
24172
|
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$
|
|
24173
|
+
return _objectSpread$O(_objectSpread$O({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
24130
24174
|
}, {}) : {
|
|
24131
24175
|
_id: [value, 'contains']
|
|
24132
24176
|
},
|
|
@@ -24437,8 +24481,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
24437
24481
|
});
|
|
24438
24482
|
};
|
|
24439
24483
|
|
|
24440
|
-
function ownKeys$
|
|
24441
|
-
function _objectSpread$
|
|
24484
|
+
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; }
|
|
24485
|
+
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
24486
|
function useListData (_ref) {
|
|
24443
24487
|
var id = _ref.id,
|
|
24444
24488
|
data = _ref.data;
|
|
@@ -24481,7 +24525,7 @@ function useListData (_ref) {
|
|
|
24481
24525
|
case 3:
|
|
24482
24526
|
result = _context.sent;
|
|
24483
24527
|
setListData(result.data.map(parseField));
|
|
24484
|
-
initData = _objectSpread$
|
|
24528
|
+
initData = _objectSpread$N({}, data);
|
|
24485
24529
|
setUpdatedObject(initData);
|
|
24486
24530
|
setLoading(false);
|
|
24487
24531
|
case 8:
|
|
@@ -24522,7 +24566,7 @@ function useListData (_ref) {
|
|
|
24522
24566
|
});
|
|
24523
24567
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
24524
24568
|
var parsedField = field.field.split('.');
|
|
24525
|
-
item.itemUpdate = _objectSpread$
|
|
24569
|
+
item.itemUpdate = _objectSpread$N(_objectSpread$N({}, field), {}, {
|
|
24526
24570
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
24527
24571
|
});
|
|
24528
24572
|
});
|
|
@@ -24553,16 +24597,16 @@ function useListData (_ref) {
|
|
|
24553
24597
|
console.error('field with more than 2 parts not allowed');
|
|
24554
24598
|
return;
|
|
24555
24599
|
}
|
|
24556
|
-
var updObj = _objectSpread$
|
|
24600
|
+
var updObj = _objectSpread$N({}, updatedObject);
|
|
24557
24601
|
if (fields.length === 1) {
|
|
24558
|
-
updObj = _objectSpread$
|
|
24602
|
+
updObj = _objectSpread$N(_objectSpread$N({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
24559
24603
|
} else if (fields.length === 2) {
|
|
24560
24604
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
24561
24605
|
return v.id === item.id.trim();
|
|
24562
24606
|
});
|
|
24563
24607
|
if (updatedField) {
|
|
24564
|
-
var updatedFieldCopy = _objectSpread$
|
|
24565
|
-
updObj = _objectSpread$
|
|
24608
|
+
var updatedFieldCopy = _objectSpread$N(_objectSpread$N({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
24609
|
+
updObj = _objectSpread$N(_objectSpread$N({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
24566
24610
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
24567
24611
|
})));
|
|
24568
24612
|
}
|
|
@@ -24571,11 +24615,11 @@ function useListData (_ref) {
|
|
|
24571
24615
|
var acItems = listData;
|
|
24572
24616
|
for (var i = 0; i < acItems.length; i++) {
|
|
24573
24617
|
if (i == index) {
|
|
24574
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
24618
|
+
acItems[i].itemUpdate = _objectSpread$N(_objectSpread$N({}, acItems[i].itemUpdate), {}, {
|
|
24575
24619
|
value: value
|
|
24576
24620
|
});
|
|
24577
24621
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
24578
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
24622
|
+
acItems[i].itemUpdate = _objectSpread$N(_objectSpread$N({}, acItems[i].itemUpdate), {}, {
|
|
24579
24623
|
value: !value
|
|
24580
24624
|
});
|
|
24581
24625
|
}
|
|
@@ -25089,8 +25133,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
25089
25133
|
};
|
|
25090
25134
|
}
|
|
25091
25135
|
|
|
25092
|
-
function ownKeys$
|
|
25093
|
-
function _objectSpread$
|
|
25136
|
+
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; }
|
|
25137
|
+
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
25138
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
25095
25139
|
var id = _ref.id,
|
|
25096
25140
|
data = _ref.data,
|
|
@@ -25198,12 +25242,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
25198
25242
|
}
|
|
25199
25243
|
function onEnter(e) {
|
|
25200
25244
|
if (e.key != 'Enter') return;
|
|
25201
|
-
setCrop(_objectSpread$
|
|
25245
|
+
setCrop(_objectSpread$M(_objectSpread$M({}, crop), {}, {
|
|
25202
25246
|
unit: 'px',
|
|
25203
25247
|
width: Number(widthInputElement.current.value),
|
|
25204
25248
|
height: Number(heightInputElement.current.value)
|
|
25205
25249
|
}));
|
|
25206
|
-
setCompletedCrop(_objectSpread$
|
|
25250
|
+
setCompletedCrop(_objectSpread$M(_objectSpread$M({}, crop), {}, {
|
|
25207
25251
|
unit: 'px',
|
|
25208
25252
|
width: Number(widthInputElement.current.value),
|
|
25209
25253
|
height: Number(heightInputElement.current.value)
|
|
@@ -25281,8 +25325,8 @@ var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
|
25281
25325
|
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
25326
|
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
25327
|
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$
|
|
25328
|
+
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; }
|
|
25329
|
+
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
25330
|
function useDescriptions (_ref) {
|
|
25287
25331
|
var id = _ref.id;
|
|
25288
25332
|
var root = useStore();
|
|
@@ -25375,7 +25419,7 @@ function _getDisplayData() {
|
|
|
25375
25419
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
25376
25420
|
while (1) switch (_context4.prev = _context4.next) {
|
|
25377
25421
|
case 0:
|
|
25378
|
-
displayData = _objectSpread$
|
|
25422
|
+
displayData = _objectSpread$L({}, data);
|
|
25379
25423
|
_iterator = _createForOfIteratorHelper$a(items);
|
|
25380
25424
|
_context4.prev = 2;
|
|
25381
25425
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -25651,8 +25695,8 @@ var FileUploadWrapper$1 = function FileUploadWrapper(_ref) {
|
|
|
25651
25695
|
};
|
|
25652
25696
|
var FileUploadBeta = observer(FileUploadWrapper$1);
|
|
25653
25697
|
|
|
25654
|
-
function ownKeys$
|
|
25655
|
-
function _objectSpread$
|
|
25698
|
+
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; }
|
|
25699
|
+
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
25700
|
function useGridData (_ref) {
|
|
25657
25701
|
var id = _ref.id,
|
|
25658
25702
|
data = _ref.data;
|
|
@@ -25695,11 +25739,11 @@ function useGridData (_ref) {
|
|
|
25695
25739
|
function reducer(state, action) {
|
|
25696
25740
|
switch (action.type) {
|
|
25697
25741
|
case 'update':
|
|
25698
|
-
return _objectSpread$
|
|
25742
|
+
return _objectSpread$K(_objectSpread$K({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$K(_objectSpread$K({}, action.data), {}, {
|
|
25699
25743
|
buffer: Buffer.from(action.data.buffer)
|
|
25700
25744
|
})));
|
|
25701
25745
|
case 'delete':
|
|
25702
|
-
var newState = _objectSpread$
|
|
25746
|
+
var newState = _objectSpread$K({}, state);
|
|
25703
25747
|
delete newState[action.data.divaNr];
|
|
25704
25748
|
return newState;
|
|
25705
25749
|
default:
|
|
@@ -25786,8 +25830,8 @@ var Grid = function Grid(_ref) {
|
|
|
25786
25830
|
});
|
|
25787
25831
|
};
|
|
25788
25832
|
|
|
25789
|
-
function ownKeys$
|
|
25790
|
-
function _objectSpread$
|
|
25833
|
+
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; }
|
|
25834
|
+
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
25835
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
25792
25836
|
var id = _ref.id;
|
|
25793
25837
|
var root = useStore();
|
|
@@ -25906,7 +25950,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
25906
25950
|
onRemove: onRemove,
|
|
25907
25951
|
customRequest: customRequest,
|
|
25908
25952
|
fileList: fileList.map(function (f) {
|
|
25909
|
-
return _objectSpread$
|
|
25953
|
+
return _objectSpread$J(_objectSpread$J({}, f), {}, {
|
|
25910
25954
|
url: f.url
|
|
25911
25955
|
});
|
|
25912
25956
|
}),
|
|
@@ -25994,8 +26038,8 @@ var TableSummary = function TableSummary(_ref) {
|
|
|
25994
26038
|
});
|
|
25995
26039
|
};
|
|
25996
26040
|
|
|
25997
|
-
function ownKeys$
|
|
25998
|
-
function _objectSpread$
|
|
26041
|
+
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; }
|
|
26042
|
+
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
26043
|
function getExpandedRowRenderer (config, root) {
|
|
26000
26044
|
return function (record) {
|
|
26001
26045
|
var data = record;
|
|
@@ -26017,7 +26061,7 @@ function customSubTable(columns, datasource) {
|
|
|
26017
26061
|
// map custom columns to antd columns
|
|
26018
26062
|
var antcols = columns.map(function (col) {
|
|
26019
26063
|
var _col$width;
|
|
26020
|
-
return _objectSpread$
|
|
26064
|
+
return _objectSpread$I(_objectSpread$I({}, col), {}, {
|
|
26021
26065
|
title: col.title,
|
|
26022
26066
|
dataIndex: col.field,
|
|
26023
26067
|
key: col.field,
|
|
@@ -26729,8 +26773,8 @@ function LinkCell (_ref) {
|
|
|
26729
26773
|
|
|
26730
26774
|
var _excluded$7 = ["index"],
|
|
26731
26775
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
26732
|
-
function ownKeys$
|
|
26733
|
-
function _objectSpread$
|
|
26776
|
+
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; }
|
|
26777
|
+
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
26778
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
26735
26779
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
26736
26780
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -26744,7 +26788,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
26744
26788
|
component: false,
|
|
26745
26789
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
26746
26790
|
value: form,
|
|
26747
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
26791
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$H({}, props))
|
|
26748
26792
|
})
|
|
26749
26793
|
});
|
|
26750
26794
|
};
|
|
@@ -26797,7 +26841,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
26797
26841
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
26798
26842
|
longDescriptionType = 'text';
|
|
26799
26843
|
}
|
|
26800
|
-
var modifiedColumn = _objectSpread$
|
|
26844
|
+
var modifiedColumn = _objectSpread$H(_objectSpread$H({}, column), {}, {
|
|
26801
26845
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
26802
26846
|
});
|
|
26803
26847
|
if (column) {
|
|
@@ -26810,40 +26854,40 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
26810
26854
|
};
|
|
26811
26855
|
switch (modifiedColumn.type) {
|
|
26812
26856
|
case 'boolean':
|
|
26813
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
26857
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$H({}, cellProps));
|
|
26814
26858
|
break;
|
|
26815
26859
|
case 'text':
|
|
26816
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
26860
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$H({}, cellProps));
|
|
26817
26861
|
break;
|
|
26818
26862
|
case 'select':
|
|
26819
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
26863
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$H({}, cellProps));
|
|
26820
26864
|
case 'media':
|
|
26821
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
26865
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$H({}, cellProps));
|
|
26822
26866
|
break;
|
|
26823
26867
|
case 'mediaItem':
|
|
26824
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
26868
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$H({}, cellProps));
|
|
26825
26869
|
break;
|
|
26826
26870
|
case 'unixTimeStamp':
|
|
26827
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
26871
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$H({}, cellProps));
|
|
26828
26872
|
break;
|
|
26829
26873
|
case 'unixTimeStampCheck':
|
|
26830
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
26874
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$H({}, cellProps));
|
|
26831
26875
|
break;
|
|
26832
26876
|
case 'icon':
|
|
26833
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
26877
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$H({}, cellProps));
|
|
26834
26878
|
break;
|
|
26835
26879
|
case 'progress':
|
|
26836
|
-
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$
|
|
26880
|
+
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$H({}, cellProps));
|
|
26837
26881
|
break;
|
|
26838
26882
|
case 'link':
|
|
26839
|
-
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$
|
|
26883
|
+
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$H({}, cellProps));
|
|
26840
26884
|
break;
|
|
26841
26885
|
default:
|
|
26842
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
26886
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$H({}, cellProps));
|
|
26843
26887
|
break;
|
|
26844
26888
|
}
|
|
26845
26889
|
}
|
|
26846
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
26890
|
+
return /*#__PURE__*/jsx("td", _objectSpread$H(_objectSpread$H({}, restProps), {}, {
|
|
26847
26891
|
children: childNode
|
|
26848
26892
|
}));
|
|
26849
26893
|
};
|
|
@@ -27038,7 +27082,7 @@ var spinner = "spinner-00VcK";
|
|
|
27038
27082
|
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
27083
|
styleInject(css_248z$l);
|
|
27040
27084
|
|
|
27041
|
-
var Panel = Collapse.Panel;
|
|
27085
|
+
var Panel$1 = Collapse.Panel;
|
|
27042
27086
|
function AGHistogram (_ref) {
|
|
27043
27087
|
var height = _ref.height,
|
|
27044
27088
|
width = _ref.width;
|
|
@@ -27146,7 +27190,7 @@ function AGHistogram (_ref) {
|
|
|
27146
27190
|
collapsible: collapsible,
|
|
27147
27191
|
activeKey: activeKeys,
|
|
27148
27192
|
onChange: handleOnChange,
|
|
27149
|
-
children: /*#__PURE__*/jsx(Panel, {
|
|
27193
|
+
children: /*#__PURE__*/jsx(Panel$1, {
|
|
27150
27194
|
header: headerText,
|
|
27151
27195
|
children: /*#__PURE__*/jsxs("div", {
|
|
27152
27196
|
className: container$5,
|
|
@@ -27195,8 +27239,8 @@ var SMChart = function SMChart(props) {
|
|
|
27195
27239
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
27196
27240
|
};
|
|
27197
27241
|
|
|
27198
|
-
function ownKeys$
|
|
27199
|
-
function _objectSpread$
|
|
27242
|
+
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; }
|
|
27243
|
+
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
27244
|
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
27245
|
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
27246
|
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 +27438,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
27394
27438
|
// Convert to Dayjs
|
|
27395
27439
|
(_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
27440
|
]
|
|
27397
|
-
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
27441
|
+
}), ((_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
27442
|
style: {
|
|
27399
27443
|
minWidth: '200px'
|
|
27400
27444
|
},
|
|
@@ -27499,7 +27543,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
27499
27543
|
},
|
|
27500
27544
|
dataSource: data,
|
|
27501
27545
|
loading: state.loading,
|
|
27502
|
-
pagination: _objectSpread$
|
|
27546
|
+
pagination: _objectSpread$G(_objectSpread$G({}, state.pagination), {}, {
|
|
27503
27547
|
showTotal: function showTotal(total, range) {
|
|
27504
27548
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
27505
27549
|
},
|
|
@@ -27819,7 +27863,7 @@ function BulkAction(_ref6) {
|
|
|
27819
27863
|
}
|
|
27820
27864
|
_context4.t0 = data;
|
|
27821
27865
|
_context4.next = 11;
|
|
27822
|
-
return apiInterface.update(_objectSpread$
|
|
27866
|
+
return apiInterface.update(_objectSpread$G(_objectSpread$G({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
27823
27867
|
case 11:
|
|
27824
27868
|
_context4.t1 = _context4.sent;
|
|
27825
27869
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -27932,8 +27976,8 @@ function SelectionText(_ref8) {
|
|
|
27932
27976
|
});
|
|
27933
27977
|
}
|
|
27934
27978
|
|
|
27935
|
-
function ownKeys$
|
|
27936
|
-
function _objectSpread$
|
|
27979
|
+
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; }
|
|
27980
|
+
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
27981
|
function getColumnFilterProps (_ref) {
|
|
27938
27982
|
var filter = _ref.filter,
|
|
27939
27983
|
title = _ref.title;
|
|
@@ -28296,7 +28340,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
28296
28340
|
});
|
|
28297
28341
|
},
|
|
28298
28342
|
options: filter.map(function (f) {
|
|
28299
|
-
return _objectSpread$
|
|
28343
|
+
return _objectSpread$F(_objectSpread$F({}, f), {}, {
|
|
28300
28344
|
label: t(f.label)
|
|
28301
28345
|
});
|
|
28302
28346
|
})
|
|
@@ -28345,7 +28389,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
28345
28389
|
setDisplaySelectedvalues = _useState4[1];
|
|
28346
28390
|
var options = [];
|
|
28347
28391
|
options = filter.map(function (f) {
|
|
28348
|
-
return _objectSpread$
|
|
28392
|
+
return _objectSpread$F(_objectSpread$F({}, f), {}, {
|
|
28349
28393
|
label: t(f.label)
|
|
28350
28394
|
});
|
|
28351
28395
|
});
|
|
@@ -28419,8 +28463,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
28419
28463
|
};
|
|
28420
28464
|
};
|
|
28421
28465
|
|
|
28422
|
-
function ownKeys$
|
|
28423
|
-
function _objectSpread$
|
|
28466
|
+
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; }
|
|
28467
|
+
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
28468
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
28425
28469
|
var columns = configuration.columns.filter(function (c) {
|
|
28426
28470
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -28473,7 +28517,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
28473
28517
|
}
|
|
28474
28518
|
function mapColumn(column, onUpdate) {
|
|
28475
28519
|
var _column$field, _column$children;
|
|
28476
|
-
return _objectSpread$
|
|
28520
|
+
return _objectSpread$E(_objectSpread$E(_objectSpread$E({}, column), {}, {
|
|
28477
28521
|
hidden: false,
|
|
28478
28522
|
width: column.width || 100,
|
|
28479
28523
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
@@ -28523,8 +28567,8 @@ function updateData (_ref) {
|
|
|
28523
28567
|
};
|
|
28524
28568
|
}
|
|
28525
28569
|
|
|
28526
|
-
function ownKeys$
|
|
28527
|
-
function _objectSpread$
|
|
28570
|
+
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; }
|
|
28571
|
+
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
28572
|
function applyFilterAndSortation (_ref) {
|
|
28529
28573
|
var data = _ref.data,
|
|
28530
28574
|
filters = _ref.filters,
|
|
@@ -28539,7 +28583,7 @@ function applyFilterAndSortation (_ref) {
|
|
|
28539
28583
|
processedData = sort(sorter || [], processedData);
|
|
28540
28584
|
return {
|
|
28541
28585
|
data: processedData,
|
|
28542
|
-
pagination: _objectSpread$
|
|
28586
|
+
pagination: _objectSpread$D(_objectSpread$D({}, pagination), {}, {
|
|
28543
28587
|
total: processedData.length
|
|
28544
28588
|
})
|
|
28545
28589
|
};
|
|
@@ -28624,8 +28668,8 @@ function filter(f, data) {
|
|
|
28624
28668
|
}
|
|
28625
28669
|
|
|
28626
28670
|
var _excluded$6 = ["_id"];
|
|
28627
|
-
function ownKeys$
|
|
28628
|
-
function _objectSpread$
|
|
28671
|
+
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; }
|
|
28672
|
+
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
28673
|
function useTableData$1 (_ref) {
|
|
28630
28674
|
var _configuration$apiInt;
|
|
28631
28675
|
var id = _ref.id;
|
|
@@ -28680,7 +28724,7 @@ function useTableData$1 (_ref) {
|
|
|
28680
28724
|
var _configuration$create;
|
|
28681
28725
|
if (!dataRow) return;
|
|
28682
28726
|
var id = v4();
|
|
28683
|
-
var processedDataRow = unflatten(_objectSpread$
|
|
28727
|
+
var processedDataRow = unflatten(_objectSpread$C({
|
|
28684
28728
|
_id: id,
|
|
28685
28729
|
ID: id
|
|
28686
28730
|
}, dataRow));
|
|
@@ -28692,11 +28736,11 @@ function useTableData$1 (_ref) {
|
|
|
28692
28736
|
newData = _updateData.data;
|
|
28693
28737
|
_updateData.prevDataRow;
|
|
28694
28738
|
_updateData.index;
|
|
28695
|
-
var newState = _objectSpread$
|
|
28739
|
+
var newState = _objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28696
28740
|
data: newData
|
|
28697
28741
|
});
|
|
28698
28742
|
if (!filterServerSide) {
|
|
28699
|
-
var res = applyFilterAndSortation(_objectSpread$
|
|
28743
|
+
var res = applyFilterAndSortation(_objectSpread$C(_objectSpread$C({}, filterData), {}, {
|
|
28700
28744
|
data: newData
|
|
28701
28745
|
}));
|
|
28702
28746
|
newState.data = res.data;
|
|
@@ -28708,33 +28752,33 @@ function useTableData$1 (_ref) {
|
|
|
28708
28752
|
var formData = new FormData();
|
|
28709
28753
|
processedDataRow._id;
|
|
28710
28754
|
var value = _objectWithoutProperties(processedDataRow, _excluded$6);
|
|
28711
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
28755
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28712
28756
|
filterContex: filterContex,
|
|
28713
28757
|
value: JSON.stringify([value])
|
|
28714
28758
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
28715
28759
|
if (d && d.Result && d.Result == 'Success') return;
|
|
28716
|
-
setState(_objectSpread$
|
|
28760
|
+
setState(_objectSpread$C({}, oldState));
|
|
28717
28761
|
});
|
|
28718
28762
|
}, [state, catalogItem, filterData]);
|
|
28719
28763
|
useEffect(function () {
|
|
28720
28764
|
if (!catalogItem) return;
|
|
28721
|
-
setState(_objectSpread$
|
|
28765
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28722
28766
|
loading: true,
|
|
28723
|
-
mappingData: _objectSpread$
|
|
28767
|
+
mappingData: _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28724
28768
|
filterContex: filterContex
|
|
28725
28769
|
})
|
|
28726
28770
|
}));
|
|
28727
28771
|
if (!filterServerSide) {
|
|
28728
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
28772
|
+
apiHandler.readList(configuration.mapping, _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28729
28773
|
filterContex: filterContex
|
|
28730
28774
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
28731
28775
|
var newData = data.data.map(function (d) {
|
|
28732
|
-
return _objectSpread$
|
|
28776
|
+
return _objectSpread$C(_objectSpread$C({}, d), {}, {
|
|
28733
28777
|
_id: d._id || d.ID || nanoid()
|
|
28734
28778
|
});
|
|
28735
28779
|
});
|
|
28736
28780
|
onChange({
|
|
28737
|
-
pagination: _objectSpread$
|
|
28781
|
+
pagination: _objectSpread$C({}, state.pagination),
|
|
28738
28782
|
filters: {},
|
|
28739
28783
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
28740
28784
|
return c.defaultSortOrder;
|
|
@@ -28750,7 +28794,7 @@ function useTableData$1 (_ref) {
|
|
|
28750
28794
|
});
|
|
28751
28795
|
} else {
|
|
28752
28796
|
onChange({
|
|
28753
|
-
pagination: _objectSpread$
|
|
28797
|
+
pagination: _objectSpread$C({}, state.pagination),
|
|
28754
28798
|
filters: {},
|
|
28755
28799
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
28756
28800
|
return c.defaultSortOrder;
|
|
@@ -28766,17 +28810,17 @@ function useTableData$1 (_ref) {
|
|
|
28766
28810
|
}
|
|
28767
28811
|
}, [filterContex, catalogItem]);
|
|
28768
28812
|
var onChange = function onChange(p, dataParam) {
|
|
28769
|
-
setState(_objectSpread$
|
|
28813
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28770
28814
|
loading: true
|
|
28771
28815
|
}));
|
|
28772
28816
|
if (!filterServerSide) {
|
|
28773
28817
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
28774
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
28818
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$C(_objectSpread$C({}, p), {}, {
|
|
28775
28819
|
data: unfilteredData
|
|
28776
28820
|
})),
|
|
28777
28821
|
data = _applyFilterAndSortat.data,
|
|
28778
28822
|
pagination = _applyFilterAndSortat.pagination;
|
|
28779
|
-
setState(_objectSpread$
|
|
28823
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28780
28824
|
data: data,
|
|
28781
28825
|
pagination: pagination,
|
|
28782
28826
|
loading: false,
|
|
@@ -28787,20 +28831,20 @@ function useTableData$1 (_ref) {
|
|
|
28787
28831
|
sorter: p.sorter
|
|
28788
28832
|
});
|
|
28789
28833
|
} else {
|
|
28790
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
28834
|
+
apiHandler.readList(configuration.mapping, _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28791
28835
|
filterContex: filterContex
|
|
28792
28836
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
28793
|
-
setState(_objectSpread$
|
|
28837
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28794
28838
|
data: data.data.map(function (dt) {
|
|
28795
|
-
return _objectSpread$
|
|
28839
|
+
return _objectSpread$C(_objectSpread$C({}, dt), {}, {
|
|
28796
28840
|
_id: dt._id || dt.ID || nanoid()
|
|
28797
28841
|
});
|
|
28798
28842
|
}),
|
|
28799
|
-
pagination: _objectSpread$
|
|
28843
|
+
pagination: _objectSpread$C(_objectSpread$C({}, p.pagination), {}, {
|
|
28800
28844
|
total: data.total
|
|
28801
28845
|
}),
|
|
28802
28846
|
loading: false,
|
|
28803
|
-
mappingData: _objectSpread$
|
|
28847
|
+
mappingData: _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28804
28848
|
filterContex: filterContex
|
|
28805
28849
|
})
|
|
28806
28850
|
}));
|
|
@@ -28821,7 +28865,7 @@ function useTableData$1 (_ref) {
|
|
|
28821
28865
|
filters['_id'] = [id, 'eq', false];
|
|
28822
28866
|
_context.next = 4;
|
|
28823
28867
|
return apiHandler.readList(configuration.mapping, {
|
|
28824
|
-
pagination: _objectSpread$
|
|
28868
|
+
pagination: _objectSpread$C({}, state.pagination),
|
|
28825
28869
|
columns: configuration.columns,
|
|
28826
28870
|
filters: filters,
|
|
28827
28871
|
sorter: filterData.sorter
|
|
@@ -28840,7 +28884,7 @@ function useTableData$1 (_ref) {
|
|
|
28840
28884
|
};
|
|
28841
28885
|
}();
|
|
28842
28886
|
var onSelect = function onSelect(keys) {
|
|
28843
|
-
setState(_objectSpread$
|
|
28887
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28844
28888
|
selected: keys
|
|
28845
28889
|
}));
|
|
28846
28890
|
};
|
|
@@ -28850,7 +28894,7 @@ function useTableData$1 (_ref) {
|
|
|
28850
28894
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
28851
28895
|
while (1) switch (_context3.prev = _context3.next) {
|
|
28852
28896
|
case 0:
|
|
28853
|
-
setState(_objectSpread$
|
|
28897
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28854
28898
|
deleting: true
|
|
28855
28899
|
}));
|
|
28856
28900
|
newData = _toConsumableArray(state.data);
|
|
@@ -28865,7 +28909,7 @@ function useTableData$1 (_ref) {
|
|
|
28865
28909
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
28866
28910
|
return nd._id === state.selected[index];
|
|
28867
28911
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
28868
|
-
mappingData = _objectSpread$
|
|
28912
|
+
mappingData = _objectSpread$C(_objectSpread$C({}, mappingData), state.mappingData);
|
|
28869
28913
|
_context2.next = 5;
|
|
28870
28914
|
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
28915
|
case 5:
|
|
@@ -28915,7 +28959,7 @@ function useTableData$1 (_ref) {
|
|
|
28915
28959
|
}
|
|
28916
28960
|
_context3.next = 18;
|
|
28917
28961
|
return apiHandler.readList(configuration.mapping, {
|
|
28918
|
-
pagination: _objectSpread$
|
|
28962
|
+
pagination: _objectSpread$C(_objectSpread$C({}, state.pagination), {}, {
|
|
28919
28963
|
current: current
|
|
28920
28964
|
}),
|
|
28921
28965
|
columns: configuration.columns,
|
|
@@ -28927,11 +28971,11 @@ function useTableData$1 (_ref) {
|
|
|
28927
28971
|
newData = data.data;
|
|
28928
28972
|
total = data.total;
|
|
28929
28973
|
case 21:
|
|
28930
|
-
setState(_objectSpread$
|
|
28974
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28931
28975
|
selected: [],
|
|
28932
28976
|
deleting: false,
|
|
28933
28977
|
data: newData,
|
|
28934
|
-
pagination: _objectSpread$
|
|
28978
|
+
pagination: _objectSpread$C(_objectSpread$C({}, state.pagination), {}, {
|
|
28935
28979
|
current: current,
|
|
28936
28980
|
total: total
|
|
28937
28981
|
})
|
|
@@ -28947,12 +28991,12 @@ function useTableData$1 (_ref) {
|
|
|
28947
28991
|
};
|
|
28948
28992
|
}();
|
|
28949
28993
|
function setLoading() {
|
|
28950
|
-
setState(_objectSpread$
|
|
28994
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28951
28995
|
loading: true
|
|
28952
28996
|
}));
|
|
28953
28997
|
}
|
|
28954
|
-
return _objectSpread$
|
|
28955
|
-
configuration: _objectSpread$
|
|
28998
|
+
return _objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28999
|
+
configuration: _objectSpread$C(_objectSpread$C({}, configuration), {}, {
|
|
28956
29000
|
title: undefined
|
|
28957
29001
|
}),
|
|
28958
29002
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -29064,8 +29108,8 @@ function objectHash (obj) {
|
|
|
29064
29108
|
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
29109
|
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
29110
|
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$
|
|
29111
|
+
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; }
|
|
29112
|
+
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
29113
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
29070
29114
|
function useTableData (_ref) {
|
|
29071
29115
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$filter4, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -29124,7 +29168,7 @@ function useTableData (_ref) {
|
|
|
29124
29168
|
var _useState13 = useState({
|
|
29125
29169
|
loading: true,
|
|
29126
29170
|
deleting: false,
|
|
29127
|
-
pagination: _objectSpread$
|
|
29171
|
+
pagination: _objectSpread$B({
|
|
29128
29172
|
current: 1,
|
|
29129
29173
|
pageSize: 20,
|
|
29130
29174
|
total: 0,
|
|
@@ -29133,7 +29177,7 @@ function useTableData (_ref) {
|
|
|
29133
29177
|
selected: [],
|
|
29134
29178
|
canDelete: !!apiHandler.canDelete,
|
|
29135
29179
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
29136
|
-
mappingData: _objectSpread$
|
|
29180
|
+
mappingData: _objectSpread$B(_objectSpread$B({}, parentData), {}, {
|
|
29137
29181
|
prefilter: {
|
|
29138
29182
|
select: globalFilter.select
|
|
29139
29183
|
},
|
|
@@ -29144,7 +29188,7 @@ function useTableData (_ref) {
|
|
|
29144
29188
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
29145
29189
|
state = _useState14[0],
|
|
29146
29190
|
setState = _useState14[1];
|
|
29147
|
-
var mappingData = _objectSpread$
|
|
29191
|
+
var mappingData = _objectSpread$B(_objectSpread$B(_objectSpread$B({}, parentData), state.data), {}, {
|
|
29148
29192
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
29149
29193
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
29150
29194
|
});
|
|
@@ -29183,7 +29227,7 @@ function useTableData (_ref) {
|
|
|
29183
29227
|
}
|
|
29184
29228
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
29185
29229
|
var newInitData = initData;
|
|
29186
|
-
var newState = _objectSpread$
|
|
29230
|
+
var newState = _objectSpread$B({}, state);
|
|
29187
29231
|
var selected = [];
|
|
29188
29232
|
if (configuration.deselectOnUpdate == false) {
|
|
29189
29233
|
selected = state.selected;
|
|
@@ -29200,7 +29244,7 @@ function useTableData (_ref) {
|
|
|
29200
29244
|
dataRow: dataRow
|
|
29201
29245
|
}),
|
|
29202
29246
|
_data = _updateData.data;
|
|
29203
|
-
newState = _objectSpread$
|
|
29247
|
+
newState = _objectSpread$B(_objectSpread$B({}, newState), {}, {
|
|
29204
29248
|
data: _data,
|
|
29205
29249
|
selected: selected
|
|
29206
29250
|
});
|
|
@@ -29212,8 +29256,8 @@ function useTableData (_ref) {
|
|
|
29212
29256
|
dataRow: dataRow
|
|
29213
29257
|
}),
|
|
29214
29258
|
nextInitData = _updateData2.data;
|
|
29215
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
29216
|
-
filters: _objectSpread$
|
|
29259
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, filterData), {}, {
|
|
29260
|
+
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
29261
|
}, 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
29262
|
genericProps: globalFilter.toggle
|
|
29219
29263
|
} : undefined), {}, {
|
|
@@ -29223,7 +29267,7 @@ function useTableData (_ref) {
|
|
|
29223
29267
|
_data2 = _applyFilterAndSortat.data,
|
|
29224
29268
|
pagination = _applyFilterAndSortat.pagination;
|
|
29225
29269
|
newInitData = nextInitData;
|
|
29226
|
-
newState = _objectSpread$
|
|
29270
|
+
newState = _objectSpread$B(_objectSpread$B({}, newState), {}, {
|
|
29227
29271
|
pagination: pagination,
|
|
29228
29272
|
data: _data2,
|
|
29229
29273
|
selected: selected
|
|
@@ -29233,8 +29277,8 @@ function useTableData (_ref) {
|
|
|
29233
29277
|
if (apiHandler.canCreate) {
|
|
29234
29278
|
apiCreate(data).then(function (res) {
|
|
29235
29279
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
29236
|
-
initData && setInitData(_objectSpread$
|
|
29237
|
-
setState(_objectSpread$
|
|
29280
|
+
initData && setInitData(_objectSpread$B({}, initData));
|
|
29281
|
+
setState(_objectSpread$B({}, state));
|
|
29238
29282
|
}
|
|
29239
29283
|
});
|
|
29240
29284
|
}
|
|
@@ -29247,7 +29291,7 @@ function useTableData (_ref) {
|
|
|
29247
29291
|
var triggerRefresh = function triggerRefresh() {
|
|
29248
29292
|
var _configuration$filter8;
|
|
29249
29293
|
setError(undefined);
|
|
29250
|
-
var newGlobalFilter = _objectSpread$
|
|
29294
|
+
var newGlobalFilter = _objectSpread$B({}, globalFilter);
|
|
29251
29295
|
//on refresh update default filter, since global value can change
|
|
29252
29296
|
if ((_configuration$filter8 = configuration.filter) !== null && _configuration$filter8 !== void 0 && _configuration$filter8["default"]) {
|
|
29253
29297
|
var _configuration$filter9;
|
|
@@ -29258,7 +29302,7 @@ function useTableData (_ref) {
|
|
|
29258
29302
|
newGlobalFilter["default"] = _defaultFilter;
|
|
29259
29303
|
setGlobaFilter(newGlobalFilter);
|
|
29260
29304
|
}
|
|
29261
|
-
onChange(_objectSpread$
|
|
29305
|
+
onChange(_objectSpread$B({
|
|
29262
29306
|
pagination: state.pagination
|
|
29263
29307
|
}, filterData), newGlobalFilter, true);
|
|
29264
29308
|
};
|
|
@@ -29276,7 +29320,7 @@ function useTableData (_ref) {
|
|
|
29276
29320
|
order: c.defaultSortOrder
|
|
29277
29321
|
};
|
|
29278
29322
|
});
|
|
29279
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
29323
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29280
29324
|
loading: false
|
|
29281
29325
|
}));else {
|
|
29282
29326
|
onChange({
|
|
@@ -29319,7 +29363,7 @@ function useTableData (_ref) {
|
|
|
29319
29363
|
case 0:
|
|
29320
29364
|
filters = {};
|
|
29321
29365
|
filters['_id'] = [id, 'eq', false];
|
|
29322
|
-
ssf = _objectSpread$
|
|
29366
|
+
ssf = _objectSpread$B({
|
|
29323
29367
|
pagination: {
|
|
29324
29368
|
current: 1,
|
|
29325
29369
|
pageSize: 1
|
|
@@ -29330,7 +29374,7 @@ function useTableData (_ref) {
|
|
|
29330
29374
|
genericProps: globalFilter.toggle
|
|
29331
29375
|
} : undefined);
|
|
29332
29376
|
_context2.next = 5;
|
|
29333
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
29377
|
+
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), ssf);
|
|
29334
29378
|
case 5:
|
|
29335
29379
|
data = _context2.sent;
|
|
29336
29380
|
return _context2.abrupt("return", data);
|
|
@@ -29374,12 +29418,12 @@ function useTableData (_ref) {
|
|
|
29374
29418
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
29375
29419
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
29376
29420
|
overwriteMappingData = _args3.length > 4 ? _args3[4] : undefined;
|
|
29377
|
-
setState(_objectSpread$
|
|
29421
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29378
29422
|
mappingData: overwriteMappingData !== null && overwriteMappingData !== void 0 ? overwriteMappingData : state.mappingData,
|
|
29379
29423
|
loading: true
|
|
29380
29424
|
}));
|
|
29381
29425
|
currentData = initData;
|
|
29382
|
-
filterData = _objectSpread$
|
|
29426
|
+
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
29427
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
|
|
29384
29428
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
29385
29429
|
_ref7[0];
|
|
@@ -29387,7 +29431,7 @@ function useTableData (_ref) {
|
|
|
29387
29431
|
return v != null;
|
|
29388
29432
|
}));
|
|
29389
29433
|
currentFilterHash = objectHash(filterData);
|
|
29390
|
-
currentPagination = _objectSpread$
|
|
29434
|
+
currentPagination = _objectSpread$B(_objectSpread$B({}, p.pagination), {}, {
|
|
29391
29435
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
29392
29436
|
});
|
|
29393
29437
|
filterHash.current = currentFilterHash;
|
|
@@ -29395,7 +29439,7 @@ function useTableData (_ref) {
|
|
|
29395
29439
|
_context3.next = 21;
|
|
29396
29440
|
break;
|
|
29397
29441
|
}
|
|
29398
|
-
ssf = _objectSpread$
|
|
29442
|
+
ssf = _objectSpread$B({
|
|
29399
29443
|
pagination: currentPagination,
|
|
29400
29444
|
columns: configuration.columns,
|
|
29401
29445
|
filters: filterData,
|
|
@@ -29404,12 +29448,12 @@ function useTableData (_ref) {
|
|
|
29404
29448
|
genericProps: prefilter.toggle
|
|
29405
29449
|
} : undefined);
|
|
29406
29450
|
_context3.next = 15;
|
|
29407
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
29451
|
+
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
29452
|
case 15:
|
|
29409
29453
|
data = _context3.sent;
|
|
29410
|
-
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, _objectSpread$
|
|
29454
|
+
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, _objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), ssf);
|
|
29411
29455
|
currentData = data.data;
|
|
29412
|
-
currentPagination = _objectSpread$
|
|
29456
|
+
currentPagination = _objectSpread$B(_objectSpread$B({}, currentPagination), {}, {
|
|
29413
29457
|
total: data.total
|
|
29414
29458
|
});
|
|
29415
29459
|
_context3.next = 30;
|
|
@@ -29426,7 +29470,7 @@ function useTableData (_ref) {
|
|
|
29426
29470
|
currentData = _data3.data;
|
|
29427
29471
|
setInitData(currentData);
|
|
29428
29472
|
case 27:
|
|
29429
|
-
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$
|
|
29473
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$B(_objectSpread$B({}, p), {}, {
|
|
29430
29474
|
pagination: currentPagination,
|
|
29431
29475
|
filters: filterData,
|
|
29432
29476
|
data: currentData,
|
|
@@ -29435,11 +29479,11 @@ function useTableData (_ref) {
|
|
|
29435
29479
|
currentData = _data4;
|
|
29436
29480
|
currentPagination = pagination;
|
|
29437
29481
|
case 30:
|
|
29438
|
-
setState(_objectSpread$
|
|
29482
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29439
29483
|
loading: false,
|
|
29440
29484
|
data: currentData,
|
|
29441
29485
|
pagination: currentPagination,
|
|
29442
|
-
mappingData: _objectSpread$
|
|
29486
|
+
mappingData: _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, parentData), state.mappingData), overwriteMappingData), {}, {
|
|
29443
29487
|
prefilter: prefilter
|
|
29444
29488
|
}),
|
|
29445
29489
|
currentFetchUrl: currentUrl
|
|
@@ -29461,7 +29505,7 @@ function useTableData (_ref) {
|
|
|
29461
29505
|
};
|
|
29462
29506
|
}();
|
|
29463
29507
|
var onSelect = function onSelect(keys) {
|
|
29464
|
-
setState(_objectSpread$
|
|
29508
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29465
29509
|
selected: keys
|
|
29466
29510
|
}));
|
|
29467
29511
|
};
|
|
@@ -29472,7 +29516,7 @@ function useTableData (_ref) {
|
|
|
29472
29516
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
29473
29517
|
while (1) switch (_context5.prev = _context5.next) {
|
|
29474
29518
|
case 0:
|
|
29475
|
-
setState(_objectSpread$
|
|
29519
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29476
29520
|
deleting: true
|
|
29477
29521
|
}));
|
|
29478
29522
|
newData = _toConsumableArray(state.data);
|
|
@@ -29512,7 +29556,7 @@ function useTableData (_ref) {
|
|
|
29512
29556
|
} finally {
|
|
29513
29557
|
_iterator.f();
|
|
29514
29558
|
}
|
|
29515
|
-
mappingData = _objectSpread$
|
|
29559
|
+
mappingData = _objectSpread$B(_objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), mapToggle);
|
|
29516
29560
|
deleteResult = undefined;
|
|
29517
29561
|
_context4.prev = 7;
|
|
29518
29562
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -29602,12 +29646,12 @@ function useTableData (_ref) {
|
|
|
29602
29646
|
break;
|
|
29603
29647
|
}
|
|
29604
29648
|
_context5.next = 25;
|
|
29605
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
29606
|
-
pagination: _objectSpread$
|
|
29649
|
+
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), _objectSpread$B({
|
|
29650
|
+
pagination: _objectSpread$B(_objectSpread$B({}, state.pagination), {}, {
|
|
29607
29651
|
current: current
|
|
29608
29652
|
}),
|
|
29609
29653
|
columns: configuration.columns,
|
|
29610
|
-
filters: _objectSpread$
|
|
29654
|
+
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
29655
|
sorter: filterData.sorter
|
|
29612
29656
|
}, 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
29657
|
genericProps: globalFilter.toggle
|
|
@@ -29618,11 +29662,11 @@ function useTableData (_ref) {
|
|
|
29618
29662
|
total = data.total;
|
|
29619
29663
|
case 28:
|
|
29620
29664
|
setInitData(newInitData);
|
|
29621
|
-
setState(_objectSpread$
|
|
29665
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29622
29666
|
selected: [],
|
|
29623
29667
|
deleting: false,
|
|
29624
29668
|
data: newData,
|
|
29625
|
-
pagination: _objectSpread$
|
|
29669
|
+
pagination: _objectSpread$B(_objectSpread$B({}, state.pagination), {}, {
|
|
29626
29670
|
current: current === 0 ? 1 : current,
|
|
29627
29671
|
total: total
|
|
29628
29672
|
})
|
|
@@ -29643,14 +29687,14 @@ function useTableData (_ref) {
|
|
|
29643
29687
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
29644
29688
|
return;
|
|
29645
29689
|
}
|
|
29646
|
-
var newGlobalFilter = _objectSpread$
|
|
29690
|
+
var newGlobalFilter = _objectSpread$B({}, globalFilter);
|
|
29647
29691
|
if (value !== null && value !== void 0 && value.length) {
|
|
29648
29692
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
29649
29693
|
} else {
|
|
29650
29694
|
newGlobalFilter.select = {};
|
|
29651
29695
|
}
|
|
29652
29696
|
setGlobaFilter(newGlobalFilter);
|
|
29653
|
-
onChange(_objectSpread$
|
|
29697
|
+
onChange(_objectSpread$B({
|
|
29654
29698
|
pagination: state.pagination
|
|
29655
29699
|
}, filterData), newGlobalFilter);
|
|
29656
29700
|
};
|
|
@@ -29661,16 +29705,16 @@ function useTableData (_ref) {
|
|
|
29661
29705
|
return;
|
|
29662
29706
|
}
|
|
29663
29707
|
var toggleFilter = {};
|
|
29664
|
-
var mappingData = _objectSpread$
|
|
29708
|
+
var mappingData = _objectSpread$B({}, state.mappingData);
|
|
29665
29709
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
29666
29710
|
mappingData[f] = !globalFilter.toggle && configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : undefined;
|
|
29667
29711
|
toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
29668
29712
|
});
|
|
29669
|
-
var newGlobalFilter = _objectSpread$
|
|
29713
|
+
var newGlobalFilter = _objectSpread$B(_objectSpread$B({}, globalFilter), {}, {
|
|
29670
29714
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
29671
29715
|
});
|
|
29672
29716
|
setGlobaFilter(newGlobalFilter);
|
|
29673
|
-
onChange(_objectSpread$
|
|
29717
|
+
onChange(_objectSpread$B({
|
|
29674
29718
|
pagination: state.pagination
|
|
29675
29719
|
}, filterData), newGlobalFilter, true, true, mappingData);
|
|
29676
29720
|
};
|
|
@@ -29683,7 +29727,7 @@ function useTableData (_ref) {
|
|
|
29683
29727
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
29684
29728
|
return;
|
|
29685
29729
|
}
|
|
29686
|
-
var newGlobalFilter = _objectSpread$
|
|
29730
|
+
var newGlobalFilter = _objectSpread$B(_objectSpread$B({}, globalFilter), {}, {
|
|
29687
29731
|
search: {}
|
|
29688
29732
|
});
|
|
29689
29733
|
if (value) {
|
|
@@ -29697,7 +29741,7 @@ function useTableData (_ref) {
|
|
|
29697
29741
|
});
|
|
29698
29742
|
}
|
|
29699
29743
|
setGlobaFilter(newGlobalFilter);
|
|
29700
|
-
onChange(_objectSpread$
|
|
29744
|
+
onChange(_objectSpread$B({
|
|
29701
29745
|
pagination: state.pagination
|
|
29702
29746
|
}, filterData), newGlobalFilter);
|
|
29703
29747
|
};
|
|
@@ -29707,20 +29751,20 @@ function useTableData (_ref) {
|
|
|
29707
29751
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
29708
29752
|
return;
|
|
29709
29753
|
}
|
|
29710
|
-
var newGlobalFilter = _objectSpread$
|
|
29754
|
+
var newGlobalFilter = _objectSpread$B({}, globalFilter);
|
|
29711
29755
|
newGlobalFilter.timeStamp = {
|
|
29712
29756
|
fromTimeStamp: [from],
|
|
29713
29757
|
toTimeStamp: [to]
|
|
29714
29758
|
};
|
|
29715
29759
|
if (!configuration.filter.period.onlyAsMappingData) setGlobaFilter(newGlobalFilter);
|
|
29716
|
-
onChange(_objectSpread$
|
|
29760
|
+
onChange(_objectSpread$B({
|
|
29717
29761
|
pagination: state.pagination
|
|
29718
|
-
}, filterData), undefined, true, undefined, _objectSpread$
|
|
29762
|
+
}, filterData), undefined, true, undefined, _objectSpread$B(_objectSpread$B({}, state.mappingData), {}, {
|
|
29719
29763
|
from: from,
|
|
29720
29764
|
to: to
|
|
29721
29765
|
}));
|
|
29722
29766
|
};
|
|
29723
|
-
return _objectSpread$
|
|
29767
|
+
return _objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29724
29768
|
title: title,
|
|
29725
29769
|
configuration: configuration,
|
|
29726
29770
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -29762,8 +29806,8 @@ function StandardTable (_ref) {
|
|
|
29762
29806
|
});
|
|
29763
29807
|
}
|
|
29764
29808
|
|
|
29765
|
-
function ownKeys$
|
|
29766
|
-
function _objectSpread$
|
|
29809
|
+
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; }
|
|
29810
|
+
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
29811
|
function Table (props) {
|
|
29768
29812
|
var root = useStore();
|
|
29769
29813
|
var variant = useMemo(function () {
|
|
@@ -29771,15 +29815,15 @@ function Table (props) {
|
|
|
29771
29815
|
return config.variant;
|
|
29772
29816
|
}, [props.id]);
|
|
29773
29817
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
29774
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
29818
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$A({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$A({}, props))]
|
|
29775
29819
|
});
|
|
29776
29820
|
}
|
|
29777
29821
|
|
|
29778
29822
|
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
29823
|
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
29824
|
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$
|
|
29825
|
+
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; }
|
|
29826
|
+
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
29827
|
function useAGGrid (_ref) {
|
|
29784
29828
|
var id = _ref.id,
|
|
29785
29829
|
filter = _ref.filter,
|
|
@@ -29873,7 +29917,7 @@ function useAGGrid (_ref) {
|
|
|
29873
29917
|
value = _ref3[1];
|
|
29874
29918
|
if (_idx == 0) {
|
|
29875
29919
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
29876
|
-
rdat.push(_objectSpread$
|
|
29920
|
+
rdat.push(_objectSpread$z(_objectSpread$z({}, rd), {}, {
|
|
29877
29921
|
grouping: [idx.toString()]
|
|
29878
29922
|
}));
|
|
29879
29923
|
var sp = key.split(':');
|
|
@@ -30016,8 +30060,8 @@ var value = "value-FCA-6";
|
|
|
30016
30060
|
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
30061
|
styleInject(css_248z$k);
|
|
30018
30062
|
|
|
30019
|
-
function ownKeys$
|
|
30020
|
-
function _objectSpread$
|
|
30063
|
+
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; }
|
|
30064
|
+
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
30065
|
var AGChart = function AGChart(_ref) {
|
|
30022
30066
|
var data = _ref.data;
|
|
30023
30067
|
var groupedData = [];
|
|
@@ -30025,11 +30069,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
30025
30069
|
data.forEach(function (dt) {
|
|
30026
30070
|
if (dt.count == 0) return;
|
|
30027
30071
|
if (groupedData.length > dt.grouping[0]) {
|
|
30028
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
30072
|
+
groupedData[dt.grouping[0]].push(_objectSpread$y(_objectSpread$y({}, dt), {}, {
|
|
30029
30073
|
count: Number(dt.count)
|
|
30030
30074
|
}));
|
|
30031
30075
|
} else {
|
|
30032
|
-
groupedData.push([_objectSpread$
|
|
30076
|
+
groupedData.push([_objectSpread$y(_objectSpread$y({}, dt), {}, {
|
|
30033
30077
|
count: Number(dt.count)
|
|
30034
30078
|
})]);
|
|
30035
30079
|
}
|
|
@@ -30070,8 +30114,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
30070
30114
|
});
|
|
30071
30115
|
};
|
|
30072
30116
|
|
|
30073
|
-
function ownKeys$
|
|
30074
|
-
function _objectSpread$
|
|
30117
|
+
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; }
|
|
30118
|
+
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
30119
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
30076
30120
|
var id = _ref.id,
|
|
30077
30121
|
filter = _ref.filter,
|
|
@@ -30164,7 +30208,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
30164
30208
|
});
|
|
30165
30209
|
});
|
|
30166
30210
|
}
|
|
30167
|
-
return _objectSpread$
|
|
30211
|
+
return _objectSpread$x(_objectSpread$x({}, column), {}, {
|
|
30168
30212
|
cellRenderer: renderer
|
|
30169
30213
|
});
|
|
30170
30214
|
});
|
|
@@ -30434,8 +30478,8 @@ var CustomText = function CustomText(_ref) {
|
|
|
30434
30478
|
};
|
|
30435
30479
|
var CustomText$1 = observer(CustomText);
|
|
30436
30480
|
|
|
30437
|
-
function ownKeys$
|
|
30438
|
-
function _objectSpread$
|
|
30481
|
+
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; }
|
|
30482
|
+
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
30483
|
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
30484
|
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
30485
|
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 +30542,7 @@ function useFilterBoxData (id) {
|
|
|
30498
30542
|
} finally {
|
|
30499
30543
|
_iterator.f();
|
|
30500
30544
|
}
|
|
30501
|
-
return _objectSpread$
|
|
30545
|
+
return _objectSpread$w(_objectSpread$w({}, state), ob);
|
|
30502
30546
|
}
|
|
30503
30547
|
return {
|
|
30504
30548
|
configuration: configuration,
|
|
@@ -30512,8 +30556,8 @@ function useFilterBoxData (id) {
|
|
|
30512
30556
|
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
30557
|
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
30558
|
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$
|
|
30559
|
+
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; }
|
|
30560
|
+
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
30561
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
30518
30562
|
var id = _ref.id,
|
|
30519
30563
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -30541,7 +30585,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
30541
30585
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
30542
30586
|
mode: "single",
|
|
30543
30587
|
apiInterface: filter.requestOptions,
|
|
30544
|
-
wholeData: _objectSpread$
|
|
30588
|
+
wholeData: _objectSpread$v(_objectSpread$v({}, state.filter), {}, {
|
|
30545
30589
|
tab: tab
|
|
30546
30590
|
}),
|
|
30547
30591
|
mapping: filter.requestMapping,
|
|
@@ -30773,8 +30817,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
30773
30817
|
return false;
|
|
30774
30818
|
});
|
|
30775
30819
|
|
|
30776
|
-
function ownKeys$
|
|
30777
|
-
function _objectSpread$
|
|
30820
|
+
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; }
|
|
30821
|
+
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
30822
|
function useUIBuilderData (id) {
|
|
30779
30823
|
var save = undefined;
|
|
30780
30824
|
var root = useStore();
|
|
@@ -30806,7 +30850,7 @@ function useUIBuilderData (id) {
|
|
|
30806
30850
|
var configuration = _useMemo.configuration;
|
|
30807
30851
|
useEffect(function () {
|
|
30808
30852
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
30809
|
-
return setFilter(_objectSpread$
|
|
30853
|
+
return setFilter(_objectSpread$u(_objectSpread$u({}, filter), {}, {
|
|
30810
30854
|
sessionGuid: res
|
|
30811
30855
|
}));
|
|
30812
30856
|
});
|
|
@@ -30829,8 +30873,8 @@ function useUIBuilderData (id) {
|
|
|
30829
30873
|
};
|
|
30830
30874
|
}
|
|
30831
30875
|
|
|
30832
|
-
function ownKeys$
|
|
30833
|
-
function _objectSpread$
|
|
30876
|
+
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; }
|
|
30877
|
+
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
30878
|
function UIBuilder(_ref) {
|
|
30835
30879
|
var id = _ref.id;
|
|
30836
30880
|
var state = useUIBuilderData(id);
|
|
@@ -30857,7 +30901,7 @@ function UIBuilder(_ref) {
|
|
|
30857
30901
|
override = {
|
|
30858
30902
|
value: newFilter[item.field],
|
|
30859
30903
|
setValue: function setValue(newVal) {
|
|
30860
|
-
var newFilter = _objectSpread$
|
|
30904
|
+
var newFilter = _objectSpread$t({}, state.filter);
|
|
30861
30905
|
newFilter[item.field] = newVal;
|
|
30862
30906
|
state.setFilter(newFilter);
|
|
30863
30907
|
}
|
|
@@ -30905,7 +30949,7 @@ function UIBuilder(_ref) {
|
|
|
30905
30949
|
case 'AGGrid':
|
|
30906
30950
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
30907
30951
|
id: item.id,
|
|
30908
|
-
filter: _objectSpread$
|
|
30952
|
+
filter: _objectSpread$t({
|
|
30909
30953
|
optionCodices: JSON.stringify(state.data)
|
|
30910
30954
|
}, state.filter),
|
|
30911
30955
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -31065,8 +31109,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
31065
31109
|
};
|
|
31066
31110
|
var OrgItem$1 = observer(OrgItem);
|
|
31067
31111
|
|
|
31068
|
-
function ownKeys$
|
|
31069
|
-
function _objectSpread$
|
|
31112
|
+
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; }
|
|
31113
|
+
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
31114
|
function useTransformJson (_ref) {
|
|
31071
31115
|
var id = _ref.id;
|
|
31072
31116
|
var _useState = useState(),
|
|
@@ -31132,7 +31176,7 @@ function useTransformJson (_ref) {
|
|
|
31132
31176
|
}();
|
|
31133
31177
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
31134
31178
|
var _data$children;
|
|
31135
|
-
return _objectSpread$
|
|
31179
|
+
return _objectSpread$s(_objectSpread$s({}, data), {}, {
|
|
31136
31180
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
31137
31181
|
data: data,
|
|
31138
31182
|
configuration: configuration,
|
|
@@ -31793,8 +31837,8 @@ function useCatalogEditor (id) {
|
|
|
31793
31837
|
};
|
|
31794
31838
|
}
|
|
31795
31839
|
|
|
31796
|
-
function ownKeys$
|
|
31797
|
-
function _objectSpread$
|
|
31840
|
+
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; }
|
|
31841
|
+
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
31842
|
function DragDropUpload(_ref) {
|
|
31799
31843
|
var api2Params = _ref.api2Params,
|
|
31800
31844
|
catalogId = _ref.catalogId,
|
|
@@ -31902,7 +31946,7 @@ function DragDropUpload(_ref) {
|
|
|
31902
31946
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
31903
31947
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
31904
31948
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
31905
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
31949
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$r(_objectSpread$r({}, props), {}, {
|
|
31906
31950
|
children: [/*#__PURE__*/jsx("p", {
|
|
31907
31951
|
className: "ant-upload-drag-icon",
|
|
31908
31952
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -32119,12 +32163,12 @@ function CatalogEditor(_ref) {
|
|
|
32119
32163
|
}
|
|
32120
32164
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
32121
32165
|
|
|
32122
|
-
function ownKeys$
|
|
32123
|
-
function _objectSpread$
|
|
32166
|
+
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; }
|
|
32167
|
+
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
32168
|
var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(props, ref) {
|
|
32125
32169
|
var _root$contentStore$bo, _root$contentStore$ri;
|
|
32126
32170
|
var root = useStore();
|
|
32127
|
-
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$
|
|
32171
|
+
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$q(_objectSpread$q({}, props), {}, {
|
|
32128
32172
|
ref: ref,
|
|
32129
32173
|
darkMode: root.contentStore.theme == 'darkmode',
|
|
32130
32174
|
jwt: root.dataStore.jwt,
|
|
@@ -32135,8 +32179,8 @@ var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(pro
|
|
|
32135
32179
|
});
|
|
32136
32180
|
var Spreadsheet = observer(SpreadsheetWrapper);
|
|
32137
32181
|
|
|
32138
|
-
function ownKeys$
|
|
32139
|
-
function _objectSpread$
|
|
32182
|
+
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; }
|
|
32183
|
+
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
32184
|
|
|
32141
32185
|
// Type definition for the context state
|
|
32142
32186
|
|
|
@@ -32158,14 +32202,14 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
32158
32202
|
loading: loading,
|
|
32159
32203
|
setOptions: function setOptions(options) {
|
|
32160
32204
|
var state = root.contextStore.getContext('enricher');
|
|
32161
|
-
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$
|
|
32205
|
+
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$p(_objectSpread$p({}, state[stateKey]), {}, {
|
|
32162
32206
|
options: options,
|
|
32163
32207
|
loading: false
|
|
32164
32208
|
})));
|
|
32165
32209
|
},
|
|
32166
32210
|
setLoading: function setLoading(loading) {
|
|
32167
32211
|
var state = root.contextStore.getContext('enricher');
|
|
32168
|
-
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$
|
|
32212
|
+
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$p(_objectSpread$p({}, state[stateKey]), {}, {
|
|
32169
32213
|
loading: loading
|
|
32170
32214
|
})));
|
|
32171
32215
|
}
|
|
@@ -32270,7 +32314,7 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
32270
32314
|
}, [urlPackageId, getContext().packageId, setSelectedPackage]);
|
|
32271
32315
|
|
|
32272
32316
|
// Return context + handlers
|
|
32273
|
-
return _objectSpread$
|
|
32317
|
+
return _objectSpread$p(_objectSpread$p({}, getContext()), {}, {
|
|
32274
32318
|
setSelectedSerie: setSelectedSerie,
|
|
32275
32319
|
setSelectedItem: setSelectedItem,
|
|
32276
32320
|
setSelectedFeature: setSelectedFeature,
|
|
@@ -32619,8 +32663,8 @@ function createTranslatedColumnConfig(field, headerName, languages) {
|
|
|
32619
32663
|
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
32664
|
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
32665
|
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$
|
|
32666
|
+
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; }
|
|
32667
|
+
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
32668
|
|
|
32625
32669
|
/**
|
|
32626
32670
|
* Props for the useTools hook
|
|
@@ -32656,7 +32700,7 @@ var useTools = function useTools(_ref) {
|
|
|
32656
32700
|
conditionalTools = _ref.conditionalTools;
|
|
32657
32701
|
var root = useStore();
|
|
32658
32702
|
var createTool = function createTool(tool) {
|
|
32659
|
-
return _objectSpread$
|
|
32703
|
+
return _objectSpread$o({
|
|
32660
32704
|
startWidth: 600,
|
|
32661
32705
|
defaultPinned: true,
|
|
32662
32706
|
defaultOpen: false
|
|
@@ -32690,12 +32734,12 @@ var useTools = function useTools(_ref) {
|
|
|
32690
32734
|
name: 'Konfigurator',
|
|
32691
32735
|
type: 'Configurator',
|
|
32692
32736
|
where: 'right',
|
|
32693
|
-
parameters: _objectSpread$
|
|
32737
|
+
parameters: _objectSpread$o({
|
|
32694
32738
|
catalogId: catalogId,
|
|
32695
32739
|
packageId: packageId,
|
|
32696
32740
|
isIDMData: !isApi2 ? '1' : undefined
|
|
32697
32741
|
}, parameters),
|
|
32698
|
-
elementProps: catalogId ? _objectSpread$
|
|
32742
|
+
elementProps: catalogId ? _objectSpread$o({
|
|
32699
32743
|
// open configurator for idm catalog
|
|
32700
32744
|
useIDMService: true,
|
|
32701
32745
|
catalogId: catalogId,
|
|
@@ -32709,7 +32753,7 @@ var useTools = function useTools(_ref) {
|
|
|
32709
32753
|
// open configurator for api2 package (configurator light)
|
|
32710
32754
|
loadMask: true,
|
|
32711
32755
|
initItem: item === null || item === void 0 ? void 0 : item.typeNo
|
|
32712
|
-
} : _objectSpread$
|
|
32756
|
+
} : _objectSpread$o({
|
|
32713
32757
|
// open configurator for idm package
|
|
32714
32758
|
useEnricherService: true,
|
|
32715
32759
|
loadPackage: true,
|
|
@@ -35190,8 +35234,8 @@ function getConfig(t) {
|
|
|
35190
35234
|
};
|
|
35191
35235
|
}
|
|
35192
35236
|
|
|
35193
|
-
function ownKeys$
|
|
35194
|
-
function _objectSpread$
|
|
35237
|
+
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; }
|
|
35238
|
+
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
35239
|
var ExclusivitySerie = function ExclusivitySerie() {
|
|
35196
35240
|
var _useTranslation = useTranslation(),
|
|
35197
35241
|
t = _useTranslation.t,
|
|
@@ -35329,7 +35373,7 @@ var ExclusivityTable = observer(function (_ref) {
|
|
|
35329
35373
|
if (type === 'eitems' && !selectedSerie) {
|
|
35330
35374
|
return oldDataRef.current;
|
|
35331
35375
|
}
|
|
35332
|
-
var newData = _objectSpread$
|
|
35376
|
+
var newData = _objectSpread$n(_objectSpread$n({}, baseApplicationData), {}, {
|
|
35333
35377
|
subTypeId: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id
|
|
35334
35378
|
});
|
|
35335
35379
|
oldDataRef.current = newData;
|
|
@@ -35777,8 +35821,8 @@ var isDefaultValue = function isDefaultValue(value, type) {
|
|
|
35777
35821
|
return value === getDefaultValue(type);
|
|
35778
35822
|
};
|
|
35779
35823
|
|
|
35780
|
-
function ownKeys$
|
|
35781
|
-
function _objectSpread$
|
|
35824
|
+
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; }
|
|
35825
|
+
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
35826
|
/**
|
|
35783
35827
|
* Custom hook to manage price factor state and logic
|
|
35784
35828
|
* @param props - Hook configuration
|
|
@@ -35815,7 +35859,7 @@ function usePriceFactor(_ref) {
|
|
|
35815
35859
|
var updateEntries = function updateEntries(newTypeEntries) {
|
|
35816
35860
|
setHasChangedCurrentType(true);
|
|
35817
35861
|
setEntries(function (prev) {
|
|
35818
|
-
return _objectSpread$
|
|
35862
|
+
return _objectSpread$m(_objectSpread$m({}, prev), {}, _defineProperty(_defineProperty({}, type, newTypeEntries), type === 'factor' ? 'discount' : 'factor', []));
|
|
35819
35863
|
});
|
|
35820
35864
|
};
|
|
35821
35865
|
var handleModalOpen = useCallback(function () {
|
|
@@ -35852,7 +35896,7 @@ function usePriceFactor(_ref) {
|
|
|
35852
35896
|
// Always ensure at least one entry when switching types
|
|
35853
35897
|
var newEntries = hasChangedCurrentType ? [] : entries[newType];
|
|
35854
35898
|
setEntries(function (prev) {
|
|
35855
|
-
return _objectSpread$
|
|
35899
|
+
return _objectSpread$m(_objectSpread$m({}, prev), {}, _defineProperty({}, newType, newEntries.length > 0 ? newEntries : [{
|
|
35856
35900
|
value: getDefaultValue(newType),
|
|
35857
35901
|
isValid: true
|
|
35858
35902
|
}]));
|
|
@@ -36288,8 +36332,8 @@ var css_248z$d = ".input-leHam {\n position: relative;\n width: 200px;\n heig
|
|
|
36288
36332
|
styleInject(css_248z$d);
|
|
36289
36333
|
|
|
36290
36334
|
var _excluded$5 = ["onSave", "value"];
|
|
36291
|
-
function ownKeys$
|
|
36292
|
-
function _objectSpread$
|
|
36335
|
+
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; }
|
|
36336
|
+
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
36337
|
function PriceFactorInput(_ref) {
|
|
36294
36338
|
var _onSave = _ref.onSave,
|
|
36295
36339
|
value = _ref.value,
|
|
@@ -36305,7 +36349,7 @@ function PriceFactorInput(_ref) {
|
|
|
36305
36349
|
title: props.tooltip,
|
|
36306
36350
|
children: /*#__PURE__*/jsx("div", {
|
|
36307
36351
|
className: classnames(input, 'price-factor-input', props.className, _defineProperty({}, disabled$1, props.disabled)),
|
|
36308
|
-
children: /*#__PURE__*/jsx(PriceFactorCellRenderer, _objectSpread$
|
|
36352
|
+
children: /*#__PURE__*/jsx(PriceFactorCellRenderer, _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
36309
36353
|
isNotInAGGrid: true,
|
|
36310
36354
|
value: innerValue,
|
|
36311
36355
|
onSave: function onSave(data, value) {
|
|
@@ -36381,8 +36425,8 @@ function Setting(_ref) {
|
|
|
36381
36425
|
});
|
|
36382
36426
|
}
|
|
36383
36427
|
|
|
36384
|
-
function ownKeys$
|
|
36385
|
-
function _objectSpread$
|
|
36428
|
+
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; }
|
|
36429
|
+
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
36430
|
var Prices = observer(function (_ref) {
|
|
36387
36431
|
var _pricelist$seriePrice;
|
|
36388
36432
|
var organizationId = _ref.organizationId,
|
|
@@ -36405,8 +36449,8 @@ var Prices = observer(function (_ref) {
|
|
|
36405
36449
|
if (!selectedSerie) return;
|
|
36406
36450
|
|
|
36407
36451
|
// Create copies of the objects to modify
|
|
36408
|
-
var newFactors = _objectSpread$
|
|
36409
|
-
var serieFactors = _objectSpread$
|
|
36452
|
+
var newFactors = _objectSpread$k({}, pricelist.pfgPricefactors);
|
|
36453
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
36410
36454
|
if (value.length === 0) {
|
|
36411
36455
|
// Remove the empty price feature group
|
|
36412
36456
|
delete serieFactors[priceFeatureGroupItem];
|
|
@@ -36437,7 +36481,7 @@ var Prices = observer(function (_ref) {
|
|
|
36437
36481
|
var updatePfgPriority = useCallback(function (priceFeatureGroupItem, value) {
|
|
36438
36482
|
var _newPriority$selected;
|
|
36439
36483
|
if (!selectedSerie) return;
|
|
36440
|
-
var newPriority = _objectSpread$
|
|
36484
|
+
var newPriority = _objectSpread$k({}, pricelist.pfgPricefactorsPriority);
|
|
36441
36485
|
var seriesPriority = new Set((_newPriority$selected = newPriority[selectedSerie.serieNo]) !== null && _newPriority$selected !== void 0 ? _newPriority$selected : []);
|
|
36442
36486
|
if (value === true) {
|
|
36443
36487
|
seriesPriority.add(priceFeatureGroupItem);
|
|
@@ -36456,7 +36500,7 @@ var Prices = observer(function (_ref) {
|
|
|
36456
36500
|
var updatePgPriority = useCallback(function (priceFeatureGroupItem, value) {
|
|
36457
36501
|
var _newPriority$selected2;
|
|
36458
36502
|
if (!selectedSerie) return;
|
|
36459
|
-
var newPriority = _objectSpread$
|
|
36503
|
+
var newPriority = _objectSpread$k({}, pricelist.pgPricefactorsPriority);
|
|
36460
36504
|
var seriesPriority = new Set((_newPriority$selected2 = newPriority[selectedSerie.serieNo]) !== null && _newPriority$selected2 !== void 0 ? _newPriority$selected2 : []);
|
|
36461
36505
|
if (value === true) {
|
|
36462
36506
|
seriesPriority.add(priceFeatureGroupItem);
|
|
@@ -36476,8 +36520,8 @@ var Prices = observer(function (_ref) {
|
|
|
36476
36520
|
if (!selectedSerie) return;
|
|
36477
36521
|
|
|
36478
36522
|
// Create copies of the objects to modify
|
|
36479
|
-
var newFactors = _objectSpread$
|
|
36480
|
-
var serieFactors = _objectSpread$
|
|
36523
|
+
var newFactors = _objectSpread$k({}, pricelist.pgPricefactors);
|
|
36524
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
36481
36525
|
if (value.length === 0) {
|
|
36482
36526
|
// Remove the empty price feature group
|
|
36483
36527
|
delete serieFactors[priceFeatureGroupItem];
|
|
@@ -36509,8 +36553,8 @@ var Prices = observer(function (_ref) {
|
|
|
36509
36553
|
if (!selectedSerie) return;
|
|
36510
36554
|
|
|
36511
36555
|
// Create copies of the objects to modify
|
|
36512
|
-
var newFactors = _objectSpread$
|
|
36513
|
-
var serieFactors = _objectSpread$
|
|
36556
|
+
var newFactors = _objectSpread$k({}, pricelist.articlePricefactors);
|
|
36557
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
36514
36558
|
if (value.length === 0) {
|
|
36515
36559
|
// Remove the empty article price factor
|
|
36516
36560
|
delete serieFactors[typeNo];
|
|
@@ -36542,8 +36586,8 @@ var Prices = observer(function (_ref) {
|
|
|
36542
36586
|
if (!selectedSerie) return;
|
|
36543
36587
|
|
|
36544
36588
|
// Create copies of the objects to modify
|
|
36545
|
-
var newFactors = _objectSpread$
|
|
36546
|
-
var serieFactors = _objectSpread$
|
|
36589
|
+
var newFactors = _objectSpread$k({}, pricelist.typeKeyPricefactors);
|
|
36590
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
36547
36591
|
if (value.length === 0) {
|
|
36548
36592
|
// Remove the empty article price factor
|
|
36549
36593
|
delete serieFactors[typeKey];
|
|
@@ -36575,7 +36619,7 @@ var Prices = observer(function (_ref) {
|
|
|
36575
36619
|
if (!selectedSerie) return;
|
|
36576
36620
|
|
|
36577
36621
|
// Create a copy of the object to modify
|
|
36578
|
-
var newFactors = _objectSpread$
|
|
36622
|
+
var newFactors = _objectSpread$k({}, pricelist.seriePricefactors);
|
|
36579
36623
|
if (value.length === 0) {
|
|
36580
36624
|
// Remove the empty serie price factor
|
|
36581
36625
|
delete newFactors[selectedSerie.serieNo];
|
|
@@ -37347,12 +37391,12 @@ function getFormItemProps(props) {
|
|
|
37347
37391
|
}
|
|
37348
37392
|
|
|
37349
37393
|
var _excluded$3 = ["disabled"];
|
|
37350
|
-
function ownKeys$
|
|
37351
|
-
function _objectSpread$
|
|
37394
|
+
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; }
|
|
37395
|
+
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
37396
|
function Checkbox(_ref) {
|
|
37353
37397
|
var disabled = _ref.disabled,
|
|
37354
37398
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
37355
|
-
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$
|
|
37399
|
+
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$j(_objectSpread$j({}, getFormItemProps(props)), {}, {
|
|
37356
37400
|
valuePropName: "checked",
|
|
37357
37401
|
children: /*#__PURE__*/jsx(Checkbox$1, {
|
|
37358
37402
|
disabled: disabled
|
|
@@ -37361,13 +37405,13 @@ function Checkbox(_ref) {
|
|
|
37361
37405
|
}
|
|
37362
37406
|
|
|
37363
37407
|
var _excluded$2 = ["disabled", "placeholder"];
|
|
37364
|
-
function ownKeys$
|
|
37365
|
-
function _objectSpread$
|
|
37408
|
+
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; }
|
|
37409
|
+
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
37410
|
function Input(_ref) {
|
|
37367
37411
|
var disabled = _ref.disabled,
|
|
37368
37412
|
placeholder = _ref.placeholder,
|
|
37369
37413
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
37370
|
-
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$
|
|
37414
|
+
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$i(_objectSpread$i({}, getFormItemProps(props)), {}, {
|
|
37371
37415
|
children: /*#__PURE__*/jsx(Input$1, {
|
|
37372
37416
|
disabled: disabled,
|
|
37373
37417
|
placeholder: placeholder
|
|
@@ -37379,8 +37423,8 @@ var uploadDraggerWrapper = "upload-dragger-wrapper-xZiDJ";
|
|
|
37379
37423
|
var css_248z$a = ".upload-dragger-wrapper-xZiDJ {\n min-height: 220px;\n}\n";
|
|
37380
37424
|
styleInject(css_248z$a);
|
|
37381
37425
|
|
|
37382
|
-
function ownKeys$
|
|
37383
|
-
function _objectSpread$
|
|
37426
|
+
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; }
|
|
37427
|
+
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
37428
|
/**
|
|
37385
37429
|
* Handles file selection and optional auto-zipping
|
|
37386
37430
|
*
|
|
@@ -37484,7 +37528,7 @@ function _validateFile() {
|
|
|
37484
37528
|
return _validateFile.apply(this, arguments);
|
|
37485
37529
|
}
|
|
37486
37530
|
function toUploadFile(file) {
|
|
37487
|
-
return _objectSpread$
|
|
37531
|
+
return _objectSpread$h(_objectSpread$h({}, file), {}, {
|
|
37488
37532
|
uid: file.name,
|
|
37489
37533
|
name: file.name,
|
|
37490
37534
|
status: 'done',
|
|
@@ -37556,8 +37600,8 @@ var DraggerComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
37556
37600
|
});
|
|
37557
37601
|
|
|
37558
37602
|
var _excluded$1 = ["acceptedFileTypes", "disabled", "autoZip", "required", "hint"];
|
|
37559
|
-
function ownKeys$
|
|
37560
|
-
function _objectSpread$
|
|
37603
|
+
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; }
|
|
37604
|
+
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
37605
|
function Dragger(_ref) {
|
|
37562
37606
|
var _props$rules;
|
|
37563
37607
|
var acceptedFileTypes = _ref.acceptedFileTypes,
|
|
@@ -37568,7 +37612,7 @@ function Dragger(_ref) {
|
|
|
37568
37612
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
37569
37613
|
var _useTranslation = useTranslation(),
|
|
37570
37614
|
t = _useTranslation.t;
|
|
37571
|
-
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$
|
|
37615
|
+
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$g(_objectSpread$g({}, getFormItemProps(props)), {}, {
|
|
37572
37616
|
rules: [].concat(_toConsumableArray((_props$rules = props.rules) !== null && _props$rules !== void 0 ? _props$rules : []), [{
|
|
37573
37617
|
validator: function validator(_, value) {
|
|
37574
37618
|
return validateFile(acceptedFileTypes, t, value);
|
|
@@ -37642,8 +37686,8 @@ function useForm(_ref) {
|
|
|
37642
37686
|
};
|
|
37643
37687
|
}
|
|
37644
37688
|
|
|
37645
|
-
function ownKeys$
|
|
37646
|
-
function _objectSpread$
|
|
37689
|
+
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; }
|
|
37690
|
+
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
37691
|
/**
|
|
37648
37692
|
* Form component that renders form fields based on configuration
|
|
37649
37693
|
*
|
|
@@ -37699,15 +37743,15 @@ function FormItem(_ref2) {
|
|
|
37699
37743
|
var field = _ref2.field;
|
|
37700
37744
|
switch (field.type) {
|
|
37701
37745
|
case 'dragger':
|
|
37702
|
-
return /*#__PURE__*/createElement(Dragger, _objectSpread$
|
|
37746
|
+
return /*#__PURE__*/createElement(Dragger, _objectSpread$f(_objectSpread$f({}, field), {}, {
|
|
37703
37747
|
key: field.name
|
|
37704
37748
|
}));
|
|
37705
37749
|
case 'checkbox':
|
|
37706
|
-
return /*#__PURE__*/createElement(Checkbox, _objectSpread$
|
|
37750
|
+
return /*#__PURE__*/createElement(Checkbox, _objectSpread$f(_objectSpread$f({}, field), {}, {
|
|
37707
37751
|
key: field.name
|
|
37708
37752
|
}));
|
|
37709
37753
|
case 'input':
|
|
37710
|
-
return /*#__PURE__*/createElement(Input, _objectSpread$
|
|
37754
|
+
return /*#__PURE__*/createElement(Input, _objectSpread$f(_objectSpread$f({}, field), {}, {
|
|
37711
37755
|
key: field.name
|
|
37712
37756
|
}));
|
|
37713
37757
|
default:
|
|
@@ -37717,7 +37761,9 @@ function FormItem(_ref2) {
|
|
|
37717
37761
|
|
|
37718
37762
|
var uploadModalFooter = "upload-modal-footer-W5737";
|
|
37719
37763
|
var uploadButton = "upload-button-QkWYP";
|
|
37720
|
-
var
|
|
37764
|
+
var errorGroup = "error-group-lmQSx";
|
|
37765
|
+
var errorItem = "error-item-kyNLD";
|
|
37766
|
+
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
37767
|
styleInject(css_248z$9);
|
|
37722
37768
|
|
|
37723
37769
|
/**
|
|
@@ -37802,7 +37848,7 @@ function useUploadModal(_ref) {
|
|
|
37802
37848
|
var onSave = /*#__PURE__*/function () {
|
|
37803
37849
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(values) {
|
|
37804
37850
|
var _formData$get;
|
|
37805
|
-
var formData, requestQueryParams, uploadUrl, startTime, fileSize, estimatedUploadTimeMs, progressInterval, updateProgressBasedOnTime, response,
|
|
37851
|
+
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
37852
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
37807
37853
|
while (1) switch (_context.prev = _context.next) {
|
|
37808
37854
|
case 0:
|
|
@@ -37858,7 +37904,7 @@ function useUploadModal(_ref) {
|
|
|
37858
37904
|
});
|
|
37859
37905
|
case 21:
|
|
37860
37906
|
if (!response.ok) {
|
|
37861
|
-
_context.next =
|
|
37907
|
+
_context.next = 29;
|
|
37862
37908
|
break;
|
|
37863
37909
|
}
|
|
37864
37910
|
_context.next = 24;
|
|
@@ -37867,45 +37913,51 @@ function useUploadModal(_ref) {
|
|
|
37867
37913
|
});
|
|
37868
37914
|
case 24:
|
|
37869
37915
|
responseData = _context.sent;
|
|
37870
|
-
|
|
37871
|
-
(
|
|
37872
|
-
|
|
37873
|
-
|
|
37916
|
+
// Check for partial errors in successful responses
|
|
37917
|
+
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));
|
|
37918
|
+
if (hasPartialErrors) {
|
|
37919
|
+
setError(responseData.errors);
|
|
37920
|
+
} else {
|
|
37921
|
+
onUploadComplete === null || onUploadComplete === void 0 || onUploadComplete(responseData);
|
|
37922
|
+
(_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 || _formRef$current2.reset();
|
|
37923
|
+
setCurrentFile(undefined);
|
|
37924
|
+
}
|
|
37925
|
+
_context.next = 42;
|
|
37874
37926
|
break;
|
|
37875
|
-
case
|
|
37927
|
+
case 29:
|
|
37876
37928
|
errorMessage = t('backoffice.idmEnricher.import.uploadfailed');
|
|
37877
|
-
_context.prev =
|
|
37878
|
-
_context.next =
|
|
37929
|
+
_context.prev = 30;
|
|
37930
|
+
_context.next = 33;
|
|
37879
37931
|
return response.json();
|
|
37880
|
-
case
|
|
37932
|
+
case 33:
|
|
37881
37933
|
errorResponse = _context.sent;
|
|
37882
37934
|
errorMessage = errorResponse.error || errorResponse.message || errorMessage;
|
|
37883
|
-
_context.next =
|
|
37935
|
+
_context.next = 40;
|
|
37884
37936
|
break;
|
|
37885
|
-
case
|
|
37886
|
-
_context.prev =
|
|
37887
|
-
_context.t0 = _context["catch"](
|
|
37937
|
+
case 37:
|
|
37938
|
+
_context.prev = 37;
|
|
37939
|
+
_context.t0 = _context["catch"](30);
|
|
37888
37940
|
errorMessage = response.statusText || errorMessage;
|
|
37889
|
-
case
|
|
37941
|
+
case 40:
|
|
37890
37942
|
setError(errorMessage);
|
|
37891
37943
|
setProgress(0);
|
|
37892
|
-
case
|
|
37893
|
-
_context.next =
|
|
37944
|
+
case 42:
|
|
37945
|
+
_context.next = 48;
|
|
37894
37946
|
break;
|
|
37895
|
-
case
|
|
37896
|
-
_context.prev =
|
|
37947
|
+
case 44:
|
|
37948
|
+
_context.prev = 44;
|
|
37897
37949
|
_context.t1 = _context["catch"](13);
|
|
37898
37950
|
setError(_context.t1 instanceof Error ? _context.t1.message : t('backoffice.idmEnricher.import.uploadfailed'));
|
|
37899
37951
|
setProgress(0);
|
|
37900
|
-
case
|
|
37901
|
-
_context.prev =
|
|
37952
|
+
case 48:
|
|
37953
|
+
_context.prev = 48;
|
|
37902
37954
|
setLoading(false);
|
|
37903
|
-
return _context.finish(
|
|
37904
|
-
case
|
|
37955
|
+
return _context.finish(48);
|
|
37956
|
+
case 51:
|
|
37905
37957
|
case "end":
|
|
37906
37958
|
return _context.stop();
|
|
37907
37959
|
}
|
|
37908
|
-
}, _callee, null, [[13,
|
|
37960
|
+
}, _callee, null, [[13, 44, 48, 51], [30, 37]]);
|
|
37909
37961
|
}));
|
|
37910
37962
|
return function onSave(_x) {
|
|
37911
37963
|
return _ref2.apply(this, arguments);
|
|
@@ -37922,6 +37974,132 @@ function useUploadModal(_ref) {
|
|
|
37922
37974
|
};
|
|
37923
37975
|
}
|
|
37924
37976
|
|
|
37977
|
+
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; }
|
|
37978
|
+
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; }
|
|
37979
|
+
var Panel = Collapse.Panel;
|
|
37980
|
+
var Text = Typography.Text;
|
|
37981
|
+
/**
|
|
37982
|
+
* Component to display structured bulk operation errors in a collapsible format
|
|
37983
|
+
* Groups errors by operation type and field, showing row indices for each error
|
|
37984
|
+
*/
|
|
37985
|
+
function ErrorDisplay(_ref) {
|
|
37986
|
+
var errors = _ref.errors;
|
|
37987
|
+
var _useTranslation = useTranslation$1(),
|
|
37988
|
+
t = _useTranslation.t;
|
|
37989
|
+
if (!errors) {
|
|
37990
|
+
return null;
|
|
37991
|
+
}
|
|
37992
|
+
var operationTypes = [{
|
|
37993
|
+
key: 'add',
|
|
37994
|
+
label: t('backoffice.uploadModal.operations.add')
|
|
37995
|
+
}, {
|
|
37996
|
+
key: 'update',
|
|
37997
|
+
label: t('backoffice.uploadModal.operations.update')
|
|
37998
|
+
}, {
|
|
37999
|
+
key: 'remove',
|
|
38000
|
+
label: t('backoffice.uploadModal.operations.remove')
|
|
38001
|
+
}, {
|
|
38002
|
+
key: 'restore',
|
|
38003
|
+
label: t('backoffice.uploadModal.operations.restore')
|
|
38004
|
+
}];
|
|
38005
|
+
var renderFieldErrors = function renderFieldErrors(fieldErrors, fieldName, operationType) {
|
|
38006
|
+
return fieldErrors.map(function (fieldError, idx) {
|
|
38007
|
+
return /*#__PURE__*/jsxs("div", {
|
|
38008
|
+
className: errorItem,
|
|
38009
|
+
children: [/*#__PURE__*/jsx(Tag, {
|
|
38010
|
+
color: "blue",
|
|
38011
|
+
children: operationType
|
|
38012
|
+
}), /*#__PURE__*/jsx(Tag, {
|
|
38013
|
+
color: "orange",
|
|
38014
|
+
children: t('backoffice.uploadModal.row', {
|
|
38015
|
+
rowNumber: fieldError.index + 1
|
|
38016
|
+
})
|
|
38017
|
+
}), fieldError.errorTexts.map(function (errorText, textIdx) {
|
|
38018
|
+
return /*#__PURE__*/jsx(Text, {
|
|
38019
|
+
children: errorText
|
|
38020
|
+
}, textIdx);
|
|
38021
|
+
})]
|
|
38022
|
+
}, idx);
|
|
38023
|
+
});
|
|
38024
|
+
};
|
|
38025
|
+
var renderFieldPanels = function renderFieldPanels() {
|
|
38026
|
+
// Collect all errors from all operation types and group by field
|
|
38027
|
+
var allFieldGroups = new Map();
|
|
38028
|
+
operationTypes.forEach(function (_ref2) {
|
|
38029
|
+
var key = _ref2.key,
|
|
38030
|
+
label = _ref2.label;
|
|
38031
|
+
var operationErrors = errors[key];
|
|
38032
|
+
if (!operationErrors || operationErrors.length === 0) {
|
|
38033
|
+
return;
|
|
38034
|
+
}
|
|
38035
|
+
operationErrors.forEach(function (error) {
|
|
38036
|
+
if (error.errors && error.errors.length > 0) {
|
|
38037
|
+
error.errors.forEach(function (fieldError) {
|
|
38038
|
+
var fieldName = fieldError.field;
|
|
38039
|
+
if (!allFieldGroups.has(fieldName)) {
|
|
38040
|
+
allFieldGroups.set(fieldName, []);
|
|
38041
|
+
}
|
|
38042
|
+
allFieldGroups.get(fieldName).push({
|
|
38043
|
+
operationType: label,
|
|
38044
|
+
errors: [_objectSpread$e(_objectSpread$e({}, error), {}, {
|
|
38045
|
+
errorTexts: fieldError.errorTexts
|
|
38046
|
+
})]
|
|
38047
|
+
});
|
|
38048
|
+
});
|
|
38049
|
+
} else if (error.error) {
|
|
38050
|
+
// Handle general errors without specific field
|
|
38051
|
+
var fieldName = t('backoffice.uploadModal.general');
|
|
38052
|
+
if (!allFieldGroups.has(fieldName)) {
|
|
38053
|
+
allFieldGroups.set(fieldName, []);
|
|
38054
|
+
}
|
|
38055
|
+
allFieldGroups.get(fieldName).push({
|
|
38056
|
+
operationType: label,
|
|
38057
|
+
errors: [_objectSpread$e(_objectSpread$e({}, error), {}, {
|
|
38058
|
+
errorTexts: [error.error]
|
|
38059
|
+
})]
|
|
38060
|
+
});
|
|
38061
|
+
}
|
|
38062
|
+
});
|
|
38063
|
+
});
|
|
38064
|
+
if (allFieldGroups.size === 0) {
|
|
38065
|
+
return null;
|
|
38066
|
+
}
|
|
38067
|
+
return Array.from(allFieldGroups.entries()).map(function (_ref3) {
|
|
38068
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
38069
|
+
fieldName = _ref4[0],
|
|
38070
|
+
fieldData = _ref4[1];
|
|
38071
|
+
var totalErrors = fieldData.reduce(function (sum, data) {
|
|
38072
|
+
return sum + data.errors.length;
|
|
38073
|
+
}, 0);
|
|
38074
|
+
return /*#__PURE__*/jsx(Panel, {
|
|
38075
|
+
header: t('backoffice.uploadModal.fieldHeader', {
|
|
38076
|
+
fieldName: fieldName,
|
|
38077
|
+
errorCount: totalErrors
|
|
38078
|
+
}),
|
|
38079
|
+
children: fieldData.map(function (data, idx) {
|
|
38080
|
+
return /*#__PURE__*/jsx("div", {
|
|
38081
|
+
className: errorGroup,
|
|
38082
|
+
children: renderFieldErrors(data.errors, fieldName, data.operationType)
|
|
38083
|
+
}, idx);
|
|
38084
|
+
})
|
|
38085
|
+
}, fieldName);
|
|
38086
|
+
});
|
|
38087
|
+
};
|
|
38088
|
+
var fieldPanels = renderFieldPanels();
|
|
38089
|
+
if (!fieldPanels || fieldPanels.length === 0) {
|
|
38090
|
+
return null;
|
|
38091
|
+
}
|
|
38092
|
+
return /*#__PURE__*/jsx(Alert, {
|
|
38093
|
+
message: t('backoffice.uploadModal.partialErrors'),
|
|
38094
|
+
description: /*#__PURE__*/jsx(Collapse, {
|
|
38095
|
+
size: "small",
|
|
38096
|
+
children: fieldPanels
|
|
38097
|
+
}),
|
|
38098
|
+
type: "warning",
|
|
38099
|
+
showIcon: true
|
|
38100
|
+
});
|
|
38101
|
+
}
|
|
38102
|
+
|
|
37925
38103
|
/**
|
|
37926
38104
|
* Modal component for file uploads with progress tracking and form support
|
|
37927
38105
|
*
|
|
@@ -37998,17 +38176,20 @@ function UploadModal(_ref) {
|
|
|
37998
38176
|
message: t('backoffice.idmEnricher.import.uploadsuccess'),
|
|
37999
38177
|
type: "success",
|
|
38000
38178
|
showIcon: true
|
|
38001
|
-
}), !loading && error && /*#__PURE__*/jsx(Alert, {
|
|
38002
|
-
message:
|
|
38179
|
+
}), !loading && error && (typeof error === 'string' ? /*#__PURE__*/jsx(Alert, {
|
|
38180
|
+
message: t('backoffice.idmEnricher.import.uploaderror'),
|
|
38003
38181
|
description: error,
|
|
38004
38182
|
type: "error",
|
|
38005
38183
|
showIcon: true
|
|
38006
|
-
})
|
|
38184
|
+
}) : /*#__PURE__*/jsx(ErrorDisplay, {
|
|
38185
|
+
errors: error
|
|
38186
|
+
})), /*#__PURE__*/jsx(Form, {
|
|
38007
38187
|
ref: formRef,
|
|
38008
38188
|
fields: fields,
|
|
38009
38189
|
onFinish: onSave,
|
|
38010
38190
|
children: /*#__PURE__*/jsx(UploadModalFooter, {
|
|
38011
38191
|
progress: progress,
|
|
38192
|
+
error: !!error,
|
|
38012
38193
|
loading: loading,
|
|
38013
38194
|
onClose: onModalClose,
|
|
38014
38195
|
currentFile: currentFile
|
|
@@ -38031,15 +38212,16 @@ function UploadModal(_ref) {
|
|
|
38031
38212
|
function UploadModalFooter(_ref2) {
|
|
38032
38213
|
var progress = _ref2.progress,
|
|
38033
38214
|
loading = _ref2.loading,
|
|
38215
|
+
error = _ref2.error,
|
|
38034
38216
|
onClose = _ref2.onClose,
|
|
38035
38217
|
currentFile = _ref2.currentFile;
|
|
38036
38218
|
var _useTranslation2 = useTranslation$1(),
|
|
38037
38219
|
t = _useTranslation2.t;
|
|
38038
|
-
var buttonText = loading ? t('backoffice.idmEnricher.import.inprogress') : progress === 100 ? t('backoffice.idmEnricher.import.finish') : t('backoffice.idmEnricher.import.cancel');
|
|
38220
|
+
var buttonText = loading ? t('backoffice.idmEnricher.import.inprogress') : progress === 100 && !error ? t('backoffice.idmEnricher.import.finish') : t('backoffice.idmEnricher.import.cancel');
|
|
38039
38221
|
return /*#__PURE__*/jsxs("div", {
|
|
38040
38222
|
className: uploadModalFooter,
|
|
38041
38223
|
children: [/*#__PURE__*/jsx(Button, {
|
|
38042
|
-
type: progress !== 100 ? 'default' : 'primary',
|
|
38224
|
+
type: progress !== 100 || error ? 'default' : 'primary',
|
|
38043
38225
|
onClick: onClose,
|
|
38044
38226
|
disabled: loading,
|
|
38045
38227
|
children: buttonText
|