@crystaldesign/diva-backoffice 24.7.0-beta.9 → 24.7.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/index.js +2335 -357
- package/build/types/backoffice/src/Configuration.d.ts +1 -1
- package/build/types/backoffice/src/Configuration.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ConfigurationStore.d.ts +1 -1
- package/build/types/backoffice/src/store/ConfigurationStore.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ContentStore.d.ts +3 -0
- package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Content/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/types.d.ts +11 -2
- package/build/types/backoffice/src/ui/Form/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/useFormData.d.ts +2 -2
- package/build/types/backoffice/src/ui/Form/useFormData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PackageSelector/index.d.ts +6 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PackageSelector/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/index.d.ts +2 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/IDMTableExclusivity/index.d.ts +3 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/IDMTableExclusivity/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/IDMTableExclusivity/tableConfiguration.d.ts +8 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/IDMTableExclusivity/tableConfiguration.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/IDMTableRenaming/index.d.ts +3 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/IDMTableRenaming/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/IDMTableRenaming/tableConfiguration.d.ts +8 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/IDMTableRenaming/tableConfiguration.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/IDMTableTabGroups/index.d.ts +3 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/IDMTableTabGroups/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/types.d.ts +2 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/types.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/useCatalogEditor.d.ts +12 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/useCatalogEditor.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/Menu/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/RichTextEditor/index.d.ts +8 -0
- package/build/types/backoffice/src/ui/RichTextEditor/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/SMChart/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/SelectSimple/index.d.ts +1 -1
- package/build/types/backoffice/src/ui/SelectSimple/types.d.ts +2 -1
- package/build/types/backoffice/src/ui/SelectSimple/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts +1 -1
- package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts.map +1 -1
- package/build/types/backoffice/src/utils/ApiHandler.d.ts.map +1 -1
- package/package.json +3 -2
package/build/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import React, { createContext, useState, useEffect, useMemo, useCallback, useRef, useImperativeHandle, useReducer, createRef, forwardRef, useContext, memo } from 'react';
|
|
3
3
|
import 'antd/dist/reset.css';
|
|
4
|
-
import { Button, Spin, Descriptions, Select as Select$
|
|
4
|
+
import { Button, Spin, Descriptions, Select as Select$1, Alert, Modal as Modal$2, Input, Popover, Typography, Divider, Avatar, Form as Form$1, Radio, DatePicker, Checkbox, InputNumber, Card, Tooltip, Upload, Space, Row, Col, Steps, Result as Result$1, Layout, Switch, Menu as Menu$1, Collapse, Table as Table$1, Popconfirm, Tabs, Image, Progress, Slider, Breadcrumb, List as List$1, message, Cascader, Skeleton, Drawer, ConfigProvider, theme } from 'antd';
|
|
5
5
|
import { observer } from 'mobx-react-lite';
|
|
6
6
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
7
7
|
import { getLogger, CoreError, useDivaCore, useTranslation, DivaUtils } from '@crystaldesign/diva-core';
|
|
@@ -22,7 +22,7 @@ import { toJS, makeAutoObservable, observable, action, makeObservable } from 'mo
|
|
|
22
22
|
import merge from 'deepmerge';
|
|
23
23
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
24
24
|
import FileExcelOutlined from '@ant-design/icons/FileExcelOutlined';
|
|
25
|
-
import { DownloadOutlined, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1,
|
|
25
|
+
import { DownloadOutlined, MinusCircleOutlined, PlusOutlined, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1 } from '@ant-design/icons';
|
|
26
26
|
import AssetEditor from '@crystaldesign/media-upload';
|
|
27
27
|
import debounce from 'lodash/debounce';
|
|
28
28
|
import { isArray } from 'lodash';
|
|
@@ -31,7 +31,8 @@ import DeleteOutlined from '@ant-design/icons/DeleteOutlined';
|
|
|
31
31
|
import JSONEditor from 'jsoneditor';
|
|
32
32
|
import 'jsoneditor/dist/jsoneditor.css';
|
|
33
33
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
34
|
-
import
|
|
34
|
+
import { Editor } from '@tinymce/tinymce-react';
|
|
35
|
+
import PlusOutlined$1 from '@ant-design/icons/PlusOutlined';
|
|
35
36
|
import CheckCircleOutlined from '@ant-design/icons/CheckCircleOutlined';
|
|
36
37
|
import DivaUtils$1, { nanoid } from '@crystaldesign/diva-utils';
|
|
37
38
|
import ReloadOutlined from '@ant-design/icons/ReloadOutlined';
|
|
@@ -97,6 +98,9 @@ import Collapsible from 'react-collapsible';
|
|
|
97
98
|
import QuestionOutlined from '@ant-design/icons/QuestionOutlined';
|
|
98
99
|
import { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';
|
|
99
100
|
import { useTranslation as useTranslation$1 } from 'react-i18next';
|
|
101
|
+
import Descriptions$1 from 'antd/es/descriptions';
|
|
102
|
+
import Space$1 from 'antd/es/space';
|
|
103
|
+
import { Spreadsheet } from '@crystaldesign/spreadsheet';
|
|
100
104
|
import { stringify } from 'csv';
|
|
101
105
|
import InfiniteScroll from 'react-infinite-scroll-component';
|
|
102
106
|
import ReactCrop from 'react-image-crop';
|
|
@@ -115,11 +119,11 @@ import RoomSelection from '@crystaldesign/room-selection';
|
|
|
115
119
|
globalThis.process = { env:env };
|
|
116
120
|
})();
|
|
117
121
|
|
|
118
|
-
function _createForOfIteratorHelper$m(
|
|
119
|
-
function _unsupportedIterableToArray$m(
|
|
120
|
-
function _arrayLikeToArray$m(
|
|
121
|
-
function ownKeys$
|
|
122
|
-
function _objectSpread$
|
|
122
|
+
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; } } }; }
|
|
123
|
+
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; } }
|
|
124
|
+
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; }
|
|
125
|
+
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; }
|
|
126
|
+
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; }
|
|
123
127
|
var LOG$b = getLogger('Backoffice', 'AplyMapping');
|
|
124
128
|
function aplyMapping (_ref) {
|
|
125
129
|
var mapable = _ref.mapable,
|
|
@@ -140,10 +144,10 @@ function aplyMapping (_ref) {
|
|
|
140
144
|
var newValue = {};
|
|
141
145
|
newValue[newKey] = valueToAdd;
|
|
142
146
|
if ((startValue === null || startValue === void 0 ? void 0 : startValue[newKey]) != undefined) {
|
|
143
|
-
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$
|
|
147
|
+
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$I(_objectSpread$I({}, startValue[newKey]), valueToAdd);else startValue[newKey] = type == 'addToSourceValue' ? startValue[newKey] + valueToAdd : valueToAdd;
|
|
144
148
|
return startValue;
|
|
145
149
|
}
|
|
146
|
-
if (newIdx == 1) return _objectSpread$
|
|
150
|
+
if (newIdx == 1) return _objectSpread$I(_objectSpread$I({}, startValue), newValue);
|
|
147
151
|
return getTarget(idx + 1, keys, startValue, newValue);
|
|
148
152
|
};
|
|
149
153
|
returnValue = getTarget(0, key.split('.'), returnValue, value);
|
|
@@ -424,8 +428,8 @@ function getLeafColumns(columns) {
|
|
|
424
428
|
});
|
|
425
429
|
}
|
|
426
430
|
|
|
427
|
-
function ownKeys$
|
|
428
|
-
function _objectSpread$
|
|
431
|
+
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; }
|
|
432
|
+
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; }
|
|
429
433
|
var LOG$a = getLogger('Backoffice', 'ApiHandler');
|
|
430
434
|
var jp = require('jsonpath');
|
|
431
435
|
var _default$d = /*#__PURE__*/function () {
|
|
@@ -559,37 +563,52 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
559
563
|
var field = param.substring(1, param.length - 1);
|
|
560
564
|
if (original[field]) {
|
|
561
565
|
finalUrl = finalUrl.replace(param, original[field]);
|
|
562
|
-
} else {
|
|
566
|
+
} else if (data[field]) {
|
|
563
567
|
finalUrl = finalUrl.replace(param, data[field]);
|
|
564
568
|
}
|
|
565
569
|
});
|
|
566
570
|
if (!mapping) {
|
|
567
|
-
_context2.next =
|
|
571
|
+
_context2.next = 15;
|
|
568
572
|
break;
|
|
569
573
|
}
|
|
570
|
-
if (!(mapping.type
|
|
571
|
-
_context2.next =
|
|
574
|
+
if (!(mapping.type == 'body' && !this._updateUrl.includes('$'))) {
|
|
575
|
+
_context2.next = 10;
|
|
572
576
|
break;
|
|
573
577
|
}
|
|
574
|
-
|
|
575
|
-
case 8:
|
|
576
|
-
if (mapping.type == 'body') data = aplyMapping({
|
|
578
|
+
data = aplyMapping({
|
|
577
579
|
mapable: data,
|
|
578
580
|
mappingData: data,
|
|
579
581
|
mapping: mapping,
|
|
580
582
|
rootStore: this._rootStore,
|
|
581
583
|
fallBackToParams: true
|
|
582
584
|
});
|
|
583
|
-
|
|
585
|
+
_context2.next = 15;
|
|
586
|
+
break;
|
|
587
|
+
case 10:
|
|
588
|
+
if (!(mapping.type == 'query')) {
|
|
589
|
+
_context2.next = 14;
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
finalUrl = aplyMapping({
|
|
593
|
+
mapable: finalUrl,
|
|
594
|
+
mapping: mapping,
|
|
595
|
+
rootStore: this._rootStore,
|
|
596
|
+
fallBackToParams: false
|
|
597
|
+
});
|
|
598
|
+
_context2.next = 15;
|
|
599
|
+
break;
|
|
600
|
+
case 14:
|
|
601
|
+
throw new Error('error mapping data');
|
|
602
|
+
case 15:
|
|
584
603
|
finalData = undefined;
|
|
585
604
|
if (!this._noBody) {
|
|
586
605
|
finalData = this._useJsonPatch ? this.createPatch(data, original) : data;
|
|
587
606
|
}
|
|
588
607
|
jwt = (_this$_rootStore = this._rootStore) === null || _this$_rootStore === void 0 ? void 0 : _this$_rootStore.dataStore.jwt;
|
|
589
|
-
_context2.next =
|
|
608
|
+
_context2.next = 20;
|
|
590
609
|
return fetch(finalUrl, {
|
|
591
610
|
method: this._updateMethod,
|
|
592
|
-
headers: _objectSpread$
|
|
611
|
+
headers: _objectSpread$H(_objectSpread$H({}, jwt ? {
|
|
593
612
|
Authorization: 'Bearer ' + jwt
|
|
594
613
|
} : {}), {}, {
|
|
595
614
|
'Content-Type': 'application/json'
|
|
@@ -638,10 +657,10 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
638
657
|
return undefined;
|
|
639
658
|
}
|
|
640
659
|
});
|
|
641
|
-
case
|
|
660
|
+
case 20:
|
|
642
661
|
response = _context2.sent;
|
|
643
662
|
return _context2.abrupt("return", response);
|
|
644
|
-
case
|
|
663
|
+
case 22:
|
|
645
664
|
case "end":
|
|
646
665
|
return _context2.stop();
|
|
647
666
|
}
|
|
@@ -680,7 +699,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
680
699
|
rootStore: this._rootStore,
|
|
681
700
|
fallBackToParams: true
|
|
682
701
|
});
|
|
683
|
-
if (data) createData = _objectSpread$
|
|
702
|
+
if (data) createData = _objectSpread$H({}, data);
|
|
684
703
|
} else if (data !== undefined) {
|
|
685
704
|
createData = aplyMapping({
|
|
686
705
|
mapable: data,
|
|
@@ -821,7 +840,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
821
840
|
_context6.next = 7;
|
|
822
841
|
return fetch((_url = url) === null || _url === void 0 ? void 0 : _url.toString(), {
|
|
823
842
|
method: isApi2 ? 'POST' : 'DELETE',
|
|
824
|
-
headers: _objectSpread$
|
|
843
|
+
headers: _objectSpread$H({}, jwt ? {
|
|
825
844
|
Authorization: 'Bearer ' + jwt
|
|
826
845
|
} : {})
|
|
827
846
|
}).then( /*#__PURE__*/function () {
|
|
@@ -937,7 +956,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
937
956
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
938
957
|
case 2:
|
|
939
958
|
jwt = (_this$_rootStore5 = this._rootStore) === null || _this$_rootStore5 === void 0 ? void 0 : _this$_rootStore5.dataStore.jwt;
|
|
940
|
-
url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
959
|
+
url = filterServerSide ? parseServersideFilters(_objectSpread$H(_objectSpread$H({}, filterServerSide), {}, {
|
|
941
960
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
942
961
|
baseUrl: this._readListUrl,
|
|
943
962
|
prefilter: prefilter
|
|
@@ -957,7 +976,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
957
976
|
});
|
|
958
977
|
case 6:
|
|
959
978
|
response = _context8.sent;
|
|
960
|
-
return _context8.abrupt("return", _objectSpread$
|
|
979
|
+
return _context8.abrupt("return", _objectSpread$H(_objectSpread$H({}, response), {}, {
|
|
961
980
|
data: response.data.map(function (d) {
|
|
962
981
|
return _this2.aplyJsonPath(d, _this2._readJsonPath);
|
|
963
982
|
})
|
|
@@ -981,7 +1000,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
981
1000
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
982
1001
|
}
|
|
983
1002
|
(_this$_rootStore6 = this._rootStore) === null || _this$_rootStore6 === void 0 ? void 0 : _this$_rootStore6.dataStore.jwt;
|
|
984
|
-
var url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1003
|
+
var url = filterServerSide ? parseServersideFilters(_objectSpread$H(_objectSpread$H({}, filterServerSide), {}, {
|
|
985
1004
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
986
1005
|
baseUrl: this._readListUrl,
|
|
987
1006
|
prefilter: prefilter
|
|
@@ -1187,8 +1206,8 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1187
1206
|
}]);
|
|
1188
1207
|
}(_default$d);
|
|
1189
1208
|
|
|
1190
|
-
function ownKeys$
|
|
1191
|
-
function _objectSpread$
|
|
1209
|
+
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; }
|
|
1210
|
+
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; }
|
|
1192
1211
|
function _callSuper$6(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$6() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1193
1212
|
function _isNativeReflectConstruct$6() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$6 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1194
1213
|
var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
@@ -1287,7 +1306,7 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1287
1306
|
_context2.next = 5;
|
|
1288
1307
|
return fetch(this._createUrl + '?ref=true', {
|
|
1289
1308
|
method: this._createMethod,
|
|
1290
|
-
headers: _objectSpread$
|
|
1309
|
+
headers: _objectSpread$G({}, jwt ? {
|
|
1291
1310
|
Authorization: 'Bearer ' + jwt
|
|
1292
1311
|
} : {}),
|
|
1293
1312
|
body: data
|
|
@@ -1663,8 +1682,8 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1663
1682
|
}]);
|
|
1664
1683
|
}(_default$d);
|
|
1665
1684
|
|
|
1666
|
-
function ownKeys$
|
|
1667
|
-
function _objectSpread$
|
|
1685
|
+
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; }
|
|
1686
|
+
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; }
|
|
1668
1687
|
var _default$7 = /*#__PURE__*/function () {
|
|
1669
1688
|
function _default(root) {
|
|
1670
1689
|
_classCallCheck(this, _default);
|
|
@@ -1691,7 +1710,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1691
1710
|
}
|
|
1692
1711
|
if (config.type == 'Menu') {
|
|
1693
1712
|
var filteredItems = filterMenuByPermission(this.root.actions.userHasPermission, config.items);
|
|
1694
|
-
config = _objectSpread$
|
|
1713
|
+
config = _objectSpread$F(_objectSpread$F({}, config), {}, {
|
|
1695
1714
|
items: filteredItems
|
|
1696
1715
|
});
|
|
1697
1716
|
} else if (config.type == 'Group') {
|
|
@@ -1700,7 +1719,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1700
1719
|
var _i$permission;
|
|
1701
1720
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
1702
1721
|
});
|
|
1703
|
-
config = _objectSpread$
|
|
1722
|
+
config = _objectSpread$F(_objectSpread$F({}, config), {}, {
|
|
1704
1723
|
items: _filteredItems
|
|
1705
1724
|
});
|
|
1706
1725
|
}
|
|
@@ -1770,7 +1789,7 @@ function filterMenuByPermission(hasPermission, items) {
|
|
|
1770
1789
|
return items.filter(function (item) {
|
|
1771
1790
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
1772
1791
|
}).map(function (item) {
|
|
1773
|
-
return _objectSpread$
|
|
1792
|
+
return _objectSpread$F(_objectSpread$F({}, item), {}, {
|
|
1774
1793
|
items: filterMenuByPermission(hasPermission, item.items)
|
|
1775
1794
|
});
|
|
1776
1795
|
}).filter(function (item) {
|
|
@@ -3118,6 +3137,74 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3118
3137
|
}]
|
|
3119
3138
|
}
|
|
3120
3139
|
},
|
|
3140
|
+
ContentItems: {
|
|
3141
|
+
title: t('backoffice.table.partlists.title'),
|
|
3142
|
+
type: 'Table',
|
|
3143
|
+
canRefresh: true,
|
|
3144
|
+
copyAction: {
|
|
3145
|
+
actionType: 'Detail',
|
|
3146
|
+
type: 'Form',
|
|
3147
|
+
id: 'FormEditContentItem',
|
|
3148
|
+
title: t('backoffice.table.contentItem.copyAction.title'),
|
|
3149
|
+
label: t('backoffice.table.services.copyAction.label'),
|
|
3150
|
+
mapping: {
|
|
3151
|
+
type: 'body',
|
|
3152
|
+
map: [{
|
|
3153
|
+
targetField: 'content',
|
|
3154
|
+
sourceField: 'content'
|
|
3155
|
+
}, {
|
|
3156
|
+
targetField: 'description',
|
|
3157
|
+
sourceField: 'description'
|
|
3158
|
+
}, {
|
|
3159
|
+
targetField: 'organizationId',
|
|
3160
|
+
sourceField: 'organizationId'
|
|
3161
|
+
}]
|
|
3162
|
+
}
|
|
3163
|
+
},
|
|
3164
|
+
createAction: {
|
|
3165
|
+
actionType: 'Detail',
|
|
3166
|
+
type: 'JsonEditor',
|
|
3167
|
+
id: 'JsonEditorEditContentItem',
|
|
3168
|
+
title: t('backoffice.table.contentItem.label.create'),
|
|
3169
|
+
label: t('backoffice.table.contentItem.label.create')
|
|
3170
|
+
},
|
|
3171
|
+
columns: [{
|
|
3172
|
+
title: t('backoffice.table.roles.columns.description'),
|
|
3173
|
+
field: 'description',
|
|
3174
|
+
sorter: 1,
|
|
3175
|
+
filter: 'advanced',
|
|
3176
|
+
width: 300
|
|
3177
|
+
}, {
|
|
3178
|
+
title: 'backoffice.content',
|
|
3179
|
+
field: 'content',
|
|
3180
|
+
hidden: true
|
|
3181
|
+
}, {
|
|
3182
|
+
title: t('backoffice.table.medien.columns.title.organizationId'),
|
|
3183
|
+
field: 'organizationId',
|
|
3184
|
+
sorter: 1,
|
|
3185
|
+
filter: 'advanced',
|
|
3186
|
+
width: 100
|
|
3187
|
+
}, {
|
|
3188
|
+
title: t('backoffice._id'),
|
|
3189
|
+
field: '_id',
|
|
3190
|
+
sorter: 1,
|
|
3191
|
+
filter: 'advanced',
|
|
3192
|
+
width: 100
|
|
3193
|
+
}],
|
|
3194
|
+
rowAction: [{
|
|
3195
|
+
actionType: 'Detail',
|
|
3196
|
+
type: 'Form',
|
|
3197
|
+
id: 'FormEditContentItem',
|
|
3198
|
+
title: t('backoffice.table.contentItem.edit')
|
|
3199
|
+
}],
|
|
3200
|
+
apiInterface: {
|
|
3201
|
+
read: {
|
|
3202
|
+
list: '${catalogService}/contentItems',
|
|
3203
|
+
filterServerSide: true
|
|
3204
|
+
},
|
|
3205
|
+
"delete": '${catalogService}/contentItems/${id}'
|
|
3206
|
+
}
|
|
3207
|
+
},
|
|
3121
3208
|
TableApplicationTranslations: {
|
|
3122
3209
|
title: t('backoffice.table.applicationtranslation.title'),
|
|
3123
3210
|
type: 'Table',
|
|
@@ -6069,6 +6156,17 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
6069
6156
|
name: 'MetaValue'
|
|
6070
6157
|
}]
|
|
6071
6158
|
},
|
|
6159
|
+
JsonEditorEditContentItem: {
|
|
6160
|
+
type: 'JsonEditor',
|
|
6161
|
+
apiInterface: {
|
|
6162
|
+
update: {
|
|
6163
|
+
url: '${catalogService}/contentItems/{_id}',
|
|
6164
|
+
method: 'PATCH',
|
|
6165
|
+
jsonPatch: true
|
|
6166
|
+
},
|
|
6167
|
+
create: '${catalogService}/contentItems'
|
|
6168
|
+
}
|
|
6169
|
+
},
|
|
6072
6170
|
JsonEditorUpdateService: {
|
|
6073
6171
|
type: 'JsonEditor',
|
|
6074
6172
|
apiInterface: {
|
|
@@ -6334,11 +6432,18 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
6334
6432
|
title: t('backoffice.form.organizationuserdetails.title'),
|
|
6335
6433
|
apiInterface: {
|
|
6336
6434
|
update: {
|
|
6337
|
-
url: '${authService}/v2/users/{_id}',
|
|
6435
|
+
url: '${authService}/v2/users/{_id}?organizationId=${organizationId}',
|
|
6338
6436
|
method: 'PATCH',
|
|
6339
6437
|
jsonPatch: true
|
|
6340
6438
|
}
|
|
6341
6439
|
},
|
|
6440
|
+
mapping: {
|
|
6441
|
+
type: 'query',
|
|
6442
|
+
map: [{
|
|
6443
|
+
targetField: 'organizationId',
|
|
6444
|
+
globalValue: 'selectedOrganizationId'
|
|
6445
|
+
}]
|
|
6446
|
+
},
|
|
6342
6447
|
items: [{
|
|
6343
6448
|
name: '_id',
|
|
6344
6449
|
label: 'ID',
|
|
@@ -7137,6 +7242,195 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7137
7242
|
type: 'input'
|
|
7138
7243
|
}]
|
|
7139
7244
|
},
|
|
7245
|
+
FormEditContentItem: {
|
|
7246
|
+
type: 'Form',
|
|
7247
|
+
items: [],
|
|
7248
|
+
itemsByData: function itemsByData(data) {
|
|
7249
|
+
var result = [{
|
|
7250
|
+
name: 'description',
|
|
7251
|
+
type: 'input',
|
|
7252
|
+
label: t('description')
|
|
7253
|
+
}];
|
|
7254
|
+
var getItemsByContent = function getItemsByContent(content, path) {
|
|
7255
|
+
for (var i = 0; i < content.length; i++) {
|
|
7256
|
+
var item = content[i];
|
|
7257
|
+
var p = [].concat(_toConsumableArray(path), [i]);
|
|
7258
|
+
switch (item.type) {
|
|
7259
|
+
case 'Title':
|
|
7260
|
+
result.push({
|
|
7261
|
+
name: 'Title',
|
|
7262
|
+
type: 'subTitle'
|
|
7263
|
+
});
|
|
7264
|
+
result.push({
|
|
7265
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7266
|
+
hidden: true
|
|
7267
|
+
});
|
|
7268
|
+
result.push({
|
|
7269
|
+
name: [].concat(_toConsumableArray(p), ['style']),
|
|
7270
|
+
hidden: true
|
|
7271
|
+
});
|
|
7272
|
+
result.push({
|
|
7273
|
+
name: [].concat(_toConsumableArray(p), ['text']),
|
|
7274
|
+
type: 'input',
|
|
7275
|
+
label: t('backoffice.table.views.rowAction.label')
|
|
7276
|
+
});
|
|
7277
|
+
break;
|
|
7278
|
+
case 'RichText':
|
|
7279
|
+
result.push({
|
|
7280
|
+
name: 'RichText',
|
|
7281
|
+
type: 'subTitle'
|
|
7282
|
+
});
|
|
7283
|
+
result.push({
|
|
7284
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7285
|
+
hidden: true
|
|
7286
|
+
});
|
|
7287
|
+
result.push({
|
|
7288
|
+
name: [].concat(_toConsumableArray(p), ['style']),
|
|
7289
|
+
hidden: true
|
|
7290
|
+
});
|
|
7291
|
+
result.push({
|
|
7292
|
+
name: [].concat(_toConsumableArray(p), ['text']),
|
|
7293
|
+
type: 'richText',
|
|
7294
|
+
label: t('backoffice.table.views.rowAction.label')
|
|
7295
|
+
});
|
|
7296
|
+
break;
|
|
7297
|
+
case 'URL':
|
|
7298
|
+
result.push({
|
|
7299
|
+
name: 'URL',
|
|
7300
|
+
type: 'subTitle'
|
|
7301
|
+
});
|
|
7302
|
+
result.push({
|
|
7303
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7304
|
+
hidden: true
|
|
7305
|
+
});
|
|
7306
|
+
result.push({
|
|
7307
|
+
name: [].concat(_toConsumableArray(p), ['url']),
|
|
7308
|
+
type: 'input',
|
|
7309
|
+
label: t('backoffice.form.api2servers.items.url')
|
|
7310
|
+
});
|
|
7311
|
+
result.push({
|
|
7312
|
+
name: [].concat(_toConsumableArray(p), ['text']),
|
|
7313
|
+
type: 'input',
|
|
7314
|
+
label: t('backoffice.table.views.rowAction.label')
|
|
7315
|
+
});
|
|
7316
|
+
break;
|
|
7317
|
+
case 'Gallery':
|
|
7318
|
+
result.push({
|
|
7319
|
+
name: 'Gallery',
|
|
7320
|
+
type: 'subTitle'
|
|
7321
|
+
});
|
|
7322
|
+
result.push({
|
|
7323
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7324
|
+
hidden: true
|
|
7325
|
+
});
|
|
7326
|
+
result.push({
|
|
7327
|
+
name: [].concat(_toConsumableArray(p), ['wrappingStyle']),
|
|
7328
|
+
hidden: true
|
|
7329
|
+
});
|
|
7330
|
+
result.push({
|
|
7331
|
+
name: [].concat(_toConsumableArray(p), ['content']),
|
|
7332
|
+
type: 'array',
|
|
7333
|
+
initialValue: item.content,
|
|
7334
|
+
items: [{
|
|
7335
|
+
type: 'radio',
|
|
7336
|
+
name: 'type',
|
|
7337
|
+
label: t('Format'),
|
|
7338
|
+
required: true,
|
|
7339
|
+
optionType: 'button',
|
|
7340
|
+
defaultValue: 'Image',
|
|
7341
|
+
options: [{
|
|
7342
|
+
value: 'Image',
|
|
7343
|
+
label: 'Image'
|
|
7344
|
+
}, {
|
|
7345
|
+
value: 'Video',
|
|
7346
|
+
label: 'Video'
|
|
7347
|
+
}]
|
|
7348
|
+
}, {
|
|
7349
|
+
name: 'url',
|
|
7350
|
+
type: 'input',
|
|
7351
|
+
label: t('backoffice.form.api2servers.items.url')
|
|
7352
|
+
}, {
|
|
7353
|
+
name: 'altText',
|
|
7354
|
+
type: 'input',
|
|
7355
|
+
label: t('backoffice.table.views.rowAction.label')
|
|
7356
|
+
}, {
|
|
7357
|
+
name: 'style',
|
|
7358
|
+
hidden: true
|
|
7359
|
+
}, {
|
|
7360
|
+
name: 'cover',
|
|
7361
|
+
hidden: true
|
|
7362
|
+
}]
|
|
7363
|
+
});
|
|
7364
|
+
break;
|
|
7365
|
+
case 'Image':
|
|
7366
|
+
result.push({
|
|
7367
|
+
name: 'Image',
|
|
7368
|
+
type: 'subTitle'
|
|
7369
|
+
});
|
|
7370
|
+
result.push({
|
|
7371
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7372
|
+
hidden: true
|
|
7373
|
+
});
|
|
7374
|
+
result.push({
|
|
7375
|
+
name: [].concat(_toConsumableArray(p), ['style']),
|
|
7376
|
+
hidden: true
|
|
7377
|
+
});
|
|
7378
|
+
result.push({
|
|
7379
|
+
name: [].concat(_toConsumableArray(p), ['cover']),
|
|
7380
|
+
hidden: true
|
|
7381
|
+
});
|
|
7382
|
+
result.push({
|
|
7383
|
+
name: [].concat(_toConsumableArray(p), ['url']),
|
|
7384
|
+
type: 'input',
|
|
7385
|
+
label: t('backoffice.form.api2servers.items.url')
|
|
7386
|
+
});
|
|
7387
|
+
result.push({
|
|
7388
|
+
name: [].concat(_toConsumableArray(p), ['altText']),
|
|
7389
|
+
type: 'input',
|
|
7390
|
+
label: t('backoffice.table.views.rowAction.label')
|
|
7391
|
+
});
|
|
7392
|
+
break;
|
|
7393
|
+
case 'Video':
|
|
7394
|
+
result.push({
|
|
7395
|
+
name: 'Video',
|
|
7396
|
+
type: 'subTitle'
|
|
7397
|
+
});
|
|
7398
|
+
result.push({
|
|
7399
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7400
|
+
hidden: true
|
|
7401
|
+
});
|
|
7402
|
+
result.push({
|
|
7403
|
+
name: [].concat(_toConsumableArray(p), ['url']),
|
|
7404
|
+
type: 'input',
|
|
7405
|
+
label: t('backoffice.form.api2servers.items.url')
|
|
7406
|
+
});
|
|
7407
|
+
break;
|
|
7408
|
+
case 'Wrapper':
|
|
7409
|
+
result.push({
|
|
7410
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7411
|
+
hidden: true
|
|
7412
|
+
});
|
|
7413
|
+
result.push({
|
|
7414
|
+
name: [].concat(_toConsumableArray(p), ['style']),
|
|
7415
|
+
hidden: true
|
|
7416
|
+
});
|
|
7417
|
+
getItemsByContent(item.content, [].concat(_toConsumableArray(p), ['content']));
|
|
7418
|
+
break;
|
|
7419
|
+
}
|
|
7420
|
+
}
|
|
7421
|
+
};
|
|
7422
|
+
getItemsByContent(data.content, ['content']);
|
|
7423
|
+
return result;
|
|
7424
|
+
},
|
|
7425
|
+
apiInterface: {
|
|
7426
|
+
update: {
|
|
7427
|
+
url: '${catalogService}/contentItems/{_id}',
|
|
7428
|
+
method: 'PATCH',
|
|
7429
|
+
jsonPatch: true
|
|
7430
|
+
},
|
|
7431
|
+
create: '${catalogService}/contentItems'
|
|
7432
|
+
}
|
|
7433
|
+
},
|
|
7140
7434
|
FormApplicationTranslationsEdit: {
|
|
7141
7435
|
type: 'Form',
|
|
7142
7436
|
title: t('backoffice.form.applicationtranslationedit.title'),
|
|
@@ -10500,6 +10794,18 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
10500
10794
|
globalValue: 'organization.parentType'
|
|
10501
10795
|
}
|
|
10502
10796
|
}]
|
|
10797
|
+
}, {
|
|
10798
|
+
id: 'ContentItems',
|
|
10799
|
+
label: t('backoffice.menu.items.label.ContentItems'),
|
|
10800
|
+
type: 'Table',
|
|
10801
|
+
//permission: 'backoffice_content',
|
|
10802
|
+
icon: 'OrderedListOutlined',
|
|
10803
|
+
rules: [{
|
|
10804
|
+
match: {
|
|
10805
|
+
value: ['RETAILER', 'ASSOCIATION'],
|
|
10806
|
+
globalValue: 'organization.parentType'
|
|
10807
|
+
}
|
|
10808
|
+
}]
|
|
10503
10809
|
}, {
|
|
10504
10810
|
id: 'adminClientRelations',
|
|
10505
10811
|
label: 'IDM',
|
|
@@ -10547,6 +10853,10 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
10547
10853
|
globalValue: 'organization.parentType'
|
|
10548
10854
|
}
|
|
10549
10855
|
}]
|
|
10856
|
+
}, {
|
|
10857
|
+
id: 'CatalogEditorIDM',
|
|
10858
|
+
label: t('backoffice.menu.items.label.CatalogEditorIDM'),
|
|
10859
|
+
type: 'CatalogEditorIDM'
|
|
10550
10860
|
}]
|
|
10551
10861
|
}, {
|
|
10552
10862
|
label: t('backoffice.menu.items.label.adminarea'),
|
|
@@ -10772,9 +11082,9 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
10772
11082
|
};
|
|
10773
11083
|
}
|
|
10774
11084
|
|
|
10775
|
-
function _createForOfIteratorHelper$l(
|
|
10776
|
-
function _unsupportedIterableToArray$l(
|
|
10777
|
-
function _arrayLikeToArray$l(
|
|
11085
|
+
function _createForOfIteratorHelper$l(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$l(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; } } }; }
|
|
11086
|
+
function _unsupportedIterableToArray$l(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$l(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$l(r, a) : void 0; } }
|
|
11087
|
+
function _arrayLikeToArray$l(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; }
|
|
10778
11088
|
function aplyRule(_ref) {
|
|
10779
11089
|
var rules = _ref.rules,
|
|
10780
11090
|
data = _ref.data,
|
|
@@ -10865,6 +11175,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
10865
11175
|
_defineProperty(this, "_selectedLeaf", undefined);
|
|
10866
11176
|
_defineProperty(this, "_configurationId", void 0);
|
|
10867
11177
|
_defineProperty(this, "_theme", window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'darkmode' : 'lightmode');
|
|
11178
|
+
_defineProperty(this, "_menuCollapsed", false);
|
|
10868
11179
|
makeAutoObservable(this, {
|
|
10869
11180
|
root: false,
|
|
10870
11181
|
_leafs: observable.ref,
|
|
@@ -10899,10 +11210,13 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
10899
11210
|
}, {
|
|
10900
11211
|
key: "setSelectedMenuItem",
|
|
10901
11212
|
value: function setSelectedMenuItem(id) {
|
|
10902
|
-
var _this$_leafs;
|
|
11213
|
+
var _this$_leafs, _this$_selectedLeaf2;
|
|
10903
11214
|
this._selectedLeaf = (_this$_leafs = this._leafs) === null || _this$_leafs === void 0 ? void 0 : _this$_leafs.find(function (l) {
|
|
10904
11215
|
return l.id == id;
|
|
10905
11216
|
});
|
|
11217
|
+
if (((_this$_selectedLeaf2 = this._selectedLeaf) === null || _this$_selectedLeaf2 === void 0 ? void 0 : _this$_selectedLeaf2.type) == 'CatalogEditorIDM') {
|
|
11218
|
+
this.menuCollapsed = true;
|
|
11219
|
+
}
|
|
10906
11220
|
}
|
|
10907
11221
|
}, {
|
|
10908
11222
|
key: "menuItem",
|
|
@@ -10920,6 +11234,14 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
10920
11234
|
this._theme = value;
|
|
10921
11235
|
localStorage.setItem('theme', value);
|
|
10922
11236
|
}
|
|
11237
|
+
}, {
|
|
11238
|
+
key: "menuCollapsed",
|
|
11239
|
+
get: function get() {
|
|
11240
|
+
return this._menuCollapsed;
|
|
11241
|
+
},
|
|
11242
|
+
set: function set(value) {
|
|
11243
|
+
this._menuCollapsed = value;
|
|
11244
|
+
}
|
|
10923
11245
|
}, {
|
|
10924
11246
|
key: "configuration",
|
|
10925
11247
|
get: function get() {
|
|
@@ -11175,9 +11497,9 @@ var _default$3 = /*#__PURE__*/function () {
|
|
|
11175
11497
|
}]);
|
|
11176
11498
|
}();
|
|
11177
11499
|
|
|
11178
|
-
function _createForOfIteratorHelper$k(
|
|
11179
|
-
function _unsupportedIterableToArray$k(
|
|
11180
|
-
function _arrayLikeToArray$k(
|
|
11500
|
+
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; } } }; }
|
|
11501
|
+
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; } }
|
|
11502
|
+
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; }
|
|
11181
11503
|
var LOG$9 = getLogger('Backoffice', 'DownloadStore');
|
|
11182
11504
|
var DownloadStore = /*#__PURE__*/function () {
|
|
11183
11505
|
function DownloadStore(_rootStore) {
|
|
@@ -11770,9 +12092,9 @@ var useStore = function useStore() {
|
|
|
11770
12092
|
return store;
|
|
11771
12093
|
};
|
|
11772
12094
|
|
|
11773
|
-
function _createForOfIteratorHelper$j(
|
|
11774
|
-
function _unsupportedIterableToArray$j(
|
|
11775
|
-
function _arrayLikeToArray$j(
|
|
12095
|
+
function _createForOfIteratorHelper$j(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$j(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; } } }; }
|
|
12096
|
+
function _unsupportedIterableToArray$j(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$j(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$j(r, a) : void 0; } }
|
|
12097
|
+
function _arrayLikeToArray$j(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; }
|
|
11776
12098
|
function getCombinedValues(data, pattern) {
|
|
11777
12099
|
if (!pattern || !data) {
|
|
11778
12100
|
return data;
|
|
@@ -11794,11 +12116,11 @@ function getCombinedValues(data, pattern) {
|
|
|
11794
12116
|
return value;
|
|
11795
12117
|
}
|
|
11796
12118
|
|
|
11797
|
-
function _createForOfIteratorHelper$i(
|
|
11798
|
-
function _unsupportedIterableToArray$i(
|
|
11799
|
-
function _arrayLikeToArray$i(
|
|
11800
|
-
function ownKeys$
|
|
11801
|
-
function _objectSpread$
|
|
12119
|
+
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; } } }; }
|
|
12120
|
+
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; } }
|
|
12121
|
+
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; }
|
|
12122
|
+
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; }
|
|
12123
|
+
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; }
|
|
11802
12124
|
function useDescriptions (_ref) {
|
|
11803
12125
|
var id = _ref.id;
|
|
11804
12126
|
var root = useStore();
|
|
@@ -11891,7 +12213,7 @@ function _getDisplayData() {
|
|
|
11891
12213
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
11892
12214
|
while (1) switch (_context4.prev = _context4.next) {
|
|
11893
12215
|
case 0:
|
|
11894
|
-
displayData = _objectSpread$
|
|
12216
|
+
displayData = _objectSpread$E({}, data);
|
|
11895
12217
|
_iterator = _createForOfIteratorHelper$i(items);
|
|
11896
12218
|
_context4.prev = 2;
|
|
11897
12219
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -11967,11 +12289,11 @@ function _getDisplayData() {
|
|
|
11967
12289
|
return _getDisplayData.apply(this, arguments);
|
|
11968
12290
|
}
|
|
11969
12291
|
|
|
11970
|
-
function ownKeys$
|
|
11971
|
-
function _objectSpread$
|
|
11972
|
-
function _createForOfIteratorHelper$h(
|
|
11973
|
-
function _unsupportedIterableToArray$h(
|
|
11974
|
-
function _arrayLikeToArray$h(
|
|
12292
|
+
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; }
|
|
12293
|
+
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; }
|
|
12294
|
+
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; } } }; }
|
|
12295
|
+
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; } }
|
|
12296
|
+
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; }
|
|
11975
12297
|
function ActionButton (_ref) {
|
|
11976
12298
|
var action = _ref.action,
|
|
11977
12299
|
callback = _ref.callback,
|
|
@@ -12110,7 +12432,7 @@ function ActionButton (_ref) {
|
|
|
12110
12432
|
_iterator2.f();
|
|
12111
12433
|
}
|
|
12112
12434
|
_context.next = 23;
|
|
12113
|
-
return apiInterface.update(_objectSpread$
|
|
12435
|
+
return apiInterface.update(_objectSpread$D(_objectSpread$D({}, data), {}, {
|
|
12114
12436
|
state: toSwitch
|
|
12115
12437
|
}), data);
|
|
12116
12438
|
case 23:
|
|
@@ -12267,14 +12589,14 @@ function _simpleChangeValue() {
|
|
|
12267
12589
|
break;
|
|
12268
12590
|
}
|
|
12269
12591
|
for (i = 0; i < action.newValues.length; i++) {
|
|
12270
|
-
fieldsToUpdate = _objectSpread$
|
|
12592
|
+
fieldsToUpdate = _objectSpread$D(_objectSpread$D({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
12271
12593
|
}
|
|
12272
12594
|
if (!apiInterface.canUpdate) {
|
|
12273
12595
|
_context2.next = 9;
|
|
12274
12596
|
break;
|
|
12275
12597
|
}
|
|
12276
12598
|
_context2.next = 7;
|
|
12277
|
-
return apiInterface.update(_objectSpread$
|
|
12599
|
+
return apiInterface.update(_objectSpread$D({}, fieldsToUpdate), data);
|
|
12278
12600
|
case 7:
|
|
12279
12601
|
response = _context2.sent;
|
|
12280
12602
|
return _context2.abrupt("return", response);
|
|
@@ -12289,7 +12611,7 @@ function _simpleChangeValue() {
|
|
|
12289
12611
|
return _simpleChangeValue.apply(this, arguments);
|
|
12290
12612
|
}
|
|
12291
12613
|
function A(props) {
|
|
12292
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
12614
|
+
return /*#__PURE__*/jsx("a", _objectSpread$D({}, props));
|
|
12293
12615
|
}
|
|
12294
12616
|
|
|
12295
12617
|
var DescriptionWrapper = function DescriptionWrapper(_ref) {
|
|
@@ -12333,11 +12655,11 @@ var DescriptionWrapper = function DescriptionWrapper(_ref) {
|
|
|
12333
12655
|
};
|
|
12334
12656
|
var Description = observer(DescriptionWrapper);
|
|
12335
12657
|
|
|
12336
|
-
function _createForOfIteratorHelper$g(
|
|
12337
|
-
function _unsupportedIterableToArray$g(
|
|
12338
|
-
function _arrayLikeToArray$g(
|
|
12339
|
-
function ownKeys$
|
|
12340
|
-
function _objectSpread$
|
|
12658
|
+
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; } } }; }
|
|
12659
|
+
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; } }
|
|
12660
|
+
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; }
|
|
12661
|
+
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; }
|
|
12662
|
+
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; }
|
|
12341
12663
|
function useSelectData (_ref) {
|
|
12342
12664
|
var data = _ref.data,
|
|
12343
12665
|
onChange = _ref.onChange,
|
|
@@ -12518,7 +12840,7 @@ function useSelectData (_ref) {
|
|
|
12518
12840
|
setFetching(true);
|
|
12519
12841
|
serverSideParams = {
|
|
12520
12842
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
12521
|
-
return _objectSpread$
|
|
12843
|
+
return _objectSpread$C(_objectSpread$C({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
12522
12844
|
}, {}) : {
|
|
12523
12845
|
_id: [value, 'contains']
|
|
12524
12846
|
},
|
|
@@ -12803,7 +13125,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref) {
|
|
|
12803
13125
|
var filterServerSide = _typeof(apiInterface) == 'object' && _typeof(apiInterface.read) == 'object' && apiInterface.read.filterServerSide;
|
|
12804
13126
|
var selected = state.selected;
|
|
12805
13127
|
return /*#__PURE__*/jsx(Fragment, {
|
|
12806
|
-
children: /*#__PURE__*/jsx(Select$
|
|
13128
|
+
children: /*#__PURE__*/jsx(Select$1, {
|
|
12807
13129
|
labelInValue: mode === 'tags' ? false : true,
|
|
12808
13130
|
style: {
|
|
12809
13131
|
width: '100%',
|
|
@@ -12829,13 +13151,13 @@ var SelectWrapper$1 = function SelectWrapper(_ref) {
|
|
|
12829
13151
|
})
|
|
12830
13152
|
});
|
|
12831
13153
|
};
|
|
12832
|
-
var Select
|
|
13154
|
+
var Select = observer(SelectWrapper$1, {
|
|
12833
13155
|
forwardRef: true
|
|
12834
13156
|
});
|
|
12835
13157
|
|
|
12836
|
-
function _createForOfIteratorHelper$f(
|
|
12837
|
-
function _unsupportedIterableToArray$f(
|
|
12838
|
-
function _arrayLikeToArray$f(
|
|
13158
|
+
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; } } }; }
|
|
13159
|
+
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; } }
|
|
13160
|
+
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; }
|
|
12839
13161
|
var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
12840
13162
|
_ref.id;
|
|
12841
13163
|
var _useDivaCore = useDivaCore(),
|
|
@@ -12952,7 +13274,7 @@ var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
|
12952
13274
|
style: {
|
|
12953
13275
|
marginTop: 18
|
|
12954
13276
|
},
|
|
12955
|
-
children: /*#__PURE__*/jsx(Select
|
|
13277
|
+
children: /*#__PURE__*/jsx(Select, {
|
|
12956
13278
|
mode: "multiple",
|
|
12957
13279
|
apiInterface: {
|
|
12958
13280
|
read: {
|
|
@@ -13017,11 +13339,11 @@ function removeEmpty(data) {
|
|
|
13017
13339
|
return undefined;
|
|
13018
13340
|
}
|
|
13019
13341
|
|
|
13020
|
-
function ownKeys$
|
|
13021
|
-
function _objectSpread$
|
|
13022
|
-
function _createForOfIteratorHelper$e(
|
|
13023
|
-
function _unsupportedIterableToArray$e(
|
|
13024
|
-
function _arrayLikeToArray$e(
|
|
13342
|
+
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; }
|
|
13343
|
+
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; }
|
|
13344
|
+
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; } } }; }
|
|
13345
|
+
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; } }
|
|
13346
|
+
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; }
|
|
13025
13347
|
function useFormData (_ref) {
|
|
13026
13348
|
var _loadedData$_id;
|
|
13027
13349
|
var id = _ref.id,
|
|
@@ -13050,10 +13372,14 @@ function useFormData (_ref) {
|
|
|
13050
13372
|
setSelectedItemsIndex = _useState6[1];
|
|
13051
13373
|
var changedFields = useRef([]);
|
|
13052
13374
|
var _useMemo = useMemo(function () {
|
|
13053
|
-
|
|
13375
|
+
var c = {
|
|
13054
13376
|
apiHandler: root.getApiHandler(id, apiInterface),
|
|
13055
13377
|
configuration: root.configurationStore.getConfiguration(id, 'Form')
|
|
13056
13378
|
};
|
|
13379
|
+
if (c.configuration.itemsByData) {
|
|
13380
|
+
c.configuration.items = c.configuration.itemsByData(inboundData);
|
|
13381
|
+
}
|
|
13382
|
+
return c;
|
|
13057
13383
|
}, [id]),
|
|
13058
13384
|
apiHandler = _useMemo.apiHandler,
|
|
13059
13385
|
configuration = _useMemo.configuration;
|
|
@@ -13111,7 +13437,7 @@ function useFormData (_ref) {
|
|
|
13111
13437
|
multipleEditingData = inboundData;
|
|
13112
13438
|
}
|
|
13113
13439
|
return {
|
|
13114
|
-
loadedData: onLoadFields(_objectSpread$
|
|
13440
|
+
loadedData: onLoadFields(_objectSpread$B({}, dt)),
|
|
13115
13441
|
multipleEditingData: multipleEditingData
|
|
13116
13442
|
};
|
|
13117
13443
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -13148,7 +13474,7 @@ function useFormData (_ref) {
|
|
|
13148
13474
|
setFieldErrors = _useState14[1];
|
|
13149
13475
|
useEffect(function () {
|
|
13150
13476
|
var _loadedData$_id2;
|
|
13151
|
-
setState(_objectSpread$
|
|
13477
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13152
13478
|
data: loadedData,
|
|
13153
13479
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
13154
13480
|
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),
|
|
@@ -13243,7 +13569,7 @@ function useFormData (_ref) {
|
|
|
13243
13569
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
13244
13570
|
while (1) switch (_context2.prev = _context2.next) {
|
|
13245
13571
|
case 0:
|
|
13246
|
-
newData = _objectSpread$
|
|
13572
|
+
newData = _objectSpread$B({}, state.data);
|
|
13247
13573
|
Object.keys(values).forEach(function (k) {
|
|
13248
13574
|
var _values$k$value, _values$k;
|
|
13249
13575
|
return newData[k] = (_values$k$value = (_values$k = values[k]) === null || _values$k === void 0 ? void 0 : _values$k.value) !== null && _values$k$value !== void 0 ? _values$k$value : values[k];
|
|
@@ -13255,12 +13581,12 @@ function useFormData (_ref) {
|
|
|
13255
13581
|
return _context2.abrupt("return", newData);
|
|
13256
13582
|
case 4:
|
|
13257
13583
|
_context2.next = 6;
|
|
13258
|
-
return setDynamicFields(_objectSpread$
|
|
13584
|
+
return setDynamicFields(_objectSpread$B({}, state.data), newData);
|
|
13259
13585
|
case 6:
|
|
13260
13586
|
newData = _context2.sent;
|
|
13261
|
-
newData = onSaveFields(_objectSpread$
|
|
13587
|
+
newData = onSaveFields(_objectSpread$B({}, state.data), newData);
|
|
13262
13588
|
newData = removeEmpty(newData);
|
|
13263
|
-
setState(_objectSpread$
|
|
13589
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13264
13590
|
loading: true
|
|
13265
13591
|
}));
|
|
13266
13592
|
finalData = state.data;
|
|
@@ -13309,13 +13635,13 @@ function useFormData (_ref) {
|
|
|
13309
13635
|
_context2.next = 38;
|
|
13310
13636
|
break;
|
|
13311
13637
|
}
|
|
13312
|
-
setFieldErrors(_objectSpread$
|
|
13638
|
+
setFieldErrors(_objectSpread$B(_objectSpread$B({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
13313
13639
|
return _context2.abrupt("return", undefined);
|
|
13314
13640
|
case 38:
|
|
13315
13641
|
throw _context2.t0;
|
|
13316
13642
|
case 39:
|
|
13317
13643
|
_context2.prev = 39;
|
|
13318
|
-
setState(_objectSpread$
|
|
13644
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13319
13645
|
data: finalData,
|
|
13320
13646
|
loading: false
|
|
13321
13647
|
}));
|
|
@@ -13345,7 +13671,7 @@ function useFormData (_ref) {
|
|
|
13345
13671
|
}
|
|
13346
13672
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
13347
13673
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
13348
|
-
var wholeData = Object.assign(_objectSpread$
|
|
13674
|
+
var wholeData = Object.assign(_objectSpread$B({}, state.data), _objectSpread$B({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
13349
13675
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
13350
13676
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
13351
13677
|
setHiddenRequiredDisabled(newState);
|
|
@@ -13358,12 +13684,12 @@ function useFormData (_ref) {
|
|
|
13358
13684
|
}
|
|
13359
13685
|
};
|
|
13360
13686
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
13361
|
-
var data = d !== null && d !== void 0 ? d : Object.assign(_objectSpread$
|
|
13687
|
+
var data = d !== null && d !== void 0 ? d : Object.assign(_objectSpread$B({}, state.data), _objectSpread$B({}, state.form.getFieldsValue()));
|
|
13362
13688
|
setFieldInObject(id, data, value);
|
|
13363
|
-
var newFieldErrors = _objectSpread$
|
|
13689
|
+
var newFieldErrors = _objectSpread$B({}, fieldErrors);
|
|
13364
13690
|
delete newFieldErrors[id.toString()];
|
|
13365
13691
|
setFieldErrors(newFieldErrors);
|
|
13366
|
-
setState(_objectSpread$
|
|
13692
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13367
13693
|
data: data
|
|
13368
13694
|
}));
|
|
13369
13695
|
return data;
|
|
@@ -13389,12 +13715,12 @@ function useFormData (_ref) {
|
|
|
13389
13715
|
var _value$value;
|
|
13390
13716
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
13391
13717
|
if (configuration.itemSelectorReset) {
|
|
13392
|
-
setState(_objectSpread$
|
|
13718
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13393
13719
|
data: _defineProperty({}, name, val)
|
|
13394
13720
|
}));
|
|
13395
13721
|
} else {
|
|
13396
|
-
setState(_objectSpread$
|
|
13397
|
-
data: _objectSpread$
|
|
13722
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13723
|
+
data: _objectSpread$B(_objectSpread$B({}, state.data), {}, _defineProperty({}, name, val))
|
|
13398
13724
|
}));
|
|
13399
13725
|
}
|
|
13400
13726
|
setSelectedItemsIndex(idx);
|
|
@@ -13404,12 +13730,12 @@ function useFormData (_ref) {
|
|
|
13404
13730
|
var val = _ref6.value;
|
|
13405
13731
|
if (value === val) {
|
|
13406
13732
|
if (configuration.itemSelectorReset) {
|
|
13407
|
-
setState(_objectSpread$
|
|
13733
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13408
13734
|
data: _defineProperty({}, name, val)
|
|
13409
13735
|
}));
|
|
13410
13736
|
} else {
|
|
13411
|
-
setState(_objectSpread$
|
|
13412
|
-
data: _objectSpread$
|
|
13737
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13738
|
+
data: _objectSpread$B(_objectSpread$B({}, state.data), {}, _defineProperty({}, name, val))
|
|
13413
13739
|
}));
|
|
13414
13740
|
}
|
|
13415
13741
|
setSelectedItemsIndex(idx);
|
|
@@ -13523,7 +13849,7 @@ function useFormData (_ref) {
|
|
|
13523
13849
|
}));
|
|
13524
13850
|
return _setDynamicFields.apply(this, arguments);
|
|
13525
13851
|
}
|
|
13526
|
-
return _objectSpread$
|
|
13852
|
+
return _objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13527
13853
|
setUsedPreset: setUsedPreset,
|
|
13528
13854
|
configuration: configuration,
|
|
13529
13855
|
changedFields: changedFields,
|
|
@@ -13581,11 +13907,11 @@ function getData(id, data) {
|
|
|
13581
13907
|
}
|
|
13582
13908
|
}
|
|
13583
13909
|
|
|
13584
|
-
function ownKeys$
|
|
13585
|
-
function _objectSpread$
|
|
13586
|
-
function _createForOfIteratorHelper$d(
|
|
13587
|
-
function _unsupportedIterableToArray$d(
|
|
13588
|
-
function _arrayLikeToArray$d(
|
|
13910
|
+
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; }
|
|
13911
|
+
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; }
|
|
13912
|
+
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; } } }; }
|
|
13913
|
+
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; } }
|
|
13914
|
+
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; }
|
|
13589
13915
|
var Presets = function Presets(_ref) {
|
|
13590
13916
|
var state = _ref.state,
|
|
13591
13917
|
apiHandler = _ref.apiHandler,
|
|
@@ -13594,7 +13920,7 @@ var Presets = function Presets(_ref) {
|
|
|
13594
13920
|
setUsedPreset = _ref.setUsedPreset,
|
|
13595
13921
|
presets = _ref.presets,
|
|
13596
13922
|
setPresets = _ref.setPresets;
|
|
13597
|
-
var Option = Select$
|
|
13923
|
+
var Option = Select$1.Option;
|
|
13598
13924
|
var _useState = useState(false),
|
|
13599
13925
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13600
13926
|
isModalVisible = _useState2[0],
|
|
@@ -13632,13 +13958,13 @@ var Presets = function Presets(_ref) {
|
|
|
13632
13958
|
} finally {
|
|
13633
13959
|
_iterator.f();
|
|
13634
13960
|
}
|
|
13635
|
-
var data = _objectSpread$
|
|
13961
|
+
var data = _objectSpread$A(_objectSpread$A({}, form.getFieldsValue(names)), {}, {
|
|
13636
13962
|
newPresetName: newPresetName
|
|
13637
13963
|
});
|
|
13638
13964
|
data.dpi = parseInt(data.dpi);
|
|
13639
13965
|
data.organization = root.getGlobalValue('organizationId');
|
|
13640
13966
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
13641
|
-
var dt = _objectSpread$
|
|
13967
|
+
var dt = _objectSpread$A(_objectSpread$A({}, form.getFieldsValue(names)), {}, {
|
|
13642
13968
|
name: newPresetName
|
|
13643
13969
|
});
|
|
13644
13970
|
setPresets({
|
|
@@ -13698,7 +14024,7 @@ var Presets = function Presets(_ref) {
|
|
|
13698
14024
|
setValue(undefined);
|
|
13699
14025
|
};
|
|
13700
14026
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
13701
|
-
children: [/*#__PURE__*/jsx(Select$
|
|
14027
|
+
children: [/*#__PURE__*/jsx(Select$1, {
|
|
13702
14028
|
showSearch: true,
|
|
13703
14029
|
value: value,
|
|
13704
14030
|
placeholder: t('backoffice.form.presets.placeholder'),
|
|
@@ -14021,8 +14347,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
14021
14347
|
var css_248z$h = ".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";
|
|
14022
14348
|
styleInject(css_248z$h);
|
|
14023
14349
|
|
|
14024
|
-
function ownKeys$
|
|
14025
|
-
function _objectSpread$
|
|
14350
|
+
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; }
|
|
14351
|
+
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; }
|
|
14026
14352
|
var SubTitle = function SubTitle(_ref) {
|
|
14027
14353
|
var _item$orientation, _item$buttonIds;
|
|
14028
14354
|
var item = _ref.item,
|
|
@@ -14031,10 +14357,10 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
14031
14357
|
t = _useTranslation.t;
|
|
14032
14358
|
return /*#__PURE__*/jsx(Divider, {
|
|
14033
14359
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
14034
|
-
style: _objectSpread$
|
|
14360
|
+
style: _objectSpread$z({}, item.style),
|
|
14035
14361
|
children: /*#__PURE__*/jsxs("div", {
|
|
14036
14362
|
className: wrapper$2,
|
|
14037
|
-
children: [t(item.name), ((_item$buttonIds = item.buttonIds) === null || _item$buttonIds === void 0 ? void 0 : _item$buttonIds.length) && item.buttonIds.map(function (b) {
|
|
14363
|
+
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) {
|
|
14038
14364
|
return /*#__PURE__*/jsx("div", {
|
|
14039
14365
|
className: buttonGroup,
|
|
14040
14366
|
children: /*#__PURE__*/jsx(CustomButton$1, {
|
|
@@ -14708,8 +15034,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
14708
15034
|
}]);
|
|
14709
15035
|
}(_default$d);
|
|
14710
15036
|
|
|
14711
|
-
function ownKeys$
|
|
14712
|
-
function _objectSpread$
|
|
15037
|
+
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; }
|
|
15038
|
+
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; }
|
|
14713
15039
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
14714
15040
|
function useSelectClientRelationCatalog (_ref) {
|
|
14715
15041
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -14878,7 +15204,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
14878
15204
|
case 22:
|
|
14879
15205
|
supplierData = _context2.sent;
|
|
14880
15206
|
case 23:
|
|
14881
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
15207
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$y(_objectSpread$y({}, _selectedSupplier), {}, {
|
|
14882
15208
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
14883
15209
|
}), supplierData);
|
|
14884
15210
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -14988,7 +15314,7 @@ var Selector = function Selector(_ref) {
|
|
|
14988
15314
|
}
|
|
14989
15315
|
}, [valueState]);
|
|
14990
15316
|
return /*#__PURE__*/jsx(Fragment, {
|
|
14991
|
-
children: /*#__PURE__*/jsx(Select$
|
|
15317
|
+
children: /*#__PURE__*/jsx(Select$1, {
|
|
14992
15318
|
className: customSelect,
|
|
14993
15319
|
showSearch: true,
|
|
14994
15320
|
labelInValue: true,
|
|
@@ -15007,7 +15333,7 @@ var Selector = function Selector(_ref) {
|
|
|
15007
15333
|
return onSelect(option === null || option === void 0 ? void 0 : option.key);
|
|
15008
15334
|
},
|
|
15009
15335
|
children: items === null || items === void 0 ? void 0 : items.map(function (i) {
|
|
15010
|
-
return /*#__PURE__*/jsxs(Select$
|
|
15336
|
+
return /*#__PURE__*/jsxs(Select$1.Option, {
|
|
15011
15337
|
value: i.name,
|
|
15012
15338
|
className: customSelectOption,
|
|
15013
15339
|
children: [/*#__PURE__*/jsx("div", {
|
|
@@ -15100,6 +15426,7 @@ var LOG$8 = getLogger('Backoffice', 'SelectSimple');
|
|
|
15100
15426
|
function useSelectSimpleData (_ref) {
|
|
15101
15427
|
var apiInterface = _ref.apiInterface,
|
|
15102
15428
|
selectMapping = _ref.selectMapping,
|
|
15429
|
+
apiMapping = _ref.apiMapping,
|
|
15103
15430
|
onChange = _ref.onChange,
|
|
15104
15431
|
value = _ref.value,
|
|
15105
15432
|
configuredOptions = _ref.options;
|
|
@@ -15141,7 +15468,7 @@ function useSelectSimpleData (_ref) {
|
|
|
15141
15468
|
}
|
|
15142
15469
|
if (!apiHandler.canReadList) throw Error('SelectSimple: apiInterface must have readList method');
|
|
15143
15470
|
setLoading(true);
|
|
15144
|
-
apiHandler.readList().then(function (data) {
|
|
15471
|
+
apiHandler.readList(apiMapping).then(function (data) {
|
|
15145
15472
|
var _data$data;
|
|
15146
15473
|
if (_typeof((_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data[0]) == 'object' && !selectMapping) throw Error('SelectSimple: selectMapping is required when data is an object');
|
|
15147
15474
|
var options = data.data.map(function (item) {
|
|
@@ -15222,12 +15549,13 @@ function parseReturnData(options, selectMapping) {
|
|
|
15222
15549
|
return (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? options.value : options.data;
|
|
15223
15550
|
}
|
|
15224
15551
|
|
|
15225
|
-
var _excluded$2 = ["apiInterface", "selectMapping", "onChange", "value", "search", "options"];
|
|
15226
|
-
function ownKeys$
|
|
15227
|
-
function _objectSpread$
|
|
15552
|
+
var _excluded$2 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options"];
|
|
15553
|
+
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; }
|
|
15554
|
+
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; }
|
|
15228
15555
|
var SelectWrapper = function SelectWrapper(_ref) {
|
|
15229
15556
|
var apiInterface = _ref.apiInterface,
|
|
15230
15557
|
selectMapping = _ref.selectMapping,
|
|
15558
|
+
apiMapping = _ref.apiMapping,
|
|
15231
15559
|
onChange = _ref.onChange,
|
|
15232
15560
|
value = _ref.value,
|
|
15233
15561
|
search = _ref.search,
|
|
@@ -15236,12 +15564,13 @@ var SelectWrapper = function SelectWrapper(_ref) {
|
|
|
15236
15564
|
var state = useSelectSimpleData({
|
|
15237
15565
|
apiInterface: apiInterface,
|
|
15238
15566
|
selectMapping: selectMapping,
|
|
15567
|
+
apiMapping: apiMapping,
|
|
15239
15568
|
onChange: onChange,
|
|
15240
15569
|
value: value,
|
|
15241
15570
|
type: 'SelectSimple',
|
|
15242
15571
|
options: options
|
|
15243
15572
|
});
|
|
15244
|
-
return /*#__PURE__*/jsx(Select$
|
|
15573
|
+
return /*#__PURE__*/jsx(Select$1, _objectSpread$x(_objectSpread$x({}, selectProps), {}, {
|
|
15245
15574
|
showSearch: search,
|
|
15246
15575
|
loading: state.loading,
|
|
15247
15576
|
options: state.options,
|
|
@@ -15251,7 +15580,7 @@ var SelectWrapper = function SelectWrapper(_ref) {
|
|
|
15251
15580
|
filterOption: filterOption
|
|
15252
15581
|
}));
|
|
15253
15582
|
};
|
|
15254
|
-
var
|
|
15583
|
+
var SimpleSelect = observer(SelectWrapper, {
|
|
15255
15584
|
forwardRef: true
|
|
15256
15585
|
});
|
|
15257
15586
|
var filterOption = function filterOption(input, option) {
|
|
@@ -15259,11 +15588,36 @@ var filterOption = function filterOption(input, option) {
|
|
|
15259
15588
|
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').toLowerCase().includes(input.toLowerCase());
|
|
15260
15589
|
};
|
|
15261
15590
|
|
|
15262
|
-
|
|
15263
|
-
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
|
|
15591
|
+
var RichTextEditor = function RichTextEditor(_ref) {
|
|
15592
|
+
var initValue = _ref.initValue,
|
|
15593
|
+
onChange = _ref.onChange,
|
|
15594
|
+
name = _ref.name;
|
|
15595
|
+
var val = useRef(initValue);
|
|
15596
|
+
return /*#__PURE__*/jsx(Editor, {
|
|
15597
|
+
apiKey: "m7260i0wfvki2sqkam6mfogklidxr229sk7499yjty92q8ww",
|
|
15598
|
+
onEditorChange: function onEditorChange(val, e) {
|
|
15599
|
+
onChange === null || onChange === void 0 || onChange(name, val);
|
|
15600
|
+
},
|
|
15601
|
+
initialValue: val.current,
|
|
15602
|
+
textareaName: "text",
|
|
15603
|
+
init: {
|
|
15604
|
+
height: 500,
|
|
15605
|
+
menubar: false,
|
|
15606
|
+
plugins: ['advlist autolink lists link table paste'],
|
|
15607
|
+
contextmenu: '',
|
|
15608
|
+
resize: false,
|
|
15609
|
+
statusbar: false,
|
|
15610
|
+
toolbar: 'undo redo | formatselect | ' + 'bold italic backcolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | table ',
|
|
15611
|
+
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
|
|
15612
|
+
}
|
|
15613
|
+
});
|
|
15614
|
+
};
|
|
15615
|
+
|
|
15616
|
+
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; } } }; }
|
|
15617
|
+
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; } }
|
|
15618
|
+
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; }
|
|
15619
|
+
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; }
|
|
15620
|
+
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; }
|
|
15267
15621
|
var LOG$7 = getLogger('Backoffice', 'Form');
|
|
15268
15622
|
var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
15269
15623
|
var _state$selectedItems2;
|
|
@@ -15379,7 +15733,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15379
15733
|
};
|
|
15380
15734
|
}();
|
|
15381
15735
|
var updateFormData = function updateFormData(data) {
|
|
15382
|
-
form.setFieldsValue(_objectSpread$
|
|
15736
|
+
form.setFieldsValue(_objectSpread$w(_objectSpread$w({}, state.data), data));
|
|
15383
15737
|
};
|
|
15384
15738
|
var onErrorInternal = function onErrorInternal(err, errorText) {
|
|
15385
15739
|
if (err instanceof CoreError && err.code) {
|
|
@@ -15434,13 +15788,14 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15434
15788
|
if (!item.label && item.type === 'button') return undefined;
|
|
15435
15789
|
return item.label ? t(item.label, item.label) : item.name;
|
|
15436
15790
|
}
|
|
15437
|
-
function getElement(item, data, setCanSave, state, _onChange, root, form, hidden) {
|
|
15791
|
+
function getElement(item, data, setCanSave, state, _onChange, root, form, hidden, overwrittenName) {
|
|
15438
15792
|
var _isReadonly, _state$hiddenRequired2;
|
|
15439
15793
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
15440
|
-
var
|
|
15794
|
+
var name = overwrittenName || item.name;
|
|
15795
|
+
var disabled = (_isReadonly = isReadonly(item, data)) !== null && _isReadonly !== void 0 ? _isReadonly : (_state$hiddenRequired2 = state.hiddenRequiredDisabled[typeof name == 'string' ? name : name.join('.')]) === null || _state$hiddenRequired2 === void 0 ? void 0 : _state$hiddenRequired2.disabled;
|
|
15441
15796
|
switch (item.type) {
|
|
15442
15797
|
case 'select':
|
|
15443
|
-
return /*#__PURE__*/jsx(Select
|
|
15798
|
+
return /*#__PURE__*/jsx(Select, {
|
|
15444
15799
|
initialValue: item.defaultValue,
|
|
15445
15800
|
apiInterface: item.apiInterface,
|
|
15446
15801
|
mode: item.mode,
|
|
@@ -15457,7 +15812,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15457
15812
|
wholeData: state.data,
|
|
15458
15813
|
disabledConfig: item === null || item === void 0 ? void 0 : item['disabledSelection'],
|
|
15459
15814
|
onChange: function onChange(value) {
|
|
15460
|
-
_onChange(
|
|
15815
|
+
_onChange(name, item.valueField ? value[item.valueField] : value);
|
|
15461
15816
|
},
|
|
15462
15817
|
allowClear: item.allowClear,
|
|
15463
15818
|
placeholder: item.placeholder,
|
|
@@ -15466,10 +15821,10 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15466
15821
|
}
|
|
15467
15822
|
}, state.selectedItemsIndex);
|
|
15468
15823
|
case 'selectSimple':
|
|
15469
|
-
return /*#__PURE__*/jsx(
|
|
15824
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$w(_objectSpread$w({}, item), {}, {
|
|
15470
15825
|
disabled: disabled,
|
|
15471
15826
|
onChange: function onChange(value) {
|
|
15472
|
-
_onChange(
|
|
15827
|
+
_onChange(name, value);
|
|
15473
15828
|
}
|
|
15474
15829
|
}));
|
|
15475
15830
|
case 'textarea':
|
|
@@ -15482,7 +15837,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15482
15837
|
defaultValue: item.value,
|
|
15483
15838
|
placeholder: item.placeholder,
|
|
15484
15839
|
onChange: function onChange(e) {
|
|
15485
|
-
return _onChange === null || _onChange === void 0 ? void 0 : _onChange(
|
|
15840
|
+
return _onChange === null || _onChange === void 0 ? void 0 : _onChange(name, e.target.value);
|
|
15486
15841
|
}
|
|
15487
15842
|
});
|
|
15488
15843
|
case 'input':
|
|
@@ -15547,6 +15902,12 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15547
15902
|
disabled: disabled,
|
|
15548
15903
|
children: item.label
|
|
15549
15904
|
});
|
|
15905
|
+
case 'richText':
|
|
15906
|
+
return /*#__PURE__*/jsx(RichTextEditor, {
|
|
15907
|
+
initValue: state.getData(name, data),
|
|
15908
|
+
name: name,
|
|
15909
|
+
onChange: _onChange
|
|
15910
|
+
});
|
|
15550
15911
|
case 'number':
|
|
15551
15912
|
return /*#__PURE__*/jsx(InputNumber, {
|
|
15552
15913
|
disabled: disabled,
|
|
@@ -15562,13 +15923,17 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15562
15923
|
if (value && cbItem !== null && cbItem !== void 0 && cbItem.valueOnEnabled) {
|
|
15563
15924
|
value = root === null || root === void 0 ? void 0 : root.getGlobalValue(cbItem.valueOnEnabled.globalValue);
|
|
15564
15925
|
}
|
|
15565
|
-
_onChange(
|
|
15926
|
+
_onChange(name, value);
|
|
15566
15927
|
}
|
|
15567
15928
|
});
|
|
15568
15929
|
case 'display':
|
|
15569
15930
|
return /*#__PURE__*/jsx(DisplayInput, {
|
|
15570
15931
|
translationPrefix: item.translationPrefix
|
|
15571
15932
|
});
|
|
15933
|
+
case 'array':
|
|
15934
|
+
return /*#__PURE__*/jsx(FormList, {
|
|
15935
|
+
item: item
|
|
15936
|
+
});
|
|
15572
15937
|
case 'object':
|
|
15573
15938
|
return /*#__PURE__*/jsx(JsonEditor$2, {
|
|
15574
15939
|
setCanSave: setCanSave,
|
|
@@ -15602,16 +15967,16 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15602
15967
|
if (item.accountName) {
|
|
15603
15968
|
var newData = state.onInputChanged(item.accountName, supplier === null || supplier === void 0 ? void 0 : supplier._id);
|
|
15604
15969
|
if (!supplier) {
|
|
15605
|
-
newData = state.onInputChanged(
|
|
15970
|
+
newData = state.onInputChanged(name, undefined, newData);
|
|
15606
15971
|
if (item.catalogCodex) state.onInputChanged(item.catalogCodex, undefined, newData);
|
|
15607
15972
|
}
|
|
15608
15973
|
}
|
|
15609
15974
|
},
|
|
15610
15975
|
initAccountId: item.accountName ? state.getData(item.accountName, data) : undefined,
|
|
15611
|
-
initCatalogId: state.getData(
|
|
15976
|
+
initCatalogId: state.getData(name, data),
|
|
15612
15977
|
currentOrganizationId: root === null || root === void 0 ? void 0 : root.dataStore.selectedOrganizationId,
|
|
15613
15978
|
onSelectedCatalog: function onSelectedCatalog(catalogItem) {
|
|
15614
|
-
var newData = state.onInputChanged(
|
|
15979
|
+
var newData = state.onInputChanged(name, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem._id);
|
|
15615
15980
|
if (item.catalogCodex) state.onInputChanged(item.catalogCodex, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex, newData);
|
|
15616
15981
|
},
|
|
15617
15982
|
onError: function onError(text) {
|
|
@@ -15625,7 +15990,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15625
15990
|
value: item.value,
|
|
15626
15991
|
options: item.options.map(function (o) {
|
|
15627
15992
|
var _o$disabled;
|
|
15628
|
-
return _objectSpread$
|
|
15993
|
+
return _objectSpread$w(_objectSpread$w({}, o), {}, {
|
|
15629
15994
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, data)
|
|
15630
15995
|
});
|
|
15631
15996
|
}),
|
|
@@ -15634,7 +15999,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15634
15999
|
defaultValue: item.defaultValue,
|
|
15635
16000
|
onChange: function onChange(_ref7) {
|
|
15636
16001
|
var value = _ref7.target.value;
|
|
15637
|
-
_onChange(
|
|
16002
|
+
_onChange(name, value);
|
|
15638
16003
|
}
|
|
15639
16004
|
});
|
|
15640
16005
|
case 'button':
|
|
@@ -15687,7 +16052,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15687
16052
|
}, state.configuration.itemSelector.name.toString()), (_state$selectedItems2 = state.selectedItems) === null || _state$selectedItems2 === void 0 ? void 0 : _state$selectedItems2.map(function (item) {
|
|
15688
16053
|
var _state$hiddenRequired3, _state$hiddenRequired4, _state$hiddenRequired5;
|
|
15689
16054
|
return /*#__PURE__*/jsxs("div", {
|
|
15690
|
-
children: [item.marker && /*#__PURE__*/jsx(InfoCircleOutlined, {}), item.type
|
|
16055
|
+
children: [item.marker && /*#__PURE__*/jsx(InfoCircleOutlined, {}), ['subTitle', 'array'].includes(item.type) ? getElement(item, state.data, setCanSave, state, state.onInputChanged, undefined, undefined, (_state$hiddenRequired3 = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired3 === void 0 ? void 0 : _state$hiddenRequired3.hidden) : /*#__PURE__*/jsx(Form$1.Item, {
|
|
15691
16056
|
name: item.name,
|
|
15692
16057
|
rules: getRules(item, state.data),
|
|
15693
16058
|
label: getLabel(item),
|
|
@@ -15703,6 +16068,67 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15703
16068
|
})]
|
|
15704
16069
|
})]
|
|
15705
16070
|
});
|
|
16071
|
+
function FormList(_ref8) {
|
|
16072
|
+
var item = _ref8.item;
|
|
16073
|
+
return /*#__PURE__*/jsx(Form$1.List, {
|
|
16074
|
+
name: item.name,
|
|
16075
|
+
initialValue: item.initialValue,
|
|
16076
|
+
children: function children(fields, _ref9) {
|
|
16077
|
+
var add = _ref9.add,
|
|
16078
|
+
remove = _ref9.remove;
|
|
16079
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
16080
|
+
children: [fields.map(function (_ref10) {
|
|
16081
|
+
var key = _ref10.key,
|
|
16082
|
+
name = _ref10.name;
|
|
16083
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
16084
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
16085
|
+
style: {
|
|
16086
|
+
display: 'flex'
|
|
16087
|
+
},
|
|
16088
|
+
children: [/*#__PURE__*/jsx(MinusCircleOutlined, {
|
|
16089
|
+
onClick: function onClick() {
|
|
16090
|
+
return remove(name);
|
|
16091
|
+
}
|
|
16092
|
+
}), /*#__PURE__*/jsx("div", {
|
|
16093
|
+
style: {
|
|
16094
|
+
flexGrow: 1
|
|
16095
|
+
},
|
|
16096
|
+
children: item.items.map(function (i) {
|
|
16097
|
+
var _state$hiddenRequired6, _state$hiddenRequired7;
|
|
16098
|
+
var n = [name].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]));
|
|
16099
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
16100
|
+
children: /*#__PURE__*/jsx(Form$1.Item, {
|
|
16101
|
+
name: n,
|
|
16102
|
+
rules: getRules(i, state.data),
|
|
16103
|
+
label: getLabel(i),
|
|
16104
|
+
valuePropName: i.type == 'checkbox' ? 'checked' : 'value',
|
|
16105
|
+
initialValue: i === null || i === void 0 ? void 0 : i.defaultValue,
|
|
16106
|
+
hasFeedback: !!state.fieldErrors[n.toString()],
|
|
16107
|
+
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
16108
|
+
help: state.fieldErrors[n.toString()],
|
|
16109
|
+
hidden: ((_state$hiddenRequired6 = state.hiddenRequiredDisabled[typeof n == 'string' ? n : n.join('.')]) === null || _state$hiddenRequired6 === void 0 ? void 0 : _state$hiddenRequired6.hidden) || !!i.hidden,
|
|
16110
|
+
children: getElement(i, state.data, setCanSave, state, state.onInputChanged, root, form, ((_state$hiddenRequired7 = state.hiddenRequiredDisabled[typeof n == 'string' ? n : n.join('.')]) === null || _state$hiddenRequired7 === void 0 ? void 0 : _state$hiddenRequired7.hidden) || !!i.hidden, [].concat(_toConsumableArray(item.name), _toConsumableArray(Array.isArray(n) ? n : [n])))
|
|
16111
|
+
}, key)
|
|
16112
|
+
});
|
|
16113
|
+
})
|
|
16114
|
+
})]
|
|
16115
|
+
})
|
|
16116
|
+
});
|
|
16117
|
+
}), /*#__PURE__*/jsx(Form$1.Item, {
|
|
16118
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
16119
|
+
type: "dashed",
|
|
16120
|
+
onClick: function onClick() {
|
|
16121
|
+
return add();
|
|
16122
|
+
},
|
|
16123
|
+
block: true,
|
|
16124
|
+
icon: /*#__PURE__*/jsx(PlusOutlined, {}),
|
|
16125
|
+
children: t('backoffice.add_field')
|
|
16126
|
+
})
|
|
16127
|
+
})]
|
|
16128
|
+
});
|
|
16129
|
+
}
|
|
16130
|
+
});
|
|
16131
|
+
}
|
|
15706
16132
|
};
|
|
15707
16133
|
var Form = observer(FormWrapper$1, {
|
|
15708
16134
|
forwardRef: true
|
|
@@ -15710,7 +16136,7 @@ var Form = observer(FormWrapper$1, {
|
|
|
15710
16136
|
function DisplayInput(props) {
|
|
15711
16137
|
var _useTranslation2 = useTranslation(),
|
|
15712
16138
|
t = _useTranslation2.t;
|
|
15713
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
16139
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$w(_objectSpread$w({}, props), {}, {
|
|
15714
16140
|
disabled: true,
|
|
15715
16141
|
value: t(props.translationPrefix + '.' + props.value)
|
|
15716
16142
|
}));
|
|
@@ -15728,8 +16154,8 @@ function isReadonly(item, data) {
|
|
|
15728
16154
|
return false;
|
|
15729
16155
|
}
|
|
15730
16156
|
|
|
15731
|
-
function ownKeys$
|
|
15732
|
-
function _objectSpread$
|
|
16157
|
+
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; }
|
|
16158
|
+
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; }
|
|
15733
16159
|
function useGridData (_ref) {
|
|
15734
16160
|
var id = _ref.id,
|
|
15735
16161
|
data = _ref.data;
|
|
@@ -15772,11 +16198,11 @@ function useGridData (_ref) {
|
|
|
15772
16198
|
function reducer(state, action) {
|
|
15773
16199
|
switch (action.type) {
|
|
15774
16200
|
case 'update':
|
|
15775
|
-
return _objectSpread$
|
|
16201
|
+
return _objectSpread$v(_objectSpread$v({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$v(_objectSpread$v({}, action.data), {}, {
|
|
15776
16202
|
buffer: Buffer.from(action.data.buffer)
|
|
15777
16203
|
})));
|
|
15778
16204
|
case 'delete':
|
|
15779
|
-
var newState = _objectSpread$
|
|
16205
|
+
var newState = _objectSpread$v({}, state);
|
|
15780
16206
|
delete newState[action.data.divaNr];
|
|
15781
16207
|
return newState;
|
|
15782
16208
|
default:
|
|
@@ -15861,8 +16287,8 @@ var Grid = function Grid(_ref) {
|
|
|
15861
16287
|
});
|
|
15862
16288
|
};
|
|
15863
16289
|
|
|
15864
|
-
function ownKeys$
|
|
15865
|
-
function _objectSpread$
|
|
16290
|
+
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; }
|
|
16291
|
+
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; }
|
|
15866
16292
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
15867
16293
|
var id = _ref.id;
|
|
15868
16294
|
var root = useStore();
|
|
@@ -15981,7 +16407,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
15981
16407
|
onRemove: onRemove,
|
|
15982
16408
|
customRequest: customRequest,
|
|
15983
16409
|
fileList: fileList.map(function (f) {
|
|
15984
|
-
return _objectSpread$
|
|
16410
|
+
return _objectSpread$u(_objectSpread$u({}, f), {}, {
|
|
15985
16411
|
url: f.url
|
|
15986
16412
|
});
|
|
15987
16413
|
}),
|
|
@@ -16025,15 +16451,15 @@ var MediaUpload = observer(function (_ref) {
|
|
|
16025
16451
|
onRemove: onRemove,
|
|
16026
16452
|
fileList: fileList,
|
|
16027
16453
|
customRequest: customRequest,
|
|
16028
|
-
children: fileList.length == 0 ? /*#__PURE__*/jsx(PlusOutlined, {}) : undefined
|
|
16454
|
+
children: fileList.length == 0 ? /*#__PURE__*/jsx(PlusOutlined$1, {}) : undefined
|
|
16029
16455
|
})
|
|
16030
16456
|
})
|
|
16031
16457
|
})]
|
|
16032
16458
|
});
|
|
16033
16459
|
});
|
|
16034
16460
|
|
|
16035
|
-
function ownKeys$
|
|
16036
|
-
function _objectSpread$
|
|
16461
|
+
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; }
|
|
16462
|
+
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; }
|
|
16037
16463
|
function useFormListData (_ref) {
|
|
16038
16464
|
var _configuration$defaul;
|
|
16039
16465
|
var id = _ref.id,
|
|
@@ -16113,7 +16539,7 @@ function useFormListData (_ref) {
|
|
|
16113
16539
|
if (updated.length == state.length) {
|
|
16114
16540
|
newState = state.map(function (s, i) {
|
|
16115
16541
|
var _updated$find;
|
|
16116
|
-
return _objectSpread$
|
|
16542
|
+
return _objectSpread$t(_objectSpread$t({}, s), {}, {
|
|
16117
16543
|
data: (_updated$find = updated.find(function (u) {
|
|
16118
16544
|
return u.index == i;
|
|
16119
16545
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -16240,7 +16666,7 @@ var FormList = function FormList(_ref, ref) {
|
|
|
16240
16666
|
type: "dashed",
|
|
16241
16667
|
onClick: state.add,
|
|
16242
16668
|
block: true,
|
|
16243
|
-
icon: /*#__PURE__*/jsx(PlusOutlined, {}),
|
|
16669
|
+
icon: /*#__PURE__*/jsx(PlusOutlined$1, {}),
|
|
16244
16670
|
children: t('backoffice.FormList.add')
|
|
16245
16671
|
})
|
|
16246
16672
|
})]
|
|
@@ -16252,8 +16678,8 @@ var FormList$1 = observer(FormList, {
|
|
|
16252
16678
|
forwardRef: true
|
|
16253
16679
|
});
|
|
16254
16680
|
|
|
16255
|
-
function ownKeys$
|
|
16256
|
-
function _objectSpread$
|
|
16681
|
+
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; }
|
|
16682
|
+
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; }
|
|
16257
16683
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
16258
16684
|
function useSelectOrCreateData (_ref) {
|
|
16259
16685
|
var id = _ref.id,
|
|
@@ -16347,7 +16773,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
16347
16773
|
_context.next = 7;
|
|
16348
16774
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
16349
16775
|
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) {
|
|
16350
|
-
return _objectSpread$
|
|
16776
|
+
return _objectSpread$s(_objectSpread$s({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
16351
16777
|
}, {}) : {
|
|
16352
16778
|
_id: [value, 'contains']
|
|
16353
16779
|
},
|
|
@@ -16575,7 +17001,7 @@ var FormWrapper = function FormWrapper(_ref, ref) {
|
|
|
16575
17001
|
span: 4
|
|
16576
17002
|
}), /*#__PURE__*/jsx(Col, {
|
|
16577
17003
|
span: 20,
|
|
16578
|
-
children: /*#__PURE__*/jsx(Select$
|
|
17004
|
+
children: /*#__PURE__*/jsx(Select$1, {
|
|
16579
17005
|
style: {
|
|
16580
17006
|
width: '100%'
|
|
16581
17007
|
},
|
|
@@ -16633,7 +17059,7 @@ var Single = function Single(_ref2) {
|
|
|
16633
17059
|
return state.onChange();
|
|
16634
17060
|
},
|
|
16635
17061
|
block: true,
|
|
16636
|
-
icon: /*#__PURE__*/jsx(PlusOutlined, {}),
|
|
17062
|
+
icon: /*#__PURE__*/jsx(PlusOutlined$1, {}),
|
|
16637
17063
|
children: t('backoffice.table.emailtemplates.createAction.title')
|
|
16638
17064
|
})
|
|
16639
17065
|
})]
|
|
@@ -16660,8 +17086,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
16660
17086
|
});
|
|
16661
17087
|
};
|
|
16662
17088
|
|
|
16663
|
-
function ownKeys$
|
|
16664
|
-
function _objectSpread$
|
|
17089
|
+
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; }
|
|
17090
|
+
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; }
|
|
16665
17091
|
function useProcess (_ref) {
|
|
16666
17092
|
var id = _ref.id;
|
|
16667
17093
|
var root = useStore();
|
|
@@ -16699,7 +17125,7 @@ function useProcess (_ref) {
|
|
|
16699
17125
|
while (1) switch (_context.prev = _context.next) {
|
|
16700
17126
|
case 0:
|
|
16701
17127
|
newState = _toConsumableArray(state);
|
|
16702
|
-
currentStep = _objectSpread$
|
|
17128
|
+
currentStep = _objectSpread$r({}, newState[index]);
|
|
16703
17129
|
currentStep.data = data;
|
|
16704
17130
|
newState.splice(index, 1, currentStep);
|
|
16705
17131
|
setState(newState);
|
|
@@ -16788,7 +17214,7 @@ function _saveData() {
|
|
|
16788
17214
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
16789
17215
|
while (1) switch (_context3.prev = _context3.next) {
|
|
16790
17216
|
case 0:
|
|
16791
|
-
newState = _objectSpread$
|
|
17217
|
+
newState = _objectSpread$r({}, stepState); // we have to merge the mapping data of all steps into one object,
|
|
16792
17218
|
//so we have to modify the mappingData as well as the mapping specification
|
|
16793
17219
|
sourcData = {};
|
|
16794
17220
|
(_stepState$step$mappi = stepState.step.mapping) === null || _stepState$step$mappi === void 0 || _stepState$step$mappi.map.forEach(function (map) {
|
|
@@ -16804,7 +17230,7 @@ function _saveData() {
|
|
|
16804
17230
|
});
|
|
16805
17231
|
newMapping = undefined;
|
|
16806
17232
|
if (stepState.step.mapping) {
|
|
16807
|
-
newMapping = _objectSpread$
|
|
17233
|
+
newMapping = _objectSpread$r(_objectSpread$r({}, stepState.step.mapping), {}, {
|
|
16808
17234
|
map: stepState.step.mapping.map.map(function (m) {
|
|
16809
17235
|
return {
|
|
16810
17236
|
targetField: m.targetField,
|
|
@@ -16878,7 +17304,7 @@ var Process = function Process(_ref) {
|
|
|
16878
17304
|
maxWidth: 1000,
|
|
16879
17305
|
margin: 'auto'
|
|
16880
17306
|
},
|
|
16881
|
-
children: [state.current < state.steps.length && /*#__PURE__*/jsx(Content$
|
|
17307
|
+
children: [state.current < state.steps.length && /*#__PURE__*/jsx(Content$2, {
|
|
16882
17308
|
type: state.steps[state.current].step.type,
|
|
16883
17309
|
id: state.steps[state.current].step.id,
|
|
16884
17310
|
ref: ref,
|
|
@@ -16920,7 +17346,7 @@ var Process = function Process(_ref) {
|
|
|
16920
17346
|
});
|
|
16921
17347
|
};
|
|
16922
17348
|
var Process$1 = observer(Process);
|
|
16923
|
-
var Content$
|
|
17349
|
+
var Content$2 = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
16924
17350
|
var type = _ref2.type,
|
|
16925
17351
|
onChange = _ref2.onChange,
|
|
16926
17352
|
data = _ref2.data,
|
|
@@ -17038,9 +17464,9 @@ function BooleanCell (_ref) {
|
|
|
17038
17464
|
}
|
|
17039
17465
|
}
|
|
17040
17466
|
|
|
17041
|
-
function _createForOfIteratorHelper$b(
|
|
17042
|
-
function _unsupportedIterableToArray$b(
|
|
17043
|
-
function _arrayLikeToArray$b(
|
|
17467
|
+
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; } } }; }
|
|
17468
|
+
function _unsupportedIterableToArray$b(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$b(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$b(r, a) : void 0; } }
|
|
17469
|
+
function _arrayLikeToArray$b(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; }
|
|
17044
17470
|
function StringCell (_ref) {
|
|
17045
17471
|
var children = _ref.children,
|
|
17046
17472
|
column = _ref.column,
|
|
@@ -17298,7 +17724,7 @@ function DropdownCell (_ref) {
|
|
|
17298
17724
|
noStyle: true,
|
|
17299
17725
|
name: dataIndex,
|
|
17300
17726
|
initialValue: column.translationPrefix ? t(column.translationPrefix + '.' + children[1]) : children,
|
|
17301
|
-
children: /*#__PURE__*/jsx(Select$
|
|
17727
|
+
children: /*#__PURE__*/jsx(Select$1, {
|
|
17302
17728
|
style: {
|
|
17303
17729
|
width: column.width - 20
|
|
17304
17730
|
},
|
|
@@ -17329,9 +17755,9 @@ function DropdownCell (_ref) {
|
|
|
17329
17755
|
}
|
|
17330
17756
|
}
|
|
17331
17757
|
|
|
17332
|
-
function _createForOfIteratorHelper$a(
|
|
17333
|
-
function _unsupportedIterableToArray$a(
|
|
17334
|
-
function _arrayLikeToArray$a(
|
|
17758
|
+
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; } } }; }
|
|
17759
|
+
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; } }
|
|
17760
|
+
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; }
|
|
17335
17761
|
if (!window.customElements.get('model-viewer')) {
|
|
17336
17762
|
import('@google/model-viewer');
|
|
17337
17763
|
}
|
|
@@ -17659,6 +18085,11 @@ var MenuWrapper = function MenuWrapper() {
|
|
|
17659
18085
|
theme = _root$contentStore.theme;
|
|
17660
18086
|
return /*#__PURE__*/jsxs(Layout.Sider, {
|
|
17661
18087
|
className: sideBar,
|
|
18088
|
+
collapsible: true,
|
|
18089
|
+
collapsed: root.contentStore.menuCollapsed,
|
|
18090
|
+
onCollapse: function onCollapse(value) {
|
|
18091
|
+
return root.contentStore.menuCollapsed = value;
|
|
18092
|
+
},
|
|
17662
18093
|
children: [/*#__PURE__*/jsx("div", {
|
|
17663
18094
|
className: wrapper,
|
|
17664
18095
|
children: /*#__PURE__*/jsx(Switch, {
|
|
@@ -17842,9 +18273,9 @@ function getIcon(icon) {
|
|
|
17842
18273
|
return undefined;
|
|
17843
18274
|
}
|
|
17844
18275
|
|
|
17845
|
-
function _createForOfIteratorHelper$9(
|
|
17846
|
-
function _unsupportedIterableToArray$9(
|
|
17847
|
-
function _arrayLikeToArray$9(
|
|
18276
|
+
function _createForOfIteratorHelper$9(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$9(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; } } }; }
|
|
18277
|
+
function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$9(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$9(r, a) : void 0; } }
|
|
18278
|
+
function _arrayLikeToArray$9(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; }
|
|
17848
18279
|
function IconCell (_ref) {
|
|
17849
18280
|
var children = _ref.children,
|
|
17850
18281
|
column = _ref.column;
|
|
@@ -17884,9 +18315,9 @@ function IconCell (_ref) {
|
|
|
17884
18315
|
|
|
17885
18316
|
var _excluded$1 = ["index"],
|
|
17886
18317
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
17887
|
-
function ownKeys$
|
|
17888
|
-
function _objectSpread$
|
|
17889
|
-
var LOG$5 = getLogger('Backoffice', 'CellRenderer');
|
|
18318
|
+
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; }
|
|
18319
|
+
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; }
|
|
18320
|
+
var LOG$5 = getLogger('Backoffice', 'CellRenderer');
|
|
17890
18321
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
17891
18322
|
var CustomRow = function CustomRow(_ref) {
|
|
17892
18323
|
_ref.index;
|
|
@@ -17899,7 +18330,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
17899
18330
|
component: false,
|
|
17900
18331
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
17901
18332
|
value: form,
|
|
17902
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
18333
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$q({}, props))
|
|
17903
18334
|
})
|
|
17904
18335
|
});
|
|
17905
18336
|
};
|
|
@@ -17947,7 +18378,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
17947
18378
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
17948
18379
|
longDescriptionType = 'text';
|
|
17949
18380
|
}
|
|
17950
|
-
var modifiedColumn = _objectSpread$
|
|
18381
|
+
var modifiedColumn = _objectSpread$q(_objectSpread$q({}, column), {}, {
|
|
17951
18382
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
17952
18383
|
});
|
|
17953
18384
|
if (column) {
|
|
@@ -17960,34 +18391,34 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
17960
18391
|
};
|
|
17961
18392
|
switch (modifiedColumn.type) {
|
|
17962
18393
|
case 'boolean':
|
|
17963
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
18394
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$q({}, cellProps));
|
|
17964
18395
|
break;
|
|
17965
18396
|
case 'text':
|
|
17966
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
18397
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$q({}, cellProps));
|
|
17967
18398
|
break;
|
|
17968
18399
|
case 'select':
|
|
17969
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
18400
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$q({}, cellProps));
|
|
17970
18401
|
case 'media':
|
|
17971
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
18402
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$q({}, cellProps));
|
|
17972
18403
|
break;
|
|
17973
18404
|
case 'mediaItem':
|
|
17974
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
18405
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$q({}, cellProps));
|
|
17975
18406
|
break;
|
|
17976
18407
|
case 'unixTimeStamp':
|
|
17977
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
18408
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$q({}, cellProps));
|
|
17978
18409
|
break;
|
|
17979
18410
|
case 'unixTimeStampCheck':
|
|
17980
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
18411
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$q({}, cellProps));
|
|
17981
18412
|
break;
|
|
17982
18413
|
case 'icon':
|
|
17983
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
18414
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$q({}, cellProps));
|
|
17984
18415
|
break;
|
|
17985
18416
|
default:
|
|
17986
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
18417
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$q({}, cellProps));
|
|
17987
18418
|
break;
|
|
17988
18419
|
}
|
|
17989
18420
|
}
|
|
17990
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
18421
|
+
return /*#__PURE__*/jsx("td", _objectSpread$q(_objectSpread$q({}, restProps), {}, {
|
|
17991
18422
|
children: childNode
|
|
17992
18423
|
}));
|
|
17993
18424
|
};
|
|
@@ -18322,7 +18753,9 @@ function AGHistogram (_ref) {
|
|
|
18322
18753
|
var SMChart = function SMChart(props) {
|
|
18323
18754
|
var _useDivaCore = useDivaCore(),
|
|
18324
18755
|
userHasPermission = _useDivaCore.actions.userHasPermission;
|
|
18756
|
+
var root = useStore();
|
|
18325
18757
|
var hasPermission = userHasPermission(props.permission);
|
|
18758
|
+
var darkmode = root.contentStore.theme === 'darkmode';
|
|
18326
18759
|
return hasPermission ? /*#__PURE__*/jsx(Histogram, {
|
|
18327
18760
|
field: props.field,
|
|
18328
18761
|
interval: props.interval,
|
|
@@ -18333,22 +18766,23 @@ var SMChart = function SMChart(props) {
|
|
|
18333
18766
|
description: props.description,
|
|
18334
18767
|
title: props.title,
|
|
18335
18768
|
apiTranslation: props.apiTranslation,
|
|
18336
|
-
component: props.component
|
|
18769
|
+
component: props.component,
|
|
18770
|
+
darkmode: darkmode
|
|
18337
18771
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
18338
18772
|
};
|
|
18339
18773
|
|
|
18340
|
-
function ownKeys$
|
|
18341
|
-
function _objectSpread$
|
|
18342
|
-
function _createForOfIteratorHelper$8(
|
|
18343
|
-
function _unsupportedIterableToArray$8(
|
|
18344
|
-
function _arrayLikeToArray$8(
|
|
18774
|
+
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; }
|
|
18775
|
+
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; }
|
|
18776
|
+
function _createForOfIteratorHelper$8(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$8(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; } } }; }
|
|
18777
|
+
function _unsupportedIterableToArray$8(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$8(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$8(r, a) : void 0; } }
|
|
18778
|
+
function _arrayLikeToArray$8(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; }
|
|
18345
18779
|
dayjs.extend(customParseFormat);
|
|
18346
18780
|
dayjs.extend(advancedFormat);
|
|
18347
18781
|
dayjs.extend(weekday);
|
|
18348
18782
|
dayjs.extend(localeData);
|
|
18349
18783
|
dayjs.extend(weekOfYear);
|
|
18350
18784
|
dayjs.extend(weekYear);
|
|
18351
|
-
Select$
|
|
18785
|
+
Select$1.Option;
|
|
18352
18786
|
var LOG$4 = getLogger('Backoffice', 'BaseTable');
|
|
18353
18787
|
var TableWrapper = function TableWrapper(_ref) {
|
|
18354
18788
|
var _state$configuration$, _state$configuration$2, _state$configuration$3, _state$configuration$4, _state$configuration$5, _state$configuration$6, _state$globalFilter, _state$globalFilter2, _state$globalFilter3, _state$globalFilter4, _state$configuration$7, _state$configuration$8, _state$globalFilter$s, _state$configuration$9, _state$configuration$10, _state$configuration$13;
|
|
@@ -18499,7 +18933,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18499
18933
|
// Convert to Dayjs
|
|
18500
18934
|
(_state$globalFilter3 = state.globalFilter) !== null && _state$globalFilter3 !== void 0 && (_state$globalFilter3 = _state$globalFilter3.timeStamp) !== null && _state$globalFilter3 !== void 0 && (_state$globalFilter3 = _state$globalFilter3['toTimeStamp']) !== null && _state$globalFilter3 !== void 0 && _state$globalFilter3[0] ? dayjs((_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 ? void 0 : _state$globalFilter4[0]) : dayjs(new Date()) // Convert to Dayjs
|
|
18501
18935
|
]
|
|
18502
|
-
}), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(
|
|
18936
|
+
}), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$p(_objectSpread$p({}, (_state$configuration$8 = state.configuration.filter) === null || _state$configuration$8 === void 0 ? void 0 : _state$configuration$8.select.settings), {}, {
|
|
18503
18937
|
style: {
|
|
18504
18938
|
minWidth: '200px'
|
|
18505
18939
|
},
|
|
@@ -18596,7 +19030,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18596
19030
|
},
|
|
18597
19031
|
dataSource: data,
|
|
18598
19032
|
loading: state.loading,
|
|
18599
|
-
pagination: _objectSpread$
|
|
19033
|
+
pagination: _objectSpread$p(_objectSpread$p({}, state.pagination), {}, {
|
|
18600
19034
|
showTotal: function showTotal(total, range) {
|
|
18601
19035
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
18602
19036
|
},
|
|
@@ -18896,7 +19330,7 @@ function BulkAction(_ref6) {
|
|
|
18896
19330
|
}
|
|
18897
19331
|
_context4.t0 = data;
|
|
18898
19332
|
_context4.next = 10;
|
|
18899
|
-
return apiInterface.update(_objectSpread$
|
|
19333
|
+
return apiInterface.update(_objectSpread$p(_objectSpread$p({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
18900
19334
|
case 10:
|
|
18901
19335
|
_context4.t1 = _context4.sent;
|
|
18902
19336
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -18993,8 +19427,8 @@ function SelectionText(_ref8) {
|
|
|
18993
19427
|
});
|
|
18994
19428
|
}
|
|
18995
19429
|
|
|
18996
|
-
function ownKeys$
|
|
18997
|
-
function _objectSpread$
|
|
19430
|
+
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; }
|
|
19431
|
+
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; }
|
|
18998
19432
|
function getColumnFilterProps (_ref) {
|
|
18999
19433
|
var filter = _ref.filter,
|
|
19000
19434
|
title = _ref.title;
|
|
@@ -19166,7 +19600,7 @@ var advancedProps = function advancedProps(title) {
|
|
|
19166
19600
|
},
|
|
19167
19601
|
children: /*#__PURE__*/jsxs(Space, {
|
|
19168
19602
|
direction: "vertical",
|
|
19169
|
-
children: [/*#__PURE__*/jsxs(Select$
|
|
19603
|
+
children: [/*#__PURE__*/jsxs(Select$1, {
|
|
19170
19604
|
defaultValue: "contains",
|
|
19171
19605
|
style: {
|
|
19172
19606
|
width: 188,
|
|
@@ -19175,28 +19609,28 @@ var advancedProps = function advancedProps(title) {
|
|
|
19175
19609
|
onSelect: function onSelect(value) {
|
|
19176
19610
|
setSelectedKeys([selectedKeys[0], value]);
|
|
19177
19611
|
},
|
|
19178
|
-
children: [/*#__PURE__*/jsx(Select$
|
|
19612
|
+
children: [/*#__PURE__*/jsx(Select$1.Option, {
|
|
19179
19613
|
value: "eq",
|
|
19180
19614
|
children: "Ist equivalent zu"
|
|
19181
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19615
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19182
19616
|
value: "ne",
|
|
19183
19617
|
children: "Ist nicht equivalent zu"
|
|
19184
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19618
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19185
19619
|
value: "contains",
|
|
19186
19620
|
children: "Enth\xE4lt"
|
|
19187
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19621
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19188
19622
|
value: "doesnotcontain",
|
|
19189
19623
|
children: "Enth\xE4lt nicht"
|
|
19190
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19624
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19191
19625
|
value: "startswith",
|
|
19192
19626
|
children: "Beginnt mit"
|
|
19193
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19627
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19194
19628
|
value: "endswith",
|
|
19195
19629
|
children: "Endet mit"
|
|
19196
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19630
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19197
19631
|
value: "isnull",
|
|
19198
19632
|
children: "Ist Null"
|
|
19199
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19633
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19200
19634
|
value: "isnotnull",
|
|
19201
19635
|
children: "Ist nicht Null"
|
|
19202
19636
|
})]
|
|
@@ -19343,7 +19777,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
19343
19777
|
},
|
|
19344
19778
|
children: /*#__PURE__*/jsxs(Space, {
|
|
19345
19779
|
direction: "vertical",
|
|
19346
|
-
children: [/*#__PURE__*/jsx(Select$
|
|
19780
|
+
children: [/*#__PURE__*/jsx(Select$1, {
|
|
19347
19781
|
placeholder: "Filter ".concat(title),
|
|
19348
19782
|
value: selectedKeys[0],
|
|
19349
19783
|
style: {
|
|
@@ -19357,7 +19791,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
19357
19791
|
});
|
|
19358
19792
|
},
|
|
19359
19793
|
options: filter.map(function (f) {
|
|
19360
|
-
return _objectSpread$
|
|
19794
|
+
return _objectSpread$o(_objectSpread$o({}, f), {}, {
|
|
19361
19795
|
label: t(f.label)
|
|
19362
19796
|
});
|
|
19363
19797
|
})
|
|
@@ -19406,7 +19840,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
19406
19840
|
setDisplaySelectedvalues = _useState4[1];
|
|
19407
19841
|
var options = [];
|
|
19408
19842
|
options = filter.map(function (f) {
|
|
19409
|
-
return _objectSpread$
|
|
19843
|
+
return _objectSpread$o(_objectSpread$o({}, f), {}, {
|
|
19410
19844
|
label: t(f.label)
|
|
19411
19845
|
});
|
|
19412
19846
|
});
|
|
@@ -19438,7 +19872,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
19438
19872
|
},
|
|
19439
19873
|
children: [/*#__PURE__*/jsx(Space, {
|
|
19440
19874
|
direction: "vertical",
|
|
19441
|
-
children: /*#__PURE__*/jsx(Select$
|
|
19875
|
+
children: /*#__PURE__*/jsx(Select$1, {
|
|
19442
19876
|
mode: "multiple",
|
|
19443
19877
|
allowClear: true,
|
|
19444
19878
|
value: displayselectedValues,
|
|
@@ -19480,8 +19914,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
19480
19914
|
};
|
|
19481
19915
|
};
|
|
19482
19916
|
|
|
19483
|
-
function ownKeys$
|
|
19484
|
-
function _objectSpread$
|
|
19917
|
+
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; }
|
|
19918
|
+
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; }
|
|
19485
19919
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
19486
19920
|
var columns = configuration.columns.filter(function (c) {
|
|
19487
19921
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -19532,7 +19966,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
19532
19966
|
}
|
|
19533
19967
|
function mapColumn(column, onUpdate) {
|
|
19534
19968
|
var _column$field, _column$children;
|
|
19535
|
-
return _objectSpread$
|
|
19969
|
+
return _objectSpread$n(_objectSpread$n(_objectSpread$n({}, column), {}, {
|
|
19536
19970
|
width: column.width || 100,
|
|
19537
19971
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
19538
19972
|
key: column.field || column.title,
|
|
@@ -19581,8 +20015,8 @@ function updateData (_ref) {
|
|
|
19581
20015
|
};
|
|
19582
20016
|
}
|
|
19583
20017
|
|
|
19584
|
-
function ownKeys$
|
|
19585
|
-
function _objectSpread$
|
|
20018
|
+
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; }
|
|
20019
|
+
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; }
|
|
19586
20020
|
function aplyFilterAndSortation (_ref) {
|
|
19587
20021
|
var data = _ref.data,
|
|
19588
20022
|
filters = _ref.filters,
|
|
@@ -19597,7 +20031,7 @@ function aplyFilterAndSortation (_ref) {
|
|
|
19597
20031
|
processedData = sort(sorter || [], processedData);
|
|
19598
20032
|
return {
|
|
19599
20033
|
data: processedData,
|
|
19600
|
-
pagination: _objectSpread$
|
|
20034
|
+
pagination: _objectSpread$m(_objectSpread$m({}, pagination), {}, {
|
|
19601
20035
|
total: processedData.length
|
|
19602
20036
|
})
|
|
19603
20037
|
};
|
|
@@ -19682,8 +20116,8 @@ function filter$1(f, data) {
|
|
|
19682
20116
|
}
|
|
19683
20117
|
|
|
19684
20118
|
var _excluded = ["_id"];
|
|
19685
|
-
function ownKeys$
|
|
19686
|
-
function _objectSpread$
|
|
20119
|
+
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; }
|
|
20120
|
+
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; }
|
|
19687
20121
|
function useTableData$1 (_ref) {
|
|
19688
20122
|
var _configuration$apiInt;
|
|
19689
20123
|
var id = _ref.id;
|
|
@@ -19738,7 +20172,7 @@ function useTableData$1 (_ref) {
|
|
|
19738
20172
|
var _configuration$create;
|
|
19739
20173
|
if (!dataRow) return;
|
|
19740
20174
|
var id = v4();
|
|
19741
|
-
var processedDataRow = flat.unflatten(_objectSpread$
|
|
20175
|
+
var processedDataRow = flat.unflatten(_objectSpread$l({
|
|
19742
20176
|
_id: id,
|
|
19743
20177
|
ID: id
|
|
19744
20178
|
}, dataRow));
|
|
@@ -19750,11 +20184,11 @@ function useTableData$1 (_ref) {
|
|
|
19750
20184
|
newData = _updateData.data;
|
|
19751
20185
|
_updateData.prevDataRow;
|
|
19752
20186
|
_updateData.index;
|
|
19753
|
-
var newState = _objectSpread$
|
|
20187
|
+
var newState = _objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19754
20188
|
data: newData
|
|
19755
20189
|
});
|
|
19756
20190
|
if (!filterServerSide) {
|
|
19757
|
-
var res = aplyFilterAndSortation(_objectSpread$
|
|
20191
|
+
var res = aplyFilterAndSortation(_objectSpread$l(_objectSpread$l({}, filterData), {}, {
|
|
19758
20192
|
data: newData
|
|
19759
20193
|
}));
|
|
19760
20194
|
newState.data = res.data;
|
|
@@ -19766,33 +20200,33 @@ function useTableData$1 (_ref) {
|
|
|
19766
20200
|
var formData = new FormData();
|
|
19767
20201
|
processedDataRow._id;
|
|
19768
20202
|
var value = _objectWithoutProperties(processedDataRow, _excluded);
|
|
19769
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
20203
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$l(_objectSpread$l({}, catalogItem), {}, {
|
|
19770
20204
|
filterContex: filterContex,
|
|
19771
20205
|
value: JSON.stringify([value])
|
|
19772
20206
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
19773
20207
|
if (d && d.Result && d.Result == 'Success') return;
|
|
19774
|
-
setState(_objectSpread$
|
|
20208
|
+
setState(_objectSpread$l({}, oldState));
|
|
19775
20209
|
});
|
|
19776
20210
|
}, [state, catalogItem, filterData]);
|
|
19777
20211
|
useEffect(function () {
|
|
19778
20212
|
if (!catalogItem) return;
|
|
19779
|
-
setState(_objectSpread$
|
|
20213
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19780
20214
|
loading: true,
|
|
19781
|
-
mappingData: _objectSpread$
|
|
20215
|
+
mappingData: _objectSpread$l(_objectSpread$l({}, catalogItem), {}, {
|
|
19782
20216
|
filterContex: filterContex
|
|
19783
20217
|
})
|
|
19784
20218
|
}));
|
|
19785
20219
|
if (!filterServerSide) {
|
|
19786
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
20220
|
+
apiHandler.readList(configuration.mapping, _objectSpread$l(_objectSpread$l({}, catalogItem), {}, {
|
|
19787
20221
|
filterContex: filterContex
|
|
19788
20222
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
19789
20223
|
var newData = data.data.map(function (d) {
|
|
19790
|
-
return _objectSpread$
|
|
20224
|
+
return _objectSpread$l(_objectSpread$l({}, d), {}, {
|
|
19791
20225
|
_id: d._id || d.ID || nanoid()
|
|
19792
20226
|
});
|
|
19793
20227
|
});
|
|
19794
20228
|
onChange({
|
|
19795
|
-
pagination: _objectSpread$
|
|
20229
|
+
pagination: _objectSpread$l({}, state.pagination),
|
|
19796
20230
|
filters: {},
|
|
19797
20231
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
19798
20232
|
return c.defaultSortOrder;
|
|
@@ -19809,7 +20243,7 @@ function useTableData$1 (_ref) {
|
|
|
19809
20243
|
});
|
|
19810
20244
|
} else {
|
|
19811
20245
|
onChange({
|
|
19812
|
-
pagination: _objectSpread$
|
|
20246
|
+
pagination: _objectSpread$l({}, state.pagination),
|
|
19813
20247
|
filters: {},
|
|
19814
20248
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
19815
20249
|
return c.defaultSortOrder;
|
|
@@ -19826,17 +20260,17 @@ function useTableData$1 (_ref) {
|
|
|
19826
20260
|
}
|
|
19827
20261
|
}, [filterContex, catalogItem]);
|
|
19828
20262
|
var onChange = function onChange(p, dataParam) {
|
|
19829
|
-
setState(_objectSpread$
|
|
20263
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19830
20264
|
loading: true
|
|
19831
20265
|
}));
|
|
19832
20266
|
if (!filterServerSide) {
|
|
19833
20267
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
19834
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
20268
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$l(_objectSpread$l({}, p), {}, {
|
|
19835
20269
|
data: unfilteredData
|
|
19836
20270
|
})),
|
|
19837
20271
|
data = _aplyFilterAndSortati.data,
|
|
19838
20272
|
pagination = _aplyFilterAndSortati.pagination;
|
|
19839
|
-
setState(_objectSpread$
|
|
20273
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19840
20274
|
data: data,
|
|
19841
20275
|
pagination: pagination,
|
|
19842
20276
|
loading: false,
|
|
@@ -19847,20 +20281,20 @@ function useTableData$1 (_ref) {
|
|
|
19847
20281
|
sorter: p.sorter
|
|
19848
20282
|
});
|
|
19849
20283
|
} else {
|
|
19850
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
20284
|
+
apiHandler.readList(configuration.mapping, _objectSpread$l(_objectSpread$l({}, catalogItem), {}, {
|
|
19851
20285
|
filterContex: filterContex
|
|
19852
20286
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
19853
|
-
setState(_objectSpread$
|
|
20287
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19854
20288
|
data: data.data.map(function (dt) {
|
|
19855
|
-
return _objectSpread$
|
|
20289
|
+
return _objectSpread$l(_objectSpread$l({}, dt), {}, {
|
|
19856
20290
|
_id: dt._id || dt.ID || nanoid()
|
|
19857
20291
|
});
|
|
19858
20292
|
}),
|
|
19859
|
-
pagination: _objectSpread$
|
|
20293
|
+
pagination: _objectSpread$l(_objectSpread$l({}, p.pagination), {}, {
|
|
19860
20294
|
total: data.total
|
|
19861
20295
|
}),
|
|
19862
20296
|
loading: false,
|
|
19863
|
-
mappingData: _objectSpread$
|
|
20297
|
+
mappingData: _objectSpread$l(_objectSpread$l({}, catalogItem), {}, {
|
|
19864
20298
|
filterContex: filterContex
|
|
19865
20299
|
})
|
|
19866
20300
|
}));
|
|
@@ -19872,7 +20306,7 @@ function useTableData$1 (_ref) {
|
|
|
19872
20306
|
}
|
|
19873
20307
|
};
|
|
19874
20308
|
var onSelect = function onSelect(keys) {
|
|
19875
|
-
setState(_objectSpread$
|
|
20309
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19876
20310
|
selected: keys
|
|
19877
20311
|
}));
|
|
19878
20312
|
};
|
|
@@ -19882,7 +20316,7 @@ function useTableData$1 (_ref) {
|
|
|
19882
20316
|
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
19883
20317
|
while (1) switch (_context2.prev = _context2.next) {
|
|
19884
20318
|
case 0:
|
|
19885
|
-
setState(_objectSpread$
|
|
20319
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19886
20320
|
deleting: true
|
|
19887
20321
|
}));
|
|
19888
20322
|
newData = _toConsumableArray(state.data);
|
|
@@ -19897,7 +20331,7 @@ function useTableData$1 (_ref) {
|
|
|
19897
20331
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
19898
20332
|
return nd._id === state.selected[index];
|
|
19899
20333
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
19900
|
-
mappingData = _objectSpread$
|
|
20334
|
+
mappingData = _objectSpread$l(_objectSpread$l({}, mappingData), state.mappingData);
|
|
19901
20335
|
_context.next = 5;
|
|
19902
20336
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true);
|
|
19903
20337
|
case 5:
|
|
@@ -19947,7 +20381,7 @@ function useTableData$1 (_ref) {
|
|
|
19947
20381
|
}
|
|
19948
20382
|
_context2.next = 18;
|
|
19949
20383
|
return apiHandler.readList(configuration.mapping, {
|
|
19950
|
-
pagination: _objectSpread$
|
|
20384
|
+
pagination: _objectSpread$l(_objectSpread$l({}, state.pagination), {}, {
|
|
19951
20385
|
current: current
|
|
19952
20386
|
}),
|
|
19953
20387
|
columns: configuration.columns,
|
|
@@ -19959,11 +20393,11 @@ function useTableData$1 (_ref) {
|
|
|
19959
20393
|
newData = data.data;
|
|
19960
20394
|
total = data.total;
|
|
19961
20395
|
case 21:
|
|
19962
|
-
setState(_objectSpread$
|
|
20396
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19963
20397
|
selected: [],
|
|
19964
20398
|
deleting: false,
|
|
19965
20399
|
data: newData,
|
|
19966
|
-
pagination: _objectSpread$
|
|
20400
|
+
pagination: _objectSpread$l(_objectSpread$l({}, state.pagination), {}, {
|
|
19967
20401
|
current: current,
|
|
19968
20402
|
total: total
|
|
19969
20403
|
})
|
|
@@ -19979,12 +20413,12 @@ function useTableData$1 (_ref) {
|
|
|
19979
20413
|
};
|
|
19980
20414
|
}();
|
|
19981
20415
|
function setLoading() {
|
|
19982
|
-
setState(_objectSpread$
|
|
20416
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19983
20417
|
loading: true
|
|
19984
20418
|
}));
|
|
19985
20419
|
}
|
|
19986
|
-
return _objectSpread$
|
|
19987
|
-
configuration: _objectSpread$
|
|
20420
|
+
return _objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
20421
|
+
configuration: _objectSpread$l(_objectSpread$l({}, configuration), {}, {
|
|
19988
20422
|
title: undefined
|
|
19989
20423
|
}),
|
|
19990
20424
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -20086,11 +20520,11 @@ function objectHash (obj) {
|
|
|
20086
20520
|
return hash(hashable);
|
|
20087
20521
|
}
|
|
20088
20522
|
|
|
20089
|
-
function _createForOfIteratorHelper$7(
|
|
20090
|
-
function _unsupportedIterableToArray$7(
|
|
20091
|
-
function _arrayLikeToArray$7(
|
|
20092
|
-
function ownKeys$
|
|
20093
|
-
function _objectSpread$
|
|
20523
|
+
function _createForOfIteratorHelper$7(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$7(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; } } }; }
|
|
20524
|
+
function _unsupportedIterableToArray$7(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$7(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$7(r, a) : void 0; } }
|
|
20525
|
+
function _arrayLikeToArray$7(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; }
|
|
20526
|
+
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; }
|
|
20527
|
+
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; }
|
|
20094
20528
|
var LOG$3 = getLogger('Backoffice', 'TableData');
|
|
20095
20529
|
function useTableData (_ref) {
|
|
20096
20530
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -20157,7 +20591,7 @@ function useTableData (_ref) {
|
|
|
20157
20591
|
selected: [],
|
|
20158
20592
|
canDelete: !!apiHandler.canDelete,
|
|
20159
20593
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
20160
|
-
mappingData: _objectSpread$
|
|
20594
|
+
mappingData: _objectSpread$k(_objectSpread$k({}, parentData), {}, {
|
|
20161
20595
|
prefilter: {
|
|
20162
20596
|
select: globalFilter.select
|
|
20163
20597
|
}
|
|
@@ -20166,7 +20600,7 @@ function useTableData (_ref) {
|
|
|
20166
20600
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
20167
20601
|
state = _useState14[0],
|
|
20168
20602
|
setState = _useState14[1];
|
|
20169
|
-
var mapping = _objectSpread$
|
|
20603
|
+
var mapping = _objectSpread$k(_objectSpread$k({}, parentData), {}, {
|
|
20170
20604
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
20171
20605
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
20172
20606
|
});
|
|
@@ -20205,14 +20639,14 @@ function useTableData (_ref) {
|
|
|
20205
20639
|
}
|
|
20206
20640
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
20207
20641
|
var newInitData = initData;
|
|
20208
|
-
var newState = _objectSpread$
|
|
20642
|
+
var newState = _objectSpread$k({}, state);
|
|
20209
20643
|
var selected = [];
|
|
20210
20644
|
if (configuration.deselectOnUpdate == false) {
|
|
20211
20645
|
selected = state.selected;
|
|
20212
20646
|
}
|
|
20213
20647
|
var pagination = undefined;
|
|
20214
20648
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
20215
|
-
pagination = _objectSpread$
|
|
20649
|
+
pagination = _objectSpread$k(_objectSpread$k({}, state.pagination), {}, {
|
|
20216
20650
|
total: state.data.length + dataArray.length
|
|
20217
20651
|
});
|
|
20218
20652
|
}
|
|
@@ -20229,7 +20663,7 @@ function useTableData (_ref) {
|
|
|
20229
20663
|
dataRow: dataRow
|
|
20230
20664
|
}),
|
|
20231
20665
|
_data = _updateData.data;
|
|
20232
|
-
newState = _objectSpread$
|
|
20666
|
+
newState = _objectSpread$k(_objectSpread$k({}, newState), {}, {
|
|
20233
20667
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
20234
20668
|
data: _data,
|
|
20235
20669
|
selected: selected
|
|
@@ -20242,8 +20676,8 @@ function useTableData (_ref) {
|
|
|
20242
20676
|
dataRow: dataRow
|
|
20243
20677
|
}),
|
|
20244
20678
|
nextInitData = _updateData2.data;
|
|
20245
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
20246
|
-
filters: _objectSpread$
|
|
20679
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$k(_objectSpread$k(_objectSpread$k({}, filterData), {}, {
|
|
20680
|
+
filters: _objectSpread$k(_objectSpread$k(_objectSpread$k(_objectSpread$k(_objectSpread$k(_objectSpread$k({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter5 = configuration.filter) !== null && _configuration$filter5 !== void 0 && (_configuration$filter5 = _configuration$filter5.toggle) !== null && _configuration$filter5 !== void 0 && _configuration$filter5.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
|
|
20247
20681
|
}, 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 ? {
|
|
20248
20682
|
genericProps: globalFilter.toggle
|
|
20249
20683
|
} : undefined), {}, {
|
|
@@ -20253,7 +20687,7 @@ function useTableData (_ref) {
|
|
|
20253
20687
|
_data2 = _aplyFilterAndSortati.data,
|
|
20254
20688
|
_pagination2 = _aplyFilterAndSortati.pagination;
|
|
20255
20689
|
newInitData = nextInitData;
|
|
20256
|
-
newState = _objectSpread$
|
|
20690
|
+
newState = _objectSpread$k(_objectSpread$k({}, newState), {}, {
|
|
20257
20691
|
pagination: _pagination2,
|
|
20258
20692
|
data: _data2,
|
|
20259
20693
|
selected: selected
|
|
@@ -20263,8 +20697,8 @@ function useTableData (_ref) {
|
|
|
20263
20697
|
if (apiHandler.canCreate) {
|
|
20264
20698
|
apiCreate(data).then(function (res) {
|
|
20265
20699
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
20266
|
-
initData && setInitData(_objectSpread$
|
|
20267
|
-
setState(_objectSpread$
|
|
20700
|
+
initData && setInitData(_objectSpread$k({}, initData));
|
|
20701
|
+
setState(_objectSpread$k({}, state));
|
|
20268
20702
|
}
|
|
20269
20703
|
});
|
|
20270
20704
|
}
|
|
@@ -20277,7 +20711,7 @@ function useTableData (_ref) {
|
|
|
20277
20711
|
var triggerRefresh = function triggerRefresh() {
|
|
20278
20712
|
var _configuration$filter7;
|
|
20279
20713
|
setError(undefined);
|
|
20280
|
-
var newGlobalFilter = _objectSpread$
|
|
20714
|
+
var newGlobalFilter = _objectSpread$k({}, globalFilter);
|
|
20281
20715
|
//on refresh update default filter, since global value can change
|
|
20282
20716
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
20283
20717
|
var _configuration$filter8;
|
|
@@ -20288,7 +20722,7 @@ function useTableData (_ref) {
|
|
|
20288
20722
|
newGlobalFilter["default"] = _defaultFilter;
|
|
20289
20723
|
setGlobaFilter(newGlobalFilter);
|
|
20290
20724
|
}
|
|
20291
|
-
onChange(_objectSpread$
|
|
20725
|
+
onChange(_objectSpread$k({
|
|
20292
20726
|
pagination: state.pagination
|
|
20293
20727
|
}, filterData), newGlobalFilter, true);
|
|
20294
20728
|
};
|
|
@@ -20307,7 +20741,7 @@ function useTableData (_ref) {
|
|
|
20307
20741
|
order: c.defaultSortOrder
|
|
20308
20742
|
};
|
|
20309
20743
|
});
|
|
20310
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
20744
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20311
20745
|
loading: false
|
|
20312
20746
|
}));else {
|
|
20313
20747
|
onChange({
|
|
@@ -20364,11 +20798,11 @@ function useTableData (_ref) {
|
|
|
20364
20798
|
case 0:
|
|
20365
20799
|
prefilter = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : globalFilter;
|
|
20366
20800
|
refresh = _args2.length > 2 ? _args2[2] : undefined;
|
|
20367
|
-
setState(_objectSpread$
|
|
20801
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20368
20802
|
loading: true
|
|
20369
20803
|
}));
|
|
20370
20804
|
currentData = initData;
|
|
20371
|
-
filterData = _objectSpread$
|
|
20805
|
+
filterData = _objectSpread$k(_objectSpread$k(_objectSpread$k(_objectSpread$k(_objectSpread$k(_objectSpread$k({}, p.filters), prefilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter9 = configuration.filter) !== null && _configuration$filter9 !== void 0 && (_configuration$filter9 = _configuration$filter9.toggle) !== null && _configuration$filter9 !== void 0 && _configuration$filter9.inQuery) ? prefilter.toggle : undefined), ((_configuration$filter10 = configuration.filter) === null || _configuration$filter10 === void 0 || (_configuration$filter10 = _configuration$filter10.select) === null || _configuration$filter10 === void 0 ? void 0 : _configuration$filter10.applyDefaultValue) !== false || ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter12 = (_configuration$filter13 = configuration.filter) === null || _configuration$filter13 === void 0 || (_configuration$filter13 = _configuration$filter13.select) === null || _configuration$filter13 === void 0 ? void 0 : _configuration$filter13.filterField) !== null && _configuration$filter12 !== void 0 ? _configuration$filter12 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
|
|
20372
20806
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref5) {
|
|
20373
20807
|
var _ref6 = _slicedToArray(_ref5, 2);
|
|
20374
20808
|
_ref6[0];
|
|
@@ -20376,7 +20810,7 @@ function useTableData (_ref) {
|
|
|
20376
20810
|
return v != null;
|
|
20377
20811
|
}));
|
|
20378
20812
|
currentFilterHash = objectHash(filterData);
|
|
20379
|
-
currentPagination = _objectSpread$
|
|
20813
|
+
currentPagination = _objectSpread$k(_objectSpread$k({}, p.pagination), {}, {
|
|
20380
20814
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
20381
20815
|
});
|
|
20382
20816
|
filterHash.current = currentFilterHash;
|
|
@@ -20384,7 +20818,7 @@ function useTableData (_ref) {
|
|
|
20384
20818
|
_context2.next = 19;
|
|
20385
20819
|
break;
|
|
20386
20820
|
}
|
|
20387
|
-
ssf = _objectSpread$
|
|
20821
|
+
ssf = _objectSpread$k({
|
|
20388
20822
|
pagination: currentPagination,
|
|
20389
20823
|
columns: configuration.columns,
|
|
20390
20824
|
filters: filterData,
|
|
@@ -20398,7 +20832,7 @@ function useTableData (_ref) {
|
|
|
20398
20832
|
data = _context2.sent;
|
|
20399
20833
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
20400
20834
|
currentData = data.data;
|
|
20401
|
-
currentPagination = _objectSpread$
|
|
20835
|
+
currentPagination = _objectSpread$k(_objectSpread$k({}, currentPagination), {}, {
|
|
20402
20836
|
total: data.total
|
|
20403
20837
|
});
|
|
20404
20838
|
_context2.next = 28;
|
|
@@ -20415,7 +20849,7 @@ function useTableData (_ref) {
|
|
|
20415
20849
|
currentData = _data3.data;
|
|
20416
20850
|
setInitData(currentData);
|
|
20417
20851
|
case 25:
|
|
20418
|
-
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$
|
|
20852
|
+
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$k(_objectSpread$k({}, p), {}, {
|
|
20419
20853
|
pagination: currentPagination,
|
|
20420
20854
|
filters: filterData,
|
|
20421
20855
|
data: currentData,
|
|
@@ -20424,11 +20858,11 @@ function useTableData (_ref) {
|
|
|
20424
20858
|
currentData = _data4;
|
|
20425
20859
|
currentPagination = pagination;
|
|
20426
20860
|
case 28:
|
|
20427
|
-
setState(_objectSpread$
|
|
20861
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20428
20862
|
loading: false,
|
|
20429
20863
|
data: currentData,
|
|
20430
20864
|
pagination: currentPagination,
|
|
20431
|
-
mappingData: _objectSpread$
|
|
20865
|
+
mappingData: _objectSpread$k(_objectSpread$k({}, parentData), {}, {
|
|
20432
20866
|
prefilter: prefilter
|
|
20433
20867
|
}),
|
|
20434
20868
|
currentFetchUrl: currentUrl
|
|
@@ -20448,7 +20882,7 @@ function useTableData (_ref) {
|
|
|
20448
20882
|
};
|
|
20449
20883
|
}();
|
|
20450
20884
|
var onSelect = function onSelect(keys) {
|
|
20451
|
-
setState(_objectSpread$
|
|
20885
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20452
20886
|
selected: keys
|
|
20453
20887
|
}));
|
|
20454
20888
|
};
|
|
@@ -20459,7 +20893,7 @@ function useTableData (_ref) {
|
|
|
20459
20893
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
20460
20894
|
while (1) switch (_context4.prev = _context4.next) {
|
|
20461
20895
|
case 0:
|
|
20462
|
-
setState(_objectSpread$
|
|
20896
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20463
20897
|
deleting: true
|
|
20464
20898
|
}));
|
|
20465
20899
|
newData = _toConsumableArray(state.data);
|
|
@@ -20499,7 +20933,7 @@ function useTableData (_ref) {
|
|
|
20499
20933
|
} finally {
|
|
20500
20934
|
_iterator.f();
|
|
20501
20935
|
}
|
|
20502
|
-
mappingData = _objectSpread$
|
|
20936
|
+
mappingData = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, mappingData), state.mappingData), mapToggle);
|
|
20503
20937
|
deleteResult = undefined;
|
|
20504
20938
|
_context3.prev = 7;
|
|
20505
20939
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -20590,12 +21024,12 @@ function useTableData (_ref) {
|
|
|
20590
21024
|
break;
|
|
20591
21025
|
}
|
|
20592
21026
|
_context4.next = 25;
|
|
20593
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
20594
|
-
pagination: _objectSpread$
|
|
21027
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$k({
|
|
21028
|
+
pagination: _objectSpread$k(_objectSpread$k({}, state.pagination), {}, {
|
|
20595
21029
|
current: current
|
|
20596
21030
|
}),
|
|
20597
21031
|
columns: configuration.columns,
|
|
20598
|
-
filters: _objectSpread$
|
|
21032
|
+
filters: _objectSpread$k(_objectSpread$k(_objectSpread$k(_objectSpread$k(_objectSpread$k(_objectSpread$k({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter15 = configuration.filter) !== null && _configuration$filter15 !== void 0 && (_configuration$filter15 = _configuration$filter15.toggle) !== null && _configuration$filter15 !== void 0 && _configuration$filter15.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
|
|
20599
21033
|
sorter: filterData.sorter
|
|
20600
21034
|
}, 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 ? {
|
|
20601
21035
|
genericProps: globalFilter.toggle
|
|
@@ -20606,11 +21040,11 @@ function useTableData (_ref) {
|
|
|
20606
21040
|
total = data.total;
|
|
20607
21041
|
case 28:
|
|
20608
21042
|
setInitData(newInitData);
|
|
20609
|
-
setState(_objectSpread$
|
|
21043
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20610
21044
|
selected: [],
|
|
20611
21045
|
deleting: false,
|
|
20612
21046
|
data: newData,
|
|
20613
|
-
pagination: _objectSpread$
|
|
21047
|
+
pagination: _objectSpread$k(_objectSpread$k({}, state.pagination), {}, {
|
|
20614
21048
|
current: current === 0 ? 1 : current,
|
|
20615
21049
|
total: total
|
|
20616
21050
|
})
|
|
@@ -20631,14 +21065,14 @@ function useTableData (_ref) {
|
|
|
20631
21065
|
LOG$3.error('No global select filter defiend');
|
|
20632
21066
|
return;
|
|
20633
21067
|
}
|
|
20634
|
-
var newGlobalFilter = _objectSpread$
|
|
21068
|
+
var newGlobalFilter = _objectSpread$k({}, globalFilter);
|
|
20635
21069
|
if (value !== null && value !== void 0 && value.length) {
|
|
20636
21070
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
20637
21071
|
} else {
|
|
20638
21072
|
newGlobalFilter.select = {};
|
|
20639
21073
|
}
|
|
20640
21074
|
setGlobaFilter(newGlobalFilter);
|
|
20641
|
-
onChange(_objectSpread$
|
|
21075
|
+
onChange(_objectSpread$k({
|
|
20642
21076
|
pagination: state.pagination
|
|
20643
21077
|
}, filterData), newGlobalFilter);
|
|
20644
21078
|
};
|
|
@@ -20652,11 +21086,11 @@ function useTableData (_ref) {
|
|
|
20652
21086
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
20653
21087
|
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', 1];
|
|
20654
21088
|
});
|
|
20655
|
-
var newGlobalFilter = _objectSpread$
|
|
21089
|
+
var newGlobalFilter = _objectSpread$k(_objectSpread$k({}, globalFilter), {}, {
|
|
20656
21090
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
20657
21091
|
});
|
|
20658
21092
|
setGlobaFilter(newGlobalFilter);
|
|
20659
|
-
onChange(_objectSpread$
|
|
21093
|
+
onChange(_objectSpread$k({
|
|
20660
21094
|
pagination: state.pagination
|
|
20661
21095
|
}, filterData), newGlobalFilter);
|
|
20662
21096
|
};
|
|
@@ -20666,7 +21100,7 @@ function useTableData (_ref) {
|
|
|
20666
21100
|
LOG$3.error('No global search filter defiend');
|
|
20667
21101
|
return;
|
|
20668
21102
|
}
|
|
20669
|
-
var newGlobalFilter = _objectSpread$
|
|
21103
|
+
var newGlobalFilter = _objectSpread$k(_objectSpread$k({}, globalFilter), {}, {
|
|
20670
21104
|
search: {}
|
|
20671
21105
|
});
|
|
20672
21106
|
if (value) {
|
|
@@ -20680,7 +21114,7 @@ function useTableData (_ref) {
|
|
|
20680
21114
|
});
|
|
20681
21115
|
}
|
|
20682
21116
|
setGlobaFilter(newGlobalFilter);
|
|
20683
|
-
onChange(_objectSpread$
|
|
21117
|
+
onChange(_objectSpread$k({
|
|
20684
21118
|
pagination: state.pagination
|
|
20685
21119
|
}, filterData), newGlobalFilter);
|
|
20686
21120
|
};
|
|
@@ -20690,17 +21124,17 @@ function useTableData (_ref) {
|
|
|
20690
21124
|
LOG$3.error('No global period filter defiend');
|
|
20691
21125
|
return;
|
|
20692
21126
|
}
|
|
20693
|
-
var newGlobalFilter = _objectSpread$
|
|
21127
|
+
var newGlobalFilter = _objectSpread$k({}, globalFilter);
|
|
20694
21128
|
newGlobalFilter.timeStamp = {
|
|
20695
21129
|
fromTimeStamp: [from],
|
|
20696
21130
|
toTimeStamp: [to]
|
|
20697
21131
|
};
|
|
20698
21132
|
setGlobaFilter(newGlobalFilter);
|
|
20699
|
-
onChange(_objectSpread$
|
|
21133
|
+
onChange(_objectSpread$k({
|
|
20700
21134
|
pagination: state.pagination
|
|
20701
21135
|
}, filterData), newGlobalFilter);
|
|
20702
21136
|
};
|
|
20703
|
-
return _objectSpread$
|
|
21137
|
+
return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20704
21138
|
title: title,
|
|
20705
21139
|
configuration: configuration,
|
|
20706
21140
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -20740,8 +21174,8 @@ function StandardTable (_ref) {
|
|
|
20740
21174
|
});
|
|
20741
21175
|
}
|
|
20742
21176
|
|
|
20743
|
-
function ownKeys$
|
|
20744
|
-
function _objectSpread$
|
|
21177
|
+
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; }
|
|
21178
|
+
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; }
|
|
20745
21179
|
function Table (props) {
|
|
20746
21180
|
var root = useStore();
|
|
20747
21181
|
var variant = useMemo(function () {
|
|
@@ -20749,15 +21183,15 @@ function Table (props) {
|
|
|
20749
21183
|
return config.variant;
|
|
20750
21184
|
}, [props.id]);
|
|
20751
21185
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
20752
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
21186
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$j({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$j({}, props))]
|
|
20753
21187
|
});
|
|
20754
21188
|
}
|
|
20755
21189
|
|
|
20756
|
-
function _createForOfIteratorHelper$6(
|
|
20757
|
-
function _unsupportedIterableToArray$6(
|
|
20758
|
-
function _arrayLikeToArray$6(
|
|
20759
|
-
function ownKeys$
|
|
20760
|
-
function _objectSpread$
|
|
21190
|
+
function _createForOfIteratorHelper$6(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(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; } } }; }
|
|
21191
|
+
function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(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$6(r, a) : void 0; } }
|
|
21192
|
+
function _arrayLikeToArray$6(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; }
|
|
21193
|
+
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; }
|
|
21194
|
+
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; }
|
|
20761
21195
|
function useAGGrid (_ref) {
|
|
20762
21196
|
var id = _ref.id,
|
|
20763
21197
|
filter = _ref.filter,
|
|
@@ -20851,7 +21285,7 @@ function useAGGrid (_ref) {
|
|
|
20851
21285
|
value = _ref3[1];
|
|
20852
21286
|
if (_idx == 0) {
|
|
20853
21287
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
20854
|
-
rdat.push(_objectSpread$
|
|
21288
|
+
rdat.push(_objectSpread$i(_objectSpread$i({}, rd), {}, {
|
|
20855
21289
|
grouping: [idx.toString()]
|
|
20856
21290
|
}));
|
|
20857
21291
|
var sp = key.split(':');
|
|
@@ -20994,8 +21428,8 @@ var value = "value-FCA-6";
|
|
|
20994
21428
|
var css_248z$8 = ".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";
|
|
20995
21429
|
styleInject(css_248z$8);
|
|
20996
21430
|
|
|
20997
|
-
function ownKeys$
|
|
20998
|
-
function _objectSpread$
|
|
21431
|
+
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; }
|
|
21432
|
+
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; }
|
|
20999
21433
|
var AGChart = function AGChart(_ref) {
|
|
21000
21434
|
var data = _ref.data;
|
|
21001
21435
|
var groupedData = [];
|
|
@@ -21003,11 +21437,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
21003
21437
|
data.forEach(function (dt) {
|
|
21004
21438
|
if (dt.count == 0) return;
|
|
21005
21439
|
if (groupedData.length > dt.grouping[0]) {
|
|
21006
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
21440
|
+
groupedData[dt.grouping[0]].push(_objectSpread$h(_objectSpread$h({}, dt), {}, {
|
|
21007
21441
|
count: Number(dt.count)
|
|
21008
21442
|
}));
|
|
21009
21443
|
} else {
|
|
21010
|
-
groupedData.push([_objectSpread$
|
|
21444
|
+
groupedData.push([_objectSpread$h(_objectSpread$h({}, dt), {}, {
|
|
21011
21445
|
count: Number(dt.count)
|
|
21012
21446
|
})]);
|
|
21013
21447
|
}
|
|
@@ -21048,8 +21482,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
21048
21482
|
});
|
|
21049
21483
|
};
|
|
21050
21484
|
|
|
21051
|
-
function ownKeys$
|
|
21052
|
-
function _objectSpread$
|
|
21485
|
+
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; }
|
|
21486
|
+
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; }
|
|
21053
21487
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
21054
21488
|
var id = _ref.id,
|
|
21055
21489
|
filter = _ref.filter,
|
|
@@ -21142,7 +21576,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
21142
21576
|
});
|
|
21143
21577
|
});
|
|
21144
21578
|
}
|
|
21145
|
-
return _objectSpread$
|
|
21579
|
+
return _objectSpread$g(_objectSpread$g({}, column), {}, {
|
|
21146
21580
|
cellRenderer: renderer
|
|
21147
21581
|
});
|
|
21148
21582
|
});
|
|
@@ -21416,11 +21850,11 @@ var CustomText$1 = observer(CustomText, {
|
|
|
21416
21850
|
forwardRef: true
|
|
21417
21851
|
});
|
|
21418
21852
|
|
|
21419
|
-
function ownKeys$
|
|
21420
|
-
function _objectSpread$
|
|
21421
|
-
function _createForOfIteratorHelper$5(
|
|
21422
|
-
function _unsupportedIterableToArray$5(
|
|
21423
|
-
function _arrayLikeToArray$5(
|
|
21853
|
+
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; }
|
|
21854
|
+
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; }
|
|
21855
|
+
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; } } }; }
|
|
21856
|
+
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; } }
|
|
21857
|
+
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; }
|
|
21424
21858
|
function useFilterBoxData (id) {
|
|
21425
21859
|
var root = useStore();
|
|
21426
21860
|
var _useMemo = useMemo(function () {
|
|
@@ -21480,7 +21914,7 @@ function useFilterBoxData (id) {
|
|
|
21480
21914
|
} finally {
|
|
21481
21915
|
_iterator.f();
|
|
21482
21916
|
}
|
|
21483
|
-
return _objectSpread$
|
|
21917
|
+
return _objectSpread$f(_objectSpread$f({}, state), ob);
|
|
21484
21918
|
}
|
|
21485
21919
|
return {
|
|
21486
21920
|
configuration: configuration,
|
|
@@ -21491,11 +21925,11 @@ function useFilterBoxData (id) {
|
|
|
21491
21925
|
};
|
|
21492
21926
|
}
|
|
21493
21927
|
|
|
21494
|
-
function _createForOfIteratorHelper$4(
|
|
21495
|
-
function _unsupportedIterableToArray$4(
|
|
21496
|
-
function _arrayLikeToArray$4(
|
|
21497
|
-
function ownKeys$
|
|
21498
|
-
function _objectSpread$
|
|
21928
|
+
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; } } }; }
|
|
21929
|
+
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; } }
|
|
21930
|
+
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; }
|
|
21931
|
+
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; }
|
|
21932
|
+
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; }
|
|
21499
21933
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
21500
21934
|
var id = _ref.id,
|
|
21501
21935
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -21520,10 +21954,10 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
21520
21954
|
return /*#__PURE__*/jsxs("div", {
|
|
21521
21955
|
children: [/*#__PURE__*/jsx(Typography.Text, {
|
|
21522
21956
|
children: filter.title
|
|
21523
|
-
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select
|
|
21957
|
+
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
21524
21958
|
mode: "single",
|
|
21525
21959
|
apiInterface: filter.requestOptions,
|
|
21526
|
-
wholeData: _objectSpread$
|
|
21960
|
+
wholeData: _objectSpread$e(_objectSpread$e({}, state.filter), {}, {
|
|
21527
21961
|
tab: tab
|
|
21528
21962
|
}),
|
|
21529
21963
|
mapping: filter.requestMapping,
|
|
@@ -21755,8 +22189,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
21755
22189
|
return false;
|
|
21756
22190
|
});
|
|
21757
22191
|
|
|
21758
|
-
function ownKeys$
|
|
21759
|
-
function _objectSpread$
|
|
22192
|
+
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; }
|
|
22193
|
+
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; }
|
|
21760
22194
|
function useUIBuilderData (id) {
|
|
21761
22195
|
var save = undefined;
|
|
21762
22196
|
var root = useStore();
|
|
@@ -21788,7 +22222,7 @@ function useUIBuilderData (id) {
|
|
|
21788
22222
|
var configuration = _useMemo.configuration;
|
|
21789
22223
|
useEffect(function () {
|
|
21790
22224
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
21791
|
-
return setFilter(_objectSpread$
|
|
22225
|
+
return setFilter(_objectSpread$d(_objectSpread$d({}, filter), {}, {
|
|
21792
22226
|
sessionGuid: res
|
|
21793
22227
|
}));
|
|
21794
22228
|
});
|
|
@@ -21811,8 +22245,8 @@ function useUIBuilderData (id) {
|
|
|
21811
22245
|
};
|
|
21812
22246
|
}
|
|
21813
22247
|
|
|
21814
|
-
function ownKeys$
|
|
21815
|
-
function _objectSpread$
|
|
22248
|
+
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; }
|
|
22249
|
+
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; }
|
|
21816
22250
|
function UIBuilder(_ref) {
|
|
21817
22251
|
var id = _ref.id;
|
|
21818
22252
|
var state = useUIBuilderData(id);
|
|
@@ -21839,7 +22273,7 @@ function UIBuilder(_ref) {
|
|
|
21839
22273
|
override = {
|
|
21840
22274
|
value: newFilter[item.field],
|
|
21841
22275
|
setValue: function setValue(newVal) {
|
|
21842
|
-
var newFilter = _objectSpread$
|
|
22276
|
+
var newFilter = _objectSpread$c({}, state.filter);
|
|
21843
22277
|
newFilter[item.field] = newVal;
|
|
21844
22278
|
state.setFilter(newFilter);
|
|
21845
22279
|
}
|
|
@@ -21887,7 +22321,7 @@ function UIBuilder(_ref) {
|
|
|
21887
22321
|
case 'AGGrid':
|
|
21888
22322
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
21889
22323
|
id: item.id,
|
|
21890
|
-
filter: _objectSpread$
|
|
22324
|
+
filter: _objectSpread$c({
|
|
21891
22325
|
optionCodices: JSON.stringify(state.data)
|
|
21892
22326
|
}, state.filter),
|
|
21893
22327
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -22047,8 +22481,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
22047
22481
|
};
|
|
22048
22482
|
var OrgItem$1 = observer(OrgItem);
|
|
22049
22483
|
|
|
22050
|
-
function ownKeys$
|
|
22051
|
-
function _objectSpread$
|
|
22484
|
+
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; }
|
|
22485
|
+
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; }
|
|
22052
22486
|
function useTransformJson (_ref) {
|
|
22053
22487
|
var id = _ref.id;
|
|
22054
22488
|
var _useState = useState(),
|
|
@@ -22114,7 +22548,7 @@ function useTransformJson (_ref) {
|
|
|
22114
22548
|
}();
|
|
22115
22549
|
var transformData = function transformData(data, itemChain, parentOrgId) {
|
|
22116
22550
|
var _data$children;
|
|
22117
|
-
return _objectSpread$
|
|
22551
|
+
return _objectSpread$b(_objectSpread$b({}, data), {}, {
|
|
22118
22552
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
22119
22553
|
data: data,
|
|
22120
22554
|
configuration: configuration,
|
|
@@ -22439,7 +22873,7 @@ var SearchSelect = function SearchSelect(_ref) {
|
|
|
22439
22873
|
var _root$dataStore;
|
|
22440
22874
|
root === null || root === void 0 || (_root$dataStore = root.dataStore) === null || _root$dataStore === void 0 || _root$dataStore.setSelectedOrganizationId(value);
|
|
22441
22875
|
};
|
|
22442
|
-
return /*#__PURE__*/jsx(Select$
|
|
22876
|
+
return /*#__PURE__*/jsx(Select$1, {
|
|
22443
22877
|
showSearch: true,
|
|
22444
22878
|
placeholder: t('filter.global'),
|
|
22445
22879
|
allowClear: true,
|
|
@@ -22596,7 +23030,7 @@ function IFrame(_ref) {
|
|
|
22596
23030
|
}
|
|
22597
23031
|
var IFrame$1 = observer(IFrame);
|
|
22598
23032
|
|
|
22599
|
-
function useCatalogEditor (id) {
|
|
23033
|
+
function useCatalogEditor$1 (id) {
|
|
22600
23034
|
var _useDivaCore = useDivaCore(),
|
|
22601
23035
|
_useDivaCore$state = _useDivaCore.state,
|
|
22602
23036
|
jwt = _useDivaCore$state.jwt,
|
|
@@ -22773,8 +23207,8 @@ function useCatalogEditor (id) {
|
|
|
22773
23207
|
};
|
|
22774
23208
|
}
|
|
22775
23209
|
|
|
22776
|
-
function ownKeys$
|
|
22777
|
-
function _objectSpread$
|
|
23210
|
+
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; }
|
|
23211
|
+
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; }
|
|
22778
23212
|
function DragDropUpload(_ref) {
|
|
22779
23213
|
var api2Params = _ref.api2Params,
|
|
22780
23214
|
catalogId = _ref.catalogId,
|
|
@@ -22879,7 +23313,7 @@ function DragDropUpload(_ref) {
|
|
|
22879
23313
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
22880
23314
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
22881
23315
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
22882
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
23316
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$a(_objectSpread$a({}, props), {}, {
|
|
22883
23317
|
children: [/*#__PURE__*/jsx("p", {
|
|
22884
23318
|
className: "ant-upload-drag-icon",
|
|
22885
23319
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -22920,7 +23354,7 @@ function CatalogEditor(_ref) {
|
|
|
22920
23354
|
var root = useStore();
|
|
22921
23355
|
var _useTranslation = useTranslation(),
|
|
22922
23356
|
t = _useTranslation.t;
|
|
22923
|
-
var _useCatalogEditor = useCatalogEditor(id),
|
|
23357
|
+
var _useCatalogEditor = useCatalogEditor$1(id),
|
|
22924
23358
|
error = _useCatalogEditor.error,
|
|
22925
23359
|
content = _useCatalogEditor.content,
|
|
22926
23360
|
onRedirect = _useCatalogEditor.onRedirect,
|
|
@@ -23096,12 +23530,1556 @@ function CatalogEditor(_ref) {
|
|
|
23096
23530
|
}
|
|
23097
23531
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
23098
23532
|
|
|
23533
|
+
function PackageSelector(_ref) {
|
|
23534
|
+
var selectedPackage = _ref.selectedPackage,
|
|
23535
|
+
setSelectedPackage = _ref.setSelectedPackage,
|
|
23536
|
+
enricherService = _ref.enricherService;
|
|
23537
|
+
var _useTranslation = useTranslation$1(),
|
|
23538
|
+
t = _useTranslation.t;
|
|
23539
|
+
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
23540
|
+
apiInterface: {
|
|
23541
|
+
read: enricherService + '/packages'
|
|
23542
|
+
},
|
|
23543
|
+
apiMapping: {
|
|
23544
|
+
type: 'query',
|
|
23545
|
+
map: [{
|
|
23546
|
+
globalValue: 'organizationId',
|
|
23547
|
+
targetField: 'organizationId'
|
|
23548
|
+
}]
|
|
23549
|
+
},
|
|
23550
|
+
selectMapping: {
|
|
23551
|
+
label: '${name}',
|
|
23552
|
+
value: '${_id}'
|
|
23553
|
+
},
|
|
23554
|
+
placeholder: t('backoffice.menu.items.label.SelectPackage'),
|
|
23555
|
+
value: {
|
|
23556
|
+
_id: selectedPackage
|
|
23557
|
+
},
|
|
23558
|
+
onChange: function onChange(value) {
|
|
23559
|
+
return setSelectedPackage(value._id);
|
|
23560
|
+
},
|
|
23561
|
+
search: true,
|
|
23562
|
+
style: {
|
|
23563
|
+
width: 200
|
|
23564
|
+
}
|
|
23565
|
+
});
|
|
23566
|
+
}
|
|
23567
|
+
|
|
23568
|
+
var config$1 = {
|
|
23569
|
+
catalog: {
|
|
23570
|
+
colDef: [{
|
|
23571
|
+
field: 'name',
|
|
23572
|
+
filter: 'text',
|
|
23573
|
+
required: true
|
|
23574
|
+
}, {
|
|
23575
|
+
field: 'comment',
|
|
23576
|
+
filter: 'text'
|
|
23577
|
+
}, {
|
|
23578
|
+
headerName: 'catalogName',
|
|
23579
|
+
marryChildren: true,
|
|
23580
|
+
required: true,
|
|
23581
|
+
children: [{
|
|
23582
|
+
field: 'catalogName.DE',
|
|
23583
|
+
headerName: 'DE',
|
|
23584
|
+
isDictionary: true,
|
|
23585
|
+
filter: 'text'
|
|
23586
|
+
}, {
|
|
23587
|
+
field: 'catalogName.EN',
|
|
23588
|
+
headerName: 'EN',
|
|
23589
|
+
isDictionary: true,
|
|
23590
|
+
filter: 'text'
|
|
23591
|
+
}, {
|
|
23592
|
+
field: 'catalogName.FR',
|
|
23593
|
+
headerName: 'FR',
|
|
23594
|
+
isDictionary: true,
|
|
23595
|
+
filter: 'text'
|
|
23596
|
+
}, {
|
|
23597
|
+
field: 'catalogName.FR',
|
|
23598
|
+
headerName: 'FR',
|
|
23599
|
+
isDictionary: true,
|
|
23600
|
+
filter: 'text'
|
|
23601
|
+
}]
|
|
23602
|
+
}, {
|
|
23603
|
+
headerName: 'catalogInfo',
|
|
23604
|
+
marryChildren: true,
|
|
23605
|
+
children: [{
|
|
23606
|
+
field: 'catalogInfo.DE',
|
|
23607
|
+
headerName: 'DE',
|
|
23608
|
+
isDictionary: true,
|
|
23609
|
+
filter: 'text'
|
|
23610
|
+
}, {
|
|
23611
|
+
field: 'catalogInfo.EN',
|
|
23612
|
+
headerName: 'EN',
|
|
23613
|
+
isDictionary: true,
|
|
23614
|
+
filter: 'text'
|
|
23615
|
+
}, {
|
|
23616
|
+
field: 'catalogInfo.FR',
|
|
23617
|
+
headerName: 'FR',
|
|
23618
|
+
isDictionary: true,
|
|
23619
|
+
filter: 'text'
|
|
23620
|
+
}, {
|
|
23621
|
+
field: 'catalogInfo.FR',
|
|
23622
|
+
headerName: 'FR',
|
|
23623
|
+
isDictionary: true,
|
|
23624
|
+
filter: 'text'
|
|
23625
|
+
}]
|
|
23626
|
+
}, {
|
|
23627
|
+
field: 'contactPersonNo1',
|
|
23628
|
+
filter: 'text'
|
|
23629
|
+
}, {
|
|
23630
|
+
field: 'contactRole1',
|
|
23631
|
+
filter: 'text'
|
|
23632
|
+
}, {
|
|
23633
|
+
field: 'contactName1',
|
|
23634
|
+
filter: 'text'
|
|
23635
|
+
}, {
|
|
23636
|
+
field: 'firstName1',
|
|
23637
|
+
filter: 'text'
|
|
23638
|
+
}, {
|
|
23639
|
+
field: 'formOfAddress1',
|
|
23640
|
+
filter: 'number'
|
|
23641
|
+
}, {
|
|
23642
|
+
field: 'department1',
|
|
23643
|
+
filter: 'text'
|
|
23644
|
+
}, {
|
|
23645
|
+
field: 'telephone1',
|
|
23646
|
+
filter: 'text'
|
|
23647
|
+
}, {
|
|
23648
|
+
field: 'fax1',
|
|
23649
|
+
filter: 'text'
|
|
23650
|
+
}, {
|
|
23651
|
+
field: 'email1',
|
|
23652
|
+
filter: 'text'
|
|
23653
|
+
}, {
|
|
23654
|
+
field: 'street1',
|
|
23655
|
+
filter: 'text'
|
|
23656
|
+
}, {
|
|
23657
|
+
field: 'zipCodeStreet1',
|
|
23658
|
+
filter: 'text'
|
|
23659
|
+
}, {
|
|
23660
|
+
field: 'city1',
|
|
23661
|
+
filter: 'text'
|
|
23662
|
+
}, {
|
|
23663
|
+
field: 'isoCountryId1',
|
|
23664
|
+
filter: 'text'
|
|
23665
|
+
}, {
|
|
23666
|
+
field: 'contactPersonNo2',
|
|
23667
|
+
filter: 'text'
|
|
23668
|
+
}, {
|
|
23669
|
+
field: 'contactRole2',
|
|
23670
|
+
filter: 'text'
|
|
23671
|
+
}, {
|
|
23672
|
+
field: 'contactName2',
|
|
23673
|
+
filter: 'text'
|
|
23674
|
+
}, {
|
|
23675
|
+
field: 'firstName2',
|
|
23676
|
+
filter: 'text'
|
|
23677
|
+
}, {
|
|
23678
|
+
field: 'formOfAddress2',
|
|
23679
|
+
filter: 'number'
|
|
23680
|
+
}, {
|
|
23681
|
+
field: 'department2',
|
|
23682
|
+
filter: 'text'
|
|
23683
|
+
}, {
|
|
23684
|
+
field: 'telephone2',
|
|
23685
|
+
filter: 'text'
|
|
23686
|
+
}, {
|
|
23687
|
+
field: 'fax2',
|
|
23688
|
+
filter: 'text'
|
|
23689
|
+
}, {
|
|
23690
|
+
field: 'email2',
|
|
23691
|
+
filter: 'text'
|
|
23692
|
+
}, {
|
|
23693
|
+
field: 'street2',
|
|
23694
|
+
filter: 'text'
|
|
23695
|
+
}, {
|
|
23696
|
+
field: 'zipCodeStreet2',
|
|
23697
|
+
filter: 'text'
|
|
23698
|
+
}, {
|
|
23699
|
+
field: 'city2',
|
|
23700
|
+
filter: 'text'
|
|
23701
|
+
}, {
|
|
23702
|
+
field: 'isoCountryId2',
|
|
23703
|
+
filter: 'text'
|
|
23704
|
+
}, {
|
|
23705
|
+
field: 'manufactureName1',
|
|
23706
|
+
filter: 'text'
|
|
23707
|
+
}, {
|
|
23708
|
+
field: 'manufactureName2',
|
|
23709
|
+
filter: 'text'
|
|
23710
|
+
}, {
|
|
23711
|
+
field: 'email',
|
|
23712
|
+
filter: 'text'
|
|
23713
|
+
}, {
|
|
23714
|
+
field: 'internetAddress',
|
|
23715
|
+
filter: 'text'
|
|
23716
|
+
}, {
|
|
23717
|
+
field: 'street',
|
|
23718
|
+
filter: 'text'
|
|
23719
|
+
}, {
|
|
23720
|
+
field: 'zipCodeStreet',
|
|
23721
|
+
filter: 'text'
|
|
23722
|
+
}, {
|
|
23723
|
+
field: 'city',
|
|
23724
|
+
filter: 'text'
|
|
23725
|
+
}, {
|
|
23726
|
+
field: 'contactSupplierIsoCountryId',
|
|
23727
|
+
filter: 'text'
|
|
23728
|
+
}, {
|
|
23729
|
+
field: 'zipCodePostBox',
|
|
23730
|
+
filter: 'text'
|
|
23731
|
+
}, {
|
|
23732
|
+
field: 'postBox',
|
|
23733
|
+
filter: 'text'
|
|
23734
|
+
}, {
|
|
23735
|
+
field: 'telephoneSwitchboard',
|
|
23736
|
+
filter: 'text'
|
|
23737
|
+
}, {
|
|
23738
|
+
field: 'faxSwitchboard',
|
|
23739
|
+
filter: 'text'
|
|
23740
|
+
}]
|
|
23741
|
+
},
|
|
23742
|
+
detailInfo: {
|
|
23743
|
+
colDef: [{
|
|
23744
|
+
field: 'detailInfoNo',
|
|
23745
|
+
filter: 'number',
|
|
23746
|
+
required: true,
|
|
23747
|
+
editable: false
|
|
23748
|
+
}, {
|
|
23749
|
+
headerName: 'externalName',
|
|
23750
|
+
marryChildren: true,
|
|
23751
|
+
required: true,
|
|
23752
|
+
children: [{
|
|
23753
|
+
field: 'externalName.DE',
|
|
23754
|
+
headerName: 'DE',
|
|
23755
|
+
isDictionary: true,
|
|
23756
|
+
filter: 'text'
|
|
23757
|
+
}, {
|
|
23758
|
+
field: 'externalName.EN',
|
|
23759
|
+
headerName: 'EN',
|
|
23760
|
+
isDictionary: true,
|
|
23761
|
+
filter: 'text'
|
|
23762
|
+
}, {
|
|
23763
|
+
field: 'externalName.FR',
|
|
23764
|
+
headerName: 'FR',
|
|
23765
|
+
isDictionary: true,
|
|
23766
|
+
filter: 'text'
|
|
23767
|
+
}]
|
|
23768
|
+
}, {
|
|
23769
|
+
headerName: 'internalName',
|
|
23770
|
+
marryChildren: true,
|
|
23771
|
+
required: true,
|
|
23772
|
+
children: [{
|
|
23773
|
+
field: 'internalName.DE',
|
|
23774
|
+
headerName: 'DE',
|
|
23775
|
+
isDictionary: true,
|
|
23776
|
+
filter: 'text'
|
|
23777
|
+
}, {
|
|
23778
|
+
field: 'internalName.EN',
|
|
23779
|
+
headerName: 'EN',
|
|
23780
|
+
isDictionary: true,
|
|
23781
|
+
filter: 'text'
|
|
23782
|
+
}, {
|
|
23783
|
+
field: 'internalName.FR',
|
|
23784
|
+
headerName: 'FR',
|
|
23785
|
+
isDictionary: true,
|
|
23786
|
+
filter: 'text'
|
|
23787
|
+
}]
|
|
23788
|
+
}, {
|
|
23789
|
+
headerName: 'toolTip',
|
|
23790
|
+
marryChildren: true,
|
|
23791
|
+
required: true,
|
|
23792
|
+
children: [{
|
|
23793
|
+
field: 'toolTip.DE',
|
|
23794
|
+
headerName: 'DE',
|
|
23795
|
+
isDictionary: true,
|
|
23796
|
+
filter: 'text'
|
|
23797
|
+
}, {
|
|
23798
|
+
field: 'toolTip.EN',
|
|
23799
|
+
headerName: 'EN',
|
|
23800
|
+
isDictionary: true,
|
|
23801
|
+
filter: 'text'
|
|
23802
|
+
}, {
|
|
23803
|
+
field: 'toolTip.FR',
|
|
23804
|
+
headerName: 'FR',
|
|
23805
|
+
isDictionary: true,
|
|
23806
|
+
filter: 'text'
|
|
23807
|
+
}]
|
|
23808
|
+
}]
|
|
23809
|
+
},
|
|
23810
|
+
feature: {
|
|
23811
|
+
colDef: [{
|
|
23812
|
+
field: 'featureNo',
|
|
23813
|
+
filter: 'text',
|
|
23814
|
+
required: true,
|
|
23815
|
+
editable: false
|
|
23816
|
+
}, {
|
|
23817
|
+
headerName: 'featureText',
|
|
23818
|
+
marryChildren: true,
|
|
23819
|
+
required: true,
|
|
23820
|
+
children: [{
|
|
23821
|
+
field: 'featureText.DE',
|
|
23822
|
+
headerName: 'DE',
|
|
23823
|
+
isDictionary: true,
|
|
23824
|
+
filter: 'text'
|
|
23825
|
+
}, {
|
|
23826
|
+
field: 'featureText.EN',
|
|
23827
|
+
headerName: 'EN',
|
|
23828
|
+
isDictionary: true,
|
|
23829
|
+
filter: 'text'
|
|
23830
|
+
}, {
|
|
23831
|
+
field: 'featureText.FR',
|
|
23832
|
+
headerName: 'FR',
|
|
23833
|
+
isDictionary: true,
|
|
23834
|
+
filter: 'text'
|
|
23835
|
+
}]
|
|
23836
|
+
}]
|
|
23837
|
+
},
|
|
23838
|
+
item: {
|
|
23839
|
+
colDef: [{
|
|
23840
|
+
field: 'serieNo',
|
|
23841
|
+
filter: 'text',
|
|
23842
|
+
required: true,
|
|
23843
|
+
editable: false
|
|
23844
|
+
}, {
|
|
23845
|
+
field: 'sequenceNo',
|
|
23846
|
+
filter: 'text',
|
|
23847
|
+
editable: false
|
|
23848
|
+
}, {
|
|
23849
|
+
field: 'typeNo',
|
|
23850
|
+
filter: 'text',
|
|
23851
|
+
required: true,
|
|
23852
|
+
editable: false
|
|
23853
|
+
}, {
|
|
23854
|
+
field: 'edpNumber',
|
|
23855
|
+
filter: 'text'
|
|
23856
|
+
}, {
|
|
23857
|
+
field: 'eanNumber',
|
|
23858
|
+
filter: 'text'
|
|
23859
|
+
}, {
|
|
23860
|
+
headerName: 'shortText',
|
|
23861
|
+
marryChildren: true,
|
|
23862
|
+
required: true,
|
|
23863
|
+
children: [{
|
|
23864
|
+
field: 'shortText.DE',
|
|
23865
|
+
headerName: 'DE',
|
|
23866
|
+
isDictionary: true,
|
|
23867
|
+
filter: 'text'
|
|
23868
|
+
}, {
|
|
23869
|
+
field: 'shortText.EN',
|
|
23870
|
+
headerName: 'EN',
|
|
23871
|
+
isDictionary: true,
|
|
23872
|
+
filter: 'text'
|
|
23873
|
+
}, {
|
|
23874
|
+
field: 'shortText.FR',
|
|
23875
|
+
headerName: 'FR',
|
|
23876
|
+
isDictionary: true,
|
|
23877
|
+
filter: 'text'
|
|
23878
|
+
}]
|
|
23879
|
+
}, {
|
|
23880
|
+
headerName: 'fullText',
|
|
23881
|
+
marryChildren: true,
|
|
23882
|
+
children: [{
|
|
23883
|
+
field: 'fullText.DE',
|
|
23884
|
+
headerName: 'DE',
|
|
23885
|
+
isDictionary: true,
|
|
23886
|
+
filter: 'text'
|
|
23887
|
+
}, {
|
|
23888
|
+
field: 'fullText.EN',
|
|
23889
|
+
headerName: 'EN',
|
|
23890
|
+
isDictionary: true,
|
|
23891
|
+
filter: 'text'
|
|
23892
|
+
}, {
|
|
23893
|
+
field: 'fullText.FR',
|
|
23894
|
+
headerName: 'FR',
|
|
23895
|
+
isDictionary: true,
|
|
23896
|
+
filter: 'text'
|
|
23897
|
+
}]
|
|
23898
|
+
}, {
|
|
23899
|
+
headerName: 'planningAdvice',
|
|
23900
|
+
marryChildren: true,
|
|
23901
|
+
children: [{
|
|
23902
|
+
field: 'planningAdvice.DE',
|
|
23903
|
+
headerName: 'DE',
|
|
23904
|
+
isDictionary: true,
|
|
23905
|
+
filter: 'text'
|
|
23906
|
+
}, {
|
|
23907
|
+
field: 'planningAdvice.EN',
|
|
23908
|
+
headerName: 'EN',
|
|
23909
|
+
isDictionary: true,
|
|
23910
|
+
filter: 'text'
|
|
23911
|
+
}, {
|
|
23912
|
+
field: 'planningAdvice.FR',
|
|
23913
|
+
headerName: 'FR',
|
|
23914
|
+
isDictionary: true,
|
|
23915
|
+
filter: 'text'
|
|
23916
|
+
}]
|
|
23917
|
+
}, {
|
|
23918
|
+
field: 'salesNumber',
|
|
23919
|
+
filter: 'text'
|
|
23920
|
+
}]
|
|
23921
|
+
},
|
|
23922
|
+
option: {
|
|
23923
|
+
colDef: [{
|
|
23924
|
+
field: 'featureNo',
|
|
23925
|
+
filter: 'text',
|
|
23926
|
+
required: true,
|
|
23927
|
+
editable: false
|
|
23928
|
+
}, {
|
|
23929
|
+
field: 'optionKey',
|
|
23930
|
+
filter: 'text',
|
|
23931
|
+
required: true,
|
|
23932
|
+
editable: false
|
|
23933
|
+
}, {
|
|
23934
|
+
headerName: 'optionText',
|
|
23935
|
+
marryChildren: true,
|
|
23936
|
+
required: true,
|
|
23937
|
+
children: [{
|
|
23938
|
+
field: 'optionText.DE',
|
|
23939
|
+
headerName: 'DE',
|
|
23940
|
+
isDictionary: true,
|
|
23941
|
+
filter: 'text'
|
|
23942
|
+
}, {
|
|
23943
|
+
field: 'optionText.EN',
|
|
23944
|
+
isDictionary: true,
|
|
23945
|
+
filter: 'text'
|
|
23946
|
+
}, {
|
|
23947
|
+
field: 'optionText.FR',
|
|
23948
|
+
isDictionary: true,
|
|
23949
|
+
filter: 'text'
|
|
23950
|
+
}]
|
|
23951
|
+
}, {
|
|
23952
|
+
headerName: 'optionCommentText',
|
|
23953
|
+
marryChildren: true,
|
|
23954
|
+
children: [{
|
|
23955
|
+
field: 'optionCommentText.DE',
|
|
23956
|
+
isDictionary: true,
|
|
23957
|
+
filter: 'text'
|
|
23958
|
+
}, {
|
|
23959
|
+
field: 'optionCommentText.EN',
|
|
23960
|
+
isDictionary: true,
|
|
23961
|
+
filter: 'text'
|
|
23962
|
+
}, {
|
|
23963
|
+
field: 'optionCommentText.FR',
|
|
23964
|
+
isDictionary: true,
|
|
23965
|
+
filter: 'text'
|
|
23966
|
+
}]
|
|
23967
|
+
}]
|
|
23968
|
+
},
|
|
23969
|
+
serie: {
|
|
23970
|
+
colDef: [{
|
|
23971
|
+
headerName: 'seriesName',
|
|
23972
|
+
marryChildren: true,
|
|
23973
|
+
required: true,
|
|
23974
|
+
children: [{
|
|
23975
|
+
field: 'seriesName.DE',
|
|
23976
|
+
isDictionary: true,
|
|
23977
|
+
filter: 'text'
|
|
23978
|
+
}, {
|
|
23979
|
+
field: 'seriesName.EN',
|
|
23980
|
+
isDictionary: true,
|
|
23981
|
+
filter: 'text'
|
|
23982
|
+
}, {
|
|
23983
|
+
field: 'seriesName.FR',
|
|
23984
|
+
isDictionary: true,
|
|
23985
|
+
filter: 'text'
|
|
23986
|
+
}]
|
|
23987
|
+
}, {
|
|
23988
|
+
headerName: 'seriesFullText',
|
|
23989
|
+
marryChildren: true,
|
|
23990
|
+
children: [{
|
|
23991
|
+
field: 'seriesFullText.DE',
|
|
23992
|
+
isDictionary: true,
|
|
23993
|
+
filter: 'text'
|
|
23994
|
+
}, {
|
|
23995
|
+
field: 'seriesFullText.EN',
|
|
23996
|
+
isDictionary: true,
|
|
23997
|
+
filter: 'text'
|
|
23998
|
+
}, {
|
|
23999
|
+
field: 'seriesFullText.FR',
|
|
24000
|
+
isDictionary: true,
|
|
24001
|
+
filter: 'text'
|
|
24002
|
+
}]
|
|
24003
|
+
}, {
|
|
24004
|
+
field: 'serieNo',
|
|
24005
|
+
filter: 'text',
|
|
24006
|
+
required: true,
|
|
24007
|
+
editable: false
|
|
24008
|
+
}]
|
|
24009
|
+
}
|
|
24010
|
+
};
|
|
24011
|
+
|
|
24012
|
+
function ownKeys$9(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; }
|
|
24013
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24014
|
+
var renamingTypes = [{
|
|
24015
|
+
label: 'catalog',
|
|
24016
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['catalog']), {}, {
|
|
24017
|
+
value: 'catalog'
|
|
24018
|
+
}),
|
|
24019
|
+
value: 'catalog'
|
|
24020
|
+
}, {
|
|
24021
|
+
label: 'detailInfo',
|
|
24022
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['detailInfo']), {}, {
|
|
24023
|
+
value: 'detailInfo'
|
|
24024
|
+
}),
|
|
24025
|
+
value: 'detailInfo'
|
|
24026
|
+
}, {
|
|
24027
|
+
label: 'feature',
|
|
24028
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['feature']), {}, {
|
|
24029
|
+
value: 'feature'
|
|
24030
|
+
}),
|
|
24031
|
+
value: 'feature'
|
|
24032
|
+
}, {
|
|
24033
|
+
label: 'item',
|
|
24034
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['item']), {}, {
|
|
24035
|
+
value: 'item'
|
|
24036
|
+
}),
|
|
24037
|
+
value: 'item'
|
|
24038
|
+
}, {
|
|
24039
|
+
label: 'option',
|
|
24040
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['option']), {}, {
|
|
24041
|
+
value: 'option'
|
|
24042
|
+
}),
|
|
24043
|
+
value: 'option'
|
|
24044
|
+
}, {
|
|
24045
|
+
label: 'serie',
|
|
24046
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['serie']), {}, {
|
|
24047
|
+
value: 'serie'
|
|
24048
|
+
}),
|
|
24049
|
+
value: 'serie'
|
|
24050
|
+
}];
|
|
24051
|
+
function IDMCatalogEditor$3(_ref) {
|
|
24052
|
+
var selectedPackage = _ref.selectedPackage,
|
|
24053
|
+
setSelectedPackage = _ref.setSelectedPackage,
|
|
24054
|
+
jwt = _ref.jwt;
|
|
24055
|
+
var _useTranslation = useTranslation$1(),
|
|
24056
|
+
t = _useTranslation.t;
|
|
24057
|
+
var _React$useState = React.useState(renamingTypes[0].data),
|
|
24058
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24059
|
+
selectedType = _React$useState2[0],
|
|
24060
|
+
setSelectedType = _React$useState2[1];
|
|
24061
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
24062
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
24063
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
24064
|
+
children: [t('backoffice.menu.items.label.TableCatalogRenamingIDM'), /*#__PURE__*/jsxs(Space$1, {
|
|
24065
|
+
style: {
|
|
24066
|
+
"float": 'right'
|
|
24067
|
+
},
|
|
24068
|
+
children: [/*#__PURE__*/jsx(PackageSelector, {
|
|
24069
|
+
selectedPackage: selectedPackage,
|
|
24070
|
+
setSelectedPackage: setSelectedPackage,
|
|
24071
|
+
enricherService: "https://gwc-app-d-app-enricher.azurewebsites.net"
|
|
24072
|
+
}), /*#__PURE__*/jsx(SimpleSelect, {
|
|
24073
|
+
options: renamingTypes,
|
|
24074
|
+
value: selectedType,
|
|
24075
|
+
onChange: function onChange(value) {
|
|
24076
|
+
return setSelectedType(value);
|
|
24077
|
+
},
|
|
24078
|
+
placeholder: t('backoffice.menu.items.label.SelectType'),
|
|
24079
|
+
search: true,
|
|
24080
|
+
style: {
|
|
24081
|
+
width: 200
|
|
24082
|
+
}
|
|
24083
|
+
})]
|
|
24084
|
+
})]
|
|
24085
|
+
})
|
|
24086
|
+
}), selectedPackage && selectedType && /*#__PURE__*/jsx(Spreadsheet, {
|
|
24087
|
+
gridId: 'renaming-grid_' + selectedType.value,
|
|
24088
|
+
jwt: jwt,
|
|
24089
|
+
applicationData: {
|
|
24090
|
+
type: selectedType.value,
|
|
24091
|
+
packageId: selectedPackage
|
|
24092
|
+
},
|
|
24093
|
+
configuration: {
|
|
24094
|
+
type: 'dotnetSSM',
|
|
24095
|
+
apiInterface: {
|
|
24096
|
+
read: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/renaming/${type}',
|
|
24097
|
+
create: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/renaming/${type}',
|
|
24098
|
+
"delete": 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/renaming/${type}/${_id}',
|
|
24099
|
+
update: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/renaming/${type}/${_id}'
|
|
24100
|
+
},
|
|
24101
|
+
dateFormat: 'LL',
|
|
24102
|
+
floatingFilter: true,
|
|
24103
|
+
colDef: [].concat(_toConsumableArray(selectedType.colDef), [{
|
|
24104
|
+
field: 'lastUpdatedDate',
|
|
24105
|
+
filter: 'date',
|
|
24106
|
+
cellDataType: 'dateString',
|
|
24107
|
+
editable: false
|
|
24108
|
+
}, {
|
|
24109
|
+
field: 'createdDate',
|
|
24110
|
+
filter: 'date',
|
|
24111
|
+
cellDataType: 'dateString',
|
|
24112
|
+
editable: false
|
|
24113
|
+
}, {
|
|
24114
|
+
field: 'createdByDisplayText',
|
|
24115
|
+
filter: 'text',
|
|
24116
|
+
editable: false
|
|
24117
|
+
}, {
|
|
24118
|
+
field: 'lastUpdatedByDisplayText',
|
|
24119
|
+
filter: 'text',
|
|
24120
|
+
editable: false
|
|
24121
|
+
}, {
|
|
24122
|
+
field: '_id',
|
|
24123
|
+
filter: 'text',
|
|
24124
|
+
editable: false
|
|
24125
|
+
}])
|
|
24126
|
+
}
|
|
24127
|
+
})]
|
|
24128
|
+
});
|
|
24129
|
+
}
|
|
24130
|
+
|
|
24131
|
+
function useCatalogEditor() {
|
|
24132
|
+
var root = useStore();
|
|
24133
|
+
var _useState = useState('IDMTableRenaming'),
|
|
24134
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24135
|
+
openView = _useState2[0],
|
|
24136
|
+
setOpenView = _useState2[1];
|
|
24137
|
+
var _useState3 = useState(),
|
|
24138
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
24139
|
+
selectedPackage = _useState4[0],
|
|
24140
|
+
setSelectedPackage = _useState4[1];
|
|
24141
|
+
return {
|
|
24142
|
+
selectedPackage: selectedPackage,
|
|
24143
|
+
setSelectedPackage: setSelectedPackage,
|
|
24144
|
+
openView: openView,
|
|
24145
|
+
setOpenView: setOpenView,
|
|
24146
|
+
jwt: root.dataStore.jwt,
|
|
24147
|
+
apiConfig: root.configurationStore.apiConfig
|
|
24148
|
+
};
|
|
24149
|
+
}
|
|
24150
|
+
|
|
24151
|
+
function IDMCatalogEditor$2(_ref) {
|
|
24152
|
+
var selectedPackage = _ref.selectedPackage,
|
|
24153
|
+
setSelectedPackage = _ref.setSelectedPackage,
|
|
24154
|
+
jwt = _ref.jwt;
|
|
24155
|
+
var _useTranslation = useTranslation$1(),
|
|
24156
|
+
t = _useTranslation.t;
|
|
24157
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
24158
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
24159
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
24160
|
+
children: [t('backoffice.menu.items.label.IDMTableTabGroups'), /*#__PURE__*/jsx(Space$1, {
|
|
24161
|
+
style: {
|
|
24162
|
+
"float": 'right'
|
|
24163
|
+
},
|
|
24164
|
+
children: /*#__PURE__*/jsx(PackageSelector, {
|
|
24165
|
+
selectedPackage: selectedPackage,
|
|
24166
|
+
setSelectedPackage: setSelectedPackage,
|
|
24167
|
+
enricherService: "https://gwc-app-d-app-enricher.azurewebsites.net"
|
|
24168
|
+
})
|
|
24169
|
+
})]
|
|
24170
|
+
})
|
|
24171
|
+
}), selectedPackage && /*#__PURE__*/jsx(Spreadsheet, {
|
|
24172
|
+
gridId: 'crud-grid_tabgroups',
|
|
24173
|
+
jwt: jwt,
|
|
24174
|
+
applicationData: {
|
|
24175
|
+
packageId: selectedPackage
|
|
24176
|
+
},
|
|
24177
|
+
configuration: {
|
|
24178
|
+
type: 'dotnetSSM',
|
|
24179
|
+
apiInterface: {
|
|
24180
|
+
//TODO: Es gibt globale Tabgroups, die vordefiniert sind und pro Enricher Paket nochmals angepasst werden können -endpoint anpassen?
|
|
24181
|
+
read: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/tabgroup',
|
|
24182
|
+
create: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/tabgroup',
|
|
24183
|
+
"delete": 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/tabgroup/${_id}',
|
|
24184
|
+
update: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/tabgroup/${_id}'
|
|
24185
|
+
},
|
|
24186
|
+
dateFormat: 'LL',
|
|
24187
|
+
floatingFilter: true,
|
|
24188
|
+
colDef: [{
|
|
24189
|
+
headerName: 'Name',
|
|
24190
|
+
marryChildren: true,
|
|
24191
|
+
required: true,
|
|
24192
|
+
children: [{
|
|
24193
|
+
field: 'name.de',
|
|
24194
|
+
headerName: 'DE',
|
|
24195
|
+
isDictionary: true,
|
|
24196
|
+
filter: 'text'
|
|
24197
|
+
}, {
|
|
24198
|
+
field: 'name.en',
|
|
24199
|
+
headerName: 'EN',
|
|
24200
|
+
isDictionary: true,
|
|
24201
|
+
filter: 'text'
|
|
24202
|
+
}, {
|
|
24203
|
+
field: 'name.fr',
|
|
24204
|
+
headerName: 'FR',
|
|
24205
|
+
isDictionary: true,
|
|
24206
|
+
filter: 'text'
|
|
24207
|
+
}, {
|
|
24208
|
+
field: 'name.it',
|
|
24209
|
+
headerName: 'IT',
|
|
24210
|
+
isDictionary: true,
|
|
24211
|
+
filter: 'text'
|
|
24212
|
+
}]
|
|
24213
|
+
}, {
|
|
24214
|
+
field: 'featureNos',
|
|
24215
|
+
headerName: 'FeatureNo (TODO Lookup)',
|
|
24216
|
+
cellDataType: 'string',
|
|
24217
|
+
editable: true,
|
|
24218
|
+
width: 200
|
|
24219
|
+
}, {
|
|
24220
|
+
field: 'organizationId',
|
|
24221
|
+
headerName: 'OrganizationId (TODO DefaultValue)',
|
|
24222
|
+
cellDataType: 'string',
|
|
24223
|
+
editable: true,
|
|
24224
|
+
width: 200
|
|
24225
|
+
}, {
|
|
24226
|
+
field: 'lastUpdatedDate',
|
|
24227
|
+
filter: 'date',
|
|
24228
|
+
cellDataType: 'dateString',
|
|
24229
|
+
editable: false
|
|
24230
|
+
}, {
|
|
24231
|
+
field: 'createdDate',
|
|
24232
|
+
filter: 'date',
|
|
24233
|
+
cellDataType: 'dateString',
|
|
24234
|
+
editable: false
|
|
24235
|
+
}, {
|
|
24236
|
+
field: 'createdByDisplayText',
|
|
24237
|
+
filter: 'text',
|
|
24238
|
+
editable: false
|
|
24239
|
+
}, {
|
|
24240
|
+
field: 'lastUpdatedByDisplayText',
|
|
24241
|
+
filter: 'text',
|
|
24242
|
+
editable: false
|
|
24243
|
+
}, {
|
|
24244
|
+
field: '_id',
|
|
24245
|
+
filter: 'text',
|
|
24246
|
+
editable: false
|
|
24247
|
+
}]
|
|
24248
|
+
}
|
|
24249
|
+
})]
|
|
24250
|
+
});
|
|
24251
|
+
}
|
|
24252
|
+
|
|
24253
|
+
var config = {
|
|
24254
|
+
detailInfos: {
|
|
24255
|
+
colDef: [{
|
|
24256
|
+
field: '_id',
|
|
24257
|
+
filter: 'text',
|
|
24258
|
+
editable: false
|
|
24259
|
+
}, {
|
|
24260
|
+
field: 'detailInfoNo',
|
|
24261
|
+
filter: 'number',
|
|
24262
|
+
editable: false
|
|
24263
|
+
}, {
|
|
24264
|
+
field: 'classification',
|
|
24265
|
+
filter: 'text',
|
|
24266
|
+
editable: false
|
|
24267
|
+
}, {
|
|
24268
|
+
field: 'infoType',
|
|
24269
|
+
filter: 'number',
|
|
24270
|
+
editable: false
|
|
24271
|
+
}, {
|
|
24272
|
+
field: 'layer',
|
|
24273
|
+
filter: 'number',
|
|
24274
|
+
editable: false
|
|
24275
|
+
}, {
|
|
24276
|
+
field: 'url',
|
|
24277
|
+
filter: 'text',
|
|
24278
|
+
editable: false
|
|
24279
|
+
}, {
|
|
24280
|
+
field: 'hashValue',
|
|
24281
|
+
filter: 'text',
|
|
24282
|
+
editable: false
|
|
24283
|
+
}, {
|
|
24284
|
+
field: 'isoLanguageId',
|
|
24285
|
+
filter: 'text',
|
|
24286
|
+
editable: false
|
|
24287
|
+
}, {
|
|
24288
|
+
field: 'mediaType',
|
|
24289
|
+
filter: 'text',
|
|
24290
|
+
editable: false
|
|
24291
|
+
}, {
|
|
24292
|
+
field: 'functionType',
|
|
24293
|
+
filter: 'text',
|
|
24294
|
+
editable: false
|
|
24295
|
+
}, {
|
|
24296
|
+
field: 'mediaItemId',
|
|
24297
|
+
filter: 'text',
|
|
24298
|
+
editable: false
|
|
24299
|
+
}, {
|
|
24300
|
+
field: 'mediaItemRefId',
|
|
24301
|
+
filter: 'text',
|
|
24302
|
+
editable: false
|
|
24303
|
+
}, {
|
|
24304
|
+
field: 'error',
|
|
24305
|
+
filter: 'text',
|
|
24306
|
+
editable: false
|
|
24307
|
+
}, {
|
|
24308
|
+
headerName: 'externalName',
|
|
24309
|
+
marryChildren: true,
|
|
24310
|
+
required: true,
|
|
24311
|
+
editable: false,
|
|
24312
|
+
children: [{
|
|
24313
|
+
field: 'externalName.de',
|
|
24314
|
+
headerName: 'DE',
|
|
24315
|
+
isDictionary: true,
|
|
24316
|
+
editable: false,
|
|
24317
|
+
filter: 'text'
|
|
24318
|
+
}, {
|
|
24319
|
+
field: 'externalName.en',
|
|
24320
|
+
headerName: 'EN',
|
|
24321
|
+
isDictionary: true,
|
|
24322
|
+
editable: false,
|
|
24323
|
+
filter: 'text'
|
|
24324
|
+
}, {
|
|
24325
|
+
field: 'externalName.fr',
|
|
24326
|
+
headerName: 'FR',
|
|
24327
|
+
isDictionary: true,
|
|
24328
|
+
filter: 'text',
|
|
24329
|
+
editable: false
|
|
24330
|
+
}]
|
|
24331
|
+
}, {
|
|
24332
|
+
headerName: 'internalName',
|
|
24333
|
+
marryChildren: true,
|
|
24334
|
+
required: true,
|
|
24335
|
+
children: [{
|
|
24336
|
+
field: 'internalName.de',
|
|
24337
|
+
headerName: 'DE',
|
|
24338
|
+
isDictionary: true,
|
|
24339
|
+
filter: 'text'
|
|
24340
|
+
}, {
|
|
24341
|
+
field: 'internalName.en',
|
|
24342
|
+
headerName: 'EN',
|
|
24343
|
+
isDictionary: true,
|
|
24344
|
+
filter: 'text'
|
|
24345
|
+
}, {
|
|
24346
|
+
field: 'internalName.fr',
|
|
24347
|
+
headerName: 'FR',
|
|
24348
|
+
isDictionary: true,
|
|
24349
|
+
filter: 'text'
|
|
24350
|
+
}]
|
|
24351
|
+
}, {
|
|
24352
|
+
headerName: 'toolTip',
|
|
24353
|
+
marryChildren: true,
|
|
24354
|
+
required: true,
|
|
24355
|
+
children: [{
|
|
24356
|
+
field: 'toolTip.de',
|
|
24357
|
+
headerName: 'DE',
|
|
24358
|
+
isDictionary: true,
|
|
24359
|
+
filter: 'text'
|
|
24360
|
+
}, {
|
|
24361
|
+
field: 'toolTip.en',
|
|
24362
|
+
headerName: 'EN',
|
|
24363
|
+
isDictionary: true,
|
|
24364
|
+
filter: 'text'
|
|
24365
|
+
}, {
|
|
24366
|
+
field: 'toolTip.fr',
|
|
24367
|
+
headerName: 'FR',
|
|
24368
|
+
isDictionary: true,
|
|
24369
|
+
filter: 'text'
|
|
24370
|
+
}]
|
|
24371
|
+
}, {
|
|
24372
|
+
field: 'catalogId',
|
|
24373
|
+
filter: 'text',
|
|
24374
|
+
editable: false
|
|
24375
|
+
}, {
|
|
24376
|
+
field: 'organizationId',
|
|
24377
|
+
filter: 'text',
|
|
24378
|
+
editable: false
|
|
24379
|
+
}]
|
|
24380
|
+
},
|
|
24381
|
+
features: {
|
|
24382
|
+
colDef: [{
|
|
24383
|
+
field: '_id',
|
|
24384
|
+
filter: 'text',
|
|
24385
|
+
editable: false
|
|
24386
|
+
}, {
|
|
24387
|
+
field: 'sequenceNo',
|
|
24388
|
+
filter: 'number',
|
|
24389
|
+
editable: false
|
|
24390
|
+
}, {
|
|
24391
|
+
headerName: 'featureText',
|
|
24392
|
+
marryChildren: true,
|
|
24393
|
+
required: true,
|
|
24394
|
+
editable: false,
|
|
24395
|
+
children: [{
|
|
24396
|
+
field: 'featureText.de',
|
|
24397
|
+
headerName: 'DE',
|
|
24398
|
+
isDictionary: true,
|
|
24399
|
+
editable: false,
|
|
24400
|
+
filter: 'text'
|
|
24401
|
+
}, {
|
|
24402
|
+
field: 'featureText.en',
|
|
24403
|
+
headerName: 'EN',
|
|
24404
|
+
isDictionary: true,
|
|
24405
|
+
editable: false,
|
|
24406
|
+
filter: 'text'
|
|
24407
|
+
}, {
|
|
24408
|
+
field: 'featureText.fr',
|
|
24409
|
+
headerName: 'FR',
|
|
24410
|
+
isDictionary: true,
|
|
24411
|
+
editable: false,
|
|
24412
|
+
filter: 'text'
|
|
24413
|
+
}]
|
|
24414
|
+
}, {
|
|
24415
|
+
field: 'featureNo',
|
|
24416
|
+
filter: 'text',
|
|
24417
|
+
editable: false
|
|
24418
|
+
}, {
|
|
24419
|
+
field: 'catalogId',
|
|
24420
|
+
filter: 'text',
|
|
24421
|
+
editable: false
|
|
24422
|
+
}, {
|
|
24423
|
+
field: 'organizationId',
|
|
24424
|
+
filter: 'text',
|
|
24425
|
+
editable: false
|
|
24426
|
+
}, {
|
|
24427
|
+
field: 'headerPosVariationType',
|
|
24428
|
+
filter: 'text',
|
|
24429
|
+
editable: false
|
|
24430
|
+
}, {
|
|
24431
|
+
field: 'featureT',
|
|
24432
|
+
filter: 'text',
|
|
24433
|
+
editable: false
|
|
24434
|
+
}, {
|
|
24435
|
+
field: 'measureUnit',
|
|
24436
|
+
filter: 'text',
|
|
24437
|
+
editable: false
|
|
24438
|
+
}, {
|
|
24439
|
+
field: 'measureParameter',
|
|
24440
|
+
filter: 'text',
|
|
24441
|
+
editable: false
|
|
24442
|
+
}]
|
|
24443
|
+
},
|
|
24444
|
+
series: {
|
|
24445
|
+
colDef: [{
|
|
24446
|
+
field: '_id',
|
|
24447
|
+
filter: 'text',
|
|
24448
|
+
editable: false
|
|
24449
|
+
}, {
|
|
24450
|
+
headerName: 'seriesName',
|
|
24451
|
+
marryChildren: true,
|
|
24452
|
+
required: true,
|
|
24453
|
+
editable: false,
|
|
24454
|
+
children: [{
|
|
24455
|
+
field: 'seriesName.de',
|
|
24456
|
+
headerName: 'DE',
|
|
24457
|
+
isDictionary: true,
|
|
24458
|
+
editable: false,
|
|
24459
|
+
filter: 'text'
|
|
24460
|
+
}, {
|
|
24461
|
+
field: 'seriesName.en',
|
|
24462
|
+
headerName: 'EN',
|
|
24463
|
+
isDictionary: true,
|
|
24464
|
+
editable: false,
|
|
24465
|
+
filter: 'text'
|
|
24466
|
+
}, {
|
|
24467
|
+
field: 'seriesName.fr',
|
|
24468
|
+
headerName: 'FR',
|
|
24469
|
+
isDictionary: true,
|
|
24470
|
+
editable: false,
|
|
24471
|
+
filter: 'text'
|
|
24472
|
+
}]
|
|
24473
|
+
}, {
|
|
24474
|
+
headerName: 'SeriesFullText',
|
|
24475
|
+
marryChildren: true,
|
|
24476
|
+
required: true,
|
|
24477
|
+
editable: false,
|
|
24478
|
+
children: [{
|
|
24479
|
+
field: 'seriesFullText.de',
|
|
24480
|
+
headerName: 'DE',
|
|
24481
|
+
isDictionary: true,
|
|
24482
|
+
editable: false,
|
|
24483
|
+
filter: 'text'
|
|
24484
|
+
}, {
|
|
24485
|
+
field: 'seriesFullText.en',
|
|
24486
|
+
headerName: 'EN',
|
|
24487
|
+
isDictionary: true,
|
|
24488
|
+
editable: false,
|
|
24489
|
+
filter: 'text'
|
|
24490
|
+
}, {
|
|
24491
|
+
field: 'seriesFullText.fr',
|
|
24492
|
+
headerName: 'FR',
|
|
24493
|
+
isDictionary: true,
|
|
24494
|
+
editable: false,
|
|
24495
|
+
filter: 'text'
|
|
24496
|
+
}]
|
|
24497
|
+
}, {
|
|
24498
|
+
field: 'serieNo',
|
|
24499
|
+
filter: 'number',
|
|
24500
|
+
editable: false
|
|
24501
|
+
}, {
|
|
24502
|
+
field: 'catalogId',
|
|
24503
|
+
filter: 'text',
|
|
24504
|
+
editable: false
|
|
24505
|
+
}, {
|
|
24506
|
+
field: 'organizationId',
|
|
24507
|
+
filter: 'text',
|
|
24508
|
+
editable: false
|
|
24509
|
+
}, {
|
|
24510
|
+
field: 'sequenceNo',
|
|
24511
|
+
filter: 'number',
|
|
24512
|
+
editable: false
|
|
24513
|
+
}, {
|
|
24514
|
+
field: 'purchaseRetailId',
|
|
24515
|
+
filter: 'number',
|
|
24516
|
+
editable: false
|
|
24517
|
+
}, {
|
|
24518
|
+
field: 'validFrom',
|
|
24519
|
+
filter: 'date',
|
|
24520
|
+
cellDataType: 'dateString',
|
|
24521
|
+
editable: false
|
|
24522
|
+
}, {
|
|
24523
|
+
field: 'validUntil',
|
|
24524
|
+
filter: 'date',
|
|
24525
|
+
cellDataType: 'dateString',
|
|
24526
|
+
editable: false
|
|
24527
|
+
}]
|
|
24528
|
+
},
|
|
24529
|
+
serieItems: {
|
|
24530
|
+
colDef: [{
|
|
24531
|
+
field: 'typeNo',
|
|
24532
|
+
filter: 'text',
|
|
24533
|
+
editable: false
|
|
24534
|
+
}, {
|
|
24535
|
+
field: 'edpNumber',
|
|
24536
|
+
filter: 'text',
|
|
24537
|
+
editable: false
|
|
24538
|
+
}, {
|
|
24539
|
+
field: 'eanNumber',
|
|
24540
|
+
filter: 'text',
|
|
24541
|
+
editable: false
|
|
24542
|
+
}, {
|
|
24543
|
+
headerName: 'shortText',
|
|
24544
|
+
marryChildren: true,
|
|
24545
|
+
required: true,
|
|
24546
|
+
editable: false,
|
|
24547
|
+
children: [{
|
|
24548
|
+
field: 'shortText.de',
|
|
24549
|
+
headerName: 'DE',
|
|
24550
|
+
isDictionary: true,
|
|
24551
|
+
filter: 'text',
|
|
24552
|
+
editable: false
|
|
24553
|
+
}, {
|
|
24554
|
+
field: 'shortText.en',
|
|
24555
|
+
headerName: 'EN',
|
|
24556
|
+
isDictionary: true,
|
|
24557
|
+
filter: 'text',
|
|
24558
|
+
editable: false
|
|
24559
|
+
}, {
|
|
24560
|
+
field: 'shortText.fr',
|
|
24561
|
+
headerName: 'FR',
|
|
24562
|
+
isDictionary: true,
|
|
24563
|
+
filter: 'text',
|
|
24564
|
+
editable: false
|
|
24565
|
+
}]
|
|
24566
|
+
}, {
|
|
24567
|
+
headerName: 'fullText',
|
|
24568
|
+
marryChildren: true,
|
|
24569
|
+
required: true,
|
|
24570
|
+
editable: false,
|
|
24571
|
+
children: [{
|
|
24572
|
+
field: 'fullText.de',
|
|
24573
|
+
headerName: 'DE',
|
|
24574
|
+
isDictionary: true,
|
|
24575
|
+
filter: 'text',
|
|
24576
|
+
editable: false
|
|
24577
|
+
}, {
|
|
24578
|
+
field: 'fullText.en',
|
|
24579
|
+
headerName: 'EN',
|
|
24580
|
+
isDictionary: true,
|
|
24581
|
+
filter: 'text',
|
|
24582
|
+
editable: false
|
|
24583
|
+
}, {
|
|
24584
|
+
field: 'fullText.fr',
|
|
24585
|
+
headerName: 'FR',
|
|
24586
|
+
isDictionary: true,
|
|
24587
|
+
filter: 'text',
|
|
24588
|
+
editable: false
|
|
24589
|
+
}]
|
|
24590
|
+
}, {
|
|
24591
|
+
field: 'featureClassRefNo',
|
|
24592
|
+
filter: 'number',
|
|
24593
|
+
editable: false
|
|
24594
|
+
}, {
|
|
24595
|
+
field: 'priceTypeRef',
|
|
24596
|
+
filter: 'number',
|
|
24597
|
+
editable: false
|
|
24598
|
+
}, {
|
|
24599
|
+
field: 'itemIdentification',
|
|
24600
|
+
filter: 'text',
|
|
24601
|
+
editable: false
|
|
24602
|
+
}, {
|
|
24603
|
+
field: 'catalogPage',
|
|
24604
|
+
filter: 'text',
|
|
24605
|
+
editable: false
|
|
24606
|
+
}, {
|
|
24607
|
+
field: 'validFromDate',
|
|
24608
|
+
filter: 'date',
|
|
24609
|
+
cellDataType: 'dateString',
|
|
24610
|
+
editable: false
|
|
24611
|
+
}, {
|
|
24612
|
+
field: 'validUntilDate',
|
|
24613
|
+
filter: 'date',
|
|
24614
|
+
cellDataType: 'dateString',
|
|
24615
|
+
editable: false
|
|
24616
|
+
}, {
|
|
24617
|
+
field: 'weightBrutto',
|
|
24618
|
+
filter: 'number',
|
|
24619
|
+
editable: false
|
|
24620
|
+
}, {
|
|
24621
|
+
field: 'weightNetto',
|
|
24622
|
+
filter: 'number',
|
|
24623
|
+
editable: false
|
|
24624
|
+
}, {
|
|
24625
|
+
field: 'volume',
|
|
24626
|
+
filter: 'number',
|
|
24627
|
+
editable: false
|
|
24628
|
+
}, {
|
|
24629
|
+
field: 'minimumDeliveryTime',
|
|
24630
|
+
filter: 'number',
|
|
24631
|
+
editable: false
|
|
24632
|
+
}, {
|
|
24633
|
+
field: 'typeKey',
|
|
24634
|
+
filter: 'text',
|
|
24635
|
+
editable: false
|
|
24636
|
+
}, {
|
|
24637
|
+
field: 'eClassNo',
|
|
24638
|
+
filter: 'number',
|
|
24639
|
+
editable: false
|
|
24640
|
+
}, {
|
|
24641
|
+
field: 'detailInfoRefs',
|
|
24642
|
+
editable: false
|
|
24643
|
+
}, {
|
|
24644
|
+
field: 'partListExclusive',
|
|
24645
|
+
editable: false
|
|
24646
|
+
}, {
|
|
24647
|
+
field: 'partListRef',
|
|
24648
|
+
filter: 'text',
|
|
24649
|
+
editable: false
|
|
24650
|
+
}, {
|
|
24651
|
+
field: 'decisionRefs',
|
|
24652
|
+
editable: false
|
|
24653
|
+
}, {
|
|
24654
|
+
field: 'mandatoryAdditionalItems',
|
|
24655
|
+
editable: false
|
|
24656
|
+
}, {
|
|
24657
|
+
field: 'optionalAdditionalItems',
|
|
24658
|
+
editable: false
|
|
24659
|
+
}, {
|
|
24660
|
+
field: 'sequenceNo',
|
|
24661
|
+
filter: 'number',
|
|
24662
|
+
editable: false
|
|
24663
|
+
}, {
|
|
24664
|
+
headerName: 'planningAdvice',
|
|
24665
|
+
marryChildren: true,
|
|
24666
|
+
required: true,
|
|
24667
|
+
children: [{
|
|
24668
|
+
field: 'planningAdvice.de',
|
|
24669
|
+
headerName: 'DE',
|
|
24670
|
+
isDictionary: true,
|
|
24671
|
+
filter: 'text'
|
|
24672
|
+
}, {
|
|
24673
|
+
field: 'planningAdvice.en',
|
|
24674
|
+
headerName: 'EN',
|
|
24675
|
+
isDictionary: true,
|
|
24676
|
+
filter: 'text'
|
|
24677
|
+
}, {
|
|
24678
|
+
field: 'planningAdvice.fr',
|
|
24679
|
+
headerName: 'FR',
|
|
24680
|
+
isDictionary: true,
|
|
24681
|
+
filter: 'text'
|
|
24682
|
+
}]
|
|
24683
|
+
}, {
|
|
24684
|
+
headerName: 'groupTitleDb',
|
|
24685
|
+
marryChildren: true,
|
|
24686
|
+
required: true,
|
|
24687
|
+
children: [{
|
|
24688
|
+
field: 'optionalAdditionalItems.groupTitleDb.de',
|
|
24689
|
+
headerName: 'DE',
|
|
24690
|
+
isDictionary: true,
|
|
24691
|
+
filter: 'text'
|
|
24692
|
+
}, {
|
|
24693
|
+
field: 'optionalAdditionalItems.groupTitleDb.en',
|
|
24694
|
+
headerName: 'EN',
|
|
24695
|
+
isDictionary: true,
|
|
24696
|
+
filter: 'text'
|
|
24697
|
+
}, {
|
|
24698
|
+
field: 'optionalAdditionalItems.groupTitleDb.fr',
|
|
24699
|
+
headerName: 'FR',
|
|
24700
|
+
isDictionary: true,
|
|
24701
|
+
filter: 'text'
|
|
24702
|
+
}]
|
|
24703
|
+
}, {
|
|
24704
|
+
field: 'salesNumber',
|
|
24705
|
+
filter: 'text',
|
|
24706
|
+
editable: false
|
|
24707
|
+
}]
|
|
24708
|
+
},
|
|
24709
|
+
featureOptions: {
|
|
24710
|
+
colDef: [{
|
|
24711
|
+
field: '_id',
|
|
24712
|
+
filter: 'text',
|
|
24713
|
+
editable: false
|
|
24714
|
+
}, {
|
|
24715
|
+
field: 'sequenceNo',
|
|
24716
|
+
filter: 'number',
|
|
24717
|
+
editable: false
|
|
24718
|
+
}, {
|
|
24719
|
+
field: 'optionKey',
|
|
24720
|
+
filter: 'text',
|
|
24721
|
+
editable: false
|
|
24722
|
+
}, {
|
|
24723
|
+
headerName: 'optionText',
|
|
24724
|
+
marryChildren: true,
|
|
24725
|
+
required: true,
|
|
24726
|
+
editable: false,
|
|
24727
|
+
children: [{
|
|
24728
|
+
field: 'optionText.de',
|
|
24729
|
+
headerName: 'DE',
|
|
24730
|
+
isDictionary: true,
|
|
24731
|
+
editable: false,
|
|
24732
|
+
filter: 'text'
|
|
24733
|
+
}, {
|
|
24734
|
+
field: 'optionText.en',
|
|
24735
|
+
headerName: 'EN',
|
|
24736
|
+
isDictionary: true,
|
|
24737
|
+
editable: false,
|
|
24738
|
+
filter: 'text'
|
|
24739
|
+
}, {
|
|
24740
|
+
field: 'optionText.fr',
|
|
24741
|
+
headerName: 'FR',
|
|
24742
|
+
isDictionary: true,
|
|
24743
|
+
editable: false,
|
|
24744
|
+
filter: 'text'
|
|
24745
|
+
}]
|
|
24746
|
+
}, {
|
|
24747
|
+
headerName: 'optionCommentText',
|
|
24748
|
+
marryChildren: true,
|
|
24749
|
+
required: true,
|
|
24750
|
+
editable: false,
|
|
24751
|
+
children: [{
|
|
24752
|
+
field: 'optionCommentText.de',
|
|
24753
|
+
headerName: 'DE',
|
|
24754
|
+
isDictionary: true,
|
|
24755
|
+
editable: false,
|
|
24756
|
+
filter: 'text'
|
|
24757
|
+
}, {
|
|
24758
|
+
field: 'optionCommentText.en',
|
|
24759
|
+
headerName: 'EN',
|
|
24760
|
+
isDictionary: true,
|
|
24761
|
+
editable: false,
|
|
24762
|
+
filter: 'text'
|
|
24763
|
+
}, {
|
|
24764
|
+
field: 'optionCommentText.fr',
|
|
24765
|
+
headerName: 'FR',
|
|
24766
|
+
isDictionary: true,
|
|
24767
|
+
editable: false,
|
|
24768
|
+
filter: 'text'
|
|
24769
|
+
}]
|
|
24770
|
+
}, {
|
|
24771
|
+
field: 'optionFreeText',
|
|
24772
|
+
editable: false
|
|
24773
|
+
}, {
|
|
24774
|
+
field: 'validFromDate',
|
|
24775
|
+
filter: 'date',
|
|
24776
|
+
cellDataType: 'dateString',
|
|
24777
|
+
editable: false
|
|
24778
|
+
}, {
|
|
24779
|
+
field: 'validUntilDate',
|
|
24780
|
+
filter: 'date',
|
|
24781
|
+
cellDataType: 'dateString',
|
|
24782
|
+
editable: false
|
|
24783
|
+
}, {
|
|
24784
|
+
field: 'materialId',
|
|
24785
|
+
filter: 'text',
|
|
24786
|
+
editable: false
|
|
24787
|
+
}, {
|
|
24788
|
+
field: 'materialNo',
|
|
24789
|
+
filter: 'text',
|
|
24790
|
+
editable: false
|
|
24791
|
+
}, {
|
|
24792
|
+
field: 'materialColorR',
|
|
24793
|
+
filter: 'number',
|
|
24794
|
+
editable: false
|
|
24795
|
+
}, {
|
|
24796
|
+
field: 'materialColorG',
|
|
24797
|
+
filter: 'number',
|
|
24798
|
+
editable: false
|
|
24799
|
+
}, {
|
|
24800
|
+
field: 'materialColorB',
|
|
24801
|
+
filter: 'number',
|
|
24802
|
+
editable: false
|
|
24803
|
+
}, {
|
|
24804
|
+
field: 'measureId',
|
|
24805
|
+
filter: 'text',
|
|
24806
|
+
editable: false
|
|
24807
|
+
}, {
|
|
24808
|
+
field: 'measureNo',
|
|
24809
|
+
filter: 'number',
|
|
24810
|
+
editable: false
|
|
24811
|
+
}, {
|
|
24812
|
+
field: 'measureValue',
|
|
24813
|
+
filter: 'number',
|
|
24814
|
+
editable: false
|
|
24815
|
+
}, {
|
|
24816
|
+
field: 'measureUnit',
|
|
24817
|
+
filter: 'text',
|
|
24818
|
+
editable: false
|
|
24819
|
+
}]
|
|
24820
|
+
}
|
|
24821
|
+
};
|
|
24822
|
+
|
|
24823
|
+
function ownKeys$8(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; }
|
|
24824
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24825
|
+
var exclusivityTypes = [{
|
|
24826
|
+
label: 'series',
|
|
24827
|
+
data: _objectSpread$8(_objectSpread$8({}, config['series']), {}, {
|
|
24828
|
+
value: 'series'
|
|
24829
|
+
}),
|
|
24830
|
+
value: 'series'
|
|
24831
|
+
}, {
|
|
24832
|
+
label: 'features',
|
|
24833
|
+
data: _objectSpread$8(_objectSpread$8({}, config['features']), {}, {
|
|
24834
|
+
value: 'features'
|
|
24835
|
+
}),
|
|
24836
|
+
value: 'features'
|
|
24837
|
+
}, {
|
|
24838
|
+
label: 'detailInfos',
|
|
24839
|
+
data: _objectSpread$8(_objectSpread$8({}, config['detailInfos']), {}, {
|
|
24840
|
+
value: 'detailInfos'
|
|
24841
|
+
}),
|
|
24842
|
+
value: 'detailInfos'
|
|
24843
|
+
}, {
|
|
24844
|
+
label: 'serieItems',
|
|
24845
|
+
data: _objectSpread$8(_objectSpread$8({}, config['serieItems']), {}, {
|
|
24846
|
+
value: 'serieItems'
|
|
24847
|
+
}),
|
|
24848
|
+
value: 'serieItems'
|
|
24849
|
+
}, {
|
|
24850
|
+
label: 'featureOptions',
|
|
24851
|
+
data: _objectSpread$8(_objectSpread$8({}, config['featureOptions']), {}, {
|
|
24852
|
+
value: 'featureOptions'
|
|
24853
|
+
}),
|
|
24854
|
+
value: 'featureOptions'
|
|
24855
|
+
}];
|
|
24856
|
+
function IDMCatalogEditor$1(_ref) {
|
|
24857
|
+
var _ref2;
|
|
24858
|
+
var selectedPackage = _ref.selectedPackage,
|
|
24859
|
+
setSelectedPackage = _ref.setSelectedPackage,
|
|
24860
|
+
jwt = _ref.jwt;
|
|
24861
|
+
var _useTranslation = useTranslation$1(),
|
|
24862
|
+
t = _useTranslation.t;
|
|
24863
|
+
var _React$useState = React.useState(exclusivityTypes[0].data),
|
|
24864
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24865
|
+
selectedType = _React$useState2[0],
|
|
24866
|
+
setSelectedType = _React$useState2[1];
|
|
24867
|
+
var _React$useState3 = React.useState(),
|
|
24868
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
24869
|
+
selectedSerie = _React$useState4[0],
|
|
24870
|
+
setSelectedSerie = _React$useState4[1];
|
|
24871
|
+
var _React$useState5 = React.useState(),
|
|
24872
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
24873
|
+
selectedOption = _React$useState6[0],
|
|
24874
|
+
setSelectedOption = _React$useState6[1];
|
|
24875
|
+
var onChangeType = function onChangeType(value) {
|
|
24876
|
+
if (value.value !== 'serieItems') {
|
|
24877
|
+
setSelectedSerie(undefined);
|
|
24878
|
+
}
|
|
24879
|
+
if (value.value !== 'featureOptions') {
|
|
24880
|
+
setSelectedOption(undefined);
|
|
24881
|
+
}
|
|
24882
|
+
setSelectedType(value);
|
|
24883
|
+
};
|
|
24884
|
+
var showTable = function showTable() {
|
|
24885
|
+
/*
|
|
24886
|
+
This condition is valid when:
|
|
24887
|
+
1. `selectedPackage` is defined (not null and not undefined).
|
|
24888
|
+
2. `selectedType` is defined.
|
|
24889
|
+
3. If `selectedType.value` is neither 'serieItems' nor 'featureOptions', the condition is valid regardless of the values of `selectedSerie` and `selectedOption`.
|
|
24890
|
+
4. If `selectedType.value` is 'serieItems', then `selectedSerie` must also be defined for the condition to be valid.
|
|
24891
|
+
5. If `selectedType.value` is 'featureOptions', then `selectedOption` must also be defined for the condition to be valid.
|
|
24892
|
+
*/
|
|
24893
|
+
return selectedPackage && selectedType && (selectedType.value !== 'serieItems' && selectedType.value !== 'featureOptions' || selectedType.value === 'serieItems' && selectedSerie || selectedType.value === 'featureOptions' && selectedOption);
|
|
24894
|
+
};
|
|
24895
|
+
var getPatchId = function getPatchId() {
|
|
24896
|
+
if (selectedType.value === 'serieItems' && selectedSerie) return '${typeNo}';
|
|
24897
|
+
if (selectedType.value === 'featureOptions' && selectedOption) return '${optionKey}';
|
|
24898
|
+
if (selectedType.value === 'series') return '${serieNo}';
|
|
24899
|
+
if (selectedType.value === 'features') return '${featureNo}';
|
|
24900
|
+
if (selectedType.value === 'detailInfos') return '${detailInfoNo}';
|
|
24901
|
+
return '${_id}';
|
|
24902
|
+
};
|
|
24903
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
24904
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
24905
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
24906
|
+
children: [t('backoffice.menu.items.label.IDMTableTabGroups'), /*#__PURE__*/jsxs(Space$1, {
|
|
24907
|
+
style: {
|
|
24908
|
+
"float": 'right'
|
|
24909
|
+
},
|
|
24910
|
+
children: [/*#__PURE__*/jsx(PackageSelector, {
|
|
24911
|
+
selectedPackage: selectedPackage,
|
|
24912
|
+
setSelectedPackage: setSelectedPackage,
|
|
24913
|
+
enricherService: "https://gwc-app-d-app-enricher.azurewebsites.net"
|
|
24914
|
+
}), /*#__PURE__*/jsx(SimpleSelect, {
|
|
24915
|
+
options: exclusivityTypes,
|
|
24916
|
+
value: selectedType,
|
|
24917
|
+
onChange: function onChange(value) {
|
|
24918
|
+
return onChangeType(value);
|
|
24919
|
+
},
|
|
24920
|
+
placeholder: t('backoffice.menu.items.label.SelectType'),
|
|
24921
|
+
search: true,
|
|
24922
|
+
style: {
|
|
24923
|
+
width: 200
|
|
24924
|
+
}
|
|
24925
|
+
}), selectedType.value === 'serieItems' && /*#__PURE__*/jsx(SimpleSelect, {
|
|
24926
|
+
apiInterface: {
|
|
24927
|
+
read: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/' + selectedPackage + '/exclusivity/series'
|
|
24928
|
+
},
|
|
24929
|
+
selectMapping: {
|
|
24930
|
+
label: '${seriesName.de}',
|
|
24931
|
+
value: '${_id}'
|
|
24932
|
+
},
|
|
24933
|
+
value: selectedSerie,
|
|
24934
|
+
onChange: function onChange(value) {
|
|
24935
|
+
return setSelectedSerie(value);
|
|
24936
|
+
},
|
|
24937
|
+
placeholder: t('backoffice.menu.items.label.SelectSerie'),
|
|
24938
|
+
search: true,
|
|
24939
|
+
style: {
|
|
24940
|
+
width: 200
|
|
24941
|
+
}
|
|
24942
|
+
}), selectedType.value === 'featureOptions' && /*#__PURE__*/jsx(SimpleSelect, {
|
|
24943
|
+
apiInterface: {
|
|
24944
|
+
read: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/' + selectedPackage + '/exclusivity/features'
|
|
24945
|
+
},
|
|
24946
|
+
selectMapping: {
|
|
24947
|
+
label: '${featureText.de}',
|
|
24948
|
+
value: '${_id}'
|
|
24949
|
+
},
|
|
24950
|
+
value: selectedOption,
|
|
24951
|
+
onChange: function onChange(value) {
|
|
24952
|
+
return setSelectedOption(value);
|
|
24953
|
+
},
|
|
24954
|
+
placeholder: t('backoffice.menu.items.label.SelectFeature'),
|
|
24955
|
+
search: true,
|
|
24956
|
+
style: {
|
|
24957
|
+
width: 200
|
|
24958
|
+
}
|
|
24959
|
+
})]
|
|
24960
|
+
})]
|
|
24961
|
+
})
|
|
24962
|
+
}), showTable() && /*#__PURE__*/jsx(Spreadsheet, {
|
|
24963
|
+
gridId: (_ref2 = 'crud-grid_exclusivity_' + selectedType.value + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.seriesName.de)) !== null && _ref2 !== void 0 ? _ref2 : '',
|
|
24964
|
+
jwt: jwt,
|
|
24965
|
+
applicationData: {
|
|
24966
|
+
type: selectedType.value,
|
|
24967
|
+
packageId: selectedPackage,
|
|
24968
|
+
subType: selectedType.value === 'serieItems' ? 'series' : 'features',
|
|
24969
|
+
listType: selectedType.value === 'serieItems' ? 'items' : 'options',
|
|
24970
|
+
subTypeId: selectedType.value === 'serieItems' ? selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id : selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption._id
|
|
24971
|
+
},
|
|
24972
|
+
configuration: {
|
|
24973
|
+
type: 'dotnetSSM',
|
|
24974
|
+
apiInterface: {
|
|
24975
|
+
read: !selectedSerie && !selectedOption ? 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/exclusivity/${type}' : 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/exclusivity/${subType}/${subTypeId}/${listType}',
|
|
24976
|
+
update: !selectedSerie && !selectedOption ? 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/exclusivity/${type}/' + getPatchId() : 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/exclusivity/${subType}/${subTypeId}/${listType}/' + getPatchId()
|
|
24977
|
+
},
|
|
24978
|
+
idCol: selectedSerie !== null && selectedSerie !== void 0 && selectedSerie._id ? 'typeNo' : selectedOption ? 'optionKey' : undefined,
|
|
24979
|
+
dateFormat: 'LL',
|
|
24980
|
+
floatingFilter: true,
|
|
24981
|
+
colDef: [{
|
|
24982
|
+
field: 'active',
|
|
24983
|
+
editable: true,
|
|
24984
|
+
cellDataType: 'boolean'
|
|
24985
|
+
}].concat(_toConsumableArray(selectedType.colDef), [{
|
|
24986
|
+
field: 'lastUpdatedDate',
|
|
24987
|
+
filter: 'date',
|
|
24988
|
+
cellDataType: 'dateString',
|
|
24989
|
+
editable: false
|
|
24990
|
+
}, {
|
|
24991
|
+
field: 'createdDate',
|
|
24992
|
+
filter: 'date',
|
|
24993
|
+
cellDataType: 'dateString',
|
|
24994
|
+
editable: false
|
|
24995
|
+
}, {
|
|
24996
|
+
field: 'createdBy',
|
|
24997
|
+
filter: 'text',
|
|
24998
|
+
editable: false
|
|
24999
|
+
}, {
|
|
25000
|
+
field: 'createdByDisplayText',
|
|
25001
|
+
filter: 'text',
|
|
25002
|
+
editable: false
|
|
25003
|
+
}, {
|
|
25004
|
+
field: 'lastUpdatedByDisplayText',
|
|
25005
|
+
filter: 'text',
|
|
25006
|
+
editable: false
|
|
25007
|
+
}, {
|
|
25008
|
+
field: 'lastUpdatedBy',
|
|
25009
|
+
filter: 'text',
|
|
25010
|
+
editable: false
|
|
25011
|
+
}])
|
|
25012
|
+
}
|
|
25013
|
+
})]
|
|
25014
|
+
});
|
|
25015
|
+
}
|
|
25016
|
+
|
|
25017
|
+
function ownKeys$7(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; }
|
|
25018
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25019
|
+
function IDMCatalogEditor() {
|
|
25020
|
+
var state = useCatalogEditor();
|
|
25021
|
+
return /*#__PURE__*/jsxs(Layout, {
|
|
25022
|
+
children: [/*#__PURE__*/jsx(Layout.Sider, {
|
|
25023
|
+
children: /*#__PURE__*/jsx(Menu$1, {
|
|
25024
|
+
theme: "dark",
|
|
25025
|
+
mode: "inline",
|
|
25026
|
+
selectedKeys: state.openView ? [state.openView] : [],
|
|
25027
|
+
onSelect: function onSelect(e) {
|
|
25028
|
+
return state.setOpenView(e.key);
|
|
25029
|
+
},
|
|
25030
|
+
items: [{
|
|
25031
|
+
key: 'IDMTableRenaming',
|
|
25032
|
+
label: 'TODO: Hier kommt die Packages Liste',
|
|
25033
|
+
title: 'TODO: Hier kommt die Packages Liste',
|
|
25034
|
+
disabled: true
|
|
25035
|
+
}, {
|
|
25036
|
+
type: 'divider'
|
|
25037
|
+
}, {
|
|
25038
|
+
key: 'IDMTableRenaming',
|
|
25039
|
+
label: 'IDMTableRenaming'
|
|
25040
|
+
}, {
|
|
25041
|
+
key: 'IDMTableTabGroups',
|
|
25042
|
+
label: 'IDMTableTabGroups'
|
|
25043
|
+
}, {
|
|
25044
|
+
key: 'IDMTableExclusivity',
|
|
25045
|
+
label: 'IDMTableExclusivity'
|
|
25046
|
+
}]
|
|
25047
|
+
})
|
|
25048
|
+
}), /*#__PURE__*/jsx(Layout.Content, {
|
|
25049
|
+
children: /*#__PURE__*/jsx("div", {
|
|
25050
|
+
style: {
|
|
25051
|
+
padding: 16,
|
|
25052
|
+
height: '100%',
|
|
25053
|
+
display: 'flex',
|
|
25054
|
+
flexDirection: 'column'
|
|
25055
|
+
},
|
|
25056
|
+
children: /*#__PURE__*/jsx(Content$1, _objectSpread$7({}, state))
|
|
25057
|
+
})
|
|
25058
|
+
})]
|
|
25059
|
+
});
|
|
25060
|
+
}
|
|
25061
|
+
function Content$1(state) {
|
|
25062
|
+
switch (state.openView) {
|
|
25063
|
+
case 'IDMTableRenaming':
|
|
25064
|
+
return /*#__PURE__*/jsx(IDMCatalogEditor$3, _objectSpread$7({}, state));
|
|
25065
|
+
case 'IDMTableTabGroups':
|
|
25066
|
+
return /*#__PURE__*/jsx(IDMCatalogEditor$2, _objectSpread$7({}, state));
|
|
25067
|
+
case 'IDMTableExclusivity':
|
|
25068
|
+
return /*#__PURE__*/jsx(IDMCatalogEditor$1, _objectSpread$7({}, state));
|
|
25069
|
+
default:
|
|
25070
|
+
return /*#__PURE__*/jsx(Fragment, {});
|
|
25071
|
+
}
|
|
25072
|
+
}
|
|
25073
|
+
|
|
23099
25074
|
var ContentWrapper = function ContentWrapper() {
|
|
23100
25075
|
var root = useStore();
|
|
23101
25076
|
var item = root.contentStore.menuItem;
|
|
23102
25077
|
if (!item) {
|
|
23103
25078
|
return /*#__PURE__*/jsx(Fragment, {});
|
|
23104
25079
|
}
|
|
25080
|
+
if (item.type === 'CatalogEditorIDM') {
|
|
25081
|
+
return /*#__PURE__*/jsx(IDMCatalogEditor, {});
|
|
25082
|
+
}
|
|
23105
25083
|
return /*#__PURE__*/jsxs(Layout.Content, {
|
|
23106
25084
|
id: "contnet",
|
|
23107
25085
|
style: {
|
|
@@ -23199,9 +25177,9 @@ var Content = observer(ContentWrapper);
|
|
|
23199
25177
|
|
|
23200
25178
|
function ownKeys$6(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; }
|
|
23201
25179
|
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23202
|
-
function _createForOfIteratorHelper$3(
|
|
23203
|
-
function _unsupportedIterableToArray$3(
|
|
23204
|
-
function _arrayLikeToArray$3(
|
|
25180
|
+
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; } } }; }
|
|
25181
|
+
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; } }
|
|
25182
|
+
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; }
|
|
23205
25183
|
function useRoleSelectorData (_ref) {
|
|
23206
25184
|
var userId = _ref.userId,
|
|
23207
25185
|
id = _ref.id;
|
|
@@ -23966,9 +25944,9 @@ styleInject(css_248z$3);
|
|
|
23966
25944
|
|
|
23967
25945
|
function ownKeys$5(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; }
|
|
23968
25946
|
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23969
|
-
function _createForOfIteratorHelper$2(
|
|
23970
|
-
function _unsupportedIterableToArray$2(
|
|
23971
|
-
function _arrayLikeToArray$2(
|
|
25947
|
+
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; } } }; }
|
|
25948
|
+
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; } }
|
|
25949
|
+
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; }
|
|
23972
25950
|
function generateCSV(_x, _x2) {
|
|
23973
25951
|
return _generateCSV.apply(this, arguments);
|
|
23974
25952
|
}
|
|
@@ -24090,9 +26068,9 @@ var generateCSVData = /*#__PURE__*/function () {
|
|
|
24090
26068
|
|
|
24091
26069
|
function ownKeys$4(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; }
|
|
24092
26070
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24093
|
-
function _createForOfIteratorHelper$1(
|
|
24094
|
-
function _unsupportedIterableToArray$1(
|
|
24095
|
-
function _arrayLikeToArray$1(
|
|
26071
|
+
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; } } }; }
|
|
26072
|
+
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; } }
|
|
26073
|
+
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; }
|
|
24096
26074
|
var deletedObjects = [];
|
|
24097
26075
|
var addedObjects = [];
|
|
24098
26076
|
|
|
@@ -24713,9 +26691,9 @@ function useRelationSelectorData (_ref) {
|
|
|
24713
26691
|
};
|
|
24714
26692
|
}
|
|
24715
26693
|
|
|
24716
|
-
function _createForOfIteratorHelper(
|
|
24717
|
-
function _unsupportedIterableToArray(
|
|
24718
|
-
function _arrayLikeToArray(
|
|
26694
|
+
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; } } }; }
|
|
26695
|
+
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; } }
|
|
26696
|
+
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; }
|
|
24719
26697
|
function filter(input, getActiveItem, filterFields) {
|
|
24720
26698
|
var filter = {};
|
|
24721
26699
|
var _iterator = _createForOfIteratorHelper(filterFields),
|
|
@@ -24959,7 +26937,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
24959
26937
|
}, item.item._id);
|
|
24960
26938
|
};
|
|
24961
26939
|
|
|
24962
|
-
var Option = Select$
|
|
26940
|
+
var Option = Select$1.Option;
|
|
24963
26941
|
var RelationSelector = function RelationSelector(_ref, ref) {
|
|
24964
26942
|
var _relationState$config, _relationState$config2, _relationState$config3, _searchPlaceholder;
|
|
24965
26943
|
var id = _ref.id,
|
|
@@ -24985,7 +26963,7 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
24985
26963
|
relationState.searchItems('');
|
|
24986
26964
|
}, []);
|
|
24987
26965
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
24988
|
-
children: [relationState.configuration.search != undefined && (((_relationState$config = relationState.configuration.filter) === null || _relationState$config === void 0 ? void 0 : _relationState$config.type) === 'default' ? /*#__PURE__*/jsxs(Select$
|
|
26966
|
+
children: [relationState.configuration.search != undefined && (((_relationState$config = relationState.configuration.filter) === null || _relationState$config === void 0 ? void 0 : _relationState$config.type) === 'default' ? /*#__PURE__*/jsxs(Select$1, {
|
|
24989
26967
|
className: select,
|
|
24990
26968
|
showSearch: true,
|
|
24991
26969
|
suffixIcon: /*#__PURE__*/jsx(PlusSquareOutlined, {}),
|