@crystaldesign/diva-backoffice 24.6.0-beta.3 → 24.6.0-beta.31
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 +735 -352
- package/build/types/backoffice/src/Configuration.d.ts +20 -3
- package/build/types/backoffice/src/Configuration.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/types.d.ts +1 -0
- package/build/types/backoffice/src/ui/Form/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/List/index.d.ts +1 -0
- package/build/types/backoffice/src/ui/List/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/List/types.d.ts +13 -0
- package/build/types/backoffice/src/ui/List/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/List/useListData.d.ts +3 -0
- package/build/types/backoffice/src/ui/List/useListData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/SMChart/index.d.ts +5 -0
- package/build/types/backoffice/src/ui/SMChart/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/SMChart/types.d.ts +29 -0
- package/build/types/backoffice/src/ui/SMChart/types.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/Table/BaseTable/index.d.ts.map +1 -1
- package/build/types/backoffice/src/utils/ApiHandler.d.ts +1 -0
- package/build/types/backoffice/src/utils/ApiHandler.d.ts.map +1 -1
- package/package.json +2 -2
package/build/esm/index.js
CHANGED
|
@@ -76,6 +76,7 @@ import AlertOutlined from '@ant-design/icons/AlertOutlined';
|
|
|
76
76
|
import DownloadOutlined$1 from '@ant-design/icons/DownloadOutlined';
|
|
77
77
|
import CloudOutlined from '@ant-design/icons/CloudOutlined';
|
|
78
78
|
import { AgChartsReact } from 'ag-charts-react';
|
|
79
|
+
import { Histogram } from '@crystaldesign/analytics';
|
|
79
80
|
import dayjs from 'dayjs';
|
|
80
81
|
import advancedFormat from 'dayjs/plugin/advancedFormat';
|
|
81
82
|
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
|
@@ -117,8 +118,8 @@ import RoomSelection from '@crystaldesign/room-selection';
|
|
|
117
118
|
function _createForOfIteratorHelper$m(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$m(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
118
119
|
function _unsupportedIterableToArray$m(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$m(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$m(o, minLen); }
|
|
119
120
|
function _arrayLikeToArray$m(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
120
|
-
function ownKeys$
|
|
121
|
-
function _objectSpread$
|
|
121
|
+
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; }
|
|
122
|
+
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; }
|
|
122
123
|
var LOG$b = getLogger('Backoffice', 'AplyMapping');
|
|
123
124
|
function aplyMapping (_ref) {
|
|
124
125
|
var mapable = _ref.mapable,
|
|
@@ -139,10 +140,10 @@ function aplyMapping (_ref) {
|
|
|
139
140
|
var newValue = {};
|
|
140
141
|
newValue[newKey] = valueToAdd;
|
|
141
142
|
if ((startValue === null || startValue === void 0 ? void 0 : startValue[newKey]) != undefined) {
|
|
142
|
-
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$
|
|
143
|
+
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$F(_objectSpread$F({}, startValue[newKey]), valueToAdd);else startValue[newKey] = type == 'addToSourceValue' ? startValue[newKey] + valueToAdd : valueToAdd;
|
|
143
144
|
return startValue;
|
|
144
145
|
}
|
|
145
|
-
if (newIdx == 1) return _objectSpread$
|
|
146
|
+
if (newIdx == 1) return _objectSpread$F(_objectSpread$F({}, startValue), newValue);
|
|
146
147
|
return getTarget(idx + 1, keys, startValue, newValue);
|
|
147
148
|
};
|
|
148
149
|
returnValue = getTarget(0, key.split('.'), returnValue, value);
|
|
@@ -423,8 +424,8 @@ function getLeafColumns(columns) {
|
|
|
423
424
|
});
|
|
424
425
|
}
|
|
425
426
|
|
|
426
|
-
function ownKeys$
|
|
427
|
-
function _objectSpread$
|
|
427
|
+
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; }
|
|
428
|
+
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; }
|
|
428
429
|
var LOG$a = getLogger('Backoffice', 'ApiHandler');
|
|
429
430
|
var jp = require('jsonpath');
|
|
430
431
|
var _default$d = /*#__PURE__*/function () {
|
|
@@ -436,6 +437,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
436
437
|
_defineProperty(this, "_updateUrl", void 0);
|
|
437
438
|
_defineProperty(this, "_updateMethod", void 0);
|
|
438
439
|
_defineProperty(this, "_useJsonPatch", void 0);
|
|
440
|
+
_defineProperty(this, "_noBody", void 0);
|
|
439
441
|
_defineProperty(this, "_createUrl", void 0);
|
|
440
442
|
_defineProperty(this, "_createMethod", void 0);
|
|
441
443
|
_defineProperty(this, "_deleteUrl", void 0);
|
|
@@ -456,6 +458,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
456
458
|
this._updateUrl = configuration.apiInterface;
|
|
457
459
|
this._updateMethod = 'PUT';
|
|
458
460
|
this._useJsonPatch = false;
|
|
461
|
+
this._noBody = false;
|
|
459
462
|
this._createUrl = configuration.apiInterface;
|
|
460
463
|
this._createMethod = 'POST';
|
|
461
464
|
this._deleteUrl = configuration.apiInterface;
|
|
@@ -463,33 +466,34 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
463
466
|
this._readOneUrl = configuration.apiInterface;
|
|
464
467
|
this._socketUrl = configuration.apiInterface;
|
|
465
468
|
} else {
|
|
466
|
-
var _configuration$apiInt, _configuration$apiInt2, _configuration$apiInt3, _configuration$apiInt4, _configuration$apiInt5;
|
|
469
|
+
var _configuration$apiInt, _configuration$apiInt2, _configuration$apiInt3, _configuration$apiInt4, _configuration$apiInt5, _configuration$apiInt6;
|
|
467
470
|
this._updateUrl = typeof configuration.apiInterface.update == 'string' ? configuration.apiInterface.update : (_configuration$apiInt = configuration.apiInterface.update) === null || _configuration$apiInt === void 0 ? void 0 : _configuration$apiInt.url;
|
|
468
471
|
this._updateMethod = _typeof(configuration.apiInterface.update) == 'object' ? (_configuration$apiInt2 = configuration.apiInterface.update) === null || _configuration$apiInt2 === void 0 ? void 0 : _configuration$apiInt2.method : 'PUT';
|
|
469
472
|
this._useJsonPatch = _typeof(configuration.apiInterface.update) == 'object' ? (_configuration$apiInt3 = configuration.apiInterface.update) === null || _configuration$apiInt3 === void 0 ? void 0 : _configuration$apiInt3.jsonPatch : false;
|
|
470
|
-
this.
|
|
471
|
-
this.
|
|
473
|
+
this._noBody = _typeof(configuration.apiInterface.update) == 'object' ? (_configuration$apiInt4 = configuration.apiInterface.update) === null || _configuration$apiInt4 === void 0 ? void 0 : _configuration$apiInt4.noBody : false;
|
|
474
|
+
this._createUrl = typeof configuration.apiInterface.create == 'string' ? configuration.apiInterface.create : (_configuration$apiInt5 = configuration.apiInterface.create) === null || _configuration$apiInt5 === void 0 ? void 0 : _configuration$apiInt5.url;
|
|
475
|
+
this._createMethod = _typeof(configuration.apiInterface.create) == 'object' ? (_configuration$apiInt6 = configuration.apiInterface.create) === null || _configuration$apiInt6 === void 0 ? void 0 : _configuration$apiInt6.method : 'POST';
|
|
472
476
|
if (typeof configuration.apiInterface["delete"] == 'string') {
|
|
473
477
|
this._deleteUrl = configuration.apiInterface["delete"];
|
|
474
478
|
} else {
|
|
475
|
-
var _configuration$
|
|
476
|
-
this._deleteUrl = (_configuration$
|
|
477
|
-
this._deleteIdField = ((_configuration$
|
|
478
|
-
this._applyIdField = (_configuration$
|
|
479
|
+
var _configuration$apiInt7, _configuration$apiInt8, _configuration$apiInt9, _configuration$apiInt10;
|
|
480
|
+
this._deleteUrl = (_configuration$apiInt7 = configuration.apiInterface["delete"]) === null || _configuration$apiInt7 === void 0 ? void 0 : _configuration$apiInt7.url;
|
|
481
|
+
this._deleteIdField = ((_configuration$apiInt8 = configuration.apiInterface["delete"]) === null || _configuration$apiInt8 === void 0 ? void 0 : _configuration$apiInt8.idField) || 'id';
|
|
482
|
+
this._applyIdField = (_configuration$apiInt9 = (_configuration$apiInt10 = configuration.apiInterface["delete"]) === null || _configuration$apiInt10 === void 0 ? void 0 : _configuration$apiInt10.applyIdField) !== null && _configuration$apiInt9 !== void 0 ? _configuration$apiInt9 : true;
|
|
479
483
|
}
|
|
480
484
|
if (typeof configuration.apiInterface.read == 'string') {
|
|
481
485
|
this._readListUrl = configuration.apiInterface.read;
|
|
482
486
|
this._readOneUrl = configuration.apiInterface.read;
|
|
483
487
|
this._fallBackToParams = true;
|
|
484
488
|
} else {
|
|
485
|
-
var _configuration$
|
|
486
|
-
this._readListUrl = (_configuration$
|
|
487
|
-
this._readOneUrl = (_configuration$
|
|
489
|
+
var _configuration$apiInt11, _configuration$apiInt12, _configuration$apiInt13, _configuration$apiInt15, _configuration$apiInt16, _configuration$apiInt17, _configuration$apiInt18;
|
|
490
|
+
this._readListUrl = (_configuration$apiInt11 = configuration.apiInterface.read) === null || _configuration$apiInt11 === void 0 ? void 0 : _configuration$apiInt11.list;
|
|
491
|
+
this._readOneUrl = (_configuration$apiInt12 = configuration.apiInterface.read) === null || _configuration$apiInt12 === void 0 ? void 0 : _configuration$apiInt12.one;
|
|
488
492
|
|
|
489
493
|
//if a user has special permission, overwrite the url for that user
|
|
490
|
-
if ((_configuration$
|
|
491
|
-
var _configuration$
|
|
492
|
-
var permission = Object.entries((_configuration$
|
|
494
|
+
if ((_configuration$apiInt13 = configuration.apiInterface.read) !== null && _configuration$apiInt13 !== void 0 && _configuration$apiInt13.permissions) {
|
|
495
|
+
var _configuration$apiInt14;
|
|
496
|
+
var permission = Object.entries((_configuration$apiInt14 = configuration.apiInterface.read) === null || _configuration$apiInt14 === void 0 ? void 0 : _configuration$apiInt14.permissions).find(function (_ref) {
|
|
493
497
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
494
498
|
permission = _ref2[0];
|
|
495
499
|
_ref2[1];
|
|
@@ -501,10 +505,10 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
501
505
|
this._readOneUrl = permission[1];
|
|
502
506
|
}
|
|
503
507
|
}
|
|
504
|
-
this._readJsonPath = (_configuration$
|
|
505
|
-
this._filterFields = (_configuration$
|
|
506
|
-
this._fallBackToParams = !!((_configuration$
|
|
507
|
-
this._readPublicData = !!((_configuration$
|
|
508
|
+
this._readJsonPath = (_configuration$apiInt15 = configuration.apiInterface.read) === null || _configuration$apiInt15 === void 0 ? void 0 : _configuration$apiInt15.jsonPath;
|
|
509
|
+
this._filterFields = (_configuration$apiInt16 = configuration.apiInterface.read) === null || _configuration$apiInt16 === void 0 ? void 0 : _configuration$apiInt16.fields;
|
|
510
|
+
this._fallBackToParams = !!((_configuration$apiInt17 = configuration.apiInterface.read) !== null && _configuration$apiInt17 !== void 0 && _configuration$apiInt17.fallBackToParams);
|
|
511
|
+
this._readPublicData = !!((_configuration$apiInt18 = configuration.apiInterface.read) !== null && _configuration$apiInt18 !== void 0 && _configuration$apiInt18["public"]);
|
|
508
512
|
}
|
|
509
513
|
this._socketUrl = configuration.apiInterface.socket;
|
|
510
514
|
}
|
|
@@ -553,7 +557,11 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
553
557
|
finalUrl = this._updateUrl;
|
|
554
558
|
match === null || match === void 0 || match.forEach(function (param) {
|
|
555
559
|
var field = param.substring(1, param.length - 1);
|
|
556
|
-
|
|
560
|
+
if (original[field]) {
|
|
561
|
+
finalUrl = finalUrl.replace(param, original[field]);
|
|
562
|
+
} else {
|
|
563
|
+
finalUrl = finalUrl.replace(param, data[field]);
|
|
564
|
+
}
|
|
557
565
|
});
|
|
558
566
|
if (!mapping) {
|
|
559
567
|
_context2.next = 9;
|
|
@@ -573,17 +581,20 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
573
581
|
fallBackToParams: true
|
|
574
582
|
});
|
|
575
583
|
case 9:
|
|
576
|
-
finalData =
|
|
584
|
+
finalData = undefined;
|
|
585
|
+
if (!this._noBody) {
|
|
586
|
+
finalData = this._useJsonPatch ? this.createPatch(data, original) : data;
|
|
587
|
+
}
|
|
577
588
|
jwt = (_this$_rootStore = this._rootStore) === null || _this$_rootStore === void 0 ? void 0 : _this$_rootStore.dataStore.jwt;
|
|
578
|
-
_context2.next =
|
|
589
|
+
_context2.next = 14;
|
|
579
590
|
return fetch(finalUrl, {
|
|
580
591
|
method: this._updateMethod,
|
|
581
|
-
headers: _objectSpread$
|
|
592
|
+
headers: _objectSpread$E(_objectSpread$E({}, jwt ? {
|
|
582
593
|
Authorization: 'Bearer ' + jwt
|
|
583
594
|
} : {}), {}, {
|
|
584
595
|
'Content-Type': 'application/json'
|
|
585
596
|
}),
|
|
586
|
-
body: JSON.stringify(finalData)
|
|
597
|
+
body: finalData ? JSON.stringify(finalData) : undefined
|
|
587
598
|
}).then( /*#__PURE__*/function () {
|
|
588
599
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(r) {
|
|
589
600
|
var error, code, err;
|
|
@@ -627,10 +638,10 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
627
638
|
return undefined;
|
|
628
639
|
}
|
|
629
640
|
});
|
|
630
|
-
case
|
|
641
|
+
case 14:
|
|
631
642
|
response = _context2.sent;
|
|
632
643
|
return _context2.abrupt("return", response);
|
|
633
|
-
case
|
|
644
|
+
case 16:
|
|
634
645
|
case "end":
|
|
635
646
|
return _context2.stop();
|
|
636
647
|
}
|
|
@@ -669,7 +680,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
669
680
|
rootStore: this._rootStore,
|
|
670
681
|
fallBackToParams: true
|
|
671
682
|
});
|
|
672
|
-
if (data) createData = _objectSpread$
|
|
683
|
+
if (data) createData = _objectSpread$E({}, data);
|
|
673
684
|
} else if (data !== undefined) {
|
|
674
685
|
createData = aplyMapping({
|
|
675
686
|
mapable: data,
|
|
@@ -810,7 +821,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
810
821
|
_context6.next = 7;
|
|
811
822
|
return fetch((_url = url) === null || _url === void 0 ? void 0 : _url.toString(), {
|
|
812
823
|
method: isApi2 ? 'POST' : 'DELETE',
|
|
813
|
-
headers: _objectSpread$
|
|
824
|
+
headers: _objectSpread$E({}, jwt ? {
|
|
814
825
|
Authorization: 'Bearer ' + jwt
|
|
815
826
|
} : {})
|
|
816
827
|
}).then( /*#__PURE__*/function () {
|
|
@@ -926,7 +937,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
926
937
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
927
938
|
case 2:
|
|
928
939
|
jwt = (_this$_rootStore5 = this._rootStore) === null || _this$_rootStore5 === void 0 ? void 0 : _this$_rootStore5.dataStore.jwt;
|
|
929
|
-
url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
940
|
+
url = filterServerSide ? parseServersideFilters(_objectSpread$E(_objectSpread$E({}, filterServerSide), {}, {
|
|
930
941
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
931
942
|
baseUrl: this._readListUrl,
|
|
932
943
|
prefilter: prefilter
|
|
@@ -946,7 +957,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
946
957
|
});
|
|
947
958
|
case 6:
|
|
948
959
|
response = _context8.sent;
|
|
949
|
-
return _context8.abrupt("return", _objectSpread$
|
|
960
|
+
return _context8.abrupt("return", _objectSpread$E(_objectSpread$E({}, response), {}, {
|
|
950
961
|
data: response.data.map(function (d) {
|
|
951
962
|
return _this2.aplyJsonPath(d, _this2._readJsonPath);
|
|
952
963
|
})
|
|
@@ -970,7 +981,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
970
981
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
971
982
|
}
|
|
972
983
|
(_this$_rootStore6 = this._rootStore) === null || _this$_rootStore6 === void 0 ? void 0 : _this$_rootStore6.dataStore.jwt;
|
|
973
|
-
var url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
984
|
+
var url = filterServerSide ? parseServersideFilters(_objectSpread$E(_objectSpread$E({}, filterServerSide), {}, {
|
|
974
985
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
975
986
|
baseUrl: this._readListUrl,
|
|
976
987
|
prefilter: prefilter
|
|
@@ -1176,8 +1187,8 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1176
1187
|
}]);
|
|
1177
1188
|
}(_default$d);
|
|
1178
1189
|
|
|
1179
|
-
function ownKeys$
|
|
1180
|
-
function _objectSpread$
|
|
1190
|
+
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; }
|
|
1191
|
+
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; }
|
|
1181
1192
|
function _callSuper$6(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$6() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1182
1193
|
function _isNativeReflectConstruct$6() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$6 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1183
1194
|
var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
@@ -1276,7 +1287,7 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1276
1287
|
_context2.next = 5;
|
|
1277
1288
|
return fetch(this._createUrl + '?ref=true', {
|
|
1278
1289
|
method: this._createMethod,
|
|
1279
|
-
headers: _objectSpread$
|
|
1290
|
+
headers: _objectSpread$D({}, jwt ? {
|
|
1280
1291
|
Authorization: 'Bearer ' + jwt
|
|
1281
1292
|
} : {}),
|
|
1282
1293
|
body: data
|
|
@@ -1652,8 +1663,8 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1652
1663
|
}]);
|
|
1653
1664
|
}(_default$d);
|
|
1654
1665
|
|
|
1655
|
-
function ownKeys$
|
|
1656
|
-
function _objectSpread$
|
|
1666
|
+
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; }
|
|
1667
|
+
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; }
|
|
1657
1668
|
var _default$7 = /*#__PURE__*/function () {
|
|
1658
1669
|
function _default(root) {
|
|
1659
1670
|
_classCallCheck(this, _default);
|
|
@@ -1680,7 +1691,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1680
1691
|
}
|
|
1681
1692
|
if (config.type == 'Menu') {
|
|
1682
1693
|
var filteredItems = filterMenuByPermission(this.root.actions.userHasPermission, config.items);
|
|
1683
|
-
config = _objectSpread$
|
|
1694
|
+
config = _objectSpread$C(_objectSpread$C({}, config), {}, {
|
|
1684
1695
|
items: filteredItems
|
|
1685
1696
|
});
|
|
1686
1697
|
} else if (config.type == 'Group') {
|
|
@@ -1689,7 +1700,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1689
1700
|
var _i$permission;
|
|
1690
1701
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
1691
1702
|
});
|
|
1692
|
-
config = _objectSpread$
|
|
1703
|
+
config = _objectSpread$C(_objectSpread$C({}, config), {}, {
|
|
1693
1704
|
items: _filteredItems
|
|
1694
1705
|
});
|
|
1695
1706
|
}
|
|
@@ -1759,7 +1770,7 @@ function filterMenuByPermission(hasPermission, items) {
|
|
|
1759
1770
|
return items.filter(function (item) {
|
|
1760
1771
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
1761
1772
|
}).map(function (item) {
|
|
1762
|
-
return _objectSpread$
|
|
1773
|
+
return _objectSpread$C(_objectSpread$C({}, item), {}, {
|
|
1763
1774
|
items: filterMenuByPermission(hasPermission, item.items)
|
|
1764
1775
|
});
|
|
1765
1776
|
}).filter(function (item) {
|
|
@@ -1775,6 +1786,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
1775
1786
|
title: t('backoffice.applicationstatus.title'),
|
|
1776
1787
|
canRefresh: true,
|
|
1777
1788
|
histogram: {
|
|
1789
|
+
type: 'applicationStatus',
|
|
1778
1790
|
headerText: t('backoffice.table.applicationlogs.histogram.headerText'),
|
|
1779
1791
|
tooltipText: t('backoffice.table.applicationlogs.histogram.tooltipText'),
|
|
1780
1792
|
height: 300,
|
|
@@ -1787,7 +1799,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
1787
1799
|
variable: 'data.total'
|
|
1788
1800
|
},
|
|
1789
1801
|
sizeItems: 50000,
|
|
1790
|
-
|
|
1802
|
+
field: 'status',
|
|
1791
1803
|
apiInterface: {
|
|
1792
1804
|
read: '${analyticsService}/businessevents/histogram'
|
|
1793
1805
|
},
|
|
@@ -4023,6 +4035,21 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
4023
4035
|
type: 'Table',
|
|
4024
4036
|
canRefresh: true,
|
|
4025
4037
|
rowKey: '_id',
|
|
4038
|
+
histogram: {
|
|
4039
|
+
type: 'default',
|
|
4040
|
+
title: {
|
|
4041
|
+
text: t('backoffice.suborganization.histogram.title')
|
|
4042
|
+
},
|
|
4043
|
+
field: 'organizationName',
|
|
4044
|
+
interval: '7d',
|
|
4045
|
+
topPics: 100,
|
|
4046
|
+
from: new Date().setMonth(new Date().getMonth() - 6),
|
|
4047
|
+
to: new Date().setHours(0, 0, 0, 0),
|
|
4048
|
+
filter: '[{action,in,onLoadBasket},{organizationsId,in,${selectedOrganizationId}}]',
|
|
4049
|
+
sizeItems: 0,
|
|
4050
|
+
description: 'histogram.backoffice.suborganization.coonfiguratorcalls',
|
|
4051
|
+
permission: 'analyticsmodel'
|
|
4052
|
+
},
|
|
4026
4053
|
columns: [{
|
|
4027
4054
|
title: 'ID',
|
|
4028
4055
|
field: '_id',
|
|
@@ -4113,6 +4140,28 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
4113
4140
|
type: 'Table',
|
|
4114
4141
|
canRefresh: true,
|
|
4115
4142
|
rowKey: '_id',
|
|
4143
|
+
histogram: {
|
|
4144
|
+
title: {
|
|
4145
|
+
text: t('histogram.backoffice.user')
|
|
4146
|
+
},
|
|
4147
|
+
type: 'default',
|
|
4148
|
+
field: 'userid',
|
|
4149
|
+
interval: '7d',
|
|
4150
|
+
topPics: 100,
|
|
4151
|
+
from: new Date().setMonth(new Date().getMonth() - 6),
|
|
4152
|
+
to: new Date().setHours(0, 0, 0, 0),
|
|
4153
|
+
filter: '[{action,in,onLoadBasket},{organizationsId,in,${selectedOrganizationId}}]',
|
|
4154
|
+
sizeItems: 0,
|
|
4155
|
+
description: 'histogram.backoffice.usercalls',
|
|
4156
|
+
permission: 'analyticsmodel',
|
|
4157
|
+
apiTranslation: {
|
|
4158
|
+
service: 'AUTH',
|
|
4159
|
+
path: '/v2/users',
|
|
4160
|
+
field: ['familyName', 'name'],
|
|
4161
|
+
key: '_id'
|
|
4162
|
+
},
|
|
4163
|
+
component: 'USERS'
|
|
4164
|
+
},
|
|
4116
4165
|
columns: [{
|
|
4117
4166
|
title: t('backoffice.table.allorgusers.name'),
|
|
4118
4167
|
field: 'name',
|
|
@@ -4344,53 +4393,41 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
4344
4393
|
title: t('backoffice.table.rooms.columns.name'),
|
|
4345
4394
|
field: 'name',
|
|
4346
4395
|
sorter: 1,
|
|
4347
|
-
filter: 'advanced'
|
|
4348
|
-
|
|
4349
|
-
title: t('backoffice.table.rooms.columns.description'),
|
|
4350
|
-
field: 'description',
|
|
4351
|
-
sorter: 2,
|
|
4352
|
-
filter: 'advanced'
|
|
4396
|
+
filter: 'advanced',
|
|
4397
|
+
width: 150
|
|
4353
4398
|
}, {
|
|
4354
4399
|
title: t('backoffice.table.rooms.columns.mainCategory'),
|
|
4355
4400
|
field: 'mainCategory',
|
|
4356
4401
|
sorter: 3,
|
|
4357
|
-
filter: 'advanced'
|
|
4358
|
-
|
|
4359
|
-
title: t('backoffice.table.rooms.columns.style'),
|
|
4360
|
-
field: 'style',
|
|
4361
|
-
sorter: 4,
|
|
4362
|
-
filter: 'advanced'
|
|
4363
|
-
}, {
|
|
4364
|
-
title: t('backoffice.table.rooms.columns.color'),
|
|
4365
|
-
field: 'color',
|
|
4366
|
-
sorter: 5,
|
|
4367
|
-
filter: 'advanced'
|
|
4402
|
+
filter: 'advanced',
|
|
4403
|
+
width: 100
|
|
4368
4404
|
}, {
|
|
4369
4405
|
title: t('backoffice.table.rooms.columns.blenderVersion'),
|
|
4370
4406
|
field: 'blenderVersion',
|
|
4371
4407
|
sorter: 6,
|
|
4372
|
-
filter: 'advanced'
|
|
4408
|
+
filter: 'advanced',
|
|
4409
|
+
width: 100
|
|
4373
4410
|
}, {
|
|
4374
4411
|
title: t('backoffice.table.rooms.columns.previewImage'),
|
|
4375
4412
|
field: 'previewImage',
|
|
4376
4413
|
sorter: 7,
|
|
4377
4414
|
type: 'media'
|
|
4378
|
-
}, {
|
|
4379
|
-
title: t('backoffice.table.rooms.columns.sceneName'),
|
|
4380
|
-
field: 'sceneName'
|
|
4381
4415
|
}, {
|
|
4382
4416
|
title: t('backoffice.table.rooms.columns.isExclusiv'),
|
|
4383
4417
|
field: 'organizations',
|
|
4384
|
-
type: 'boolean'
|
|
4418
|
+
type: 'boolean',
|
|
4419
|
+
width: 100
|
|
4385
4420
|
}, {
|
|
4386
4421
|
title: t('backoffice.table.rooms.columns.lastUpdated'),
|
|
4387
4422
|
field: 'lastUpdated',
|
|
4388
|
-
type: 'unixTimeStamp'
|
|
4423
|
+
type: 'unixTimeStamp',
|
|
4424
|
+
width: 150
|
|
4389
4425
|
}, {
|
|
4390
4426
|
title: t('backoffice.table.rooms.columns.created'),
|
|
4391
4427
|
field: 'created',
|
|
4392
4428
|
type: 'unixTimeStamp',
|
|
4393
|
-
sorter: 8
|
|
4429
|
+
sorter: 8,
|
|
4430
|
+
width: 150
|
|
4394
4431
|
}],
|
|
4395
4432
|
apiInterface: {
|
|
4396
4433
|
read: {
|
|
@@ -4400,11 +4437,23 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
4400
4437
|
"delete": '${mediaService}/rooms/${id}'
|
|
4401
4438
|
},
|
|
4402
4439
|
rowAction: [{
|
|
4440
|
+
actionType: 'Detail',
|
|
4441
|
+
type: 'Form',
|
|
4442
|
+
id: 'FormMergeRoom',
|
|
4443
|
+
title: t('backoffice.table.apikeys.rowAction.mergeRoom'),
|
|
4444
|
+
label: t('backoffice.table.apikeys.rowAction.mergeRoom')
|
|
4445
|
+
}, {
|
|
4403
4446
|
actionType: 'Detail',
|
|
4404
4447
|
type: 'RelationSelector',
|
|
4405
4448
|
id: 'SelectorRoomOrganizations',
|
|
4406
4449
|
title: t('backoffice.table.apikeys.rowAction.SelectorApiOrganizations.label'),
|
|
4407
4450
|
label: t('backoffice.table.apikeys.rowAction.SelectorApiOrganizations.label')
|
|
4451
|
+
}, {
|
|
4452
|
+
actionType: 'Detail',
|
|
4453
|
+
type: 'List',
|
|
4454
|
+
id: 'RoomVariantList',
|
|
4455
|
+
title: t('backoffice.table.apikeys.rowAction.showRoomVariants'),
|
|
4456
|
+
label: t('backoffice.table.apikeys.rowAction.showRoomVariants')
|
|
4408
4457
|
}]
|
|
4409
4458
|
},
|
|
4410
4459
|
TableRenderjobs: {
|
|
@@ -6206,6 +6255,40 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
6206
6255
|
type: 'input'
|
|
6207
6256
|
}]
|
|
6208
6257
|
},
|
|
6258
|
+
FormMergeRoom: {
|
|
6259
|
+
type: 'Form',
|
|
6260
|
+
apiInterface: {
|
|
6261
|
+
update: {
|
|
6262
|
+
url: '${mediaService}/rooms/merge?sourceRoomId={sourceRoomId}&targetRoomId={_id}',
|
|
6263
|
+
method: 'PATCH',
|
|
6264
|
+
noBody: true
|
|
6265
|
+
}
|
|
6266
|
+
},
|
|
6267
|
+
items: [{
|
|
6268
|
+
name: '_id',
|
|
6269
|
+
label: 'ID',
|
|
6270
|
+
type: 'input',
|
|
6271
|
+
readonly: true
|
|
6272
|
+
}, {
|
|
6273
|
+
name: 'sourceRoomId',
|
|
6274
|
+
valueField: '_id',
|
|
6275
|
+
label: t('Raum'),
|
|
6276
|
+
required: true,
|
|
6277
|
+
mode: 'single',
|
|
6278
|
+
type: 'select',
|
|
6279
|
+
apiInterface: {
|
|
6280
|
+
read: '${mediaService}/rooms'
|
|
6281
|
+
},
|
|
6282
|
+
selectMapping: {
|
|
6283
|
+
label: '${_id} ${name}',
|
|
6284
|
+
value: '_id',
|
|
6285
|
+
searchField: [{
|
|
6286
|
+
field: 'name',
|
|
6287
|
+
filter: 'contains'
|
|
6288
|
+
}]
|
|
6289
|
+
}
|
|
6290
|
+
}]
|
|
6291
|
+
},
|
|
6209
6292
|
FormUserDetails: {
|
|
6210
6293
|
type: 'Form',
|
|
6211
6294
|
apiInterface: {
|
|
@@ -9305,6 +9388,87 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
9305
9388
|
AUTH_0020: t('errorcodes._source.labels.error.AUTH_0020')
|
|
9306
9389
|
}
|
|
9307
9390
|
},
|
|
9391
|
+
RoomVariantList: {
|
|
9392
|
+
type: 'List',
|
|
9393
|
+
apiInterface: {
|
|
9394
|
+
read: '${mediaService}/rooms/${roomId}/variants',
|
|
9395
|
+
"delete": '${mediaService}/rooms/${roomId}/variants?variantId=${variantId}',
|
|
9396
|
+
update: {
|
|
9397
|
+
url: '${mediaService}/rooms/{_id}/variant/{id}/default?value={default}',
|
|
9398
|
+
noBody: true,
|
|
9399
|
+
method: 'PATCH'
|
|
9400
|
+
}
|
|
9401
|
+
},
|
|
9402
|
+
canDelete: true,
|
|
9403
|
+
mapping: {
|
|
9404
|
+
type: 'query',
|
|
9405
|
+
map: [{
|
|
9406
|
+
sourceField: '_id',
|
|
9407
|
+
targetField: 'roomId'
|
|
9408
|
+
}, {
|
|
9409
|
+
sourceField: 'id',
|
|
9410
|
+
targetField: 'variantId'
|
|
9411
|
+
}]
|
|
9412
|
+
},
|
|
9413
|
+
itemMapping: {
|
|
9414
|
+
title: [{
|
|
9415
|
+
field: 'name'
|
|
9416
|
+
}],
|
|
9417
|
+
description: [{
|
|
9418
|
+
field: 'description'
|
|
9419
|
+
}],
|
|
9420
|
+
id: [{
|
|
9421
|
+
field: 'id'
|
|
9422
|
+
}],
|
|
9423
|
+
image: [{
|
|
9424
|
+
field: 'previewImage'
|
|
9425
|
+
}],
|
|
9426
|
+
itemUpdate: [{
|
|
9427
|
+
field: 'variants.default',
|
|
9428
|
+
title: 'Default',
|
|
9429
|
+
type: 'boolean'
|
|
9430
|
+
}]
|
|
9431
|
+
}
|
|
9432
|
+
},
|
|
9433
|
+
SelectorRoomVariants: {
|
|
9434
|
+
type: 'RelationSelector',
|
|
9435
|
+
searchApiInterface: {
|
|
9436
|
+
read: '${mediaService}/rooms/${roomId}/variants'
|
|
9437
|
+
},
|
|
9438
|
+
apiInterface: {
|
|
9439
|
+
read: '${mediaService}/rooms/${roomId}/variants',
|
|
9440
|
+
"delete": '${mediaService}/rooms/${roomId}/variants?variantId=${variantId}'
|
|
9441
|
+
},
|
|
9442
|
+
configuration: {
|
|
9443
|
+
download: false,
|
|
9444
|
+
readListMapping: {
|
|
9445
|
+
type: 'query',
|
|
9446
|
+
map: [{
|
|
9447
|
+
sourceField: '_id',
|
|
9448
|
+
targetField: 'roomId'
|
|
9449
|
+
}]
|
|
9450
|
+
},
|
|
9451
|
+
deleteMapping: {
|
|
9452
|
+
type: 'query',
|
|
9453
|
+
map: [{
|
|
9454
|
+
sourceField: '_id',
|
|
9455
|
+
targetField: 'roomId'
|
|
9456
|
+
}, {
|
|
9457
|
+
sourceField: 'id',
|
|
9458
|
+
targetField: 'variantId'
|
|
9459
|
+
}]
|
|
9460
|
+
},
|
|
9461
|
+
functionalities: {
|
|
9462
|
+
canDelete: true,
|
|
9463
|
+
canEdit: false,
|
|
9464
|
+
canFilter: false
|
|
9465
|
+
},
|
|
9466
|
+
list: {
|
|
9467
|
+
title: ['name'],
|
|
9468
|
+
description: ['_id']
|
|
9469
|
+
}
|
|
9470
|
+
}
|
|
9471
|
+
},
|
|
9308
9472
|
SelectorRoomOrganizations: {
|
|
9309
9473
|
type: 'RelationSelector',
|
|
9310
9474
|
searchApiInterface: {
|
|
@@ -11132,7 +11296,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11132
11296
|
}
|
|
11133
11297
|
}, _callee, null, [[8, 17, 20, 23]]);
|
|
11134
11298
|
}));
|
|
11135
|
-
return function (
|
|
11299
|
+
return function (_x) {
|
|
11136
11300
|
return _ref2.apply(this, arguments);
|
|
11137
11301
|
};
|
|
11138
11302
|
}());
|
|
@@ -11174,7 +11338,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11174
11338
|
}
|
|
11175
11339
|
}, _callee2, this);
|
|
11176
11340
|
}));
|
|
11177
|
-
function donwloadFile(
|
|
11341
|
+
function donwloadFile(_x2, _x3) {
|
|
11178
11342
|
return _donwloadFile.apply(this, arguments);
|
|
11179
11343
|
}
|
|
11180
11344
|
return donwloadFile;
|
|
@@ -11214,7 +11378,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11214
11378
|
}
|
|
11215
11379
|
}, _callee3, this);
|
|
11216
11380
|
}));
|
|
11217
|
-
function connectionFile(
|
|
11381
|
+
function connectionFile(_x4, _x5, _x6, _x7, _x8) {
|
|
11218
11382
|
return _connectionFile.apply(this, arguments);
|
|
11219
11383
|
}
|
|
11220
11384
|
return connectionFile;
|
|
@@ -11278,23 +11442,15 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11278
11442
|
}
|
|
11279
11443
|
}, _callee4, this, [[14, 22]]);
|
|
11280
11444
|
}));
|
|
11281
|
-
function getConnectionData(
|
|
11445
|
+
function getConnectionData(_x9, _x10) {
|
|
11282
11446
|
return _getConnectionData.apply(this, arguments);
|
|
11283
11447
|
}
|
|
11284
11448
|
return getConnectionData;
|
|
11285
11449
|
}()
|
|
11286
11450
|
}, {
|
|
11287
11451
|
key: "downloadRequest",
|
|
11288
|
-
value: function (
|
|
11289
|
-
function
|
|
11290
|
-
return _downloadRequest.apply(this, arguments);
|
|
11291
|
-
}
|
|
11292
|
-
downloadRequest.toString = function () {
|
|
11293
|
-
return _downloadRequest.toString();
|
|
11294
|
-
};
|
|
11295
|
-
return downloadRequest;
|
|
11296
|
-
}( /*#__PURE__*/function () {
|
|
11297
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(download, data) {
|
|
11452
|
+
value: function () {
|
|
11453
|
+
var _downloadRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(download, data) {
|
|
11298
11454
|
var _this$_rootStore2;
|
|
11299
11455
|
var url, result, base64File, a, mimeType, res;
|
|
11300
11456
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
@@ -11344,10 +11500,11 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11344
11500
|
}
|
|
11345
11501
|
}, _callee5, this);
|
|
11346
11502
|
}));
|
|
11347
|
-
|
|
11348
|
-
return
|
|
11349
|
-
}
|
|
11350
|
-
|
|
11503
|
+
function downloadRequest(_x11, _x12) {
|
|
11504
|
+
return _downloadRequest.apply(this, arguments);
|
|
11505
|
+
}
|
|
11506
|
+
return downloadRequest;
|
|
11507
|
+
}()
|
|
11351
11508
|
}, {
|
|
11352
11509
|
key: "checkCondition",
|
|
11353
11510
|
value: function checkCondition(download, data) {
|
|
@@ -11423,7 +11580,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11423
11580
|
}
|
|
11424
11581
|
}, _callee6, this, [[3, 16, 19, 22]]);
|
|
11425
11582
|
}));
|
|
11426
|
-
function openDownload(
|
|
11583
|
+
function openDownload(_x13) {
|
|
11427
11584
|
return _openDownload.apply(this, arguments);
|
|
11428
11585
|
}
|
|
11429
11586
|
return openDownload;
|
|
@@ -11642,8 +11799,8 @@ function getCombinedValues(data, pattern) {
|
|
|
11642
11799
|
function _createForOfIteratorHelper$i(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$i(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
11643
11800
|
function _unsupportedIterableToArray$i(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$i(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$i(o, minLen); }
|
|
11644
11801
|
function _arrayLikeToArray$i(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11645
|
-
function ownKeys$
|
|
11646
|
-
function _objectSpread$
|
|
11802
|
+
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; }
|
|
11803
|
+
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; }
|
|
11647
11804
|
function useDescriptions (_ref) {
|
|
11648
11805
|
var id = _ref.id;
|
|
11649
11806
|
var root = useStore();
|
|
@@ -11736,7 +11893,7 @@ function _getDisplayData() {
|
|
|
11736
11893
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
11737
11894
|
while (1) switch (_context4.prev = _context4.next) {
|
|
11738
11895
|
case 0:
|
|
11739
|
-
displayData = _objectSpread$
|
|
11896
|
+
displayData = _objectSpread$B({}, data);
|
|
11740
11897
|
_iterator = _createForOfIteratorHelper$i(items);
|
|
11741
11898
|
_context4.prev = 2;
|
|
11742
11899
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -11812,8 +11969,8 @@ function _getDisplayData() {
|
|
|
11812
11969
|
return _getDisplayData.apply(this, arguments);
|
|
11813
11970
|
}
|
|
11814
11971
|
|
|
11815
|
-
function ownKeys$
|
|
11816
|
-
function _objectSpread$
|
|
11972
|
+
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; }
|
|
11973
|
+
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; }
|
|
11817
11974
|
function _createForOfIteratorHelper$h(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$h(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
11818
11975
|
function _unsupportedIterableToArray$h(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$h(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$h(o, minLen); }
|
|
11819
11976
|
function _arrayLikeToArray$h(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -11955,7 +12112,7 @@ function ActionButton (_ref) {
|
|
|
11955
12112
|
_iterator2.f();
|
|
11956
12113
|
}
|
|
11957
12114
|
_context.next = 23;
|
|
11958
|
-
return apiInterface.update(_objectSpread$
|
|
12115
|
+
return apiInterface.update(_objectSpread$A(_objectSpread$A({}, data), {}, {
|
|
11959
12116
|
state: toSwitch
|
|
11960
12117
|
}), data);
|
|
11961
12118
|
case 23:
|
|
@@ -12112,14 +12269,14 @@ function _simpleChangeValue() {
|
|
|
12112
12269
|
break;
|
|
12113
12270
|
}
|
|
12114
12271
|
for (i = 0; i < action.newValues.length; i++) {
|
|
12115
|
-
fieldsToUpdate = _objectSpread$
|
|
12272
|
+
fieldsToUpdate = _objectSpread$A(_objectSpread$A({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
12116
12273
|
}
|
|
12117
12274
|
if (!apiInterface.canUpdate) {
|
|
12118
12275
|
_context2.next = 9;
|
|
12119
12276
|
break;
|
|
12120
12277
|
}
|
|
12121
12278
|
_context2.next = 7;
|
|
12122
|
-
return apiInterface.update(_objectSpread$
|
|
12279
|
+
return apiInterface.update(_objectSpread$A({}, fieldsToUpdate), data);
|
|
12123
12280
|
case 7:
|
|
12124
12281
|
response = _context2.sent;
|
|
12125
12282
|
return _context2.abrupt("return", response);
|
|
@@ -12134,7 +12291,7 @@ function _simpleChangeValue() {
|
|
|
12134
12291
|
return _simpleChangeValue.apply(this, arguments);
|
|
12135
12292
|
}
|
|
12136
12293
|
function A(props) {
|
|
12137
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
12294
|
+
return /*#__PURE__*/jsx("a", _objectSpread$A({}, props));
|
|
12138
12295
|
}
|
|
12139
12296
|
|
|
12140
12297
|
var DescriptionWrapper = function DescriptionWrapper(_ref) {
|
|
@@ -12181,8 +12338,8 @@ var Description = observer(DescriptionWrapper);
|
|
|
12181
12338
|
function _createForOfIteratorHelper$g(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$g(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
12182
12339
|
function _unsupportedIterableToArray$g(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$g(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$g(o, minLen); }
|
|
12183
12340
|
function _arrayLikeToArray$g(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12184
|
-
function ownKeys$
|
|
12185
|
-
function _objectSpread$
|
|
12341
|
+
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; }
|
|
12342
|
+
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; }
|
|
12186
12343
|
function useSelectData (_ref) {
|
|
12187
12344
|
var data = _ref.data,
|
|
12188
12345
|
onChange = _ref.onChange,
|
|
@@ -12363,7 +12520,7 @@ function useSelectData (_ref) {
|
|
|
12363
12520
|
setFetching(true);
|
|
12364
12521
|
serverSideParams = {
|
|
12365
12522
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
12366
|
-
return _objectSpread$
|
|
12523
|
+
return _objectSpread$z(_objectSpread$z({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
12367
12524
|
}, {}) : {
|
|
12368
12525
|
_id: [value, 'contains']
|
|
12369
12526
|
},
|
|
@@ -12862,8 +13019,8 @@ function removeEmpty(data) {
|
|
|
12862
13019
|
return undefined;
|
|
12863
13020
|
}
|
|
12864
13021
|
|
|
12865
|
-
function ownKeys$
|
|
12866
|
-
function _objectSpread$
|
|
13022
|
+
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; }
|
|
13023
|
+
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; }
|
|
12867
13024
|
function _createForOfIteratorHelper$e(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$e(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
12868
13025
|
function _unsupportedIterableToArray$e(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$e(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$e(o, minLen); }
|
|
12869
13026
|
function _arrayLikeToArray$e(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -12956,7 +13113,7 @@ function useFormData (_ref) {
|
|
|
12956
13113
|
multipleEditingData = inboundData;
|
|
12957
13114
|
}
|
|
12958
13115
|
return {
|
|
12959
|
-
loadedData: onLoadFields(_objectSpread$
|
|
13116
|
+
loadedData: onLoadFields(_objectSpread$y({}, dt)),
|
|
12960
13117
|
multipleEditingData: multipleEditingData
|
|
12961
13118
|
};
|
|
12962
13119
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -12993,7 +13150,7 @@ function useFormData (_ref) {
|
|
|
12993
13150
|
setFieldErrors = _useState14[1];
|
|
12994
13151
|
useEffect(function () {
|
|
12995
13152
|
var _loadedData$_id2;
|
|
12996
|
-
setState(_objectSpread$
|
|
13153
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
12997
13154
|
data: loadedData,
|
|
12998
13155
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
12999
13156
|
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),
|
|
@@ -13084,11 +13241,11 @@ function useFormData (_ref) {
|
|
|
13084
13241
|
mediaHandler = _useDivaCore2.handler.mediaHandler;
|
|
13085
13242
|
var onSave = /*#__PURE__*/function () {
|
|
13086
13243
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(values) {
|
|
13087
|
-
var newData, finalData, response, i, _configuration$additi, additional, additionalApi,
|
|
13244
|
+
var newData, finalData, response, i, _configuration$additi, additional, additionalApi, data, errorCode, item;
|
|
13088
13245
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
13089
13246
|
while (1) switch (_context2.prev = _context2.next) {
|
|
13090
13247
|
case 0:
|
|
13091
|
-
newData = _objectSpread$
|
|
13248
|
+
newData = _objectSpread$y({}, state.data);
|
|
13092
13249
|
Object.keys(values).forEach(function (k) {
|
|
13093
13250
|
var _values$k$value, _values$k;
|
|
13094
13251
|
return newData[k] = (_values$k$value = (_values$k = values[k]) === null || _values$k === void 0 ? void 0 : _values$k.value) !== null && _values$k$value !== void 0 ? _values$k$value : values[k];
|
|
@@ -13100,12 +13257,12 @@ function useFormData (_ref) {
|
|
|
13100
13257
|
return _context2.abrupt("return", newData);
|
|
13101
13258
|
case 4:
|
|
13102
13259
|
_context2.next = 6;
|
|
13103
|
-
return setDynamicFields(_objectSpread$
|
|
13260
|
+
return setDynamicFields(_objectSpread$y({}, state.data), newData);
|
|
13104
13261
|
case 6:
|
|
13105
13262
|
newData = _context2.sent;
|
|
13106
|
-
newData = onSaveFields(_objectSpread$
|
|
13263
|
+
newData = onSaveFields(_objectSpread$y({}, state.data), newData);
|
|
13107
13264
|
newData = removeEmpty(newData);
|
|
13108
|
-
setState(_objectSpread$
|
|
13265
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13109
13266
|
loading: true
|
|
13110
13267
|
}));
|
|
13111
13268
|
finalData = state.data;
|
|
@@ -13125,12 +13282,12 @@ function useFormData (_ref) {
|
|
|
13125
13282
|
additionalApi = new _default$d({
|
|
13126
13283
|
apiInterface: additional.apiInterface
|
|
13127
13284
|
}, root);
|
|
13128
|
-
|
|
13285
|
+
data = {};
|
|
13129
13286
|
if (additional.addBaseUrl) {
|
|
13130
|
-
|
|
13287
|
+
data[additional.addBaseUrl] = window.location.origin;
|
|
13131
13288
|
}
|
|
13132
13289
|
_context2.next = 23;
|
|
13133
|
-
return additionalApi.create(
|
|
13290
|
+
return additionalApi.create(data, additional.mapping, response);
|
|
13134
13291
|
case 23:
|
|
13135
13292
|
i++;
|
|
13136
13293
|
_context2.next = 16;
|
|
@@ -13154,13 +13311,13 @@ function useFormData (_ref) {
|
|
|
13154
13311
|
_context2.next = 38;
|
|
13155
13312
|
break;
|
|
13156
13313
|
}
|
|
13157
|
-
setFieldErrors(_objectSpread$
|
|
13314
|
+
setFieldErrors(_objectSpread$y(_objectSpread$y({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
13158
13315
|
return _context2.abrupt("return", undefined);
|
|
13159
13316
|
case 38:
|
|
13160
13317
|
throw _context2.t0;
|
|
13161
13318
|
case 39:
|
|
13162
13319
|
_context2.prev = 39;
|
|
13163
|
-
setState(_objectSpread$
|
|
13320
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13164
13321
|
data: finalData,
|
|
13165
13322
|
loading: false
|
|
13166
13323
|
}));
|
|
@@ -13190,7 +13347,7 @@ function useFormData (_ref) {
|
|
|
13190
13347
|
}
|
|
13191
13348
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
13192
13349
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
13193
|
-
var wholeData = Object.assign(_objectSpread$
|
|
13350
|
+
var wholeData = Object.assign(_objectSpread$y({}, state.data), _objectSpread$y({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
13194
13351
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
13195
13352
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
13196
13353
|
setHiddenRequiredDisabled(newState);
|
|
@@ -13203,12 +13360,12 @@ function useFormData (_ref) {
|
|
|
13203
13360
|
}
|
|
13204
13361
|
};
|
|
13205
13362
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
13206
|
-
var data = d !== null && d !== void 0 ? d : Object.assign(_objectSpread$
|
|
13363
|
+
var data = d !== null && d !== void 0 ? d : Object.assign(_objectSpread$y({}, state.data), _objectSpread$y({}, state.form.getFieldsValue()));
|
|
13207
13364
|
setFieldInObject(id, data, value);
|
|
13208
|
-
var newFieldErrors = _objectSpread$
|
|
13365
|
+
var newFieldErrors = _objectSpread$y({}, fieldErrors);
|
|
13209
13366
|
delete newFieldErrors[id.toString()];
|
|
13210
13367
|
setFieldErrors(newFieldErrors);
|
|
13211
|
-
setState(_objectSpread$
|
|
13368
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13212
13369
|
data: data
|
|
13213
13370
|
}));
|
|
13214
13371
|
return data;
|
|
@@ -13234,12 +13391,12 @@ function useFormData (_ref) {
|
|
|
13234
13391
|
var _value$value;
|
|
13235
13392
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
13236
13393
|
if (configuration.itemSelectorReset) {
|
|
13237
|
-
setState(_objectSpread$
|
|
13394
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13238
13395
|
data: _defineProperty({}, name, val)
|
|
13239
13396
|
}));
|
|
13240
13397
|
} else {
|
|
13241
|
-
setState(_objectSpread$
|
|
13242
|
-
data: _objectSpread$
|
|
13398
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13399
|
+
data: _objectSpread$y(_objectSpread$y({}, state.data), {}, _defineProperty({}, name, val))
|
|
13243
13400
|
}));
|
|
13244
13401
|
}
|
|
13245
13402
|
setSelectedItemsIndex(idx);
|
|
@@ -13249,12 +13406,12 @@ function useFormData (_ref) {
|
|
|
13249
13406
|
var val = _ref6.value;
|
|
13250
13407
|
if (value === val) {
|
|
13251
13408
|
if (configuration.itemSelectorReset) {
|
|
13252
|
-
setState(_objectSpread$
|
|
13409
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13253
13410
|
data: _defineProperty({}, name, val)
|
|
13254
13411
|
}));
|
|
13255
13412
|
} else {
|
|
13256
|
-
setState(_objectSpread$
|
|
13257
|
-
data: _objectSpread$
|
|
13413
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13414
|
+
data: _objectSpread$y(_objectSpread$y({}, state.data), {}, _defineProperty({}, name, val))
|
|
13258
13415
|
}));
|
|
13259
13416
|
}
|
|
13260
13417
|
setSelectedItemsIndex(idx);
|
|
@@ -13368,7 +13525,7 @@ function useFormData (_ref) {
|
|
|
13368
13525
|
}));
|
|
13369
13526
|
return _setDynamicFields.apply(this, arguments);
|
|
13370
13527
|
}
|
|
13371
|
-
return _objectSpread$
|
|
13528
|
+
return _objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13372
13529
|
setUsedPreset: setUsedPreset,
|
|
13373
13530
|
configuration: configuration,
|
|
13374
13531
|
changedFields: changedFields,
|
|
@@ -13426,8 +13583,8 @@ function getData(id, data) {
|
|
|
13426
13583
|
}
|
|
13427
13584
|
}
|
|
13428
13585
|
|
|
13429
|
-
function ownKeys$
|
|
13430
|
-
function _objectSpread$
|
|
13586
|
+
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; }
|
|
13587
|
+
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; }
|
|
13431
13588
|
function _createForOfIteratorHelper$d(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$d(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
13432
13589
|
function _unsupportedIterableToArray$d(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$d(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$d(o, minLen); }
|
|
13433
13590
|
function _arrayLikeToArray$d(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -13477,13 +13634,13 @@ var Presets = function Presets(_ref) {
|
|
|
13477
13634
|
} finally {
|
|
13478
13635
|
_iterator.f();
|
|
13479
13636
|
}
|
|
13480
|
-
var data = _objectSpread$
|
|
13637
|
+
var data = _objectSpread$x(_objectSpread$x({}, form.getFieldsValue(names)), {}, {
|
|
13481
13638
|
newPresetName: newPresetName
|
|
13482
13639
|
});
|
|
13483
13640
|
data.dpi = parseInt(data.dpi);
|
|
13484
13641
|
data.organization = root.getGlobalValue('organizationId');
|
|
13485
13642
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
13486
|
-
var dt = _objectSpread$
|
|
13643
|
+
var dt = _objectSpread$x(_objectSpread$x({}, form.getFieldsValue(names)), {}, {
|
|
13487
13644
|
name: newPresetName
|
|
13488
13645
|
});
|
|
13489
13646
|
setPresets({
|
|
@@ -13619,9 +13776,9 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
13619
13776
|
mode: 'code',
|
|
13620
13777
|
onChange: function onChange() {
|
|
13621
13778
|
try {
|
|
13622
|
-
var
|
|
13779
|
+
var e = jsonEditor.current.get();
|
|
13623
13780
|
jsonEditor.current.validate();
|
|
13624
|
-
_onChange === null || _onChange === void 0 || _onChange(
|
|
13781
|
+
_onChange === null || _onChange === void 0 || _onChange(e);
|
|
13625
13782
|
setCanSave(savable);
|
|
13626
13783
|
} catch (_unused) {
|
|
13627
13784
|
setCanSave(false);
|
|
@@ -13727,7 +13884,7 @@ function useButtonData (_ref) {
|
|
|
13727
13884
|
}, [loading]);
|
|
13728
13885
|
var onClick = /*#__PURE__*/function () {
|
|
13729
13886
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
13730
|
-
var
|
|
13887
|
+
var result, _ref3, _result$error, newData;
|
|
13731
13888
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
13732
13889
|
while (1) switch (_context.prev = _context.next) {
|
|
13733
13890
|
case 0:
|
|
@@ -13736,21 +13893,21 @@ function useButtonData (_ref) {
|
|
|
13736
13893
|
_context.next = 4;
|
|
13737
13894
|
return apiHandler.create({}, configuration.mapping, data);
|
|
13738
13895
|
case 4:
|
|
13739
|
-
|
|
13740
|
-
if (!
|
|
13896
|
+
result = _context.sent;
|
|
13897
|
+
if (!result || result.error || result.Error) {
|
|
13741
13898
|
configuration.resultTranslation && setActionResult({
|
|
13742
13899
|
type: 'error',
|
|
13743
|
-
message: configuration.resultTranslation ? t(configuration.resultTranslation.failed) : (_ref3 = (_result$error =
|
|
13900
|
+
message: configuration.resultTranslation ? t(configuration.resultTranslation.failed) : (_ref3 = (_result$error = result.error) !== null && _result$error !== void 0 ? _result$error : result.Error) !== null && _ref3 !== void 0 ? _ref3 : 'Failed'
|
|
13744
13901
|
});
|
|
13745
13902
|
} else {
|
|
13746
13903
|
configuration.resultTranslation && setActionResult({
|
|
13747
13904
|
type: 'success',
|
|
13748
|
-
message: configuration.resultTranslation ? t(configuration.resultTranslation.success) :
|
|
13905
|
+
message: configuration.resultTranslation ? t(configuration.resultTranslation.success) : result !== null && result !== void 0 && result.result ? result.result : 'Success'
|
|
13749
13906
|
});
|
|
13750
13907
|
if (callback) {
|
|
13751
13908
|
newData = aplyMapping({
|
|
13752
13909
|
mapable: {},
|
|
13753
|
-
mappingData:
|
|
13910
|
+
mappingData: result,
|
|
13754
13911
|
mapping: configuration.resultMapping,
|
|
13755
13912
|
rootStore: root,
|
|
13756
13913
|
fallBackToParams: true
|
|
@@ -13866,8 +14023,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
13866
14023
|
var css_248z$h = ".wrapper-GVe2h {\n display: flex;\n flex-direction: row;\n gap: 12px;\n}\n\n.button-group-GYt-T {\n display: flex;\n flex-direction: row;\n gap: 12px;\n margin: 0 12px;\n}\n";
|
|
13867
14024
|
styleInject(css_248z$h);
|
|
13868
14025
|
|
|
13869
|
-
function ownKeys$
|
|
13870
|
-
function _objectSpread$
|
|
14026
|
+
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; }
|
|
14027
|
+
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; }
|
|
13871
14028
|
var SubTitle = function SubTitle(_ref) {
|
|
13872
14029
|
var _item$orientation, _item$buttonIds;
|
|
13873
14030
|
var item = _ref.item,
|
|
@@ -13876,7 +14033,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
13876
14033
|
t = _useTranslation.t;
|
|
13877
14034
|
return /*#__PURE__*/jsx(Divider, {
|
|
13878
14035
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
13879
|
-
style: _objectSpread$
|
|
14036
|
+
style: _objectSpread$w({}, item.style),
|
|
13880
14037
|
children: /*#__PURE__*/jsxs("div", {
|
|
13881
14038
|
className: wrapper$2,
|
|
13882
14039
|
children: [t(item.name), ((_item$buttonIds = item.buttonIds) === null || _item$buttonIds === void 0 ? void 0 : _item$buttonIds.length) && item.buttonIds.map(function (b) {
|
|
@@ -14553,8 +14710,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
14553
14710
|
}]);
|
|
14554
14711
|
}(_default$d);
|
|
14555
14712
|
|
|
14556
|
-
function ownKeys$
|
|
14557
|
-
function _objectSpread$
|
|
14713
|
+
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; }
|
|
14714
|
+
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; }
|
|
14558
14715
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
14559
14716
|
function useSelectClientRelationCatalog (_ref) {
|
|
14560
14717
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -14671,7 +14828,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
14671
14828
|
}, [supplier]);
|
|
14672
14829
|
var onSelectSupplier = /*#__PURE__*/function () {
|
|
14673
14830
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id, catalogId) {
|
|
14674
|
-
var _catalogList$, _selectedSupplier, catalogList,
|
|
14831
|
+
var _catalogList$, _selectedSupplier, catalogList, supplierData;
|
|
14675
14832
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
14676
14833
|
while (1) switch (_context2.prev = _context2.next) {
|
|
14677
14834
|
case 0:
|
|
@@ -14721,11 +14878,11 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
14721
14878
|
_context2.next = 22;
|
|
14722
14879
|
return apiHandler.readSupplierData(id);
|
|
14723
14880
|
case 22:
|
|
14724
|
-
|
|
14881
|
+
supplierData = _context2.sent;
|
|
14725
14882
|
case 23:
|
|
14726
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
14883
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$v(_objectSpread$v({}, _selectedSupplier), {}, {
|
|
14727
14884
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
14728
|
-
}),
|
|
14885
|
+
}), supplierData);
|
|
14729
14886
|
if (catalogId && catalogList.find(function (c) {
|
|
14730
14887
|
return c._id == catalogId;
|
|
14731
14888
|
})) setSelectedCatalog(catalogId);
|
|
@@ -15068,8 +15225,8 @@ function parseReturnData(options, selectMapping) {
|
|
|
15068
15225
|
}
|
|
15069
15226
|
|
|
15070
15227
|
var _excluded$2 = ["apiInterface", "selectMapping", "onChange", "value", "search", "options"];
|
|
15071
|
-
function ownKeys$
|
|
15072
|
-
function _objectSpread$
|
|
15228
|
+
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; }
|
|
15229
|
+
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; }
|
|
15073
15230
|
var SelectWrapper = function SelectWrapper(_ref) {
|
|
15074
15231
|
var apiInterface = _ref.apiInterface,
|
|
15075
15232
|
selectMapping = _ref.selectMapping,
|
|
@@ -15086,7 +15243,7 @@ var SelectWrapper = function SelectWrapper(_ref) {
|
|
|
15086
15243
|
type: 'SelectSimple',
|
|
15087
15244
|
options: options
|
|
15088
15245
|
});
|
|
15089
|
-
return /*#__PURE__*/jsx(Select$2, _objectSpread$
|
|
15246
|
+
return /*#__PURE__*/jsx(Select$2, _objectSpread$u(_objectSpread$u({}, selectProps), {}, {
|
|
15090
15247
|
showSearch: search,
|
|
15091
15248
|
loading: state.loading,
|
|
15092
15249
|
options: state.options,
|
|
@@ -15107,8 +15264,8 @@ var filterOption = function filterOption(input, option) {
|
|
|
15107
15264
|
function _createForOfIteratorHelper$c(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$c(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
15108
15265
|
function _unsupportedIterableToArray$c(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$c(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$c(o, minLen); }
|
|
15109
15266
|
function _arrayLikeToArray$c(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15110
|
-
function ownKeys$
|
|
15111
|
-
function _objectSpread$
|
|
15267
|
+
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; }
|
|
15268
|
+
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; }
|
|
15112
15269
|
var LOG$7 = getLogger('Backoffice', 'Form');
|
|
15113
15270
|
var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
15114
15271
|
var _state$selectedItems2;
|
|
@@ -15224,7 +15381,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15224
15381
|
};
|
|
15225
15382
|
}();
|
|
15226
15383
|
var updateFormData = function updateFormData(data) {
|
|
15227
|
-
form.setFieldsValue(_objectSpread$
|
|
15384
|
+
form.setFieldsValue(_objectSpread$t(_objectSpread$t({}, state.data), data));
|
|
15228
15385
|
};
|
|
15229
15386
|
var onErrorInternal = function onErrorInternal(err, errorText) {
|
|
15230
15387
|
if (err instanceof CoreError && err.code) {
|
|
@@ -15301,7 +15458,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15301
15458
|
wholeData: state.data,
|
|
15302
15459
|
disabledConfig: item === null || item === void 0 ? void 0 : item['disabledSelection'],
|
|
15303
15460
|
onChange: function onChange(value) {
|
|
15304
|
-
_onChange(item.name, value);
|
|
15461
|
+
_onChange(item.name, item.valueField ? value[item.valueField] : value);
|
|
15305
15462
|
},
|
|
15306
15463
|
allowClear: item.allowClear,
|
|
15307
15464
|
placeholder: item.placeholder,
|
|
@@ -15310,7 +15467,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15310
15467
|
}
|
|
15311
15468
|
}, state.selectedItemsIndex);
|
|
15312
15469
|
case 'selectSimple':
|
|
15313
|
-
return /*#__PURE__*/jsx(Select, _objectSpread$
|
|
15470
|
+
return /*#__PURE__*/jsx(Select, _objectSpread$t(_objectSpread$t({}, item), {}, {
|
|
15314
15471
|
disabled: disabled,
|
|
15315
15472
|
onChange: function onChange(value) {
|
|
15316
15473
|
_onChange(item.name, value);
|
|
@@ -15469,7 +15626,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15469
15626
|
value: item.value,
|
|
15470
15627
|
options: item.options.map(function (o) {
|
|
15471
15628
|
var _o$disabled;
|
|
15472
|
-
return _objectSpread$
|
|
15629
|
+
return _objectSpread$t(_objectSpread$t({}, o), {}, {
|
|
15473
15630
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, data)
|
|
15474
15631
|
});
|
|
15475
15632
|
}),
|
|
@@ -15554,7 +15711,7 @@ var Form = observer(FormWrapper$1, {
|
|
|
15554
15711
|
function DisplayInput(props) {
|
|
15555
15712
|
var _useTranslation2 = useTranslation(),
|
|
15556
15713
|
t = _useTranslation2.t;
|
|
15557
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
15714
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
15558
15715
|
disabled: true,
|
|
15559
15716
|
value: t(props.translationPrefix + '.' + props.value)
|
|
15560
15717
|
}));
|
|
@@ -15572,8 +15729,8 @@ function isReadonly(item, data) {
|
|
|
15572
15729
|
return false;
|
|
15573
15730
|
}
|
|
15574
15731
|
|
|
15575
|
-
function ownKeys$
|
|
15576
|
-
function _objectSpread$
|
|
15732
|
+
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; }
|
|
15733
|
+
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; }
|
|
15577
15734
|
function useGridData (_ref) {
|
|
15578
15735
|
var id = _ref.id,
|
|
15579
15736
|
data = _ref.data;
|
|
@@ -15616,11 +15773,11 @@ function useGridData (_ref) {
|
|
|
15616
15773
|
function reducer(state, action) {
|
|
15617
15774
|
switch (action.type) {
|
|
15618
15775
|
case 'update':
|
|
15619
|
-
return _objectSpread$
|
|
15776
|
+
return _objectSpread$s(_objectSpread$s({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$s(_objectSpread$s({}, action.data), {}, {
|
|
15620
15777
|
buffer: Buffer.from(action.data.buffer)
|
|
15621
15778
|
})));
|
|
15622
15779
|
case 'delete':
|
|
15623
|
-
var newState = _objectSpread$
|
|
15780
|
+
var newState = _objectSpread$s({}, state);
|
|
15624
15781
|
delete newState[action.data.divaNr];
|
|
15625
15782
|
return newState;
|
|
15626
15783
|
default:
|
|
@@ -15705,8 +15862,8 @@ var Grid = function Grid(_ref) {
|
|
|
15705
15862
|
});
|
|
15706
15863
|
};
|
|
15707
15864
|
|
|
15708
|
-
function ownKeys$
|
|
15709
|
-
function _objectSpread$
|
|
15865
|
+
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; }
|
|
15866
|
+
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; }
|
|
15710
15867
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
15711
15868
|
var id = _ref.id;
|
|
15712
15869
|
var root = useStore();
|
|
@@ -15825,7 +15982,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
15825
15982
|
onRemove: onRemove,
|
|
15826
15983
|
customRequest: customRequest,
|
|
15827
15984
|
fileList: fileList.map(function (f) {
|
|
15828
|
-
return _objectSpread$
|
|
15985
|
+
return _objectSpread$r(_objectSpread$r({}, f), {}, {
|
|
15829
15986
|
url: f.url
|
|
15830
15987
|
});
|
|
15831
15988
|
}),
|
|
@@ -15876,8 +16033,8 @@ var MediaUpload = observer(function (_ref) {
|
|
|
15876
16033
|
});
|
|
15877
16034
|
});
|
|
15878
16035
|
|
|
15879
|
-
function ownKeys$
|
|
15880
|
-
function _objectSpread$
|
|
16036
|
+
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; }
|
|
16037
|
+
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; }
|
|
15881
16038
|
function useFormListData (_ref) {
|
|
15882
16039
|
var _configuration$defaul;
|
|
15883
16040
|
var id = _ref.id,
|
|
@@ -15957,7 +16114,7 @@ function useFormListData (_ref) {
|
|
|
15957
16114
|
if (updated.length == state.length) {
|
|
15958
16115
|
newState = state.map(function (s, i) {
|
|
15959
16116
|
var _updated$find;
|
|
15960
|
-
return _objectSpread$
|
|
16117
|
+
return _objectSpread$q(_objectSpread$q({}, s), {}, {
|
|
15961
16118
|
data: (_updated$find = updated.find(function (u) {
|
|
15962
16119
|
return u.index == i;
|
|
15963
16120
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -16096,8 +16253,8 @@ var FormList$1 = observer(FormList, {
|
|
|
16096
16253
|
forwardRef: true
|
|
16097
16254
|
});
|
|
16098
16255
|
|
|
16099
|
-
function ownKeys$
|
|
16100
|
-
function _objectSpread$
|
|
16256
|
+
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; }
|
|
16257
|
+
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; }
|
|
16101
16258
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
16102
16259
|
function useSelectOrCreateData (_ref) {
|
|
16103
16260
|
var id = _ref.id,
|
|
@@ -16191,7 +16348,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
16191
16348
|
_context.next = 7;
|
|
16192
16349
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
16193
16350
|
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) {
|
|
16194
|
-
return _objectSpread$
|
|
16351
|
+
return _objectSpread$p(_objectSpread$p({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
16195
16352
|
}, {}) : {
|
|
16196
16353
|
_id: [value, 'contains']
|
|
16197
16354
|
},
|
|
@@ -16259,9 +16416,9 @@ function useSelectOrCreateData (_ref) {
|
|
|
16259
16416
|
var index = selected.findIndex(function (s) {
|
|
16260
16417
|
return s.value == removed.value;
|
|
16261
16418
|
});
|
|
16262
|
-
var
|
|
16263
|
-
|
|
16264
|
-
setSelected(
|
|
16419
|
+
var newSelected = _toConsumableArray(selected);
|
|
16420
|
+
newSelected.splice(index, 1);
|
|
16421
|
+
setSelected(newSelected);
|
|
16265
16422
|
} else {
|
|
16266
16423
|
setSelected([]);
|
|
16267
16424
|
}
|
|
@@ -16504,8 +16661,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
16504
16661
|
});
|
|
16505
16662
|
};
|
|
16506
16663
|
|
|
16507
|
-
function ownKeys$
|
|
16508
|
-
function _objectSpread$
|
|
16664
|
+
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; }
|
|
16665
|
+
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; }
|
|
16509
16666
|
function useProcess (_ref) {
|
|
16510
16667
|
var id = _ref.id;
|
|
16511
16668
|
var root = useStore();
|
|
@@ -16543,7 +16700,7 @@ function useProcess (_ref) {
|
|
|
16543
16700
|
while (1) switch (_context.prev = _context.next) {
|
|
16544
16701
|
case 0:
|
|
16545
16702
|
newState = _toConsumableArray(state);
|
|
16546
|
-
currentStep = _objectSpread$
|
|
16703
|
+
currentStep = _objectSpread$o({}, newState[index]);
|
|
16547
16704
|
currentStep.data = data;
|
|
16548
16705
|
newState.splice(index, 1, currentStep);
|
|
16549
16706
|
setState(newState);
|
|
@@ -16569,25 +16726,25 @@ function useProcess (_ref) {
|
|
|
16569
16726
|
}();
|
|
16570
16727
|
var save = /*#__PURE__*/function () {
|
|
16571
16728
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(state) {
|
|
16572
|
-
var newState,
|
|
16729
|
+
var newState, index;
|
|
16573
16730
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
16574
16731
|
while (1) switch (_context2.prev = _context2.next) {
|
|
16575
16732
|
case 0:
|
|
16576
16733
|
newState = [];
|
|
16577
|
-
|
|
16734
|
+
index = 0;
|
|
16578
16735
|
case 2:
|
|
16579
|
-
if (!(
|
|
16736
|
+
if (!(index < state.length)) {
|
|
16580
16737
|
_context2.next = 11;
|
|
16581
16738
|
break;
|
|
16582
16739
|
}
|
|
16583
16740
|
_context2.t0 = newState;
|
|
16584
16741
|
_context2.next = 6;
|
|
16585
|
-
return saveData(state[
|
|
16742
|
+
return saveData(state[index], newState);
|
|
16586
16743
|
case 6:
|
|
16587
16744
|
_context2.t1 = _context2.sent;
|
|
16588
16745
|
_context2.t0.push.call(_context2.t0, _context2.t1);
|
|
16589
16746
|
case 8:
|
|
16590
|
-
|
|
16747
|
+
index++;
|
|
16591
16748
|
_context2.next = 2;
|
|
16592
16749
|
break;
|
|
16593
16750
|
case 11:
|
|
@@ -16632,7 +16789,7 @@ function _saveData() {
|
|
|
16632
16789
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
16633
16790
|
while (1) switch (_context3.prev = _context3.next) {
|
|
16634
16791
|
case 0:
|
|
16635
|
-
newState = _objectSpread$
|
|
16792
|
+
newState = _objectSpread$o({}, stepState); // we have to merge the mapping data of all steps into one object,
|
|
16636
16793
|
//so we have to modify the mappingData as well as the mapping specification
|
|
16637
16794
|
sourcData = {};
|
|
16638
16795
|
(_stepState$step$mappi = stepState.step.mapping) === null || _stepState$step$mappi === void 0 || _stepState$step$mappi.map.forEach(function (map) {
|
|
@@ -16648,7 +16805,7 @@ function _saveData() {
|
|
|
16648
16805
|
});
|
|
16649
16806
|
newMapping = undefined;
|
|
16650
16807
|
if (stepState.step.mapping) {
|
|
16651
|
-
newMapping = _objectSpread$
|
|
16808
|
+
newMapping = _objectSpread$o(_objectSpread$o({}, stepState.step.mapping), {}, {
|
|
16652
16809
|
map: stepState.step.mapping.map.map(function (m) {
|
|
16653
16810
|
return {
|
|
16654
16811
|
targetField: m.targetField,
|
|
@@ -17728,8 +17885,8 @@ function IconCell (_ref) {
|
|
|
17728
17885
|
|
|
17729
17886
|
var _excluded$1 = ["index"],
|
|
17730
17887
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
17731
|
-
function ownKeys$
|
|
17732
|
-
function _objectSpread$
|
|
17888
|
+
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; }
|
|
17889
|
+
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; }
|
|
17733
17890
|
var LOG$5 = getLogger('Backoffice', 'CellRenderer');
|
|
17734
17891
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
17735
17892
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -17743,7 +17900,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
17743
17900
|
component: false,
|
|
17744
17901
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
17745
17902
|
value: form,
|
|
17746
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
17903
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$n({}, props))
|
|
17747
17904
|
})
|
|
17748
17905
|
});
|
|
17749
17906
|
};
|
|
@@ -17791,7 +17948,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
17791
17948
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
17792
17949
|
longDescriptionType = 'text';
|
|
17793
17950
|
}
|
|
17794
|
-
var modifiedColumn = _objectSpread$
|
|
17951
|
+
var modifiedColumn = _objectSpread$n(_objectSpread$n({}, column), {}, {
|
|
17795
17952
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
17796
17953
|
});
|
|
17797
17954
|
if (column) {
|
|
@@ -17804,34 +17961,34 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
17804
17961
|
};
|
|
17805
17962
|
switch (modifiedColumn.type) {
|
|
17806
17963
|
case 'boolean':
|
|
17807
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
17964
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$n({}, cellProps));
|
|
17808
17965
|
break;
|
|
17809
17966
|
case 'text':
|
|
17810
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
17967
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$n({}, cellProps));
|
|
17811
17968
|
break;
|
|
17812
17969
|
case 'select':
|
|
17813
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
17970
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$n({}, cellProps));
|
|
17814
17971
|
case 'media':
|
|
17815
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
17972
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$n({}, cellProps));
|
|
17816
17973
|
break;
|
|
17817
17974
|
case 'mediaItem':
|
|
17818
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
17975
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$n({}, cellProps));
|
|
17819
17976
|
break;
|
|
17820
17977
|
case 'unixTimeStamp':
|
|
17821
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
17978
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$n({}, cellProps));
|
|
17822
17979
|
break;
|
|
17823
17980
|
case 'unixTimeStampCheck':
|
|
17824
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
17981
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$n({}, cellProps));
|
|
17825
17982
|
break;
|
|
17826
17983
|
case 'icon':
|
|
17827
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
17984
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$n({}, cellProps));
|
|
17828
17985
|
break;
|
|
17829
17986
|
default:
|
|
17830
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
17987
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$n({}, cellProps));
|
|
17831
17988
|
break;
|
|
17832
17989
|
}
|
|
17833
17990
|
}
|
|
17834
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
17991
|
+
return /*#__PURE__*/jsx("td", _objectSpread$n(_objectSpread$n({}, restProps), {}, {
|
|
17835
17992
|
children: childNode
|
|
17836
17993
|
}));
|
|
17837
17994
|
};
|
|
@@ -18163,8 +18320,26 @@ function AGHistogram (_ref) {
|
|
|
18163
18320
|
});
|
|
18164
18321
|
}
|
|
18165
18322
|
|
|
18166
|
-
|
|
18167
|
-
|
|
18323
|
+
var SMChart = function SMChart(props) {
|
|
18324
|
+
var _useDivaCore = useDivaCore(),
|
|
18325
|
+
userHasPermission = _useDivaCore.actions.userHasPermission;
|
|
18326
|
+
var hasPermission = userHasPermission(props.permission);
|
|
18327
|
+
return hasPermission ? /*#__PURE__*/jsx(Histogram, {
|
|
18328
|
+
field: props.field,
|
|
18329
|
+
interval: props.interval,
|
|
18330
|
+
topPics: props.topPics,
|
|
18331
|
+
from: props.from,
|
|
18332
|
+
to: props.to,
|
|
18333
|
+
filter: props.filter,
|
|
18334
|
+
description: props.description,
|
|
18335
|
+
title: props.title,
|
|
18336
|
+
apiTranslation: props.apiTranslation,
|
|
18337
|
+
component: props.component
|
|
18338
|
+
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
18339
|
+
};
|
|
18340
|
+
|
|
18341
|
+
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; }
|
|
18342
|
+
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; }
|
|
18168
18343
|
function _createForOfIteratorHelper$8(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$8(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
18169
18344
|
function _unsupportedIterableToArray$8(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$8(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$8(o, minLen); }
|
|
18170
18345
|
function _arrayLikeToArray$8(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -18325,7 +18500,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18325
18500
|
// Convert to Dayjs
|
|
18326
18501
|
(_state$globalFilter3 = state.globalFilter) !== null && _state$globalFilter3 !== void 0 && (_state$globalFilter3 = _state$globalFilter3.timeStamp) !== null && _state$globalFilter3 !== void 0 && (_state$globalFilter3 = _state$globalFilter3['toTimeStamp']) !== null && _state$globalFilter3 !== void 0 && _state$globalFilter3[0] ? dayjs((_state$globalFilter4 = state.globalFilter) === null || _state$globalFilter4 === void 0 || (_state$globalFilter4 = _state$globalFilter4.timeStamp) === null || _state$globalFilter4 === void 0 || (_state$globalFilter4 = _state$globalFilter4['toTimeStamp']) === null || _state$globalFilter4 === void 0 ? void 0 : _state$globalFilter4[0]) : dayjs(new Date()) // Convert to Dayjs
|
|
18327
18502
|
]
|
|
18328
|
-
}), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(Select, _objectSpread$
|
|
18503
|
+
}), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(Select, _objectSpread$m(_objectSpread$m({}, (_state$configuration$8 = state.configuration.filter) === null || _state$configuration$8 === void 0 ? void 0 : _state$configuration$8.select.settings), {}, {
|
|
18329
18504
|
style: {
|
|
18330
18505
|
minWidth: '200px'
|
|
18331
18506
|
},
|
|
@@ -18374,7 +18549,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18374
18549
|
}) : undefined,
|
|
18375
18550
|
mappingData: state.mappingData
|
|
18376
18551
|
}, 'create')]
|
|
18377
|
-
}), state.configuration.histogram && /*#__PURE__*/jsx(AGHistogram, {
|
|
18552
|
+
}), state.configuration.histogram && state.configuration.histogram.type == 'applicationStatus' && /*#__PURE__*/jsx(AGHistogram, {
|
|
18378
18553
|
footnote: state.configuration.histogram.footnote,
|
|
18379
18554
|
height: state.configuration.histogram.height,
|
|
18380
18555
|
width: state.configuration.histogram.width,
|
|
@@ -18387,7 +18562,19 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18387
18562
|
stackMapping: state.configuration.histogram.stackMapping,
|
|
18388
18563
|
tooltipText: state.configuration.histogram.tooltipText,
|
|
18389
18564
|
headerText: state.configuration.histogram.headerText,
|
|
18390
|
-
filterField: state.configuration.histogram.
|
|
18565
|
+
filterField: state.configuration.histogram.field
|
|
18566
|
+
}), state.configuration.histogram && state.configuration.histogram.type == 'default' && /*#__PURE__*/jsx(SMChart, {
|
|
18567
|
+
field: state.configuration.histogram.field,
|
|
18568
|
+
interval: state.configuration.histogram.interval,
|
|
18569
|
+
topPics: state.configuration.histogram.topPics,
|
|
18570
|
+
from: state.configuration.histogram.from,
|
|
18571
|
+
to: state.configuration.histogram.to,
|
|
18572
|
+
filter: state.configuration.histogram.filter,
|
|
18573
|
+
description: state.configuration.histogram.description,
|
|
18574
|
+
title: state.configuration.histogram.title.text,
|
|
18575
|
+
apiTranslation: state.configuration.histogram.apiTranslation,
|
|
18576
|
+
component: state.configuration.histogram.component,
|
|
18577
|
+
permission: state.configuration.histogram.permission
|
|
18391
18578
|
})]
|
|
18392
18579
|
})
|
|
18393
18580
|
})
|
|
@@ -18410,7 +18597,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18410
18597
|
},
|
|
18411
18598
|
dataSource: data,
|
|
18412
18599
|
loading: state.loading,
|
|
18413
|
-
pagination: _objectSpread$
|
|
18600
|
+
pagination: _objectSpread$m(_objectSpread$m({}, state.pagination), {}, {
|
|
18414
18601
|
showTotal: function showTotal(total, range) {
|
|
18415
18602
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
18416
18603
|
},
|
|
@@ -18710,7 +18897,7 @@ function BulkAction(_ref6) {
|
|
|
18710
18897
|
}
|
|
18711
18898
|
_context4.t0 = data;
|
|
18712
18899
|
_context4.next = 10;
|
|
18713
|
-
return apiInterface.update(_objectSpread$
|
|
18900
|
+
return apiInterface.update(_objectSpread$m(_objectSpread$m({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
18714
18901
|
case 10:
|
|
18715
18902
|
_context4.t1 = _context4.sent;
|
|
18716
18903
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -18807,8 +18994,8 @@ function SelectionText(_ref8) {
|
|
|
18807
18994
|
});
|
|
18808
18995
|
}
|
|
18809
18996
|
|
|
18810
|
-
function ownKeys$
|
|
18811
|
-
function _objectSpread$
|
|
18997
|
+
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; }
|
|
18998
|
+
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; }
|
|
18812
18999
|
function getColumnFilterProps (_ref) {
|
|
18813
19000
|
var filter = _ref.filter,
|
|
18814
19001
|
title = _ref.title;
|
|
@@ -19171,7 +19358,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
19171
19358
|
});
|
|
19172
19359
|
},
|
|
19173
19360
|
options: filter.map(function (f) {
|
|
19174
|
-
return _objectSpread$
|
|
19361
|
+
return _objectSpread$l(_objectSpread$l({}, f), {}, {
|
|
19175
19362
|
label: t(f.label)
|
|
19176
19363
|
});
|
|
19177
19364
|
})
|
|
@@ -19220,7 +19407,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
19220
19407
|
setDisplaySelectedvalues = _useState4[1];
|
|
19221
19408
|
var options = [];
|
|
19222
19409
|
options = filter.map(function (f) {
|
|
19223
|
-
return _objectSpread$
|
|
19410
|
+
return _objectSpread$l(_objectSpread$l({}, f), {}, {
|
|
19224
19411
|
label: t(f.label)
|
|
19225
19412
|
});
|
|
19226
19413
|
});
|
|
@@ -19294,8 +19481,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
19294
19481
|
};
|
|
19295
19482
|
};
|
|
19296
19483
|
|
|
19297
|
-
function ownKeys$
|
|
19298
|
-
function _objectSpread$
|
|
19484
|
+
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; }
|
|
19485
|
+
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; }
|
|
19299
19486
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
19300
19487
|
var columns = configuration.columns.filter(function (c) {
|
|
19301
19488
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -19346,7 +19533,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
19346
19533
|
}
|
|
19347
19534
|
function mapColumn(column, onUpdate) {
|
|
19348
19535
|
var _column$field, _column$children;
|
|
19349
|
-
return _objectSpread$
|
|
19536
|
+
return _objectSpread$k(_objectSpread$k(_objectSpread$k({}, column), {}, {
|
|
19350
19537
|
width: column.width || 100,
|
|
19351
19538
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
19352
19539
|
key: column.field || column.title,
|
|
@@ -19395,8 +19582,8 @@ function updateData (_ref) {
|
|
|
19395
19582
|
};
|
|
19396
19583
|
}
|
|
19397
19584
|
|
|
19398
|
-
function ownKeys$
|
|
19399
|
-
function _objectSpread$
|
|
19585
|
+
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; }
|
|
19586
|
+
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; }
|
|
19400
19587
|
function aplyFilterAndSortation (_ref) {
|
|
19401
19588
|
var data = _ref.data,
|
|
19402
19589
|
filters = _ref.filters,
|
|
@@ -19411,7 +19598,7 @@ function aplyFilterAndSortation (_ref) {
|
|
|
19411
19598
|
processedData = sort(sorter || [], processedData);
|
|
19412
19599
|
return {
|
|
19413
19600
|
data: processedData,
|
|
19414
|
-
pagination: _objectSpread$
|
|
19601
|
+
pagination: _objectSpread$j(_objectSpread$j({}, pagination), {}, {
|
|
19415
19602
|
total: processedData.length
|
|
19416
19603
|
})
|
|
19417
19604
|
};
|
|
@@ -19496,8 +19683,8 @@ function filter$1(f, data) {
|
|
|
19496
19683
|
}
|
|
19497
19684
|
|
|
19498
19685
|
var _excluded = ["_id"];
|
|
19499
|
-
function ownKeys$
|
|
19500
|
-
function _objectSpread$
|
|
19686
|
+
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; }
|
|
19687
|
+
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; }
|
|
19501
19688
|
function useTableData$1 (_ref) {
|
|
19502
19689
|
var _configuration$apiInt;
|
|
19503
19690
|
var id = _ref.id;
|
|
@@ -19552,7 +19739,7 @@ function useTableData$1 (_ref) {
|
|
|
19552
19739
|
var _configuration$create;
|
|
19553
19740
|
if (!dataRow) return;
|
|
19554
19741
|
var id = v4();
|
|
19555
|
-
var processedDataRow = flat.unflatten(_objectSpread$
|
|
19742
|
+
var processedDataRow = flat.unflatten(_objectSpread$i({
|
|
19556
19743
|
_id: id,
|
|
19557
19744
|
ID: id
|
|
19558
19745
|
}, dataRow));
|
|
@@ -19564,11 +19751,11 @@ function useTableData$1 (_ref) {
|
|
|
19564
19751
|
newData = _updateData.data;
|
|
19565
19752
|
_updateData.prevDataRow;
|
|
19566
19753
|
_updateData.index;
|
|
19567
|
-
var newState = _objectSpread$
|
|
19754
|
+
var newState = _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19568
19755
|
data: newData
|
|
19569
19756
|
});
|
|
19570
19757
|
if (!filterServerSide) {
|
|
19571
|
-
var res = aplyFilterAndSortation(_objectSpread$
|
|
19758
|
+
var res = aplyFilterAndSortation(_objectSpread$i(_objectSpread$i({}, filterData), {}, {
|
|
19572
19759
|
data: newData
|
|
19573
19760
|
}));
|
|
19574
19761
|
newState.data = res.data;
|
|
@@ -19580,33 +19767,33 @@ function useTableData$1 (_ref) {
|
|
|
19580
19767
|
var formData = new FormData();
|
|
19581
19768
|
processedDataRow._id;
|
|
19582
19769
|
var value = _objectWithoutProperties(processedDataRow, _excluded);
|
|
19583
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
19770
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
19584
19771
|
filterContex: filterContex,
|
|
19585
19772
|
value: JSON.stringify([value])
|
|
19586
19773
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
19587
19774
|
if (d && d.Result && d.Result == 'Success') return;
|
|
19588
|
-
setState(_objectSpread$
|
|
19775
|
+
setState(_objectSpread$i({}, oldState));
|
|
19589
19776
|
});
|
|
19590
19777
|
}, [state, catalogItem, filterData]);
|
|
19591
19778
|
useEffect(function () {
|
|
19592
19779
|
if (!catalogItem) return;
|
|
19593
|
-
setState(_objectSpread$
|
|
19780
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19594
19781
|
loading: true,
|
|
19595
|
-
mappingData: _objectSpread$
|
|
19782
|
+
mappingData: _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
19596
19783
|
filterContex: filterContex
|
|
19597
19784
|
})
|
|
19598
19785
|
}));
|
|
19599
19786
|
if (!filterServerSide) {
|
|
19600
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
19787
|
+
apiHandler.readList(configuration.mapping, _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
19601
19788
|
filterContex: filterContex
|
|
19602
19789
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
19603
19790
|
var newData = data.data.map(function (d) {
|
|
19604
|
-
return _objectSpread$
|
|
19791
|
+
return _objectSpread$i(_objectSpread$i({}, d), {}, {
|
|
19605
19792
|
_id: d._id || d.ID || nanoid()
|
|
19606
19793
|
});
|
|
19607
19794
|
});
|
|
19608
19795
|
onChange({
|
|
19609
|
-
pagination: _objectSpread$
|
|
19796
|
+
pagination: _objectSpread$i({}, state.pagination),
|
|
19610
19797
|
filters: {},
|
|
19611
19798
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
19612
19799
|
return c.defaultSortOrder;
|
|
@@ -19623,7 +19810,7 @@ function useTableData$1 (_ref) {
|
|
|
19623
19810
|
});
|
|
19624
19811
|
} else {
|
|
19625
19812
|
onChange({
|
|
19626
|
-
pagination: _objectSpread$
|
|
19813
|
+
pagination: _objectSpread$i({}, state.pagination),
|
|
19627
19814
|
filters: {},
|
|
19628
19815
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
19629
19816
|
return c.defaultSortOrder;
|
|
@@ -19640,17 +19827,17 @@ function useTableData$1 (_ref) {
|
|
|
19640
19827
|
}
|
|
19641
19828
|
}, [filterContex, catalogItem]);
|
|
19642
19829
|
var onChange = function onChange(p, dataParam) {
|
|
19643
|
-
setState(_objectSpread$
|
|
19830
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19644
19831
|
loading: true
|
|
19645
19832
|
}));
|
|
19646
19833
|
if (!filterServerSide) {
|
|
19647
19834
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
19648
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
19835
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$i(_objectSpread$i({}, p), {}, {
|
|
19649
19836
|
data: unfilteredData
|
|
19650
19837
|
})),
|
|
19651
19838
|
data = _aplyFilterAndSortati.data,
|
|
19652
19839
|
pagination = _aplyFilterAndSortati.pagination;
|
|
19653
|
-
setState(_objectSpread$
|
|
19840
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19654
19841
|
data: data,
|
|
19655
19842
|
pagination: pagination,
|
|
19656
19843
|
loading: false,
|
|
@@ -19661,20 +19848,20 @@ function useTableData$1 (_ref) {
|
|
|
19661
19848
|
sorter: p.sorter
|
|
19662
19849
|
});
|
|
19663
19850
|
} else {
|
|
19664
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
19851
|
+
apiHandler.readList(configuration.mapping, _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
19665
19852
|
filterContex: filterContex
|
|
19666
19853
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
19667
|
-
setState(_objectSpread$
|
|
19854
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19668
19855
|
data: data.data.map(function (dt) {
|
|
19669
|
-
return _objectSpread$
|
|
19856
|
+
return _objectSpread$i(_objectSpread$i({}, dt), {}, {
|
|
19670
19857
|
_id: dt._id || dt.ID || nanoid()
|
|
19671
19858
|
});
|
|
19672
19859
|
}),
|
|
19673
|
-
pagination: _objectSpread$
|
|
19860
|
+
pagination: _objectSpread$i(_objectSpread$i({}, p.pagination), {}, {
|
|
19674
19861
|
total: data.total
|
|
19675
19862
|
}),
|
|
19676
19863
|
loading: false,
|
|
19677
|
-
mappingData: _objectSpread$
|
|
19864
|
+
mappingData: _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
19678
19865
|
filterContex: filterContex
|
|
19679
19866
|
})
|
|
19680
19867
|
}));
|
|
@@ -19686,7 +19873,7 @@ function useTableData$1 (_ref) {
|
|
|
19686
19873
|
}
|
|
19687
19874
|
};
|
|
19688
19875
|
var onSelect = function onSelect(keys) {
|
|
19689
|
-
setState(_objectSpread$
|
|
19876
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19690
19877
|
selected: keys
|
|
19691
19878
|
}));
|
|
19692
19879
|
};
|
|
@@ -19696,7 +19883,7 @@ function useTableData$1 (_ref) {
|
|
|
19696
19883
|
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
19697
19884
|
while (1) switch (_context2.prev = _context2.next) {
|
|
19698
19885
|
case 0:
|
|
19699
|
-
setState(_objectSpread$
|
|
19886
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19700
19887
|
deleting: true
|
|
19701
19888
|
}));
|
|
19702
19889
|
newData = _toConsumableArray(state.data);
|
|
@@ -19711,7 +19898,7 @@ function useTableData$1 (_ref) {
|
|
|
19711
19898
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
19712
19899
|
return nd._id === state.selected[index];
|
|
19713
19900
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
19714
|
-
mappingData = _objectSpread$
|
|
19901
|
+
mappingData = _objectSpread$i(_objectSpread$i({}, mappingData), state.mappingData);
|
|
19715
19902
|
_context.next = 5;
|
|
19716
19903
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true);
|
|
19717
19904
|
case 5:
|
|
@@ -19761,7 +19948,7 @@ function useTableData$1 (_ref) {
|
|
|
19761
19948
|
}
|
|
19762
19949
|
_context2.next = 18;
|
|
19763
19950
|
return apiHandler.readList(configuration.mapping, {
|
|
19764
|
-
pagination: _objectSpread$
|
|
19951
|
+
pagination: _objectSpread$i(_objectSpread$i({}, state.pagination), {}, {
|
|
19765
19952
|
current: current
|
|
19766
19953
|
}),
|
|
19767
19954
|
columns: configuration.columns,
|
|
@@ -19773,11 +19960,11 @@ function useTableData$1 (_ref) {
|
|
|
19773
19960
|
newData = data.data;
|
|
19774
19961
|
total = data.total;
|
|
19775
19962
|
case 21:
|
|
19776
|
-
setState(_objectSpread$
|
|
19963
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19777
19964
|
selected: [],
|
|
19778
19965
|
deleting: false,
|
|
19779
19966
|
data: newData,
|
|
19780
|
-
pagination: _objectSpread$
|
|
19967
|
+
pagination: _objectSpread$i(_objectSpread$i({}, state.pagination), {}, {
|
|
19781
19968
|
current: current,
|
|
19782
19969
|
total: total
|
|
19783
19970
|
})
|
|
@@ -19793,12 +19980,12 @@ function useTableData$1 (_ref) {
|
|
|
19793
19980
|
};
|
|
19794
19981
|
}();
|
|
19795
19982
|
function setLoading() {
|
|
19796
|
-
setState(_objectSpread$
|
|
19983
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19797
19984
|
loading: true
|
|
19798
19985
|
}));
|
|
19799
19986
|
}
|
|
19800
|
-
return _objectSpread$
|
|
19801
|
-
configuration: _objectSpread$
|
|
19987
|
+
return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19988
|
+
configuration: _objectSpread$i(_objectSpread$i({}, configuration), {}, {
|
|
19802
19989
|
title: undefined
|
|
19803
19990
|
}),
|
|
19804
19991
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -19903,8 +20090,8 @@ function objectHash (obj) {
|
|
|
19903
20090
|
function _createForOfIteratorHelper$7(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$7(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
19904
20091
|
function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$7(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$7(o, minLen); }
|
|
19905
20092
|
function _arrayLikeToArray$7(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
19906
|
-
function ownKeys$
|
|
19907
|
-
function _objectSpread$
|
|
20093
|
+
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; }
|
|
20094
|
+
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; }
|
|
19908
20095
|
var LOG$3 = getLogger('Backoffice', 'TableData');
|
|
19909
20096
|
function useTableData (_ref) {
|
|
19910
20097
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -19971,7 +20158,7 @@ function useTableData (_ref) {
|
|
|
19971
20158
|
selected: [],
|
|
19972
20159
|
canDelete: !!apiHandler.canDelete,
|
|
19973
20160
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
19974
|
-
mappingData: _objectSpread$
|
|
20161
|
+
mappingData: _objectSpread$h(_objectSpread$h({}, parentData), {}, {
|
|
19975
20162
|
prefilter: {
|
|
19976
20163
|
select: globalFilter.select
|
|
19977
20164
|
}
|
|
@@ -19980,7 +20167,7 @@ function useTableData (_ref) {
|
|
|
19980
20167
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
19981
20168
|
state = _useState14[0],
|
|
19982
20169
|
setState = _useState14[1];
|
|
19983
|
-
var mapping = _objectSpread$
|
|
20170
|
+
var mapping = _objectSpread$h(_objectSpread$h({}, parentData), {}, {
|
|
19984
20171
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
19985
20172
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
19986
20173
|
});
|
|
@@ -20019,14 +20206,14 @@ function useTableData (_ref) {
|
|
|
20019
20206
|
}
|
|
20020
20207
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
20021
20208
|
var newInitData = initData;
|
|
20022
|
-
var newState = _objectSpread$
|
|
20209
|
+
var newState = _objectSpread$h({}, state);
|
|
20023
20210
|
var selected = [];
|
|
20024
20211
|
if (configuration.deselectOnUpdate == false) {
|
|
20025
20212
|
selected = state.selected;
|
|
20026
20213
|
}
|
|
20027
20214
|
var pagination = undefined;
|
|
20028
20215
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
20029
|
-
pagination = _objectSpread$
|
|
20216
|
+
pagination = _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
|
|
20030
20217
|
total: state.data.length + dataArray.length
|
|
20031
20218
|
});
|
|
20032
20219
|
}
|
|
@@ -20043,7 +20230,7 @@ function useTableData (_ref) {
|
|
|
20043
20230
|
dataRow: dataRow
|
|
20044
20231
|
}),
|
|
20045
20232
|
_data = _updateData.data;
|
|
20046
|
-
newState = _objectSpread$
|
|
20233
|
+
newState = _objectSpread$h(_objectSpread$h({}, newState), {}, {
|
|
20047
20234
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
20048
20235
|
data: _data,
|
|
20049
20236
|
selected: selected
|
|
@@ -20056,8 +20243,8 @@ function useTableData (_ref) {
|
|
|
20056
20243
|
dataRow: dataRow
|
|
20057
20244
|
}),
|
|
20058
20245
|
nextInitData = _updateData2.data;
|
|
20059
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
20060
|
-
filters: _objectSpread$
|
|
20246
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, filterData), {}, {
|
|
20247
|
+
filters: _objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, 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"])
|
|
20061
20248
|
}, 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 ? {
|
|
20062
20249
|
genericProps: globalFilter.toggle
|
|
20063
20250
|
} : undefined), {}, {
|
|
@@ -20067,7 +20254,7 @@ function useTableData (_ref) {
|
|
|
20067
20254
|
_data2 = _aplyFilterAndSortati.data,
|
|
20068
20255
|
_pagination2 = _aplyFilterAndSortati.pagination;
|
|
20069
20256
|
newInitData = nextInitData;
|
|
20070
|
-
newState = _objectSpread$
|
|
20257
|
+
newState = _objectSpread$h(_objectSpread$h({}, newState), {}, {
|
|
20071
20258
|
pagination: _pagination2,
|
|
20072
20259
|
data: _data2,
|
|
20073
20260
|
selected: selected
|
|
@@ -20077,8 +20264,8 @@ function useTableData (_ref) {
|
|
|
20077
20264
|
if (apiHandler.canCreate) {
|
|
20078
20265
|
apiCreate(data).then(function (res) {
|
|
20079
20266
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
20080
|
-
initData && setInitData(_objectSpread$
|
|
20081
|
-
setState(_objectSpread$
|
|
20267
|
+
initData && setInitData(_objectSpread$h({}, initData));
|
|
20268
|
+
setState(_objectSpread$h({}, state));
|
|
20082
20269
|
}
|
|
20083
20270
|
});
|
|
20084
20271
|
}
|
|
@@ -20091,7 +20278,7 @@ function useTableData (_ref) {
|
|
|
20091
20278
|
var triggerRefresh = function triggerRefresh() {
|
|
20092
20279
|
var _configuration$filter7;
|
|
20093
20280
|
setError(undefined);
|
|
20094
|
-
var newGlobalFilter = _objectSpread$
|
|
20281
|
+
var newGlobalFilter = _objectSpread$h({}, globalFilter);
|
|
20095
20282
|
//on refresh update default filter, since global value can change
|
|
20096
20283
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
20097
20284
|
var _configuration$filter8;
|
|
@@ -20102,7 +20289,7 @@ function useTableData (_ref) {
|
|
|
20102
20289
|
newGlobalFilter["default"] = _defaultFilter;
|
|
20103
20290
|
setGlobaFilter(newGlobalFilter);
|
|
20104
20291
|
}
|
|
20105
|
-
onChange(_objectSpread$
|
|
20292
|
+
onChange(_objectSpread$h({
|
|
20106
20293
|
pagination: state.pagination
|
|
20107
20294
|
}, filterData), newGlobalFilter, true);
|
|
20108
20295
|
};
|
|
@@ -20121,7 +20308,7 @@ function useTableData (_ref) {
|
|
|
20121
20308
|
order: c.defaultSortOrder
|
|
20122
20309
|
};
|
|
20123
20310
|
});
|
|
20124
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
20311
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20125
20312
|
loading: false
|
|
20126
20313
|
}));else {
|
|
20127
20314
|
onChange({
|
|
@@ -20178,11 +20365,11 @@ function useTableData (_ref) {
|
|
|
20178
20365
|
case 0:
|
|
20179
20366
|
prefilter = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : globalFilter;
|
|
20180
20367
|
refresh = _args2.length > 2 ? _args2[2] : undefined;
|
|
20181
|
-
setState(_objectSpread$
|
|
20368
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20182
20369
|
loading: true
|
|
20183
20370
|
}));
|
|
20184
20371
|
currentData = initData;
|
|
20185
|
-
filterData = _objectSpread$
|
|
20372
|
+
filterData = _objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, p.filters), prefilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter9 = configuration.filter) !== null && _configuration$filter9 !== void 0 && (_configuration$filter9 = _configuration$filter9.toggle) !== null && _configuration$filter9 !== void 0 && _configuration$filter9.inQuery) ? prefilter.toggle : undefined), ((_configuration$filter10 = configuration.filter) === null || _configuration$filter10 === void 0 || (_configuration$filter10 = _configuration$filter10.select) === null || _configuration$filter10 === void 0 ? void 0 : _configuration$filter10.applyDefaultValue) !== false || ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter12 = (_configuration$filter13 = configuration.filter) === null || _configuration$filter13 === void 0 || (_configuration$filter13 = _configuration$filter13.select) === null || _configuration$filter13 === void 0 ? void 0 : _configuration$filter13.filterField) !== null && _configuration$filter12 !== void 0 ? _configuration$filter12 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
|
|
20186
20373
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref5) {
|
|
20187
20374
|
var _ref6 = _slicedToArray(_ref5, 2);
|
|
20188
20375
|
_ref6[0];
|
|
@@ -20190,7 +20377,7 @@ function useTableData (_ref) {
|
|
|
20190
20377
|
return v != null;
|
|
20191
20378
|
}));
|
|
20192
20379
|
currentFilterHash = objectHash(filterData);
|
|
20193
|
-
currentPagination = _objectSpread$
|
|
20380
|
+
currentPagination = _objectSpread$h(_objectSpread$h({}, p.pagination), {}, {
|
|
20194
20381
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
20195
20382
|
});
|
|
20196
20383
|
filterHash.current = currentFilterHash;
|
|
@@ -20198,7 +20385,7 @@ function useTableData (_ref) {
|
|
|
20198
20385
|
_context2.next = 19;
|
|
20199
20386
|
break;
|
|
20200
20387
|
}
|
|
20201
|
-
ssf = _objectSpread$
|
|
20388
|
+
ssf = _objectSpread$h({
|
|
20202
20389
|
pagination: currentPagination,
|
|
20203
20390
|
columns: configuration.columns,
|
|
20204
20391
|
filters: filterData,
|
|
@@ -20212,7 +20399,7 @@ function useTableData (_ref) {
|
|
|
20212
20399
|
data = _context2.sent;
|
|
20213
20400
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
20214
20401
|
currentData = data.data;
|
|
20215
|
-
currentPagination = _objectSpread$
|
|
20402
|
+
currentPagination = _objectSpread$h(_objectSpread$h({}, currentPagination), {}, {
|
|
20216
20403
|
total: data.total
|
|
20217
20404
|
});
|
|
20218
20405
|
_context2.next = 28;
|
|
@@ -20229,7 +20416,7 @@ function useTableData (_ref) {
|
|
|
20229
20416
|
currentData = _data3.data;
|
|
20230
20417
|
setInitData(currentData);
|
|
20231
20418
|
case 25:
|
|
20232
|
-
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$
|
|
20419
|
+
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$h(_objectSpread$h({}, p), {}, {
|
|
20233
20420
|
pagination: currentPagination,
|
|
20234
20421
|
filters: filterData,
|
|
20235
20422
|
data: currentData,
|
|
@@ -20238,11 +20425,11 @@ function useTableData (_ref) {
|
|
|
20238
20425
|
currentData = _data4;
|
|
20239
20426
|
currentPagination = pagination;
|
|
20240
20427
|
case 28:
|
|
20241
|
-
setState(_objectSpread$
|
|
20428
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20242
20429
|
loading: false,
|
|
20243
20430
|
data: currentData,
|
|
20244
20431
|
pagination: currentPagination,
|
|
20245
|
-
mappingData: _objectSpread$
|
|
20432
|
+
mappingData: _objectSpread$h(_objectSpread$h({}, parentData), {}, {
|
|
20246
20433
|
prefilter: prefilter
|
|
20247
20434
|
}),
|
|
20248
20435
|
currentFetchUrl: currentUrl
|
|
@@ -20262,7 +20449,7 @@ function useTableData (_ref) {
|
|
|
20262
20449
|
};
|
|
20263
20450
|
}();
|
|
20264
20451
|
var onSelect = function onSelect(keys) {
|
|
20265
|
-
setState(_objectSpread$
|
|
20452
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20266
20453
|
selected: keys
|
|
20267
20454
|
}));
|
|
20268
20455
|
};
|
|
@@ -20273,7 +20460,7 @@ function useTableData (_ref) {
|
|
|
20273
20460
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
20274
20461
|
while (1) switch (_context4.prev = _context4.next) {
|
|
20275
20462
|
case 0:
|
|
20276
|
-
setState(_objectSpread$
|
|
20463
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20277
20464
|
deleting: true
|
|
20278
20465
|
}));
|
|
20279
20466
|
newData = _toConsumableArray(state.data);
|
|
@@ -20313,7 +20500,7 @@ function useTableData (_ref) {
|
|
|
20313
20500
|
} finally {
|
|
20314
20501
|
_iterator.f();
|
|
20315
20502
|
}
|
|
20316
|
-
mappingData = _objectSpread$
|
|
20503
|
+
mappingData = _objectSpread$h(_objectSpread$h(_objectSpread$h({}, mappingData), state.mappingData), mapToggle);
|
|
20317
20504
|
deleteResult = undefined;
|
|
20318
20505
|
_context3.prev = 7;
|
|
20319
20506
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -20404,12 +20591,12 @@ function useTableData (_ref) {
|
|
|
20404
20591
|
break;
|
|
20405
20592
|
}
|
|
20406
20593
|
_context4.next = 25;
|
|
20407
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
20408
|
-
pagination: _objectSpread$
|
|
20594
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$h({
|
|
20595
|
+
pagination: _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
|
|
20409
20596
|
current: current
|
|
20410
20597
|
}),
|
|
20411
20598
|
columns: configuration.columns,
|
|
20412
|
-
filters: _objectSpread$
|
|
20599
|
+
filters: _objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter15 = configuration.filter) !== null && _configuration$filter15 !== void 0 && (_configuration$filter15 = _configuration$filter15.toggle) !== null && _configuration$filter15 !== void 0 && _configuration$filter15.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
|
|
20413
20600
|
sorter: filterData.sorter
|
|
20414
20601
|
}, 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 ? {
|
|
20415
20602
|
genericProps: globalFilter.toggle
|
|
@@ -20420,11 +20607,11 @@ function useTableData (_ref) {
|
|
|
20420
20607
|
total = data.total;
|
|
20421
20608
|
case 28:
|
|
20422
20609
|
setInitData(newInitData);
|
|
20423
|
-
setState(_objectSpread$
|
|
20610
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20424
20611
|
selected: [],
|
|
20425
20612
|
deleting: false,
|
|
20426
20613
|
data: newData,
|
|
20427
|
-
pagination: _objectSpread$
|
|
20614
|
+
pagination: _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
|
|
20428
20615
|
current: current === 0 ? 1 : current,
|
|
20429
20616
|
total: total
|
|
20430
20617
|
})
|
|
@@ -20445,14 +20632,14 @@ function useTableData (_ref) {
|
|
|
20445
20632
|
LOG$3.error('No global select filter defiend');
|
|
20446
20633
|
return;
|
|
20447
20634
|
}
|
|
20448
|
-
var newGlobalFilter = _objectSpread$
|
|
20635
|
+
var newGlobalFilter = _objectSpread$h({}, globalFilter);
|
|
20449
20636
|
if (value !== null && value !== void 0 && value.length) {
|
|
20450
20637
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
20451
20638
|
} else {
|
|
20452
20639
|
newGlobalFilter.select = {};
|
|
20453
20640
|
}
|
|
20454
20641
|
setGlobaFilter(newGlobalFilter);
|
|
20455
|
-
onChange(_objectSpread$
|
|
20642
|
+
onChange(_objectSpread$h({
|
|
20456
20643
|
pagination: state.pagination
|
|
20457
20644
|
}, filterData), newGlobalFilter);
|
|
20458
20645
|
};
|
|
@@ -20466,11 +20653,11 @@ function useTableData (_ref) {
|
|
|
20466
20653
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
20467
20654
|
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', 1];
|
|
20468
20655
|
});
|
|
20469
|
-
var newGlobalFilter = _objectSpread$
|
|
20656
|
+
var newGlobalFilter = _objectSpread$h(_objectSpread$h({}, globalFilter), {}, {
|
|
20470
20657
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
20471
20658
|
});
|
|
20472
20659
|
setGlobaFilter(newGlobalFilter);
|
|
20473
|
-
onChange(_objectSpread$
|
|
20660
|
+
onChange(_objectSpread$h({
|
|
20474
20661
|
pagination: state.pagination
|
|
20475
20662
|
}, filterData), newGlobalFilter);
|
|
20476
20663
|
};
|
|
@@ -20480,7 +20667,7 @@ function useTableData (_ref) {
|
|
|
20480
20667
|
LOG$3.error('No global search filter defiend');
|
|
20481
20668
|
return;
|
|
20482
20669
|
}
|
|
20483
|
-
var newGlobalFilter = _objectSpread$
|
|
20670
|
+
var newGlobalFilter = _objectSpread$h(_objectSpread$h({}, globalFilter), {}, {
|
|
20484
20671
|
search: {}
|
|
20485
20672
|
});
|
|
20486
20673
|
if (value) {
|
|
@@ -20494,7 +20681,7 @@ function useTableData (_ref) {
|
|
|
20494
20681
|
});
|
|
20495
20682
|
}
|
|
20496
20683
|
setGlobaFilter(newGlobalFilter);
|
|
20497
|
-
onChange(_objectSpread$
|
|
20684
|
+
onChange(_objectSpread$h({
|
|
20498
20685
|
pagination: state.pagination
|
|
20499
20686
|
}, filterData), newGlobalFilter);
|
|
20500
20687
|
};
|
|
@@ -20504,17 +20691,17 @@ function useTableData (_ref) {
|
|
|
20504
20691
|
LOG$3.error('No global period filter defiend');
|
|
20505
20692
|
return;
|
|
20506
20693
|
}
|
|
20507
|
-
var newGlobalFilter = _objectSpread$
|
|
20694
|
+
var newGlobalFilter = _objectSpread$h({}, globalFilter);
|
|
20508
20695
|
newGlobalFilter.timeStamp = {
|
|
20509
20696
|
fromTimeStamp: [from],
|
|
20510
20697
|
toTimeStamp: [to]
|
|
20511
20698
|
};
|
|
20512
20699
|
setGlobaFilter(newGlobalFilter);
|
|
20513
|
-
onChange(_objectSpread$
|
|
20700
|
+
onChange(_objectSpread$h({
|
|
20514
20701
|
pagination: state.pagination
|
|
20515
20702
|
}, filterData), newGlobalFilter);
|
|
20516
20703
|
};
|
|
20517
|
-
return _objectSpread$
|
|
20704
|
+
return _objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20518
20705
|
title: title,
|
|
20519
20706
|
configuration: configuration,
|
|
20520
20707
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -20554,8 +20741,8 @@ function StandardTable (_ref) {
|
|
|
20554
20741
|
});
|
|
20555
20742
|
}
|
|
20556
20743
|
|
|
20557
|
-
function ownKeys$
|
|
20558
|
-
function _objectSpread$
|
|
20744
|
+
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; }
|
|
20745
|
+
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; }
|
|
20559
20746
|
function Table (props) {
|
|
20560
20747
|
var root = useStore();
|
|
20561
20748
|
var variant = useMemo(function () {
|
|
@@ -20563,15 +20750,15 @@ function Table (props) {
|
|
|
20563
20750
|
return config.variant;
|
|
20564
20751
|
}, [props.id]);
|
|
20565
20752
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
20566
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
20753
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$g({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$g({}, props))]
|
|
20567
20754
|
});
|
|
20568
20755
|
}
|
|
20569
20756
|
|
|
20570
20757
|
function _createForOfIteratorHelper$6(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$6(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
20571
20758
|
function _unsupportedIterableToArray$6(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$6(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$6(o, minLen); }
|
|
20572
20759
|
function _arrayLikeToArray$6(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
20573
|
-
function ownKeys$
|
|
20574
|
-
function _objectSpread$
|
|
20760
|
+
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; }
|
|
20761
|
+
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; }
|
|
20575
20762
|
function useAGGrid (_ref) {
|
|
20576
20763
|
var id = _ref.id,
|
|
20577
20764
|
filter = _ref.filter,
|
|
@@ -20665,7 +20852,7 @@ function useAGGrid (_ref) {
|
|
|
20665
20852
|
value = _ref3[1];
|
|
20666
20853
|
if (_idx == 0) {
|
|
20667
20854
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
20668
|
-
rdat.push(_objectSpread$
|
|
20855
|
+
rdat.push(_objectSpread$f(_objectSpread$f({}, rd), {}, {
|
|
20669
20856
|
grouping: [idx.toString()]
|
|
20670
20857
|
}));
|
|
20671
20858
|
var sp = key.split(':');
|
|
@@ -20808,8 +20995,8 @@ var value = "value-FCA-6";
|
|
|
20808
20995
|
var css_248z$8 = ".overlay-lm0tm {\n position: absolute;\n z-index: 1;\n background-color: rgba(247,247,247,0.45882);\n height: 60vh;\n width: 100%;\n}\n.loader-LaXZy {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 50px;\n height: 50px;\n border: 3px solid rgba(0, 0, 0, 0.3);\n border-radius: 50%;\n border-top-color: #fff;\n animation: spin-qUdpu 1s ease-in-out infinite;\n -webkit-animation: spin-qUdpu 1s ease-in-out infinite;\n}\n.flex-yQdda {\n display: flex;\n}\n\n.bar-Y663f {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin-top: 7%;\n}\n\n.value-FCA-6 {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: -moz-fit-content;\n width: fit-content;\n}\n@keyframes spin-qUdpu {\n to {\n -webkit-transform: rotate(360deg);\n }\n}\n";
|
|
20809
20996
|
styleInject(css_248z$8);
|
|
20810
20997
|
|
|
20811
|
-
function ownKeys$
|
|
20812
|
-
function _objectSpread$
|
|
20998
|
+
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; }
|
|
20999
|
+
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; }
|
|
20813
21000
|
var AGChart = function AGChart(_ref) {
|
|
20814
21001
|
var data = _ref.data;
|
|
20815
21002
|
var groupedData = [];
|
|
@@ -20817,11 +21004,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
20817
21004
|
data.forEach(function (dt) {
|
|
20818
21005
|
if (dt.count == 0) return;
|
|
20819
21006
|
if (groupedData.length > dt.grouping[0]) {
|
|
20820
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
21007
|
+
groupedData[dt.grouping[0]].push(_objectSpread$e(_objectSpread$e({}, dt), {}, {
|
|
20821
21008
|
count: Number(dt.count)
|
|
20822
21009
|
}));
|
|
20823
21010
|
} else {
|
|
20824
|
-
groupedData.push([_objectSpread$
|
|
21011
|
+
groupedData.push([_objectSpread$e(_objectSpread$e({}, dt), {}, {
|
|
20825
21012
|
count: Number(dt.count)
|
|
20826
21013
|
})]);
|
|
20827
21014
|
}
|
|
@@ -20862,8 +21049,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
20862
21049
|
});
|
|
20863
21050
|
};
|
|
20864
21051
|
|
|
20865
|
-
function ownKeys$
|
|
20866
|
-
function _objectSpread$
|
|
21052
|
+
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; }
|
|
21053
|
+
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; }
|
|
20867
21054
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
20868
21055
|
var id = _ref.id,
|
|
20869
21056
|
filter = _ref.filter,
|
|
@@ -20956,7 +21143,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
20956
21143
|
});
|
|
20957
21144
|
});
|
|
20958
21145
|
}
|
|
20959
|
-
return _objectSpread$
|
|
21146
|
+
return _objectSpread$d(_objectSpread$d({}, column), {}, {
|
|
20960
21147
|
cellRenderer: renderer
|
|
20961
21148
|
});
|
|
20962
21149
|
});
|
|
@@ -21230,8 +21417,8 @@ var CustomText$1 = observer(CustomText, {
|
|
|
21230
21417
|
forwardRef: true
|
|
21231
21418
|
});
|
|
21232
21419
|
|
|
21233
|
-
function ownKeys$
|
|
21234
|
-
function _objectSpread$
|
|
21420
|
+
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; }
|
|
21421
|
+
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; }
|
|
21235
21422
|
function _createForOfIteratorHelper$5(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$5(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
21236
21423
|
function _unsupportedIterableToArray$5(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$5(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$5(o, minLen); }
|
|
21237
21424
|
function _arrayLikeToArray$5(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -21294,7 +21481,7 @@ function useFilterBoxData (id) {
|
|
|
21294
21481
|
} finally {
|
|
21295
21482
|
_iterator.f();
|
|
21296
21483
|
}
|
|
21297
|
-
return _objectSpread$
|
|
21484
|
+
return _objectSpread$c(_objectSpread$c({}, state), ob);
|
|
21298
21485
|
}
|
|
21299
21486
|
return {
|
|
21300
21487
|
configuration: configuration,
|
|
@@ -21308,8 +21495,8 @@ function useFilterBoxData (id) {
|
|
|
21308
21495
|
function _createForOfIteratorHelper$4(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$4(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
21309
21496
|
function _unsupportedIterableToArray$4(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$4(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$4(o, minLen); }
|
|
21310
21497
|
function _arrayLikeToArray$4(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
21311
|
-
function ownKeys$
|
|
21312
|
-
function _objectSpread$
|
|
21498
|
+
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; }
|
|
21499
|
+
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; }
|
|
21313
21500
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
21314
21501
|
var id = _ref.id,
|
|
21315
21502
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -21337,7 +21524,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
21337
21524
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select$1, {
|
|
21338
21525
|
mode: "single",
|
|
21339
21526
|
apiInterface: filter.requestOptions,
|
|
21340
|
-
wholeData: _objectSpread$
|
|
21527
|
+
wholeData: _objectSpread$b(_objectSpread$b({}, state.filter), {}, {
|
|
21341
21528
|
tab: tab
|
|
21342
21529
|
}),
|
|
21343
21530
|
mapping: filter.requestMapping,
|
|
@@ -21569,8 +21756,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
21569
21756
|
return false;
|
|
21570
21757
|
});
|
|
21571
21758
|
|
|
21572
|
-
function ownKeys$
|
|
21573
|
-
function _objectSpread$
|
|
21759
|
+
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; }
|
|
21760
|
+
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; }
|
|
21574
21761
|
function useUIBuilderData (id) {
|
|
21575
21762
|
var save = undefined;
|
|
21576
21763
|
var root = useStore();
|
|
@@ -21602,7 +21789,7 @@ function useUIBuilderData (id) {
|
|
|
21602
21789
|
var configuration = _useMemo.configuration;
|
|
21603
21790
|
useEffect(function () {
|
|
21604
21791
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
21605
|
-
return setFilter(_objectSpread$
|
|
21792
|
+
return setFilter(_objectSpread$a(_objectSpread$a({}, filter), {}, {
|
|
21606
21793
|
sessionGuid: res
|
|
21607
21794
|
}));
|
|
21608
21795
|
});
|
|
@@ -21625,8 +21812,8 @@ function useUIBuilderData (id) {
|
|
|
21625
21812
|
};
|
|
21626
21813
|
}
|
|
21627
21814
|
|
|
21628
|
-
function ownKeys$
|
|
21629
|
-
function _objectSpread$
|
|
21815
|
+
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; }
|
|
21816
|
+
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; }
|
|
21630
21817
|
function UIBuilder(_ref) {
|
|
21631
21818
|
var id = _ref.id;
|
|
21632
21819
|
var state = useUIBuilderData(id);
|
|
@@ -21653,7 +21840,7 @@ function UIBuilder(_ref) {
|
|
|
21653
21840
|
override = {
|
|
21654
21841
|
value: newFilter[item.field],
|
|
21655
21842
|
setValue: function setValue(newVal) {
|
|
21656
|
-
var newFilter = _objectSpread$
|
|
21843
|
+
var newFilter = _objectSpread$9({}, state.filter);
|
|
21657
21844
|
newFilter[item.field] = newVal;
|
|
21658
21845
|
state.setFilter(newFilter);
|
|
21659
21846
|
}
|
|
@@ -21701,7 +21888,7 @@ function UIBuilder(_ref) {
|
|
|
21701
21888
|
case 'AGGrid':
|
|
21702
21889
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
21703
21890
|
id: item.id,
|
|
21704
|
-
filter: _objectSpread$
|
|
21891
|
+
filter: _objectSpread$9({
|
|
21705
21892
|
optionCodices: JSON.stringify(state.data)
|
|
21706
21893
|
}, state.filter),
|
|
21707
21894
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -21861,8 +22048,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
21861
22048
|
};
|
|
21862
22049
|
var OrgItem$1 = observer(OrgItem);
|
|
21863
22050
|
|
|
21864
|
-
function ownKeys$
|
|
21865
|
-
function _objectSpread$
|
|
22051
|
+
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; }
|
|
22052
|
+
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; }
|
|
21866
22053
|
function useTransformJson (_ref) {
|
|
21867
22054
|
var id = _ref.id;
|
|
21868
22055
|
var _useState = useState(),
|
|
@@ -21928,7 +22115,7 @@ function useTransformJson (_ref) {
|
|
|
21928
22115
|
}();
|
|
21929
22116
|
var transformData = function transformData(data, itemChain, parentOrgId) {
|
|
21930
22117
|
var _data$children;
|
|
21931
|
-
return _objectSpread$
|
|
22118
|
+
return _objectSpread$8(_objectSpread$8({}, data), {}, {
|
|
21932
22119
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
21933
22120
|
data: data,
|
|
21934
22121
|
configuration: configuration,
|
|
@@ -22034,27 +22221,27 @@ var Legend = function Legend(props) {
|
|
|
22034
22221
|
itemLayout: "horizontal",
|
|
22035
22222
|
dataSource: [{
|
|
22036
22223
|
title: 'DIVA Retailer',
|
|
22037
|
-
description: 'Retailer-Organisationen werden dazu
|
|
22224
|
+
description: 'Retailer-Organisationen werden dazu verwendet, Katalogdaten für den Handel aufzubereiten. ' + 'Hierbei werden die Kataloge der Hersteller importiert und für den Verkauf angepasst, beispielsweise durch die Anpassung von Preisen. ' + 'Diese Organisationen können entweder direkt im Handel genutzt werden oder weiterhin in verschiedene Kanäle unterteilt werden.',
|
|
22038
22225
|
color: '#81c784'
|
|
22039
22226
|
}, {
|
|
22040
22227
|
title: 'DIVA Retailer Kanal',
|
|
22041
|
-
description: 'Organisationen die unterhalb einer Retailer-Organisation angesiedelt sind, haben Zugriff auf
|
|
22228
|
+
description: 'Organisationen, die unterhalb einer Retailer-Organisation angesiedelt sind, haben Zugriff auf deren Katalogdaten. ' + 'Sie können beispielsweise dazu genutzt werden, die verschiedenen Filialen eines Händlers zu organisieren. ' + 'In diesem Kontext können die Katalogdaten nicht mehr angepasst werden, sodass beispielsweise Preise direkt übernommen werden.',
|
|
22042
22229
|
color: '#c8e6c9'
|
|
22043
22230
|
}, {
|
|
22044
22231
|
title: 'DIVA Supplier',
|
|
22045
|
-
description: 'Supplier-Organisationen dienen dazu Kataloge für
|
|
22232
|
+
description: 'Supplier-Organisationen dienen dazu, Kataloge für Hersteller zu erstellen. ' + 'Dabei werden Kataloge entweder neu aufgebaut oder als IDM-Kataloge importiert.',
|
|
22046
22233
|
color: '#ba68c8'
|
|
22047
22234
|
}, {
|
|
22048
22235
|
title: 'DIVA Dealer',
|
|
22049
|
-
description: '
|
|
22236
|
+
description: 'Organisationen unterhalb einer Supplier-Organisation werden in DIVA als Dealer bezeichnet. ' + 'Über diese Dealer-Organisationen werden Kataloge der Supplier-Organisation für verschiedene Retailer-Organisationen freigegeben.',
|
|
22050
22237
|
color: '#e1bee7'
|
|
22051
22238
|
}, {
|
|
22052
22239
|
title: 'DIVA Verband',
|
|
22053
|
-
description: 'Verbandsorganisationen werden
|
|
22240
|
+
description: 'Verbandsorganisationen werden genutzt, um Kataloge für mehrere Retailer-Organisationen aufzubereiten. ' + 'Dabei werden Kataloge von einer Supplier-Organisation importiert und für den Handel angepasst. ' + 'In den verschiedenen Retailer-Organisationen müssen dann nur noch die Unterschiede gepflegt werden.',
|
|
22054
22241
|
color: '#fff176'
|
|
22055
22242
|
}, {
|
|
22056
22243
|
title: 'Hülsenorganisation',
|
|
22057
|
-
description: 'Diese Organisationen können nicht im Frontend genutzt werden und haben auch keinen Zugriff auf Katalogdaten.' + 'Sie
|
|
22244
|
+
description: 'Diese Organisationen können nicht im Frontend genutzt werden und haben auch keinen Zugriff auf Katalogdaten. ' + 'Sie dienen lediglich dazu, die Struktur der Organisation aufzubauen und abzubilden.',
|
|
22058
22245
|
color: '#fff'
|
|
22059
22246
|
}],
|
|
22060
22247
|
renderItem: function renderItem(item, index) {
|
|
@@ -22587,8 +22774,8 @@ function useCatalogEditor (id) {
|
|
|
22587
22774
|
};
|
|
22588
22775
|
}
|
|
22589
22776
|
|
|
22590
|
-
function ownKeys$
|
|
22591
|
-
function _objectSpread$
|
|
22777
|
+
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; }
|
|
22778
|
+
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; }
|
|
22592
22779
|
function DragDropUpload(_ref) {
|
|
22593
22780
|
var api2Params = _ref.api2Params,
|
|
22594
22781
|
catalogId = _ref.catalogId,
|
|
@@ -22693,7 +22880,7 @@ function DragDropUpload(_ref) {
|
|
|
22693
22880
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
22694
22881
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
22695
22882
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
22696
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
22883
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
22697
22884
|
children: [/*#__PURE__*/jsx("p", {
|
|
22698
22885
|
className: "ant-upload-drag-icon",
|
|
22699
22886
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -23011,8 +23198,8 @@ var ContentCard = observer(function (_ref2) {
|
|
|
23011
23198
|
});
|
|
23012
23199
|
var Content = observer(ContentWrapper);
|
|
23013
23200
|
|
|
23014
|
-
function ownKeys$
|
|
23015
|
-
function _objectSpread$
|
|
23201
|
+
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; }
|
|
23202
|
+
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; }
|
|
23016
23203
|
function _createForOfIteratorHelper$3(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$3(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
23017
23204
|
function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$3(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$3(o, minLen); }
|
|
23018
23205
|
function _arrayLikeToArray$3(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -23214,7 +23401,7 @@ function useRoleSelectorData (_ref) {
|
|
|
23214
23401
|
roles.forEach(function (r) {
|
|
23215
23402
|
//check if after the changes the role is selected
|
|
23216
23403
|
if (value.includes(r._id)) {
|
|
23217
|
-
var newValue = _objectSpread$
|
|
23404
|
+
var newValue = _objectSpread$6(_objectSpread$6({}, r), {}, {
|
|
23218
23405
|
selected: true
|
|
23219
23406
|
});
|
|
23220
23407
|
//add it to the new list as selected role
|
|
@@ -23250,7 +23437,7 @@ function useRoleSelectorData (_ref) {
|
|
|
23250
23437
|
}
|
|
23251
23438
|
}
|
|
23252
23439
|
} else {
|
|
23253
|
-
var _newValue = _objectSpread$
|
|
23440
|
+
var _newValue = _objectSpread$6(_objectSpread$6({}, r), {}, {
|
|
23254
23441
|
selected: false
|
|
23255
23442
|
});
|
|
23256
23443
|
//add it to the new list as unselected role
|
|
@@ -23454,7 +23641,7 @@ function _updateRoles() {
|
|
|
23454
23641
|
userRole = userRoles.find(function (r) {
|
|
23455
23642
|
return r._id == role._id;
|
|
23456
23643
|
});
|
|
23457
|
-
newRole = _objectSpread$
|
|
23644
|
+
newRole = _objectSpread$6({}, role);
|
|
23458
23645
|
if (userRole) {
|
|
23459
23646
|
newRole.selected = true;
|
|
23460
23647
|
newRole.inherited = userRole.inherited;
|
|
@@ -23674,7 +23861,7 @@ function _fetchOptions() {
|
|
|
23674
23861
|
case 4:
|
|
23675
23862
|
result = _context11.sent;
|
|
23676
23863
|
options = result.data.map(function (d) {
|
|
23677
|
-
return _objectSpread$
|
|
23864
|
+
return _objectSpread$6(_objectSpread$6({}, d), {}, {
|
|
23678
23865
|
label: d.displayName,
|
|
23679
23866
|
value: d._id,
|
|
23680
23867
|
isLeaf: !d.hasChildren
|
|
@@ -23778,8 +23965,8 @@ var parent = "parent-NZJ3S";
|
|
|
23778
23965
|
var css_248z$3 = ".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";
|
|
23779
23966
|
styleInject(css_248z$3);
|
|
23780
23967
|
|
|
23781
|
-
function ownKeys$
|
|
23782
|
-
function _objectSpread$
|
|
23968
|
+
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; }
|
|
23969
|
+
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; }
|
|
23783
23970
|
function _createForOfIteratorHelper$2(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$2(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
23784
23971
|
function _unsupportedIterableToArray$2(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); }
|
|
23785
23972
|
function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -23839,8 +24026,8 @@ function _generateCSV() {
|
|
|
23839
24026
|
break;
|
|
23840
24027
|
}
|
|
23841
24028
|
_context2.next = 21;
|
|
23842
|
-
return generateCSV(_objectSpread$
|
|
23843
|
-
mappingData: _objectSpread$
|
|
24029
|
+
return generateCSV(_objectSpread$5(_objectSpread$5({}, exportParams.children), {}, {
|
|
24030
|
+
mappingData: _objectSpread$5(_objectSpread$5({}, parent), {}, {
|
|
23844
24031
|
parentId: exportParams.mappingData._id
|
|
23845
24032
|
})
|
|
23846
24033
|
}), csvData);
|
|
@@ -23902,8 +24089,8 @@ var generateCSVData = /*#__PURE__*/function () {
|
|
|
23902
24089
|
};
|
|
23903
24090
|
}();
|
|
23904
24091
|
|
|
23905
|
-
function ownKeys$
|
|
23906
|
-
function _objectSpread$
|
|
24092
|
+
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24093
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23907
24094
|
function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
23908
24095
|
function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
|
|
23909
24096
|
function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -24322,7 +24509,7 @@ function useRelationSelectorData (_ref) {
|
|
|
24322
24509
|
var activeItem = _step.value;
|
|
24323
24510
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
24324
24511
|
addedObjects.push(addedData);
|
|
24325
|
-
getSplittedItems(_objectSpread$
|
|
24512
|
+
getSplittedItems(_objectSpread$4(_objectSpread$4({}, activeItem), {}, {
|
|
24326
24513
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
24327
24514
|
}));
|
|
24328
24515
|
ret = true;
|
|
@@ -24662,8 +24849,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
24662
24849
|
var css_248z$2 = ".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";
|
|
24663
24850
|
styleInject(css_248z$2);
|
|
24664
24851
|
|
|
24665
|
-
function ownKeys$
|
|
24666
|
-
function _objectSpread$
|
|
24852
|
+
function ownKeys$3(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; }
|
|
24853
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24667
24854
|
var DropDown = function DropDown(_ref) {
|
|
24668
24855
|
var _curItem$data$length;
|
|
24669
24856
|
var split = _ref.split,
|
|
@@ -24695,7 +24882,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
24695
24882
|
});
|
|
24696
24883
|
return /*#__PURE__*/jsx(Collapse, {
|
|
24697
24884
|
onChange: function onChange() {
|
|
24698
|
-
return getSplittedItems(_objectSpread$
|
|
24885
|
+
return getSplittedItems(_objectSpread$3(_objectSpread$3({}, item.item), {}, {
|
|
24699
24886
|
parentId: item.parentId
|
|
24700
24887
|
}), 0);
|
|
24701
24888
|
},
|
|
@@ -24955,6 +25142,8 @@ var RelationSelector$1 = observer(RelationSelector, {
|
|
|
24955
25142
|
forwardRef: true
|
|
24956
25143
|
});
|
|
24957
25144
|
|
|
25145
|
+
function ownKeys$2(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; }
|
|
25146
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24958
25147
|
function useListData (_ref) {
|
|
24959
25148
|
var id = _ref.id,
|
|
24960
25149
|
data = _ref.data;
|
|
@@ -24977,9 +25166,17 @@ function useListData (_ref) {
|
|
|
24977
25166
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
24978
25167
|
listData = _useState4[0],
|
|
24979
25168
|
setListData = _useState4[1];
|
|
25169
|
+
var _useState5 = useState([]),
|
|
25170
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
25171
|
+
deletedObjects = _useState6[0],
|
|
25172
|
+
setDeletedObjects = _useState6[1];
|
|
25173
|
+
var _useState7 = useState(undefined),
|
|
25174
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
25175
|
+
updatedObject = _useState8[0],
|
|
25176
|
+
setUpdatedObject = _useState8[1];
|
|
24980
25177
|
useEffect(function () {
|
|
24981
25178
|
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
24982
|
-
var result;
|
|
25179
|
+
var result, initData;
|
|
24983
25180
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
24984
25181
|
while (1) switch (_context.prev = _context.next) {
|
|
24985
25182
|
case 0:
|
|
@@ -24989,8 +25186,10 @@ function useListData (_ref) {
|
|
|
24989
25186
|
case 3:
|
|
24990
25187
|
result = _context.sent;
|
|
24991
25188
|
setListData(result.data.map(parseField));
|
|
25189
|
+
initData = _objectSpread$2({}, data);
|
|
25190
|
+
setUpdatedObject(initData);
|
|
24992
25191
|
setLoading(false);
|
|
24993
|
-
case
|
|
25192
|
+
case 8:
|
|
24994
25193
|
case "end":
|
|
24995
25194
|
return _context.stop();
|
|
24996
25195
|
}
|
|
@@ -24998,11 +25197,14 @@ function useListData (_ref) {
|
|
|
24998
25197
|
}))();
|
|
24999
25198
|
}, []);
|
|
25000
25199
|
var parseField = function parseField(dataEntry) {
|
|
25001
|
-
var _configuration$itemMa, _configuration$itemMa2, _configuration$itemMa3;
|
|
25200
|
+
var _configuration$itemMa, _configuration$itemMa2, _configuration$itemMa3, _configuration$itemMa4, _configuration$itemMa5, _configuration$itemMa6;
|
|
25002
25201
|
var item = {
|
|
25003
25202
|
title: '',
|
|
25004
25203
|
description: '',
|
|
25005
|
-
content: ''
|
|
25204
|
+
content: '',
|
|
25205
|
+
id: '',
|
|
25206
|
+
image: '',
|
|
25207
|
+
itemUpdate: undefined
|
|
25006
25208
|
};
|
|
25007
25209
|
(_configuration$itemMa = configuration.itemMapping.title) === null || _configuration$itemMa === void 0 || _configuration$itemMa.forEach(function (field) {
|
|
25008
25210
|
item.title = item.title + (typeof field == 'string' ? field : parseFieldValue(dataEntry[field.field], field)) + ' ';
|
|
@@ -25013,6 +25215,18 @@ function useListData (_ref) {
|
|
|
25013
25215
|
(_configuration$itemMa3 = configuration.itemMapping.content) === null || _configuration$itemMa3 === void 0 || _configuration$itemMa3.forEach(function (field) {
|
|
25014
25216
|
item.content = item.content + (typeof field == 'string' ? field : parseFieldValue(dataEntry[field.field], field)) + ' ';
|
|
25015
25217
|
});
|
|
25218
|
+
(_configuration$itemMa4 = configuration.itemMapping.id) === null || _configuration$itemMa4 === void 0 || _configuration$itemMa4.forEach(function (field) {
|
|
25219
|
+
item.id = item.id + (typeof field == 'string' ? field : parseFieldValue(dataEntry[field.field], field)) + ' ';
|
|
25220
|
+
});
|
|
25221
|
+
(_configuration$itemMa5 = configuration.itemMapping.image) === null || _configuration$itemMa5 === void 0 || _configuration$itemMa5.forEach(function (field) {
|
|
25222
|
+
item.image = item.image + (typeof field == 'string' ? field : parseFieldValue(dataEntry[field.field], field)) + ' ';
|
|
25223
|
+
});
|
|
25224
|
+
(_configuration$itemMa6 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa6 === void 0 || _configuration$itemMa6.forEach(function (field) {
|
|
25225
|
+
var parsedField = field.field.split('.');
|
|
25226
|
+
item.itemUpdate = _objectSpread$2(_objectSpread$2({}, field), {}, {
|
|
25227
|
+
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
25228
|
+
});
|
|
25229
|
+
});
|
|
25016
25230
|
return item;
|
|
25017
25231
|
};
|
|
25018
25232
|
var parseFieldValue = function parseFieldValue(value, config) {
|
|
@@ -25026,10 +25240,139 @@ function useListData (_ref) {
|
|
|
25026
25240
|
}
|
|
25027
25241
|
return value;
|
|
25028
25242
|
};
|
|
25243
|
+
function deleteItem(item, index) {
|
|
25244
|
+
var delObj = deletedObjects;
|
|
25245
|
+
delObj.push(item);
|
|
25246
|
+
setDeletedObjects(_toConsumableArray(delObj));
|
|
25247
|
+
var acItems = listData;
|
|
25248
|
+
acItems.splice(index, 1);
|
|
25249
|
+
setListData(_toConsumableArray(acItems));
|
|
25250
|
+
}
|
|
25251
|
+
function updateItem(item, index, field, value) {
|
|
25252
|
+
var fields = field.split('.');
|
|
25253
|
+
if (fields.length > 2) {
|
|
25254
|
+
console.error('field with more than 2 parts not allowed');
|
|
25255
|
+
return;
|
|
25256
|
+
}
|
|
25257
|
+
var updObj = _objectSpread$2({}, updatedObject);
|
|
25258
|
+
if (fields.length === 1) {
|
|
25259
|
+
updObj = _objectSpread$2(_objectSpread$2({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
25260
|
+
} else if (fields.length === 2) {
|
|
25261
|
+
var updatedField = updObj[fields[0]].find(function (v) {
|
|
25262
|
+
return v.id === item.id.trim();
|
|
25263
|
+
});
|
|
25264
|
+
if (updatedField) {
|
|
25265
|
+
var updatedFieldCopy = _objectSpread$2(_objectSpread$2({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
25266
|
+
updObj = _objectSpread$2(_objectSpread$2({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
25267
|
+
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
25268
|
+
})));
|
|
25269
|
+
}
|
|
25270
|
+
}
|
|
25271
|
+
setUpdatedObject(updObj);
|
|
25272
|
+
var acItems = listData;
|
|
25273
|
+
for (var i = 0; i < acItems.length; i++) {
|
|
25274
|
+
if (i == index) {
|
|
25275
|
+
acItems[i].itemUpdate = _objectSpread$2(_objectSpread$2({}, acItems[i].itemUpdate), {}, {
|
|
25276
|
+
value: value
|
|
25277
|
+
});
|
|
25278
|
+
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
25279
|
+
acItems[i].itemUpdate = _objectSpread$2(_objectSpread$2({}, acItems[i].itemUpdate), {}, {
|
|
25280
|
+
value: !value
|
|
25281
|
+
});
|
|
25282
|
+
}
|
|
25283
|
+
}
|
|
25284
|
+
setListData(_toConsumableArray(acItems));
|
|
25285
|
+
}
|
|
25286
|
+
function save() {
|
|
25287
|
+
return _save.apply(this, arguments);
|
|
25288
|
+
}
|
|
25289
|
+
function _save() {
|
|
25290
|
+
_save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
25291
|
+
var i, relatedId, _i, _configuration$itemMa7, itemUpdate, parts, key, j, obj, comparedata;
|
|
25292
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
25293
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
25294
|
+
case 0:
|
|
25295
|
+
i = 0;
|
|
25296
|
+
case 1:
|
|
25297
|
+
if (!(i < deletedObjects.length)) {
|
|
25298
|
+
_context2.next = 8;
|
|
25299
|
+
break;
|
|
25300
|
+
}
|
|
25301
|
+
relatedId = _typeof(deletedObjects[i]) == 'object' ? deletedObjects[i]._id || deletedObjects[i].id.trim() : deletedObjects[i];
|
|
25302
|
+
_context2.next = 5;
|
|
25303
|
+
return apiHandler["delete"](undefined, configuration.mapping, {
|
|
25304
|
+
_id: data._id,
|
|
25305
|
+
id: relatedId
|
|
25306
|
+
});
|
|
25307
|
+
case 5:
|
|
25308
|
+
i++;
|
|
25309
|
+
_context2.next = 1;
|
|
25310
|
+
break;
|
|
25311
|
+
case 8:
|
|
25312
|
+
setDeletedObjects([]);
|
|
25313
|
+
if (!(updatedObject !== data)) {
|
|
25314
|
+
_context2.next = 32;
|
|
25315
|
+
break;
|
|
25316
|
+
}
|
|
25317
|
+
if (!configuration.itemMapping.itemUpdate) {
|
|
25318
|
+
_context2.next = 32;
|
|
25319
|
+
break;
|
|
25320
|
+
}
|
|
25321
|
+
_i = 0;
|
|
25322
|
+
case 12:
|
|
25323
|
+
if (!(_i < ((_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 ? void 0 : _configuration$itemMa7.length))) {
|
|
25324
|
+
_context2.next = 32;
|
|
25325
|
+
break;
|
|
25326
|
+
}
|
|
25327
|
+
itemUpdate = configuration.itemMapping.itemUpdate[_i];
|
|
25328
|
+
if (!itemUpdate.field.includes('.')) {
|
|
25329
|
+
_context2.next = 29;
|
|
25330
|
+
break;
|
|
25331
|
+
}
|
|
25332
|
+
parts = itemUpdate.field.split('.');
|
|
25333
|
+
key = parts[0];
|
|
25334
|
+
parts[1];
|
|
25335
|
+
if (!(updatedObject[key].length > 0)) {
|
|
25336
|
+
_context2.next = 29;
|
|
25337
|
+
break;
|
|
25338
|
+
}
|
|
25339
|
+
j = 0;
|
|
25340
|
+
case 20:
|
|
25341
|
+
if (!(j < updatedObject[key].length)) {
|
|
25342
|
+
_context2.next = 29;
|
|
25343
|
+
break;
|
|
25344
|
+
}
|
|
25345
|
+
obj = updatedObject[key][j];
|
|
25346
|
+
comparedata = data[key][j];
|
|
25347
|
+
if (!(obj !== comparedata)) {
|
|
25348
|
+
_context2.next = 26;
|
|
25349
|
+
break;
|
|
25350
|
+
}
|
|
25351
|
+
_context2.next = 26;
|
|
25352
|
+
return apiHandler.update(obj, data, configuration.mapping);
|
|
25353
|
+
case 26:
|
|
25354
|
+
j++;
|
|
25355
|
+
_context2.next = 20;
|
|
25356
|
+
break;
|
|
25357
|
+
case 29:
|
|
25358
|
+
_i++;
|
|
25359
|
+
_context2.next = 12;
|
|
25360
|
+
break;
|
|
25361
|
+
case 32:
|
|
25362
|
+
case "end":
|
|
25363
|
+
return _context2.stop();
|
|
25364
|
+
}
|
|
25365
|
+
}, _callee2);
|
|
25366
|
+
}));
|
|
25367
|
+
return _save.apply(this, arguments);
|
|
25368
|
+
}
|
|
25029
25369
|
return {
|
|
25030
25370
|
loading: loading,
|
|
25031
25371
|
listData: listData,
|
|
25032
|
-
configuration: configuration
|
|
25372
|
+
configuration: configuration,
|
|
25373
|
+
deleteItem: deleteItem,
|
|
25374
|
+
updateItem: updateItem,
|
|
25375
|
+
save: save
|
|
25033
25376
|
};
|
|
25034
25377
|
}
|
|
25035
25378
|
|
|
@@ -25037,21 +25380,57 @@ var ListWrapper = function ListWrapper(props, ref) {
|
|
|
25037
25380
|
useStore();
|
|
25038
25381
|
var _useListData = useListData(props),
|
|
25039
25382
|
loading = _useListData.loading,
|
|
25040
|
-
listData = _useListData.listData
|
|
25383
|
+
listData = _useListData.listData,
|
|
25384
|
+
configuration = _useListData.configuration,
|
|
25385
|
+
deleteItem = _useListData.deleteItem,
|
|
25386
|
+
updateItem = _useListData.updateItem,
|
|
25387
|
+
save = _useListData.save;
|
|
25041
25388
|
useImperativeHandle(ref, function () {
|
|
25042
25389
|
return {
|
|
25043
25390
|
submit: function submit() {
|
|
25044
|
-
|
|
25391
|
+
save().then(function () {
|
|
25392
|
+
return props.onChange();
|
|
25393
|
+
});
|
|
25045
25394
|
}
|
|
25046
25395
|
};
|
|
25047
|
-
}, []);
|
|
25396
|
+
}, [save]);
|
|
25397
|
+
var listItemactions = function listItemactions(item, index) {
|
|
25398
|
+
var actions = [];
|
|
25399
|
+
if (item.itemUpdate) {
|
|
25400
|
+
if (item.itemUpdate.type === 'boolean') {
|
|
25401
|
+
actions.push( /*#__PURE__*/jsx(Checkbox, {
|
|
25402
|
+
checked: item.itemUpdate.value,
|
|
25403
|
+
disabled: !item.itemUpdate.multiselect && item.itemUpdate.value,
|
|
25404
|
+
onChange: function onChange(e) {
|
|
25405
|
+
return updateItem(item, index, item.itemUpdate.field, e.target.checked);
|
|
25406
|
+
},
|
|
25407
|
+
children: item.itemUpdate.title
|
|
25408
|
+
}));
|
|
25409
|
+
}
|
|
25410
|
+
}
|
|
25411
|
+
if (configuration.canDelete) {
|
|
25412
|
+
actions.push( /*#__PURE__*/jsx(DeleteOutlined, {
|
|
25413
|
+
onClick: function onClick() {
|
|
25414
|
+
return deleteItem(item, index);
|
|
25415
|
+
}
|
|
25416
|
+
}));
|
|
25417
|
+
}
|
|
25418
|
+
return actions;
|
|
25419
|
+
};
|
|
25048
25420
|
return /*#__PURE__*/jsx(List$1, {
|
|
25049
25421
|
dataSource: listData,
|
|
25050
25422
|
loading: loading,
|
|
25051
25423
|
bordered: true,
|
|
25052
|
-
renderItem: function renderItem(item) {
|
|
25424
|
+
renderItem: function renderItem(item, index) {
|
|
25053
25425
|
return /*#__PURE__*/jsxs(List$1.Item, {
|
|
25054
|
-
|
|
25426
|
+
actions: listItemactions(item, index),
|
|
25427
|
+
children: [item.image && /*#__PURE__*/jsx("img", {
|
|
25428
|
+
width: 75,
|
|
25429
|
+
src: item.image,
|
|
25430
|
+
style: {
|
|
25431
|
+
marginRight: 15
|
|
25432
|
+
}
|
|
25433
|
+
}), /*#__PURE__*/jsx(List$1.Item.Meta, {
|
|
25055
25434
|
title: /*#__PURE__*/jsx("span", {
|
|
25056
25435
|
style: {
|
|
25057
25436
|
fontWeight: 'bold'
|
|
@@ -25059,7 +25438,9 @@ var ListWrapper = function ListWrapper(props, ref) {
|
|
|
25059
25438
|
children: item.title
|
|
25060
25439
|
}),
|
|
25061
25440
|
description: item.description
|
|
25062
|
-
}),
|
|
25441
|
+
}), /*#__PURE__*/jsx("div", {
|
|
25442
|
+
children: item.content
|
|
25443
|
+
})]
|
|
25063
25444
|
});
|
|
25064
25445
|
}
|
|
25065
25446
|
});
|
|
@@ -25126,7 +25507,7 @@ function useJsonEditorData (id, setCanSave, onChange, onError) {
|
|
|
25126
25507
|
}
|
|
25127
25508
|
function _save() {
|
|
25128
25509
|
_save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(original) {
|
|
25129
|
-
var
|
|
25510
|
+
var data;
|
|
25130
25511
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
25131
25512
|
while (1) switch (_context.prev = _context.next) {
|
|
25132
25513
|
case 0:
|
|
@@ -25138,7 +25519,7 @@ function useJsonEditorData (id, setCanSave, onChange, onError) {
|
|
|
25138
25519
|
_context.next = 4;
|
|
25139
25520
|
return apiHandler.update(curData, original);
|
|
25140
25521
|
case 4:
|
|
25141
|
-
|
|
25522
|
+
data = _context.sent;
|
|
25142
25523
|
_context.next = 11;
|
|
25143
25524
|
break;
|
|
25144
25525
|
case 7:
|
|
@@ -25149,9 +25530,9 @@ function useJsonEditorData (id, setCanSave, onChange, onError) {
|
|
|
25149
25530
|
_context.next = 10;
|
|
25150
25531
|
return apiHandler.create(curData);
|
|
25151
25532
|
case 10:
|
|
25152
|
-
|
|
25533
|
+
data = _context.sent;
|
|
25153
25534
|
case 11:
|
|
25154
|
-
onChange === null || onChange === void 0 || onChange(
|
|
25535
|
+
onChange === null || onChange === void 0 || onChange(data);
|
|
25155
25536
|
_context.next = 18;
|
|
25156
25537
|
break;
|
|
25157
25538
|
case 14:
|
|
@@ -25800,7 +26181,9 @@ function Detail(_ref) {
|
|
|
25800
26181
|
onError: onError
|
|
25801
26182
|
}), info.type == 'List' && /*#__PURE__*/jsx(List, {
|
|
25802
26183
|
id: info.configurationId,
|
|
25803
|
-
data: info.data
|
|
26184
|
+
data: info.data,
|
|
26185
|
+
ref: ref,
|
|
26186
|
+
onChange: onChange
|
|
25804
26187
|
}), info.type == 'JsonEditor' && /*#__PURE__*/jsx(JsonEditor$1, {
|
|
25805
26188
|
ref: ref,
|
|
25806
26189
|
id: info.configurationId,
|