@crystaldesign/diva-backoffice 24.13.0-beta.9 → 24.13.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/index.js +1897 -539
- package/build/types/backoffice/src/Configuration.d.ts +3 -2
- package/build/types/backoffice/src/Configuration.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Content/index.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssetMananger/Upload/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssetMananger/utils.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/Fields/Media/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/useFormData.d.ts +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/CatalogSelector/index.d.ts +7 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/CatalogSelector/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelector/index.d.ts +11 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelector/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/SpreadsheetWrapper/index.d.ts +4 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/SpreadsheetWrapper/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/index.d.ts +9 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableCatalogs/index.d.ts +3 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableCatalogs/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableItems/index.d.ts +3 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableItems/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableSeries/index.d.ts +3 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableSeries/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/types.d.ts +5 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/types.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/useModule.d.ts +7 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/useModule.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/useNavigation.d.ts +7 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/useNavigation.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/PublishCustomCell.d.ts +7 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/PublishCustomCell.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/StandardTable/useTableData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/TreeChart/BreadCrumbsTrigger/index.d.ts.map +1 -1
- package/build/types/backoffice/src/utils/parseServersideFilters.d.ts.map +1 -1
- package/package.json +9 -9
package/build/esm/index.js
CHANGED
|
@@ -119,9 +119,9 @@ import QuestionOutlined from '@ant-design/icons/QuestionOutlined';
|
|
|
119
119
|
import { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';
|
|
120
120
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
121
121
|
import Descriptions$1 from 'antd/es/descriptions';
|
|
122
|
-
import { Spreadsheet as Spreadsheet$
|
|
122
|
+
import { Spreadsheet as Spreadsheet$2 } from '@crystaldesign/spreadsheet';
|
|
123
123
|
import EditOutlined from '@ant-design/icons/lib/icons/EditOutlined';
|
|
124
|
-
import
|
|
124
|
+
import Checkbox$1 from 'antd/es/checkbox/Checkbox';
|
|
125
125
|
import Switch$1 from 'antd/es/switch';
|
|
126
126
|
import Layout$1 from 'antd/es/layout';
|
|
127
127
|
import Menu from 'antd/es/menu';
|
|
@@ -146,9 +146,9 @@ import { ContentItemComponent } from '@crystaldesign/content-item';
|
|
|
146
146
|
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; } } }; }
|
|
147
147
|
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; } }
|
|
148
148
|
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; }
|
|
149
|
-
function ownKeys$
|
|
150
|
-
function _objectSpread$
|
|
151
|
-
var LOG$
|
|
149
|
+
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; }
|
|
150
|
+
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; }
|
|
151
|
+
var LOG$e = getLogger('Backoffice', 'ApplyMapping');
|
|
152
152
|
function applyMapping (_ref) {
|
|
153
153
|
var mappable = _ref.mappable,
|
|
154
154
|
mappingData = _ref.mappingData,
|
|
@@ -168,10 +168,10 @@ function applyMapping (_ref) {
|
|
|
168
168
|
var newValue = {};
|
|
169
169
|
newValue[newKey] = valueToAdd;
|
|
170
170
|
if ((startValue === null || startValue === void 0 ? void 0 : startValue[newKey]) != undefined) {
|
|
171
|
-
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$
|
|
171
|
+
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$P(_objectSpread$P({}, startValue[newKey]), valueToAdd);else startValue[newKey] = type == 'addToSourceValue' ? startValue[newKey] + valueToAdd : valueToAdd;
|
|
172
172
|
return startValue;
|
|
173
173
|
}
|
|
174
|
-
if (newIdx == 1) return _objectSpread$
|
|
174
|
+
if (newIdx == 1) return _objectSpread$P(_objectSpread$P({}, startValue), newValue);
|
|
175
175
|
return _getTarget(idx + 1, keys, startValue, newValue);
|
|
176
176
|
};
|
|
177
177
|
returnValue = _getTarget(0, key.split('.'), returnValue, value);
|
|
@@ -292,7 +292,7 @@ function applyMapping (_ref) {
|
|
|
292
292
|
}
|
|
293
293
|
return returnValue;
|
|
294
294
|
} catch (e) {
|
|
295
|
-
LOG$
|
|
295
|
+
LOG$e.debug('Mapabledata', mappable);
|
|
296
296
|
throw e;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
@@ -356,6 +356,7 @@ function useFullTextSearch(filters) {
|
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
358
|
function parseFilter(filters, prefilter) {
|
|
359
|
+
var _prefilter, _prefilter2;
|
|
359
360
|
var ors = [];
|
|
360
361
|
var ands = [];
|
|
361
362
|
var res = '';
|
|
@@ -373,21 +374,23 @@ function parseFilter(filters, prefilter) {
|
|
|
373
374
|
ands.push([field, [values[i], values[i + 1]]]);
|
|
374
375
|
}
|
|
375
376
|
} else {
|
|
376
|
-
|
|
377
|
-
|
|
377
|
+
//filter[1][2]; // [field, [value, operator, or?]]
|
|
378
|
+
//The third value is the 'or'-flag, unless it is a 'in'-operator,
|
|
379
|
+
//then the array can contain more than 3 values and the last value is the 'in'-operator.
|
|
380
|
+
//The 'or'-flag is either a boolean, or a number. If it is a number it defines to which 'or'-group the filter belongs.
|
|
378
381
|
var inFilter = values[values.length - 1] === 'in';
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
} else {
|
|
387
|
-
while (ors.length <= index) {
|
|
382
|
+
var or = !inFilter ? values[2] : undefined;
|
|
383
|
+
var orIndex = typeof or === 'number' ? or : 0;
|
|
384
|
+
if (inFilter) {
|
|
385
|
+
var inValues = values.slice(0, values.length - 1);
|
|
386
|
+
ands.push([field, [inValues, 'in']]);
|
|
387
|
+
} else if (or) {
|
|
388
|
+
while (ors.length <= orIndex) {
|
|
388
389
|
ors.push([]);
|
|
389
390
|
}
|
|
390
|
-
ors[
|
|
391
|
+
ors[orIndex].push(filter);
|
|
392
|
+
} else {
|
|
393
|
+
ands.push(filter);
|
|
391
394
|
}
|
|
392
395
|
}
|
|
393
396
|
});
|
|
@@ -422,14 +425,18 @@ function parseFilter(filters, prefilter) {
|
|
|
422
425
|
return "{".concat(field, ",").concat(type, ",").concat(value, "}");
|
|
423
426
|
}).join(','));
|
|
424
427
|
}
|
|
425
|
-
|
|
426
|
-
|
|
428
|
+
|
|
429
|
+
//remove enclosing brackets so it can be added to the existing filter
|
|
430
|
+
if ((_prefilter = prefilter) !== null && _prefilter !== void 0 && _prefilter.startsWith('[') && (_prefilter2 = prefilter) !== null && _prefilter2 !== void 0 && _prefilter2.endsWith(']')) {
|
|
431
|
+
prefilter = prefilter.slice(1, -1);
|
|
427
432
|
}
|
|
428
|
-
if (prefilter) {
|
|
429
|
-
|
|
433
|
+
if (prefilter && res) {
|
|
434
|
+
res = res + ',' + prefilter;
|
|
435
|
+
} else if (prefilter) {
|
|
436
|
+
res = prefilter;
|
|
430
437
|
}
|
|
431
438
|
if (res) {
|
|
432
|
-
|
|
439
|
+
res = '[' + res + ']';
|
|
433
440
|
}
|
|
434
441
|
return res;
|
|
435
442
|
}
|
|
@@ -465,9 +472,9 @@ function getLeafColumns(columns) {
|
|
|
465
472
|
});
|
|
466
473
|
}
|
|
467
474
|
|
|
468
|
-
function ownKeys$
|
|
469
|
-
function _objectSpread$
|
|
470
|
-
var LOG$
|
|
475
|
+
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; }
|
|
476
|
+
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; }
|
|
477
|
+
var LOG$d = getLogger('Backoffice', 'ApiHandler');
|
|
471
478
|
var jp = require('jsonpath');
|
|
472
479
|
var _default$d = /*#__PURE__*/function () {
|
|
473
480
|
function _default(configuration, _rootStore) {
|
|
@@ -645,7 +652,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
645
652
|
_context2.next = 20;
|
|
646
653
|
return fetch(finalUrl, {
|
|
647
654
|
method: this._updateMethod,
|
|
648
|
-
headers: _objectSpread$
|
|
655
|
+
headers: _objectSpread$O(_objectSpread$O({}, jwt ? {
|
|
649
656
|
Authorization: 'Bearer ' + jwt
|
|
650
657
|
} : {}), {}, {
|
|
651
658
|
'Content-Type': 'application/json'
|
|
@@ -738,7 +745,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
738
745
|
rootStore: this._rootStore,
|
|
739
746
|
fallBackToParams: true
|
|
740
747
|
});
|
|
741
|
-
if (data) createData = _objectSpread$
|
|
748
|
+
if (data) createData = _objectSpread$O({}, data);
|
|
742
749
|
} else if (data !== undefined) {
|
|
743
750
|
createData = applyMapping({
|
|
744
751
|
mappable: data,
|
|
@@ -881,7 +888,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
881
888
|
_context6.next = 7;
|
|
882
889
|
return fetch((_url = url) === null || _url === void 0 ? void 0 : _url.toString(), {
|
|
883
890
|
method: isApi2 ? 'POST' : 'DELETE',
|
|
884
|
-
headers: _objectSpread$
|
|
891
|
+
headers: _objectSpread$O({}, jwt ? {
|
|
885
892
|
Authorization: 'Bearer ' + jwt
|
|
886
893
|
} : {})
|
|
887
894
|
}).then(/*#__PURE__*/function () {
|
|
@@ -999,7 +1006,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
999
1006
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1000
1007
|
case 2:
|
|
1001
1008
|
jwt = (_this$_rootStore5 = this._rootStore) === null || _this$_rootStore5 === void 0 ? void 0 : _this$_rootStore5.dataStore.jwt;
|
|
1002
|
-
url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1009
|
+
url = filterServerSide ? parseServersideFilters(_objectSpread$O(_objectSpread$O({}, filterServerSide), {}, {
|
|
1003
1010
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1004
1011
|
baseUrl: this._readListUrl,
|
|
1005
1012
|
prefilter: prefilter
|
|
@@ -1019,7 +1026,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1019
1026
|
});
|
|
1020
1027
|
case 6:
|
|
1021
1028
|
response = _context8.sent;
|
|
1022
|
-
return _context8.abrupt("return", _objectSpread$
|
|
1029
|
+
return _context8.abrupt("return", _objectSpread$O(_objectSpread$O({}, response), {}, {
|
|
1023
1030
|
data: response.data.map(function (d) {
|
|
1024
1031
|
return _this2.aplyJsonPath(d, _this2._readJsonPath);
|
|
1025
1032
|
})
|
|
@@ -1043,7 +1050,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1043
1050
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1044
1051
|
}
|
|
1045
1052
|
(_this$_rootStore6 = this._rootStore) === null || _this$_rootStore6 === void 0 ? void 0 : _this$_rootStore6.dataStore.jwt;
|
|
1046
|
-
var url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1053
|
+
var url = filterServerSide ? parseServersideFilters(_objectSpread$O(_objectSpread$O({}, filterServerSide), {}, {
|
|
1047
1054
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1048
1055
|
baseUrl: this._readListUrl,
|
|
1049
1056
|
prefilter: prefilter
|
|
@@ -1144,16 +1151,16 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1144
1151
|
}
|
|
1145
1152
|
});
|
|
1146
1153
|
this._socket.on('error', function (error) {
|
|
1147
|
-
LOG$
|
|
1154
|
+
LOG$d.error(new DivaError('Error on connection', error));
|
|
1148
1155
|
});
|
|
1149
1156
|
this._socket.on('connect_error', function (error) {
|
|
1150
|
-
LOG$
|
|
1157
|
+
LOG$d.log("connect_error due to ".concat(error.message));
|
|
1151
1158
|
});
|
|
1152
1159
|
this._socket.on('connect', function () {
|
|
1153
|
-
LOG$
|
|
1160
|
+
LOG$d.debug('Successfully connected to socket');
|
|
1154
1161
|
});
|
|
1155
1162
|
this._socket.on('disconnect', function () {
|
|
1156
|
-
LOG$
|
|
1163
|
+
LOG$d.debug('Disconnect from socket');
|
|
1157
1164
|
});
|
|
1158
1165
|
return this._socket;
|
|
1159
1166
|
}
|
|
@@ -1250,8 +1257,8 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1250
1257
|
}]);
|
|
1251
1258
|
}(_default$d);
|
|
1252
1259
|
|
|
1253
|
-
function ownKeys$
|
|
1254
|
-
function _objectSpread$
|
|
1260
|
+
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; }
|
|
1261
|
+
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; }
|
|
1255
1262
|
function _callSuper$5(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1256
1263
|
function _isNativeReflectConstruct$5() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1257
1264
|
var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
@@ -1350,7 +1357,7 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1350
1357
|
_context2.next = 5;
|
|
1351
1358
|
return fetch(this._createUrl + '?ref=true', {
|
|
1352
1359
|
method: this._createMethod,
|
|
1353
|
-
headers: _objectSpread$
|
|
1360
|
+
headers: _objectSpread$N({}, jwt ? {
|
|
1354
1361
|
Authorization: 'Bearer ' + jwt
|
|
1355
1362
|
} : {}),
|
|
1356
1363
|
body: data
|
|
@@ -1728,8 +1735,8 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1728
1735
|
}]);
|
|
1729
1736
|
}(_default$d);
|
|
1730
1737
|
|
|
1731
|
-
function ownKeys$
|
|
1732
|
-
function _objectSpread$
|
|
1738
|
+
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; }
|
|
1739
|
+
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; }
|
|
1733
1740
|
var _default$7 = /*#__PURE__*/function () {
|
|
1734
1741
|
function _default(root) {
|
|
1735
1742
|
_classCallCheck(this, _default);
|
|
@@ -1765,7 +1772,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1765
1772
|
var _i$permission;
|
|
1766
1773
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
1767
1774
|
});
|
|
1768
|
-
config = _objectSpread$
|
|
1775
|
+
config = _objectSpread$M(_objectSpread$M({}, config), {}, {
|
|
1769
1776
|
items: filteredItems
|
|
1770
1777
|
});
|
|
1771
1778
|
}
|
|
@@ -2533,6 +2540,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
2533
2540
|
TableTaskStatusVersioning: {
|
|
2534
2541
|
type: 'Table',
|
|
2535
2542
|
canRefresh: true,
|
|
2543
|
+
autoRefresh: 60000,
|
|
2536
2544
|
title: t('backoffice.table.taskstatusversioning.title.taskstatusversioninglist'),
|
|
2537
2545
|
columns: [{
|
|
2538
2546
|
title: 'ID',
|
|
@@ -2698,6 +2706,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
2698
2706
|
TableTaskStatusCustom: {
|
|
2699
2707
|
type: 'Table',
|
|
2700
2708
|
canRefresh: true,
|
|
2709
|
+
autoRefresh: 60000,
|
|
2701
2710
|
title: t('backoffice.table.taskstatusversioning.title.taskstatuscustom'),
|
|
2702
2711
|
columns: [{
|
|
2703
2712
|
title: 'ID',
|
|
@@ -2830,7 +2839,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
2830
2839
|
},
|
|
2831
2840
|
apiInterface: {
|
|
2832
2841
|
read: {
|
|
2833
|
-
list: '${adminService}/taskStatus?filter=%5B%2B%5B%7BtaskType%2Ceq%2CSAP_XML_IMPORT%7D%2C%7BtaskType%2Ceq%2CSAP_DROPDOWNITEMS%7D%2C%7BtaskType%2Ceq%2CSAP_TEMPLATEARTICLES%7D%2C%7BtaskType%2Ceq%2CSAP_ARTICLE_IMPORT%7D%2C%7BtaskType%2Ceq%2CSAP_SUPPLIERS%7D%2C%7BtaskType%2Ceq%2CSAP_PRODUCTGROUPS%7D%2C%7BtaskType%2Ceq%2CSAP_AUSP%7D%2C%7BtaskType%2Ceq%2CPIM_SEND_CLASSIFICATION%7D%2C%7BtaskType%2Ceq%2CSEND_SAP_ARTICLES%7D%2C%7BtaskType%2Ceq%
|
|
2842
|
+
list: '${adminService}/taskStatus?filter=%5B%2B%5B%7BtaskType%2Ceq%2CSAP_XML_IMPORT%7D%2C%7BtaskType%2Ceq%2CSAP_DROPDOWNITEMS%7D%2C%7BtaskType%2Ceq%2CSAP_TEMPLATEARTICLES%7D%2C%7BtaskType%2Ceq%2CSAP_ARTICLE_IMPORT%7D%2C%7BtaskType%2Ceq%2CSAP_SUPPLIERS%7D%2C%7BtaskType%2Ceq%2CSAP_PRODUCTGROUPS%7D%2C%7BtaskType%2Ceq%2CSAP_AUSP%7D%2C%7BtaskType%2Ceq%2CPIM_SEND_CLASSIFICATION%7D%2C%7BtaskType%2Ceq%2CSEND_SAP_ARTICLES%7D%2C%7BtaskType%2Ceq%2CGET_PRODUCT_FEATURES_PIM%7D%5D%5D',
|
|
2834
2843
|
fields: true,
|
|
2835
2844
|
filterServerSide: true
|
|
2836
2845
|
}
|
|
@@ -2854,6 +2863,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
2854
2863
|
TableTaskStatusCronJobs: {
|
|
2855
2864
|
type: 'Table',
|
|
2856
2865
|
canRefresh: true,
|
|
2866
|
+
autoRefresh: 60000,
|
|
2857
2867
|
title: t('backoffice.table.taskstatusversioning.title.taskstatusversioninglist'),
|
|
2858
2868
|
columns: [{
|
|
2859
2869
|
title: 'ID',
|
|
@@ -3011,6 +3021,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3011
3021
|
TableTaskStatusOthers: {
|
|
3012
3022
|
type: 'Table',
|
|
3013
3023
|
canRefresh: true,
|
|
3024
|
+
autoRefresh: 60000,
|
|
3014
3025
|
title: t('backoffice.table.taskstatusversioning.title.taskstatusothers'),
|
|
3015
3026
|
columns: [{
|
|
3016
3027
|
title: 'ID',
|
|
@@ -3143,7 +3154,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3143
3154
|
},
|
|
3144
3155
|
apiInterface: {
|
|
3145
3156
|
read: {
|
|
3146
|
-
list: '${adminService}/taskStatus?filter=%5B%7BtaskType%2Cne%2CSAP_XML_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_DROPDOWNITEMS%7D%2C%7BtaskType%2Cne%2CSAP_TEMPLATEARTICLES%7D%2C%7BtaskType%2Cne%2CSAP_ARTICLE_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_SUPPLIERS%7D%2C%7BtaskType%2Cne%2CSAP_PRODUCTGROUPS%7D%2C%7BtaskType%2Cne%2CSAP_AUSP%7D%2C%7BtaskType%2Cne%2CPIM_SEND_CLASSIFICATION%7D%2C%7BtaskType%2Cne%2CSEND_SAP_ARTICLES%7D%2C%7BtaskType%2Cne%2CCRON%7D%2C%7BtaskType%2Cne%2CRETAIL_VERSIONING%7D%2C%7BtaskType%2Cne%2CSUPPLIER_VERSIONING%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_EXPORT%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_IMPORT%7D%2C%7BtaskType%2Cne%
|
|
3157
|
+
list: '${adminService}/taskStatus?filter=%5B%7BtaskType%2Cne%2CSAP_XML_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_DROPDOWNITEMS%7D%2C%7BtaskType%2Cne%2CSAP_TEMPLATEARTICLES%7D%2C%7BtaskType%2Cne%2CSAP_ARTICLE_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_SUPPLIERS%7D%2C%7BtaskType%2Cne%2CSAP_PRODUCTGROUPS%7D%2C%7BtaskType%2Cne%2CSAP_AUSP%7D%2C%7BtaskType%2Cne%2CPIM_SEND_CLASSIFICATION%7D%2C%7BtaskType%2Cne%2CSEND_SAP_ARTICLES%7D%2C%7BtaskType%2Cne%2CCRON%7D%2C%7BtaskType%2Cne%2CRETAIL_VERSIONING%7D%2C%7BtaskType%2Cne%2CSUPPLIER_VERSIONING%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_EXPORT%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_IMPORT%7D%2C%7BtaskType%2Cne%2CGET_PRODUCT_FEATURES_PIM%7D%5D',
|
|
3147
3158
|
fields: true,
|
|
3148
3159
|
filterServerSide: true
|
|
3149
3160
|
}
|
|
@@ -4032,10 +4043,17 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
4032
4043
|
}],
|
|
4033
4044
|
apiInterface: {
|
|
4034
4045
|
read: {
|
|
4035
|
-
list: '${catalogService}/contentItems',
|
|
4046
|
+
list: '${catalogService}/contentItems?organizationId=${organizationId}',
|
|
4036
4047
|
filterServerSide: true
|
|
4037
4048
|
},
|
|
4038
4049
|
"delete": '${catalogService}/contentItems/${id}'
|
|
4050
|
+
},
|
|
4051
|
+
mapping: {
|
|
4052
|
+
type: 'query',
|
|
4053
|
+
map: [{
|
|
4054
|
+
globalValue: 'organizationId',
|
|
4055
|
+
targetField: 'organizationId'
|
|
4056
|
+
}]
|
|
4039
4057
|
}
|
|
4040
4058
|
},
|
|
4041
4059
|
TableApplicationTranslations: {
|
|
@@ -12348,6 +12366,9 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
12348
12366
|
},
|
|
12349
12367
|
IDMEnricherEditor: {
|
|
12350
12368
|
type: 'IDMEnricherEditor'
|
|
12369
|
+
},
|
|
12370
|
+
IDMCatalogEditor: {
|
|
12371
|
+
type: 'IDMCatalogEditor'
|
|
12351
12372
|
}
|
|
12352
12373
|
};
|
|
12353
12374
|
}
|
|
@@ -12581,8 +12602,8 @@ function getIcon(icon) {
|
|
|
12581
12602
|
return undefined;
|
|
12582
12603
|
}
|
|
12583
12604
|
|
|
12584
|
-
function ownKeys$
|
|
12585
|
-
function _objectSpread$
|
|
12605
|
+
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; }
|
|
12606
|
+
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; }
|
|
12586
12607
|
var _default$6 = /*#__PURE__*/function () {
|
|
12587
12608
|
function _default(root) {
|
|
12588
12609
|
_classCallCheck(this, _default);
|
|
@@ -12714,7 +12735,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
12714
12735
|
if (index >= 0) {
|
|
12715
12736
|
this._additionalMenuElements[index] = {
|
|
12716
12737
|
key: key,
|
|
12717
|
-
element: _objectSpread$
|
|
12738
|
+
element: _objectSpread$L(_objectSpread$L({}, this._additionalMenuElements[index].element), {}, {
|
|
12718
12739
|
items: items,
|
|
12719
12740
|
selected: selected
|
|
12720
12741
|
})
|
|
@@ -12765,7 +12786,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
12765
12786
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
12766
12787
|
this.root.navigate('/' + path);
|
|
12767
12788
|
}
|
|
12768
|
-
this._menuElement1 = _objectSpread$
|
|
12789
|
+
this._menuElement1 = _objectSpread$L(_objectSpread$L({}, this.menuElement1), {}, {
|
|
12769
12790
|
selected: this._selectedMenuKeys[0]
|
|
12770
12791
|
});
|
|
12771
12792
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -13009,7 +13030,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13009
13030
|
return items.filter(function (item) {
|
|
13010
13031
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
13011
13032
|
}).map(function (item) {
|
|
13012
|
-
return _objectSpread$
|
|
13033
|
+
return _objectSpread$L(_objectSpread$L({}, item), {}, {
|
|
13013
13034
|
items: item.items ? _this4.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
13014
13035
|
subMenu: item.subMenu ? _this4.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
13015
13036
|
});
|
|
@@ -13148,12 +13169,26 @@ var menu = [{
|
|
|
13148
13169
|
}
|
|
13149
13170
|
}]
|
|
13150
13171
|
}, {
|
|
13151
|
-
id: '
|
|
13152
|
-
path: '
|
|
13153
|
-
|
|
13154
|
-
label: 'backoffice.menu.items.label.IDMEnricherEditor',
|
|
13172
|
+
id: 'IDM',
|
|
13173
|
+
path: 'idmeditor',
|
|
13174
|
+
label: 'backoffice.menu.items.label.IDMCatalogEditor',
|
|
13155
13175
|
permission: 'backoffice_ce_idmee',
|
|
13156
|
-
icon: 'OrderedListOutlined'
|
|
13176
|
+
icon: 'OrderedListOutlined',
|
|
13177
|
+
items: [{
|
|
13178
|
+
id: 'IDMCatalogEditor',
|
|
13179
|
+
path: 'catalogs',
|
|
13180
|
+
label: 'backoffice.menu.items.label.IDMCatalogs',
|
|
13181
|
+
permission: 'idm_catalogs',
|
|
13182
|
+
icon: 'HistoryOutlined',
|
|
13183
|
+
haSubRoutes: true
|
|
13184
|
+
}, {
|
|
13185
|
+
id: 'IDMEnricherEditor',
|
|
13186
|
+
path: 'packages',
|
|
13187
|
+
label: 'backoffice.menu.items.label.EnricherPackages',
|
|
13188
|
+
permission: 'enricher_packages',
|
|
13189
|
+
icon: 'HistoryOutlined',
|
|
13190
|
+
haSubRoutes: true
|
|
13191
|
+
}]
|
|
13157
13192
|
}]
|
|
13158
13193
|
}, {
|
|
13159
13194
|
id: 'Adminarea',
|
|
@@ -13656,7 +13691,7 @@ var _default$3 = /*#__PURE__*/function () {
|
|
|
13656
13691
|
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; } } }; }
|
|
13657
13692
|
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; } }
|
|
13658
13693
|
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; }
|
|
13659
|
-
var LOG$
|
|
13694
|
+
var LOG$c = getLogger('Backoffice', 'DownloadStore');
|
|
13660
13695
|
var DownloadStore = /*#__PURE__*/function () {
|
|
13661
13696
|
function DownloadStore(_rootStore) {
|
|
13662
13697
|
var _this = this;
|
|
@@ -13872,7 +13907,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
13872
13907
|
_context5.next = 4;
|
|
13873
13908
|
break;
|
|
13874
13909
|
}
|
|
13875
|
-
LOG$
|
|
13910
|
+
LOG$c.debug("The organization ".concat(data._id, " has no parentType of ").concat(validTypes.join(' or ')));
|
|
13876
13911
|
throw new Error("Current organization is no ".concat(type == 'RETAILER' ? 'retailer, retailer channel or association' : 'supplier or dealer'));
|
|
13877
13912
|
case 4:
|
|
13878
13913
|
orgData = data;
|
|
@@ -13891,7 +13926,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
13891
13926
|
_context5.next = 14;
|
|
13892
13927
|
break;
|
|
13893
13928
|
}
|
|
13894
|
-
LOG$
|
|
13929
|
+
LOG$c.debug("The organization ".concat(data._id, " has no type of ").concat(validTypes.join(' or '), " nor a parent organization"));
|
|
13895
13930
|
throw new Error("Current organization is no ".concat(type == 'RETAILER' ? 'retailer channel or association' : 'supplier or dealer'));
|
|
13896
13931
|
case 14:
|
|
13897
13932
|
_context5.prev = 14;
|
|
@@ -14313,24 +14348,35 @@ function fetchFileData(_x) {
|
|
|
14313
14348
|
}
|
|
14314
14349
|
function _fetchFileData() {
|
|
14315
14350
|
_fetchFileData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(url) {
|
|
14351
|
+
var _response$url, response, blob, name;
|
|
14316
14352
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
14317
14353
|
while (1) switch (_context.prev = _context.next) {
|
|
14318
14354
|
case 0:
|
|
14319
|
-
_context.
|
|
14320
|
-
|
|
14321
|
-
|
|
14322
|
-
}).then(function (blob) {
|
|
14323
|
-
return new File([blob], nameFromUrl(url), {
|
|
14324
|
-
type: blob.type
|
|
14325
|
-
});
|
|
14326
|
-
});
|
|
14327
|
-
case 2:
|
|
14328
|
-
return _context.abrupt("return", _context.sent);
|
|
14355
|
+
_context.prev = 0;
|
|
14356
|
+
_context.next = 3;
|
|
14357
|
+
return fetch(url);
|
|
14329
14358
|
case 3:
|
|
14359
|
+
response = _context.sent;
|
|
14360
|
+
_context.next = 6;
|
|
14361
|
+
return response.blob();
|
|
14362
|
+
case 6:
|
|
14363
|
+
blob = _context.sent;
|
|
14364
|
+
name = nameFromUrl((_response$url = response.url) !== null && _response$url !== void 0 ? _response$url : url);
|
|
14365
|
+
return _context.abrupt("return", new File([blob], name, {
|
|
14366
|
+
type: blob.type
|
|
14367
|
+
}));
|
|
14368
|
+
case 11:
|
|
14369
|
+
_context.prev = 11;
|
|
14370
|
+
_context.t0 = _context["catch"](0);
|
|
14371
|
+
throw new DivaError('Could not fetch file', {
|
|
14372
|
+
cause: _context.t0,
|
|
14373
|
+
code: 'FETCH_FILE_ERROR'
|
|
14374
|
+
});
|
|
14375
|
+
case 14:
|
|
14330
14376
|
case "end":
|
|
14331
14377
|
return _context.stop();
|
|
14332
14378
|
}
|
|
14333
|
-
}, _callee);
|
|
14379
|
+
}, _callee, null, [[0, 11]]);
|
|
14334
14380
|
}));
|
|
14335
14381
|
return _fetchFileData.apply(this, arguments);
|
|
14336
14382
|
}
|
|
@@ -14507,7 +14553,7 @@ function isExternalVid(file) {
|
|
|
14507
14553
|
}
|
|
14508
14554
|
|
|
14509
14555
|
var VIDEO_THUMB_PLACEHOLDER = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMDAwMDAwIiBoZWlnaHQ9IjgwMHB4IiB3aWR0aD0iODAwcHgiIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgCgkgdmlld0JveD0iMCAwIDQ5IDQ5IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGc+Cgk8Zz4KCQk8cGF0aCBkPSJNMzkuMjU2LDYuNUg5Ljc0NEM0LjM3MSw2LjUsMCwxMC44ODUsMCwxNi4yNzR2MTYuNDUxYzAsNS4zOSw0LjM3MSw5Ljc3NCw5Ljc0NCw5Ljc3NGgyOS41MTIKCQkJYzUuMzczLDAsOS43NDQtNC4zODUsOS43NDQtOS43NzRWMTYuMjc0QzQ5LDEwLjg4NSw0NC42MjksNi41LDM5LjI1Niw2LjV6IE00NywzMi43MjZjMCw0LjI4Ny0zLjQ3NCw3Ljc3NC03Ljc0NCw3Ljc3NEg5Ljc0NAoJCQlDNS40NzQsNDAuNSwyLDM3LjAxMiwyLDMyLjcyNlYxNi4yNzRDMiwxMS45ODgsNS40NzQsOC41LDkuNzQ0LDguNWgyOS41MTJjNC4yNywwLDcuNzQ0LDMuNDg4LDcuNzQ0LDcuNzc0VjMyLjcyNnoiLz4KCQk8cGF0aCBkPSJNMzMuMzYsMjQuMTM4bC0xMy44NTUtOC4xMTVjLTAuMzA4LTAuMTgtMC42OTEtMC4xODMtMS4wMDItMC4wMDVTMTgsMTYuNTI3LDE4LDE2Ljg4NnYxNi4yMjkKCQkJYzAsMC4zNTgsMC4xOTIsMC42OSwwLjUwMiwwLjg2OGMwLjE1NCwwLjA4OCwwLjMyNiwwLjEzMiwwLjQ5OCwwLjEzMmMwLjE3NSwwLDAuMzQ5LTAuMDQ2LDAuNTA1LTAuMTM3bDEzLjg1NS04LjExMwoJCQljMC4zMDYtMC4xNzksMC40OTUtMC41MDgsMC40OTUtMC44NjNTMzMuNjY3LDI0LjMxNywzMy4zNiwyNC4xMzh6IE0yMCwzMS4zN1YxOC42M2wxMC44NzYsNi4zNzFMMjAsMzEuMzd6Ii8+Cgk8L2c+CjwvZz4KPC9zdmc+';
|
|
14510
|
-
var LOG$
|
|
14556
|
+
var LOG$b = getLogger('Backoffice', 'MediaItem');
|
|
14511
14557
|
var MediaItem = /*#__PURE__*/function () {
|
|
14512
14558
|
function MediaItem(_ref) {
|
|
14513
14559
|
var media = _ref.media,
|
|
@@ -14622,7 +14668,7 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
14622
14668
|
_context2.prev = 8;
|
|
14623
14669
|
_context2.t0 = _context2["catch"](1);
|
|
14624
14670
|
this._mediaItemRefId = undefined;
|
|
14625
|
-
LOG$
|
|
14671
|
+
LOG$b.error(new DivaError$1('Failed to get media item ref, on next upload a new ref will be created', {
|
|
14626
14672
|
cause: _context2.t0
|
|
14627
14673
|
}));
|
|
14628
14674
|
case 12:
|
|
@@ -14650,7 +14696,9 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
14650
14696
|
_context2.next = 24;
|
|
14651
14697
|
break;
|
|
14652
14698
|
}
|
|
14653
|
-
throw new
|
|
14699
|
+
throw new DivaError$1('File type is not allowed', {
|
|
14700
|
+
code: 'FILE_TYPE_NOT_ALLOWED'
|
|
14701
|
+
});
|
|
14654
14702
|
case 24:
|
|
14655
14703
|
case "end":
|
|
14656
14704
|
return _context2.stop();
|
|
@@ -14721,8 +14769,8 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
14721
14769
|
}]);
|
|
14722
14770
|
}();
|
|
14723
14771
|
|
|
14724
|
-
function ownKeys$
|
|
14725
|
-
function _objectSpread$
|
|
14772
|
+
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; }
|
|
14773
|
+
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; }
|
|
14726
14774
|
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; } } }; }
|
|
14727
14775
|
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; } }
|
|
14728
14776
|
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; }
|
|
@@ -14844,7 +14892,7 @@ function useFormData (_ref) {
|
|
|
14844
14892
|
multipleEditingData = inboundData;
|
|
14845
14893
|
}
|
|
14846
14894
|
return {
|
|
14847
|
-
loadedData: _onLoadFields(_objectSpread$
|
|
14895
|
+
loadedData: _onLoadFields(_objectSpread$K({}, dt)),
|
|
14848
14896
|
multipleEditingData: multipleEditingData
|
|
14849
14897
|
};
|
|
14850
14898
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -14881,7 +14929,7 @@ function useFormData (_ref) {
|
|
|
14881
14929
|
setFieldErrors = _useState20[1];
|
|
14882
14930
|
useEffect(function () {
|
|
14883
14931
|
var _loadedData$_id2;
|
|
14884
|
-
setState(_objectSpread$
|
|
14932
|
+
setState(_objectSpread$K(_objectSpread$K({}, state), {}, {
|
|
14885
14933
|
data: loadedData,
|
|
14886
14934
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
14887
14935
|
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),
|
|
@@ -14983,7 +15031,7 @@ function useFormData (_ref) {
|
|
|
14983
15031
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
14984
15032
|
while (1) switch (_context2.prev = _context2.next) {
|
|
14985
15033
|
case 0:
|
|
14986
|
-
newData = merge(_objectSpread$
|
|
15034
|
+
newData = merge(_objectSpread$K({}, state.data), values);
|
|
14987
15035
|
if (!skipApi) {
|
|
14988
15036
|
_context2.next = 3;
|
|
14989
15037
|
break;
|
|
@@ -14993,7 +15041,7 @@ function useFormData (_ref) {
|
|
|
14993
15041
|
root.actions.toggleLoading('saving_form');
|
|
14994
15042
|
_context2.prev = 4;
|
|
14995
15043
|
_context2.next = 7;
|
|
14996
|
-
return setDynamicFields(_objectSpread$
|
|
15044
|
+
return setDynamicFields(_objectSpread$K({}, state.data), newData);
|
|
14997
15045
|
case 7:
|
|
14998
15046
|
newData = _context2.sent;
|
|
14999
15047
|
_context2.next = 10;
|
|
@@ -15008,7 +15056,7 @@ function useFormData (_ref) {
|
|
|
15008
15056
|
root.actions.toggleLoading('saving_form');
|
|
15009
15057
|
throw _context2.t0;
|
|
15010
15058
|
case 17:
|
|
15011
|
-
setState(_objectSpread$
|
|
15059
|
+
setState(_objectSpread$K(_objectSpread$K({}, state), {}, {
|
|
15012
15060
|
loading: true
|
|
15013
15061
|
}));
|
|
15014
15062
|
finalData = state.data;
|
|
@@ -15061,14 +15109,14 @@ function useFormData (_ref) {
|
|
|
15061
15109
|
_context2.next = 47;
|
|
15062
15110
|
break;
|
|
15063
15111
|
}
|
|
15064
|
-
setFieldErrors(_objectSpread$
|
|
15112
|
+
setFieldErrors(_objectSpread$K(_objectSpread$K({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
15065
15113
|
return _context2.abrupt("return", undefined);
|
|
15066
15114
|
case 47:
|
|
15067
15115
|
throw _context2.t1;
|
|
15068
15116
|
case 48:
|
|
15069
15117
|
_context2.prev = 48;
|
|
15070
15118
|
root.actions.toggleLoading('saving_form');
|
|
15071
|
-
setState(_objectSpread$
|
|
15119
|
+
setState(_objectSpread$K(_objectSpread$K({}, state), {}, {
|
|
15072
15120
|
data: finalData,
|
|
15073
15121
|
loading: false
|
|
15074
15122
|
}));
|
|
@@ -15098,7 +15146,7 @@ function useFormData (_ref) {
|
|
|
15098
15146
|
}
|
|
15099
15147
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
15100
15148
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
15101
|
-
var wholeData = Object.assign(_objectSpread$
|
|
15149
|
+
var wholeData = Object.assign(_objectSpread$K({}, state.data), _objectSpread$K({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
15102
15150
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
15103
15151
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
15104
15152
|
setHiddenRequiredDisabled(newState);
|
|
@@ -15111,14 +15159,14 @@ function useFormData (_ref) {
|
|
|
15111
15159
|
}
|
|
15112
15160
|
};
|
|
15113
15161
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
15114
|
-
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$
|
|
15162
|
+
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$K({}, state.data), state.form.getFieldsValue(), mergeCustomizer);
|
|
15115
15163
|
if (id) {
|
|
15116
15164
|
setFieldInObject(id, data, value);
|
|
15117
|
-
var newFieldErrors = _objectSpread$
|
|
15165
|
+
var newFieldErrors = _objectSpread$K({}, fieldErrors);
|
|
15118
15166
|
delete newFieldErrors[id.toString()];
|
|
15119
15167
|
setFieldErrors(newFieldErrors);
|
|
15120
15168
|
}
|
|
15121
|
-
setState(_objectSpread$
|
|
15169
|
+
setState(_objectSpread$K(_objectSpread$K({}, state), {}, {
|
|
15122
15170
|
data: data
|
|
15123
15171
|
}));
|
|
15124
15172
|
return data;
|
|
@@ -15150,12 +15198,12 @@ function useFormData (_ref) {
|
|
|
15150
15198
|
var _value$value;
|
|
15151
15199
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
15152
15200
|
if (configuration.itemSelectorReset) {
|
|
15153
|
-
setState(_objectSpread$
|
|
15201
|
+
setState(_objectSpread$K(_objectSpread$K({}, state), {}, {
|
|
15154
15202
|
data: _defineProperty({}, name, val)
|
|
15155
15203
|
}));
|
|
15156
15204
|
} else {
|
|
15157
|
-
setState(_objectSpread$
|
|
15158
|
-
data: _objectSpread$
|
|
15205
|
+
setState(_objectSpread$K(_objectSpread$K({}, state), {}, {
|
|
15206
|
+
data: _objectSpread$K(_objectSpread$K({}, state.data), {}, _defineProperty({}, name, val))
|
|
15159
15207
|
}));
|
|
15160
15208
|
}
|
|
15161
15209
|
setSelectedItemsIndex(idx);
|
|
@@ -15165,12 +15213,12 @@ function useFormData (_ref) {
|
|
|
15165
15213
|
var val = _ref6.value;
|
|
15166
15214
|
if (value === val) {
|
|
15167
15215
|
if (configuration.itemSelectorReset) {
|
|
15168
|
-
setState(_objectSpread$
|
|
15216
|
+
setState(_objectSpread$K(_objectSpread$K({}, state), {}, {
|
|
15169
15217
|
data: _defineProperty({}, name, val)
|
|
15170
15218
|
}));
|
|
15171
15219
|
} else {
|
|
15172
|
-
setState(_objectSpread$
|
|
15173
|
-
data: _objectSpread$
|
|
15220
|
+
setState(_objectSpread$K(_objectSpread$K({}, state), {}, {
|
|
15221
|
+
data: _objectSpread$K(_objectSpread$K({}, state.data), {}, _defineProperty({}, name, val))
|
|
15174
15222
|
}));
|
|
15175
15223
|
}
|
|
15176
15224
|
setSelectedItemsIndex(idx);
|
|
@@ -15450,7 +15498,7 @@ function useFormData (_ref) {
|
|
|
15450
15498
|
var tools = [];
|
|
15451
15499
|
for (var i = 0; i < configuration.tools.length; i++) {
|
|
15452
15500
|
var tool = configuration.tools[i];
|
|
15453
|
-
tools.push(_objectSpread$
|
|
15501
|
+
tools.push(_objectSpread$K({
|
|
15454
15502
|
parameters: {
|
|
15455
15503
|
data: state.data
|
|
15456
15504
|
},
|
|
@@ -15487,7 +15535,7 @@ function useFormData (_ref) {
|
|
|
15487
15535
|
break;
|
|
15488
15536
|
}
|
|
15489
15537
|
media = getData(itemName, data);
|
|
15490
|
-
if (media)
|
|
15538
|
+
if (media) pushRemovedMediaItem(media);
|
|
15491
15539
|
_context3.next = 26;
|
|
15492
15540
|
break;
|
|
15493
15541
|
case 11:
|
|
@@ -15546,13 +15594,13 @@ function useFormData (_ref) {
|
|
|
15546
15594
|
return _ref7.apply(this, arguments);
|
|
15547
15595
|
};
|
|
15548
15596
|
}();
|
|
15549
|
-
var
|
|
15597
|
+
var pushRemovedMediaItem = function pushRemovedMediaItem(media) {
|
|
15550
15598
|
if (removedMedias.find(function (m) {
|
|
15551
15599
|
return m.itemRefId === media.itemRefId;
|
|
15552
15600
|
})) return;
|
|
15553
15601
|
setRemovedMedias([].concat(_toConsumableArray(removedMedias), [media]));
|
|
15554
15602
|
};
|
|
15555
|
-
return _objectSpread$
|
|
15603
|
+
return _objectSpread$K(_objectSpread$K({}, state), {}, {
|
|
15556
15604
|
getIsHidden: getIsHidden,
|
|
15557
15605
|
setUsedPreset: setUsedPreset,
|
|
15558
15606
|
configuration: configuration,
|
|
@@ -15576,7 +15624,7 @@ function useFormData (_ref) {
|
|
|
15576
15624
|
progressBarOpen: progressBarOpen,
|
|
15577
15625
|
progressBarPercentage: progressBarPercentage,
|
|
15578
15626
|
keepRemovedMediaItem: _keepRemovedMediaItem,
|
|
15579
|
-
|
|
15627
|
+
pushRemovedMediaItem: pushRemovedMediaItem
|
|
15580
15628
|
});
|
|
15581
15629
|
}
|
|
15582
15630
|
function setFieldInObject(id, data, value) {
|
|
@@ -15669,8 +15717,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
15669
15717
|
};
|
|
15670
15718
|
|
|
15671
15719
|
var _excluded$3 = ["key", "name"];
|
|
15672
|
-
function ownKeys$
|
|
15673
|
-
function _objectSpread$
|
|
15720
|
+
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; }
|
|
15721
|
+
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; }
|
|
15674
15722
|
var FormList$2 = function FormList(_ref) {
|
|
15675
15723
|
var _item$initialValue;
|
|
15676
15724
|
var value = _ref.value,
|
|
@@ -15723,7 +15771,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
15723
15771
|
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
15724
15772
|
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
15725
15773
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
15726
|
-
return /*#__PURE__*/createElement(Form$1.Item, _objectSpread$
|
|
15774
|
+
return /*#__PURE__*/createElement(Form$1.Item, _objectSpread$J(_objectSpread$J({}, restField), {}, {
|
|
15727
15775
|
id: n.join(),
|
|
15728
15776
|
key: n.join(),
|
|
15729
15777
|
name: n,
|
|
@@ -15735,7 +15783,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
15735
15783
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
15736
15784
|
help: state.fieldErrors[n.toString()],
|
|
15737
15785
|
hidden: hidden
|
|
15738
|
-
}), getElement(_objectSpread$
|
|
15786
|
+
}), getElement(_objectSpread$J(_objectSpread$J({}, i), {}, {
|
|
15739
15787
|
name: n
|
|
15740
15788
|
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
15741
15789
|
})
|
|
@@ -15968,8 +16016,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
15968
16016
|
var css_248z$n = ".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";
|
|
15969
16017
|
styleInject(css_248z$n);
|
|
15970
16018
|
|
|
15971
|
-
function ownKeys$
|
|
15972
|
-
function _objectSpread$
|
|
16019
|
+
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; }
|
|
16020
|
+
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; }
|
|
15973
16021
|
var SubTitle = function SubTitle(_ref) {
|
|
15974
16022
|
var _item$orientation, _item$buttonIds;
|
|
15975
16023
|
var item = _ref.item,
|
|
@@ -15978,7 +16026,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
15978
16026
|
t = _useTranslation.t;
|
|
15979
16027
|
return /*#__PURE__*/jsx(Divider, {
|
|
15980
16028
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
15981
|
-
style: _objectSpread$
|
|
16029
|
+
style: _objectSpread$I({}, item.style),
|
|
15982
16030
|
children: /*#__PURE__*/jsxs("div", {
|
|
15983
16031
|
className: wrapper$5,
|
|
15984
16032
|
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) {
|
|
@@ -16092,7 +16140,7 @@ function getCombinedValues(data, pattern) {
|
|
|
16092
16140
|
return value;
|
|
16093
16141
|
}
|
|
16094
16142
|
|
|
16095
|
-
var LOG$
|
|
16143
|
+
var LOG$a = getLogger('Backoffice', 'SelectSimple');
|
|
16096
16144
|
function useSelectSimpleData (_ref) {
|
|
16097
16145
|
var apiInterface = _ref.apiInterface,
|
|
16098
16146
|
selectMapping = _ref.selectMapping,
|
|
@@ -16132,7 +16180,7 @@ function useSelectSimpleData (_ref) {
|
|
|
16132
16180
|
}, [selected]);
|
|
16133
16181
|
useEffect(function () {
|
|
16134
16182
|
if (configuredOptions) {
|
|
16135
|
-
if (apiHandler.canReadList) LOG$
|
|
16183
|
+
if (apiHandler.canReadList) LOG$a.warn('If options are provided, apiInterface will not be used');
|
|
16136
16184
|
setOptions(configuredOptions);
|
|
16137
16185
|
setLoading(false);
|
|
16138
16186
|
return;
|
|
@@ -16154,7 +16202,7 @@ function useSelectSimpleData (_ref) {
|
|
|
16154
16202
|
var _options$;
|
|
16155
16203
|
// set the selected option only after the options are loaded
|
|
16156
16204
|
if (value && options) {
|
|
16157
|
-
LOG$
|
|
16205
|
+
LOG$a.debug('value changed', value);
|
|
16158
16206
|
setSelected(findByValue(value, options, selectMapping));
|
|
16159
16207
|
} else if (options !== null && options !== void 0 && (_options$ = options[0]) !== null && _options$ !== void 0 && _options$.value && autoSelectFirst) {
|
|
16160
16208
|
onSelectionChanged(options[0].value, options[0]);
|
|
@@ -16190,7 +16238,7 @@ function findByValue(value, options, selectMapping) {
|
|
|
16190
16238
|
return (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? option.value == value : getCombinedValues(option.data, selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.value) == getCombinedValues(value, selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.value);
|
|
16191
16239
|
});
|
|
16192
16240
|
if (!option) {
|
|
16193
|
-
LOG$
|
|
16241
|
+
LOG$a.debug('findByValue: option not found, add dummy option for current value', value, options);
|
|
16194
16242
|
//TODO: if we and server side filtering, the dummy option must be handled differently
|
|
16195
16243
|
option = {
|
|
16196
16244
|
label: (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? value : getCombinedValues(value, selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.label),
|
|
@@ -16228,8 +16276,8 @@ var css_248z$m = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\
|
|
|
16228
16276
|
styleInject(css_248z$m);
|
|
16229
16277
|
|
|
16230
16278
|
var _excluded$2 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title"];
|
|
16231
|
-
function ownKeys$
|
|
16232
|
-
function _objectSpread$
|
|
16279
|
+
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; }
|
|
16280
|
+
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; }
|
|
16233
16281
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
16234
16282
|
var apiInterface = _ref.apiInterface,
|
|
16235
16283
|
selectMapping = _ref.selectMapping,
|
|
@@ -16254,7 +16302,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
|
16254
16302
|
return /*#__PURE__*/jsxs("div", {
|
|
16255
16303
|
ref: ref,
|
|
16256
16304
|
className: classnames(title ? wrapper$4 : undefined),
|
|
16257
|
-
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$
|
|
16305
|
+
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$H(_objectSpread$H({}, selectProps), {}, {
|
|
16258
16306
|
showSearch: search,
|
|
16259
16307
|
loading: state.loading,
|
|
16260
16308
|
options: state.options,
|
|
@@ -16871,8 +16919,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
16871
16919
|
}]);
|
|
16872
16920
|
}(_default$d);
|
|
16873
16921
|
|
|
16874
|
-
function ownKeys$
|
|
16875
|
-
function _objectSpread$
|
|
16922
|
+
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; }
|
|
16923
|
+
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; }
|
|
16876
16924
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
16877
16925
|
function useSelectClientRelationCatalog (_ref) {
|
|
16878
16926
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -17041,7 +17089,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
17041
17089
|
case 22:
|
|
17042
17090
|
supplierData = _context2.sent;
|
|
17043
17091
|
case 23:
|
|
17044
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
17092
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$G(_objectSpread$G({}, _selectedSupplier), {}, {
|
|
17045
17093
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
17046
17094
|
}), supplierData);
|
|
17047
17095
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -17107,7 +17155,7 @@ var customSelect = "custom-select-ESUJX";
|
|
|
17107
17155
|
var customSelectOption = "custom-select-option-dUA7N";
|
|
17108
17156
|
var avatarWrapper = "avatar-wrapper-Vg-xe";
|
|
17109
17157
|
var selectTextWrapper = "select-text-wrapper-hPSZW";
|
|
17110
|
-
var css_248z$l = ".custom-select-ESUJX {\n width: 300px;\n}\n\n.custom-select-option-dUA7N {\n margin: 0px 12px;\n padding:
|
|
17158
|
+
var css_248z$l = ".custom-select-ESUJX {\n width: 300px;\n}\n\n.custom-select-option-dUA7N.ant-select-item {\n margin: 0px 12px;\n padding: 0px;\n border-bottom: 1px solid #ddd;\n}\n\n.custom-select-option-dUA7N .ant-select-item-option-content {\n display: flex;\n align-items: center;\n}\n\n.avatar-wrapper-Vg-xe {\n margin-right: 5px;\n height: 30px;\n width: 24px;\n float: left;\n position: relative;\n}\n\n.avatar-wrapper-Vg-xe > span {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.select-text-wrapper-hPSZW {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: normal;\n width: calc(100% - 29px);\n}\n";
|
|
17111
17159
|
styleInject(css_248z$l);
|
|
17112
17160
|
|
|
17113
17161
|
var Selector = function Selector(_ref) {
|
|
@@ -17262,8 +17310,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
17262
17310
|
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; } } }; }
|
|
17263
17311
|
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; } }
|
|
17264
17312
|
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; }
|
|
17265
|
-
function ownKeys$
|
|
17266
|
-
function _objectSpread$
|
|
17313
|
+
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; }
|
|
17314
|
+
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; }
|
|
17267
17315
|
function useSelectData (_ref) {
|
|
17268
17316
|
var data = _ref.data,
|
|
17269
17317
|
onChange = _ref.onChange,
|
|
@@ -17436,7 +17484,7 @@ function useSelectData (_ref) {
|
|
|
17436
17484
|
setFetching(true);
|
|
17437
17485
|
serverSideParams = {
|
|
17438
17486
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
17439
|
-
return _objectSpread$
|
|
17487
|
+
return _objectSpread$F(_objectSpread$F({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
17440
17488
|
}, {}) : {
|
|
17441
17489
|
_id: [value, 'contains']
|
|
17442
17490
|
},
|
|
@@ -17726,9 +17774,9 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
17726
17774
|
var css_248z$j = ".wrapper-WStAk {\n display: flex;\n flex-direction: column;\n}\n.header-wrapper-gWQuH {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-left: 64px;\n}\n\n.buttons-wrapper-7ebR9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n}\n";
|
|
17727
17775
|
styleInject(css_248z$j);
|
|
17728
17776
|
|
|
17729
|
-
function ownKeys$
|
|
17730
|
-
function _objectSpread$
|
|
17731
|
-
var LOG$
|
|
17777
|
+
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; }
|
|
17778
|
+
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; }
|
|
17779
|
+
var LOG$9 = getLogger('Backoffice', 'Translation Form');
|
|
17732
17780
|
function useTranslationHook (item, state) {
|
|
17733
17781
|
var root = useStore();
|
|
17734
17782
|
var _useDivaCore = useDivaCore(),
|
|
@@ -17806,7 +17854,7 @@ function useTranslationHook (item, state) {
|
|
|
17806
17854
|
case 23:
|
|
17807
17855
|
_context.prev = 23;
|
|
17808
17856
|
_context.t2 = _context["catch"](9);
|
|
17809
|
-
LOG$
|
|
17857
|
+
LOG$9.error({
|
|
17810
17858
|
message: 'Error on translating ' + value,
|
|
17811
17859
|
name: ''
|
|
17812
17860
|
});
|
|
@@ -17860,7 +17908,7 @@ function useTranslationHook (item, state) {
|
|
|
17860
17908
|
case 0:
|
|
17861
17909
|
_context2.next = 2;
|
|
17862
17910
|
return apiHandler.create({
|
|
17863
|
-
locales: _objectSpread$
|
|
17911
|
+
locales: _objectSpread$E({
|
|
17864
17912
|
de: {},
|
|
17865
17913
|
it: {},
|
|
17866
17914
|
fr: {},
|
|
@@ -17909,8 +17957,8 @@ function useTranslationHook (item, state) {
|
|
|
17909
17957
|
};
|
|
17910
17958
|
}
|
|
17911
17959
|
|
|
17912
|
-
function ownKeys$
|
|
17913
|
-
function _objectSpread$
|
|
17960
|
+
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; }
|
|
17961
|
+
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; }
|
|
17914
17962
|
var Translation = function Translation(_ref) {
|
|
17915
17963
|
var item = _ref.item,
|
|
17916
17964
|
state = _ref.state,
|
|
@@ -17960,7 +18008,7 @@ var Translation = function Translation(_ref) {
|
|
|
17960
18008
|
var hidden = state.getIsHidden(i, data);
|
|
17961
18009
|
var newAbsoluteName = absoluteName !== '' ? [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n)) : n;
|
|
17962
18010
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
17963
|
-
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$
|
|
18011
|
+
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$D(_objectSpread$D({}, i), {}, {
|
|
17964
18012
|
name: n
|
|
17965
18013
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden, currentLang) : /*#__PURE__*/jsx(Form$1.Item, {
|
|
17966
18014
|
id: idx.toString(),
|
|
@@ -17973,7 +18021,7 @@ var Translation = function Translation(_ref) {
|
|
|
17973
18021
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
17974
18022
|
help: state.fieldErrors[n.toString()],
|
|
17975
18023
|
hidden: hidden,
|
|
17976
|
-
children: getElement(_objectSpread$
|
|
18024
|
+
children: getElement(_objectSpread$D(_objectSpread$D({}, i), {}, {
|
|
17977
18025
|
name: n
|
|
17978
18026
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden)
|
|
17979
18027
|
})
|
|
@@ -18041,24 +18089,25 @@ function FileInput(_ref3) {
|
|
|
18041
18089
|
},
|
|
18042
18090
|
onPressEnter: function onPressEnter(e) {
|
|
18043
18091
|
e.stopPropagation();
|
|
18044
|
-
value ? onEnter(value) : undefined;
|
|
18092
|
+
value ? onEnter(value, true) : undefined;
|
|
18045
18093
|
},
|
|
18046
18094
|
allowClear: true
|
|
18047
18095
|
}), /*#__PURE__*/jsx(Dropdown.Button, {
|
|
18048
18096
|
icon: /*#__PURE__*/jsx(DownOutlined, {}),
|
|
18097
|
+
onClick: function onClick() {
|
|
18098
|
+
return onEnter(value, true);
|
|
18099
|
+
},
|
|
18100
|
+
disabled: !value,
|
|
18049
18101
|
menu: {
|
|
18050
18102
|
items: [{
|
|
18051
18103
|
key: 'use',
|
|
18052
|
-
label: t('backoffice.mediaupload.
|
|
18104
|
+
label: t('backoffice.mediaupload.use'),
|
|
18053
18105
|
onClick: function onClick() {
|
|
18054
18106
|
onEnter(value);
|
|
18055
18107
|
}
|
|
18056
|
-
}]
|
|
18057
|
-
onClick: function onClick() {
|
|
18058
|
-
return onEnter(value, true);
|
|
18059
|
-
}
|
|
18108
|
+
}]
|
|
18060
18109
|
},
|
|
18061
|
-
children: t('backoffice.mediaupload.
|
|
18110
|
+
children: t('backoffice.mediaupload.upload')
|
|
18062
18111
|
})]
|
|
18063
18112
|
}), /*#__PURE__*/jsx(Button, {
|
|
18064
18113
|
type: "link",
|
|
@@ -18068,6 +18117,7 @@ function FileInput(_ref3) {
|
|
|
18068
18117
|
});
|
|
18069
18118
|
}
|
|
18070
18119
|
|
|
18120
|
+
var LOG$8 = getLogger('Backoffice', 'AssetManager');
|
|
18071
18121
|
function Upload (_ref) {
|
|
18072
18122
|
var allowedTypes = _ref.allowedTypes,
|
|
18073
18123
|
media = _ref.media,
|
|
@@ -18094,6 +18144,20 @@ function Upload (_ref) {
|
|
|
18094
18144
|
setError = _useState2[1];
|
|
18095
18145
|
var _useTranslation = useTranslation(),
|
|
18096
18146
|
t = _useTranslation.t;
|
|
18147
|
+
var handleError = function handleError(e) {
|
|
18148
|
+
onError === null || onError === void 0 || onError(e);
|
|
18149
|
+
if (!e) {
|
|
18150
|
+
setError === null || setError === void 0 || setError(undefined);
|
|
18151
|
+
} else if (e instanceof DivaError) {
|
|
18152
|
+
LOG$8.error(e);
|
|
18153
|
+
setError(t('backoffice.mediaupload.error.' + e.name));
|
|
18154
|
+
} else {
|
|
18155
|
+
LOG$8.error(new DivaError('An unexpected error occurred', {
|
|
18156
|
+
cause: e
|
|
18157
|
+
}));
|
|
18158
|
+
setError(t('backoffice.mediaupload.error.unknown'));
|
|
18159
|
+
}
|
|
18160
|
+
};
|
|
18097
18161
|
useEffect(function () {
|
|
18098
18162
|
_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
18099
18163
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -18118,7 +18182,7 @@ function Upload (_ref) {
|
|
|
18118
18182
|
case 11:
|
|
18119
18183
|
_context.prev = 11;
|
|
18120
18184
|
_context.t0 = _context["catch"](5);
|
|
18121
|
-
|
|
18185
|
+
handleError(_context.t0);
|
|
18122
18186
|
case 14:
|
|
18123
18187
|
_context.prev = 14;
|
|
18124
18188
|
setLoading(false);
|
|
@@ -18135,20 +18199,20 @@ function Upload (_ref) {
|
|
|
18135
18199
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
18136
18200
|
while (1) switch (_context2.prev = _context2.next) {
|
|
18137
18201
|
case 0:
|
|
18202
|
+
handleError();
|
|
18138
18203
|
setLoading(true);
|
|
18139
|
-
_context2.prev =
|
|
18140
|
-
_context2.next =
|
|
18204
|
+
_context2.prev = 2;
|
|
18205
|
+
_context2.next = 5;
|
|
18141
18206
|
return media.init(allowedTypes);
|
|
18142
|
-
case
|
|
18207
|
+
case 5:
|
|
18143
18208
|
setFiles([media]);
|
|
18144
18209
|
onAdd === null || onAdd === void 0 || onAdd(media);
|
|
18145
18210
|
_context2.next = 12;
|
|
18146
18211
|
break;
|
|
18147
|
-
case
|
|
18148
|
-
_context2.prev =
|
|
18149
|
-
_context2.t0 = _context2["catch"](
|
|
18150
|
-
|
|
18151
|
-
setError(_context2.t0.message);
|
|
18212
|
+
case 9:
|
|
18213
|
+
_context2.prev = 9;
|
|
18214
|
+
_context2.t0 = _context2["catch"](2);
|
|
18215
|
+
handleError(_context2.t0);
|
|
18152
18216
|
case 12:
|
|
18153
18217
|
_context2.prev = 12;
|
|
18154
18218
|
setLoading(false);
|
|
@@ -18157,7 +18221,7 @@ function Upload (_ref) {
|
|
|
18157
18221
|
case "end":
|
|
18158
18222
|
return _context2.stop();
|
|
18159
18223
|
}
|
|
18160
|
-
}, _callee2, null, [[
|
|
18224
|
+
}, _callee2, null, [[2, 9, 12, 15]]);
|
|
18161
18225
|
}));
|
|
18162
18226
|
return function addMediaItem(_x) {
|
|
18163
18227
|
return _ref3.apply(this, arguments);
|
|
@@ -18179,6 +18243,15 @@ function Upload (_ref) {
|
|
|
18179
18243
|
return Upload$1.LIST_IGNORE;
|
|
18180
18244
|
};
|
|
18181
18245
|
var onFileFormWeb = function onFileFormWeb(url, copy) {
|
|
18246
|
+
try {
|
|
18247
|
+
new URL(url);
|
|
18248
|
+
} catch (e) {
|
|
18249
|
+
handleError(new DivaError('Invalid URL', {
|
|
18250
|
+
cause: e,
|
|
18251
|
+
code: 'INVALID_URL'
|
|
18252
|
+
}));
|
|
18253
|
+
return;
|
|
18254
|
+
}
|
|
18182
18255
|
var mediaItem = new MediaItem({
|
|
18183
18256
|
media: url,
|
|
18184
18257
|
remoteUrl: !copy,
|
|
@@ -18254,17 +18327,13 @@ function Media (_ref) {
|
|
|
18254
18327
|
if (item.mediaItemRefField) {
|
|
18255
18328
|
state.onInputChanged(mediaItemRefIdPath, undefined, newData);
|
|
18256
18329
|
}
|
|
18257
|
-
if (media) state.
|
|
18258
|
-
};
|
|
18259
|
-
var onError = function onError(e) {
|
|
18260
|
-
onRemove();
|
|
18330
|
+
if (media) state.pushRemovedMediaItem(media);
|
|
18261
18331
|
};
|
|
18262
18332
|
return /*#__PURE__*/jsx(Upload, {
|
|
18263
18333
|
allowedTypes: item.allowedTypes,
|
|
18264
18334
|
media: media,
|
|
18265
18335
|
onAdd: onAdd,
|
|
18266
18336
|
onRemove: onRemove,
|
|
18267
|
-
onError: onError,
|
|
18268
18337
|
config: {
|
|
18269
18338
|
baseUrl: state.root.configurationStore.apiConfig.mediaService,
|
|
18270
18339
|
jwt: state.root.dataStore.jwt,
|
|
@@ -18276,8 +18345,8 @@ function Media (_ref) {
|
|
|
18276
18345
|
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; } } }; }
|
|
18277
18346
|
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; } }
|
|
18278
18347
|
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; }
|
|
18279
|
-
function ownKeys$
|
|
18280
|
-
function _objectSpread$
|
|
18348
|
+
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; }
|
|
18349
|
+
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; }
|
|
18281
18350
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
|
|
18282
18351
|
var _isReadonly, _state$hiddenRequired;
|
|
18283
18352
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -18311,7 +18380,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
18311
18380
|
}
|
|
18312
18381
|
});
|
|
18313
18382
|
case 'selectSimple':
|
|
18314
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
18383
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$C(_objectSpread$C({}, item), {}, {
|
|
18315
18384
|
disabled: disabled,
|
|
18316
18385
|
onChange: function onChange(value) {
|
|
18317
18386
|
_onChange(absoluteName, value);
|
|
@@ -18515,7 +18584,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
18515
18584
|
value: item.value,
|
|
18516
18585
|
options: item.options.map(function (o) {
|
|
18517
18586
|
var _o$disabled;
|
|
18518
|
-
return _objectSpread$
|
|
18587
|
+
return _objectSpread$C(_objectSpread$C({}, o), {}, {
|
|
18519
18588
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, state.data)
|
|
18520
18589
|
});
|
|
18521
18590
|
}),
|
|
@@ -18536,7 +18605,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
18536
18605
|
},
|
|
18537
18606
|
icon: item.icon,
|
|
18538
18607
|
callback: function callback(data) {
|
|
18539
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
18608
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$C(_objectSpread$C({}, state.data), data));
|
|
18540
18609
|
}
|
|
18541
18610
|
});
|
|
18542
18611
|
case 'media':
|
|
@@ -18553,7 +18622,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
18553
18622
|
var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
18554
18623
|
var _useTranslation = useTranslation(),
|
|
18555
18624
|
t = _useTranslation.t;
|
|
18556
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
18625
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$C(_objectSpread$C({}, props), {}, {
|
|
18557
18626
|
ref: ref,
|
|
18558
18627
|
disabled: true,
|
|
18559
18628
|
value: t(props.translationPrefix + '.' + props.value)
|
|
@@ -18572,8 +18641,8 @@ function isReadonly(item, data) {
|
|
|
18572
18641
|
return false;
|
|
18573
18642
|
}
|
|
18574
18643
|
|
|
18575
|
-
function ownKeys$
|
|
18576
|
-
function _objectSpread$
|
|
18644
|
+
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; }
|
|
18645
|
+
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; }
|
|
18577
18646
|
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; } } }; }
|
|
18578
18647
|
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; } }
|
|
18579
18648
|
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; }
|
|
@@ -18623,13 +18692,13 @@ var Presets = function Presets(_ref) {
|
|
|
18623
18692
|
} finally {
|
|
18624
18693
|
_iterator.f();
|
|
18625
18694
|
}
|
|
18626
|
-
var data = _objectSpread$
|
|
18695
|
+
var data = _objectSpread$B(_objectSpread$B({}, form.getFieldsValue(names)), {}, {
|
|
18627
18696
|
newPresetName: newPresetName
|
|
18628
18697
|
});
|
|
18629
18698
|
data.dpi = parseInt(data.dpi);
|
|
18630
18699
|
data.organization = root.getGlobalValue('organizationId');
|
|
18631
18700
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
18632
|
-
var dt = _objectSpread$
|
|
18701
|
+
var dt = _objectSpread$B(_objectSpread$B({}, form.getFieldsValue(names)), {}, {
|
|
18633
18702
|
name: newPresetName
|
|
18634
18703
|
});
|
|
18635
18704
|
setPresets({
|
|
@@ -18971,8 +19040,8 @@ function getLabel(item, t) {
|
|
|
18971
19040
|
}
|
|
18972
19041
|
var Form = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
18973
19042
|
|
|
18974
|
-
function ownKeys$
|
|
18975
|
-
function _objectSpread$
|
|
19043
|
+
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; }
|
|
19044
|
+
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; }
|
|
18976
19045
|
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; } } }; }
|
|
18977
19046
|
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; } }
|
|
18978
19047
|
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; }
|
|
@@ -19174,7 +19243,7 @@ function useRoleSelectorData (_ref) {
|
|
|
19174
19243
|
roles.forEach(function (r) {
|
|
19175
19244
|
//check if after the changes the role is selected
|
|
19176
19245
|
if (value.includes(r._id)) {
|
|
19177
|
-
var newValue = _objectSpread$
|
|
19246
|
+
var newValue = _objectSpread$A(_objectSpread$A({}, r), {}, {
|
|
19178
19247
|
selected: true
|
|
19179
19248
|
});
|
|
19180
19249
|
//add it to the new list as selected role
|
|
@@ -19210,7 +19279,7 @@ function useRoleSelectorData (_ref) {
|
|
|
19210
19279
|
}
|
|
19211
19280
|
}
|
|
19212
19281
|
} else {
|
|
19213
|
-
var _newValue = _objectSpread$
|
|
19282
|
+
var _newValue = _objectSpread$A(_objectSpread$A({}, r), {}, {
|
|
19214
19283
|
selected: false
|
|
19215
19284
|
});
|
|
19216
19285
|
//add it to the new list as unselected role
|
|
@@ -19414,7 +19483,7 @@ function _updateRoles() {
|
|
|
19414
19483
|
userRole = userRoles.find(function (r) {
|
|
19415
19484
|
return r._id == role._id;
|
|
19416
19485
|
});
|
|
19417
|
-
newRole = _objectSpread$
|
|
19486
|
+
newRole = _objectSpread$A({}, role);
|
|
19418
19487
|
if (userRole) {
|
|
19419
19488
|
newRole.selected = true;
|
|
19420
19489
|
newRole.inherited = userRole.inherited;
|
|
@@ -19634,7 +19703,7 @@ function _fetchOptions() {
|
|
|
19634
19703
|
case 4:
|
|
19635
19704
|
result = _context11.sent;
|
|
19636
19705
|
options = result.data.map(function (d) {
|
|
19637
|
-
return _objectSpread$
|
|
19706
|
+
return _objectSpread$A(_objectSpread$A({}, d), {}, {
|
|
19638
19707
|
label: d.displayName,
|
|
19639
19708
|
value: d._id,
|
|
19640
19709
|
isLeaf: !d.hasChildren
|
|
@@ -19736,8 +19805,8 @@ var parent = "parent-NZJ3S";
|
|
|
19736
19805
|
var css_248z$i = ".permission-Button-XctsZ {\n position: relative;\n top: 25px;\n left: -30px;\n float: right;\n height: 20px;\n z-index: 1000;\n}\n.select-lzft- {\n width: 100%;\n}\n.loadingOption-qCkRw {\n margin-top: 11px;\n padding-left: 500px;\n}\n.scroller-lrdk9 {\n overflow: auto;\n height: 100%;\n}\n\n.skeleton--xCI0 {\n padding-left: 25px;\n padding-bottom: 10px;\n}\n.filterField-1kU1O {\n display: flex;\n gap: 10px;\n}\n.filterField-1kU1O button {\n height: 32px;\n}\n.filterField-1kU1O div {\n height: 32px;\n}\n\n.parent-scroll-GmaL9 {\n overflow: auto;\n padding: 24px;\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.parent-NZJ3S {\n overflow: auto;\n padding: 24px;\n height: 100%;\n}\n\n.parent-scroll-GmaL9 .ant-spin-container {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component__outerdiv {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component {\n height: 100% !important;\n}\n";
|
|
19737
19806
|
styleInject(css_248z$i);
|
|
19738
19807
|
|
|
19739
|
-
function ownKeys$
|
|
19740
|
-
function _objectSpread$
|
|
19808
|
+
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; }
|
|
19809
|
+
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; }
|
|
19741
19810
|
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; } } }; }
|
|
19742
19811
|
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; } }
|
|
19743
19812
|
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; }
|
|
@@ -19797,8 +19866,8 @@ function _generateCSV() {
|
|
|
19797
19866
|
break;
|
|
19798
19867
|
}
|
|
19799
19868
|
_context2.next = 21;
|
|
19800
|
-
return generateCSV(_objectSpread$
|
|
19801
|
-
mappingData: _objectSpread$
|
|
19869
|
+
return generateCSV(_objectSpread$z(_objectSpread$z({}, exportParams.children), {}, {
|
|
19870
|
+
mappingData: _objectSpread$z(_objectSpread$z({}, parent), {}, {
|
|
19802
19871
|
parentId: exportParams.mappingData._id
|
|
19803
19872
|
})
|
|
19804
19873
|
}), csvData);
|
|
@@ -19860,8 +19929,8 @@ var generateCSVData = /*#__PURE__*/function () {
|
|
|
19860
19929
|
};
|
|
19861
19930
|
}();
|
|
19862
19931
|
|
|
19863
|
-
function ownKeys$
|
|
19864
|
-
function _objectSpread$
|
|
19932
|
+
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; }
|
|
19933
|
+
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; }
|
|
19865
19934
|
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; } } }; }
|
|
19866
19935
|
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; } }
|
|
19867
19936
|
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; }
|
|
@@ -20280,7 +20349,7 @@ function useRelationSelectorData (_ref) {
|
|
|
20280
20349
|
var activeItem = _step.value;
|
|
20281
20350
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
20282
20351
|
addedObjects.push(addedData);
|
|
20283
|
-
getSplittedItems(_objectSpread$
|
|
20352
|
+
getSplittedItems(_objectSpread$y(_objectSpread$y({}, activeItem), {}, {
|
|
20284
20353
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
20285
20354
|
}));
|
|
20286
20355
|
ret = true;
|
|
@@ -20485,8 +20554,8 @@ function useRelationSelectorData (_ref) {
|
|
|
20485
20554
|
};
|
|
20486
20555
|
}
|
|
20487
20556
|
|
|
20488
|
-
function ownKeys$
|
|
20489
|
-
function _objectSpread$
|
|
20557
|
+
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; }
|
|
20558
|
+
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; }
|
|
20490
20559
|
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; } } }; }
|
|
20491
20560
|
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; } }
|
|
20492
20561
|
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; }
|
|
@@ -20619,7 +20688,7 @@ function ActionButton (_ref) {
|
|
|
20619
20688
|
_iterator2.f();
|
|
20620
20689
|
}
|
|
20621
20690
|
_context.next = 19;
|
|
20622
|
-
return apiInterface.update(_objectSpread$
|
|
20691
|
+
return apiInterface.update(_objectSpread$x(_objectSpread$x({}, data), {}, {
|
|
20623
20692
|
state: toSwitch
|
|
20624
20693
|
}), data);
|
|
20625
20694
|
case 19:
|
|
@@ -20776,14 +20845,14 @@ function _simpleChangeValue() {
|
|
|
20776
20845
|
break;
|
|
20777
20846
|
}
|
|
20778
20847
|
for (i = 0; i < action.newValues.length; i++) {
|
|
20779
|
-
fieldsToUpdate = _objectSpread$
|
|
20848
|
+
fieldsToUpdate = _objectSpread$x(_objectSpread$x({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
20780
20849
|
}
|
|
20781
20850
|
if (!apiInterface.canUpdate) {
|
|
20782
20851
|
_context2.next = 9;
|
|
20783
20852
|
break;
|
|
20784
20853
|
}
|
|
20785
20854
|
_context2.next = 7;
|
|
20786
|
-
return apiInterface.update(_objectSpread$
|
|
20855
|
+
return apiInterface.update(_objectSpread$x({}, fieldsToUpdate), data);
|
|
20787
20856
|
case 7:
|
|
20788
20857
|
response = _context2.sent;
|
|
20789
20858
|
return _context2.abrupt("return", response);
|
|
@@ -20798,7 +20867,7 @@ function _simpleChangeValue() {
|
|
|
20798
20867
|
return _simpleChangeValue.apply(this, arguments);
|
|
20799
20868
|
}
|
|
20800
20869
|
function A(props) {
|
|
20801
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
20870
|
+
return /*#__PURE__*/jsx("a", _objectSpread$x({}, props));
|
|
20802
20871
|
}
|
|
20803
20872
|
|
|
20804
20873
|
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; } } }; }
|
|
@@ -20936,8 +21005,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
20936
21005
|
var css_248z$h = ".diva-component-DIVA_BACKOFFICE_NEW .title-cl-ZAj2y {\n color: black;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .description-m3mNY {\n color: grey;\n flex: 1 1 100%;\n margin-left: 25px;\n margin-top: -25px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-group-xWnj- {\n /* border-bottom: 1px solid black; */\n margin-bottom: 40px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .delete-item-otdSr {\n cursor: pointer;\n position: relative;\n float: right;\n top: 13px;\n margin-right: 20px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .newscroller-INKeD {\n overflow: auto;\n height: 400px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-collapse-header--6FgU div {\n flex-wrap: wrap !important;\n}\n.diva-component-DIVA_BACKOFFICE_NEW a .item-title--BTvC {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.85);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-desc-DBiiF {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.45);\n}\n";
|
|
20937
21006
|
styleInject(css_248z$h);
|
|
20938
21007
|
|
|
20939
|
-
function ownKeys$
|
|
20940
|
-
function _objectSpread$
|
|
21008
|
+
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; }
|
|
21009
|
+
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; }
|
|
20941
21010
|
var DropDown = function DropDown(_ref) {
|
|
20942
21011
|
var _curItem$data$length;
|
|
20943
21012
|
var split = _ref.split,
|
|
@@ -20969,7 +21038,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
20969
21038
|
});
|
|
20970
21039
|
return /*#__PURE__*/jsx(Collapse, {
|
|
20971
21040
|
onChange: function onChange() {
|
|
20972
|
-
return getSplittedItems(_objectSpread$
|
|
21041
|
+
return getSplittedItems(_objectSpread$w(_objectSpread$w({}, item.item), {}, {
|
|
20973
21042
|
parentId: item.parentId
|
|
20974
21043
|
}), 0);
|
|
20975
21044
|
},
|
|
@@ -21227,8 +21296,8 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
21227
21296
|
};
|
|
21228
21297
|
var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
|
|
21229
21298
|
|
|
21230
|
-
function ownKeys$
|
|
21231
|
-
function _objectSpread$
|
|
21299
|
+
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; }
|
|
21300
|
+
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; }
|
|
21232
21301
|
function useFormListData (_ref) {
|
|
21233
21302
|
var _configuration$defaul;
|
|
21234
21303
|
var id = _ref.id,
|
|
@@ -21308,7 +21377,7 @@ function useFormListData (_ref) {
|
|
|
21308
21377
|
if (updated.length == state.length) {
|
|
21309
21378
|
newState = state.map(function (s, i) {
|
|
21310
21379
|
var _updated$find;
|
|
21311
|
-
return _objectSpread$
|
|
21380
|
+
return _objectSpread$v(_objectSpread$v({}, s), {}, {
|
|
21312
21381
|
data: (_updated$find = updated.find(function (u) {
|
|
21313
21382
|
return u.index == i;
|
|
21314
21383
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -21445,8 +21514,8 @@ var FormList = function FormList(_ref, ref) {
|
|
|
21445
21514
|
};
|
|
21446
21515
|
var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
21447
21516
|
|
|
21448
|
-
function ownKeys$
|
|
21449
|
-
function _objectSpread$
|
|
21517
|
+
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; }
|
|
21518
|
+
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; }
|
|
21450
21519
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
21451
21520
|
function useSelectOrCreateData (_ref) {
|
|
21452
21521
|
var id = _ref.id,
|
|
@@ -21543,7 +21612,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
21543
21612
|
_context.next = 7;
|
|
21544
21613
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
21545
21614
|
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) {
|
|
21546
|
-
return _objectSpread$
|
|
21615
|
+
return _objectSpread$u(_objectSpread$u({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
21547
21616
|
}, {}) : {
|
|
21548
21617
|
_id: [value, 'contains']
|
|
21549
21618
|
},
|
|
@@ -21854,8 +21923,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
21854
21923
|
});
|
|
21855
21924
|
};
|
|
21856
21925
|
|
|
21857
|
-
function ownKeys$
|
|
21858
|
-
function _objectSpread$
|
|
21926
|
+
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; }
|
|
21927
|
+
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; }
|
|
21859
21928
|
function useListData (_ref) {
|
|
21860
21929
|
var id = _ref.id,
|
|
21861
21930
|
data = _ref.data;
|
|
@@ -21898,7 +21967,7 @@ function useListData (_ref) {
|
|
|
21898
21967
|
case 3:
|
|
21899
21968
|
result = _context.sent;
|
|
21900
21969
|
setListData(result.data.map(parseField));
|
|
21901
|
-
initData = _objectSpread$
|
|
21970
|
+
initData = _objectSpread$t({}, data);
|
|
21902
21971
|
setUpdatedObject(initData);
|
|
21903
21972
|
setLoading(false);
|
|
21904
21973
|
case 8:
|
|
@@ -21939,7 +22008,7 @@ function useListData (_ref) {
|
|
|
21939
22008
|
});
|
|
21940
22009
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
21941
22010
|
var parsedField = field.field.split('.');
|
|
21942
|
-
item.itemUpdate = _objectSpread$
|
|
22011
|
+
item.itemUpdate = _objectSpread$t(_objectSpread$t({}, field), {}, {
|
|
21943
22012
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
21944
22013
|
});
|
|
21945
22014
|
});
|
|
@@ -21970,16 +22039,16 @@ function useListData (_ref) {
|
|
|
21970
22039
|
console.error('field with more than 2 parts not allowed');
|
|
21971
22040
|
return;
|
|
21972
22041
|
}
|
|
21973
|
-
var updObj = _objectSpread$
|
|
22042
|
+
var updObj = _objectSpread$t({}, updatedObject);
|
|
21974
22043
|
if (fields.length === 1) {
|
|
21975
|
-
updObj = _objectSpread$
|
|
22044
|
+
updObj = _objectSpread$t(_objectSpread$t({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
21976
22045
|
} else if (fields.length === 2) {
|
|
21977
22046
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
21978
22047
|
return v.id === item.id.trim();
|
|
21979
22048
|
});
|
|
21980
22049
|
if (updatedField) {
|
|
21981
|
-
var updatedFieldCopy = _objectSpread$
|
|
21982
|
-
updObj = _objectSpread$
|
|
22050
|
+
var updatedFieldCopy = _objectSpread$t(_objectSpread$t({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
22051
|
+
updObj = _objectSpread$t(_objectSpread$t({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
21983
22052
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
21984
22053
|
})));
|
|
21985
22054
|
}
|
|
@@ -21988,11 +22057,11 @@ function useListData (_ref) {
|
|
|
21988
22057
|
var acItems = listData;
|
|
21989
22058
|
for (var i = 0; i < acItems.length; i++) {
|
|
21990
22059
|
if (i == index) {
|
|
21991
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
22060
|
+
acItems[i].itemUpdate = _objectSpread$t(_objectSpread$t({}, acItems[i].itemUpdate), {}, {
|
|
21992
22061
|
value: value
|
|
21993
22062
|
});
|
|
21994
22063
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
21995
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
22064
|
+
acItems[i].itemUpdate = _objectSpread$t(_objectSpread$t({}, acItems[i].itemUpdate), {}, {
|
|
21996
22065
|
value: !value
|
|
21997
22066
|
});
|
|
21998
22067
|
}
|
|
@@ -22506,8 +22575,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
22506
22575
|
};
|
|
22507
22576
|
}
|
|
22508
22577
|
|
|
22509
|
-
function ownKeys$
|
|
22510
|
-
function _objectSpread$
|
|
22578
|
+
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; }
|
|
22579
|
+
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; }
|
|
22511
22580
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
22512
22581
|
var id = _ref.id,
|
|
22513
22582
|
data = _ref.data,
|
|
@@ -22615,12 +22684,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
22615
22684
|
}
|
|
22616
22685
|
function onEnter(e) {
|
|
22617
22686
|
if (e.key != 'Enter') return;
|
|
22618
|
-
setCrop(_objectSpread$
|
|
22687
|
+
setCrop(_objectSpread$s(_objectSpread$s({}, crop), {}, {
|
|
22619
22688
|
unit: 'px',
|
|
22620
22689
|
width: Number(widthInputElement.current.value),
|
|
22621
22690
|
height: Number(heightInputElement.current.value)
|
|
22622
22691
|
}));
|
|
22623
|
-
setCompletedCrop(_objectSpread$
|
|
22692
|
+
setCompletedCrop(_objectSpread$s(_objectSpread$s({}, crop), {}, {
|
|
22624
22693
|
unit: 'px',
|
|
22625
22694
|
width: Number(widthInputElement.current.value),
|
|
22626
22695
|
height: Number(heightInputElement.current.value)
|
|
@@ -22698,8 +22767,8 @@ var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
|
22698
22767
|
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; } } }; }
|
|
22699
22768
|
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; } }
|
|
22700
22769
|
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; }
|
|
22701
|
-
function ownKeys$
|
|
22702
|
-
function _objectSpread$
|
|
22770
|
+
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; }
|
|
22771
|
+
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; }
|
|
22703
22772
|
function useDescriptions (_ref) {
|
|
22704
22773
|
var id = _ref.id;
|
|
22705
22774
|
var root = useStore();
|
|
@@ -22792,7 +22861,7 @@ function _getDisplayData() {
|
|
|
22792
22861
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
22793
22862
|
while (1) switch (_context4.prev = _context4.next) {
|
|
22794
22863
|
case 0:
|
|
22795
|
-
displayData = _objectSpread$
|
|
22864
|
+
displayData = _objectSpread$r({}, data);
|
|
22796
22865
|
_iterator = _createForOfIteratorHelper$9(items);
|
|
22797
22866
|
_context4.prev = 2;
|
|
22798
22867
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -23068,8 +23137,8 @@ var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
|
23068
23137
|
};
|
|
23069
23138
|
var FileUploadBeta = observer(FileUploadWrapper);
|
|
23070
23139
|
|
|
23071
|
-
function ownKeys$
|
|
23072
|
-
function _objectSpread$
|
|
23140
|
+
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; }
|
|
23141
|
+
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; }
|
|
23073
23142
|
function useGridData (_ref) {
|
|
23074
23143
|
var id = _ref.id,
|
|
23075
23144
|
data = _ref.data;
|
|
@@ -23112,11 +23181,11 @@ function useGridData (_ref) {
|
|
|
23112
23181
|
function reducer(state, action) {
|
|
23113
23182
|
switch (action.type) {
|
|
23114
23183
|
case 'update':
|
|
23115
|
-
return _objectSpread$
|
|
23184
|
+
return _objectSpread$q(_objectSpread$q({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$q(_objectSpread$q({}, action.data), {}, {
|
|
23116
23185
|
buffer: Buffer.from(action.data.buffer)
|
|
23117
23186
|
})));
|
|
23118
23187
|
case 'delete':
|
|
23119
|
-
var newState = _objectSpread$
|
|
23188
|
+
var newState = _objectSpread$q({}, state);
|
|
23120
23189
|
delete newState[action.data.divaNr];
|
|
23121
23190
|
return newState;
|
|
23122
23191
|
default:
|
|
@@ -23203,8 +23272,8 @@ var Grid = function Grid(_ref) {
|
|
|
23203
23272
|
});
|
|
23204
23273
|
};
|
|
23205
23274
|
|
|
23206
|
-
function ownKeys$
|
|
23207
|
-
function _objectSpread$
|
|
23275
|
+
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; }
|
|
23276
|
+
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; }
|
|
23208
23277
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
23209
23278
|
var id = _ref.id;
|
|
23210
23279
|
var root = useStore();
|
|
@@ -23323,7 +23392,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
23323
23392
|
onRemove: onRemove,
|
|
23324
23393
|
customRequest: customRequest,
|
|
23325
23394
|
fileList: fileList.map(function (f) {
|
|
23326
|
-
return _objectSpread$
|
|
23395
|
+
return _objectSpread$p(_objectSpread$p({}, f), {}, {
|
|
23327
23396
|
url: f.url
|
|
23328
23397
|
});
|
|
23329
23398
|
}),
|
|
@@ -24080,8 +24149,8 @@ function LinkCell (_ref) {
|
|
|
24080
24149
|
|
|
24081
24150
|
var _excluded$1 = ["index"],
|
|
24082
24151
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
24083
|
-
function ownKeys$
|
|
24084
|
-
function _objectSpread$
|
|
24152
|
+
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; }
|
|
24153
|
+
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; }
|
|
24085
24154
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
24086
24155
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
24087
24156
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -24095,7 +24164,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
24095
24164
|
component: false,
|
|
24096
24165
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
24097
24166
|
value: form,
|
|
24098
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
24167
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$o({}, props))
|
|
24099
24168
|
})
|
|
24100
24169
|
});
|
|
24101
24170
|
};
|
|
@@ -24148,7 +24217,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
24148
24217
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
24149
24218
|
longDescriptionType = 'text';
|
|
24150
24219
|
}
|
|
24151
|
-
var modifiedColumn = _objectSpread$
|
|
24220
|
+
var modifiedColumn = _objectSpread$o(_objectSpread$o({}, column), {}, {
|
|
24152
24221
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
24153
24222
|
});
|
|
24154
24223
|
if (column) {
|
|
@@ -24161,40 +24230,40 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
24161
24230
|
};
|
|
24162
24231
|
switch (modifiedColumn.type) {
|
|
24163
24232
|
case 'boolean':
|
|
24164
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
24233
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$o({}, cellProps));
|
|
24165
24234
|
break;
|
|
24166
24235
|
case 'text':
|
|
24167
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
24236
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$o({}, cellProps));
|
|
24168
24237
|
break;
|
|
24169
24238
|
case 'select':
|
|
24170
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
24239
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$o({}, cellProps));
|
|
24171
24240
|
case 'media':
|
|
24172
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
24241
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$o({}, cellProps));
|
|
24173
24242
|
break;
|
|
24174
24243
|
case 'mediaItem':
|
|
24175
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
24244
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$o({}, cellProps));
|
|
24176
24245
|
break;
|
|
24177
24246
|
case 'unixTimeStamp':
|
|
24178
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
24247
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$o({}, cellProps));
|
|
24179
24248
|
break;
|
|
24180
24249
|
case 'unixTimeStampCheck':
|
|
24181
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
24250
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$o({}, cellProps));
|
|
24182
24251
|
break;
|
|
24183
24252
|
case 'icon':
|
|
24184
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
24253
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$o({}, cellProps));
|
|
24185
24254
|
break;
|
|
24186
24255
|
case 'progress':
|
|
24187
|
-
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$
|
|
24256
|
+
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$o({}, cellProps));
|
|
24188
24257
|
break;
|
|
24189
24258
|
case 'link':
|
|
24190
|
-
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$
|
|
24259
|
+
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$o({}, cellProps));
|
|
24191
24260
|
break;
|
|
24192
24261
|
default:
|
|
24193
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
24262
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$o({}, cellProps));
|
|
24194
24263
|
break;
|
|
24195
24264
|
}
|
|
24196
24265
|
}
|
|
24197
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
24266
|
+
return /*#__PURE__*/jsx("td", _objectSpread$o(_objectSpread$o({}, restProps), {}, {
|
|
24198
24267
|
children: childNode
|
|
24199
24268
|
}));
|
|
24200
24269
|
};
|
|
@@ -24546,8 +24615,8 @@ var SMChart = function SMChart(props) {
|
|
|
24546
24615
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
24547
24616
|
};
|
|
24548
24617
|
|
|
24549
|
-
function ownKeys$
|
|
24550
|
-
function _objectSpread$
|
|
24618
|
+
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; }
|
|
24619
|
+
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; }
|
|
24551
24620
|
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; } } }; }
|
|
24552
24621
|
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; } }
|
|
24553
24622
|
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; }
|
|
@@ -24742,7 +24811,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
24742
24811
|
// Convert to Dayjs
|
|
24743
24812
|
(_state$globalFilter4 = state.globalFilter) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4.timeStamp) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4['toTimeStamp']) !== null && _state$globalFilter4 !== void 0 && _state$globalFilter4[0] ? dayjs((_state$globalFilter5 = state.globalFilter) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5.timeStamp) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5['toTimeStamp']) === null || _state$globalFilter5 === void 0 ? void 0 : _state$globalFilter5[0]) : dayjs(new Date()) // Convert to Dayjs
|
|
24744
24813
|
]
|
|
24745
|
-
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
24814
|
+
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$n(_objectSpread$n({}, (_state$configuration$5 = state.configuration.filter) === null || _state$configuration$5 === void 0 ? void 0 : _state$configuration$5.select.settings), {}, {
|
|
24746
24815
|
style: {
|
|
24747
24816
|
minWidth: '200px'
|
|
24748
24817
|
},
|
|
@@ -24847,7 +24916,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
24847
24916
|
},
|
|
24848
24917
|
dataSource: data,
|
|
24849
24918
|
loading: state.loading,
|
|
24850
|
-
pagination: _objectSpread$
|
|
24919
|
+
pagination: _objectSpread$n(_objectSpread$n({}, state.pagination), {}, {
|
|
24851
24920
|
showTotal: function showTotal(total, range) {
|
|
24852
24921
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
24853
24922
|
},
|
|
@@ -25154,7 +25223,7 @@ function BulkAction(_ref6) {
|
|
|
25154
25223
|
}
|
|
25155
25224
|
_context4.t0 = data;
|
|
25156
25225
|
_context4.next = 11;
|
|
25157
|
-
return apiInterface.update(_objectSpread$
|
|
25226
|
+
return apiInterface.update(_objectSpread$n(_objectSpread$n({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
25158
25227
|
case 11:
|
|
25159
25228
|
_context4.t1 = _context4.sent;
|
|
25160
25229
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -25267,8 +25336,8 @@ function SelectionText(_ref8) {
|
|
|
25267
25336
|
});
|
|
25268
25337
|
}
|
|
25269
25338
|
|
|
25270
|
-
function ownKeys$
|
|
25271
|
-
function _objectSpread$
|
|
25339
|
+
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; }
|
|
25340
|
+
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; }
|
|
25272
25341
|
function getColumnFilterProps (_ref) {
|
|
25273
25342
|
var filter = _ref.filter,
|
|
25274
25343
|
title = _ref.title;
|
|
@@ -25631,7 +25700,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
25631
25700
|
});
|
|
25632
25701
|
},
|
|
25633
25702
|
options: filter.map(function (f) {
|
|
25634
|
-
return _objectSpread$
|
|
25703
|
+
return _objectSpread$m(_objectSpread$m({}, f), {}, {
|
|
25635
25704
|
label: t(f.label)
|
|
25636
25705
|
});
|
|
25637
25706
|
})
|
|
@@ -25680,7 +25749,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
25680
25749
|
setDisplaySelectedvalues = _useState4[1];
|
|
25681
25750
|
var options = [];
|
|
25682
25751
|
options = filter.map(function (f) {
|
|
25683
|
-
return _objectSpread$
|
|
25752
|
+
return _objectSpread$m(_objectSpread$m({}, f), {}, {
|
|
25684
25753
|
label: t(f.label)
|
|
25685
25754
|
});
|
|
25686
25755
|
});
|
|
@@ -25754,8 +25823,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
25754
25823
|
};
|
|
25755
25824
|
};
|
|
25756
25825
|
|
|
25757
|
-
function ownKeys$
|
|
25758
|
-
function _objectSpread$
|
|
25826
|
+
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; }
|
|
25827
|
+
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; }
|
|
25759
25828
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
25760
25829
|
var columns = configuration.columns.filter(function (c) {
|
|
25761
25830
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -25808,7 +25877,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
25808
25877
|
}
|
|
25809
25878
|
function mapColumn(column, onUpdate) {
|
|
25810
25879
|
var _column$field, _column$children;
|
|
25811
|
-
return _objectSpread$
|
|
25880
|
+
return _objectSpread$l(_objectSpread$l(_objectSpread$l({}, column), {}, {
|
|
25812
25881
|
hidden: false,
|
|
25813
25882
|
width: column.width || 100,
|
|
25814
25883
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
@@ -25858,8 +25927,8 @@ function updateData (_ref) {
|
|
|
25858
25927
|
};
|
|
25859
25928
|
}
|
|
25860
25929
|
|
|
25861
|
-
function ownKeys$
|
|
25862
|
-
function _objectSpread$
|
|
25930
|
+
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; }
|
|
25931
|
+
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; }
|
|
25863
25932
|
function applyFilterAndSortation (_ref) {
|
|
25864
25933
|
var data = _ref.data,
|
|
25865
25934
|
filters = _ref.filters,
|
|
@@ -25874,7 +25943,7 @@ function applyFilterAndSortation (_ref) {
|
|
|
25874
25943
|
processedData = sort(sorter || [], processedData);
|
|
25875
25944
|
return {
|
|
25876
25945
|
data: processedData,
|
|
25877
|
-
pagination: _objectSpread$
|
|
25946
|
+
pagination: _objectSpread$k(_objectSpread$k({}, pagination), {}, {
|
|
25878
25947
|
total: processedData.length
|
|
25879
25948
|
})
|
|
25880
25949
|
};
|
|
@@ -25959,8 +26028,8 @@ function filter(f, data) {
|
|
|
25959
26028
|
}
|
|
25960
26029
|
|
|
25961
26030
|
var _excluded = ["_id"];
|
|
25962
|
-
function ownKeys$
|
|
25963
|
-
function _objectSpread$
|
|
26031
|
+
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; }
|
|
26032
|
+
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; }
|
|
25964
26033
|
function useTableData$1 (_ref) {
|
|
25965
26034
|
var _configuration$apiInt;
|
|
25966
26035
|
var id = _ref.id;
|
|
@@ -26015,7 +26084,7 @@ function useTableData$1 (_ref) {
|
|
|
26015
26084
|
var _configuration$create;
|
|
26016
26085
|
if (!dataRow) return;
|
|
26017
26086
|
var id = v4();
|
|
26018
|
-
var processedDataRow = unflatten(_objectSpread$
|
|
26087
|
+
var processedDataRow = unflatten(_objectSpread$j({
|
|
26019
26088
|
_id: id,
|
|
26020
26089
|
ID: id
|
|
26021
26090
|
}, dataRow));
|
|
@@ -26027,11 +26096,11 @@ function useTableData$1 (_ref) {
|
|
|
26027
26096
|
newData = _updateData.data;
|
|
26028
26097
|
_updateData.prevDataRow;
|
|
26029
26098
|
_updateData.index;
|
|
26030
|
-
var newState = _objectSpread$
|
|
26099
|
+
var newState = _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
26031
26100
|
data: newData
|
|
26032
26101
|
});
|
|
26033
26102
|
if (!filterServerSide) {
|
|
26034
|
-
var res = applyFilterAndSortation(_objectSpread$
|
|
26103
|
+
var res = applyFilterAndSortation(_objectSpread$j(_objectSpread$j({}, filterData), {}, {
|
|
26035
26104
|
data: newData
|
|
26036
26105
|
}));
|
|
26037
26106
|
newState.data = res.data;
|
|
@@ -26043,33 +26112,33 @@ function useTableData$1 (_ref) {
|
|
|
26043
26112
|
var formData = new FormData();
|
|
26044
26113
|
processedDataRow._id;
|
|
26045
26114
|
var value = _objectWithoutProperties(processedDataRow, _excluded);
|
|
26046
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
26115
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$j(_objectSpread$j({}, catalogItem), {}, {
|
|
26047
26116
|
filterContex: filterContex,
|
|
26048
26117
|
value: JSON.stringify([value])
|
|
26049
26118
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
26050
26119
|
if (d && d.Result && d.Result == 'Success') return;
|
|
26051
|
-
setState(_objectSpread$
|
|
26120
|
+
setState(_objectSpread$j({}, oldState));
|
|
26052
26121
|
});
|
|
26053
26122
|
}, [state, catalogItem, filterData]);
|
|
26054
26123
|
useEffect(function () {
|
|
26055
26124
|
if (!catalogItem) return;
|
|
26056
|
-
setState(_objectSpread$
|
|
26125
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
26057
26126
|
loading: true,
|
|
26058
|
-
mappingData: _objectSpread$
|
|
26127
|
+
mappingData: _objectSpread$j(_objectSpread$j({}, catalogItem), {}, {
|
|
26059
26128
|
filterContex: filterContex
|
|
26060
26129
|
})
|
|
26061
26130
|
}));
|
|
26062
26131
|
if (!filterServerSide) {
|
|
26063
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
26132
|
+
apiHandler.readList(configuration.mapping, _objectSpread$j(_objectSpread$j({}, catalogItem), {}, {
|
|
26064
26133
|
filterContex: filterContex
|
|
26065
26134
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
26066
26135
|
var newData = data.data.map(function (d) {
|
|
26067
|
-
return _objectSpread$
|
|
26136
|
+
return _objectSpread$j(_objectSpread$j({}, d), {}, {
|
|
26068
26137
|
_id: d._id || d.ID || nanoid()
|
|
26069
26138
|
});
|
|
26070
26139
|
});
|
|
26071
26140
|
onChange({
|
|
26072
|
-
pagination: _objectSpread$
|
|
26141
|
+
pagination: _objectSpread$j({}, state.pagination),
|
|
26073
26142
|
filters: {},
|
|
26074
26143
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
26075
26144
|
return c.defaultSortOrder;
|
|
@@ -26085,7 +26154,7 @@ function useTableData$1 (_ref) {
|
|
|
26085
26154
|
});
|
|
26086
26155
|
} else {
|
|
26087
26156
|
onChange({
|
|
26088
|
-
pagination: _objectSpread$
|
|
26157
|
+
pagination: _objectSpread$j({}, state.pagination),
|
|
26089
26158
|
filters: {},
|
|
26090
26159
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
26091
26160
|
return c.defaultSortOrder;
|
|
@@ -26101,17 +26170,17 @@ function useTableData$1 (_ref) {
|
|
|
26101
26170
|
}
|
|
26102
26171
|
}, [filterContex, catalogItem]);
|
|
26103
26172
|
var onChange = function onChange(p, dataParam) {
|
|
26104
|
-
setState(_objectSpread$
|
|
26173
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
26105
26174
|
loading: true
|
|
26106
26175
|
}));
|
|
26107
26176
|
if (!filterServerSide) {
|
|
26108
26177
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
26109
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
26178
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$j(_objectSpread$j({}, p), {}, {
|
|
26110
26179
|
data: unfilteredData
|
|
26111
26180
|
})),
|
|
26112
26181
|
data = _applyFilterAndSortat.data,
|
|
26113
26182
|
pagination = _applyFilterAndSortat.pagination;
|
|
26114
|
-
setState(_objectSpread$
|
|
26183
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
26115
26184
|
data: data,
|
|
26116
26185
|
pagination: pagination,
|
|
26117
26186
|
loading: false,
|
|
@@ -26122,20 +26191,20 @@ function useTableData$1 (_ref) {
|
|
|
26122
26191
|
sorter: p.sorter
|
|
26123
26192
|
});
|
|
26124
26193
|
} else {
|
|
26125
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
26194
|
+
apiHandler.readList(configuration.mapping, _objectSpread$j(_objectSpread$j({}, catalogItem), {}, {
|
|
26126
26195
|
filterContex: filterContex
|
|
26127
26196
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
26128
|
-
setState(_objectSpread$
|
|
26197
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
26129
26198
|
data: data.data.map(function (dt) {
|
|
26130
|
-
return _objectSpread$
|
|
26199
|
+
return _objectSpread$j(_objectSpread$j({}, dt), {}, {
|
|
26131
26200
|
_id: dt._id || dt.ID || nanoid()
|
|
26132
26201
|
});
|
|
26133
26202
|
}),
|
|
26134
|
-
pagination: _objectSpread$
|
|
26203
|
+
pagination: _objectSpread$j(_objectSpread$j({}, p.pagination), {}, {
|
|
26135
26204
|
total: data.total
|
|
26136
26205
|
}),
|
|
26137
26206
|
loading: false,
|
|
26138
|
-
mappingData: _objectSpread$
|
|
26207
|
+
mappingData: _objectSpread$j(_objectSpread$j({}, catalogItem), {}, {
|
|
26139
26208
|
filterContex: filterContex
|
|
26140
26209
|
})
|
|
26141
26210
|
}));
|
|
@@ -26156,7 +26225,7 @@ function useTableData$1 (_ref) {
|
|
|
26156
26225
|
filters['_id'] = [id, 'eq', false];
|
|
26157
26226
|
_context.next = 4;
|
|
26158
26227
|
return apiHandler.readList(configuration.mapping, {
|
|
26159
|
-
pagination: _objectSpread$
|
|
26228
|
+
pagination: _objectSpread$j({}, state.pagination),
|
|
26160
26229
|
columns: configuration.columns,
|
|
26161
26230
|
filters: filters,
|
|
26162
26231
|
sorter: filterData.sorter
|
|
@@ -26175,7 +26244,7 @@ function useTableData$1 (_ref) {
|
|
|
26175
26244
|
};
|
|
26176
26245
|
}();
|
|
26177
26246
|
var onSelect = function onSelect(keys) {
|
|
26178
|
-
setState(_objectSpread$
|
|
26247
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
26179
26248
|
selected: keys
|
|
26180
26249
|
}));
|
|
26181
26250
|
};
|
|
@@ -26185,7 +26254,7 @@ function useTableData$1 (_ref) {
|
|
|
26185
26254
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
26186
26255
|
while (1) switch (_context3.prev = _context3.next) {
|
|
26187
26256
|
case 0:
|
|
26188
|
-
setState(_objectSpread$
|
|
26257
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
26189
26258
|
deleting: true
|
|
26190
26259
|
}));
|
|
26191
26260
|
newData = _toConsumableArray(state.data);
|
|
@@ -26200,7 +26269,7 @@ function useTableData$1 (_ref) {
|
|
|
26200
26269
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
26201
26270
|
return nd._id === state.selected[index];
|
|
26202
26271
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
26203
|
-
mappingData = _objectSpread$
|
|
26272
|
+
mappingData = _objectSpread$j(_objectSpread$j({}, mappingData), state.mappingData);
|
|
26204
26273
|
_context2.next = 5;
|
|
26205
26274
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true);
|
|
26206
26275
|
case 5:
|
|
@@ -26250,7 +26319,7 @@ function useTableData$1 (_ref) {
|
|
|
26250
26319
|
}
|
|
26251
26320
|
_context3.next = 18;
|
|
26252
26321
|
return apiHandler.readList(configuration.mapping, {
|
|
26253
|
-
pagination: _objectSpread$
|
|
26322
|
+
pagination: _objectSpread$j(_objectSpread$j({}, state.pagination), {}, {
|
|
26254
26323
|
current: current
|
|
26255
26324
|
}),
|
|
26256
26325
|
columns: configuration.columns,
|
|
@@ -26262,11 +26331,11 @@ function useTableData$1 (_ref) {
|
|
|
26262
26331
|
newData = data.data;
|
|
26263
26332
|
total = data.total;
|
|
26264
26333
|
case 21:
|
|
26265
|
-
setState(_objectSpread$
|
|
26334
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
26266
26335
|
selected: [],
|
|
26267
26336
|
deleting: false,
|
|
26268
26337
|
data: newData,
|
|
26269
|
-
pagination: _objectSpread$
|
|
26338
|
+
pagination: _objectSpread$j(_objectSpread$j({}, state.pagination), {}, {
|
|
26270
26339
|
current: current,
|
|
26271
26340
|
total: total
|
|
26272
26341
|
})
|
|
@@ -26282,12 +26351,12 @@ function useTableData$1 (_ref) {
|
|
|
26282
26351
|
};
|
|
26283
26352
|
}();
|
|
26284
26353
|
function setLoading() {
|
|
26285
|
-
setState(_objectSpread$
|
|
26354
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
26286
26355
|
loading: true
|
|
26287
26356
|
}));
|
|
26288
26357
|
}
|
|
26289
|
-
return _objectSpread$
|
|
26290
|
-
configuration: _objectSpread$
|
|
26358
|
+
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
26359
|
+
configuration: _objectSpread$j(_objectSpread$j({}, configuration), {}, {
|
|
26291
26360
|
title: undefined
|
|
26292
26361
|
}),
|
|
26293
26362
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -26399,8 +26468,8 @@ function objectHash (obj) {
|
|
|
26399
26468
|
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; } } }; }
|
|
26400
26469
|
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; } }
|
|
26401
26470
|
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; }
|
|
26402
|
-
function ownKeys$
|
|
26403
|
-
function _objectSpread$
|
|
26471
|
+
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; }
|
|
26472
|
+
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; }
|
|
26404
26473
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
26405
26474
|
function useTableData (_ref) {
|
|
26406
26475
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -26436,8 +26505,7 @@ function useTableData (_ref) {
|
|
|
26436
26505
|
var toggleConfig = (_configuration$filter = configuration.filter) === null || _configuration$filter === void 0 ? void 0 : _configuration$filter.toggle;
|
|
26437
26506
|
var toggleFilter = {};
|
|
26438
26507
|
toggleConfig === null || toggleConfig === void 0 || toggleConfig.fields.forEach(function (f) {
|
|
26439
|
-
|
|
26440
|
-
return toggleFilter[f] = [toggleConfig.globalValue ? root.getGlobalValue(toggleConfig.globalValue) : true, 'eq', ((_toggleConfig$isAnd = toggleConfig.isAnd) !== null && _toggleConfig$isAnd !== void 0 ? _toggleConfig$isAnd : false) ? 0 : 1];
|
|
26508
|
+
return toggleFilter[f] = [toggleConfig.globalValue ? root.getGlobalValue(toggleConfig.globalValue) : true, 'eq', !toggleConfig.isAnd];
|
|
26441
26509
|
});
|
|
26442
26510
|
var defaultFilter = {};
|
|
26443
26511
|
(_configuration$filter2 = configuration.filter) === null || _configuration$filter2 === void 0 || (_configuration$filter2 = _configuration$filter2["default"]) === null || _configuration$filter2 === void 0 || _configuration$filter2.fields.forEach(function (f) {
|
|
@@ -26459,7 +26527,7 @@ function useTableData (_ref) {
|
|
|
26459
26527
|
var _useState13 = useState({
|
|
26460
26528
|
loading: true,
|
|
26461
26529
|
deleting: false,
|
|
26462
|
-
pagination: _objectSpread$
|
|
26530
|
+
pagination: _objectSpread$i({
|
|
26463
26531
|
current: 1,
|
|
26464
26532
|
pageSize: 20,
|
|
26465
26533
|
total: 0,
|
|
@@ -26468,7 +26536,7 @@ function useTableData (_ref) {
|
|
|
26468
26536
|
selected: [],
|
|
26469
26537
|
canDelete: !!apiHandler.canDelete,
|
|
26470
26538
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
26471
|
-
mappingData: _objectSpread$
|
|
26539
|
+
mappingData: _objectSpread$i(_objectSpread$i({}, parentData), {}, {
|
|
26472
26540
|
prefilter: {
|
|
26473
26541
|
select: globalFilter.select
|
|
26474
26542
|
}
|
|
@@ -26477,7 +26545,7 @@ function useTableData (_ref) {
|
|
|
26477
26545
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
26478
26546
|
state = _useState14[0],
|
|
26479
26547
|
setState = _useState14[1];
|
|
26480
|
-
var mapping = _objectSpread$
|
|
26548
|
+
var mapping = _objectSpread$i(_objectSpread$i({}, parentData), {}, {
|
|
26481
26549
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
26482
26550
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
26483
26551
|
});
|
|
@@ -26516,14 +26584,14 @@ function useTableData (_ref) {
|
|
|
26516
26584
|
}
|
|
26517
26585
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
26518
26586
|
var newInitData = initData;
|
|
26519
|
-
var newState = _objectSpread$
|
|
26587
|
+
var newState = _objectSpread$i({}, state);
|
|
26520
26588
|
var selected = [];
|
|
26521
26589
|
if (configuration.deselectOnUpdate == false) {
|
|
26522
26590
|
selected = state.selected;
|
|
26523
26591
|
}
|
|
26524
26592
|
var pagination = undefined;
|
|
26525
26593
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
26526
|
-
pagination = _objectSpread$
|
|
26594
|
+
pagination = _objectSpread$i(_objectSpread$i({}, state.pagination), {}, {
|
|
26527
26595
|
total: state.data.length + dataArray.length
|
|
26528
26596
|
});
|
|
26529
26597
|
}
|
|
@@ -26540,7 +26608,7 @@ function useTableData (_ref) {
|
|
|
26540
26608
|
dataRow: dataRow
|
|
26541
26609
|
}),
|
|
26542
26610
|
_data = _updateData.data;
|
|
26543
|
-
newState = _objectSpread$
|
|
26611
|
+
newState = _objectSpread$i(_objectSpread$i({}, newState), {}, {
|
|
26544
26612
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
26545
26613
|
data: _data,
|
|
26546
26614
|
selected: selected
|
|
@@ -26553,8 +26621,8 @@ function useTableData (_ref) {
|
|
|
26553
26621
|
dataRow: dataRow
|
|
26554
26622
|
}),
|
|
26555
26623
|
nextInitData = _updateData2.data;
|
|
26556
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
26557
|
-
filters: _objectSpread$
|
|
26624
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$i(_objectSpread$i(_objectSpread$i({}, filterData), {}, {
|
|
26625
|
+
filters: _objectSpread$i(_objectSpread$i(_objectSpread$i(_objectSpread$i(_objectSpread$i(_objectSpread$i({}, 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"])
|
|
26558
26626
|
}, 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 ? {
|
|
26559
26627
|
genericProps: globalFilter.toggle
|
|
26560
26628
|
} : undefined), {}, {
|
|
@@ -26564,7 +26632,7 @@ function useTableData (_ref) {
|
|
|
26564
26632
|
_data2 = _applyFilterAndSortat.data,
|
|
26565
26633
|
_pagination2 = _applyFilterAndSortat.pagination;
|
|
26566
26634
|
newInitData = nextInitData;
|
|
26567
|
-
newState = _objectSpread$
|
|
26635
|
+
newState = _objectSpread$i(_objectSpread$i({}, newState), {}, {
|
|
26568
26636
|
pagination: _pagination2,
|
|
26569
26637
|
data: _data2,
|
|
26570
26638
|
selected: selected
|
|
@@ -26574,8 +26642,8 @@ function useTableData (_ref) {
|
|
|
26574
26642
|
if (apiHandler.canCreate) {
|
|
26575
26643
|
apiCreate(data).then(function (res) {
|
|
26576
26644
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
26577
|
-
initData && setInitData(_objectSpread$
|
|
26578
|
-
setState(_objectSpread$
|
|
26645
|
+
initData && setInitData(_objectSpread$i({}, initData));
|
|
26646
|
+
setState(_objectSpread$i({}, state));
|
|
26579
26647
|
}
|
|
26580
26648
|
});
|
|
26581
26649
|
}
|
|
@@ -26588,7 +26656,7 @@ function useTableData (_ref) {
|
|
|
26588
26656
|
var triggerRefresh = function triggerRefresh() {
|
|
26589
26657
|
var _configuration$filter7;
|
|
26590
26658
|
setError(undefined);
|
|
26591
|
-
var newGlobalFilter = _objectSpread$
|
|
26659
|
+
var newGlobalFilter = _objectSpread$i({}, globalFilter);
|
|
26592
26660
|
//on refresh update default filter, since global value can change
|
|
26593
26661
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
26594
26662
|
var _configuration$filter8;
|
|
@@ -26599,7 +26667,7 @@ function useTableData (_ref) {
|
|
|
26599
26667
|
newGlobalFilter["default"] = _defaultFilter;
|
|
26600
26668
|
setGlobaFilter(newGlobalFilter);
|
|
26601
26669
|
}
|
|
26602
|
-
onChange(_objectSpread$
|
|
26670
|
+
onChange(_objectSpread$i({
|
|
26603
26671
|
pagination: state.pagination
|
|
26604
26672
|
}, filterData), newGlobalFilter, true);
|
|
26605
26673
|
};
|
|
@@ -26617,7 +26685,7 @@ function useTableData (_ref) {
|
|
|
26617
26685
|
order: c.defaultSortOrder
|
|
26618
26686
|
};
|
|
26619
26687
|
});
|
|
26620
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
26688
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26621
26689
|
loading: false
|
|
26622
26690
|
}));else {
|
|
26623
26691
|
onChange({
|
|
@@ -26660,7 +26728,7 @@ function useTableData (_ref) {
|
|
|
26660
26728
|
case 0:
|
|
26661
26729
|
filters = {};
|
|
26662
26730
|
filters['_id'] = [id, 'eq', false];
|
|
26663
|
-
ssf = _objectSpread$
|
|
26731
|
+
ssf = _objectSpread$i({
|
|
26664
26732
|
pagination: {
|
|
26665
26733
|
current: 1,
|
|
26666
26734
|
pageSize: 1
|
|
@@ -26713,11 +26781,11 @@ function useTableData (_ref) {
|
|
|
26713
26781
|
prefilter = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : globalFilter;
|
|
26714
26782
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
26715
26783
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
26716
|
-
setState(_objectSpread$
|
|
26784
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26717
26785
|
loading: true
|
|
26718
26786
|
}));
|
|
26719
26787
|
currentData = initData;
|
|
26720
|
-
filterData = _objectSpread$
|
|
26788
|
+
filterData = _objectSpread$i(_objectSpread$i(_objectSpread$i(_objectSpread$i({}, prefilter.search), ((_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
|
|
26721
26789
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
|
|
26722
26790
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
26723
26791
|
_ref7[0];
|
|
@@ -26725,7 +26793,7 @@ function useTableData (_ref) {
|
|
|
26725
26793
|
return v != null;
|
|
26726
26794
|
}));
|
|
26727
26795
|
currentFilterHash = objectHash(filterData);
|
|
26728
|
-
currentPagination = _objectSpread$
|
|
26796
|
+
currentPagination = _objectSpread$i(_objectSpread$i({}, p.pagination), {}, {
|
|
26729
26797
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
26730
26798
|
});
|
|
26731
26799
|
filterHash.current = currentFilterHash;
|
|
@@ -26733,7 +26801,7 @@ function useTableData (_ref) {
|
|
|
26733
26801
|
_context3.next = 20;
|
|
26734
26802
|
break;
|
|
26735
26803
|
}
|
|
26736
|
-
ssf = _objectSpread$
|
|
26804
|
+
ssf = _objectSpread$i({
|
|
26737
26805
|
pagination: currentPagination,
|
|
26738
26806
|
columns: configuration.columns,
|
|
26739
26807
|
filters: filterData,
|
|
@@ -26747,7 +26815,7 @@ function useTableData (_ref) {
|
|
|
26747
26815
|
data = _context3.sent;
|
|
26748
26816
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
26749
26817
|
currentData = data.data;
|
|
26750
|
-
currentPagination = _objectSpread$
|
|
26818
|
+
currentPagination = _objectSpread$i(_objectSpread$i({}, currentPagination), {}, {
|
|
26751
26819
|
total: data.total
|
|
26752
26820
|
});
|
|
26753
26821
|
_context3.next = 29;
|
|
@@ -26764,7 +26832,7 @@ function useTableData (_ref) {
|
|
|
26764
26832
|
currentData = _data3.data;
|
|
26765
26833
|
setInitData(currentData);
|
|
26766
26834
|
case 26:
|
|
26767
|
-
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$
|
|
26835
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$i(_objectSpread$i({}, p), {}, {
|
|
26768
26836
|
pagination: currentPagination,
|
|
26769
26837
|
filters: filterData,
|
|
26770
26838
|
data: currentData,
|
|
@@ -26773,11 +26841,11 @@ function useTableData (_ref) {
|
|
|
26773
26841
|
currentData = _data4;
|
|
26774
26842
|
currentPagination = pagination;
|
|
26775
26843
|
case 29:
|
|
26776
|
-
setState(_objectSpread$
|
|
26844
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26777
26845
|
loading: false,
|
|
26778
26846
|
data: currentData,
|
|
26779
26847
|
pagination: currentPagination,
|
|
26780
|
-
mappingData: _objectSpread$
|
|
26848
|
+
mappingData: _objectSpread$i(_objectSpread$i({}, parentData), {}, {
|
|
26781
26849
|
prefilter: prefilter
|
|
26782
26850
|
}),
|
|
26783
26851
|
currentFetchUrl: currentUrl
|
|
@@ -26799,7 +26867,7 @@ function useTableData (_ref) {
|
|
|
26799
26867
|
};
|
|
26800
26868
|
}();
|
|
26801
26869
|
var onSelect = function onSelect(keys) {
|
|
26802
|
-
setState(_objectSpread$
|
|
26870
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26803
26871
|
selected: keys
|
|
26804
26872
|
}));
|
|
26805
26873
|
};
|
|
@@ -26810,7 +26878,7 @@ function useTableData (_ref) {
|
|
|
26810
26878
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
26811
26879
|
while (1) switch (_context5.prev = _context5.next) {
|
|
26812
26880
|
case 0:
|
|
26813
|
-
setState(_objectSpread$
|
|
26881
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26814
26882
|
deleting: true
|
|
26815
26883
|
}));
|
|
26816
26884
|
newData = _toConsumableArray(state.data);
|
|
@@ -26850,7 +26918,7 @@ function useTableData (_ref) {
|
|
|
26850
26918
|
} finally {
|
|
26851
26919
|
_iterator.f();
|
|
26852
26920
|
}
|
|
26853
|
-
mappingData = _objectSpread$
|
|
26921
|
+
mappingData = _objectSpread$i(_objectSpread$i(_objectSpread$i({}, mappingData), state.mappingData), mapToggle);
|
|
26854
26922
|
deleteResult = undefined;
|
|
26855
26923
|
_context4.prev = 7;
|
|
26856
26924
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -26940,12 +27008,12 @@ function useTableData (_ref) {
|
|
|
26940
27008
|
break;
|
|
26941
27009
|
}
|
|
26942
27010
|
_context5.next = 25;
|
|
26943
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
26944
|
-
pagination: _objectSpread$
|
|
27011
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$i({
|
|
27012
|
+
pagination: _objectSpread$i(_objectSpread$i({}, state.pagination), {}, {
|
|
26945
27013
|
current: current
|
|
26946
27014
|
}),
|
|
26947
27015
|
columns: configuration.columns,
|
|
26948
|
-
filters: _objectSpread$
|
|
27016
|
+
filters: _objectSpread$i(_objectSpread$i(_objectSpread$i(_objectSpread$i(_objectSpread$i(_objectSpread$i({}, filterData.filters), globalFilter.search), !(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) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
|
|
26949
27017
|
sorter: filterData.sorter
|
|
26950
27018
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter17 = configuration.filter) !== null && _configuration$filter17 !== void 0 && (_configuration$filter17 = _configuration$filter17.toggle) !== null && _configuration$filter17 !== void 0 && _configuration$filter17.inQuery ? {
|
|
26951
27019
|
genericProps: globalFilter.toggle
|
|
@@ -26956,11 +27024,11 @@ function useTableData (_ref) {
|
|
|
26956
27024
|
total = data.total;
|
|
26957
27025
|
case 28:
|
|
26958
27026
|
setInitData(newInitData);
|
|
26959
|
-
setState(_objectSpread$
|
|
27027
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
26960
27028
|
selected: [],
|
|
26961
27029
|
deleting: false,
|
|
26962
27030
|
data: newData,
|
|
26963
|
-
pagination: _objectSpread$
|
|
27031
|
+
pagination: _objectSpread$i(_objectSpread$i({}, state.pagination), {}, {
|
|
26964
27032
|
current: current === 0 ? 1 : current,
|
|
26965
27033
|
total: total
|
|
26966
27034
|
})
|
|
@@ -26981,14 +27049,14 @@ function useTableData (_ref) {
|
|
|
26981
27049
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
26982
27050
|
return;
|
|
26983
27051
|
}
|
|
26984
|
-
var newGlobalFilter = _objectSpread$
|
|
27052
|
+
var newGlobalFilter = _objectSpread$i({}, globalFilter);
|
|
26985
27053
|
if (value !== null && value !== void 0 && value.length) {
|
|
26986
27054
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
26987
27055
|
} else {
|
|
26988
27056
|
newGlobalFilter.select = {};
|
|
26989
27057
|
}
|
|
26990
27058
|
setGlobaFilter(newGlobalFilter);
|
|
26991
|
-
onChange(_objectSpread$
|
|
27059
|
+
onChange(_objectSpread$i({
|
|
26992
27060
|
pagination: state.pagination
|
|
26993
27061
|
}, filterData), newGlobalFilter);
|
|
26994
27062
|
};
|
|
@@ -27000,13 +27068,13 @@ function useTableData (_ref) {
|
|
|
27000
27068
|
}
|
|
27001
27069
|
var toggleFilter = {};
|
|
27002
27070
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
27003
|
-
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', configuration.filter.toggle.isAnd
|
|
27071
|
+
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
27004
27072
|
});
|
|
27005
|
-
var newGlobalFilter = _objectSpread$
|
|
27073
|
+
var newGlobalFilter = _objectSpread$i(_objectSpread$i({}, globalFilter), {}, {
|
|
27006
27074
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
27007
27075
|
});
|
|
27008
27076
|
setGlobaFilter(newGlobalFilter);
|
|
27009
|
-
onChange(_objectSpread$
|
|
27077
|
+
onChange(_objectSpread$i({
|
|
27010
27078
|
pagination: state.pagination
|
|
27011
27079
|
}, filterData), newGlobalFilter, undefined, true);
|
|
27012
27080
|
};
|
|
@@ -27019,7 +27087,7 @@ function useTableData (_ref) {
|
|
|
27019
27087
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
27020
27088
|
return;
|
|
27021
27089
|
}
|
|
27022
|
-
var newGlobalFilter = _objectSpread$
|
|
27090
|
+
var newGlobalFilter = _objectSpread$i(_objectSpread$i({}, globalFilter), {}, {
|
|
27023
27091
|
search: {}
|
|
27024
27092
|
});
|
|
27025
27093
|
if (value) {
|
|
@@ -27033,7 +27101,7 @@ function useTableData (_ref) {
|
|
|
27033
27101
|
});
|
|
27034
27102
|
}
|
|
27035
27103
|
setGlobaFilter(newGlobalFilter);
|
|
27036
|
-
onChange(_objectSpread$
|
|
27104
|
+
onChange(_objectSpread$i({
|
|
27037
27105
|
pagination: state.pagination
|
|
27038
27106
|
}, filterData), newGlobalFilter);
|
|
27039
27107
|
};
|
|
@@ -27043,17 +27111,17 @@ function useTableData (_ref) {
|
|
|
27043
27111
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
27044
27112
|
return;
|
|
27045
27113
|
}
|
|
27046
|
-
var newGlobalFilter = _objectSpread$
|
|
27114
|
+
var newGlobalFilter = _objectSpread$i({}, globalFilter);
|
|
27047
27115
|
newGlobalFilter.timeStamp = {
|
|
27048
27116
|
fromTimeStamp: [from],
|
|
27049
27117
|
toTimeStamp: [to]
|
|
27050
27118
|
};
|
|
27051
27119
|
setGlobaFilter(newGlobalFilter);
|
|
27052
|
-
onChange(_objectSpread$
|
|
27120
|
+
onChange(_objectSpread$i({
|
|
27053
27121
|
pagination: state.pagination
|
|
27054
27122
|
}, filterData), newGlobalFilter);
|
|
27055
27123
|
};
|
|
27056
|
-
return _objectSpread$
|
|
27124
|
+
return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
27057
27125
|
title: title,
|
|
27058
27126
|
configuration: configuration,
|
|
27059
27127
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -27095,8 +27163,8 @@ function StandardTable (_ref) {
|
|
|
27095
27163
|
});
|
|
27096
27164
|
}
|
|
27097
27165
|
|
|
27098
|
-
function ownKeys$
|
|
27099
|
-
function _objectSpread$
|
|
27166
|
+
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; }
|
|
27167
|
+
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; }
|
|
27100
27168
|
function Table (props) {
|
|
27101
27169
|
var root = useStore();
|
|
27102
27170
|
var variant = useMemo(function () {
|
|
@@ -27104,15 +27172,15 @@ function Table (props) {
|
|
|
27104
27172
|
return config.variant;
|
|
27105
27173
|
}, [props.id]);
|
|
27106
27174
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
27107
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
27175
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$h({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$h({}, props))]
|
|
27108
27176
|
});
|
|
27109
27177
|
}
|
|
27110
27178
|
|
|
27111
27179
|
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; } } }; }
|
|
27112
27180
|
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; } }
|
|
27113
27181
|
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; }
|
|
27114
|
-
function ownKeys$
|
|
27115
|
-
function _objectSpread$
|
|
27182
|
+
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; }
|
|
27183
|
+
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; }
|
|
27116
27184
|
function useAGGrid (_ref) {
|
|
27117
27185
|
var id = _ref.id,
|
|
27118
27186
|
filter = _ref.filter,
|
|
@@ -27206,7 +27274,7 @@ function useAGGrid (_ref) {
|
|
|
27206
27274
|
value = _ref3[1];
|
|
27207
27275
|
if (_idx == 0) {
|
|
27208
27276
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
27209
|
-
rdat.push(_objectSpread$
|
|
27277
|
+
rdat.push(_objectSpread$g(_objectSpread$g({}, rd), {}, {
|
|
27210
27278
|
grouping: [idx.toString()]
|
|
27211
27279
|
}));
|
|
27212
27280
|
var sp = key.split(':');
|
|
@@ -27349,8 +27417,8 @@ var value = "value-FCA-6";
|
|
|
27349
27417
|
var css_248z$a = ".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";
|
|
27350
27418
|
styleInject(css_248z$a);
|
|
27351
27419
|
|
|
27352
|
-
function ownKeys$
|
|
27353
|
-
function _objectSpread$
|
|
27420
|
+
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; }
|
|
27421
|
+
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; }
|
|
27354
27422
|
var AGChart = function AGChart(_ref) {
|
|
27355
27423
|
var data = _ref.data;
|
|
27356
27424
|
var groupedData = [];
|
|
@@ -27358,11 +27426,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
27358
27426
|
data.forEach(function (dt) {
|
|
27359
27427
|
if (dt.count == 0) return;
|
|
27360
27428
|
if (groupedData.length > dt.grouping[0]) {
|
|
27361
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
27429
|
+
groupedData[dt.grouping[0]].push(_objectSpread$f(_objectSpread$f({}, dt), {}, {
|
|
27362
27430
|
count: Number(dt.count)
|
|
27363
27431
|
}));
|
|
27364
27432
|
} else {
|
|
27365
|
-
groupedData.push([_objectSpread$
|
|
27433
|
+
groupedData.push([_objectSpread$f(_objectSpread$f({}, dt), {}, {
|
|
27366
27434
|
count: Number(dt.count)
|
|
27367
27435
|
})]);
|
|
27368
27436
|
}
|
|
@@ -27403,8 +27471,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
27403
27471
|
});
|
|
27404
27472
|
};
|
|
27405
27473
|
|
|
27406
|
-
function ownKeys$
|
|
27407
|
-
function _objectSpread$
|
|
27474
|
+
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; }
|
|
27475
|
+
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; }
|
|
27408
27476
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
27409
27477
|
var id = _ref.id,
|
|
27410
27478
|
filter = _ref.filter,
|
|
@@ -27497,7 +27565,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
27497
27565
|
});
|
|
27498
27566
|
});
|
|
27499
27567
|
}
|
|
27500
|
-
return _objectSpread$
|
|
27568
|
+
return _objectSpread$e(_objectSpread$e({}, column), {}, {
|
|
27501
27569
|
cellRenderer: renderer
|
|
27502
27570
|
});
|
|
27503
27571
|
});
|
|
@@ -27767,8 +27835,8 @@ var CustomText = function CustomText(_ref) {
|
|
|
27767
27835
|
};
|
|
27768
27836
|
var CustomText$1 = observer(CustomText);
|
|
27769
27837
|
|
|
27770
|
-
function ownKeys$
|
|
27771
|
-
function _objectSpread$
|
|
27838
|
+
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; }
|
|
27839
|
+
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; }
|
|
27772
27840
|
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; } } }; }
|
|
27773
27841
|
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; } }
|
|
27774
27842
|
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; }
|
|
@@ -27831,7 +27899,7 @@ function useFilterBoxData (id) {
|
|
|
27831
27899
|
} finally {
|
|
27832
27900
|
_iterator.f();
|
|
27833
27901
|
}
|
|
27834
|
-
return _objectSpread$
|
|
27902
|
+
return _objectSpread$d(_objectSpread$d({}, state), ob);
|
|
27835
27903
|
}
|
|
27836
27904
|
return {
|
|
27837
27905
|
configuration: configuration,
|
|
@@ -27845,8 +27913,8 @@ function useFilterBoxData (id) {
|
|
|
27845
27913
|
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; } } }; }
|
|
27846
27914
|
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; } }
|
|
27847
27915
|
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; }
|
|
27848
|
-
function ownKeys$
|
|
27849
|
-
function _objectSpread$
|
|
27916
|
+
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; }
|
|
27917
|
+
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; }
|
|
27850
27918
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
27851
27919
|
var id = _ref.id,
|
|
27852
27920
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -27874,7 +27942,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
27874
27942
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
27875
27943
|
mode: "single",
|
|
27876
27944
|
apiInterface: filter.requestOptions,
|
|
27877
|
-
wholeData: _objectSpread$
|
|
27945
|
+
wholeData: _objectSpread$c(_objectSpread$c({}, state.filter), {}, {
|
|
27878
27946
|
tab: tab
|
|
27879
27947
|
}),
|
|
27880
27948
|
mapping: filter.requestMapping,
|
|
@@ -28106,8 +28174,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
28106
28174
|
return false;
|
|
28107
28175
|
});
|
|
28108
28176
|
|
|
28109
|
-
function ownKeys$
|
|
28110
|
-
function _objectSpread$
|
|
28177
|
+
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; }
|
|
28178
|
+
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; }
|
|
28111
28179
|
function useUIBuilderData (id) {
|
|
28112
28180
|
var save = undefined;
|
|
28113
28181
|
var root = useStore();
|
|
@@ -28139,7 +28207,7 @@ function useUIBuilderData (id) {
|
|
|
28139
28207
|
var configuration = _useMemo.configuration;
|
|
28140
28208
|
useEffect(function () {
|
|
28141
28209
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
28142
|
-
return setFilter(_objectSpread$
|
|
28210
|
+
return setFilter(_objectSpread$b(_objectSpread$b({}, filter), {}, {
|
|
28143
28211
|
sessionGuid: res
|
|
28144
28212
|
}));
|
|
28145
28213
|
});
|
|
@@ -28162,8 +28230,8 @@ function useUIBuilderData (id) {
|
|
|
28162
28230
|
};
|
|
28163
28231
|
}
|
|
28164
28232
|
|
|
28165
|
-
function ownKeys$
|
|
28166
|
-
function _objectSpread$
|
|
28233
|
+
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; }
|
|
28234
|
+
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; }
|
|
28167
28235
|
function UIBuilder(_ref) {
|
|
28168
28236
|
var id = _ref.id;
|
|
28169
28237
|
var state = useUIBuilderData(id);
|
|
@@ -28190,7 +28258,7 @@ function UIBuilder(_ref) {
|
|
|
28190
28258
|
override = {
|
|
28191
28259
|
value: newFilter[item.field],
|
|
28192
28260
|
setValue: function setValue(newVal) {
|
|
28193
|
-
var newFilter = _objectSpread$
|
|
28261
|
+
var newFilter = _objectSpread$a({}, state.filter);
|
|
28194
28262
|
newFilter[item.field] = newVal;
|
|
28195
28263
|
state.setFilter(newFilter);
|
|
28196
28264
|
}
|
|
@@ -28238,7 +28306,7 @@ function UIBuilder(_ref) {
|
|
|
28238
28306
|
case 'AGGrid':
|
|
28239
28307
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
28240
28308
|
id: item.id,
|
|
28241
|
-
filter: _objectSpread$
|
|
28309
|
+
filter: _objectSpread$a({
|
|
28242
28310
|
optionCodices: JSON.stringify(state.data)
|
|
28243
28311
|
}, state.filter),
|
|
28244
28312
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -28398,8 +28466,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
28398
28466
|
};
|
|
28399
28467
|
var OrgItem$1 = observer(OrgItem);
|
|
28400
28468
|
|
|
28401
|
-
function ownKeys$
|
|
28402
|
-
function _objectSpread$
|
|
28469
|
+
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; }
|
|
28470
|
+
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; }
|
|
28403
28471
|
function useTransformJson (_ref) {
|
|
28404
28472
|
var id = _ref.id;
|
|
28405
28473
|
var _useState = useState(),
|
|
@@ -28465,7 +28533,7 @@ function useTransformJson (_ref) {
|
|
|
28465
28533
|
}();
|
|
28466
28534
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
28467
28535
|
var _data$children;
|
|
28468
|
-
return _objectSpread$
|
|
28536
|
+
return _objectSpread$9(_objectSpread$9({}, data), {}, {
|
|
28469
28537
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
28470
28538
|
data: data,
|
|
28471
28539
|
configuration: configuration,
|
|
@@ -28545,7 +28613,7 @@ var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
|
|
|
28545
28613
|
items: breadcrumbs.map(function (data) {
|
|
28546
28614
|
return {
|
|
28547
28615
|
key: data.id,
|
|
28548
|
-
|
|
28616
|
+
title: data.displayName,
|
|
28549
28617
|
onClick: function onClick() {
|
|
28550
28618
|
var _root$dataStore;
|
|
28551
28619
|
return root === null || root === void 0 || (_root$dataStore = root.dataStore) === null || _root$dataStore === void 0 ? void 0 : _root$dataStore.setSelectedOrganizationId(data.id);
|
|
@@ -29126,8 +29194,8 @@ function useCatalogEditor (id) {
|
|
|
29126
29194
|
};
|
|
29127
29195
|
}
|
|
29128
29196
|
|
|
29129
|
-
function ownKeys$
|
|
29130
|
-
function _objectSpread$
|
|
29197
|
+
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; }
|
|
29198
|
+
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; }
|
|
29131
29199
|
function DragDropUpload(_ref) {
|
|
29132
29200
|
var api2Params = _ref.api2Params,
|
|
29133
29201
|
catalogId = _ref.catalogId,
|
|
@@ -29232,7 +29300,7 @@ function DragDropUpload(_ref) {
|
|
|
29232
29300
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
29233
29301
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
29234
29302
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
29235
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
29303
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
29236
29304
|
children: [/*#__PURE__*/jsx("p", {
|
|
29237
29305
|
className: "ant-upload-drag-icon",
|
|
29238
29306
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -29449,17 +29517,17 @@ function CatalogEditor(_ref) {
|
|
|
29449
29517
|
}
|
|
29450
29518
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
29451
29519
|
|
|
29452
|
-
function ownKeys$
|
|
29453
|
-
function _objectSpread$
|
|
29454
|
-
function Spreadsheet (props) {
|
|
29520
|
+
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; }
|
|
29521
|
+
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; }
|
|
29522
|
+
function Spreadsheet$1 (props) {
|
|
29455
29523
|
var root = useStore();
|
|
29456
|
-
return /*#__PURE__*/jsx(Spreadsheet$
|
|
29524
|
+
return /*#__PURE__*/jsx(Spreadsheet$2, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
29457
29525
|
darkMode: root.contentStore.theme == 'darkmode',
|
|
29458
29526
|
jwt: root.dataStore.jwt
|
|
29459
29527
|
}));
|
|
29460
29528
|
}
|
|
29461
29529
|
|
|
29462
|
-
function useNavigation () {
|
|
29530
|
+
function useNavigation$1 () {
|
|
29463
29531
|
var root = useStore();
|
|
29464
29532
|
var _useSearchParams = useSearchParams(),
|
|
29465
29533
|
_useSearchParams2 = _slicedToArray(_useSearchParams, 1),
|
|
@@ -29486,11 +29554,103 @@ function useNavigation () {
|
|
|
29486
29554
|
};
|
|
29487
29555
|
}
|
|
29488
29556
|
|
|
29489
|
-
function
|
|
29557
|
+
function PublishCustomCell (_ref) {
|
|
29558
|
+
var data = _ref.data,
|
|
29559
|
+
apiConfig = _ref.apiConfig,
|
|
29560
|
+
context = _ref.context,
|
|
29561
|
+
api = _ref.api;
|
|
29562
|
+
var _useTranslation = useTranslation(),
|
|
29563
|
+
t = _useTranslation.t;
|
|
29564
|
+
var _React$useState = React.useState(false),
|
|
29565
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
29566
|
+
loading = _React$useState2[0],
|
|
29567
|
+
isLoading = _React$useState2[1];
|
|
29568
|
+
var unpublishedChanges = hasUnpublishedChanges(data.publishDate, data.lastUpdatedDate);
|
|
29569
|
+
var disabled = !data.basedCatalogId && !data.basedPackageId || !data.name;
|
|
29570
|
+
var _onChange = /*#__PURE__*/function () {
|
|
29571
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(publish) {
|
|
29572
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
29573
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29574
|
+
case 0:
|
|
29575
|
+
isLoading(true);
|
|
29576
|
+
if (!publish) {
|
|
29577
|
+
_context.next = 6;
|
|
29578
|
+
break;
|
|
29579
|
+
}
|
|
29580
|
+
_context.next = 4;
|
|
29581
|
+
return context === null || context === void 0 ? void 0 : context.updateServerData(data, {
|
|
29582
|
+
update: apiConfig.enricherService + '/packages/${_id}/publish',
|
|
29583
|
+
usePut: true
|
|
29584
|
+
});
|
|
29585
|
+
case 4:
|
|
29586
|
+
_context.next = 8;
|
|
29587
|
+
break;
|
|
29588
|
+
case 6:
|
|
29589
|
+
_context.next = 8;
|
|
29590
|
+
return context === null || context === void 0 ? void 0 : context.updateServerData(data, {
|
|
29591
|
+
update: apiConfig.enricherService + '/packages/${_id}/unpublish',
|
|
29592
|
+
usePut: true
|
|
29593
|
+
});
|
|
29594
|
+
case 8:
|
|
29595
|
+
context === null || context === void 0 || context.reset({
|
|
29596
|
+
context: context,
|
|
29597
|
+
api: api
|
|
29598
|
+
});
|
|
29599
|
+
isLoading(false);
|
|
29600
|
+
case 10:
|
|
29601
|
+
case "end":
|
|
29602
|
+
return _context.stop();
|
|
29603
|
+
}
|
|
29604
|
+
}, _callee);
|
|
29605
|
+
}));
|
|
29606
|
+
return function onChange(_x) {
|
|
29607
|
+
return _ref2.apply(this, arguments);
|
|
29608
|
+
};
|
|
29609
|
+
}();
|
|
29610
|
+
if (data.__isEmpty) return '';
|
|
29611
|
+
return /*#__PURE__*/jsx(Spin, {
|
|
29612
|
+
spinning: loading,
|
|
29613
|
+
children: /*#__PURE__*/jsxs(Space$1, {
|
|
29614
|
+
size: "middle",
|
|
29615
|
+
children: [/*#__PURE__*/jsx(Tooltip, {
|
|
29616
|
+
title: !!data.isPublished ? t('backoffice.idmEnricher.packages.label.unpublish') : t('backoffice.idmEnricher.packages.label.publish'),
|
|
29617
|
+
children: /*#__PURE__*/jsx(Checkbox$1, {
|
|
29618
|
+
checked: !!data.isPublished,
|
|
29619
|
+
disabled: disabled,
|
|
29620
|
+
indeterminate: unpublishedChanges,
|
|
29621
|
+
onChange: function onChange(e) {
|
|
29622
|
+
return _onChange(e.target.checked);
|
|
29623
|
+
}
|
|
29624
|
+
})
|
|
29625
|
+
}), unpublishedChanges && /*#__PURE__*/jsx(Tooltip, {
|
|
29626
|
+
title: t('backoffice.idmEnricher.packages.label.unpublishedChanges'),
|
|
29627
|
+
children: /*#__PURE__*/jsx(Button$1, {
|
|
29628
|
+
shape: "circle",
|
|
29629
|
+
icon: /*#__PURE__*/jsx(ReloadOutlined, {}),
|
|
29630
|
+
onClick: function onClick() {
|
|
29631
|
+
return _onChange(true);
|
|
29632
|
+
}
|
|
29633
|
+
})
|
|
29634
|
+
})]
|
|
29635
|
+
})
|
|
29636
|
+
});
|
|
29637
|
+
}
|
|
29638
|
+
function hasUnpublishedChanges(publishDateString, lastUpdatedDateString) {
|
|
29639
|
+
var publishDate = publishDateString ? new Date(publishDateString) : undefined;
|
|
29640
|
+
var lastUpdatedDate = lastUpdatedDateString ? new Date(lastUpdatedDateString) : undefined;
|
|
29641
|
+
if (publishDate) {
|
|
29642
|
+
if (lastUpdatedDate && publishDate < lastUpdatedDate) {
|
|
29643
|
+
return true;
|
|
29644
|
+
}
|
|
29645
|
+
}
|
|
29646
|
+
return false;
|
|
29647
|
+
}
|
|
29648
|
+
|
|
29649
|
+
function TablePackages () {
|
|
29490
29650
|
var root = useStore();
|
|
29491
29651
|
var _useTranslation = useTranslation(),
|
|
29492
29652
|
t = _useTranslation.t;
|
|
29493
|
-
var _useNavigation = useNavigation(),
|
|
29653
|
+
var _useNavigation = useNavigation$1(),
|
|
29494
29654
|
organizationId = _useNavigation.organizationId,
|
|
29495
29655
|
apiConfig = _useNavigation.apiConfig,
|
|
29496
29656
|
updateNavigation = _useNavigation.updateNavigation;
|
|
@@ -29501,12 +29661,12 @@ function TablePackages () {
|
|
|
29501
29661
|
}, [organizationId]);
|
|
29502
29662
|
useEffect(function () {
|
|
29503
29663
|
//remove the packages submenu when opening this module
|
|
29504
|
-
root.contentStore.removeAdditionalElement('
|
|
29664
|
+
root.contentStore.removeAdditionalElement('idmenricher');
|
|
29505
29665
|
}, []);
|
|
29506
29666
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
29507
29667
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
29508
29668
|
title: t('backoffice.menu.items.label.IDMEnricherTablePackages')
|
|
29509
|
-
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
29669
|
+
}), /*#__PURE__*/jsx(Spreadsheet$1, {
|
|
29510
29670
|
gridId: 'packages-grid',
|
|
29511
29671
|
applicationData: applicationData,
|
|
29512
29672
|
rowActions: [{
|
|
@@ -29519,39 +29679,13 @@ function TablePackages () {
|
|
|
29519
29679
|
var selectedNodes = _ref2.selectedNodes;
|
|
29520
29680
|
return !selectedNodes[0].data.basedCatalogId && !selectedNodes[0].data.basedPackageId || !selectedNodes[0].data.name;
|
|
29521
29681
|
}
|
|
29522
|
-
}, {
|
|
29523
|
-
icon: /*#__PURE__*/jsx(UploadOutlined$1, {}),
|
|
29524
|
-
name: t('backoffice.idmEnricher.packages.label.publish'),
|
|
29525
|
-
action: function () {
|
|
29526
|
-
var _action = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
|
|
29527
|
-
var selectedNodes, context;
|
|
29528
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
29529
|
-
while (1) switch (_context.prev = _context.next) {
|
|
29530
|
-
case 0:
|
|
29531
|
-
selectedNodes = _ref3.selectedNodes, context = _ref3.context;
|
|
29532
|
-
_context.next = 3;
|
|
29533
|
-
return context === null || context === void 0 ? void 0 : context.updateServerData(selectedNodes[0].data, {
|
|
29534
|
-
update: apiConfig.enricherService + '/packages/${_id}/publish',
|
|
29535
|
-
usePut: true
|
|
29536
|
-
});
|
|
29537
|
-
case 3:
|
|
29538
|
-
context === null || context === void 0 || context.reset();
|
|
29539
|
-
case 4:
|
|
29540
|
-
case "end":
|
|
29541
|
-
return _context.stop();
|
|
29542
|
-
}
|
|
29543
|
-
}, _callee);
|
|
29544
|
-
}));
|
|
29545
|
-
function action(_x) {
|
|
29546
|
-
return _action.apply(this, arguments);
|
|
29547
|
-
}
|
|
29548
|
-
return action;
|
|
29549
|
-
}(),
|
|
29550
|
-
disabled: function disabled(_ref4) {
|
|
29551
|
-
var selectedNodes = _ref4.selectedNodes;
|
|
29552
|
-
return !selectedNodes[0].data.basedCatalogId && !selectedNodes[0].data.basedPackageId || !selectedNodes[0].data.name;
|
|
29553
|
-
}
|
|
29554
29682
|
}],
|
|
29683
|
+
preFilter: {
|
|
29684
|
+
colId: 'organizationId',
|
|
29685
|
+
filterType: 'text',
|
|
29686
|
+
type: 'equals',
|
|
29687
|
+
filter: organizationId
|
|
29688
|
+
},
|
|
29555
29689
|
configuration: {
|
|
29556
29690
|
type: 'dotnetSSM',
|
|
29557
29691
|
apiInterface: {
|
|
@@ -29565,26 +29699,24 @@ function TablePackages () {
|
|
|
29565
29699
|
floatingFilter: true,
|
|
29566
29700
|
colDef: [{
|
|
29567
29701
|
field: 'isPublished',
|
|
29568
|
-
|
|
29569
|
-
valueGetter: function valueGetter(
|
|
29570
|
-
var
|
|
29571
|
-
|
|
29572
|
-
|
|
29573
|
-
|
|
29574
|
-
|
|
29575
|
-
|
|
29576
|
-
|
|
29702
|
+
//the cell should refresh on changes of this fields
|
|
29703
|
+
valueGetter: function valueGetter(_ref3) {
|
|
29704
|
+
var data = _ref3.data;
|
|
29705
|
+
return {
|
|
29706
|
+
isPublished: data === null || data === void 0 ? void 0 : data.isPublished,
|
|
29707
|
+
name: data === null || data === void 0 ? void 0 : data.name,
|
|
29708
|
+
basedCatalogId: data === null || data === void 0 ? void 0 : data.basedCatalogId,
|
|
29709
|
+
basedPackageId: data === null || data === void 0 ? void 0 : data.basedPackageId
|
|
29710
|
+
};
|
|
29577
29711
|
},
|
|
29578
|
-
|
|
29712
|
+
headerName: 'backoffice.idmEnricher.packages.label.published',
|
|
29713
|
+
cellRenderer: PublishCustomCell,
|
|
29579
29714
|
cellDataType: 'boolean',
|
|
29715
|
+
editable: false,
|
|
29580
29716
|
pinned: 'left',
|
|
29581
29717
|
lockPinned: true,
|
|
29582
|
-
|
|
29583
|
-
|
|
29584
|
-
disabled: true
|
|
29585
|
-
},
|
|
29586
|
-
tooltipValueGetter: function tooltipValueGetter(params) {
|
|
29587
|
-
return params.value == undefined ? t('backoffice.idmEnricher.packages.label.unpublishedChanges') : undefined;
|
|
29718
|
+
cellRendererParams: {
|
|
29719
|
+
apiConfig: apiConfig
|
|
29588
29720
|
}
|
|
29589
29721
|
}, {
|
|
29590
29722
|
headerName: 'backoffice.idmEnricher.packages.label.name',
|
|
@@ -29594,8 +29726,8 @@ function TablePackages () {
|
|
|
29594
29726
|
headerName: 'backoffice.idmEnricher.packages.label.catalogId',
|
|
29595
29727
|
field: 'basedCatalogId',
|
|
29596
29728
|
cellDataType: 'lookup',
|
|
29597
|
-
editable: function editable(
|
|
29598
|
-
var data =
|
|
29729
|
+
editable: function editable(_ref4) {
|
|
29730
|
+
var data = _ref4.data;
|
|
29599
29731
|
return !data.basedCatalogId && !data.basedPackageId;
|
|
29600
29732
|
},
|
|
29601
29733
|
customParams: {
|
|
@@ -29612,8 +29744,8 @@ function TablePackages () {
|
|
|
29612
29744
|
headerName: 'backoffice.idmEnricher.packages.label.packageId',
|
|
29613
29745
|
field: 'basedPackageId',
|
|
29614
29746
|
cellDataType: 'lookup',
|
|
29615
|
-
editable: function editable(
|
|
29616
|
-
var data =
|
|
29747
|
+
editable: function editable(_ref5) {
|
|
29748
|
+
var data = _ref5.data;
|
|
29617
29749
|
return !data.basedCatalogId && !data.basedPackageId;
|
|
29618
29750
|
},
|
|
29619
29751
|
customParams: {
|
|
@@ -29709,11 +29841,11 @@ function PackageSelector(_ref) {
|
|
|
29709
29841
|
});
|
|
29710
29842
|
}
|
|
29711
29843
|
|
|
29712
|
-
function useModule (currentModules) {
|
|
29844
|
+
function useModule$1 (currentModules) {
|
|
29713
29845
|
var root = useStore();
|
|
29714
29846
|
var _useTranslation = useTranslation(),
|
|
29715
29847
|
t = _useTranslation.t;
|
|
29716
|
-
var _useNavigation = useNavigation(),
|
|
29848
|
+
var _useNavigation = useNavigation$1(),
|
|
29717
29849
|
updateNavigation = _useNavigation.updateNavigation,
|
|
29718
29850
|
organizationId = _useNavigation.organizationId,
|
|
29719
29851
|
apiConfig = _useNavigation.apiConfig,
|
|
@@ -29759,7 +29891,7 @@ function useModule (currentModules) {
|
|
|
29759
29891
|
},
|
|
29760
29892
|
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
29761
29893
|
label: /*#__PURE__*/jsx(Link, {
|
|
29762
|
-
to: 'catalogs/packages/' + packageId + '/renaming/features' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29894
|
+
to: 'catalogs/idm/packages/' + packageId + '/renaming/features' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29763
29895
|
children: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingFeature')
|
|
29764
29896
|
})
|
|
29765
29897
|
}, {
|
|
@@ -29769,7 +29901,7 @@ function useModule (currentModules) {
|
|
|
29769
29901
|
},
|
|
29770
29902
|
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
29771
29903
|
label: /*#__PURE__*/jsx(Link, {
|
|
29772
|
-
to: 'catalogs/packages/' + packageId + '/renaming/options' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29904
|
+
to: 'catalogs/idm/packages/' + packageId + '/renaming/options' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29773
29905
|
children: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingOption')
|
|
29774
29906
|
})
|
|
29775
29907
|
}, {
|
|
@@ -29779,7 +29911,7 @@ function useModule (currentModules) {
|
|
|
29779
29911
|
},
|
|
29780
29912
|
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
29781
29913
|
label: /*#__PURE__*/jsx(Link, {
|
|
29782
|
-
to: 'catalogs/packages/' + packageId + '/renaming/items' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29914
|
+
to: 'catalogs/idm/packages/' + packageId + '/renaming/items' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29783
29915
|
children: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingItem')
|
|
29784
29916
|
})
|
|
29785
29917
|
}
|
|
@@ -29801,7 +29933,7 @@ function useModule (currentModules) {
|
|
|
29801
29933
|
},
|
|
29802
29934
|
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
29803
29935
|
label: /*#__PURE__*/jsx(Link, {
|
|
29804
|
-
to: 'catalogs/packages/' + packageId + '/tabgroups' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29936
|
+
to: 'catalogs/idm/packages/' + packageId + '/tabgroups' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29805
29937
|
children: t('backoffice.menu.items.label.IDMEnricherEditorTableTabGroups')
|
|
29806
29938
|
})
|
|
29807
29939
|
}, {
|
|
@@ -29831,7 +29963,7 @@ function useModule (currentModules) {
|
|
|
29831
29963
|
},
|
|
29832
29964
|
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
29833
29965
|
label: /*#__PURE__*/jsx(Link, {
|
|
29834
|
-
to: 'catalogs/packages/' + packageId + '/exclusivity/efeature' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29966
|
+
to: 'catalogs/idm/packages/' + packageId + '/exclusivity/efeature' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29835
29967
|
children: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingFeature')
|
|
29836
29968
|
})
|
|
29837
29969
|
}, {
|
|
@@ -29841,7 +29973,7 @@ function useModule (currentModules) {
|
|
|
29841
29973
|
},
|
|
29842
29974
|
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
29843
29975
|
label: /*#__PURE__*/jsx(Link, {
|
|
29844
|
-
to: 'catalogs/packages/' + packageId + '/exclusivity/eoption' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29976
|
+
to: 'catalogs/idm/packages/' + packageId + '/exclusivity/eoption' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29845
29977
|
children: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingOption')
|
|
29846
29978
|
})
|
|
29847
29979
|
}, {
|
|
@@ -29851,7 +29983,7 @@ function useModule (currentModules) {
|
|
|
29851
29983
|
},
|
|
29852
29984
|
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
29853
29985
|
label: /*#__PURE__*/jsx(Link, {
|
|
29854
|
-
to: 'catalogs/packages/' + packageId + '/exclusivity/eitem' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29986
|
+
to: 'catalogs/idm/packages/' + packageId + '/exclusivity/eitem' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29855
29987
|
children: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingItem')
|
|
29856
29988
|
})
|
|
29857
29989
|
}
|
|
@@ -29873,7 +30005,7 @@ function useModule (currentModules) {
|
|
|
29873
30005
|
},
|
|
29874
30006
|
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
29875
30007
|
label: /*#__PURE__*/jsx(Link, {
|
|
29876
|
-
to: 'catalogs/packages/' + packageId + '/properties' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
30008
|
+
to: 'catalogs/idm/packages/' + packageId + '/properties' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
29877
30009
|
children: t('backoffice.menu.items.label.IDMEnricherEditorTableProperties')
|
|
29878
30010
|
})
|
|
29879
30011
|
}];
|
|
@@ -29919,7 +30051,7 @@ function useModule (currentModules) {
|
|
|
29919
30051
|
function TableProperties () {
|
|
29920
30052
|
var _useTranslation = useTranslation(),
|
|
29921
30053
|
t = _useTranslation.t;
|
|
29922
|
-
var _useModule = useModule(['properties']),
|
|
30054
|
+
var _useModule = useModule$1(['properties']),
|
|
29923
30055
|
packageId = _useModule.packageId,
|
|
29924
30056
|
organizationId = _useModule.organizationId,
|
|
29925
30057
|
updateNavigation = _useModule.updateNavigation,
|
|
@@ -29946,7 +30078,7 @@ function TableProperties () {
|
|
|
29946
30078
|
})
|
|
29947
30079
|
})]
|
|
29948
30080
|
})
|
|
29949
|
-
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
30081
|
+
}), /*#__PURE__*/jsx(Spreadsheet$1, {
|
|
29950
30082
|
gridId: 'crud-grid_properties',
|
|
29951
30083
|
applicationData: applicationData,
|
|
29952
30084
|
configuration: {
|
|
@@ -30500,7 +30632,7 @@ function useConfiguration (configuration) {
|
|
|
30500
30632
|
};
|
|
30501
30633
|
}
|
|
30502
30634
|
|
|
30503
|
-
function PrefilterSelector (_ref) {
|
|
30635
|
+
function PrefilterSelector$1 (_ref) {
|
|
30504
30636
|
var type = _ref.type,
|
|
30505
30637
|
packageId = _ref.packageId,
|
|
30506
30638
|
selectedSerie = _ref.selectedSerie,
|
|
@@ -30576,7 +30708,7 @@ var RenamingTable = function RenamingTable(_ref) {
|
|
|
30576
30708
|
config = _ref.config;
|
|
30577
30709
|
var _useTranslation = useTranslation(),
|
|
30578
30710
|
t = _useTranslation.t;
|
|
30579
|
-
var _useModule = useModule(['renaming', type]),
|
|
30711
|
+
var _useModule = useModule$1(['renaming', type]),
|
|
30580
30712
|
packageId = _useModule.packageId,
|
|
30581
30713
|
updateNavigation = _useModule.updateNavigation,
|
|
30582
30714
|
apiConfig = _useModule.apiConfig;
|
|
@@ -30611,7 +30743,7 @@ var RenamingTable = function RenamingTable(_ref) {
|
|
|
30611
30743
|
return updateNavigation(id);
|
|
30612
30744
|
},
|
|
30613
30745
|
enricherService: apiConfig.enricherService
|
|
30614
|
-
}), /*#__PURE__*/jsx(PrefilterSelector, {
|
|
30746
|
+
}), /*#__PURE__*/jsx(PrefilterSelector$1, {
|
|
30615
30747
|
type: type == 'items' ? 'item' : type == 'options' ? 'option' : type,
|
|
30616
30748
|
packageId: packageId,
|
|
30617
30749
|
selectedSerie: selectedSerie,
|
|
@@ -30623,7 +30755,7 @@ var RenamingTable = function RenamingTable(_ref) {
|
|
|
30623
30755
|
})]
|
|
30624
30756
|
})]
|
|
30625
30757
|
})
|
|
30626
|
-
}), showTable() && /*#__PURE__*/jsx(Spreadsheet, {
|
|
30758
|
+
}), showTable() && /*#__PURE__*/jsx(Spreadsheet$1, {
|
|
30627
30759
|
gridId: 'renaming-grid_' + type + (type === 'options' ? '_' + (selectedFeature === null || selectedFeature === void 0 ? void 0 : selectedFeature.featureNo) : type === 'items' ? '_' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo) : ''),
|
|
30628
30760
|
applicationData: applicationData,
|
|
30629
30761
|
preFilter: type === 'options' && selectedFeature ? {
|
|
@@ -31050,7 +31182,7 @@ var ExclusivityTable = function ExclusivityTable(_ref) {
|
|
|
31050
31182
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
31051
31183
|
selectedFeature = _React$useState4[0],
|
|
31052
31184
|
setSelectedFeature = _React$useState4[1];
|
|
31053
|
-
var _useModule = useModule(['exclusivity', type]),
|
|
31185
|
+
var _useModule = useModule$1(['exclusivity', type]),
|
|
31054
31186
|
packageId = _useModule.packageId,
|
|
31055
31187
|
updateNavigation = _useModule.updateNavigation,
|
|
31056
31188
|
apiConfig = _useModule.apiConfig,
|
|
@@ -31086,7 +31218,7 @@ var ExclusivityTable = function ExclusivityTable(_ref) {
|
|
|
31086
31218
|
return updateNavigation(id);
|
|
31087
31219
|
},
|
|
31088
31220
|
enricherService: apiConfig.enricherService
|
|
31089
|
-
}), /*#__PURE__*/jsx(PrefilterSelector, {
|
|
31221
|
+
}), /*#__PURE__*/jsx(PrefilterSelector$1, {
|
|
31090
31222
|
type: type.slice(1) //remove the first character 'e' from the type
|
|
31091
31223
|
,
|
|
31092
31224
|
packageId: packageId,
|
|
@@ -31099,7 +31231,7 @@ var ExclusivityTable = function ExclusivityTable(_ref) {
|
|
|
31099
31231
|
})]
|
|
31100
31232
|
})]
|
|
31101
31233
|
})
|
|
31102
|
-
}), showTable() && /*#__PURE__*/jsx(Spreadsheet, {
|
|
31234
|
+
}), showTable() && /*#__PURE__*/jsx(Spreadsheet$1, {
|
|
31103
31235
|
gridId: 'crud-grid_exclusivity_' + type + ((_selectedSerie$series = selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.seriesName.DE) !== null && _selectedSerie$series !== void 0 ? _selectedSerie$series : ''),
|
|
31104
31236
|
applicationData: applicationData,
|
|
31105
31237
|
configuration: {
|
|
@@ -31140,7 +31272,7 @@ var ExclusivityTable = function ExclusivityTable(_ref) {
|
|
|
31140
31272
|
function TableTabGroups () {
|
|
31141
31273
|
var _useTranslation = useTranslation(),
|
|
31142
31274
|
t = _useTranslation.t;
|
|
31143
|
-
var _useModule = useModule(['tabgroups']),
|
|
31275
|
+
var _useModule = useModule$1(['tabgroups']),
|
|
31144
31276
|
packageId = _useModule.packageId,
|
|
31145
31277
|
updateNavigation = _useModule.updateNavigation,
|
|
31146
31278
|
apiConfig = _useModule.apiConfig,
|
|
@@ -31161,7 +31293,7 @@ function TableTabGroups () {
|
|
|
31161
31293
|
})
|
|
31162
31294
|
})]
|
|
31163
31295
|
})
|
|
31164
|
-
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
31296
|
+
}), /*#__PURE__*/jsx(Spreadsheet$1, {
|
|
31165
31297
|
gridId: 'crud-grid_tabgroups',
|
|
31166
31298
|
applicationData: {
|
|
31167
31299
|
organizationId: organizationId,
|
|
@@ -31261,10 +31393,10 @@ function IDMEnricherEditor (_ref) {
|
|
|
31261
31393
|
display: 'flex',
|
|
31262
31394
|
flexDirection: 'column'
|
|
31263
31395
|
},
|
|
31264
|
-
children: /*#__PURE__*/jsx(Content$
|
|
31396
|
+
children: /*#__PURE__*/jsx(Content$2, {})
|
|
31265
31397
|
});
|
|
31266
31398
|
}
|
|
31267
|
-
function Content$
|
|
31399
|
+
function Content$2() {
|
|
31268
31400
|
return /*#__PURE__*/jsxs(Routes, {
|
|
31269
31401
|
children: [/*#__PURE__*/jsx(Route, {
|
|
31270
31402
|
index: true,
|
|
@@ -31298,114 +31430,1340 @@ function Content$1() {
|
|
|
31298
31430
|
});
|
|
31299
31431
|
}
|
|
31300
31432
|
|
|
31301
|
-
function ownKeys$
|
|
31302
|
-
function _objectSpread$
|
|
31303
|
-
|
|
31304
|
-
var id = _ref.id;
|
|
31433
|
+
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; }
|
|
31434
|
+
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; }
|
|
31435
|
+
function Spreadsheet (props) {
|
|
31305
31436
|
var root = useStore();
|
|
31306
|
-
|
|
31307
|
-
|
|
31437
|
+
return /*#__PURE__*/jsx(Spreadsheet$2, _objectSpread$6(_objectSpread$6({}, props), {}, {
|
|
31438
|
+
darkMode: root.contentStore.theme == 'darkmode',
|
|
31439
|
+
jwt: root.dataStore.jwt
|
|
31440
|
+
}));
|
|
31441
|
+
}
|
|
31442
|
+
|
|
31443
|
+
function useNavigation () {
|
|
31444
|
+
var root = useStore();
|
|
31445
|
+
var _useSearchParams = useSearchParams(),
|
|
31446
|
+
_useSearchParams2 = _slicedToArray(_useSearchParams, 1),
|
|
31447
|
+
searchParams = _useSearchParams2[0];
|
|
31448
|
+
var navigate = useNavigate();
|
|
31449
|
+
var _useParams = useParams(),
|
|
31450
|
+
catalogId = _useParams.catalogId;
|
|
31451
|
+
|
|
31452
|
+
/**
|
|
31453
|
+
*
|
|
31454
|
+
* @param currentCatalog the current catalog id to be updated in the url
|
|
31455
|
+
* @param module the current module to be updated in the url
|
|
31456
|
+
* @param path a path string to change the relative path position, ie: '../../' to go up two level
|
|
31457
|
+
*/
|
|
31458
|
+
var updateNavigation = useCallback(function (currentCatalog, modules) {
|
|
31459
|
+
var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
31460
|
+
navigate(path + currentCatalog + '/' + modules.join('/') + (searchParams ? '?' + searchParams.toString() : ''));
|
|
31461
|
+
}, [searchParams]);
|
|
31462
|
+
return {
|
|
31463
|
+
updateNavigation: updateNavigation,
|
|
31464
|
+
organizationId: root.dataStore.organizationId,
|
|
31465
|
+
apiConfig: root.configurationStore.apiConfig,
|
|
31466
|
+
catalogId: catalogId
|
|
31467
|
+
};
|
|
31468
|
+
}
|
|
31469
|
+
|
|
31470
|
+
function TableCatalogs () {
|
|
31471
|
+
var root = useStore();
|
|
31472
|
+
var _useTranslation = useTranslation(),
|
|
31473
|
+
t = _useTranslation.t;
|
|
31474
|
+
var _useNavigation = useNavigation(),
|
|
31475
|
+
organizationId = _useNavigation.organizationId,
|
|
31476
|
+
apiConfig = _useNavigation.apiConfig,
|
|
31477
|
+
updateNavigation = _useNavigation.updateNavigation;
|
|
31478
|
+
var formatDic = {
|
|
31479
|
+
A: t('backoffice.idmCatalogEditor.items.label.arbeitsplattenhersteller'),
|
|
31480
|
+
B: t('backoffice.idmCatalogEditor.items.label.badmoebelhersteller'),
|
|
31481
|
+
G: t('backoffice.idmCatalogEditor.items.label.geraetehersteller'),
|
|
31482
|
+
K: t('backoffice.idmCatalogEditor.items.label.kuechenmöbelhersteller'),
|
|
31483
|
+
O: t('backoffice.idmCatalogEditor.items.label.bueromoebelhersteller'),
|
|
31484
|
+
P: t('backoffice.idmCatalogEditor.items.label.polstermoebelhersteller'),
|
|
31485
|
+
S: t('backoffice.idmCatalogEditor.items.label.sanitaerhersteller'),
|
|
31486
|
+
W: t('backoffice.idmCatalogEditor.items.label.wohnmoebelhersteller'),
|
|
31487
|
+
Z: t('backoffice.idmCatalogEditor.items.label.zubehoerhersteller')
|
|
31488
|
+
};
|
|
31489
|
+
var catalogMarkDic = {
|
|
31490
|
+
K: t('backoffice.idmCatalog.general.label.catalogMark.K'),
|
|
31491
|
+
B: t('backoffice.idmCatalog.general.label.catalogMark.B'),
|
|
31492
|
+
V: t('backoffice.idmCatalog.general.label.catalogMark.V'),
|
|
31493
|
+
F: t('backoffice.idmCatalog.general.label.catalogMark.F')
|
|
31494
|
+
};
|
|
31495
|
+
var formOfAddressDic = {
|
|
31496
|
+
1: t('backoffice.idmCatalog.general.label.formOfAddress.f1'),
|
|
31497
|
+
2: t('backoffice.idmCatalog.general.label.formOfAddress.f2')
|
|
31498
|
+
};
|
|
31499
|
+
var priceDependentDic = {
|
|
31500
|
+
0: t('backoffice.idmCatalog.general.label.priceDependent.p0'),
|
|
31501
|
+
1: t('backoffice.idmCatalog.general.label.priceDependent.p1')
|
|
31502
|
+
};
|
|
31503
|
+
var unitDic = {
|
|
31504
|
+
0: t('backoffice.idmCatalog.general.label.unit.u0'),
|
|
31505
|
+
1: t('backoffice.idmCatalog.general.label.unit.u1'),
|
|
31506
|
+
10: t('backoffice.idmCatalog.general.label.unit.u10'),
|
|
31507
|
+
100: t('backoffice.idmCatalog.general.label.unit.u100'),
|
|
31508
|
+
1000: t('backoffice.idmCatalog.general.label.unit.u1000'),
|
|
31509
|
+
1000000: t('backoffice.idmCatalog.general.label.unit.1u000000'),
|
|
31510
|
+
1000000000: t('backoffice.idmCatalog.general.label.unit.u1000000000')
|
|
31511
|
+
};
|
|
31512
|
+
var roundingTypeDic = {
|
|
31513
|
+
1: t('backoffice.idmCatalog.general.label.roundingType.r1'),
|
|
31514
|
+
2: t('backoffice.idmCatalog.general.label.roundingType.r2'),
|
|
31515
|
+
3: t('backoffice.idmCatalog.general.label.roundingType.r3')
|
|
31516
|
+
};
|
|
31517
|
+
var applicationData = useMemo(function () {
|
|
31308
31518
|
return {
|
|
31309
|
-
|
|
31310
|
-
configuration: configuration
|
|
31519
|
+
organizationId: organizationId
|
|
31311
31520
|
};
|
|
31312
|
-
}, [
|
|
31313
|
-
if (!current) {
|
|
31314
|
-
return null;
|
|
31315
|
-
}
|
|
31316
|
-
return /*#__PURE__*/jsxs(Layout.Content, {
|
|
31317
|
-
id: "contnet",
|
|
31318
|
-
style: {
|
|
31319
|
-
margin: 16,
|
|
31320
|
-
position: 'relative',
|
|
31321
|
-
minHeight: 'auto',
|
|
31322
|
-
height: 'calc(100% - 32px)'
|
|
31323
|
-
},
|
|
31324
|
-
children: [current.configuration.type !== 'Group' && /*#__PURE__*/jsx(ContentCard, {
|
|
31325
|
-
configId: current.id,
|
|
31326
|
-
type: current.configuration.type,
|
|
31327
|
-
inGroup: false
|
|
31328
|
-
}), current.configuration.type == 'Group' && /*#__PURE__*/jsx(Group, {
|
|
31329
|
-
id: current.id
|
|
31330
|
-
})]
|
|
31331
|
-
}, id + (root.dataStore.organizationId || ''));
|
|
31332
|
-
};
|
|
31333
|
-
var Group = observer(function (_ref2) {
|
|
31334
|
-
var _configuration$direct, _configuration$items;
|
|
31335
|
-
var id = _ref2.id;
|
|
31336
|
-
var root = useStore();
|
|
31337
|
-
var configuration = root.configurationStore.getConfiguration(id);
|
|
31338
|
-
if ((configuration === null || configuration === void 0 ? void 0 : configuration.type) != 'Group') {
|
|
31339
|
-
throw new Error("The Configuration with ID ".concat(id, " does either not exist or is not of the type 'Group'."));
|
|
31340
|
-
}
|
|
31521
|
+
}, [organizationId]);
|
|
31341
31522
|
useEffect(function () {
|
|
31342
|
-
|
|
31343
|
-
|
|
31344
|
-
};
|
|
31523
|
+
//remove the packages submenu when opening this module
|
|
31524
|
+
root.contentStore.removeAdditionalElement('idmenricher');
|
|
31345
31525
|
}, []);
|
|
31346
|
-
|
|
31347
|
-
|
|
31348
|
-
|
|
31349
|
-
|
|
31350
|
-
|
|
31351
|
-
|
|
31352
|
-
|
|
31353
|
-
|
|
31354
|
-
|
|
31355
|
-
|
|
31356
|
-
|
|
31357
|
-
|
|
31358
|
-
|
|
31359
|
-
|
|
31360
|
-
type:
|
|
31361
|
-
|
|
31362
|
-
|
|
31363
|
-
|
|
31364
|
-
|
|
31365
|
-
|
|
31366
|
-
}
|
|
31367
|
-
|
|
31368
|
-
|
|
31369
|
-
|
|
31370
|
-
|
|
31371
|
-
|
|
31372
|
-
|
|
31373
|
-
|
|
31374
|
-
|
|
31375
|
-
|
|
31376
|
-
|
|
31377
|
-
|
|
31378
|
-
|
|
31379
|
-
|
|
31380
|
-
|
|
31381
|
-
|
|
31382
|
-
|
|
31383
|
-
|
|
31384
|
-
|
|
31385
|
-
|
|
31386
|
-
|
|
31387
|
-
|
|
31388
|
-
|
|
31389
|
-
|
|
31390
|
-
|
|
31391
|
-
|
|
31392
|
-
|
|
31393
|
-
|
|
31394
|
-
|
|
31395
|
-
|
|
31396
|
-
|
|
31397
|
-
|
|
31398
|
-
|
|
31399
|
-
|
|
31400
|
-
|
|
31401
|
-
|
|
31402
|
-
|
|
31403
|
-
|
|
31404
|
-
|
|
31405
|
-
|
|
31406
|
-
|
|
31407
|
-
|
|
31408
|
-
|
|
31526
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
31527
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
31528
|
+
title: t('backoffice.menu.items.label.IDMEditorTableCatalogs')
|
|
31529
|
+
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
31530
|
+
gridId: 'catalogs-grid',
|
|
31531
|
+
applicationData: applicationData,
|
|
31532
|
+
rowActions: [{
|
|
31533
|
+
icon: /*#__PURE__*/jsx(EditOutlined, {}),
|
|
31534
|
+
action: function action(_ref) {
|
|
31535
|
+
var selectedNodes = _ref.selectedNodes;
|
|
31536
|
+
updateNavigation(selectedNodes[0].data._id, ['series']);
|
|
31537
|
+
}
|
|
31538
|
+
}],
|
|
31539
|
+
configuration: {
|
|
31540
|
+
type: 'dotnetSSM',
|
|
31541
|
+
apiInterface: {
|
|
31542
|
+
read: apiConfig.idmService + '/v3.0/catalogs?organizationId=${organizationId}',
|
|
31543
|
+
create: apiConfig.idmService + '/v3.0/catalogs',
|
|
31544
|
+
restore: apiConfig.idmService + '/v3.0/catalogs/${_id}',
|
|
31545
|
+
"delete": apiConfig.idmService + '/v3.0/catalogs/${_id}',
|
|
31546
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${_id}'
|
|
31547
|
+
},
|
|
31548
|
+
dateFormat: 'DD.MM.YYYY, HH:mm:ss',
|
|
31549
|
+
floatingFilter: true,
|
|
31550
|
+
colDef: [{
|
|
31551
|
+
headerName: 'backoffice.idmCatalog.packages.label.name',
|
|
31552
|
+
field: 'name',
|
|
31553
|
+
required: true
|
|
31554
|
+
}, {
|
|
31555
|
+
headerName: 'backoffice.idmCatalog.general.label.filename',
|
|
31556
|
+
field: 'filename',
|
|
31557
|
+
editable: false
|
|
31558
|
+
}, {
|
|
31559
|
+
headerName: 'backoffice.idmCatalog.general.label.filesize',
|
|
31560
|
+
field: 'size',
|
|
31561
|
+
cellDataType: 'number',
|
|
31562
|
+
editable: false
|
|
31563
|
+
}, {
|
|
31564
|
+
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
31565
|
+
field: '_id',
|
|
31566
|
+
editable: false,
|
|
31567
|
+
cellDataType: 'id'
|
|
31568
|
+
}, {
|
|
31569
|
+
headerName: 'backoffice.idmCatalog.general.label.hash',
|
|
31570
|
+
field: 'hash',
|
|
31571
|
+
editable: false
|
|
31572
|
+
}, {
|
|
31573
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
31574
|
+
field: 'lastUpdatedDate',
|
|
31575
|
+
cellDataType: 'dateString',
|
|
31576
|
+
editable: false
|
|
31577
|
+
}, {
|
|
31578
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
31579
|
+
field: 'lastUpdatedByDisplayText',
|
|
31580
|
+
editable: false
|
|
31581
|
+
}, {
|
|
31582
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
31583
|
+
field: 'createdDate',
|
|
31584
|
+
cellDataType: 'dateString',
|
|
31585
|
+
editable: false
|
|
31586
|
+
}, {
|
|
31587
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
31588
|
+
field: 'createdByDisplayText',
|
|
31589
|
+
editable: false
|
|
31590
|
+
}, {
|
|
31591
|
+
headerName: 'backoffice.idmCatalog.general.label.comment',
|
|
31592
|
+
field: 'comment'
|
|
31593
|
+
}, {
|
|
31594
|
+
headerName: 'backoffice.idmCatalog.general.label.version',
|
|
31595
|
+
children: [{
|
|
31596
|
+
headerName: 'backoffice.idmCatalog.general.label.major',
|
|
31597
|
+
field: 'major',
|
|
31598
|
+
cellDataType: 'number',
|
|
31599
|
+
editable: false
|
|
31600
|
+
}, {
|
|
31601
|
+
headerName: 'backoffice.idmCatalog.general.label.minor',
|
|
31602
|
+
field: 'minor',
|
|
31603
|
+
cellDataType: 'number',
|
|
31604
|
+
editable: false
|
|
31605
|
+
}, {
|
|
31606
|
+
headerName: 'backoffice.idmCatalog.general.label.revision',
|
|
31607
|
+
field: 'revision',
|
|
31608
|
+
cellDataType: 'number',
|
|
31609
|
+
editable: false
|
|
31610
|
+
}, {
|
|
31611
|
+
headerName: 'backoffice.idmCatalog.general.label.format',
|
|
31612
|
+
field: 'format',
|
|
31613
|
+
cellDataType: 'enum',
|
|
31614
|
+
customParams: {
|
|
31615
|
+
displayTexts: formatDic,
|
|
31616
|
+
values: Object.keys(formatDic),
|
|
31617
|
+
displayLabelTemplate: '${name} (${value})'
|
|
31618
|
+
}
|
|
31619
|
+
}]
|
|
31620
|
+
}, {
|
|
31621
|
+
headerName: 'backoffice.idmCatalog.general.label.catalog',
|
|
31622
|
+
children: [{
|
|
31623
|
+
field: 'isoLanguageIds',
|
|
31624
|
+
headerName: 'backoffice.idmCatalog.general.label.isoLanguageIds',
|
|
31625
|
+
cellDataType: 'enum',
|
|
31626
|
+
editable: true,
|
|
31627
|
+
required: true,
|
|
31628
|
+
customParams: {
|
|
31629
|
+
values: ['DE', 'EN', 'FR', 'IT'],
|
|
31630
|
+
multiSelect: true
|
|
31631
|
+
}
|
|
31632
|
+
}, {
|
|
31633
|
+
headerName: 'backoffice.idmCatalog.general.label.currencyKey',
|
|
31634
|
+
field: 'currencyKey'
|
|
31635
|
+
}, {
|
|
31636
|
+
headerName: 'backoffice.idmCatalog.general.label.catalogNumber',
|
|
31637
|
+
field: 'catalogNumber'
|
|
31638
|
+
}, {
|
|
31639
|
+
headerName: 'backoffice.idmCatalog.general.label.catalogName',
|
|
31640
|
+
marryChildren: true,
|
|
31641
|
+
children: [{
|
|
31642
|
+
field: 'catalogName.DE',
|
|
31643
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
31644
|
+
isDictionary: true
|
|
31645
|
+
}, {
|
|
31646
|
+
field: 'catalogName.EN',
|
|
31647
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
31648
|
+
isDictionary: true
|
|
31649
|
+
}, {
|
|
31650
|
+
field: 'catalogName.FR',
|
|
31651
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
31652
|
+
isDictionary: true
|
|
31653
|
+
}, {
|
|
31654
|
+
field: 'catalogName.IT',
|
|
31655
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
31656
|
+
isDictionary: true
|
|
31657
|
+
}]
|
|
31658
|
+
}, {
|
|
31659
|
+
headerName: 'backoffice.idmCatalog.general.label.validFromDate',
|
|
31660
|
+
field: 'validFromDate',
|
|
31661
|
+
cellDataType: 'dateString'
|
|
31662
|
+
}, {
|
|
31663
|
+
headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
|
|
31664
|
+
field: 'validUntilDate',
|
|
31665
|
+
cellDataType: 'dateString'
|
|
31666
|
+
}, {
|
|
31667
|
+
headerName: 'backoffice.idmCatalog.general.label.fileId',
|
|
31668
|
+
field: 'fileId',
|
|
31669
|
+
cellDataType: 'boolean'
|
|
31670
|
+
}, {
|
|
31671
|
+
headerName: 'backoffice.idmCatalog.general.label.catalogMark',
|
|
31672
|
+
field: 'catalogMark',
|
|
31673
|
+
cellDataType: 'enum',
|
|
31674
|
+
customParams: {
|
|
31675
|
+
displayTexts: catalogMarkDic,
|
|
31676
|
+
values: Object.keys(catalogMarkDic),
|
|
31677
|
+
displayLabelTemplate: '${name} (${value})'
|
|
31678
|
+
}
|
|
31679
|
+
}, {
|
|
31680
|
+
headerName: 'backoffice.idmCatalog.general.label.catalogMergeType',
|
|
31681
|
+
field: 'catalogMergeType',
|
|
31682
|
+
cellDataType: 'boolean'
|
|
31683
|
+
}, {
|
|
31684
|
+
headerName: 'backoffice.idmCatalog.general.label.catalogDataVersion',
|
|
31685
|
+
field: 'catalogDataVersion',
|
|
31686
|
+
cellDataType: 'dateString'
|
|
31687
|
+
}, {
|
|
31688
|
+
headerName: 'backoffice.idmCatalog.general.label.catalogInfo',
|
|
31689
|
+
marryChildren: true,
|
|
31690
|
+
children: [{
|
|
31691
|
+
field: 'catalogInfo.DE',
|
|
31692
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
31693
|
+
isDictionary: true
|
|
31694
|
+
}, {
|
|
31695
|
+
field: 'catalogInfo.EN',
|
|
31696
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
31697
|
+
isDictionary: true
|
|
31698
|
+
}, {
|
|
31699
|
+
field: 'catalogInfo.FR',
|
|
31700
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
31701
|
+
isDictionary: true
|
|
31702
|
+
}, {
|
|
31703
|
+
field: 'catalogInfo.IT',
|
|
31704
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
31705
|
+
isDictionary: true
|
|
31706
|
+
}]
|
|
31707
|
+
}, {
|
|
31708
|
+
headerName: 'backoffice.idmCatalog.general.label.fallbackLanguage',
|
|
31709
|
+
field: 'fallbackLanguage'
|
|
31710
|
+
}]
|
|
31711
|
+
}, {
|
|
31712
|
+
headerName: 'backoffice.idmCatalog.general.label.identity',
|
|
31713
|
+
children: [{
|
|
31714
|
+
headerName: 'backoffice.idmCatalog.general.label.dataVersion',
|
|
31715
|
+
field: 'dataVersion',
|
|
31716
|
+
cellDataType: 'dateString'
|
|
31717
|
+
}, {
|
|
31718
|
+
field: 'catalogId',
|
|
31719
|
+
headerName: 'backoffice.idmCatalog.general.label.catalogId',
|
|
31720
|
+
required: true
|
|
31721
|
+
}, {
|
|
31722
|
+
field: 'catalogVersion',
|
|
31723
|
+
headerName: 'backoffice.idmCatalog.general.label.catalogVersion',
|
|
31724
|
+
cellDataType: 'number'
|
|
31725
|
+
}]
|
|
31726
|
+
}, {
|
|
31727
|
+
headerName: 'backoffice.idmCatalog.general.label.supplier',
|
|
31728
|
+
children: [{
|
|
31729
|
+
headerName: 'backoffice.idmCatalog.general.label.isoCountryId',
|
|
31730
|
+
field: 'isoCountryId'
|
|
31731
|
+
}, {
|
|
31732
|
+
field: 'glnNo',
|
|
31733
|
+
headerName: 'backoffice.idmCatalog.general.label.glnNo'
|
|
31734
|
+
}, {
|
|
31735
|
+
field: 'weeeNo',
|
|
31736
|
+
headerName: 'backoffice.idmCatalog.general.label.weeeNo'
|
|
31737
|
+
}, {
|
|
31738
|
+
headerName: 'backoffice.idmCatalog.general.label.manufacturerName1',
|
|
31739
|
+
field: 'manufacturerName1'
|
|
31740
|
+
}, {
|
|
31741
|
+
headerName: 'backoffice.idmCatalog.general.label.manufacturerName2',
|
|
31742
|
+
field: 'manufacturerName2'
|
|
31743
|
+
}, {
|
|
31744
|
+
headerName: 'backoffice.idmCatalog.general.label.email',
|
|
31745
|
+
field: 'email'
|
|
31746
|
+
}, {
|
|
31747
|
+
headerName: 'backoffice.idmCatalog.general.label.internetAddress',
|
|
31748
|
+
field: 'internetAddress'
|
|
31749
|
+
}, {
|
|
31750
|
+
headerName: 'backoffice.idmCatalog.general.label.street',
|
|
31751
|
+
field: 'street'
|
|
31752
|
+
}, {
|
|
31753
|
+
headerName: 'backoffice.idmCatalog.general.label.zipCodeStreet',
|
|
31754
|
+
field: 'zipCodeStreet'
|
|
31755
|
+
}, {
|
|
31756
|
+
headerName: 'backoffice.idmCatalog.general.label.city',
|
|
31757
|
+
field: 'city'
|
|
31758
|
+
}, {
|
|
31759
|
+
headerName: 'backoffice.idmCatalog.general.label.zipCodePostBox',
|
|
31760
|
+
field: 'zipCodePostBox'
|
|
31761
|
+
}, {
|
|
31762
|
+
headerName: 'backoffice.idmCatalog.general.label.postBox',
|
|
31763
|
+
field: 'postBox'
|
|
31764
|
+
}, {
|
|
31765
|
+
headerName: 'backoffice.idmCatalog.general.label.telephoneSwitchBoard',
|
|
31766
|
+
field: 'telephoneSwitchBoard'
|
|
31767
|
+
}, {
|
|
31768
|
+
headerName: 'backoffice.idmCatalog.general.label.faxSwitchBoard',
|
|
31769
|
+
field: 'faxSwitchBoard'
|
|
31770
|
+
}]
|
|
31771
|
+
}, {
|
|
31772
|
+
headerName: 'backoffice.idmCatalog.general.label.contact1',
|
|
31773
|
+
children: [{
|
|
31774
|
+
headerName: 'backoffice.idmCatalog.general.label.contactPersonNo',
|
|
31775
|
+
field: 'contactPersonNo1'
|
|
31776
|
+
}, {
|
|
31777
|
+
headerName: 'backoffice.idmCatalog.general.label.contactRole',
|
|
31778
|
+
field: 'contactRole1'
|
|
31779
|
+
}, {
|
|
31780
|
+
headerName: 'backoffice.idmCatalog.general.label.contactName',
|
|
31781
|
+
field: 'contactName1'
|
|
31782
|
+
}, {
|
|
31783
|
+
headerName: 'backoffice.idmCatalog.general.label.firstName',
|
|
31784
|
+
field: 'firstName1'
|
|
31785
|
+
}, {
|
|
31786
|
+
headerName: 'backoffice.idmCatalog.general.label.formOfAddress',
|
|
31787
|
+
field: 'formOfAddress1',
|
|
31788
|
+
cellDataType: 'enum',
|
|
31789
|
+
customParams: {
|
|
31790
|
+
displayTexts: formOfAddressDic,
|
|
31791
|
+
values: Object.keys(formOfAddressDic),
|
|
31792
|
+
displayLabelTemplate: '${name} (${value})'
|
|
31793
|
+
}
|
|
31794
|
+
}, {
|
|
31795
|
+
headerName: 'backoffice.idmCatalog.general.label.department',
|
|
31796
|
+
field: 'department1'
|
|
31797
|
+
}, {
|
|
31798
|
+
headerName: 'backoffice.idmCatalog.general.label.telephone',
|
|
31799
|
+
field: 'telephone1'
|
|
31800
|
+
}, {
|
|
31801
|
+
headerName: 'backoffice.idmCatalog.general.label.fax',
|
|
31802
|
+
field: 'fax1'
|
|
31803
|
+
}, {
|
|
31804
|
+
headerName: 'backoffice.idmCatalog.general.label.email',
|
|
31805
|
+
field: 'email1'
|
|
31806
|
+
}, {
|
|
31807
|
+
headerName: 'backoffice.idmCatalog.general.label.street',
|
|
31808
|
+
field: 'street1'
|
|
31809
|
+
}, {
|
|
31810
|
+
headerName: 'backoffice.idmCatalog.general.label.zipCodeStreet',
|
|
31811
|
+
field: 'zipCodeStreet1'
|
|
31812
|
+
}, {
|
|
31813
|
+
headerName: 'backoffice.idmCatalog.general.label.city',
|
|
31814
|
+
field: 'city1'
|
|
31815
|
+
}, {
|
|
31816
|
+
headerName: 'backoffice.idmCatalog.general.label.isoCountryId',
|
|
31817
|
+
field: 'isoCountryId1'
|
|
31818
|
+
}]
|
|
31819
|
+
}, {
|
|
31820
|
+
headerName: 'backoffice.idmCatalog.general.label.contact2',
|
|
31821
|
+
children: [{
|
|
31822
|
+
headerName: 'backoffice.idmCatalog.general.label.contactPersonNo',
|
|
31823
|
+
field: 'contactPersonNo1'
|
|
31824
|
+
}, {
|
|
31825
|
+
headerName: 'backoffice.idmCatalog.general.label.contactName',
|
|
31826
|
+
field: 'contactName2'
|
|
31827
|
+
}, {
|
|
31828
|
+
headerName: 'backoffice.idmCatalog.general.label.firstName',
|
|
31829
|
+
field: 'firstName2'
|
|
31830
|
+
}, {
|
|
31831
|
+
headerName: 'backoffice.idmCatalog.general.label.formOfAddress',
|
|
31832
|
+
field: 'formOfAddress2',
|
|
31833
|
+
cellDataType: 'enum',
|
|
31834
|
+
customParams: {
|
|
31835
|
+
displayTexts: formOfAddressDic,
|
|
31836
|
+
values: Object.keys(formOfAddressDic),
|
|
31837
|
+
displayLabelTemplate: '${name} (${value})'
|
|
31838
|
+
}
|
|
31839
|
+
}, {
|
|
31840
|
+
headerName: 'backoffice.idmCatalog.general.label.department',
|
|
31841
|
+
field: 'department2'
|
|
31842
|
+
}, {
|
|
31843
|
+
headerName: 'backoffice.idmCatalog.general.label.telephone',
|
|
31844
|
+
field: 'telephone2'
|
|
31845
|
+
}, {
|
|
31846
|
+
headerName: 'backoffice.idmCatalog.general.label.fax',
|
|
31847
|
+
field: 'fax2'
|
|
31848
|
+
}, {
|
|
31849
|
+
headerName: 'backoffice.idmCatalog.general.label.email',
|
|
31850
|
+
field: 'email2'
|
|
31851
|
+
}, {
|
|
31852
|
+
headerName: 'backoffice.idmCatalog.general.label.street',
|
|
31853
|
+
field: 'street2'
|
|
31854
|
+
}, {
|
|
31855
|
+
headerName: 'backoffice.idmCatalog.general.label.zipCodeStreet',
|
|
31856
|
+
field: 'zipCodeStreet2'
|
|
31857
|
+
}, {
|
|
31858
|
+
headerName: 'backoffice.idmCatalog.general.label.city',
|
|
31859
|
+
field: 'city2'
|
|
31860
|
+
}, {
|
|
31861
|
+
headerName: 'backoffice.idmCatalog.general.label.isoCountryId',
|
|
31862
|
+
field: 'isoCountryId2'
|
|
31863
|
+
}]
|
|
31864
|
+
}, {
|
|
31865
|
+
headerName: 'backoffice.idmCatalog.general.label.priceSettings',
|
|
31866
|
+
children: [{
|
|
31867
|
+
headerName: 'backoffice.idmCatalog.general.label.priceTypeNo',
|
|
31868
|
+
field: 'priceTypeNo',
|
|
31869
|
+
cellDataType: 'number'
|
|
31870
|
+
}, {
|
|
31871
|
+
headerName: 'backoffice.idmCatalog.general.label.widthX',
|
|
31872
|
+
field: 'widthX',
|
|
31873
|
+
cellDataType: 'enum',
|
|
31874
|
+
customParams: {
|
|
31875
|
+
displayTexts: priceDependentDic,
|
|
31876
|
+
values: Object.keys(priceDependentDic),
|
|
31877
|
+
displayLabelTemplate: '${name} (${value})'
|
|
31878
|
+
}
|
|
31879
|
+
}, {
|
|
31880
|
+
headerName: 'backoffice.idmCatalog.general.label.depthY',
|
|
31881
|
+
field: 'depthY',
|
|
31882
|
+
cellDataType: 'enum',
|
|
31883
|
+
customParams: {
|
|
31884
|
+
displayTexts: priceDependentDic,
|
|
31885
|
+
values: Object.keys(priceDependentDic),
|
|
31886
|
+
displayLabelTemplate: '${name} (${value})'
|
|
31887
|
+
}
|
|
31888
|
+
}, {
|
|
31889
|
+
headerName: 'backoffice.idmCatalog.general.label.heightZ',
|
|
31890
|
+
field: 'heightZ',
|
|
31891
|
+
cellDataType: 'enum',
|
|
31892
|
+
customParams: {
|
|
31893
|
+
displayTexts: priceDependentDic,
|
|
31894
|
+
values: Object.keys(priceDependentDic),
|
|
31895
|
+
displayLabelTemplate: '${name} (${value})'
|
|
31896
|
+
}
|
|
31897
|
+
}, {
|
|
31898
|
+
headerName: 'backoffice.idmCatalog.general.label.basicUnit',
|
|
31899
|
+
field: 'basicUnit',
|
|
31900
|
+
cellDataType: 'enum',
|
|
31901
|
+
customParams: {
|
|
31902
|
+
displayTexts: unitDic,
|
|
31903
|
+
values: Object.keys(unitDic),
|
|
31904
|
+
displayLabelTemplate: '${name} (${value})'
|
|
31905
|
+
}
|
|
31906
|
+
}, {
|
|
31907
|
+
headerName: 'backoffice.idmCatalog.general.label.roundingUnit',
|
|
31908
|
+
field: 'roundingUnit',
|
|
31909
|
+
cellDataType: 'enum',
|
|
31910
|
+
customParams: {
|
|
31911
|
+
displayTexts: unitDic,
|
|
31912
|
+
values: Object.keys(unitDic),
|
|
31913
|
+
displayLabelTemplate: '${name} (${value})'
|
|
31914
|
+
}
|
|
31915
|
+
}, {
|
|
31916
|
+
headerName: 'backoffice.idmCatalog.general.label.roundingType',
|
|
31917
|
+
field: 'roundingType',
|
|
31918
|
+
cellDataType: 'enum',
|
|
31919
|
+
customParams: {
|
|
31920
|
+
displayTexts: roundingTypeDic,
|
|
31921
|
+
values: Object.keys(roundingTypeDic),
|
|
31922
|
+
displayLabelTemplate: '${name} (${value})'
|
|
31923
|
+
}
|
|
31924
|
+
}, {
|
|
31925
|
+
headerName: 'backoffice.idmCatalog.general.label.basicPriceDependent',
|
|
31926
|
+
field: 'basicPriceDependent',
|
|
31927
|
+
cellDataType: 'boolean'
|
|
31928
|
+
}, {
|
|
31929
|
+
headerName: 'backoffice.idmCatalog.general.label.priceTypeFormula',
|
|
31930
|
+
field: 'priceTypeFormula'
|
|
31931
|
+
}, {
|
|
31932
|
+
headerName: 'backoffice.idmCatalog.general.label.priceTypeName',
|
|
31933
|
+
marryChildren: true,
|
|
31934
|
+
children: [{
|
|
31935
|
+
field: 'priceTypeName.DE',
|
|
31936
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
31937
|
+
isDictionary: true
|
|
31938
|
+
}, {
|
|
31939
|
+
field: 'priceTypeName.EN',
|
|
31940
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
31941
|
+
isDictionary: true
|
|
31942
|
+
}, {
|
|
31943
|
+
field: 'priceTypeName.FR',
|
|
31944
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
31945
|
+
isDictionary: true
|
|
31946
|
+
}, {
|
|
31947
|
+
field: 'priceTypeName.IT',
|
|
31948
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
31949
|
+
isDictionary: true
|
|
31950
|
+
}]
|
|
31951
|
+
}, {
|
|
31952
|
+
headerName: 'backoffice.idmCatalog.general.label.priceTypeRules',
|
|
31953
|
+
field: 'priceTypeRules',
|
|
31954
|
+
cellDataType: 'array',
|
|
31955
|
+
cellRenderer: function cellRenderer(params) {
|
|
31956
|
+
var _params$value;
|
|
31957
|
+
return Array.isArray(params.value) ? (_params$value = params.value) === null || _params$value === void 0 ? void 0 : _params$value.join('; ') : params.value;
|
|
31958
|
+
}
|
|
31959
|
+
}]
|
|
31960
|
+
}]
|
|
31961
|
+
}
|
|
31962
|
+
})]
|
|
31963
|
+
});
|
|
31964
|
+
}
|
|
31965
|
+
|
|
31966
|
+
function CatalogSelector(_ref) {
|
|
31967
|
+
var selectedCatalog = _ref.selectedCatalog,
|
|
31968
|
+
setSelectedCatalog = _ref.setSelectedCatalog,
|
|
31969
|
+
idmService = _ref.idmService;
|
|
31970
|
+
var _useTranslation = useTranslation(),
|
|
31971
|
+
t = _useTranslation.t;
|
|
31972
|
+
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
31973
|
+
apiInterface: {
|
|
31974
|
+
read: idmService + '/v3.0/catalogs'
|
|
31975
|
+
},
|
|
31976
|
+
apiMapping: {
|
|
31977
|
+
type: 'query',
|
|
31978
|
+
map: [{
|
|
31979
|
+
globalValue: 'organizationId',
|
|
31980
|
+
targetField: 'organizationId'
|
|
31981
|
+
}]
|
|
31982
|
+
},
|
|
31983
|
+
selectMapping: {
|
|
31984
|
+
label: '${name}',
|
|
31985
|
+
value: '${_id}'
|
|
31986
|
+
},
|
|
31987
|
+
title: t('backoffice.menu.items.label.IDMEditorTableCatalogs'),
|
|
31988
|
+
value: {
|
|
31989
|
+
_id: selectedCatalog
|
|
31990
|
+
},
|
|
31991
|
+
onChange: function onChange(value) {
|
|
31992
|
+
return setSelectedCatalog(value._id);
|
|
31993
|
+
},
|
|
31994
|
+
search: true,
|
|
31995
|
+
style: {
|
|
31996
|
+
width: 200
|
|
31997
|
+
}
|
|
31998
|
+
});
|
|
31999
|
+
}
|
|
32000
|
+
|
|
32001
|
+
function PrefilterSelector (_ref) {
|
|
32002
|
+
var type = _ref.type,
|
|
32003
|
+
catalogId = _ref.catalogId,
|
|
32004
|
+
selectedSerie = _ref.selectedSerie,
|
|
32005
|
+
setSelectedSerie = _ref.setSelectedSerie,
|
|
32006
|
+
selectedFeature = _ref.selectedFeature,
|
|
32007
|
+
setSelectedFeature = _ref.setSelectedFeature,
|
|
32008
|
+
idmService = _ref.idmService;
|
|
32009
|
+
var _useTranslation = useTranslation(),
|
|
32010
|
+
t = _useTranslation.t,
|
|
32011
|
+
i18n = _useTranslation.i18n;
|
|
32012
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
32013
|
+
children: [type === 'item' && /*#__PURE__*/jsx(SimpleSelect, {
|
|
32014
|
+
apiInterface: {
|
|
32015
|
+
read: idmService + '/v3.0/catalogs/' + catalogId + '/series'
|
|
32016
|
+
},
|
|
32017
|
+
selectMapping: {
|
|
32018
|
+
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
|
32019
|
+
value: '${_id}'
|
|
32020
|
+
},
|
|
32021
|
+
autoSelectFirst: true,
|
|
32022
|
+
title: t('backoffice.menu.items.label.IDMCatalogEditorTableSeries'),
|
|
32023
|
+
value: selectedSerie,
|
|
32024
|
+
onChange: function onChange(value) {
|
|
32025
|
+
return setSelectedSerie ? setSelectedSerie(value) : null;
|
|
32026
|
+
},
|
|
32027
|
+
search: true,
|
|
32028
|
+
style: {
|
|
32029
|
+
width: 200
|
|
32030
|
+
}
|
|
32031
|
+
}), type === 'option' && /*#__PURE__*/jsx(SimpleSelect, {
|
|
32032
|
+
apiInterface: {
|
|
32033
|
+
read: idmService + '/v3.0/catalogs/' + catalogId + '/features'
|
|
32034
|
+
},
|
|
32035
|
+
selectMapping: {
|
|
32036
|
+
label: "${featureText.".concat(i18n.language.toLocaleUpperCase(), "} (${featureNo})"),
|
|
32037
|
+
value: '${_id}'
|
|
32038
|
+
},
|
|
32039
|
+
autoSelectFirst: true,
|
|
32040
|
+
title: t('backoffice.menu.items.label.IDMCatalogEditorTable.serie'),
|
|
32041
|
+
value: selectedFeature,
|
|
32042
|
+
onChange: function onChange(value) {
|
|
32043
|
+
return setSelectedFeature ? setSelectedFeature(value) : null;
|
|
32044
|
+
},
|
|
32045
|
+
search: true,
|
|
32046
|
+
style: {
|
|
32047
|
+
width: 200
|
|
32048
|
+
}
|
|
32049
|
+
})]
|
|
32050
|
+
});
|
|
32051
|
+
}
|
|
32052
|
+
|
|
32053
|
+
function useModule (currentModules) {
|
|
32054
|
+
var root = useStore();
|
|
32055
|
+
var _useTranslation = useTranslation(),
|
|
32056
|
+
t = _useTranslation.t;
|
|
32057
|
+
var _useNavigation = useNavigation(),
|
|
32058
|
+
updateNavigation = _useNavigation.updateNavigation,
|
|
32059
|
+
organizationId = _useNavigation.organizationId,
|
|
32060
|
+
apiConfig = _useNavigation.apiConfig,
|
|
32061
|
+
catalogId = _useNavigation.catalogId;
|
|
32062
|
+
var location = useLocation();
|
|
32063
|
+
var _useSearchParams = useSearchParams(),
|
|
32064
|
+
_useSearchParams2 = _slicedToArray(_useSearchParams, 1),
|
|
32065
|
+
searchParams = _useSearchParams2[0];
|
|
32066
|
+
var menuItems = useMemo(function () {
|
|
32067
|
+
return [{
|
|
32068
|
+
key: 'series',
|
|
32069
|
+
style: {
|
|
32070
|
+
margin: 0
|
|
32071
|
+
},
|
|
32072
|
+
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
32073
|
+
label: /*#__PURE__*/jsx(Link, {
|
|
32074
|
+
to: 'catalogs/idmeditor/catalogs/' + catalogId + '/series' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
32075
|
+
children: t('backoffice.menu.items.label.IDMCatalogEditorTableSeries')
|
|
32076
|
+
})
|
|
32077
|
+
}, {
|
|
32078
|
+
key: 'items',
|
|
32079
|
+
style: {
|
|
32080
|
+
margin: 0
|
|
32081
|
+
},
|
|
32082
|
+
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
32083
|
+
label: /*#__PURE__*/jsx(Link, {
|
|
32084
|
+
to: 'catalogs/idmeditor/catalogs/' + catalogId + '/items' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
32085
|
+
children: t('backoffice.menu.items.label.IDMCatalogEditorTableItems')
|
|
32086
|
+
})
|
|
32087
|
+
}];
|
|
32088
|
+
}, [catalogId]);
|
|
32089
|
+
if (!catalogId) throw new Error('catalogId is required');
|
|
32090
|
+
var updateNavigationModule = useCallback(function (currentCatalog) {
|
|
32091
|
+
var modules = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : currentModules;
|
|
32092
|
+
updateNavigation(currentCatalog, modules, '../');
|
|
32093
|
+
}, [updateNavigation]);
|
|
32094
|
+
useEffect(function () {
|
|
32095
|
+
root.contentStore.updateAdditionalElement('catalogs', menuItems, currentModules);
|
|
32096
|
+
}, [menuItems, location.pathname]);
|
|
32097
|
+
|
|
32098
|
+
//updating tools
|
|
32099
|
+
|
|
32100
|
+
useEffect(function () {
|
|
32101
|
+
var tools = [];
|
|
32102
|
+
if (catalogId) tools.push({
|
|
32103
|
+
name: 'Konfigurator',
|
|
32104
|
+
parameters: {
|
|
32105
|
+
packageId: catalogId
|
|
32106
|
+
},
|
|
32107
|
+
type: 'Configurator',
|
|
32108
|
+
id: 'WYSIWYG',
|
|
32109
|
+
startWidth: 600,
|
|
32110
|
+
defaultPinned: true
|
|
32111
|
+
});
|
|
32112
|
+
root.contentStore.tools = tools;
|
|
32113
|
+
return function () {
|
|
32114
|
+
root.contentStore.tools = [];
|
|
32115
|
+
};
|
|
32116
|
+
}, [catalogId]);
|
|
32117
|
+
return {
|
|
32118
|
+
updateNavigation: updateNavigationModule,
|
|
32119
|
+
organizationId: organizationId,
|
|
32120
|
+
apiConfig: apiConfig,
|
|
32121
|
+
catalogId: catalogId
|
|
32122
|
+
};
|
|
32123
|
+
}
|
|
32124
|
+
|
|
32125
|
+
function TableItems () {
|
|
32126
|
+
var _useTranslation = useTranslation(),
|
|
32127
|
+
t = _useTranslation.t;
|
|
32128
|
+
var _useModule = useModule(['items']),
|
|
32129
|
+
catalogId = _useModule.catalogId,
|
|
32130
|
+
updateNavigation = _useModule.updateNavigation,
|
|
32131
|
+
apiConfig = _useModule.apiConfig,
|
|
32132
|
+
organizationId = _useModule.organizationId;
|
|
32133
|
+
var _React$useState = React.useState(),
|
|
32134
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
32135
|
+
selectedSerie = _React$useState2[0],
|
|
32136
|
+
setSelectedSerie = _React$useState2[1];
|
|
32137
|
+
var itemIdentificationDic = {
|
|
32138
|
+
K: t('backoffice.idmCatalogEditor.items.label.catalogArticle'),
|
|
32139
|
+
1: t('backoffice.idmCatalogEditor.items.label.planningAdvice'),
|
|
32140
|
+
2: t('backoffice.idmCatalogEditor.items.label.combination')
|
|
32141
|
+
};
|
|
32142
|
+
var typeKeyDic = {
|
|
32143
|
+
1: t('backoffice.idmCatalogEditor.items.label.sessel'),
|
|
32144
|
+
2: t('backoffice.idmCatalogEditor.items.label.clubchair'),
|
|
32145
|
+
3: t('backoffice.idmCatalogEditor.items.label.relaxSessel'),
|
|
32146
|
+
4: t('backoffice.idmCatalogEditor.items.label.longChair'),
|
|
32147
|
+
5: t('backoffice.idmCatalogEditor.items.label.sofa'),
|
|
32148
|
+
6: t('backoffice.idmCatalogEditor.items.label.zwischenlement'),
|
|
32149
|
+
7: t('backoffice.idmCatalogEditor.items.label.eckelement'),
|
|
32150
|
+
8: t('backoffice.idmCatalogEditor.items.label.einzelliege'),
|
|
32151
|
+
9: t('backoffice.idmCatalogEditor.items.label.hocker'),
|
|
32152
|
+
10: t('backoffice.idmCatalogEditor.items.label.kissen'),
|
|
32153
|
+
11: t('backoffice.idmCatalogEditor.items.label.anstelltisch'),
|
|
32154
|
+
12: t('backoffice.idmCatalogEditor.items.label.esstisch'),
|
|
32155
|
+
13: t('backoffice.idmCatalogEditor.items.label.kombinationen'),
|
|
32156
|
+
14: t('backoffice.idmCatalogEditor.items.label.abschlusselement'),
|
|
32157
|
+
15: t('backoffice.idmCatalogEditor.items.label.bettsofa'),
|
|
32158
|
+
16: t('backoffice.idmCatalogEditor.items.label.sitzbank'),
|
|
32159
|
+
17: t('backoffice.idmCatalogEditor.items.label.stuhl'),
|
|
32160
|
+
18: t('backoffice.idmCatalogEditor.items.label.fussbank'),
|
|
32161
|
+
19: t('backoffice.idmCatalogEditor.items.label.kopfstuetze'),
|
|
32162
|
+
20: t('backoffice.idmCatalogEditor.items.label.leuchten'),
|
|
32163
|
+
21: t('backoffice.idmCatalogEditor.items.label.teppiche'),
|
|
32164
|
+
22: t('backoffice.idmCatalogEditor.items.label.kleinteile'),
|
|
32165
|
+
23: t('backoffice.idmCatalogEditor.items.label.polsterbetten'),
|
|
32166
|
+
24: t('backoffice.idmCatalogEditor.items.label.polsterbettgestelle'),
|
|
32167
|
+
25: t('backoffice.idmCatalogEditor.items.label.metrage'),
|
|
32168
|
+
26: t('backoffice.idmCatalogEditor.items.label.sonstiges')
|
|
32169
|
+
};
|
|
32170
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
32171
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
32172
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
32173
|
+
children: [t('backoffice.menu.items.label.IDMCatalogEditorTableItems'), /*#__PURE__*/jsxs(Space$1, {
|
|
32174
|
+
style: {
|
|
32175
|
+
"float": 'right'
|
|
32176
|
+
},
|
|
32177
|
+
children: [/*#__PURE__*/jsx(CatalogSelector, {
|
|
32178
|
+
selectedCatalog: catalogId,
|
|
32179
|
+
setSelectedCatalog: function setSelectedCatalog(id) {
|
|
32180
|
+
return updateNavigation(id);
|
|
32181
|
+
},
|
|
32182
|
+
idmService: apiConfig.idmService
|
|
32183
|
+
}), /*#__PURE__*/jsx(PrefilterSelector, {
|
|
32184
|
+
type: 'item',
|
|
32185
|
+
catalogId: catalogId,
|
|
32186
|
+
selectedSerie: selectedSerie,
|
|
32187
|
+
setSelectedSerie: setSelectedSerie,
|
|
32188
|
+
idmService: apiConfig.idmService
|
|
32189
|
+
})]
|
|
32190
|
+
})]
|
|
32191
|
+
})
|
|
32192
|
+
}), selectedSerie && /*#__PURE__*/jsx(Spreadsheet, {
|
|
32193
|
+
gridId: 'crud-grid_items',
|
|
32194
|
+
applicationData: {
|
|
32195
|
+
organizationId: organizationId,
|
|
32196
|
+
catalogId: catalogId
|
|
32197
|
+
},
|
|
32198
|
+
configuration: {
|
|
32199
|
+
type: 'dotnetSSM',
|
|
32200
|
+
idCol: 'typeNo',
|
|
32201
|
+
apiInterface: {
|
|
32202
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id) + '/items',
|
|
32203
|
+
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id) + '/items',
|
|
32204
|
+
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id) + '/items/${typeNo}',
|
|
32205
|
+
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id) + '/items/${typeNo}',
|
|
32206
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/' + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id) + '/items/${typeNo}'
|
|
32207
|
+
},
|
|
32208
|
+
dateFormat: 'LL',
|
|
32209
|
+
floatingFilter: true,
|
|
32210
|
+
colDef: [{
|
|
32211
|
+
field: 'typeNo'
|
|
32212
|
+
}, {
|
|
32213
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.priceTypeRef',
|
|
32214
|
+
field: 'priceTypeRef',
|
|
32215
|
+
cellDataType: 'number'
|
|
32216
|
+
}, {
|
|
32217
|
+
headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
|
|
32218
|
+
field: 'sequenceNo',
|
|
32219
|
+
cellDataType: 'number'
|
|
32220
|
+
}, {
|
|
32221
|
+
headerName: 'backoffice.idmCatalog.common.label.texts',
|
|
32222
|
+
children: [{
|
|
32223
|
+
headerName: 'backoffice.idmCatalog.general.label.shortText',
|
|
32224
|
+
marryChildren: true,
|
|
32225
|
+
children: [{
|
|
32226
|
+
field: 'shortText.DE',
|
|
32227
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32228
|
+
isDictionary: true
|
|
32229
|
+
}, {
|
|
32230
|
+
field: 'shortText.EN',
|
|
32231
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32232
|
+
isDictionary: true
|
|
32233
|
+
}, {
|
|
32234
|
+
field: 'shortText.FR',
|
|
32235
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32236
|
+
isDictionary: true
|
|
32237
|
+
}, {
|
|
32238
|
+
field: 'shortText.IT',
|
|
32239
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32240
|
+
isDictionary: true
|
|
32241
|
+
}]
|
|
32242
|
+
}, {
|
|
32243
|
+
headerName: 'backoffice.idmCatalog.general.label.planningAdvice',
|
|
32244
|
+
marryChildren: true,
|
|
32245
|
+
children: [{
|
|
32246
|
+
field: 'planningAdvice.DE',
|
|
32247
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32248
|
+
isDictionary: true
|
|
32249
|
+
}, {
|
|
32250
|
+
field: 'planningAdvice.EN',
|
|
32251
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32252
|
+
isDictionary: true
|
|
32253
|
+
}, {
|
|
32254
|
+
field: 'planningAdvice.FR',
|
|
32255
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32256
|
+
isDictionary: true
|
|
32257
|
+
}, {
|
|
32258
|
+
field: 'planningAdvice.IT',
|
|
32259
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32260
|
+
isDictionary: true
|
|
32261
|
+
}]
|
|
32262
|
+
}]
|
|
32263
|
+
}, {
|
|
32264
|
+
headerName: 'backoffice.idmCatalog.items.label.articleNumbers',
|
|
32265
|
+
children: [{
|
|
32266
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.edpNumber',
|
|
32267
|
+
field: 'edpNumber'
|
|
32268
|
+
}, {
|
|
32269
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.eanNumber',
|
|
32270
|
+
field: 'eanNumber'
|
|
32271
|
+
}, {
|
|
32272
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.salesNumber',
|
|
32273
|
+
field: 'salesNumber'
|
|
32274
|
+
}, {
|
|
32275
|
+
headerName: 'backoffice.idmCatalog.general.items.itemIdentification',
|
|
32276
|
+
field: 'itemIdentification',
|
|
32277
|
+
cellDataType: 'enum',
|
|
32278
|
+
customParams: {
|
|
32279
|
+
displayTexts: itemIdentificationDic,
|
|
32280
|
+
values: Object.keys(itemIdentificationDic),
|
|
32281
|
+
displayLabelTemplate: '${name} (${value})'
|
|
32282
|
+
}
|
|
32283
|
+
}]
|
|
32284
|
+
}, {
|
|
32285
|
+
headerName: 'backoffice.idmCatalog.items.label.common',
|
|
32286
|
+
children: [{
|
|
32287
|
+
headerName: 'backoffice.idmCatalog.general.items.typeKey',
|
|
32288
|
+
field: 'typeKey',
|
|
32289
|
+
cellDataType: 'enum',
|
|
32290
|
+
customParams: {
|
|
32291
|
+
displayTexts: typeKeyDic,
|
|
32292
|
+
values: Object.keys(typeKeyDic),
|
|
32293
|
+
displayLabelTemplate: '${name} (${value})'
|
|
32294
|
+
}
|
|
32295
|
+
}, {
|
|
32296
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.eClassNo',
|
|
32297
|
+
field: 'eClassNo',
|
|
32298
|
+
cellDataType: 'number'
|
|
32299
|
+
}, {
|
|
32300
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.catalogPage',
|
|
32301
|
+
field: 'catalogPage'
|
|
32302
|
+
}, {
|
|
32303
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.minimumDeliveryTime',
|
|
32304
|
+
field: 'minimumDeliveryTime',
|
|
32305
|
+
cellDataType: 'number'
|
|
32306
|
+
}]
|
|
32307
|
+
}, {
|
|
32308
|
+
headerName: 'backoffice.idmCatalog.items.label.configurator',
|
|
32309
|
+
children: [{
|
|
32310
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.partListExclusive',
|
|
32311
|
+
field: 'partListExclusive',
|
|
32312
|
+
cellDataType: 'boolean'
|
|
32313
|
+
}, {
|
|
32314
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.partlist',
|
|
32315
|
+
field: 'partListRef',
|
|
32316
|
+
cellDataType: 'lookup',
|
|
32317
|
+
customParams: {
|
|
32318
|
+
nameField: 'partListRef',
|
|
32319
|
+
apiInterface: {
|
|
32320
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/partlists'
|
|
32321
|
+
},
|
|
32322
|
+
lookupValue: 'partlistKey',
|
|
32323
|
+
lookupKey: 'partlistKey'
|
|
32324
|
+
}
|
|
32325
|
+
}, {
|
|
32326
|
+
field: 'decisionRefs',
|
|
32327
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.decisionRefs',
|
|
32328
|
+
cellDataType: 'lookup',
|
|
32329
|
+
editable: true,
|
|
32330
|
+
customParams: {
|
|
32331
|
+
nameField: 'decisionRefsDisplayTexts',
|
|
32332
|
+
filterCellType: 'number',
|
|
32333
|
+
displayLabelTemplate: '${name} (${value})',
|
|
32334
|
+
apiInterface: {
|
|
32335
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/decisions'
|
|
32336
|
+
},
|
|
32337
|
+
lookupValue: 'decisionText',
|
|
32338
|
+
lookupKey: 'decisionNo',
|
|
32339
|
+
lookupKeyFilterType: {
|
|
32340
|
+
type: 'equals',
|
|
32341
|
+
filterType: 'number'
|
|
32342
|
+
},
|
|
32343
|
+
multiple: true,
|
|
32344
|
+
translated: true
|
|
32345
|
+
},
|
|
32346
|
+
additionalFields: ['decisionRefsDisplayTexts'],
|
|
32347
|
+
isDictionary: true
|
|
32348
|
+
}]
|
|
32349
|
+
}, {
|
|
32350
|
+
headerName: 'backoffice.idmCatalog.items.label.validation',
|
|
32351
|
+
children: [{
|
|
32352
|
+
headerName: 'backoffice.idmCatalog.general.label.validFromDate',
|
|
32353
|
+
field: 'validFromDate',
|
|
32354
|
+
cellDataType: 'dateString'
|
|
32355
|
+
}, {
|
|
32356
|
+
headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
|
|
32357
|
+
field: 'validUntilDate',
|
|
32358
|
+
cellDataType: 'dateString'
|
|
32359
|
+
}]
|
|
32360
|
+
}, {
|
|
32361
|
+
headerName: 'backoffice.idmCatalog.items.label.measurements',
|
|
32362
|
+
children: [{
|
|
32363
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.weightBrutto',
|
|
32364
|
+
field: 'weightBrutto',
|
|
32365
|
+
cellDataType: 'number'
|
|
32366
|
+
}, {
|
|
32367
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.weightNetto',
|
|
32368
|
+
field: 'weightNetto',
|
|
32369
|
+
cellDataType: 'number'
|
|
32370
|
+
}, {
|
|
32371
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.volume',
|
|
32372
|
+
field: 'volume',
|
|
32373
|
+
cellDataType: 'number'
|
|
32374
|
+
}, {
|
|
32375
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeNominalValue',
|
|
32376
|
+
field: 'widthBasicShapeNominalValue',
|
|
32377
|
+
cellDataType: 'number'
|
|
32378
|
+
}, {
|
|
32379
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeFrom',
|
|
32380
|
+
field: 'widthBasicShapeFrom',
|
|
32381
|
+
cellDataType: 'number'
|
|
32382
|
+
}, {
|
|
32383
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeTo',
|
|
32384
|
+
field: 'widthBasicShapeTo',
|
|
32385
|
+
cellDataType: 'number'
|
|
32386
|
+
}, {
|
|
32387
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.widthBasicShapeStepSize',
|
|
32388
|
+
field: 'widthBasicShapeStepSize',
|
|
32389
|
+
cellDataType: 'number'
|
|
32390
|
+
}, {
|
|
32391
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeNominalValue',
|
|
32392
|
+
field: 'heightBasicShapeNominalValue',
|
|
32393
|
+
cellDataType: 'number'
|
|
32394
|
+
}, {
|
|
32395
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeFrom',
|
|
32396
|
+
field: 'heightBasicShapeFrom',
|
|
32397
|
+
cellDataType: 'number'
|
|
32398
|
+
}, {
|
|
32399
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeTo',
|
|
32400
|
+
field: 'heightBasicShapeTo',
|
|
32401
|
+
cellDataType: 'number'
|
|
32402
|
+
}, {
|
|
32403
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.heightBasicShapeStepSize',
|
|
32404
|
+
field: 'heightBasicShapeStepSize',
|
|
32405
|
+
cellDataType: 'number'
|
|
32406
|
+
}, {
|
|
32407
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeNominalValue',
|
|
32408
|
+
field: 'depthBasicShapeNominalValue',
|
|
32409
|
+
cellDataType: 'number'
|
|
32410
|
+
}, {
|
|
32411
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeFrom',
|
|
32412
|
+
field: 'depthBasicShapeFrom',
|
|
32413
|
+
cellDataType: 'number'
|
|
32414
|
+
}, {
|
|
32415
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeTo',
|
|
32416
|
+
field: 'depthBasicShapeTo',
|
|
32417
|
+
cellDataType: 'number'
|
|
32418
|
+
}, {
|
|
32419
|
+
headerName: 'backoffice.idmCatalogEditor.items.label.depthBasicShapeStepSize',
|
|
32420
|
+
field: 'depthBasicShapeStepSize',
|
|
32421
|
+
cellDataType: 'number'
|
|
32422
|
+
}]
|
|
32423
|
+
}, {
|
|
32424
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
32425
|
+
field: 'lastUpdatedDate',
|
|
32426
|
+
cellDataType: 'dateString',
|
|
32427
|
+
editable: false
|
|
32428
|
+
}, {
|
|
32429
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
32430
|
+
field: 'createdDate',
|
|
32431
|
+
cellDataType: 'dateString',
|
|
32432
|
+
editable: false
|
|
32433
|
+
}, {
|
|
32434
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
32435
|
+
field: 'createdByDisplayText',
|
|
32436
|
+
editable: false
|
|
32437
|
+
}, {
|
|
32438
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
32439
|
+
field: 'lastUpdatedByDisplayText',
|
|
32440
|
+
editable: false
|
|
32441
|
+
}]
|
|
32442
|
+
}
|
|
32443
|
+
})]
|
|
32444
|
+
});
|
|
32445
|
+
}
|
|
32446
|
+
|
|
32447
|
+
function TableSeries () {
|
|
32448
|
+
var _useTranslation = useTranslation(),
|
|
32449
|
+
t = _useTranslation.t;
|
|
32450
|
+
var _useModule = useModule(['series']),
|
|
32451
|
+
catalogId = _useModule.catalogId,
|
|
32452
|
+
organizationId = _useModule.organizationId,
|
|
32453
|
+
updateNavigation = _useModule.updateNavigation,
|
|
32454
|
+
apiConfig = _useModule.apiConfig;
|
|
32455
|
+
var purchaseRetailIdDic = {
|
|
32456
|
+
0: t('backoffice.idmCatalog.series.label.purchaseRetail.p0'),
|
|
32457
|
+
1: t('backoffice.idmCatalog.series.label.purchaseRetail.p1'),
|
|
32458
|
+
2: t('backoffice.idmCatalog.series.label.purchaseRetail.p2'),
|
|
32459
|
+
3: t('backoffice.idmCatalog.series.label.purchaseRetail.p3')
|
|
32460
|
+
};
|
|
32461
|
+
var applicationData = useMemo(function () {
|
|
32462
|
+
return {
|
|
32463
|
+
catalogId: catalogId,
|
|
32464
|
+
organizationId: organizationId
|
|
32465
|
+
};
|
|
32466
|
+
}, [catalogId]);
|
|
32467
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
32468
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
32469
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
32470
|
+
children: [t('backoffice.menu.items.label.IDMCatalogEditorTableSeries'), /*#__PURE__*/jsx(Space$1, {
|
|
32471
|
+
style: {
|
|
32472
|
+
"float": 'right'
|
|
32473
|
+
},
|
|
32474
|
+
children: /*#__PURE__*/jsx(CatalogSelector, {
|
|
32475
|
+
selectedCatalog: catalogId,
|
|
32476
|
+
setSelectedCatalog: function setSelectedCatalog(id) {
|
|
32477
|
+
return updateNavigation(id);
|
|
32478
|
+
},
|
|
32479
|
+
idmService: apiConfig.idmService
|
|
32480
|
+
})
|
|
32481
|
+
})]
|
|
32482
|
+
})
|
|
32483
|
+
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
32484
|
+
gridId: 'crud-grid_series',
|
|
32485
|
+
applicationData: applicationData,
|
|
32486
|
+
configuration: {
|
|
32487
|
+
type: 'dotnetSSM',
|
|
32488
|
+
apiInterface: {
|
|
32489
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series',
|
|
32490
|
+
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series',
|
|
32491
|
+
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${_id}',
|
|
32492
|
+
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${_id}',
|
|
32493
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${_id}'
|
|
32494
|
+
},
|
|
32495
|
+
dateFormat: 'LL',
|
|
32496
|
+
colDef: [{
|
|
32497
|
+
field: 'serieNo',
|
|
32498
|
+
headerName: 'backoffice.idmCatalog.series.label.serieNo',
|
|
32499
|
+
required: true
|
|
32500
|
+
}, {
|
|
32501
|
+
headerName: 'backoffice.idmCatalog.series.label.seriesName',
|
|
32502
|
+
marryChildren: true,
|
|
32503
|
+
children: [{
|
|
32504
|
+
field: 'seriesName.DE',
|
|
32505
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32506
|
+
isDictionary: true,
|
|
32507
|
+
required: true
|
|
32508
|
+
}, {
|
|
32509
|
+
field: 'seriesName.EN',
|
|
32510
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32511
|
+
isDictionary: true
|
|
32512
|
+
}, {
|
|
32513
|
+
field: 'seriesName.FR',
|
|
32514
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32515
|
+
isDictionary: true
|
|
32516
|
+
}, {
|
|
32517
|
+
field: 'seriesName.IT',
|
|
32518
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32519
|
+
isDictionary: true
|
|
32520
|
+
}]
|
|
32521
|
+
}, {
|
|
32522
|
+
field: 'sequenceNo',
|
|
32523
|
+
headerName: 'backoffice.idmCatalog.series.label.sequenceNo',
|
|
32524
|
+
required: true,
|
|
32525
|
+
cellDataType: 'number'
|
|
32526
|
+
}, {
|
|
32527
|
+
field: 'purchaseRetailId',
|
|
32528
|
+
headerName: 'backoffice.idmCatalog.series.label.purchaseRetailId',
|
|
32529
|
+
required: true,
|
|
32530
|
+
cellDataType: 'enum',
|
|
32531
|
+
customParams: {
|
|
32532
|
+
displayTexts: purchaseRetailIdDic,
|
|
32533
|
+
values: Object.keys(purchaseRetailIdDic),
|
|
32534
|
+
displayLabelTemplate: '${name} (${value})'
|
|
32535
|
+
}
|
|
32536
|
+
}, {
|
|
32537
|
+
headerName: 'backoffice.idmCatalog.series.label.seriesFullText',
|
|
32538
|
+
marryChildren: true,
|
|
32539
|
+
children: [{
|
|
32540
|
+
field: 'seriesFullText.DE',
|
|
32541
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32542
|
+
isDictionary: true
|
|
32543
|
+
}, {
|
|
32544
|
+
field: 'seriesFullText.EN',
|
|
32545
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32546
|
+
isDictionary: true
|
|
32547
|
+
}, {
|
|
32548
|
+
field: 'seriesFullText.FR',
|
|
32549
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32550
|
+
isDictionary: true
|
|
32551
|
+
}, {
|
|
32552
|
+
field: 'seriesFullText.IT',
|
|
32553
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32554
|
+
isDictionary: true
|
|
32555
|
+
}]
|
|
32556
|
+
}, {
|
|
32557
|
+
field: 'decisionRefs',
|
|
32558
|
+
headerName: 'backoffice.idmCatalog.series.label.decisionRefs',
|
|
32559
|
+
cellDataType: 'lookup',
|
|
32560
|
+
editable: true,
|
|
32561
|
+
customParams: {
|
|
32562
|
+
nameField: 'decisionRefsDisplayTexts',
|
|
32563
|
+
filterCellType: 'number',
|
|
32564
|
+
displayLabelTemplate: '${name} (${value})',
|
|
32565
|
+
apiInterface: {
|
|
32566
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/decisions'
|
|
32567
|
+
},
|
|
32568
|
+
lookupValue: 'decisionText',
|
|
32569
|
+
lookupKey: 'decisionNo',
|
|
32570
|
+
lookupKeyFilterType: {
|
|
32571
|
+
type: 'equals',
|
|
32572
|
+
filterType: 'number'
|
|
32573
|
+
},
|
|
32574
|
+
multiple: true,
|
|
32575
|
+
translated: true
|
|
32576
|
+
},
|
|
32577
|
+
additionalFields: ['decisionRefsDisplayTexts'],
|
|
32578
|
+
isDictionary: true
|
|
32579
|
+
}, {
|
|
32580
|
+
headerName: 'backoffice.idmCatalog.general.label.validFromDate',
|
|
32581
|
+
field: 'validFromDate',
|
|
32582
|
+
cellDataType: 'dateString'
|
|
32583
|
+
}, {
|
|
32584
|
+
headerName: 'backoffice.idmCatalog.general.label.validUntilDate',
|
|
32585
|
+
field: 'validUntilDate',
|
|
32586
|
+
cellDataType: 'dateString'
|
|
32587
|
+
}, {
|
|
32588
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
32589
|
+
field: 'lastUpdatedDate',
|
|
32590
|
+
cellDataType: 'dateString',
|
|
32591
|
+
editable: false
|
|
32592
|
+
}, {
|
|
32593
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
32594
|
+
field: 'createdDate',
|
|
32595
|
+
cellDataType: 'dateString',
|
|
32596
|
+
editable: false
|
|
32597
|
+
}, {
|
|
32598
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
32599
|
+
field: 'createdByDisplayText',
|
|
32600
|
+
editable: false
|
|
32601
|
+
}, {
|
|
32602
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
32603
|
+
field: 'lastUpdatedByDisplayText',
|
|
32604
|
+
editable: false
|
|
32605
|
+
}, {
|
|
32606
|
+
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
32607
|
+
field: '_id',
|
|
32608
|
+
editable: false
|
|
32609
|
+
}, {
|
|
32610
|
+
field: 'organizationId',
|
|
32611
|
+
editable: false,
|
|
32612
|
+
hide: true,
|
|
32613
|
+
lockVisible: true,
|
|
32614
|
+
suppressColumnsToolPanel: true,
|
|
32615
|
+
defaultValue: '${organizationId}'
|
|
32616
|
+
}, {
|
|
32617
|
+
field: 'catalogId',
|
|
32618
|
+
editable: false,
|
|
32619
|
+
hide: true,
|
|
32620
|
+
lockVisible: true,
|
|
32621
|
+
suppressColumnsToolPanel: true,
|
|
32622
|
+
defaultValue: '${catalogId}'
|
|
32623
|
+
}]
|
|
32624
|
+
}
|
|
32625
|
+
})]
|
|
32626
|
+
});
|
|
32627
|
+
}
|
|
32628
|
+
|
|
32629
|
+
function IDMCatalogEditor (_ref) {
|
|
32630
|
+
_objectDestructuringEmpty(_ref);
|
|
32631
|
+
return /*#__PURE__*/jsx("div", {
|
|
32632
|
+
style: {
|
|
32633
|
+
height: '85vh',
|
|
32634
|
+
display: 'flex',
|
|
32635
|
+
flexDirection: 'column'
|
|
32636
|
+
},
|
|
32637
|
+
children: /*#__PURE__*/jsx(Content$1, {})
|
|
32638
|
+
});
|
|
32639
|
+
}
|
|
32640
|
+
function Content$1() {
|
|
32641
|
+
return /*#__PURE__*/jsxs(Routes, {
|
|
32642
|
+
children: [/*#__PURE__*/jsx(Route, {
|
|
32643
|
+
index: true,
|
|
32644
|
+
path: "",
|
|
32645
|
+
element: /*#__PURE__*/jsx(TableCatalogs, {})
|
|
32646
|
+
}), /*#__PURE__*/jsx(Route, {
|
|
32647
|
+
path: ":catalogId/series",
|
|
32648
|
+
element: /*#__PURE__*/jsx(TableSeries, {})
|
|
32649
|
+
}), /*#__PURE__*/jsx(Route, {
|
|
32650
|
+
path: ":catalogId/items",
|
|
32651
|
+
element: /*#__PURE__*/jsx(TableItems, {})
|
|
32652
|
+
})]
|
|
32653
|
+
});
|
|
32654
|
+
}
|
|
32655
|
+
|
|
32656
|
+
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; }
|
|
32657
|
+
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; }
|
|
32658
|
+
var ContentWrapper = function ContentWrapper(_ref) {
|
|
32659
|
+
var id = _ref.id;
|
|
32660
|
+
var root = useStore();
|
|
32661
|
+
var current = useMemo(function () {
|
|
32662
|
+
var configuration = root.configurationStore.getConfiguration(id);
|
|
32663
|
+
return {
|
|
32664
|
+
id: id,
|
|
32665
|
+
configuration: configuration
|
|
32666
|
+
};
|
|
32667
|
+
}, [id]);
|
|
32668
|
+
if (!current) {
|
|
32669
|
+
return null;
|
|
32670
|
+
}
|
|
32671
|
+
return /*#__PURE__*/jsxs(Layout.Content, {
|
|
32672
|
+
id: "contnet",
|
|
32673
|
+
style: {
|
|
32674
|
+
margin: 16,
|
|
32675
|
+
position: 'relative',
|
|
32676
|
+
minHeight: 'auto',
|
|
32677
|
+
height: 'calc(100% - 32px)'
|
|
32678
|
+
},
|
|
32679
|
+
children: [current.configuration.type !== 'Group' && /*#__PURE__*/jsx(ContentCard, {
|
|
32680
|
+
configId: current.id,
|
|
32681
|
+
type: current.configuration.type,
|
|
32682
|
+
inGroup: false
|
|
32683
|
+
}), current.configuration.type == 'Group' && /*#__PURE__*/jsx(Group, {
|
|
32684
|
+
id: current.id
|
|
32685
|
+
})]
|
|
32686
|
+
}, id + (root.dataStore.organizationId || ''));
|
|
32687
|
+
};
|
|
32688
|
+
var Group = observer(function (_ref2) {
|
|
32689
|
+
var _configuration$direct, _configuration$items;
|
|
32690
|
+
var id = _ref2.id;
|
|
32691
|
+
var root = useStore();
|
|
32692
|
+
var configuration = root.configurationStore.getConfiguration(id);
|
|
32693
|
+
if ((configuration === null || configuration === void 0 ? void 0 : configuration.type) != 'Group') {
|
|
32694
|
+
throw new Error("The Configuration with ID ".concat(id, " does either not exist or is not of the type 'Group'."));
|
|
32695
|
+
}
|
|
32696
|
+
useEffect(function () {
|
|
32697
|
+
return function () {
|
|
32698
|
+
if (configuration.setSelectedOrganization) root.dataStore.setSelectedOrganizationId(undefined);
|
|
32699
|
+
};
|
|
32700
|
+
}, []);
|
|
32701
|
+
if (root.error) {
|
|
32702
|
+
//renders the ErrorBoundary
|
|
32703
|
+
throw new Error(root.error);
|
|
32704
|
+
}
|
|
32705
|
+
return /*#__PURE__*/jsx(Space, {
|
|
32706
|
+
direction: (_configuration$direct = configuration.direction) !== null && _configuration$direct !== void 0 ? _configuration$direct : 'vertical',
|
|
32707
|
+
wrap: configuration.direction === 'horizontal',
|
|
32708
|
+
size: "middle",
|
|
32709
|
+
style: {
|
|
32710
|
+
maxWidth: '100%'
|
|
32711
|
+
},
|
|
32712
|
+
children: (_configuration$items = configuration.items) === null || _configuration$items === void 0 ? void 0 : _configuration$items.map(function (item) {
|
|
32713
|
+
return !item.hide && /*#__PURE__*/jsx(ContentCard, {
|
|
32714
|
+
configId: item.id,
|
|
32715
|
+
type: item.type,
|
|
32716
|
+
direction: configuration.direction,
|
|
32717
|
+
inGroup: true
|
|
32718
|
+
}, item.id);
|
|
32719
|
+
})
|
|
32720
|
+
});
|
|
32721
|
+
});
|
|
32722
|
+
var ContentCard = observer(function (_ref3) {
|
|
32723
|
+
var configId = _ref3.configId,
|
|
32724
|
+
type = _ref3.type,
|
|
32725
|
+
direction = _ref3.direction,
|
|
32726
|
+
inGroup = _ref3.inGroup;
|
|
32727
|
+
var root = useStore();
|
|
32728
|
+
var configuration = root.configurationStore.getConfiguration(configId);
|
|
32729
|
+
return /*#__PURE__*/jsxs("div", {
|
|
32730
|
+
style: _objectSpread$5(_objectSpread$5({}, !inGroup ? {
|
|
32731
|
+
height: '100%'
|
|
32732
|
+
} : {
|
|
32733
|
+
maxHeight: '60vh'
|
|
32734
|
+
}), {}, {
|
|
32735
|
+
maxWidth: '100%',
|
|
32736
|
+
padding: direction == 'horizontal' ? 0 : 16,
|
|
32737
|
+
backgroundColor: root.contentStore.theme == 'lightmode' ? '#fff' : '#000',
|
|
32738
|
+
display: 'flex',
|
|
32739
|
+
flexDirection: 'column'
|
|
32740
|
+
}),
|
|
32741
|
+
children: [type == 'Table' && /*#__PURE__*/jsx(Table, {
|
|
32742
|
+
id: configId
|
|
32743
|
+
}, configId), type == 'UIBuilder' && /*#__PURE__*/jsx(UIBuilder, {
|
|
32744
|
+
id: configId
|
|
32745
|
+
}, configId), type == 'Form' && /*#__PURE__*/jsx(Form, {
|
|
32746
|
+
id: configId
|
|
32747
|
+
}, configId), type == 'Description' && /*#__PURE__*/jsx(Description, {
|
|
32748
|
+
id: configId
|
|
32749
|
+
}, configId), type == 'OrgTree' && /*#__PURE__*/jsx(OrgTreeComponent$1, {
|
|
32750
|
+
id: configId
|
|
32751
|
+
}, configId), type == 'MediaUpload' && /*#__PURE__*/jsx(MediaUpload, {
|
|
32752
|
+
id: configId
|
|
32753
|
+
}, configId), type == 'Group' && /*#__PURE__*/jsx(Group, {
|
|
32754
|
+
id: configId
|
|
32755
|
+
}, configId), type == 'FileUploadBeta' && /*#__PURE__*/jsx(FileUploadBeta, {
|
|
32756
|
+
id: configId
|
|
32757
|
+
}, configId), type == 'Grid' && /*#__PURE__*/jsx(Grid, {
|
|
32758
|
+
id: configId
|
|
32759
|
+
}, configId), type == 'IFrame' && /*#__PURE__*/jsx(IFrame$1, {
|
|
32760
|
+
id: configId
|
|
32761
|
+
}, configId), type == 'CatalogEditor' && /*#__PURE__*/jsx(CatalogEditor$1, {
|
|
32762
|
+
id: configId
|
|
32763
|
+
}, configId), configuration.type == 'IDMEnricherEditor' && /*#__PURE__*/jsx(IDMEnricherEditor, {
|
|
32764
|
+
configuration: configuration,
|
|
32765
|
+
id: configId
|
|
32766
|
+
}, configId), configuration.type == 'IDMCatalogEditor' && /*#__PURE__*/jsx(IDMCatalogEditor, {
|
|
31409
32767
|
configuration: configuration,
|
|
31410
32768
|
id: configId
|
|
31411
32769
|
}, configId)]
|