@crystaldesign/diva-backoffice 24.7.0-beta.9 → 24.7.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/index.js +2336 -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/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_contentitems',
|
|
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,7 +10853,13 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
10547
10853
|
globalValue: 'organization.parentType'
|
|
10548
10854
|
}
|
|
10549
10855
|
}]
|
|
10550
|
-
}
|
|
10856
|
+
}
|
|
10857
|
+
// {
|
|
10858
|
+
// id: 'CatalogEditorIDM',
|
|
10859
|
+
// label: t('backoffice.menu.items.label.CatalogEditorIDM'),
|
|
10860
|
+
// type: 'CatalogEditorIDM',
|
|
10861
|
+
// },
|
|
10862
|
+
]
|
|
10551
10863
|
}, {
|
|
10552
10864
|
label: t('backoffice.menu.items.label.adminarea'),
|
|
10553
10865
|
permission: 'backoffice_admin',
|
|
@@ -10772,9 +11084,9 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
10772
11084
|
};
|
|
10773
11085
|
}
|
|
10774
11086
|
|
|
10775
|
-
function _createForOfIteratorHelper$l(
|
|
10776
|
-
function _unsupportedIterableToArray$l(
|
|
10777
|
-
function _arrayLikeToArray$l(
|
|
11087
|
+
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; } } }; }
|
|
11088
|
+
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; } }
|
|
11089
|
+
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
11090
|
function aplyRule(_ref) {
|
|
10779
11091
|
var rules = _ref.rules,
|
|
10780
11092
|
data = _ref.data,
|
|
@@ -10865,6 +11177,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
10865
11177
|
_defineProperty(this, "_selectedLeaf", undefined);
|
|
10866
11178
|
_defineProperty(this, "_configurationId", void 0);
|
|
10867
11179
|
_defineProperty(this, "_theme", window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'darkmode' : 'lightmode');
|
|
11180
|
+
_defineProperty(this, "_menuCollapsed", false);
|
|
10868
11181
|
makeAutoObservable(this, {
|
|
10869
11182
|
root: false,
|
|
10870
11183
|
_leafs: observable.ref,
|
|
@@ -10899,10 +11212,13 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
10899
11212
|
}, {
|
|
10900
11213
|
key: "setSelectedMenuItem",
|
|
10901
11214
|
value: function setSelectedMenuItem(id) {
|
|
10902
|
-
var _this$_leafs;
|
|
11215
|
+
var _this$_leafs, _this$_selectedLeaf2;
|
|
10903
11216
|
this._selectedLeaf = (_this$_leafs = this._leafs) === null || _this$_leafs === void 0 ? void 0 : _this$_leafs.find(function (l) {
|
|
10904
11217
|
return l.id == id;
|
|
10905
11218
|
});
|
|
11219
|
+
if (((_this$_selectedLeaf2 = this._selectedLeaf) === null || _this$_selectedLeaf2 === void 0 ? void 0 : _this$_selectedLeaf2.type) == 'CatalogEditorIDM') {
|
|
11220
|
+
this.menuCollapsed = true;
|
|
11221
|
+
}
|
|
10906
11222
|
}
|
|
10907
11223
|
}, {
|
|
10908
11224
|
key: "menuItem",
|
|
@@ -10920,6 +11236,14 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
10920
11236
|
this._theme = value;
|
|
10921
11237
|
localStorage.setItem('theme', value);
|
|
10922
11238
|
}
|
|
11239
|
+
}, {
|
|
11240
|
+
key: "menuCollapsed",
|
|
11241
|
+
get: function get() {
|
|
11242
|
+
return this._menuCollapsed;
|
|
11243
|
+
},
|
|
11244
|
+
set: function set(value) {
|
|
11245
|
+
this._menuCollapsed = value;
|
|
11246
|
+
}
|
|
10923
11247
|
}, {
|
|
10924
11248
|
key: "configuration",
|
|
10925
11249
|
get: function get() {
|
|
@@ -11175,9 +11499,9 @@ var _default$3 = /*#__PURE__*/function () {
|
|
|
11175
11499
|
}]);
|
|
11176
11500
|
}();
|
|
11177
11501
|
|
|
11178
|
-
function _createForOfIteratorHelper$k(
|
|
11179
|
-
function _unsupportedIterableToArray$k(
|
|
11180
|
-
function _arrayLikeToArray$k(
|
|
11502
|
+
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; } } }; }
|
|
11503
|
+
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; } }
|
|
11504
|
+
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
11505
|
var LOG$9 = getLogger('Backoffice', 'DownloadStore');
|
|
11182
11506
|
var DownloadStore = /*#__PURE__*/function () {
|
|
11183
11507
|
function DownloadStore(_rootStore) {
|
|
@@ -11770,9 +12094,9 @@ var useStore = function useStore() {
|
|
|
11770
12094
|
return store;
|
|
11771
12095
|
};
|
|
11772
12096
|
|
|
11773
|
-
function _createForOfIteratorHelper$j(
|
|
11774
|
-
function _unsupportedIterableToArray$j(
|
|
11775
|
-
function _arrayLikeToArray$j(
|
|
12097
|
+
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; } } }; }
|
|
12098
|
+
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; } }
|
|
12099
|
+
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
12100
|
function getCombinedValues(data, pattern) {
|
|
11777
12101
|
if (!pattern || !data) {
|
|
11778
12102
|
return data;
|
|
@@ -11794,11 +12118,11 @@ function getCombinedValues(data, pattern) {
|
|
|
11794
12118
|
return value;
|
|
11795
12119
|
}
|
|
11796
12120
|
|
|
11797
|
-
function _createForOfIteratorHelper$i(
|
|
11798
|
-
function _unsupportedIterableToArray$i(
|
|
11799
|
-
function _arrayLikeToArray$i(
|
|
11800
|
-
function ownKeys$
|
|
11801
|
-
function _objectSpread$
|
|
12121
|
+
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; } } }; }
|
|
12122
|
+
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; } }
|
|
12123
|
+
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; }
|
|
12124
|
+
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; }
|
|
12125
|
+
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
12126
|
function useDescriptions (_ref) {
|
|
11803
12127
|
var id = _ref.id;
|
|
11804
12128
|
var root = useStore();
|
|
@@ -11891,7 +12215,7 @@ function _getDisplayData() {
|
|
|
11891
12215
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
11892
12216
|
while (1) switch (_context4.prev = _context4.next) {
|
|
11893
12217
|
case 0:
|
|
11894
|
-
displayData = _objectSpread$
|
|
12218
|
+
displayData = _objectSpread$E({}, data);
|
|
11895
12219
|
_iterator = _createForOfIteratorHelper$i(items);
|
|
11896
12220
|
_context4.prev = 2;
|
|
11897
12221
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -11967,11 +12291,11 @@ function _getDisplayData() {
|
|
|
11967
12291
|
return _getDisplayData.apply(this, arguments);
|
|
11968
12292
|
}
|
|
11969
12293
|
|
|
11970
|
-
function ownKeys$
|
|
11971
|
-
function _objectSpread$
|
|
11972
|
-
function _createForOfIteratorHelper$h(
|
|
11973
|
-
function _unsupportedIterableToArray$h(
|
|
11974
|
-
function _arrayLikeToArray$h(
|
|
12294
|
+
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; }
|
|
12295
|
+
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; }
|
|
12296
|
+
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; } } }; }
|
|
12297
|
+
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; } }
|
|
12298
|
+
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
12299
|
function ActionButton (_ref) {
|
|
11976
12300
|
var action = _ref.action,
|
|
11977
12301
|
callback = _ref.callback,
|
|
@@ -12110,7 +12434,7 @@ function ActionButton (_ref) {
|
|
|
12110
12434
|
_iterator2.f();
|
|
12111
12435
|
}
|
|
12112
12436
|
_context.next = 23;
|
|
12113
|
-
return apiInterface.update(_objectSpread$
|
|
12437
|
+
return apiInterface.update(_objectSpread$D(_objectSpread$D({}, data), {}, {
|
|
12114
12438
|
state: toSwitch
|
|
12115
12439
|
}), data);
|
|
12116
12440
|
case 23:
|
|
@@ -12267,14 +12591,14 @@ function _simpleChangeValue() {
|
|
|
12267
12591
|
break;
|
|
12268
12592
|
}
|
|
12269
12593
|
for (i = 0; i < action.newValues.length; i++) {
|
|
12270
|
-
fieldsToUpdate = _objectSpread$
|
|
12594
|
+
fieldsToUpdate = _objectSpread$D(_objectSpread$D({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
12271
12595
|
}
|
|
12272
12596
|
if (!apiInterface.canUpdate) {
|
|
12273
12597
|
_context2.next = 9;
|
|
12274
12598
|
break;
|
|
12275
12599
|
}
|
|
12276
12600
|
_context2.next = 7;
|
|
12277
|
-
return apiInterface.update(_objectSpread$
|
|
12601
|
+
return apiInterface.update(_objectSpread$D({}, fieldsToUpdate), data);
|
|
12278
12602
|
case 7:
|
|
12279
12603
|
response = _context2.sent;
|
|
12280
12604
|
return _context2.abrupt("return", response);
|
|
@@ -12289,7 +12613,7 @@ function _simpleChangeValue() {
|
|
|
12289
12613
|
return _simpleChangeValue.apply(this, arguments);
|
|
12290
12614
|
}
|
|
12291
12615
|
function A(props) {
|
|
12292
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
12616
|
+
return /*#__PURE__*/jsx("a", _objectSpread$D({}, props));
|
|
12293
12617
|
}
|
|
12294
12618
|
|
|
12295
12619
|
var DescriptionWrapper = function DescriptionWrapper(_ref) {
|
|
@@ -12333,11 +12657,11 @@ var DescriptionWrapper = function DescriptionWrapper(_ref) {
|
|
|
12333
12657
|
};
|
|
12334
12658
|
var Description = observer(DescriptionWrapper);
|
|
12335
12659
|
|
|
12336
|
-
function _createForOfIteratorHelper$g(
|
|
12337
|
-
function _unsupportedIterableToArray$g(
|
|
12338
|
-
function _arrayLikeToArray$g(
|
|
12339
|
-
function ownKeys$
|
|
12340
|
-
function _objectSpread$
|
|
12660
|
+
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; } } }; }
|
|
12661
|
+
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; } }
|
|
12662
|
+
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; }
|
|
12663
|
+
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; }
|
|
12664
|
+
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
12665
|
function useSelectData (_ref) {
|
|
12342
12666
|
var data = _ref.data,
|
|
12343
12667
|
onChange = _ref.onChange,
|
|
@@ -12518,7 +12842,7 @@ function useSelectData (_ref) {
|
|
|
12518
12842
|
setFetching(true);
|
|
12519
12843
|
serverSideParams = {
|
|
12520
12844
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
12521
|
-
return _objectSpread$
|
|
12845
|
+
return _objectSpread$C(_objectSpread$C({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
12522
12846
|
}, {}) : {
|
|
12523
12847
|
_id: [value, 'contains']
|
|
12524
12848
|
},
|
|
@@ -12803,7 +13127,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref) {
|
|
|
12803
13127
|
var filterServerSide = _typeof(apiInterface) == 'object' && _typeof(apiInterface.read) == 'object' && apiInterface.read.filterServerSide;
|
|
12804
13128
|
var selected = state.selected;
|
|
12805
13129
|
return /*#__PURE__*/jsx(Fragment, {
|
|
12806
|
-
children: /*#__PURE__*/jsx(Select$
|
|
13130
|
+
children: /*#__PURE__*/jsx(Select$1, {
|
|
12807
13131
|
labelInValue: mode === 'tags' ? false : true,
|
|
12808
13132
|
style: {
|
|
12809
13133
|
width: '100%',
|
|
@@ -12829,13 +13153,13 @@ var SelectWrapper$1 = function SelectWrapper(_ref) {
|
|
|
12829
13153
|
})
|
|
12830
13154
|
});
|
|
12831
13155
|
};
|
|
12832
|
-
var Select
|
|
13156
|
+
var Select = observer(SelectWrapper$1, {
|
|
12833
13157
|
forwardRef: true
|
|
12834
13158
|
});
|
|
12835
13159
|
|
|
12836
|
-
function _createForOfIteratorHelper$f(
|
|
12837
|
-
function _unsupportedIterableToArray$f(
|
|
12838
|
-
function _arrayLikeToArray$f(
|
|
13160
|
+
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; } } }; }
|
|
13161
|
+
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; } }
|
|
13162
|
+
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
13163
|
var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
12840
13164
|
_ref.id;
|
|
12841
13165
|
var _useDivaCore = useDivaCore(),
|
|
@@ -12952,7 +13276,7 @@ var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
|
12952
13276
|
style: {
|
|
12953
13277
|
marginTop: 18
|
|
12954
13278
|
},
|
|
12955
|
-
children: /*#__PURE__*/jsx(Select
|
|
13279
|
+
children: /*#__PURE__*/jsx(Select, {
|
|
12956
13280
|
mode: "multiple",
|
|
12957
13281
|
apiInterface: {
|
|
12958
13282
|
read: {
|
|
@@ -13017,11 +13341,11 @@ function removeEmpty(data) {
|
|
|
13017
13341
|
return undefined;
|
|
13018
13342
|
}
|
|
13019
13343
|
|
|
13020
|
-
function ownKeys$
|
|
13021
|
-
function _objectSpread$
|
|
13022
|
-
function _createForOfIteratorHelper$e(
|
|
13023
|
-
function _unsupportedIterableToArray$e(
|
|
13024
|
-
function _arrayLikeToArray$e(
|
|
13344
|
+
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; }
|
|
13345
|
+
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; }
|
|
13346
|
+
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; } } }; }
|
|
13347
|
+
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; } }
|
|
13348
|
+
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
13349
|
function useFormData (_ref) {
|
|
13026
13350
|
var _loadedData$_id;
|
|
13027
13351
|
var id = _ref.id,
|
|
@@ -13050,10 +13374,14 @@ function useFormData (_ref) {
|
|
|
13050
13374
|
setSelectedItemsIndex = _useState6[1];
|
|
13051
13375
|
var changedFields = useRef([]);
|
|
13052
13376
|
var _useMemo = useMemo(function () {
|
|
13053
|
-
|
|
13377
|
+
var c = {
|
|
13054
13378
|
apiHandler: root.getApiHandler(id, apiInterface),
|
|
13055
13379
|
configuration: root.configurationStore.getConfiguration(id, 'Form')
|
|
13056
13380
|
};
|
|
13381
|
+
if (c.configuration.itemsByData) {
|
|
13382
|
+
c.configuration.items = c.configuration.itemsByData(inboundData);
|
|
13383
|
+
}
|
|
13384
|
+
return c;
|
|
13057
13385
|
}, [id]),
|
|
13058
13386
|
apiHandler = _useMemo.apiHandler,
|
|
13059
13387
|
configuration = _useMemo.configuration;
|
|
@@ -13111,7 +13439,7 @@ function useFormData (_ref) {
|
|
|
13111
13439
|
multipleEditingData = inboundData;
|
|
13112
13440
|
}
|
|
13113
13441
|
return {
|
|
13114
|
-
loadedData: onLoadFields(_objectSpread$
|
|
13442
|
+
loadedData: onLoadFields(_objectSpread$B({}, dt)),
|
|
13115
13443
|
multipleEditingData: multipleEditingData
|
|
13116
13444
|
};
|
|
13117
13445
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -13148,7 +13476,7 @@ function useFormData (_ref) {
|
|
|
13148
13476
|
setFieldErrors = _useState14[1];
|
|
13149
13477
|
useEffect(function () {
|
|
13150
13478
|
var _loadedData$_id2;
|
|
13151
|
-
setState(_objectSpread$
|
|
13479
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13152
13480
|
data: loadedData,
|
|
13153
13481
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
13154
13482
|
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 +13571,7 @@ function useFormData (_ref) {
|
|
|
13243
13571
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
13244
13572
|
while (1) switch (_context2.prev = _context2.next) {
|
|
13245
13573
|
case 0:
|
|
13246
|
-
newData = _objectSpread$
|
|
13574
|
+
newData = _objectSpread$B({}, state.data);
|
|
13247
13575
|
Object.keys(values).forEach(function (k) {
|
|
13248
13576
|
var _values$k$value, _values$k;
|
|
13249
13577
|
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 +13583,12 @@ function useFormData (_ref) {
|
|
|
13255
13583
|
return _context2.abrupt("return", newData);
|
|
13256
13584
|
case 4:
|
|
13257
13585
|
_context2.next = 6;
|
|
13258
|
-
return setDynamicFields(_objectSpread$
|
|
13586
|
+
return setDynamicFields(_objectSpread$B({}, state.data), newData);
|
|
13259
13587
|
case 6:
|
|
13260
13588
|
newData = _context2.sent;
|
|
13261
|
-
newData = onSaveFields(_objectSpread$
|
|
13589
|
+
newData = onSaveFields(_objectSpread$B({}, state.data), newData);
|
|
13262
13590
|
newData = removeEmpty(newData);
|
|
13263
|
-
setState(_objectSpread$
|
|
13591
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13264
13592
|
loading: true
|
|
13265
13593
|
}));
|
|
13266
13594
|
finalData = state.data;
|
|
@@ -13309,13 +13637,13 @@ function useFormData (_ref) {
|
|
|
13309
13637
|
_context2.next = 38;
|
|
13310
13638
|
break;
|
|
13311
13639
|
}
|
|
13312
|
-
setFieldErrors(_objectSpread$
|
|
13640
|
+
setFieldErrors(_objectSpread$B(_objectSpread$B({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
13313
13641
|
return _context2.abrupt("return", undefined);
|
|
13314
13642
|
case 38:
|
|
13315
13643
|
throw _context2.t0;
|
|
13316
13644
|
case 39:
|
|
13317
13645
|
_context2.prev = 39;
|
|
13318
|
-
setState(_objectSpread$
|
|
13646
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13319
13647
|
data: finalData,
|
|
13320
13648
|
loading: false
|
|
13321
13649
|
}));
|
|
@@ -13345,7 +13673,7 @@ function useFormData (_ref) {
|
|
|
13345
13673
|
}
|
|
13346
13674
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
13347
13675
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
13348
|
-
var wholeData = Object.assign(_objectSpread$
|
|
13676
|
+
var wholeData = Object.assign(_objectSpread$B({}, state.data), _objectSpread$B({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
13349
13677
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
13350
13678
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
13351
13679
|
setHiddenRequiredDisabled(newState);
|
|
@@ -13358,12 +13686,12 @@ function useFormData (_ref) {
|
|
|
13358
13686
|
}
|
|
13359
13687
|
};
|
|
13360
13688
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
13361
|
-
var data = d !== null && d !== void 0 ? d : Object.assign(_objectSpread$
|
|
13689
|
+
var data = d !== null && d !== void 0 ? d : Object.assign(_objectSpread$B({}, state.data), _objectSpread$B({}, state.form.getFieldsValue()));
|
|
13362
13690
|
setFieldInObject(id, data, value);
|
|
13363
|
-
var newFieldErrors = _objectSpread$
|
|
13691
|
+
var newFieldErrors = _objectSpread$B({}, fieldErrors);
|
|
13364
13692
|
delete newFieldErrors[id.toString()];
|
|
13365
13693
|
setFieldErrors(newFieldErrors);
|
|
13366
|
-
setState(_objectSpread$
|
|
13694
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13367
13695
|
data: data
|
|
13368
13696
|
}));
|
|
13369
13697
|
return data;
|
|
@@ -13389,12 +13717,12 @@ function useFormData (_ref) {
|
|
|
13389
13717
|
var _value$value;
|
|
13390
13718
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
13391
13719
|
if (configuration.itemSelectorReset) {
|
|
13392
|
-
setState(_objectSpread$
|
|
13720
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13393
13721
|
data: _defineProperty({}, name, val)
|
|
13394
13722
|
}));
|
|
13395
13723
|
} else {
|
|
13396
|
-
setState(_objectSpread$
|
|
13397
|
-
data: _objectSpread$
|
|
13724
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13725
|
+
data: _objectSpread$B(_objectSpread$B({}, state.data), {}, _defineProperty({}, name, val))
|
|
13398
13726
|
}));
|
|
13399
13727
|
}
|
|
13400
13728
|
setSelectedItemsIndex(idx);
|
|
@@ -13404,12 +13732,12 @@ function useFormData (_ref) {
|
|
|
13404
13732
|
var val = _ref6.value;
|
|
13405
13733
|
if (value === val) {
|
|
13406
13734
|
if (configuration.itemSelectorReset) {
|
|
13407
|
-
setState(_objectSpread$
|
|
13735
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13408
13736
|
data: _defineProperty({}, name, val)
|
|
13409
13737
|
}));
|
|
13410
13738
|
} else {
|
|
13411
|
-
setState(_objectSpread$
|
|
13412
|
-
data: _objectSpread$
|
|
13739
|
+
setState(_objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13740
|
+
data: _objectSpread$B(_objectSpread$B({}, state.data), {}, _defineProperty({}, name, val))
|
|
13413
13741
|
}));
|
|
13414
13742
|
}
|
|
13415
13743
|
setSelectedItemsIndex(idx);
|
|
@@ -13523,7 +13851,7 @@ function useFormData (_ref) {
|
|
|
13523
13851
|
}));
|
|
13524
13852
|
return _setDynamicFields.apply(this, arguments);
|
|
13525
13853
|
}
|
|
13526
|
-
return _objectSpread$
|
|
13854
|
+
return _objectSpread$B(_objectSpread$B({}, state), {}, {
|
|
13527
13855
|
setUsedPreset: setUsedPreset,
|
|
13528
13856
|
configuration: configuration,
|
|
13529
13857
|
changedFields: changedFields,
|
|
@@ -13581,11 +13909,11 @@ function getData(id, data) {
|
|
|
13581
13909
|
}
|
|
13582
13910
|
}
|
|
13583
13911
|
|
|
13584
|
-
function ownKeys$
|
|
13585
|
-
function _objectSpread$
|
|
13586
|
-
function _createForOfIteratorHelper$d(
|
|
13587
|
-
function _unsupportedIterableToArray$d(
|
|
13588
|
-
function _arrayLikeToArray$d(
|
|
13912
|
+
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; }
|
|
13913
|
+
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; }
|
|
13914
|
+
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; } } }; }
|
|
13915
|
+
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; } }
|
|
13916
|
+
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
13917
|
var Presets = function Presets(_ref) {
|
|
13590
13918
|
var state = _ref.state,
|
|
13591
13919
|
apiHandler = _ref.apiHandler,
|
|
@@ -13594,7 +13922,7 @@ var Presets = function Presets(_ref) {
|
|
|
13594
13922
|
setUsedPreset = _ref.setUsedPreset,
|
|
13595
13923
|
presets = _ref.presets,
|
|
13596
13924
|
setPresets = _ref.setPresets;
|
|
13597
|
-
var Option = Select$
|
|
13925
|
+
var Option = Select$1.Option;
|
|
13598
13926
|
var _useState = useState(false),
|
|
13599
13927
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13600
13928
|
isModalVisible = _useState2[0],
|
|
@@ -13632,13 +13960,13 @@ var Presets = function Presets(_ref) {
|
|
|
13632
13960
|
} finally {
|
|
13633
13961
|
_iterator.f();
|
|
13634
13962
|
}
|
|
13635
|
-
var data = _objectSpread$
|
|
13963
|
+
var data = _objectSpread$A(_objectSpread$A({}, form.getFieldsValue(names)), {}, {
|
|
13636
13964
|
newPresetName: newPresetName
|
|
13637
13965
|
});
|
|
13638
13966
|
data.dpi = parseInt(data.dpi);
|
|
13639
13967
|
data.organization = root.getGlobalValue('organizationId');
|
|
13640
13968
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
13641
|
-
var dt = _objectSpread$
|
|
13969
|
+
var dt = _objectSpread$A(_objectSpread$A({}, form.getFieldsValue(names)), {}, {
|
|
13642
13970
|
name: newPresetName
|
|
13643
13971
|
});
|
|
13644
13972
|
setPresets({
|
|
@@ -13698,7 +14026,7 @@ var Presets = function Presets(_ref) {
|
|
|
13698
14026
|
setValue(undefined);
|
|
13699
14027
|
};
|
|
13700
14028
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
13701
|
-
children: [/*#__PURE__*/jsx(Select$
|
|
14029
|
+
children: [/*#__PURE__*/jsx(Select$1, {
|
|
13702
14030
|
showSearch: true,
|
|
13703
14031
|
value: value,
|
|
13704
14032
|
placeholder: t('backoffice.form.presets.placeholder'),
|
|
@@ -14021,8 +14349,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
14021
14349
|
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
14350
|
styleInject(css_248z$h);
|
|
14023
14351
|
|
|
14024
|
-
function ownKeys$
|
|
14025
|
-
function _objectSpread$
|
|
14352
|
+
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; }
|
|
14353
|
+
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
14354
|
var SubTitle = function SubTitle(_ref) {
|
|
14027
14355
|
var _item$orientation, _item$buttonIds;
|
|
14028
14356
|
var item = _ref.item,
|
|
@@ -14031,10 +14359,10 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
14031
14359
|
t = _useTranslation.t;
|
|
14032
14360
|
return /*#__PURE__*/jsx(Divider, {
|
|
14033
14361
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
14034
|
-
style: _objectSpread$
|
|
14362
|
+
style: _objectSpread$z({}, item.style),
|
|
14035
14363
|
children: /*#__PURE__*/jsxs("div", {
|
|
14036
14364
|
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) {
|
|
14365
|
+
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
14366
|
return /*#__PURE__*/jsx("div", {
|
|
14039
14367
|
className: buttonGroup,
|
|
14040
14368
|
children: /*#__PURE__*/jsx(CustomButton$1, {
|
|
@@ -14708,8 +15036,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
14708
15036
|
}]);
|
|
14709
15037
|
}(_default$d);
|
|
14710
15038
|
|
|
14711
|
-
function ownKeys$
|
|
14712
|
-
function _objectSpread$
|
|
15039
|
+
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; }
|
|
15040
|
+
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
15041
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
14714
15042
|
function useSelectClientRelationCatalog (_ref) {
|
|
14715
15043
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -14878,7 +15206,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
14878
15206
|
case 22:
|
|
14879
15207
|
supplierData = _context2.sent;
|
|
14880
15208
|
case 23:
|
|
14881
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
15209
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$y(_objectSpread$y({}, _selectedSupplier), {}, {
|
|
14882
15210
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
14883
15211
|
}), supplierData);
|
|
14884
15212
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -14988,7 +15316,7 @@ var Selector = function Selector(_ref) {
|
|
|
14988
15316
|
}
|
|
14989
15317
|
}, [valueState]);
|
|
14990
15318
|
return /*#__PURE__*/jsx(Fragment, {
|
|
14991
|
-
children: /*#__PURE__*/jsx(Select$
|
|
15319
|
+
children: /*#__PURE__*/jsx(Select$1, {
|
|
14992
15320
|
className: customSelect,
|
|
14993
15321
|
showSearch: true,
|
|
14994
15322
|
labelInValue: true,
|
|
@@ -15007,7 +15335,7 @@ var Selector = function Selector(_ref) {
|
|
|
15007
15335
|
return onSelect(option === null || option === void 0 ? void 0 : option.key);
|
|
15008
15336
|
},
|
|
15009
15337
|
children: items === null || items === void 0 ? void 0 : items.map(function (i) {
|
|
15010
|
-
return /*#__PURE__*/jsxs(Select$
|
|
15338
|
+
return /*#__PURE__*/jsxs(Select$1.Option, {
|
|
15011
15339
|
value: i.name,
|
|
15012
15340
|
className: customSelectOption,
|
|
15013
15341
|
children: [/*#__PURE__*/jsx("div", {
|
|
@@ -15100,6 +15428,7 @@ var LOG$8 = getLogger('Backoffice', 'SelectSimple');
|
|
|
15100
15428
|
function useSelectSimpleData (_ref) {
|
|
15101
15429
|
var apiInterface = _ref.apiInterface,
|
|
15102
15430
|
selectMapping = _ref.selectMapping,
|
|
15431
|
+
apiMapping = _ref.apiMapping,
|
|
15103
15432
|
onChange = _ref.onChange,
|
|
15104
15433
|
value = _ref.value,
|
|
15105
15434
|
configuredOptions = _ref.options;
|
|
@@ -15141,7 +15470,7 @@ function useSelectSimpleData (_ref) {
|
|
|
15141
15470
|
}
|
|
15142
15471
|
if (!apiHandler.canReadList) throw Error('SelectSimple: apiInterface must have readList method');
|
|
15143
15472
|
setLoading(true);
|
|
15144
|
-
apiHandler.readList().then(function (data) {
|
|
15473
|
+
apiHandler.readList(apiMapping).then(function (data) {
|
|
15145
15474
|
var _data$data;
|
|
15146
15475
|
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
15476
|
var options = data.data.map(function (item) {
|
|
@@ -15222,12 +15551,13 @@ function parseReturnData(options, selectMapping) {
|
|
|
15222
15551
|
return (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? options.value : options.data;
|
|
15223
15552
|
}
|
|
15224
15553
|
|
|
15225
|
-
var _excluded$2 = ["apiInterface", "selectMapping", "onChange", "value", "search", "options"];
|
|
15226
|
-
function ownKeys$
|
|
15227
|
-
function _objectSpread$
|
|
15554
|
+
var _excluded$2 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options"];
|
|
15555
|
+
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; }
|
|
15556
|
+
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
15557
|
var SelectWrapper = function SelectWrapper(_ref) {
|
|
15229
15558
|
var apiInterface = _ref.apiInterface,
|
|
15230
15559
|
selectMapping = _ref.selectMapping,
|
|
15560
|
+
apiMapping = _ref.apiMapping,
|
|
15231
15561
|
onChange = _ref.onChange,
|
|
15232
15562
|
value = _ref.value,
|
|
15233
15563
|
search = _ref.search,
|
|
@@ -15236,12 +15566,13 @@ var SelectWrapper = function SelectWrapper(_ref) {
|
|
|
15236
15566
|
var state = useSelectSimpleData({
|
|
15237
15567
|
apiInterface: apiInterface,
|
|
15238
15568
|
selectMapping: selectMapping,
|
|
15569
|
+
apiMapping: apiMapping,
|
|
15239
15570
|
onChange: onChange,
|
|
15240
15571
|
value: value,
|
|
15241
15572
|
type: 'SelectSimple',
|
|
15242
15573
|
options: options
|
|
15243
15574
|
});
|
|
15244
|
-
return /*#__PURE__*/jsx(Select$
|
|
15575
|
+
return /*#__PURE__*/jsx(Select$1, _objectSpread$x(_objectSpread$x({}, selectProps), {}, {
|
|
15245
15576
|
showSearch: search,
|
|
15246
15577
|
loading: state.loading,
|
|
15247
15578
|
options: state.options,
|
|
@@ -15251,7 +15582,7 @@ var SelectWrapper = function SelectWrapper(_ref) {
|
|
|
15251
15582
|
filterOption: filterOption
|
|
15252
15583
|
}));
|
|
15253
15584
|
};
|
|
15254
|
-
var
|
|
15585
|
+
var SimpleSelect = observer(SelectWrapper, {
|
|
15255
15586
|
forwardRef: true
|
|
15256
15587
|
});
|
|
15257
15588
|
var filterOption = function filterOption(input, option) {
|
|
@@ -15259,11 +15590,36 @@ var filterOption = function filterOption(input, option) {
|
|
|
15259
15590
|
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').toLowerCase().includes(input.toLowerCase());
|
|
15260
15591
|
};
|
|
15261
15592
|
|
|
15262
|
-
|
|
15263
|
-
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
|
|
15593
|
+
var RichTextEditor = function RichTextEditor(_ref) {
|
|
15594
|
+
var initValue = _ref.initValue,
|
|
15595
|
+
onChange = _ref.onChange,
|
|
15596
|
+
name = _ref.name;
|
|
15597
|
+
var val = useRef(initValue);
|
|
15598
|
+
return /*#__PURE__*/jsx(Editor, {
|
|
15599
|
+
apiKey: "m7260i0wfvki2sqkam6mfogklidxr229sk7499yjty92q8ww",
|
|
15600
|
+
onEditorChange: function onEditorChange(val, e) {
|
|
15601
|
+
onChange === null || onChange === void 0 || onChange(name, val);
|
|
15602
|
+
},
|
|
15603
|
+
initialValue: val.current,
|
|
15604
|
+
textareaName: "text",
|
|
15605
|
+
init: {
|
|
15606
|
+
height: 500,
|
|
15607
|
+
menubar: false,
|
|
15608
|
+
plugins: ['advlist autolink lists link table paste'],
|
|
15609
|
+
contextmenu: '',
|
|
15610
|
+
resize: false,
|
|
15611
|
+
statusbar: false,
|
|
15612
|
+
toolbar: 'undo redo | formatselect | ' + 'bold italic backcolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | table ',
|
|
15613
|
+
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
|
|
15614
|
+
}
|
|
15615
|
+
});
|
|
15616
|
+
};
|
|
15617
|
+
|
|
15618
|
+
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; } } }; }
|
|
15619
|
+
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; } }
|
|
15620
|
+
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; }
|
|
15621
|
+
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; }
|
|
15622
|
+
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
15623
|
var LOG$7 = getLogger('Backoffice', 'Form');
|
|
15268
15624
|
var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
15269
15625
|
var _state$selectedItems2;
|
|
@@ -15379,7 +15735,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15379
15735
|
};
|
|
15380
15736
|
}();
|
|
15381
15737
|
var updateFormData = function updateFormData(data) {
|
|
15382
|
-
form.setFieldsValue(_objectSpread$
|
|
15738
|
+
form.setFieldsValue(_objectSpread$w(_objectSpread$w({}, state.data), data));
|
|
15383
15739
|
};
|
|
15384
15740
|
var onErrorInternal = function onErrorInternal(err, errorText) {
|
|
15385
15741
|
if (err instanceof CoreError && err.code) {
|
|
@@ -15434,13 +15790,14 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15434
15790
|
if (!item.label && item.type === 'button') return undefined;
|
|
15435
15791
|
return item.label ? t(item.label, item.label) : item.name;
|
|
15436
15792
|
}
|
|
15437
|
-
function getElement(item, data, setCanSave, state, _onChange, root, form, hidden) {
|
|
15793
|
+
function getElement(item, data, setCanSave, state, _onChange, root, form, hidden, overwrittenName) {
|
|
15438
15794
|
var _isReadonly, _state$hiddenRequired2;
|
|
15439
15795
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
15440
|
-
var
|
|
15796
|
+
var name = overwrittenName || item.name;
|
|
15797
|
+
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
15798
|
switch (item.type) {
|
|
15442
15799
|
case 'select':
|
|
15443
|
-
return /*#__PURE__*/jsx(Select
|
|
15800
|
+
return /*#__PURE__*/jsx(Select, {
|
|
15444
15801
|
initialValue: item.defaultValue,
|
|
15445
15802
|
apiInterface: item.apiInterface,
|
|
15446
15803
|
mode: item.mode,
|
|
@@ -15457,7 +15814,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15457
15814
|
wholeData: state.data,
|
|
15458
15815
|
disabledConfig: item === null || item === void 0 ? void 0 : item['disabledSelection'],
|
|
15459
15816
|
onChange: function onChange(value) {
|
|
15460
|
-
_onChange(
|
|
15817
|
+
_onChange(name, item.valueField ? value[item.valueField] : value);
|
|
15461
15818
|
},
|
|
15462
15819
|
allowClear: item.allowClear,
|
|
15463
15820
|
placeholder: item.placeholder,
|
|
@@ -15466,10 +15823,10 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15466
15823
|
}
|
|
15467
15824
|
}, state.selectedItemsIndex);
|
|
15468
15825
|
case 'selectSimple':
|
|
15469
|
-
return /*#__PURE__*/jsx(
|
|
15826
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$w(_objectSpread$w({}, item), {}, {
|
|
15470
15827
|
disabled: disabled,
|
|
15471
15828
|
onChange: function onChange(value) {
|
|
15472
|
-
_onChange(
|
|
15829
|
+
_onChange(name, value);
|
|
15473
15830
|
}
|
|
15474
15831
|
}));
|
|
15475
15832
|
case 'textarea':
|
|
@@ -15482,7 +15839,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15482
15839
|
defaultValue: item.value,
|
|
15483
15840
|
placeholder: item.placeholder,
|
|
15484
15841
|
onChange: function onChange(e) {
|
|
15485
|
-
return _onChange === null || _onChange === void 0 ? void 0 : _onChange(
|
|
15842
|
+
return _onChange === null || _onChange === void 0 ? void 0 : _onChange(name, e.target.value);
|
|
15486
15843
|
}
|
|
15487
15844
|
});
|
|
15488
15845
|
case 'input':
|
|
@@ -15547,6 +15904,12 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15547
15904
|
disabled: disabled,
|
|
15548
15905
|
children: item.label
|
|
15549
15906
|
});
|
|
15907
|
+
case 'richText':
|
|
15908
|
+
return /*#__PURE__*/jsx(RichTextEditor, {
|
|
15909
|
+
initValue: state.getData(name, data),
|
|
15910
|
+
name: name,
|
|
15911
|
+
onChange: _onChange
|
|
15912
|
+
});
|
|
15550
15913
|
case 'number':
|
|
15551
15914
|
return /*#__PURE__*/jsx(InputNumber, {
|
|
15552
15915
|
disabled: disabled,
|
|
@@ -15562,13 +15925,17 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15562
15925
|
if (value && cbItem !== null && cbItem !== void 0 && cbItem.valueOnEnabled) {
|
|
15563
15926
|
value = root === null || root === void 0 ? void 0 : root.getGlobalValue(cbItem.valueOnEnabled.globalValue);
|
|
15564
15927
|
}
|
|
15565
|
-
_onChange(
|
|
15928
|
+
_onChange(name, value);
|
|
15566
15929
|
}
|
|
15567
15930
|
});
|
|
15568
15931
|
case 'display':
|
|
15569
15932
|
return /*#__PURE__*/jsx(DisplayInput, {
|
|
15570
15933
|
translationPrefix: item.translationPrefix
|
|
15571
15934
|
});
|
|
15935
|
+
case 'array':
|
|
15936
|
+
return /*#__PURE__*/jsx(FormList, {
|
|
15937
|
+
item: item
|
|
15938
|
+
});
|
|
15572
15939
|
case 'object':
|
|
15573
15940
|
return /*#__PURE__*/jsx(JsonEditor$2, {
|
|
15574
15941
|
setCanSave: setCanSave,
|
|
@@ -15602,16 +15969,16 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15602
15969
|
if (item.accountName) {
|
|
15603
15970
|
var newData = state.onInputChanged(item.accountName, supplier === null || supplier === void 0 ? void 0 : supplier._id);
|
|
15604
15971
|
if (!supplier) {
|
|
15605
|
-
newData = state.onInputChanged(
|
|
15972
|
+
newData = state.onInputChanged(name, undefined, newData);
|
|
15606
15973
|
if (item.catalogCodex) state.onInputChanged(item.catalogCodex, undefined, newData);
|
|
15607
15974
|
}
|
|
15608
15975
|
}
|
|
15609
15976
|
},
|
|
15610
15977
|
initAccountId: item.accountName ? state.getData(item.accountName, data) : undefined,
|
|
15611
|
-
initCatalogId: state.getData(
|
|
15978
|
+
initCatalogId: state.getData(name, data),
|
|
15612
15979
|
currentOrganizationId: root === null || root === void 0 ? void 0 : root.dataStore.selectedOrganizationId,
|
|
15613
15980
|
onSelectedCatalog: function onSelectedCatalog(catalogItem) {
|
|
15614
|
-
var newData = state.onInputChanged(
|
|
15981
|
+
var newData = state.onInputChanged(name, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem._id);
|
|
15615
15982
|
if (item.catalogCodex) state.onInputChanged(item.catalogCodex, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex, newData);
|
|
15616
15983
|
},
|
|
15617
15984
|
onError: function onError(text) {
|
|
@@ -15625,7 +15992,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15625
15992
|
value: item.value,
|
|
15626
15993
|
options: item.options.map(function (o) {
|
|
15627
15994
|
var _o$disabled;
|
|
15628
|
-
return _objectSpread$
|
|
15995
|
+
return _objectSpread$w(_objectSpread$w({}, o), {}, {
|
|
15629
15996
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, data)
|
|
15630
15997
|
});
|
|
15631
15998
|
}),
|
|
@@ -15634,7 +16001,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15634
16001
|
defaultValue: item.defaultValue,
|
|
15635
16002
|
onChange: function onChange(_ref7) {
|
|
15636
16003
|
var value = _ref7.target.value;
|
|
15637
|
-
_onChange(
|
|
16004
|
+
_onChange(name, value);
|
|
15638
16005
|
}
|
|
15639
16006
|
});
|
|
15640
16007
|
case 'button':
|
|
@@ -15687,7 +16054,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15687
16054
|
}, state.configuration.itemSelector.name.toString()), (_state$selectedItems2 = state.selectedItems) === null || _state$selectedItems2 === void 0 ? void 0 : _state$selectedItems2.map(function (item) {
|
|
15688
16055
|
var _state$hiddenRequired3, _state$hiddenRequired4, _state$hiddenRequired5;
|
|
15689
16056
|
return /*#__PURE__*/jsxs("div", {
|
|
15690
|
-
children: [item.marker && /*#__PURE__*/jsx(InfoCircleOutlined, {}), item.type
|
|
16057
|
+
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
16058
|
name: item.name,
|
|
15692
16059
|
rules: getRules(item, state.data),
|
|
15693
16060
|
label: getLabel(item),
|
|
@@ -15703,6 +16070,67 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15703
16070
|
})]
|
|
15704
16071
|
})]
|
|
15705
16072
|
});
|
|
16073
|
+
function FormList(_ref8) {
|
|
16074
|
+
var item = _ref8.item;
|
|
16075
|
+
return /*#__PURE__*/jsx(Form$1.List, {
|
|
16076
|
+
name: item.name,
|
|
16077
|
+
initialValue: item.initialValue,
|
|
16078
|
+
children: function children(fields, _ref9) {
|
|
16079
|
+
var add = _ref9.add,
|
|
16080
|
+
remove = _ref9.remove;
|
|
16081
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
16082
|
+
children: [fields.map(function (_ref10) {
|
|
16083
|
+
var key = _ref10.key,
|
|
16084
|
+
name = _ref10.name;
|
|
16085
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
16086
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
16087
|
+
style: {
|
|
16088
|
+
display: 'flex'
|
|
16089
|
+
},
|
|
16090
|
+
children: [/*#__PURE__*/jsx(MinusCircleOutlined, {
|
|
16091
|
+
onClick: function onClick() {
|
|
16092
|
+
return remove(name);
|
|
16093
|
+
}
|
|
16094
|
+
}), /*#__PURE__*/jsx("div", {
|
|
16095
|
+
style: {
|
|
16096
|
+
flexGrow: 1
|
|
16097
|
+
},
|
|
16098
|
+
children: item.items.map(function (i) {
|
|
16099
|
+
var _state$hiddenRequired6, _state$hiddenRequired7;
|
|
16100
|
+
var n = [name].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]));
|
|
16101
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
16102
|
+
children: /*#__PURE__*/jsx(Form$1.Item, {
|
|
16103
|
+
name: n,
|
|
16104
|
+
rules: getRules(i, state.data),
|
|
16105
|
+
label: getLabel(i),
|
|
16106
|
+
valuePropName: i.type == 'checkbox' ? 'checked' : 'value',
|
|
16107
|
+
initialValue: i === null || i === void 0 ? void 0 : i.defaultValue,
|
|
16108
|
+
hasFeedback: !!state.fieldErrors[n.toString()],
|
|
16109
|
+
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
16110
|
+
help: state.fieldErrors[n.toString()],
|
|
16111
|
+
hidden: ((_state$hiddenRequired6 = state.hiddenRequiredDisabled[typeof n == 'string' ? n : n.join('.')]) === null || _state$hiddenRequired6 === void 0 ? void 0 : _state$hiddenRequired6.hidden) || !!i.hidden,
|
|
16112
|
+
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])))
|
|
16113
|
+
}, key)
|
|
16114
|
+
});
|
|
16115
|
+
})
|
|
16116
|
+
})]
|
|
16117
|
+
})
|
|
16118
|
+
});
|
|
16119
|
+
}), /*#__PURE__*/jsx(Form$1.Item, {
|
|
16120
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
16121
|
+
type: "dashed",
|
|
16122
|
+
onClick: function onClick() {
|
|
16123
|
+
return add();
|
|
16124
|
+
},
|
|
16125
|
+
block: true,
|
|
16126
|
+
icon: /*#__PURE__*/jsx(PlusOutlined, {}),
|
|
16127
|
+
children: t('backoffice.add_field')
|
|
16128
|
+
})
|
|
16129
|
+
})]
|
|
16130
|
+
});
|
|
16131
|
+
}
|
|
16132
|
+
});
|
|
16133
|
+
}
|
|
15706
16134
|
};
|
|
15707
16135
|
var Form = observer(FormWrapper$1, {
|
|
15708
16136
|
forwardRef: true
|
|
@@ -15710,7 +16138,7 @@ var Form = observer(FormWrapper$1, {
|
|
|
15710
16138
|
function DisplayInput(props) {
|
|
15711
16139
|
var _useTranslation2 = useTranslation(),
|
|
15712
16140
|
t = _useTranslation2.t;
|
|
15713
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
16141
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$w(_objectSpread$w({}, props), {}, {
|
|
15714
16142
|
disabled: true,
|
|
15715
16143
|
value: t(props.translationPrefix + '.' + props.value)
|
|
15716
16144
|
}));
|
|
@@ -15728,8 +16156,8 @@ function isReadonly(item, data) {
|
|
|
15728
16156
|
return false;
|
|
15729
16157
|
}
|
|
15730
16158
|
|
|
15731
|
-
function ownKeys$
|
|
15732
|
-
function _objectSpread$
|
|
16159
|
+
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; }
|
|
16160
|
+
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
16161
|
function useGridData (_ref) {
|
|
15734
16162
|
var id = _ref.id,
|
|
15735
16163
|
data = _ref.data;
|
|
@@ -15772,11 +16200,11 @@ function useGridData (_ref) {
|
|
|
15772
16200
|
function reducer(state, action) {
|
|
15773
16201
|
switch (action.type) {
|
|
15774
16202
|
case 'update':
|
|
15775
|
-
return _objectSpread$
|
|
16203
|
+
return _objectSpread$v(_objectSpread$v({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$v(_objectSpread$v({}, action.data), {}, {
|
|
15776
16204
|
buffer: Buffer.from(action.data.buffer)
|
|
15777
16205
|
})));
|
|
15778
16206
|
case 'delete':
|
|
15779
|
-
var newState = _objectSpread$
|
|
16207
|
+
var newState = _objectSpread$v({}, state);
|
|
15780
16208
|
delete newState[action.data.divaNr];
|
|
15781
16209
|
return newState;
|
|
15782
16210
|
default:
|
|
@@ -15861,8 +16289,8 @@ var Grid = function Grid(_ref) {
|
|
|
15861
16289
|
});
|
|
15862
16290
|
};
|
|
15863
16291
|
|
|
15864
|
-
function ownKeys$
|
|
15865
|
-
function _objectSpread$
|
|
16292
|
+
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; }
|
|
16293
|
+
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
16294
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
15867
16295
|
var id = _ref.id;
|
|
15868
16296
|
var root = useStore();
|
|
@@ -15981,7 +16409,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
15981
16409
|
onRemove: onRemove,
|
|
15982
16410
|
customRequest: customRequest,
|
|
15983
16411
|
fileList: fileList.map(function (f) {
|
|
15984
|
-
return _objectSpread$
|
|
16412
|
+
return _objectSpread$u(_objectSpread$u({}, f), {}, {
|
|
15985
16413
|
url: f.url
|
|
15986
16414
|
});
|
|
15987
16415
|
}),
|
|
@@ -16025,15 +16453,15 @@ var MediaUpload = observer(function (_ref) {
|
|
|
16025
16453
|
onRemove: onRemove,
|
|
16026
16454
|
fileList: fileList,
|
|
16027
16455
|
customRequest: customRequest,
|
|
16028
|
-
children: fileList.length == 0 ? /*#__PURE__*/jsx(PlusOutlined, {}) : undefined
|
|
16456
|
+
children: fileList.length == 0 ? /*#__PURE__*/jsx(PlusOutlined$1, {}) : undefined
|
|
16029
16457
|
})
|
|
16030
16458
|
})
|
|
16031
16459
|
})]
|
|
16032
16460
|
});
|
|
16033
16461
|
});
|
|
16034
16462
|
|
|
16035
|
-
function ownKeys$
|
|
16036
|
-
function _objectSpread$
|
|
16463
|
+
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; }
|
|
16464
|
+
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
16465
|
function useFormListData (_ref) {
|
|
16038
16466
|
var _configuration$defaul;
|
|
16039
16467
|
var id = _ref.id,
|
|
@@ -16113,7 +16541,7 @@ function useFormListData (_ref) {
|
|
|
16113
16541
|
if (updated.length == state.length) {
|
|
16114
16542
|
newState = state.map(function (s, i) {
|
|
16115
16543
|
var _updated$find;
|
|
16116
|
-
return _objectSpread$
|
|
16544
|
+
return _objectSpread$t(_objectSpread$t({}, s), {}, {
|
|
16117
16545
|
data: (_updated$find = updated.find(function (u) {
|
|
16118
16546
|
return u.index == i;
|
|
16119
16547
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -16240,7 +16668,7 @@ var FormList = function FormList(_ref, ref) {
|
|
|
16240
16668
|
type: "dashed",
|
|
16241
16669
|
onClick: state.add,
|
|
16242
16670
|
block: true,
|
|
16243
|
-
icon: /*#__PURE__*/jsx(PlusOutlined, {}),
|
|
16671
|
+
icon: /*#__PURE__*/jsx(PlusOutlined$1, {}),
|
|
16244
16672
|
children: t('backoffice.FormList.add')
|
|
16245
16673
|
})
|
|
16246
16674
|
})]
|
|
@@ -16252,8 +16680,8 @@ var FormList$1 = observer(FormList, {
|
|
|
16252
16680
|
forwardRef: true
|
|
16253
16681
|
});
|
|
16254
16682
|
|
|
16255
|
-
function ownKeys$
|
|
16256
|
-
function _objectSpread$
|
|
16683
|
+
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; }
|
|
16684
|
+
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
16685
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
16258
16686
|
function useSelectOrCreateData (_ref) {
|
|
16259
16687
|
var id = _ref.id,
|
|
@@ -16347,7 +16775,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
16347
16775
|
_context.next = 7;
|
|
16348
16776
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
16349
16777
|
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$
|
|
16778
|
+
return _objectSpread$s(_objectSpread$s({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
16351
16779
|
}, {}) : {
|
|
16352
16780
|
_id: [value, 'contains']
|
|
16353
16781
|
},
|
|
@@ -16575,7 +17003,7 @@ var FormWrapper = function FormWrapper(_ref, ref) {
|
|
|
16575
17003
|
span: 4
|
|
16576
17004
|
}), /*#__PURE__*/jsx(Col, {
|
|
16577
17005
|
span: 20,
|
|
16578
|
-
children: /*#__PURE__*/jsx(Select$
|
|
17006
|
+
children: /*#__PURE__*/jsx(Select$1, {
|
|
16579
17007
|
style: {
|
|
16580
17008
|
width: '100%'
|
|
16581
17009
|
},
|
|
@@ -16633,7 +17061,7 @@ var Single = function Single(_ref2) {
|
|
|
16633
17061
|
return state.onChange();
|
|
16634
17062
|
},
|
|
16635
17063
|
block: true,
|
|
16636
|
-
icon: /*#__PURE__*/jsx(PlusOutlined, {}),
|
|
17064
|
+
icon: /*#__PURE__*/jsx(PlusOutlined$1, {}),
|
|
16637
17065
|
children: t('backoffice.table.emailtemplates.createAction.title')
|
|
16638
17066
|
})
|
|
16639
17067
|
})]
|
|
@@ -16660,8 +17088,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
16660
17088
|
});
|
|
16661
17089
|
};
|
|
16662
17090
|
|
|
16663
|
-
function ownKeys$
|
|
16664
|
-
function _objectSpread$
|
|
17091
|
+
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; }
|
|
17092
|
+
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
17093
|
function useProcess (_ref) {
|
|
16666
17094
|
var id = _ref.id;
|
|
16667
17095
|
var root = useStore();
|
|
@@ -16699,7 +17127,7 @@ function useProcess (_ref) {
|
|
|
16699
17127
|
while (1) switch (_context.prev = _context.next) {
|
|
16700
17128
|
case 0:
|
|
16701
17129
|
newState = _toConsumableArray(state);
|
|
16702
|
-
currentStep = _objectSpread$
|
|
17130
|
+
currentStep = _objectSpread$r({}, newState[index]);
|
|
16703
17131
|
currentStep.data = data;
|
|
16704
17132
|
newState.splice(index, 1, currentStep);
|
|
16705
17133
|
setState(newState);
|
|
@@ -16788,7 +17216,7 @@ function _saveData() {
|
|
|
16788
17216
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
16789
17217
|
while (1) switch (_context3.prev = _context3.next) {
|
|
16790
17218
|
case 0:
|
|
16791
|
-
newState = _objectSpread$
|
|
17219
|
+
newState = _objectSpread$r({}, stepState); // we have to merge the mapping data of all steps into one object,
|
|
16792
17220
|
//so we have to modify the mappingData as well as the mapping specification
|
|
16793
17221
|
sourcData = {};
|
|
16794
17222
|
(_stepState$step$mappi = stepState.step.mapping) === null || _stepState$step$mappi === void 0 || _stepState$step$mappi.map.forEach(function (map) {
|
|
@@ -16804,7 +17232,7 @@ function _saveData() {
|
|
|
16804
17232
|
});
|
|
16805
17233
|
newMapping = undefined;
|
|
16806
17234
|
if (stepState.step.mapping) {
|
|
16807
|
-
newMapping = _objectSpread$
|
|
17235
|
+
newMapping = _objectSpread$r(_objectSpread$r({}, stepState.step.mapping), {}, {
|
|
16808
17236
|
map: stepState.step.mapping.map.map(function (m) {
|
|
16809
17237
|
return {
|
|
16810
17238
|
targetField: m.targetField,
|
|
@@ -16878,7 +17306,7 @@ var Process = function Process(_ref) {
|
|
|
16878
17306
|
maxWidth: 1000,
|
|
16879
17307
|
margin: 'auto'
|
|
16880
17308
|
},
|
|
16881
|
-
children: [state.current < state.steps.length && /*#__PURE__*/jsx(Content$
|
|
17309
|
+
children: [state.current < state.steps.length && /*#__PURE__*/jsx(Content$2, {
|
|
16882
17310
|
type: state.steps[state.current].step.type,
|
|
16883
17311
|
id: state.steps[state.current].step.id,
|
|
16884
17312
|
ref: ref,
|
|
@@ -16920,7 +17348,7 @@ var Process = function Process(_ref) {
|
|
|
16920
17348
|
});
|
|
16921
17349
|
};
|
|
16922
17350
|
var Process$1 = observer(Process);
|
|
16923
|
-
var Content$
|
|
17351
|
+
var Content$2 = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
16924
17352
|
var type = _ref2.type,
|
|
16925
17353
|
onChange = _ref2.onChange,
|
|
16926
17354
|
data = _ref2.data,
|
|
@@ -17038,9 +17466,9 @@ function BooleanCell (_ref) {
|
|
|
17038
17466
|
}
|
|
17039
17467
|
}
|
|
17040
17468
|
|
|
17041
|
-
function _createForOfIteratorHelper$b(
|
|
17042
|
-
function _unsupportedIterableToArray$b(
|
|
17043
|
-
function _arrayLikeToArray$b(
|
|
17469
|
+
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; } } }; }
|
|
17470
|
+
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; } }
|
|
17471
|
+
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
17472
|
function StringCell (_ref) {
|
|
17045
17473
|
var children = _ref.children,
|
|
17046
17474
|
column = _ref.column,
|
|
@@ -17298,7 +17726,7 @@ function DropdownCell (_ref) {
|
|
|
17298
17726
|
noStyle: true,
|
|
17299
17727
|
name: dataIndex,
|
|
17300
17728
|
initialValue: column.translationPrefix ? t(column.translationPrefix + '.' + children[1]) : children,
|
|
17301
|
-
children: /*#__PURE__*/jsx(Select$
|
|
17729
|
+
children: /*#__PURE__*/jsx(Select$1, {
|
|
17302
17730
|
style: {
|
|
17303
17731
|
width: column.width - 20
|
|
17304
17732
|
},
|
|
@@ -17329,9 +17757,9 @@ function DropdownCell (_ref) {
|
|
|
17329
17757
|
}
|
|
17330
17758
|
}
|
|
17331
17759
|
|
|
17332
|
-
function _createForOfIteratorHelper$a(
|
|
17333
|
-
function _unsupportedIterableToArray$a(
|
|
17334
|
-
function _arrayLikeToArray$a(
|
|
17760
|
+
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; } } }; }
|
|
17761
|
+
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; } }
|
|
17762
|
+
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
17763
|
if (!window.customElements.get('model-viewer')) {
|
|
17336
17764
|
import('@google/model-viewer');
|
|
17337
17765
|
}
|
|
@@ -17659,6 +18087,10 @@ var MenuWrapper = function MenuWrapper() {
|
|
|
17659
18087
|
theme = _root$contentStore.theme;
|
|
17660
18088
|
return /*#__PURE__*/jsxs(Layout.Sider, {
|
|
17661
18089
|
className: sideBar,
|
|
18090
|
+
collapsed: root.contentStore.menuCollapsed,
|
|
18091
|
+
onCollapse: function onCollapse(value) {
|
|
18092
|
+
return root.contentStore.menuCollapsed = value;
|
|
18093
|
+
},
|
|
17662
18094
|
children: [/*#__PURE__*/jsx("div", {
|
|
17663
18095
|
className: wrapper,
|
|
17664
18096
|
children: /*#__PURE__*/jsx(Switch, {
|
|
@@ -17842,9 +18274,9 @@ function getIcon(icon) {
|
|
|
17842
18274
|
return undefined;
|
|
17843
18275
|
}
|
|
17844
18276
|
|
|
17845
|
-
function _createForOfIteratorHelper$9(
|
|
17846
|
-
function _unsupportedIterableToArray$9(
|
|
17847
|
-
function _arrayLikeToArray$9(
|
|
18277
|
+
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; } } }; }
|
|
18278
|
+
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; } }
|
|
18279
|
+
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
18280
|
function IconCell (_ref) {
|
|
17849
18281
|
var children = _ref.children,
|
|
17850
18282
|
column = _ref.column;
|
|
@@ -17884,8 +18316,8 @@ function IconCell (_ref) {
|
|
|
17884
18316
|
|
|
17885
18317
|
var _excluded$1 = ["index"],
|
|
17886
18318
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
17887
|
-
function ownKeys$
|
|
17888
|
-
function _objectSpread$
|
|
18319
|
+
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; }
|
|
18320
|
+
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; }
|
|
17889
18321
|
var LOG$5 = getLogger('Backoffice', 'CellRenderer');
|
|
17890
18322
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
17891
18323
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -17899,7 +18331,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
17899
18331
|
component: false,
|
|
17900
18332
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
17901
18333
|
value: form,
|
|
17902
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
18334
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$q({}, props))
|
|
17903
18335
|
})
|
|
17904
18336
|
});
|
|
17905
18337
|
};
|
|
@@ -17947,7 +18379,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
17947
18379
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
17948
18380
|
longDescriptionType = 'text';
|
|
17949
18381
|
}
|
|
17950
|
-
var modifiedColumn = _objectSpread$
|
|
18382
|
+
var modifiedColumn = _objectSpread$q(_objectSpread$q({}, column), {}, {
|
|
17951
18383
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
17952
18384
|
});
|
|
17953
18385
|
if (column) {
|
|
@@ -17960,34 +18392,34 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
17960
18392
|
};
|
|
17961
18393
|
switch (modifiedColumn.type) {
|
|
17962
18394
|
case 'boolean':
|
|
17963
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
18395
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$q({}, cellProps));
|
|
17964
18396
|
break;
|
|
17965
18397
|
case 'text':
|
|
17966
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
18398
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$q({}, cellProps));
|
|
17967
18399
|
break;
|
|
17968
18400
|
case 'select':
|
|
17969
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
18401
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$q({}, cellProps));
|
|
17970
18402
|
case 'media':
|
|
17971
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
18403
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$q({}, cellProps));
|
|
17972
18404
|
break;
|
|
17973
18405
|
case 'mediaItem':
|
|
17974
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
18406
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$q({}, cellProps));
|
|
17975
18407
|
break;
|
|
17976
18408
|
case 'unixTimeStamp':
|
|
17977
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
18409
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$q({}, cellProps));
|
|
17978
18410
|
break;
|
|
17979
18411
|
case 'unixTimeStampCheck':
|
|
17980
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
18412
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$q({}, cellProps));
|
|
17981
18413
|
break;
|
|
17982
18414
|
case 'icon':
|
|
17983
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
18415
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$q({}, cellProps));
|
|
17984
18416
|
break;
|
|
17985
18417
|
default:
|
|
17986
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
18418
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$q({}, cellProps));
|
|
17987
18419
|
break;
|
|
17988
18420
|
}
|
|
17989
18421
|
}
|
|
17990
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
18422
|
+
return /*#__PURE__*/jsx("td", _objectSpread$q(_objectSpread$q({}, restProps), {}, {
|
|
17991
18423
|
children: childNode
|
|
17992
18424
|
}));
|
|
17993
18425
|
};
|
|
@@ -18322,7 +18754,9 @@ function AGHistogram (_ref) {
|
|
|
18322
18754
|
var SMChart = function SMChart(props) {
|
|
18323
18755
|
var _useDivaCore = useDivaCore(),
|
|
18324
18756
|
userHasPermission = _useDivaCore.actions.userHasPermission;
|
|
18757
|
+
var root = useStore();
|
|
18325
18758
|
var hasPermission = userHasPermission(props.permission);
|
|
18759
|
+
var darkmode = root.contentStore.theme === 'darkmode';
|
|
18326
18760
|
return hasPermission ? /*#__PURE__*/jsx(Histogram, {
|
|
18327
18761
|
field: props.field,
|
|
18328
18762
|
interval: props.interval,
|
|
@@ -18333,22 +18767,23 @@ var SMChart = function SMChart(props) {
|
|
|
18333
18767
|
description: props.description,
|
|
18334
18768
|
title: props.title,
|
|
18335
18769
|
apiTranslation: props.apiTranslation,
|
|
18336
|
-
component: props.component
|
|
18770
|
+
component: props.component,
|
|
18771
|
+
darkmode: darkmode
|
|
18337
18772
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
18338
18773
|
};
|
|
18339
18774
|
|
|
18340
|
-
function ownKeys$
|
|
18341
|
-
function _objectSpread$
|
|
18342
|
-
function _createForOfIteratorHelper$8(
|
|
18343
|
-
function _unsupportedIterableToArray$8(
|
|
18344
|
-
function _arrayLikeToArray$8(
|
|
18775
|
+
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; }
|
|
18776
|
+
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; }
|
|
18777
|
+
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; } } }; }
|
|
18778
|
+
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; } }
|
|
18779
|
+
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
18780
|
dayjs.extend(customParseFormat);
|
|
18346
18781
|
dayjs.extend(advancedFormat);
|
|
18347
18782
|
dayjs.extend(weekday);
|
|
18348
18783
|
dayjs.extend(localeData);
|
|
18349
18784
|
dayjs.extend(weekOfYear);
|
|
18350
18785
|
dayjs.extend(weekYear);
|
|
18351
|
-
Select$
|
|
18786
|
+
Select$1.Option;
|
|
18352
18787
|
var LOG$4 = getLogger('Backoffice', 'BaseTable');
|
|
18353
18788
|
var TableWrapper = function TableWrapper(_ref) {
|
|
18354
18789
|
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 +18934,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18499
18934
|
// Convert to Dayjs
|
|
18500
18935
|
(_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
18936
|
]
|
|
18502
|
-
}), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(
|
|
18937
|
+
}), ((_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
18938
|
style: {
|
|
18504
18939
|
minWidth: '200px'
|
|
18505
18940
|
},
|
|
@@ -18596,7 +19031,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18596
19031
|
},
|
|
18597
19032
|
dataSource: data,
|
|
18598
19033
|
loading: state.loading,
|
|
18599
|
-
pagination: _objectSpread$
|
|
19034
|
+
pagination: _objectSpread$p(_objectSpread$p({}, state.pagination), {}, {
|
|
18600
19035
|
showTotal: function showTotal(total, range) {
|
|
18601
19036
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
18602
19037
|
},
|
|
@@ -18896,7 +19331,7 @@ function BulkAction(_ref6) {
|
|
|
18896
19331
|
}
|
|
18897
19332
|
_context4.t0 = data;
|
|
18898
19333
|
_context4.next = 10;
|
|
18899
|
-
return apiInterface.update(_objectSpread$
|
|
19334
|
+
return apiInterface.update(_objectSpread$p(_objectSpread$p({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
18900
19335
|
case 10:
|
|
18901
19336
|
_context4.t1 = _context4.sent;
|
|
18902
19337
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -18993,8 +19428,8 @@ function SelectionText(_ref8) {
|
|
|
18993
19428
|
});
|
|
18994
19429
|
}
|
|
18995
19430
|
|
|
18996
|
-
function ownKeys$
|
|
18997
|
-
function _objectSpread$
|
|
19431
|
+
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; }
|
|
19432
|
+
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
19433
|
function getColumnFilterProps (_ref) {
|
|
18999
19434
|
var filter = _ref.filter,
|
|
19000
19435
|
title = _ref.title;
|
|
@@ -19166,7 +19601,7 @@ var advancedProps = function advancedProps(title) {
|
|
|
19166
19601
|
},
|
|
19167
19602
|
children: /*#__PURE__*/jsxs(Space, {
|
|
19168
19603
|
direction: "vertical",
|
|
19169
|
-
children: [/*#__PURE__*/jsxs(Select$
|
|
19604
|
+
children: [/*#__PURE__*/jsxs(Select$1, {
|
|
19170
19605
|
defaultValue: "contains",
|
|
19171
19606
|
style: {
|
|
19172
19607
|
width: 188,
|
|
@@ -19175,28 +19610,28 @@ var advancedProps = function advancedProps(title) {
|
|
|
19175
19610
|
onSelect: function onSelect(value) {
|
|
19176
19611
|
setSelectedKeys([selectedKeys[0], value]);
|
|
19177
19612
|
},
|
|
19178
|
-
children: [/*#__PURE__*/jsx(Select$
|
|
19613
|
+
children: [/*#__PURE__*/jsx(Select$1.Option, {
|
|
19179
19614
|
value: "eq",
|
|
19180
19615
|
children: "Ist equivalent zu"
|
|
19181
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19616
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19182
19617
|
value: "ne",
|
|
19183
19618
|
children: "Ist nicht equivalent zu"
|
|
19184
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19619
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19185
19620
|
value: "contains",
|
|
19186
19621
|
children: "Enth\xE4lt"
|
|
19187
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19622
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19188
19623
|
value: "doesnotcontain",
|
|
19189
19624
|
children: "Enth\xE4lt nicht"
|
|
19190
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19625
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19191
19626
|
value: "startswith",
|
|
19192
19627
|
children: "Beginnt mit"
|
|
19193
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19628
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19194
19629
|
value: "endswith",
|
|
19195
19630
|
children: "Endet mit"
|
|
19196
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19631
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19197
19632
|
value: "isnull",
|
|
19198
19633
|
children: "Ist Null"
|
|
19199
|
-
}), /*#__PURE__*/jsx(Select$
|
|
19634
|
+
}), /*#__PURE__*/jsx(Select$1.Option, {
|
|
19200
19635
|
value: "isnotnull",
|
|
19201
19636
|
children: "Ist nicht Null"
|
|
19202
19637
|
})]
|
|
@@ -19343,7 +19778,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
19343
19778
|
},
|
|
19344
19779
|
children: /*#__PURE__*/jsxs(Space, {
|
|
19345
19780
|
direction: "vertical",
|
|
19346
|
-
children: [/*#__PURE__*/jsx(Select$
|
|
19781
|
+
children: [/*#__PURE__*/jsx(Select$1, {
|
|
19347
19782
|
placeholder: "Filter ".concat(title),
|
|
19348
19783
|
value: selectedKeys[0],
|
|
19349
19784
|
style: {
|
|
@@ -19357,7 +19792,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
19357
19792
|
});
|
|
19358
19793
|
},
|
|
19359
19794
|
options: filter.map(function (f) {
|
|
19360
|
-
return _objectSpread$
|
|
19795
|
+
return _objectSpread$o(_objectSpread$o({}, f), {}, {
|
|
19361
19796
|
label: t(f.label)
|
|
19362
19797
|
});
|
|
19363
19798
|
})
|
|
@@ -19406,7 +19841,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
19406
19841
|
setDisplaySelectedvalues = _useState4[1];
|
|
19407
19842
|
var options = [];
|
|
19408
19843
|
options = filter.map(function (f) {
|
|
19409
|
-
return _objectSpread$
|
|
19844
|
+
return _objectSpread$o(_objectSpread$o({}, f), {}, {
|
|
19410
19845
|
label: t(f.label)
|
|
19411
19846
|
});
|
|
19412
19847
|
});
|
|
@@ -19438,7 +19873,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
19438
19873
|
},
|
|
19439
19874
|
children: [/*#__PURE__*/jsx(Space, {
|
|
19440
19875
|
direction: "vertical",
|
|
19441
|
-
children: /*#__PURE__*/jsx(Select$
|
|
19876
|
+
children: /*#__PURE__*/jsx(Select$1, {
|
|
19442
19877
|
mode: "multiple",
|
|
19443
19878
|
allowClear: true,
|
|
19444
19879
|
value: displayselectedValues,
|
|
@@ -19480,8 +19915,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
19480
19915
|
};
|
|
19481
19916
|
};
|
|
19482
19917
|
|
|
19483
|
-
function ownKeys$
|
|
19484
|
-
function _objectSpread$
|
|
19918
|
+
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; }
|
|
19919
|
+
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
19920
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
19486
19921
|
var columns = configuration.columns.filter(function (c) {
|
|
19487
19922
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -19532,7 +19967,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
19532
19967
|
}
|
|
19533
19968
|
function mapColumn(column, onUpdate) {
|
|
19534
19969
|
var _column$field, _column$children;
|
|
19535
|
-
return _objectSpread$
|
|
19970
|
+
return _objectSpread$n(_objectSpread$n(_objectSpread$n({}, column), {}, {
|
|
19536
19971
|
width: column.width || 100,
|
|
19537
19972
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
19538
19973
|
key: column.field || column.title,
|
|
@@ -19581,8 +20016,8 @@ function updateData (_ref) {
|
|
|
19581
20016
|
};
|
|
19582
20017
|
}
|
|
19583
20018
|
|
|
19584
|
-
function ownKeys$
|
|
19585
|
-
function _objectSpread$
|
|
20019
|
+
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; }
|
|
20020
|
+
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
20021
|
function aplyFilterAndSortation (_ref) {
|
|
19587
20022
|
var data = _ref.data,
|
|
19588
20023
|
filters = _ref.filters,
|
|
@@ -19597,7 +20032,7 @@ function aplyFilterAndSortation (_ref) {
|
|
|
19597
20032
|
processedData = sort(sorter || [], processedData);
|
|
19598
20033
|
return {
|
|
19599
20034
|
data: processedData,
|
|
19600
|
-
pagination: _objectSpread$
|
|
20035
|
+
pagination: _objectSpread$m(_objectSpread$m({}, pagination), {}, {
|
|
19601
20036
|
total: processedData.length
|
|
19602
20037
|
})
|
|
19603
20038
|
};
|
|
@@ -19682,8 +20117,8 @@ function filter$1(f, data) {
|
|
|
19682
20117
|
}
|
|
19683
20118
|
|
|
19684
20119
|
var _excluded = ["_id"];
|
|
19685
|
-
function ownKeys$
|
|
19686
|
-
function _objectSpread$
|
|
20120
|
+
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; }
|
|
20121
|
+
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
20122
|
function useTableData$1 (_ref) {
|
|
19688
20123
|
var _configuration$apiInt;
|
|
19689
20124
|
var id = _ref.id;
|
|
@@ -19738,7 +20173,7 @@ function useTableData$1 (_ref) {
|
|
|
19738
20173
|
var _configuration$create;
|
|
19739
20174
|
if (!dataRow) return;
|
|
19740
20175
|
var id = v4();
|
|
19741
|
-
var processedDataRow = flat.unflatten(_objectSpread$
|
|
20176
|
+
var processedDataRow = flat.unflatten(_objectSpread$l({
|
|
19742
20177
|
_id: id,
|
|
19743
20178
|
ID: id
|
|
19744
20179
|
}, dataRow));
|
|
@@ -19750,11 +20185,11 @@ function useTableData$1 (_ref) {
|
|
|
19750
20185
|
newData = _updateData.data;
|
|
19751
20186
|
_updateData.prevDataRow;
|
|
19752
20187
|
_updateData.index;
|
|
19753
|
-
var newState = _objectSpread$
|
|
20188
|
+
var newState = _objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19754
20189
|
data: newData
|
|
19755
20190
|
});
|
|
19756
20191
|
if (!filterServerSide) {
|
|
19757
|
-
var res = aplyFilterAndSortation(_objectSpread$
|
|
20192
|
+
var res = aplyFilterAndSortation(_objectSpread$l(_objectSpread$l({}, filterData), {}, {
|
|
19758
20193
|
data: newData
|
|
19759
20194
|
}));
|
|
19760
20195
|
newState.data = res.data;
|
|
@@ -19766,33 +20201,33 @@ function useTableData$1 (_ref) {
|
|
|
19766
20201
|
var formData = new FormData();
|
|
19767
20202
|
processedDataRow._id;
|
|
19768
20203
|
var value = _objectWithoutProperties(processedDataRow, _excluded);
|
|
19769
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
20204
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$l(_objectSpread$l({}, catalogItem), {}, {
|
|
19770
20205
|
filterContex: filterContex,
|
|
19771
20206
|
value: JSON.stringify([value])
|
|
19772
20207
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
19773
20208
|
if (d && d.Result && d.Result == 'Success') return;
|
|
19774
|
-
setState(_objectSpread$
|
|
20209
|
+
setState(_objectSpread$l({}, oldState));
|
|
19775
20210
|
});
|
|
19776
20211
|
}, [state, catalogItem, filterData]);
|
|
19777
20212
|
useEffect(function () {
|
|
19778
20213
|
if (!catalogItem) return;
|
|
19779
|
-
setState(_objectSpread$
|
|
20214
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19780
20215
|
loading: true,
|
|
19781
|
-
mappingData: _objectSpread$
|
|
20216
|
+
mappingData: _objectSpread$l(_objectSpread$l({}, catalogItem), {}, {
|
|
19782
20217
|
filterContex: filterContex
|
|
19783
20218
|
})
|
|
19784
20219
|
}));
|
|
19785
20220
|
if (!filterServerSide) {
|
|
19786
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
20221
|
+
apiHandler.readList(configuration.mapping, _objectSpread$l(_objectSpread$l({}, catalogItem), {}, {
|
|
19787
20222
|
filterContex: filterContex
|
|
19788
20223
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
19789
20224
|
var newData = data.data.map(function (d) {
|
|
19790
|
-
return _objectSpread$
|
|
20225
|
+
return _objectSpread$l(_objectSpread$l({}, d), {}, {
|
|
19791
20226
|
_id: d._id || d.ID || nanoid()
|
|
19792
20227
|
});
|
|
19793
20228
|
});
|
|
19794
20229
|
onChange({
|
|
19795
|
-
pagination: _objectSpread$
|
|
20230
|
+
pagination: _objectSpread$l({}, state.pagination),
|
|
19796
20231
|
filters: {},
|
|
19797
20232
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
19798
20233
|
return c.defaultSortOrder;
|
|
@@ -19809,7 +20244,7 @@ function useTableData$1 (_ref) {
|
|
|
19809
20244
|
});
|
|
19810
20245
|
} else {
|
|
19811
20246
|
onChange({
|
|
19812
|
-
pagination: _objectSpread$
|
|
20247
|
+
pagination: _objectSpread$l({}, state.pagination),
|
|
19813
20248
|
filters: {},
|
|
19814
20249
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
19815
20250
|
return c.defaultSortOrder;
|
|
@@ -19826,17 +20261,17 @@ function useTableData$1 (_ref) {
|
|
|
19826
20261
|
}
|
|
19827
20262
|
}, [filterContex, catalogItem]);
|
|
19828
20263
|
var onChange = function onChange(p, dataParam) {
|
|
19829
|
-
setState(_objectSpread$
|
|
20264
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19830
20265
|
loading: true
|
|
19831
20266
|
}));
|
|
19832
20267
|
if (!filterServerSide) {
|
|
19833
20268
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
19834
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
20269
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$l(_objectSpread$l({}, p), {}, {
|
|
19835
20270
|
data: unfilteredData
|
|
19836
20271
|
})),
|
|
19837
20272
|
data = _aplyFilterAndSortati.data,
|
|
19838
20273
|
pagination = _aplyFilterAndSortati.pagination;
|
|
19839
|
-
setState(_objectSpread$
|
|
20274
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19840
20275
|
data: data,
|
|
19841
20276
|
pagination: pagination,
|
|
19842
20277
|
loading: false,
|
|
@@ -19847,20 +20282,20 @@ function useTableData$1 (_ref) {
|
|
|
19847
20282
|
sorter: p.sorter
|
|
19848
20283
|
});
|
|
19849
20284
|
} else {
|
|
19850
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
20285
|
+
apiHandler.readList(configuration.mapping, _objectSpread$l(_objectSpread$l({}, catalogItem), {}, {
|
|
19851
20286
|
filterContex: filterContex
|
|
19852
20287
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
19853
|
-
setState(_objectSpread$
|
|
20288
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19854
20289
|
data: data.data.map(function (dt) {
|
|
19855
|
-
return _objectSpread$
|
|
20290
|
+
return _objectSpread$l(_objectSpread$l({}, dt), {}, {
|
|
19856
20291
|
_id: dt._id || dt.ID || nanoid()
|
|
19857
20292
|
});
|
|
19858
20293
|
}),
|
|
19859
|
-
pagination: _objectSpread$
|
|
20294
|
+
pagination: _objectSpread$l(_objectSpread$l({}, p.pagination), {}, {
|
|
19860
20295
|
total: data.total
|
|
19861
20296
|
}),
|
|
19862
20297
|
loading: false,
|
|
19863
|
-
mappingData: _objectSpread$
|
|
20298
|
+
mappingData: _objectSpread$l(_objectSpread$l({}, catalogItem), {}, {
|
|
19864
20299
|
filterContex: filterContex
|
|
19865
20300
|
})
|
|
19866
20301
|
}));
|
|
@@ -19872,7 +20307,7 @@ function useTableData$1 (_ref) {
|
|
|
19872
20307
|
}
|
|
19873
20308
|
};
|
|
19874
20309
|
var onSelect = function onSelect(keys) {
|
|
19875
|
-
setState(_objectSpread$
|
|
20310
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19876
20311
|
selected: keys
|
|
19877
20312
|
}));
|
|
19878
20313
|
};
|
|
@@ -19882,7 +20317,7 @@ function useTableData$1 (_ref) {
|
|
|
19882
20317
|
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
19883
20318
|
while (1) switch (_context2.prev = _context2.next) {
|
|
19884
20319
|
case 0:
|
|
19885
|
-
setState(_objectSpread$
|
|
20320
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19886
20321
|
deleting: true
|
|
19887
20322
|
}));
|
|
19888
20323
|
newData = _toConsumableArray(state.data);
|
|
@@ -19897,7 +20332,7 @@ function useTableData$1 (_ref) {
|
|
|
19897
20332
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
19898
20333
|
return nd._id === state.selected[index];
|
|
19899
20334
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
19900
|
-
mappingData = _objectSpread$
|
|
20335
|
+
mappingData = _objectSpread$l(_objectSpread$l({}, mappingData), state.mappingData);
|
|
19901
20336
|
_context.next = 5;
|
|
19902
20337
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true);
|
|
19903
20338
|
case 5:
|
|
@@ -19947,7 +20382,7 @@ function useTableData$1 (_ref) {
|
|
|
19947
20382
|
}
|
|
19948
20383
|
_context2.next = 18;
|
|
19949
20384
|
return apiHandler.readList(configuration.mapping, {
|
|
19950
|
-
pagination: _objectSpread$
|
|
20385
|
+
pagination: _objectSpread$l(_objectSpread$l({}, state.pagination), {}, {
|
|
19951
20386
|
current: current
|
|
19952
20387
|
}),
|
|
19953
20388
|
columns: configuration.columns,
|
|
@@ -19959,11 +20394,11 @@ function useTableData$1 (_ref) {
|
|
|
19959
20394
|
newData = data.data;
|
|
19960
20395
|
total = data.total;
|
|
19961
20396
|
case 21:
|
|
19962
|
-
setState(_objectSpread$
|
|
20397
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19963
20398
|
selected: [],
|
|
19964
20399
|
deleting: false,
|
|
19965
20400
|
data: newData,
|
|
19966
|
-
pagination: _objectSpread$
|
|
20401
|
+
pagination: _objectSpread$l(_objectSpread$l({}, state.pagination), {}, {
|
|
19967
20402
|
current: current,
|
|
19968
20403
|
total: total
|
|
19969
20404
|
})
|
|
@@ -19979,12 +20414,12 @@ function useTableData$1 (_ref) {
|
|
|
19979
20414
|
};
|
|
19980
20415
|
}();
|
|
19981
20416
|
function setLoading() {
|
|
19982
|
-
setState(_objectSpread$
|
|
20417
|
+
setState(_objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
19983
20418
|
loading: true
|
|
19984
20419
|
}));
|
|
19985
20420
|
}
|
|
19986
|
-
return _objectSpread$
|
|
19987
|
-
configuration: _objectSpread$
|
|
20421
|
+
return _objectSpread$l(_objectSpread$l({}, state), {}, {
|
|
20422
|
+
configuration: _objectSpread$l(_objectSpread$l({}, configuration), {}, {
|
|
19988
20423
|
title: undefined
|
|
19989
20424
|
}),
|
|
19990
20425
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -20086,11 +20521,11 @@ function objectHash (obj) {
|
|
|
20086
20521
|
return hash(hashable);
|
|
20087
20522
|
}
|
|
20088
20523
|
|
|
20089
|
-
function _createForOfIteratorHelper$7(
|
|
20090
|
-
function _unsupportedIterableToArray$7(
|
|
20091
|
-
function _arrayLikeToArray$7(
|
|
20092
|
-
function ownKeys$
|
|
20093
|
-
function _objectSpread$
|
|
20524
|
+
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; } } }; }
|
|
20525
|
+
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; } }
|
|
20526
|
+
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; }
|
|
20527
|
+
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; }
|
|
20528
|
+
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
20529
|
var LOG$3 = getLogger('Backoffice', 'TableData');
|
|
20095
20530
|
function useTableData (_ref) {
|
|
20096
20531
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -20157,7 +20592,7 @@ function useTableData (_ref) {
|
|
|
20157
20592
|
selected: [],
|
|
20158
20593
|
canDelete: !!apiHandler.canDelete,
|
|
20159
20594
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
20160
|
-
mappingData: _objectSpread$
|
|
20595
|
+
mappingData: _objectSpread$k(_objectSpread$k({}, parentData), {}, {
|
|
20161
20596
|
prefilter: {
|
|
20162
20597
|
select: globalFilter.select
|
|
20163
20598
|
}
|
|
@@ -20166,7 +20601,7 @@ function useTableData (_ref) {
|
|
|
20166
20601
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
20167
20602
|
state = _useState14[0],
|
|
20168
20603
|
setState = _useState14[1];
|
|
20169
|
-
var mapping = _objectSpread$
|
|
20604
|
+
var mapping = _objectSpread$k(_objectSpread$k({}, parentData), {}, {
|
|
20170
20605
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
20171
20606
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
20172
20607
|
});
|
|
@@ -20205,14 +20640,14 @@ function useTableData (_ref) {
|
|
|
20205
20640
|
}
|
|
20206
20641
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
20207
20642
|
var newInitData = initData;
|
|
20208
|
-
var newState = _objectSpread$
|
|
20643
|
+
var newState = _objectSpread$k({}, state);
|
|
20209
20644
|
var selected = [];
|
|
20210
20645
|
if (configuration.deselectOnUpdate == false) {
|
|
20211
20646
|
selected = state.selected;
|
|
20212
20647
|
}
|
|
20213
20648
|
var pagination = undefined;
|
|
20214
20649
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
20215
|
-
pagination = _objectSpread$
|
|
20650
|
+
pagination = _objectSpread$k(_objectSpread$k({}, state.pagination), {}, {
|
|
20216
20651
|
total: state.data.length + dataArray.length
|
|
20217
20652
|
});
|
|
20218
20653
|
}
|
|
@@ -20229,7 +20664,7 @@ function useTableData (_ref) {
|
|
|
20229
20664
|
dataRow: dataRow
|
|
20230
20665
|
}),
|
|
20231
20666
|
_data = _updateData.data;
|
|
20232
|
-
newState = _objectSpread$
|
|
20667
|
+
newState = _objectSpread$k(_objectSpread$k({}, newState), {}, {
|
|
20233
20668
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
20234
20669
|
data: _data,
|
|
20235
20670
|
selected: selected
|
|
@@ -20242,8 +20677,8 @@ function useTableData (_ref) {
|
|
|
20242
20677
|
dataRow: dataRow
|
|
20243
20678
|
}),
|
|
20244
20679
|
nextInitData = _updateData2.data;
|
|
20245
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
20246
|
-
filters: _objectSpread$
|
|
20680
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$k(_objectSpread$k(_objectSpread$k({}, filterData), {}, {
|
|
20681
|
+
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
20682
|
}, 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
20683
|
genericProps: globalFilter.toggle
|
|
20249
20684
|
} : undefined), {}, {
|
|
@@ -20253,7 +20688,7 @@ function useTableData (_ref) {
|
|
|
20253
20688
|
_data2 = _aplyFilterAndSortati.data,
|
|
20254
20689
|
_pagination2 = _aplyFilterAndSortati.pagination;
|
|
20255
20690
|
newInitData = nextInitData;
|
|
20256
|
-
newState = _objectSpread$
|
|
20691
|
+
newState = _objectSpread$k(_objectSpread$k({}, newState), {}, {
|
|
20257
20692
|
pagination: _pagination2,
|
|
20258
20693
|
data: _data2,
|
|
20259
20694
|
selected: selected
|
|
@@ -20263,8 +20698,8 @@ function useTableData (_ref) {
|
|
|
20263
20698
|
if (apiHandler.canCreate) {
|
|
20264
20699
|
apiCreate(data).then(function (res) {
|
|
20265
20700
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
20266
|
-
initData && setInitData(_objectSpread$
|
|
20267
|
-
setState(_objectSpread$
|
|
20701
|
+
initData && setInitData(_objectSpread$k({}, initData));
|
|
20702
|
+
setState(_objectSpread$k({}, state));
|
|
20268
20703
|
}
|
|
20269
20704
|
});
|
|
20270
20705
|
}
|
|
@@ -20277,7 +20712,7 @@ function useTableData (_ref) {
|
|
|
20277
20712
|
var triggerRefresh = function triggerRefresh() {
|
|
20278
20713
|
var _configuration$filter7;
|
|
20279
20714
|
setError(undefined);
|
|
20280
|
-
var newGlobalFilter = _objectSpread$
|
|
20715
|
+
var newGlobalFilter = _objectSpread$k({}, globalFilter);
|
|
20281
20716
|
//on refresh update default filter, since global value can change
|
|
20282
20717
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
20283
20718
|
var _configuration$filter8;
|
|
@@ -20288,7 +20723,7 @@ function useTableData (_ref) {
|
|
|
20288
20723
|
newGlobalFilter["default"] = _defaultFilter;
|
|
20289
20724
|
setGlobaFilter(newGlobalFilter);
|
|
20290
20725
|
}
|
|
20291
|
-
onChange(_objectSpread$
|
|
20726
|
+
onChange(_objectSpread$k({
|
|
20292
20727
|
pagination: state.pagination
|
|
20293
20728
|
}, filterData), newGlobalFilter, true);
|
|
20294
20729
|
};
|
|
@@ -20307,7 +20742,7 @@ function useTableData (_ref) {
|
|
|
20307
20742
|
order: c.defaultSortOrder
|
|
20308
20743
|
};
|
|
20309
20744
|
});
|
|
20310
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
20745
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20311
20746
|
loading: false
|
|
20312
20747
|
}));else {
|
|
20313
20748
|
onChange({
|
|
@@ -20364,11 +20799,11 @@ function useTableData (_ref) {
|
|
|
20364
20799
|
case 0:
|
|
20365
20800
|
prefilter = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : globalFilter;
|
|
20366
20801
|
refresh = _args2.length > 2 ? _args2[2] : undefined;
|
|
20367
|
-
setState(_objectSpread$
|
|
20802
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20368
20803
|
loading: true
|
|
20369
20804
|
}));
|
|
20370
20805
|
currentData = initData;
|
|
20371
|
-
filterData = _objectSpread$
|
|
20806
|
+
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
20807
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref5) {
|
|
20373
20808
|
var _ref6 = _slicedToArray(_ref5, 2);
|
|
20374
20809
|
_ref6[0];
|
|
@@ -20376,7 +20811,7 @@ function useTableData (_ref) {
|
|
|
20376
20811
|
return v != null;
|
|
20377
20812
|
}));
|
|
20378
20813
|
currentFilterHash = objectHash(filterData);
|
|
20379
|
-
currentPagination = _objectSpread$
|
|
20814
|
+
currentPagination = _objectSpread$k(_objectSpread$k({}, p.pagination), {}, {
|
|
20380
20815
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
20381
20816
|
});
|
|
20382
20817
|
filterHash.current = currentFilterHash;
|
|
@@ -20384,7 +20819,7 @@ function useTableData (_ref) {
|
|
|
20384
20819
|
_context2.next = 19;
|
|
20385
20820
|
break;
|
|
20386
20821
|
}
|
|
20387
|
-
ssf = _objectSpread$
|
|
20822
|
+
ssf = _objectSpread$k({
|
|
20388
20823
|
pagination: currentPagination,
|
|
20389
20824
|
columns: configuration.columns,
|
|
20390
20825
|
filters: filterData,
|
|
@@ -20398,7 +20833,7 @@ function useTableData (_ref) {
|
|
|
20398
20833
|
data = _context2.sent;
|
|
20399
20834
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
20400
20835
|
currentData = data.data;
|
|
20401
|
-
currentPagination = _objectSpread$
|
|
20836
|
+
currentPagination = _objectSpread$k(_objectSpread$k({}, currentPagination), {}, {
|
|
20402
20837
|
total: data.total
|
|
20403
20838
|
});
|
|
20404
20839
|
_context2.next = 28;
|
|
@@ -20415,7 +20850,7 @@ function useTableData (_ref) {
|
|
|
20415
20850
|
currentData = _data3.data;
|
|
20416
20851
|
setInitData(currentData);
|
|
20417
20852
|
case 25:
|
|
20418
|
-
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$
|
|
20853
|
+
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$k(_objectSpread$k({}, p), {}, {
|
|
20419
20854
|
pagination: currentPagination,
|
|
20420
20855
|
filters: filterData,
|
|
20421
20856
|
data: currentData,
|
|
@@ -20424,11 +20859,11 @@ function useTableData (_ref) {
|
|
|
20424
20859
|
currentData = _data4;
|
|
20425
20860
|
currentPagination = pagination;
|
|
20426
20861
|
case 28:
|
|
20427
|
-
setState(_objectSpread$
|
|
20862
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20428
20863
|
loading: false,
|
|
20429
20864
|
data: currentData,
|
|
20430
20865
|
pagination: currentPagination,
|
|
20431
|
-
mappingData: _objectSpread$
|
|
20866
|
+
mappingData: _objectSpread$k(_objectSpread$k({}, parentData), {}, {
|
|
20432
20867
|
prefilter: prefilter
|
|
20433
20868
|
}),
|
|
20434
20869
|
currentFetchUrl: currentUrl
|
|
@@ -20448,7 +20883,7 @@ function useTableData (_ref) {
|
|
|
20448
20883
|
};
|
|
20449
20884
|
}();
|
|
20450
20885
|
var onSelect = function onSelect(keys) {
|
|
20451
|
-
setState(_objectSpread$
|
|
20886
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20452
20887
|
selected: keys
|
|
20453
20888
|
}));
|
|
20454
20889
|
};
|
|
@@ -20459,7 +20894,7 @@ function useTableData (_ref) {
|
|
|
20459
20894
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
20460
20895
|
while (1) switch (_context4.prev = _context4.next) {
|
|
20461
20896
|
case 0:
|
|
20462
|
-
setState(_objectSpread$
|
|
20897
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20463
20898
|
deleting: true
|
|
20464
20899
|
}));
|
|
20465
20900
|
newData = _toConsumableArray(state.data);
|
|
@@ -20499,7 +20934,7 @@ function useTableData (_ref) {
|
|
|
20499
20934
|
} finally {
|
|
20500
20935
|
_iterator.f();
|
|
20501
20936
|
}
|
|
20502
|
-
mappingData = _objectSpread$
|
|
20937
|
+
mappingData = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, mappingData), state.mappingData), mapToggle);
|
|
20503
20938
|
deleteResult = undefined;
|
|
20504
20939
|
_context3.prev = 7;
|
|
20505
20940
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -20590,12 +21025,12 @@ function useTableData (_ref) {
|
|
|
20590
21025
|
break;
|
|
20591
21026
|
}
|
|
20592
21027
|
_context4.next = 25;
|
|
20593
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
20594
|
-
pagination: _objectSpread$
|
|
21028
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$k({
|
|
21029
|
+
pagination: _objectSpread$k(_objectSpread$k({}, state.pagination), {}, {
|
|
20595
21030
|
current: current
|
|
20596
21031
|
}),
|
|
20597
21032
|
columns: configuration.columns,
|
|
20598
|
-
filters: _objectSpread$
|
|
21033
|
+
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
21034
|
sorter: filterData.sorter
|
|
20600
21035
|
}, 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
21036
|
genericProps: globalFilter.toggle
|
|
@@ -20606,11 +21041,11 @@ function useTableData (_ref) {
|
|
|
20606
21041
|
total = data.total;
|
|
20607
21042
|
case 28:
|
|
20608
21043
|
setInitData(newInitData);
|
|
20609
|
-
setState(_objectSpread$
|
|
21044
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20610
21045
|
selected: [],
|
|
20611
21046
|
deleting: false,
|
|
20612
21047
|
data: newData,
|
|
20613
|
-
pagination: _objectSpread$
|
|
21048
|
+
pagination: _objectSpread$k(_objectSpread$k({}, state.pagination), {}, {
|
|
20614
21049
|
current: current === 0 ? 1 : current,
|
|
20615
21050
|
total: total
|
|
20616
21051
|
})
|
|
@@ -20631,14 +21066,14 @@ function useTableData (_ref) {
|
|
|
20631
21066
|
LOG$3.error('No global select filter defiend');
|
|
20632
21067
|
return;
|
|
20633
21068
|
}
|
|
20634
|
-
var newGlobalFilter = _objectSpread$
|
|
21069
|
+
var newGlobalFilter = _objectSpread$k({}, globalFilter);
|
|
20635
21070
|
if (value !== null && value !== void 0 && value.length) {
|
|
20636
21071
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
20637
21072
|
} else {
|
|
20638
21073
|
newGlobalFilter.select = {};
|
|
20639
21074
|
}
|
|
20640
21075
|
setGlobaFilter(newGlobalFilter);
|
|
20641
|
-
onChange(_objectSpread$
|
|
21076
|
+
onChange(_objectSpread$k({
|
|
20642
21077
|
pagination: state.pagination
|
|
20643
21078
|
}, filterData), newGlobalFilter);
|
|
20644
21079
|
};
|
|
@@ -20652,11 +21087,11 @@ function useTableData (_ref) {
|
|
|
20652
21087
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
20653
21088
|
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', 1];
|
|
20654
21089
|
});
|
|
20655
|
-
var newGlobalFilter = _objectSpread$
|
|
21090
|
+
var newGlobalFilter = _objectSpread$k(_objectSpread$k({}, globalFilter), {}, {
|
|
20656
21091
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
20657
21092
|
});
|
|
20658
21093
|
setGlobaFilter(newGlobalFilter);
|
|
20659
|
-
onChange(_objectSpread$
|
|
21094
|
+
onChange(_objectSpread$k({
|
|
20660
21095
|
pagination: state.pagination
|
|
20661
21096
|
}, filterData), newGlobalFilter);
|
|
20662
21097
|
};
|
|
@@ -20666,7 +21101,7 @@ function useTableData (_ref) {
|
|
|
20666
21101
|
LOG$3.error('No global search filter defiend');
|
|
20667
21102
|
return;
|
|
20668
21103
|
}
|
|
20669
|
-
var newGlobalFilter = _objectSpread$
|
|
21104
|
+
var newGlobalFilter = _objectSpread$k(_objectSpread$k({}, globalFilter), {}, {
|
|
20670
21105
|
search: {}
|
|
20671
21106
|
});
|
|
20672
21107
|
if (value) {
|
|
@@ -20680,7 +21115,7 @@ function useTableData (_ref) {
|
|
|
20680
21115
|
});
|
|
20681
21116
|
}
|
|
20682
21117
|
setGlobaFilter(newGlobalFilter);
|
|
20683
|
-
onChange(_objectSpread$
|
|
21118
|
+
onChange(_objectSpread$k({
|
|
20684
21119
|
pagination: state.pagination
|
|
20685
21120
|
}, filterData), newGlobalFilter);
|
|
20686
21121
|
};
|
|
@@ -20690,17 +21125,17 @@ function useTableData (_ref) {
|
|
|
20690
21125
|
LOG$3.error('No global period filter defiend');
|
|
20691
21126
|
return;
|
|
20692
21127
|
}
|
|
20693
|
-
var newGlobalFilter = _objectSpread$
|
|
21128
|
+
var newGlobalFilter = _objectSpread$k({}, globalFilter);
|
|
20694
21129
|
newGlobalFilter.timeStamp = {
|
|
20695
21130
|
fromTimeStamp: [from],
|
|
20696
21131
|
toTimeStamp: [to]
|
|
20697
21132
|
};
|
|
20698
21133
|
setGlobaFilter(newGlobalFilter);
|
|
20699
|
-
onChange(_objectSpread$
|
|
21134
|
+
onChange(_objectSpread$k({
|
|
20700
21135
|
pagination: state.pagination
|
|
20701
21136
|
}, filterData), newGlobalFilter);
|
|
20702
21137
|
};
|
|
20703
|
-
return _objectSpread$
|
|
21138
|
+
return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
20704
21139
|
title: title,
|
|
20705
21140
|
configuration: configuration,
|
|
20706
21141
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -20740,8 +21175,8 @@ function StandardTable (_ref) {
|
|
|
20740
21175
|
});
|
|
20741
21176
|
}
|
|
20742
21177
|
|
|
20743
|
-
function ownKeys$
|
|
20744
|
-
function _objectSpread$
|
|
21178
|
+
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; }
|
|
21179
|
+
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
21180
|
function Table (props) {
|
|
20746
21181
|
var root = useStore();
|
|
20747
21182
|
var variant = useMemo(function () {
|
|
@@ -20749,15 +21184,15 @@ function Table (props) {
|
|
|
20749
21184
|
return config.variant;
|
|
20750
21185
|
}, [props.id]);
|
|
20751
21186
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
20752
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
21187
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$j({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$j({}, props))]
|
|
20753
21188
|
});
|
|
20754
21189
|
}
|
|
20755
21190
|
|
|
20756
|
-
function _createForOfIteratorHelper$6(
|
|
20757
|
-
function _unsupportedIterableToArray$6(
|
|
20758
|
-
function _arrayLikeToArray$6(
|
|
20759
|
-
function ownKeys$
|
|
20760
|
-
function _objectSpread$
|
|
21191
|
+
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; } } }; }
|
|
21192
|
+
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; } }
|
|
21193
|
+
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; }
|
|
21194
|
+
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; }
|
|
21195
|
+
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
21196
|
function useAGGrid (_ref) {
|
|
20762
21197
|
var id = _ref.id,
|
|
20763
21198
|
filter = _ref.filter,
|
|
@@ -20851,7 +21286,7 @@ function useAGGrid (_ref) {
|
|
|
20851
21286
|
value = _ref3[1];
|
|
20852
21287
|
if (_idx == 0) {
|
|
20853
21288
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
20854
|
-
rdat.push(_objectSpread$
|
|
21289
|
+
rdat.push(_objectSpread$i(_objectSpread$i({}, rd), {}, {
|
|
20855
21290
|
grouping: [idx.toString()]
|
|
20856
21291
|
}));
|
|
20857
21292
|
var sp = key.split(':');
|
|
@@ -20994,8 +21429,8 @@ var value = "value-FCA-6";
|
|
|
20994
21429
|
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
21430
|
styleInject(css_248z$8);
|
|
20996
21431
|
|
|
20997
|
-
function ownKeys$
|
|
20998
|
-
function _objectSpread$
|
|
21432
|
+
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; }
|
|
21433
|
+
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
21434
|
var AGChart = function AGChart(_ref) {
|
|
21000
21435
|
var data = _ref.data;
|
|
21001
21436
|
var groupedData = [];
|
|
@@ -21003,11 +21438,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
21003
21438
|
data.forEach(function (dt) {
|
|
21004
21439
|
if (dt.count == 0) return;
|
|
21005
21440
|
if (groupedData.length > dt.grouping[0]) {
|
|
21006
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
21441
|
+
groupedData[dt.grouping[0]].push(_objectSpread$h(_objectSpread$h({}, dt), {}, {
|
|
21007
21442
|
count: Number(dt.count)
|
|
21008
21443
|
}));
|
|
21009
21444
|
} else {
|
|
21010
|
-
groupedData.push([_objectSpread$
|
|
21445
|
+
groupedData.push([_objectSpread$h(_objectSpread$h({}, dt), {}, {
|
|
21011
21446
|
count: Number(dt.count)
|
|
21012
21447
|
})]);
|
|
21013
21448
|
}
|
|
@@ -21048,8 +21483,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
21048
21483
|
});
|
|
21049
21484
|
};
|
|
21050
21485
|
|
|
21051
|
-
function ownKeys$
|
|
21052
|
-
function _objectSpread$
|
|
21486
|
+
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; }
|
|
21487
|
+
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
21488
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
21054
21489
|
var id = _ref.id,
|
|
21055
21490
|
filter = _ref.filter,
|
|
@@ -21142,7 +21577,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
21142
21577
|
});
|
|
21143
21578
|
});
|
|
21144
21579
|
}
|
|
21145
|
-
return _objectSpread$
|
|
21580
|
+
return _objectSpread$g(_objectSpread$g({}, column), {}, {
|
|
21146
21581
|
cellRenderer: renderer
|
|
21147
21582
|
});
|
|
21148
21583
|
});
|
|
@@ -21416,11 +21851,11 @@ var CustomText$1 = observer(CustomText, {
|
|
|
21416
21851
|
forwardRef: true
|
|
21417
21852
|
});
|
|
21418
21853
|
|
|
21419
|
-
function ownKeys$
|
|
21420
|
-
function _objectSpread$
|
|
21421
|
-
function _createForOfIteratorHelper$5(
|
|
21422
|
-
function _unsupportedIterableToArray$5(
|
|
21423
|
-
function _arrayLikeToArray$5(
|
|
21854
|
+
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; }
|
|
21855
|
+
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; }
|
|
21856
|
+
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; } } }; }
|
|
21857
|
+
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; } }
|
|
21858
|
+
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
21859
|
function useFilterBoxData (id) {
|
|
21425
21860
|
var root = useStore();
|
|
21426
21861
|
var _useMemo = useMemo(function () {
|
|
@@ -21480,7 +21915,7 @@ function useFilterBoxData (id) {
|
|
|
21480
21915
|
} finally {
|
|
21481
21916
|
_iterator.f();
|
|
21482
21917
|
}
|
|
21483
|
-
return _objectSpread$
|
|
21918
|
+
return _objectSpread$f(_objectSpread$f({}, state), ob);
|
|
21484
21919
|
}
|
|
21485
21920
|
return {
|
|
21486
21921
|
configuration: configuration,
|
|
@@ -21491,11 +21926,11 @@ function useFilterBoxData (id) {
|
|
|
21491
21926
|
};
|
|
21492
21927
|
}
|
|
21493
21928
|
|
|
21494
|
-
function _createForOfIteratorHelper$4(
|
|
21495
|
-
function _unsupportedIterableToArray$4(
|
|
21496
|
-
function _arrayLikeToArray$4(
|
|
21497
|
-
function ownKeys$
|
|
21498
|
-
function _objectSpread$
|
|
21929
|
+
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; } } }; }
|
|
21930
|
+
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; } }
|
|
21931
|
+
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; }
|
|
21932
|
+
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; }
|
|
21933
|
+
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
21934
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
21500
21935
|
var id = _ref.id,
|
|
21501
21936
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -21520,10 +21955,10 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
21520
21955
|
return /*#__PURE__*/jsxs("div", {
|
|
21521
21956
|
children: [/*#__PURE__*/jsx(Typography.Text, {
|
|
21522
21957
|
children: filter.title
|
|
21523
|
-
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select
|
|
21958
|
+
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
21524
21959
|
mode: "single",
|
|
21525
21960
|
apiInterface: filter.requestOptions,
|
|
21526
|
-
wholeData: _objectSpread$
|
|
21961
|
+
wholeData: _objectSpread$e(_objectSpread$e({}, state.filter), {}, {
|
|
21527
21962
|
tab: tab
|
|
21528
21963
|
}),
|
|
21529
21964
|
mapping: filter.requestMapping,
|
|
@@ -21755,8 +22190,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
21755
22190
|
return false;
|
|
21756
22191
|
});
|
|
21757
22192
|
|
|
21758
|
-
function ownKeys$
|
|
21759
|
-
function _objectSpread$
|
|
22193
|
+
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; }
|
|
22194
|
+
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
22195
|
function useUIBuilderData (id) {
|
|
21761
22196
|
var save = undefined;
|
|
21762
22197
|
var root = useStore();
|
|
@@ -21788,7 +22223,7 @@ function useUIBuilderData (id) {
|
|
|
21788
22223
|
var configuration = _useMemo.configuration;
|
|
21789
22224
|
useEffect(function () {
|
|
21790
22225
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
21791
|
-
return setFilter(_objectSpread$
|
|
22226
|
+
return setFilter(_objectSpread$d(_objectSpread$d({}, filter), {}, {
|
|
21792
22227
|
sessionGuid: res
|
|
21793
22228
|
}));
|
|
21794
22229
|
});
|
|
@@ -21811,8 +22246,8 @@ function useUIBuilderData (id) {
|
|
|
21811
22246
|
};
|
|
21812
22247
|
}
|
|
21813
22248
|
|
|
21814
|
-
function ownKeys$
|
|
21815
|
-
function _objectSpread$
|
|
22249
|
+
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; }
|
|
22250
|
+
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
22251
|
function UIBuilder(_ref) {
|
|
21817
22252
|
var id = _ref.id;
|
|
21818
22253
|
var state = useUIBuilderData(id);
|
|
@@ -21839,7 +22274,7 @@ function UIBuilder(_ref) {
|
|
|
21839
22274
|
override = {
|
|
21840
22275
|
value: newFilter[item.field],
|
|
21841
22276
|
setValue: function setValue(newVal) {
|
|
21842
|
-
var newFilter = _objectSpread$
|
|
22277
|
+
var newFilter = _objectSpread$c({}, state.filter);
|
|
21843
22278
|
newFilter[item.field] = newVal;
|
|
21844
22279
|
state.setFilter(newFilter);
|
|
21845
22280
|
}
|
|
@@ -21887,7 +22322,7 @@ function UIBuilder(_ref) {
|
|
|
21887
22322
|
case 'AGGrid':
|
|
21888
22323
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
21889
22324
|
id: item.id,
|
|
21890
|
-
filter: _objectSpread$
|
|
22325
|
+
filter: _objectSpread$c({
|
|
21891
22326
|
optionCodices: JSON.stringify(state.data)
|
|
21892
22327
|
}, state.filter),
|
|
21893
22328
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -22047,8 +22482,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
22047
22482
|
};
|
|
22048
22483
|
var OrgItem$1 = observer(OrgItem);
|
|
22049
22484
|
|
|
22050
|
-
function ownKeys$
|
|
22051
|
-
function _objectSpread$
|
|
22485
|
+
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; }
|
|
22486
|
+
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
22487
|
function useTransformJson (_ref) {
|
|
22053
22488
|
var id = _ref.id;
|
|
22054
22489
|
var _useState = useState(),
|
|
@@ -22114,7 +22549,7 @@ function useTransformJson (_ref) {
|
|
|
22114
22549
|
}();
|
|
22115
22550
|
var transformData = function transformData(data, itemChain, parentOrgId) {
|
|
22116
22551
|
var _data$children;
|
|
22117
|
-
return _objectSpread$
|
|
22552
|
+
return _objectSpread$b(_objectSpread$b({}, data), {}, {
|
|
22118
22553
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
22119
22554
|
data: data,
|
|
22120
22555
|
configuration: configuration,
|
|
@@ -22439,7 +22874,7 @@ var SearchSelect = function SearchSelect(_ref) {
|
|
|
22439
22874
|
var _root$dataStore;
|
|
22440
22875
|
root === null || root === void 0 || (_root$dataStore = root.dataStore) === null || _root$dataStore === void 0 || _root$dataStore.setSelectedOrganizationId(value);
|
|
22441
22876
|
};
|
|
22442
|
-
return /*#__PURE__*/jsx(Select$
|
|
22877
|
+
return /*#__PURE__*/jsx(Select$1, {
|
|
22443
22878
|
showSearch: true,
|
|
22444
22879
|
placeholder: t('filter.global'),
|
|
22445
22880
|
allowClear: true,
|
|
@@ -22596,7 +23031,7 @@ function IFrame(_ref) {
|
|
|
22596
23031
|
}
|
|
22597
23032
|
var IFrame$1 = observer(IFrame);
|
|
22598
23033
|
|
|
22599
|
-
function useCatalogEditor (id) {
|
|
23034
|
+
function useCatalogEditor$1 (id) {
|
|
22600
23035
|
var _useDivaCore = useDivaCore(),
|
|
22601
23036
|
_useDivaCore$state = _useDivaCore.state,
|
|
22602
23037
|
jwt = _useDivaCore$state.jwt,
|
|
@@ -22773,8 +23208,8 @@ function useCatalogEditor (id) {
|
|
|
22773
23208
|
};
|
|
22774
23209
|
}
|
|
22775
23210
|
|
|
22776
|
-
function ownKeys$
|
|
22777
|
-
function _objectSpread$
|
|
23211
|
+
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; }
|
|
23212
|
+
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
23213
|
function DragDropUpload(_ref) {
|
|
22779
23214
|
var api2Params = _ref.api2Params,
|
|
22780
23215
|
catalogId = _ref.catalogId,
|
|
@@ -22879,7 +23314,7 @@ function DragDropUpload(_ref) {
|
|
|
22879
23314
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
22880
23315
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
22881
23316
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
22882
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
23317
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$a(_objectSpread$a({}, props), {}, {
|
|
22883
23318
|
children: [/*#__PURE__*/jsx("p", {
|
|
22884
23319
|
className: "ant-upload-drag-icon",
|
|
22885
23320
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -22920,7 +23355,7 @@ function CatalogEditor(_ref) {
|
|
|
22920
23355
|
var root = useStore();
|
|
22921
23356
|
var _useTranslation = useTranslation(),
|
|
22922
23357
|
t = _useTranslation.t;
|
|
22923
|
-
var _useCatalogEditor = useCatalogEditor(id),
|
|
23358
|
+
var _useCatalogEditor = useCatalogEditor$1(id),
|
|
22924
23359
|
error = _useCatalogEditor.error,
|
|
22925
23360
|
content = _useCatalogEditor.content,
|
|
22926
23361
|
onRedirect = _useCatalogEditor.onRedirect,
|
|
@@ -23096,12 +23531,1556 @@ function CatalogEditor(_ref) {
|
|
|
23096
23531
|
}
|
|
23097
23532
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
23098
23533
|
|
|
23534
|
+
function PackageSelector(_ref) {
|
|
23535
|
+
var selectedPackage = _ref.selectedPackage,
|
|
23536
|
+
setSelectedPackage = _ref.setSelectedPackage,
|
|
23537
|
+
enricherService = _ref.enricherService;
|
|
23538
|
+
var _useTranslation = useTranslation$1(),
|
|
23539
|
+
t = _useTranslation.t;
|
|
23540
|
+
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
23541
|
+
apiInterface: {
|
|
23542
|
+
read: enricherService + '/packages'
|
|
23543
|
+
},
|
|
23544
|
+
apiMapping: {
|
|
23545
|
+
type: 'query',
|
|
23546
|
+
map: [{
|
|
23547
|
+
globalValue: 'organizationId',
|
|
23548
|
+
targetField: 'organizationId'
|
|
23549
|
+
}]
|
|
23550
|
+
},
|
|
23551
|
+
selectMapping: {
|
|
23552
|
+
label: '${name}',
|
|
23553
|
+
value: '${_id}'
|
|
23554
|
+
},
|
|
23555
|
+
placeholder: t('backoffice.menu.items.label.SelectPackage'),
|
|
23556
|
+
value: {
|
|
23557
|
+
_id: selectedPackage
|
|
23558
|
+
},
|
|
23559
|
+
onChange: function onChange(value) {
|
|
23560
|
+
return setSelectedPackage(value._id);
|
|
23561
|
+
},
|
|
23562
|
+
search: true,
|
|
23563
|
+
style: {
|
|
23564
|
+
width: 200
|
|
23565
|
+
}
|
|
23566
|
+
});
|
|
23567
|
+
}
|
|
23568
|
+
|
|
23569
|
+
var config$1 = {
|
|
23570
|
+
catalog: {
|
|
23571
|
+
colDef: [{
|
|
23572
|
+
field: 'name',
|
|
23573
|
+
filter: 'text',
|
|
23574
|
+
required: true
|
|
23575
|
+
}, {
|
|
23576
|
+
field: 'comment',
|
|
23577
|
+
filter: 'text'
|
|
23578
|
+
}, {
|
|
23579
|
+
headerName: 'catalogName',
|
|
23580
|
+
marryChildren: true,
|
|
23581
|
+
required: true,
|
|
23582
|
+
children: [{
|
|
23583
|
+
field: 'catalogName.DE',
|
|
23584
|
+
headerName: 'DE',
|
|
23585
|
+
isDictionary: true,
|
|
23586
|
+
filter: 'text'
|
|
23587
|
+
}, {
|
|
23588
|
+
field: 'catalogName.EN',
|
|
23589
|
+
headerName: 'EN',
|
|
23590
|
+
isDictionary: true,
|
|
23591
|
+
filter: 'text'
|
|
23592
|
+
}, {
|
|
23593
|
+
field: 'catalogName.FR',
|
|
23594
|
+
headerName: 'FR',
|
|
23595
|
+
isDictionary: true,
|
|
23596
|
+
filter: 'text'
|
|
23597
|
+
}, {
|
|
23598
|
+
field: 'catalogName.FR',
|
|
23599
|
+
headerName: 'FR',
|
|
23600
|
+
isDictionary: true,
|
|
23601
|
+
filter: 'text'
|
|
23602
|
+
}]
|
|
23603
|
+
}, {
|
|
23604
|
+
headerName: 'catalogInfo',
|
|
23605
|
+
marryChildren: true,
|
|
23606
|
+
children: [{
|
|
23607
|
+
field: 'catalogInfo.DE',
|
|
23608
|
+
headerName: 'DE',
|
|
23609
|
+
isDictionary: true,
|
|
23610
|
+
filter: 'text'
|
|
23611
|
+
}, {
|
|
23612
|
+
field: 'catalogInfo.EN',
|
|
23613
|
+
headerName: 'EN',
|
|
23614
|
+
isDictionary: true,
|
|
23615
|
+
filter: 'text'
|
|
23616
|
+
}, {
|
|
23617
|
+
field: 'catalogInfo.FR',
|
|
23618
|
+
headerName: 'FR',
|
|
23619
|
+
isDictionary: true,
|
|
23620
|
+
filter: 'text'
|
|
23621
|
+
}, {
|
|
23622
|
+
field: 'catalogInfo.FR',
|
|
23623
|
+
headerName: 'FR',
|
|
23624
|
+
isDictionary: true,
|
|
23625
|
+
filter: 'text'
|
|
23626
|
+
}]
|
|
23627
|
+
}, {
|
|
23628
|
+
field: 'contactPersonNo1',
|
|
23629
|
+
filter: 'text'
|
|
23630
|
+
}, {
|
|
23631
|
+
field: 'contactRole1',
|
|
23632
|
+
filter: 'text'
|
|
23633
|
+
}, {
|
|
23634
|
+
field: 'contactName1',
|
|
23635
|
+
filter: 'text'
|
|
23636
|
+
}, {
|
|
23637
|
+
field: 'firstName1',
|
|
23638
|
+
filter: 'text'
|
|
23639
|
+
}, {
|
|
23640
|
+
field: 'formOfAddress1',
|
|
23641
|
+
filter: 'number'
|
|
23642
|
+
}, {
|
|
23643
|
+
field: 'department1',
|
|
23644
|
+
filter: 'text'
|
|
23645
|
+
}, {
|
|
23646
|
+
field: 'telephone1',
|
|
23647
|
+
filter: 'text'
|
|
23648
|
+
}, {
|
|
23649
|
+
field: 'fax1',
|
|
23650
|
+
filter: 'text'
|
|
23651
|
+
}, {
|
|
23652
|
+
field: 'email1',
|
|
23653
|
+
filter: 'text'
|
|
23654
|
+
}, {
|
|
23655
|
+
field: 'street1',
|
|
23656
|
+
filter: 'text'
|
|
23657
|
+
}, {
|
|
23658
|
+
field: 'zipCodeStreet1',
|
|
23659
|
+
filter: 'text'
|
|
23660
|
+
}, {
|
|
23661
|
+
field: 'city1',
|
|
23662
|
+
filter: 'text'
|
|
23663
|
+
}, {
|
|
23664
|
+
field: 'isoCountryId1',
|
|
23665
|
+
filter: 'text'
|
|
23666
|
+
}, {
|
|
23667
|
+
field: 'contactPersonNo2',
|
|
23668
|
+
filter: 'text'
|
|
23669
|
+
}, {
|
|
23670
|
+
field: 'contactRole2',
|
|
23671
|
+
filter: 'text'
|
|
23672
|
+
}, {
|
|
23673
|
+
field: 'contactName2',
|
|
23674
|
+
filter: 'text'
|
|
23675
|
+
}, {
|
|
23676
|
+
field: 'firstName2',
|
|
23677
|
+
filter: 'text'
|
|
23678
|
+
}, {
|
|
23679
|
+
field: 'formOfAddress2',
|
|
23680
|
+
filter: 'number'
|
|
23681
|
+
}, {
|
|
23682
|
+
field: 'department2',
|
|
23683
|
+
filter: 'text'
|
|
23684
|
+
}, {
|
|
23685
|
+
field: 'telephone2',
|
|
23686
|
+
filter: 'text'
|
|
23687
|
+
}, {
|
|
23688
|
+
field: 'fax2',
|
|
23689
|
+
filter: 'text'
|
|
23690
|
+
}, {
|
|
23691
|
+
field: 'email2',
|
|
23692
|
+
filter: 'text'
|
|
23693
|
+
}, {
|
|
23694
|
+
field: 'street2',
|
|
23695
|
+
filter: 'text'
|
|
23696
|
+
}, {
|
|
23697
|
+
field: 'zipCodeStreet2',
|
|
23698
|
+
filter: 'text'
|
|
23699
|
+
}, {
|
|
23700
|
+
field: 'city2',
|
|
23701
|
+
filter: 'text'
|
|
23702
|
+
}, {
|
|
23703
|
+
field: 'isoCountryId2',
|
|
23704
|
+
filter: 'text'
|
|
23705
|
+
}, {
|
|
23706
|
+
field: 'manufactureName1',
|
|
23707
|
+
filter: 'text'
|
|
23708
|
+
}, {
|
|
23709
|
+
field: 'manufactureName2',
|
|
23710
|
+
filter: 'text'
|
|
23711
|
+
}, {
|
|
23712
|
+
field: 'email',
|
|
23713
|
+
filter: 'text'
|
|
23714
|
+
}, {
|
|
23715
|
+
field: 'internetAddress',
|
|
23716
|
+
filter: 'text'
|
|
23717
|
+
}, {
|
|
23718
|
+
field: 'street',
|
|
23719
|
+
filter: 'text'
|
|
23720
|
+
}, {
|
|
23721
|
+
field: 'zipCodeStreet',
|
|
23722
|
+
filter: 'text'
|
|
23723
|
+
}, {
|
|
23724
|
+
field: 'city',
|
|
23725
|
+
filter: 'text'
|
|
23726
|
+
}, {
|
|
23727
|
+
field: 'contactSupplierIsoCountryId',
|
|
23728
|
+
filter: 'text'
|
|
23729
|
+
}, {
|
|
23730
|
+
field: 'zipCodePostBox',
|
|
23731
|
+
filter: 'text'
|
|
23732
|
+
}, {
|
|
23733
|
+
field: 'postBox',
|
|
23734
|
+
filter: 'text'
|
|
23735
|
+
}, {
|
|
23736
|
+
field: 'telephoneSwitchboard',
|
|
23737
|
+
filter: 'text'
|
|
23738
|
+
}, {
|
|
23739
|
+
field: 'faxSwitchboard',
|
|
23740
|
+
filter: 'text'
|
|
23741
|
+
}]
|
|
23742
|
+
},
|
|
23743
|
+
detailInfo: {
|
|
23744
|
+
colDef: [{
|
|
23745
|
+
field: 'detailInfoNo',
|
|
23746
|
+
filter: 'number',
|
|
23747
|
+
required: true,
|
|
23748
|
+
editable: false
|
|
23749
|
+
}, {
|
|
23750
|
+
headerName: 'externalName',
|
|
23751
|
+
marryChildren: true,
|
|
23752
|
+
required: true,
|
|
23753
|
+
children: [{
|
|
23754
|
+
field: 'externalName.DE',
|
|
23755
|
+
headerName: 'DE',
|
|
23756
|
+
isDictionary: true,
|
|
23757
|
+
filter: 'text'
|
|
23758
|
+
}, {
|
|
23759
|
+
field: 'externalName.EN',
|
|
23760
|
+
headerName: 'EN',
|
|
23761
|
+
isDictionary: true,
|
|
23762
|
+
filter: 'text'
|
|
23763
|
+
}, {
|
|
23764
|
+
field: 'externalName.FR',
|
|
23765
|
+
headerName: 'FR',
|
|
23766
|
+
isDictionary: true,
|
|
23767
|
+
filter: 'text'
|
|
23768
|
+
}]
|
|
23769
|
+
}, {
|
|
23770
|
+
headerName: 'internalName',
|
|
23771
|
+
marryChildren: true,
|
|
23772
|
+
required: true,
|
|
23773
|
+
children: [{
|
|
23774
|
+
field: 'internalName.DE',
|
|
23775
|
+
headerName: 'DE',
|
|
23776
|
+
isDictionary: true,
|
|
23777
|
+
filter: 'text'
|
|
23778
|
+
}, {
|
|
23779
|
+
field: 'internalName.EN',
|
|
23780
|
+
headerName: 'EN',
|
|
23781
|
+
isDictionary: true,
|
|
23782
|
+
filter: 'text'
|
|
23783
|
+
}, {
|
|
23784
|
+
field: 'internalName.FR',
|
|
23785
|
+
headerName: 'FR',
|
|
23786
|
+
isDictionary: true,
|
|
23787
|
+
filter: 'text'
|
|
23788
|
+
}]
|
|
23789
|
+
}, {
|
|
23790
|
+
headerName: 'toolTip',
|
|
23791
|
+
marryChildren: true,
|
|
23792
|
+
required: true,
|
|
23793
|
+
children: [{
|
|
23794
|
+
field: 'toolTip.DE',
|
|
23795
|
+
headerName: 'DE',
|
|
23796
|
+
isDictionary: true,
|
|
23797
|
+
filter: 'text'
|
|
23798
|
+
}, {
|
|
23799
|
+
field: 'toolTip.EN',
|
|
23800
|
+
headerName: 'EN',
|
|
23801
|
+
isDictionary: true,
|
|
23802
|
+
filter: 'text'
|
|
23803
|
+
}, {
|
|
23804
|
+
field: 'toolTip.FR',
|
|
23805
|
+
headerName: 'FR',
|
|
23806
|
+
isDictionary: true,
|
|
23807
|
+
filter: 'text'
|
|
23808
|
+
}]
|
|
23809
|
+
}]
|
|
23810
|
+
},
|
|
23811
|
+
feature: {
|
|
23812
|
+
colDef: [{
|
|
23813
|
+
field: 'featureNo',
|
|
23814
|
+
filter: 'text',
|
|
23815
|
+
required: true,
|
|
23816
|
+
editable: false
|
|
23817
|
+
}, {
|
|
23818
|
+
headerName: 'featureText',
|
|
23819
|
+
marryChildren: true,
|
|
23820
|
+
required: true,
|
|
23821
|
+
children: [{
|
|
23822
|
+
field: 'featureText.DE',
|
|
23823
|
+
headerName: 'DE',
|
|
23824
|
+
isDictionary: true,
|
|
23825
|
+
filter: 'text'
|
|
23826
|
+
}, {
|
|
23827
|
+
field: 'featureText.EN',
|
|
23828
|
+
headerName: 'EN',
|
|
23829
|
+
isDictionary: true,
|
|
23830
|
+
filter: 'text'
|
|
23831
|
+
}, {
|
|
23832
|
+
field: 'featureText.FR',
|
|
23833
|
+
headerName: 'FR',
|
|
23834
|
+
isDictionary: true,
|
|
23835
|
+
filter: 'text'
|
|
23836
|
+
}]
|
|
23837
|
+
}]
|
|
23838
|
+
},
|
|
23839
|
+
item: {
|
|
23840
|
+
colDef: [{
|
|
23841
|
+
field: 'serieNo',
|
|
23842
|
+
filter: 'text',
|
|
23843
|
+
required: true,
|
|
23844
|
+
editable: false
|
|
23845
|
+
}, {
|
|
23846
|
+
field: 'sequenceNo',
|
|
23847
|
+
filter: 'text',
|
|
23848
|
+
editable: false
|
|
23849
|
+
}, {
|
|
23850
|
+
field: 'typeNo',
|
|
23851
|
+
filter: 'text',
|
|
23852
|
+
required: true,
|
|
23853
|
+
editable: false
|
|
23854
|
+
}, {
|
|
23855
|
+
field: 'edpNumber',
|
|
23856
|
+
filter: 'text'
|
|
23857
|
+
}, {
|
|
23858
|
+
field: 'eanNumber',
|
|
23859
|
+
filter: 'text'
|
|
23860
|
+
}, {
|
|
23861
|
+
headerName: 'shortText',
|
|
23862
|
+
marryChildren: true,
|
|
23863
|
+
required: true,
|
|
23864
|
+
children: [{
|
|
23865
|
+
field: 'shortText.DE',
|
|
23866
|
+
headerName: 'DE',
|
|
23867
|
+
isDictionary: true,
|
|
23868
|
+
filter: 'text'
|
|
23869
|
+
}, {
|
|
23870
|
+
field: 'shortText.EN',
|
|
23871
|
+
headerName: 'EN',
|
|
23872
|
+
isDictionary: true,
|
|
23873
|
+
filter: 'text'
|
|
23874
|
+
}, {
|
|
23875
|
+
field: 'shortText.FR',
|
|
23876
|
+
headerName: 'FR',
|
|
23877
|
+
isDictionary: true,
|
|
23878
|
+
filter: 'text'
|
|
23879
|
+
}]
|
|
23880
|
+
}, {
|
|
23881
|
+
headerName: 'fullText',
|
|
23882
|
+
marryChildren: true,
|
|
23883
|
+
children: [{
|
|
23884
|
+
field: 'fullText.DE',
|
|
23885
|
+
headerName: 'DE',
|
|
23886
|
+
isDictionary: true,
|
|
23887
|
+
filter: 'text'
|
|
23888
|
+
}, {
|
|
23889
|
+
field: 'fullText.EN',
|
|
23890
|
+
headerName: 'EN',
|
|
23891
|
+
isDictionary: true,
|
|
23892
|
+
filter: 'text'
|
|
23893
|
+
}, {
|
|
23894
|
+
field: 'fullText.FR',
|
|
23895
|
+
headerName: 'FR',
|
|
23896
|
+
isDictionary: true,
|
|
23897
|
+
filter: 'text'
|
|
23898
|
+
}]
|
|
23899
|
+
}, {
|
|
23900
|
+
headerName: 'planningAdvice',
|
|
23901
|
+
marryChildren: true,
|
|
23902
|
+
children: [{
|
|
23903
|
+
field: 'planningAdvice.DE',
|
|
23904
|
+
headerName: 'DE',
|
|
23905
|
+
isDictionary: true,
|
|
23906
|
+
filter: 'text'
|
|
23907
|
+
}, {
|
|
23908
|
+
field: 'planningAdvice.EN',
|
|
23909
|
+
headerName: 'EN',
|
|
23910
|
+
isDictionary: true,
|
|
23911
|
+
filter: 'text'
|
|
23912
|
+
}, {
|
|
23913
|
+
field: 'planningAdvice.FR',
|
|
23914
|
+
headerName: 'FR',
|
|
23915
|
+
isDictionary: true,
|
|
23916
|
+
filter: 'text'
|
|
23917
|
+
}]
|
|
23918
|
+
}, {
|
|
23919
|
+
field: 'salesNumber',
|
|
23920
|
+
filter: 'text'
|
|
23921
|
+
}]
|
|
23922
|
+
},
|
|
23923
|
+
option: {
|
|
23924
|
+
colDef: [{
|
|
23925
|
+
field: 'featureNo',
|
|
23926
|
+
filter: 'text',
|
|
23927
|
+
required: true,
|
|
23928
|
+
editable: false
|
|
23929
|
+
}, {
|
|
23930
|
+
field: 'optionKey',
|
|
23931
|
+
filter: 'text',
|
|
23932
|
+
required: true,
|
|
23933
|
+
editable: false
|
|
23934
|
+
}, {
|
|
23935
|
+
headerName: 'optionText',
|
|
23936
|
+
marryChildren: true,
|
|
23937
|
+
required: true,
|
|
23938
|
+
children: [{
|
|
23939
|
+
field: 'optionText.DE',
|
|
23940
|
+
headerName: 'DE',
|
|
23941
|
+
isDictionary: true,
|
|
23942
|
+
filter: 'text'
|
|
23943
|
+
}, {
|
|
23944
|
+
field: 'optionText.EN',
|
|
23945
|
+
isDictionary: true,
|
|
23946
|
+
filter: 'text'
|
|
23947
|
+
}, {
|
|
23948
|
+
field: 'optionText.FR',
|
|
23949
|
+
isDictionary: true,
|
|
23950
|
+
filter: 'text'
|
|
23951
|
+
}]
|
|
23952
|
+
}, {
|
|
23953
|
+
headerName: 'optionCommentText',
|
|
23954
|
+
marryChildren: true,
|
|
23955
|
+
children: [{
|
|
23956
|
+
field: 'optionCommentText.DE',
|
|
23957
|
+
isDictionary: true,
|
|
23958
|
+
filter: 'text'
|
|
23959
|
+
}, {
|
|
23960
|
+
field: 'optionCommentText.EN',
|
|
23961
|
+
isDictionary: true,
|
|
23962
|
+
filter: 'text'
|
|
23963
|
+
}, {
|
|
23964
|
+
field: 'optionCommentText.FR',
|
|
23965
|
+
isDictionary: true,
|
|
23966
|
+
filter: 'text'
|
|
23967
|
+
}]
|
|
23968
|
+
}]
|
|
23969
|
+
},
|
|
23970
|
+
serie: {
|
|
23971
|
+
colDef: [{
|
|
23972
|
+
headerName: 'seriesName',
|
|
23973
|
+
marryChildren: true,
|
|
23974
|
+
required: true,
|
|
23975
|
+
children: [{
|
|
23976
|
+
field: 'seriesName.DE',
|
|
23977
|
+
isDictionary: true,
|
|
23978
|
+
filter: 'text'
|
|
23979
|
+
}, {
|
|
23980
|
+
field: 'seriesName.EN',
|
|
23981
|
+
isDictionary: true,
|
|
23982
|
+
filter: 'text'
|
|
23983
|
+
}, {
|
|
23984
|
+
field: 'seriesName.FR',
|
|
23985
|
+
isDictionary: true,
|
|
23986
|
+
filter: 'text'
|
|
23987
|
+
}]
|
|
23988
|
+
}, {
|
|
23989
|
+
headerName: 'seriesFullText',
|
|
23990
|
+
marryChildren: true,
|
|
23991
|
+
children: [{
|
|
23992
|
+
field: 'seriesFullText.DE',
|
|
23993
|
+
isDictionary: true,
|
|
23994
|
+
filter: 'text'
|
|
23995
|
+
}, {
|
|
23996
|
+
field: 'seriesFullText.EN',
|
|
23997
|
+
isDictionary: true,
|
|
23998
|
+
filter: 'text'
|
|
23999
|
+
}, {
|
|
24000
|
+
field: 'seriesFullText.FR',
|
|
24001
|
+
isDictionary: true,
|
|
24002
|
+
filter: 'text'
|
|
24003
|
+
}]
|
|
24004
|
+
}, {
|
|
24005
|
+
field: 'serieNo',
|
|
24006
|
+
filter: 'text',
|
|
24007
|
+
required: true,
|
|
24008
|
+
editable: false
|
|
24009
|
+
}]
|
|
24010
|
+
}
|
|
24011
|
+
};
|
|
24012
|
+
|
|
24013
|
+
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; }
|
|
24014
|
+
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; }
|
|
24015
|
+
var renamingTypes = [{
|
|
24016
|
+
label: 'catalog',
|
|
24017
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['catalog']), {}, {
|
|
24018
|
+
value: 'catalog'
|
|
24019
|
+
}),
|
|
24020
|
+
value: 'catalog'
|
|
24021
|
+
}, {
|
|
24022
|
+
label: 'detailInfo',
|
|
24023
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['detailInfo']), {}, {
|
|
24024
|
+
value: 'detailInfo'
|
|
24025
|
+
}),
|
|
24026
|
+
value: 'detailInfo'
|
|
24027
|
+
}, {
|
|
24028
|
+
label: 'feature',
|
|
24029
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['feature']), {}, {
|
|
24030
|
+
value: 'feature'
|
|
24031
|
+
}),
|
|
24032
|
+
value: 'feature'
|
|
24033
|
+
}, {
|
|
24034
|
+
label: 'item',
|
|
24035
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['item']), {}, {
|
|
24036
|
+
value: 'item'
|
|
24037
|
+
}),
|
|
24038
|
+
value: 'item'
|
|
24039
|
+
}, {
|
|
24040
|
+
label: 'option',
|
|
24041
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['option']), {}, {
|
|
24042
|
+
value: 'option'
|
|
24043
|
+
}),
|
|
24044
|
+
value: 'option'
|
|
24045
|
+
}, {
|
|
24046
|
+
label: 'serie',
|
|
24047
|
+
data: _objectSpread$9(_objectSpread$9({}, config$1['serie']), {}, {
|
|
24048
|
+
value: 'serie'
|
|
24049
|
+
}),
|
|
24050
|
+
value: 'serie'
|
|
24051
|
+
}];
|
|
24052
|
+
function IDMCatalogEditor$3(_ref) {
|
|
24053
|
+
var selectedPackage = _ref.selectedPackage,
|
|
24054
|
+
setSelectedPackage = _ref.setSelectedPackage,
|
|
24055
|
+
jwt = _ref.jwt;
|
|
24056
|
+
var _useTranslation = useTranslation$1(),
|
|
24057
|
+
t = _useTranslation.t;
|
|
24058
|
+
var _React$useState = React.useState(renamingTypes[0].data),
|
|
24059
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24060
|
+
selectedType = _React$useState2[0],
|
|
24061
|
+
setSelectedType = _React$useState2[1];
|
|
24062
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
24063
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
24064
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
24065
|
+
children: [t('backoffice.menu.items.label.TableCatalogRenamingIDM'), /*#__PURE__*/jsxs(Space$1, {
|
|
24066
|
+
style: {
|
|
24067
|
+
"float": 'right'
|
|
24068
|
+
},
|
|
24069
|
+
children: [/*#__PURE__*/jsx(PackageSelector, {
|
|
24070
|
+
selectedPackage: selectedPackage,
|
|
24071
|
+
setSelectedPackage: setSelectedPackage,
|
|
24072
|
+
enricherService: "https://gwc-app-d-app-enricher.azurewebsites.net"
|
|
24073
|
+
}), /*#__PURE__*/jsx(SimpleSelect, {
|
|
24074
|
+
options: renamingTypes,
|
|
24075
|
+
value: selectedType,
|
|
24076
|
+
onChange: function onChange(value) {
|
|
24077
|
+
return setSelectedType(value);
|
|
24078
|
+
},
|
|
24079
|
+
placeholder: t('backoffice.menu.items.label.SelectType'),
|
|
24080
|
+
search: true,
|
|
24081
|
+
style: {
|
|
24082
|
+
width: 200
|
|
24083
|
+
}
|
|
24084
|
+
})]
|
|
24085
|
+
})]
|
|
24086
|
+
})
|
|
24087
|
+
}), selectedPackage && selectedType && /*#__PURE__*/jsx(Spreadsheet, {
|
|
24088
|
+
gridId: 'renaming-grid_' + selectedType.value,
|
|
24089
|
+
jwt: jwt,
|
|
24090
|
+
applicationData: {
|
|
24091
|
+
type: selectedType.value,
|
|
24092
|
+
packageId: selectedPackage
|
|
24093
|
+
},
|
|
24094
|
+
configuration: {
|
|
24095
|
+
type: 'dotnetSSM',
|
|
24096
|
+
apiInterface: {
|
|
24097
|
+
read: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/renaming/${type}',
|
|
24098
|
+
create: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/renaming/${type}',
|
|
24099
|
+
"delete": 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/renaming/${type}/${_id}',
|
|
24100
|
+
update: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/renaming/${type}/${_id}'
|
|
24101
|
+
},
|
|
24102
|
+
dateFormat: 'LL',
|
|
24103
|
+
floatingFilter: true,
|
|
24104
|
+
colDef: [].concat(_toConsumableArray(selectedType.colDef), [{
|
|
24105
|
+
field: 'lastUpdatedDate',
|
|
24106
|
+
filter: 'date',
|
|
24107
|
+
cellDataType: 'dateString',
|
|
24108
|
+
editable: false
|
|
24109
|
+
}, {
|
|
24110
|
+
field: 'createdDate',
|
|
24111
|
+
filter: 'date',
|
|
24112
|
+
cellDataType: 'dateString',
|
|
24113
|
+
editable: false
|
|
24114
|
+
}, {
|
|
24115
|
+
field: 'createdByDisplayText',
|
|
24116
|
+
filter: 'text',
|
|
24117
|
+
editable: false
|
|
24118
|
+
}, {
|
|
24119
|
+
field: 'lastUpdatedByDisplayText',
|
|
24120
|
+
filter: 'text',
|
|
24121
|
+
editable: false
|
|
24122
|
+
}, {
|
|
24123
|
+
field: '_id',
|
|
24124
|
+
filter: 'text',
|
|
24125
|
+
editable: false
|
|
24126
|
+
}])
|
|
24127
|
+
}
|
|
24128
|
+
})]
|
|
24129
|
+
});
|
|
24130
|
+
}
|
|
24131
|
+
|
|
24132
|
+
function useCatalogEditor() {
|
|
24133
|
+
var root = useStore();
|
|
24134
|
+
var _useState = useState('IDMTableRenaming'),
|
|
24135
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24136
|
+
openView = _useState2[0],
|
|
24137
|
+
setOpenView = _useState2[1];
|
|
24138
|
+
var _useState3 = useState(),
|
|
24139
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
24140
|
+
selectedPackage = _useState4[0],
|
|
24141
|
+
setSelectedPackage = _useState4[1];
|
|
24142
|
+
return {
|
|
24143
|
+
selectedPackage: selectedPackage,
|
|
24144
|
+
setSelectedPackage: setSelectedPackage,
|
|
24145
|
+
openView: openView,
|
|
24146
|
+
setOpenView: setOpenView,
|
|
24147
|
+
jwt: root.dataStore.jwt,
|
|
24148
|
+
apiConfig: root.configurationStore.apiConfig
|
|
24149
|
+
};
|
|
24150
|
+
}
|
|
24151
|
+
|
|
24152
|
+
function IDMCatalogEditor$2(_ref) {
|
|
24153
|
+
var selectedPackage = _ref.selectedPackage,
|
|
24154
|
+
setSelectedPackage = _ref.setSelectedPackage,
|
|
24155
|
+
jwt = _ref.jwt;
|
|
24156
|
+
var _useTranslation = useTranslation$1(),
|
|
24157
|
+
t = _useTranslation.t;
|
|
24158
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
24159
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
24160
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
24161
|
+
children: [t('backoffice.menu.items.label.IDMTableTabGroups'), /*#__PURE__*/jsx(Space$1, {
|
|
24162
|
+
style: {
|
|
24163
|
+
"float": 'right'
|
|
24164
|
+
},
|
|
24165
|
+
children: /*#__PURE__*/jsx(PackageSelector, {
|
|
24166
|
+
selectedPackage: selectedPackage,
|
|
24167
|
+
setSelectedPackage: setSelectedPackage,
|
|
24168
|
+
enricherService: "https://gwc-app-d-app-enricher.azurewebsites.net"
|
|
24169
|
+
})
|
|
24170
|
+
})]
|
|
24171
|
+
})
|
|
24172
|
+
}), selectedPackage && /*#__PURE__*/jsx(Spreadsheet, {
|
|
24173
|
+
gridId: 'crud-grid_tabgroups',
|
|
24174
|
+
jwt: jwt,
|
|
24175
|
+
applicationData: {
|
|
24176
|
+
packageId: selectedPackage
|
|
24177
|
+
},
|
|
24178
|
+
configuration: {
|
|
24179
|
+
type: 'dotnetSSM',
|
|
24180
|
+
apiInterface: {
|
|
24181
|
+
//TODO: Es gibt globale Tabgroups, die vordefiniert sind und pro Enricher Paket nochmals angepasst werden können -endpoint anpassen?
|
|
24182
|
+
read: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/tabgroup',
|
|
24183
|
+
create: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/tabgroup',
|
|
24184
|
+
"delete": 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/tabgroup/${_id}',
|
|
24185
|
+
update: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/${packageId}/tabgroup/${_id}'
|
|
24186
|
+
},
|
|
24187
|
+
dateFormat: 'LL',
|
|
24188
|
+
floatingFilter: true,
|
|
24189
|
+
colDef: [{
|
|
24190
|
+
headerName: 'Name',
|
|
24191
|
+
marryChildren: true,
|
|
24192
|
+
required: true,
|
|
24193
|
+
children: [{
|
|
24194
|
+
field: 'name.de',
|
|
24195
|
+
headerName: 'DE',
|
|
24196
|
+
isDictionary: true,
|
|
24197
|
+
filter: 'text'
|
|
24198
|
+
}, {
|
|
24199
|
+
field: 'name.en',
|
|
24200
|
+
headerName: 'EN',
|
|
24201
|
+
isDictionary: true,
|
|
24202
|
+
filter: 'text'
|
|
24203
|
+
}, {
|
|
24204
|
+
field: 'name.fr',
|
|
24205
|
+
headerName: 'FR',
|
|
24206
|
+
isDictionary: true,
|
|
24207
|
+
filter: 'text'
|
|
24208
|
+
}, {
|
|
24209
|
+
field: 'name.it',
|
|
24210
|
+
headerName: 'IT',
|
|
24211
|
+
isDictionary: true,
|
|
24212
|
+
filter: 'text'
|
|
24213
|
+
}]
|
|
24214
|
+
}, {
|
|
24215
|
+
field: 'featureNos',
|
|
24216
|
+
headerName: 'FeatureNo (TODO Lookup)',
|
|
24217
|
+
cellDataType: 'string',
|
|
24218
|
+
editable: true,
|
|
24219
|
+
width: 200
|
|
24220
|
+
}, {
|
|
24221
|
+
field: 'organizationId',
|
|
24222
|
+
headerName: 'OrganizationId (TODO DefaultValue)',
|
|
24223
|
+
cellDataType: 'string',
|
|
24224
|
+
editable: true,
|
|
24225
|
+
width: 200
|
|
24226
|
+
}, {
|
|
24227
|
+
field: 'lastUpdatedDate',
|
|
24228
|
+
filter: 'date',
|
|
24229
|
+
cellDataType: 'dateString',
|
|
24230
|
+
editable: false
|
|
24231
|
+
}, {
|
|
24232
|
+
field: 'createdDate',
|
|
24233
|
+
filter: 'date',
|
|
24234
|
+
cellDataType: 'dateString',
|
|
24235
|
+
editable: false
|
|
24236
|
+
}, {
|
|
24237
|
+
field: 'createdByDisplayText',
|
|
24238
|
+
filter: 'text',
|
|
24239
|
+
editable: false
|
|
24240
|
+
}, {
|
|
24241
|
+
field: 'lastUpdatedByDisplayText',
|
|
24242
|
+
filter: 'text',
|
|
24243
|
+
editable: false
|
|
24244
|
+
}, {
|
|
24245
|
+
field: '_id',
|
|
24246
|
+
filter: 'text',
|
|
24247
|
+
editable: false
|
|
24248
|
+
}]
|
|
24249
|
+
}
|
|
24250
|
+
})]
|
|
24251
|
+
});
|
|
24252
|
+
}
|
|
24253
|
+
|
|
24254
|
+
var config = {
|
|
24255
|
+
detailInfos: {
|
|
24256
|
+
colDef: [{
|
|
24257
|
+
field: '_id',
|
|
24258
|
+
filter: 'text',
|
|
24259
|
+
editable: false
|
|
24260
|
+
}, {
|
|
24261
|
+
field: 'detailInfoNo',
|
|
24262
|
+
filter: 'number',
|
|
24263
|
+
editable: false
|
|
24264
|
+
}, {
|
|
24265
|
+
field: 'classification',
|
|
24266
|
+
filter: 'text',
|
|
24267
|
+
editable: false
|
|
24268
|
+
}, {
|
|
24269
|
+
field: 'infoType',
|
|
24270
|
+
filter: 'number',
|
|
24271
|
+
editable: false
|
|
24272
|
+
}, {
|
|
24273
|
+
field: 'layer',
|
|
24274
|
+
filter: 'number',
|
|
24275
|
+
editable: false
|
|
24276
|
+
}, {
|
|
24277
|
+
field: 'url',
|
|
24278
|
+
filter: 'text',
|
|
24279
|
+
editable: false
|
|
24280
|
+
}, {
|
|
24281
|
+
field: 'hashValue',
|
|
24282
|
+
filter: 'text',
|
|
24283
|
+
editable: false
|
|
24284
|
+
}, {
|
|
24285
|
+
field: 'isoLanguageId',
|
|
24286
|
+
filter: 'text',
|
|
24287
|
+
editable: false
|
|
24288
|
+
}, {
|
|
24289
|
+
field: 'mediaType',
|
|
24290
|
+
filter: 'text',
|
|
24291
|
+
editable: false
|
|
24292
|
+
}, {
|
|
24293
|
+
field: 'functionType',
|
|
24294
|
+
filter: 'text',
|
|
24295
|
+
editable: false
|
|
24296
|
+
}, {
|
|
24297
|
+
field: 'mediaItemId',
|
|
24298
|
+
filter: 'text',
|
|
24299
|
+
editable: false
|
|
24300
|
+
}, {
|
|
24301
|
+
field: 'mediaItemRefId',
|
|
24302
|
+
filter: 'text',
|
|
24303
|
+
editable: false
|
|
24304
|
+
}, {
|
|
24305
|
+
field: 'error',
|
|
24306
|
+
filter: 'text',
|
|
24307
|
+
editable: false
|
|
24308
|
+
}, {
|
|
24309
|
+
headerName: 'externalName',
|
|
24310
|
+
marryChildren: true,
|
|
24311
|
+
required: true,
|
|
24312
|
+
editable: false,
|
|
24313
|
+
children: [{
|
|
24314
|
+
field: 'externalName.de',
|
|
24315
|
+
headerName: 'DE',
|
|
24316
|
+
isDictionary: true,
|
|
24317
|
+
editable: false,
|
|
24318
|
+
filter: 'text'
|
|
24319
|
+
}, {
|
|
24320
|
+
field: 'externalName.en',
|
|
24321
|
+
headerName: 'EN',
|
|
24322
|
+
isDictionary: true,
|
|
24323
|
+
editable: false,
|
|
24324
|
+
filter: 'text'
|
|
24325
|
+
}, {
|
|
24326
|
+
field: 'externalName.fr',
|
|
24327
|
+
headerName: 'FR',
|
|
24328
|
+
isDictionary: true,
|
|
24329
|
+
filter: 'text',
|
|
24330
|
+
editable: false
|
|
24331
|
+
}]
|
|
24332
|
+
}, {
|
|
24333
|
+
headerName: 'internalName',
|
|
24334
|
+
marryChildren: true,
|
|
24335
|
+
required: true,
|
|
24336
|
+
children: [{
|
|
24337
|
+
field: 'internalName.de',
|
|
24338
|
+
headerName: 'DE',
|
|
24339
|
+
isDictionary: true,
|
|
24340
|
+
filter: 'text'
|
|
24341
|
+
}, {
|
|
24342
|
+
field: 'internalName.en',
|
|
24343
|
+
headerName: 'EN',
|
|
24344
|
+
isDictionary: true,
|
|
24345
|
+
filter: 'text'
|
|
24346
|
+
}, {
|
|
24347
|
+
field: 'internalName.fr',
|
|
24348
|
+
headerName: 'FR',
|
|
24349
|
+
isDictionary: true,
|
|
24350
|
+
filter: 'text'
|
|
24351
|
+
}]
|
|
24352
|
+
}, {
|
|
24353
|
+
headerName: 'toolTip',
|
|
24354
|
+
marryChildren: true,
|
|
24355
|
+
required: true,
|
|
24356
|
+
children: [{
|
|
24357
|
+
field: 'toolTip.de',
|
|
24358
|
+
headerName: 'DE',
|
|
24359
|
+
isDictionary: true,
|
|
24360
|
+
filter: 'text'
|
|
24361
|
+
}, {
|
|
24362
|
+
field: 'toolTip.en',
|
|
24363
|
+
headerName: 'EN',
|
|
24364
|
+
isDictionary: true,
|
|
24365
|
+
filter: 'text'
|
|
24366
|
+
}, {
|
|
24367
|
+
field: 'toolTip.fr',
|
|
24368
|
+
headerName: 'FR',
|
|
24369
|
+
isDictionary: true,
|
|
24370
|
+
filter: 'text'
|
|
24371
|
+
}]
|
|
24372
|
+
}, {
|
|
24373
|
+
field: 'catalogId',
|
|
24374
|
+
filter: 'text',
|
|
24375
|
+
editable: false
|
|
24376
|
+
}, {
|
|
24377
|
+
field: 'organizationId',
|
|
24378
|
+
filter: 'text',
|
|
24379
|
+
editable: false
|
|
24380
|
+
}]
|
|
24381
|
+
},
|
|
24382
|
+
features: {
|
|
24383
|
+
colDef: [{
|
|
24384
|
+
field: '_id',
|
|
24385
|
+
filter: 'text',
|
|
24386
|
+
editable: false
|
|
24387
|
+
}, {
|
|
24388
|
+
field: 'sequenceNo',
|
|
24389
|
+
filter: 'number',
|
|
24390
|
+
editable: false
|
|
24391
|
+
}, {
|
|
24392
|
+
headerName: 'featureText',
|
|
24393
|
+
marryChildren: true,
|
|
24394
|
+
required: true,
|
|
24395
|
+
editable: false,
|
|
24396
|
+
children: [{
|
|
24397
|
+
field: 'featureText.de',
|
|
24398
|
+
headerName: 'DE',
|
|
24399
|
+
isDictionary: true,
|
|
24400
|
+
editable: false,
|
|
24401
|
+
filter: 'text'
|
|
24402
|
+
}, {
|
|
24403
|
+
field: 'featureText.en',
|
|
24404
|
+
headerName: 'EN',
|
|
24405
|
+
isDictionary: true,
|
|
24406
|
+
editable: false,
|
|
24407
|
+
filter: 'text'
|
|
24408
|
+
}, {
|
|
24409
|
+
field: 'featureText.fr',
|
|
24410
|
+
headerName: 'FR',
|
|
24411
|
+
isDictionary: true,
|
|
24412
|
+
editable: false,
|
|
24413
|
+
filter: 'text'
|
|
24414
|
+
}]
|
|
24415
|
+
}, {
|
|
24416
|
+
field: 'featureNo',
|
|
24417
|
+
filter: 'text',
|
|
24418
|
+
editable: false
|
|
24419
|
+
}, {
|
|
24420
|
+
field: 'catalogId',
|
|
24421
|
+
filter: 'text',
|
|
24422
|
+
editable: false
|
|
24423
|
+
}, {
|
|
24424
|
+
field: 'organizationId',
|
|
24425
|
+
filter: 'text',
|
|
24426
|
+
editable: false
|
|
24427
|
+
}, {
|
|
24428
|
+
field: 'headerPosVariationType',
|
|
24429
|
+
filter: 'text',
|
|
24430
|
+
editable: false
|
|
24431
|
+
}, {
|
|
24432
|
+
field: 'featureT',
|
|
24433
|
+
filter: 'text',
|
|
24434
|
+
editable: false
|
|
24435
|
+
}, {
|
|
24436
|
+
field: 'measureUnit',
|
|
24437
|
+
filter: 'text',
|
|
24438
|
+
editable: false
|
|
24439
|
+
}, {
|
|
24440
|
+
field: 'measureParameter',
|
|
24441
|
+
filter: 'text',
|
|
24442
|
+
editable: false
|
|
24443
|
+
}]
|
|
24444
|
+
},
|
|
24445
|
+
series: {
|
|
24446
|
+
colDef: [{
|
|
24447
|
+
field: '_id',
|
|
24448
|
+
filter: 'text',
|
|
24449
|
+
editable: false
|
|
24450
|
+
}, {
|
|
24451
|
+
headerName: 'seriesName',
|
|
24452
|
+
marryChildren: true,
|
|
24453
|
+
required: true,
|
|
24454
|
+
editable: false,
|
|
24455
|
+
children: [{
|
|
24456
|
+
field: 'seriesName.de',
|
|
24457
|
+
headerName: 'DE',
|
|
24458
|
+
isDictionary: true,
|
|
24459
|
+
editable: false,
|
|
24460
|
+
filter: 'text'
|
|
24461
|
+
}, {
|
|
24462
|
+
field: 'seriesName.en',
|
|
24463
|
+
headerName: 'EN',
|
|
24464
|
+
isDictionary: true,
|
|
24465
|
+
editable: false,
|
|
24466
|
+
filter: 'text'
|
|
24467
|
+
}, {
|
|
24468
|
+
field: 'seriesName.fr',
|
|
24469
|
+
headerName: 'FR',
|
|
24470
|
+
isDictionary: true,
|
|
24471
|
+
editable: false,
|
|
24472
|
+
filter: 'text'
|
|
24473
|
+
}]
|
|
24474
|
+
}, {
|
|
24475
|
+
headerName: 'SeriesFullText',
|
|
24476
|
+
marryChildren: true,
|
|
24477
|
+
required: true,
|
|
24478
|
+
editable: false,
|
|
24479
|
+
children: [{
|
|
24480
|
+
field: 'seriesFullText.de',
|
|
24481
|
+
headerName: 'DE',
|
|
24482
|
+
isDictionary: true,
|
|
24483
|
+
editable: false,
|
|
24484
|
+
filter: 'text'
|
|
24485
|
+
}, {
|
|
24486
|
+
field: 'seriesFullText.en',
|
|
24487
|
+
headerName: 'EN',
|
|
24488
|
+
isDictionary: true,
|
|
24489
|
+
editable: false,
|
|
24490
|
+
filter: 'text'
|
|
24491
|
+
}, {
|
|
24492
|
+
field: 'seriesFullText.fr',
|
|
24493
|
+
headerName: 'FR',
|
|
24494
|
+
isDictionary: true,
|
|
24495
|
+
editable: false,
|
|
24496
|
+
filter: 'text'
|
|
24497
|
+
}]
|
|
24498
|
+
}, {
|
|
24499
|
+
field: 'serieNo',
|
|
24500
|
+
filter: 'number',
|
|
24501
|
+
editable: false
|
|
24502
|
+
}, {
|
|
24503
|
+
field: 'catalogId',
|
|
24504
|
+
filter: 'text',
|
|
24505
|
+
editable: false
|
|
24506
|
+
}, {
|
|
24507
|
+
field: 'organizationId',
|
|
24508
|
+
filter: 'text',
|
|
24509
|
+
editable: false
|
|
24510
|
+
}, {
|
|
24511
|
+
field: 'sequenceNo',
|
|
24512
|
+
filter: 'number',
|
|
24513
|
+
editable: false
|
|
24514
|
+
}, {
|
|
24515
|
+
field: 'purchaseRetailId',
|
|
24516
|
+
filter: 'number',
|
|
24517
|
+
editable: false
|
|
24518
|
+
}, {
|
|
24519
|
+
field: 'validFrom',
|
|
24520
|
+
filter: 'date',
|
|
24521
|
+
cellDataType: 'dateString',
|
|
24522
|
+
editable: false
|
|
24523
|
+
}, {
|
|
24524
|
+
field: 'validUntil',
|
|
24525
|
+
filter: 'date',
|
|
24526
|
+
cellDataType: 'dateString',
|
|
24527
|
+
editable: false
|
|
24528
|
+
}]
|
|
24529
|
+
},
|
|
24530
|
+
serieItems: {
|
|
24531
|
+
colDef: [{
|
|
24532
|
+
field: 'typeNo',
|
|
24533
|
+
filter: 'text',
|
|
24534
|
+
editable: false
|
|
24535
|
+
}, {
|
|
24536
|
+
field: 'edpNumber',
|
|
24537
|
+
filter: 'text',
|
|
24538
|
+
editable: false
|
|
24539
|
+
}, {
|
|
24540
|
+
field: 'eanNumber',
|
|
24541
|
+
filter: 'text',
|
|
24542
|
+
editable: false
|
|
24543
|
+
}, {
|
|
24544
|
+
headerName: 'shortText',
|
|
24545
|
+
marryChildren: true,
|
|
24546
|
+
required: true,
|
|
24547
|
+
editable: false,
|
|
24548
|
+
children: [{
|
|
24549
|
+
field: 'shortText.de',
|
|
24550
|
+
headerName: 'DE',
|
|
24551
|
+
isDictionary: true,
|
|
24552
|
+
filter: 'text',
|
|
24553
|
+
editable: false
|
|
24554
|
+
}, {
|
|
24555
|
+
field: 'shortText.en',
|
|
24556
|
+
headerName: 'EN',
|
|
24557
|
+
isDictionary: true,
|
|
24558
|
+
filter: 'text',
|
|
24559
|
+
editable: false
|
|
24560
|
+
}, {
|
|
24561
|
+
field: 'shortText.fr',
|
|
24562
|
+
headerName: 'FR',
|
|
24563
|
+
isDictionary: true,
|
|
24564
|
+
filter: 'text',
|
|
24565
|
+
editable: false
|
|
24566
|
+
}]
|
|
24567
|
+
}, {
|
|
24568
|
+
headerName: 'fullText',
|
|
24569
|
+
marryChildren: true,
|
|
24570
|
+
required: true,
|
|
24571
|
+
editable: false,
|
|
24572
|
+
children: [{
|
|
24573
|
+
field: 'fullText.de',
|
|
24574
|
+
headerName: 'DE',
|
|
24575
|
+
isDictionary: true,
|
|
24576
|
+
filter: 'text',
|
|
24577
|
+
editable: false
|
|
24578
|
+
}, {
|
|
24579
|
+
field: 'fullText.en',
|
|
24580
|
+
headerName: 'EN',
|
|
24581
|
+
isDictionary: true,
|
|
24582
|
+
filter: 'text',
|
|
24583
|
+
editable: false
|
|
24584
|
+
}, {
|
|
24585
|
+
field: 'fullText.fr',
|
|
24586
|
+
headerName: 'FR',
|
|
24587
|
+
isDictionary: true,
|
|
24588
|
+
filter: 'text',
|
|
24589
|
+
editable: false
|
|
24590
|
+
}]
|
|
24591
|
+
}, {
|
|
24592
|
+
field: 'featureClassRefNo',
|
|
24593
|
+
filter: 'number',
|
|
24594
|
+
editable: false
|
|
24595
|
+
}, {
|
|
24596
|
+
field: 'priceTypeRef',
|
|
24597
|
+
filter: 'number',
|
|
24598
|
+
editable: false
|
|
24599
|
+
}, {
|
|
24600
|
+
field: 'itemIdentification',
|
|
24601
|
+
filter: 'text',
|
|
24602
|
+
editable: false
|
|
24603
|
+
}, {
|
|
24604
|
+
field: 'catalogPage',
|
|
24605
|
+
filter: 'text',
|
|
24606
|
+
editable: false
|
|
24607
|
+
}, {
|
|
24608
|
+
field: 'validFromDate',
|
|
24609
|
+
filter: 'date',
|
|
24610
|
+
cellDataType: 'dateString',
|
|
24611
|
+
editable: false
|
|
24612
|
+
}, {
|
|
24613
|
+
field: 'validUntilDate',
|
|
24614
|
+
filter: 'date',
|
|
24615
|
+
cellDataType: 'dateString',
|
|
24616
|
+
editable: false
|
|
24617
|
+
}, {
|
|
24618
|
+
field: 'weightBrutto',
|
|
24619
|
+
filter: 'number',
|
|
24620
|
+
editable: false
|
|
24621
|
+
}, {
|
|
24622
|
+
field: 'weightNetto',
|
|
24623
|
+
filter: 'number',
|
|
24624
|
+
editable: false
|
|
24625
|
+
}, {
|
|
24626
|
+
field: 'volume',
|
|
24627
|
+
filter: 'number',
|
|
24628
|
+
editable: false
|
|
24629
|
+
}, {
|
|
24630
|
+
field: 'minimumDeliveryTime',
|
|
24631
|
+
filter: 'number',
|
|
24632
|
+
editable: false
|
|
24633
|
+
}, {
|
|
24634
|
+
field: 'typeKey',
|
|
24635
|
+
filter: 'text',
|
|
24636
|
+
editable: false
|
|
24637
|
+
}, {
|
|
24638
|
+
field: 'eClassNo',
|
|
24639
|
+
filter: 'number',
|
|
24640
|
+
editable: false
|
|
24641
|
+
}, {
|
|
24642
|
+
field: 'detailInfoRefs',
|
|
24643
|
+
editable: false
|
|
24644
|
+
}, {
|
|
24645
|
+
field: 'partListExclusive',
|
|
24646
|
+
editable: false
|
|
24647
|
+
}, {
|
|
24648
|
+
field: 'partListRef',
|
|
24649
|
+
filter: 'text',
|
|
24650
|
+
editable: false
|
|
24651
|
+
}, {
|
|
24652
|
+
field: 'decisionRefs',
|
|
24653
|
+
editable: false
|
|
24654
|
+
}, {
|
|
24655
|
+
field: 'mandatoryAdditionalItems',
|
|
24656
|
+
editable: false
|
|
24657
|
+
}, {
|
|
24658
|
+
field: 'optionalAdditionalItems',
|
|
24659
|
+
editable: false
|
|
24660
|
+
}, {
|
|
24661
|
+
field: 'sequenceNo',
|
|
24662
|
+
filter: 'number',
|
|
24663
|
+
editable: false
|
|
24664
|
+
}, {
|
|
24665
|
+
headerName: 'planningAdvice',
|
|
24666
|
+
marryChildren: true,
|
|
24667
|
+
required: true,
|
|
24668
|
+
children: [{
|
|
24669
|
+
field: 'planningAdvice.de',
|
|
24670
|
+
headerName: 'DE',
|
|
24671
|
+
isDictionary: true,
|
|
24672
|
+
filter: 'text'
|
|
24673
|
+
}, {
|
|
24674
|
+
field: 'planningAdvice.en',
|
|
24675
|
+
headerName: 'EN',
|
|
24676
|
+
isDictionary: true,
|
|
24677
|
+
filter: 'text'
|
|
24678
|
+
}, {
|
|
24679
|
+
field: 'planningAdvice.fr',
|
|
24680
|
+
headerName: 'FR',
|
|
24681
|
+
isDictionary: true,
|
|
24682
|
+
filter: 'text'
|
|
24683
|
+
}]
|
|
24684
|
+
}, {
|
|
24685
|
+
headerName: 'groupTitleDb',
|
|
24686
|
+
marryChildren: true,
|
|
24687
|
+
required: true,
|
|
24688
|
+
children: [{
|
|
24689
|
+
field: 'optionalAdditionalItems.groupTitleDb.de',
|
|
24690
|
+
headerName: 'DE',
|
|
24691
|
+
isDictionary: true,
|
|
24692
|
+
filter: 'text'
|
|
24693
|
+
}, {
|
|
24694
|
+
field: 'optionalAdditionalItems.groupTitleDb.en',
|
|
24695
|
+
headerName: 'EN',
|
|
24696
|
+
isDictionary: true,
|
|
24697
|
+
filter: 'text'
|
|
24698
|
+
}, {
|
|
24699
|
+
field: 'optionalAdditionalItems.groupTitleDb.fr',
|
|
24700
|
+
headerName: 'FR',
|
|
24701
|
+
isDictionary: true,
|
|
24702
|
+
filter: 'text'
|
|
24703
|
+
}]
|
|
24704
|
+
}, {
|
|
24705
|
+
field: 'salesNumber',
|
|
24706
|
+
filter: 'text',
|
|
24707
|
+
editable: false
|
|
24708
|
+
}]
|
|
24709
|
+
},
|
|
24710
|
+
featureOptions: {
|
|
24711
|
+
colDef: [{
|
|
24712
|
+
field: '_id',
|
|
24713
|
+
filter: 'text',
|
|
24714
|
+
editable: false
|
|
24715
|
+
}, {
|
|
24716
|
+
field: 'sequenceNo',
|
|
24717
|
+
filter: 'number',
|
|
24718
|
+
editable: false
|
|
24719
|
+
}, {
|
|
24720
|
+
field: 'optionKey',
|
|
24721
|
+
filter: 'text',
|
|
24722
|
+
editable: false
|
|
24723
|
+
}, {
|
|
24724
|
+
headerName: 'optionText',
|
|
24725
|
+
marryChildren: true,
|
|
24726
|
+
required: true,
|
|
24727
|
+
editable: false,
|
|
24728
|
+
children: [{
|
|
24729
|
+
field: 'optionText.de',
|
|
24730
|
+
headerName: 'DE',
|
|
24731
|
+
isDictionary: true,
|
|
24732
|
+
editable: false,
|
|
24733
|
+
filter: 'text'
|
|
24734
|
+
}, {
|
|
24735
|
+
field: 'optionText.en',
|
|
24736
|
+
headerName: 'EN',
|
|
24737
|
+
isDictionary: true,
|
|
24738
|
+
editable: false,
|
|
24739
|
+
filter: 'text'
|
|
24740
|
+
}, {
|
|
24741
|
+
field: 'optionText.fr',
|
|
24742
|
+
headerName: 'FR',
|
|
24743
|
+
isDictionary: true,
|
|
24744
|
+
editable: false,
|
|
24745
|
+
filter: 'text'
|
|
24746
|
+
}]
|
|
24747
|
+
}, {
|
|
24748
|
+
headerName: 'optionCommentText',
|
|
24749
|
+
marryChildren: true,
|
|
24750
|
+
required: true,
|
|
24751
|
+
editable: false,
|
|
24752
|
+
children: [{
|
|
24753
|
+
field: 'optionCommentText.de',
|
|
24754
|
+
headerName: 'DE',
|
|
24755
|
+
isDictionary: true,
|
|
24756
|
+
editable: false,
|
|
24757
|
+
filter: 'text'
|
|
24758
|
+
}, {
|
|
24759
|
+
field: 'optionCommentText.en',
|
|
24760
|
+
headerName: 'EN',
|
|
24761
|
+
isDictionary: true,
|
|
24762
|
+
editable: false,
|
|
24763
|
+
filter: 'text'
|
|
24764
|
+
}, {
|
|
24765
|
+
field: 'optionCommentText.fr',
|
|
24766
|
+
headerName: 'FR',
|
|
24767
|
+
isDictionary: true,
|
|
24768
|
+
editable: false,
|
|
24769
|
+
filter: 'text'
|
|
24770
|
+
}]
|
|
24771
|
+
}, {
|
|
24772
|
+
field: 'optionFreeText',
|
|
24773
|
+
editable: false
|
|
24774
|
+
}, {
|
|
24775
|
+
field: 'validFromDate',
|
|
24776
|
+
filter: 'date',
|
|
24777
|
+
cellDataType: 'dateString',
|
|
24778
|
+
editable: false
|
|
24779
|
+
}, {
|
|
24780
|
+
field: 'validUntilDate',
|
|
24781
|
+
filter: 'date',
|
|
24782
|
+
cellDataType: 'dateString',
|
|
24783
|
+
editable: false
|
|
24784
|
+
}, {
|
|
24785
|
+
field: 'materialId',
|
|
24786
|
+
filter: 'text',
|
|
24787
|
+
editable: false
|
|
24788
|
+
}, {
|
|
24789
|
+
field: 'materialNo',
|
|
24790
|
+
filter: 'text',
|
|
24791
|
+
editable: false
|
|
24792
|
+
}, {
|
|
24793
|
+
field: 'materialColorR',
|
|
24794
|
+
filter: 'number',
|
|
24795
|
+
editable: false
|
|
24796
|
+
}, {
|
|
24797
|
+
field: 'materialColorG',
|
|
24798
|
+
filter: 'number',
|
|
24799
|
+
editable: false
|
|
24800
|
+
}, {
|
|
24801
|
+
field: 'materialColorB',
|
|
24802
|
+
filter: 'number',
|
|
24803
|
+
editable: false
|
|
24804
|
+
}, {
|
|
24805
|
+
field: 'measureId',
|
|
24806
|
+
filter: 'text',
|
|
24807
|
+
editable: false
|
|
24808
|
+
}, {
|
|
24809
|
+
field: 'measureNo',
|
|
24810
|
+
filter: 'number',
|
|
24811
|
+
editable: false
|
|
24812
|
+
}, {
|
|
24813
|
+
field: 'measureValue',
|
|
24814
|
+
filter: 'number',
|
|
24815
|
+
editable: false
|
|
24816
|
+
}, {
|
|
24817
|
+
field: 'measureUnit',
|
|
24818
|
+
filter: 'text',
|
|
24819
|
+
editable: false
|
|
24820
|
+
}]
|
|
24821
|
+
}
|
|
24822
|
+
};
|
|
24823
|
+
|
|
24824
|
+
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; }
|
|
24825
|
+
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; }
|
|
24826
|
+
var exclusivityTypes = [{
|
|
24827
|
+
label: 'series',
|
|
24828
|
+
data: _objectSpread$8(_objectSpread$8({}, config['series']), {}, {
|
|
24829
|
+
value: 'series'
|
|
24830
|
+
}),
|
|
24831
|
+
value: 'series'
|
|
24832
|
+
}, {
|
|
24833
|
+
label: 'features',
|
|
24834
|
+
data: _objectSpread$8(_objectSpread$8({}, config['features']), {}, {
|
|
24835
|
+
value: 'features'
|
|
24836
|
+
}),
|
|
24837
|
+
value: 'features'
|
|
24838
|
+
}, {
|
|
24839
|
+
label: 'detailInfos',
|
|
24840
|
+
data: _objectSpread$8(_objectSpread$8({}, config['detailInfos']), {}, {
|
|
24841
|
+
value: 'detailInfos'
|
|
24842
|
+
}),
|
|
24843
|
+
value: 'detailInfos'
|
|
24844
|
+
}, {
|
|
24845
|
+
label: 'serieItems',
|
|
24846
|
+
data: _objectSpread$8(_objectSpread$8({}, config['serieItems']), {}, {
|
|
24847
|
+
value: 'serieItems'
|
|
24848
|
+
}),
|
|
24849
|
+
value: 'serieItems'
|
|
24850
|
+
}, {
|
|
24851
|
+
label: 'featureOptions',
|
|
24852
|
+
data: _objectSpread$8(_objectSpread$8({}, config['featureOptions']), {}, {
|
|
24853
|
+
value: 'featureOptions'
|
|
24854
|
+
}),
|
|
24855
|
+
value: 'featureOptions'
|
|
24856
|
+
}];
|
|
24857
|
+
function IDMCatalogEditor$1(_ref) {
|
|
24858
|
+
var _ref2;
|
|
24859
|
+
var selectedPackage = _ref.selectedPackage,
|
|
24860
|
+
setSelectedPackage = _ref.setSelectedPackage,
|
|
24861
|
+
jwt = _ref.jwt;
|
|
24862
|
+
var _useTranslation = useTranslation$1(),
|
|
24863
|
+
t = _useTranslation.t;
|
|
24864
|
+
var _React$useState = React.useState(exclusivityTypes[0].data),
|
|
24865
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24866
|
+
selectedType = _React$useState2[0],
|
|
24867
|
+
setSelectedType = _React$useState2[1];
|
|
24868
|
+
var _React$useState3 = React.useState(),
|
|
24869
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
24870
|
+
selectedSerie = _React$useState4[0],
|
|
24871
|
+
setSelectedSerie = _React$useState4[1];
|
|
24872
|
+
var _React$useState5 = React.useState(),
|
|
24873
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
24874
|
+
selectedOption = _React$useState6[0],
|
|
24875
|
+
setSelectedOption = _React$useState6[1];
|
|
24876
|
+
var onChangeType = function onChangeType(value) {
|
|
24877
|
+
if (value.value !== 'serieItems') {
|
|
24878
|
+
setSelectedSerie(undefined);
|
|
24879
|
+
}
|
|
24880
|
+
if (value.value !== 'featureOptions') {
|
|
24881
|
+
setSelectedOption(undefined);
|
|
24882
|
+
}
|
|
24883
|
+
setSelectedType(value);
|
|
24884
|
+
};
|
|
24885
|
+
var showTable = function showTable() {
|
|
24886
|
+
/*
|
|
24887
|
+
This condition is valid when:
|
|
24888
|
+
1. `selectedPackage` is defined (not null and not undefined).
|
|
24889
|
+
2. `selectedType` is defined.
|
|
24890
|
+
3. If `selectedType.value` is neither 'serieItems' nor 'featureOptions', the condition is valid regardless of the values of `selectedSerie` and `selectedOption`.
|
|
24891
|
+
4. If `selectedType.value` is 'serieItems', then `selectedSerie` must also be defined for the condition to be valid.
|
|
24892
|
+
5. If `selectedType.value` is 'featureOptions', then `selectedOption` must also be defined for the condition to be valid.
|
|
24893
|
+
*/
|
|
24894
|
+
return selectedPackage && selectedType && (selectedType.value !== 'serieItems' && selectedType.value !== 'featureOptions' || selectedType.value === 'serieItems' && selectedSerie || selectedType.value === 'featureOptions' && selectedOption);
|
|
24895
|
+
};
|
|
24896
|
+
var getPatchId = function getPatchId() {
|
|
24897
|
+
if (selectedType.value === 'serieItems' && selectedSerie) return '${typeNo}';
|
|
24898
|
+
if (selectedType.value === 'featureOptions' && selectedOption) return '${optionKey}';
|
|
24899
|
+
if (selectedType.value === 'series') return '${serieNo}';
|
|
24900
|
+
if (selectedType.value === 'features') return '${featureNo}';
|
|
24901
|
+
if (selectedType.value === 'detailInfos') return '${detailInfoNo}';
|
|
24902
|
+
return '${_id}';
|
|
24903
|
+
};
|
|
24904
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
24905
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
24906
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
24907
|
+
children: [t('backoffice.menu.items.label.IDMTableTabGroups'), /*#__PURE__*/jsxs(Space$1, {
|
|
24908
|
+
style: {
|
|
24909
|
+
"float": 'right'
|
|
24910
|
+
},
|
|
24911
|
+
children: [/*#__PURE__*/jsx(PackageSelector, {
|
|
24912
|
+
selectedPackage: selectedPackage,
|
|
24913
|
+
setSelectedPackage: setSelectedPackage,
|
|
24914
|
+
enricherService: "https://gwc-app-d-app-enricher.azurewebsites.net"
|
|
24915
|
+
}), /*#__PURE__*/jsx(SimpleSelect, {
|
|
24916
|
+
options: exclusivityTypes,
|
|
24917
|
+
value: selectedType,
|
|
24918
|
+
onChange: function onChange(value) {
|
|
24919
|
+
return onChangeType(value);
|
|
24920
|
+
},
|
|
24921
|
+
placeholder: t('backoffice.menu.items.label.SelectType'),
|
|
24922
|
+
search: true,
|
|
24923
|
+
style: {
|
|
24924
|
+
width: 200
|
|
24925
|
+
}
|
|
24926
|
+
}), selectedType.value === 'serieItems' && /*#__PURE__*/jsx(SimpleSelect, {
|
|
24927
|
+
apiInterface: {
|
|
24928
|
+
read: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/' + selectedPackage + '/exclusivity/series'
|
|
24929
|
+
},
|
|
24930
|
+
selectMapping: {
|
|
24931
|
+
label: '${seriesName.de}',
|
|
24932
|
+
value: '${_id}'
|
|
24933
|
+
},
|
|
24934
|
+
value: selectedSerie,
|
|
24935
|
+
onChange: function onChange(value) {
|
|
24936
|
+
return setSelectedSerie(value);
|
|
24937
|
+
},
|
|
24938
|
+
placeholder: t('backoffice.menu.items.label.SelectSerie'),
|
|
24939
|
+
search: true,
|
|
24940
|
+
style: {
|
|
24941
|
+
width: 200
|
|
24942
|
+
}
|
|
24943
|
+
}), selectedType.value === 'featureOptions' && /*#__PURE__*/jsx(SimpleSelect, {
|
|
24944
|
+
apiInterface: {
|
|
24945
|
+
read: 'https://gwc-app-d-app-enricher.azurewebsites.net/packages/' + selectedPackage + '/exclusivity/features'
|
|
24946
|
+
},
|
|
24947
|
+
selectMapping: {
|
|
24948
|
+
label: '${featureText.de}',
|
|
24949
|
+
value: '${_id}'
|
|
24950
|
+
},
|
|
24951
|
+
value: selectedOption,
|
|
24952
|
+
onChange: function onChange(value) {
|
|
24953
|
+
return setSelectedOption(value);
|
|
24954
|
+
},
|
|
24955
|
+
placeholder: t('backoffice.menu.items.label.SelectFeature'),
|
|
24956
|
+
search: true,
|
|
24957
|
+
style: {
|
|
24958
|
+
width: 200
|
|
24959
|
+
}
|
|
24960
|
+
})]
|
|
24961
|
+
})]
|
|
24962
|
+
})
|
|
24963
|
+
}), showTable() && /*#__PURE__*/jsx(Spreadsheet, {
|
|
24964
|
+
gridId: (_ref2 = 'crud-grid_exclusivity_' + selectedType.value + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.seriesName.de)) !== null && _ref2 !== void 0 ? _ref2 : '',
|
|
24965
|
+
jwt: jwt,
|
|
24966
|
+
applicationData: {
|
|
24967
|
+
type: selectedType.value,
|
|
24968
|
+
packageId: selectedPackage,
|
|
24969
|
+
subType: selectedType.value === 'serieItems' ? 'series' : 'features',
|
|
24970
|
+
listType: selectedType.value === 'serieItems' ? 'items' : 'options',
|
|
24971
|
+
subTypeId: selectedType.value === 'serieItems' ? selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id : selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption._id
|
|
24972
|
+
},
|
|
24973
|
+
configuration: {
|
|
24974
|
+
type: 'dotnetSSM',
|
|
24975
|
+
apiInterface: {
|
|
24976
|
+
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}',
|
|
24977
|
+
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()
|
|
24978
|
+
},
|
|
24979
|
+
idCol: selectedSerie !== null && selectedSerie !== void 0 && selectedSerie._id ? 'typeNo' : selectedOption ? 'optionKey' : undefined,
|
|
24980
|
+
dateFormat: 'LL',
|
|
24981
|
+
floatingFilter: true,
|
|
24982
|
+
colDef: [{
|
|
24983
|
+
field: 'active',
|
|
24984
|
+
editable: true,
|
|
24985
|
+
cellDataType: 'boolean'
|
|
24986
|
+
}].concat(_toConsumableArray(selectedType.colDef), [{
|
|
24987
|
+
field: 'lastUpdatedDate',
|
|
24988
|
+
filter: 'date',
|
|
24989
|
+
cellDataType: 'dateString',
|
|
24990
|
+
editable: false
|
|
24991
|
+
}, {
|
|
24992
|
+
field: 'createdDate',
|
|
24993
|
+
filter: 'date',
|
|
24994
|
+
cellDataType: 'dateString',
|
|
24995
|
+
editable: false
|
|
24996
|
+
}, {
|
|
24997
|
+
field: 'createdBy',
|
|
24998
|
+
filter: 'text',
|
|
24999
|
+
editable: false
|
|
25000
|
+
}, {
|
|
25001
|
+
field: 'createdByDisplayText',
|
|
25002
|
+
filter: 'text',
|
|
25003
|
+
editable: false
|
|
25004
|
+
}, {
|
|
25005
|
+
field: 'lastUpdatedByDisplayText',
|
|
25006
|
+
filter: 'text',
|
|
25007
|
+
editable: false
|
|
25008
|
+
}, {
|
|
25009
|
+
field: 'lastUpdatedBy',
|
|
25010
|
+
filter: 'text',
|
|
25011
|
+
editable: false
|
|
25012
|
+
}])
|
|
25013
|
+
}
|
|
25014
|
+
})]
|
|
25015
|
+
});
|
|
25016
|
+
}
|
|
25017
|
+
|
|
25018
|
+
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; }
|
|
25019
|
+
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; }
|
|
25020
|
+
function IDMCatalogEditor() {
|
|
25021
|
+
var state = useCatalogEditor();
|
|
25022
|
+
return /*#__PURE__*/jsxs(Layout, {
|
|
25023
|
+
children: [/*#__PURE__*/jsx(Layout.Sider, {
|
|
25024
|
+
children: /*#__PURE__*/jsx(Menu$1, {
|
|
25025
|
+
theme: "dark",
|
|
25026
|
+
mode: "inline",
|
|
25027
|
+
selectedKeys: state.openView ? [state.openView] : [],
|
|
25028
|
+
onSelect: function onSelect(e) {
|
|
25029
|
+
return state.setOpenView(e.key);
|
|
25030
|
+
},
|
|
25031
|
+
items: [{
|
|
25032
|
+
key: 'IDMTableRenaming',
|
|
25033
|
+
label: 'TODO: Hier kommt die Packages Liste',
|
|
25034
|
+
title: 'TODO: Hier kommt die Packages Liste',
|
|
25035
|
+
disabled: true
|
|
25036
|
+
}, {
|
|
25037
|
+
type: 'divider'
|
|
25038
|
+
}, {
|
|
25039
|
+
key: 'IDMTableRenaming',
|
|
25040
|
+
label: 'IDMTableRenaming'
|
|
25041
|
+
}, {
|
|
25042
|
+
key: 'IDMTableTabGroups',
|
|
25043
|
+
label: 'IDMTableTabGroups'
|
|
25044
|
+
}, {
|
|
25045
|
+
key: 'IDMTableExclusivity',
|
|
25046
|
+
label: 'IDMTableExclusivity'
|
|
25047
|
+
}]
|
|
25048
|
+
})
|
|
25049
|
+
}), /*#__PURE__*/jsx(Layout.Content, {
|
|
25050
|
+
children: /*#__PURE__*/jsx("div", {
|
|
25051
|
+
style: {
|
|
25052
|
+
padding: 16,
|
|
25053
|
+
height: '100%',
|
|
25054
|
+
display: 'flex',
|
|
25055
|
+
flexDirection: 'column'
|
|
25056
|
+
},
|
|
25057
|
+
children: /*#__PURE__*/jsx(Content$1, _objectSpread$7({}, state))
|
|
25058
|
+
})
|
|
25059
|
+
})]
|
|
25060
|
+
});
|
|
25061
|
+
}
|
|
25062
|
+
function Content$1(state) {
|
|
25063
|
+
switch (state.openView) {
|
|
25064
|
+
case 'IDMTableRenaming':
|
|
25065
|
+
return /*#__PURE__*/jsx(IDMCatalogEditor$3, _objectSpread$7({}, state));
|
|
25066
|
+
case 'IDMTableTabGroups':
|
|
25067
|
+
return /*#__PURE__*/jsx(IDMCatalogEditor$2, _objectSpread$7({}, state));
|
|
25068
|
+
case 'IDMTableExclusivity':
|
|
25069
|
+
return /*#__PURE__*/jsx(IDMCatalogEditor$1, _objectSpread$7({}, state));
|
|
25070
|
+
default:
|
|
25071
|
+
return /*#__PURE__*/jsx(Fragment, {});
|
|
25072
|
+
}
|
|
25073
|
+
}
|
|
25074
|
+
|
|
23099
25075
|
var ContentWrapper = function ContentWrapper() {
|
|
23100
25076
|
var root = useStore();
|
|
23101
25077
|
var item = root.contentStore.menuItem;
|
|
23102
25078
|
if (!item) {
|
|
23103
25079
|
return /*#__PURE__*/jsx(Fragment, {});
|
|
23104
25080
|
}
|
|
25081
|
+
if (item.type === 'CatalogEditorIDM') {
|
|
25082
|
+
return /*#__PURE__*/jsx(IDMCatalogEditor, {});
|
|
25083
|
+
}
|
|
23105
25084
|
return /*#__PURE__*/jsxs(Layout.Content, {
|
|
23106
25085
|
id: "contnet",
|
|
23107
25086
|
style: {
|
|
@@ -23199,9 +25178,9 @@ var Content = observer(ContentWrapper);
|
|
|
23199
25178
|
|
|
23200
25179
|
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
25180
|
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(
|
|
25181
|
+
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; } } }; }
|
|
25182
|
+
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; } }
|
|
25183
|
+
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
25184
|
function useRoleSelectorData (_ref) {
|
|
23206
25185
|
var userId = _ref.userId,
|
|
23207
25186
|
id = _ref.id;
|
|
@@ -23966,9 +25945,9 @@ styleInject(css_248z$3);
|
|
|
23966
25945
|
|
|
23967
25946
|
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
25947
|
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(
|
|
25948
|
+
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; } } }; }
|
|
25949
|
+
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; } }
|
|
25950
|
+
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
25951
|
function generateCSV(_x, _x2) {
|
|
23973
25952
|
return _generateCSV.apply(this, arguments);
|
|
23974
25953
|
}
|
|
@@ -24090,9 +26069,9 @@ var generateCSVData = /*#__PURE__*/function () {
|
|
|
24090
26069
|
|
|
24091
26070
|
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
26071
|
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(
|
|
26072
|
+
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; } } }; }
|
|
26073
|
+
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; } }
|
|
26074
|
+
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
26075
|
var deletedObjects = [];
|
|
24097
26076
|
var addedObjects = [];
|
|
24098
26077
|
|
|
@@ -24713,9 +26692,9 @@ function useRelationSelectorData (_ref) {
|
|
|
24713
26692
|
};
|
|
24714
26693
|
}
|
|
24715
26694
|
|
|
24716
|
-
function _createForOfIteratorHelper(
|
|
24717
|
-
function _unsupportedIterableToArray(
|
|
24718
|
-
function _arrayLikeToArray(
|
|
26695
|
+
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; } } }; }
|
|
26696
|
+
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; } }
|
|
26697
|
+
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
26698
|
function filter(input, getActiveItem, filterFields) {
|
|
24720
26699
|
var filter = {};
|
|
24721
26700
|
var _iterator = _createForOfIteratorHelper(filterFields),
|
|
@@ -24959,7 +26938,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
24959
26938
|
}, item.item._id);
|
|
24960
26939
|
};
|
|
24961
26940
|
|
|
24962
|
-
var Option = Select$
|
|
26941
|
+
var Option = Select$1.Option;
|
|
24963
26942
|
var RelationSelector = function RelationSelector(_ref, ref) {
|
|
24964
26943
|
var _relationState$config, _relationState$config2, _relationState$config3, _searchPlaceholder;
|
|
24965
26944
|
var id = _ref.id,
|
|
@@ -24985,7 +26964,7 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
24985
26964
|
relationState.searchItems('');
|
|
24986
26965
|
}, []);
|
|
24987
26966
|
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$
|
|
26967
|
+
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
26968
|
className: select,
|
|
24990
26969
|
showSearch: true,
|
|
24991
26970
|
suffixIcon: /*#__PURE__*/jsx(PlusSquareOutlined, {}),
|