@crystaldesign/diva-backoffice 25.13.0-beta.4 → 25.13.0-beta.40
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 +1175 -479
- package/build/types/backoffice/src/Configuration.d.ts +6 -1
- package/build/types/backoffice/src/Configuration.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/backoffice/src/store/DownloadStore.d.ts +2 -1
- package/build/types/backoffice/src/store/DownloadStore.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/Fields/FormList/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/elements.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/types.d.ts +2 -0
- package/build/types/backoffice/src/ui/Form/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/useFormData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Features.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Options.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableCatalogs/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePriceFeatureGroups/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/BaseTable/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/types.d.ts +1 -1
- package/build/types/backoffice/src/ui/Table/types.d.ts.map +1 -1
- package/build/types/backoffice/src/utils/getIcons.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 { Form as Form$2, Button, Input as Input$1, Popover, Typography,
|
|
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';
|
|
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';
|
|
@@ -67,6 +67,7 @@ import PieChartOutlined from '@ant-design/icons/PieChartOutlined';
|
|
|
67
67
|
import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined';
|
|
68
68
|
import FileZipOutlined from '@ant-design/icons/FileZipOutlined';
|
|
69
69
|
import PlaySquareOutlined from '@ant-design/icons/PlaySquareOutlined';
|
|
70
|
+
import OpenAIOutlined from '@ant-design/icons/OpenAIOutlined';
|
|
70
71
|
import InfoCircleOutlined from '@ant-design/icons/InfoCircleOutlined';
|
|
71
72
|
import merge from 'lodash/merge';
|
|
72
73
|
import cloneDeep from 'lodash/cloneDeep';
|
|
@@ -75,7 +76,7 @@ import DeleteOutlined from '@ant-design/icons/DeleteOutlined';
|
|
|
75
76
|
import JSONEditor from 'jsoneditor';
|
|
76
77
|
import 'jsoneditor/dist/jsoneditor.css';
|
|
77
78
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
78
|
-
import { MinusCircleOutlined, PlusOutlined, DownloadOutlined as DownloadOutlined$1, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, EditOutlined, EyeOutlined, InfoCircleOutlined as InfoCircleOutlined$1, LoadingOutlined, DownOutlined as DownOutlined$1, UploadOutlined as UploadOutlined$2, GlobalOutlined, DatabaseOutlined as DatabaseOutlined$1, DatabaseFilled, ReloadOutlined as ReloadOutlined$1 } from '@ant-design/icons';
|
|
79
|
+
import { MinusCircleOutlined, PlusOutlined, DownloadOutlined as DownloadOutlined$1, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, EditOutlined, EyeOutlined, InfoCircleOutlined as InfoCircleOutlined$1, FilePdfOutlined, LoadingOutlined, DownOutlined as DownOutlined$1, UploadOutlined as UploadOutlined$2, GlobalOutlined, DatabaseOutlined as DatabaseOutlined$1, DatabaseFilled, ReloadOutlined as ReloadOutlined$1 } from '@ant-design/icons';
|
|
79
80
|
import classnames from 'classnames';
|
|
80
81
|
import RTFEditor from '@crystaldesign/rtf-editor';
|
|
81
82
|
import debounce from 'lodash/debounce';
|
|
@@ -156,8 +157,8 @@ import PushpinOutlined from '@ant-design/icons/lib/icons/PushpinOutlined';
|
|
|
156
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; } } }; }
|
|
157
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; } }
|
|
158
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; }
|
|
159
|
-
function ownKeys$
|
|
160
|
-
function _objectSpread$
|
|
160
|
+
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; }
|
|
161
|
+
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; }
|
|
161
162
|
var LOG$f = getLogger('Backoffice', 'ApplyMapping');
|
|
162
163
|
function applyMapping (_ref) {
|
|
163
164
|
var mappable = _ref.mappable,
|
|
@@ -178,10 +179,10 @@ function applyMapping (_ref) {
|
|
|
178
179
|
var newValue = {};
|
|
179
180
|
newValue[newKey] = valueToAdd;
|
|
180
181
|
if ((startValue === null || startValue === void 0 ? void 0 : startValue[newKey]) != undefined) {
|
|
181
|
-
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$
|
|
182
|
+
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$17(_objectSpread$17({}, startValue[newKey]), valueToAdd);else startValue[newKey] = type == 'addToSourceValue' ? startValue[newKey] + valueToAdd : valueToAdd;
|
|
182
183
|
return startValue;
|
|
183
184
|
}
|
|
184
|
-
if (newIdx == 1) return _objectSpread$
|
|
185
|
+
if (newIdx == 1) return _objectSpread$17(_objectSpread$17({}, startValue), newValue);
|
|
185
186
|
return _getTarget(idx + 1, keys, startValue, newValue);
|
|
186
187
|
};
|
|
187
188
|
returnValue = _getTarget(0, key.split('.'), returnValue, value);
|
|
@@ -484,8 +485,8 @@ function getLeafColumns(columns) {
|
|
|
484
485
|
});
|
|
485
486
|
}
|
|
486
487
|
|
|
487
|
-
function ownKeys$
|
|
488
|
-
function _objectSpread$
|
|
488
|
+
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; }
|
|
489
|
+
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; }
|
|
489
490
|
var LOG$e = getLogger('Backoffice', 'ApiHandler');
|
|
490
491
|
var jp = require('jsonpath');
|
|
491
492
|
var _default$d = /*#__PURE__*/function () {
|
|
@@ -664,7 +665,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
664
665
|
_context2.next = 20;
|
|
665
666
|
return fetch(finalUrl, {
|
|
666
667
|
method: this._updateMethod,
|
|
667
|
-
headers: _objectSpread$
|
|
668
|
+
headers: _objectSpread$16(_objectSpread$16({}, jwt ? {
|
|
668
669
|
Authorization: 'Bearer ' + jwt
|
|
669
670
|
} : {}), {}, {
|
|
670
671
|
'Content-Type': 'application/json'
|
|
@@ -757,7 +758,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
757
758
|
rootStore: this._rootStore,
|
|
758
759
|
fallBackToParams: true
|
|
759
760
|
});
|
|
760
|
-
if (data) createData = _objectSpread$
|
|
761
|
+
if (data) createData = _objectSpread$16({}, data);
|
|
761
762
|
} else if (data !== undefined) {
|
|
762
763
|
createData = applyMapping({
|
|
763
764
|
mappable: data,
|
|
@@ -1019,7 +1020,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1019
1020
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1020
1021
|
case 2:
|
|
1021
1022
|
jwt = (_this$_rootStore5 = this._rootStore) === null || _this$_rootStore5 === void 0 ? void 0 : _this$_rootStore5.dataStore.jwt;
|
|
1022
|
-
url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1023
|
+
url = filterServerSide ? parseServersideFilters(_objectSpread$16(_objectSpread$16({}, filterServerSide), {}, {
|
|
1023
1024
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1024
1025
|
baseUrl: this._readListUrl,
|
|
1025
1026
|
prefilter: prefilter
|
|
@@ -1039,7 +1040,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1039
1040
|
});
|
|
1040
1041
|
case 6:
|
|
1041
1042
|
response = _context8.sent;
|
|
1042
|
-
return _context8.abrupt("return", _objectSpread$
|
|
1043
|
+
return _context8.abrupt("return", _objectSpread$16(_objectSpread$16({}, response), {}, {
|
|
1043
1044
|
data: response.data.map(function (d) {
|
|
1044
1045
|
return _this2.aplyJsonPath(d, _this2._readJsonPath);
|
|
1045
1046
|
})
|
|
@@ -1063,7 +1064,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1063
1064
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1064
1065
|
}
|
|
1065
1066
|
(_this$_rootStore6 = this._rootStore) === null || _this$_rootStore6 === void 0 ? void 0 : _this$_rootStore6.dataStore.jwt;
|
|
1066
|
-
var url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1067
|
+
var url = filterServerSide ? parseServersideFilters(_objectSpread$16(_objectSpread$16({}, filterServerSide), {}, {
|
|
1067
1068
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1068
1069
|
baseUrl: this._readListUrl,
|
|
1069
1070
|
prefilter: prefilter
|
|
@@ -1270,8 +1271,8 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1270
1271
|
}]);
|
|
1271
1272
|
}(_default$d);
|
|
1272
1273
|
|
|
1273
|
-
function ownKeys$
|
|
1274
|
-
function _objectSpread$
|
|
1274
|
+
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; }
|
|
1275
|
+
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; }
|
|
1275
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)); }
|
|
1276
1277
|
function _isNativeReflectConstruct$5() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1277
1278
|
var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
@@ -1370,7 +1371,7 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1370
1371
|
_context2.next = 5;
|
|
1371
1372
|
return fetch(this._createUrl + '?ref=true', {
|
|
1372
1373
|
method: this._createMethod,
|
|
1373
|
-
headers: _objectSpread$
|
|
1374
|
+
headers: _objectSpread$15({}, jwt ? {
|
|
1374
1375
|
Authorization: 'Bearer ' + jwt
|
|
1375
1376
|
} : {}),
|
|
1376
1377
|
body: data
|
|
@@ -1748,8 +1749,8 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1748
1749
|
}]);
|
|
1749
1750
|
}(_default$d);
|
|
1750
1751
|
|
|
1751
|
-
function ownKeys$
|
|
1752
|
-
function _objectSpread$
|
|
1752
|
+
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; }
|
|
1753
|
+
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; }
|
|
1753
1754
|
var _default$7 = /*#__PURE__*/function () {
|
|
1754
1755
|
function _default(root) {
|
|
1755
1756
|
_classCallCheck(this, _default);
|
|
@@ -1785,7 +1786,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1785
1786
|
var _i$permission;
|
|
1786
1787
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
1787
1788
|
});
|
|
1788
|
-
config = _objectSpread$
|
|
1789
|
+
config = _objectSpread$14(_objectSpread$14({}, config), {}, {
|
|
1789
1790
|
items: filteredItems
|
|
1790
1791
|
});
|
|
1791
1792
|
}
|
|
@@ -1824,7 +1825,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1824
1825
|
}]);
|
|
1825
1826
|
}();
|
|
1826
1827
|
var replaceStuff = function replaceStuff(text, apiConfig) {
|
|
1827
|
-
return text.replaceAll('${authService}', apiConfig.authService).replaceAll('${mediaService}', apiConfig.mediaService).replaceAll('${messageService}', apiConfig.messageService).replaceAll('${basketService}', apiConfig.basketService).replaceAll('${supportService}', apiConfig.supportService).replaceAll('${adminService}', apiConfig.adminService).replaceAll('${catalogService}', apiConfig.catalogService).replaceAll('${api2}', apiConfig.api2.ek).replaceAll('${analyticsService}', apiConfig.analyticsService).replaceAll('${reportService}', apiConfig.reportService);
|
|
1828
|
+
return text.replaceAll('${authService}', apiConfig.authService).replaceAll('${mediaService}', apiConfig.mediaService).replaceAll('${aiService}', apiConfig.aiService).replaceAll('${messageService}', apiConfig.messageService).replaceAll('${basketService}', apiConfig.basketService).replaceAll('${supportService}', apiConfig.supportService).replaceAll('${adminService}', apiConfig.adminService).replaceAll('${catalogService}', apiConfig.catalogService).replaceAll('${api2}', apiConfig.api2.ek).replaceAll('${analyticsService}', apiConfig.analyticsService).replaceAll('${reportService}', apiConfig.reportService);
|
|
1828
1829
|
};
|
|
1829
1830
|
function runThroughObjectReqursive(obj, apiConfig) {
|
|
1830
1831
|
for (var key in obj) {
|
|
@@ -2157,7 +2158,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
2157
2158
|
onlyAsMappingData: true
|
|
2158
2159
|
}
|
|
2159
2160
|
},
|
|
2160
|
-
downloadAction: {
|
|
2161
|
+
downloadAction: [{
|
|
2161
2162
|
label: t('backoffice.table.roe.downloadAction.label'),
|
|
2162
2163
|
actionType: 'Download',
|
|
2163
2164
|
id: 'DownloadAction',
|
|
@@ -2177,7 +2178,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
2177
2178
|
},
|
|
2178
2179
|
mediaType: 'file'
|
|
2179
2180
|
}]
|
|
2180
|
-
}
|
|
2181
|
+
}]
|
|
2181
2182
|
},
|
|
2182
2183
|
TableAllUsers: {
|
|
2183
2184
|
type: 'Table',
|
|
@@ -3892,7 +3893,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
3892
3893
|
sorter: 2
|
|
3893
3894
|
}]
|
|
3894
3895
|
}] : [])),
|
|
3895
|
-
downloadAction: {
|
|
3896
|
+
downloadAction: [{
|
|
3896
3897
|
actionType: 'Download',
|
|
3897
3898
|
id: 'DownloadAction',
|
|
3898
3899
|
rule: [{
|
|
@@ -3909,7 +3910,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
3909
3910
|
type: 'url',
|
|
3910
3911
|
url: apiConfig.baseCdnUrl + '/static/xlsx/RETAIL-p.xlsx'
|
|
3911
3912
|
}]
|
|
3912
|
-
},
|
|
3913
|
+
}],
|
|
3913
3914
|
apiInterface: {
|
|
3914
3915
|
read: {
|
|
3915
3916
|
list: '${api2}?function=GetJsonTranslations&actualOfflineVersion=${actualOfflineVersion}&actualOfflineParentDir=${actualOfflineParentDir}&catalogGuid=${id}&catalogCodex=${codex}&filterContext=${filterContex}',
|
|
@@ -4157,7 +4158,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
4157
4158
|
targetField: 'newData'
|
|
4158
4159
|
}]
|
|
4159
4160
|
},
|
|
4160
|
-
downloadAction: {
|
|
4161
|
+
downloadAction: [{
|
|
4161
4162
|
actionType: 'Download',
|
|
4162
4163
|
id: 'DownloadAction',
|
|
4163
4164
|
rule: [{
|
|
@@ -4174,7 +4175,22 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
4174
4175
|
type: 'url',
|
|
4175
4176
|
url: apiConfig.baseCdnUrl + '/static/xlsx/RETAIL-p.xlsx'
|
|
4176
4177
|
}]
|
|
4177
|
-
}
|
|
4178
|
+
}, {
|
|
4179
|
+
actionType: 'Download',
|
|
4180
|
+
id: 'DownloadExcelFullPartlist',
|
|
4181
|
+
label: t('backoffice.table.partlists.downloadaction.label.excel'),
|
|
4182
|
+
rule: [{
|
|
4183
|
+
match: {
|
|
4184
|
+
sourceField: 'catalogItem',
|
|
4185
|
+
value: undefined
|
|
4186
|
+
}
|
|
4187
|
+
}],
|
|
4188
|
+
download: [{
|
|
4189
|
+
type: 'api2file',
|
|
4190
|
+
fileName: 'fullpartlist.xlsx',
|
|
4191
|
+
url: '${api2}?function=GetBackofficePartlistExcel&catalogCodex=${catalogCodex}'
|
|
4192
|
+
}]
|
|
4193
|
+
}]
|
|
4178
4194
|
},
|
|
4179
4195
|
TableContentItems: {
|
|
4180
4196
|
title: t('backoffice.table.contentitems.title'),
|
|
@@ -4434,6 +4450,188 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
4434
4450
|
"delete": '${catalogService}/contentItems/${id}'
|
|
4435
4451
|
}
|
|
4436
4452
|
},
|
|
4453
|
+
TablePrompts: {
|
|
4454
|
+
title: t('backoffice.table.prompts.title'),
|
|
4455
|
+
type: 'Table',
|
|
4456
|
+
canRefresh: true,
|
|
4457
|
+
filter: {
|
|
4458
|
+
toggle: {
|
|
4459
|
+
fields: ['archived'],
|
|
4460
|
+
label: t('backoffice.table.prompts.columns.archived'),
|
|
4461
|
+
labelOff: t('backoffice.table.prompts.columns.archived'),
|
|
4462
|
+
defaultChecked: false
|
|
4463
|
+
}
|
|
4464
|
+
},
|
|
4465
|
+
pagination: {
|
|
4466
|
+
pageSize: 50
|
|
4467
|
+
},
|
|
4468
|
+
copyAction: {
|
|
4469
|
+
actionType: 'Detail',
|
|
4470
|
+
type: 'Form',
|
|
4471
|
+
id: 'FormEditPrompt',
|
|
4472
|
+
disableOnMultiselect: true,
|
|
4473
|
+
resetToggleAfter: true,
|
|
4474
|
+
title: t('backoffice.table.prompt.copyAction.title'),
|
|
4475
|
+
label: t('backoffice.table.services.copyAction.label'),
|
|
4476
|
+
mapping: {
|
|
4477
|
+
type: 'body',
|
|
4478
|
+
map: [{
|
|
4479
|
+
targetField: 'name',
|
|
4480
|
+
sourceField: 'name'
|
|
4481
|
+
}, {
|
|
4482
|
+
targetField: 'defaultPrompt',
|
|
4483
|
+
sourceField: 'defaultPrompt'
|
|
4484
|
+
}, {
|
|
4485
|
+
targetField: 'enhancements',
|
|
4486
|
+
sourceField: 'enhancements'
|
|
4487
|
+
}, {
|
|
4488
|
+
targetField: 'cdnImageAdditions',
|
|
4489
|
+
sourceField: 'cdnImageAdditions'
|
|
4490
|
+
}, {
|
|
4491
|
+
targetField: 'specificPrompts',
|
|
4492
|
+
sourceField: 'specificPrompts'
|
|
4493
|
+
}, {
|
|
4494
|
+
targetField: 'analysisInstructions',
|
|
4495
|
+
sourceField: 'analysisInstructions'
|
|
4496
|
+
}, {
|
|
4497
|
+
targetField: 'priority',
|
|
4498
|
+
sourceField: 'priority'
|
|
4499
|
+
}, {
|
|
4500
|
+
targetField: 'engine',
|
|
4501
|
+
sourceField: 'engine'
|
|
4502
|
+
}, {
|
|
4503
|
+
targetField: 'model',
|
|
4504
|
+
sourceField: 'model'
|
|
4505
|
+
}, {
|
|
4506
|
+
targetField: 'type',
|
|
4507
|
+
sourceField: 'type'
|
|
4508
|
+
}, {
|
|
4509
|
+
targetField: 'previewImage',
|
|
4510
|
+
sourceField: 'previewImage'
|
|
4511
|
+
}, {
|
|
4512
|
+
targetField: 'organizationId',
|
|
4513
|
+
globalValue: 'organizationId'
|
|
4514
|
+
}]
|
|
4515
|
+
}
|
|
4516
|
+
},
|
|
4517
|
+
createAction: {
|
|
4518
|
+
actionType: 'Detail',
|
|
4519
|
+
type: 'Form',
|
|
4520
|
+
id: 'FormEditPrompt'
|
|
4521
|
+
},
|
|
4522
|
+
deleteAction: {},
|
|
4523
|
+
columns: [{
|
|
4524
|
+
title: t('backoffice.table.prompts.columns.name'),
|
|
4525
|
+
field: 'name',
|
|
4526
|
+
sorter: 1,
|
|
4527
|
+
filter: 'advanced',
|
|
4528
|
+
width: 200
|
|
4529
|
+
}, {
|
|
4530
|
+
title: t('backoffice.table.prompts.columns.promptKey'),
|
|
4531
|
+
field: 'promptKey',
|
|
4532
|
+
sorter: 1,
|
|
4533
|
+
filter: 'advanced',
|
|
4534
|
+
width: 150
|
|
4535
|
+
}, {
|
|
4536
|
+
title: t('backoffice.table.prompts.columns.priority'),
|
|
4537
|
+
field: 'priority',
|
|
4538
|
+
sorter: 1,
|
|
4539
|
+
filter: 'advanced',
|
|
4540
|
+
width: 100
|
|
4541
|
+
}, {
|
|
4542
|
+
title: t('backoffice.table.prompts.columns.engine'),
|
|
4543
|
+
field: 'engine',
|
|
4544
|
+
sorter: 1,
|
|
4545
|
+
filter: 'advanced',
|
|
4546
|
+
width: 120
|
|
4547
|
+
}, {
|
|
4548
|
+
title: t('backoffice.table.prompts.columns.model'),
|
|
4549
|
+
field: 'model',
|
|
4550
|
+
sorter: 1,
|
|
4551
|
+
filter: 'advanced',
|
|
4552
|
+
width: 150
|
|
4553
|
+
}, {
|
|
4554
|
+
title: t('backoffice.table.prompts.columns.type'),
|
|
4555
|
+
field: 'type',
|
|
4556
|
+
sorter: 1,
|
|
4557
|
+
filter: 'advanced',
|
|
4558
|
+
width: 100
|
|
4559
|
+
}, {
|
|
4560
|
+
title: t('backoffice.table.prompts.columns.previewImage'),
|
|
4561
|
+
field: 'previewImage',
|
|
4562
|
+
type: 'media',
|
|
4563
|
+
width: 100,
|
|
4564
|
+
align: 'center'
|
|
4565
|
+
}, {
|
|
4566
|
+
title: t('backoffice.table.prompts.columns.archived'),
|
|
4567
|
+
field: 'archived',
|
|
4568
|
+
sorter: 1,
|
|
4569
|
+
filter: 'advanced',
|
|
4570
|
+
type: 'boolean',
|
|
4571
|
+
width: 140
|
|
4572
|
+
}, {
|
|
4573
|
+
title: t('backoffice.table.prompts.columns.defaultPrompt'),
|
|
4574
|
+
field: 'defaultPrompt',
|
|
4575
|
+
sorter: 1,
|
|
4576
|
+
filter: 'advanced',
|
|
4577
|
+
width: 200
|
|
4578
|
+
}, {
|
|
4579
|
+
title: t('backoffice._id'),
|
|
4580
|
+
field: '_id',
|
|
4581
|
+
sorter: 1,
|
|
4582
|
+
filter: 'advanced',
|
|
4583
|
+
width: 100
|
|
4584
|
+
}, {
|
|
4585
|
+
title: t('backoffice.table.views.lastUpdated'),
|
|
4586
|
+
field: 'lastUpdated',
|
|
4587
|
+
defaultSortOrder: 'descend',
|
|
4588
|
+
type: 'unixTimeStamp',
|
|
4589
|
+
sorter: 1,
|
|
4590
|
+
filter: 'advanced',
|
|
4591
|
+
width: 240
|
|
4592
|
+
}, {
|
|
4593
|
+
title: t('backoffice.table.views.lastUpdatedBy'),
|
|
4594
|
+
field: 'lastUpdatedBy_displayText',
|
|
4595
|
+
sorter: 1,
|
|
4596
|
+
filter: 'advanced',
|
|
4597
|
+
width: 200
|
|
4598
|
+
}, {
|
|
4599
|
+
title: t('backoffice.table.medien.columns.title.organizationId'),
|
|
4600
|
+
field: 'organizationId',
|
|
4601
|
+
sorter: 1,
|
|
4602
|
+
filter: 'advanced',
|
|
4603
|
+
width: 160
|
|
4604
|
+
}],
|
|
4605
|
+
rowAction: [{
|
|
4606
|
+
actionType: 'Detail',
|
|
4607
|
+
disableOnMultiselect: true,
|
|
4608
|
+
type: 'Form',
|
|
4609
|
+
id: 'FormEditPrompt',
|
|
4610
|
+
title: t('backoffice.table.prompt.edit'),
|
|
4611
|
+
label: t('backoffice.edit')
|
|
4612
|
+
}, {
|
|
4613
|
+
disableOnMultiselect: true,
|
|
4614
|
+
actionType: 'Detail',
|
|
4615
|
+
type: 'Form',
|
|
4616
|
+
id: 'FormShowPrompt',
|
|
4617
|
+
title: t('backoffice.table.prompt.show'),
|
|
4618
|
+
label: t('backoffice.show')
|
|
4619
|
+
}],
|
|
4620
|
+
apiInterface: {
|
|
4621
|
+
read: {
|
|
4622
|
+
list: '${aiService}/prompts?organizationId=${organizationId}',
|
|
4623
|
+
filterServerSide: true
|
|
4624
|
+
},
|
|
4625
|
+
"delete": '${aiService}/prompts/${id}'
|
|
4626
|
+
},
|
|
4627
|
+
mapping: {
|
|
4628
|
+
type: 'query',
|
|
4629
|
+
map: [{
|
|
4630
|
+
globalValue: 'organizationId',
|
|
4631
|
+
targetField: 'organizationId'
|
|
4632
|
+
}]
|
|
4633
|
+
}
|
|
4634
|
+
},
|
|
4437
4635
|
TableApplicationTranslations: {
|
|
4438
4636
|
title: t('backoffice.table.applicationtranslation.title'),
|
|
4439
4637
|
type: 'Table',
|
|
@@ -5444,10 +5642,10 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
5444
5642
|
fields: ['parentOrganizations']
|
|
5445
5643
|
}
|
|
5446
5644
|
},
|
|
5447
|
-
downloadAction: {
|
|
5645
|
+
downloadAction: [{
|
|
5448
5646
|
actionType: 'CsvExport',
|
|
5449
5647
|
fileName: 'SubOrganizations'
|
|
5450
|
-
}
|
|
5648
|
+
}]
|
|
5451
5649
|
},
|
|
5452
5650
|
TableAllOrganizationUsers: {
|
|
5453
5651
|
title: t('backoffice.table.allorgusers.title'),
|
|
@@ -5573,10 +5771,10 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
5573
5771
|
disableOnToggle: true,
|
|
5574
5772
|
permission: 'backoffice_create_user'
|
|
5575
5773
|
},
|
|
5576
|
-
downloadAction: {
|
|
5774
|
+
downloadAction: [{
|
|
5577
5775
|
actionType: 'CsvExport',
|
|
5578
5776
|
fileName: 'benutzer'
|
|
5579
|
-
},
|
|
5777
|
+
}],
|
|
5580
5778
|
rowAction: [{
|
|
5581
5779
|
actionType: 'Detail',
|
|
5582
5780
|
type: 'Form',
|
|
@@ -6145,7 +6343,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
6145
6343
|
}]
|
|
6146
6344
|
}
|
|
6147
6345
|
},
|
|
6148
|
-
downloadAction: {
|
|
6346
|
+
downloadAction: [{
|
|
6149
6347
|
actionType: 'Download',
|
|
6150
6348
|
id: 'DownloadRenderjobAction',
|
|
6151
6349
|
rule: [{
|
|
@@ -6166,7 +6364,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
6166
6364
|
}]
|
|
6167
6365
|
}
|
|
6168
6366
|
}]
|
|
6169
|
-
},
|
|
6367
|
+
}],
|
|
6170
6368
|
rowAction: [{
|
|
6171
6369
|
actionType: 'Detail',
|
|
6172
6370
|
type: 'Form',
|
|
@@ -7593,6 +7791,199 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
7593
7791
|
permission: 'backoffice_admin_users_access_all'
|
|
7594
7792
|
}]
|
|
7595
7793
|
},
|
|
7794
|
+
FormEditPrompt: {
|
|
7795
|
+
type: 'Form',
|
|
7796
|
+
apiInterface: {
|
|
7797
|
+
update: {
|
|
7798
|
+
url: '${aiService}/prompts/{_id}',
|
|
7799
|
+
method: 'PATCH',
|
|
7800
|
+
jsonPatch: true
|
|
7801
|
+
},
|
|
7802
|
+
create: '${aiService}/prompts'
|
|
7803
|
+
},
|
|
7804
|
+
items: [{
|
|
7805
|
+
name: 'promptKey',
|
|
7806
|
+
label: t('backoffice.table.prompts.columns.promptKey'),
|
|
7807
|
+
type: 'input',
|
|
7808
|
+
required: true
|
|
7809
|
+
}, {
|
|
7810
|
+
name: 'name',
|
|
7811
|
+
label: t('backoffice.table.prompts.columns.name'),
|
|
7812
|
+
type: 'input',
|
|
7813
|
+
required: true
|
|
7814
|
+
}, {
|
|
7815
|
+
name: 'defaultPrompt',
|
|
7816
|
+
label: t('backoffice.table.prompts.columns.defaultPrompt'),
|
|
7817
|
+
type: 'textarea',
|
|
7818
|
+
required: true
|
|
7819
|
+
}, {
|
|
7820
|
+
name: 'cdnImageAdditions',
|
|
7821
|
+
label: t('backoffice.table.prompts.columns.cdnImageAdditions'),
|
|
7822
|
+
type: 'array',
|
|
7823
|
+
items: [{
|
|
7824
|
+
name: 'addition',
|
|
7825
|
+
type: 'input',
|
|
7826
|
+
label: t('backoffice.table.prompts.columns.cdnImageAddition')
|
|
7827
|
+
}]
|
|
7828
|
+
}, {
|
|
7829
|
+
name: 'specificPrompts',
|
|
7830
|
+
label: t('backoffice.table.prompts.columns.specificPrompts'),
|
|
7831
|
+
type: 'array',
|
|
7832
|
+
items: [{
|
|
7833
|
+
name: 'key',
|
|
7834
|
+
type: 'input',
|
|
7835
|
+
label: t('backoffice.table.prompts.columns.specificPromptKey'),
|
|
7836
|
+
required: true
|
|
7837
|
+
}, {
|
|
7838
|
+
name: 'prompt',
|
|
7839
|
+
type: 'textarea',
|
|
7840
|
+
label: t('backoffice.table.prompts.columns.specificPromptText'),
|
|
7841
|
+
required: true
|
|
7842
|
+
}]
|
|
7843
|
+
}, {
|
|
7844
|
+
name: 'priority',
|
|
7845
|
+
label: t('backoffice.table.prompts.columns.priority'),
|
|
7846
|
+
type: 'number',
|
|
7847
|
+
required: true,
|
|
7848
|
+
defaultValue: 1
|
|
7849
|
+
}, {
|
|
7850
|
+
name: 'engine',
|
|
7851
|
+
label: t('backoffice.table.prompts.columns.engine'),
|
|
7852
|
+
type: 'select',
|
|
7853
|
+
values: ['openai', 'grok', 'gemini'],
|
|
7854
|
+
mode: 'single',
|
|
7855
|
+
required: true
|
|
7856
|
+
}, {
|
|
7857
|
+
name: 'model',
|
|
7858
|
+
label: t('backoffice.table.prompts.columns.model'),
|
|
7859
|
+
type: 'select',
|
|
7860
|
+
mode: 'single',
|
|
7861
|
+
values: ['dall-e-2', 'dall-e-3', 'gpt-image-1', 'gpt-image-1-mini', 'imagen-4.0-generate-001', 'gemini-2.5-flash-image']
|
|
7862
|
+
}, {
|
|
7863
|
+
name: 'type',
|
|
7864
|
+
label: t('backoffice.table.prompts.columns.type'),
|
|
7865
|
+
type: 'select',
|
|
7866
|
+
values: ['TEXT', 'ROOM_RENDERING'],
|
|
7867
|
+
mode: 'single',
|
|
7868
|
+
required: true
|
|
7869
|
+
}, {
|
|
7870
|
+
name: 'previewImage',
|
|
7871
|
+
label: t('backoffice.table.prompts.columns.previewImage'),
|
|
7872
|
+
type: 'media',
|
|
7873
|
+
hideTrash: false,
|
|
7874
|
+
allowedTypes: ['image/*'],
|
|
7875
|
+
mediaItemRefField: 'mediaItemRefPreviewImage',
|
|
7876
|
+
urlField: 'previewImage',
|
|
7877
|
+
functionType: 'CAT'
|
|
7878
|
+
}, {
|
|
7879
|
+
name: 'isGlobal',
|
|
7880
|
+
label: t('backoffice.table.prompts.columns.isGlobal'),
|
|
7881
|
+
type: 'checkbox',
|
|
7882
|
+
defaultValue: false
|
|
7883
|
+
}, {
|
|
7884
|
+
name: 'archived',
|
|
7885
|
+
label: t('backoffice.table.prompts.columns.archived'),
|
|
7886
|
+
type: 'checkbox',
|
|
7887
|
+
defaultValue: false
|
|
7888
|
+
}, {
|
|
7889
|
+
name: 'organizationId',
|
|
7890
|
+
hidden: true
|
|
7891
|
+
}]
|
|
7892
|
+
},
|
|
7893
|
+
FormShowPrompt: {
|
|
7894
|
+
type: 'Form',
|
|
7895
|
+
disableSave: true,
|
|
7896
|
+
items: [{
|
|
7897
|
+
name: 'promptKey',
|
|
7898
|
+
label: t('backoffice.table.prompts.columns.promptKey'),
|
|
7899
|
+
type: 'input',
|
|
7900
|
+
readonly: true
|
|
7901
|
+
}, {
|
|
7902
|
+
name: 'name',
|
|
7903
|
+
label: t('backoffice.table.prompts.columns.name'),
|
|
7904
|
+
type: 'input',
|
|
7905
|
+
readonly: true
|
|
7906
|
+
}, {
|
|
7907
|
+
name: 'defaultPrompt',
|
|
7908
|
+
label: t('backoffice.table.prompts.columns.defaultPrompt'),
|
|
7909
|
+
type: 'textarea',
|
|
7910
|
+
readonly: true
|
|
7911
|
+
}, {
|
|
7912
|
+
name: 'cdnImageAdditions',
|
|
7913
|
+
label: t('backoffice.table.prompts.columns.cdnImageAdditions'),
|
|
7914
|
+
type: 'array',
|
|
7915
|
+
readonly: true,
|
|
7916
|
+
items: [{
|
|
7917
|
+
name: 'addition',
|
|
7918
|
+
type: 'input',
|
|
7919
|
+
label: t('backoffice.table.prompts.columns.cdnImageAddition'),
|
|
7920
|
+
readonly: true
|
|
7921
|
+
}]
|
|
7922
|
+
}, {
|
|
7923
|
+
name: 'specificPrompts',
|
|
7924
|
+
label: t('backoffice.table.prompts.columns.specificPrompts'),
|
|
7925
|
+
type: 'array',
|
|
7926
|
+
readonly: true,
|
|
7927
|
+
items: [{
|
|
7928
|
+
name: 'key',
|
|
7929
|
+
type: 'input',
|
|
7930
|
+
label: t('backoffice.table.prompts.columns.specificPromptKey'),
|
|
7931
|
+
readonly: true
|
|
7932
|
+
}, {
|
|
7933
|
+
name: 'prompt',
|
|
7934
|
+
type: 'textarea',
|
|
7935
|
+
label: t('backoffice.table.prompts.columns.specificPromptText'),
|
|
7936
|
+
readonly: true
|
|
7937
|
+
}]
|
|
7938
|
+
}, {
|
|
7939
|
+
name: 'priority',
|
|
7940
|
+
label: t('backoffice.table.prompts.columns.priority'),
|
|
7941
|
+
type: 'number',
|
|
7942
|
+
readonly: true
|
|
7943
|
+
}, {
|
|
7944
|
+
name: 'engine',
|
|
7945
|
+
label: t('backoffice.table.prompts.columns.engine'),
|
|
7946
|
+
type: 'select',
|
|
7947
|
+
values: ['openai', 'grok', 'gemini'],
|
|
7948
|
+
mode: 'single',
|
|
7949
|
+
readonly: true
|
|
7950
|
+
}, {
|
|
7951
|
+
name: 'model',
|
|
7952
|
+
label: t('backoffice.table.prompts.columns.model'),
|
|
7953
|
+
type: 'input',
|
|
7954
|
+
readonly: true
|
|
7955
|
+
}, {
|
|
7956
|
+
name: 'type',
|
|
7957
|
+
label: t('backoffice.table.prompts.columns.type'),
|
|
7958
|
+
type: 'select',
|
|
7959
|
+
values: ['TEXT', 'ROOM_RENDERING'],
|
|
7960
|
+
mode: 'single',
|
|
7961
|
+
readonly: true
|
|
7962
|
+
}, {
|
|
7963
|
+
name: 'previewImage',
|
|
7964
|
+
label: t('backoffice.table.prompts.columns.previewImage'),
|
|
7965
|
+
type: 'media',
|
|
7966
|
+
hideTrash: false,
|
|
7967
|
+
allowedTypes: ['image/*'],
|
|
7968
|
+
mediaItemRefField: 'mediaItemRefPreviewImage',
|
|
7969
|
+
urlField: 'previewImage',
|
|
7970
|
+
functionType: 'CAT',
|
|
7971
|
+
readonly: true
|
|
7972
|
+
}, {
|
|
7973
|
+
name: 'isGlobal',
|
|
7974
|
+
label: t('backoffice.table.prompts.columns.isGlobal'),
|
|
7975
|
+
type: 'checkbox',
|
|
7976
|
+
readonly: true
|
|
7977
|
+
}, {
|
|
7978
|
+
name: 'archived',
|
|
7979
|
+
label: t('backoffice.table.prompts.columns.archived'),
|
|
7980
|
+
type: 'checkbox',
|
|
7981
|
+
readonly: true
|
|
7982
|
+
}, {
|
|
7983
|
+
name: 'organizationId',
|
|
7984
|
+
hidden: true
|
|
7985
|
+
}]
|
|
7986
|
+
},
|
|
7596
7987
|
FormOrganizationUserDetails: {
|
|
7597
7988
|
type: 'Form',
|
|
7598
7989
|
title: t('backoffice.form.organizationuserdetails.title'),
|
|
@@ -8634,6 +9025,9 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
8634
9025
|
}, {
|
|
8635
9026
|
label: t('backoffice.form.organizationdetails.items.onlyChildren'),
|
|
8636
9027
|
value: 'ONLY_CHILDREN'
|
|
9028
|
+
}, {
|
|
9029
|
+
label: t('backoffice.form.organizationdetails.items.onlyOpen'),
|
|
9030
|
+
value: 'ONLY_OPEN'
|
|
8637
9031
|
}]
|
|
8638
9032
|
}, {
|
|
8639
9033
|
name: ['settings', 'invitationType'],
|
|
@@ -8821,6 +9215,159 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
8821
9215
|
label: t('backoffice.form.organizationdetails.items.settings.externalContactUrl'),
|
|
8822
9216
|
tabgroup: t('backoffice.form.organizationdetails.additionalContactData'),
|
|
8823
9217
|
type: 'input'
|
|
9218
|
+
}, {
|
|
9219
|
+
name: t('backoffice.subtitle.ai'),
|
|
9220
|
+
type: 'subTitle',
|
|
9221
|
+
orientation: 'left',
|
|
9222
|
+
style: {
|
|
9223
|
+
marginBottom: '40px'
|
|
9224
|
+
},
|
|
9225
|
+
permission: 'backoffice_admin_organizations'
|
|
9226
|
+
}, {
|
|
9227
|
+
name: ['settings', 'aiSettings', 'monthlyOrgCoinLimit'],
|
|
9228
|
+
label: t('backoffice.form.organizationdetails.items.ai.monthlyOrgCoinLimit'),
|
|
9229
|
+
type: 'number',
|
|
9230
|
+
permission: 'backoffice_admin_organizations',
|
|
9231
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9232
|
+
defaultValue: 100000,
|
|
9233
|
+
hidden: function hidden(data) {
|
|
9234
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9235
|
+
},
|
|
9236
|
+
disabled: function disabled(data) {
|
|
9237
|
+
var _data$settings;
|
|
9238
|
+
return data === null || data === void 0 || (_data$settings = data.settings) === null || _data$settings === void 0 || (_data$settings = _data$settings.aiSettings) === null || _data$settings === void 0 ? void 0 : _data$settings.noLimit;
|
|
9239
|
+
},
|
|
9240
|
+
onValueChange: function onValueChange(value, item, form) {
|
|
9241
|
+
if (value && typeof value === 'number') {
|
|
9242
|
+
// Compute all limits from monthly org limit
|
|
9243
|
+
form.setFieldValue(['settings', 'aiSettings', 'weeklyOrgCoinLimit'], Math.round(value / 2));
|
|
9244
|
+
form.setFieldValue(['settings', 'aiSettings', 'dailyOrgCoinLimit'], Math.round(value / 10));
|
|
9245
|
+
form.setFieldValue(['settings', 'aiSettings', 'monthlyUserCoinLimit'], Math.round(value / 2));
|
|
9246
|
+
form.setFieldValue(['settings', 'aiSettings', 'weeklyUserCoinLimit'], Math.round(value / 4));
|
|
9247
|
+
form.setFieldValue(['settings', 'aiSettings', 'dailyUserCoinLimit'], Math.round(value / 20));
|
|
9248
|
+
var formattedValue = value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
9249
|
+
var price = (value / 100).toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
9250
|
+
item.helpText = formattedValue + ' divaCoins = €' + price + ' limit per month. Changes to this field will auto-update other limits.';
|
|
9251
|
+
}
|
|
9252
|
+
},
|
|
9253
|
+
helpText: '1000 divaCoins = €1 limit per month. Changes to this field will auto-update other limits.'
|
|
9254
|
+
}, {
|
|
9255
|
+
name: ['settings', 'aiSettings', 'weeklyOrgCoinLimit'],
|
|
9256
|
+
label: t('backoffice.form.organizationdetails.items.ai.weeklyOrgCoinLimit'),
|
|
9257
|
+
type: 'number',
|
|
9258
|
+
permission: 'backoffice_admin_organizations',
|
|
9259
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9260
|
+
defaultValue: 50000,
|
|
9261
|
+
hidden: function hidden(data) {
|
|
9262
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9263
|
+
},
|
|
9264
|
+
disabled: function disabled(data) {
|
|
9265
|
+
var _data$settings2;
|
|
9266
|
+
return data === null || data === void 0 || (_data$settings2 = data.settings) === null || _data$settings2 === void 0 || (_data$settings2 = _data$settings2.aiSettings) === null || _data$settings2 === void 0 ? void 0 : _data$settings2.noLimit;
|
|
9267
|
+
},
|
|
9268
|
+
helpText: 'Auto-computed as monthlyOrg/2. Can be manually adjusted.'
|
|
9269
|
+
}, {
|
|
9270
|
+
name: ['settings', 'aiSettings', 'dailyOrgCoinLimit'],
|
|
9271
|
+
label: t('backoffice.form.organizationdetails.items.ai.dailyOrgCoinLimit'),
|
|
9272
|
+
type: 'number',
|
|
9273
|
+
permission: 'backoffice_admin_organizations',
|
|
9274
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9275
|
+
defaultValue: 10000,
|
|
9276
|
+
hidden: function hidden(data) {
|
|
9277
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9278
|
+
},
|
|
9279
|
+
disabled: function disabled(data) {
|
|
9280
|
+
var _data$settings3;
|
|
9281
|
+
return data === null || data === void 0 || (_data$settings3 = data.settings) === null || _data$settings3 === void 0 || (_data$settings3 = _data$settings3.aiSettings) === null || _data$settings3 === void 0 ? void 0 : _data$settings3.noLimit;
|
|
9282
|
+
},
|
|
9283
|
+
helpText: 'Auto-computed as monthlyOrg/10. Can be manually adjusted.'
|
|
9284
|
+
}, {
|
|
9285
|
+
name: ['settings', 'aiSettings', 'monthlyUserCoinLimit'],
|
|
9286
|
+
label: t('backoffice.form.organizationdetails.items.ai.monthlyUserCoinLimit'),
|
|
9287
|
+
type: 'number',
|
|
9288
|
+
permission: 'backoffice_admin_organizations',
|
|
9289
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9290
|
+
defaultValue: 50000,
|
|
9291
|
+
hidden: function hidden(data) {
|
|
9292
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9293
|
+
},
|
|
9294
|
+
disabled: function disabled(data) {
|
|
9295
|
+
var _data$settings4;
|
|
9296
|
+
return data === null || data === void 0 || (_data$settings4 = data.settings) === null || _data$settings4 === void 0 || (_data$settings4 = _data$settings4.aiSettings) === null || _data$settings4 === void 0 ? void 0 : _data$settings4.noLimit;
|
|
9297
|
+
},
|
|
9298
|
+
helpText: 'Auto-computed as monthlyOrg/2. Can be manually adjusted.'
|
|
9299
|
+
}, {
|
|
9300
|
+
name: ['settings', 'aiSettings', 'weeklyUserCoinLimit'],
|
|
9301
|
+
label: t('backoffice.form.organizationdetails.items.ai.weeklyUserCoinLimit'),
|
|
9302
|
+
type: 'number',
|
|
9303
|
+
permission: 'backoffice_admin_organizations',
|
|
9304
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9305
|
+
defaultValue: 25000,
|
|
9306
|
+
hidden: function hidden(data) {
|
|
9307
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9308
|
+
},
|
|
9309
|
+
disabled: function disabled(data) {
|
|
9310
|
+
var _data$settings5;
|
|
9311
|
+
return data === null || data === void 0 || (_data$settings5 = data.settings) === null || _data$settings5 === void 0 || (_data$settings5 = _data$settings5.aiSettings) === null || _data$settings5 === void 0 ? void 0 : _data$settings5.noLimit;
|
|
9312
|
+
},
|
|
9313
|
+
helpText: 'Auto-computed as monthlyOrg/4. Can be manually adjusted.'
|
|
9314
|
+
}, {
|
|
9315
|
+
name: ['settings', 'aiSettings', 'dailyUserCoinLimit'],
|
|
9316
|
+
label: t('backoffice.form.organizationdetails.items.ai.dailyUserCoinLimit'),
|
|
9317
|
+
type: 'number',
|
|
9318
|
+
permission: 'backoffice_admin_organizations',
|
|
9319
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9320
|
+
defaultValue: 5000,
|
|
9321
|
+
hidden: function hidden(data) {
|
|
9322
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9323
|
+
},
|
|
9324
|
+
disabled: function disabled(data) {
|
|
9325
|
+
var _data$settings6;
|
|
9326
|
+
return data === null || data === void 0 || (_data$settings6 = data.settings) === null || _data$settings6 === void 0 || (_data$settings6 = _data$settings6.aiSettings) === null || _data$settings6 === void 0 ? void 0 : _data$settings6.noLimit;
|
|
9327
|
+
},
|
|
9328
|
+
helpText: 'Auto-computed as monthlyOrg/20. Can be manually adjusted.'
|
|
9329
|
+
}, {
|
|
9330
|
+
name: ['settings', 'aiSettings', 'anonymousDailyIPLimit'],
|
|
9331
|
+
label: t('backoffice.form.organizationdetails.items.ai.anonymousDailyIPLimit'),
|
|
9332
|
+
type: 'number',
|
|
9333
|
+
permission: 'backoffice_admin_organizations',
|
|
9334
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9335
|
+
defaultValue: 2,
|
|
9336
|
+
hidden: function hidden(data) {
|
|
9337
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9338
|
+
},
|
|
9339
|
+
helpText: 'anonymous enduser limit'
|
|
9340
|
+
}, {
|
|
9341
|
+
name: ['settings', 'aiSettings', 'loggedInDailyIPLimit'],
|
|
9342
|
+
label: t('backoffice.form.organizationdetails.items.ai.loggedInDailyIPLimit'),
|
|
9343
|
+
type: 'number',
|
|
9344
|
+
permission: 'backoffice_admin_organizations',
|
|
9345
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9346
|
+
defaultValue: 10,
|
|
9347
|
+
hidden: function hidden(data) {
|
|
9348
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9349
|
+
},
|
|
9350
|
+
helpText: 'logged in enduser limit'
|
|
9351
|
+
}, {
|
|
9352
|
+
name: ['settings', 'aiSettings', 'leadRewardBonus'],
|
|
9353
|
+
label: t('backoffice.form.organizationdetails.items.ai.leadRewardBonus'),
|
|
9354
|
+
type: 'number',
|
|
9355
|
+
permission: 'backoffice_admin_organizations',
|
|
9356
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9357
|
+
defaultValue: 5,
|
|
9358
|
+
hidden: function hidden(data) {
|
|
9359
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9360
|
+
}
|
|
9361
|
+
}, {
|
|
9362
|
+
name: ['settings', 'aiSettings', 'noLimit'],
|
|
9363
|
+
label: t('backoffice.form.organizationdetails.items.ai.noLimit'),
|
|
9364
|
+
type: 'checkbox',
|
|
9365
|
+
permission: 'backoffice_admin_organizations',
|
|
9366
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9367
|
+
defaultValue: false,
|
|
9368
|
+
hidden: function hidden(data) {
|
|
9369
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9370
|
+
}
|
|
8824
9371
|
}]
|
|
8825
9372
|
},
|
|
8826
9373
|
FromAffilateOrganizationDetails: {
|
|
@@ -13752,6 +14299,8 @@ function getIcon(icon) {
|
|
|
13752
14299
|
return /*#__PURE__*/jsx(TranslationOutlined, {});
|
|
13753
14300
|
case 'OrderedListOutlined':
|
|
13754
14301
|
return /*#__PURE__*/jsx(OrderedListOutlined, {});
|
|
14302
|
+
case 'OpenAIOutlined':
|
|
14303
|
+
return /*#__PURE__*/jsx(OpenAIOutlined, {});
|
|
13755
14304
|
case 'CommentOutlined':
|
|
13756
14305
|
return /*#__PURE__*/jsx(CommentOutlined, {});
|
|
13757
14306
|
case 'AlertOutlined':
|
|
@@ -14111,8 +14660,8 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
14111
14660
|
}]);
|
|
14112
14661
|
}();
|
|
14113
14662
|
|
|
14114
|
-
function ownKeys$
|
|
14115
|
-
function _objectSpread$
|
|
14663
|
+
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; }
|
|
14664
|
+
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; }
|
|
14116
14665
|
function _createForOfIteratorHelper$m(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$m(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
14117
14666
|
function _unsupportedIterableToArray$m(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$m(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$m(r, a) : void 0; } }
|
|
14118
14667
|
function _arrayLikeToArray$m(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -14223,7 +14772,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
14223
14772
|
if (index >= 0) {
|
|
14224
14773
|
this._additionalMenuElements[index] = {
|
|
14225
14774
|
key: key,
|
|
14226
|
-
element: _objectSpread$
|
|
14775
|
+
element: _objectSpread$13(_objectSpread$13({}, this._additionalMenuElements[index].element), {}, {
|
|
14227
14776
|
items: items,
|
|
14228
14777
|
selected: selected
|
|
14229
14778
|
})
|
|
@@ -14274,7 +14823,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
14274
14823
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
14275
14824
|
this.root.navigate('/' + path);
|
|
14276
14825
|
}
|
|
14277
|
-
this._menuElement1 = _objectSpread$
|
|
14826
|
+
this._menuElement1 = _objectSpread$13(_objectSpread$13({}, this.menuElement1), {}, {
|
|
14278
14827
|
selected: this._selectedMenuKeys[0]
|
|
14279
14828
|
});
|
|
14280
14829
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -14530,7 +15079,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
14530
15079
|
return items.filter(function (item) {
|
|
14531
15080
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
14532
15081
|
}).map(function (item) {
|
|
14533
|
-
return _objectSpread$
|
|
15082
|
+
return _objectSpread$13(_objectSpread$13({}, item), {}, {
|
|
14534
15083
|
items: item.items ? _this5.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
14535
15084
|
subMenu: item.subMenu ? _this5.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
14536
15085
|
});
|
|
@@ -14625,6 +15174,12 @@ var menu = [{
|
|
|
14625
15174
|
path: 'contentitems',
|
|
14626
15175
|
label: 'backoffice.menu.items.label.ContentItems',
|
|
14627
15176
|
icon: 'OrderedListOutlined'
|
|
15177
|
+
}, {
|
|
15178
|
+
id: 'TablePrompts',
|
|
15179
|
+
path: 'prompts',
|
|
15180
|
+
label: 'backoffice.menu.items.label.Prompts',
|
|
15181
|
+
icon: 'OpenAIOutlined',
|
|
15182
|
+
permission: 'backoffice_prompts'
|
|
14628
15183
|
}, {
|
|
14629
15184
|
id: 'idmTables',
|
|
14630
15185
|
path: 'idm',
|
|
@@ -15240,11 +15795,11 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15240
15795
|
this._rootStore = _rootStore;
|
|
15241
15796
|
_defineProperty(this, "executeDownload", /*#__PURE__*/function () {
|
|
15242
15797
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
15243
|
-
var data, action, catalogCodex, dealerId, currentUrl, _iterator, _step, _loop, download;
|
|
15798
|
+
var data, action, catalogCodex, dealerId, currentUrl, sessionGuid, _iterator, _step, _loop, download;
|
|
15244
15799
|
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
15245
15800
|
while (1) switch (_context2.prev = _context2.next) {
|
|
15246
15801
|
case 0:
|
|
15247
|
-
data = _ref.data, action = _ref.action, catalogCodex = _ref.catalogCodex, dealerId = _ref.dealerId, currentUrl = _ref.currentUrl;
|
|
15802
|
+
data = _ref.data, action = _ref.action, catalogCodex = _ref.catalogCodex, dealerId = _ref.dealerId, currentUrl = _ref.currentUrl, sessionGuid = _ref.sessionGuid;
|
|
15248
15803
|
if (!(action.actionType == 'CsvExport' && currentUrl)) {
|
|
15249
15804
|
_context2.next = 6;
|
|
15250
15805
|
break;
|
|
@@ -15263,63 +15818,98 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15263
15818
|
_context2.prev = 8;
|
|
15264
15819
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
15265
15820
|
var _download$params, _data$fileFormat, _data$fileUrl;
|
|
15266
|
-
var url;
|
|
15821
|
+
var _this$_rootStore, file, blob, url;
|
|
15267
15822
|
return _regeneratorRuntime.wrap(function _loop$(_context) {
|
|
15268
15823
|
while (1) switch (_context.prev = _context.next) {
|
|
15269
15824
|
case 0:
|
|
15270
15825
|
download = _step.value;
|
|
15271
15826
|
_context.t0 = download.type;
|
|
15272
|
-
_context.next = _context.t0 === '
|
|
15827
|
+
_context.next = _context.t0 === 'api2file' ? 4 : _context.t0 === 'url' ? 21 : _context.t0 === 'field' ? 25 : _context.t0 === 'prefab' ? 32 : _context.t0 === 'request' ? 37 : 41;
|
|
15273
15828
|
break;
|
|
15274
15829
|
case 4:
|
|
15830
|
+
_context.prev = 4;
|
|
15831
|
+
_context.next = 7;
|
|
15832
|
+
return fetch(download.url.replace('${catalogCodex}', catalogCodex).toString(), {
|
|
15833
|
+
method: 'GET',
|
|
15834
|
+
headers: {
|
|
15835
|
+
authorization: "Bearer ".concat((_this$_rootStore = _this._rootStore) === null || _this$_rootStore === void 0 ? void 0 : _this$_rootStore.dataStore.jwt),
|
|
15836
|
+
SessionGuid: sessionGuid,
|
|
15837
|
+
'content-type': 'application/json'
|
|
15838
|
+
}
|
|
15839
|
+
});
|
|
15840
|
+
case 7:
|
|
15841
|
+
file = _context.sent;
|
|
15842
|
+
if (file.ok) {
|
|
15843
|
+
_context.next = 11;
|
|
15844
|
+
break;
|
|
15845
|
+
}
|
|
15846
|
+
LOG$d.error(new DivaError("Failed to download file: ".concat(download.fileName, ". Status: ").concat(file.status, " ").concat(file.statusText)));
|
|
15847
|
+
// Optionally, notify the user here
|
|
15848
|
+
return _context.abrupt("break", 41);
|
|
15849
|
+
case 11:
|
|
15850
|
+
_context.next = 13;
|
|
15851
|
+
return file.blob();
|
|
15852
|
+
case 13:
|
|
15853
|
+
blob = _context.sent;
|
|
15854
|
+
DownloadStore.downloadBlob(blob, download.fileName);
|
|
15855
|
+
_context.next = 20;
|
|
15856
|
+
break;
|
|
15857
|
+
case 17:
|
|
15858
|
+
_context.prev = 17;
|
|
15859
|
+
_context.t1 = _context["catch"](4);
|
|
15860
|
+
LOG$d.error(new DivaError("Error during file download (".concat(download.fileName, "):") + _context.t1));
|
|
15861
|
+
// Optionally, notify the user here
|
|
15862
|
+
case 20:
|
|
15863
|
+
return _context.abrupt("break", 41);
|
|
15864
|
+
case 21:
|
|
15275
15865
|
if (_this.checkCondition(download, data)) {
|
|
15276
|
-
_context.next =
|
|
15866
|
+
_context.next = 23;
|
|
15277
15867
|
break;
|
|
15278
15868
|
}
|
|
15279
|
-
return _context.abrupt("break",
|
|
15280
|
-
case
|
|
15869
|
+
return _context.abrupt("break", 41);
|
|
15870
|
+
case 23:
|
|
15281
15871
|
window.location.href = download.url;
|
|
15282
|
-
return _context.abrupt("break",
|
|
15283
|
-
case
|
|
15872
|
+
return _context.abrupt("break", 41);
|
|
15873
|
+
case 25:
|
|
15284
15874
|
if (_this.checkCondition(download, data)) {
|
|
15285
|
-
_context.next =
|
|
15875
|
+
_context.next = 27;
|
|
15286
15876
|
break;
|
|
15287
15877
|
}
|
|
15288
|
-
return _context.abrupt("break",
|
|
15289
|
-
case
|
|
15878
|
+
return _context.abrupt("break", 41);
|
|
15879
|
+
case 27:
|
|
15290
15880
|
url = new URL(data[download.field]);
|
|
15291
15881
|
(_download$params = download.params) === null || _download$params === void 0 || _download$params.forEach(function (param) {
|
|
15292
15882
|
url.searchParams.append(param.name, param.value);
|
|
15293
15883
|
});
|
|
15294
|
-
_context.next =
|
|
15884
|
+
_context.next = 31;
|
|
15295
15885
|
return _this.donwloadFile(url, (data === null || data === void 0 ? void 0 : data.fileName) + '.' + ((_data$fileFormat = data.fileFormat) !== null && _data$fileFormat !== void 0 ? _data$fileFormat : data === null || data === void 0 || (_data$fileUrl = data.fileUrl) === null || _data$fileUrl === void 0 ? void 0 : _data$fileUrl.substring((data === null || data === void 0 ? void 0 : data.fileUrl.lastIndexOf('.')) + 1)));
|
|
15296
|
-
case
|
|
15297
|
-
return _context.abrupt("break",
|
|
15298
|
-
case
|
|
15886
|
+
case 31:
|
|
15887
|
+
return _context.abrupt("break", 41);
|
|
15888
|
+
case 32:
|
|
15299
15889
|
if (_this.checkCondition(download, data)) {
|
|
15300
|
-
_context.next =
|
|
15890
|
+
_context.next = 34;
|
|
15301
15891
|
break;
|
|
15302
15892
|
}
|
|
15303
|
-
return _context.abrupt("break",
|
|
15304
|
-
case
|
|
15305
|
-
_context.next =
|
|
15893
|
+
return _context.abrupt("break", 41);
|
|
15894
|
+
case 34:
|
|
15895
|
+
_context.next = 36;
|
|
15306
15896
|
return _this.connectionFile(download, data, download.url, catalogCodex, dealerId);
|
|
15307
|
-
case
|
|
15308
|
-
return _context.abrupt("break",
|
|
15309
|
-
case
|
|
15897
|
+
case 36:
|
|
15898
|
+
return _context.abrupt("break", 41);
|
|
15899
|
+
case 37:
|
|
15310
15900
|
if (_this.checkCondition(download, data)) {
|
|
15311
|
-
_context.next =
|
|
15901
|
+
_context.next = 39;
|
|
15312
15902
|
break;
|
|
15313
15903
|
}
|
|
15314
|
-
return _context.abrupt("break",
|
|
15315
|
-
case
|
|
15316
|
-
_context.next =
|
|
15904
|
+
return _context.abrupt("break", 41);
|
|
15905
|
+
case 39:
|
|
15906
|
+
_context.next = 41;
|
|
15317
15907
|
return _this.downloadRequest(download, data);
|
|
15318
|
-
case
|
|
15908
|
+
case 41:
|
|
15319
15909
|
case "end":
|
|
15320
15910
|
return _context.stop();
|
|
15321
15911
|
}
|
|
15322
|
-
}, _loop);
|
|
15912
|
+
}, _loop, null, [[4, 17]]);
|
|
15323
15913
|
});
|
|
15324
15914
|
_iterator.s();
|
|
15325
15915
|
case 11:
|
|
@@ -15363,7 +15953,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15363
15953
|
key: "donwloadFile",
|
|
15364
15954
|
value: function () {
|
|
15365
15955
|
var _donwloadFile = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(url, name) {
|
|
15366
|
-
var _this$
|
|
15956
|
+
var _this$_rootStore2;
|
|
15367
15957
|
var file, blob;
|
|
15368
15958
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
15369
15959
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -15372,7 +15962,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15372
15962
|
return fetch(url.toString(), {
|
|
15373
15963
|
method: 'GET',
|
|
15374
15964
|
headers: {
|
|
15375
|
-
authorization: "Bearer ".concat((_this$
|
|
15965
|
+
authorization: "Bearer ".concat((_this$_rootStore2 = this._rootStore) === null || _this$_rootStore2 === void 0 ? void 0 : _this$_rootStore2.dataStore.jwt),
|
|
15376
15966
|
'content-type': 'application/json'
|
|
15377
15967
|
}
|
|
15378
15968
|
});
|
|
@@ -15503,7 +16093,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15503
16093
|
key: "downloadRequest",
|
|
15504
16094
|
value: function () {
|
|
15505
16095
|
var _downloadRequest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(download, data) {
|
|
15506
|
-
var _this$
|
|
16096
|
+
var _this$_rootStore3;
|
|
15507
16097
|
var url, result, contentType, contentDisposition, fileName, fileNameMatch, blob, base64File, a, mimeType, res;
|
|
15508
16098
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
15509
16099
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -15519,7 +16109,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15519
16109
|
return fetch(url, {
|
|
15520
16110
|
method: 'GET',
|
|
15521
16111
|
headers: {
|
|
15522
|
-
authorization: "Bearer ".concat((_this$
|
|
16112
|
+
authorization: "Bearer ".concat((_this$_rootStore3 = this._rootStore) === null || _this$_rootStore3 === void 0 ? void 0 : _this$_rootStore3.dataStore.jwt),
|
|
15523
16113
|
'content-type': 'application/json',
|
|
15524
16114
|
Accept: 'application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, */*'
|
|
15525
16115
|
}
|
|
@@ -15616,7 +16206,8 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15616
16206
|
data: dt,
|
|
15617
16207
|
action: props.action,
|
|
15618
16208
|
catalogCodex: props.catalogCodex,
|
|
15619
|
-
dealerId: props.dealerId
|
|
16209
|
+
dealerId: props.dealerId,
|
|
16210
|
+
sessionGuid: props.sessionGuid
|
|
15620
16211
|
}));
|
|
15621
16212
|
if (!(promises.length == 10)) {
|
|
15622
16213
|
_context7.next = 12;
|
|
@@ -15717,8 +16308,8 @@ var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
15717
16308
|
return _createClass(_default);
|
|
15718
16309
|
}(_default$d);
|
|
15719
16310
|
|
|
15720
|
-
function ownKeys$
|
|
15721
|
-
function _objectSpread$
|
|
16311
|
+
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; }
|
|
16312
|
+
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; }
|
|
15722
16313
|
var LOG$c = getLogger('Backoffice', 'ContextStore');
|
|
15723
16314
|
|
|
15724
16315
|
/**
|
|
@@ -15753,7 +16344,7 @@ var ContextStore = /*#__PURE__*/function () {
|
|
|
15753
16344
|
key: "updateContext",
|
|
15754
16345
|
value: function updateContext(contextId, updates) {
|
|
15755
16346
|
var currentState = this.contexts.get(contextId) || {};
|
|
15756
|
-
var updatedState = _objectSpread$
|
|
16347
|
+
var updatedState = _objectSpread$12(_objectSpread$12({}, currentState), updates);
|
|
15757
16348
|
this.contexts.set(contextId, updatedState);
|
|
15758
16349
|
LOG$c.debug("Updated context ".concat(contextId), {
|
|
15759
16350
|
updatedState: updatedState
|
|
@@ -16385,8 +16976,8 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
16385
16976
|
}]);
|
|
16386
16977
|
}();
|
|
16387
16978
|
|
|
16388
|
-
function ownKeys$
|
|
16389
|
-
function _objectSpread$
|
|
16979
|
+
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; }
|
|
16980
|
+
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; }
|
|
16390
16981
|
function _createForOfIteratorHelper$k(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$k(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
16391
16982
|
function _unsupportedIterableToArray$k(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$k(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$k(r, a) : void 0; } }
|
|
16392
16983
|
function _arrayLikeToArray$k(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -16502,7 +17093,7 @@ function useFormData (_ref) {
|
|
|
16502
17093
|
multipleEditingData = inboundData;
|
|
16503
17094
|
}
|
|
16504
17095
|
return {
|
|
16505
|
-
loadedData: _onLoadFields(_objectSpread$
|
|
17096
|
+
loadedData: _onLoadFields(_objectSpread$11({}, dt)),
|
|
16506
17097
|
multipleEditingData: multipleEditingData
|
|
16507
17098
|
};
|
|
16508
17099
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -16529,7 +17120,7 @@ function useFormData (_ref) {
|
|
|
16529
17120
|
setFieldErrors = _useState20[1];
|
|
16530
17121
|
useEffect(function () {
|
|
16531
17122
|
var _loadedData$_id2;
|
|
16532
|
-
setState(_objectSpread$
|
|
17123
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
16533
17124
|
data: loadedData,
|
|
16534
17125
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
16535
17126
|
update: !!((_loadedData$_id2 = loadedData === null || loadedData === void 0 ? void 0 : loadedData._id) !== null && _loadedData$_id2 !== void 0 ? _loadedData$_id2 : loadedData === null || loadedData === void 0 ? void 0 : loadedData.ID),
|
|
@@ -16631,7 +17222,7 @@ function useFormData (_ref) {
|
|
|
16631
17222
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
16632
17223
|
while (1) switch (_context2.prev = _context2.next) {
|
|
16633
17224
|
case 0:
|
|
16634
|
-
newData = merge(_objectSpread$
|
|
17225
|
+
newData = merge(_objectSpread$11({}, state.data), values);
|
|
16635
17226
|
if (!skipApi) {
|
|
16636
17227
|
_context2.next = 3;
|
|
16637
17228
|
break;
|
|
@@ -16641,7 +17232,7 @@ function useFormData (_ref) {
|
|
|
16641
17232
|
root.actions.toggleLoading('saving_form');
|
|
16642
17233
|
_context2.prev = 4;
|
|
16643
17234
|
_context2.next = 7;
|
|
16644
|
-
return setDynamicFields(_objectSpread$
|
|
17235
|
+
return setDynamicFields(_objectSpread$11({}, state.data), newData);
|
|
16645
17236
|
case 7:
|
|
16646
17237
|
newData = _context2.sent;
|
|
16647
17238
|
_context2.next = 10;
|
|
@@ -16656,7 +17247,7 @@ function useFormData (_ref) {
|
|
|
16656
17247
|
root.actions.toggleLoading('saving_form');
|
|
16657
17248
|
throw _context2.t0;
|
|
16658
17249
|
case 17:
|
|
16659
|
-
setState(_objectSpread$
|
|
17250
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
16660
17251
|
loading: true
|
|
16661
17252
|
}));
|
|
16662
17253
|
finalData = state.data;
|
|
@@ -16709,14 +17300,14 @@ function useFormData (_ref) {
|
|
|
16709
17300
|
_context2.next = 47;
|
|
16710
17301
|
break;
|
|
16711
17302
|
}
|
|
16712
|
-
setFieldErrors(_objectSpread$
|
|
17303
|
+
setFieldErrors(_objectSpread$11(_objectSpread$11({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
16713
17304
|
return _context2.abrupt("return", undefined);
|
|
16714
17305
|
case 47:
|
|
16715
17306
|
throw _context2.t1;
|
|
16716
17307
|
case 48:
|
|
16717
17308
|
_context2.prev = 48;
|
|
16718
17309
|
root.actions.toggleLoading('saving_form');
|
|
16719
|
-
setState(_objectSpread$
|
|
17310
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
16720
17311
|
data: finalData,
|
|
16721
17312
|
loading: false
|
|
16722
17313
|
}));
|
|
@@ -16746,7 +17337,7 @@ function useFormData (_ref) {
|
|
|
16746
17337
|
}
|
|
16747
17338
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
16748
17339
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
16749
|
-
var wholeData = Object.assign(_objectSpread$
|
|
17340
|
+
var wholeData = Object.assign(_objectSpread$11({}, state.data), _objectSpread$11({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
16750
17341
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
16751
17342
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
16752
17343
|
setHiddenRequiredDisabled(newState);
|
|
@@ -16759,18 +17350,41 @@ function useFormData (_ref) {
|
|
|
16759
17350
|
}
|
|
16760
17351
|
};
|
|
16761
17352
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
16762
|
-
|
|
17353
|
+
if (id) {
|
|
17354
|
+
var _item$onValueChange;
|
|
17355
|
+
var item = getItem(id !== null && id !== void 0 ? id : '');
|
|
17356
|
+
item === null || item === void 0 || (_item$onValueChange = item.onValueChange) === null || _item$onValueChange === void 0 || _item$onValueChange.call(item, value, item, state.form);
|
|
17357
|
+
}
|
|
17358
|
+
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$11({}, state.data), state.form.getFieldsValue(), mergeCustomizer);
|
|
16763
17359
|
if (id) {
|
|
16764
17360
|
setFieldInObject(id, data, value);
|
|
16765
|
-
var newFieldErrors = _objectSpread$
|
|
17361
|
+
var newFieldErrors = _objectSpread$11({}, fieldErrors);
|
|
16766
17362
|
delete newFieldErrors[id.toString()];
|
|
16767
17363
|
setFieldErrors(newFieldErrors);
|
|
16768
17364
|
}
|
|
16769
|
-
setState(_objectSpread$
|
|
17365
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
16770
17366
|
data: data
|
|
16771
17367
|
}));
|
|
16772
17368
|
return data;
|
|
16773
17369
|
};
|
|
17370
|
+
var getItem = function getItem(id) {
|
|
17371
|
+
var items = selectedItems;
|
|
17372
|
+
var _iterator2 = _createForOfIteratorHelper$k(items),
|
|
17373
|
+
_step2;
|
|
17374
|
+
try {
|
|
17375
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
17376
|
+
var item = _step2.value;
|
|
17377
|
+
if (item.name.toString() === id.toString()) {
|
|
17378
|
+
return item;
|
|
17379
|
+
}
|
|
17380
|
+
}
|
|
17381
|
+
} catch (err) {
|
|
17382
|
+
_iterator2.e(err);
|
|
17383
|
+
} finally {
|
|
17384
|
+
_iterator2.f();
|
|
17385
|
+
}
|
|
17386
|
+
return undefined;
|
|
17387
|
+
};
|
|
16774
17388
|
|
|
16775
17389
|
//if at an array an entry got added or deleted, its handeled by and so we take the data from the formdata
|
|
16776
17390
|
var mergeCustomizer = function mergeCustomizer(obj, src) {
|
|
@@ -16798,12 +17412,12 @@ function useFormData (_ref) {
|
|
|
16798
17412
|
var _value$value;
|
|
16799
17413
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
16800
17414
|
if (configuration.itemSelectorReset) {
|
|
16801
|
-
setState(_objectSpread$
|
|
17415
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
16802
17416
|
data: _defineProperty({}, name, val)
|
|
16803
17417
|
}));
|
|
16804
17418
|
} else {
|
|
16805
|
-
setState(_objectSpread$
|
|
16806
|
-
data: _objectSpread$
|
|
17419
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
17420
|
+
data: _objectSpread$11(_objectSpread$11({}, state.data), {}, _defineProperty({}, name, val))
|
|
16807
17421
|
}));
|
|
16808
17422
|
}
|
|
16809
17423
|
setSelectedItemsIndex(idx);
|
|
@@ -16814,12 +17428,12 @@ function useFormData (_ref) {
|
|
|
16814
17428
|
var val = _ref6.value;
|
|
16815
17429
|
if (value === val) {
|
|
16816
17430
|
if (configuration.itemSelectorReset) {
|
|
16817
|
-
setState(_objectSpread$
|
|
17431
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
16818
17432
|
data: _defineProperty({}, name, val)
|
|
16819
17433
|
}));
|
|
16820
17434
|
} else {
|
|
16821
|
-
setState(_objectSpread$
|
|
16822
|
-
data: _objectSpread$
|
|
17435
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
17436
|
+
data: _objectSpread$11(_objectSpread$11({}, state.data), {}, _defineProperty({}, name, val))
|
|
16823
17437
|
}));
|
|
16824
17438
|
}
|
|
16825
17439
|
setSelectedItemsIndex(idx);
|
|
@@ -16835,19 +17449,19 @@ function useFormData (_ref) {
|
|
|
16835
17449
|
}
|
|
16836
17450
|
function _preSaveProcess() {
|
|
16837
17451
|
_preSaveProcess = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data, items) {
|
|
16838
|
-
var
|
|
17452
|
+
var _iterator4, _step4, item, itemName, media, mediaItemRefIdPath, urlPath, arrayData, i, _iterator5, _step5, _media;
|
|
16839
17453
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
16840
17454
|
while (1) switch (_context4.prev = _context4.next) {
|
|
16841
17455
|
case 0:
|
|
16842
|
-
|
|
17456
|
+
_iterator4 = _createForOfIteratorHelper$k(items);
|
|
16843
17457
|
_context4.prev = 1;
|
|
16844
|
-
|
|
17458
|
+
_iterator4.s();
|
|
16845
17459
|
case 3:
|
|
16846
|
-
if ((
|
|
17460
|
+
if ((_step4 = _iterator4.n()).done) {
|
|
16847
17461
|
_context4.next = 37;
|
|
16848
17462
|
break;
|
|
16849
17463
|
}
|
|
16850
|
-
item =
|
|
17464
|
+
item = _step4.value;
|
|
16851
17465
|
itemName = typeof item.name == 'string' ? [item.name] : item.name;
|
|
16852
17466
|
if (item !== null && item !== void 0 && item.onSave) {
|
|
16853
17467
|
data = item.onSave(data);
|
|
@@ -16919,21 +17533,21 @@ function useFormData (_ref) {
|
|
|
16919
17533
|
case 39:
|
|
16920
17534
|
_context4.prev = 39;
|
|
16921
17535
|
_context4.t0 = _context4["catch"](1);
|
|
16922
|
-
|
|
17536
|
+
_iterator4.e(_context4.t0);
|
|
16923
17537
|
case 42:
|
|
16924
17538
|
_context4.prev = 42;
|
|
16925
|
-
|
|
17539
|
+
_iterator4.f();
|
|
16926
17540
|
return _context4.finish(42);
|
|
16927
17541
|
case 45:
|
|
16928
|
-
|
|
17542
|
+
_iterator5 = _createForOfIteratorHelper$k(removedMedias);
|
|
16929
17543
|
_context4.prev = 46;
|
|
16930
|
-
|
|
17544
|
+
_iterator5.s();
|
|
16931
17545
|
case 48:
|
|
16932
|
-
if ((
|
|
17546
|
+
if ((_step5 = _iterator5.n()).done) {
|
|
16933
17547
|
_context4.next = 54;
|
|
16934
17548
|
break;
|
|
16935
17549
|
}
|
|
16936
|
-
_media =
|
|
17550
|
+
_media = _step5.value;
|
|
16937
17551
|
_context4.next = 52;
|
|
16938
17552
|
return _media["delete"]();
|
|
16939
17553
|
case 52:
|
|
@@ -16945,10 +17559,10 @@ function useFormData (_ref) {
|
|
|
16945
17559
|
case 56:
|
|
16946
17560
|
_context4.prev = 56;
|
|
16947
17561
|
_context4.t1 = _context4["catch"](46);
|
|
16948
|
-
|
|
17562
|
+
_iterator5.e(_context4.t1);
|
|
16949
17563
|
case 59:
|
|
16950
17564
|
_context4.prev = 59;
|
|
16951
|
-
|
|
17565
|
+
_iterator5.f();
|
|
16952
17566
|
return _context4.finish(59);
|
|
16953
17567
|
case 62:
|
|
16954
17568
|
case "end":
|
|
@@ -16963,7 +17577,7 @@ function useFormData (_ref) {
|
|
|
16963
17577
|
}
|
|
16964
17578
|
function _setDynamicFields() {
|
|
16965
17579
|
_setDynamicFields = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(oldData, newData) {
|
|
16966
|
-
var items, getDynamicValue, _getDynamicValue,
|
|
17580
|
+
var items, getDynamicValue, _getDynamicValue, _iterator6, _step6, item, oldDynamicValue, newDynamicValue;
|
|
16967
17581
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
16968
17582
|
while (1) switch (_context6.prev = _context6.next) {
|
|
16969
17583
|
case 0:
|
|
@@ -17008,15 +17622,15 @@ function useFormData (_ref) {
|
|
|
17008
17622
|
return _getDynamicValue.apply(this, arguments);
|
|
17009
17623
|
};
|
|
17010
17624
|
items = selectedItems !== null && selectedItems !== void 0 ? selectedItems : configuration.items;
|
|
17011
|
-
|
|
17625
|
+
_iterator6 = _createForOfIteratorHelper$k(items);
|
|
17012
17626
|
_context6.prev = 4;
|
|
17013
|
-
|
|
17627
|
+
_iterator6.s();
|
|
17014
17628
|
case 6:
|
|
17015
|
-
if ((
|
|
17629
|
+
if ((_step6 = _iterator6.n()).done) {
|
|
17016
17630
|
_context6.next = 19;
|
|
17017
17631
|
break;
|
|
17018
17632
|
}
|
|
17019
|
-
item =
|
|
17633
|
+
item = _step6.value;
|
|
17020
17634
|
if (!(item.dynamic && typeof item.name == 'string')) {
|
|
17021
17635
|
_context6.next = 17;
|
|
17022
17636
|
break;
|
|
@@ -17043,10 +17657,10 @@ function useFormData (_ref) {
|
|
|
17043
17657
|
case 21:
|
|
17044
17658
|
_context6.prev = 21;
|
|
17045
17659
|
_context6.t0 = _context6["catch"](4);
|
|
17046
|
-
|
|
17660
|
+
_iterator6.e(_context6.t0);
|
|
17047
17661
|
case 24:
|
|
17048
17662
|
_context6.prev = 24;
|
|
17049
|
-
|
|
17663
|
+
_iterator6.f();
|
|
17050
17664
|
return _context6.finish(24);
|
|
17051
17665
|
case 27:
|
|
17052
17666
|
return _context6.abrupt("return", newData);
|
|
@@ -17097,7 +17711,7 @@ function useFormData (_ref) {
|
|
|
17097
17711
|
for (var i = 0; i < configuration.tools.length; i++) {
|
|
17098
17712
|
var _tool$defaultOpen;
|
|
17099
17713
|
var tool = configuration.tools[i];
|
|
17100
|
-
tools.push(_objectSpread$
|
|
17714
|
+
tools.push(_objectSpread$11(_objectSpread$11({}, tool), {}, {
|
|
17101
17715
|
parameters: {
|
|
17102
17716
|
data: state.data
|
|
17103
17717
|
},
|
|
@@ -17115,19 +17729,19 @@ function useFormData (_ref) {
|
|
|
17115
17729
|
}, [state.data]);
|
|
17116
17730
|
var _keepRemovedMediaItem = /*#__PURE__*/function () {
|
|
17117
17731
|
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data, items) {
|
|
17118
|
-
var
|
|
17732
|
+
var _iterator3, _step3, item, itemName, media, mediaItemRefIdPath, urlPath, mediaItemRefId, url, mediaItem, arrayData, i;
|
|
17119
17733
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
17120
17734
|
while (1) switch (_context3.prev = _context3.next) {
|
|
17121
17735
|
case 0:
|
|
17122
|
-
|
|
17736
|
+
_iterator3 = _createForOfIteratorHelper$k(items);
|
|
17123
17737
|
_context3.prev = 1;
|
|
17124
|
-
|
|
17738
|
+
_iterator3.s();
|
|
17125
17739
|
case 3:
|
|
17126
|
-
if ((
|
|
17740
|
+
if ((_step3 = _iterator3.n()).done) {
|
|
17127
17741
|
_context3.next = 28;
|
|
17128
17742
|
break;
|
|
17129
17743
|
}
|
|
17130
|
-
item =
|
|
17744
|
+
item = _step3.value;
|
|
17131
17745
|
itemName = typeof item.name == 'string' ? [item.name] : item.name;
|
|
17132
17746
|
if (!(item.type == 'media')) {
|
|
17133
17747
|
_context3.next = 11;
|
|
@@ -17195,10 +17809,10 @@ function useFormData (_ref) {
|
|
|
17195
17809
|
case 30:
|
|
17196
17810
|
_context3.prev = 30;
|
|
17197
17811
|
_context3.t0 = _context3["catch"](1);
|
|
17198
|
-
|
|
17812
|
+
_iterator3.e(_context3.t0);
|
|
17199
17813
|
case 33:
|
|
17200
17814
|
_context3.prev = 33;
|
|
17201
|
-
|
|
17815
|
+
_iterator3.f();
|
|
17202
17816
|
return _context3.finish(33);
|
|
17203
17817
|
case 36:
|
|
17204
17818
|
case "end":
|
|
@@ -17216,7 +17830,7 @@ function useFormData (_ref) {
|
|
|
17216
17830
|
})) return;
|
|
17217
17831
|
setRemovedMedias([].concat(_toConsumableArray(removedMedias), [media]));
|
|
17218
17832
|
};
|
|
17219
|
-
return _objectSpread$
|
|
17833
|
+
return _objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
17220
17834
|
getIsHidden: getIsHidden,
|
|
17221
17835
|
setUsedPreset: setUsedPreset,
|
|
17222
17836
|
configuration: configuration,
|
|
@@ -17333,8 +17947,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
17333
17947
|
};
|
|
17334
17948
|
|
|
17335
17949
|
var _excluded$9 = ["key", "name"];
|
|
17336
|
-
function ownKeys
|
|
17337
|
-
function _objectSpread
|
|
17950
|
+
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; }
|
|
17951
|
+
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; }
|
|
17338
17952
|
var FormList$2 = function FormList(_ref) {
|
|
17339
17953
|
var _item$initialValue;
|
|
17340
17954
|
var value = _ref.value,
|
|
@@ -17358,66 +17972,72 @@ var FormList$2 = function FormList(_ref) {
|
|
|
17358
17972
|
var add = function add(a) {
|
|
17359
17973
|
a();
|
|
17360
17974
|
};
|
|
17361
|
-
return /*#__PURE__*/
|
|
17362
|
-
|
|
17363
|
-
|
|
17364
|
-
|
|
17365
|
-
|
|
17366
|
-
|
|
17367
|
-
|
|
17368
|
-
|
|
17369
|
-
|
|
17370
|
-
|
|
17371
|
-
|
|
17372
|
-
|
|
17373
|
-
|
|
17374
|
-
|
|
17375
|
-
|
|
17376
|
-
|
|
17377
|
-
|
|
17378
|
-
onClick: function onClick() {
|
|
17379
|
-
remove(name, r);
|
|
17380
|
-
}
|
|
17381
|
-
}), /*#__PURE__*/jsx("div", {
|
|
17975
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
17976
|
+
children: [/*#__PURE__*/jsx(Divider, {
|
|
17977
|
+
orientation: 'left',
|
|
17978
|
+
children: Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name)
|
|
17979
|
+
}), /*#__PURE__*/jsx(Form$2.List, {
|
|
17980
|
+
name: absoluteName,
|
|
17981
|
+
initialValue: (_item$initialValue = item.initialValue) !== null && _item$initialValue !== void 0 ? _item$initialValue : value,
|
|
17982
|
+
children: function children(fields, _ref2) {
|
|
17983
|
+
var a = _ref2.add,
|
|
17984
|
+
r = _ref2.remove;
|
|
17985
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
17986
|
+
children: [fields.map(function (_ref3) {
|
|
17987
|
+
var key = _ref3.key,
|
|
17988
|
+
name = _ref3.name,
|
|
17989
|
+
restField = _objectWithoutProperties(_ref3, _excluded$9);
|
|
17990
|
+
return /*#__PURE__*/jsxs("div", {
|
|
17991
|
+
id: key.toString(),
|
|
17382
17992
|
style: {
|
|
17383
|
-
|
|
17993
|
+
display: 'flex'
|
|
17384
17994
|
},
|
|
17385
|
-
children: item.
|
|
17386
|
-
|
|
17387
|
-
|
|
17388
|
-
|
|
17389
|
-
|
|
17390
|
-
|
|
17391
|
-
|
|
17392
|
-
|
|
17393
|
-
|
|
17394
|
-
|
|
17395
|
-
|
|
17396
|
-
|
|
17397
|
-
|
|
17398
|
-
|
|
17399
|
-
|
|
17400
|
-
|
|
17401
|
-
|
|
17402
|
-
|
|
17403
|
-
|
|
17404
|
-
|
|
17405
|
-
|
|
17406
|
-
|
|
17407
|
-
|
|
17408
|
-
|
|
17409
|
-
|
|
17410
|
-
|
|
17411
|
-
|
|
17412
|
-
|
|
17413
|
-
|
|
17414
|
-
|
|
17415
|
-
|
|
17416
|
-
|
|
17417
|
-
})
|
|
17418
|
-
|
|
17419
|
-
|
|
17420
|
-
|
|
17995
|
+
children: [!item.disablePushOrPop && /*#__PURE__*/jsx(MinusCircleOutlined, {
|
|
17996
|
+
onClick: function onClick() {
|
|
17997
|
+
remove(name, r);
|
|
17998
|
+
}
|
|
17999
|
+
}), /*#__PURE__*/jsx("div", {
|
|
18000
|
+
style: {
|
|
18001
|
+
flexGrow: 1
|
|
18002
|
+
},
|
|
18003
|
+
children: item.items.map(function (i, idx) {
|
|
18004
|
+
var _state$fieldErrors$n$;
|
|
18005
|
+
var n = [name].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate && postFixName ? Array.isArray(postFixName) ? postFixName : [postFixName] : []));
|
|
18006
|
+
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
18007
|
+
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
18008
|
+
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
18009
|
+
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$10(_objectSpread$10({}, restField), {}, {
|
|
18010
|
+
id: n.join(),
|
|
18011
|
+
key: n.join(),
|
|
18012
|
+
name: n,
|
|
18013
|
+
rules: state.getRules(i, state.data),
|
|
18014
|
+
label: getLabel(i, t),
|
|
18015
|
+
valuePropName: i.type == 'checkbox' ? 'checked' : 'value',
|
|
18016
|
+
initialValue: i === null || i === void 0 ? void 0 : i.defaultValue,
|
|
18017
|
+
hasFeedback: !!state.fieldErrors[n.toString()],
|
|
18018
|
+
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
18019
|
+
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
18020
|
+
hidden: hidden
|
|
18021
|
+
}), getElement(_objectSpread$10(_objectSpread$10({}, i), {}, {
|
|
18022
|
+
name: n
|
|
18023
|
+
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
18024
|
+
})
|
|
18025
|
+
})]
|
|
18026
|
+
}, key);
|
|
18027
|
+
}), !item.disablePushOrPop && /*#__PURE__*/jsx(Form$2.Item, {
|
|
18028
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
18029
|
+
type: "dashed",
|
|
18030
|
+
onClick: function onClick() {
|
|
18031
|
+
return add(a);
|
|
18032
|
+
},
|
|
18033
|
+
block: true,
|
|
18034
|
+
icon: /*#__PURE__*/jsx(PlusOutlined, {}),
|
|
18035
|
+
children: t('backoffice.add_field')
|
|
18036
|
+
})
|
|
18037
|
+
})]
|
|
18038
|
+
});
|
|
18039
|
+
}
|
|
18040
|
+
})]
|
|
17421
18041
|
});
|
|
17422
18042
|
};
|
|
17423
18043
|
var FormList$3 = observer(FormList$2);
|
|
@@ -17632,8 +18252,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
17632
18252
|
var css_248z$x = ".wrapper-GVe2h {\n display: flex;\n flex-direction: row;\n gap: 12px;\n}\n\n.button-group-GYt-T {\n display: flex;\n flex-direction: row;\n gap: 12px;\n margin: 0 12px;\n}\n";
|
|
17633
18253
|
styleInject(css_248z$x);
|
|
17634
18254
|
|
|
17635
|
-
function ownKeys
|
|
17636
|
-
function _objectSpread
|
|
18255
|
+
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; }
|
|
18256
|
+
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; }
|
|
17637
18257
|
var SubTitle = function SubTitle(_ref) {
|
|
17638
18258
|
var _item$orientation, _item$buttonIds;
|
|
17639
18259
|
var item = _ref.item,
|
|
@@ -17642,7 +18262,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
17642
18262
|
t = _useTranslation.t;
|
|
17643
18263
|
return /*#__PURE__*/jsx(Divider, {
|
|
17644
18264
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
17645
|
-
style: _objectSpread
|
|
18265
|
+
style: _objectSpread$$({}, item.style),
|
|
17646
18266
|
children: /*#__PURE__*/jsxs("div", {
|
|
17647
18267
|
className: wrapper$6,
|
|
17648
18268
|
children: [Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name), ((_item$buttonIds = item.buttonIds) === null || _item$buttonIds === void 0 ? void 0 : _item$buttonIds.length) && item.buttonIds.map(function (b) {
|
|
@@ -17911,8 +18531,8 @@ var css_248z$w = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\
|
|
|
17911
18531
|
styleInject(css_248z$w);
|
|
17912
18532
|
|
|
17913
18533
|
var _excluded$8 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title", "sharedState"];
|
|
17914
|
-
function ownKeys$
|
|
17915
|
-
function _objectSpread$
|
|
18534
|
+
function ownKeys$_(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18535
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$_(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$_(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17916
18536
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
17917
18537
|
var apiInterface = _ref.apiInterface,
|
|
17918
18538
|
selectMapping = _ref.selectMapping,
|
|
@@ -17939,7 +18559,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
|
17939
18559
|
return /*#__PURE__*/jsxs("div", {
|
|
17940
18560
|
ref: ref,
|
|
17941
18561
|
className: classnames(title ? wrapper$5 : undefined),
|
|
17942
|
-
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$
|
|
18562
|
+
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$_(_objectSpread$_({}, selectProps), {}, {
|
|
17943
18563
|
showSearch: search,
|
|
17944
18564
|
loading: state.loading,
|
|
17945
18565
|
options: state.options,
|
|
@@ -18556,8 +19176,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
18556
19176
|
}]);
|
|
18557
19177
|
}(_default$d);
|
|
18558
19178
|
|
|
18559
|
-
function ownKeys$
|
|
18560
|
-
function _objectSpread$
|
|
19179
|
+
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; }
|
|
19180
|
+
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; }
|
|
18561
19181
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
18562
19182
|
function useSelectClientRelationCatalog (_ref) {
|
|
18563
19183
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -18726,7 +19346,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
18726
19346
|
case 22:
|
|
18727
19347
|
supplierData = _context2.sent;
|
|
18728
19348
|
case 23:
|
|
18729
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
19349
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$Z(_objectSpread$Z({}, _selectedSupplier), {}, {
|
|
18730
19350
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
18731
19351
|
}), supplierData);
|
|
18732
19352
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -18947,8 +19567,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
18947
19567
|
function _createForOfIteratorHelper$i(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$i(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
18948
19568
|
function _unsupportedIterableToArray$i(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$i(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$i(r, a) : void 0; } }
|
|
18949
19569
|
function _arrayLikeToArray$i(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
18950
|
-
function ownKeys$
|
|
18951
|
-
function _objectSpread$
|
|
19570
|
+
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; }
|
|
19571
|
+
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; }
|
|
18952
19572
|
function useSelectData (_ref) {
|
|
18953
19573
|
var data = _ref.data,
|
|
18954
19574
|
onChange = _ref.onChange,
|
|
@@ -19131,7 +19751,7 @@ function useSelectData (_ref) {
|
|
|
19131
19751
|
setFetching(true);
|
|
19132
19752
|
serverSideParams = {
|
|
19133
19753
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
19134
|
-
return _objectSpread$
|
|
19754
|
+
return _objectSpread$Y(_objectSpread$Y({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
19135
19755
|
}, {}) : {
|
|
19136
19756
|
_id: [value, 'contains']
|
|
19137
19757
|
},
|
|
@@ -19423,8 +20043,8 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
19423
20043
|
var css_248z$t = ".wrapper-WStAk {\n display: flex;\n flex-direction: column;\n}\n.header-wrapper-gWQuH {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-left: 64px;\n}\n\n.buttons-wrapper-7ebR9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n}\n";
|
|
19424
20044
|
styleInject(css_248z$t);
|
|
19425
20045
|
|
|
19426
|
-
function ownKeys$
|
|
19427
|
-
function _objectSpread$
|
|
20046
|
+
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; }
|
|
20047
|
+
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; }
|
|
19428
20048
|
var LOG$9 = getLogger('Backoffice', 'Translation Form');
|
|
19429
20049
|
function useTranslationHook (item, state) {
|
|
19430
20050
|
var root = useStore();
|
|
@@ -19557,7 +20177,7 @@ function useTranslationHook (item, state) {
|
|
|
19557
20177
|
case 0:
|
|
19558
20178
|
_context2.next = 2;
|
|
19559
20179
|
return apiHandler.create({
|
|
19560
|
-
locales: _objectSpread$
|
|
20180
|
+
locales: _objectSpread$X({
|
|
19561
20181
|
de: {},
|
|
19562
20182
|
it: {},
|
|
19563
20183
|
fr: {},
|
|
@@ -19606,8 +20226,8 @@ function useTranslationHook (item, state) {
|
|
|
19606
20226
|
};
|
|
19607
20227
|
}
|
|
19608
20228
|
|
|
19609
|
-
function ownKeys$
|
|
19610
|
-
function _objectSpread$
|
|
20229
|
+
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; }
|
|
20230
|
+
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; }
|
|
19611
20231
|
var Translation = function Translation(_ref) {
|
|
19612
20232
|
var item = _ref.item,
|
|
19613
20233
|
state = _ref.state,
|
|
@@ -19652,12 +20272,13 @@ var Translation = function Translation(_ref) {
|
|
|
19652
20272
|
marginLeft: 64
|
|
19653
20273
|
},
|
|
19654
20274
|
children: item.items.map(function (i, idx) {
|
|
20275
|
+
var _state$fieldErrors$n$;
|
|
19655
20276
|
var n = [].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate ? [currentLang] : []));
|
|
19656
20277
|
var key = typeof n == 'string' ? n : n.join('.');
|
|
19657
20278
|
var hidden = state.getIsHidden(i, data);
|
|
19658
20279
|
var newAbsoluteName = absoluteName !== '' ? [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n)) : n;
|
|
19659
20280
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
19660
|
-
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$
|
|
20281
|
+
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$W(_objectSpread$W({}, i), {}, {
|
|
19661
20282
|
name: n
|
|
19662
20283
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden, currentLang) : /*#__PURE__*/jsx(Form$2.Item, {
|
|
19663
20284
|
id: idx.toString(),
|
|
@@ -19668,9 +20289,9 @@ var Translation = function Translation(_ref) {
|
|
|
19668
20289
|
initialValue: i === null || i === void 0 ? void 0 : i.defaultValue,
|
|
19669
20290
|
hasFeedback: !!state.fieldErrors[n.toString()],
|
|
19670
20291
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
19671
|
-
help: state.fieldErrors[n.toString()],
|
|
20292
|
+
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
19672
20293
|
hidden: hidden,
|
|
19673
|
-
children: getElement(_objectSpread$
|
|
20294
|
+
children: getElement(_objectSpread$W(_objectSpread$W({}, i), {}, {
|
|
19674
20295
|
name: n
|
|
19675
20296
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden)
|
|
19676
20297
|
})
|
|
@@ -20027,8 +20648,8 @@ var Text$1 = observer(Text);
|
|
|
20027
20648
|
function _createForOfIteratorHelper$h(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$h(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
20028
20649
|
function _unsupportedIterableToArray$h(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$h(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$h(r, a) : void 0; } }
|
|
20029
20650
|
function _arrayLikeToArray$h(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
20030
|
-
function ownKeys$
|
|
20031
|
-
function _objectSpread$
|
|
20651
|
+
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; }
|
|
20652
|
+
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; }
|
|
20032
20653
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
|
|
20033
20654
|
var _isReadonly, _state$hiddenRequired;
|
|
20034
20655
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -20063,7 +20684,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20063
20684
|
}
|
|
20064
20685
|
});
|
|
20065
20686
|
case 'selectSimple':
|
|
20066
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
20687
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$V(_objectSpread$V({}, item), {}, {
|
|
20067
20688
|
disabled: disabled,
|
|
20068
20689
|
onChange: function onChange(value) {
|
|
20069
20690
|
_onChange(absoluteName, value);
|
|
@@ -20157,7 +20778,13 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20157
20778
|
case 'number':
|
|
20158
20779
|
return /*#__PURE__*/jsx(InputNumber, {
|
|
20159
20780
|
disabled: disabled,
|
|
20160
|
-
value: item.value
|
|
20781
|
+
value: item.value,
|
|
20782
|
+
formatter: function formatter(value) {
|
|
20783
|
+
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
20784
|
+
},
|
|
20785
|
+
onChange: function onChange(value) {
|
|
20786
|
+
_onChange(absoluteName, value);
|
|
20787
|
+
}
|
|
20161
20788
|
});
|
|
20162
20789
|
case 'checkbox':
|
|
20163
20790
|
return /*#__PURE__*/jsx(Checkbox$1, {
|
|
@@ -20269,7 +20896,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20269
20896
|
value: item.value,
|
|
20270
20897
|
options: item.options.map(function (o) {
|
|
20271
20898
|
var _o$disabled;
|
|
20272
|
-
return _objectSpread$
|
|
20899
|
+
return _objectSpread$V(_objectSpread$V({}, o), {}, {
|
|
20273
20900
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, state.data)
|
|
20274
20901
|
});
|
|
20275
20902
|
}),
|
|
@@ -20290,7 +20917,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20290
20917
|
},
|
|
20291
20918
|
icon: item.icon,
|
|
20292
20919
|
callback: function callback(data) {
|
|
20293
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
20920
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$V(_objectSpread$V({}, state.data), data));
|
|
20294
20921
|
}
|
|
20295
20922
|
});
|
|
20296
20923
|
case 'media':
|
|
@@ -20311,7 +20938,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20311
20938
|
var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20312
20939
|
var _useTranslation = useTranslation(),
|
|
20313
20940
|
t = _useTranslation.t;
|
|
20314
|
-
return /*#__PURE__*/jsx(Input$1, _objectSpread$
|
|
20941
|
+
return /*#__PURE__*/jsx(Input$1, _objectSpread$V(_objectSpread$V({}, props), {}, {
|
|
20315
20942
|
ref: ref,
|
|
20316
20943
|
disabled: true,
|
|
20317
20944
|
value: t(props.translationPrefix + '.' + props.value)
|
|
@@ -20330,8 +20957,8 @@ function isReadonly(item, data) {
|
|
|
20330
20957
|
return false;
|
|
20331
20958
|
}
|
|
20332
20959
|
|
|
20333
|
-
function ownKeys$
|
|
20334
|
-
function _objectSpread$
|
|
20960
|
+
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; }
|
|
20961
|
+
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; }
|
|
20335
20962
|
function _createForOfIteratorHelper$g(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$g(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
20336
20963
|
function _unsupportedIterableToArray$g(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$g(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$g(r, a) : void 0; } }
|
|
20337
20964
|
function _arrayLikeToArray$g(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -20381,13 +21008,13 @@ var Presets = function Presets(_ref) {
|
|
|
20381
21008
|
} finally {
|
|
20382
21009
|
_iterator.f();
|
|
20383
21010
|
}
|
|
20384
|
-
var data = _objectSpread$
|
|
21011
|
+
var data = _objectSpread$U(_objectSpread$U({}, form.getFieldsValue(names)), {}, {
|
|
20385
21012
|
newPresetName: newPresetName
|
|
20386
21013
|
});
|
|
20387
21014
|
data.dpi = parseInt(data.dpi);
|
|
20388
21015
|
data.organization = root.getGlobalValue('organizationId');
|
|
20389
21016
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
20390
|
-
var dt = _objectSpread$
|
|
21017
|
+
var dt = _objectSpread$U(_objectSpread$U({}, form.getFieldsValue(names)), {}, {
|
|
20391
21018
|
name: newPresetName
|
|
20392
21019
|
});
|
|
20393
21020
|
setPresets({
|
|
@@ -20724,7 +21351,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
20724
21351
|
var renderFormItems = function renderFormItems(items) {
|
|
20725
21352
|
return /*#__PURE__*/jsx(Fragment, {
|
|
20726
21353
|
children: items.map(function (item) {
|
|
20727
|
-
var _state$hiddenRequired, _state$hiddenRequired2, _state$hiddenRequired3;
|
|
21354
|
+
var _state$hiddenRequired, _state$fieldErrors$it, _state$hiddenRequired2, _state$hiddenRequired3;
|
|
20728
21355
|
return /*#__PURE__*/jsxs("div", {
|
|
20729
21356
|
children: [item.marker && /*#__PURE__*/jsx(InfoCircleOutlined, {}), ['subTitle', 'array', 'text'].includes(item.type) ? getElement(item, setCanSave, state, item.name, state.onInputChanged, onErrorInternal, undefined, undefined, (_state$hiddenRequired = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired === void 0 ? void 0 : _state$hiddenRequired.hidden) : /*#__PURE__*/jsx(Form$2.Item, {
|
|
20730
21357
|
name: item.name,
|
|
@@ -20734,7 +21361,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
20734
21361
|
initialValue: item === null || item === void 0 ? void 0 : item.defaultValue,
|
|
20735
21362
|
hasFeedback: !!state.fieldErrors[item.name.toString()],
|
|
20736
21363
|
validateStatus: !!state.fieldErrors[item.name.toString()] ? 'error' : undefined,
|
|
20737
|
-
help: state.fieldErrors[item.name.toString()],
|
|
21364
|
+
help: (_state$fieldErrors$it = state.fieldErrors[item.name.toString()]) !== null && _state$fieldErrors$it !== void 0 ? _state$fieldErrors$it : item.helpText,
|
|
20738
21365
|
hidden: (_state$hiddenRequired2 = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired2 === void 0 ? void 0 : _state$hiddenRequired2.hidden,
|
|
20739
21366
|
children: getElement(item, setCanSave, state, item.name, state.onInputChanged, onErrorInternal, root, form, (_state$hiddenRequired3 = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired3 === void 0 ? void 0 : _state$hiddenRequired3.hidden)
|
|
20740
21367
|
}, Array.isArray(item.name) ? item.name.join('.') : item.name)]
|
|
@@ -20881,8 +21508,8 @@ function getLabel(item, t) {
|
|
|
20881
21508
|
}
|
|
20882
21509
|
var Form$1 = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
20883
21510
|
|
|
20884
|
-
function ownKeys$
|
|
20885
|
-
function _objectSpread$
|
|
21511
|
+
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; }
|
|
21512
|
+
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; }
|
|
20886
21513
|
function _createForOfIteratorHelper$f(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$f(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
20887
21514
|
function _unsupportedIterableToArray$f(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$f(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$f(r, a) : void 0; } }
|
|
20888
21515
|
function _arrayLikeToArray$f(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -21084,7 +21711,7 @@ function useRoleSelectorData (_ref) {
|
|
|
21084
21711
|
roles.forEach(function (r) {
|
|
21085
21712
|
//check if after the changes the role is selected
|
|
21086
21713
|
if (value.includes(r._id)) {
|
|
21087
|
-
var newValue = _objectSpread$
|
|
21714
|
+
var newValue = _objectSpread$T(_objectSpread$T({}, r), {}, {
|
|
21088
21715
|
selected: true
|
|
21089
21716
|
});
|
|
21090
21717
|
//add it to the new list as selected role
|
|
@@ -21120,7 +21747,7 @@ function useRoleSelectorData (_ref) {
|
|
|
21120
21747
|
}
|
|
21121
21748
|
}
|
|
21122
21749
|
} else {
|
|
21123
|
-
var _newValue = _objectSpread$
|
|
21750
|
+
var _newValue = _objectSpread$T(_objectSpread$T({}, r), {}, {
|
|
21124
21751
|
selected: false
|
|
21125
21752
|
});
|
|
21126
21753
|
//add it to the new list as unselected role
|
|
@@ -21324,7 +21951,7 @@ function _updateRoles() {
|
|
|
21324
21951
|
userRole = userRoles.find(function (r) {
|
|
21325
21952
|
return r._id == role._id;
|
|
21326
21953
|
});
|
|
21327
|
-
newRole = _objectSpread$
|
|
21954
|
+
newRole = _objectSpread$T({}, role);
|
|
21328
21955
|
if (userRole) {
|
|
21329
21956
|
newRole.selected = true;
|
|
21330
21957
|
newRole.inherited = userRole.inherited;
|
|
@@ -21544,7 +22171,7 @@ function _fetchOptions() {
|
|
|
21544
22171
|
case 4:
|
|
21545
22172
|
result = _context11.sent;
|
|
21546
22173
|
options = result.data.map(function (d) {
|
|
21547
|
-
return _objectSpread$
|
|
22174
|
+
return _objectSpread$T(_objectSpread$T({}, d), {}, {
|
|
21548
22175
|
label: d.displayName,
|
|
21549
22176
|
value: d._id,
|
|
21550
22177
|
isLeaf: !d.hasChildren
|
|
@@ -21646,8 +22273,8 @@ var parent = "parent-NZJ3S";
|
|
|
21646
22273
|
var css_248z$s = ".permission-Button-XctsZ {\n position: relative;\n top: 25px;\n left: -30px;\n float: right;\n height: 20px;\n z-index: 1000;\n}\n.select-lzft- {\n width: 100%;\n}\n.loadingOption-qCkRw {\n margin-top: 11px;\n padding-left: 500px;\n}\n.scroller-lrdk9 {\n overflow: auto;\n height: 100%;\n}\n\n.skeleton--xCI0 {\n padding-left: 25px;\n padding-bottom: 10px;\n}\n.filterField-1kU1O {\n display: flex;\n gap: 10px;\n}\n.filterField-1kU1O button {\n height: 32px;\n}\n.filterField-1kU1O div {\n height: 32px;\n}\n\n.parent-scroll-GmaL9 {\n overflow: auto;\n padding: 24px;\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.parent-NZJ3S {\n overflow: auto;\n padding: 24px;\n height: 100%;\n}\n\n.parent-scroll-GmaL9 .ant-spin-container {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component__outerdiv {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component {\n height: 100% !important;\n}\n";
|
|
21647
22274
|
styleInject(css_248z$s);
|
|
21648
22275
|
|
|
21649
|
-
function ownKeys$
|
|
21650
|
-
function _objectSpread$
|
|
22276
|
+
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; }
|
|
22277
|
+
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; }
|
|
21651
22278
|
function _createForOfIteratorHelper$e(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$e(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
21652
22279
|
function _unsupportedIterableToArray$e(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$e(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$e(r, a) : void 0; } }
|
|
21653
22280
|
function _arrayLikeToArray$e(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -21707,8 +22334,8 @@ function _generateCSV() {
|
|
|
21707
22334
|
break;
|
|
21708
22335
|
}
|
|
21709
22336
|
_context2.next = 21;
|
|
21710
|
-
return generateCSV(_objectSpread$
|
|
21711
|
-
mappingData: _objectSpread$
|
|
22337
|
+
return generateCSV(_objectSpread$S(_objectSpread$S({}, exportParams.children), {}, {
|
|
22338
|
+
mappingData: _objectSpread$S(_objectSpread$S({}, parent), {}, {
|
|
21712
22339
|
parentId: exportParams.mappingData._id
|
|
21713
22340
|
})
|
|
21714
22341
|
}), csvData);
|
|
@@ -21816,8 +22443,8 @@ function _downloadFile() {
|
|
|
21816
22443
|
return _downloadFile.apply(this, arguments);
|
|
21817
22444
|
}
|
|
21818
22445
|
|
|
21819
|
-
function ownKeys$
|
|
21820
|
-
function _objectSpread$
|
|
22446
|
+
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; }
|
|
22447
|
+
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; }
|
|
21821
22448
|
function _createForOfIteratorHelper$d(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$d(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
21822
22449
|
function _unsupportedIterableToArray$d(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$d(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$d(r, a) : void 0; } }
|
|
21823
22450
|
function _arrayLikeToArray$d(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -22236,7 +22863,7 @@ function useRelationSelectorData (_ref) {
|
|
|
22236
22863
|
var activeItem = _step.value;
|
|
22237
22864
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
22238
22865
|
addedObjects.push(addedData);
|
|
22239
|
-
getSplittedItems(_objectSpread$
|
|
22866
|
+
getSplittedItems(_objectSpread$R(_objectSpread$R({}, activeItem), {}, {
|
|
22240
22867
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
22241
22868
|
}));
|
|
22242
22869
|
ret = true;
|
|
@@ -22441,8 +23068,8 @@ function useRelationSelectorData (_ref) {
|
|
|
22441
23068
|
};
|
|
22442
23069
|
}
|
|
22443
23070
|
|
|
22444
|
-
function ownKeys$
|
|
22445
|
-
function _objectSpread$
|
|
23071
|
+
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; }
|
|
23072
|
+
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; }
|
|
22446
23073
|
function _createForOfIteratorHelper$c(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$c(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
22447
23074
|
function _unsupportedIterableToArray$c(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$c(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$c(r, a) : void 0; } }
|
|
22448
23075
|
function _arrayLikeToArray$c(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -22575,7 +23202,7 @@ function ActionButton (_ref) {
|
|
|
22575
23202
|
_iterator2.f();
|
|
22576
23203
|
}
|
|
22577
23204
|
_context.next = 19;
|
|
22578
|
-
return apiInterface.update(_objectSpread$
|
|
23205
|
+
return apiInterface.update(_objectSpread$Q(_objectSpread$Q({}, data), {}, {
|
|
22579
23206
|
state: toSwitch
|
|
22580
23207
|
}), data);
|
|
22581
23208
|
case 19:
|
|
@@ -22732,14 +23359,14 @@ function _simpleChangeValue() {
|
|
|
22732
23359
|
break;
|
|
22733
23360
|
}
|
|
22734
23361
|
for (i = 0; i < action.newValues.length; i++) {
|
|
22735
|
-
fieldsToUpdate = _objectSpread$
|
|
23362
|
+
fieldsToUpdate = _objectSpread$Q(_objectSpread$Q({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
22736
23363
|
}
|
|
22737
23364
|
if (!apiInterface.canUpdate) {
|
|
22738
23365
|
_context2.next = 9;
|
|
22739
23366
|
break;
|
|
22740
23367
|
}
|
|
22741
23368
|
_context2.next = 7;
|
|
22742
|
-
return apiInterface.update(_objectSpread$
|
|
23369
|
+
return apiInterface.update(_objectSpread$Q({}, fieldsToUpdate), data);
|
|
22743
23370
|
case 7:
|
|
22744
23371
|
response = _context2.sent;
|
|
22745
23372
|
return _context2.abrupt("return", response);
|
|
@@ -22754,7 +23381,7 @@ function _simpleChangeValue() {
|
|
|
22754
23381
|
return _simpleChangeValue.apply(this, arguments);
|
|
22755
23382
|
}
|
|
22756
23383
|
function A(props) {
|
|
22757
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
23384
|
+
return /*#__PURE__*/jsx("a", _objectSpread$Q({}, props));
|
|
22758
23385
|
}
|
|
22759
23386
|
|
|
22760
23387
|
function _createForOfIteratorHelper$b(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$b(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -22892,8 +23519,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
22892
23519
|
var css_248z$r = ".diva-component-DIVA_BACKOFFICE_NEW .title-cl-ZAj2y {\n color: black;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .description-m3mNY {\n color: grey;\n flex: 1 1 100%;\n margin-left: 25px;\n margin-top: -25px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-group-xWnj- {\n /* border-bottom: 1px solid black; */\n margin-bottom: 40px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .delete-item-otdSr {\n cursor: pointer;\n position: relative;\n float: right;\n top: 13px;\n margin-right: 20px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .newscroller-INKeD {\n overflow: auto;\n height: 400px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-collapse-header--6FgU div {\n flex-wrap: wrap !important;\n}\n.diva-component-DIVA_BACKOFFICE_NEW a .item-title--BTvC {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.85);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-desc-DBiiF {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.45);\n}\n";
|
|
22893
23520
|
styleInject(css_248z$r);
|
|
22894
23521
|
|
|
22895
|
-
function ownKeys$
|
|
22896
|
-
function _objectSpread$
|
|
23522
|
+
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; }
|
|
23523
|
+
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; }
|
|
22897
23524
|
var DropDown = function DropDown(_ref) {
|
|
22898
23525
|
var _curItem$data$length;
|
|
22899
23526
|
var split = _ref.split,
|
|
@@ -22925,7 +23552,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
22925
23552
|
});
|
|
22926
23553
|
return /*#__PURE__*/jsx(Collapse, {
|
|
22927
23554
|
onChange: function onChange() {
|
|
22928
|
-
return getSplittedItems(_objectSpread$
|
|
23555
|
+
return getSplittedItems(_objectSpread$P(_objectSpread$P({}, item.item), {}, {
|
|
22929
23556
|
parentId: item.parentId
|
|
22930
23557
|
}), 0);
|
|
22931
23558
|
},
|
|
@@ -23183,8 +23810,8 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
23183
23810
|
};
|
|
23184
23811
|
var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
|
|
23185
23812
|
|
|
23186
|
-
function ownKeys$
|
|
23187
|
-
function _objectSpread$
|
|
23813
|
+
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; }
|
|
23814
|
+
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; }
|
|
23188
23815
|
function useFormListData (_ref) {
|
|
23189
23816
|
var _configuration$defaul;
|
|
23190
23817
|
var id = _ref.id,
|
|
@@ -23264,7 +23891,7 @@ function useFormListData (_ref) {
|
|
|
23264
23891
|
if (updated.length == state.length) {
|
|
23265
23892
|
newState = state.map(function (s, i) {
|
|
23266
23893
|
var _updated$find;
|
|
23267
|
-
return _objectSpread$
|
|
23894
|
+
return _objectSpread$O(_objectSpread$O({}, s), {}, {
|
|
23268
23895
|
data: (_updated$find = updated.find(function (u) {
|
|
23269
23896
|
return u.index == i;
|
|
23270
23897
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -23401,8 +24028,8 @@ var FormList = function FormList(_ref, ref) {
|
|
|
23401
24028
|
};
|
|
23402
24029
|
var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
23403
24030
|
|
|
23404
|
-
function ownKeys$
|
|
23405
|
-
function _objectSpread$
|
|
24031
|
+
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; }
|
|
24032
|
+
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; }
|
|
23406
24033
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
23407
24034
|
function useSelectOrCreateData (_ref) {
|
|
23408
24035
|
var id = _ref.id,
|
|
@@ -23499,7 +24126,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
23499
24126
|
_context.next = 7;
|
|
23500
24127
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
23501
24128
|
filters: (_configuration$select3 = configuration.selectMapping) !== null && _configuration$select3 !== void 0 && _configuration$select3.searchField ? (_configuration$select4 = configuration.selectMapping) === null || _configuration$select4 === void 0 ? void 0 : _configuration$select4.searchField.reduce(function (filter, field) {
|
|
23502
|
-
return _objectSpread$
|
|
24129
|
+
return _objectSpread$N(_objectSpread$N({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
23503
24130
|
}, {}) : {
|
|
23504
24131
|
_id: [value, 'contains']
|
|
23505
24132
|
},
|
|
@@ -23810,8 +24437,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
23810
24437
|
});
|
|
23811
24438
|
};
|
|
23812
24439
|
|
|
23813
|
-
function ownKeys$
|
|
23814
|
-
function _objectSpread$
|
|
24440
|
+
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; }
|
|
24441
|
+
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; }
|
|
23815
24442
|
function useListData (_ref) {
|
|
23816
24443
|
var id = _ref.id,
|
|
23817
24444
|
data = _ref.data;
|
|
@@ -23854,7 +24481,7 @@ function useListData (_ref) {
|
|
|
23854
24481
|
case 3:
|
|
23855
24482
|
result = _context.sent;
|
|
23856
24483
|
setListData(result.data.map(parseField));
|
|
23857
|
-
initData = _objectSpread$
|
|
24484
|
+
initData = _objectSpread$M({}, data);
|
|
23858
24485
|
setUpdatedObject(initData);
|
|
23859
24486
|
setLoading(false);
|
|
23860
24487
|
case 8:
|
|
@@ -23895,7 +24522,7 @@ function useListData (_ref) {
|
|
|
23895
24522
|
});
|
|
23896
24523
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
23897
24524
|
var parsedField = field.field.split('.');
|
|
23898
|
-
item.itemUpdate = _objectSpread$
|
|
24525
|
+
item.itemUpdate = _objectSpread$M(_objectSpread$M({}, field), {}, {
|
|
23899
24526
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
23900
24527
|
});
|
|
23901
24528
|
});
|
|
@@ -23926,16 +24553,16 @@ function useListData (_ref) {
|
|
|
23926
24553
|
console.error('field with more than 2 parts not allowed');
|
|
23927
24554
|
return;
|
|
23928
24555
|
}
|
|
23929
|
-
var updObj = _objectSpread$
|
|
24556
|
+
var updObj = _objectSpread$M({}, updatedObject);
|
|
23930
24557
|
if (fields.length === 1) {
|
|
23931
|
-
updObj = _objectSpread$
|
|
24558
|
+
updObj = _objectSpread$M(_objectSpread$M({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
23932
24559
|
} else if (fields.length === 2) {
|
|
23933
24560
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
23934
24561
|
return v.id === item.id.trim();
|
|
23935
24562
|
});
|
|
23936
24563
|
if (updatedField) {
|
|
23937
|
-
var updatedFieldCopy = _objectSpread$
|
|
23938
|
-
updObj = _objectSpread$
|
|
24564
|
+
var updatedFieldCopy = _objectSpread$M(_objectSpread$M({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
24565
|
+
updObj = _objectSpread$M(_objectSpread$M({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
23939
24566
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
23940
24567
|
})));
|
|
23941
24568
|
}
|
|
@@ -23944,11 +24571,11 @@ function useListData (_ref) {
|
|
|
23944
24571
|
var acItems = listData;
|
|
23945
24572
|
for (var i = 0; i < acItems.length; i++) {
|
|
23946
24573
|
if (i == index) {
|
|
23947
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
24574
|
+
acItems[i].itemUpdate = _objectSpread$M(_objectSpread$M({}, acItems[i].itemUpdate), {}, {
|
|
23948
24575
|
value: value
|
|
23949
24576
|
});
|
|
23950
24577
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
23951
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
24578
|
+
acItems[i].itemUpdate = _objectSpread$M(_objectSpread$M({}, acItems[i].itemUpdate), {}, {
|
|
23952
24579
|
value: !value
|
|
23953
24580
|
});
|
|
23954
24581
|
}
|
|
@@ -24462,8 +25089,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
24462
25089
|
};
|
|
24463
25090
|
}
|
|
24464
25091
|
|
|
24465
|
-
function ownKeys$
|
|
24466
|
-
function _objectSpread$
|
|
25092
|
+
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; }
|
|
25093
|
+
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; }
|
|
24467
25094
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
24468
25095
|
var id = _ref.id,
|
|
24469
25096
|
data = _ref.data,
|
|
@@ -24571,12 +25198,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
24571
25198
|
}
|
|
24572
25199
|
function onEnter(e) {
|
|
24573
25200
|
if (e.key != 'Enter') return;
|
|
24574
|
-
setCrop(_objectSpread$
|
|
25201
|
+
setCrop(_objectSpread$L(_objectSpread$L({}, crop), {}, {
|
|
24575
25202
|
unit: 'px',
|
|
24576
25203
|
width: Number(widthInputElement.current.value),
|
|
24577
25204
|
height: Number(heightInputElement.current.value)
|
|
24578
25205
|
}));
|
|
24579
|
-
setCompletedCrop(_objectSpread$
|
|
25206
|
+
setCompletedCrop(_objectSpread$L(_objectSpread$L({}, crop), {}, {
|
|
24580
25207
|
unit: 'px',
|
|
24581
25208
|
width: Number(widthInputElement.current.value),
|
|
24582
25209
|
height: Number(heightInputElement.current.value)
|
|
@@ -24654,8 +25281,8 @@ var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
|
24654
25281
|
function _createForOfIteratorHelper$a(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$a(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
24655
25282
|
function _unsupportedIterableToArray$a(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$a(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$a(r, a) : void 0; } }
|
|
24656
25283
|
function _arrayLikeToArray$a(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
24657
|
-
function ownKeys$
|
|
24658
|
-
function _objectSpread$
|
|
25284
|
+
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; }
|
|
25285
|
+
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; }
|
|
24659
25286
|
function useDescriptions (_ref) {
|
|
24660
25287
|
var id = _ref.id;
|
|
24661
25288
|
var root = useStore();
|
|
@@ -24748,7 +25375,7 @@ function _getDisplayData() {
|
|
|
24748
25375
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
24749
25376
|
while (1) switch (_context4.prev = _context4.next) {
|
|
24750
25377
|
case 0:
|
|
24751
|
-
displayData = _objectSpread$
|
|
25378
|
+
displayData = _objectSpread$K({}, data);
|
|
24752
25379
|
_iterator = _createForOfIteratorHelper$a(items);
|
|
24753
25380
|
_context4.prev = 2;
|
|
24754
25381
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -25024,8 +25651,8 @@ var FileUploadWrapper$1 = function FileUploadWrapper(_ref) {
|
|
|
25024
25651
|
};
|
|
25025
25652
|
var FileUploadBeta = observer(FileUploadWrapper$1);
|
|
25026
25653
|
|
|
25027
|
-
function ownKeys$
|
|
25028
|
-
function _objectSpread$
|
|
25654
|
+
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; }
|
|
25655
|
+
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; }
|
|
25029
25656
|
function useGridData (_ref) {
|
|
25030
25657
|
var id = _ref.id,
|
|
25031
25658
|
data = _ref.data;
|
|
@@ -25068,11 +25695,11 @@ function useGridData (_ref) {
|
|
|
25068
25695
|
function reducer(state, action) {
|
|
25069
25696
|
switch (action.type) {
|
|
25070
25697
|
case 'update':
|
|
25071
|
-
return _objectSpread$
|
|
25698
|
+
return _objectSpread$J(_objectSpread$J({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$J(_objectSpread$J({}, action.data), {}, {
|
|
25072
25699
|
buffer: Buffer.from(action.data.buffer)
|
|
25073
25700
|
})));
|
|
25074
25701
|
case 'delete':
|
|
25075
|
-
var newState = _objectSpread$
|
|
25702
|
+
var newState = _objectSpread$J({}, state);
|
|
25076
25703
|
delete newState[action.data.divaNr];
|
|
25077
25704
|
return newState;
|
|
25078
25705
|
default:
|
|
@@ -25159,8 +25786,8 @@ var Grid = function Grid(_ref) {
|
|
|
25159
25786
|
});
|
|
25160
25787
|
};
|
|
25161
25788
|
|
|
25162
|
-
function ownKeys$
|
|
25163
|
-
function _objectSpread$
|
|
25789
|
+
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; }
|
|
25790
|
+
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; }
|
|
25164
25791
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
25165
25792
|
var id = _ref.id;
|
|
25166
25793
|
var root = useStore();
|
|
@@ -25279,7 +25906,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
25279
25906
|
onRemove: onRemove,
|
|
25280
25907
|
customRequest: customRequest,
|
|
25281
25908
|
fileList: fileList.map(function (f) {
|
|
25282
|
-
return _objectSpread$
|
|
25909
|
+
return _objectSpread$I(_objectSpread$I({}, f), {}, {
|
|
25283
25910
|
url: f.url
|
|
25284
25911
|
});
|
|
25285
25912
|
}),
|
|
@@ -25367,8 +25994,8 @@ var TableSummary = function TableSummary(_ref) {
|
|
|
25367
25994
|
});
|
|
25368
25995
|
};
|
|
25369
25996
|
|
|
25370
|
-
function ownKeys$
|
|
25371
|
-
function _objectSpread$
|
|
25997
|
+
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; }
|
|
25998
|
+
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; }
|
|
25372
25999
|
function getExpandedRowRenderer (config, root) {
|
|
25373
26000
|
return function (record) {
|
|
25374
26001
|
var data = record;
|
|
@@ -25390,7 +26017,7 @@ function customSubTable(columns, datasource) {
|
|
|
25390
26017
|
// map custom columns to antd columns
|
|
25391
26018
|
var antcols = columns.map(function (col) {
|
|
25392
26019
|
var _col$width;
|
|
25393
|
-
return _objectSpread$
|
|
26020
|
+
return _objectSpread$H(_objectSpread$H({}, col), {}, {
|
|
25394
26021
|
title: col.title,
|
|
25395
26022
|
dataIndex: col.field,
|
|
25396
26023
|
key: col.field,
|
|
@@ -26102,8 +26729,8 @@ function LinkCell (_ref) {
|
|
|
26102
26729
|
|
|
26103
26730
|
var _excluded$7 = ["index"],
|
|
26104
26731
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
26105
|
-
function ownKeys$
|
|
26106
|
-
function _objectSpread$
|
|
26732
|
+
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; }
|
|
26733
|
+
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; }
|
|
26107
26734
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
26108
26735
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
26109
26736
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -26117,7 +26744,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
26117
26744
|
component: false,
|
|
26118
26745
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
26119
26746
|
value: form,
|
|
26120
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
26747
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$G({}, props))
|
|
26121
26748
|
})
|
|
26122
26749
|
});
|
|
26123
26750
|
};
|
|
@@ -26170,7 +26797,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
26170
26797
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
26171
26798
|
longDescriptionType = 'text';
|
|
26172
26799
|
}
|
|
26173
|
-
var modifiedColumn = _objectSpread$
|
|
26800
|
+
var modifiedColumn = _objectSpread$G(_objectSpread$G({}, column), {}, {
|
|
26174
26801
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
26175
26802
|
});
|
|
26176
26803
|
if (column) {
|
|
@@ -26183,40 +26810,40 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
26183
26810
|
};
|
|
26184
26811
|
switch (modifiedColumn.type) {
|
|
26185
26812
|
case 'boolean':
|
|
26186
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
26813
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$G({}, cellProps));
|
|
26187
26814
|
break;
|
|
26188
26815
|
case 'text':
|
|
26189
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
26816
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$G({}, cellProps));
|
|
26190
26817
|
break;
|
|
26191
26818
|
case 'select':
|
|
26192
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
26819
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$G({}, cellProps));
|
|
26193
26820
|
case 'media':
|
|
26194
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
26821
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$G({}, cellProps));
|
|
26195
26822
|
break;
|
|
26196
26823
|
case 'mediaItem':
|
|
26197
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
26824
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$G({}, cellProps));
|
|
26198
26825
|
break;
|
|
26199
26826
|
case 'unixTimeStamp':
|
|
26200
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
26827
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$G({}, cellProps));
|
|
26201
26828
|
break;
|
|
26202
26829
|
case 'unixTimeStampCheck':
|
|
26203
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
26830
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$G({}, cellProps));
|
|
26204
26831
|
break;
|
|
26205
26832
|
case 'icon':
|
|
26206
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
26833
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$G({}, cellProps));
|
|
26207
26834
|
break;
|
|
26208
26835
|
case 'progress':
|
|
26209
|
-
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$
|
|
26836
|
+
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$G({}, cellProps));
|
|
26210
26837
|
break;
|
|
26211
26838
|
case 'link':
|
|
26212
|
-
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$
|
|
26839
|
+
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$G({}, cellProps));
|
|
26213
26840
|
break;
|
|
26214
26841
|
default:
|
|
26215
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
26842
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$G({}, cellProps));
|
|
26216
26843
|
break;
|
|
26217
26844
|
}
|
|
26218
26845
|
}
|
|
26219
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
26846
|
+
return /*#__PURE__*/jsx("td", _objectSpread$G(_objectSpread$G({}, restProps), {}, {
|
|
26220
26847
|
children: childNode
|
|
26221
26848
|
}));
|
|
26222
26849
|
};
|
|
@@ -26568,8 +27195,8 @@ var SMChart = function SMChart(props) {
|
|
|
26568
27195
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
26569
27196
|
};
|
|
26570
27197
|
|
|
26571
|
-
function ownKeys$
|
|
26572
|
-
function _objectSpread$
|
|
27198
|
+
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; }
|
|
27199
|
+
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; }
|
|
26573
27200
|
function _createForOfIteratorHelper$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$5(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
26574
27201
|
function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$5(r, a) : void 0; } }
|
|
26575
27202
|
function _arrayLikeToArray$5(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -26652,9 +27279,9 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26652
27279
|
}
|
|
26653
27280
|
};
|
|
26654
27281
|
}, []);
|
|
26655
|
-
function isDownloadActionDisabled() {
|
|
27282
|
+
function isDownloadActionDisabled(action) {
|
|
26656
27283
|
var _state$data;
|
|
26657
|
-
if (!
|
|
27284
|
+
if (!action.rule) return false;
|
|
26658
27285
|
var data = (_state$data = state.data) === null || _state$data === void 0 ? void 0 : _state$data.filter(function (dt) {
|
|
26659
27286
|
var _state$selected;
|
|
26660
27287
|
return (_state$selected = state.selected) === null || _state$selected === void 0 ? void 0 : _state$selected.find(function (sel) {
|
|
@@ -26669,7 +27296,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26669
27296
|
return !aplyRules({
|
|
26670
27297
|
data: data,
|
|
26671
27298
|
rootStore: root,
|
|
26672
|
-
rules:
|
|
27299
|
+
rules: action.rule
|
|
26673
27300
|
});
|
|
26674
27301
|
}
|
|
26675
27302
|
function checkPermission(permission) {
|
|
@@ -26710,30 +27337,29 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26710
27337
|
onSelectedCatalog: state.onSelectedCatalog,
|
|
26711
27338
|
dontLoadCatalogData: state.configuration.dontLoadCatalogData
|
|
26712
27339
|
})
|
|
26713
|
-
}), state.configuration.downloadAction &&
|
|
26714
|
-
|
|
26715
|
-
|
|
26716
|
-
|
|
26717
|
-
|
|
26718
|
-
|
|
26719
|
-
|
|
26720
|
-
|
|
26721
|
-
|
|
26722
|
-
|
|
26723
|
-
|
|
26724
|
-
|
|
26725
|
-
|
|
26726
|
-
|
|
26727
|
-
|
|
26728
|
-
|
|
26729
|
-
|
|
26730
|
-
|
|
26731
|
-
|
|
26732
|
-
|
|
26733
|
-
|
|
26734
|
-
|
|
26735
|
-
},
|
|
26736
|
-
children: t('backoffice.basetable.download')
|
|
27340
|
+
}), state.configuration.downloadAction && state.configuration.downloadAction.length > 0 && state.configuration.downloadAction.map(function (action, index) {
|
|
27341
|
+
var _action$label;
|
|
27342
|
+
return /*#__PURE__*/jsx(Button, {
|
|
27343
|
+
type: "primary",
|
|
27344
|
+
disabled: isDownloadActionDisabled(action),
|
|
27345
|
+
icon: /*#__PURE__*/jsx(DownloadOutlined$1, {}),
|
|
27346
|
+
size: "middle",
|
|
27347
|
+
onClick: function onClick() {
|
|
27348
|
+
var _state$catalogItem, _state$catalogItem2, _state$catalogItem3;
|
|
27349
|
+
var selectedData = state.data.filter(function (dt) {
|
|
27350
|
+
return state.selected.includes(dt._id);
|
|
27351
|
+
});
|
|
27352
|
+
root.downloadStore.openDownload({
|
|
27353
|
+
data: selectedData.length ? selectedData : state.mappingData,
|
|
27354
|
+
action: action,
|
|
27355
|
+
catalogCodex: (_state$catalogItem = state.catalogItem) === null || _state$catalogItem === void 0 ? void 0 : _state$catalogItem.codex,
|
|
27356
|
+
dealerId: (_state$catalogItem2 = state.catalogItem) === null || _state$catalogItem2 === void 0 ? void 0 : _state$catalogItem2.dealerId,
|
|
27357
|
+
currentUrl: state.currentFetchUrl,
|
|
27358
|
+
sessionGuid: (_state$catalogItem3 = state.catalogItem) === null || _state$catalogItem3 === void 0 ? void 0 : _state$catalogItem3.sessionGuid
|
|
27359
|
+
});
|
|
27360
|
+
},
|
|
27361
|
+
children: (_action$label = action.label) !== null && _action$label !== void 0 ? _action$label : t('backoffice.basetable.download')
|
|
27362
|
+
}, index);
|
|
26737
27363
|
}), state.configuration.canRefresh && /*#__PURE__*/jsx(Button, {
|
|
26738
27364
|
onClick: function onClick() {
|
|
26739
27365
|
state.triggerRefresh();
|
|
@@ -26768,7 +27394,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26768
27394
|
// Convert to Dayjs
|
|
26769
27395
|
(_state$globalFilter4 = state.globalFilter) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4.timeStamp) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4['toTimeStamp']) !== null && _state$globalFilter4 !== void 0 && _state$globalFilter4[0] ? dayjs((_state$globalFilter5 = state.globalFilter) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5.timeStamp) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5['toTimeStamp']) === null || _state$globalFilter5 === void 0 ? void 0 : _state$globalFilter5[0]) : dayjs(new Date()) // Convert to Dayjs
|
|
26770
27396
|
]
|
|
26771
|
-
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
27397
|
+
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$F(_objectSpread$F({}, (_state$configuration$5 = state.configuration.filter) === null || _state$configuration$5 === void 0 ? void 0 : _state$configuration$5.select.settings), {}, {
|
|
26772
27398
|
style: {
|
|
26773
27399
|
minWidth: '200px'
|
|
26774
27400
|
},
|
|
@@ -26873,7 +27499,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26873
27499
|
},
|
|
26874
27500
|
dataSource: data,
|
|
26875
27501
|
loading: state.loading,
|
|
26876
|
-
pagination: _objectSpread$
|
|
27502
|
+
pagination: _objectSpread$F(_objectSpread$F({}, state.pagination), {}, {
|
|
26877
27503
|
showTotal: function showTotal(total, range) {
|
|
26878
27504
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
26879
27505
|
},
|
|
@@ -27193,7 +27819,7 @@ function BulkAction(_ref6) {
|
|
|
27193
27819
|
}
|
|
27194
27820
|
_context4.t0 = data;
|
|
27195
27821
|
_context4.next = 11;
|
|
27196
|
-
return apiInterface.update(_objectSpread$
|
|
27822
|
+
return apiInterface.update(_objectSpread$F(_objectSpread$F({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
27197
27823
|
case 11:
|
|
27198
27824
|
_context4.t1 = _context4.sent;
|
|
27199
27825
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -27306,8 +27932,8 @@ function SelectionText(_ref8) {
|
|
|
27306
27932
|
});
|
|
27307
27933
|
}
|
|
27308
27934
|
|
|
27309
|
-
function ownKeys$
|
|
27310
|
-
function _objectSpread$
|
|
27935
|
+
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; }
|
|
27936
|
+
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; }
|
|
27311
27937
|
function getColumnFilterProps (_ref) {
|
|
27312
27938
|
var filter = _ref.filter,
|
|
27313
27939
|
title = _ref.title;
|
|
@@ -27670,7 +28296,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
27670
28296
|
});
|
|
27671
28297
|
},
|
|
27672
28298
|
options: filter.map(function (f) {
|
|
27673
|
-
return _objectSpread$
|
|
28299
|
+
return _objectSpread$E(_objectSpread$E({}, f), {}, {
|
|
27674
28300
|
label: t(f.label)
|
|
27675
28301
|
});
|
|
27676
28302
|
})
|
|
@@ -27719,7 +28345,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
27719
28345
|
setDisplaySelectedvalues = _useState4[1];
|
|
27720
28346
|
var options = [];
|
|
27721
28347
|
options = filter.map(function (f) {
|
|
27722
|
-
return _objectSpread$
|
|
28348
|
+
return _objectSpread$E(_objectSpread$E({}, f), {}, {
|
|
27723
28349
|
label: t(f.label)
|
|
27724
28350
|
});
|
|
27725
28351
|
});
|
|
@@ -27793,8 +28419,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
27793
28419
|
};
|
|
27794
28420
|
};
|
|
27795
28421
|
|
|
27796
|
-
function ownKeys$
|
|
27797
|
-
function _objectSpread$
|
|
28422
|
+
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; }
|
|
28423
|
+
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; }
|
|
27798
28424
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
27799
28425
|
var columns = configuration.columns.filter(function (c) {
|
|
27800
28426
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -27847,7 +28473,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
27847
28473
|
}
|
|
27848
28474
|
function mapColumn(column, onUpdate) {
|
|
27849
28475
|
var _column$field, _column$children;
|
|
27850
|
-
return _objectSpread$
|
|
28476
|
+
return _objectSpread$D(_objectSpread$D(_objectSpread$D({}, column), {}, {
|
|
27851
28477
|
hidden: false,
|
|
27852
28478
|
width: column.width || 100,
|
|
27853
28479
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
@@ -27897,8 +28523,8 @@ function updateData (_ref) {
|
|
|
27897
28523
|
};
|
|
27898
28524
|
}
|
|
27899
28525
|
|
|
27900
|
-
function ownKeys$
|
|
27901
|
-
function _objectSpread$
|
|
28526
|
+
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; }
|
|
28527
|
+
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; }
|
|
27902
28528
|
function applyFilterAndSortation (_ref) {
|
|
27903
28529
|
var data = _ref.data,
|
|
27904
28530
|
filters = _ref.filters,
|
|
@@ -27913,7 +28539,7 @@ function applyFilterAndSortation (_ref) {
|
|
|
27913
28539
|
processedData = sort(sorter || [], processedData);
|
|
27914
28540
|
return {
|
|
27915
28541
|
data: processedData,
|
|
27916
|
-
pagination: _objectSpread$
|
|
28542
|
+
pagination: _objectSpread$C(_objectSpread$C({}, pagination), {}, {
|
|
27917
28543
|
total: processedData.length
|
|
27918
28544
|
})
|
|
27919
28545
|
};
|
|
@@ -27998,8 +28624,8 @@ function filter(f, data) {
|
|
|
27998
28624
|
}
|
|
27999
28625
|
|
|
28000
28626
|
var _excluded$6 = ["_id"];
|
|
28001
|
-
function ownKeys$
|
|
28002
|
-
function _objectSpread$
|
|
28627
|
+
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; }
|
|
28628
|
+
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; }
|
|
28003
28629
|
function useTableData$1 (_ref) {
|
|
28004
28630
|
var _configuration$apiInt;
|
|
28005
28631
|
var id = _ref.id;
|
|
@@ -28054,7 +28680,7 @@ function useTableData$1 (_ref) {
|
|
|
28054
28680
|
var _configuration$create;
|
|
28055
28681
|
if (!dataRow) return;
|
|
28056
28682
|
var id = v4();
|
|
28057
|
-
var processedDataRow = unflatten(_objectSpread$
|
|
28683
|
+
var processedDataRow = unflatten(_objectSpread$B({
|
|
28058
28684
|
_id: id,
|
|
28059
28685
|
ID: id
|
|
28060
28686
|
}, dataRow));
|
|
@@ -28066,11 +28692,11 @@ function useTableData$1 (_ref) {
|
|
|
28066
28692
|
newData = _updateData.data;
|
|
28067
28693
|
_updateData.prevDataRow;
|
|
28068
28694
|
_updateData.index;
|
|
28069
|
-
var newState = _objectSpread$
|
|
28695
|
+
var newState = _objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28070
28696
|
data: newData
|
|
28071
28697
|
});
|
|
28072
28698
|
if (!filterServerSide) {
|
|
28073
|
-
var res = applyFilterAndSortation(_objectSpread$
|
|
28699
|
+
var res = applyFilterAndSortation(_objectSpread$B(_objectSpread$B({}, filterData), {}, {
|
|
28074
28700
|
data: newData
|
|
28075
28701
|
}));
|
|
28076
28702
|
newState.data = res.data;
|
|
@@ -28082,33 +28708,33 @@ function useTableData$1 (_ref) {
|
|
|
28082
28708
|
var formData = new FormData();
|
|
28083
28709
|
processedDataRow._id;
|
|
28084
28710
|
var value = _objectWithoutProperties(processedDataRow, _excluded$6);
|
|
28085
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
28711
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$B(_objectSpread$B({}, catalogItem), {}, {
|
|
28086
28712
|
filterContex: filterContex,
|
|
28087
28713
|
value: JSON.stringify([value])
|
|
28088
28714
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
28089
28715
|
if (d && d.Result && d.Result == 'Success') return;
|
|
28090
|
-
setState(_objectSpread$
|
|
28716
|
+
setState(_objectSpread$B({}, oldState));
|
|
28091
28717
|
});
|
|
28092
28718
|
}, [state, catalogItem, filterData]);
|
|
28093
28719
|
useEffect(function () {
|
|
28094
28720
|
if (!catalogItem) return;
|
|
28095
|
-
setState(_objectSpread$
|
|
28721
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28096
28722
|
loading: true,
|
|
28097
|
-
mappingData: _objectSpread$
|
|
28723
|
+
mappingData: _objectSpread$B(_objectSpread$B({}, catalogItem), {}, {
|
|
28098
28724
|
filterContex: filterContex
|
|
28099
28725
|
})
|
|
28100
28726
|
}));
|
|
28101
28727
|
if (!filterServerSide) {
|
|
28102
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
28728
|
+
apiHandler.readList(configuration.mapping, _objectSpread$B(_objectSpread$B({}, catalogItem), {}, {
|
|
28103
28729
|
filterContex: filterContex
|
|
28104
28730
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
28105
28731
|
var newData = data.data.map(function (d) {
|
|
28106
|
-
return _objectSpread$
|
|
28732
|
+
return _objectSpread$B(_objectSpread$B({}, d), {}, {
|
|
28107
28733
|
_id: d._id || d.ID || nanoid()
|
|
28108
28734
|
});
|
|
28109
28735
|
});
|
|
28110
28736
|
onChange({
|
|
28111
|
-
pagination: _objectSpread$
|
|
28737
|
+
pagination: _objectSpread$B({}, state.pagination),
|
|
28112
28738
|
filters: {},
|
|
28113
28739
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
28114
28740
|
return c.defaultSortOrder;
|
|
@@ -28124,7 +28750,7 @@ function useTableData$1 (_ref) {
|
|
|
28124
28750
|
});
|
|
28125
28751
|
} else {
|
|
28126
28752
|
onChange({
|
|
28127
|
-
pagination: _objectSpread$
|
|
28753
|
+
pagination: _objectSpread$B({}, state.pagination),
|
|
28128
28754
|
filters: {},
|
|
28129
28755
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
28130
28756
|
return c.defaultSortOrder;
|
|
@@ -28140,17 +28766,17 @@ function useTableData$1 (_ref) {
|
|
|
28140
28766
|
}
|
|
28141
28767
|
}, [filterContex, catalogItem]);
|
|
28142
28768
|
var onChange = function onChange(p, dataParam) {
|
|
28143
|
-
setState(_objectSpread$
|
|
28769
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28144
28770
|
loading: true
|
|
28145
28771
|
}));
|
|
28146
28772
|
if (!filterServerSide) {
|
|
28147
28773
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
28148
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
28774
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$B(_objectSpread$B({}, p), {}, {
|
|
28149
28775
|
data: unfilteredData
|
|
28150
28776
|
})),
|
|
28151
28777
|
data = _applyFilterAndSortat.data,
|
|
28152
28778
|
pagination = _applyFilterAndSortat.pagination;
|
|
28153
|
-
setState(_objectSpread$
|
|
28779
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28154
28780
|
data: data,
|
|
28155
28781
|
pagination: pagination,
|
|
28156
28782
|
loading: false,
|
|
@@ -28161,20 +28787,20 @@ function useTableData$1 (_ref) {
|
|
|
28161
28787
|
sorter: p.sorter
|
|
28162
28788
|
});
|
|
28163
28789
|
} else {
|
|
28164
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
28790
|
+
apiHandler.readList(configuration.mapping, _objectSpread$B(_objectSpread$B({}, catalogItem), {}, {
|
|
28165
28791
|
filterContex: filterContex
|
|
28166
28792
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
28167
|
-
setState(_objectSpread$
|
|
28793
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28168
28794
|
data: data.data.map(function (dt) {
|
|
28169
|
-
return _objectSpread$
|
|
28795
|
+
return _objectSpread$B(_objectSpread$B({}, dt), {}, {
|
|
28170
28796
|
_id: dt._id || dt.ID || nanoid()
|
|
28171
28797
|
});
|
|
28172
28798
|
}),
|
|
28173
|
-
pagination: _objectSpread$
|
|
28799
|
+
pagination: _objectSpread$B(_objectSpread$B({}, p.pagination), {}, {
|
|
28174
28800
|
total: data.total
|
|
28175
28801
|
}),
|
|
28176
28802
|
loading: false,
|
|
28177
|
-
mappingData: _objectSpread$
|
|
28803
|
+
mappingData: _objectSpread$B(_objectSpread$B({}, catalogItem), {}, {
|
|
28178
28804
|
filterContex: filterContex
|
|
28179
28805
|
})
|
|
28180
28806
|
}));
|
|
@@ -28195,7 +28821,7 @@ function useTableData$1 (_ref) {
|
|
|
28195
28821
|
filters['_id'] = [id, 'eq', false];
|
|
28196
28822
|
_context.next = 4;
|
|
28197
28823
|
return apiHandler.readList(configuration.mapping, {
|
|
28198
|
-
pagination: _objectSpread$
|
|
28824
|
+
pagination: _objectSpread$B({}, state.pagination),
|
|
28199
28825
|
columns: configuration.columns,
|
|
28200
28826
|
filters: filters,
|
|
28201
28827
|
sorter: filterData.sorter
|
|
@@ -28214,7 +28840,7 @@ function useTableData$1 (_ref) {
|
|
|
28214
28840
|
};
|
|
28215
28841
|
}();
|
|
28216
28842
|
var onSelect = function onSelect(keys) {
|
|
28217
|
-
setState(_objectSpread$
|
|
28843
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28218
28844
|
selected: keys
|
|
28219
28845
|
}));
|
|
28220
28846
|
};
|
|
@@ -28224,7 +28850,7 @@ function useTableData$1 (_ref) {
|
|
|
28224
28850
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
28225
28851
|
while (1) switch (_context3.prev = _context3.next) {
|
|
28226
28852
|
case 0:
|
|
28227
|
-
setState(_objectSpread$
|
|
28853
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28228
28854
|
deleting: true
|
|
28229
28855
|
}));
|
|
28230
28856
|
newData = _toConsumableArray(state.data);
|
|
@@ -28239,7 +28865,7 @@ function useTableData$1 (_ref) {
|
|
|
28239
28865
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
28240
28866
|
return nd._id === state.selected[index];
|
|
28241
28867
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
28242
|
-
mappingData = _objectSpread$
|
|
28868
|
+
mappingData = _objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData);
|
|
28243
28869
|
_context2.next = 5;
|
|
28244
28870
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid);
|
|
28245
28871
|
case 5:
|
|
@@ -28289,7 +28915,7 @@ function useTableData$1 (_ref) {
|
|
|
28289
28915
|
}
|
|
28290
28916
|
_context3.next = 18;
|
|
28291
28917
|
return apiHandler.readList(configuration.mapping, {
|
|
28292
|
-
pagination: _objectSpread$
|
|
28918
|
+
pagination: _objectSpread$B(_objectSpread$B({}, state.pagination), {}, {
|
|
28293
28919
|
current: current
|
|
28294
28920
|
}),
|
|
28295
28921
|
columns: configuration.columns,
|
|
@@ -28301,11 +28927,11 @@ function useTableData$1 (_ref) {
|
|
|
28301
28927
|
newData = data.data;
|
|
28302
28928
|
total = data.total;
|
|
28303
28929
|
case 21:
|
|
28304
|
-
setState(_objectSpread$
|
|
28930
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28305
28931
|
selected: [],
|
|
28306
28932
|
deleting: false,
|
|
28307
28933
|
data: newData,
|
|
28308
|
-
pagination: _objectSpread$
|
|
28934
|
+
pagination: _objectSpread$B(_objectSpread$B({}, state.pagination), {}, {
|
|
28309
28935
|
current: current,
|
|
28310
28936
|
total: total
|
|
28311
28937
|
})
|
|
@@ -28321,12 +28947,12 @@ function useTableData$1 (_ref) {
|
|
|
28321
28947
|
};
|
|
28322
28948
|
}();
|
|
28323
28949
|
function setLoading() {
|
|
28324
|
-
setState(_objectSpread$
|
|
28950
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28325
28951
|
loading: true
|
|
28326
28952
|
}));
|
|
28327
28953
|
}
|
|
28328
|
-
return _objectSpread$
|
|
28329
|
-
configuration: _objectSpread$
|
|
28954
|
+
return _objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28955
|
+
configuration: _objectSpread$B(_objectSpread$B({}, configuration), {}, {
|
|
28330
28956
|
title: undefined
|
|
28331
28957
|
}),
|
|
28332
28958
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -28438,8 +29064,8 @@ function objectHash (obj) {
|
|
|
28438
29064
|
function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
28439
29065
|
function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0; } }
|
|
28440
29066
|
function _arrayLikeToArray$4(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
28441
|
-
function ownKeys$
|
|
28442
|
-
function _objectSpread$
|
|
29067
|
+
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; }
|
|
29068
|
+
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; }
|
|
28443
29069
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
28444
29070
|
function useTableData (_ref) {
|
|
28445
29071
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$filter4, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -28498,7 +29124,7 @@ function useTableData (_ref) {
|
|
|
28498
29124
|
var _useState13 = useState({
|
|
28499
29125
|
loading: true,
|
|
28500
29126
|
deleting: false,
|
|
28501
|
-
pagination: _objectSpread$
|
|
29127
|
+
pagination: _objectSpread$A({
|
|
28502
29128
|
current: 1,
|
|
28503
29129
|
pageSize: 20,
|
|
28504
29130
|
total: 0,
|
|
@@ -28507,7 +29133,7 @@ function useTableData (_ref) {
|
|
|
28507
29133
|
selected: [],
|
|
28508
29134
|
canDelete: !!apiHandler.canDelete,
|
|
28509
29135
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
28510
|
-
mappingData: _objectSpread$
|
|
29136
|
+
mappingData: _objectSpread$A(_objectSpread$A({}, parentData), {}, {
|
|
28511
29137
|
prefilter: {
|
|
28512
29138
|
select: globalFilter.select
|
|
28513
29139
|
},
|
|
@@ -28518,7 +29144,7 @@ function useTableData (_ref) {
|
|
|
28518
29144
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
28519
29145
|
state = _useState14[0],
|
|
28520
29146
|
setState = _useState14[1];
|
|
28521
|
-
var mappingData = _objectSpread$
|
|
29147
|
+
var mappingData = _objectSpread$A(_objectSpread$A(_objectSpread$A({}, parentData), state.data), {}, {
|
|
28522
29148
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
28523
29149
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
28524
29150
|
});
|
|
@@ -28557,7 +29183,7 @@ function useTableData (_ref) {
|
|
|
28557
29183
|
}
|
|
28558
29184
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
28559
29185
|
var newInitData = initData;
|
|
28560
|
-
var newState = _objectSpread$
|
|
29186
|
+
var newState = _objectSpread$A({}, state);
|
|
28561
29187
|
var selected = [];
|
|
28562
29188
|
if (configuration.deselectOnUpdate == false) {
|
|
28563
29189
|
selected = state.selected;
|
|
@@ -28574,7 +29200,7 @@ function useTableData (_ref) {
|
|
|
28574
29200
|
dataRow: dataRow
|
|
28575
29201
|
}),
|
|
28576
29202
|
_data = _updateData.data;
|
|
28577
|
-
newState = _objectSpread$
|
|
29203
|
+
newState = _objectSpread$A(_objectSpread$A({}, newState), {}, {
|
|
28578
29204
|
data: _data,
|
|
28579
29205
|
selected: selected
|
|
28580
29206
|
});
|
|
@@ -28586,8 +29212,8 @@ function useTableData (_ref) {
|
|
|
28586
29212
|
dataRow: dataRow
|
|
28587
29213
|
}),
|
|
28588
29214
|
nextInitData = _updateData2.data;
|
|
28589
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
28590
|
-
filters: _objectSpread$
|
|
29215
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$A(_objectSpread$A(_objectSpread$A({}, filterData), {}, {
|
|
29216
|
+
filters: _objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A({}, 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"])
|
|
28591
29217
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && (_configuration$filter7 = _configuration$filter7.toggle) !== null && _configuration$filter7 !== void 0 && _configuration$filter7.inQuery ? {
|
|
28592
29218
|
genericProps: globalFilter.toggle
|
|
28593
29219
|
} : undefined), {}, {
|
|
@@ -28597,7 +29223,7 @@ function useTableData (_ref) {
|
|
|
28597
29223
|
_data2 = _applyFilterAndSortat.data,
|
|
28598
29224
|
pagination = _applyFilterAndSortat.pagination;
|
|
28599
29225
|
newInitData = nextInitData;
|
|
28600
|
-
newState = _objectSpread$
|
|
29226
|
+
newState = _objectSpread$A(_objectSpread$A({}, newState), {}, {
|
|
28601
29227
|
pagination: pagination,
|
|
28602
29228
|
data: _data2,
|
|
28603
29229
|
selected: selected
|
|
@@ -28607,8 +29233,8 @@ function useTableData (_ref) {
|
|
|
28607
29233
|
if (apiHandler.canCreate) {
|
|
28608
29234
|
apiCreate(data).then(function (res) {
|
|
28609
29235
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
28610
|
-
initData && setInitData(_objectSpread$
|
|
28611
|
-
setState(_objectSpread$
|
|
29236
|
+
initData && setInitData(_objectSpread$A({}, initData));
|
|
29237
|
+
setState(_objectSpread$A({}, state));
|
|
28612
29238
|
}
|
|
28613
29239
|
});
|
|
28614
29240
|
}
|
|
@@ -28621,7 +29247,7 @@ function useTableData (_ref) {
|
|
|
28621
29247
|
var triggerRefresh = function triggerRefresh() {
|
|
28622
29248
|
var _configuration$filter8;
|
|
28623
29249
|
setError(undefined);
|
|
28624
|
-
var newGlobalFilter = _objectSpread$
|
|
29250
|
+
var newGlobalFilter = _objectSpread$A({}, globalFilter);
|
|
28625
29251
|
//on refresh update default filter, since global value can change
|
|
28626
29252
|
if ((_configuration$filter8 = configuration.filter) !== null && _configuration$filter8 !== void 0 && _configuration$filter8["default"]) {
|
|
28627
29253
|
var _configuration$filter9;
|
|
@@ -28632,7 +29258,7 @@ function useTableData (_ref) {
|
|
|
28632
29258
|
newGlobalFilter["default"] = _defaultFilter;
|
|
28633
29259
|
setGlobaFilter(newGlobalFilter);
|
|
28634
29260
|
}
|
|
28635
|
-
onChange(_objectSpread$
|
|
29261
|
+
onChange(_objectSpread$A({
|
|
28636
29262
|
pagination: state.pagination
|
|
28637
29263
|
}, filterData), newGlobalFilter, true);
|
|
28638
29264
|
};
|
|
@@ -28650,7 +29276,7 @@ function useTableData (_ref) {
|
|
|
28650
29276
|
order: c.defaultSortOrder
|
|
28651
29277
|
};
|
|
28652
29278
|
});
|
|
28653
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
29279
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
28654
29280
|
loading: false
|
|
28655
29281
|
}));else {
|
|
28656
29282
|
onChange({
|
|
@@ -28693,7 +29319,7 @@ function useTableData (_ref) {
|
|
|
28693
29319
|
case 0:
|
|
28694
29320
|
filters = {};
|
|
28695
29321
|
filters['_id'] = [id, 'eq', false];
|
|
28696
|
-
ssf = _objectSpread$
|
|
29322
|
+
ssf = _objectSpread$A({
|
|
28697
29323
|
pagination: {
|
|
28698
29324
|
current: 1,
|
|
28699
29325
|
pageSize: 1
|
|
@@ -28704,7 +29330,7 @@ function useTableData (_ref) {
|
|
|
28704
29330
|
genericProps: globalFilter.toggle
|
|
28705
29331
|
} : undefined);
|
|
28706
29332
|
_context2.next = 5;
|
|
28707
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
29333
|
+
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$A(_objectSpread$A({}, mappingData), state.mappingData), ssf);
|
|
28708
29334
|
case 5:
|
|
28709
29335
|
data = _context2.sent;
|
|
28710
29336
|
return _context2.abrupt("return", data);
|
|
@@ -28748,12 +29374,12 @@ function useTableData (_ref) {
|
|
|
28748
29374
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
28749
29375
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
28750
29376
|
overwriteMappingData = _args3.length > 4 ? _args3[4] : undefined;
|
|
28751
|
-
setState(_objectSpread$
|
|
29377
|
+
setState(_objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
28752
29378
|
mappingData: overwriteMappingData !== null && overwriteMappingData !== void 0 ? overwriteMappingData : state.mappingData,
|
|
28753
29379
|
loading: true
|
|
28754
29380
|
}));
|
|
28755
29381
|
currentData = initData;
|
|
28756
|
-
filterData = _objectSpread$
|
|
29382
|
+
filterData = _objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A({}, 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
|
|
28757
29383
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
|
|
28758
29384
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
28759
29385
|
_ref7[0];
|
|
@@ -28761,7 +29387,7 @@ function useTableData (_ref) {
|
|
|
28761
29387
|
return v != null;
|
|
28762
29388
|
}));
|
|
28763
29389
|
currentFilterHash = objectHash(filterData);
|
|
28764
|
-
currentPagination = _objectSpread$
|
|
29390
|
+
currentPagination = _objectSpread$A(_objectSpread$A({}, p.pagination), {}, {
|
|
28765
29391
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
28766
29392
|
});
|
|
28767
29393
|
filterHash.current = currentFilterHash;
|
|
@@ -28769,7 +29395,7 @@ function useTableData (_ref) {
|
|
|
28769
29395
|
_context3.next = 21;
|
|
28770
29396
|
break;
|
|
28771
29397
|
}
|
|
28772
|
-
ssf = _objectSpread$
|
|
29398
|
+
ssf = _objectSpread$A({
|
|
28773
29399
|
pagination: currentPagination,
|
|
28774
29400
|
columns: configuration.columns,
|
|
28775
29401
|
filters: filterData,
|
|
@@ -28778,12 +29404,12 @@ function useTableData (_ref) {
|
|
|
28778
29404
|
genericProps: prefilter.toggle
|
|
28779
29405
|
} : undefined);
|
|
28780
29406
|
_context3.next = 15;
|
|
28781
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
29407
|
+
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$A(_objectSpread$A({}, 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)));
|
|
28782
29408
|
case 15:
|
|
28783
29409
|
data = _context3.sent;
|
|
28784
|
-
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, _objectSpread$
|
|
29410
|
+
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, _objectSpread$A(_objectSpread$A({}, mappingData), state.mappingData), ssf);
|
|
28785
29411
|
currentData = data.data;
|
|
28786
|
-
currentPagination = _objectSpread$
|
|
29412
|
+
currentPagination = _objectSpread$A(_objectSpread$A({}, currentPagination), {}, {
|
|
28787
29413
|
total: data.total
|
|
28788
29414
|
});
|
|
28789
29415
|
_context3.next = 30;
|
|
@@ -28800,7 +29426,7 @@ function useTableData (_ref) {
|
|
|
28800
29426
|
currentData = _data3.data;
|
|
28801
29427
|
setInitData(currentData);
|
|
28802
29428
|
case 27:
|
|
28803
|
-
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$
|
|
29429
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$A(_objectSpread$A({}, p), {}, {
|
|
28804
29430
|
pagination: currentPagination,
|
|
28805
29431
|
filters: filterData,
|
|
28806
29432
|
data: currentData,
|
|
@@ -28809,11 +29435,11 @@ function useTableData (_ref) {
|
|
|
28809
29435
|
currentData = _data4;
|
|
28810
29436
|
currentPagination = pagination;
|
|
28811
29437
|
case 30:
|
|
28812
|
-
setState(_objectSpread$
|
|
29438
|
+
setState(_objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
28813
29439
|
loading: false,
|
|
28814
29440
|
data: currentData,
|
|
28815
29441
|
pagination: currentPagination,
|
|
28816
|
-
mappingData: _objectSpread$
|
|
29442
|
+
mappingData: _objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A({}, parentData), state.mappingData), overwriteMappingData), {}, {
|
|
28817
29443
|
prefilter: prefilter
|
|
28818
29444
|
}),
|
|
28819
29445
|
currentFetchUrl: currentUrl
|
|
@@ -28835,7 +29461,7 @@ function useTableData (_ref) {
|
|
|
28835
29461
|
};
|
|
28836
29462
|
}();
|
|
28837
29463
|
var onSelect = function onSelect(keys) {
|
|
28838
|
-
setState(_objectSpread$
|
|
29464
|
+
setState(_objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
28839
29465
|
selected: keys
|
|
28840
29466
|
}));
|
|
28841
29467
|
};
|
|
@@ -28846,7 +29472,7 @@ function useTableData (_ref) {
|
|
|
28846
29472
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
28847
29473
|
while (1) switch (_context5.prev = _context5.next) {
|
|
28848
29474
|
case 0:
|
|
28849
|
-
setState(_objectSpread$
|
|
29475
|
+
setState(_objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
28850
29476
|
deleting: true
|
|
28851
29477
|
}));
|
|
28852
29478
|
newData = _toConsumableArray(state.data);
|
|
@@ -28886,7 +29512,7 @@ function useTableData (_ref) {
|
|
|
28886
29512
|
} finally {
|
|
28887
29513
|
_iterator.f();
|
|
28888
29514
|
}
|
|
28889
|
-
mappingData = _objectSpread$
|
|
29515
|
+
mappingData = _objectSpread$A(_objectSpread$A(_objectSpread$A({}, mappingData), state.mappingData), mapToggle);
|
|
28890
29516
|
deleteResult = undefined;
|
|
28891
29517
|
_context4.prev = 7;
|
|
28892
29518
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -28976,12 +29602,12 @@ function useTableData (_ref) {
|
|
|
28976
29602
|
break;
|
|
28977
29603
|
}
|
|
28978
29604
|
_context5.next = 25;
|
|
28979
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
28980
|
-
pagination: _objectSpread$
|
|
29605
|
+
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$A(_objectSpread$A({}, mappingData), state.mappingData), _objectSpread$A({
|
|
29606
|
+
pagination: _objectSpread$A(_objectSpread$A({}, state.pagination), {}, {
|
|
28981
29607
|
current: current
|
|
28982
29608
|
}),
|
|
28983
29609
|
columns: configuration.columns,
|
|
28984
|
-
filters: _objectSpread$
|
|
29610
|
+
filters: _objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A(_objectSpread$A({}, 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"]),
|
|
28985
29611
|
sorter: filterData.sorter
|
|
28986
29612
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter18 = configuration.filter) !== null && _configuration$filter18 !== void 0 && (_configuration$filter18 = _configuration$filter18.toggle) !== null && _configuration$filter18 !== void 0 && _configuration$filter18.inQuery ? {
|
|
28987
29613
|
genericProps: globalFilter.toggle
|
|
@@ -28992,11 +29618,11 @@ function useTableData (_ref) {
|
|
|
28992
29618
|
total = data.total;
|
|
28993
29619
|
case 28:
|
|
28994
29620
|
setInitData(newInitData);
|
|
28995
|
-
setState(_objectSpread$
|
|
29621
|
+
setState(_objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
28996
29622
|
selected: [],
|
|
28997
29623
|
deleting: false,
|
|
28998
29624
|
data: newData,
|
|
28999
|
-
pagination: _objectSpread$
|
|
29625
|
+
pagination: _objectSpread$A(_objectSpread$A({}, state.pagination), {}, {
|
|
29000
29626
|
current: current === 0 ? 1 : current,
|
|
29001
29627
|
total: total
|
|
29002
29628
|
})
|
|
@@ -29017,14 +29643,14 @@ function useTableData (_ref) {
|
|
|
29017
29643
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
29018
29644
|
return;
|
|
29019
29645
|
}
|
|
29020
|
-
var newGlobalFilter = _objectSpread$
|
|
29646
|
+
var newGlobalFilter = _objectSpread$A({}, globalFilter);
|
|
29021
29647
|
if (value !== null && value !== void 0 && value.length) {
|
|
29022
29648
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
29023
29649
|
} else {
|
|
29024
29650
|
newGlobalFilter.select = {};
|
|
29025
29651
|
}
|
|
29026
29652
|
setGlobaFilter(newGlobalFilter);
|
|
29027
|
-
onChange(_objectSpread$
|
|
29653
|
+
onChange(_objectSpread$A({
|
|
29028
29654
|
pagination: state.pagination
|
|
29029
29655
|
}, filterData), newGlobalFilter);
|
|
29030
29656
|
};
|
|
@@ -29035,16 +29661,16 @@ function useTableData (_ref) {
|
|
|
29035
29661
|
return;
|
|
29036
29662
|
}
|
|
29037
29663
|
var toggleFilter = {};
|
|
29038
|
-
var mappingData = _objectSpread$
|
|
29664
|
+
var mappingData = _objectSpread$A({}, state.mappingData);
|
|
29039
29665
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
29040
29666
|
mappingData[f] = !globalFilter.toggle && configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : undefined;
|
|
29041
29667
|
toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
29042
29668
|
});
|
|
29043
|
-
var newGlobalFilter = _objectSpread$
|
|
29669
|
+
var newGlobalFilter = _objectSpread$A(_objectSpread$A({}, globalFilter), {}, {
|
|
29044
29670
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
29045
29671
|
});
|
|
29046
29672
|
setGlobaFilter(newGlobalFilter);
|
|
29047
|
-
onChange(_objectSpread$
|
|
29673
|
+
onChange(_objectSpread$A({
|
|
29048
29674
|
pagination: state.pagination
|
|
29049
29675
|
}, filterData), newGlobalFilter, true, true, mappingData);
|
|
29050
29676
|
};
|
|
@@ -29057,7 +29683,7 @@ function useTableData (_ref) {
|
|
|
29057
29683
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
29058
29684
|
return;
|
|
29059
29685
|
}
|
|
29060
|
-
var newGlobalFilter = _objectSpread$
|
|
29686
|
+
var newGlobalFilter = _objectSpread$A(_objectSpread$A({}, globalFilter), {}, {
|
|
29061
29687
|
search: {}
|
|
29062
29688
|
});
|
|
29063
29689
|
if (value) {
|
|
@@ -29071,7 +29697,7 @@ function useTableData (_ref) {
|
|
|
29071
29697
|
});
|
|
29072
29698
|
}
|
|
29073
29699
|
setGlobaFilter(newGlobalFilter);
|
|
29074
|
-
onChange(_objectSpread$
|
|
29700
|
+
onChange(_objectSpread$A({
|
|
29075
29701
|
pagination: state.pagination
|
|
29076
29702
|
}, filterData), newGlobalFilter);
|
|
29077
29703
|
};
|
|
@@ -29081,20 +29707,20 @@ function useTableData (_ref) {
|
|
|
29081
29707
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
29082
29708
|
return;
|
|
29083
29709
|
}
|
|
29084
|
-
var newGlobalFilter = _objectSpread$
|
|
29710
|
+
var newGlobalFilter = _objectSpread$A({}, globalFilter);
|
|
29085
29711
|
newGlobalFilter.timeStamp = {
|
|
29086
29712
|
fromTimeStamp: [from],
|
|
29087
29713
|
toTimeStamp: [to]
|
|
29088
29714
|
};
|
|
29089
29715
|
if (!configuration.filter.period.onlyAsMappingData) setGlobaFilter(newGlobalFilter);
|
|
29090
|
-
onChange(_objectSpread$
|
|
29716
|
+
onChange(_objectSpread$A({
|
|
29091
29717
|
pagination: state.pagination
|
|
29092
|
-
}, filterData), undefined, true, undefined, _objectSpread$
|
|
29718
|
+
}, filterData), undefined, true, undefined, _objectSpread$A(_objectSpread$A({}, state.mappingData), {}, {
|
|
29093
29719
|
from: from,
|
|
29094
29720
|
to: to
|
|
29095
29721
|
}));
|
|
29096
29722
|
};
|
|
29097
|
-
return _objectSpread$
|
|
29723
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
29098
29724
|
title: title,
|
|
29099
29725
|
configuration: configuration,
|
|
29100
29726
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -29136,8 +29762,8 @@ function StandardTable (_ref) {
|
|
|
29136
29762
|
});
|
|
29137
29763
|
}
|
|
29138
29764
|
|
|
29139
|
-
function ownKeys$
|
|
29140
|
-
function _objectSpread$
|
|
29765
|
+
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; }
|
|
29766
|
+
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; }
|
|
29141
29767
|
function Table (props) {
|
|
29142
29768
|
var root = useStore();
|
|
29143
29769
|
var variant = useMemo(function () {
|
|
@@ -29145,15 +29771,15 @@ function Table (props) {
|
|
|
29145
29771
|
return config.variant;
|
|
29146
29772
|
}, [props.id]);
|
|
29147
29773
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
29148
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
29774
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$z({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$z({}, props))]
|
|
29149
29775
|
});
|
|
29150
29776
|
}
|
|
29151
29777
|
|
|
29152
29778
|
function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
29153
29779
|
function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
|
|
29154
29780
|
function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
29155
|
-
function ownKeys$
|
|
29156
|
-
function _objectSpread$
|
|
29781
|
+
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; }
|
|
29782
|
+
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; }
|
|
29157
29783
|
function useAGGrid (_ref) {
|
|
29158
29784
|
var id = _ref.id,
|
|
29159
29785
|
filter = _ref.filter,
|
|
@@ -29247,7 +29873,7 @@ function useAGGrid (_ref) {
|
|
|
29247
29873
|
value = _ref3[1];
|
|
29248
29874
|
if (_idx == 0) {
|
|
29249
29875
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
29250
|
-
rdat.push(_objectSpread$
|
|
29876
|
+
rdat.push(_objectSpread$y(_objectSpread$y({}, rd), {}, {
|
|
29251
29877
|
grouping: [idx.toString()]
|
|
29252
29878
|
}));
|
|
29253
29879
|
var sp = key.split(':');
|
|
@@ -29390,8 +30016,8 @@ var value = "value-FCA-6";
|
|
|
29390
30016
|
var css_248z$k = ".overlay-lm0tm {\n position: absolute;\n z-index: 1;\n background-color: rgba(247,247,247,0.45882);\n height: 60vh;\n width: 100%;\n}\n.loader-LaXZy {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 50px;\n height: 50px;\n border: 3px solid rgba(0, 0, 0, 0.3);\n border-radius: 50%;\n border-top-color: #fff;\n animation: spin-qUdpu 1s ease-in-out infinite;\n -webkit-animation: spin-qUdpu 1s ease-in-out infinite;\n}\n.flex-yQdda {\n display: flex;\n}\n\n.bar-Y663f {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin-top: 7%;\n}\n\n.value-FCA-6 {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: -moz-fit-content;\n width: fit-content;\n}\n@keyframes spin-qUdpu {\n to {\n -webkit-transform: rotate(360deg);\n }\n}\n";
|
|
29391
30017
|
styleInject(css_248z$k);
|
|
29392
30018
|
|
|
29393
|
-
function ownKeys$
|
|
29394
|
-
function _objectSpread$
|
|
30019
|
+
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; }
|
|
30020
|
+
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; }
|
|
29395
30021
|
var AGChart = function AGChart(_ref) {
|
|
29396
30022
|
var data = _ref.data;
|
|
29397
30023
|
var groupedData = [];
|
|
@@ -29399,11 +30025,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
29399
30025
|
data.forEach(function (dt) {
|
|
29400
30026
|
if (dt.count == 0) return;
|
|
29401
30027
|
if (groupedData.length > dt.grouping[0]) {
|
|
29402
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
30028
|
+
groupedData[dt.grouping[0]].push(_objectSpread$x(_objectSpread$x({}, dt), {}, {
|
|
29403
30029
|
count: Number(dt.count)
|
|
29404
30030
|
}));
|
|
29405
30031
|
} else {
|
|
29406
|
-
groupedData.push([_objectSpread$
|
|
30032
|
+
groupedData.push([_objectSpread$x(_objectSpread$x({}, dt), {}, {
|
|
29407
30033
|
count: Number(dt.count)
|
|
29408
30034
|
})]);
|
|
29409
30035
|
}
|
|
@@ -29444,8 +30070,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
29444
30070
|
});
|
|
29445
30071
|
};
|
|
29446
30072
|
|
|
29447
|
-
function ownKeys$
|
|
29448
|
-
function _objectSpread$
|
|
30073
|
+
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; }
|
|
30074
|
+
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; }
|
|
29449
30075
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
29450
30076
|
var id = _ref.id,
|
|
29451
30077
|
filter = _ref.filter,
|
|
@@ -29538,7 +30164,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
29538
30164
|
});
|
|
29539
30165
|
});
|
|
29540
30166
|
}
|
|
29541
|
-
return _objectSpread$
|
|
30167
|
+
return _objectSpread$w(_objectSpread$w({}, column), {}, {
|
|
29542
30168
|
cellRenderer: renderer
|
|
29543
30169
|
});
|
|
29544
30170
|
});
|
|
@@ -29808,8 +30434,8 @@ var CustomText = function CustomText(_ref) {
|
|
|
29808
30434
|
};
|
|
29809
30435
|
var CustomText$1 = observer(CustomText);
|
|
29810
30436
|
|
|
29811
|
-
function ownKeys$
|
|
29812
|
-
function _objectSpread$
|
|
30437
|
+
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; }
|
|
30438
|
+
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; }
|
|
29813
30439
|
function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
29814
30440
|
function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
|
|
29815
30441
|
function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -29872,7 +30498,7 @@ function useFilterBoxData (id) {
|
|
|
29872
30498
|
} finally {
|
|
29873
30499
|
_iterator.f();
|
|
29874
30500
|
}
|
|
29875
|
-
return _objectSpread$
|
|
30501
|
+
return _objectSpread$v(_objectSpread$v({}, state), ob);
|
|
29876
30502
|
}
|
|
29877
30503
|
return {
|
|
29878
30504
|
configuration: configuration,
|
|
@@ -29886,8 +30512,8 @@ function useFilterBoxData (id) {
|
|
|
29886
30512
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
29887
30513
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
29888
30514
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
29889
|
-
function ownKeys$
|
|
29890
|
-
function _objectSpread$
|
|
30515
|
+
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; }
|
|
30516
|
+
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; }
|
|
29891
30517
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
29892
30518
|
var id = _ref.id,
|
|
29893
30519
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -29915,7 +30541,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
29915
30541
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
29916
30542
|
mode: "single",
|
|
29917
30543
|
apiInterface: filter.requestOptions,
|
|
29918
|
-
wholeData: _objectSpread$
|
|
30544
|
+
wholeData: _objectSpread$u(_objectSpread$u({}, state.filter), {}, {
|
|
29919
30545
|
tab: tab
|
|
29920
30546
|
}),
|
|
29921
30547
|
mapping: filter.requestMapping,
|
|
@@ -30147,8 +30773,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
30147
30773
|
return false;
|
|
30148
30774
|
});
|
|
30149
30775
|
|
|
30150
|
-
function ownKeys$
|
|
30151
|
-
function _objectSpread$
|
|
30776
|
+
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; }
|
|
30777
|
+
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; }
|
|
30152
30778
|
function useUIBuilderData (id) {
|
|
30153
30779
|
var save = undefined;
|
|
30154
30780
|
var root = useStore();
|
|
@@ -30180,7 +30806,7 @@ function useUIBuilderData (id) {
|
|
|
30180
30806
|
var configuration = _useMemo.configuration;
|
|
30181
30807
|
useEffect(function () {
|
|
30182
30808
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
30183
|
-
return setFilter(_objectSpread$
|
|
30809
|
+
return setFilter(_objectSpread$t(_objectSpread$t({}, filter), {}, {
|
|
30184
30810
|
sessionGuid: res
|
|
30185
30811
|
}));
|
|
30186
30812
|
});
|
|
@@ -30203,8 +30829,8 @@ function useUIBuilderData (id) {
|
|
|
30203
30829
|
};
|
|
30204
30830
|
}
|
|
30205
30831
|
|
|
30206
|
-
function ownKeys$
|
|
30207
|
-
function _objectSpread$
|
|
30832
|
+
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; }
|
|
30833
|
+
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; }
|
|
30208
30834
|
function UIBuilder(_ref) {
|
|
30209
30835
|
var id = _ref.id;
|
|
30210
30836
|
var state = useUIBuilderData(id);
|
|
@@ -30231,7 +30857,7 @@ function UIBuilder(_ref) {
|
|
|
30231
30857
|
override = {
|
|
30232
30858
|
value: newFilter[item.field],
|
|
30233
30859
|
setValue: function setValue(newVal) {
|
|
30234
|
-
var newFilter = _objectSpread$
|
|
30860
|
+
var newFilter = _objectSpread$s({}, state.filter);
|
|
30235
30861
|
newFilter[item.field] = newVal;
|
|
30236
30862
|
state.setFilter(newFilter);
|
|
30237
30863
|
}
|
|
@@ -30279,7 +30905,7 @@ function UIBuilder(_ref) {
|
|
|
30279
30905
|
case 'AGGrid':
|
|
30280
30906
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
30281
30907
|
id: item.id,
|
|
30282
|
-
filter: _objectSpread$
|
|
30908
|
+
filter: _objectSpread$s({
|
|
30283
30909
|
optionCodices: JSON.stringify(state.data)
|
|
30284
30910
|
}, state.filter),
|
|
30285
30911
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -30439,8 +31065,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
30439
31065
|
};
|
|
30440
31066
|
var OrgItem$1 = observer(OrgItem);
|
|
30441
31067
|
|
|
30442
|
-
function ownKeys$
|
|
30443
|
-
function _objectSpread$
|
|
31068
|
+
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; }
|
|
31069
|
+
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; }
|
|
30444
31070
|
function useTransformJson (_ref) {
|
|
30445
31071
|
var id = _ref.id;
|
|
30446
31072
|
var _useState = useState(),
|
|
@@ -30506,7 +31132,7 @@ function useTransformJson (_ref) {
|
|
|
30506
31132
|
}();
|
|
30507
31133
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
30508
31134
|
var _data$children;
|
|
30509
|
-
return _objectSpread$
|
|
31135
|
+
return _objectSpread$r(_objectSpread$r({}, data), {}, {
|
|
30510
31136
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
30511
31137
|
data: data,
|
|
30512
31138
|
configuration: configuration,
|
|
@@ -31167,8 +31793,8 @@ function useCatalogEditor (id) {
|
|
|
31167
31793
|
};
|
|
31168
31794
|
}
|
|
31169
31795
|
|
|
31170
|
-
function ownKeys$
|
|
31171
|
-
function _objectSpread$
|
|
31796
|
+
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; }
|
|
31797
|
+
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; }
|
|
31172
31798
|
function DragDropUpload(_ref) {
|
|
31173
31799
|
var api2Params = _ref.api2Params,
|
|
31174
31800
|
catalogId = _ref.catalogId,
|
|
@@ -31276,7 +31902,7 @@ function DragDropUpload(_ref) {
|
|
|
31276
31902
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
31277
31903
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
31278
31904
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
31279
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
31905
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$q(_objectSpread$q({}, props), {}, {
|
|
31280
31906
|
children: [/*#__PURE__*/jsx("p", {
|
|
31281
31907
|
className: "ant-upload-drag-icon",
|
|
31282
31908
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -31493,12 +32119,12 @@ function CatalogEditor(_ref) {
|
|
|
31493
32119
|
}
|
|
31494
32120
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
31495
32121
|
|
|
31496
|
-
function ownKeys$
|
|
31497
|
-
function _objectSpread$
|
|
32122
|
+
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; }
|
|
32123
|
+
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; }
|
|
31498
32124
|
var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(props, ref) {
|
|
31499
32125
|
var _root$contentStore$bo, _root$contentStore$ri;
|
|
31500
32126
|
var root = useStore();
|
|
31501
|
-
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$
|
|
32127
|
+
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
31502
32128
|
ref: ref,
|
|
31503
32129
|
darkMode: root.contentStore.theme == 'darkmode',
|
|
31504
32130
|
jwt: root.dataStore.jwt,
|
|
@@ -31509,8 +32135,8 @@ var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(pro
|
|
|
31509
32135
|
});
|
|
31510
32136
|
var Spreadsheet = observer(SpreadsheetWrapper);
|
|
31511
32137
|
|
|
31512
|
-
function ownKeys$
|
|
31513
|
-
function _objectSpread$
|
|
32138
|
+
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; }
|
|
32139
|
+
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; }
|
|
31514
32140
|
|
|
31515
32141
|
// Type definition for the context state
|
|
31516
32142
|
|
|
@@ -31532,14 +32158,14 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
31532
32158
|
loading: loading,
|
|
31533
32159
|
setOptions: function setOptions(options) {
|
|
31534
32160
|
var state = root.contextStore.getContext('enricher');
|
|
31535
|
-
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$
|
|
32161
|
+
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$o(_objectSpread$o({}, state[stateKey]), {}, {
|
|
31536
32162
|
options: options,
|
|
31537
32163
|
loading: false
|
|
31538
32164
|
})));
|
|
31539
32165
|
},
|
|
31540
32166
|
setLoading: function setLoading(loading) {
|
|
31541
32167
|
var state = root.contextStore.getContext('enricher');
|
|
31542
|
-
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$
|
|
32168
|
+
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$o(_objectSpread$o({}, state[stateKey]), {}, {
|
|
31543
32169
|
loading: loading
|
|
31544
32170
|
})));
|
|
31545
32171
|
}
|
|
@@ -31644,7 +32270,7 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
31644
32270
|
}, [urlPackageId, getContext().packageId, setSelectedPackage]);
|
|
31645
32271
|
|
|
31646
32272
|
// Return context + handlers
|
|
31647
|
-
return _objectSpread$
|
|
32273
|
+
return _objectSpread$o(_objectSpread$o({}, getContext()), {}, {
|
|
31648
32274
|
setSelectedSerie: setSelectedSerie,
|
|
31649
32275
|
setSelectedItem: setSelectedItem,
|
|
31650
32276
|
setSelectedFeature: setSelectedFeature,
|
|
@@ -31993,8 +32619,8 @@ function createTranslatedColumnConfig(field, headerName, languages) {
|
|
|
31993
32619
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
31994
32620
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
31995
32621
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
31996
|
-
function ownKeys$
|
|
31997
|
-
function _objectSpread$
|
|
32622
|
+
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; }
|
|
32623
|
+
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; }
|
|
31998
32624
|
|
|
31999
32625
|
/**
|
|
32000
32626
|
* Props for the useTools hook
|
|
@@ -32030,7 +32656,7 @@ var useTools = function useTools(_ref) {
|
|
|
32030
32656
|
conditionalTools = _ref.conditionalTools;
|
|
32031
32657
|
var root = useStore();
|
|
32032
32658
|
var createTool = function createTool(tool) {
|
|
32033
|
-
return _objectSpread$
|
|
32659
|
+
return _objectSpread$n({
|
|
32034
32660
|
startWidth: 600,
|
|
32035
32661
|
defaultPinned: true,
|
|
32036
32662
|
defaultOpen: false
|
|
@@ -32064,12 +32690,12 @@ var useTools = function useTools(_ref) {
|
|
|
32064
32690
|
name: 'Konfigurator',
|
|
32065
32691
|
type: 'Configurator',
|
|
32066
32692
|
where: 'right',
|
|
32067
|
-
parameters: _objectSpread$
|
|
32693
|
+
parameters: _objectSpread$n({
|
|
32068
32694
|
catalogId: catalogId,
|
|
32069
32695
|
packageId: packageId,
|
|
32070
32696
|
isIDMData: !isApi2 ? '1' : undefined
|
|
32071
32697
|
}, parameters),
|
|
32072
|
-
elementProps: catalogId ? _objectSpread$
|
|
32698
|
+
elementProps: catalogId ? _objectSpread$n({
|
|
32073
32699
|
// open configurator for idm catalog
|
|
32074
32700
|
useIDMService: true,
|
|
32075
32701
|
catalogId: catalogId,
|
|
@@ -32083,7 +32709,7 @@ var useTools = function useTools(_ref) {
|
|
|
32083
32709
|
// open configurator for api2 package (configurator light)
|
|
32084
32710
|
loadMask: true,
|
|
32085
32711
|
initItem: item === null || item === void 0 ? void 0 : item.typeNo
|
|
32086
|
-
} : _objectSpread$
|
|
32712
|
+
} : _objectSpread$n({
|
|
32087
32713
|
// open configurator for idm package
|
|
32088
32714
|
useEnricherService: true,
|
|
32089
32715
|
loadPackage: true,
|
|
@@ -32982,6 +33608,9 @@ var TablePackages = observer(function () {
|
|
|
32982
33608
|
editable: false,
|
|
32983
33609
|
pinned: 'left',
|
|
32984
33610
|
lockPinned: true,
|
|
33611
|
+
customParams: {
|
|
33612
|
+
nullFilter: true
|
|
33613
|
+
},
|
|
32985
33614
|
cellRendererParams: {
|
|
32986
33615
|
apiConfig: apiConfig,
|
|
32987
33616
|
modalState: modalState,
|
|
@@ -34561,6 +35190,8 @@ function getConfig(t) {
|
|
|
34561
35190
|
};
|
|
34562
35191
|
}
|
|
34563
35192
|
|
|
35193
|
+
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; }
|
|
35194
|
+
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; }
|
|
34564
35195
|
var ExclusivitySerie = function ExclusivitySerie() {
|
|
34565
35196
|
var _useTranslation = useTranslation(),
|
|
34566
35197
|
t = _useTranslation.t,
|
|
@@ -34687,19 +35318,24 @@ var ExclusivityTable = observer(function (_ref) {
|
|
|
34687
35318
|
};
|
|
34688
35319
|
}, [type, viewOnly]);
|
|
34689
35320
|
var oldDataRef = useRef();
|
|
34690
|
-
var
|
|
35321
|
+
var baseApplicationData = useMemo(function () {
|
|
35322
|
+
return {
|
|
35323
|
+
type: type,
|
|
35324
|
+
packageId: packageId,
|
|
35325
|
+
organizationId: organizationId
|
|
35326
|
+
};
|
|
35327
|
+
}, [type, packageId, organizationId]);
|
|
35328
|
+
var applicationDataWithSubTypeId = useMemo(function () {
|
|
34691
35329
|
if (type === 'eitems' && !selectedSerie) {
|
|
34692
35330
|
return oldDataRef.current;
|
|
34693
35331
|
}
|
|
34694
|
-
var newData = {
|
|
34695
|
-
type: type,
|
|
34696
|
-
packageId: packageId,
|
|
34697
|
-
organizationId: organizationId,
|
|
35332
|
+
var newData = _objectSpread$m(_objectSpread$m({}, baseApplicationData), {}, {
|
|
34698
35333
|
subTypeId: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id
|
|
34699
|
-
};
|
|
35334
|
+
});
|
|
34700
35335
|
oldDataRef.current = newData;
|
|
34701
35336
|
return newData;
|
|
34702
|
-
}, [
|
|
35337
|
+
}, [baseApplicationData, selectedSerie]);
|
|
35338
|
+
var applicationData = type === 'eseries' ? baseApplicationData : applicationDataWithSubTypeId;
|
|
34703
35339
|
var showTable = useMemo(function () {
|
|
34704
35340
|
return selectedPackage && (!['eitems'].includes(type) || type === 'eitems' && applicationData);
|
|
34705
35341
|
}, [type, applicationData, selectedPackage]);
|
|
@@ -34732,7 +35368,7 @@ var ExclusivityTable = observer(function (_ref) {
|
|
|
34732
35368
|
cellDataType: 'objectId'
|
|
34733
35369
|
}])
|
|
34734
35370
|
};
|
|
34735
|
-
}, [apiInterface,
|
|
35371
|
+
}, [apiInterface, config.colDef, viewOnly]);
|
|
34736
35372
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
34737
35373
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
34738
35374
|
title: /*#__PURE__*/jsxs("div", {
|
|
@@ -37722,6 +38358,46 @@ var TableCatalogs = observer(function () {
|
|
|
37722
38358
|
}
|
|
37723
38359
|
return action;
|
|
37724
38360
|
}()
|
|
38361
|
+
}, {
|
|
38362
|
+
icon: /*#__PURE__*/jsx(FilePdfOutlined, {}),
|
|
38363
|
+
action: function () {
|
|
38364
|
+
var _action2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
|
|
38365
|
+
var selectedNodes, url, alertTimeout;
|
|
38366
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
38367
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
38368
|
+
case 0:
|
|
38369
|
+
selectedNodes = _ref3.selectedNodes;
|
|
38370
|
+
url = apiConfig.idmService + '/v3.0/catalogs/' + selectedNodes[0].data._id + '/analyse/pdf'; // Show modal if download takes more than 3 seconds
|
|
38371
|
+
alertTimeout = setTimeout(function () {
|
|
38372
|
+
showLoadingModal(t('backoffice.idmEnricher.analyse.modaltext'));
|
|
38373
|
+
}, 3000);
|
|
38374
|
+
_context2.prev = 3;
|
|
38375
|
+
_context2.next = 6;
|
|
38376
|
+
return downloadFile(url, root.dataStore.jwt, 'application/pdf', selectedNodes[0].data.name + '.pdf');
|
|
38377
|
+
case 6:
|
|
38378
|
+
closeModal();
|
|
38379
|
+
_context2.next = 12;
|
|
38380
|
+
break;
|
|
38381
|
+
case 9:
|
|
38382
|
+
_context2.prev = 9;
|
|
38383
|
+
_context2.t0 = _context2["catch"](3);
|
|
38384
|
+
showErrorModal('File download failed:' + _context2.t0);
|
|
38385
|
+
case 12:
|
|
38386
|
+
_context2.prev = 12;
|
|
38387
|
+
// Clear the alert timeout once the download is complete or fails
|
|
38388
|
+
clearTimeout(alertTimeout);
|
|
38389
|
+
return _context2.finish(12);
|
|
38390
|
+
case 15:
|
|
38391
|
+
case "end":
|
|
38392
|
+
return _context2.stop();
|
|
38393
|
+
}
|
|
38394
|
+
}, _callee2, null, [[3, 9, 12, 15]]);
|
|
38395
|
+
}));
|
|
38396
|
+
function action(_x2) {
|
|
38397
|
+
return _action2.apply(this, arguments);
|
|
38398
|
+
}
|
|
38399
|
+
return action;
|
|
38400
|
+
}()
|
|
37725
38401
|
}];
|
|
37726
38402
|
}, []);
|
|
37727
38403
|
var configuration = useMemo(function () {
|
|
@@ -38522,7 +39198,7 @@ var useSeriesSelector = function useSeriesSelector(modules) {
|
|
|
38522
39198
|
// if the extend series data is already loaded, use it
|
|
38523
39199
|
isLoaded = !!((_seriesSelectorState$ = seriesSelectorState.options) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.find(function (option) {
|
|
38524
39200
|
return option.value === (newSerie === null || newSerie === void 0 ? void 0 : newSerie._id);
|
|
38525
|
-
})) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.data) !== null && _seriesSelectorState$ !== void 0 && _seriesSelectorState$.
|
|
39201
|
+
})) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.data) !== null && _seriesSelectorState$ !== void 0 && _seriesSelectorState$.lastUpdatedDate);
|
|
38526
39202
|
if (!isLoaded) {
|
|
38527
39203
|
_context.next = 6;
|
|
38528
39204
|
break;
|
|
@@ -38535,7 +39211,7 @@ var useSeriesSelector = function useSeriesSelector(modules) {
|
|
|
38535
39211
|
api = new _default$d({
|
|
38536
39212
|
type: 'SelectSimple',
|
|
38537
39213
|
apiInterface: {
|
|
38538
|
-
read: idmService + "/v3.0/catalogs/".concat(catalogId, "/series/").concat(newSerie._id, "?fields=seriesName[").concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo;pricefeaturegroups;pricefeaturegroupsDisplayTexts;pricefeaturegroupsKeys;pricefeaturegroupsKeysDisplayTexts")
|
|
39214
|
+
read: idmService + "/v3.0/catalogs/".concat(catalogId, "/series/").concat(newSerie._id, "?fields=seriesName[").concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo;pricefeaturegroups;pricefeaturegroupsDisplayTexts;pricefeaturegroupsKeys;pricefeaturegroupsKeysDisplayTexts;lastUpdatedDate")
|
|
38539
39215
|
}
|
|
38540
39216
|
}, root);
|
|
38541
39217
|
_context.next = 10;
|
|
@@ -39549,22 +40225,31 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
|
|
|
39549
40225
|
lockPinned: true,
|
|
39550
40226
|
defaultValue: false
|
|
39551
40227
|
}, {
|
|
39552
|
-
field: 'featureNo',
|
|
39553
40228
|
headerName: 'backoffice.idmCatalog.features.label.featureNo',
|
|
39554
|
-
|
|
40229
|
+
field: 'featureNo',
|
|
39555
40230
|
cellDataType: 'lookup',
|
|
39556
|
-
unique: true,
|
|
39557
40231
|
customParams: {
|
|
40232
|
+
nameField: 'featureText',
|
|
40233
|
+
filterCellType: 'number',
|
|
40234
|
+
displayLabelTemplate: '${value}',
|
|
40235
|
+
lookupLabelTemplate: '${name} (${value})',
|
|
39558
40236
|
apiInterface: {
|
|
39559
40237
|
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
|
|
39560
40238
|
},
|
|
39561
|
-
lookupValue: 'featureText',
|
|
39562
40239
|
lookupKey: 'featureNo',
|
|
40240
|
+
lookupValue: 'featureText',
|
|
40241
|
+
lookupKeyFilterType: {
|
|
40242
|
+
type: 'equals',
|
|
40243
|
+
filterType: 'number'
|
|
40244
|
+
},
|
|
40245
|
+
multiple: false,
|
|
39563
40246
|
translated: true,
|
|
39564
|
-
|
|
39565
|
-
insertLookup: true
|
|
39566
|
-
|
|
39567
|
-
|
|
40247
|
+
allowToAdd: true,
|
|
40248
|
+
insertLookup: true
|
|
40249
|
+
},
|
|
40250
|
+
additionalFields: ['featureText'],
|
|
40251
|
+
required: true,
|
|
40252
|
+
unique: true
|
|
39568
40253
|
}] : [{
|
|
39569
40254
|
headerName: 'backoffice.idmCatalog.features.label.featureNo',
|
|
39570
40255
|
field: 'featureNo',
|
|
@@ -39878,28 +40563,32 @@ var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
|
|
|
39878
40563
|
field: 'optionFreeText',
|
|
39879
40564
|
cellDataType: 'boolean'
|
|
39880
40565
|
}, {
|
|
39881
|
-
field: '
|
|
40566
|
+
field: 'featureNos',
|
|
39882
40567
|
headerName: 'backoffice.idmCatalogEditor.catalogoptions.label.featureIds',
|
|
39883
40568
|
cellDataType: 'lookup',
|
|
39884
40569
|
editable: true,
|
|
39885
40570
|
required: false,
|
|
39886
40571
|
customParams: {
|
|
39887
40572
|
nameField: 'featureIdsDisplayTexts',
|
|
39888
|
-
filterCellType: '
|
|
40573
|
+
filterCellType: 'number',
|
|
39889
40574
|
displayLabelTemplate: '${name} (${value})',
|
|
39890
40575
|
apiInterface: {
|
|
39891
40576
|
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
|
|
39892
40577
|
},
|
|
39893
40578
|
lookupValue: 'featureText',
|
|
39894
|
-
lookupKey: '
|
|
40579
|
+
lookupKey: 'featureNo',
|
|
39895
40580
|
lookupKeyFilterType: {
|
|
39896
40581
|
type: 'equals',
|
|
39897
|
-
filterType: '
|
|
40582
|
+
filterType: 'number'
|
|
39898
40583
|
},
|
|
40584
|
+
additionalMappings: [{
|
|
40585
|
+
lookupField: '_id',
|
|
40586
|
+
targetField: 'featureIds'
|
|
40587
|
+
}],
|
|
39899
40588
|
multiple: true,
|
|
39900
40589
|
translated: true
|
|
39901
40590
|
},
|
|
39902
|
-
additionalFields: ['featureIdsDisplayTexts'],
|
|
40591
|
+
additionalFields: ['featureIdsDisplayTexts', 'featureIds'],
|
|
39903
40592
|
isDictionary: true
|
|
39904
40593
|
}, {
|
|
39905
40594
|
headerName: 'backoffice.idmCatalog.items.label.validation',
|
|
@@ -42050,7 +42739,8 @@ var TablePriceFeatureGroups = observer(function () {
|
|
|
42050
42739
|
organizationId = _useModule.organizationId,
|
|
42051
42740
|
apiConfig = _useModule.apiConfig,
|
|
42052
42741
|
setSelectedItem = _useModule.setSelectedItem,
|
|
42053
|
-
setSelectedSerie = _useModule.setSelectedSerie
|
|
42742
|
+
setSelectedSerie = _useModule.setSelectedSerie,
|
|
42743
|
+
resetSeriesSelector = _useModule.resetSeriesSelector;
|
|
42054
42744
|
var _React$useState = React.useState(),
|
|
42055
42745
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
42056
42746
|
selectedPriceFeatureGroup = _React$useState2[0],
|
|
@@ -42137,6 +42827,12 @@ var TablePriceFeatureGroups = observer(function () {
|
|
|
42137
42827
|
if (current) {
|
|
42138
42828
|
setSelectedPriceFeatureGroup(_objectSpread$7({}, current.data));
|
|
42139
42829
|
}
|
|
42830
|
+
if (updates.length == 0 || updates.some(function (update) {
|
|
42831
|
+
var _update$oldData;
|
|
42832
|
+
return !((_update$oldData = update.oldData) !== null && _update$oldData !== void 0 && _update$oldData.priceFeatureGroupNo);
|
|
42833
|
+
})) {
|
|
42834
|
+
resetSeriesSelector();
|
|
42835
|
+
}
|
|
42140
42836
|
}
|
|
42141
42837
|
};
|
|
42142
42838
|
}, [selectedNodeId]);
|
|
@@ -42829,15 +43525,15 @@ function TableCollections () {
|
|
|
42829
43525
|
}, {
|
|
42830
43526
|
headerName: 'backoffice.idmEnricher.collections.label.validation',
|
|
42831
43527
|
children: [{
|
|
42832
|
-
headerName: 'backoffice.idmCatalog.general.label.
|
|
42833
|
-
field: '
|
|
43528
|
+
headerName: 'backoffice.idmCatalog.general.label.validFrom',
|
|
43529
|
+
field: 'validFrom',
|
|
42834
43530
|
cellDataType: 'dateString',
|
|
42835
43531
|
customParams: {
|
|
42836
43532
|
dateFormat: 'DD.MM.YYYY'
|
|
42837
43533
|
}
|
|
42838
43534
|
}, {
|
|
42839
|
-
headerName: 'backoffice.idmCatalog.general.label.
|
|
42840
|
-
field: '
|
|
43535
|
+
headerName: 'backoffice.idmCatalog.general.label.validUntil',
|
|
43536
|
+
field: 'validTo',
|
|
42841
43537
|
cellDataType: 'dateString',
|
|
42842
43538
|
customParams: {
|
|
42843
43539
|
dateFormat: 'DD.MM.YYYY'
|