@crystaldesign/diva-backoffice 25.13.0-beta.9 → 25.14.0-beta.1
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 +1487 -559
- 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/CommonComponents/UploadModal/ErrorDisplay.d.ts +12 -0
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/ErrorDisplay.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/types.d.ts +30 -0
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/useUploadState.d.ts +2 -2
- package/build/types/backoffice/src/ui/CommonComponents/UploadModal/useUploadState.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/Fields/FormList/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/Fields/Input/index.d.ts +1 -0
- package/build/types/backoffice/src/ui/Form/Fields/Input/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/IDMCollectionEditor/Tables/CollectionMembers.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, Tag, Layout, Drawer, ConfigProvider, theme } from 'antd';
|
|
5
5
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
6
6
|
import { observer } from 'mobx-react-lite';
|
|
7
7
|
import { getLogger, DivaError, useTranslation, useDivaCore, DivaUtils } from '@crystaldesign/diva-core';
|
|
@@ -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$18(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
161
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$18(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$18(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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$18(_objectSpread$18({}, 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$18(_objectSpread$18({}, 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$17(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
489
|
+
function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$17(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$17(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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$17(_objectSpread$17({}, 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$17({}, 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$17(_objectSpread$17({}, 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$17(_objectSpread$17({}, 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$17(_objectSpread$17({}, 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$16(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1275
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$16(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$16(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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$16({}, 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$15(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1753
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$15(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$15(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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$15(_objectSpread$15({}, 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,233 @@ 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', 'monthlyOrgRenderingLimit'],
|
|
9228
|
+
label: t('backoffice.form.organizationdetails.items.ai.monthlyOrgRenderingLimit'),
|
|
9229
|
+
type: 'number',
|
|
9230
|
+
permission: 'backoffice_admin_organizations',
|
|
9231
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9232
|
+
hidden: function hidden(data) {
|
|
9233
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9234
|
+
},
|
|
9235
|
+
disabled: function disabled(data) {
|
|
9236
|
+
var _data$settings;
|
|
9237
|
+
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;
|
|
9238
|
+
},
|
|
9239
|
+
onValueChange: function onValueChange(value, item, form) {
|
|
9240
|
+
if (value && typeof value === 'number') {
|
|
9241
|
+
// Compute all limits from monthly org limit
|
|
9242
|
+
form.setFieldValue(['settings', 'aiSettings', 'weeklyOrgRenderingLimit'], Math.round(value / 2));
|
|
9243
|
+
form.setFieldValue(['settings', 'aiSettings', 'dailyOrgRenderingLimit'], Math.round(value / 10));
|
|
9244
|
+
form.setFieldValue(['settings', 'aiSettings', 'monthlyUserRenderingLimit'], Math.round(value / 2));
|
|
9245
|
+
form.setFieldValue(['settings', 'aiSettings', 'weeklyUserRenderingLimit'], Math.round(value / 4));
|
|
9246
|
+
form.setFieldValue(['settings', 'aiSettings', 'dailyUserRenderingLimit'], Math.round(value / 20));
|
|
9247
|
+
var formattedValue = value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
9248
|
+
|
|
9249
|
+
// Calculate tiered customer pricing
|
|
9250
|
+
var calculateTieredPrice = function calculateTieredPrice(units) {
|
|
9251
|
+
var tiers = [{
|
|
9252
|
+
max: 200,
|
|
9253
|
+
price: 0.5
|
|
9254
|
+
}, {
|
|
9255
|
+
max: 500,
|
|
9256
|
+
price: 0.4
|
|
9257
|
+
}, {
|
|
9258
|
+
max: 1000,
|
|
9259
|
+
price: 0.32
|
|
9260
|
+
}, {
|
|
9261
|
+
max: 2500,
|
|
9262
|
+
price: 0.26
|
|
9263
|
+
}, {
|
|
9264
|
+
max: 5000,
|
|
9265
|
+
price: 0.22
|
|
9266
|
+
}, {
|
|
9267
|
+
max: 10000,
|
|
9268
|
+
price: 0.19
|
|
9269
|
+
}, {
|
|
9270
|
+
max: Infinity,
|
|
9271
|
+
price: 0.16
|
|
9272
|
+
}];
|
|
9273
|
+
var total = 0;
|
|
9274
|
+
var remaining = units;
|
|
9275
|
+
var previousMax = 0;
|
|
9276
|
+
for (var _i = 0, _tiers = tiers; _i < _tiers.length; _i++) {
|
|
9277
|
+
var tier = _tiers[_i];
|
|
9278
|
+
if (remaining <= 0) break;
|
|
9279
|
+
var unitsInTier = Math.min(remaining, tier.max - previousMax);
|
|
9280
|
+
total += unitsInTier * tier.price;
|
|
9281
|
+
remaining -= unitsInTier;
|
|
9282
|
+
previousMax = tier.max;
|
|
9283
|
+
}
|
|
9284
|
+
return total;
|
|
9285
|
+
};
|
|
9286
|
+
var customerPrice = calculateTieredPrice(value).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
9287
|
+
var avgPrice = (calculateTieredPrice(value) / value).toFixed(3);
|
|
9288
|
+
item.helpText = formattedValue + ' renderings = ~€' + customerPrice + ' customer price (avg €' + avgPrice + '/unit). Tiered: 0-200: €0.50, 201-500: €0.40, 501-1K: €0.32, 1K-2.5K: €0.26, 2.5K-5K: €0.22, 5K-10K: €0.19, 10K+: €0.16';
|
|
9289
|
+
}
|
|
9290
|
+
},
|
|
9291
|
+
helpText: 'Volume-based pricing: First 200 @ €0.50/unit, decreases to €0.16/unit after 10K. 1 unit = 1 Gemini rendering, OpenAI = 4 units. Changes auto-update other limits.'
|
|
9292
|
+
}, {
|
|
9293
|
+
name: ['settings', 'aiSettings', 'weeklyOrgRenderingLimit'],
|
|
9294
|
+
label: t('backoffice.form.organizationdetails.items.ai.weeklyOrgRenderingLimit'),
|
|
9295
|
+
type: 'number',
|
|
9296
|
+
permission: 'backoffice_admin_organizations',
|
|
9297
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9298
|
+
hidden: function hidden(data) {
|
|
9299
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9300
|
+
},
|
|
9301
|
+
disabled: function disabled(data) {
|
|
9302
|
+
var _data$settings2;
|
|
9303
|
+
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;
|
|
9304
|
+
},
|
|
9305
|
+
helpText: 'Auto-computed as monthlyOrg/2. Can be manually adjusted.'
|
|
9306
|
+
}, {
|
|
9307
|
+
name: ['settings', 'aiSettings', 'dailyOrgRenderingLimit'],
|
|
9308
|
+
label: t('backoffice.form.organizationdetails.items.ai.dailyOrgRenderingLimit'),
|
|
9309
|
+
type: 'number',
|
|
9310
|
+
permission: 'backoffice_admin_organizations',
|
|
9311
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9312
|
+
hidden: function hidden(data) {
|
|
9313
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9314
|
+
},
|
|
9315
|
+
disabled: function disabled(data) {
|
|
9316
|
+
var _data$settings3;
|
|
9317
|
+
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;
|
|
9318
|
+
},
|
|
9319
|
+
helpText: 'Auto-computed as monthlyOrg/10. Can be manually adjusted.'
|
|
9320
|
+
}, {
|
|
9321
|
+
name: ['settings', 'aiSettings', 'monthlyUserRenderingLimit'],
|
|
9322
|
+
label: t('backoffice.form.organizationdetails.items.ai.monthlyUserRenderingLimit'),
|
|
9323
|
+
type: 'number',
|
|
9324
|
+
permission: 'backoffice_admin_organizations',
|
|
9325
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9326
|
+
hidden: function hidden(data) {
|
|
9327
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9328
|
+
},
|
|
9329
|
+
disabled: function disabled(data) {
|
|
9330
|
+
var _data$settings4;
|
|
9331
|
+
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;
|
|
9332
|
+
},
|
|
9333
|
+
helpText: 'Auto-computed as monthlyOrg/2. Can be manually adjusted.'
|
|
9334
|
+
}, {
|
|
9335
|
+
name: ['settings', 'aiSettings', 'weeklyUserRenderingLimit'],
|
|
9336
|
+
label: t('backoffice.form.organizationdetails.items.ai.weeklyUserRenderingLimit'),
|
|
9337
|
+
type: 'number',
|
|
9338
|
+
permission: 'backoffice_admin_organizations',
|
|
9339
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9340
|
+
hidden: function hidden(data) {
|
|
9341
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9342
|
+
},
|
|
9343
|
+
disabled: function disabled(data) {
|
|
9344
|
+
var _data$settings5;
|
|
9345
|
+
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;
|
|
9346
|
+
},
|
|
9347
|
+
helpText: 'Auto-computed as monthlyOrg/4. Can be manually adjusted.'
|
|
9348
|
+
}, {
|
|
9349
|
+
name: ['settings', 'aiSettings', 'dailyUserRenderingLimit'],
|
|
9350
|
+
label: t('backoffice.form.organizationdetails.items.ai.dailyUserRenderingLimit'),
|
|
9351
|
+
type: 'number',
|
|
9352
|
+
permission: 'backoffice_admin_organizations',
|
|
9353
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9354
|
+
hidden: function hidden(data) {
|
|
9355
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9356
|
+
},
|
|
9357
|
+
disabled: function disabled(data) {
|
|
9358
|
+
var _data$settings6;
|
|
9359
|
+
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;
|
|
9360
|
+
},
|
|
9361
|
+
helpText: 'Auto-computed as monthlyOrg/20. Can be manually adjusted.'
|
|
9362
|
+
}, {
|
|
9363
|
+
name: ['settings', 'aiSettings', 'anonymousDailyIPLimit'],
|
|
9364
|
+
label: t('backoffice.form.organizationdetails.items.ai.anonymousDailyIPLimit'),
|
|
9365
|
+
type: 'number',
|
|
9366
|
+
permission: 'backoffice_admin_organizations',
|
|
9367
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
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
|
+
},
|
|
9371
|
+
helpText: 'anonymous enduser limit'
|
|
9372
|
+
}, {
|
|
9373
|
+
name: ['settings', 'aiSettings', 'loggedInDailyIPLimit'],
|
|
9374
|
+
label: t('backoffice.form.organizationdetails.items.ai.loggedInDailyIPLimit'),
|
|
9375
|
+
type: 'number',
|
|
9376
|
+
permission: 'backoffice_admin_organizations',
|
|
9377
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9378
|
+
hidden: function hidden(data) {
|
|
9379
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9380
|
+
},
|
|
9381
|
+
helpText: 'logged in enduser limit'
|
|
9382
|
+
}, {
|
|
9383
|
+
name: ['settings', 'aiSettings', 'leadRewardBonus'],
|
|
9384
|
+
label: t('backoffice.form.organizationdetails.items.ai.leadRewardBonus'),
|
|
9385
|
+
type: 'number',
|
|
9386
|
+
permission: 'backoffice_admin_organizations',
|
|
9387
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9388
|
+
hidden: function hidden(data) {
|
|
9389
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9390
|
+
}
|
|
9391
|
+
}, {
|
|
9392
|
+
name: ['settings', 'aiSettings', 'noLimit'],
|
|
9393
|
+
label: t('backoffice.form.organizationdetails.items.ai.noLimit'),
|
|
9394
|
+
type: 'checkbox',
|
|
9395
|
+
permission: 'backoffice_admin_organizations',
|
|
9396
|
+
tabgroup: t('backoffice.form.organizationdetails.items.ai.tabgroup'),
|
|
9397
|
+
defaultValue: false,
|
|
9398
|
+
hidden: function hidden(data) {
|
|
9399
|
+
return (data === null || data === void 0 ? void 0 : data.type) !== 'RETAILER' && (data === null || data === void 0 ? void 0 : data.parentType) !== 'RETAILER';
|
|
9400
|
+
}
|
|
9401
|
+
},
|
|
9402
|
+
// Theme Configuration
|
|
9403
|
+
{
|
|
9404
|
+
name: ['settings', 'theme', 'main'],
|
|
9405
|
+
label: t('backoffice.form.organizationdetails.items.theme.main'),
|
|
9406
|
+
type: 'input',
|
|
9407
|
+
tabgroup: t('backoffice.form.organizationdetails.items.theme.tabgroup'),
|
|
9408
|
+
placeholder: '#713434',
|
|
9409
|
+
permission: 'backoffice_admin_organizations'
|
|
9410
|
+
}, {
|
|
9411
|
+
name: ['settings', 'theme', 'light'],
|
|
9412
|
+
label: t('backoffice.form.organizationdetails.items.theme.main_light'),
|
|
9413
|
+
type: 'input',
|
|
9414
|
+
tabgroup: t('backoffice.form.organizationdetails.items.theme.tabgroup'),
|
|
9415
|
+
placeholder: '#e4b9b8',
|
|
9416
|
+
permission: 'backoffice_admin_organizations'
|
|
9417
|
+
}, {
|
|
9418
|
+
name: ['settings', 'theme', 'dark'],
|
|
9419
|
+
label: t('backoffice.form.organizationdetails.items.theme.main_dark'),
|
|
9420
|
+
type: 'input',
|
|
9421
|
+
tabgroup: t('backoffice.form.organizationdetails.items.theme.tabgroup'),
|
|
9422
|
+
placeholder: '#42090e',
|
|
9423
|
+
permission: 'backoffice_admin_organizations'
|
|
9424
|
+
}, {
|
|
9425
|
+
name: ['settings', 'theme', 'customCssVariables'],
|
|
9426
|
+
label: t('backoffice.form.organizationdetails.items.theme.custom.variables'),
|
|
9427
|
+
type: 'textarea',
|
|
9428
|
+
tabgroup: t('backoffice.form.organizationdetails.items.theme.tabgroup'),
|
|
9429
|
+
placeholder: '--my-custom-css-variable: #ff0000;',
|
|
9430
|
+
onLoad: function onLoad(data) {
|
|
9431
|
+
var _data$settings7;
|
|
9432
|
+
var customCssVariables = data === null || data === void 0 || (_data$settings7 = data.settings) === null || _data$settings7 === void 0 || (_data$settings7 = _data$settings7.theme) === null || _data$settings7 === void 0 ? void 0 : _data$settings7.customCssVariables;
|
|
9433
|
+
if (!customCssVariables || _typeof(customCssVariables) === 'object' && !Object.keys(customCssVariables).length) return data;
|
|
9434
|
+
if (_typeof(data.settings.theme.customCssVariables) === 'object') {
|
|
9435
|
+
data.settings.theme.customCssVariables = Object.entries(data.settings.theme.customCssVariables).map(function (_ref) {
|
|
9436
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
9437
|
+
key = _ref2[0],
|
|
9438
|
+
value = _ref2[1];
|
|
9439
|
+
return "".concat(key, ": ").concat(value, ";");
|
|
9440
|
+
}).join('\n');
|
|
9441
|
+
}
|
|
9442
|
+
return data;
|
|
9443
|
+
},
|
|
9444
|
+
permission: 'backoffice_admin_organizations'
|
|
8824
9445
|
}]
|
|
8825
9446
|
},
|
|
8826
9447
|
FromAffilateOrganizationDetails: {
|
|
@@ -13752,6 +14373,8 @@ function getIcon(icon) {
|
|
|
13752
14373
|
return /*#__PURE__*/jsx(TranslationOutlined, {});
|
|
13753
14374
|
case 'OrderedListOutlined':
|
|
13754
14375
|
return /*#__PURE__*/jsx(OrderedListOutlined, {});
|
|
14376
|
+
case 'OpenAIOutlined':
|
|
14377
|
+
return /*#__PURE__*/jsx(OpenAIOutlined, {});
|
|
13755
14378
|
case 'CommentOutlined':
|
|
13756
14379
|
return /*#__PURE__*/jsx(CommentOutlined, {});
|
|
13757
14380
|
case 'AlertOutlined':
|
|
@@ -14111,8 +14734,8 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
14111
14734
|
}]);
|
|
14112
14735
|
}();
|
|
14113
14736
|
|
|
14114
|
-
function ownKeys$
|
|
14115
|
-
function _objectSpread$
|
|
14737
|
+
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; }
|
|
14738
|
+
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; }
|
|
14116
14739
|
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
14740
|
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
14741
|
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 +14846,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
14223
14846
|
if (index >= 0) {
|
|
14224
14847
|
this._additionalMenuElements[index] = {
|
|
14225
14848
|
key: key,
|
|
14226
|
-
element: _objectSpread$
|
|
14849
|
+
element: _objectSpread$14(_objectSpread$14({}, this._additionalMenuElements[index].element), {}, {
|
|
14227
14850
|
items: items,
|
|
14228
14851
|
selected: selected
|
|
14229
14852
|
})
|
|
@@ -14274,7 +14897,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
14274
14897
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
14275
14898
|
this.root.navigate('/' + path);
|
|
14276
14899
|
}
|
|
14277
|
-
this._menuElement1 = _objectSpread$
|
|
14900
|
+
this._menuElement1 = _objectSpread$14(_objectSpread$14({}, this.menuElement1), {}, {
|
|
14278
14901
|
selected: this._selectedMenuKeys[0]
|
|
14279
14902
|
});
|
|
14280
14903
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -14530,7 +15153,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
14530
15153
|
return items.filter(function (item) {
|
|
14531
15154
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
14532
15155
|
}).map(function (item) {
|
|
14533
|
-
return _objectSpread$
|
|
15156
|
+
return _objectSpread$14(_objectSpread$14({}, item), {}, {
|
|
14534
15157
|
items: item.items ? _this5.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
14535
15158
|
subMenu: item.subMenu ? _this5.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
14536
15159
|
});
|
|
@@ -14625,6 +15248,12 @@ var menu = [{
|
|
|
14625
15248
|
path: 'contentitems',
|
|
14626
15249
|
label: 'backoffice.menu.items.label.ContentItems',
|
|
14627
15250
|
icon: 'OrderedListOutlined'
|
|
15251
|
+
}, {
|
|
15252
|
+
id: 'TablePrompts',
|
|
15253
|
+
path: 'prompts',
|
|
15254
|
+
label: 'backoffice.menu.items.label.Prompts',
|
|
15255
|
+
icon: 'OpenAIOutlined',
|
|
15256
|
+
permission: 'backoffice_prompts'
|
|
14628
15257
|
}, {
|
|
14629
15258
|
id: 'idmTables',
|
|
14630
15259
|
path: 'idm',
|
|
@@ -15240,11 +15869,11 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15240
15869
|
this._rootStore = _rootStore;
|
|
15241
15870
|
_defineProperty(this, "executeDownload", /*#__PURE__*/function () {
|
|
15242
15871
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
15243
|
-
var data, action, catalogCodex, dealerId, currentUrl, _iterator, _step, _loop, download;
|
|
15872
|
+
var data, action, catalogCodex, dealerId, currentUrl, sessionGuid, _iterator, _step, _loop, download;
|
|
15244
15873
|
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
15245
15874
|
while (1) switch (_context2.prev = _context2.next) {
|
|
15246
15875
|
case 0:
|
|
15247
|
-
data = _ref.data, action = _ref.action, catalogCodex = _ref.catalogCodex, dealerId = _ref.dealerId, currentUrl = _ref.currentUrl;
|
|
15876
|
+
data = _ref.data, action = _ref.action, catalogCodex = _ref.catalogCodex, dealerId = _ref.dealerId, currentUrl = _ref.currentUrl, sessionGuid = _ref.sessionGuid;
|
|
15248
15877
|
if (!(action.actionType == 'CsvExport' && currentUrl)) {
|
|
15249
15878
|
_context2.next = 6;
|
|
15250
15879
|
break;
|
|
@@ -15263,63 +15892,98 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15263
15892
|
_context2.prev = 8;
|
|
15264
15893
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
15265
15894
|
var _download$params, _data$fileFormat, _data$fileUrl;
|
|
15266
|
-
var url;
|
|
15895
|
+
var _this$_rootStore, file, blob, url;
|
|
15267
15896
|
return _regeneratorRuntime.wrap(function _loop$(_context) {
|
|
15268
15897
|
while (1) switch (_context.prev = _context.next) {
|
|
15269
15898
|
case 0:
|
|
15270
15899
|
download = _step.value;
|
|
15271
15900
|
_context.t0 = download.type;
|
|
15272
|
-
_context.next = _context.t0 === '
|
|
15901
|
+
_context.next = _context.t0 === 'api2file' ? 4 : _context.t0 === 'url' ? 21 : _context.t0 === 'field' ? 25 : _context.t0 === 'prefab' ? 32 : _context.t0 === 'request' ? 37 : 41;
|
|
15273
15902
|
break;
|
|
15274
15903
|
case 4:
|
|
15904
|
+
_context.prev = 4;
|
|
15905
|
+
_context.next = 7;
|
|
15906
|
+
return fetch(download.url.replace('${catalogCodex}', catalogCodex).toString(), {
|
|
15907
|
+
method: 'GET',
|
|
15908
|
+
headers: {
|
|
15909
|
+
authorization: "Bearer ".concat((_this$_rootStore = _this._rootStore) === null || _this$_rootStore === void 0 ? void 0 : _this$_rootStore.dataStore.jwt),
|
|
15910
|
+
SessionGuid: sessionGuid,
|
|
15911
|
+
'content-type': 'application/json'
|
|
15912
|
+
}
|
|
15913
|
+
});
|
|
15914
|
+
case 7:
|
|
15915
|
+
file = _context.sent;
|
|
15916
|
+
if (file.ok) {
|
|
15917
|
+
_context.next = 11;
|
|
15918
|
+
break;
|
|
15919
|
+
}
|
|
15920
|
+
LOG$d.error(new DivaError("Failed to download file: ".concat(download.fileName, ". Status: ").concat(file.status, " ").concat(file.statusText)));
|
|
15921
|
+
// Optionally, notify the user here
|
|
15922
|
+
return _context.abrupt("break", 41);
|
|
15923
|
+
case 11:
|
|
15924
|
+
_context.next = 13;
|
|
15925
|
+
return file.blob();
|
|
15926
|
+
case 13:
|
|
15927
|
+
blob = _context.sent;
|
|
15928
|
+
DownloadStore.downloadBlob(blob, download.fileName);
|
|
15929
|
+
_context.next = 20;
|
|
15930
|
+
break;
|
|
15931
|
+
case 17:
|
|
15932
|
+
_context.prev = 17;
|
|
15933
|
+
_context.t1 = _context["catch"](4);
|
|
15934
|
+
LOG$d.error(new DivaError("Error during file download (".concat(download.fileName, "):") + _context.t1));
|
|
15935
|
+
// Optionally, notify the user here
|
|
15936
|
+
case 20:
|
|
15937
|
+
return _context.abrupt("break", 41);
|
|
15938
|
+
case 21:
|
|
15275
15939
|
if (_this.checkCondition(download, data)) {
|
|
15276
|
-
_context.next =
|
|
15940
|
+
_context.next = 23;
|
|
15277
15941
|
break;
|
|
15278
15942
|
}
|
|
15279
|
-
return _context.abrupt("break",
|
|
15280
|
-
case
|
|
15943
|
+
return _context.abrupt("break", 41);
|
|
15944
|
+
case 23:
|
|
15281
15945
|
window.location.href = download.url;
|
|
15282
|
-
return _context.abrupt("break",
|
|
15283
|
-
case
|
|
15946
|
+
return _context.abrupt("break", 41);
|
|
15947
|
+
case 25:
|
|
15284
15948
|
if (_this.checkCondition(download, data)) {
|
|
15285
|
-
_context.next =
|
|
15949
|
+
_context.next = 27;
|
|
15286
15950
|
break;
|
|
15287
15951
|
}
|
|
15288
|
-
return _context.abrupt("break",
|
|
15289
|
-
case
|
|
15952
|
+
return _context.abrupt("break", 41);
|
|
15953
|
+
case 27:
|
|
15290
15954
|
url = new URL(data[download.field]);
|
|
15291
15955
|
(_download$params = download.params) === null || _download$params === void 0 || _download$params.forEach(function (param) {
|
|
15292
15956
|
url.searchParams.append(param.name, param.value);
|
|
15293
15957
|
});
|
|
15294
|
-
_context.next =
|
|
15958
|
+
_context.next = 31;
|
|
15295
15959
|
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
|
|
15960
|
+
case 31:
|
|
15961
|
+
return _context.abrupt("break", 41);
|
|
15962
|
+
case 32:
|
|
15299
15963
|
if (_this.checkCondition(download, data)) {
|
|
15300
|
-
_context.next =
|
|
15964
|
+
_context.next = 34;
|
|
15301
15965
|
break;
|
|
15302
15966
|
}
|
|
15303
|
-
return _context.abrupt("break",
|
|
15304
|
-
case
|
|
15305
|
-
_context.next =
|
|
15967
|
+
return _context.abrupt("break", 41);
|
|
15968
|
+
case 34:
|
|
15969
|
+
_context.next = 36;
|
|
15306
15970
|
return _this.connectionFile(download, data, download.url, catalogCodex, dealerId);
|
|
15307
|
-
case
|
|
15308
|
-
return _context.abrupt("break",
|
|
15309
|
-
case
|
|
15971
|
+
case 36:
|
|
15972
|
+
return _context.abrupt("break", 41);
|
|
15973
|
+
case 37:
|
|
15310
15974
|
if (_this.checkCondition(download, data)) {
|
|
15311
|
-
_context.next =
|
|
15975
|
+
_context.next = 39;
|
|
15312
15976
|
break;
|
|
15313
15977
|
}
|
|
15314
|
-
return _context.abrupt("break",
|
|
15315
|
-
case
|
|
15316
|
-
_context.next =
|
|
15978
|
+
return _context.abrupt("break", 41);
|
|
15979
|
+
case 39:
|
|
15980
|
+
_context.next = 41;
|
|
15317
15981
|
return _this.downloadRequest(download, data);
|
|
15318
|
-
case
|
|
15982
|
+
case 41:
|
|
15319
15983
|
case "end":
|
|
15320
15984
|
return _context.stop();
|
|
15321
15985
|
}
|
|
15322
|
-
}, _loop);
|
|
15986
|
+
}, _loop, null, [[4, 17]]);
|
|
15323
15987
|
});
|
|
15324
15988
|
_iterator.s();
|
|
15325
15989
|
case 11:
|
|
@@ -15363,7 +16027,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15363
16027
|
key: "donwloadFile",
|
|
15364
16028
|
value: function () {
|
|
15365
16029
|
var _donwloadFile = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(url, name) {
|
|
15366
|
-
var _this$
|
|
16030
|
+
var _this$_rootStore2;
|
|
15367
16031
|
var file, blob;
|
|
15368
16032
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
15369
16033
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -15372,7 +16036,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15372
16036
|
return fetch(url.toString(), {
|
|
15373
16037
|
method: 'GET',
|
|
15374
16038
|
headers: {
|
|
15375
|
-
authorization: "Bearer ".concat((_this$
|
|
16039
|
+
authorization: "Bearer ".concat((_this$_rootStore2 = this._rootStore) === null || _this$_rootStore2 === void 0 ? void 0 : _this$_rootStore2.dataStore.jwt),
|
|
15376
16040
|
'content-type': 'application/json'
|
|
15377
16041
|
}
|
|
15378
16042
|
});
|
|
@@ -15503,7 +16167,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15503
16167
|
key: "downloadRequest",
|
|
15504
16168
|
value: function () {
|
|
15505
16169
|
var _downloadRequest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(download, data) {
|
|
15506
|
-
var _this$
|
|
16170
|
+
var _this$_rootStore3;
|
|
15507
16171
|
var url, result, contentType, contentDisposition, fileName, fileNameMatch, blob, base64File, a, mimeType, res;
|
|
15508
16172
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
15509
16173
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -15519,7 +16183,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15519
16183
|
return fetch(url, {
|
|
15520
16184
|
method: 'GET',
|
|
15521
16185
|
headers: {
|
|
15522
|
-
authorization: "Bearer ".concat((_this$
|
|
16186
|
+
authorization: "Bearer ".concat((_this$_rootStore3 = this._rootStore) === null || _this$_rootStore3 === void 0 ? void 0 : _this$_rootStore3.dataStore.jwt),
|
|
15523
16187
|
'content-type': 'application/json',
|
|
15524
16188
|
Accept: 'application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, */*'
|
|
15525
16189
|
}
|
|
@@ -15616,7 +16280,8 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
15616
16280
|
data: dt,
|
|
15617
16281
|
action: props.action,
|
|
15618
16282
|
catalogCodex: props.catalogCodex,
|
|
15619
|
-
dealerId: props.dealerId
|
|
16283
|
+
dealerId: props.dealerId,
|
|
16284
|
+
sessionGuid: props.sessionGuid
|
|
15620
16285
|
}));
|
|
15621
16286
|
if (!(promises.length == 10)) {
|
|
15622
16287
|
_context7.next = 12;
|
|
@@ -15717,8 +16382,8 @@ var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
15717
16382
|
return _createClass(_default);
|
|
15718
16383
|
}(_default$d);
|
|
15719
16384
|
|
|
15720
|
-
function ownKeys$
|
|
15721
|
-
function _objectSpread$
|
|
16385
|
+
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; }
|
|
16386
|
+
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; }
|
|
15722
16387
|
var LOG$c = getLogger('Backoffice', 'ContextStore');
|
|
15723
16388
|
|
|
15724
16389
|
/**
|
|
@@ -15753,7 +16418,7 @@ var ContextStore = /*#__PURE__*/function () {
|
|
|
15753
16418
|
key: "updateContext",
|
|
15754
16419
|
value: function updateContext(contextId, updates) {
|
|
15755
16420
|
var currentState = this.contexts.get(contextId) || {};
|
|
15756
|
-
var updatedState = _objectSpread$
|
|
16421
|
+
var updatedState = _objectSpread$13(_objectSpread$13({}, currentState), updates);
|
|
15757
16422
|
this.contexts.set(contextId, updatedState);
|
|
15758
16423
|
LOG$c.debug("Updated context ".concat(contextId), {
|
|
15759
16424
|
updatedState: updatedState
|
|
@@ -16385,8 +17050,8 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
16385
17050
|
}]);
|
|
16386
17051
|
}();
|
|
16387
17052
|
|
|
16388
|
-
function ownKeys$
|
|
16389
|
-
function _objectSpread$
|
|
17053
|
+
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; }
|
|
17054
|
+
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; }
|
|
16390
17055
|
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
17056
|
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
17057
|
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 +17167,7 @@ function useFormData (_ref) {
|
|
|
16502
17167
|
multipleEditingData = inboundData;
|
|
16503
17168
|
}
|
|
16504
17169
|
return {
|
|
16505
|
-
loadedData: _onLoadFields(_objectSpread$
|
|
17170
|
+
loadedData: _onLoadFields(_objectSpread$12({}, dt)),
|
|
16506
17171
|
multipleEditingData: multipleEditingData
|
|
16507
17172
|
};
|
|
16508
17173
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -16529,7 +17194,7 @@ function useFormData (_ref) {
|
|
|
16529
17194
|
setFieldErrors = _useState20[1];
|
|
16530
17195
|
useEffect(function () {
|
|
16531
17196
|
var _loadedData$_id2;
|
|
16532
|
-
setState(_objectSpread$
|
|
17197
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
16533
17198
|
data: loadedData,
|
|
16534
17199
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
16535
17200
|
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 +17296,7 @@ function useFormData (_ref) {
|
|
|
16631
17296
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
16632
17297
|
while (1) switch (_context2.prev = _context2.next) {
|
|
16633
17298
|
case 0:
|
|
16634
|
-
newData = merge(_objectSpread$
|
|
17299
|
+
newData = merge(_objectSpread$12({}, state.data), values);
|
|
16635
17300
|
if (!skipApi) {
|
|
16636
17301
|
_context2.next = 3;
|
|
16637
17302
|
break;
|
|
@@ -16641,7 +17306,7 @@ function useFormData (_ref) {
|
|
|
16641
17306
|
root.actions.toggleLoading('saving_form');
|
|
16642
17307
|
_context2.prev = 4;
|
|
16643
17308
|
_context2.next = 7;
|
|
16644
|
-
return setDynamicFields(_objectSpread$
|
|
17309
|
+
return setDynamicFields(_objectSpread$12({}, state.data), newData);
|
|
16645
17310
|
case 7:
|
|
16646
17311
|
newData = _context2.sent;
|
|
16647
17312
|
_context2.next = 10;
|
|
@@ -16656,7 +17321,7 @@ function useFormData (_ref) {
|
|
|
16656
17321
|
root.actions.toggleLoading('saving_form');
|
|
16657
17322
|
throw _context2.t0;
|
|
16658
17323
|
case 17:
|
|
16659
|
-
setState(_objectSpread$
|
|
17324
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
16660
17325
|
loading: true
|
|
16661
17326
|
}));
|
|
16662
17327
|
finalData = state.data;
|
|
@@ -16709,14 +17374,14 @@ function useFormData (_ref) {
|
|
|
16709
17374
|
_context2.next = 47;
|
|
16710
17375
|
break;
|
|
16711
17376
|
}
|
|
16712
|
-
setFieldErrors(_objectSpread$
|
|
17377
|
+
setFieldErrors(_objectSpread$12(_objectSpread$12({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
16713
17378
|
return _context2.abrupt("return", undefined);
|
|
16714
17379
|
case 47:
|
|
16715
17380
|
throw _context2.t1;
|
|
16716
17381
|
case 48:
|
|
16717
17382
|
_context2.prev = 48;
|
|
16718
17383
|
root.actions.toggleLoading('saving_form');
|
|
16719
|
-
setState(_objectSpread$
|
|
17384
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
16720
17385
|
data: finalData,
|
|
16721
17386
|
loading: false
|
|
16722
17387
|
}));
|
|
@@ -16746,7 +17411,7 @@ function useFormData (_ref) {
|
|
|
16746
17411
|
}
|
|
16747
17412
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
16748
17413
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
16749
|
-
var wholeData = Object.assign(_objectSpread$
|
|
17414
|
+
var wholeData = Object.assign(_objectSpread$12({}, state.data), _objectSpread$12({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
16750
17415
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
16751
17416
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
16752
17417
|
setHiddenRequiredDisabled(newState);
|
|
@@ -16759,18 +17424,41 @@ function useFormData (_ref) {
|
|
|
16759
17424
|
}
|
|
16760
17425
|
};
|
|
16761
17426
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
16762
|
-
|
|
17427
|
+
if (id) {
|
|
17428
|
+
var _item$onValueChange;
|
|
17429
|
+
var item = getItem(id !== null && id !== void 0 ? id : '');
|
|
17430
|
+
item === null || item === void 0 || (_item$onValueChange = item.onValueChange) === null || _item$onValueChange === void 0 || _item$onValueChange.call(item, value, item, state.form);
|
|
17431
|
+
}
|
|
17432
|
+
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$12({}, state.data), state.form.getFieldsValue(), mergeCustomizer);
|
|
16763
17433
|
if (id) {
|
|
16764
17434
|
setFieldInObject(id, data, value);
|
|
16765
|
-
var newFieldErrors = _objectSpread$
|
|
17435
|
+
var newFieldErrors = _objectSpread$12({}, fieldErrors);
|
|
16766
17436
|
delete newFieldErrors[id.toString()];
|
|
16767
17437
|
setFieldErrors(newFieldErrors);
|
|
16768
17438
|
}
|
|
16769
|
-
setState(_objectSpread$
|
|
17439
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
16770
17440
|
data: data
|
|
16771
17441
|
}));
|
|
16772
17442
|
return data;
|
|
16773
17443
|
};
|
|
17444
|
+
var getItem = function getItem(id) {
|
|
17445
|
+
var items = selectedItems;
|
|
17446
|
+
var _iterator2 = _createForOfIteratorHelper$k(items),
|
|
17447
|
+
_step2;
|
|
17448
|
+
try {
|
|
17449
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
17450
|
+
var item = _step2.value;
|
|
17451
|
+
if (item.name.toString() === id.toString()) {
|
|
17452
|
+
return item;
|
|
17453
|
+
}
|
|
17454
|
+
}
|
|
17455
|
+
} catch (err) {
|
|
17456
|
+
_iterator2.e(err);
|
|
17457
|
+
} finally {
|
|
17458
|
+
_iterator2.f();
|
|
17459
|
+
}
|
|
17460
|
+
return undefined;
|
|
17461
|
+
};
|
|
16774
17462
|
|
|
16775
17463
|
//if at an array an entry got added or deleted, its handeled by and so we take the data from the formdata
|
|
16776
17464
|
var mergeCustomizer = function mergeCustomizer(obj, src) {
|
|
@@ -16798,12 +17486,12 @@ function useFormData (_ref) {
|
|
|
16798
17486
|
var _value$value;
|
|
16799
17487
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
16800
17488
|
if (configuration.itemSelectorReset) {
|
|
16801
|
-
setState(_objectSpread$
|
|
17489
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
16802
17490
|
data: _defineProperty({}, name, val)
|
|
16803
17491
|
}));
|
|
16804
17492
|
} else {
|
|
16805
|
-
setState(_objectSpread$
|
|
16806
|
-
data: _objectSpread$
|
|
17493
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17494
|
+
data: _objectSpread$12(_objectSpread$12({}, state.data), {}, _defineProperty({}, name, val))
|
|
16807
17495
|
}));
|
|
16808
17496
|
}
|
|
16809
17497
|
setSelectedItemsIndex(idx);
|
|
@@ -16814,12 +17502,12 @@ function useFormData (_ref) {
|
|
|
16814
17502
|
var val = _ref6.value;
|
|
16815
17503
|
if (value === val) {
|
|
16816
17504
|
if (configuration.itemSelectorReset) {
|
|
16817
|
-
setState(_objectSpread$
|
|
17505
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
16818
17506
|
data: _defineProperty({}, name, val)
|
|
16819
17507
|
}));
|
|
16820
17508
|
} else {
|
|
16821
|
-
setState(_objectSpread$
|
|
16822
|
-
data: _objectSpread$
|
|
17509
|
+
setState(_objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17510
|
+
data: _objectSpread$12(_objectSpread$12({}, state.data), {}, _defineProperty({}, name, val))
|
|
16823
17511
|
}));
|
|
16824
17512
|
}
|
|
16825
17513
|
setSelectedItemsIndex(idx);
|
|
@@ -16835,19 +17523,19 @@ function useFormData (_ref) {
|
|
|
16835
17523
|
}
|
|
16836
17524
|
function _preSaveProcess() {
|
|
16837
17525
|
_preSaveProcess = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data, items) {
|
|
16838
|
-
var
|
|
17526
|
+
var _iterator4, _step4, item, itemName, media, mediaItemRefIdPath, urlPath, arrayData, i, _iterator5, _step5, _media;
|
|
16839
17527
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
16840
17528
|
while (1) switch (_context4.prev = _context4.next) {
|
|
16841
17529
|
case 0:
|
|
16842
|
-
|
|
17530
|
+
_iterator4 = _createForOfIteratorHelper$k(items);
|
|
16843
17531
|
_context4.prev = 1;
|
|
16844
|
-
|
|
17532
|
+
_iterator4.s();
|
|
16845
17533
|
case 3:
|
|
16846
|
-
if ((
|
|
17534
|
+
if ((_step4 = _iterator4.n()).done) {
|
|
16847
17535
|
_context4.next = 37;
|
|
16848
17536
|
break;
|
|
16849
17537
|
}
|
|
16850
|
-
item =
|
|
17538
|
+
item = _step4.value;
|
|
16851
17539
|
itemName = typeof item.name == 'string' ? [item.name] : item.name;
|
|
16852
17540
|
if (item !== null && item !== void 0 && item.onSave) {
|
|
16853
17541
|
data = item.onSave(data);
|
|
@@ -16919,21 +17607,21 @@ function useFormData (_ref) {
|
|
|
16919
17607
|
case 39:
|
|
16920
17608
|
_context4.prev = 39;
|
|
16921
17609
|
_context4.t0 = _context4["catch"](1);
|
|
16922
|
-
|
|
17610
|
+
_iterator4.e(_context4.t0);
|
|
16923
17611
|
case 42:
|
|
16924
17612
|
_context4.prev = 42;
|
|
16925
|
-
|
|
17613
|
+
_iterator4.f();
|
|
16926
17614
|
return _context4.finish(42);
|
|
16927
17615
|
case 45:
|
|
16928
|
-
|
|
17616
|
+
_iterator5 = _createForOfIteratorHelper$k(removedMedias);
|
|
16929
17617
|
_context4.prev = 46;
|
|
16930
|
-
|
|
17618
|
+
_iterator5.s();
|
|
16931
17619
|
case 48:
|
|
16932
|
-
if ((
|
|
17620
|
+
if ((_step5 = _iterator5.n()).done) {
|
|
16933
17621
|
_context4.next = 54;
|
|
16934
17622
|
break;
|
|
16935
17623
|
}
|
|
16936
|
-
_media =
|
|
17624
|
+
_media = _step5.value;
|
|
16937
17625
|
_context4.next = 52;
|
|
16938
17626
|
return _media["delete"]();
|
|
16939
17627
|
case 52:
|
|
@@ -16945,10 +17633,10 @@ function useFormData (_ref) {
|
|
|
16945
17633
|
case 56:
|
|
16946
17634
|
_context4.prev = 56;
|
|
16947
17635
|
_context4.t1 = _context4["catch"](46);
|
|
16948
|
-
|
|
17636
|
+
_iterator5.e(_context4.t1);
|
|
16949
17637
|
case 59:
|
|
16950
17638
|
_context4.prev = 59;
|
|
16951
|
-
|
|
17639
|
+
_iterator5.f();
|
|
16952
17640
|
return _context4.finish(59);
|
|
16953
17641
|
case 62:
|
|
16954
17642
|
case "end":
|
|
@@ -16963,7 +17651,7 @@ function useFormData (_ref) {
|
|
|
16963
17651
|
}
|
|
16964
17652
|
function _setDynamicFields() {
|
|
16965
17653
|
_setDynamicFields = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(oldData, newData) {
|
|
16966
|
-
var items, getDynamicValue, _getDynamicValue,
|
|
17654
|
+
var items, getDynamicValue, _getDynamicValue, _iterator6, _step6, item, oldDynamicValue, newDynamicValue;
|
|
16967
17655
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
16968
17656
|
while (1) switch (_context6.prev = _context6.next) {
|
|
16969
17657
|
case 0:
|
|
@@ -17008,15 +17696,15 @@ function useFormData (_ref) {
|
|
|
17008
17696
|
return _getDynamicValue.apply(this, arguments);
|
|
17009
17697
|
};
|
|
17010
17698
|
items = selectedItems !== null && selectedItems !== void 0 ? selectedItems : configuration.items;
|
|
17011
|
-
|
|
17699
|
+
_iterator6 = _createForOfIteratorHelper$k(items);
|
|
17012
17700
|
_context6.prev = 4;
|
|
17013
|
-
|
|
17701
|
+
_iterator6.s();
|
|
17014
17702
|
case 6:
|
|
17015
|
-
if ((
|
|
17703
|
+
if ((_step6 = _iterator6.n()).done) {
|
|
17016
17704
|
_context6.next = 19;
|
|
17017
17705
|
break;
|
|
17018
17706
|
}
|
|
17019
|
-
item =
|
|
17707
|
+
item = _step6.value;
|
|
17020
17708
|
if (!(item.dynamic && typeof item.name == 'string')) {
|
|
17021
17709
|
_context6.next = 17;
|
|
17022
17710
|
break;
|
|
@@ -17043,10 +17731,10 @@ function useFormData (_ref) {
|
|
|
17043
17731
|
case 21:
|
|
17044
17732
|
_context6.prev = 21;
|
|
17045
17733
|
_context6.t0 = _context6["catch"](4);
|
|
17046
|
-
|
|
17734
|
+
_iterator6.e(_context6.t0);
|
|
17047
17735
|
case 24:
|
|
17048
17736
|
_context6.prev = 24;
|
|
17049
|
-
|
|
17737
|
+
_iterator6.f();
|
|
17050
17738
|
return _context6.finish(24);
|
|
17051
17739
|
case 27:
|
|
17052
17740
|
return _context6.abrupt("return", newData);
|
|
@@ -17097,7 +17785,7 @@ function useFormData (_ref) {
|
|
|
17097
17785
|
for (var i = 0; i < configuration.tools.length; i++) {
|
|
17098
17786
|
var _tool$defaultOpen;
|
|
17099
17787
|
var tool = configuration.tools[i];
|
|
17100
|
-
tools.push(_objectSpread$
|
|
17788
|
+
tools.push(_objectSpread$12(_objectSpread$12({}, tool), {}, {
|
|
17101
17789
|
parameters: {
|
|
17102
17790
|
data: state.data
|
|
17103
17791
|
},
|
|
@@ -17115,19 +17803,19 @@ function useFormData (_ref) {
|
|
|
17115
17803
|
}, [state.data]);
|
|
17116
17804
|
var _keepRemovedMediaItem = /*#__PURE__*/function () {
|
|
17117
17805
|
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data, items) {
|
|
17118
|
-
var
|
|
17806
|
+
var _iterator3, _step3, item, itemName, media, mediaItemRefIdPath, urlPath, mediaItemRefId, url, mediaItem, arrayData, i;
|
|
17119
17807
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
17120
17808
|
while (1) switch (_context3.prev = _context3.next) {
|
|
17121
17809
|
case 0:
|
|
17122
|
-
|
|
17810
|
+
_iterator3 = _createForOfIteratorHelper$k(items);
|
|
17123
17811
|
_context3.prev = 1;
|
|
17124
|
-
|
|
17812
|
+
_iterator3.s();
|
|
17125
17813
|
case 3:
|
|
17126
|
-
if ((
|
|
17814
|
+
if ((_step3 = _iterator3.n()).done) {
|
|
17127
17815
|
_context3.next = 28;
|
|
17128
17816
|
break;
|
|
17129
17817
|
}
|
|
17130
|
-
item =
|
|
17818
|
+
item = _step3.value;
|
|
17131
17819
|
itemName = typeof item.name == 'string' ? [item.name] : item.name;
|
|
17132
17820
|
if (!(item.type == 'media')) {
|
|
17133
17821
|
_context3.next = 11;
|
|
@@ -17195,10 +17883,10 @@ function useFormData (_ref) {
|
|
|
17195
17883
|
case 30:
|
|
17196
17884
|
_context3.prev = 30;
|
|
17197
17885
|
_context3.t0 = _context3["catch"](1);
|
|
17198
|
-
|
|
17886
|
+
_iterator3.e(_context3.t0);
|
|
17199
17887
|
case 33:
|
|
17200
17888
|
_context3.prev = 33;
|
|
17201
|
-
|
|
17889
|
+
_iterator3.f();
|
|
17202
17890
|
return _context3.finish(33);
|
|
17203
17891
|
case 36:
|
|
17204
17892
|
case "end":
|
|
@@ -17216,7 +17904,7 @@ function useFormData (_ref) {
|
|
|
17216
17904
|
})) return;
|
|
17217
17905
|
setRemovedMedias([].concat(_toConsumableArray(removedMedias), [media]));
|
|
17218
17906
|
};
|
|
17219
|
-
return _objectSpread$
|
|
17907
|
+
return _objectSpread$12(_objectSpread$12({}, state), {}, {
|
|
17220
17908
|
getIsHidden: getIsHidden,
|
|
17221
17909
|
setUsedPreset: setUsedPreset,
|
|
17222
17910
|
configuration: configuration,
|
|
@@ -17333,8 +18021,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
17333
18021
|
};
|
|
17334
18022
|
|
|
17335
18023
|
var _excluded$9 = ["key", "name"];
|
|
17336
|
-
function ownKeys
|
|
17337
|
-
function _objectSpread
|
|
18024
|
+
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; }
|
|
18025
|
+
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; }
|
|
17338
18026
|
var FormList$2 = function FormList(_ref) {
|
|
17339
18027
|
var _item$initialValue;
|
|
17340
18028
|
var value = _ref.value,
|
|
@@ -17358,66 +18046,72 @@ var FormList$2 = function FormList(_ref) {
|
|
|
17358
18046
|
var add = function add(a) {
|
|
17359
18047
|
a();
|
|
17360
18048
|
};
|
|
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", {
|
|
18049
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
18050
|
+
children: [/*#__PURE__*/jsx(Divider, {
|
|
18051
|
+
orientation: 'left',
|
|
18052
|
+
children: Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name)
|
|
18053
|
+
}), /*#__PURE__*/jsx(Form$2.List, {
|
|
18054
|
+
name: absoluteName,
|
|
18055
|
+
initialValue: (_item$initialValue = item.initialValue) !== null && _item$initialValue !== void 0 ? _item$initialValue : value,
|
|
18056
|
+
children: function children(fields, _ref2) {
|
|
18057
|
+
var a = _ref2.add,
|
|
18058
|
+
r = _ref2.remove;
|
|
18059
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
18060
|
+
children: [fields.map(function (_ref3) {
|
|
18061
|
+
var key = _ref3.key,
|
|
18062
|
+
name = _ref3.name,
|
|
18063
|
+
restField = _objectWithoutProperties(_ref3, _excluded$9);
|
|
18064
|
+
return /*#__PURE__*/jsxs("div", {
|
|
18065
|
+
id: key.toString(),
|
|
17382
18066
|
style: {
|
|
17383
|
-
|
|
18067
|
+
display: 'flex'
|
|
17384
18068
|
},
|
|
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
|
-
|
|
18069
|
+
children: [!item.disablePushOrPop && /*#__PURE__*/jsx(MinusCircleOutlined, {
|
|
18070
|
+
onClick: function onClick() {
|
|
18071
|
+
remove(name, r);
|
|
18072
|
+
}
|
|
18073
|
+
}), /*#__PURE__*/jsx("div", {
|
|
18074
|
+
style: {
|
|
18075
|
+
flexGrow: 1
|
|
18076
|
+
},
|
|
18077
|
+
children: item.items.map(function (i, idx) {
|
|
18078
|
+
var _state$fieldErrors$n$;
|
|
18079
|
+
var n = [name].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate && postFixName ? Array.isArray(postFixName) ? postFixName : [postFixName] : []));
|
|
18080
|
+
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
18081
|
+
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
18082
|
+
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
18083
|
+
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$11(_objectSpread$11({}, restField), {}, {
|
|
18084
|
+
id: n.join(),
|
|
18085
|
+
key: n.join(),
|
|
18086
|
+
name: n,
|
|
18087
|
+
rules: state.getRules(i, state.data),
|
|
18088
|
+
label: getLabel(i, t),
|
|
18089
|
+
valuePropName: i.type == 'checkbox' ? 'checked' : 'value',
|
|
18090
|
+
initialValue: i === null || i === void 0 ? void 0 : i.defaultValue,
|
|
18091
|
+
hasFeedback: !!state.fieldErrors[n.toString()],
|
|
18092
|
+
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
18093
|
+
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
18094
|
+
hidden: hidden
|
|
18095
|
+
}), getElement(_objectSpread$11(_objectSpread$11({}, i), {}, {
|
|
18096
|
+
name: n
|
|
18097
|
+
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
18098
|
+
})
|
|
18099
|
+
})]
|
|
18100
|
+
}, key);
|
|
18101
|
+
}), !item.disablePushOrPop && /*#__PURE__*/jsx(Form$2.Item, {
|
|
18102
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
18103
|
+
type: "dashed",
|
|
18104
|
+
onClick: function onClick() {
|
|
18105
|
+
return add(a);
|
|
18106
|
+
},
|
|
18107
|
+
block: true,
|
|
18108
|
+
icon: /*#__PURE__*/jsx(PlusOutlined, {}),
|
|
18109
|
+
children: t('backoffice.add_field')
|
|
18110
|
+
})
|
|
18111
|
+
})]
|
|
18112
|
+
});
|
|
18113
|
+
}
|
|
18114
|
+
})]
|
|
17421
18115
|
});
|
|
17422
18116
|
};
|
|
17423
18117
|
var FormList$3 = observer(FormList$2);
|
|
@@ -17632,8 +18326,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
17632
18326
|
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
18327
|
styleInject(css_248z$x);
|
|
17634
18328
|
|
|
17635
|
-
function ownKeys$
|
|
17636
|
-
function _objectSpread$
|
|
18329
|
+
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; }
|
|
18330
|
+
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; }
|
|
17637
18331
|
var SubTitle = function SubTitle(_ref) {
|
|
17638
18332
|
var _item$orientation, _item$buttonIds;
|
|
17639
18333
|
var item = _ref.item,
|
|
@@ -17642,7 +18336,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
17642
18336
|
t = _useTranslation.t;
|
|
17643
18337
|
return /*#__PURE__*/jsx(Divider, {
|
|
17644
18338
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
17645
|
-
style: _objectSpread$
|
|
18339
|
+
style: _objectSpread$10({}, item.style),
|
|
17646
18340
|
children: /*#__PURE__*/jsxs("div", {
|
|
17647
18341
|
className: wrapper$6,
|
|
17648
18342
|
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) {
|
|
@@ -17668,6 +18362,7 @@ var InputComponent = function InputComponent(_ref, ref) {
|
|
|
17668
18362
|
var item = _ref.item,
|
|
17669
18363
|
data = _ref.data,
|
|
17670
18364
|
value = _ref.value,
|
|
18365
|
+
absoluteName = _ref.absoluteName,
|
|
17671
18366
|
_onChange = _ref.onChange;
|
|
17672
18367
|
var _useState = useState((_item$value = item.value) !== null && _item$value !== void 0 ? _item$value : value),
|
|
17673
18368
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -17684,7 +18379,7 @@ var InputComponent = function InputComponent(_ref, ref) {
|
|
|
17684
18379
|
var onPwChange = function onPwChange(e) {
|
|
17685
18380
|
var input = e.target.value;
|
|
17686
18381
|
setPwValue(input);
|
|
17687
|
-
_onChange === null || _onChange === void 0 || _onChange(
|
|
18382
|
+
_onChange === null || _onChange === void 0 || _onChange(absoluteName, e.target.value);
|
|
17688
18383
|
setShowContent(true);
|
|
17689
18384
|
};
|
|
17690
18385
|
var onFocus = function onFocus() {
|
|
@@ -17726,7 +18421,7 @@ var InputComponent = function InputComponent(_ref, ref) {
|
|
|
17726
18421
|
value: item.type === 'dateinput' ? new Date((_item$value5 = item.value) !== null && _item$value5 !== void 0 ? _item$value5 : value).toLocaleString().replace('Invalid Date', '') : (_item$value6 = item.value) !== null && _item$value6 !== void 0 ? _item$value6 : value,
|
|
17727
18422
|
placeholder: item.placeholder,
|
|
17728
18423
|
onChange: function onChange(e) {
|
|
17729
|
-
return _onChange === null || _onChange === void 0 ? void 0 : _onChange(
|
|
18424
|
+
return _onChange === null || _onChange === void 0 ? void 0 : _onChange(absoluteName, e.target.value.trim());
|
|
17730
18425
|
}
|
|
17731
18426
|
});
|
|
17732
18427
|
};
|
|
@@ -17911,8 +18606,8 @@ var css_248z$w = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\
|
|
|
17911
18606
|
styleInject(css_248z$w);
|
|
17912
18607
|
|
|
17913
18608
|
var _excluded$8 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title", "sharedState"];
|
|
17914
|
-
function ownKeys
|
|
17915
|
-
function _objectSpread
|
|
18609
|
+
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; }
|
|
18610
|
+
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
18611
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
17917
18612
|
var apiInterface = _ref.apiInterface,
|
|
17918
18613
|
selectMapping = _ref.selectMapping,
|
|
@@ -17939,7 +18634,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
|
17939
18634
|
return /*#__PURE__*/jsxs("div", {
|
|
17940
18635
|
ref: ref,
|
|
17941
18636
|
className: classnames(title ? wrapper$5 : undefined),
|
|
17942
|
-
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread
|
|
18637
|
+
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$$(_objectSpread$$({}, selectProps), {}, {
|
|
17943
18638
|
showSearch: search,
|
|
17944
18639
|
loading: state.loading,
|
|
17945
18640
|
options: state.options,
|
|
@@ -18556,8 +19251,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
18556
19251
|
}]);
|
|
18557
19252
|
}(_default$d);
|
|
18558
19253
|
|
|
18559
|
-
function ownKeys$
|
|
18560
|
-
function _objectSpread$
|
|
19254
|
+
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; }
|
|
19255
|
+
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; }
|
|
18561
19256
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
18562
19257
|
function useSelectClientRelationCatalog (_ref) {
|
|
18563
19258
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -18726,7 +19421,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
18726
19421
|
case 22:
|
|
18727
19422
|
supplierData = _context2.sent;
|
|
18728
19423
|
case 23:
|
|
18729
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
19424
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$_(_objectSpread$_({}, _selectedSupplier), {}, {
|
|
18730
19425
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
18731
19426
|
}), supplierData);
|
|
18732
19427
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -18947,8 +19642,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
18947
19642
|
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
19643
|
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
19644
|
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$
|
|
19645
|
+
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; }
|
|
19646
|
+
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; }
|
|
18952
19647
|
function useSelectData (_ref) {
|
|
18953
19648
|
var data = _ref.data,
|
|
18954
19649
|
onChange = _ref.onChange,
|
|
@@ -19131,7 +19826,7 @@ function useSelectData (_ref) {
|
|
|
19131
19826
|
setFetching(true);
|
|
19132
19827
|
serverSideParams = {
|
|
19133
19828
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
19134
|
-
return _objectSpread$
|
|
19829
|
+
return _objectSpread$Z(_objectSpread$Z({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
19135
19830
|
}, {}) : {
|
|
19136
19831
|
_id: [value, 'contains']
|
|
19137
19832
|
},
|
|
@@ -19423,8 +20118,8 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
19423
20118
|
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
20119
|
styleInject(css_248z$t);
|
|
19425
20120
|
|
|
19426
|
-
function ownKeys$
|
|
19427
|
-
function _objectSpread$
|
|
20121
|
+
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; }
|
|
20122
|
+
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; }
|
|
19428
20123
|
var LOG$9 = getLogger('Backoffice', 'Translation Form');
|
|
19429
20124
|
function useTranslationHook (item, state) {
|
|
19430
20125
|
var root = useStore();
|
|
@@ -19557,7 +20252,7 @@ function useTranslationHook (item, state) {
|
|
|
19557
20252
|
case 0:
|
|
19558
20253
|
_context2.next = 2;
|
|
19559
20254
|
return apiHandler.create({
|
|
19560
|
-
locales: _objectSpread$
|
|
20255
|
+
locales: _objectSpread$Y({
|
|
19561
20256
|
de: {},
|
|
19562
20257
|
it: {},
|
|
19563
20258
|
fr: {},
|
|
@@ -19606,8 +20301,8 @@ function useTranslationHook (item, state) {
|
|
|
19606
20301
|
};
|
|
19607
20302
|
}
|
|
19608
20303
|
|
|
19609
|
-
function ownKeys$
|
|
19610
|
-
function _objectSpread$
|
|
20304
|
+
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; }
|
|
20305
|
+
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; }
|
|
19611
20306
|
var Translation = function Translation(_ref) {
|
|
19612
20307
|
var item = _ref.item,
|
|
19613
20308
|
state = _ref.state,
|
|
@@ -19652,12 +20347,13 @@ var Translation = function Translation(_ref) {
|
|
|
19652
20347
|
marginLeft: 64
|
|
19653
20348
|
},
|
|
19654
20349
|
children: item.items.map(function (i, idx) {
|
|
20350
|
+
var _state$fieldErrors$n$;
|
|
19655
20351
|
var n = [].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate ? [currentLang] : []));
|
|
19656
20352
|
var key = typeof n == 'string' ? n : n.join('.');
|
|
19657
20353
|
var hidden = state.getIsHidden(i, data);
|
|
19658
20354
|
var newAbsoluteName = absoluteName !== '' ? [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n)) : n;
|
|
19659
20355
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
19660
|
-
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$
|
|
20356
|
+
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$X(_objectSpread$X({}, i), {}, {
|
|
19661
20357
|
name: n
|
|
19662
20358
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden, currentLang) : /*#__PURE__*/jsx(Form$2.Item, {
|
|
19663
20359
|
id: idx.toString(),
|
|
@@ -19668,9 +20364,9 @@ var Translation = function Translation(_ref) {
|
|
|
19668
20364
|
initialValue: i === null || i === void 0 ? void 0 : i.defaultValue,
|
|
19669
20365
|
hasFeedback: !!state.fieldErrors[n.toString()],
|
|
19670
20366
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
19671
|
-
help: state.fieldErrors[n.toString()],
|
|
20367
|
+
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
19672
20368
|
hidden: hidden,
|
|
19673
|
-
children: getElement(_objectSpread$
|
|
20369
|
+
children: getElement(_objectSpread$X(_objectSpread$X({}, i), {}, {
|
|
19674
20370
|
name: n
|
|
19675
20371
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden)
|
|
19676
20372
|
})
|
|
@@ -20013,7 +20709,7 @@ function Media (_ref) {
|
|
|
20013
20709
|
});
|
|
20014
20710
|
}
|
|
20015
20711
|
|
|
20016
|
-
var Text = function Text(_ref) {
|
|
20712
|
+
var Text$1 = function Text(_ref) {
|
|
20017
20713
|
var item = _ref.item;
|
|
20018
20714
|
var _useTranslation = useTranslation(),
|
|
20019
20715
|
t = _useTranslation.t;
|
|
@@ -20022,13 +20718,13 @@ var Text = function Text(_ref) {
|
|
|
20022
20718
|
children: t(item.text)
|
|
20023
20719
|
});
|
|
20024
20720
|
};
|
|
20025
|
-
var Text$
|
|
20721
|
+
var Text$2 = observer(Text$1);
|
|
20026
20722
|
|
|
20027
20723
|
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
20724
|
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
20725
|
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$
|
|
20726
|
+
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; }
|
|
20727
|
+
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; }
|
|
20032
20728
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
|
|
20033
20729
|
var _isReadonly, _state$hiddenRequired;
|
|
20034
20730
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -20063,7 +20759,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20063
20759
|
}
|
|
20064
20760
|
});
|
|
20065
20761
|
case 'selectSimple':
|
|
20066
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
20762
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$W(_objectSpread$W({}, item), {}, {
|
|
20067
20763
|
disabled: disabled,
|
|
20068
20764
|
onChange: function onChange(value) {
|
|
20069
20765
|
_onChange(absoluteName, value);
|
|
@@ -20090,6 +20786,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20090
20786
|
item: item,
|
|
20091
20787
|
data: state.data,
|
|
20092
20788
|
value: item.value,
|
|
20789
|
+
absoluteName: absoluteName,
|
|
20093
20790
|
onChange: state.onInputChanged
|
|
20094
20791
|
});
|
|
20095
20792
|
}
|
|
@@ -20108,7 +20805,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20108
20805
|
value: item.value,
|
|
20109
20806
|
placeholder: item.placeholder,
|
|
20110
20807
|
onBlur: function onBlur(e) {
|
|
20111
|
-
return state.onInputChanged(
|
|
20808
|
+
return state.onInputChanged(absoluteName, e.target.value.trim());
|
|
20112
20809
|
}
|
|
20113
20810
|
});
|
|
20114
20811
|
case 'detailaction':
|
|
@@ -20157,7 +20854,13 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20157
20854
|
case 'number':
|
|
20158
20855
|
return /*#__PURE__*/jsx(InputNumber, {
|
|
20159
20856
|
disabled: disabled,
|
|
20160
|
-
value: item.value
|
|
20857
|
+
value: item.value,
|
|
20858
|
+
formatter: function formatter(value) {
|
|
20859
|
+
return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
20860
|
+
},
|
|
20861
|
+
onChange: function onChange(value) {
|
|
20862
|
+
_onChange(absoluteName, value);
|
|
20863
|
+
}
|
|
20161
20864
|
});
|
|
20162
20865
|
case 'checkbox':
|
|
20163
20866
|
return /*#__PURE__*/jsx(Checkbox$1, {
|
|
@@ -20213,12 +20916,14 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20213
20916
|
return /*#__PURE__*/jsx(InputComponent$1, {
|
|
20214
20917
|
item: item,
|
|
20215
20918
|
data: state.data,
|
|
20919
|
+
absoluteName: absoluteName,
|
|
20216
20920
|
onChange: state.onInputChanged
|
|
20217
20921
|
});
|
|
20218
20922
|
case 'dateinput':
|
|
20219
20923
|
return /*#__PURE__*/jsx(InputComponent$1, {
|
|
20220
20924
|
item: item,
|
|
20221
20925
|
data: state.data,
|
|
20926
|
+
absoluteName: absoluteName,
|
|
20222
20927
|
onChange: state.onInputChanged
|
|
20223
20928
|
});
|
|
20224
20929
|
case 'subTitle':
|
|
@@ -20269,7 +20974,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20269
20974
|
value: item.value,
|
|
20270
20975
|
options: item.options.map(function (o) {
|
|
20271
20976
|
var _o$disabled;
|
|
20272
|
-
return _objectSpread$
|
|
20977
|
+
return _objectSpread$W(_objectSpread$W({}, o), {}, {
|
|
20273
20978
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, state.data)
|
|
20274
20979
|
});
|
|
20275
20980
|
}),
|
|
@@ -20290,7 +20995,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20290
20995
|
},
|
|
20291
20996
|
icon: item.icon,
|
|
20292
20997
|
callback: function callback(data) {
|
|
20293
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
20998
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$W(_objectSpread$W({}, state.data), data));
|
|
20294
20999
|
}
|
|
20295
21000
|
});
|
|
20296
21001
|
case 'media':
|
|
@@ -20301,7 +21006,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20301
21006
|
value: item.value
|
|
20302
21007
|
});
|
|
20303
21008
|
case 'text':
|
|
20304
|
-
return /*#__PURE__*/jsx(Text$
|
|
21009
|
+
return /*#__PURE__*/jsx(Text$2, {
|
|
20305
21010
|
item: item
|
|
20306
21011
|
});
|
|
20307
21012
|
default:
|
|
@@ -20311,7 +21016,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
20311
21016
|
var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20312
21017
|
var _useTranslation = useTranslation(),
|
|
20313
21018
|
t = _useTranslation.t;
|
|
20314
|
-
return /*#__PURE__*/jsx(Input$1, _objectSpread$
|
|
21019
|
+
return /*#__PURE__*/jsx(Input$1, _objectSpread$W(_objectSpread$W({}, props), {}, {
|
|
20315
21020
|
ref: ref,
|
|
20316
21021
|
disabled: true,
|
|
20317
21022
|
value: t(props.translationPrefix + '.' + props.value)
|
|
@@ -20330,8 +21035,8 @@ function isReadonly(item, data) {
|
|
|
20330
21035
|
return false;
|
|
20331
21036
|
}
|
|
20332
21037
|
|
|
20333
|
-
function ownKeys$
|
|
20334
|
-
function _objectSpread$
|
|
21038
|
+
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; }
|
|
21039
|
+
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; }
|
|
20335
21040
|
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
21041
|
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
21042
|
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 +21086,13 @@ var Presets = function Presets(_ref) {
|
|
|
20381
21086
|
} finally {
|
|
20382
21087
|
_iterator.f();
|
|
20383
21088
|
}
|
|
20384
|
-
var data = _objectSpread$
|
|
21089
|
+
var data = _objectSpread$V(_objectSpread$V({}, form.getFieldsValue(names)), {}, {
|
|
20385
21090
|
newPresetName: newPresetName
|
|
20386
21091
|
});
|
|
20387
21092
|
data.dpi = parseInt(data.dpi);
|
|
20388
21093
|
data.organization = root.getGlobalValue('organizationId');
|
|
20389
21094
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
20390
|
-
var dt = _objectSpread$
|
|
21095
|
+
var dt = _objectSpread$V(_objectSpread$V({}, form.getFieldsValue(names)), {}, {
|
|
20391
21096
|
name: newPresetName
|
|
20392
21097
|
});
|
|
20393
21098
|
setPresets({
|
|
@@ -20724,7 +21429,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
20724
21429
|
var renderFormItems = function renderFormItems(items) {
|
|
20725
21430
|
return /*#__PURE__*/jsx(Fragment, {
|
|
20726
21431
|
children: items.map(function (item) {
|
|
20727
|
-
var _state$hiddenRequired, _state$hiddenRequired2, _state$hiddenRequired3;
|
|
21432
|
+
var _state$hiddenRequired, _state$fieldErrors$it, _state$hiddenRequired2, _state$hiddenRequired3;
|
|
20728
21433
|
return /*#__PURE__*/jsxs("div", {
|
|
20729
21434
|
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
21435
|
name: item.name,
|
|
@@ -20734,7 +21439,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
20734
21439
|
initialValue: item === null || item === void 0 ? void 0 : item.defaultValue,
|
|
20735
21440
|
hasFeedback: !!state.fieldErrors[item.name.toString()],
|
|
20736
21441
|
validateStatus: !!state.fieldErrors[item.name.toString()] ? 'error' : undefined,
|
|
20737
|
-
help: state.fieldErrors[item.name.toString()],
|
|
21442
|
+
help: (_state$fieldErrors$it = state.fieldErrors[item.name.toString()]) !== null && _state$fieldErrors$it !== void 0 ? _state$fieldErrors$it : item.helpText,
|
|
20738
21443
|
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
21444
|
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
21445
|
}, Array.isArray(item.name) ? item.name.join('.') : item.name)]
|
|
@@ -20881,8 +21586,8 @@ function getLabel(item, t) {
|
|
|
20881
21586
|
}
|
|
20882
21587
|
var Form$1 = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
20883
21588
|
|
|
20884
|
-
function ownKeys$
|
|
20885
|
-
function _objectSpread$
|
|
21589
|
+
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; }
|
|
21590
|
+
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; }
|
|
20886
21591
|
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
21592
|
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
21593
|
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 +21789,7 @@ function useRoleSelectorData (_ref) {
|
|
|
21084
21789
|
roles.forEach(function (r) {
|
|
21085
21790
|
//check if after the changes the role is selected
|
|
21086
21791
|
if (value.includes(r._id)) {
|
|
21087
|
-
var newValue = _objectSpread$
|
|
21792
|
+
var newValue = _objectSpread$U(_objectSpread$U({}, r), {}, {
|
|
21088
21793
|
selected: true
|
|
21089
21794
|
});
|
|
21090
21795
|
//add it to the new list as selected role
|
|
@@ -21120,7 +21825,7 @@ function useRoleSelectorData (_ref) {
|
|
|
21120
21825
|
}
|
|
21121
21826
|
}
|
|
21122
21827
|
} else {
|
|
21123
|
-
var _newValue = _objectSpread$
|
|
21828
|
+
var _newValue = _objectSpread$U(_objectSpread$U({}, r), {}, {
|
|
21124
21829
|
selected: false
|
|
21125
21830
|
});
|
|
21126
21831
|
//add it to the new list as unselected role
|
|
@@ -21324,7 +22029,7 @@ function _updateRoles() {
|
|
|
21324
22029
|
userRole = userRoles.find(function (r) {
|
|
21325
22030
|
return r._id == role._id;
|
|
21326
22031
|
});
|
|
21327
|
-
newRole = _objectSpread$
|
|
22032
|
+
newRole = _objectSpread$U({}, role);
|
|
21328
22033
|
if (userRole) {
|
|
21329
22034
|
newRole.selected = true;
|
|
21330
22035
|
newRole.inherited = userRole.inherited;
|
|
@@ -21544,7 +22249,7 @@ function _fetchOptions() {
|
|
|
21544
22249
|
case 4:
|
|
21545
22250
|
result = _context11.sent;
|
|
21546
22251
|
options = result.data.map(function (d) {
|
|
21547
|
-
return _objectSpread$
|
|
22252
|
+
return _objectSpread$U(_objectSpread$U({}, d), {}, {
|
|
21548
22253
|
label: d.displayName,
|
|
21549
22254
|
value: d._id,
|
|
21550
22255
|
isLeaf: !d.hasChildren
|
|
@@ -21646,8 +22351,8 @@ var parent = "parent-NZJ3S";
|
|
|
21646
22351
|
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
22352
|
styleInject(css_248z$s);
|
|
21648
22353
|
|
|
21649
|
-
function ownKeys$
|
|
21650
|
-
function _objectSpread$
|
|
22354
|
+
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; }
|
|
22355
|
+
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; }
|
|
21651
22356
|
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
22357
|
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
22358
|
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 +22412,8 @@ function _generateCSV() {
|
|
|
21707
22412
|
break;
|
|
21708
22413
|
}
|
|
21709
22414
|
_context2.next = 21;
|
|
21710
|
-
return generateCSV(_objectSpread$
|
|
21711
|
-
mappingData: _objectSpread$
|
|
22415
|
+
return generateCSV(_objectSpread$T(_objectSpread$T({}, exportParams.children), {}, {
|
|
22416
|
+
mappingData: _objectSpread$T(_objectSpread$T({}, parent), {}, {
|
|
21712
22417
|
parentId: exportParams.mappingData._id
|
|
21713
22418
|
})
|
|
21714
22419
|
}), csvData);
|
|
@@ -21816,8 +22521,8 @@ function _downloadFile() {
|
|
|
21816
22521
|
return _downloadFile.apply(this, arguments);
|
|
21817
22522
|
}
|
|
21818
22523
|
|
|
21819
|
-
function ownKeys$
|
|
21820
|
-
function _objectSpread$
|
|
22524
|
+
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; }
|
|
22525
|
+
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; }
|
|
21821
22526
|
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
22527
|
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
22528
|
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 +22941,7 @@ function useRelationSelectorData (_ref) {
|
|
|
22236
22941
|
var activeItem = _step.value;
|
|
22237
22942
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
22238
22943
|
addedObjects.push(addedData);
|
|
22239
|
-
getSplittedItems(_objectSpread$
|
|
22944
|
+
getSplittedItems(_objectSpread$S(_objectSpread$S({}, activeItem), {}, {
|
|
22240
22945
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
22241
22946
|
}));
|
|
22242
22947
|
ret = true;
|
|
@@ -22441,8 +23146,8 @@ function useRelationSelectorData (_ref) {
|
|
|
22441
23146
|
};
|
|
22442
23147
|
}
|
|
22443
23148
|
|
|
22444
|
-
function ownKeys$
|
|
22445
|
-
function _objectSpread$
|
|
23149
|
+
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; }
|
|
23150
|
+
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; }
|
|
22446
23151
|
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
23152
|
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
23153
|
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 +23280,7 @@ function ActionButton (_ref) {
|
|
|
22575
23280
|
_iterator2.f();
|
|
22576
23281
|
}
|
|
22577
23282
|
_context.next = 19;
|
|
22578
|
-
return apiInterface.update(_objectSpread$
|
|
23283
|
+
return apiInterface.update(_objectSpread$R(_objectSpread$R({}, data), {}, {
|
|
22579
23284
|
state: toSwitch
|
|
22580
23285
|
}), data);
|
|
22581
23286
|
case 19:
|
|
@@ -22732,14 +23437,14 @@ function _simpleChangeValue() {
|
|
|
22732
23437
|
break;
|
|
22733
23438
|
}
|
|
22734
23439
|
for (i = 0; i < action.newValues.length; i++) {
|
|
22735
|
-
fieldsToUpdate = _objectSpread$
|
|
23440
|
+
fieldsToUpdate = _objectSpread$R(_objectSpread$R({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
22736
23441
|
}
|
|
22737
23442
|
if (!apiInterface.canUpdate) {
|
|
22738
23443
|
_context2.next = 9;
|
|
22739
23444
|
break;
|
|
22740
23445
|
}
|
|
22741
23446
|
_context2.next = 7;
|
|
22742
|
-
return apiInterface.update(_objectSpread$
|
|
23447
|
+
return apiInterface.update(_objectSpread$R({}, fieldsToUpdate), data);
|
|
22743
23448
|
case 7:
|
|
22744
23449
|
response = _context2.sent;
|
|
22745
23450
|
return _context2.abrupt("return", response);
|
|
@@ -22754,7 +23459,7 @@ function _simpleChangeValue() {
|
|
|
22754
23459
|
return _simpleChangeValue.apply(this, arguments);
|
|
22755
23460
|
}
|
|
22756
23461
|
function A(props) {
|
|
22757
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
23462
|
+
return /*#__PURE__*/jsx("a", _objectSpread$R({}, props));
|
|
22758
23463
|
}
|
|
22759
23464
|
|
|
22760
23465
|
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 +23597,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
22892
23597
|
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
23598
|
styleInject(css_248z$r);
|
|
22894
23599
|
|
|
22895
|
-
function ownKeys$
|
|
22896
|
-
function _objectSpread$
|
|
23600
|
+
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; }
|
|
23601
|
+
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; }
|
|
22897
23602
|
var DropDown = function DropDown(_ref) {
|
|
22898
23603
|
var _curItem$data$length;
|
|
22899
23604
|
var split = _ref.split,
|
|
@@ -22925,7 +23630,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
22925
23630
|
});
|
|
22926
23631
|
return /*#__PURE__*/jsx(Collapse, {
|
|
22927
23632
|
onChange: function onChange() {
|
|
22928
|
-
return getSplittedItems(_objectSpread$
|
|
23633
|
+
return getSplittedItems(_objectSpread$Q(_objectSpread$Q({}, item.item), {}, {
|
|
22929
23634
|
parentId: item.parentId
|
|
22930
23635
|
}), 0);
|
|
22931
23636
|
},
|
|
@@ -23183,8 +23888,8 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
23183
23888
|
};
|
|
23184
23889
|
var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
|
|
23185
23890
|
|
|
23186
|
-
function ownKeys$
|
|
23187
|
-
function _objectSpread$
|
|
23891
|
+
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; }
|
|
23892
|
+
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; }
|
|
23188
23893
|
function useFormListData (_ref) {
|
|
23189
23894
|
var _configuration$defaul;
|
|
23190
23895
|
var id = _ref.id,
|
|
@@ -23264,7 +23969,7 @@ function useFormListData (_ref) {
|
|
|
23264
23969
|
if (updated.length == state.length) {
|
|
23265
23970
|
newState = state.map(function (s, i) {
|
|
23266
23971
|
var _updated$find;
|
|
23267
|
-
return _objectSpread$
|
|
23972
|
+
return _objectSpread$P(_objectSpread$P({}, s), {}, {
|
|
23268
23973
|
data: (_updated$find = updated.find(function (u) {
|
|
23269
23974
|
return u.index == i;
|
|
23270
23975
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -23401,8 +24106,8 @@ var FormList = function FormList(_ref, ref) {
|
|
|
23401
24106
|
};
|
|
23402
24107
|
var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
23403
24108
|
|
|
23404
|
-
function ownKeys$
|
|
23405
|
-
function _objectSpread$
|
|
24109
|
+
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; }
|
|
24110
|
+
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; }
|
|
23406
24111
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
23407
24112
|
function useSelectOrCreateData (_ref) {
|
|
23408
24113
|
var id = _ref.id,
|
|
@@ -23499,7 +24204,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
23499
24204
|
_context.next = 7;
|
|
23500
24205
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
23501
24206
|
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$
|
|
24207
|
+
return _objectSpread$O(_objectSpread$O({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
23503
24208
|
}, {}) : {
|
|
23504
24209
|
_id: [value, 'contains']
|
|
23505
24210
|
},
|
|
@@ -23810,8 +24515,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
23810
24515
|
});
|
|
23811
24516
|
};
|
|
23812
24517
|
|
|
23813
|
-
function ownKeys$
|
|
23814
|
-
function _objectSpread$
|
|
24518
|
+
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; }
|
|
24519
|
+
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; }
|
|
23815
24520
|
function useListData (_ref) {
|
|
23816
24521
|
var id = _ref.id,
|
|
23817
24522
|
data = _ref.data;
|
|
@@ -23854,7 +24559,7 @@ function useListData (_ref) {
|
|
|
23854
24559
|
case 3:
|
|
23855
24560
|
result = _context.sent;
|
|
23856
24561
|
setListData(result.data.map(parseField));
|
|
23857
|
-
initData = _objectSpread$
|
|
24562
|
+
initData = _objectSpread$N({}, data);
|
|
23858
24563
|
setUpdatedObject(initData);
|
|
23859
24564
|
setLoading(false);
|
|
23860
24565
|
case 8:
|
|
@@ -23895,7 +24600,7 @@ function useListData (_ref) {
|
|
|
23895
24600
|
});
|
|
23896
24601
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
23897
24602
|
var parsedField = field.field.split('.');
|
|
23898
|
-
item.itemUpdate = _objectSpread$
|
|
24603
|
+
item.itemUpdate = _objectSpread$N(_objectSpread$N({}, field), {}, {
|
|
23899
24604
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
23900
24605
|
});
|
|
23901
24606
|
});
|
|
@@ -23926,16 +24631,16 @@ function useListData (_ref) {
|
|
|
23926
24631
|
console.error('field with more than 2 parts not allowed');
|
|
23927
24632
|
return;
|
|
23928
24633
|
}
|
|
23929
|
-
var updObj = _objectSpread$
|
|
24634
|
+
var updObj = _objectSpread$N({}, updatedObject);
|
|
23930
24635
|
if (fields.length === 1) {
|
|
23931
|
-
updObj = _objectSpread$
|
|
24636
|
+
updObj = _objectSpread$N(_objectSpread$N({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
23932
24637
|
} else if (fields.length === 2) {
|
|
23933
24638
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
23934
24639
|
return v.id === item.id.trim();
|
|
23935
24640
|
});
|
|
23936
24641
|
if (updatedField) {
|
|
23937
|
-
var updatedFieldCopy = _objectSpread$
|
|
23938
|
-
updObj = _objectSpread$
|
|
24642
|
+
var updatedFieldCopy = _objectSpread$N(_objectSpread$N({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
24643
|
+
updObj = _objectSpread$N(_objectSpread$N({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
23939
24644
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
23940
24645
|
})));
|
|
23941
24646
|
}
|
|
@@ -23944,11 +24649,11 @@ function useListData (_ref) {
|
|
|
23944
24649
|
var acItems = listData;
|
|
23945
24650
|
for (var i = 0; i < acItems.length; i++) {
|
|
23946
24651
|
if (i == index) {
|
|
23947
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
24652
|
+
acItems[i].itemUpdate = _objectSpread$N(_objectSpread$N({}, acItems[i].itemUpdate), {}, {
|
|
23948
24653
|
value: value
|
|
23949
24654
|
});
|
|
23950
24655
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
23951
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
24656
|
+
acItems[i].itemUpdate = _objectSpread$N(_objectSpread$N({}, acItems[i].itemUpdate), {}, {
|
|
23952
24657
|
value: !value
|
|
23953
24658
|
});
|
|
23954
24659
|
}
|
|
@@ -24462,8 +25167,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
24462
25167
|
};
|
|
24463
25168
|
}
|
|
24464
25169
|
|
|
24465
|
-
function ownKeys$
|
|
24466
|
-
function _objectSpread$
|
|
25170
|
+
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; }
|
|
25171
|
+
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; }
|
|
24467
25172
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
24468
25173
|
var id = _ref.id,
|
|
24469
25174
|
data = _ref.data,
|
|
@@ -24571,12 +25276,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
24571
25276
|
}
|
|
24572
25277
|
function onEnter(e) {
|
|
24573
25278
|
if (e.key != 'Enter') return;
|
|
24574
|
-
setCrop(_objectSpread$
|
|
25279
|
+
setCrop(_objectSpread$M(_objectSpread$M({}, crop), {}, {
|
|
24575
25280
|
unit: 'px',
|
|
24576
25281
|
width: Number(widthInputElement.current.value),
|
|
24577
25282
|
height: Number(heightInputElement.current.value)
|
|
24578
25283
|
}));
|
|
24579
|
-
setCompletedCrop(_objectSpread$
|
|
25284
|
+
setCompletedCrop(_objectSpread$M(_objectSpread$M({}, crop), {}, {
|
|
24580
25285
|
unit: 'px',
|
|
24581
25286
|
width: Number(widthInputElement.current.value),
|
|
24582
25287
|
height: Number(heightInputElement.current.value)
|
|
@@ -24654,8 +25359,8 @@ var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
|
24654
25359
|
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
25360
|
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
25361
|
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$
|
|
25362
|
+
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; }
|
|
25363
|
+
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; }
|
|
24659
25364
|
function useDescriptions (_ref) {
|
|
24660
25365
|
var id = _ref.id;
|
|
24661
25366
|
var root = useStore();
|
|
@@ -24748,7 +25453,7 @@ function _getDisplayData() {
|
|
|
24748
25453
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
24749
25454
|
while (1) switch (_context4.prev = _context4.next) {
|
|
24750
25455
|
case 0:
|
|
24751
|
-
displayData = _objectSpread$
|
|
25456
|
+
displayData = _objectSpread$L({}, data);
|
|
24752
25457
|
_iterator = _createForOfIteratorHelper$a(items);
|
|
24753
25458
|
_context4.prev = 2;
|
|
24754
25459
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -25024,8 +25729,8 @@ var FileUploadWrapper$1 = function FileUploadWrapper(_ref) {
|
|
|
25024
25729
|
};
|
|
25025
25730
|
var FileUploadBeta = observer(FileUploadWrapper$1);
|
|
25026
25731
|
|
|
25027
|
-
function ownKeys$
|
|
25028
|
-
function _objectSpread$
|
|
25732
|
+
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; }
|
|
25733
|
+
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; }
|
|
25029
25734
|
function useGridData (_ref) {
|
|
25030
25735
|
var id = _ref.id,
|
|
25031
25736
|
data = _ref.data;
|
|
@@ -25068,11 +25773,11 @@ function useGridData (_ref) {
|
|
|
25068
25773
|
function reducer(state, action) {
|
|
25069
25774
|
switch (action.type) {
|
|
25070
25775
|
case 'update':
|
|
25071
|
-
return _objectSpread$
|
|
25776
|
+
return _objectSpread$K(_objectSpread$K({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$K(_objectSpread$K({}, action.data), {}, {
|
|
25072
25777
|
buffer: Buffer.from(action.data.buffer)
|
|
25073
25778
|
})));
|
|
25074
25779
|
case 'delete':
|
|
25075
|
-
var newState = _objectSpread$
|
|
25780
|
+
var newState = _objectSpread$K({}, state);
|
|
25076
25781
|
delete newState[action.data.divaNr];
|
|
25077
25782
|
return newState;
|
|
25078
25783
|
default:
|
|
@@ -25159,8 +25864,8 @@ var Grid = function Grid(_ref) {
|
|
|
25159
25864
|
});
|
|
25160
25865
|
};
|
|
25161
25866
|
|
|
25162
|
-
function ownKeys$
|
|
25163
|
-
function _objectSpread$
|
|
25867
|
+
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; }
|
|
25868
|
+
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; }
|
|
25164
25869
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
25165
25870
|
var id = _ref.id;
|
|
25166
25871
|
var root = useStore();
|
|
@@ -25279,7 +25984,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
25279
25984
|
onRemove: onRemove,
|
|
25280
25985
|
customRequest: customRequest,
|
|
25281
25986
|
fileList: fileList.map(function (f) {
|
|
25282
|
-
return _objectSpread$
|
|
25987
|
+
return _objectSpread$J(_objectSpread$J({}, f), {}, {
|
|
25283
25988
|
url: f.url
|
|
25284
25989
|
});
|
|
25285
25990
|
}),
|
|
@@ -25367,8 +26072,8 @@ var TableSummary = function TableSummary(_ref) {
|
|
|
25367
26072
|
});
|
|
25368
26073
|
};
|
|
25369
26074
|
|
|
25370
|
-
function ownKeys$
|
|
25371
|
-
function _objectSpread$
|
|
26075
|
+
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; }
|
|
26076
|
+
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; }
|
|
25372
26077
|
function getExpandedRowRenderer (config, root) {
|
|
25373
26078
|
return function (record) {
|
|
25374
26079
|
var data = record;
|
|
@@ -25390,7 +26095,7 @@ function customSubTable(columns, datasource) {
|
|
|
25390
26095
|
// map custom columns to antd columns
|
|
25391
26096
|
var antcols = columns.map(function (col) {
|
|
25392
26097
|
var _col$width;
|
|
25393
|
-
return _objectSpread$
|
|
26098
|
+
return _objectSpread$I(_objectSpread$I({}, col), {}, {
|
|
25394
26099
|
title: col.title,
|
|
25395
26100
|
dataIndex: col.field,
|
|
25396
26101
|
key: col.field,
|
|
@@ -26102,8 +26807,8 @@ function LinkCell (_ref) {
|
|
|
26102
26807
|
|
|
26103
26808
|
var _excluded$7 = ["index"],
|
|
26104
26809
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
26105
|
-
function ownKeys$
|
|
26106
|
-
function _objectSpread$
|
|
26810
|
+
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; }
|
|
26811
|
+
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; }
|
|
26107
26812
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
26108
26813
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
26109
26814
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -26117,7 +26822,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
26117
26822
|
component: false,
|
|
26118
26823
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
26119
26824
|
value: form,
|
|
26120
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
26825
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$H({}, props))
|
|
26121
26826
|
})
|
|
26122
26827
|
});
|
|
26123
26828
|
};
|
|
@@ -26170,7 +26875,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
26170
26875
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
26171
26876
|
longDescriptionType = 'text';
|
|
26172
26877
|
}
|
|
26173
|
-
var modifiedColumn = _objectSpread$
|
|
26878
|
+
var modifiedColumn = _objectSpread$H(_objectSpread$H({}, column), {}, {
|
|
26174
26879
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
26175
26880
|
});
|
|
26176
26881
|
if (column) {
|
|
@@ -26183,40 +26888,40 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
26183
26888
|
};
|
|
26184
26889
|
switch (modifiedColumn.type) {
|
|
26185
26890
|
case 'boolean':
|
|
26186
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
26891
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$H({}, cellProps));
|
|
26187
26892
|
break;
|
|
26188
26893
|
case 'text':
|
|
26189
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
26894
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$H({}, cellProps));
|
|
26190
26895
|
break;
|
|
26191
26896
|
case 'select':
|
|
26192
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
26897
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$H({}, cellProps));
|
|
26193
26898
|
case 'media':
|
|
26194
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
26899
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$H({}, cellProps));
|
|
26195
26900
|
break;
|
|
26196
26901
|
case 'mediaItem':
|
|
26197
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
26902
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$H({}, cellProps));
|
|
26198
26903
|
break;
|
|
26199
26904
|
case 'unixTimeStamp':
|
|
26200
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
26905
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$H({}, cellProps));
|
|
26201
26906
|
break;
|
|
26202
26907
|
case 'unixTimeStampCheck':
|
|
26203
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
26908
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$H({}, cellProps));
|
|
26204
26909
|
break;
|
|
26205
26910
|
case 'icon':
|
|
26206
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
26911
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$H({}, cellProps));
|
|
26207
26912
|
break;
|
|
26208
26913
|
case 'progress':
|
|
26209
|
-
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$
|
|
26914
|
+
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$H({}, cellProps));
|
|
26210
26915
|
break;
|
|
26211
26916
|
case 'link':
|
|
26212
|
-
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$
|
|
26917
|
+
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$H({}, cellProps));
|
|
26213
26918
|
break;
|
|
26214
26919
|
default:
|
|
26215
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
26920
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$H({}, cellProps));
|
|
26216
26921
|
break;
|
|
26217
26922
|
}
|
|
26218
26923
|
}
|
|
26219
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
26924
|
+
return /*#__PURE__*/jsx("td", _objectSpread$H(_objectSpread$H({}, restProps), {}, {
|
|
26220
26925
|
children: childNode
|
|
26221
26926
|
}));
|
|
26222
26927
|
};
|
|
@@ -26411,7 +27116,7 @@ var spinner = "spinner-00VcK";
|
|
|
26411
27116
|
var css_248z$l = ".container-2r-OJ {\n display: flex;\n gap: 40px; /* Distribute the columns evenly */\n}\n\n.column-yZ2Qc {\n padding: 10px;\n}\n\n.column1-9viTK .column-yZ2Qc {\n flex: 8;\n}\n\n.column2-pCnEz .column-yZ2Qc {\n flex: 1;\n}\n\n.column3-QZDVv .column-yZ2Qc {\n flex: 3;\n}\n\n.spinner-00VcK {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n";
|
|
26412
27117
|
styleInject(css_248z$l);
|
|
26413
27118
|
|
|
26414
|
-
var Panel = Collapse.Panel;
|
|
27119
|
+
var Panel$1 = Collapse.Panel;
|
|
26415
27120
|
function AGHistogram (_ref) {
|
|
26416
27121
|
var height = _ref.height,
|
|
26417
27122
|
width = _ref.width;
|
|
@@ -26519,7 +27224,7 @@ function AGHistogram (_ref) {
|
|
|
26519
27224
|
collapsible: collapsible,
|
|
26520
27225
|
activeKey: activeKeys,
|
|
26521
27226
|
onChange: handleOnChange,
|
|
26522
|
-
children: /*#__PURE__*/jsx(Panel, {
|
|
27227
|
+
children: /*#__PURE__*/jsx(Panel$1, {
|
|
26523
27228
|
header: headerText,
|
|
26524
27229
|
children: /*#__PURE__*/jsxs("div", {
|
|
26525
27230
|
className: container$5,
|
|
@@ -26568,8 +27273,8 @@ var SMChart = function SMChart(props) {
|
|
|
26568
27273
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
26569
27274
|
};
|
|
26570
27275
|
|
|
26571
|
-
function ownKeys$
|
|
26572
|
-
function _objectSpread$
|
|
27276
|
+
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; }
|
|
27277
|
+
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; }
|
|
26573
27278
|
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
27279
|
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
27280
|
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 +27357,9 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26652
27357
|
}
|
|
26653
27358
|
};
|
|
26654
27359
|
}, []);
|
|
26655
|
-
function isDownloadActionDisabled() {
|
|
27360
|
+
function isDownloadActionDisabled(action) {
|
|
26656
27361
|
var _state$data;
|
|
26657
|
-
if (!
|
|
27362
|
+
if (!action.rule) return false;
|
|
26658
27363
|
var data = (_state$data = state.data) === null || _state$data === void 0 ? void 0 : _state$data.filter(function (dt) {
|
|
26659
27364
|
var _state$selected;
|
|
26660
27365
|
return (_state$selected = state.selected) === null || _state$selected === void 0 ? void 0 : _state$selected.find(function (sel) {
|
|
@@ -26669,7 +27374,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26669
27374
|
return !aplyRules({
|
|
26670
27375
|
data: data,
|
|
26671
27376
|
rootStore: root,
|
|
26672
|
-
rules:
|
|
27377
|
+
rules: action.rule
|
|
26673
27378
|
});
|
|
26674
27379
|
}
|
|
26675
27380
|
function checkPermission(permission) {
|
|
@@ -26710,30 +27415,29 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26710
27415
|
onSelectedCatalog: state.onSelectedCatalog,
|
|
26711
27416
|
dontLoadCatalogData: state.configuration.dontLoadCatalogData
|
|
26712
27417
|
})
|
|
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')
|
|
27418
|
+
}), state.configuration.downloadAction && state.configuration.downloadAction.length > 0 && state.configuration.downloadAction.map(function (action, index) {
|
|
27419
|
+
var _action$label;
|
|
27420
|
+
return /*#__PURE__*/jsx(Button, {
|
|
27421
|
+
type: "primary",
|
|
27422
|
+
disabled: isDownloadActionDisabled(action),
|
|
27423
|
+
icon: /*#__PURE__*/jsx(DownloadOutlined$1, {}),
|
|
27424
|
+
size: "middle",
|
|
27425
|
+
onClick: function onClick() {
|
|
27426
|
+
var _state$catalogItem, _state$catalogItem2, _state$catalogItem3;
|
|
27427
|
+
var selectedData = state.data.filter(function (dt) {
|
|
27428
|
+
return state.selected.includes(dt._id);
|
|
27429
|
+
});
|
|
27430
|
+
root.downloadStore.openDownload({
|
|
27431
|
+
data: selectedData.length ? selectedData : state.mappingData,
|
|
27432
|
+
action: action,
|
|
27433
|
+
catalogCodex: (_state$catalogItem = state.catalogItem) === null || _state$catalogItem === void 0 ? void 0 : _state$catalogItem.codex,
|
|
27434
|
+
dealerId: (_state$catalogItem2 = state.catalogItem) === null || _state$catalogItem2 === void 0 ? void 0 : _state$catalogItem2.dealerId,
|
|
27435
|
+
currentUrl: state.currentFetchUrl,
|
|
27436
|
+
sessionGuid: (_state$catalogItem3 = state.catalogItem) === null || _state$catalogItem3 === void 0 ? void 0 : _state$catalogItem3.sessionGuid
|
|
27437
|
+
});
|
|
27438
|
+
},
|
|
27439
|
+
children: (_action$label = action.label) !== null && _action$label !== void 0 ? _action$label : t('backoffice.basetable.download')
|
|
27440
|
+
}, index);
|
|
26737
27441
|
}), state.configuration.canRefresh && /*#__PURE__*/jsx(Button, {
|
|
26738
27442
|
onClick: function onClick() {
|
|
26739
27443
|
state.triggerRefresh();
|
|
@@ -26768,7 +27472,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26768
27472
|
// Convert to Dayjs
|
|
26769
27473
|
(_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
27474
|
]
|
|
26771
|
-
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
27475
|
+
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$G(_objectSpread$G({}, (_state$configuration$5 = state.configuration.filter) === null || _state$configuration$5 === void 0 ? void 0 : _state$configuration$5.select.settings), {}, {
|
|
26772
27476
|
style: {
|
|
26773
27477
|
minWidth: '200px'
|
|
26774
27478
|
},
|
|
@@ -26873,7 +27577,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
26873
27577
|
},
|
|
26874
27578
|
dataSource: data,
|
|
26875
27579
|
loading: state.loading,
|
|
26876
|
-
pagination: _objectSpread$
|
|
27580
|
+
pagination: _objectSpread$G(_objectSpread$G({}, state.pagination), {}, {
|
|
26877
27581
|
showTotal: function showTotal(total, range) {
|
|
26878
27582
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
26879
27583
|
},
|
|
@@ -27193,7 +27897,7 @@ function BulkAction(_ref6) {
|
|
|
27193
27897
|
}
|
|
27194
27898
|
_context4.t0 = data;
|
|
27195
27899
|
_context4.next = 11;
|
|
27196
|
-
return apiInterface.update(_objectSpread$
|
|
27900
|
+
return apiInterface.update(_objectSpread$G(_objectSpread$G({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
27197
27901
|
case 11:
|
|
27198
27902
|
_context4.t1 = _context4.sent;
|
|
27199
27903
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -27306,8 +28010,8 @@ function SelectionText(_ref8) {
|
|
|
27306
28010
|
});
|
|
27307
28011
|
}
|
|
27308
28012
|
|
|
27309
|
-
function ownKeys$
|
|
27310
|
-
function _objectSpread$
|
|
28013
|
+
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; }
|
|
28014
|
+
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; }
|
|
27311
28015
|
function getColumnFilterProps (_ref) {
|
|
27312
28016
|
var filter = _ref.filter,
|
|
27313
28017
|
title = _ref.title;
|
|
@@ -27670,7 +28374,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
27670
28374
|
});
|
|
27671
28375
|
},
|
|
27672
28376
|
options: filter.map(function (f) {
|
|
27673
|
-
return _objectSpread$
|
|
28377
|
+
return _objectSpread$F(_objectSpread$F({}, f), {}, {
|
|
27674
28378
|
label: t(f.label)
|
|
27675
28379
|
});
|
|
27676
28380
|
})
|
|
@@ -27719,7 +28423,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
27719
28423
|
setDisplaySelectedvalues = _useState4[1];
|
|
27720
28424
|
var options = [];
|
|
27721
28425
|
options = filter.map(function (f) {
|
|
27722
|
-
return _objectSpread$
|
|
28426
|
+
return _objectSpread$F(_objectSpread$F({}, f), {}, {
|
|
27723
28427
|
label: t(f.label)
|
|
27724
28428
|
});
|
|
27725
28429
|
});
|
|
@@ -27793,8 +28497,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
27793
28497
|
};
|
|
27794
28498
|
};
|
|
27795
28499
|
|
|
27796
|
-
function ownKeys$
|
|
27797
|
-
function _objectSpread$
|
|
28500
|
+
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; }
|
|
28501
|
+
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; }
|
|
27798
28502
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
27799
28503
|
var columns = configuration.columns.filter(function (c) {
|
|
27800
28504
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -27847,7 +28551,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
27847
28551
|
}
|
|
27848
28552
|
function mapColumn(column, onUpdate) {
|
|
27849
28553
|
var _column$field, _column$children;
|
|
27850
|
-
return _objectSpread$
|
|
28554
|
+
return _objectSpread$E(_objectSpread$E(_objectSpread$E({}, column), {}, {
|
|
27851
28555
|
hidden: false,
|
|
27852
28556
|
width: column.width || 100,
|
|
27853
28557
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
@@ -27897,8 +28601,8 @@ function updateData (_ref) {
|
|
|
27897
28601
|
};
|
|
27898
28602
|
}
|
|
27899
28603
|
|
|
27900
|
-
function ownKeys$
|
|
27901
|
-
function _objectSpread$
|
|
28604
|
+
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; }
|
|
28605
|
+
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; }
|
|
27902
28606
|
function applyFilterAndSortation (_ref) {
|
|
27903
28607
|
var data = _ref.data,
|
|
27904
28608
|
filters = _ref.filters,
|
|
@@ -27913,7 +28617,7 @@ function applyFilterAndSortation (_ref) {
|
|
|
27913
28617
|
processedData = sort(sorter || [], processedData);
|
|
27914
28618
|
return {
|
|
27915
28619
|
data: processedData,
|
|
27916
|
-
pagination: _objectSpread$
|
|
28620
|
+
pagination: _objectSpread$D(_objectSpread$D({}, pagination), {}, {
|
|
27917
28621
|
total: processedData.length
|
|
27918
28622
|
})
|
|
27919
28623
|
};
|
|
@@ -27998,8 +28702,8 @@ function filter(f, data) {
|
|
|
27998
28702
|
}
|
|
27999
28703
|
|
|
28000
28704
|
var _excluded$6 = ["_id"];
|
|
28001
|
-
function ownKeys$
|
|
28002
|
-
function _objectSpread$
|
|
28705
|
+
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; }
|
|
28706
|
+
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; }
|
|
28003
28707
|
function useTableData$1 (_ref) {
|
|
28004
28708
|
var _configuration$apiInt;
|
|
28005
28709
|
var id = _ref.id;
|
|
@@ -28054,7 +28758,7 @@ function useTableData$1 (_ref) {
|
|
|
28054
28758
|
var _configuration$create;
|
|
28055
28759
|
if (!dataRow) return;
|
|
28056
28760
|
var id = v4();
|
|
28057
|
-
var processedDataRow = unflatten(_objectSpread$
|
|
28761
|
+
var processedDataRow = unflatten(_objectSpread$C({
|
|
28058
28762
|
_id: id,
|
|
28059
28763
|
ID: id
|
|
28060
28764
|
}, dataRow));
|
|
@@ -28066,11 +28770,11 @@ function useTableData$1 (_ref) {
|
|
|
28066
28770
|
newData = _updateData.data;
|
|
28067
28771
|
_updateData.prevDataRow;
|
|
28068
28772
|
_updateData.index;
|
|
28069
|
-
var newState = _objectSpread$
|
|
28773
|
+
var newState = _objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28070
28774
|
data: newData
|
|
28071
28775
|
});
|
|
28072
28776
|
if (!filterServerSide) {
|
|
28073
|
-
var res = applyFilterAndSortation(_objectSpread$
|
|
28777
|
+
var res = applyFilterAndSortation(_objectSpread$C(_objectSpread$C({}, filterData), {}, {
|
|
28074
28778
|
data: newData
|
|
28075
28779
|
}));
|
|
28076
28780
|
newState.data = res.data;
|
|
@@ -28082,33 +28786,33 @@ function useTableData$1 (_ref) {
|
|
|
28082
28786
|
var formData = new FormData();
|
|
28083
28787
|
processedDataRow._id;
|
|
28084
28788
|
var value = _objectWithoutProperties(processedDataRow, _excluded$6);
|
|
28085
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
28789
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28086
28790
|
filterContex: filterContex,
|
|
28087
28791
|
value: JSON.stringify([value])
|
|
28088
28792
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
28089
28793
|
if (d && d.Result && d.Result == 'Success') return;
|
|
28090
|
-
setState(_objectSpread$
|
|
28794
|
+
setState(_objectSpread$C({}, oldState));
|
|
28091
28795
|
});
|
|
28092
28796
|
}, [state, catalogItem, filterData]);
|
|
28093
28797
|
useEffect(function () {
|
|
28094
28798
|
if (!catalogItem) return;
|
|
28095
|
-
setState(_objectSpread$
|
|
28799
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28096
28800
|
loading: true,
|
|
28097
|
-
mappingData: _objectSpread$
|
|
28801
|
+
mappingData: _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28098
28802
|
filterContex: filterContex
|
|
28099
28803
|
})
|
|
28100
28804
|
}));
|
|
28101
28805
|
if (!filterServerSide) {
|
|
28102
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
28806
|
+
apiHandler.readList(configuration.mapping, _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28103
28807
|
filterContex: filterContex
|
|
28104
28808
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
28105
28809
|
var newData = data.data.map(function (d) {
|
|
28106
|
-
return _objectSpread$
|
|
28810
|
+
return _objectSpread$C(_objectSpread$C({}, d), {}, {
|
|
28107
28811
|
_id: d._id || d.ID || nanoid()
|
|
28108
28812
|
});
|
|
28109
28813
|
});
|
|
28110
28814
|
onChange({
|
|
28111
|
-
pagination: _objectSpread$
|
|
28815
|
+
pagination: _objectSpread$C({}, state.pagination),
|
|
28112
28816
|
filters: {},
|
|
28113
28817
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
28114
28818
|
return c.defaultSortOrder;
|
|
@@ -28124,7 +28828,7 @@ function useTableData$1 (_ref) {
|
|
|
28124
28828
|
});
|
|
28125
28829
|
} else {
|
|
28126
28830
|
onChange({
|
|
28127
|
-
pagination: _objectSpread$
|
|
28831
|
+
pagination: _objectSpread$C({}, state.pagination),
|
|
28128
28832
|
filters: {},
|
|
28129
28833
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
28130
28834
|
return c.defaultSortOrder;
|
|
@@ -28140,17 +28844,17 @@ function useTableData$1 (_ref) {
|
|
|
28140
28844
|
}
|
|
28141
28845
|
}, [filterContex, catalogItem]);
|
|
28142
28846
|
var onChange = function onChange(p, dataParam) {
|
|
28143
|
-
setState(_objectSpread$
|
|
28847
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28144
28848
|
loading: true
|
|
28145
28849
|
}));
|
|
28146
28850
|
if (!filterServerSide) {
|
|
28147
28851
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
28148
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
28852
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$C(_objectSpread$C({}, p), {}, {
|
|
28149
28853
|
data: unfilteredData
|
|
28150
28854
|
})),
|
|
28151
28855
|
data = _applyFilterAndSortat.data,
|
|
28152
28856
|
pagination = _applyFilterAndSortat.pagination;
|
|
28153
|
-
setState(_objectSpread$
|
|
28857
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28154
28858
|
data: data,
|
|
28155
28859
|
pagination: pagination,
|
|
28156
28860
|
loading: false,
|
|
@@ -28161,20 +28865,20 @@ function useTableData$1 (_ref) {
|
|
|
28161
28865
|
sorter: p.sorter
|
|
28162
28866
|
});
|
|
28163
28867
|
} else {
|
|
28164
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
28868
|
+
apiHandler.readList(configuration.mapping, _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28165
28869
|
filterContex: filterContex
|
|
28166
28870
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
28167
|
-
setState(_objectSpread$
|
|
28871
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28168
28872
|
data: data.data.map(function (dt) {
|
|
28169
|
-
return _objectSpread$
|
|
28873
|
+
return _objectSpread$C(_objectSpread$C({}, dt), {}, {
|
|
28170
28874
|
_id: dt._id || dt.ID || nanoid()
|
|
28171
28875
|
});
|
|
28172
28876
|
}),
|
|
28173
|
-
pagination: _objectSpread$
|
|
28877
|
+
pagination: _objectSpread$C(_objectSpread$C({}, p.pagination), {}, {
|
|
28174
28878
|
total: data.total
|
|
28175
28879
|
}),
|
|
28176
28880
|
loading: false,
|
|
28177
|
-
mappingData: _objectSpread$
|
|
28881
|
+
mappingData: _objectSpread$C(_objectSpread$C({}, catalogItem), {}, {
|
|
28178
28882
|
filterContex: filterContex
|
|
28179
28883
|
})
|
|
28180
28884
|
}));
|
|
@@ -28195,7 +28899,7 @@ function useTableData$1 (_ref) {
|
|
|
28195
28899
|
filters['_id'] = [id, 'eq', false];
|
|
28196
28900
|
_context.next = 4;
|
|
28197
28901
|
return apiHandler.readList(configuration.mapping, {
|
|
28198
|
-
pagination: _objectSpread$
|
|
28902
|
+
pagination: _objectSpread$C({}, state.pagination),
|
|
28199
28903
|
columns: configuration.columns,
|
|
28200
28904
|
filters: filters,
|
|
28201
28905
|
sorter: filterData.sorter
|
|
@@ -28214,7 +28918,7 @@ function useTableData$1 (_ref) {
|
|
|
28214
28918
|
};
|
|
28215
28919
|
}();
|
|
28216
28920
|
var onSelect = function onSelect(keys) {
|
|
28217
|
-
setState(_objectSpread$
|
|
28921
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28218
28922
|
selected: keys
|
|
28219
28923
|
}));
|
|
28220
28924
|
};
|
|
@@ -28224,7 +28928,7 @@ function useTableData$1 (_ref) {
|
|
|
28224
28928
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
28225
28929
|
while (1) switch (_context3.prev = _context3.next) {
|
|
28226
28930
|
case 0:
|
|
28227
|
-
setState(_objectSpread$
|
|
28931
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28228
28932
|
deleting: true
|
|
28229
28933
|
}));
|
|
28230
28934
|
newData = _toConsumableArray(state.data);
|
|
@@ -28239,7 +28943,7 @@ function useTableData$1 (_ref) {
|
|
|
28239
28943
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
28240
28944
|
return nd._id === state.selected[index];
|
|
28241
28945
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
28242
|
-
mappingData = _objectSpread$
|
|
28946
|
+
mappingData = _objectSpread$C(_objectSpread$C({}, mappingData), state.mappingData);
|
|
28243
28947
|
_context2.next = 5;
|
|
28244
28948
|
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
28949
|
case 5:
|
|
@@ -28289,7 +28993,7 @@ function useTableData$1 (_ref) {
|
|
|
28289
28993
|
}
|
|
28290
28994
|
_context3.next = 18;
|
|
28291
28995
|
return apiHandler.readList(configuration.mapping, {
|
|
28292
|
-
pagination: _objectSpread$
|
|
28996
|
+
pagination: _objectSpread$C(_objectSpread$C({}, state.pagination), {}, {
|
|
28293
28997
|
current: current
|
|
28294
28998
|
}),
|
|
28295
28999
|
columns: configuration.columns,
|
|
@@ -28301,11 +29005,11 @@ function useTableData$1 (_ref) {
|
|
|
28301
29005
|
newData = data.data;
|
|
28302
29006
|
total = data.total;
|
|
28303
29007
|
case 21:
|
|
28304
|
-
setState(_objectSpread$
|
|
29008
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28305
29009
|
selected: [],
|
|
28306
29010
|
deleting: false,
|
|
28307
29011
|
data: newData,
|
|
28308
|
-
pagination: _objectSpread$
|
|
29012
|
+
pagination: _objectSpread$C(_objectSpread$C({}, state.pagination), {}, {
|
|
28309
29013
|
current: current,
|
|
28310
29014
|
total: total
|
|
28311
29015
|
})
|
|
@@ -28321,12 +29025,12 @@ function useTableData$1 (_ref) {
|
|
|
28321
29025
|
};
|
|
28322
29026
|
}();
|
|
28323
29027
|
function setLoading() {
|
|
28324
|
-
setState(_objectSpread$
|
|
29028
|
+
setState(_objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
28325
29029
|
loading: true
|
|
28326
29030
|
}));
|
|
28327
29031
|
}
|
|
28328
|
-
return _objectSpread$
|
|
28329
|
-
configuration: _objectSpread$
|
|
29032
|
+
return _objectSpread$C(_objectSpread$C({}, state), {}, {
|
|
29033
|
+
configuration: _objectSpread$C(_objectSpread$C({}, configuration), {}, {
|
|
28330
29034
|
title: undefined
|
|
28331
29035
|
}),
|
|
28332
29036
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -28438,8 +29142,8 @@ function objectHash (obj) {
|
|
|
28438
29142
|
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
29143
|
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
29144
|
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$
|
|
29145
|
+
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; }
|
|
29146
|
+
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; }
|
|
28443
29147
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
28444
29148
|
function useTableData (_ref) {
|
|
28445
29149
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$filter4, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -28498,7 +29202,7 @@ function useTableData (_ref) {
|
|
|
28498
29202
|
var _useState13 = useState({
|
|
28499
29203
|
loading: true,
|
|
28500
29204
|
deleting: false,
|
|
28501
|
-
pagination: _objectSpread$
|
|
29205
|
+
pagination: _objectSpread$B({
|
|
28502
29206
|
current: 1,
|
|
28503
29207
|
pageSize: 20,
|
|
28504
29208
|
total: 0,
|
|
@@ -28507,7 +29211,7 @@ function useTableData (_ref) {
|
|
|
28507
29211
|
selected: [],
|
|
28508
29212
|
canDelete: !!apiHandler.canDelete,
|
|
28509
29213
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
28510
|
-
mappingData: _objectSpread$
|
|
29214
|
+
mappingData: _objectSpread$B(_objectSpread$B({}, parentData), {}, {
|
|
28511
29215
|
prefilter: {
|
|
28512
29216
|
select: globalFilter.select
|
|
28513
29217
|
},
|
|
@@ -28518,7 +29222,7 @@ function useTableData (_ref) {
|
|
|
28518
29222
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
28519
29223
|
state = _useState14[0],
|
|
28520
29224
|
setState = _useState14[1];
|
|
28521
|
-
var mappingData = _objectSpread$
|
|
29225
|
+
var mappingData = _objectSpread$B(_objectSpread$B(_objectSpread$B({}, parentData), state.data), {}, {
|
|
28522
29226
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
28523
29227
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
28524
29228
|
});
|
|
@@ -28557,7 +29261,7 @@ function useTableData (_ref) {
|
|
|
28557
29261
|
}
|
|
28558
29262
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
28559
29263
|
var newInitData = initData;
|
|
28560
|
-
var newState = _objectSpread$
|
|
29264
|
+
var newState = _objectSpread$B({}, state);
|
|
28561
29265
|
var selected = [];
|
|
28562
29266
|
if (configuration.deselectOnUpdate == false) {
|
|
28563
29267
|
selected = state.selected;
|
|
@@ -28574,7 +29278,7 @@ function useTableData (_ref) {
|
|
|
28574
29278
|
dataRow: dataRow
|
|
28575
29279
|
}),
|
|
28576
29280
|
_data = _updateData.data;
|
|
28577
|
-
newState = _objectSpread$
|
|
29281
|
+
newState = _objectSpread$B(_objectSpread$B({}, newState), {}, {
|
|
28578
29282
|
data: _data,
|
|
28579
29283
|
selected: selected
|
|
28580
29284
|
});
|
|
@@ -28586,8 +29290,8 @@ function useTableData (_ref) {
|
|
|
28586
29290
|
dataRow: dataRow
|
|
28587
29291
|
}),
|
|
28588
29292
|
nextInitData = _updateData2.data;
|
|
28589
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
28590
|
-
filters: _objectSpread$
|
|
29293
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, filterData), {}, {
|
|
29294
|
+
filters: _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter6 = configuration.filter) !== null && _configuration$filter6 !== void 0 && (_configuration$filter6 = _configuration$filter6.toggle) !== null && _configuration$filter6 !== void 0 && _configuration$filter6.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
|
|
28591
29295
|
}, 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
29296
|
genericProps: globalFilter.toggle
|
|
28593
29297
|
} : undefined), {}, {
|
|
@@ -28597,7 +29301,7 @@ function useTableData (_ref) {
|
|
|
28597
29301
|
_data2 = _applyFilterAndSortat.data,
|
|
28598
29302
|
pagination = _applyFilterAndSortat.pagination;
|
|
28599
29303
|
newInitData = nextInitData;
|
|
28600
|
-
newState = _objectSpread$
|
|
29304
|
+
newState = _objectSpread$B(_objectSpread$B({}, newState), {}, {
|
|
28601
29305
|
pagination: pagination,
|
|
28602
29306
|
data: _data2,
|
|
28603
29307
|
selected: selected
|
|
@@ -28607,8 +29311,8 @@ function useTableData (_ref) {
|
|
|
28607
29311
|
if (apiHandler.canCreate) {
|
|
28608
29312
|
apiCreate(data).then(function (res) {
|
|
28609
29313
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
28610
|
-
initData && setInitData(_objectSpread$
|
|
28611
|
-
setState(_objectSpread$
|
|
29314
|
+
initData && setInitData(_objectSpread$B({}, initData));
|
|
29315
|
+
setState(_objectSpread$B({}, state));
|
|
28612
29316
|
}
|
|
28613
29317
|
});
|
|
28614
29318
|
}
|
|
@@ -28621,7 +29325,7 @@ function useTableData (_ref) {
|
|
|
28621
29325
|
var triggerRefresh = function triggerRefresh() {
|
|
28622
29326
|
var _configuration$filter8;
|
|
28623
29327
|
setError(undefined);
|
|
28624
|
-
var newGlobalFilter = _objectSpread$
|
|
29328
|
+
var newGlobalFilter = _objectSpread$B({}, globalFilter);
|
|
28625
29329
|
//on refresh update default filter, since global value can change
|
|
28626
29330
|
if ((_configuration$filter8 = configuration.filter) !== null && _configuration$filter8 !== void 0 && _configuration$filter8["default"]) {
|
|
28627
29331
|
var _configuration$filter9;
|
|
@@ -28632,7 +29336,7 @@ function useTableData (_ref) {
|
|
|
28632
29336
|
newGlobalFilter["default"] = _defaultFilter;
|
|
28633
29337
|
setGlobaFilter(newGlobalFilter);
|
|
28634
29338
|
}
|
|
28635
|
-
onChange(_objectSpread$
|
|
29339
|
+
onChange(_objectSpread$B({
|
|
28636
29340
|
pagination: state.pagination
|
|
28637
29341
|
}, filterData), newGlobalFilter, true);
|
|
28638
29342
|
};
|
|
@@ -28650,7 +29354,7 @@ function useTableData (_ref) {
|
|
|
28650
29354
|
order: c.defaultSortOrder
|
|
28651
29355
|
};
|
|
28652
29356
|
});
|
|
28653
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
29357
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28654
29358
|
loading: false
|
|
28655
29359
|
}));else {
|
|
28656
29360
|
onChange({
|
|
@@ -28693,7 +29397,7 @@ function useTableData (_ref) {
|
|
|
28693
29397
|
case 0:
|
|
28694
29398
|
filters = {};
|
|
28695
29399
|
filters['_id'] = [id, 'eq', false];
|
|
28696
|
-
ssf = _objectSpread$
|
|
29400
|
+
ssf = _objectSpread$B({
|
|
28697
29401
|
pagination: {
|
|
28698
29402
|
current: 1,
|
|
28699
29403
|
pageSize: 1
|
|
@@ -28704,7 +29408,7 @@ function useTableData (_ref) {
|
|
|
28704
29408
|
genericProps: globalFilter.toggle
|
|
28705
29409
|
} : undefined);
|
|
28706
29410
|
_context2.next = 5;
|
|
28707
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
29411
|
+
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), ssf);
|
|
28708
29412
|
case 5:
|
|
28709
29413
|
data = _context2.sent;
|
|
28710
29414
|
return _context2.abrupt("return", data);
|
|
@@ -28748,12 +29452,12 @@ function useTableData (_ref) {
|
|
|
28748
29452
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
28749
29453
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
28750
29454
|
overwriteMappingData = _args3.length > 4 ? _args3[4] : undefined;
|
|
28751
|
-
setState(_objectSpread$
|
|
29455
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28752
29456
|
mappingData: overwriteMappingData !== null && overwriteMappingData !== void 0 ? overwriteMappingData : state.mappingData,
|
|
28753
29457
|
loading: true
|
|
28754
29458
|
}));
|
|
28755
29459
|
currentData = initData;
|
|
28756
|
-
filterData = _objectSpread$
|
|
29460
|
+
filterData = _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, prefilter.search), ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.applyDefaultValue) !== false || ((_configuration$filter12 = configuration.filter) === null || _configuration$filter12 === void 0 || (_configuration$filter12 = _configuration$filter12.select) === null || _configuration$filter12 === void 0 ? void 0 : _configuration$filter12.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter13 = (_configuration$filter14 = configuration.filter) === null || _configuration$filter14 === void 0 || (_configuration$filter14 = _configuration$filter14.select) === null || _configuration$filter14 === void 0 ? void 0 : _configuration$filter14.filterField) !== null && _configuration$filter13 !== void 0 ? _configuration$filter13 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
|
|
28757
29461
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
|
|
28758
29462
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
28759
29463
|
_ref7[0];
|
|
@@ -28761,7 +29465,7 @@ function useTableData (_ref) {
|
|
|
28761
29465
|
return v != null;
|
|
28762
29466
|
}));
|
|
28763
29467
|
currentFilterHash = objectHash(filterData);
|
|
28764
|
-
currentPagination = _objectSpread$
|
|
29468
|
+
currentPagination = _objectSpread$B(_objectSpread$B({}, p.pagination), {}, {
|
|
28765
29469
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
28766
29470
|
});
|
|
28767
29471
|
filterHash.current = currentFilterHash;
|
|
@@ -28769,7 +29473,7 @@ function useTableData (_ref) {
|
|
|
28769
29473
|
_context3.next = 21;
|
|
28770
29474
|
break;
|
|
28771
29475
|
}
|
|
28772
|
-
ssf = _objectSpread$
|
|
29476
|
+
ssf = _objectSpread$B({
|
|
28773
29477
|
pagination: currentPagination,
|
|
28774
29478
|
columns: configuration.columns,
|
|
28775
29479
|
filters: filterData,
|
|
@@ -28778,12 +29482,12 @@ function useTableData (_ref) {
|
|
|
28778
29482
|
genericProps: prefilter.toggle
|
|
28779
29483
|
} : undefined);
|
|
28780
29484
|
_context3.next = 15;
|
|
28781
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
29485
|
+
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$B(_objectSpread$B({}, mappingData), overwriteMappingData), ssf, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid, parseFilter(!(configuration !== null && configuration !== void 0 && (_configuration$filter16 = configuration.filter) !== null && _configuration$filter16 !== void 0 && (_configuration$filter16 = _configuration$filter16.toggle) !== null && _configuration$filter16 !== void 0 && _configuration$filter16.inQuery) ? (_prefilter$toggle = prefilter.toggle) !== null && _prefilter$toggle !== void 0 ? _prefilter$toggle : {} : {}, (_parseFilter = parseFilter(p.filters, undefined)) === null || _parseFilter === void 0 ? void 0 : _parseFilter.slice(1, -1)));
|
|
28782
29486
|
case 15:
|
|
28783
29487
|
data = _context3.sent;
|
|
28784
|
-
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, _objectSpread$
|
|
29488
|
+
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, _objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), ssf);
|
|
28785
29489
|
currentData = data.data;
|
|
28786
|
-
currentPagination = _objectSpread$
|
|
29490
|
+
currentPagination = _objectSpread$B(_objectSpread$B({}, currentPagination), {}, {
|
|
28787
29491
|
total: data.total
|
|
28788
29492
|
});
|
|
28789
29493
|
_context3.next = 30;
|
|
@@ -28800,7 +29504,7 @@ function useTableData (_ref) {
|
|
|
28800
29504
|
currentData = _data3.data;
|
|
28801
29505
|
setInitData(currentData);
|
|
28802
29506
|
case 27:
|
|
28803
|
-
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$
|
|
29507
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$B(_objectSpread$B({}, p), {}, {
|
|
28804
29508
|
pagination: currentPagination,
|
|
28805
29509
|
filters: filterData,
|
|
28806
29510
|
data: currentData,
|
|
@@ -28809,11 +29513,11 @@ function useTableData (_ref) {
|
|
|
28809
29513
|
currentData = _data4;
|
|
28810
29514
|
currentPagination = pagination;
|
|
28811
29515
|
case 30:
|
|
28812
|
-
setState(_objectSpread$
|
|
29516
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28813
29517
|
loading: false,
|
|
28814
29518
|
data: currentData,
|
|
28815
29519
|
pagination: currentPagination,
|
|
28816
|
-
mappingData: _objectSpread$
|
|
29520
|
+
mappingData: _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, parentData), state.mappingData), overwriteMappingData), {}, {
|
|
28817
29521
|
prefilter: prefilter
|
|
28818
29522
|
}),
|
|
28819
29523
|
currentFetchUrl: currentUrl
|
|
@@ -28835,7 +29539,7 @@ function useTableData (_ref) {
|
|
|
28835
29539
|
};
|
|
28836
29540
|
}();
|
|
28837
29541
|
var onSelect = function onSelect(keys) {
|
|
28838
|
-
setState(_objectSpread$
|
|
29542
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28839
29543
|
selected: keys
|
|
28840
29544
|
}));
|
|
28841
29545
|
};
|
|
@@ -28846,7 +29550,7 @@ function useTableData (_ref) {
|
|
|
28846
29550
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
28847
29551
|
while (1) switch (_context5.prev = _context5.next) {
|
|
28848
29552
|
case 0:
|
|
28849
|
-
setState(_objectSpread$
|
|
29553
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28850
29554
|
deleting: true
|
|
28851
29555
|
}));
|
|
28852
29556
|
newData = _toConsumableArray(state.data);
|
|
@@ -28886,7 +29590,7 @@ function useTableData (_ref) {
|
|
|
28886
29590
|
} finally {
|
|
28887
29591
|
_iterator.f();
|
|
28888
29592
|
}
|
|
28889
|
-
mappingData = _objectSpread$
|
|
29593
|
+
mappingData = _objectSpread$B(_objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), mapToggle);
|
|
28890
29594
|
deleteResult = undefined;
|
|
28891
29595
|
_context4.prev = 7;
|
|
28892
29596
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -28976,12 +29680,12 @@ function useTableData (_ref) {
|
|
|
28976
29680
|
break;
|
|
28977
29681
|
}
|
|
28978
29682
|
_context5.next = 25;
|
|
28979
|
-
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$
|
|
28980
|
-
pagination: _objectSpread$
|
|
29683
|
+
return apiHandler.readList(parentMapping || configuration.mapping, _objectSpread$B(_objectSpread$B({}, mappingData), state.mappingData), _objectSpread$B({
|
|
29684
|
+
pagination: _objectSpread$B(_objectSpread$B({}, state.pagination), {}, {
|
|
28981
29685
|
current: current
|
|
28982
29686
|
}),
|
|
28983
29687
|
columns: configuration.columns,
|
|
28984
|
-
filters: _objectSpread$
|
|
29688
|
+
filters: _objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B(_objectSpread$B({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter17 = configuration.filter) !== null && _configuration$filter17 !== void 0 && (_configuration$filter17 = _configuration$filter17.toggle) !== null && _configuration$filter17 !== void 0 && _configuration$filter17.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
|
|
28985
29689
|
sorter: filterData.sorter
|
|
28986
29690
|
}, 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
29691
|
genericProps: globalFilter.toggle
|
|
@@ -28992,11 +29696,11 @@ function useTableData (_ref) {
|
|
|
28992
29696
|
total = data.total;
|
|
28993
29697
|
case 28:
|
|
28994
29698
|
setInitData(newInitData);
|
|
28995
|
-
setState(_objectSpread$
|
|
29699
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
28996
29700
|
selected: [],
|
|
28997
29701
|
deleting: false,
|
|
28998
29702
|
data: newData,
|
|
28999
|
-
pagination: _objectSpread$
|
|
29703
|
+
pagination: _objectSpread$B(_objectSpread$B({}, state.pagination), {}, {
|
|
29000
29704
|
current: current === 0 ? 1 : current,
|
|
29001
29705
|
total: total
|
|
29002
29706
|
})
|
|
@@ -29017,14 +29721,14 @@ function useTableData (_ref) {
|
|
|
29017
29721
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
29018
29722
|
return;
|
|
29019
29723
|
}
|
|
29020
|
-
var newGlobalFilter = _objectSpread$
|
|
29724
|
+
var newGlobalFilter = _objectSpread$B({}, globalFilter);
|
|
29021
29725
|
if (value !== null && value !== void 0 && value.length) {
|
|
29022
29726
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
29023
29727
|
} else {
|
|
29024
29728
|
newGlobalFilter.select = {};
|
|
29025
29729
|
}
|
|
29026
29730
|
setGlobaFilter(newGlobalFilter);
|
|
29027
|
-
onChange(_objectSpread$
|
|
29731
|
+
onChange(_objectSpread$B({
|
|
29028
29732
|
pagination: state.pagination
|
|
29029
29733
|
}, filterData), newGlobalFilter);
|
|
29030
29734
|
};
|
|
@@ -29035,16 +29739,16 @@ function useTableData (_ref) {
|
|
|
29035
29739
|
return;
|
|
29036
29740
|
}
|
|
29037
29741
|
var toggleFilter = {};
|
|
29038
|
-
var mappingData = _objectSpread$
|
|
29742
|
+
var mappingData = _objectSpread$B({}, state.mappingData);
|
|
29039
29743
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
29040
29744
|
mappingData[f] = !globalFilter.toggle && configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : undefined;
|
|
29041
29745
|
toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
29042
29746
|
});
|
|
29043
|
-
var newGlobalFilter = _objectSpread$
|
|
29747
|
+
var newGlobalFilter = _objectSpread$B(_objectSpread$B({}, globalFilter), {}, {
|
|
29044
29748
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
29045
29749
|
});
|
|
29046
29750
|
setGlobaFilter(newGlobalFilter);
|
|
29047
|
-
onChange(_objectSpread$
|
|
29751
|
+
onChange(_objectSpread$B({
|
|
29048
29752
|
pagination: state.pagination
|
|
29049
29753
|
}, filterData), newGlobalFilter, true, true, mappingData);
|
|
29050
29754
|
};
|
|
@@ -29057,7 +29761,7 @@ function useTableData (_ref) {
|
|
|
29057
29761
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
29058
29762
|
return;
|
|
29059
29763
|
}
|
|
29060
|
-
var newGlobalFilter = _objectSpread$
|
|
29764
|
+
var newGlobalFilter = _objectSpread$B(_objectSpread$B({}, globalFilter), {}, {
|
|
29061
29765
|
search: {}
|
|
29062
29766
|
});
|
|
29063
29767
|
if (value) {
|
|
@@ -29071,7 +29775,7 @@ function useTableData (_ref) {
|
|
|
29071
29775
|
});
|
|
29072
29776
|
}
|
|
29073
29777
|
setGlobaFilter(newGlobalFilter);
|
|
29074
|
-
onChange(_objectSpread$
|
|
29778
|
+
onChange(_objectSpread$B({
|
|
29075
29779
|
pagination: state.pagination
|
|
29076
29780
|
}, filterData), newGlobalFilter);
|
|
29077
29781
|
};
|
|
@@ -29081,20 +29785,20 @@ function useTableData (_ref) {
|
|
|
29081
29785
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
29082
29786
|
return;
|
|
29083
29787
|
}
|
|
29084
|
-
var newGlobalFilter = _objectSpread$
|
|
29788
|
+
var newGlobalFilter = _objectSpread$B({}, globalFilter);
|
|
29085
29789
|
newGlobalFilter.timeStamp = {
|
|
29086
29790
|
fromTimeStamp: [from],
|
|
29087
29791
|
toTimeStamp: [to]
|
|
29088
29792
|
};
|
|
29089
29793
|
if (!configuration.filter.period.onlyAsMappingData) setGlobaFilter(newGlobalFilter);
|
|
29090
|
-
onChange(_objectSpread$
|
|
29794
|
+
onChange(_objectSpread$B({
|
|
29091
29795
|
pagination: state.pagination
|
|
29092
|
-
}, filterData), undefined, true, undefined, _objectSpread$
|
|
29796
|
+
}, filterData), undefined, true, undefined, _objectSpread$B(_objectSpread$B({}, state.mappingData), {}, {
|
|
29093
29797
|
from: from,
|
|
29094
29798
|
to: to
|
|
29095
29799
|
}));
|
|
29096
29800
|
};
|
|
29097
|
-
return _objectSpread$
|
|
29801
|
+
return _objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
29098
29802
|
title: title,
|
|
29099
29803
|
configuration: configuration,
|
|
29100
29804
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -29136,8 +29840,8 @@ function StandardTable (_ref) {
|
|
|
29136
29840
|
});
|
|
29137
29841
|
}
|
|
29138
29842
|
|
|
29139
|
-
function ownKeys$
|
|
29140
|
-
function _objectSpread$
|
|
29843
|
+
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; }
|
|
29844
|
+
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; }
|
|
29141
29845
|
function Table (props) {
|
|
29142
29846
|
var root = useStore();
|
|
29143
29847
|
var variant = useMemo(function () {
|
|
@@ -29145,15 +29849,15 @@ function Table (props) {
|
|
|
29145
29849
|
return config.variant;
|
|
29146
29850
|
}, [props.id]);
|
|
29147
29851
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
29148
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
29852
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$A({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$A({}, props))]
|
|
29149
29853
|
});
|
|
29150
29854
|
}
|
|
29151
29855
|
|
|
29152
29856
|
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
29857
|
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
29858
|
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$
|
|
29859
|
+
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; }
|
|
29860
|
+
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; }
|
|
29157
29861
|
function useAGGrid (_ref) {
|
|
29158
29862
|
var id = _ref.id,
|
|
29159
29863
|
filter = _ref.filter,
|
|
@@ -29247,7 +29951,7 @@ function useAGGrid (_ref) {
|
|
|
29247
29951
|
value = _ref3[1];
|
|
29248
29952
|
if (_idx == 0) {
|
|
29249
29953
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
29250
|
-
rdat.push(_objectSpread$
|
|
29954
|
+
rdat.push(_objectSpread$z(_objectSpread$z({}, rd), {}, {
|
|
29251
29955
|
grouping: [idx.toString()]
|
|
29252
29956
|
}));
|
|
29253
29957
|
var sp = key.split(':');
|
|
@@ -29390,8 +30094,8 @@ var value = "value-FCA-6";
|
|
|
29390
30094
|
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
30095
|
styleInject(css_248z$k);
|
|
29392
30096
|
|
|
29393
|
-
function ownKeys$
|
|
29394
|
-
function _objectSpread$
|
|
30097
|
+
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; }
|
|
30098
|
+
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; }
|
|
29395
30099
|
var AGChart = function AGChart(_ref) {
|
|
29396
30100
|
var data = _ref.data;
|
|
29397
30101
|
var groupedData = [];
|
|
@@ -29399,11 +30103,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
29399
30103
|
data.forEach(function (dt) {
|
|
29400
30104
|
if (dt.count == 0) return;
|
|
29401
30105
|
if (groupedData.length > dt.grouping[0]) {
|
|
29402
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
30106
|
+
groupedData[dt.grouping[0]].push(_objectSpread$y(_objectSpread$y({}, dt), {}, {
|
|
29403
30107
|
count: Number(dt.count)
|
|
29404
30108
|
}));
|
|
29405
30109
|
} else {
|
|
29406
|
-
groupedData.push([_objectSpread$
|
|
30110
|
+
groupedData.push([_objectSpread$y(_objectSpread$y({}, dt), {}, {
|
|
29407
30111
|
count: Number(dt.count)
|
|
29408
30112
|
})]);
|
|
29409
30113
|
}
|
|
@@ -29444,8 +30148,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
29444
30148
|
});
|
|
29445
30149
|
};
|
|
29446
30150
|
|
|
29447
|
-
function ownKeys$
|
|
29448
|
-
function _objectSpread$
|
|
30151
|
+
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; }
|
|
30152
|
+
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; }
|
|
29449
30153
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
29450
30154
|
var id = _ref.id,
|
|
29451
30155
|
filter = _ref.filter,
|
|
@@ -29538,7 +30242,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
29538
30242
|
});
|
|
29539
30243
|
});
|
|
29540
30244
|
}
|
|
29541
|
-
return _objectSpread$
|
|
30245
|
+
return _objectSpread$x(_objectSpread$x({}, column), {}, {
|
|
29542
30246
|
cellRenderer: renderer
|
|
29543
30247
|
});
|
|
29544
30248
|
});
|
|
@@ -29808,8 +30512,8 @@ var CustomText = function CustomText(_ref) {
|
|
|
29808
30512
|
};
|
|
29809
30513
|
var CustomText$1 = observer(CustomText);
|
|
29810
30514
|
|
|
29811
|
-
function ownKeys$
|
|
29812
|
-
function _objectSpread$
|
|
30515
|
+
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; }
|
|
30516
|
+
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; }
|
|
29813
30517
|
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
30518
|
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
30519
|
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 +30576,7 @@ function useFilterBoxData (id) {
|
|
|
29872
30576
|
} finally {
|
|
29873
30577
|
_iterator.f();
|
|
29874
30578
|
}
|
|
29875
|
-
return _objectSpread$
|
|
30579
|
+
return _objectSpread$w(_objectSpread$w({}, state), ob);
|
|
29876
30580
|
}
|
|
29877
30581
|
return {
|
|
29878
30582
|
configuration: configuration,
|
|
@@ -29886,8 +30590,8 @@ function useFilterBoxData (id) {
|
|
|
29886
30590
|
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
30591
|
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
30592
|
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$
|
|
30593
|
+
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; }
|
|
30594
|
+
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; }
|
|
29891
30595
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
29892
30596
|
var id = _ref.id,
|
|
29893
30597
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -29915,7 +30619,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
29915
30619
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
29916
30620
|
mode: "single",
|
|
29917
30621
|
apiInterface: filter.requestOptions,
|
|
29918
|
-
wholeData: _objectSpread$
|
|
30622
|
+
wholeData: _objectSpread$v(_objectSpread$v({}, state.filter), {}, {
|
|
29919
30623
|
tab: tab
|
|
29920
30624
|
}),
|
|
29921
30625
|
mapping: filter.requestMapping,
|
|
@@ -30147,8 +30851,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
30147
30851
|
return false;
|
|
30148
30852
|
});
|
|
30149
30853
|
|
|
30150
|
-
function ownKeys$
|
|
30151
|
-
function _objectSpread$
|
|
30854
|
+
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; }
|
|
30855
|
+
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; }
|
|
30152
30856
|
function useUIBuilderData (id) {
|
|
30153
30857
|
var save = undefined;
|
|
30154
30858
|
var root = useStore();
|
|
@@ -30180,7 +30884,7 @@ function useUIBuilderData (id) {
|
|
|
30180
30884
|
var configuration = _useMemo.configuration;
|
|
30181
30885
|
useEffect(function () {
|
|
30182
30886
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
30183
|
-
return setFilter(_objectSpread$
|
|
30887
|
+
return setFilter(_objectSpread$u(_objectSpread$u({}, filter), {}, {
|
|
30184
30888
|
sessionGuid: res
|
|
30185
30889
|
}));
|
|
30186
30890
|
});
|
|
@@ -30203,8 +30907,8 @@ function useUIBuilderData (id) {
|
|
|
30203
30907
|
};
|
|
30204
30908
|
}
|
|
30205
30909
|
|
|
30206
|
-
function ownKeys$
|
|
30207
|
-
function _objectSpread$
|
|
30910
|
+
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; }
|
|
30911
|
+
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; }
|
|
30208
30912
|
function UIBuilder(_ref) {
|
|
30209
30913
|
var id = _ref.id;
|
|
30210
30914
|
var state = useUIBuilderData(id);
|
|
@@ -30231,7 +30935,7 @@ function UIBuilder(_ref) {
|
|
|
30231
30935
|
override = {
|
|
30232
30936
|
value: newFilter[item.field],
|
|
30233
30937
|
setValue: function setValue(newVal) {
|
|
30234
|
-
var newFilter = _objectSpread$
|
|
30938
|
+
var newFilter = _objectSpread$t({}, state.filter);
|
|
30235
30939
|
newFilter[item.field] = newVal;
|
|
30236
30940
|
state.setFilter(newFilter);
|
|
30237
30941
|
}
|
|
@@ -30279,7 +30983,7 @@ function UIBuilder(_ref) {
|
|
|
30279
30983
|
case 'AGGrid':
|
|
30280
30984
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
30281
30985
|
id: item.id,
|
|
30282
|
-
filter: _objectSpread$
|
|
30986
|
+
filter: _objectSpread$t({
|
|
30283
30987
|
optionCodices: JSON.stringify(state.data)
|
|
30284
30988
|
}, state.filter),
|
|
30285
30989
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -30439,8 +31143,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
30439
31143
|
};
|
|
30440
31144
|
var OrgItem$1 = observer(OrgItem);
|
|
30441
31145
|
|
|
30442
|
-
function ownKeys$
|
|
30443
|
-
function _objectSpread$
|
|
31146
|
+
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; }
|
|
31147
|
+
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; }
|
|
30444
31148
|
function useTransformJson (_ref) {
|
|
30445
31149
|
var id = _ref.id;
|
|
30446
31150
|
var _useState = useState(),
|
|
@@ -30506,7 +31210,7 @@ function useTransformJson (_ref) {
|
|
|
30506
31210
|
}();
|
|
30507
31211
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
30508
31212
|
var _data$children;
|
|
30509
|
-
return _objectSpread$
|
|
31213
|
+
return _objectSpread$s(_objectSpread$s({}, data), {}, {
|
|
30510
31214
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
30511
31215
|
data: data,
|
|
30512
31216
|
configuration: configuration,
|
|
@@ -31167,8 +31871,8 @@ function useCatalogEditor (id) {
|
|
|
31167
31871
|
};
|
|
31168
31872
|
}
|
|
31169
31873
|
|
|
31170
|
-
function ownKeys$
|
|
31171
|
-
function _objectSpread$
|
|
31874
|
+
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; }
|
|
31875
|
+
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; }
|
|
31172
31876
|
function DragDropUpload(_ref) {
|
|
31173
31877
|
var api2Params = _ref.api2Params,
|
|
31174
31878
|
catalogId = _ref.catalogId,
|
|
@@ -31276,7 +31980,7 @@ function DragDropUpload(_ref) {
|
|
|
31276
31980
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
31277
31981
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
31278
31982
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
31279
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
31983
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$r(_objectSpread$r({}, props), {}, {
|
|
31280
31984
|
children: [/*#__PURE__*/jsx("p", {
|
|
31281
31985
|
className: "ant-upload-drag-icon",
|
|
31282
31986
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -31493,12 +32197,12 @@ function CatalogEditor(_ref) {
|
|
|
31493
32197
|
}
|
|
31494
32198
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
31495
32199
|
|
|
31496
|
-
function ownKeys$
|
|
31497
|
-
function _objectSpread$
|
|
32200
|
+
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; }
|
|
32201
|
+
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; }
|
|
31498
32202
|
var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(props, ref) {
|
|
31499
32203
|
var _root$contentStore$bo, _root$contentStore$ri;
|
|
31500
32204
|
var root = useStore();
|
|
31501
|
-
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$
|
|
32205
|
+
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$q(_objectSpread$q({}, props), {}, {
|
|
31502
32206
|
ref: ref,
|
|
31503
32207
|
darkMode: root.contentStore.theme == 'darkmode',
|
|
31504
32208
|
jwt: root.dataStore.jwt,
|
|
@@ -31509,8 +32213,8 @@ var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(pro
|
|
|
31509
32213
|
});
|
|
31510
32214
|
var Spreadsheet = observer(SpreadsheetWrapper);
|
|
31511
32215
|
|
|
31512
|
-
function ownKeys$
|
|
31513
|
-
function _objectSpread$
|
|
32216
|
+
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; }
|
|
32217
|
+
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; }
|
|
31514
32218
|
|
|
31515
32219
|
// Type definition for the context state
|
|
31516
32220
|
|
|
@@ -31532,14 +32236,14 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
31532
32236
|
loading: loading,
|
|
31533
32237
|
setOptions: function setOptions(options) {
|
|
31534
32238
|
var state = root.contextStore.getContext('enricher');
|
|
31535
|
-
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$
|
|
32239
|
+
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$p(_objectSpread$p({}, state[stateKey]), {}, {
|
|
31536
32240
|
options: options,
|
|
31537
32241
|
loading: false
|
|
31538
32242
|
})));
|
|
31539
32243
|
},
|
|
31540
32244
|
setLoading: function setLoading(loading) {
|
|
31541
32245
|
var state = root.contextStore.getContext('enricher');
|
|
31542
|
-
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$
|
|
32246
|
+
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$p(_objectSpread$p({}, state[stateKey]), {}, {
|
|
31543
32247
|
loading: loading
|
|
31544
32248
|
})));
|
|
31545
32249
|
}
|
|
@@ -31644,7 +32348,7 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
31644
32348
|
}, [urlPackageId, getContext().packageId, setSelectedPackage]);
|
|
31645
32349
|
|
|
31646
32350
|
// Return context + handlers
|
|
31647
|
-
return _objectSpread$
|
|
32351
|
+
return _objectSpread$p(_objectSpread$p({}, getContext()), {}, {
|
|
31648
32352
|
setSelectedSerie: setSelectedSerie,
|
|
31649
32353
|
setSelectedItem: setSelectedItem,
|
|
31650
32354
|
setSelectedFeature: setSelectedFeature,
|
|
@@ -31993,8 +32697,8 @@ function createTranslatedColumnConfig(field, headerName, languages) {
|
|
|
31993
32697
|
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
32698
|
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
32699
|
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$
|
|
32700
|
+
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; }
|
|
32701
|
+
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; }
|
|
31998
32702
|
|
|
31999
32703
|
/**
|
|
32000
32704
|
* Props for the useTools hook
|
|
@@ -32030,7 +32734,7 @@ var useTools = function useTools(_ref) {
|
|
|
32030
32734
|
conditionalTools = _ref.conditionalTools;
|
|
32031
32735
|
var root = useStore();
|
|
32032
32736
|
var createTool = function createTool(tool) {
|
|
32033
|
-
return _objectSpread$
|
|
32737
|
+
return _objectSpread$o({
|
|
32034
32738
|
startWidth: 600,
|
|
32035
32739
|
defaultPinned: true,
|
|
32036
32740
|
defaultOpen: false
|
|
@@ -32064,12 +32768,12 @@ var useTools = function useTools(_ref) {
|
|
|
32064
32768
|
name: 'Konfigurator',
|
|
32065
32769
|
type: 'Configurator',
|
|
32066
32770
|
where: 'right',
|
|
32067
|
-
parameters: _objectSpread$
|
|
32771
|
+
parameters: _objectSpread$o({
|
|
32068
32772
|
catalogId: catalogId,
|
|
32069
32773
|
packageId: packageId,
|
|
32070
32774
|
isIDMData: !isApi2 ? '1' : undefined
|
|
32071
32775
|
}, parameters),
|
|
32072
|
-
elementProps: catalogId ? _objectSpread$
|
|
32776
|
+
elementProps: catalogId ? _objectSpread$o({
|
|
32073
32777
|
// open configurator for idm catalog
|
|
32074
32778
|
useIDMService: true,
|
|
32075
32779
|
catalogId: catalogId,
|
|
@@ -32083,7 +32787,7 @@ var useTools = function useTools(_ref) {
|
|
|
32083
32787
|
// open configurator for api2 package (configurator light)
|
|
32084
32788
|
loadMask: true,
|
|
32085
32789
|
initItem: item === null || item === void 0 ? void 0 : item.typeNo
|
|
32086
|
-
} : _objectSpread$
|
|
32790
|
+
} : _objectSpread$o({
|
|
32087
32791
|
// open configurator for idm package
|
|
32088
32792
|
useEnricherService: true,
|
|
32089
32793
|
loadPackage: true,
|
|
@@ -32982,6 +33686,9 @@ var TablePackages = observer(function () {
|
|
|
32982
33686
|
editable: false,
|
|
32983
33687
|
pinned: 'left',
|
|
32984
33688
|
lockPinned: true,
|
|
33689
|
+
customParams: {
|
|
33690
|
+
nullFilter: true
|
|
33691
|
+
},
|
|
32985
33692
|
cellRendererParams: {
|
|
32986
33693
|
apiConfig: apiConfig,
|
|
32987
33694
|
modalState: modalState,
|
|
@@ -34561,6 +35268,8 @@ function getConfig(t) {
|
|
|
34561
35268
|
};
|
|
34562
35269
|
}
|
|
34563
35270
|
|
|
35271
|
+
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; }
|
|
35272
|
+
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; }
|
|
34564
35273
|
var ExclusivitySerie = function ExclusivitySerie() {
|
|
34565
35274
|
var _useTranslation = useTranslation(),
|
|
34566
35275
|
t = _useTranslation.t,
|
|
@@ -34687,19 +35396,24 @@ var ExclusivityTable = observer(function (_ref) {
|
|
|
34687
35396
|
};
|
|
34688
35397
|
}, [type, viewOnly]);
|
|
34689
35398
|
var oldDataRef = useRef();
|
|
34690
|
-
var
|
|
35399
|
+
var baseApplicationData = useMemo(function () {
|
|
35400
|
+
return {
|
|
35401
|
+
type: type,
|
|
35402
|
+
packageId: packageId,
|
|
35403
|
+
organizationId: organizationId
|
|
35404
|
+
};
|
|
35405
|
+
}, [type, packageId, organizationId]);
|
|
35406
|
+
var applicationDataWithSubTypeId = useMemo(function () {
|
|
34691
35407
|
if (type === 'eitems' && !selectedSerie) {
|
|
34692
35408
|
return oldDataRef.current;
|
|
34693
35409
|
}
|
|
34694
|
-
var newData = {
|
|
34695
|
-
type: type,
|
|
34696
|
-
packageId: packageId,
|
|
34697
|
-
organizationId: organizationId,
|
|
35410
|
+
var newData = _objectSpread$n(_objectSpread$n({}, baseApplicationData), {}, {
|
|
34698
35411
|
subTypeId: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id
|
|
34699
|
-
};
|
|
35412
|
+
});
|
|
34700
35413
|
oldDataRef.current = newData;
|
|
34701
35414
|
return newData;
|
|
34702
|
-
}, [
|
|
35415
|
+
}, [baseApplicationData, selectedSerie]);
|
|
35416
|
+
var applicationData = type === 'eseries' ? baseApplicationData : applicationDataWithSubTypeId;
|
|
34703
35417
|
var showTable = useMemo(function () {
|
|
34704
35418
|
return selectedPackage && (!['eitems'].includes(type) || type === 'eitems' && applicationData);
|
|
34705
35419
|
}, [type, applicationData, selectedPackage]);
|
|
@@ -34732,7 +35446,7 @@ var ExclusivityTable = observer(function (_ref) {
|
|
|
34732
35446
|
cellDataType: 'objectId'
|
|
34733
35447
|
}])
|
|
34734
35448
|
};
|
|
34735
|
-
}, [apiInterface,
|
|
35449
|
+
}, [apiInterface, config.colDef, viewOnly]);
|
|
34736
35450
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
34737
35451
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
34738
35452
|
title: /*#__PURE__*/jsxs("div", {
|
|
@@ -35141,8 +35855,8 @@ var isDefaultValue = function isDefaultValue(value, type) {
|
|
|
35141
35855
|
return value === getDefaultValue(type);
|
|
35142
35856
|
};
|
|
35143
35857
|
|
|
35144
|
-
function ownKeys$
|
|
35145
|
-
function _objectSpread$
|
|
35858
|
+
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; }
|
|
35859
|
+
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; }
|
|
35146
35860
|
/**
|
|
35147
35861
|
* Custom hook to manage price factor state and logic
|
|
35148
35862
|
* @param props - Hook configuration
|
|
@@ -35179,7 +35893,7 @@ function usePriceFactor(_ref) {
|
|
|
35179
35893
|
var updateEntries = function updateEntries(newTypeEntries) {
|
|
35180
35894
|
setHasChangedCurrentType(true);
|
|
35181
35895
|
setEntries(function (prev) {
|
|
35182
|
-
return _objectSpread$
|
|
35896
|
+
return _objectSpread$m(_objectSpread$m({}, prev), {}, _defineProperty(_defineProperty({}, type, newTypeEntries), type === 'factor' ? 'discount' : 'factor', []));
|
|
35183
35897
|
});
|
|
35184
35898
|
};
|
|
35185
35899
|
var handleModalOpen = useCallback(function () {
|
|
@@ -35216,7 +35930,7 @@ function usePriceFactor(_ref) {
|
|
|
35216
35930
|
// Always ensure at least one entry when switching types
|
|
35217
35931
|
var newEntries = hasChangedCurrentType ? [] : entries[newType];
|
|
35218
35932
|
setEntries(function (prev) {
|
|
35219
|
-
return _objectSpread$
|
|
35933
|
+
return _objectSpread$m(_objectSpread$m({}, prev), {}, _defineProperty({}, newType, newEntries.length > 0 ? newEntries : [{
|
|
35220
35934
|
value: getDefaultValue(newType),
|
|
35221
35935
|
isValid: true
|
|
35222
35936
|
}]));
|
|
@@ -35652,8 +36366,8 @@ var css_248z$d = ".input-leHam {\n position: relative;\n width: 200px;\n heig
|
|
|
35652
36366
|
styleInject(css_248z$d);
|
|
35653
36367
|
|
|
35654
36368
|
var _excluded$5 = ["onSave", "value"];
|
|
35655
|
-
function ownKeys$
|
|
35656
|
-
function _objectSpread$
|
|
36369
|
+
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; }
|
|
36370
|
+
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; }
|
|
35657
36371
|
function PriceFactorInput(_ref) {
|
|
35658
36372
|
var _onSave = _ref.onSave,
|
|
35659
36373
|
value = _ref.value,
|
|
@@ -35669,7 +36383,7 @@ function PriceFactorInput(_ref) {
|
|
|
35669
36383
|
title: props.tooltip,
|
|
35670
36384
|
children: /*#__PURE__*/jsx("div", {
|
|
35671
36385
|
className: classnames(input, 'price-factor-input', props.className, _defineProperty({}, disabled$1, props.disabled)),
|
|
35672
|
-
children: /*#__PURE__*/jsx(PriceFactorCellRenderer, _objectSpread$
|
|
36386
|
+
children: /*#__PURE__*/jsx(PriceFactorCellRenderer, _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
35673
36387
|
isNotInAGGrid: true,
|
|
35674
36388
|
value: innerValue,
|
|
35675
36389
|
onSave: function onSave(data, value) {
|
|
@@ -35745,8 +36459,8 @@ function Setting(_ref) {
|
|
|
35745
36459
|
});
|
|
35746
36460
|
}
|
|
35747
36461
|
|
|
35748
|
-
function ownKeys$
|
|
35749
|
-
function _objectSpread$
|
|
36462
|
+
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; }
|
|
36463
|
+
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; }
|
|
35750
36464
|
var Prices = observer(function (_ref) {
|
|
35751
36465
|
var _pricelist$seriePrice;
|
|
35752
36466
|
var organizationId = _ref.organizationId,
|
|
@@ -35769,8 +36483,8 @@ var Prices = observer(function (_ref) {
|
|
|
35769
36483
|
if (!selectedSerie) return;
|
|
35770
36484
|
|
|
35771
36485
|
// Create copies of the objects to modify
|
|
35772
|
-
var newFactors = _objectSpread$
|
|
35773
|
-
var serieFactors = _objectSpread$
|
|
36486
|
+
var newFactors = _objectSpread$k({}, pricelist.pfgPricefactors);
|
|
36487
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
35774
36488
|
if (value.length === 0) {
|
|
35775
36489
|
// Remove the empty price feature group
|
|
35776
36490
|
delete serieFactors[priceFeatureGroupItem];
|
|
@@ -35801,7 +36515,7 @@ var Prices = observer(function (_ref) {
|
|
|
35801
36515
|
var updatePfgPriority = useCallback(function (priceFeatureGroupItem, value) {
|
|
35802
36516
|
var _newPriority$selected;
|
|
35803
36517
|
if (!selectedSerie) return;
|
|
35804
|
-
var newPriority = _objectSpread$
|
|
36518
|
+
var newPriority = _objectSpread$k({}, pricelist.pfgPricefactorsPriority);
|
|
35805
36519
|
var seriesPriority = new Set((_newPriority$selected = newPriority[selectedSerie.serieNo]) !== null && _newPriority$selected !== void 0 ? _newPriority$selected : []);
|
|
35806
36520
|
if (value === true) {
|
|
35807
36521
|
seriesPriority.add(priceFeatureGroupItem);
|
|
@@ -35820,7 +36534,7 @@ var Prices = observer(function (_ref) {
|
|
|
35820
36534
|
var updatePgPriority = useCallback(function (priceFeatureGroupItem, value) {
|
|
35821
36535
|
var _newPriority$selected2;
|
|
35822
36536
|
if (!selectedSerie) return;
|
|
35823
|
-
var newPriority = _objectSpread$
|
|
36537
|
+
var newPriority = _objectSpread$k({}, pricelist.pgPricefactorsPriority);
|
|
35824
36538
|
var seriesPriority = new Set((_newPriority$selected2 = newPriority[selectedSerie.serieNo]) !== null && _newPriority$selected2 !== void 0 ? _newPriority$selected2 : []);
|
|
35825
36539
|
if (value === true) {
|
|
35826
36540
|
seriesPriority.add(priceFeatureGroupItem);
|
|
@@ -35840,8 +36554,8 @@ var Prices = observer(function (_ref) {
|
|
|
35840
36554
|
if (!selectedSerie) return;
|
|
35841
36555
|
|
|
35842
36556
|
// Create copies of the objects to modify
|
|
35843
|
-
var newFactors = _objectSpread$
|
|
35844
|
-
var serieFactors = _objectSpread$
|
|
36557
|
+
var newFactors = _objectSpread$k({}, pricelist.pgPricefactors);
|
|
36558
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
35845
36559
|
if (value.length === 0) {
|
|
35846
36560
|
// Remove the empty price feature group
|
|
35847
36561
|
delete serieFactors[priceFeatureGroupItem];
|
|
@@ -35873,8 +36587,8 @@ var Prices = observer(function (_ref) {
|
|
|
35873
36587
|
if (!selectedSerie) return;
|
|
35874
36588
|
|
|
35875
36589
|
// Create copies of the objects to modify
|
|
35876
|
-
var newFactors = _objectSpread$
|
|
35877
|
-
var serieFactors = _objectSpread$
|
|
36590
|
+
var newFactors = _objectSpread$k({}, pricelist.articlePricefactors);
|
|
36591
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
35878
36592
|
if (value.length === 0) {
|
|
35879
36593
|
// Remove the empty article price factor
|
|
35880
36594
|
delete serieFactors[typeNo];
|
|
@@ -35906,8 +36620,8 @@ var Prices = observer(function (_ref) {
|
|
|
35906
36620
|
if (!selectedSerie) return;
|
|
35907
36621
|
|
|
35908
36622
|
// Create copies of the objects to modify
|
|
35909
|
-
var newFactors = _objectSpread$
|
|
35910
|
-
var serieFactors = _objectSpread$
|
|
36623
|
+
var newFactors = _objectSpread$k({}, pricelist.typeKeyPricefactors);
|
|
36624
|
+
var serieFactors = _objectSpread$k({}, newFactors[selectedSerie.serieNo]);
|
|
35911
36625
|
if (value.length === 0) {
|
|
35912
36626
|
// Remove the empty article price factor
|
|
35913
36627
|
delete serieFactors[typeKey];
|
|
@@ -35939,7 +36653,7 @@ var Prices = observer(function (_ref) {
|
|
|
35939
36653
|
if (!selectedSerie) return;
|
|
35940
36654
|
|
|
35941
36655
|
// Create a copy of the object to modify
|
|
35942
|
-
var newFactors = _objectSpread$
|
|
36656
|
+
var newFactors = _objectSpread$k({}, pricelist.seriePricefactors);
|
|
35943
36657
|
if (value.length === 0) {
|
|
35944
36658
|
// Remove the empty serie price factor
|
|
35945
36659
|
delete newFactors[selectedSerie.serieNo];
|
|
@@ -36711,12 +37425,12 @@ function getFormItemProps(props) {
|
|
|
36711
37425
|
}
|
|
36712
37426
|
|
|
36713
37427
|
var _excluded$3 = ["disabled"];
|
|
36714
|
-
function ownKeys$
|
|
36715
|
-
function _objectSpread$
|
|
37428
|
+
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; }
|
|
37429
|
+
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; }
|
|
36716
37430
|
function Checkbox(_ref) {
|
|
36717
37431
|
var disabled = _ref.disabled,
|
|
36718
37432
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
36719
|
-
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$
|
|
37433
|
+
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$j(_objectSpread$j({}, getFormItemProps(props)), {}, {
|
|
36720
37434
|
valuePropName: "checked",
|
|
36721
37435
|
children: /*#__PURE__*/jsx(Checkbox$1, {
|
|
36722
37436
|
disabled: disabled
|
|
@@ -36725,13 +37439,13 @@ function Checkbox(_ref) {
|
|
|
36725
37439
|
}
|
|
36726
37440
|
|
|
36727
37441
|
var _excluded$2 = ["disabled", "placeholder"];
|
|
36728
|
-
function ownKeys$
|
|
36729
|
-
function _objectSpread$
|
|
37442
|
+
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; }
|
|
37443
|
+
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; }
|
|
36730
37444
|
function Input(_ref) {
|
|
36731
37445
|
var disabled = _ref.disabled,
|
|
36732
37446
|
placeholder = _ref.placeholder,
|
|
36733
37447
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
36734
|
-
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$
|
|
37448
|
+
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$i(_objectSpread$i({}, getFormItemProps(props)), {}, {
|
|
36735
37449
|
children: /*#__PURE__*/jsx(Input$1, {
|
|
36736
37450
|
disabled: disabled,
|
|
36737
37451
|
placeholder: placeholder
|
|
@@ -36743,8 +37457,8 @@ var uploadDraggerWrapper = "upload-dragger-wrapper-xZiDJ";
|
|
|
36743
37457
|
var css_248z$a = ".upload-dragger-wrapper-xZiDJ {\n min-height: 220px;\n}\n";
|
|
36744
37458
|
styleInject(css_248z$a);
|
|
36745
37459
|
|
|
36746
|
-
function ownKeys$
|
|
36747
|
-
function _objectSpread$
|
|
37460
|
+
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; }
|
|
37461
|
+
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; }
|
|
36748
37462
|
/**
|
|
36749
37463
|
* Handles file selection and optional auto-zipping
|
|
36750
37464
|
*
|
|
@@ -36848,7 +37562,7 @@ function _validateFile() {
|
|
|
36848
37562
|
return _validateFile.apply(this, arguments);
|
|
36849
37563
|
}
|
|
36850
37564
|
function toUploadFile(file) {
|
|
36851
|
-
return _objectSpread$
|
|
37565
|
+
return _objectSpread$h(_objectSpread$h({}, file), {}, {
|
|
36852
37566
|
uid: file.name,
|
|
36853
37567
|
name: file.name,
|
|
36854
37568
|
status: 'done',
|
|
@@ -36920,8 +37634,8 @@ var DraggerComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
36920
37634
|
});
|
|
36921
37635
|
|
|
36922
37636
|
var _excluded$1 = ["acceptedFileTypes", "disabled", "autoZip", "required", "hint"];
|
|
36923
|
-
function ownKeys$
|
|
36924
|
-
function _objectSpread$
|
|
37637
|
+
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; }
|
|
37638
|
+
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; }
|
|
36925
37639
|
function Dragger(_ref) {
|
|
36926
37640
|
var _props$rules;
|
|
36927
37641
|
var acceptedFileTypes = _ref.acceptedFileTypes,
|
|
@@ -36932,7 +37646,7 @@ function Dragger(_ref) {
|
|
|
36932
37646
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
36933
37647
|
var _useTranslation = useTranslation(),
|
|
36934
37648
|
t = _useTranslation.t;
|
|
36935
|
-
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$
|
|
37649
|
+
return /*#__PURE__*/jsx(Form$2.Item, _objectSpread$g(_objectSpread$g({}, getFormItemProps(props)), {}, {
|
|
36936
37650
|
rules: [].concat(_toConsumableArray((_props$rules = props.rules) !== null && _props$rules !== void 0 ? _props$rules : []), [{
|
|
36937
37651
|
validator: function validator(_, value) {
|
|
36938
37652
|
return validateFile(acceptedFileTypes, t, value);
|
|
@@ -37006,8 +37720,8 @@ function useForm(_ref) {
|
|
|
37006
37720
|
};
|
|
37007
37721
|
}
|
|
37008
37722
|
|
|
37009
|
-
function ownKeys$
|
|
37010
|
-
function _objectSpread$
|
|
37723
|
+
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; }
|
|
37724
|
+
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; }
|
|
37011
37725
|
/**
|
|
37012
37726
|
* Form component that renders form fields based on configuration
|
|
37013
37727
|
*
|
|
@@ -37063,15 +37777,15 @@ function FormItem(_ref2) {
|
|
|
37063
37777
|
var field = _ref2.field;
|
|
37064
37778
|
switch (field.type) {
|
|
37065
37779
|
case 'dragger':
|
|
37066
|
-
return /*#__PURE__*/createElement(Dragger, _objectSpread$
|
|
37780
|
+
return /*#__PURE__*/createElement(Dragger, _objectSpread$f(_objectSpread$f({}, field), {}, {
|
|
37067
37781
|
key: field.name
|
|
37068
37782
|
}));
|
|
37069
37783
|
case 'checkbox':
|
|
37070
|
-
return /*#__PURE__*/createElement(Checkbox, _objectSpread$
|
|
37784
|
+
return /*#__PURE__*/createElement(Checkbox, _objectSpread$f(_objectSpread$f({}, field), {}, {
|
|
37071
37785
|
key: field.name
|
|
37072
37786
|
}));
|
|
37073
37787
|
case 'input':
|
|
37074
|
-
return /*#__PURE__*/createElement(Input, _objectSpread$
|
|
37788
|
+
return /*#__PURE__*/createElement(Input, _objectSpread$f(_objectSpread$f({}, field), {}, {
|
|
37075
37789
|
key: field.name
|
|
37076
37790
|
}));
|
|
37077
37791
|
default:
|
|
@@ -37081,7 +37795,9 @@ function FormItem(_ref2) {
|
|
|
37081
37795
|
|
|
37082
37796
|
var uploadModalFooter = "upload-modal-footer-W5737";
|
|
37083
37797
|
var uploadButton = "upload-button-QkWYP";
|
|
37084
|
-
var
|
|
37798
|
+
var errorGroup = "error-group-lmQSx";
|
|
37799
|
+
var errorItem = "error-item-kyNLD";
|
|
37800
|
+
var css_248z$9 = ".upload-modal-footer-W5737 {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 10px;\n}\n\n.upload-modal-footer-W5737 > .upload-button-QkWYP {\n width: 300px;\n}\n\n.error-group-lmQSx {\n margin-bottom: 8px;\n}\n\n.error-item-kyNLD {\n padding: 4px 0;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.row-index-jmU3D {\n font-weight: 600;\n margin-right: 8px;\n}\n";
|
|
37085
37801
|
styleInject(css_248z$9);
|
|
37086
37802
|
|
|
37087
37803
|
/**
|
|
@@ -37166,7 +37882,7 @@ function useUploadModal(_ref) {
|
|
|
37166
37882
|
var onSave = /*#__PURE__*/function () {
|
|
37167
37883
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(values) {
|
|
37168
37884
|
var _formData$get;
|
|
37169
|
-
var formData, requestQueryParams, uploadUrl, startTime, fileSize, estimatedUploadTimeMs, progressInterval, updateProgressBasedOnTime, response,
|
|
37885
|
+
var formData, requestQueryParams, uploadUrl, startTime, fileSize, estimatedUploadTimeMs, progressInterval, updateProgressBasedOnTime, response, _responseData$errors$, _responseData$errors$2, _responseData$errors$3, _responseData$errors$4, responseData, hasPartialErrors, _formRef$current2, errorMessage, errorResponse;
|
|
37170
37886
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
37171
37887
|
while (1) switch (_context.prev = _context.next) {
|
|
37172
37888
|
case 0:
|
|
@@ -37222,7 +37938,7 @@ function useUploadModal(_ref) {
|
|
|
37222
37938
|
});
|
|
37223
37939
|
case 21:
|
|
37224
37940
|
if (!response.ok) {
|
|
37225
|
-
_context.next =
|
|
37941
|
+
_context.next = 29;
|
|
37226
37942
|
break;
|
|
37227
37943
|
}
|
|
37228
37944
|
_context.next = 24;
|
|
@@ -37231,45 +37947,51 @@ function useUploadModal(_ref) {
|
|
|
37231
37947
|
});
|
|
37232
37948
|
case 24:
|
|
37233
37949
|
responseData = _context.sent;
|
|
37234
|
-
|
|
37235
|
-
(
|
|
37236
|
-
|
|
37237
|
-
|
|
37950
|
+
// Check for partial errors in successful responses
|
|
37951
|
+
hasPartialErrors = responseData.errors && (((_responseData$errors$ = responseData.errors.add) === null || _responseData$errors$ === void 0 ? void 0 : _responseData$errors$.length) || ((_responseData$errors$2 = responseData.errors.update) === null || _responseData$errors$2 === void 0 ? void 0 : _responseData$errors$2.length) || ((_responseData$errors$3 = responseData.errors.remove) === null || _responseData$errors$3 === void 0 ? void 0 : _responseData$errors$3.length) || ((_responseData$errors$4 = responseData.errors.restore) === null || _responseData$errors$4 === void 0 ? void 0 : _responseData$errors$4.length));
|
|
37952
|
+
if (hasPartialErrors) {
|
|
37953
|
+
setError(responseData.errors);
|
|
37954
|
+
} else {
|
|
37955
|
+
onUploadComplete === null || onUploadComplete === void 0 || onUploadComplete(responseData);
|
|
37956
|
+
(_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 || _formRef$current2.reset();
|
|
37957
|
+
setCurrentFile(undefined);
|
|
37958
|
+
}
|
|
37959
|
+
_context.next = 42;
|
|
37238
37960
|
break;
|
|
37239
|
-
case
|
|
37961
|
+
case 29:
|
|
37240
37962
|
errorMessage = t('backoffice.idmEnricher.import.uploadfailed');
|
|
37241
|
-
_context.prev =
|
|
37242
|
-
_context.next =
|
|
37963
|
+
_context.prev = 30;
|
|
37964
|
+
_context.next = 33;
|
|
37243
37965
|
return response.json();
|
|
37244
|
-
case
|
|
37966
|
+
case 33:
|
|
37245
37967
|
errorResponse = _context.sent;
|
|
37246
37968
|
errorMessage = errorResponse.error || errorResponse.message || errorMessage;
|
|
37247
|
-
_context.next =
|
|
37969
|
+
_context.next = 40;
|
|
37248
37970
|
break;
|
|
37249
|
-
case
|
|
37250
|
-
_context.prev =
|
|
37251
|
-
_context.t0 = _context["catch"](
|
|
37971
|
+
case 37:
|
|
37972
|
+
_context.prev = 37;
|
|
37973
|
+
_context.t0 = _context["catch"](30);
|
|
37252
37974
|
errorMessage = response.statusText || errorMessage;
|
|
37253
|
-
case
|
|
37975
|
+
case 40:
|
|
37254
37976
|
setError(errorMessage);
|
|
37255
37977
|
setProgress(0);
|
|
37256
|
-
case
|
|
37257
|
-
_context.next =
|
|
37978
|
+
case 42:
|
|
37979
|
+
_context.next = 48;
|
|
37258
37980
|
break;
|
|
37259
|
-
case
|
|
37260
|
-
_context.prev =
|
|
37981
|
+
case 44:
|
|
37982
|
+
_context.prev = 44;
|
|
37261
37983
|
_context.t1 = _context["catch"](13);
|
|
37262
37984
|
setError(_context.t1 instanceof Error ? _context.t1.message : t('backoffice.idmEnricher.import.uploadfailed'));
|
|
37263
37985
|
setProgress(0);
|
|
37264
|
-
case
|
|
37265
|
-
_context.prev =
|
|
37986
|
+
case 48:
|
|
37987
|
+
_context.prev = 48;
|
|
37266
37988
|
setLoading(false);
|
|
37267
|
-
return _context.finish(
|
|
37268
|
-
case
|
|
37989
|
+
return _context.finish(48);
|
|
37990
|
+
case 51:
|
|
37269
37991
|
case "end":
|
|
37270
37992
|
return _context.stop();
|
|
37271
37993
|
}
|
|
37272
|
-
}, _callee, null, [[13,
|
|
37994
|
+
}, _callee, null, [[13, 44, 48, 51], [30, 37]]);
|
|
37273
37995
|
}));
|
|
37274
37996
|
return function onSave(_x) {
|
|
37275
37997
|
return _ref2.apply(this, arguments);
|
|
@@ -37286,6 +38008,132 @@ function useUploadModal(_ref) {
|
|
|
37286
38008
|
};
|
|
37287
38009
|
}
|
|
37288
38010
|
|
|
38011
|
+
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; }
|
|
38012
|
+
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; }
|
|
38013
|
+
var Panel = Collapse.Panel;
|
|
38014
|
+
var Text = Typography.Text;
|
|
38015
|
+
/**
|
|
38016
|
+
* Component to display structured bulk operation errors in a collapsible format
|
|
38017
|
+
* Groups errors by operation type and field, showing row indices for each error
|
|
38018
|
+
*/
|
|
38019
|
+
function ErrorDisplay(_ref) {
|
|
38020
|
+
var errors = _ref.errors;
|
|
38021
|
+
var _useTranslation = useTranslation$1(),
|
|
38022
|
+
t = _useTranslation.t;
|
|
38023
|
+
if (!errors) {
|
|
38024
|
+
return null;
|
|
38025
|
+
}
|
|
38026
|
+
var operationTypes = [{
|
|
38027
|
+
key: 'add',
|
|
38028
|
+
label: t('backoffice.uploadModal.operations.add')
|
|
38029
|
+
}, {
|
|
38030
|
+
key: 'update',
|
|
38031
|
+
label: t('backoffice.uploadModal.operations.update')
|
|
38032
|
+
}, {
|
|
38033
|
+
key: 'remove',
|
|
38034
|
+
label: t('backoffice.uploadModal.operations.remove')
|
|
38035
|
+
}, {
|
|
38036
|
+
key: 'restore',
|
|
38037
|
+
label: t('backoffice.uploadModal.operations.restore')
|
|
38038
|
+
}];
|
|
38039
|
+
var renderFieldErrors = function renderFieldErrors(fieldErrors, fieldName, operationType) {
|
|
38040
|
+
return fieldErrors.map(function (fieldError, idx) {
|
|
38041
|
+
return /*#__PURE__*/jsxs("div", {
|
|
38042
|
+
className: errorItem,
|
|
38043
|
+
children: [/*#__PURE__*/jsx(Tag, {
|
|
38044
|
+
color: "blue",
|
|
38045
|
+
children: operationType
|
|
38046
|
+
}), /*#__PURE__*/jsx(Tag, {
|
|
38047
|
+
color: "orange",
|
|
38048
|
+
children: t('backoffice.uploadModal.row', {
|
|
38049
|
+
rowNumber: fieldError.index + 1
|
|
38050
|
+
})
|
|
38051
|
+
}), fieldError.errorTexts.map(function (errorText, textIdx) {
|
|
38052
|
+
return /*#__PURE__*/jsx(Text, {
|
|
38053
|
+
children: errorText
|
|
38054
|
+
}, textIdx);
|
|
38055
|
+
})]
|
|
38056
|
+
}, idx);
|
|
38057
|
+
});
|
|
38058
|
+
};
|
|
38059
|
+
var renderFieldPanels = function renderFieldPanels() {
|
|
38060
|
+
// Collect all errors from all operation types and group by field
|
|
38061
|
+
var allFieldGroups = new Map();
|
|
38062
|
+
operationTypes.forEach(function (_ref2) {
|
|
38063
|
+
var key = _ref2.key,
|
|
38064
|
+
label = _ref2.label;
|
|
38065
|
+
var operationErrors = errors[key];
|
|
38066
|
+
if (!operationErrors || operationErrors.length === 0) {
|
|
38067
|
+
return;
|
|
38068
|
+
}
|
|
38069
|
+
operationErrors.forEach(function (error) {
|
|
38070
|
+
if (error.errors && error.errors.length > 0) {
|
|
38071
|
+
error.errors.forEach(function (fieldError) {
|
|
38072
|
+
var fieldName = fieldError.field;
|
|
38073
|
+
if (!allFieldGroups.has(fieldName)) {
|
|
38074
|
+
allFieldGroups.set(fieldName, []);
|
|
38075
|
+
}
|
|
38076
|
+
allFieldGroups.get(fieldName).push({
|
|
38077
|
+
operationType: label,
|
|
38078
|
+
errors: [_objectSpread$e(_objectSpread$e({}, error), {}, {
|
|
38079
|
+
errorTexts: fieldError.errorTexts
|
|
38080
|
+
})]
|
|
38081
|
+
});
|
|
38082
|
+
});
|
|
38083
|
+
} else if (error.error) {
|
|
38084
|
+
// Handle general errors without specific field
|
|
38085
|
+
var fieldName = t('backoffice.uploadModal.general');
|
|
38086
|
+
if (!allFieldGroups.has(fieldName)) {
|
|
38087
|
+
allFieldGroups.set(fieldName, []);
|
|
38088
|
+
}
|
|
38089
|
+
allFieldGroups.get(fieldName).push({
|
|
38090
|
+
operationType: label,
|
|
38091
|
+
errors: [_objectSpread$e(_objectSpread$e({}, error), {}, {
|
|
38092
|
+
errorTexts: [error.error]
|
|
38093
|
+
})]
|
|
38094
|
+
});
|
|
38095
|
+
}
|
|
38096
|
+
});
|
|
38097
|
+
});
|
|
38098
|
+
if (allFieldGroups.size === 0) {
|
|
38099
|
+
return null;
|
|
38100
|
+
}
|
|
38101
|
+
return Array.from(allFieldGroups.entries()).map(function (_ref3) {
|
|
38102
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
38103
|
+
fieldName = _ref4[0],
|
|
38104
|
+
fieldData = _ref4[1];
|
|
38105
|
+
var totalErrors = fieldData.reduce(function (sum, data) {
|
|
38106
|
+
return sum + data.errors.length;
|
|
38107
|
+
}, 0);
|
|
38108
|
+
return /*#__PURE__*/jsx(Panel, {
|
|
38109
|
+
header: t('backoffice.uploadModal.fieldHeader', {
|
|
38110
|
+
fieldName: fieldName,
|
|
38111
|
+
errorCount: totalErrors
|
|
38112
|
+
}),
|
|
38113
|
+
children: fieldData.map(function (data, idx) {
|
|
38114
|
+
return /*#__PURE__*/jsx("div", {
|
|
38115
|
+
className: errorGroup,
|
|
38116
|
+
children: renderFieldErrors(data.errors, fieldName, data.operationType)
|
|
38117
|
+
}, idx);
|
|
38118
|
+
})
|
|
38119
|
+
}, fieldName);
|
|
38120
|
+
});
|
|
38121
|
+
};
|
|
38122
|
+
var fieldPanels = renderFieldPanels();
|
|
38123
|
+
if (!fieldPanels || fieldPanels.length === 0) {
|
|
38124
|
+
return null;
|
|
38125
|
+
}
|
|
38126
|
+
return /*#__PURE__*/jsx(Alert, {
|
|
38127
|
+
message: t('backoffice.uploadModal.partialErrors'),
|
|
38128
|
+
description: /*#__PURE__*/jsx(Collapse, {
|
|
38129
|
+
size: "small",
|
|
38130
|
+
children: fieldPanels
|
|
38131
|
+
}),
|
|
38132
|
+
type: "warning",
|
|
38133
|
+
showIcon: true
|
|
38134
|
+
});
|
|
38135
|
+
}
|
|
38136
|
+
|
|
37289
38137
|
/**
|
|
37290
38138
|
* Modal component for file uploads with progress tracking and form support
|
|
37291
38139
|
*
|
|
@@ -37362,17 +38210,20 @@ function UploadModal(_ref) {
|
|
|
37362
38210
|
message: t('backoffice.idmEnricher.import.uploadsuccess'),
|
|
37363
38211
|
type: "success",
|
|
37364
38212
|
showIcon: true
|
|
37365
|
-
}), !loading && error && /*#__PURE__*/jsx(Alert, {
|
|
37366
|
-
message:
|
|
38213
|
+
}), !loading && error && (typeof error === 'string' ? /*#__PURE__*/jsx(Alert, {
|
|
38214
|
+
message: t('backoffice.idmEnricher.import.uploaderror'),
|
|
37367
38215
|
description: error,
|
|
37368
38216
|
type: "error",
|
|
37369
38217
|
showIcon: true
|
|
37370
|
-
})
|
|
38218
|
+
}) : /*#__PURE__*/jsx(ErrorDisplay, {
|
|
38219
|
+
errors: error
|
|
38220
|
+
})), /*#__PURE__*/jsx(Form, {
|
|
37371
38221
|
ref: formRef,
|
|
37372
38222
|
fields: fields,
|
|
37373
38223
|
onFinish: onSave,
|
|
37374
38224
|
children: /*#__PURE__*/jsx(UploadModalFooter, {
|
|
37375
38225
|
progress: progress,
|
|
38226
|
+
error: !!error,
|
|
37376
38227
|
loading: loading,
|
|
37377
38228
|
onClose: onModalClose,
|
|
37378
38229
|
currentFile: currentFile
|
|
@@ -37395,15 +38246,16 @@ function UploadModal(_ref) {
|
|
|
37395
38246
|
function UploadModalFooter(_ref2) {
|
|
37396
38247
|
var progress = _ref2.progress,
|
|
37397
38248
|
loading = _ref2.loading,
|
|
38249
|
+
error = _ref2.error,
|
|
37398
38250
|
onClose = _ref2.onClose,
|
|
37399
38251
|
currentFile = _ref2.currentFile;
|
|
37400
38252
|
var _useTranslation2 = useTranslation$1(),
|
|
37401
38253
|
t = _useTranslation2.t;
|
|
37402
|
-
var buttonText = loading ? t('backoffice.idmEnricher.import.inprogress') : progress === 100 ? t('backoffice.idmEnricher.import.finish') : t('backoffice.idmEnricher.import.cancel');
|
|
38254
|
+
var buttonText = loading ? t('backoffice.idmEnricher.import.inprogress') : progress === 100 && !error ? t('backoffice.idmEnricher.import.finish') : t('backoffice.idmEnricher.import.cancel');
|
|
37403
38255
|
return /*#__PURE__*/jsxs("div", {
|
|
37404
38256
|
className: uploadModalFooter,
|
|
37405
38257
|
children: [/*#__PURE__*/jsx(Button, {
|
|
37406
|
-
type: progress !== 100 ? 'default' : 'primary',
|
|
38258
|
+
type: progress !== 100 || error ? 'default' : 'primary',
|
|
37407
38259
|
onClick: onClose,
|
|
37408
38260
|
disabled: loading,
|
|
37409
38261
|
children: buttonText
|
|
@@ -37722,6 +38574,46 @@ var TableCatalogs = observer(function () {
|
|
|
37722
38574
|
}
|
|
37723
38575
|
return action;
|
|
37724
38576
|
}()
|
|
38577
|
+
}, {
|
|
38578
|
+
icon: /*#__PURE__*/jsx(FilePdfOutlined, {}),
|
|
38579
|
+
action: function () {
|
|
38580
|
+
var _action2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
|
|
38581
|
+
var selectedNodes, url, alertTimeout;
|
|
38582
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
38583
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
38584
|
+
case 0:
|
|
38585
|
+
selectedNodes = _ref3.selectedNodes;
|
|
38586
|
+
url = apiConfig.idmService + '/v3.0/catalogs/' + selectedNodes[0].data._id + '/analyse/pdf'; // Show modal if download takes more than 3 seconds
|
|
38587
|
+
alertTimeout = setTimeout(function () {
|
|
38588
|
+
showLoadingModal(t('backoffice.idmEnricher.analyse.modaltext'));
|
|
38589
|
+
}, 3000);
|
|
38590
|
+
_context2.prev = 3;
|
|
38591
|
+
_context2.next = 6;
|
|
38592
|
+
return downloadFile(url, root.dataStore.jwt, 'application/pdf', selectedNodes[0].data.name + '.pdf');
|
|
38593
|
+
case 6:
|
|
38594
|
+
closeModal();
|
|
38595
|
+
_context2.next = 12;
|
|
38596
|
+
break;
|
|
38597
|
+
case 9:
|
|
38598
|
+
_context2.prev = 9;
|
|
38599
|
+
_context2.t0 = _context2["catch"](3);
|
|
38600
|
+
showErrorModal('File download failed:' + _context2.t0);
|
|
38601
|
+
case 12:
|
|
38602
|
+
_context2.prev = 12;
|
|
38603
|
+
// Clear the alert timeout once the download is complete or fails
|
|
38604
|
+
clearTimeout(alertTimeout);
|
|
38605
|
+
return _context2.finish(12);
|
|
38606
|
+
case 15:
|
|
38607
|
+
case "end":
|
|
38608
|
+
return _context2.stop();
|
|
38609
|
+
}
|
|
38610
|
+
}, _callee2, null, [[3, 9, 12, 15]]);
|
|
38611
|
+
}));
|
|
38612
|
+
function action(_x2) {
|
|
38613
|
+
return _action2.apply(this, arguments);
|
|
38614
|
+
}
|
|
38615
|
+
return action;
|
|
38616
|
+
}()
|
|
37725
38617
|
}];
|
|
37726
38618
|
}, []);
|
|
37727
38619
|
var configuration = useMemo(function () {
|
|
@@ -38522,7 +39414,7 @@ var useSeriesSelector = function useSeriesSelector(modules) {
|
|
|
38522
39414
|
// if the extend series data is already loaded, use it
|
|
38523
39415
|
isLoaded = !!((_seriesSelectorState$ = seriesSelectorState.options) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.find(function (option) {
|
|
38524
39416
|
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$.
|
|
39417
|
+
})) !== null && _seriesSelectorState$ !== void 0 && (_seriesSelectorState$ = _seriesSelectorState$.data) !== null && _seriesSelectorState$ !== void 0 && _seriesSelectorState$.lastUpdatedDate);
|
|
38526
39418
|
if (!isLoaded) {
|
|
38527
39419
|
_context.next = 6;
|
|
38528
39420
|
break;
|
|
@@ -38535,7 +39427,7 @@ var useSeriesSelector = function useSeriesSelector(modules) {
|
|
|
38535
39427
|
api = new _default$d({
|
|
38536
39428
|
type: 'SelectSimple',
|
|
38537
39429
|
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")
|
|
39430
|
+
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
39431
|
}
|
|
38540
39432
|
}, root);
|
|
38541
39433
|
_context.next = 10;
|
|
@@ -39549,22 +40441,31 @@ var Features$1 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
|
|
|
39549
40441
|
lockPinned: true,
|
|
39550
40442
|
defaultValue: false
|
|
39551
40443
|
}, {
|
|
39552
|
-
field: 'featureNo',
|
|
39553
40444
|
headerName: 'backoffice.idmCatalog.features.label.featureNo',
|
|
39554
|
-
|
|
40445
|
+
field: 'featureNo',
|
|
39555
40446
|
cellDataType: 'lookup',
|
|
39556
|
-
unique: true,
|
|
39557
40447
|
customParams: {
|
|
40448
|
+
nameField: 'featureText',
|
|
40449
|
+
filterCellType: 'number',
|
|
40450
|
+
displayLabelTemplate: '${value}',
|
|
40451
|
+
lookupLabelTemplate: '${name} (${value})',
|
|
39558
40452
|
apiInterface: {
|
|
39559
40453
|
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
|
|
39560
40454
|
},
|
|
39561
|
-
lookupValue: 'featureText',
|
|
39562
40455
|
lookupKey: 'featureNo',
|
|
40456
|
+
lookupValue: 'featureText',
|
|
40457
|
+
lookupKeyFilterType: {
|
|
40458
|
+
type: 'equals',
|
|
40459
|
+
filterType: 'number'
|
|
40460
|
+
},
|
|
40461
|
+
multiple: false,
|
|
39563
40462
|
translated: true,
|
|
39564
|
-
|
|
39565
|
-
insertLookup: true
|
|
39566
|
-
|
|
39567
|
-
|
|
40463
|
+
allowToAdd: true,
|
|
40464
|
+
insertLookup: true
|
|
40465
|
+
},
|
|
40466
|
+
additionalFields: ['featureText'],
|
|
40467
|
+
required: true,
|
|
40468
|
+
unique: true
|
|
39568
40469
|
}] : [{
|
|
39569
40470
|
headerName: 'backoffice.idmCatalog.features.label.featureNo',
|
|
39570
40471
|
field: 'featureNo',
|
|
@@ -39878,28 +40779,32 @@ var Options = /*#__PURE__*/forwardRef(function Options(_ref, ref) {
|
|
|
39878
40779
|
field: 'optionFreeText',
|
|
39879
40780
|
cellDataType: 'boolean'
|
|
39880
40781
|
}, {
|
|
39881
|
-
field: '
|
|
40782
|
+
field: 'featureNos',
|
|
39882
40783
|
headerName: 'backoffice.idmCatalogEditor.catalogoptions.label.featureIds',
|
|
39883
40784
|
cellDataType: 'lookup',
|
|
39884
40785
|
editable: true,
|
|
39885
40786
|
required: false,
|
|
39886
40787
|
customParams: {
|
|
39887
40788
|
nameField: 'featureIdsDisplayTexts',
|
|
39888
|
-
filterCellType: '
|
|
40789
|
+
filterCellType: 'number',
|
|
39889
40790
|
displayLabelTemplate: '${name} (${value})',
|
|
39890
40791
|
apiInterface: {
|
|
39891
40792
|
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
|
|
39892
40793
|
},
|
|
39893
40794
|
lookupValue: 'featureText',
|
|
39894
|
-
lookupKey: '
|
|
40795
|
+
lookupKey: 'featureNo',
|
|
39895
40796
|
lookupKeyFilterType: {
|
|
39896
40797
|
type: 'equals',
|
|
39897
|
-
filterType: '
|
|
40798
|
+
filterType: 'number'
|
|
39898
40799
|
},
|
|
40800
|
+
additionalMappings: [{
|
|
40801
|
+
lookupField: '_id',
|
|
40802
|
+
targetField: 'featureIds'
|
|
40803
|
+
}],
|
|
39899
40804
|
multiple: true,
|
|
39900
40805
|
translated: true
|
|
39901
40806
|
},
|
|
39902
|
-
additionalFields: ['featureIdsDisplayTexts'],
|
|
40807
|
+
additionalFields: ['featureIdsDisplayTexts', 'featureIds'],
|
|
39903
40808
|
isDictionary: true
|
|
39904
40809
|
}, {
|
|
39905
40810
|
headerName: 'backoffice.idmCatalog.items.label.validation',
|
|
@@ -42050,7 +42955,8 @@ var TablePriceFeatureGroups = observer(function () {
|
|
|
42050
42955
|
organizationId = _useModule.organizationId,
|
|
42051
42956
|
apiConfig = _useModule.apiConfig,
|
|
42052
42957
|
setSelectedItem = _useModule.setSelectedItem,
|
|
42053
|
-
setSelectedSerie = _useModule.setSelectedSerie
|
|
42958
|
+
setSelectedSerie = _useModule.setSelectedSerie,
|
|
42959
|
+
resetSeriesSelector = _useModule.resetSeriesSelector;
|
|
42054
42960
|
var _React$useState = React.useState(),
|
|
42055
42961
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
42056
42962
|
selectedPriceFeatureGroup = _React$useState2[0],
|
|
@@ -42137,6 +43043,12 @@ var TablePriceFeatureGroups = observer(function () {
|
|
|
42137
43043
|
if (current) {
|
|
42138
43044
|
setSelectedPriceFeatureGroup(_objectSpread$7({}, current.data));
|
|
42139
43045
|
}
|
|
43046
|
+
if (updates.length == 0 || updates.some(function (update) {
|
|
43047
|
+
var _update$oldData;
|
|
43048
|
+
return !((_update$oldData = update.oldData) !== null && _update$oldData !== void 0 && _update$oldData.priceFeatureGroupNo);
|
|
43049
|
+
})) {
|
|
43050
|
+
resetSeriesSelector();
|
|
43051
|
+
}
|
|
42140
43052
|
}
|
|
42141
43053
|
};
|
|
42142
43054
|
}, [selectedNodeId]);
|
|
@@ -42631,6 +43543,9 @@ function CollectionMembers(_ref) {
|
|
|
42631
43543
|
var collection = _ref.collection,
|
|
42632
43544
|
organizationId = _ref.organizationId,
|
|
42633
43545
|
apiConfig = _ref.apiConfig;
|
|
43546
|
+
var _useTranslation = useTranslation(),
|
|
43547
|
+
t = _useTranslation.t,
|
|
43548
|
+
i18n = _useTranslation.i18n;
|
|
42634
43549
|
var applicationData = useMemo(function () {
|
|
42635
43550
|
return {
|
|
42636
43551
|
organizationId: organizationId,
|
|
@@ -42670,16 +43585,29 @@ function CollectionMembers(_ref) {
|
|
|
42670
43585
|
lookupValue: 'name',
|
|
42671
43586
|
lookupKey: '_id',
|
|
42672
43587
|
multiple: false,
|
|
42673
|
-
translated: false
|
|
43588
|
+
translated: false,
|
|
43589
|
+
//add it to the row context, so it can be used in the validator but will not be saved to the server
|
|
43590
|
+
additionalMappings: [{
|
|
43591
|
+
lookupField: 'published',
|
|
43592
|
+
targetField: '__diva_context.additionalData.published'
|
|
43593
|
+
}]
|
|
42674
43594
|
},
|
|
42675
43595
|
additionalFields: ['enricherPackageName'],
|
|
42676
|
-
isDictionary: false
|
|
43596
|
+
isDictionary: false,
|
|
43597
|
+
cellValueValidator: function cellValueValidator(_ref2) {
|
|
43598
|
+
var _data$__diva_context;
|
|
43599
|
+
var data = _ref2.data;
|
|
43600
|
+
if (!((_data$__diva_context = data.__diva_context) !== null && _data$__diva_context !== void 0 && (_data$__diva_context = _data$__diva_context.additionalData) !== null && _data$__diva_context !== void 0 && (_data$__diva_context = _data$__diva_context.published) !== null && _data$__diva_context !== void 0 && _data$__diva_context[organizationId])) {
|
|
43601
|
+
return t('backoffice.idmCatalogEditor.collection.enricherPackage.notPublishedError');
|
|
43602
|
+
}
|
|
43603
|
+
return undefined;
|
|
43604
|
+
}
|
|
42677
43605
|
}, {
|
|
42678
43606
|
field: 'serieNos',
|
|
42679
43607
|
headerName: 'backoffice.idmCatalogEditor.collectionmembers.label.serieNos',
|
|
42680
43608
|
cellDataType: 'lookup',
|
|
42681
|
-
editable: function editable(
|
|
42682
|
-
var data =
|
|
43609
|
+
editable: function editable(_ref3) {
|
|
43610
|
+
var data = _ref3.data;
|
|
42683
43611
|
return data.enricherPackageId;
|
|
42684
43612
|
},
|
|
42685
43613
|
customParams: {
|
|
@@ -42707,7 +43635,7 @@ function CollectionMembers(_ref) {
|
|
|
42707
43635
|
cellDataType: 'objectId'
|
|
42708
43636
|
}]
|
|
42709
43637
|
};
|
|
42710
|
-
}, [apiInterface]);
|
|
43638
|
+
}, [apiInterface, i18n.language]);
|
|
42711
43639
|
return /*#__PURE__*/jsx(Spreadsheet, {
|
|
42712
43640
|
gridId: 'crud-grid_collectionmembers',
|
|
42713
43641
|
applicationData: applicationData,
|
|
@@ -42829,15 +43757,15 @@ function TableCollections () {
|
|
|
42829
43757
|
}, {
|
|
42830
43758
|
headerName: 'backoffice.idmEnricher.collections.label.validation',
|
|
42831
43759
|
children: [{
|
|
42832
|
-
headerName: 'backoffice.idmCatalog.general.label.
|
|
42833
|
-
field: '
|
|
43760
|
+
headerName: 'backoffice.idmCatalog.general.label.validFrom',
|
|
43761
|
+
field: 'validFrom',
|
|
42834
43762
|
cellDataType: 'dateString',
|
|
42835
43763
|
customParams: {
|
|
42836
43764
|
dateFormat: 'DD.MM.YYYY'
|
|
42837
43765
|
}
|
|
42838
43766
|
}, {
|
|
42839
|
-
headerName: 'backoffice.idmCatalog.general.label.
|
|
42840
|
-
field: '
|
|
43767
|
+
headerName: 'backoffice.idmCatalog.general.label.validUntil',
|
|
43768
|
+
field: 'validTo',
|
|
42841
43769
|
cellDataType: 'dateString',
|
|
42842
43770
|
customParams: {
|
|
42843
43771
|
dateFormat: 'DD.MM.YYYY'
|