@crystaldesign/diva-backoffice 24.6.0-beta.3 → 24.6.0-beta.30
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 +665 -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 +10 -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,80 @@ 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
|
+
},
|
|
9397
|
+
canDelete: true,
|
|
9398
|
+
mapping: {
|
|
9399
|
+
type: 'query',
|
|
9400
|
+
map: [{
|
|
9401
|
+
sourceField: '_id',
|
|
9402
|
+
targetField: 'roomId'
|
|
9403
|
+
}, {
|
|
9404
|
+
sourceField: 'id',
|
|
9405
|
+
targetField: 'variantId'
|
|
9406
|
+
}]
|
|
9407
|
+
},
|
|
9408
|
+
itemMapping: {
|
|
9409
|
+
title: [{
|
|
9410
|
+
field: 'name'
|
|
9411
|
+
}],
|
|
9412
|
+
description: [{
|
|
9413
|
+
field: 'description'
|
|
9414
|
+
}],
|
|
9415
|
+
id: [{
|
|
9416
|
+
field: 'id'
|
|
9417
|
+
}],
|
|
9418
|
+
content: ['Default: ', {
|
|
9419
|
+
field: 'default'
|
|
9420
|
+
}],
|
|
9421
|
+
image: [{
|
|
9422
|
+
field: 'previewImage'
|
|
9423
|
+
}]
|
|
9424
|
+
}
|
|
9425
|
+
},
|
|
9426
|
+
SelectorRoomVariants: {
|
|
9427
|
+
type: 'RelationSelector',
|
|
9428
|
+
searchApiInterface: {
|
|
9429
|
+
read: '${mediaService}/rooms/${roomId}/variants'
|
|
9430
|
+
},
|
|
9431
|
+
apiInterface: {
|
|
9432
|
+
read: '${mediaService}/rooms/${roomId}/variants',
|
|
9433
|
+
"delete": '${mediaService}/rooms/${roomId}/variants?variantId=${variantId}'
|
|
9434
|
+
},
|
|
9435
|
+
configuration: {
|
|
9436
|
+
download: false,
|
|
9437
|
+
readListMapping: {
|
|
9438
|
+
type: 'query',
|
|
9439
|
+
map: [{
|
|
9440
|
+
sourceField: '_id',
|
|
9441
|
+
targetField: 'roomId'
|
|
9442
|
+
}]
|
|
9443
|
+
},
|
|
9444
|
+
deleteMapping: {
|
|
9445
|
+
type: 'query',
|
|
9446
|
+
map: [{
|
|
9447
|
+
sourceField: '_id',
|
|
9448
|
+
targetField: 'roomId'
|
|
9449
|
+
}, {
|
|
9450
|
+
sourceField: 'id',
|
|
9451
|
+
targetField: 'variantId'
|
|
9452
|
+
}]
|
|
9453
|
+
},
|
|
9454
|
+
functionalities: {
|
|
9455
|
+
canDelete: true,
|
|
9456
|
+
canEdit: false,
|
|
9457
|
+
canFilter: false
|
|
9458
|
+
},
|
|
9459
|
+
list: {
|
|
9460
|
+
title: ['name'],
|
|
9461
|
+
description: ['_id']
|
|
9462
|
+
}
|
|
9463
|
+
}
|
|
9464
|
+
},
|
|
9308
9465
|
SelectorRoomOrganizations: {
|
|
9309
9466
|
type: 'RelationSelector',
|
|
9310
9467
|
searchApiInterface: {
|
|
@@ -11132,7 +11289,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11132
11289
|
}
|
|
11133
11290
|
}, _callee, null, [[8, 17, 20, 23]]);
|
|
11134
11291
|
}));
|
|
11135
|
-
return function (
|
|
11292
|
+
return function (_x) {
|
|
11136
11293
|
return _ref2.apply(this, arguments);
|
|
11137
11294
|
};
|
|
11138
11295
|
}());
|
|
@@ -11174,7 +11331,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11174
11331
|
}
|
|
11175
11332
|
}, _callee2, this);
|
|
11176
11333
|
}));
|
|
11177
|
-
function donwloadFile(
|
|
11334
|
+
function donwloadFile(_x2, _x3) {
|
|
11178
11335
|
return _donwloadFile.apply(this, arguments);
|
|
11179
11336
|
}
|
|
11180
11337
|
return donwloadFile;
|
|
@@ -11214,7 +11371,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11214
11371
|
}
|
|
11215
11372
|
}, _callee3, this);
|
|
11216
11373
|
}));
|
|
11217
|
-
function connectionFile(
|
|
11374
|
+
function connectionFile(_x4, _x5, _x6, _x7, _x8) {
|
|
11218
11375
|
return _connectionFile.apply(this, arguments);
|
|
11219
11376
|
}
|
|
11220
11377
|
return connectionFile;
|
|
@@ -11278,23 +11435,15 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11278
11435
|
}
|
|
11279
11436
|
}, _callee4, this, [[14, 22]]);
|
|
11280
11437
|
}));
|
|
11281
|
-
function getConnectionData(
|
|
11438
|
+
function getConnectionData(_x9, _x10) {
|
|
11282
11439
|
return _getConnectionData.apply(this, arguments);
|
|
11283
11440
|
}
|
|
11284
11441
|
return getConnectionData;
|
|
11285
11442
|
}()
|
|
11286
11443
|
}, {
|
|
11287
11444
|
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) {
|
|
11445
|
+
value: function () {
|
|
11446
|
+
var _downloadRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(download, data) {
|
|
11298
11447
|
var _this$_rootStore2;
|
|
11299
11448
|
var url, result, base64File, a, mimeType, res;
|
|
11300
11449
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
@@ -11344,10 +11493,11 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11344
11493
|
}
|
|
11345
11494
|
}, _callee5, this);
|
|
11346
11495
|
}));
|
|
11347
|
-
|
|
11348
|
-
return
|
|
11349
|
-
}
|
|
11350
|
-
|
|
11496
|
+
function downloadRequest(_x11, _x12) {
|
|
11497
|
+
return _downloadRequest.apply(this, arguments);
|
|
11498
|
+
}
|
|
11499
|
+
return downloadRequest;
|
|
11500
|
+
}()
|
|
11351
11501
|
}, {
|
|
11352
11502
|
key: "checkCondition",
|
|
11353
11503
|
value: function checkCondition(download, data) {
|
|
@@ -11423,7 +11573,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11423
11573
|
}
|
|
11424
11574
|
}, _callee6, this, [[3, 16, 19, 22]]);
|
|
11425
11575
|
}));
|
|
11426
|
-
function openDownload(
|
|
11576
|
+
function openDownload(_x13) {
|
|
11427
11577
|
return _openDownload.apply(this, arguments);
|
|
11428
11578
|
}
|
|
11429
11579
|
return openDownload;
|
|
@@ -11642,8 +11792,8 @@ function getCombinedValues(data, pattern) {
|
|
|
11642
11792
|
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
11793
|
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
11794
|
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$
|
|
11795
|
+
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; }
|
|
11796
|
+
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
11797
|
function useDescriptions (_ref) {
|
|
11648
11798
|
var id = _ref.id;
|
|
11649
11799
|
var root = useStore();
|
|
@@ -11736,7 +11886,7 @@ function _getDisplayData() {
|
|
|
11736
11886
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
11737
11887
|
while (1) switch (_context4.prev = _context4.next) {
|
|
11738
11888
|
case 0:
|
|
11739
|
-
displayData = _objectSpread$
|
|
11889
|
+
displayData = _objectSpread$B({}, data);
|
|
11740
11890
|
_iterator = _createForOfIteratorHelper$i(items);
|
|
11741
11891
|
_context4.prev = 2;
|
|
11742
11892
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -11812,8 +11962,8 @@ function _getDisplayData() {
|
|
|
11812
11962
|
return _getDisplayData.apply(this, arguments);
|
|
11813
11963
|
}
|
|
11814
11964
|
|
|
11815
|
-
function ownKeys$
|
|
11816
|
-
function _objectSpread$
|
|
11965
|
+
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; }
|
|
11966
|
+
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
11967
|
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
11968
|
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
11969
|
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 +12105,7 @@ function ActionButton (_ref) {
|
|
|
11955
12105
|
_iterator2.f();
|
|
11956
12106
|
}
|
|
11957
12107
|
_context.next = 23;
|
|
11958
|
-
return apiInterface.update(_objectSpread$
|
|
12108
|
+
return apiInterface.update(_objectSpread$A(_objectSpread$A({}, data), {}, {
|
|
11959
12109
|
state: toSwitch
|
|
11960
12110
|
}), data);
|
|
11961
12111
|
case 23:
|
|
@@ -12112,14 +12262,14 @@ function _simpleChangeValue() {
|
|
|
12112
12262
|
break;
|
|
12113
12263
|
}
|
|
12114
12264
|
for (i = 0; i < action.newValues.length; i++) {
|
|
12115
|
-
fieldsToUpdate = _objectSpread$
|
|
12265
|
+
fieldsToUpdate = _objectSpread$A(_objectSpread$A({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
12116
12266
|
}
|
|
12117
12267
|
if (!apiInterface.canUpdate) {
|
|
12118
12268
|
_context2.next = 9;
|
|
12119
12269
|
break;
|
|
12120
12270
|
}
|
|
12121
12271
|
_context2.next = 7;
|
|
12122
|
-
return apiInterface.update(_objectSpread$
|
|
12272
|
+
return apiInterface.update(_objectSpread$A({}, fieldsToUpdate), data);
|
|
12123
12273
|
case 7:
|
|
12124
12274
|
response = _context2.sent;
|
|
12125
12275
|
return _context2.abrupt("return", response);
|
|
@@ -12134,7 +12284,7 @@ function _simpleChangeValue() {
|
|
|
12134
12284
|
return _simpleChangeValue.apply(this, arguments);
|
|
12135
12285
|
}
|
|
12136
12286
|
function A(props) {
|
|
12137
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
12287
|
+
return /*#__PURE__*/jsx("a", _objectSpread$A({}, props));
|
|
12138
12288
|
}
|
|
12139
12289
|
|
|
12140
12290
|
var DescriptionWrapper = function DescriptionWrapper(_ref) {
|
|
@@ -12181,8 +12331,8 @@ var Description = observer(DescriptionWrapper);
|
|
|
12181
12331
|
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
12332
|
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
12333
|
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$
|
|
12334
|
+
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; }
|
|
12335
|
+
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
12336
|
function useSelectData (_ref) {
|
|
12187
12337
|
var data = _ref.data,
|
|
12188
12338
|
onChange = _ref.onChange,
|
|
@@ -12363,7 +12513,7 @@ function useSelectData (_ref) {
|
|
|
12363
12513
|
setFetching(true);
|
|
12364
12514
|
serverSideParams = {
|
|
12365
12515
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
12366
|
-
return _objectSpread$
|
|
12516
|
+
return _objectSpread$z(_objectSpread$z({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
12367
12517
|
}, {}) : {
|
|
12368
12518
|
_id: [value, 'contains']
|
|
12369
12519
|
},
|
|
@@ -12862,8 +13012,8 @@ function removeEmpty(data) {
|
|
|
12862
13012
|
return undefined;
|
|
12863
13013
|
}
|
|
12864
13014
|
|
|
12865
|
-
function ownKeys$
|
|
12866
|
-
function _objectSpread$
|
|
13015
|
+
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; }
|
|
13016
|
+
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
13017
|
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
13018
|
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
13019
|
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 +13106,7 @@ function useFormData (_ref) {
|
|
|
12956
13106
|
multipleEditingData = inboundData;
|
|
12957
13107
|
}
|
|
12958
13108
|
return {
|
|
12959
|
-
loadedData: onLoadFields(_objectSpread$
|
|
13109
|
+
loadedData: onLoadFields(_objectSpread$y({}, dt)),
|
|
12960
13110
|
multipleEditingData: multipleEditingData
|
|
12961
13111
|
};
|
|
12962
13112
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -12993,7 +13143,7 @@ function useFormData (_ref) {
|
|
|
12993
13143
|
setFieldErrors = _useState14[1];
|
|
12994
13144
|
useEffect(function () {
|
|
12995
13145
|
var _loadedData$_id2;
|
|
12996
|
-
setState(_objectSpread$
|
|
13146
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
12997
13147
|
data: loadedData,
|
|
12998
13148
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
12999
13149
|
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 +13234,11 @@ function useFormData (_ref) {
|
|
|
13084
13234
|
mediaHandler = _useDivaCore2.handler.mediaHandler;
|
|
13085
13235
|
var onSave = /*#__PURE__*/function () {
|
|
13086
13236
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(values) {
|
|
13087
|
-
var newData, finalData, response, i, _configuration$additi, additional, additionalApi,
|
|
13237
|
+
var newData, finalData, response, i, _configuration$additi, additional, additionalApi, data, errorCode, item;
|
|
13088
13238
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
13089
13239
|
while (1) switch (_context2.prev = _context2.next) {
|
|
13090
13240
|
case 0:
|
|
13091
|
-
newData = _objectSpread$
|
|
13241
|
+
newData = _objectSpread$y({}, state.data);
|
|
13092
13242
|
Object.keys(values).forEach(function (k) {
|
|
13093
13243
|
var _values$k$value, _values$k;
|
|
13094
13244
|
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 +13250,12 @@ function useFormData (_ref) {
|
|
|
13100
13250
|
return _context2.abrupt("return", newData);
|
|
13101
13251
|
case 4:
|
|
13102
13252
|
_context2.next = 6;
|
|
13103
|
-
return setDynamicFields(_objectSpread$
|
|
13253
|
+
return setDynamicFields(_objectSpread$y({}, state.data), newData);
|
|
13104
13254
|
case 6:
|
|
13105
13255
|
newData = _context2.sent;
|
|
13106
|
-
newData = onSaveFields(_objectSpread$
|
|
13256
|
+
newData = onSaveFields(_objectSpread$y({}, state.data), newData);
|
|
13107
13257
|
newData = removeEmpty(newData);
|
|
13108
|
-
setState(_objectSpread$
|
|
13258
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13109
13259
|
loading: true
|
|
13110
13260
|
}));
|
|
13111
13261
|
finalData = state.data;
|
|
@@ -13125,12 +13275,12 @@ function useFormData (_ref) {
|
|
|
13125
13275
|
additionalApi = new _default$d({
|
|
13126
13276
|
apiInterface: additional.apiInterface
|
|
13127
13277
|
}, root);
|
|
13128
|
-
|
|
13278
|
+
data = {};
|
|
13129
13279
|
if (additional.addBaseUrl) {
|
|
13130
|
-
|
|
13280
|
+
data[additional.addBaseUrl] = window.location.origin;
|
|
13131
13281
|
}
|
|
13132
13282
|
_context2.next = 23;
|
|
13133
|
-
return additionalApi.create(
|
|
13283
|
+
return additionalApi.create(data, additional.mapping, response);
|
|
13134
13284
|
case 23:
|
|
13135
13285
|
i++;
|
|
13136
13286
|
_context2.next = 16;
|
|
@@ -13154,13 +13304,13 @@ function useFormData (_ref) {
|
|
|
13154
13304
|
_context2.next = 38;
|
|
13155
13305
|
break;
|
|
13156
13306
|
}
|
|
13157
|
-
setFieldErrors(_objectSpread$
|
|
13307
|
+
setFieldErrors(_objectSpread$y(_objectSpread$y({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
13158
13308
|
return _context2.abrupt("return", undefined);
|
|
13159
13309
|
case 38:
|
|
13160
13310
|
throw _context2.t0;
|
|
13161
13311
|
case 39:
|
|
13162
13312
|
_context2.prev = 39;
|
|
13163
|
-
setState(_objectSpread$
|
|
13313
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13164
13314
|
data: finalData,
|
|
13165
13315
|
loading: false
|
|
13166
13316
|
}));
|
|
@@ -13190,7 +13340,7 @@ function useFormData (_ref) {
|
|
|
13190
13340
|
}
|
|
13191
13341
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
13192
13342
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
13193
|
-
var wholeData = Object.assign(_objectSpread$
|
|
13343
|
+
var wholeData = Object.assign(_objectSpread$y({}, state.data), _objectSpread$y({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
13194
13344
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
13195
13345
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
13196
13346
|
setHiddenRequiredDisabled(newState);
|
|
@@ -13203,12 +13353,12 @@ function useFormData (_ref) {
|
|
|
13203
13353
|
}
|
|
13204
13354
|
};
|
|
13205
13355
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
13206
|
-
var data = d !== null && d !== void 0 ? d : Object.assign(_objectSpread$
|
|
13356
|
+
var data = d !== null && d !== void 0 ? d : Object.assign(_objectSpread$y({}, state.data), _objectSpread$y({}, state.form.getFieldsValue()));
|
|
13207
13357
|
setFieldInObject(id, data, value);
|
|
13208
|
-
var newFieldErrors = _objectSpread$
|
|
13358
|
+
var newFieldErrors = _objectSpread$y({}, fieldErrors);
|
|
13209
13359
|
delete newFieldErrors[id.toString()];
|
|
13210
13360
|
setFieldErrors(newFieldErrors);
|
|
13211
|
-
setState(_objectSpread$
|
|
13361
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13212
13362
|
data: data
|
|
13213
13363
|
}));
|
|
13214
13364
|
return data;
|
|
@@ -13234,12 +13384,12 @@ function useFormData (_ref) {
|
|
|
13234
13384
|
var _value$value;
|
|
13235
13385
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
13236
13386
|
if (configuration.itemSelectorReset) {
|
|
13237
|
-
setState(_objectSpread$
|
|
13387
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13238
13388
|
data: _defineProperty({}, name, val)
|
|
13239
13389
|
}));
|
|
13240
13390
|
} else {
|
|
13241
|
-
setState(_objectSpread$
|
|
13242
|
-
data: _objectSpread$
|
|
13391
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13392
|
+
data: _objectSpread$y(_objectSpread$y({}, state.data), {}, _defineProperty({}, name, val))
|
|
13243
13393
|
}));
|
|
13244
13394
|
}
|
|
13245
13395
|
setSelectedItemsIndex(idx);
|
|
@@ -13249,12 +13399,12 @@ function useFormData (_ref) {
|
|
|
13249
13399
|
var val = _ref6.value;
|
|
13250
13400
|
if (value === val) {
|
|
13251
13401
|
if (configuration.itemSelectorReset) {
|
|
13252
|
-
setState(_objectSpread$
|
|
13402
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13253
13403
|
data: _defineProperty({}, name, val)
|
|
13254
13404
|
}));
|
|
13255
13405
|
} else {
|
|
13256
|
-
setState(_objectSpread$
|
|
13257
|
-
data: _objectSpread$
|
|
13406
|
+
setState(_objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13407
|
+
data: _objectSpread$y(_objectSpread$y({}, state.data), {}, _defineProperty({}, name, val))
|
|
13258
13408
|
}));
|
|
13259
13409
|
}
|
|
13260
13410
|
setSelectedItemsIndex(idx);
|
|
@@ -13368,7 +13518,7 @@ function useFormData (_ref) {
|
|
|
13368
13518
|
}));
|
|
13369
13519
|
return _setDynamicFields.apply(this, arguments);
|
|
13370
13520
|
}
|
|
13371
|
-
return _objectSpread$
|
|
13521
|
+
return _objectSpread$y(_objectSpread$y({}, state), {}, {
|
|
13372
13522
|
setUsedPreset: setUsedPreset,
|
|
13373
13523
|
configuration: configuration,
|
|
13374
13524
|
changedFields: changedFields,
|
|
@@ -13426,8 +13576,8 @@ function getData(id, data) {
|
|
|
13426
13576
|
}
|
|
13427
13577
|
}
|
|
13428
13578
|
|
|
13429
|
-
function ownKeys$
|
|
13430
|
-
function _objectSpread$
|
|
13579
|
+
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; }
|
|
13580
|
+
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
13581
|
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
13582
|
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
13583
|
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 +13627,13 @@ var Presets = function Presets(_ref) {
|
|
|
13477
13627
|
} finally {
|
|
13478
13628
|
_iterator.f();
|
|
13479
13629
|
}
|
|
13480
|
-
var data = _objectSpread$
|
|
13630
|
+
var data = _objectSpread$x(_objectSpread$x({}, form.getFieldsValue(names)), {}, {
|
|
13481
13631
|
newPresetName: newPresetName
|
|
13482
13632
|
});
|
|
13483
13633
|
data.dpi = parseInt(data.dpi);
|
|
13484
13634
|
data.organization = root.getGlobalValue('organizationId');
|
|
13485
13635
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
13486
|
-
var dt = _objectSpread$
|
|
13636
|
+
var dt = _objectSpread$x(_objectSpread$x({}, form.getFieldsValue(names)), {}, {
|
|
13487
13637
|
name: newPresetName
|
|
13488
13638
|
});
|
|
13489
13639
|
setPresets({
|
|
@@ -13619,9 +13769,9 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
13619
13769
|
mode: 'code',
|
|
13620
13770
|
onChange: function onChange() {
|
|
13621
13771
|
try {
|
|
13622
|
-
var
|
|
13772
|
+
var e = jsonEditor.current.get();
|
|
13623
13773
|
jsonEditor.current.validate();
|
|
13624
|
-
_onChange === null || _onChange === void 0 || _onChange(
|
|
13774
|
+
_onChange === null || _onChange === void 0 || _onChange(e);
|
|
13625
13775
|
setCanSave(savable);
|
|
13626
13776
|
} catch (_unused) {
|
|
13627
13777
|
setCanSave(false);
|
|
@@ -13727,7 +13877,7 @@ function useButtonData (_ref) {
|
|
|
13727
13877
|
}, [loading]);
|
|
13728
13878
|
var onClick = /*#__PURE__*/function () {
|
|
13729
13879
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
13730
|
-
var
|
|
13880
|
+
var result, _ref3, _result$error, newData;
|
|
13731
13881
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
13732
13882
|
while (1) switch (_context.prev = _context.next) {
|
|
13733
13883
|
case 0:
|
|
@@ -13736,21 +13886,21 @@ function useButtonData (_ref) {
|
|
|
13736
13886
|
_context.next = 4;
|
|
13737
13887
|
return apiHandler.create({}, configuration.mapping, data);
|
|
13738
13888
|
case 4:
|
|
13739
|
-
|
|
13740
|
-
if (!
|
|
13889
|
+
result = _context.sent;
|
|
13890
|
+
if (!result || result.error || result.Error) {
|
|
13741
13891
|
configuration.resultTranslation && setActionResult({
|
|
13742
13892
|
type: 'error',
|
|
13743
|
-
message: configuration.resultTranslation ? t(configuration.resultTranslation.failed) : (_ref3 = (_result$error =
|
|
13893
|
+
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
13894
|
});
|
|
13745
13895
|
} else {
|
|
13746
13896
|
configuration.resultTranslation && setActionResult({
|
|
13747
13897
|
type: 'success',
|
|
13748
|
-
message: configuration.resultTranslation ? t(configuration.resultTranslation.success) :
|
|
13898
|
+
message: configuration.resultTranslation ? t(configuration.resultTranslation.success) : result !== null && result !== void 0 && result.result ? result.result : 'Success'
|
|
13749
13899
|
});
|
|
13750
13900
|
if (callback) {
|
|
13751
13901
|
newData = aplyMapping({
|
|
13752
13902
|
mapable: {},
|
|
13753
|
-
mappingData:
|
|
13903
|
+
mappingData: result,
|
|
13754
13904
|
mapping: configuration.resultMapping,
|
|
13755
13905
|
rootStore: root,
|
|
13756
13906
|
fallBackToParams: true
|
|
@@ -13866,8 +14016,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
13866
14016
|
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
14017
|
styleInject(css_248z$h);
|
|
13868
14018
|
|
|
13869
|
-
function ownKeys$
|
|
13870
|
-
function _objectSpread$
|
|
14019
|
+
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; }
|
|
14020
|
+
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
14021
|
var SubTitle = function SubTitle(_ref) {
|
|
13872
14022
|
var _item$orientation, _item$buttonIds;
|
|
13873
14023
|
var item = _ref.item,
|
|
@@ -13876,7 +14026,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
13876
14026
|
t = _useTranslation.t;
|
|
13877
14027
|
return /*#__PURE__*/jsx(Divider, {
|
|
13878
14028
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
13879
|
-
style: _objectSpread$
|
|
14029
|
+
style: _objectSpread$w({}, item.style),
|
|
13880
14030
|
children: /*#__PURE__*/jsxs("div", {
|
|
13881
14031
|
className: wrapper$2,
|
|
13882
14032
|
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 +14703,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
14553
14703
|
}]);
|
|
14554
14704
|
}(_default$d);
|
|
14555
14705
|
|
|
14556
|
-
function ownKeys$
|
|
14557
|
-
function _objectSpread$
|
|
14706
|
+
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; }
|
|
14707
|
+
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
14708
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
14559
14709
|
function useSelectClientRelationCatalog (_ref) {
|
|
14560
14710
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -14671,7 +14821,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
14671
14821
|
}, [supplier]);
|
|
14672
14822
|
var onSelectSupplier = /*#__PURE__*/function () {
|
|
14673
14823
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id, catalogId) {
|
|
14674
|
-
var _catalogList$, _selectedSupplier, catalogList,
|
|
14824
|
+
var _catalogList$, _selectedSupplier, catalogList, supplierData;
|
|
14675
14825
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
14676
14826
|
while (1) switch (_context2.prev = _context2.next) {
|
|
14677
14827
|
case 0:
|
|
@@ -14721,11 +14871,11 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
14721
14871
|
_context2.next = 22;
|
|
14722
14872
|
return apiHandler.readSupplierData(id);
|
|
14723
14873
|
case 22:
|
|
14724
|
-
|
|
14874
|
+
supplierData = _context2.sent;
|
|
14725
14875
|
case 23:
|
|
14726
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
14876
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$v(_objectSpread$v({}, _selectedSupplier), {}, {
|
|
14727
14877
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
14728
|
-
}),
|
|
14878
|
+
}), supplierData);
|
|
14729
14879
|
if (catalogId && catalogList.find(function (c) {
|
|
14730
14880
|
return c._id == catalogId;
|
|
14731
14881
|
})) setSelectedCatalog(catalogId);
|
|
@@ -15068,8 +15218,8 @@ function parseReturnData(options, selectMapping) {
|
|
|
15068
15218
|
}
|
|
15069
15219
|
|
|
15070
15220
|
var _excluded$2 = ["apiInterface", "selectMapping", "onChange", "value", "search", "options"];
|
|
15071
|
-
function ownKeys$
|
|
15072
|
-
function _objectSpread$
|
|
15221
|
+
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; }
|
|
15222
|
+
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
15223
|
var SelectWrapper = function SelectWrapper(_ref) {
|
|
15074
15224
|
var apiInterface = _ref.apiInterface,
|
|
15075
15225
|
selectMapping = _ref.selectMapping,
|
|
@@ -15086,7 +15236,7 @@ var SelectWrapper = function SelectWrapper(_ref) {
|
|
|
15086
15236
|
type: 'SelectSimple',
|
|
15087
15237
|
options: options
|
|
15088
15238
|
});
|
|
15089
|
-
return /*#__PURE__*/jsx(Select$2, _objectSpread$
|
|
15239
|
+
return /*#__PURE__*/jsx(Select$2, _objectSpread$u(_objectSpread$u({}, selectProps), {}, {
|
|
15090
15240
|
showSearch: search,
|
|
15091
15241
|
loading: state.loading,
|
|
15092
15242
|
options: state.options,
|
|
@@ -15107,8 +15257,8 @@ var filterOption = function filterOption(input, option) {
|
|
|
15107
15257
|
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
15258
|
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
15259
|
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$
|
|
15260
|
+
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; }
|
|
15261
|
+
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
15262
|
var LOG$7 = getLogger('Backoffice', 'Form');
|
|
15113
15263
|
var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
15114
15264
|
var _state$selectedItems2;
|
|
@@ -15224,7 +15374,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15224
15374
|
};
|
|
15225
15375
|
}();
|
|
15226
15376
|
var updateFormData = function updateFormData(data) {
|
|
15227
|
-
form.setFieldsValue(_objectSpread$
|
|
15377
|
+
form.setFieldsValue(_objectSpread$t(_objectSpread$t({}, state.data), data));
|
|
15228
15378
|
};
|
|
15229
15379
|
var onErrorInternal = function onErrorInternal(err, errorText) {
|
|
15230
15380
|
if (err instanceof CoreError && err.code) {
|
|
@@ -15301,7 +15451,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15301
15451
|
wholeData: state.data,
|
|
15302
15452
|
disabledConfig: item === null || item === void 0 ? void 0 : item['disabledSelection'],
|
|
15303
15453
|
onChange: function onChange(value) {
|
|
15304
|
-
_onChange(item.name, value);
|
|
15454
|
+
_onChange(item.name, item.valueField ? value[item.valueField] : value);
|
|
15305
15455
|
},
|
|
15306
15456
|
allowClear: item.allowClear,
|
|
15307
15457
|
placeholder: item.placeholder,
|
|
@@ -15310,7 +15460,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15310
15460
|
}
|
|
15311
15461
|
}, state.selectedItemsIndex);
|
|
15312
15462
|
case 'selectSimple':
|
|
15313
|
-
return /*#__PURE__*/jsx(Select, _objectSpread$
|
|
15463
|
+
return /*#__PURE__*/jsx(Select, _objectSpread$t(_objectSpread$t({}, item), {}, {
|
|
15314
15464
|
disabled: disabled,
|
|
15315
15465
|
onChange: function onChange(value) {
|
|
15316
15466
|
_onChange(item.name, value);
|
|
@@ -15469,7 +15619,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
15469
15619
|
value: item.value,
|
|
15470
15620
|
options: item.options.map(function (o) {
|
|
15471
15621
|
var _o$disabled;
|
|
15472
|
-
return _objectSpread$
|
|
15622
|
+
return _objectSpread$t(_objectSpread$t({}, o), {}, {
|
|
15473
15623
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, data)
|
|
15474
15624
|
});
|
|
15475
15625
|
}),
|
|
@@ -15554,7 +15704,7 @@ var Form = observer(FormWrapper$1, {
|
|
|
15554
15704
|
function DisplayInput(props) {
|
|
15555
15705
|
var _useTranslation2 = useTranslation(),
|
|
15556
15706
|
t = _useTranslation2.t;
|
|
15557
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
15707
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
15558
15708
|
disabled: true,
|
|
15559
15709
|
value: t(props.translationPrefix + '.' + props.value)
|
|
15560
15710
|
}));
|
|
@@ -15572,8 +15722,8 @@ function isReadonly(item, data) {
|
|
|
15572
15722
|
return false;
|
|
15573
15723
|
}
|
|
15574
15724
|
|
|
15575
|
-
function ownKeys$
|
|
15576
|
-
function _objectSpread$
|
|
15725
|
+
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; }
|
|
15726
|
+
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
15727
|
function useGridData (_ref) {
|
|
15578
15728
|
var id = _ref.id,
|
|
15579
15729
|
data = _ref.data;
|
|
@@ -15616,11 +15766,11 @@ function useGridData (_ref) {
|
|
|
15616
15766
|
function reducer(state, action) {
|
|
15617
15767
|
switch (action.type) {
|
|
15618
15768
|
case 'update':
|
|
15619
|
-
return _objectSpread$
|
|
15769
|
+
return _objectSpread$s(_objectSpread$s({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$s(_objectSpread$s({}, action.data), {}, {
|
|
15620
15770
|
buffer: Buffer.from(action.data.buffer)
|
|
15621
15771
|
})));
|
|
15622
15772
|
case 'delete':
|
|
15623
|
-
var newState = _objectSpread$
|
|
15773
|
+
var newState = _objectSpread$s({}, state);
|
|
15624
15774
|
delete newState[action.data.divaNr];
|
|
15625
15775
|
return newState;
|
|
15626
15776
|
default:
|
|
@@ -15705,8 +15855,8 @@ var Grid = function Grid(_ref) {
|
|
|
15705
15855
|
});
|
|
15706
15856
|
};
|
|
15707
15857
|
|
|
15708
|
-
function ownKeys$
|
|
15709
|
-
function _objectSpread$
|
|
15858
|
+
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; }
|
|
15859
|
+
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
15860
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
15711
15861
|
var id = _ref.id;
|
|
15712
15862
|
var root = useStore();
|
|
@@ -15825,7 +15975,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
15825
15975
|
onRemove: onRemove,
|
|
15826
15976
|
customRequest: customRequest,
|
|
15827
15977
|
fileList: fileList.map(function (f) {
|
|
15828
|
-
return _objectSpread$
|
|
15978
|
+
return _objectSpread$r(_objectSpread$r({}, f), {}, {
|
|
15829
15979
|
url: f.url
|
|
15830
15980
|
});
|
|
15831
15981
|
}),
|
|
@@ -15876,8 +16026,8 @@ var MediaUpload = observer(function (_ref) {
|
|
|
15876
16026
|
});
|
|
15877
16027
|
});
|
|
15878
16028
|
|
|
15879
|
-
function ownKeys$
|
|
15880
|
-
function _objectSpread$
|
|
16029
|
+
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; }
|
|
16030
|
+
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
16031
|
function useFormListData (_ref) {
|
|
15882
16032
|
var _configuration$defaul;
|
|
15883
16033
|
var id = _ref.id,
|
|
@@ -15957,7 +16107,7 @@ function useFormListData (_ref) {
|
|
|
15957
16107
|
if (updated.length == state.length) {
|
|
15958
16108
|
newState = state.map(function (s, i) {
|
|
15959
16109
|
var _updated$find;
|
|
15960
|
-
return _objectSpread$
|
|
16110
|
+
return _objectSpread$q(_objectSpread$q({}, s), {}, {
|
|
15961
16111
|
data: (_updated$find = updated.find(function (u) {
|
|
15962
16112
|
return u.index == i;
|
|
15963
16113
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -16096,8 +16246,8 @@ var FormList$1 = observer(FormList, {
|
|
|
16096
16246
|
forwardRef: true
|
|
16097
16247
|
});
|
|
16098
16248
|
|
|
16099
|
-
function ownKeys$
|
|
16100
|
-
function _objectSpread$
|
|
16249
|
+
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; }
|
|
16250
|
+
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
16251
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
16102
16252
|
function useSelectOrCreateData (_ref) {
|
|
16103
16253
|
var id = _ref.id,
|
|
@@ -16191,7 +16341,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
16191
16341
|
_context.next = 7;
|
|
16192
16342
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
16193
16343
|
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$
|
|
16344
|
+
return _objectSpread$p(_objectSpread$p({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
16195
16345
|
}, {}) : {
|
|
16196
16346
|
_id: [value, 'contains']
|
|
16197
16347
|
},
|
|
@@ -16259,9 +16409,9 @@ function useSelectOrCreateData (_ref) {
|
|
|
16259
16409
|
var index = selected.findIndex(function (s) {
|
|
16260
16410
|
return s.value == removed.value;
|
|
16261
16411
|
});
|
|
16262
|
-
var
|
|
16263
|
-
|
|
16264
|
-
setSelected(
|
|
16412
|
+
var newSelected = _toConsumableArray(selected);
|
|
16413
|
+
newSelected.splice(index, 1);
|
|
16414
|
+
setSelected(newSelected);
|
|
16265
16415
|
} else {
|
|
16266
16416
|
setSelected([]);
|
|
16267
16417
|
}
|
|
@@ -16504,8 +16654,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
16504
16654
|
});
|
|
16505
16655
|
};
|
|
16506
16656
|
|
|
16507
|
-
function ownKeys$
|
|
16508
|
-
function _objectSpread$
|
|
16657
|
+
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; }
|
|
16658
|
+
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
16659
|
function useProcess (_ref) {
|
|
16510
16660
|
var id = _ref.id;
|
|
16511
16661
|
var root = useStore();
|
|
@@ -16543,7 +16693,7 @@ function useProcess (_ref) {
|
|
|
16543
16693
|
while (1) switch (_context.prev = _context.next) {
|
|
16544
16694
|
case 0:
|
|
16545
16695
|
newState = _toConsumableArray(state);
|
|
16546
|
-
currentStep = _objectSpread$
|
|
16696
|
+
currentStep = _objectSpread$o({}, newState[index]);
|
|
16547
16697
|
currentStep.data = data;
|
|
16548
16698
|
newState.splice(index, 1, currentStep);
|
|
16549
16699
|
setState(newState);
|
|
@@ -16569,25 +16719,25 @@ function useProcess (_ref) {
|
|
|
16569
16719
|
}();
|
|
16570
16720
|
var save = /*#__PURE__*/function () {
|
|
16571
16721
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(state) {
|
|
16572
|
-
var newState,
|
|
16722
|
+
var newState, index;
|
|
16573
16723
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
16574
16724
|
while (1) switch (_context2.prev = _context2.next) {
|
|
16575
16725
|
case 0:
|
|
16576
16726
|
newState = [];
|
|
16577
|
-
|
|
16727
|
+
index = 0;
|
|
16578
16728
|
case 2:
|
|
16579
|
-
if (!(
|
|
16729
|
+
if (!(index < state.length)) {
|
|
16580
16730
|
_context2.next = 11;
|
|
16581
16731
|
break;
|
|
16582
16732
|
}
|
|
16583
16733
|
_context2.t0 = newState;
|
|
16584
16734
|
_context2.next = 6;
|
|
16585
|
-
return saveData(state[
|
|
16735
|
+
return saveData(state[index], newState);
|
|
16586
16736
|
case 6:
|
|
16587
16737
|
_context2.t1 = _context2.sent;
|
|
16588
16738
|
_context2.t0.push.call(_context2.t0, _context2.t1);
|
|
16589
16739
|
case 8:
|
|
16590
|
-
|
|
16740
|
+
index++;
|
|
16591
16741
|
_context2.next = 2;
|
|
16592
16742
|
break;
|
|
16593
16743
|
case 11:
|
|
@@ -16632,7 +16782,7 @@ function _saveData() {
|
|
|
16632
16782
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
16633
16783
|
while (1) switch (_context3.prev = _context3.next) {
|
|
16634
16784
|
case 0:
|
|
16635
|
-
newState = _objectSpread$
|
|
16785
|
+
newState = _objectSpread$o({}, stepState); // we have to merge the mapping data of all steps into one object,
|
|
16636
16786
|
//so we have to modify the mappingData as well as the mapping specification
|
|
16637
16787
|
sourcData = {};
|
|
16638
16788
|
(_stepState$step$mappi = stepState.step.mapping) === null || _stepState$step$mappi === void 0 || _stepState$step$mappi.map.forEach(function (map) {
|
|
@@ -16648,7 +16798,7 @@ function _saveData() {
|
|
|
16648
16798
|
});
|
|
16649
16799
|
newMapping = undefined;
|
|
16650
16800
|
if (stepState.step.mapping) {
|
|
16651
|
-
newMapping = _objectSpread$
|
|
16801
|
+
newMapping = _objectSpread$o(_objectSpread$o({}, stepState.step.mapping), {}, {
|
|
16652
16802
|
map: stepState.step.mapping.map.map(function (m) {
|
|
16653
16803
|
return {
|
|
16654
16804
|
targetField: m.targetField,
|
|
@@ -17728,8 +17878,8 @@ function IconCell (_ref) {
|
|
|
17728
17878
|
|
|
17729
17879
|
var _excluded$1 = ["index"],
|
|
17730
17880
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
17731
|
-
function ownKeys$
|
|
17732
|
-
function _objectSpread$
|
|
17881
|
+
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; }
|
|
17882
|
+
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
17883
|
var LOG$5 = getLogger('Backoffice', 'CellRenderer');
|
|
17734
17884
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
17735
17885
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -17743,7 +17893,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
17743
17893
|
component: false,
|
|
17744
17894
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
17745
17895
|
value: form,
|
|
17746
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
17896
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$n({}, props))
|
|
17747
17897
|
})
|
|
17748
17898
|
});
|
|
17749
17899
|
};
|
|
@@ -17791,7 +17941,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
17791
17941
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
17792
17942
|
longDescriptionType = 'text';
|
|
17793
17943
|
}
|
|
17794
|
-
var modifiedColumn = _objectSpread$
|
|
17944
|
+
var modifiedColumn = _objectSpread$n(_objectSpread$n({}, column), {}, {
|
|
17795
17945
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
17796
17946
|
});
|
|
17797
17947
|
if (column) {
|
|
@@ -17804,34 +17954,34 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
17804
17954
|
};
|
|
17805
17955
|
switch (modifiedColumn.type) {
|
|
17806
17956
|
case 'boolean':
|
|
17807
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
17957
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$n({}, cellProps));
|
|
17808
17958
|
break;
|
|
17809
17959
|
case 'text':
|
|
17810
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
17960
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$n({}, cellProps));
|
|
17811
17961
|
break;
|
|
17812
17962
|
case 'select':
|
|
17813
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
17963
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$n({}, cellProps));
|
|
17814
17964
|
case 'media':
|
|
17815
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
17965
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$n({}, cellProps));
|
|
17816
17966
|
break;
|
|
17817
17967
|
case 'mediaItem':
|
|
17818
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
17968
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$n({}, cellProps));
|
|
17819
17969
|
break;
|
|
17820
17970
|
case 'unixTimeStamp':
|
|
17821
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
17971
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$n({}, cellProps));
|
|
17822
17972
|
break;
|
|
17823
17973
|
case 'unixTimeStampCheck':
|
|
17824
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
17974
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$n({}, cellProps));
|
|
17825
17975
|
break;
|
|
17826
17976
|
case 'icon':
|
|
17827
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
17977
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$n({}, cellProps));
|
|
17828
17978
|
break;
|
|
17829
17979
|
default:
|
|
17830
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
17980
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$n({}, cellProps));
|
|
17831
17981
|
break;
|
|
17832
17982
|
}
|
|
17833
17983
|
}
|
|
17834
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
17984
|
+
return /*#__PURE__*/jsx("td", _objectSpread$n(_objectSpread$n({}, restProps), {}, {
|
|
17835
17985
|
children: childNode
|
|
17836
17986
|
}));
|
|
17837
17987
|
};
|
|
@@ -18163,8 +18313,26 @@ function AGHistogram (_ref) {
|
|
|
18163
18313
|
});
|
|
18164
18314
|
}
|
|
18165
18315
|
|
|
18166
|
-
|
|
18167
|
-
|
|
18316
|
+
var SMChart = function SMChart(props) {
|
|
18317
|
+
var _useDivaCore = useDivaCore(),
|
|
18318
|
+
userHasPermission = _useDivaCore.actions.userHasPermission;
|
|
18319
|
+
var hasPermission = userHasPermission(props.permission);
|
|
18320
|
+
return hasPermission ? /*#__PURE__*/jsx(Histogram, {
|
|
18321
|
+
field: props.field,
|
|
18322
|
+
interval: props.interval,
|
|
18323
|
+
topPics: props.topPics,
|
|
18324
|
+
from: props.from,
|
|
18325
|
+
to: props.to,
|
|
18326
|
+
filter: props.filter,
|
|
18327
|
+
description: props.description,
|
|
18328
|
+
title: props.title,
|
|
18329
|
+
apiTranslation: props.apiTranslation,
|
|
18330
|
+
component: props.component
|
|
18331
|
+
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
18332
|
+
};
|
|
18333
|
+
|
|
18334
|
+
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; }
|
|
18335
|
+
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
18336
|
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
18337
|
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
18338
|
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 +18493,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18325
18493
|
// Convert to Dayjs
|
|
18326
18494
|
(_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
18495
|
]
|
|
18328
|
-
}), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(Select, _objectSpread$
|
|
18496
|
+
}), ((_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
18497
|
style: {
|
|
18330
18498
|
minWidth: '200px'
|
|
18331
18499
|
},
|
|
@@ -18374,7 +18542,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18374
18542
|
}) : undefined,
|
|
18375
18543
|
mappingData: state.mappingData
|
|
18376
18544
|
}, 'create')]
|
|
18377
|
-
}), state.configuration.histogram && /*#__PURE__*/jsx(AGHistogram, {
|
|
18545
|
+
}), state.configuration.histogram && state.configuration.histogram.type == 'applicationStatus' && /*#__PURE__*/jsx(AGHistogram, {
|
|
18378
18546
|
footnote: state.configuration.histogram.footnote,
|
|
18379
18547
|
height: state.configuration.histogram.height,
|
|
18380
18548
|
width: state.configuration.histogram.width,
|
|
@@ -18387,7 +18555,19 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18387
18555
|
stackMapping: state.configuration.histogram.stackMapping,
|
|
18388
18556
|
tooltipText: state.configuration.histogram.tooltipText,
|
|
18389
18557
|
headerText: state.configuration.histogram.headerText,
|
|
18390
|
-
filterField: state.configuration.histogram.
|
|
18558
|
+
filterField: state.configuration.histogram.field
|
|
18559
|
+
}), state.configuration.histogram && state.configuration.histogram.type == 'default' && /*#__PURE__*/jsx(SMChart, {
|
|
18560
|
+
field: state.configuration.histogram.field,
|
|
18561
|
+
interval: state.configuration.histogram.interval,
|
|
18562
|
+
topPics: state.configuration.histogram.topPics,
|
|
18563
|
+
from: state.configuration.histogram.from,
|
|
18564
|
+
to: state.configuration.histogram.to,
|
|
18565
|
+
filter: state.configuration.histogram.filter,
|
|
18566
|
+
description: state.configuration.histogram.description,
|
|
18567
|
+
title: state.configuration.histogram.title.text,
|
|
18568
|
+
apiTranslation: state.configuration.histogram.apiTranslation,
|
|
18569
|
+
component: state.configuration.histogram.component,
|
|
18570
|
+
permission: state.configuration.histogram.permission
|
|
18391
18571
|
})]
|
|
18392
18572
|
})
|
|
18393
18573
|
})
|
|
@@ -18410,7 +18590,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
18410
18590
|
},
|
|
18411
18591
|
dataSource: data,
|
|
18412
18592
|
loading: state.loading,
|
|
18413
|
-
pagination: _objectSpread$
|
|
18593
|
+
pagination: _objectSpread$m(_objectSpread$m({}, state.pagination), {}, {
|
|
18414
18594
|
showTotal: function showTotal(total, range) {
|
|
18415
18595
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
18416
18596
|
},
|
|
@@ -18710,7 +18890,7 @@ function BulkAction(_ref6) {
|
|
|
18710
18890
|
}
|
|
18711
18891
|
_context4.t0 = data;
|
|
18712
18892
|
_context4.next = 10;
|
|
18713
|
-
return apiInterface.update(_objectSpread$
|
|
18893
|
+
return apiInterface.update(_objectSpread$m(_objectSpread$m({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
18714
18894
|
case 10:
|
|
18715
18895
|
_context4.t1 = _context4.sent;
|
|
18716
18896
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -18807,8 +18987,8 @@ function SelectionText(_ref8) {
|
|
|
18807
18987
|
});
|
|
18808
18988
|
}
|
|
18809
18989
|
|
|
18810
|
-
function ownKeys$
|
|
18811
|
-
function _objectSpread$
|
|
18990
|
+
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; }
|
|
18991
|
+
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
18992
|
function getColumnFilterProps (_ref) {
|
|
18813
18993
|
var filter = _ref.filter,
|
|
18814
18994
|
title = _ref.title;
|
|
@@ -19171,7 +19351,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
19171
19351
|
});
|
|
19172
19352
|
},
|
|
19173
19353
|
options: filter.map(function (f) {
|
|
19174
|
-
return _objectSpread$
|
|
19354
|
+
return _objectSpread$l(_objectSpread$l({}, f), {}, {
|
|
19175
19355
|
label: t(f.label)
|
|
19176
19356
|
});
|
|
19177
19357
|
})
|
|
@@ -19220,7 +19400,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
19220
19400
|
setDisplaySelectedvalues = _useState4[1];
|
|
19221
19401
|
var options = [];
|
|
19222
19402
|
options = filter.map(function (f) {
|
|
19223
|
-
return _objectSpread$
|
|
19403
|
+
return _objectSpread$l(_objectSpread$l({}, f), {}, {
|
|
19224
19404
|
label: t(f.label)
|
|
19225
19405
|
});
|
|
19226
19406
|
});
|
|
@@ -19294,8 +19474,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
19294
19474
|
};
|
|
19295
19475
|
};
|
|
19296
19476
|
|
|
19297
|
-
function ownKeys$
|
|
19298
|
-
function _objectSpread$
|
|
19477
|
+
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; }
|
|
19478
|
+
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
19479
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
19300
19480
|
var columns = configuration.columns.filter(function (c) {
|
|
19301
19481
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -19346,7 +19526,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
19346
19526
|
}
|
|
19347
19527
|
function mapColumn(column, onUpdate) {
|
|
19348
19528
|
var _column$field, _column$children;
|
|
19349
|
-
return _objectSpread$
|
|
19529
|
+
return _objectSpread$k(_objectSpread$k(_objectSpread$k({}, column), {}, {
|
|
19350
19530
|
width: column.width || 100,
|
|
19351
19531
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
19352
19532
|
key: column.field || column.title,
|
|
@@ -19395,8 +19575,8 @@ function updateData (_ref) {
|
|
|
19395
19575
|
};
|
|
19396
19576
|
}
|
|
19397
19577
|
|
|
19398
|
-
function ownKeys$
|
|
19399
|
-
function _objectSpread$
|
|
19578
|
+
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; }
|
|
19579
|
+
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
19580
|
function aplyFilterAndSortation (_ref) {
|
|
19401
19581
|
var data = _ref.data,
|
|
19402
19582
|
filters = _ref.filters,
|
|
@@ -19411,7 +19591,7 @@ function aplyFilterAndSortation (_ref) {
|
|
|
19411
19591
|
processedData = sort(sorter || [], processedData);
|
|
19412
19592
|
return {
|
|
19413
19593
|
data: processedData,
|
|
19414
|
-
pagination: _objectSpread$
|
|
19594
|
+
pagination: _objectSpread$j(_objectSpread$j({}, pagination), {}, {
|
|
19415
19595
|
total: processedData.length
|
|
19416
19596
|
})
|
|
19417
19597
|
};
|
|
@@ -19496,8 +19676,8 @@ function filter$1(f, data) {
|
|
|
19496
19676
|
}
|
|
19497
19677
|
|
|
19498
19678
|
var _excluded = ["_id"];
|
|
19499
|
-
function ownKeys$
|
|
19500
|
-
function _objectSpread$
|
|
19679
|
+
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; }
|
|
19680
|
+
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
19681
|
function useTableData$1 (_ref) {
|
|
19502
19682
|
var _configuration$apiInt;
|
|
19503
19683
|
var id = _ref.id;
|
|
@@ -19552,7 +19732,7 @@ function useTableData$1 (_ref) {
|
|
|
19552
19732
|
var _configuration$create;
|
|
19553
19733
|
if (!dataRow) return;
|
|
19554
19734
|
var id = v4();
|
|
19555
|
-
var processedDataRow = flat.unflatten(_objectSpread$
|
|
19735
|
+
var processedDataRow = flat.unflatten(_objectSpread$i({
|
|
19556
19736
|
_id: id,
|
|
19557
19737
|
ID: id
|
|
19558
19738
|
}, dataRow));
|
|
@@ -19564,11 +19744,11 @@ function useTableData$1 (_ref) {
|
|
|
19564
19744
|
newData = _updateData.data;
|
|
19565
19745
|
_updateData.prevDataRow;
|
|
19566
19746
|
_updateData.index;
|
|
19567
|
-
var newState = _objectSpread$
|
|
19747
|
+
var newState = _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19568
19748
|
data: newData
|
|
19569
19749
|
});
|
|
19570
19750
|
if (!filterServerSide) {
|
|
19571
|
-
var res = aplyFilterAndSortation(_objectSpread$
|
|
19751
|
+
var res = aplyFilterAndSortation(_objectSpread$i(_objectSpread$i({}, filterData), {}, {
|
|
19572
19752
|
data: newData
|
|
19573
19753
|
}));
|
|
19574
19754
|
newState.data = res.data;
|
|
@@ -19580,33 +19760,33 @@ function useTableData$1 (_ref) {
|
|
|
19580
19760
|
var formData = new FormData();
|
|
19581
19761
|
processedDataRow._id;
|
|
19582
19762
|
var value = _objectWithoutProperties(processedDataRow, _excluded);
|
|
19583
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
19763
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
19584
19764
|
filterContex: filterContex,
|
|
19585
19765
|
value: JSON.stringify([value])
|
|
19586
19766
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
19587
19767
|
if (d && d.Result && d.Result == 'Success') return;
|
|
19588
|
-
setState(_objectSpread$
|
|
19768
|
+
setState(_objectSpread$i({}, oldState));
|
|
19589
19769
|
});
|
|
19590
19770
|
}, [state, catalogItem, filterData]);
|
|
19591
19771
|
useEffect(function () {
|
|
19592
19772
|
if (!catalogItem) return;
|
|
19593
|
-
setState(_objectSpread$
|
|
19773
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19594
19774
|
loading: true,
|
|
19595
|
-
mappingData: _objectSpread$
|
|
19775
|
+
mappingData: _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
19596
19776
|
filterContex: filterContex
|
|
19597
19777
|
})
|
|
19598
19778
|
}));
|
|
19599
19779
|
if (!filterServerSide) {
|
|
19600
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
19780
|
+
apiHandler.readList(configuration.mapping, _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
19601
19781
|
filterContex: filterContex
|
|
19602
19782
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
19603
19783
|
var newData = data.data.map(function (d) {
|
|
19604
|
-
return _objectSpread$
|
|
19784
|
+
return _objectSpread$i(_objectSpread$i({}, d), {}, {
|
|
19605
19785
|
_id: d._id || d.ID || nanoid()
|
|
19606
19786
|
});
|
|
19607
19787
|
});
|
|
19608
19788
|
onChange({
|
|
19609
|
-
pagination: _objectSpread$
|
|
19789
|
+
pagination: _objectSpread$i({}, state.pagination),
|
|
19610
19790
|
filters: {},
|
|
19611
19791
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
19612
19792
|
return c.defaultSortOrder;
|
|
@@ -19623,7 +19803,7 @@ function useTableData$1 (_ref) {
|
|
|
19623
19803
|
});
|
|
19624
19804
|
} else {
|
|
19625
19805
|
onChange({
|
|
19626
|
-
pagination: _objectSpread$
|
|
19806
|
+
pagination: _objectSpread$i({}, state.pagination),
|
|
19627
19807
|
filters: {},
|
|
19628
19808
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
19629
19809
|
return c.defaultSortOrder;
|
|
@@ -19640,17 +19820,17 @@ function useTableData$1 (_ref) {
|
|
|
19640
19820
|
}
|
|
19641
19821
|
}, [filterContex, catalogItem]);
|
|
19642
19822
|
var onChange = function onChange(p, dataParam) {
|
|
19643
|
-
setState(_objectSpread$
|
|
19823
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19644
19824
|
loading: true
|
|
19645
19825
|
}));
|
|
19646
19826
|
if (!filterServerSide) {
|
|
19647
19827
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
19648
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
19828
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$i(_objectSpread$i({}, p), {}, {
|
|
19649
19829
|
data: unfilteredData
|
|
19650
19830
|
})),
|
|
19651
19831
|
data = _aplyFilterAndSortati.data,
|
|
19652
19832
|
pagination = _aplyFilterAndSortati.pagination;
|
|
19653
|
-
setState(_objectSpread$
|
|
19833
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19654
19834
|
data: data,
|
|
19655
19835
|
pagination: pagination,
|
|
19656
19836
|
loading: false,
|
|
@@ -19661,20 +19841,20 @@ function useTableData$1 (_ref) {
|
|
|
19661
19841
|
sorter: p.sorter
|
|
19662
19842
|
});
|
|
19663
19843
|
} else {
|
|
19664
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
19844
|
+
apiHandler.readList(configuration.mapping, _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
19665
19845
|
filterContex: filterContex
|
|
19666
19846
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
19667
|
-
setState(_objectSpread$
|
|
19847
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19668
19848
|
data: data.data.map(function (dt) {
|
|
19669
|
-
return _objectSpread$
|
|
19849
|
+
return _objectSpread$i(_objectSpread$i({}, dt), {}, {
|
|
19670
19850
|
_id: dt._id || dt.ID || nanoid()
|
|
19671
19851
|
});
|
|
19672
19852
|
}),
|
|
19673
|
-
pagination: _objectSpread$
|
|
19853
|
+
pagination: _objectSpread$i(_objectSpread$i({}, p.pagination), {}, {
|
|
19674
19854
|
total: data.total
|
|
19675
19855
|
}),
|
|
19676
19856
|
loading: false,
|
|
19677
|
-
mappingData: _objectSpread$
|
|
19857
|
+
mappingData: _objectSpread$i(_objectSpread$i({}, catalogItem), {}, {
|
|
19678
19858
|
filterContex: filterContex
|
|
19679
19859
|
})
|
|
19680
19860
|
}));
|
|
@@ -19686,7 +19866,7 @@ function useTableData$1 (_ref) {
|
|
|
19686
19866
|
}
|
|
19687
19867
|
};
|
|
19688
19868
|
var onSelect = function onSelect(keys) {
|
|
19689
|
-
setState(_objectSpread$
|
|
19869
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19690
19870
|
selected: keys
|
|
19691
19871
|
}));
|
|
19692
19872
|
};
|
|
@@ -19696,7 +19876,7 @@ function useTableData$1 (_ref) {
|
|
|
19696
19876
|
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
19697
19877
|
while (1) switch (_context2.prev = _context2.next) {
|
|
19698
19878
|
case 0:
|
|
19699
|
-
setState(_objectSpread$
|
|
19879
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19700
19880
|
deleting: true
|
|
19701
19881
|
}));
|
|
19702
19882
|
newData = _toConsumableArray(state.data);
|
|
@@ -19711,7 +19891,7 @@ function useTableData$1 (_ref) {
|
|
|
19711
19891
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
19712
19892
|
return nd._id === state.selected[index];
|
|
19713
19893
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
19714
|
-
mappingData = _objectSpread$
|
|
19894
|
+
mappingData = _objectSpread$i(_objectSpread$i({}, mappingData), state.mappingData);
|
|
19715
19895
|
_context.next = 5;
|
|
19716
19896
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true);
|
|
19717
19897
|
case 5:
|
|
@@ -19761,7 +19941,7 @@ function useTableData$1 (_ref) {
|
|
|
19761
19941
|
}
|
|
19762
19942
|
_context2.next = 18;
|
|
19763
19943
|
return apiHandler.readList(configuration.mapping, {
|
|
19764
|
-
pagination: _objectSpread$
|
|
19944
|
+
pagination: _objectSpread$i(_objectSpread$i({}, state.pagination), {}, {
|
|
19765
19945
|
current: current
|
|
19766
19946
|
}),
|
|
19767
19947
|
columns: configuration.columns,
|
|
@@ -19773,11 +19953,11 @@ function useTableData$1 (_ref) {
|
|
|
19773
19953
|
newData = data.data;
|
|
19774
19954
|
total = data.total;
|
|
19775
19955
|
case 21:
|
|
19776
|
-
setState(_objectSpread$
|
|
19956
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19777
19957
|
selected: [],
|
|
19778
19958
|
deleting: false,
|
|
19779
19959
|
data: newData,
|
|
19780
|
-
pagination: _objectSpread$
|
|
19960
|
+
pagination: _objectSpread$i(_objectSpread$i({}, state.pagination), {}, {
|
|
19781
19961
|
current: current,
|
|
19782
19962
|
total: total
|
|
19783
19963
|
})
|
|
@@ -19793,12 +19973,12 @@ function useTableData$1 (_ref) {
|
|
|
19793
19973
|
};
|
|
19794
19974
|
}();
|
|
19795
19975
|
function setLoading() {
|
|
19796
|
-
setState(_objectSpread$
|
|
19976
|
+
setState(_objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19797
19977
|
loading: true
|
|
19798
19978
|
}));
|
|
19799
19979
|
}
|
|
19800
|
-
return _objectSpread$
|
|
19801
|
-
configuration: _objectSpread$
|
|
19980
|
+
return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
19981
|
+
configuration: _objectSpread$i(_objectSpread$i({}, configuration), {}, {
|
|
19802
19982
|
title: undefined
|
|
19803
19983
|
}),
|
|
19804
19984
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -19903,8 +20083,8 @@ function objectHash (obj) {
|
|
|
19903
20083
|
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
20084
|
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
20085
|
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$
|
|
20086
|
+
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; }
|
|
20087
|
+
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
20088
|
var LOG$3 = getLogger('Backoffice', 'TableData');
|
|
19909
20089
|
function useTableData (_ref) {
|
|
19910
20090
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -19971,7 +20151,7 @@ function useTableData (_ref) {
|
|
|
19971
20151
|
selected: [],
|
|
19972
20152
|
canDelete: !!apiHandler.canDelete,
|
|
19973
20153
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
19974
|
-
mappingData: _objectSpread$
|
|
20154
|
+
mappingData: _objectSpread$h(_objectSpread$h({}, parentData), {}, {
|
|
19975
20155
|
prefilter: {
|
|
19976
20156
|
select: globalFilter.select
|
|
19977
20157
|
}
|
|
@@ -19980,7 +20160,7 @@ function useTableData (_ref) {
|
|
|
19980
20160
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
19981
20161
|
state = _useState14[0],
|
|
19982
20162
|
setState = _useState14[1];
|
|
19983
|
-
var mapping = _objectSpread$
|
|
20163
|
+
var mapping = _objectSpread$h(_objectSpread$h({}, parentData), {}, {
|
|
19984
20164
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
19985
20165
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
19986
20166
|
});
|
|
@@ -20019,14 +20199,14 @@ function useTableData (_ref) {
|
|
|
20019
20199
|
}
|
|
20020
20200
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
20021
20201
|
var newInitData = initData;
|
|
20022
|
-
var newState = _objectSpread$
|
|
20202
|
+
var newState = _objectSpread$h({}, state);
|
|
20023
20203
|
var selected = [];
|
|
20024
20204
|
if (configuration.deselectOnUpdate == false) {
|
|
20025
20205
|
selected = state.selected;
|
|
20026
20206
|
}
|
|
20027
20207
|
var pagination = undefined;
|
|
20028
20208
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
20029
|
-
pagination = _objectSpread$
|
|
20209
|
+
pagination = _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
|
|
20030
20210
|
total: state.data.length + dataArray.length
|
|
20031
20211
|
});
|
|
20032
20212
|
}
|
|
@@ -20043,7 +20223,7 @@ function useTableData (_ref) {
|
|
|
20043
20223
|
dataRow: dataRow
|
|
20044
20224
|
}),
|
|
20045
20225
|
_data = _updateData.data;
|
|
20046
|
-
newState = _objectSpread$
|
|
20226
|
+
newState = _objectSpread$h(_objectSpread$h({}, newState), {}, {
|
|
20047
20227
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
20048
20228
|
data: _data,
|
|
20049
20229
|
selected: selected
|
|
@@ -20056,8 +20236,8 @@ function useTableData (_ref) {
|
|
|
20056
20236
|
dataRow: dataRow
|
|
20057
20237
|
}),
|
|
20058
20238
|
nextInitData = _updateData2.data;
|
|
20059
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
20060
|
-
filters: _objectSpread$
|
|
20239
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, filterData), {}, {
|
|
20240
|
+
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
20241
|
}, 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
20242
|
genericProps: globalFilter.toggle
|
|
20063
20243
|
} : undefined), {}, {
|
|
@@ -20067,7 +20247,7 @@ function useTableData (_ref) {
|
|
|
20067
20247
|
_data2 = _aplyFilterAndSortati.data,
|
|
20068
20248
|
_pagination2 = _aplyFilterAndSortati.pagination;
|
|
20069
20249
|
newInitData = nextInitData;
|
|
20070
|
-
newState = _objectSpread$
|
|
20250
|
+
newState = _objectSpread$h(_objectSpread$h({}, newState), {}, {
|
|
20071
20251
|
pagination: _pagination2,
|
|
20072
20252
|
data: _data2,
|
|
20073
20253
|
selected: selected
|
|
@@ -20077,8 +20257,8 @@ function useTableData (_ref) {
|
|
|
20077
20257
|
if (apiHandler.canCreate) {
|
|
20078
20258
|
apiCreate(data).then(function (res) {
|
|
20079
20259
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
20080
|
-
initData && setInitData(_objectSpread$
|
|
20081
|
-
setState(_objectSpread$
|
|
20260
|
+
initData && setInitData(_objectSpread$h({}, initData));
|
|
20261
|
+
setState(_objectSpread$h({}, state));
|
|
20082
20262
|
}
|
|
20083
20263
|
});
|
|
20084
20264
|
}
|
|
@@ -20091,7 +20271,7 @@ function useTableData (_ref) {
|
|
|
20091
20271
|
var triggerRefresh = function triggerRefresh() {
|
|
20092
20272
|
var _configuration$filter7;
|
|
20093
20273
|
setError(undefined);
|
|
20094
|
-
var newGlobalFilter = _objectSpread$
|
|
20274
|
+
var newGlobalFilter = _objectSpread$h({}, globalFilter);
|
|
20095
20275
|
//on refresh update default filter, since global value can change
|
|
20096
20276
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
20097
20277
|
var _configuration$filter8;
|
|
@@ -20102,7 +20282,7 @@ function useTableData (_ref) {
|
|
|
20102
20282
|
newGlobalFilter["default"] = _defaultFilter;
|
|
20103
20283
|
setGlobaFilter(newGlobalFilter);
|
|
20104
20284
|
}
|
|
20105
|
-
onChange(_objectSpread$
|
|
20285
|
+
onChange(_objectSpread$h({
|
|
20106
20286
|
pagination: state.pagination
|
|
20107
20287
|
}, filterData), newGlobalFilter, true);
|
|
20108
20288
|
};
|
|
@@ -20121,7 +20301,7 @@ function useTableData (_ref) {
|
|
|
20121
20301
|
order: c.defaultSortOrder
|
|
20122
20302
|
};
|
|
20123
20303
|
});
|
|
20124
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
20304
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20125
20305
|
loading: false
|
|
20126
20306
|
}));else {
|
|
20127
20307
|
onChange({
|
|
@@ -20178,11 +20358,11 @@ function useTableData (_ref) {
|
|
|
20178
20358
|
case 0:
|
|
20179
20359
|
prefilter = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : globalFilter;
|
|
20180
20360
|
refresh = _args2.length > 2 ? _args2[2] : undefined;
|
|
20181
|
-
setState(_objectSpread$
|
|
20361
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20182
20362
|
loading: true
|
|
20183
20363
|
}));
|
|
20184
20364
|
currentData = initData;
|
|
20185
|
-
filterData = _objectSpread$
|
|
20365
|
+
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
20366
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref5) {
|
|
20187
20367
|
var _ref6 = _slicedToArray(_ref5, 2);
|
|
20188
20368
|
_ref6[0];
|
|
@@ -20190,7 +20370,7 @@ function useTableData (_ref) {
|
|
|
20190
20370
|
return v != null;
|
|
20191
20371
|
}));
|
|
20192
20372
|
currentFilterHash = objectHash(filterData);
|
|
20193
|
-
currentPagination = _objectSpread$
|
|
20373
|
+
currentPagination = _objectSpread$h(_objectSpread$h({}, p.pagination), {}, {
|
|
20194
20374
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
20195
20375
|
});
|
|
20196
20376
|
filterHash.current = currentFilterHash;
|
|
@@ -20198,7 +20378,7 @@ function useTableData (_ref) {
|
|
|
20198
20378
|
_context2.next = 19;
|
|
20199
20379
|
break;
|
|
20200
20380
|
}
|
|
20201
|
-
ssf = _objectSpread$
|
|
20381
|
+
ssf = _objectSpread$h({
|
|
20202
20382
|
pagination: currentPagination,
|
|
20203
20383
|
columns: configuration.columns,
|
|
20204
20384
|
filters: filterData,
|
|
@@ -20212,7 +20392,7 @@ function useTableData (_ref) {
|
|
|
20212
20392
|
data = _context2.sent;
|
|
20213
20393
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
20214
20394
|
currentData = data.data;
|
|
20215
|
-
currentPagination = _objectSpread$
|
|
20395
|
+
currentPagination = _objectSpread$h(_objectSpread$h({}, currentPagination), {}, {
|
|
20216
20396
|
total: data.total
|
|
20217
20397
|
});
|
|
20218
20398
|
_context2.next = 28;
|
|
@@ -20229,7 +20409,7 @@ function useTableData (_ref) {
|
|
|
20229
20409
|
currentData = _data3.data;
|
|
20230
20410
|
setInitData(currentData);
|
|
20231
20411
|
case 25:
|
|
20232
|
-
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$
|
|
20412
|
+
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$h(_objectSpread$h({}, p), {}, {
|
|
20233
20413
|
pagination: currentPagination,
|
|
20234
20414
|
filters: filterData,
|
|
20235
20415
|
data: currentData,
|
|
@@ -20238,11 +20418,11 @@ function useTableData (_ref) {
|
|
|
20238
20418
|
currentData = _data4;
|
|
20239
20419
|
currentPagination = pagination;
|
|
20240
20420
|
case 28:
|
|
20241
|
-
setState(_objectSpread$
|
|
20421
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20242
20422
|
loading: false,
|
|
20243
20423
|
data: currentData,
|
|
20244
20424
|
pagination: currentPagination,
|
|
20245
|
-
mappingData: _objectSpread$
|
|
20425
|
+
mappingData: _objectSpread$h(_objectSpread$h({}, parentData), {}, {
|
|
20246
20426
|
prefilter: prefilter
|
|
20247
20427
|
}),
|
|
20248
20428
|
currentFetchUrl: currentUrl
|
|
@@ -20262,7 +20442,7 @@ function useTableData (_ref) {
|
|
|
20262
20442
|
};
|
|
20263
20443
|
}();
|
|
20264
20444
|
var onSelect = function onSelect(keys) {
|
|
20265
|
-
setState(_objectSpread$
|
|
20445
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20266
20446
|
selected: keys
|
|
20267
20447
|
}));
|
|
20268
20448
|
};
|
|
@@ -20273,7 +20453,7 @@ function useTableData (_ref) {
|
|
|
20273
20453
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
20274
20454
|
while (1) switch (_context4.prev = _context4.next) {
|
|
20275
20455
|
case 0:
|
|
20276
|
-
setState(_objectSpread$
|
|
20456
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20277
20457
|
deleting: true
|
|
20278
20458
|
}));
|
|
20279
20459
|
newData = _toConsumableArray(state.data);
|
|
@@ -20313,7 +20493,7 @@ function useTableData (_ref) {
|
|
|
20313
20493
|
} finally {
|
|
20314
20494
|
_iterator.f();
|
|
20315
20495
|
}
|
|
20316
|
-
mappingData = _objectSpread$
|
|
20496
|
+
mappingData = _objectSpread$h(_objectSpread$h(_objectSpread$h({}, mappingData), state.mappingData), mapToggle);
|
|
20317
20497
|
deleteResult = undefined;
|
|
20318
20498
|
_context3.prev = 7;
|
|
20319
20499
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -20404,12 +20584,12 @@ function useTableData (_ref) {
|
|
|
20404
20584
|
break;
|
|
20405
20585
|
}
|
|
20406
20586
|
_context4.next = 25;
|
|
20407
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
20408
|
-
pagination: _objectSpread$
|
|
20587
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$h({
|
|
20588
|
+
pagination: _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
|
|
20409
20589
|
current: current
|
|
20410
20590
|
}),
|
|
20411
20591
|
columns: configuration.columns,
|
|
20412
|
-
filters: _objectSpread$
|
|
20592
|
+
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
20593
|
sorter: filterData.sorter
|
|
20414
20594
|
}, 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
20595
|
genericProps: globalFilter.toggle
|
|
@@ -20420,11 +20600,11 @@ function useTableData (_ref) {
|
|
|
20420
20600
|
total = data.total;
|
|
20421
20601
|
case 28:
|
|
20422
20602
|
setInitData(newInitData);
|
|
20423
|
-
setState(_objectSpread$
|
|
20603
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20424
20604
|
selected: [],
|
|
20425
20605
|
deleting: false,
|
|
20426
20606
|
data: newData,
|
|
20427
|
-
pagination: _objectSpread$
|
|
20607
|
+
pagination: _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
|
|
20428
20608
|
current: current === 0 ? 1 : current,
|
|
20429
20609
|
total: total
|
|
20430
20610
|
})
|
|
@@ -20445,14 +20625,14 @@ function useTableData (_ref) {
|
|
|
20445
20625
|
LOG$3.error('No global select filter defiend');
|
|
20446
20626
|
return;
|
|
20447
20627
|
}
|
|
20448
|
-
var newGlobalFilter = _objectSpread$
|
|
20628
|
+
var newGlobalFilter = _objectSpread$h({}, globalFilter);
|
|
20449
20629
|
if (value !== null && value !== void 0 && value.length) {
|
|
20450
20630
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
20451
20631
|
} else {
|
|
20452
20632
|
newGlobalFilter.select = {};
|
|
20453
20633
|
}
|
|
20454
20634
|
setGlobaFilter(newGlobalFilter);
|
|
20455
|
-
onChange(_objectSpread$
|
|
20635
|
+
onChange(_objectSpread$h({
|
|
20456
20636
|
pagination: state.pagination
|
|
20457
20637
|
}, filterData), newGlobalFilter);
|
|
20458
20638
|
};
|
|
@@ -20466,11 +20646,11 @@ function useTableData (_ref) {
|
|
|
20466
20646
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
20467
20647
|
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', 1];
|
|
20468
20648
|
});
|
|
20469
|
-
var newGlobalFilter = _objectSpread$
|
|
20649
|
+
var newGlobalFilter = _objectSpread$h(_objectSpread$h({}, globalFilter), {}, {
|
|
20470
20650
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
20471
20651
|
});
|
|
20472
20652
|
setGlobaFilter(newGlobalFilter);
|
|
20473
|
-
onChange(_objectSpread$
|
|
20653
|
+
onChange(_objectSpread$h({
|
|
20474
20654
|
pagination: state.pagination
|
|
20475
20655
|
}, filterData), newGlobalFilter);
|
|
20476
20656
|
};
|
|
@@ -20480,7 +20660,7 @@ function useTableData (_ref) {
|
|
|
20480
20660
|
LOG$3.error('No global search filter defiend');
|
|
20481
20661
|
return;
|
|
20482
20662
|
}
|
|
20483
|
-
var newGlobalFilter = _objectSpread$
|
|
20663
|
+
var newGlobalFilter = _objectSpread$h(_objectSpread$h({}, globalFilter), {}, {
|
|
20484
20664
|
search: {}
|
|
20485
20665
|
});
|
|
20486
20666
|
if (value) {
|
|
@@ -20494,7 +20674,7 @@ function useTableData (_ref) {
|
|
|
20494
20674
|
});
|
|
20495
20675
|
}
|
|
20496
20676
|
setGlobaFilter(newGlobalFilter);
|
|
20497
|
-
onChange(_objectSpread$
|
|
20677
|
+
onChange(_objectSpread$h({
|
|
20498
20678
|
pagination: state.pagination
|
|
20499
20679
|
}, filterData), newGlobalFilter);
|
|
20500
20680
|
};
|
|
@@ -20504,17 +20684,17 @@ function useTableData (_ref) {
|
|
|
20504
20684
|
LOG$3.error('No global period filter defiend');
|
|
20505
20685
|
return;
|
|
20506
20686
|
}
|
|
20507
|
-
var newGlobalFilter = _objectSpread$
|
|
20687
|
+
var newGlobalFilter = _objectSpread$h({}, globalFilter);
|
|
20508
20688
|
newGlobalFilter.timeStamp = {
|
|
20509
20689
|
fromTimeStamp: [from],
|
|
20510
20690
|
toTimeStamp: [to]
|
|
20511
20691
|
};
|
|
20512
20692
|
setGlobaFilter(newGlobalFilter);
|
|
20513
|
-
onChange(_objectSpread$
|
|
20693
|
+
onChange(_objectSpread$h({
|
|
20514
20694
|
pagination: state.pagination
|
|
20515
20695
|
}, filterData), newGlobalFilter);
|
|
20516
20696
|
};
|
|
20517
|
-
return _objectSpread$
|
|
20697
|
+
return _objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
20518
20698
|
title: title,
|
|
20519
20699
|
configuration: configuration,
|
|
20520
20700
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -20554,8 +20734,8 @@ function StandardTable (_ref) {
|
|
|
20554
20734
|
});
|
|
20555
20735
|
}
|
|
20556
20736
|
|
|
20557
|
-
function ownKeys$
|
|
20558
|
-
function _objectSpread$
|
|
20737
|
+
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; }
|
|
20738
|
+
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
20739
|
function Table (props) {
|
|
20560
20740
|
var root = useStore();
|
|
20561
20741
|
var variant = useMemo(function () {
|
|
@@ -20563,15 +20743,15 @@ function Table (props) {
|
|
|
20563
20743
|
return config.variant;
|
|
20564
20744
|
}, [props.id]);
|
|
20565
20745
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
20566
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
20746
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$g({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$g({}, props))]
|
|
20567
20747
|
});
|
|
20568
20748
|
}
|
|
20569
20749
|
|
|
20570
20750
|
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
20751
|
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
20752
|
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$
|
|
20753
|
+
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; }
|
|
20754
|
+
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
20755
|
function useAGGrid (_ref) {
|
|
20576
20756
|
var id = _ref.id,
|
|
20577
20757
|
filter = _ref.filter,
|
|
@@ -20665,7 +20845,7 @@ function useAGGrid (_ref) {
|
|
|
20665
20845
|
value = _ref3[1];
|
|
20666
20846
|
if (_idx == 0) {
|
|
20667
20847
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
20668
|
-
rdat.push(_objectSpread$
|
|
20848
|
+
rdat.push(_objectSpread$f(_objectSpread$f({}, rd), {}, {
|
|
20669
20849
|
grouping: [idx.toString()]
|
|
20670
20850
|
}));
|
|
20671
20851
|
var sp = key.split(':');
|
|
@@ -20808,8 +20988,8 @@ var value = "value-FCA-6";
|
|
|
20808
20988
|
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
20989
|
styleInject(css_248z$8);
|
|
20810
20990
|
|
|
20811
|
-
function ownKeys$
|
|
20812
|
-
function _objectSpread$
|
|
20991
|
+
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; }
|
|
20992
|
+
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
20993
|
var AGChart = function AGChart(_ref) {
|
|
20814
20994
|
var data = _ref.data;
|
|
20815
20995
|
var groupedData = [];
|
|
@@ -20817,11 +20997,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
20817
20997
|
data.forEach(function (dt) {
|
|
20818
20998
|
if (dt.count == 0) return;
|
|
20819
20999
|
if (groupedData.length > dt.grouping[0]) {
|
|
20820
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
21000
|
+
groupedData[dt.grouping[0]].push(_objectSpread$e(_objectSpread$e({}, dt), {}, {
|
|
20821
21001
|
count: Number(dt.count)
|
|
20822
21002
|
}));
|
|
20823
21003
|
} else {
|
|
20824
|
-
groupedData.push([_objectSpread$
|
|
21004
|
+
groupedData.push([_objectSpread$e(_objectSpread$e({}, dt), {}, {
|
|
20825
21005
|
count: Number(dt.count)
|
|
20826
21006
|
})]);
|
|
20827
21007
|
}
|
|
@@ -20862,8 +21042,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
20862
21042
|
});
|
|
20863
21043
|
};
|
|
20864
21044
|
|
|
20865
|
-
function ownKeys$
|
|
20866
|
-
function _objectSpread$
|
|
21045
|
+
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; }
|
|
21046
|
+
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
21047
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
20868
21048
|
var id = _ref.id,
|
|
20869
21049
|
filter = _ref.filter,
|
|
@@ -20956,7 +21136,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
20956
21136
|
});
|
|
20957
21137
|
});
|
|
20958
21138
|
}
|
|
20959
|
-
return _objectSpread$
|
|
21139
|
+
return _objectSpread$d(_objectSpread$d({}, column), {}, {
|
|
20960
21140
|
cellRenderer: renderer
|
|
20961
21141
|
});
|
|
20962
21142
|
});
|
|
@@ -21230,8 +21410,8 @@ var CustomText$1 = observer(CustomText, {
|
|
|
21230
21410
|
forwardRef: true
|
|
21231
21411
|
});
|
|
21232
21412
|
|
|
21233
|
-
function ownKeys$
|
|
21234
|
-
function _objectSpread$
|
|
21413
|
+
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; }
|
|
21414
|
+
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
21415
|
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
21416
|
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
21417
|
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 +21474,7 @@ function useFilterBoxData (id) {
|
|
|
21294
21474
|
} finally {
|
|
21295
21475
|
_iterator.f();
|
|
21296
21476
|
}
|
|
21297
|
-
return _objectSpread$
|
|
21477
|
+
return _objectSpread$c(_objectSpread$c({}, state), ob);
|
|
21298
21478
|
}
|
|
21299
21479
|
return {
|
|
21300
21480
|
configuration: configuration,
|
|
@@ -21308,8 +21488,8 @@ function useFilterBoxData (id) {
|
|
|
21308
21488
|
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
21489
|
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
21490
|
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$
|
|
21491
|
+
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; }
|
|
21492
|
+
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
21493
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
21314
21494
|
var id = _ref.id,
|
|
21315
21495
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -21337,7 +21517,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
21337
21517
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select$1, {
|
|
21338
21518
|
mode: "single",
|
|
21339
21519
|
apiInterface: filter.requestOptions,
|
|
21340
|
-
wholeData: _objectSpread$
|
|
21520
|
+
wholeData: _objectSpread$b(_objectSpread$b({}, state.filter), {}, {
|
|
21341
21521
|
tab: tab
|
|
21342
21522
|
}),
|
|
21343
21523
|
mapping: filter.requestMapping,
|
|
@@ -21569,8 +21749,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
21569
21749
|
return false;
|
|
21570
21750
|
});
|
|
21571
21751
|
|
|
21572
|
-
function ownKeys$
|
|
21573
|
-
function _objectSpread$
|
|
21752
|
+
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; }
|
|
21753
|
+
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
21754
|
function useUIBuilderData (id) {
|
|
21575
21755
|
var save = undefined;
|
|
21576
21756
|
var root = useStore();
|
|
@@ -21602,7 +21782,7 @@ function useUIBuilderData (id) {
|
|
|
21602
21782
|
var configuration = _useMemo.configuration;
|
|
21603
21783
|
useEffect(function () {
|
|
21604
21784
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
21605
|
-
return setFilter(_objectSpread$
|
|
21785
|
+
return setFilter(_objectSpread$a(_objectSpread$a({}, filter), {}, {
|
|
21606
21786
|
sessionGuid: res
|
|
21607
21787
|
}));
|
|
21608
21788
|
});
|
|
@@ -21625,8 +21805,8 @@ function useUIBuilderData (id) {
|
|
|
21625
21805
|
};
|
|
21626
21806
|
}
|
|
21627
21807
|
|
|
21628
|
-
function ownKeys$
|
|
21629
|
-
function _objectSpread$
|
|
21808
|
+
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; }
|
|
21809
|
+
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
21810
|
function UIBuilder(_ref) {
|
|
21631
21811
|
var id = _ref.id;
|
|
21632
21812
|
var state = useUIBuilderData(id);
|
|
@@ -21653,7 +21833,7 @@ function UIBuilder(_ref) {
|
|
|
21653
21833
|
override = {
|
|
21654
21834
|
value: newFilter[item.field],
|
|
21655
21835
|
setValue: function setValue(newVal) {
|
|
21656
|
-
var newFilter = _objectSpread$
|
|
21836
|
+
var newFilter = _objectSpread$9({}, state.filter);
|
|
21657
21837
|
newFilter[item.field] = newVal;
|
|
21658
21838
|
state.setFilter(newFilter);
|
|
21659
21839
|
}
|
|
@@ -21701,7 +21881,7 @@ function UIBuilder(_ref) {
|
|
|
21701
21881
|
case 'AGGrid':
|
|
21702
21882
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
21703
21883
|
id: item.id,
|
|
21704
|
-
filter: _objectSpread$
|
|
21884
|
+
filter: _objectSpread$9({
|
|
21705
21885
|
optionCodices: JSON.stringify(state.data)
|
|
21706
21886
|
}, state.filter),
|
|
21707
21887
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -21861,8 +22041,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
21861
22041
|
};
|
|
21862
22042
|
var OrgItem$1 = observer(OrgItem);
|
|
21863
22043
|
|
|
21864
|
-
function ownKeys$
|
|
21865
|
-
function _objectSpread$
|
|
22044
|
+
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; }
|
|
22045
|
+
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
22046
|
function useTransformJson (_ref) {
|
|
21867
22047
|
var id = _ref.id;
|
|
21868
22048
|
var _useState = useState(),
|
|
@@ -21928,7 +22108,7 @@ function useTransformJson (_ref) {
|
|
|
21928
22108
|
}();
|
|
21929
22109
|
var transformData = function transformData(data, itemChain, parentOrgId) {
|
|
21930
22110
|
var _data$children;
|
|
21931
|
-
return _objectSpread$
|
|
22111
|
+
return _objectSpread$8(_objectSpread$8({}, data), {}, {
|
|
21932
22112
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
21933
22113
|
data: data,
|
|
21934
22114
|
configuration: configuration,
|
|
@@ -22034,27 +22214,27 @@ var Legend = function Legend(props) {
|
|
|
22034
22214
|
itemLayout: "horizontal",
|
|
22035
22215
|
dataSource: [{
|
|
22036
22216
|
title: 'DIVA Retailer',
|
|
22037
|
-
description: 'Retailer-Organisationen werden dazu
|
|
22217
|
+
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
22218
|
color: '#81c784'
|
|
22039
22219
|
}, {
|
|
22040
22220
|
title: 'DIVA Retailer Kanal',
|
|
22041
|
-
description: 'Organisationen die unterhalb einer Retailer-Organisation angesiedelt sind, haben Zugriff auf
|
|
22221
|
+
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
22222
|
color: '#c8e6c9'
|
|
22043
22223
|
}, {
|
|
22044
22224
|
title: 'DIVA Supplier',
|
|
22045
|
-
description: 'Supplier-Organisationen dienen dazu Kataloge für
|
|
22225
|
+
description: 'Supplier-Organisationen dienen dazu, Kataloge für Hersteller zu erstellen. ' + 'Dabei werden Kataloge entweder neu aufgebaut oder als IDM-Kataloge importiert.',
|
|
22046
22226
|
color: '#ba68c8'
|
|
22047
22227
|
}, {
|
|
22048
22228
|
title: 'DIVA Dealer',
|
|
22049
|
-
description: '
|
|
22229
|
+
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
22230
|
color: '#e1bee7'
|
|
22051
22231
|
}, {
|
|
22052
22232
|
title: 'DIVA Verband',
|
|
22053
|
-
description: 'Verbandsorganisationen werden
|
|
22233
|
+
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
22234
|
color: '#fff176'
|
|
22055
22235
|
}, {
|
|
22056
22236
|
title: 'Hülsenorganisation',
|
|
22057
|
-
description: 'Diese Organisationen können nicht im Frontend genutzt werden und haben auch keinen Zugriff auf Katalogdaten.' + 'Sie
|
|
22237
|
+
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
22238
|
color: '#fff'
|
|
22059
22239
|
}],
|
|
22060
22240
|
renderItem: function renderItem(item, index) {
|
|
@@ -22587,8 +22767,8 @@ function useCatalogEditor (id) {
|
|
|
22587
22767
|
};
|
|
22588
22768
|
}
|
|
22589
22769
|
|
|
22590
|
-
function ownKeys$
|
|
22591
|
-
function _objectSpread$
|
|
22770
|
+
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; }
|
|
22771
|
+
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
22772
|
function DragDropUpload(_ref) {
|
|
22593
22773
|
var api2Params = _ref.api2Params,
|
|
22594
22774
|
catalogId = _ref.catalogId,
|
|
@@ -22693,7 +22873,7 @@ function DragDropUpload(_ref) {
|
|
|
22693
22873
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
22694
22874
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
22695
22875
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
22696
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
22876
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
22697
22877
|
children: [/*#__PURE__*/jsx("p", {
|
|
22698
22878
|
className: "ant-upload-drag-icon",
|
|
22699
22879
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -23011,8 +23191,8 @@ var ContentCard = observer(function (_ref2) {
|
|
|
23011
23191
|
});
|
|
23012
23192
|
var Content = observer(ContentWrapper);
|
|
23013
23193
|
|
|
23014
|
-
function ownKeys$
|
|
23015
|
-
function _objectSpread$
|
|
23194
|
+
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; }
|
|
23195
|
+
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
23196
|
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
23197
|
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
23198
|
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 +23394,7 @@ function useRoleSelectorData (_ref) {
|
|
|
23214
23394
|
roles.forEach(function (r) {
|
|
23215
23395
|
//check if after the changes the role is selected
|
|
23216
23396
|
if (value.includes(r._id)) {
|
|
23217
|
-
var newValue = _objectSpread$
|
|
23397
|
+
var newValue = _objectSpread$6(_objectSpread$6({}, r), {}, {
|
|
23218
23398
|
selected: true
|
|
23219
23399
|
});
|
|
23220
23400
|
//add it to the new list as selected role
|
|
@@ -23250,7 +23430,7 @@ function useRoleSelectorData (_ref) {
|
|
|
23250
23430
|
}
|
|
23251
23431
|
}
|
|
23252
23432
|
} else {
|
|
23253
|
-
var _newValue = _objectSpread$
|
|
23433
|
+
var _newValue = _objectSpread$6(_objectSpread$6({}, r), {}, {
|
|
23254
23434
|
selected: false
|
|
23255
23435
|
});
|
|
23256
23436
|
//add it to the new list as unselected role
|
|
@@ -23454,7 +23634,7 @@ function _updateRoles() {
|
|
|
23454
23634
|
userRole = userRoles.find(function (r) {
|
|
23455
23635
|
return r._id == role._id;
|
|
23456
23636
|
});
|
|
23457
|
-
newRole = _objectSpread$
|
|
23637
|
+
newRole = _objectSpread$6({}, role);
|
|
23458
23638
|
if (userRole) {
|
|
23459
23639
|
newRole.selected = true;
|
|
23460
23640
|
newRole.inherited = userRole.inherited;
|
|
@@ -23674,7 +23854,7 @@ function _fetchOptions() {
|
|
|
23674
23854
|
case 4:
|
|
23675
23855
|
result = _context11.sent;
|
|
23676
23856
|
options = result.data.map(function (d) {
|
|
23677
|
-
return _objectSpread$
|
|
23857
|
+
return _objectSpread$6(_objectSpread$6({}, d), {}, {
|
|
23678
23858
|
label: d.displayName,
|
|
23679
23859
|
value: d._id,
|
|
23680
23860
|
isLeaf: !d.hasChildren
|
|
@@ -23778,8 +23958,8 @@ var parent = "parent-NZJ3S";
|
|
|
23778
23958
|
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
23959
|
styleInject(css_248z$3);
|
|
23780
23960
|
|
|
23781
|
-
function ownKeys$
|
|
23782
|
-
function _objectSpread$
|
|
23961
|
+
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; }
|
|
23962
|
+
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
23963
|
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
23964
|
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
23965
|
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 +24019,8 @@ function _generateCSV() {
|
|
|
23839
24019
|
break;
|
|
23840
24020
|
}
|
|
23841
24021
|
_context2.next = 21;
|
|
23842
|
-
return generateCSV(_objectSpread$
|
|
23843
|
-
mappingData: _objectSpread$
|
|
24022
|
+
return generateCSV(_objectSpread$5(_objectSpread$5({}, exportParams.children), {}, {
|
|
24023
|
+
mappingData: _objectSpread$5(_objectSpread$5({}, parent), {}, {
|
|
23844
24024
|
parentId: exportParams.mappingData._id
|
|
23845
24025
|
})
|
|
23846
24026
|
}), csvData);
|
|
@@ -23902,8 +24082,8 @@ var generateCSVData = /*#__PURE__*/function () {
|
|
|
23902
24082
|
};
|
|
23903
24083
|
}();
|
|
23904
24084
|
|
|
23905
|
-
function ownKeys$
|
|
23906
|
-
function _objectSpread$
|
|
24085
|
+
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; }
|
|
24086
|
+
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
24087
|
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
24088
|
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
24089
|
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 +24502,7 @@ function useRelationSelectorData (_ref) {
|
|
|
24322
24502
|
var activeItem = _step.value;
|
|
24323
24503
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
24324
24504
|
addedObjects.push(addedData);
|
|
24325
|
-
getSplittedItems(_objectSpread$
|
|
24505
|
+
getSplittedItems(_objectSpread$4(_objectSpread$4({}, activeItem), {}, {
|
|
24326
24506
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
24327
24507
|
}));
|
|
24328
24508
|
ret = true;
|
|
@@ -24662,8 +24842,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
24662
24842
|
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
24843
|
styleInject(css_248z$2);
|
|
24664
24844
|
|
|
24665
|
-
function ownKeys$
|
|
24666
|
-
function _objectSpread$
|
|
24845
|
+
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; }
|
|
24846
|
+
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
24847
|
var DropDown = function DropDown(_ref) {
|
|
24668
24848
|
var _curItem$data$length;
|
|
24669
24849
|
var split = _ref.split,
|
|
@@ -24695,7 +24875,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
24695
24875
|
});
|
|
24696
24876
|
return /*#__PURE__*/jsx(Collapse, {
|
|
24697
24877
|
onChange: function onChange() {
|
|
24698
|
-
return getSplittedItems(_objectSpread$
|
|
24878
|
+
return getSplittedItems(_objectSpread$3(_objectSpread$3({}, item.item), {}, {
|
|
24699
24879
|
parentId: item.parentId
|
|
24700
24880
|
}), 0);
|
|
24701
24881
|
},
|
|
@@ -24955,6 +25135,8 @@ var RelationSelector$1 = observer(RelationSelector, {
|
|
|
24955
25135
|
forwardRef: true
|
|
24956
25136
|
});
|
|
24957
25137
|
|
|
25138
|
+
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; }
|
|
25139
|
+
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
25140
|
function useListData (_ref) {
|
|
24959
25141
|
var id = _ref.id,
|
|
24960
25142
|
data = _ref.data;
|
|
@@ -24977,9 +25159,17 @@ function useListData (_ref) {
|
|
|
24977
25159
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
24978
25160
|
listData = _useState4[0],
|
|
24979
25161
|
setListData = _useState4[1];
|
|
25162
|
+
var _useState5 = useState([]),
|
|
25163
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
25164
|
+
deletedObjects = _useState6[0],
|
|
25165
|
+
setDeletedObjects = _useState6[1];
|
|
25166
|
+
var _useState7 = useState(undefined),
|
|
25167
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
25168
|
+
updatedObject = _useState8[0],
|
|
25169
|
+
setUpdatedObject = _useState8[1];
|
|
24980
25170
|
useEffect(function () {
|
|
24981
25171
|
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
24982
|
-
var result;
|
|
25172
|
+
var result, initData;
|
|
24983
25173
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
24984
25174
|
while (1) switch (_context.prev = _context.next) {
|
|
24985
25175
|
case 0:
|
|
@@ -24989,8 +25179,10 @@ function useListData (_ref) {
|
|
|
24989
25179
|
case 3:
|
|
24990
25180
|
result = _context.sent;
|
|
24991
25181
|
setListData(result.data.map(parseField));
|
|
25182
|
+
initData = _objectSpread$2({}, data);
|
|
25183
|
+
setUpdatedObject(initData);
|
|
24992
25184
|
setLoading(false);
|
|
24993
|
-
case
|
|
25185
|
+
case 8:
|
|
24994
25186
|
case "end":
|
|
24995
25187
|
return _context.stop();
|
|
24996
25188
|
}
|
|
@@ -24998,11 +25190,14 @@ function useListData (_ref) {
|
|
|
24998
25190
|
}))();
|
|
24999
25191
|
}, []);
|
|
25000
25192
|
var parseField = function parseField(dataEntry) {
|
|
25001
|
-
var _configuration$itemMa, _configuration$itemMa2, _configuration$itemMa3;
|
|
25193
|
+
var _configuration$itemMa, _configuration$itemMa2, _configuration$itemMa3, _configuration$itemMa4, _configuration$itemMa5, _configuration$itemMa6;
|
|
25002
25194
|
var item = {
|
|
25003
25195
|
title: '',
|
|
25004
25196
|
description: '',
|
|
25005
|
-
content: ''
|
|
25197
|
+
content: '',
|
|
25198
|
+
id: '',
|
|
25199
|
+
image: '',
|
|
25200
|
+
itemUpdate: undefined
|
|
25006
25201
|
};
|
|
25007
25202
|
(_configuration$itemMa = configuration.itemMapping.title) === null || _configuration$itemMa === void 0 || _configuration$itemMa.forEach(function (field) {
|
|
25008
25203
|
item.title = item.title + (typeof field == 'string' ? field : parseFieldValue(dataEntry[field.field], field)) + ' ';
|
|
@@ -25013,6 +25208,15 @@ function useListData (_ref) {
|
|
|
25013
25208
|
(_configuration$itemMa3 = configuration.itemMapping.content) === null || _configuration$itemMa3 === void 0 || _configuration$itemMa3.forEach(function (field) {
|
|
25014
25209
|
item.content = item.content + (typeof field == 'string' ? field : parseFieldValue(dataEntry[field.field], field)) + ' ';
|
|
25015
25210
|
});
|
|
25211
|
+
(_configuration$itemMa4 = configuration.itemMapping.id) === null || _configuration$itemMa4 === void 0 || _configuration$itemMa4.forEach(function (field) {
|
|
25212
|
+
item.id = item.id + (typeof field == 'string' ? field : parseFieldValue(dataEntry[field.field], field)) + ' ';
|
|
25213
|
+
});
|
|
25214
|
+
(_configuration$itemMa5 = configuration.itemMapping.image) === null || _configuration$itemMa5 === void 0 || _configuration$itemMa5.forEach(function (field) {
|
|
25215
|
+
item.image = item.image + (typeof field == 'string' ? field : parseFieldValue(dataEntry[field.field], field)) + ' ';
|
|
25216
|
+
});
|
|
25217
|
+
(_configuration$itemMa6 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa6 === void 0 || _configuration$itemMa6.forEach(function (field) {
|
|
25218
|
+
item.itemUpdate = field;
|
|
25219
|
+
});
|
|
25016
25220
|
return item;
|
|
25017
25221
|
};
|
|
25018
25222
|
var parseFieldValue = function parseFieldValue(value, config) {
|
|
@@ -25026,10 +25230,87 @@ function useListData (_ref) {
|
|
|
25026
25230
|
}
|
|
25027
25231
|
return value;
|
|
25028
25232
|
};
|
|
25233
|
+
function deleteItem(item, index) {
|
|
25234
|
+
var delObj = deletedObjects;
|
|
25235
|
+
delObj.push(item);
|
|
25236
|
+
setDeletedObjects(_toConsumableArray(delObj));
|
|
25237
|
+
var acItems = listData;
|
|
25238
|
+
acItems.splice(index, 1);
|
|
25239
|
+
setListData(_toConsumableArray(acItems));
|
|
25240
|
+
}
|
|
25241
|
+
function updateItem(item, index, field, value) {
|
|
25242
|
+
var fields = field.split('.');
|
|
25243
|
+
if (fields.length > 2) {
|
|
25244
|
+
console.error('field with more than 2 parts not allowed');
|
|
25245
|
+
return;
|
|
25246
|
+
}
|
|
25247
|
+
var updObj = _objectSpread$2({}, updatedObject);
|
|
25248
|
+
if (fields.length === 1) {
|
|
25249
|
+
updObj = _objectSpread$2(_objectSpread$2({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
25250
|
+
} else if (fields.length === 2) {
|
|
25251
|
+
var updatedField = updObj[fields[0]].find(function (v) {
|
|
25252
|
+
return v.id === item.id.trim();
|
|
25253
|
+
});
|
|
25254
|
+
if (updatedField) {
|
|
25255
|
+
var updatedFieldCopy = _objectSpread$2(_objectSpread$2({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
25256
|
+
updObj = _objectSpread$2(_objectSpread$2({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
25257
|
+
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
25258
|
+
})));
|
|
25259
|
+
}
|
|
25260
|
+
}
|
|
25261
|
+
setUpdatedObject(updObj);
|
|
25262
|
+
|
|
25263
|
+
/*let acItems = listData;
|
|
25264
|
+
acItems.splice(index, 1);
|
|
25265
|
+
setListData([...acItems]);*/
|
|
25266
|
+
}
|
|
25267
|
+
function save() {
|
|
25268
|
+
return _save.apply(this, arguments);
|
|
25269
|
+
}
|
|
25270
|
+
function _save() {
|
|
25271
|
+
_save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
25272
|
+
var i, relatedId;
|
|
25273
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
25274
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
25275
|
+
case 0:
|
|
25276
|
+
i = 0;
|
|
25277
|
+
case 1:
|
|
25278
|
+
if (!(i < deletedObjects.length)) {
|
|
25279
|
+
_context2.next = 8;
|
|
25280
|
+
break;
|
|
25281
|
+
}
|
|
25282
|
+
relatedId = _typeof(deletedObjects[i]) == 'object' ? deletedObjects[i]._id || deletedObjects[i].id.trim() : deletedObjects[i];
|
|
25283
|
+
_context2.next = 5;
|
|
25284
|
+
return apiHandler["delete"](undefined, configuration.mapping, {
|
|
25285
|
+
_id: data._id,
|
|
25286
|
+
id: relatedId
|
|
25287
|
+
});
|
|
25288
|
+
case 5:
|
|
25289
|
+
i++;
|
|
25290
|
+
_context2.next = 1;
|
|
25291
|
+
break;
|
|
25292
|
+
case 8:
|
|
25293
|
+
setDeletedObjects([]);
|
|
25294
|
+
|
|
25295
|
+
/*if (updatedObject !== data) {
|
|
25296
|
+
await apiHandler.update(updatedObject, data );
|
|
25297
|
+
//setUpdatedObject(data);
|
|
25298
|
+
}*/
|
|
25299
|
+
case 9:
|
|
25300
|
+
case "end":
|
|
25301
|
+
return _context2.stop();
|
|
25302
|
+
}
|
|
25303
|
+
}, _callee2);
|
|
25304
|
+
}));
|
|
25305
|
+
return _save.apply(this, arguments);
|
|
25306
|
+
}
|
|
25029
25307
|
return {
|
|
25030
25308
|
loading: loading,
|
|
25031
25309
|
listData: listData,
|
|
25032
|
-
configuration: configuration
|
|
25310
|
+
configuration: configuration,
|
|
25311
|
+
deleteItem: deleteItem,
|
|
25312
|
+
updateItem: updateItem,
|
|
25313
|
+
save: save
|
|
25033
25314
|
};
|
|
25034
25315
|
}
|
|
25035
25316
|
|
|
@@ -25037,21 +25318,49 @@ var ListWrapper = function ListWrapper(props, ref) {
|
|
|
25037
25318
|
useStore();
|
|
25038
25319
|
var _useListData = useListData(props),
|
|
25039
25320
|
loading = _useListData.loading,
|
|
25040
|
-
listData = _useListData.listData
|
|
25321
|
+
listData = _useListData.listData,
|
|
25322
|
+
configuration = _useListData.configuration,
|
|
25323
|
+
deleteItem = _useListData.deleteItem,
|
|
25324
|
+
save = _useListData.save;
|
|
25041
25325
|
useImperativeHandle(ref, function () {
|
|
25042
25326
|
return {
|
|
25043
25327
|
submit: function submit() {
|
|
25044
|
-
|
|
25328
|
+
save().then(function () {
|
|
25329
|
+
return props.onChange();
|
|
25330
|
+
});
|
|
25045
25331
|
}
|
|
25046
25332
|
};
|
|
25047
|
-
}, []);
|
|
25333
|
+
}, [save]);
|
|
25334
|
+
var listItemactions = function listItemactions(item, index) {
|
|
25335
|
+
var actions = [];
|
|
25336
|
+
/*if (item.itemUpdate) {
|
|
25337
|
+
if (item.itemUpdate.type === 'boolean') {
|
|
25338
|
+
actions.push(<Checkbox onChange={(e) => updateItem(item, index, item.itemUpdate.field, e.target.value)} />);
|
|
25339
|
+
}
|
|
25340
|
+
}*/
|
|
25341
|
+
if (configuration.canDelete) {
|
|
25342
|
+
actions.push( /*#__PURE__*/jsx(DeleteOutlined, {
|
|
25343
|
+
onClick: function onClick() {
|
|
25344
|
+
return deleteItem(item, index);
|
|
25345
|
+
}
|
|
25346
|
+
}));
|
|
25347
|
+
}
|
|
25348
|
+
return actions;
|
|
25349
|
+
};
|
|
25048
25350
|
return /*#__PURE__*/jsx(List$1, {
|
|
25049
25351
|
dataSource: listData,
|
|
25050
25352
|
loading: loading,
|
|
25051
25353
|
bordered: true,
|
|
25052
|
-
renderItem: function renderItem(item) {
|
|
25354
|
+
renderItem: function renderItem(item, index) {
|
|
25053
25355
|
return /*#__PURE__*/jsxs(List$1.Item, {
|
|
25054
|
-
|
|
25356
|
+
actions: listItemactions(item, index),
|
|
25357
|
+
children: [item.image && /*#__PURE__*/jsx("img", {
|
|
25358
|
+
width: 75,
|
|
25359
|
+
src: item.image,
|
|
25360
|
+
style: {
|
|
25361
|
+
marginRight: 15
|
|
25362
|
+
}
|
|
25363
|
+
}), /*#__PURE__*/jsx(List$1.Item.Meta, {
|
|
25055
25364
|
title: /*#__PURE__*/jsx("span", {
|
|
25056
25365
|
style: {
|
|
25057
25366
|
fontWeight: 'bold'
|
|
@@ -25059,7 +25368,9 @@ var ListWrapper = function ListWrapper(props, ref) {
|
|
|
25059
25368
|
children: item.title
|
|
25060
25369
|
}),
|
|
25061
25370
|
description: item.description
|
|
25062
|
-
}),
|
|
25371
|
+
}), /*#__PURE__*/jsx("div", {
|
|
25372
|
+
children: item.content
|
|
25373
|
+
})]
|
|
25063
25374
|
});
|
|
25064
25375
|
}
|
|
25065
25376
|
});
|
|
@@ -25126,7 +25437,7 @@ function useJsonEditorData (id, setCanSave, onChange, onError) {
|
|
|
25126
25437
|
}
|
|
25127
25438
|
function _save() {
|
|
25128
25439
|
_save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(original) {
|
|
25129
|
-
var
|
|
25440
|
+
var data;
|
|
25130
25441
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
25131
25442
|
while (1) switch (_context.prev = _context.next) {
|
|
25132
25443
|
case 0:
|
|
@@ -25138,7 +25449,7 @@ function useJsonEditorData (id, setCanSave, onChange, onError) {
|
|
|
25138
25449
|
_context.next = 4;
|
|
25139
25450
|
return apiHandler.update(curData, original);
|
|
25140
25451
|
case 4:
|
|
25141
|
-
|
|
25452
|
+
data = _context.sent;
|
|
25142
25453
|
_context.next = 11;
|
|
25143
25454
|
break;
|
|
25144
25455
|
case 7:
|
|
@@ -25149,9 +25460,9 @@ function useJsonEditorData (id, setCanSave, onChange, onError) {
|
|
|
25149
25460
|
_context.next = 10;
|
|
25150
25461
|
return apiHandler.create(curData);
|
|
25151
25462
|
case 10:
|
|
25152
|
-
|
|
25463
|
+
data = _context.sent;
|
|
25153
25464
|
case 11:
|
|
25154
|
-
onChange === null || onChange === void 0 || onChange(
|
|
25465
|
+
onChange === null || onChange === void 0 || onChange(data);
|
|
25155
25466
|
_context.next = 18;
|
|
25156
25467
|
break;
|
|
25157
25468
|
case 14:
|
|
@@ -25800,7 +26111,9 @@ function Detail(_ref) {
|
|
|
25800
26111
|
onError: onError
|
|
25801
26112
|
}), info.type == 'List' && /*#__PURE__*/jsx(List, {
|
|
25802
26113
|
id: info.configurationId,
|
|
25803
|
-
data: info.data
|
|
26114
|
+
data: info.data,
|
|
26115
|
+
ref: ref,
|
|
26116
|
+
onChange: onChange
|
|
25804
26117
|
}), info.type == 'JsonEditor' && /*#__PURE__*/jsx(JsonEditor$1, {
|
|
25805
26118
|
ref: ref,
|
|
25806
26119
|
id: info.configurationId,
|