@crystaldesign/diva-backoffice 24.11.0-beta.13 → 24.11.0-beta.15
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 +674 -482
- package/build/types/backoffice/src/Configuration.d.ts +1 -0
- package/build/types/backoffice/src/Configuration.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/ErrorBoundary.d.ts +8 -11
- package/build/types/backoffice/src/layout/ErrorBoundary.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Navigation/types.d.ts +2 -1
- package/build/types/backoffice/src/layout/Navigation/types.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/{WYSIWYG → WYSIWYG_Configurator}/ArticleSelection/index.d.ts +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/index.d.ts.map +1 -0
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/index.d.ts.map +1 -0
- package/build/types/backoffice/src/layout/Toolbar/Tools/{WYSIWYG/useWysiwyg.d.ts → WYSIWYG_Configurator/useWysiwygConfigurator.d.ts} +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/useWysiwygConfigurator.d.ts.map +1 -0
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_ContentItem/index.d.ts +8 -0
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_ContentItem/index.d.ts.map +1 -0
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_ContentItem/useWysiwygContentItem.d.ts +11 -0
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_ContentItem/useWysiwygContentItem.d.ts.map +1 -0
- package/build/types/backoffice/src/layout/Toolbar/index.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ContentStore.d.ts +3 -0
- package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/backoffice/src/store/RootStore.d.ts +7 -4
- package/build/types/backoffice/src/store/RootStore.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/Fields/Translation/useTranslationForm.d.ts +1 -1
- package/build/types/backoffice/src/ui/Form/Fields/Translation/useTranslationForm.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/elements.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/types.d.ts +6 -0
- package/build/types/backoffice/src/ui/Form/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/useFormData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/BaseTable/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/types.d.ts +3 -0
- package/build/types/backoffice/src/ui/Table/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/utils/mapColumns.d.ts.map +1 -1
- package/package.json +5 -3
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG/ArticleSelection/index.d.ts.map +0 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG/index.d.ts.map +0 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG/useWysiwyg.d.ts.map +0 -1
- /package/build/types/backoffice/src/layout/Toolbar/Tools/{WYSIWYG → WYSIWYG_Configurator}/index.d.ts +0 -0
package/build/esm/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { getLogger, DivaError, useTranslation, useDivaCore, DivaUtils } from '@c
|
|
|
8
8
|
import { useSearchParams, useLocation, useNavigate, useParams, Link, Routes, Route, BrowserRouter } from 'react-router-dom';
|
|
9
9
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
10
10
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
11
|
+
import 'i18next';
|
|
11
12
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
12
13
|
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
13
14
|
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
|
|
@@ -64,7 +65,7 @@ import FolderOutlined from '@ant-design/icons/FolderOutlined';
|
|
|
64
65
|
import SettingOutlined from '@ant-design/icons/SettingOutlined';
|
|
65
66
|
import PieChartOutlined from '@ant-design/icons/PieChartOutlined';
|
|
66
67
|
import InfoCircleOutlined from '@ant-design/icons/InfoCircleOutlined';
|
|
67
|
-
import { merge as merge$1
|
|
68
|
+
import { merge as merge$1 } from 'lodash';
|
|
68
69
|
import DeleteOutlined from '@ant-design/icons/DeleteOutlined';
|
|
69
70
|
import JSONEditor from 'jsoneditor';
|
|
70
71
|
import 'jsoneditor/dist/jsoneditor.css';
|
|
@@ -77,7 +78,7 @@ import { stringify } from 'csv';
|
|
|
77
78
|
import InfiniteScroll from 'react-infinite-scroll-component';
|
|
78
79
|
import SearchOutlined from '@ant-design/icons/SearchOutlined';
|
|
79
80
|
import PlusOutlined$1 from '@ant-design/icons/PlusOutlined';
|
|
80
|
-
import DivaUtils$1, { nanoid } from '@crystaldesign/diva-utils';
|
|
81
|
+
import DivaUtils$1, { nanoid, DivaError as DivaError$1 } from '@crystaldesign/diva-utils';
|
|
81
82
|
import ReactCrop from 'react-image-crop';
|
|
82
83
|
import 'react-image-crop/dist/ReactCrop.css';
|
|
83
84
|
import RoomSelection from '@crystaldesign/room-selection';
|
|
@@ -119,6 +120,8 @@ import Menu from 'antd/es/menu';
|
|
|
119
120
|
import { DoubleLeftOutlined } from '@ant-design/icons/lib/icons';
|
|
120
121
|
import { WebPlannerReact } from '@crystaldesign/diva-web-planner-react';
|
|
121
122
|
import Select$2 from 'react-select';
|
|
123
|
+
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
124
|
+
import { ContentItemComponent } from '@crystaldesign/content-item';
|
|
122
125
|
|
|
123
126
|
(function() {
|
|
124
127
|
const env = {"STAGE":"production"};
|
|
@@ -135,8 +138,8 @@ import Select$2 from 'react-select';
|
|
|
135
138
|
function _createForOfIteratorHelper$m(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$m(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
136
139
|
function _unsupportedIterableToArray$m(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$m(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$m(r, a) : void 0; } }
|
|
137
140
|
function _arrayLikeToArray$m(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
138
|
-
function ownKeys$
|
|
139
|
-
function _objectSpread$
|
|
141
|
+
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; }
|
|
142
|
+
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; }
|
|
140
143
|
var LOG$c = getLogger('Backoffice', 'AplyMapping');
|
|
141
144
|
function aplyMapping (_ref) {
|
|
142
145
|
var mapable = _ref.mapable,
|
|
@@ -157,10 +160,10 @@ function aplyMapping (_ref) {
|
|
|
157
160
|
var newValue = {};
|
|
158
161
|
newValue[newKey] = valueToAdd;
|
|
159
162
|
if ((startValue === null || startValue === void 0 ? void 0 : startValue[newKey]) != undefined) {
|
|
160
|
-
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$
|
|
163
|
+
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$M(_objectSpread$M({}, startValue[newKey]), valueToAdd);else startValue[newKey] = type == 'addToSourceValue' ? startValue[newKey] + valueToAdd : valueToAdd;
|
|
161
164
|
return startValue;
|
|
162
165
|
}
|
|
163
|
-
if (newIdx == 1) return _objectSpread$
|
|
166
|
+
if (newIdx == 1) return _objectSpread$M(_objectSpread$M({}, startValue), newValue);
|
|
164
167
|
return _getTarget(idx + 1, keys, startValue, newValue);
|
|
165
168
|
};
|
|
166
169
|
returnValue = _getTarget(0, key.split('.'), returnValue, value);
|
|
@@ -441,8 +444,8 @@ function getLeafColumns(columns) {
|
|
|
441
444
|
});
|
|
442
445
|
}
|
|
443
446
|
|
|
444
|
-
function ownKeys$
|
|
445
|
-
function _objectSpread$
|
|
447
|
+
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; }
|
|
448
|
+
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; }
|
|
446
449
|
var LOG$b = getLogger('Backoffice', 'ApiHandler');
|
|
447
450
|
var jp = require('jsonpath');
|
|
448
451
|
var _default$d = /*#__PURE__*/function () {
|
|
@@ -621,7 +624,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
621
624
|
_context2.next = 20;
|
|
622
625
|
return fetch(finalUrl, {
|
|
623
626
|
method: this._updateMethod,
|
|
624
|
-
headers: _objectSpread$
|
|
627
|
+
headers: _objectSpread$L(_objectSpread$L({}, jwt ? {
|
|
625
628
|
Authorization: 'Bearer ' + jwt
|
|
626
629
|
} : {}), {}, {
|
|
627
630
|
'Content-Type': 'application/json'
|
|
@@ -714,7 +717,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
714
717
|
rootStore: this._rootStore,
|
|
715
718
|
fallBackToParams: true
|
|
716
719
|
});
|
|
717
|
-
if (data) createData = _objectSpread$
|
|
720
|
+
if (data) createData = _objectSpread$L({}, data);
|
|
718
721
|
} else if (data !== undefined) {
|
|
719
722
|
createData = aplyMapping({
|
|
720
723
|
mapable: data,
|
|
@@ -857,7 +860,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
857
860
|
_context6.next = 7;
|
|
858
861
|
return fetch((_url = url) === null || _url === void 0 ? void 0 : _url.toString(), {
|
|
859
862
|
method: isApi2 ? 'POST' : 'DELETE',
|
|
860
|
-
headers: _objectSpread$
|
|
863
|
+
headers: _objectSpread$L({}, jwt ? {
|
|
861
864
|
Authorization: 'Bearer ' + jwt
|
|
862
865
|
} : {})
|
|
863
866
|
}).then( /*#__PURE__*/function () {
|
|
@@ -975,7 +978,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
975
978
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
976
979
|
case 2:
|
|
977
980
|
jwt = (_this$_rootStore5 = this._rootStore) === null || _this$_rootStore5 === void 0 ? void 0 : _this$_rootStore5.dataStore.jwt;
|
|
978
|
-
url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
981
|
+
url = filterServerSide ? parseServersideFilters(_objectSpread$L(_objectSpread$L({}, filterServerSide), {}, {
|
|
979
982
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
980
983
|
baseUrl: this._readListUrl,
|
|
981
984
|
prefilter: prefilter
|
|
@@ -995,7 +998,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
995
998
|
});
|
|
996
999
|
case 6:
|
|
997
1000
|
response = _context8.sent;
|
|
998
|
-
return _context8.abrupt("return", _objectSpread$
|
|
1001
|
+
return _context8.abrupt("return", _objectSpread$L(_objectSpread$L({}, response), {}, {
|
|
999
1002
|
data: response.data.map(function (d) {
|
|
1000
1003
|
return _this2.aplyJsonPath(d, _this2._readJsonPath);
|
|
1001
1004
|
})
|
|
@@ -1019,7 +1022,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1019
1022
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1020
1023
|
}
|
|
1021
1024
|
(_this$_rootStore6 = this._rootStore) === null || _this$_rootStore6 === void 0 ? void 0 : _this$_rootStore6.dataStore.jwt;
|
|
1022
|
-
var url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1025
|
+
var url = filterServerSide ? parseServersideFilters(_objectSpread$L(_objectSpread$L({}, filterServerSide), {}, {
|
|
1023
1026
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1024
1027
|
baseUrl: this._readListUrl,
|
|
1025
1028
|
prefilter: prefilter
|
|
@@ -1136,13 +1139,13 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1136
1139
|
}]);
|
|
1137
1140
|
}();
|
|
1138
1141
|
|
|
1139
|
-
function _callSuper$
|
|
1140
|
-
function _isNativeReflectConstruct$
|
|
1142
|
+
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)); }
|
|
1143
|
+
function _isNativeReflectConstruct$6() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$6 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1141
1144
|
function _superPropGet$3(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }
|
|
1142
1145
|
var _default$c = /*#__PURE__*/function (_ApiHandler) {
|
|
1143
1146
|
function _default(configuration, root) {
|
|
1144
1147
|
_classCallCheck(this, _default);
|
|
1145
|
-
return _callSuper$
|
|
1148
|
+
return _callSuper$6(this, _default, [configuration, root]);
|
|
1146
1149
|
}
|
|
1147
1150
|
_inherits(_default, _ApiHandler);
|
|
1148
1151
|
return _createClass(_default, [{
|
|
@@ -1226,15 +1229,15 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1226
1229
|
}]);
|
|
1227
1230
|
}(_default$d);
|
|
1228
1231
|
|
|
1229
|
-
function ownKeys$
|
|
1230
|
-
function _objectSpread$
|
|
1231
|
-
function _callSuper$
|
|
1232
|
-
function _isNativeReflectConstruct$
|
|
1232
|
+
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; }
|
|
1233
|
+
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; }
|
|
1234
|
+
function _callSuper$5(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1235
|
+
function _isNativeReflectConstruct$5() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1233
1236
|
var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
1234
1237
|
function _default(configuration, root) {
|
|
1235
1238
|
var _this;
|
|
1236
1239
|
_classCallCheck(this, _default);
|
|
1237
|
-
_this = _callSuper$
|
|
1240
|
+
_this = _callSuper$5(this, _default, [configuration, root]);
|
|
1238
1241
|
_defineProperty(_this, "refApiHander", void 0);
|
|
1239
1242
|
_defineProperty(_this, "targetApiHandler", void 0);
|
|
1240
1243
|
_this.refApiHander = new _default$d({
|
|
@@ -1326,7 +1329,7 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1326
1329
|
_context2.next = 5;
|
|
1327
1330
|
return fetch(this._createUrl + '?ref=true', {
|
|
1328
1331
|
method: this._createMethod,
|
|
1329
|
-
headers: _objectSpread$
|
|
1332
|
+
headers: _objectSpread$K({}, jwt ? {
|
|
1330
1333
|
Authorization: 'Bearer ' + jwt
|
|
1331
1334
|
} : {}),
|
|
1332
1335
|
body: data
|
|
@@ -1409,13 +1412,13 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1409
1412
|
}]);
|
|
1410
1413
|
}(_default$d);
|
|
1411
1414
|
|
|
1412
|
-
function _callSuper$
|
|
1413
|
-
function _isNativeReflectConstruct$
|
|
1415
|
+
function _callSuper$4(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1416
|
+
function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1414
1417
|
var _default$a = /*#__PURE__*/function (_ApiHandler) {
|
|
1415
1418
|
function _default(configuration, rootStore) {
|
|
1416
1419
|
var _this;
|
|
1417
1420
|
_classCallCheck(this, _default);
|
|
1418
|
-
_this = _callSuper$
|
|
1421
|
+
_this = _callSuper$4(this, _default, [configuration, rootStore]);
|
|
1419
1422
|
_defineProperty(_this, "searchApiHandler", void 0);
|
|
1420
1423
|
_defineProperty(_this, "splittedApiHandler", void 0);
|
|
1421
1424
|
_defineProperty(_this, "getSplitted", function (mapping, mappingData, filterServerSide) {
|
|
@@ -1443,14 +1446,14 @@ var _default$a = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1443
1446
|
}]);
|
|
1444
1447
|
}(_default$d);
|
|
1445
1448
|
|
|
1446
|
-
function _callSuper$
|
|
1447
|
-
function _isNativeReflectConstruct$
|
|
1449
|
+
function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1450
|
+
function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1448
1451
|
function _superPropGet$2(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }
|
|
1449
1452
|
var _default$9 = /*#__PURE__*/function (_ApiHandler) {
|
|
1450
1453
|
function _default(configuration, rootStore) {
|
|
1451
1454
|
var _this;
|
|
1452
1455
|
_classCallCheck(this, _default);
|
|
1453
|
-
_this = _callSuper$
|
|
1456
|
+
_this = _callSuper$3(this, _default, [configuration, rootStore]);
|
|
1454
1457
|
_defineProperty(_this, "organizationApiHandler", void 0);
|
|
1455
1458
|
_defineProperty(_this, "rolesApiHandler", void 0);
|
|
1456
1459
|
_this.organizationApiHandler = new _default$d({
|
|
@@ -1499,14 +1502,14 @@ var _default$9 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1499
1502
|
}]);
|
|
1500
1503
|
}(_default$d);
|
|
1501
1504
|
|
|
1502
|
-
function _callSuper$
|
|
1503
|
-
function _isNativeReflectConstruct$
|
|
1505
|
+
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1506
|
+
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1504
1507
|
function _superPropGet$1(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }
|
|
1505
1508
|
var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
1506
1509
|
function _default(configuration, rootStore) {
|
|
1507
1510
|
var _this;
|
|
1508
1511
|
_classCallCheck(this, _default);
|
|
1509
|
-
_this = _callSuper$
|
|
1512
|
+
_this = _callSuper$2(this, _default, [configuration, rootStore]);
|
|
1510
1513
|
_defineProperty(_this, "formApiHandler", void 0);
|
|
1511
1514
|
_this.formApiHandler = rootStore.getApiHandler(configuration.formId);
|
|
1512
1515
|
return _this;
|
|
@@ -1704,8 +1707,8 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1704
1707
|
}]);
|
|
1705
1708
|
}(_default$d);
|
|
1706
1709
|
|
|
1707
|
-
function ownKeys$
|
|
1708
|
-
function _objectSpread$
|
|
1710
|
+
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; }
|
|
1711
|
+
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; }
|
|
1709
1712
|
var _default$7 = /*#__PURE__*/function () {
|
|
1710
1713
|
function _default(root) {
|
|
1711
1714
|
_classCallCheck(this, _default);
|
|
@@ -1741,7 +1744,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1741
1744
|
var _i$permission;
|
|
1742
1745
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
1743
1746
|
});
|
|
1744
|
-
config = _objectSpread$
|
|
1747
|
+
config = _objectSpread$J(_objectSpread$J({}, config), {}, {
|
|
1745
1748
|
items: filteredItems
|
|
1746
1749
|
});
|
|
1747
1750
|
}
|
|
@@ -3140,7 +3143,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3140
3143
|
}
|
|
3141
3144
|
},
|
|
3142
3145
|
ContentItems: {
|
|
3143
|
-
title: t('backoffice.table.
|
|
3146
|
+
title: t('backoffice.table.contentitems.title'),
|
|
3144
3147
|
type: 'Table',
|
|
3145
3148
|
canRefresh: true,
|
|
3146
3149
|
copyAction: {
|
|
@@ -3166,9 +3169,17 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3166
3169
|
createAction: {
|
|
3167
3170
|
actionType: 'Detail',
|
|
3168
3171
|
type: 'JsonEditor',
|
|
3169
|
-
id: '
|
|
3172
|
+
id: 'JsonEditorCreateContentItem',
|
|
3170
3173
|
title: t('backoffice.table.contentItem.label.create'),
|
|
3171
|
-
label: t('backoffice.table.contentItem.label.create')
|
|
3174
|
+
label: t('backoffice.table.contentItem.label.create'),
|
|
3175
|
+
permission: 'backoffice_create_contentitem_template'
|
|
3176
|
+
},
|
|
3177
|
+
deleteAction: {
|
|
3178
|
+
disabled: function disabled(datas) {
|
|
3179
|
+
return (datas === null || datas === void 0 ? void 0 : datas.find(function (d) {
|
|
3180
|
+
return !d.organizationId;
|
|
3181
|
+
})) && !root.actions.userHasPermission('backoffice_delete_contentitem_template');
|
|
3182
|
+
}
|
|
3172
3183
|
},
|
|
3173
3184
|
columns: [{
|
|
3174
3185
|
title: t('backoffice.table.roles.columns.description'),
|
|
@@ -3184,6 +3195,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3184
3195
|
title: t('backoffice.table.medien.columns.title.organizationId'),
|
|
3185
3196
|
field: 'organizationId',
|
|
3186
3197
|
sorter: 1,
|
|
3198
|
+
defaultSortOrder: 'ascend',
|
|
3187
3199
|
filter: 'advanced',
|
|
3188
3200
|
width: 100
|
|
3189
3201
|
}, {
|
|
@@ -3195,9 +3207,19 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3195
3207
|
}],
|
|
3196
3208
|
rowAction: [{
|
|
3197
3209
|
actionType: 'Detail',
|
|
3210
|
+
disabled: function disabled(data) {
|
|
3211
|
+
return !(data !== null && data !== void 0 && data.organizationId) && !root.actions.userHasPermission('backoffice_edit_contentitem_template');
|
|
3212
|
+
},
|
|
3198
3213
|
type: 'Form',
|
|
3199
3214
|
id: 'FormEditContentItem',
|
|
3200
3215
|
title: t('backoffice.table.contentItem.edit')
|
|
3216
|
+
}, {
|
|
3217
|
+
actionType: 'Detail',
|
|
3218
|
+
permission: 'backoffice_edit_contentitem_template',
|
|
3219
|
+
type: 'JsonEditor',
|
|
3220
|
+
label: t('backoffice.table.contentItem.editjson'),
|
|
3221
|
+
id: 'JsonEditorEditContentItem',
|
|
3222
|
+
title: t('backoffice.table.contentItem.edit')
|
|
3201
3223
|
}],
|
|
3202
3224
|
apiInterface: {
|
|
3203
3225
|
read: {
|
|
@@ -6209,6 +6231,16 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
6209
6231
|
name: 'MetaValue'
|
|
6210
6232
|
}]
|
|
6211
6233
|
},
|
|
6234
|
+
JsonEditorCreateContentItem: {
|
|
6235
|
+
type: 'JsonEditor',
|
|
6236
|
+
apiInterface: {
|
|
6237
|
+
update: {
|
|
6238
|
+
url: '${catalogService}/contentItems',
|
|
6239
|
+
method: 'POST'
|
|
6240
|
+
},
|
|
6241
|
+
create: '${catalogService}/contentItems'
|
|
6242
|
+
}
|
|
6243
|
+
},
|
|
6212
6244
|
JsonEditorEditContentItem: {
|
|
6213
6245
|
type: 'JsonEditor',
|
|
6214
6246
|
apiInterface: {
|
|
@@ -7320,6 +7352,11 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7320
7352
|
FormEditContentItem: {
|
|
7321
7353
|
type: 'Form',
|
|
7322
7354
|
items: [],
|
|
7355
|
+
tools: [{
|
|
7356
|
+
id: 'WYSIWYG_ContentItem',
|
|
7357
|
+
name: 'ContentItem Preview',
|
|
7358
|
+
type: 'ContentItem'
|
|
7359
|
+
}],
|
|
7323
7360
|
itemsByData: function itemsByData(data, apiConfig) {
|
|
7324
7361
|
var result = [{
|
|
7325
7362
|
name: 'description',
|
|
@@ -11266,8 +11303,8 @@ function getIcon(icon) {
|
|
|
11266
11303
|
return undefined;
|
|
11267
11304
|
}
|
|
11268
11305
|
|
|
11269
|
-
function ownKeys$
|
|
11270
|
-
function _objectSpread$
|
|
11306
|
+
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; }
|
|
11307
|
+
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; }
|
|
11271
11308
|
var _default$6 = /*#__PURE__*/function () {
|
|
11272
11309
|
function _default(root) {
|
|
11273
11310
|
_classCallCheck(this, _default);
|
|
@@ -11279,6 +11316,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11279
11316
|
_defineProperty(this, "_menuElement2", void 0);
|
|
11280
11317
|
_defineProperty(this, "_additionalMenuElements", []);
|
|
11281
11318
|
_defineProperty(this, "_tools", []);
|
|
11319
|
+
_defineProperty(this, "_toolsLanguage", 'de');
|
|
11282
11320
|
_defineProperty(this, "_openedToolId", undefined);
|
|
11283
11321
|
_defineProperty(this, "_hideTools", true);
|
|
11284
11322
|
_defineProperty(this, "_toolLoading", new Map());
|
|
@@ -11290,6 +11328,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11290
11328
|
if (theme) {
|
|
11291
11329
|
this._theme = theme;
|
|
11292
11330
|
}
|
|
11331
|
+
this._toolsLanguage = root.i18n.language;
|
|
11293
11332
|
}
|
|
11294
11333
|
return _createClass(_default, [{
|
|
11295
11334
|
key: "initMenu",
|
|
@@ -11366,6 +11405,14 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11366
11405
|
set: function set(val) {
|
|
11367
11406
|
this._toolPinned = val;
|
|
11368
11407
|
}
|
|
11408
|
+
}, {
|
|
11409
|
+
key: "toolsLanguage",
|
|
11410
|
+
get: function get() {
|
|
11411
|
+
return this._toolsLanguage;
|
|
11412
|
+
},
|
|
11413
|
+
set: function set(lang) {
|
|
11414
|
+
this._toolsLanguage = lang;
|
|
11415
|
+
}
|
|
11369
11416
|
}, {
|
|
11370
11417
|
key: "isToolLoading",
|
|
11371
11418
|
get: function get() {
|
|
@@ -11389,7 +11436,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11389
11436
|
if (index >= 0) {
|
|
11390
11437
|
this._additionalMenuElements[index] = {
|
|
11391
11438
|
key: key,
|
|
11392
|
-
element: _objectSpread$
|
|
11439
|
+
element: _objectSpread$I(_objectSpread$I({}, this._additionalMenuElements[index].element), {}, {
|
|
11393
11440
|
items: items,
|
|
11394
11441
|
selected: selected
|
|
11395
11442
|
})
|
|
@@ -11432,13 +11479,15 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11432
11479
|
key: "updateSelectedMenuKeys",
|
|
11433
11480
|
value: function updateSelectedMenuKeys(key, element, skipFill) {
|
|
11434
11481
|
var _this$_menu$find,
|
|
11435
|
-
_this2 = this
|
|
11482
|
+
_this2 = this,
|
|
11483
|
+
_this$root$resetError,
|
|
11484
|
+
_this$root;
|
|
11436
11485
|
if (!skipFill) {
|
|
11437
11486
|
this._selectedMenuKeys = this.fillSelectedUntilFistLeaf(element.menu, this._selectedMenuKeys, element.pos, key);
|
|
11438
11487
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
11439
11488
|
this.root.navigate('/' + path);
|
|
11440
11489
|
}
|
|
11441
|
-
this._menuElement1 = _objectSpread$
|
|
11490
|
+
this._menuElement1 = _objectSpread$I(_objectSpread$I({}, this.menuElement1), {}, {
|
|
11442
11491
|
selected: this._selectedMenuKeys[0]
|
|
11443
11492
|
});
|
|
11444
11493
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -11465,6 +11514,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11465
11514
|
this._additionalMenuElements = [];
|
|
11466
11515
|
this.root.detailStore.closeLeftDetail();
|
|
11467
11516
|
this.root.detailStore.closeRightDetail();
|
|
11517
|
+
(_this$root$resetError = (_this$root = this.root).resetErrorBoundary) === null || _this$root$resetError === void 0 || _this$root$resetError.call(_this$root);
|
|
11468
11518
|
}
|
|
11469
11519
|
}, {
|
|
11470
11520
|
key: "onToggleOpenMenuElement",
|
|
@@ -11681,7 +11731,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11681
11731
|
return items.filter(function (item) {
|
|
11682
11732
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
11683
11733
|
}).map(function (item) {
|
|
11684
|
-
return _objectSpread$
|
|
11734
|
+
return _objectSpread$I(_objectSpread$I({}, item), {}, {
|
|
11685
11735
|
items: item.items ? _this4.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
11686
11736
|
subMenu: item.subMenu ? _this4.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
11687
11737
|
});
|
|
@@ -12748,13 +12798,13 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
12748
12798
|
}]);
|
|
12749
12799
|
}();
|
|
12750
12800
|
|
|
12751
|
-
function _callSuper$
|
|
12752
|
-
function _isNativeReflectConstruct$
|
|
12801
|
+
function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12802
|
+
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12753
12803
|
var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
12754
12804
|
function _default(configuration, rootStore) {
|
|
12755
12805
|
var _this;
|
|
12756
12806
|
_classCallCheck(this, _default);
|
|
12757
|
-
_this = _callSuper$
|
|
12807
|
+
_this = _callSuper$1(this, _default, [configuration, rootStore]);
|
|
12758
12808
|
_defineProperty(_this, "presetApiHandler", void 0);
|
|
12759
12809
|
_defineProperty(_this, "test", '');
|
|
12760
12810
|
_this.presetApiHandler = new _default$d({
|
|
@@ -12767,9 +12817,9 @@ var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
12767
12817
|
}(_default$d);
|
|
12768
12818
|
|
|
12769
12819
|
var _default$1 = /*#__PURE__*/function () {
|
|
12770
|
-
function _default(actions, handler,
|
|
12820
|
+
function _default(actions, handler, i18n, navigate, navigationState) {
|
|
12771
12821
|
_classCallCheck(this, _default);
|
|
12772
|
-
this.
|
|
12822
|
+
this.i18n = i18n;
|
|
12773
12823
|
this.navigate = navigate;
|
|
12774
12824
|
_defineProperty(this, "detailStore", void 0);
|
|
12775
12825
|
_defineProperty(this, "modalStore", void 0);
|
|
@@ -12779,10 +12829,11 @@ var _default$1 = /*#__PURE__*/function () {
|
|
|
12779
12829
|
_defineProperty(this, "downloadStore", void 0);
|
|
12780
12830
|
_defineProperty(this, "actions", void 0);
|
|
12781
12831
|
_defineProperty(this, "handler", void 0);
|
|
12782
|
-
_defineProperty(this, "error", void 0);
|
|
12783
12832
|
_defineProperty(this, "showSnow", void 0);
|
|
12784
12833
|
_defineProperty(this, "translationService", undefined);
|
|
12785
12834
|
_defineProperty(this, "navigationState", void 0);
|
|
12835
|
+
_defineProperty(this, "error", void 0);
|
|
12836
|
+
_defineProperty(this, "resetErrorBoundary", undefined);
|
|
12786
12837
|
this.actions = actions;
|
|
12787
12838
|
this.handler = handler;
|
|
12788
12839
|
this.navigationState = navigationState;
|
|
@@ -12808,6 +12859,16 @@ var _default$1 = /*#__PURE__*/function () {
|
|
|
12808
12859
|
value: function addError(error) {
|
|
12809
12860
|
this.error = error;
|
|
12810
12861
|
}
|
|
12862
|
+
}, {
|
|
12863
|
+
key: "t",
|
|
12864
|
+
get: function get() {
|
|
12865
|
+
return this.i18n.t;
|
|
12866
|
+
}
|
|
12867
|
+
}, {
|
|
12868
|
+
key: "setResetErrorBoundary",
|
|
12869
|
+
value: function setResetErrorBoundary(resetErrorBoundary) {
|
|
12870
|
+
this.resetErrorBoundary = resetErrorBoundary;
|
|
12871
|
+
}
|
|
12811
12872
|
}, {
|
|
12812
12873
|
key: "getGlobalValue",
|
|
12813
12874
|
value: function getGlobalValue(key) {
|
|
@@ -12888,7 +12949,7 @@ var StoreProvider = function StoreProvider(_ref) {
|
|
|
12888
12949
|
searchParams = _useSearchParams2[0];
|
|
12889
12950
|
var location = useLocation();
|
|
12890
12951
|
var navigate = useNavigate();
|
|
12891
|
-
var _useState = useState(new _default$1(actions, handler,
|
|
12952
|
+
var _useState = useState(new _default$1(actions, handler, i18n, navigate, {
|
|
12892
12953
|
searchParams: searchParams,
|
|
12893
12954
|
path: (_location$pathname = location.pathname) !== null && _location$pathname !== void 0 ? _location$pathname : '/'
|
|
12894
12955
|
})),
|
|
@@ -12945,8 +13006,8 @@ function removeEmpty(data) {
|
|
|
12945
13006
|
return undefined;
|
|
12946
13007
|
}
|
|
12947
13008
|
|
|
12948
|
-
function ownKeys$
|
|
12949
|
-
function _objectSpread$
|
|
13009
|
+
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; }
|
|
13010
|
+
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; }
|
|
12950
13011
|
function _createForOfIteratorHelper$j(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$j(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
12951
13012
|
function _unsupportedIterableToArray$j(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$j(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$j(r, a) : void 0; } }
|
|
12952
13013
|
function _arrayLikeToArray$j(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -13044,7 +13105,7 @@ function useFormData (_ref) {
|
|
|
13044
13105
|
multipleEditingData = inboundData;
|
|
13045
13106
|
}
|
|
13046
13107
|
return {
|
|
13047
|
-
loadedData: onLoadFields(_objectSpread$
|
|
13108
|
+
loadedData: onLoadFields(_objectSpread$H({}, dt)),
|
|
13048
13109
|
multipleEditingData: multipleEditingData
|
|
13049
13110
|
};
|
|
13050
13111
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -13081,7 +13142,7 @@ function useFormData (_ref) {
|
|
|
13081
13142
|
setFieldErrors = _useState14[1];
|
|
13082
13143
|
useEffect(function () {
|
|
13083
13144
|
var _loadedData$_id2;
|
|
13084
|
-
setState(_objectSpread$
|
|
13145
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13085
13146
|
data: loadedData,
|
|
13086
13147
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
13087
13148
|
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),
|
|
@@ -13176,7 +13237,7 @@ function useFormData (_ref) {
|
|
|
13176
13237
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
13177
13238
|
while (1) switch (_context2.prev = _context2.next) {
|
|
13178
13239
|
case 0:
|
|
13179
|
-
newData = merge$1(_objectSpread$
|
|
13240
|
+
newData = merge$1(_objectSpread$H({}, state.data), values);
|
|
13180
13241
|
if (!skipApi) {
|
|
13181
13242
|
_context2.next = 3;
|
|
13182
13243
|
break;
|
|
@@ -13184,12 +13245,12 @@ function useFormData (_ref) {
|
|
|
13184
13245
|
return _context2.abrupt("return", newData);
|
|
13185
13246
|
case 3:
|
|
13186
13247
|
_context2.next = 5;
|
|
13187
|
-
return setDynamicFields(_objectSpread$
|
|
13248
|
+
return setDynamicFields(_objectSpread$H({}, state.data), newData);
|
|
13188
13249
|
case 5:
|
|
13189
13250
|
newData = _context2.sent;
|
|
13190
|
-
newData = onSaveFields(_objectSpread$
|
|
13251
|
+
newData = onSaveFields(_objectSpread$H({}, state.data), newData);
|
|
13191
13252
|
newData = removeEmpty(newData);
|
|
13192
|
-
setState(_objectSpread$
|
|
13253
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13193
13254
|
loading: true
|
|
13194
13255
|
}));
|
|
13195
13256
|
finalData = state.data;
|
|
@@ -13238,13 +13299,13 @@ function useFormData (_ref) {
|
|
|
13238
13299
|
_context2.next = 37;
|
|
13239
13300
|
break;
|
|
13240
13301
|
}
|
|
13241
|
-
setFieldErrors(_objectSpread$
|
|
13302
|
+
setFieldErrors(_objectSpread$H(_objectSpread$H({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
13242
13303
|
return _context2.abrupt("return", undefined);
|
|
13243
13304
|
case 37:
|
|
13244
13305
|
throw _context2.t0;
|
|
13245
13306
|
case 38:
|
|
13246
13307
|
_context2.prev = 38;
|
|
13247
|
-
setState(_objectSpread$
|
|
13308
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13248
13309
|
data: finalData,
|
|
13249
13310
|
loading: false
|
|
13250
13311
|
}));
|
|
@@ -13274,7 +13335,7 @@ function useFormData (_ref) {
|
|
|
13274
13335
|
}
|
|
13275
13336
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
13276
13337
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
13277
|
-
var wholeData = Object.assign(_objectSpread$
|
|
13338
|
+
var wholeData = Object.assign(_objectSpread$H({}, state.data), _objectSpread$H({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
13278
13339
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
13279
13340
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
13280
13341
|
setHiddenRequiredDisabled(newState);
|
|
@@ -13287,18 +13348,41 @@ function useFormData (_ref) {
|
|
|
13287
13348
|
}
|
|
13288
13349
|
};
|
|
13289
13350
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
13290
|
-
var data = d !== null && d !== void 0 ? d :
|
|
13351
|
+
var data = d !== null && d !== void 0 ? d : deepMerge({}, state.data, state.form.getFieldsValue());
|
|
13291
13352
|
if (id) {
|
|
13292
13353
|
setFieldInObject(id, data, value);
|
|
13293
|
-
var newFieldErrors = _objectSpread$
|
|
13354
|
+
var newFieldErrors = _objectSpread$H({}, fieldErrors);
|
|
13294
13355
|
delete newFieldErrors[id.toString()];
|
|
13295
13356
|
setFieldErrors(newFieldErrors);
|
|
13296
13357
|
}
|
|
13297
|
-
setState(_objectSpread$
|
|
13358
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13298
13359
|
data: data
|
|
13299
13360
|
}));
|
|
13300
13361
|
return data;
|
|
13301
13362
|
};
|
|
13363
|
+
|
|
13364
|
+
// had to be progammed custom because we need to remove array entrys when they are missing in data2 and still are in data1
|
|
13365
|
+
function isObject(item) {
|
|
13366
|
+
return item && _typeof(item) === 'object' && !Array.isArray(item);
|
|
13367
|
+
}
|
|
13368
|
+
function deepMerge(target) {
|
|
13369
|
+
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key2 = 1; _key2 < _len; _key2++) {
|
|
13370
|
+
sources[_key2 - 1] = arguments[_key2];
|
|
13371
|
+
}
|
|
13372
|
+
if (!sources.length) return target;
|
|
13373
|
+
var source = sources.shift();
|
|
13374
|
+
if (isObject(target) && isObject(source)) {
|
|
13375
|
+
for (var _key3 in source) {
|
|
13376
|
+
if (isObject(source[_key3])) {
|
|
13377
|
+
if (!target[_key3]) Object.assign(target, _defineProperty({}, _key3, {}));
|
|
13378
|
+
deepMerge(target[_key3], source[_key3]);
|
|
13379
|
+
} else {
|
|
13380
|
+
Object.assign(target, _defineProperty({}, _key3, source[_key3]));
|
|
13381
|
+
}
|
|
13382
|
+
}
|
|
13383
|
+
}
|
|
13384
|
+
return deepMerge.apply(void 0, [target].concat(sources));
|
|
13385
|
+
}
|
|
13302
13386
|
var setNewData = function setNewData(newData, orig) {
|
|
13303
13387
|
if (usedPreset.used === true) {
|
|
13304
13388
|
var usdPreset = presets.data[usedPreset.index];
|
|
@@ -13320,12 +13404,12 @@ function useFormData (_ref) {
|
|
|
13320
13404
|
var _value$value;
|
|
13321
13405
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
13322
13406
|
if (configuration.itemSelectorReset) {
|
|
13323
|
-
setState(_objectSpread$
|
|
13407
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13324
13408
|
data: _defineProperty({}, name, val)
|
|
13325
13409
|
}));
|
|
13326
13410
|
} else {
|
|
13327
|
-
setState(_objectSpread$
|
|
13328
|
-
data: _objectSpread$
|
|
13411
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13412
|
+
data: _objectSpread$H(_objectSpread$H({}, state.data), {}, _defineProperty({}, name, val))
|
|
13329
13413
|
}));
|
|
13330
13414
|
}
|
|
13331
13415
|
setSelectedItemsIndex(idx);
|
|
@@ -13335,12 +13419,12 @@ function useFormData (_ref) {
|
|
|
13335
13419
|
var val = _ref6.value;
|
|
13336
13420
|
if (value === val) {
|
|
13337
13421
|
if (configuration.itemSelectorReset) {
|
|
13338
|
-
setState(_objectSpread$
|
|
13422
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13339
13423
|
data: _defineProperty({}, name, val)
|
|
13340
13424
|
}));
|
|
13341
13425
|
} else {
|
|
13342
|
-
setState(_objectSpread$
|
|
13343
|
-
data: _objectSpread$
|
|
13426
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13427
|
+
data: _objectSpread$H(_objectSpread$H({}, state.data), {}, _defineProperty({}, name, val))
|
|
13344
13428
|
}));
|
|
13345
13429
|
}
|
|
13346
13430
|
setSelectedItemsIndex(idx);
|
|
@@ -13483,7 +13567,30 @@ function useFormData (_ref) {
|
|
|
13483
13567
|
if (!hidden) hidden = (_state$hiddenRequired = state.hiddenRequiredDisabled) === null || _state$hiddenRequired === void 0 || (_state$hiddenRequired = _state$hiddenRequired[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired === void 0 ? void 0 : _state$hiddenRequired.hidden;
|
|
13484
13568
|
return hidden;
|
|
13485
13569
|
};
|
|
13486
|
-
|
|
13570
|
+
|
|
13571
|
+
//updating tools
|
|
13572
|
+
useEffect(function () {
|
|
13573
|
+
var _configuration$tools;
|
|
13574
|
+
if ((_configuration$tools = configuration.tools) !== null && _configuration$tools !== void 0 && _configuration$tools.length) {
|
|
13575
|
+
var tools = [];
|
|
13576
|
+
for (var i = 0; i < configuration.tools.length; i++) {
|
|
13577
|
+
var tool = configuration.tools[i];
|
|
13578
|
+
tools.push(_objectSpread$H({
|
|
13579
|
+
parameters: {
|
|
13580
|
+
data: state.data
|
|
13581
|
+
},
|
|
13582
|
+
startWidth: 600,
|
|
13583
|
+
offsetRight: 1037
|
|
13584
|
+
}, tool));
|
|
13585
|
+
}
|
|
13586
|
+
root.contentStore.tools = tools;
|
|
13587
|
+
return function () {
|
|
13588
|
+
root.contentStore.tools = [];
|
|
13589
|
+
};
|
|
13590
|
+
}
|
|
13591
|
+
return;
|
|
13592
|
+
}, [state.data]);
|
|
13593
|
+
return _objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13487
13594
|
getIsHidden: getIsHidden,
|
|
13488
13595
|
setUsedPreset: setUsedPreset,
|
|
13489
13596
|
configuration: configuration,
|
|
@@ -13595,8 +13702,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
13595
13702
|
});
|
|
13596
13703
|
};
|
|
13597
13704
|
|
|
13598
|
-
function ownKeys$
|
|
13599
|
-
function _objectSpread$
|
|
13705
|
+
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; }
|
|
13706
|
+
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; }
|
|
13600
13707
|
var FormList$2 = function FormList(_ref) {
|
|
13601
13708
|
var _item$initialValue;
|
|
13602
13709
|
var value = _ref.value,
|
|
@@ -13645,7 +13752,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
13645
13752
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
13646
13753
|
help: state.fieldErrors[n.toString()],
|
|
13647
13754
|
hidden: hidden,
|
|
13648
|
-
children: getElement(_objectSpread$
|
|
13755
|
+
children: getElement(_objectSpread$G(_objectSpread$G({}, i), {}, {
|
|
13649
13756
|
name: n
|
|
13650
13757
|
}), state.data, setCanSave, state, state.onInputChanged, onError, root, form, hidden)
|
|
13651
13758
|
}, idx);
|
|
@@ -13883,8 +13990,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
13883
13990
|
var css_248z$n = ".wrapper-GVe2h {\n display: flex;\n flex-direction: row;\n gap: 12px;\n}\n\n.button-group-GYt-T {\n display: flex;\n flex-direction: row;\n gap: 12px;\n margin: 0 12px;\n}\n";
|
|
13884
13991
|
styleInject(css_248z$n);
|
|
13885
13992
|
|
|
13886
|
-
function ownKeys$
|
|
13887
|
-
function _objectSpread$
|
|
13993
|
+
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; }
|
|
13994
|
+
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; }
|
|
13888
13995
|
var SubTitle = function SubTitle(_ref) {
|
|
13889
13996
|
var _item$orientation, _item$buttonIds;
|
|
13890
13997
|
var item = _ref.item,
|
|
@@ -13893,7 +14000,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
13893
14000
|
t = _useTranslation.t;
|
|
13894
14001
|
return /*#__PURE__*/jsx(Divider, {
|
|
13895
14002
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
13896
|
-
style: _objectSpread$
|
|
14003
|
+
style: _objectSpread$F({}, item.style),
|
|
13897
14004
|
children: /*#__PURE__*/jsxs("div", {
|
|
13898
14005
|
className: wrapper$5,
|
|
13899
14006
|
children: [Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name), ((_item$buttonIds = item.buttonIds) === null || _item$buttonIds === void 0 ? void 0 : _item$buttonIds.length) && item.buttonIds.map(function (b) {
|
|
@@ -14137,8 +14244,8 @@ var css_248z$m = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\
|
|
|
14137
14244
|
styleInject(css_248z$m);
|
|
14138
14245
|
|
|
14139
14246
|
var _excluded$3 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title"];
|
|
14140
|
-
function ownKeys$
|
|
14141
|
-
function _objectSpread$
|
|
14247
|
+
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; }
|
|
14248
|
+
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; }
|
|
14142
14249
|
var SelectWrapper$1 = function SelectWrapper(_ref) {
|
|
14143
14250
|
var apiInterface = _ref.apiInterface,
|
|
14144
14251
|
selectMapping = _ref.selectMapping,
|
|
@@ -14162,7 +14269,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref) {
|
|
|
14162
14269
|
});
|
|
14163
14270
|
return /*#__PURE__*/jsxs("div", {
|
|
14164
14271
|
className: classnames(title ? wrapper$4 : undefined),
|
|
14165
|
-
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$
|
|
14272
|
+
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$E(_objectSpread$E({}, selectProps), {}, {
|
|
14166
14273
|
showSearch: search,
|
|
14167
14274
|
loading: state.loading,
|
|
14168
14275
|
options: state.options,
|
|
@@ -14208,14 +14315,14 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
14208
14315
|
});
|
|
14209
14316
|
};
|
|
14210
14317
|
|
|
14211
|
-
function _callSuper
|
|
14212
|
-
function _isNativeReflectConstruct
|
|
14318
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
14319
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14213
14320
|
function _superPropGet(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }
|
|
14214
14321
|
var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
14215
14322
|
function _default(configuration, rootStore) {
|
|
14216
14323
|
var _this;
|
|
14217
14324
|
_classCallCheck(this, _default);
|
|
14218
|
-
_this = _callSuper
|
|
14325
|
+
_this = _callSuper(this, _default, [configuration, rootStore]);
|
|
14219
14326
|
_defineProperty(_this, "_accountSessionData", void 0);
|
|
14220
14327
|
_defineProperty(_this, "_api2Location", void 0);
|
|
14221
14328
|
_defineProperty(_this, "_sessionGuid", void 0);
|
|
@@ -14793,8 +14900,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
14793
14900
|
}]);
|
|
14794
14901
|
}(_default$d);
|
|
14795
14902
|
|
|
14796
|
-
function ownKeys$
|
|
14797
|
-
function _objectSpread$
|
|
14903
|
+
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; }
|
|
14904
|
+
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; }
|
|
14798
14905
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
14799
14906
|
function useSelectClientRelationCatalog (_ref) {
|
|
14800
14907
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -14963,7 +15070,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
14963
15070
|
case 22:
|
|
14964
15071
|
supplierData = _context2.sent;
|
|
14965
15072
|
case 23:
|
|
14966
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
15073
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$D(_objectSpread$D({}, _selectedSupplier), {}, {
|
|
14967
15074
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
14968
15075
|
}), supplierData);
|
|
14969
15076
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -15184,8 +15291,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
15184
15291
|
function _createForOfIteratorHelper$h(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$h(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
15185
15292
|
function _unsupportedIterableToArray$h(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$h(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$h(r, a) : void 0; } }
|
|
15186
15293
|
function _arrayLikeToArray$h(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15187
|
-
function ownKeys$
|
|
15188
|
-
function _objectSpread$
|
|
15294
|
+
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; }
|
|
15295
|
+
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; }
|
|
15189
15296
|
function useSelectData (_ref) {
|
|
15190
15297
|
var data = _ref.data,
|
|
15191
15298
|
onChange = _ref.onChange,
|
|
@@ -15298,7 +15405,7 @@ function useSelectData (_ref) {
|
|
|
15298
15405
|
if (initalValue == undefined) {
|
|
15299
15406
|
setInitValue(newData);
|
|
15300
15407
|
}
|
|
15301
|
-
var initData = isArray(newData) ? newData : [newData];
|
|
15408
|
+
var initData = Array.isArray(newData) ? newData : [newData];
|
|
15302
15409
|
var value = initData.map(function (d) {
|
|
15303
15410
|
var _d$data, _d$_id, _d$selectMapping$valu, _d$data2, _ref2, _d$value, _d$data3;
|
|
15304
15411
|
return {
|
|
@@ -15366,7 +15473,7 @@ function useSelectData (_ref) {
|
|
|
15366
15473
|
setFetching(true);
|
|
15367
15474
|
serverSideParams = {
|
|
15368
15475
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
15369
|
-
return _objectSpread$
|
|
15476
|
+
return _objectSpread$C(_objectSpread$C({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
15370
15477
|
}, {}) : {
|
|
15371
15478
|
_id: [value, 'contains']
|
|
15372
15479
|
},
|
|
@@ -15658,14 +15765,17 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
15658
15765
|
var css_248z$j = ".wrapper-WStAk {\n display: flex;\n flex-direction: column;\n}\n.header-wrapper-gWQuH {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-left: 64px;\n}\n\n.buttons-wrapper-7ebR9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n}\n";
|
|
15659
15766
|
styleInject(css_248z$j);
|
|
15660
15767
|
|
|
15661
|
-
function ownKeys$
|
|
15662
|
-
function _objectSpread$
|
|
15768
|
+
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; }
|
|
15769
|
+
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; }
|
|
15663
15770
|
var LOG$8 = getLogger('Backoffice', 'Translation Form');
|
|
15664
15771
|
function useTranslationHook (item, state) {
|
|
15665
15772
|
var root = useStore();
|
|
15666
15773
|
var _useDivaCore = useDivaCore(),
|
|
15667
15774
|
toggleLoading = _useDivaCore.actions.toggleLoading;
|
|
15668
|
-
var
|
|
15775
|
+
var _useTranslation = useTranslation(),
|
|
15776
|
+
t = _useTranslation.t,
|
|
15777
|
+
i18n = _useTranslation.i18n;
|
|
15778
|
+
var _useState = useState(i18n.language),
|
|
15669
15779
|
_useState2 = _slicedToArray(_useState, 2),
|
|
15670
15780
|
currentLang = _useState2[0],
|
|
15671
15781
|
setCurrentLang = _useState2[1];
|
|
@@ -15678,111 +15788,109 @@ function useTranslationHook (item, state) {
|
|
|
15678
15788
|
};
|
|
15679
15789
|
}, [item]),
|
|
15680
15790
|
apiHandler = _useMemo.apiHandler;
|
|
15681
|
-
var
|
|
15682
|
-
|
|
15683
|
-
|
|
15684
|
-
|
|
15685
|
-
|
|
15686
|
-
|
|
15687
|
-
}
|
|
15688
|
-
label: 'Französisch',
|
|
15689
|
-
value: 'fr'
|
|
15690
|
-
}, {
|
|
15691
|
-
label: 'Englisch',
|
|
15692
|
-
value: 'en'
|
|
15693
|
-
}];
|
|
15791
|
+
var langs = ['de', 'it', 'fr', 'en'];
|
|
15792
|
+
var options = langs.map(function (l) {
|
|
15793
|
+
return {
|
|
15794
|
+
value: l,
|
|
15795
|
+
label: t('backoffice.form.applicationtranslationedit.items.' + l)
|
|
15796
|
+
};
|
|
15797
|
+
});
|
|
15694
15798
|
var autoTranslate = /*#__PURE__*/function () {
|
|
15695
15799
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
15696
|
-
var itemsToTranslate,
|
|
15800
|
+
var itemsToTranslate, i, _itemsToTranslate$i, name, value, translation, lang;
|
|
15697
15801
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
15698
15802
|
while (1) switch (_context.prev = _context.next) {
|
|
15699
15803
|
case 0:
|
|
15700
15804
|
toggleLoading('TRANSLATION');
|
|
15701
15805
|
state.onInputChanged();
|
|
15702
|
-
itemsToTranslate =
|
|
15703
|
-
_getToTranslateItems = function getToTranslateItems(items) {
|
|
15704
|
-
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : state.data;
|
|
15705
|
-
var namePrefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
15706
|
-
for (var i = 0; i < items.length; i++) {
|
|
15707
|
-
var im = items[i];
|
|
15708
|
-
var itemNameAsArray = Array.isArray(im.name) ? im.name : [im.name];
|
|
15709
|
-
if (im.doTranslate) {
|
|
15710
|
-
itemsToTranslate.push({
|
|
15711
|
-
name: [].concat(_toConsumableArray(namePrefix), _toConsumableArray(itemNameAsArray)),
|
|
15712
|
-
value: state.getData([].concat(_toConsumableArray(itemNameAsArray), [currentLang]), data)
|
|
15713
|
-
});
|
|
15714
|
-
}
|
|
15715
|
-
if (im.type == 'array') {
|
|
15716
|
-
var arrayData = state.getData(im.name, state.data);
|
|
15717
|
-
for (var j = 0; j < arrayData.length; j++) {
|
|
15718
|
-
var d = arrayData[j];
|
|
15719
|
-
_getToTranslateItems(im.items, d, [].concat(_toConsumableArray(itemNameAsArray), [j]));
|
|
15720
|
-
}
|
|
15721
|
-
}
|
|
15722
|
-
}
|
|
15723
|
-
};
|
|
15724
|
-
_getToTranslateItems(item.items);
|
|
15806
|
+
itemsToTranslate = getItemsToTranslate(currentLang);
|
|
15725
15807
|
i = 0;
|
|
15726
|
-
case
|
|
15808
|
+
case 4:
|
|
15727
15809
|
if (!(i < itemsToTranslate.length)) {
|
|
15728
|
-
_context.next =
|
|
15810
|
+
_context.next = 29;
|
|
15729
15811
|
break;
|
|
15730
15812
|
}
|
|
15731
15813
|
_itemsToTranslate$i = itemsToTranslate[i], name = _itemsToTranslate$i.name, value = _itemsToTranslate$i.value;
|
|
15732
15814
|
if (!(value === undefined || isValidURL(value))) {
|
|
15733
|
-
_context.next =
|
|
15815
|
+
_context.next = 8;
|
|
15734
15816
|
break;
|
|
15735
15817
|
}
|
|
15736
|
-
return _context.abrupt("continue",
|
|
15737
|
-
case
|
|
15818
|
+
return _context.abrupt("continue", 26);
|
|
15819
|
+
case 8:
|
|
15738
15820
|
translation = void 0;
|
|
15739
|
-
_context.prev =
|
|
15740
|
-
_context.next =
|
|
15821
|
+
_context.prev = 9;
|
|
15822
|
+
_context.next = 12;
|
|
15741
15823
|
return getTranslation(currentLang, value);
|
|
15742
|
-
case
|
|
15824
|
+
case 12:
|
|
15743
15825
|
translation = _context.sent;
|
|
15744
15826
|
_context.t0 = _regeneratorRuntime.keys(translation);
|
|
15745
|
-
case
|
|
15827
|
+
case 14:
|
|
15746
15828
|
if ((_context.t1 = _context.t0()).done) {
|
|
15747
|
-
_context.next =
|
|
15829
|
+
_context.next = 21;
|
|
15748
15830
|
break;
|
|
15749
15831
|
}
|
|
15750
15832
|
lang = _context.t1.value;
|
|
15751
15833
|
if (!(lang == currentLang)) {
|
|
15752
|
-
_context.next =
|
|
15834
|
+
_context.next = 18;
|
|
15753
15835
|
break;
|
|
15754
15836
|
}
|
|
15755
|
-
return _context.abrupt("continue",
|
|
15756
|
-
case
|
|
15837
|
+
return _context.abrupt("continue", 14);
|
|
15838
|
+
case 18:
|
|
15757
15839
|
state.onInputChanged([].concat(_toConsumableArray(name), [lang]), translation[lang]);
|
|
15758
|
-
_context.next =
|
|
15840
|
+
_context.next = 14;
|
|
15759
15841
|
break;
|
|
15760
|
-
case
|
|
15761
|
-
_context.next =
|
|
15842
|
+
case 21:
|
|
15843
|
+
_context.next = 26;
|
|
15762
15844
|
break;
|
|
15763
|
-
case
|
|
15764
|
-
_context.prev =
|
|
15765
|
-
_context.t2 = _context["catch"](
|
|
15845
|
+
case 23:
|
|
15846
|
+
_context.prev = 23;
|
|
15847
|
+
_context.t2 = _context["catch"](9);
|
|
15766
15848
|
LOG$8.error({
|
|
15767
15849
|
message: 'Error on translating ' + value,
|
|
15768
15850
|
name: ''
|
|
15769
15851
|
});
|
|
15770
|
-
case
|
|
15852
|
+
case 26:
|
|
15771
15853
|
i++;
|
|
15772
|
-
_context.next =
|
|
15854
|
+
_context.next = 4;
|
|
15773
15855
|
break;
|
|
15774
|
-
case
|
|
15856
|
+
case 29:
|
|
15775
15857
|
toggleLoading('TRANSLATION');
|
|
15776
|
-
case
|
|
15858
|
+
case 30:
|
|
15777
15859
|
case "end":
|
|
15778
15860
|
return _context.stop();
|
|
15779
15861
|
}
|
|
15780
|
-
}, _callee, null, [[
|
|
15862
|
+
}, _callee, null, [[9, 23]]);
|
|
15781
15863
|
}));
|
|
15782
15864
|
return function autoTranslate() {
|
|
15783
15865
|
return _ref.apply(this, arguments);
|
|
15784
15866
|
};
|
|
15785
15867
|
}();
|
|
15868
|
+
var getItemsToTranslate = function getItemsToTranslate(lang) {
|
|
15869
|
+
var itemsToTranslate = [];
|
|
15870
|
+
var _getToTranslateItems = function getToTranslateItems(items) {
|
|
15871
|
+
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : state.data;
|
|
15872
|
+
var namePrefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
15873
|
+
for (var i = 0; i < items.length; i++) {
|
|
15874
|
+
var im = items[i];
|
|
15875
|
+
var itemNameAsArray = Array.isArray(im.name) ? im.name : [im.name];
|
|
15876
|
+
if (im.doTranslate) {
|
|
15877
|
+
itemsToTranslate.push({
|
|
15878
|
+
name: [].concat(_toConsumableArray(namePrefix), _toConsumableArray(itemNameAsArray)),
|
|
15879
|
+
value: state.getData([].concat(_toConsumableArray(itemNameAsArray), _toConsumableArray(lang ? [lang] : [])), data)
|
|
15880
|
+
});
|
|
15881
|
+
}
|
|
15882
|
+
if (im.type == 'array') {
|
|
15883
|
+
var arrayData = state.getData(im.name, state.data);
|
|
15884
|
+
for (var j = 0; j < arrayData.length; j++) {
|
|
15885
|
+
var d = arrayData[j];
|
|
15886
|
+
_getToTranslateItems(im.items, d, [].concat(_toConsumableArray(itemNameAsArray), [j]));
|
|
15887
|
+
}
|
|
15888
|
+
}
|
|
15889
|
+
}
|
|
15890
|
+
};
|
|
15891
|
+
_getToTranslateItems(item.items);
|
|
15892
|
+
return itemsToTranslate;
|
|
15893
|
+
};
|
|
15786
15894
|
var getTranslation = /*#__PURE__*/function () {
|
|
15787
15895
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(lang, value) {
|
|
15788
15896
|
var result;
|
|
@@ -15791,7 +15899,7 @@ function useTranslationHook (item, state) {
|
|
|
15791
15899
|
case 0:
|
|
15792
15900
|
_context2.next = 2;
|
|
15793
15901
|
return apiHandler.create({
|
|
15794
|
-
locales: _objectSpread$
|
|
15902
|
+
locales: _objectSpread$B({
|
|
15795
15903
|
de: {},
|
|
15796
15904
|
it: {},
|
|
15797
15905
|
fr: {},
|
|
@@ -15829,6 +15937,7 @@ function useTranslationHook (item, state) {
|
|
|
15829
15937
|
};
|
|
15830
15938
|
var onChange = function onChange(value) {
|
|
15831
15939
|
state.onInputChanged();
|
|
15940
|
+
root.contentStore.toolsLanguage = value;
|
|
15832
15941
|
setCurrentLang(value);
|
|
15833
15942
|
};
|
|
15834
15943
|
return {
|
|
@@ -15839,8 +15948,8 @@ function useTranslationHook (item, state) {
|
|
|
15839
15948
|
};
|
|
15840
15949
|
}
|
|
15841
15950
|
|
|
15842
|
-
function ownKeys$
|
|
15843
|
-
function _objectSpread$
|
|
15951
|
+
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; }
|
|
15952
|
+
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; }
|
|
15844
15953
|
var Translation = function Translation(_ref) {
|
|
15845
15954
|
var item = _ref.item,
|
|
15846
15955
|
state = _ref.state,
|
|
@@ -15888,7 +15997,7 @@ var Translation = function Translation(_ref) {
|
|
|
15888
15997
|
var hidden = state.getIsHidden(i, data);
|
|
15889
15998
|
return /*#__PURE__*/jsx(Fragment, {
|
|
15890
15999
|
children: ['subTitle', 'array'].includes(i.type) ? /*#__PURE__*/jsx(Fragment, {
|
|
15891
|
-
children: getElement(_objectSpread$
|
|
16000
|
+
children: getElement(_objectSpread$A(_objectSpread$A({}, i), {}, {
|
|
15892
16001
|
name: n
|
|
15893
16002
|
}), state.data, setCanSave, state, state.onInputChanged, onError, root, form, hidden, currentLang)
|
|
15894
16003
|
}) : /*#__PURE__*/jsx(Form$1.Item, {
|
|
@@ -15902,7 +16011,7 @@ var Translation = function Translation(_ref) {
|
|
|
15902
16011
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
15903
16012
|
help: state.fieldErrors[n.toString()],
|
|
15904
16013
|
hidden: hidden,
|
|
15905
|
-
children: getElement(_objectSpread$
|
|
16014
|
+
children: getElement(_objectSpread$A(_objectSpread$A({}, i), {}, {
|
|
15906
16015
|
name: n
|
|
15907
16016
|
}), state.data, setCanSave, state, state.onInputChanged, onError, root, form, hidden)
|
|
15908
16017
|
}, idx)
|
|
@@ -15918,8 +16027,8 @@ var Translation$1 = observer(Translation, {
|
|
|
15918
16027
|
function _createForOfIteratorHelper$g(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$g(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
15919
16028
|
function _unsupportedIterableToArray$g(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$g(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$g(r, a) : void 0; } }
|
|
15920
16029
|
function _arrayLikeToArray$g(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15921
|
-
function ownKeys$
|
|
15922
|
-
function _objectSpread$
|
|
16030
|
+
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; }
|
|
16031
|
+
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; }
|
|
15923
16032
|
function getElement(item, data, setCanSave, state, _onChange, _onError, root, form, hidden, postFixName) {
|
|
15924
16033
|
var _isReadonly, _state$hiddenRequired;
|
|
15925
16034
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -15953,7 +16062,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
15953
16062
|
}
|
|
15954
16063
|
});
|
|
15955
16064
|
case 'selectSimple':
|
|
15956
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
16065
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$z(_objectSpread$z({}, item), {}, {
|
|
15957
16066
|
disabled: disabled,
|
|
15958
16067
|
onChange: function onChange(value) {
|
|
15959
16068
|
_onChange(name, value);
|
|
@@ -15996,7 +16105,10 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
15996
16105
|
addonAfter: item.suffix,
|
|
15997
16106
|
disabled: disabled,
|
|
15998
16107
|
value: item.value,
|
|
15999
|
-
placeholder: item.placeholder
|
|
16108
|
+
placeholder: item.placeholder,
|
|
16109
|
+
onBlur: function onBlur() {
|
|
16110
|
+
return state.onInputChanged();
|
|
16111
|
+
}
|
|
16000
16112
|
});
|
|
16001
16113
|
case 'detailaction':
|
|
16002
16114
|
return /*#__PURE__*/jsx(Button, {
|
|
@@ -16140,7 +16252,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
16140
16252
|
value: item.value,
|
|
16141
16253
|
options: item.options.map(function (o) {
|
|
16142
16254
|
var _o$disabled;
|
|
16143
|
-
return _objectSpread$
|
|
16255
|
+
return _objectSpread$z(_objectSpread$z({}, o), {}, {
|
|
16144
16256
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, data)
|
|
16145
16257
|
});
|
|
16146
16258
|
}),
|
|
@@ -16162,7 +16274,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
16162
16274
|
},
|
|
16163
16275
|
icon: item.icon,
|
|
16164
16276
|
callback: function callback(data) {
|
|
16165
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
16277
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$z(_objectSpread$z({}, state.data), data));
|
|
16166
16278
|
}
|
|
16167
16279
|
});
|
|
16168
16280
|
default:
|
|
@@ -16172,7 +16284,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
16172
16284
|
function DisplayInput(props) {
|
|
16173
16285
|
var _useTranslation = useTranslation(),
|
|
16174
16286
|
t = _useTranslation.t;
|
|
16175
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
16287
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$z(_objectSpread$z({}, props), {}, {
|
|
16176
16288
|
disabled: true,
|
|
16177
16289
|
value: t(props.translationPrefix + '.' + props.value)
|
|
16178
16290
|
}));
|
|
@@ -16190,8 +16302,8 @@ function isReadonly(item, data) {
|
|
|
16190
16302
|
return false;
|
|
16191
16303
|
}
|
|
16192
16304
|
|
|
16193
|
-
function ownKeys$
|
|
16194
|
-
function _objectSpread$
|
|
16305
|
+
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; }
|
|
16306
|
+
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; }
|
|
16195
16307
|
function _createForOfIteratorHelper$f(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$f(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
16196
16308
|
function _unsupportedIterableToArray$f(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$f(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$f(r, a) : void 0; } }
|
|
16197
16309
|
function _arrayLikeToArray$f(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -16241,13 +16353,13 @@ var Presets = function Presets(_ref) {
|
|
|
16241
16353
|
} finally {
|
|
16242
16354
|
_iterator.f();
|
|
16243
16355
|
}
|
|
16244
|
-
var data = _objectSpread$
|
|
16356
|
+
var data = _objectSpread$y(_objectSpread$y({}, form.getFieldsValue(names)), {}, {
|
|
16245
16357
|
newPresetName: newPresetName
|
|
16246
16358
|
});
|
|
16247
16359
|
data.dpi = parseInt(data.dpi);
|
|
16248
16360
|
data.organization = root.getGlobalValue('organizationId');
|
|
16249
16361
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
16250
|
-
var dt = _objectSpread$
|
|
16362
|
+
var dt = _objectSpread$y(_objectSpread$y({}, form.getFieldsValue(names)), {}, {
|
|
16251
16363
|
name: newPresetName
|
|
16252
16364
|
});
|
|
16253
16365
|
setPresets({
|
|
@@ -16568,8 +16680,8 @@ var Form = observer(FormWrapper$1, {
|
|
|
16568
16680
|
forwardRef: true
|
|
16569
16681
|
});
|
|
16570
16682
|
|
|
16571
|
-
function ownKeys$
|
|
16572
|
-
function _objectSpread$
|
|
16683
|
+
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; }
|
|
16684
|
+
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; }
|
|
16573
16685
|
function _createForOfIteratorHelper$e(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$e(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
16574
16686
|
function _unsupportedIterableToArray$e(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$e(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$e(r, a) : void 0; } }
|
|
16575
16687
|
function _arrayLikeToArray$e(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -16771,7 +16883,7 @@ function useRoleSelectorData (_ref) {
|
|
|
16771
16883
|
roles.forEach(function (r) {
|
|
16772
16884
|
//check if after the changes the role is selected
|
|
16773
16885
|
if (value.includes(r._id)) {
|
|
16774
|
-
var newValue = _objectSpread$
|
|
16886
|
+
var newValue = _objectSpread$x(_objectSpread$x({}, r), {}, {
|
|
16775
16887
|
selected: true
|
|
16776
16888
|
});
|
|
16777
16889
|
//add it to the new list as selected role
|
|
@@ -16807,7 +16919,7 @@ function useRoleSelectorData (_ref) {
|
|
|
16807
16919
|
}
|
|
16808
16920
|
}
|
|
16809
16921
|
} else {
|
|
16810
|
-
var _newValue = _objectSpread$
|
|
16922
|
+
var _newValue = _objectSpread$x(_objectSpread$x({}, r), {}, {
|
|
16811
16923
|
selected: false
|
|
16812
16924
|
});
|
|
16813
16925
|
//add it to the new list as unselected role
|
|
@@ -17011,7 +17123,7 @@ function _updateRoles() {
|
|
|
17011
17123
|
userRole = userRoles.find(function (r) {
|
|
17012
17124
|
return r._id == role._id;
|
|
17013
17125
|
});
|
|
17014
|
-
newRole = _objectSpread$
|
|
17126
|
+
newRole = _objectSpread$x({}, role);
|
|
17015
17127
|
if (userRole) {
|
|
17016
17128
|
newRole.selected = true;
|
|
17017
17129
|
newRole.inherited = userRole.inherited;
|
|
@@ -17231,7 +17343,7 @@ function _fetchOptions() {
|
|
|
17231
17343
|
case 4:
|
|
17232
17344
|
result = _context11.sent;
|
|
17233
17345
|
options = result.data.map(function (d) {
|
|
17234
|
-
return _objectSpread$
|
|
17346
|
+
return _objectSpread$x(_objectSpread$x({}, d), {}, {
|
|
17235
17347
|
label: d.displayName,
|
|
17236
17348
|
value: d._id,
|
|
17237
17349
|
isLeaf: !d.hasChildren
|
|
@@ -17335,8 +17447,8 @@ var parent = "parent-NZJ3S";
|
|
|
17335
17447
|
var css_248z$i = ".permission-Button-XctsZ {\n position: relative;\n top: 25px;\n left: -30px;\n float: right;\n height: 20px;\n z-index: 1000;\n}\n.select-lzft- {\n width: 100%;\n}\n.loadingOption-qCkRw {\n margin-top: 11px;\n padding-left: 500px;\n}\n.scroller-lrdk9 {\n overflow: auto;\n height: 100%;\n}\n\n.skeleton--xCI0 {\n padding-left: 25px;\n padding-bottom: 10px;\n}\n.filterField-1kU1O {\n display: flex;\n gap: 10px;\n}\n.filterField-1kU1O button {\n height: 32px;\n}\n.filterField-1kU1O div {\n height: 32px;\n}\n\n.parent-scroll-GmaL9 {\n overflow: auto;\n padding: 24px;\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.parent-NZJ3S {\n overflow: auto;\n padding: 24px;\n height: 100%;\n}\n\n.parent-scroll-GmaL9 .ant-spin-container {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component__outerdiv {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component {\n height: 100% !important;\n}\n";
|
|
17336
17448
|
styleInject(css_248z$i);
|
|
17337
17449
|
|
|
17338
|
-
function ownKeys$
|
|
17339
|
-
function _objectSpread$
|
|
17450
|
+
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; }
|
|
17451
|
+
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; }
|
|
17340
17452
|
function _createForOfIteratorHelper$d(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$d(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
17341
17453
|
function _unsupportedIterableToArray$d(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$d(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$d(r, a) : void 0; } }
|
|
17342
17454
|
function _arrayLikeToArray$d(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -17396,8 +17508,8 @@ function _generateCSV() {
|
|
|
17396
17508
|
break;
|
|
17397
17509
|
}
|
|
17398
17510
|
_context2.next = 21;
|
|
17399
|
-
return generateCSV(_objectSpread$
|
|
17400
|
-
mappingData: _objectSpread$
|
|
17511
|
+
return generateCSV(_objectSpread$w(_objectSpread$w({}, exportParams.children), {}, {
|
|
17512
|
+
mappingData: _objectSpread$w(_objectSpread$w({}, parent), {}, {
|
|
17401
17513
|
parentId: exportParams.mappingData._id
|
|
17402
17514
|
})
|
|
17403
17515
|
}), csvData);
|
|
@@ -17459,8 +17571,8 @@ var generateCSVData = /*#__PURE__*/function () {
|
|
|
17459
17571
|
};
|
|
17460
17572
|
}();
|
|
17461
17573
|
|
|
17462
|
-
function ownKeys$
|
|
17463
|
-
function _objectSpread$
|
|
17574
|
+
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; }
|
|
17575
|
+
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; }
|
|
17464
17576
|
function _createForOfIteratorHelper$c(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$c(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
17465
17577
|
function _unsupportedIterableToArray$c(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$c(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$c(r, a) : void 0; } }
|
|
17466
17578
|
function _arrayLikeToArray$c(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -17879,7 +17991,7 @@ function useRelationSelectorData (_ref) {
|
|
|
17879
17991
|
var activeItem = _step.value;
|
|
17880
17992
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
17881
17993
|
addedObjects.push(addedData);
|
|
17882
|
-
getSplittedItems(_objectSpread$
|
|
17994
|
+
getSplittedItems(_objectSpread$v(_objectSpread$v({}, activeItem), {}, {
|
|
17883
17995
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
17884
17996
|
}));
|
|
17885
17997
|
ret = true;
|
|
@@ -18084,8 +18196,8 @@ function useRelationSelectorData (_ref) {
|
|
|
18084
18196
|
};
|
|
18085
18197
|
}
|
|
18086
18198
|
|
|
18087
|
-
function ownKeys$
|
|
18088
|
-
function _objectSpread$
|
|
18199
|
+
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; }
|
|
18200
|
+
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; }
|
|
18089
18201
|
function _createForOfIteratorHelper$b(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$b(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
18090
18202
|
function _unsupportedIterableToArray$b(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$b(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$b(r, a) : void 0; } }
|
|
18091
18203
|
function _arrayLikeToArray$b(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -18218,7 +18330,7 @@ function ActionButton (_ref) {
|
|
|
18218
18330
|
_iterator2.f();
|
|
18219
18331
|
}
|
|
18220
18332
|
_context.next = 19;
|
|
18221
|
-
return apiInterface.update(_objectSpread$
|
|
18333
|
+
return apiInterface.update(_objectSpread$u(_objectSpread$u({}, data), {}, {
|
|
18222
18334
|
state: toSwitch
|
|
18223
18335
|
}), data);
|
|
18224
18336
|
case 19:
|
|
@@ -18375,14 +18487,14 @@ function _simpleChangeValue() {
|
|
|
18375
18487
|
break;
|
|
18376
18488
|
}
|
|
18377
18489
|
for (i = 0; i < action.newValues.length; i++) {
|
|
18378
|
-
fieldsToUpdate = _objectSpread$
|
|
18490
|
+
fieldsToUpdate = _objectSpread$u(_objectSpread$u({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
18379
18491
|
}
|
|
18380
18492
|
if (!apiInterface.canUpdate) {
|
|
18381
18493
|
_context2.next = 9;
|
|
18382
18494
|
break;
|
|
18383
18495
|
}
|
|
18384
18496
|
_context2.next = 7;
|
|
18385
|
-
return apiInterface.update(_objectSpread$
|
|
18497
|
+
return apiInterface.update(_objectSpread$u({}, fieldsToUpdate), data);
|
|
18386
18498
|
case 7:
|
|
18387
18499
|
response = _context2.sent;
|
|
18388
18500
|
return _context2.abrupt("return", response);
|
|
@@ -18397,7 +18509,7 @@ function _simpleChangeValue() {
|
|
|
18397
18509
|
return _simpleChangeValue.apply(this, arguments);
|
|
18398
18510
|
}
|
|
18399
18511
|
function A(props) {
|
|
18400
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
18512
|
+
return /*#__PURE__*/jsx("a", _objectSpread$u({}, props));
|
|
18401
18513
|
}
|
|
18402
18514
|
|
|
18403
18515
|
function _createForOfIteratorHelper$a(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$a(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -18535,8 +18647,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
18535
18647
|
var css_248z$h = ".diva-component-DIVA_BACKOFFICE_NEW .title-cl-ZAj2y {\n color: black;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .description-m3mNY {\n color: grey;\n flex: 1 1 100%;\n margin-left: 25px;\n margin-top: -25px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-group-xWnj- {\n /* border-bottom: 1px solid black; */\n margin-bottom: 40px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .delete-item-otdSr {\n cursor: pointer;\n position: relative;\n float: right;\n top: 13px;\n margin-right: 20px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .newscroller-INKeD {\n overflow: auto;\n height: 400px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-collapse-header--6FgU div {\n flex-wrap: wrap !important;\n}\n.diva-component-DIVA_BACKOFFICE_NEW a .item-title--BTvC {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.85);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-desc-DBiiF {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.45);\n}\n";
|
|
18536
18648
|
styleInject(css_248z$h);
|
|
18537
18649
|
|
|
18538
|
-
function ownKeys$
|
|
18539
|
-
function _objectSpread$
|
|
18650
|
+
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; }
|
|
18651
|
+
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; }
|
|
18540
18652
|
var DropDown = function DropDown(_ref) {
|
|
18541
18653
|
var _curItem$data$length;
|
|
18542
18654
|
var split = _ref.split,
|
|
@@ -18568,7 +18680,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
18568
18680
|
});
|
|
18569
18681
|
return /*#__PURE__*/jsx(Collapse, {
|
|
18570
18682
|
onChange: function onChange() {
|
|
18571
|
-
return getSplittedItems(_objectSpread$
|
|
18683
|
+
return getSplittedItems(_objectSpread$t(_objectSpread$t({}, item.item), {}, {
|
|
18572
18684
|
parentId: item.parentId
|
|
18573
18685
|
}), 0);
|
|
18574
18686
|
},
|
|
@@ -18828,8 +18940,8 @@ var RelationSelector$1 = observer(RelationSelector, {
|
|
|
18828
18940
|
forwardRef: true
|
|
18829
18941
|
});
|
|
18830
18942
|
|
|
18831
|
-
function ownKeys$
|
|
18832
|
-
function _objectSpread$
|
|
18943
|
+
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; }
|
|
18944
|
+
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; }
|
|
18833
18945
|
function useFormListData (_ref) {
|
|
18834
18946
|
var _configuration$defaul;
|
|
18835
18947
|
var id = _ref.id,
|
|
@@ -18909,7 +19021,7 @@ function useFormListData (_ref) {
|
|
|
18909
19021
|
if (updated.length == state.length) {
|
|
18910
19022
|
newState = state.map(function (s, i) {
|
|
18911
19023
|
var _updated$find;
|
|
18912
|
-
return _objectSpread$
|
|
19024
|
+
return _objectSpread$s(_objectSpread$s({}, s), {}, {
|
|
18913
19025
|
data: (_updated$find = updated.find(function (u) {
|
|
18914
19026
|
return u.index == i;
|
|
18915
19027
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -19048,8 +19160,8 @@ var FormList$1 = observer(FormList, {
|
|
|
19048
19160
|
forwardRef: true
|
|
19049
19161
|
});
|
|
19050
19162
|
|
|
19051
|
-
function ownKeys$
|
|
19052
|
-
function _objectSpread$
|
|
19163
|
+
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; }
|
|
19164
|
+
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; }
|
|
19053
19165
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
19054
19166
|
function useSelectOrCreateData (_ref) {
|
|
19055
19167
|
var id = _ref.id,
|
|
@@ -19146,7 +19258,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
19146
19258
|
_context.next = 7;
|
|
19147
19259
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
19148
19260
|
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) {
|
|
19149
|
-
return _objectSpread$
|
|
19261
|
+
return _objectSpread$r(_objectSpread$r({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
19150
19262
|
}, {}) : {
|
|
19151
19263
|
_id: [value, 'contains']
|
|
19152
19264
|
},
|
|
@@ -19459,8 +19571,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
19459
19571
|
});
|
|
19460
19572
|
};
|
|
19461
19573
|
|
|
19462
|
-
function ownKeys$
|
|
19463
|
-
function _objectSpread$
|
|
19574
|
+
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; }
|
|
19575
|
+
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; }
|
|
19464
19576
|
function useListData (_ref) {
|
|
19465
19577
|
var id = _ref.id,
|
|
19466
19578
|
data = _ref.data;
|
|
@@ -19503,7 +19615,7 @@ function useListData (_ref) {
|
|
|
19503
19615
|
case 3:
|
|
19504
19616
|
result = _context.sent;
|
|
19505
19617
|
setListData(result.data.map(parseField));
|
|
19506
|
-
initData = _objectSpread$
|
|
19618
|
+
initData = _objectSpread$q({}, data);
|
|
19507
19619
|
setUpdatedObject(initData);
|
|
19508
19620
|
setLoading(false);
|
|
19509
19621
|
case 8:
|
|
@@ -19544,7 +19656,7 @@ function useListData (_ref) {
|
|
|
19544
19656
|
});
|
|
19545
19657
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
19546
19658
|
var parsedField = field.field.split('.');
|
|
19547
|
-
item.itemUpdate = _objectSpread$
|
|
19659
|
+
item.itemUpdate = _objectSpread$q(_objectSpread$q({}, field), {}, {
|
|
19548
19660
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
19549
19661
|
});
|
|
19550
19662
|
});
|
|
@@ -19575,16 +19687,16 @@ function useListData (_ref) {
|
|
|
19575
19687
|
console.error('field with more than 2 parts not allowed');
|
|
19576
19688
|
return;
|
|
19577
19689
|
}
|
|
19578
|
-
var updObj = _objectSpread$
|
|
19690
|
+
var updObj = _objectSpread$q({}, updatedObject);
|
|
19579
19691
|
if (fields.length === 1) {
|
|
19580
|
-
updObj = _objectSpread$
|
|
19692
|
+
updObj = _objectSpread$q(_objectSpread$q({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
19581
19693
|
} else if (fields.length === 2) {
|
|
19582
19694
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
19583
19695
|
return v.id === item.id.trim();
|
|
19584
19696
|
});
|
|
19585
19697
|
if (updatedField) {
|
|
19586
|
-
var updatedFieldCopy = _objectSpread$
|
|
19587
|
-
updObj = _objectSpread$
|
|
19698
|
+
var updatedFieldCopy = _objectSpread$q(_objectSpread$q({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
19699
|
+
updObj = _objectSpread$q(_objectSpread$q({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
19588
19700
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
19589
19701
|
})));
|
|
19590
19702
|
}
|
|
@@ -19593,11 +19705,11 @@ function useListData (_ref) {
|
|
|
19593
19705
|
var acItems = listData;
|
|
19594
19706
|
for (var i = 0; i < acItems.length; i++) {
|
|
19595
19707
|
if (i == index) {
|
|
19596
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
19708
|
+
acItems[i].itemUpdate = _objectSpread$q(_objectSpread$q({}, acItems[i].itemUpdate), {}, {
|
|
19597
19709
|
value: value
|
|
19598
19710
|
});
|
|
19599
19711
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
19600
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
19712
|
+
acItems[i].itemUpdate = _objectSpread$q(_objectSpread$q({}, acItems[i].itemUpdate), {}, {
|
|
19601
19713
|
value: !value
|
|
19602
19714
|
});
|
|
19603
19715
|
}
|
|
@@ -20115,8 +20227,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
20115
20227
|
};
|
|
20116
20228
|
}
|
|
20117
20229
|
|
|
20118
|
-
function ownKeys$
|
|
20119
|
-
function _objectSpread$
|
|
20230
|
+
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; }
|
|
20231
|
+
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; }
|
|
20120
20232
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
20121
20233
|
var id = _ref.id,
|
|
20122
20234
|
data = _ref.data,
|
|
@@ -20224,12 +20336,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
20224
20336
|
}
|
|
20225
20337
|
function onEnter(e) {
|
|
20226
20338
|
if (e.key != 'Enter') return;
|
|
20227
|
-
setCrop(_objectSpread$
|
|
20339
|
+
setCrop(_objectSpread$p(_objectSpread$p({}, crop), {}, {
|
|
20228
20340
|
unit: 'px',
|
|
20229
20341
|
width: Number(widthInputElement.current.value),
|
|
20230
20342
|
height: Number(heightInputElement.current.value)
|
|
20231
20343
|
}));
|
|
20232
|
-
setCompletedCrop(_objectSpread$
|
|
20344
|
+
setCompletedCrop(_objectSpread$p(_objectSpread$p({}, crop), {}, {
|
|
20233
20345
|
unit: 'px',
|
|
20234
20346
|
width: Number(widthInputElement.current.value),
|
|
20235
20347
|
height: Number(heightInputElement.current.value)
|
|
@@ -20309,8 +20421,8 @@ var ImageCropper$1 = observer(ImageCropper, {
|
|
|
20309
20421
|
function _createForOfIteratorHelper$9(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$9(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
20310
20422
|
function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$9(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$9(r, a) : void 0; } }
|
|
20311
20423
|
function _arrayLikeToArray$9(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
20312
|
-
function ownKeys$
|
|
20313
|
-
function _objectSpread$
|
|
20424
|
+
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; }
|
|
20425
|
+
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; }
|
|
20314
20426
|
function useDescriptions (_ref) {
|
|
20315
20427
|
var id = _ref.id;
|
|
20316
20428
|
var root = useStore();
|
|
@@ -20403,7 +20515,7 @@ function _getDisplayData() {
|
|
|
20403
20515
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
20404
20516
|
while (1) switch (_context4.prev = _context4.next) {
|
|
20405
20517
|
case 0:
|
|
20406
|
-
displayData = _objectSpread$
|
|
20518
|
+
displayData = _objectSpread$o({}, data);
|
|
20407
20519
|
_iterator = _createForOfIteratorHelper$9(items);
|
|
20408
20520
|
_context4.prev = 2;
|
|
20409
20521
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -20679,8 +20791,8 @@ var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
|
20679
20791
|
};
|
|
20680
20792
|
var FileUploadBeta = observer(FileUploadWrapper);
|
|
20681
20793
|
|
|
20682
|
-
function ownKeys$
|
|
20683
|
-
function _objectSpread$
|
|
20794
|
+
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; }
|
|
20795
|
+
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; }
|
|
20684
20796
|
function useGridData (_ref) {
|
|
20685
20797
|
var id = _ref.id,
|
|
20686
20798
|
data = _ref.data;
|
|
@@ -20723,11 +20835,11 @@ function useGridData (_ref) {
|
|
|
20723
20835
|
function reducer(state, action) {
|
|
20724
20836
|
switch (action.type) {
|
|
20725
20837
|
case 'update':
|
|
20726
|
-
return _objectSpread$
|
|
20838
|
+
return _objectSpread$n(_objectSpread$n({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$n(_objectSpread$n({}, action.data), {}, {
|
|
20727
20839
|
buffer: Buffer.from(action.data.buffer)
|
|
20728
20840
|
})));
|
|
20729
20841
|
case 'delete':
|
|
20730
|
-
var newState = _objectSpread$
|
|
20842
|
+
var newState = _objectSpread$n({}, state);
|
|
20731
20843
|
delete newState[action.data.divaNr];
|
|
20732
20844
|
return newState;
|
|
20733
20845
|
default:
|
|
@@ -20812,8 +20924,8 @@ var Grid = function Grid(_ref) {
|
|
|
20812
20924
|
});
|
|
20813
20925
|
};
|
|
20814
20926
|
|
|
20815
|
-
function ownKeys$
|
|
20816
|
-
function _objectSpread$
|
|
20927
|
+
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; }
|
|
20928
|
+
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; }
|
|
20817
20929
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
20818
20930
|
var id = _ref.id;
|
|
20819
20931
|
var root = useStore();
|
|
@@ -20932,7 +21044,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
20932
21044
|
onRemove: onRemove,
|
|
20933
21045
|
customRequest: customRequest,
|
|
20934
21046
|
fileList: fileList.map(function (f) {
|
|
20935
|
-
return _objectSpread$
|
|
21047
|
+
return _objectSpread$m(_objectSpread$m({}, f), {}, {
|
|
20936
21048
|
url: f.url
|
|
20937
21049
|
});
|
|
20938
21050
|
}),
|
|
@@ -21651,8 +21763,8 @@ function IconCell (_ref) {
|
|
|
21651
21763
|
|
|
21652
21764
|
var _excluded$2 = ["index"],
|
|
21653
21765
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
21654
|
-
function ownKeys$
|
|
21655
|
-
function _objectSpread$
|
|
21766
|
+
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; }
|
|
21767
|
+
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; }
|
|
21656
21768
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
21657
21769
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
21658
21770
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -21666,7 +21778,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
21666
21778
|
component: false,
|
|
21667
21779
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
21668
21780
|
value: form,
|
|
21669
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
21781
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$l({}, props))
|
|
21670
21782
|
})
|
|
21671
21783
|
});
|
|
21672
21784
|
};
|
|
@@ -21719,7 +21831,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
21719
21831
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
21720
21832
|
longDescriptionType = 'text';
|
|
21721
21833
|
}
|
|
21722
|
-
var modifiedColumn = _objectSpread$
|
|
21834
|
+
var modifiedColumn = _objectSpread$l(_objectSpread$l({}, column), {}, {
|
|
21723
21835
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
21724
21836
|
});
|
|
21725
21837
|
if (column) {
|
|
@@ -21732,34 +21844,34 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
21732
21844
|
};
|
|
21733
21845
|
switch (modifiedColumn.type) {
|
|
21734
21846
|
case 'boolean':
|
|
21735
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
21847
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$l({}, cellProps));
|
|
21736
21848
|
break;
|
|
21737
21849
|
case 'text':
|
|
21738
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
21850
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$l({}, cellProps));
|
|
21739
21851
|
break;
|
|
21740
21852
|
case 'select':
|
|
21741
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
21853
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$l({}, cellProps));
|
|
21742
21854
|
case 'media':
|
|
21743
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
21855
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$l({}, cellProps));
|
|
21744
21856
|
break;
|
|
21745
21857
|
case 'mediaItem':
|
|
21746
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
21858
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$l({}, cellProps));
|
|
21747
21859
|
break;
|
|
21748
21860
|
case 'unixTimeStamp':
|
|
21749
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
21861
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$l({}, cellProps));
|
|
21750
21862
|
break;
|
|
21751
21863
|
case 'unixTimeStampCheck':
|
|
21752
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
21864
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$l({}, cellProps));
|
|
21753
21865
|
break;
|
|
21754
21866
|
case 'icon':
|
|
21755
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
21867
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$l({}, cellProps));
|
|
21756
21868
|
break;
|
|
21757
21869
|
default:
|
|
21758
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
21870
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$l({}, cellProps));
|
|
21759
21871
|
break;
|
|
21760
21872
|
}
|
|
21761
21873
|
}
|
|
21762
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
21874
|
+
return /*#__PURE__*/jsx("td", _objectSpread$l(_objectSpread$l({}, restProps), {}, {
|
|
21763
21875
|
children: childNode
|
|
21764
21876
|
}));
|
|
21765
21877
|
};
|
|
@@ -22112,8 +22224,8 @@ var SMChart = function SMChart(props) {
|
|
|
22112
22224
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
22113
22225
|
};
|
|
22114
22226
|
|
|
22115
|
-
function ownKeys$
|
|
22116
|
-
function _objectSpread$
|
|
22227
|
+
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; }
|
|
22228
|
+
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; }
|
|
22117
22229
|
function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
22118
22230
|
function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0; } }
|
|
22119
22231
|
function _arrayLikeToArray$4(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -22126,7 +22238,7 @@ dayjs.extend(weekYear);
|
|
|
22126
22238
|
Select$1.Option;
|
|
22127
22239
|
var LOG$3 = getLogger('Backoffice', 'BaseTable');
|
|
22128
22240
|
var TableWrapper = function TableWrapper(_ref) {
|
|
22129
|
-
var _state$configuration$, _state$configuration$2, _state$configuration$3, _state$configuration$4, _state$configuration$5, _state$configuration$6, _state$globalFilter, _state$globalFilter2, _state$globalFilter3, _state$globalFilter4, _state$configuration$7, _state$configuration$8, _state$globalFilter$s, _state$configuration$9, _state$configuration$10, _state$configuration$
|
|
22241
|
+
var _state$configuration$, _state$configuration$2, _state$configuration$3, _state$configuration$4, _state$configuration$5, _state$configuration$6, _state$globalFilter, _state$globalFilter2, _state$globalFilter3, _state$globalFilter4, _state$configuration$7, _state$configuration$8, _state$globalFilter$s, _state$configuration$9, _state$configuration$10, _state$configuration$11, _state$selected2, _state$configuration$12, _state$configuration$15, _state$configuration$16, _state$configuration$17;
|
|
22130
22242
|
var state = _ref.state;
|
|
22131
22243
|
var root = useStore();
|
|
22132
22244
|
var _useState = useState(0),
|
|
@@ -22298,7 +22410,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
22298
22410
|
// Convert to Dayjs
|
|
22299
22411
|
(_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
|
|
22300
22412
|
]
|
|
22301
|
-
}), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
22413
|
+
}), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$k(_objectSpread$k({}, (_state$configuration$8 = state.configuration.filter) === null || _state$configuration$8 === void 0 ? void 0 : _state$configuration$8.select.settings), {}, {
|
|
22302
22414
|
style: {
|
|
22303
22415
|
minWidth: '200px'
|
|
22304
22416
|
},
|
|
@@ -22313,10 +22425,15 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
22313
22425
|
total: state.pagination.total,
|
|
22314
22426
|
min: (_state$configuration$9 = state.configuration.rules) === null || _state$configuration$9 === void 0 ? void 0 : _state$configuration$9.min,
|
|
22315
22427
|
deleting: state.deleting,
|
|
22316
|
-
onDelete: state.onDelete
|
|
22428
|
+
onDelete: state.onDelete,
|
|
22429
|
+
disabled: !!((_state$configuration$10 = state.configuration.deleteAction) !== null && _state$configuration$10 !== void 0 && (_state$configuration$11 = _state$configuration$10.disabled) !== null && _state$configuration$11 !== void 0 && _state$configuration$11.call(_state$configuration$10, ((_state$selected2 = state.selected) !== null && _state$selected2 !== void 0 ? _state$selected2 : []).map(function (id) {
|
|
22430
|
+
return state.data.find(function (d) {
|
|
22431
|
+
return d._id == id;
|
|
22432
|
+
});
|
|
22433
|
+
})))
|
|
22317
22434
|
}), state.configuration.copyAction !== undefined && /*#__PURE__*/jsx(CopyButton, {
|
|
22318
22435
|
state: state
|
|
22319
|
-
}), (_state$configuration$
|
|
22436
|
+
}), (_state$configuration$12 = state.configuration.bulkActions) === null || _state$configuration$12 === void 0 ? void 0 : _state$configuration$12.map(function (action) {
|
|
22320
22437
|
return /*#__PURE__*/jsx(BulkAction, {
|
|
22321
22438
|
action: action,
|
|
22322
22439
|
state: state
|
|
@@ -22324,15 +22441,15 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
22324
22441
|
}), state.configuration.createAction && checkPermission(state.configuration.createAction.permission) && /*#__PURE__*/jsx(ActionButton, {
|
|
22325
22442
|
action: state.configuration.createAction,
|
|
22326
22443
|
callback: function callback(data) {
|
|
22327
|
-
var _state$onUpdate, _state$configuration$
|
|
22444
|
+
var _state$onUpdate, _state$configuration$13, _state$configuration$14;
|
|
22328
22445
|
(_state$onUpdate = state.onUpdate) === null || _state$onUpdate === void 0 || _state$onUpdate.call(state, data);
|
|
22329
|
-
(_state$configuration$
|
|
22446
|
+
(_state$configuration$13 = state.configuration.createAction) === null || _state$configuration$13 === void 0 || (_state$configuration$14 = _state$configuration$13.callback) === null || _state$configuration$14 === void 0 || _state$configuration$14.call(_state$configuration$13, data);
|
|
22330
22447
|
},
|
|
22331
22448
|
type: "Button",
|
|
22332
22449
|
id: 'create',
|
|
22333
22450
|
defaultLabel: t('backoffice.table.emailtemplates.createAction.title'),
|
|
22334
22451
|
isCreateButton: true,
|
|
22335
|
-
disabled: state.configuration.createAction.disableOnToggle === !!state.globalFilter.toggle,
|
|
22452
|
+
disabled: state.configuration.createAction.disableOnToggle === !!state.globalFilter.toggle || ((_state$configuration$15 = (_state$configuration$16 = state.configuration.createAction).disabled) === null || _state$configuration$15 === void 0 ? void 0 : _state$configuration$15.call(_state$configuration$16, data)),
|
|
22336
22453
|
data: state.configuration.createActionMapping ? aplyMapping({
|
|
22337
22454
|
mapable: {},
|
|
22338
22455
|
mapping: state.configuration.createActionMapping,
|
|
@@ -22379,17 +22496,17 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
22379
22496
|
}), /*#__PURE__*/jsx(Table$1, {
|
|
22380
22497
|
scroll: {
|
|
22381
22498
|
x: '100%',
|
|
22382
|
-
y: (_state$configuration$
|
|
22499
|
+
y: (_state$configuration$17 = state.configuration.height) !== null && _state$configuration$17 !== void 0 ? _state$configuration$17 : '60vh'
|
|
22383
22500
|
},
|
|
22384
22501
|
rowClassName: editableRow,
|
|
22385
22502
|
components: cellRenderer,
|
|
22386
22503
|
rowKey: function rowKey(dataRow) {
|
|
22387
|
-
var _state$configuration$
|
|
22388
|
-
return goTroughObject(dataRow, (_state$configuration$
|
|
22504
|
+
var _state$configuration$18, _state$configuration$19;
|
|
22505
|
+
return goTroughObject(dataRow, (_state$configuration$18 = (_state$configuration$19 = state.configuration.rowKey) === null || _state$configuration$19 === void 0 ? void 0 : _state$configuration$19.split('.')) !== null && _state$configuration$18 !== void 0 ? _state$configuration$18 : ['_id'], 0);
|
|
22389
22506
|
},
|
|
22390
22507
|
dataSource: data,
|
|
22391
22508
|
loading: state.loading,
|
|
22392
|
-
pagination: _objectSpread$
|
|
22509
|
+
pagination: _objectSpread$k(_objectSpread$k({}, state.pagination), {}, {
|
|
22393
22510
|
showTotal: function showTotal(total, range) {
|
|
22394
22511
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
22395
22512
|
},
|
|
@@ -22422,7 +22539,8 @@ function DeleteButton(_ref2) {
|
|
|
22422
22539
|
_ref2$min = _ref2.min,
|
|
22423
22540
|
min = _ref2$min === void 0 ? 0 : _ref2$min,
|
|
22424
22541
|
deleting = _ref2.deleting,
|
|
22425
|
-
onDelete = _ref2.onDelete
|
|
22542
|
+
onDelete = _ref2.onDelete,
|
|
22543
|
+
disabled = _ref2.disabled;
|
|
22426
22544
|
var _useTranslation2 = useTranslation(),
|
|
22427
22545
|
t = _useTranslation2.t;
|
|
22428
22546
|
var hasSelected = (selected === null || selected === void 0 ? void 0 : selected.length) > 0;
|
|
@@ -22437,12 +22555,12 @@ function DeleteButton(_ref2) {
|
|
|
22437
22555
|
color: 'red'
|
|
22438
22556
|
}
|
|
22439
22557
|
}),
|
|
22440
|
-
disabled: !hasSelected,
|
|
22558
|
+
disabled: !hasSelected || disabled,
|
|
22441
22559
|
onConfirm: allowDelete ? onDelete : undefined,
|
|
22442
22560
|
cancelText: allowDelete ? t('backoffice.basetable.cancle') : /*#__PURE__*/jsx(Fragment, {}),
|
|
22443
22561
|
children: /*#__PURE__*/jsx(Button, {
|
|
22444
22562
|
type: "primary",
|
|
22445
|
-
disabled: !hasSelected,
|
|
22563
|
+
disabled: !hasSelected || disabled,
|
|
22446
22564
|
loading: deleting,
|
|
22447
22565
|
danger: true,
|
|
22448
22566
|
children: t('action.delete')
|
|
@@ -22459,13 +22577,13 @@ function CopyButton(_ref3) {
|
|
|
22459
22577
|
}, root);
|
|
22460
22578
|
var onCopy = /*#__PURE__*/function () {
|
|
22461
22579
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
22462
|
-
var _state$configuration$
|
|
22580
|
+
var _state$configuration$20;
|
|
22463
22581
|
var copyAction, _iterator3, _step3, selectedRow;
|
|
22464
22582
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
22465
22583
|
while (1) switch (_context.prev = _context.next) {
|
|
22466
22584
|
case 0:
|
|
22467
22585
|
copyAction = state.configuration.copyAction;
|
|
22468
|
-
if (((_state$configuration$
|
|
22586
|
+
if (((_state$configuration$20 = state.configuration.copyAction) === null || _state$configuration$20 === void 0 ? void 0 : _state$configuration$20.apiInterface) != undefined) {
|
|
22469
22587
|
_iterator3 = _createForOfIteratorHelper$4(state.selected);
|
|
22470
22588
|
try {
|
|
22471
22589
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
@@ -22500,13 +22618,13 @@ function CopyButton(_ref3) {
|
|
|
22500
22618
|
}();
|
|
22501
22619
|
var onCopyAction = /*#__PURE__*/function () {
|
|
22502
22620
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
22503
|
-
var _state$configuration$
|
|
22621
|
+
var _state$configuration$21, _state$configuration$22;
|
|
22504
22622
|
var copyAction, id, filter, data;
|
|
22505
22623
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
22506
22624
|
while (1) switch (_context3.prev = _context3.next) {
|
|
22507
22625
|
case 0:
|
|
22508
22626
|
copyAction = state.configuration.copyAction;
|
|
22509
|
-
if (!(copyAction.id == undefined || copyAction.actionType != 'Detail' || ((_state$configuration$
|
|
22627
|
+
if (!(copyAction.id == undefined || copyAction.actionType != 'Detail' || ((_state$configuration$21 = state.configuration.createAction) === null || _state$configuration$21 === void 0 ? void 0 : _state$configuration$21.actionType) != 'Detail')) {
|
|
22510
22628
|
_context3.next = 3;
|
|
22511
22629
|
break;
|
|
22512
22630
|
}
|
|
@@ -22536,7 +22654,7 @@ function CopyButton(_ref3) {
|
|
|
22536
22654
|
configurationId: copyAction === null || copyAction === void 0 ? void 0 : copyAction.id,
|
|
22537
22655
|
data: data.data[0],
|
|
22538
22656
|
type: copyAction === null || copyAction === void 0 ? void 0 : copyAction.type,
|
|
22539
|
-
mapping: (_state$configuration$
|
|
22657
|
+
mapping: (_state$configuration$22 = state.configuration.createAction) === null || _state$configuration$22 === void 0 ? void 0 : _state$configuration$22.mapping,
|
|
22540
22658
|
mappingData: data.data[0],
|
|
22541
22659
|
callback: function () {
|
|
22542
22660
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(e) {
|
|
@@ -22577,13 +22695,13 @@ function CopyButton(_ref3) {
|
|
|
22577
22695
|
});
|
|
22578
22696
|
}
|
|
22579
22697
|
function BulkAction(_ref6) {
|
|
22580
|
-
var _state$
|
|
22698
|
+
var _state$selected3;
|
|
22581
22699
|
var action = _ref6.action,
|
|
22582
22700
|
state = _ref6.state;
|
|
22583
22701
|
var root = useStore();
|
|
22584
22702
|
var _useTranslation4 = useTranslation(),
|
|
22585
22703
|
t = _useTranslation4.t;
|
|
22586
|
-
var hasSelected = ((_state$
|
|
22704
|
+
var hasSelected = ((_state$selected3 = state.selected) === null || _state$selected3 === void 0 ? void 0 : _state$selected3.length) > 0;
|
|
22587
22705
|
var selectedData = useMemo(function () {
|
|
22588
22706
|
var _state$data2;
|
|
22589
22707
|
return ((_state$data2 = state.data) === null || _state$data2 === void 0 ? void 0 : _state$data2.filter(function (d) {
|
|
@@ -22689,7 +22807,7 @@ function BulkAction(_ref6) {
|
|
|
22689
22807
|
}
|
|
22690
22808
|
_context4.t0 = data;
|
|
22691
22809
|
_context4.next = 10;
|
|
22692
|
-
return apiInterface.update(_objectSpread$
|
|
22810
|
+
return apiInterface.update(_objectSpread$k(_objectSpread$k({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
22693
22811
|
case 10:
|
|
22694
22812
|
_context4.t1 = _context4.sent;
|
|
22695
22813
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -22789,8 +22907,8 @@ function SelectionText(_ref8) {
|
|
|
22789
22907
|
});
|
|
22790
22908
|
}
|
|
22791
22909
|
|
|
22792
|
-
function ownKeys$
|
|
22793
|
-
function _objectSpread$
|
|
22910
|
+
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; }
|
|
22911
|
+
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; }
|
|
22794
22912
|
function getColumnFilterProps (_ref) {
|
|
22795
22913
|
var filter = _ref.filter,
|
|
22796
22914
|
title = _ref.title;
|
|
@@ -23153,7 +23271,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
23153
23271
|
});
|
|
23154
23272
|
},
|
|
23155
23273
|
options: filter.map(function (f) {
|
|
23156
|
-
return _objectSpread$
|
|
23274
|
+
return _objectSpread$j(_objectSpread$j({}, f), {}, {
|
|
23157
23275
|
label: t(f.label)
|
|
23158
23276
|
});
|
|
23159
23277
|
})
|
|
@@ -23202,7 +23320,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
23202
23320
|
setDisplaySelectedvalues = _useState4[1];
|
|
23203
23321
|
var options = [];
|
|
23204
23322
|
options = filter.map(function (f) {
|
|
23205
|
-
return _objectSpread$
|
|
23323
|
+
return _objectSpread$j(_objectSpread$j({}, f), {}, {
|
|
23206
23324
|
label: t(f.label)
|
|
23207
23325
|
});
|
|
23208
23326
|
});
|
|
@@ -23276,8 +23394,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
23276
23394
|
};
|
|
23277
23395
|
};
|
|
23278
23396
|
|
|
23279
|
-
function ownKeys$
|
|
23280
|
-
function _objectSpread$
|
|
23397
|
+
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; }
|
|
23398
|
+
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; }
|
|
23281
23399
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
23282
23400
|
var columns = configuration.columns.filter(function (c) {
|
|
23283
23401
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -23302,6 +23420,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
23302
23420
|
return /*#__PURE__*/jsx(Space, {
|
|
23303
23421
|
size: "middle",
|
|
23304
23422
|
children: rowAction.map(function (a, index) {
|
|
23423
|
+
var _a$disabled;
|
|
23305
23424
|
if (a.actionType === 'Detail' && a.type === 'Form' && data != undefined && data.length > 1) {
|
|
23306
23425
|
dt = data;
|
|
23307
23426
|
}
|
|
@@ -23316,6 +23435,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
23316
23435
|
onUpdate === null || onUpdate === void 0 || onUpdate(data);
|
|
23317
23436
|
(_a$callback = a.callback) === null || _a$callback === void 0 || _a$callback.call(a, data);
|
|
23318
23437
|
},
|
|
23438
|
+
disabled: (_a$disabled = a.disabled) === null || _a$disabled === void 0 ? void 0 : _a$disabled.call(a, dt),
|
|
23319
23439
|
type: "Link",
|
|
23320
23440
|
data: dt,
|
|
23321
23441
|
defaultLabel: "Details"
|
|
@@ -23328,7 +23448,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
23328
23448
|
}
|
|
23329
23449
|
function mapColumn(column, onUpdate) {
|
|
23330
23450
|
var _column$field, _column$children;
|
|
23331
|
-
return _objectSpread$
|
|
23451
|
+
return _objectSpread$i(_objectSpread$i(_objectSpread$i({}, column), {}, {
|
|
23332
23452
|
width: column.width || 100,
|
|
23333
23453
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
23334
23454
|
key: column.field || column.title,
|
|
@@ -23377,8 +23497,8 @@ function updateData (_ref) {
|
|
|
23377
23497
|
};
|
|
23378
23498
|
}
|
|
23379
23499
|
|
|
23380
|
-
function ownKeys$
|
|
23381
|
-
function _objectSpread$
|
|
23500
|
+
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; }
|
|
23501
|
+
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; }
|
|
23382
23502
|
function aplyFilterAndSortation (_ref) {
|
|
23383
23503
|
var data = _ref.data,
|
|
23384
23504
|
filters = _ref.filters,
|
|
@@ -23393,7 +23513,7 @@ function aplyFilterAndSortation (_ref) {
|
|
|
23393
23513
|
processedData = sort(sorter || [], processedData);
|
|
23394
23514
|
return {
|
|
23395
23515
|
data: processedData,
|
|
23396
|
-
pagination: _objectSpread$
|
|
23516
|
+
pagination: _objectSpread$h(_objectSpread$h({}, pagination), {}, {
|
|
23397
23517
|
total: processedData.length
|
|
23398
23518
|
})
|
|
23399
23519
|
};
|
|
@@ -23478,8 +23598,8 @@ function filter(f, data) {
|
|
|
23478
23598
|
}
|
|
23479
23599
|
|
|
23480
23600
|
var _excluded$1 = ["_id"];
|
|
23481
|
-
function ownKeys$
|
|
23482
|
-
function _objectSpread$
|
|
23601
|
+
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; }
|
|
23602
|
+
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; }
|
|
23483
23603
|
function useTableData$1 (_ref) {
|
|
23484
23604
|
var _configuration$apiInt;
|
|
23485
23605
|
var id = _ref.id;
|
|
@@ -23534,7 +23654,7 @@ function useTableData$1 (_ref) {
|
|
|
23534
23654
|
var _configuration$create;
|
|
23535
23655
|
if (!dataRow) return;
|
|
23536
23656
|
var id = v4();
|
|
23537
|
-
var processedDataRow = flat.unflatten(_objectSpread$
|
|
23657
|
+
var processedDataRow = flat.unflatten(_objectSpread$g({
|
|
23538
23658
|
_id: id,
|
|
23539
23659
|
ID: id
|
|
23540
23660
|
}, dataRow));
|
|
@@ -23546,11 +23666,11 @@ function useTableData$1 (_ref) {
|
|
|
23546
23666
|
newData = _updateData.data;
|
|
23547
23667
|
_updateData.prevDataRow;
|
|
23548
23668
|
_updateData.index;
|
|
23549
|
-
var newState = _objectSpread$
|
|
23669
|
+
var newState = _objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23550
23670
|
data: newData
|
|
23551
23671
|
});
|
|
23552
23672
|
if (!filterServerSide) {
|
|
23553
|
-
var res = aplyFilterAndSortation(_objectSpread$
|
|
23673
|
+
var res = aplyFilterAndSortation(_objectSpread$g(_objectSpread$g({}, filterData), {}, {
|
|
23554
23674
|
data: newData
|
|
23555
23675
|
}));
|
|
23556
23676
|
newState.data = res.data;
|
|
@@ -23562,33 +23682,33 @@ function useTableData$1 (_ref) {
|
|
|
23562
23682
|
var formData = new FormData();
|
|
23563
23683
|
processedDataRow._id;
|
|
23564
23684
|
var value = _objectWithoutProperties(processedDataRow, _excluded$1);
|
|
23565
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
23685
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$g(_objectSpread$g({}, catalogItem), {}, {
|
|
23566
23686
|
filterContex: filterContex,
|
|
23567
23687
|
value: JSON.stringify([value])
|
|
23568
23688
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
23569
23689
|
if (d && d.Result && d.Result == 'Success') return;
|
|
23570
|
-
setState(_objectSpread$
|
|
23690
|
+
setState(_objectSpread$g({}, oldState));
|
|
23571
23691
|
});
|
|
23572
23692
|
}, [state, catalogItem, filterData]);
|
|
23573
23693
|
useEffect(function () {
|
|
23574
23694
|
if (!catalogItem) return;
|
|
23575
|
-
setState(_objectSpread$
|
|
23695
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23576
23696
|
loading: true,
|
|
23577
|
-
mappingData: _objectSpread$
|
|
23697
|
+
mappingData: _objectSpread$g(_objectSpread$g({}, catalogItem), {}, {
|
|
23578
23698
|
filterContex: filterContex
|
|
23579
23699
|
})
|
|
23580
23700
|
}));
|
|
23581
23701
|
if (!filterServerSide) {
|
|
23582
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
23702
|
+
apiHandler.readList(configuration.mapping, _objectSpread$g(_objectSpread$g({}, catalogItem), {}, {
|
|
23583
23703
|
filterContex: filterContex
|
|
23584
23704
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
23585
23705
|
var newData = data.data.map(function (d) {
|
|
23586
|
-
return _objectSpread$
|
|
23706
|
+
return _objectSpread$g(_objectSpread$g({}, d), {}, {
|
|
23587
23707
|
_id: d._id || d.ID || nanoid()
|
|
23588
23708
|
});
|
|
23589
23709
|
});
|
|
23590
23710
|
onChange({
|
|
23591
|
-
pagination: _objectSpread$
|
|
23711
|
+
pagination: _objectSpread$g({}, state.pagination),
|
|
23592
23712
|
filters: {},
|
|
23593
23713
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
23594
23714
|
return c.defaultSortOrder;
|
|
@@ -23605,7 +23725,7 @@ function useTableData$1 (_ref) {
|
|
|
23605
23725
|
});
|
|
23606
23726
|
} else {
|
|
23607
23727
|
onChange({
|
|
23608
|
-
pagination: _objectSpread$
|
|
23728
|
+
pagination: _objectSpread$g({}, state.pagination),
|
|
23609
23729
|
filters: {},
|
|
23610
23730
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
23611
23731
|
return c.defaultSortOrder;
|
|
@@ -23622,17 +23742,17 @@ function useTableData$1 (_ref) {
|
|
|
23622
23742
|
}
|
|
23623
23743
|
}, [filterContex, catalogItem]);
|
|
23624
23744
|
var onChange = function onChange(p, dataParam) {
|
|
23625
|
-
setState(_objectSpread$
|
|
23745
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23626
23746
|
loading: true
|
|
23627
23747
|
}));
|
|
23628
23748
|
if (!filterServerSide) {
|
|
23629
23749
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
23630
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
23750
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$g(_objectSpread$g({}, p), {}, {
|
|
23631
23751
|
data: unfilteredData
|
|
23632
23752
|
})),
|
|
23633
23753
|
data = _aplyFilterAndSortati.data,
|
|
23634
23754
|
pagination = _aplyFilterAndSortati.pagination;
|
|
23635
|
-
setState(_objectSpread$
|
|
23755
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23636
23756
|
data: data,
|
|
23637
23757
|
pagination: pagination,
|
|
23638
23758
|
loading: false,
|
|
@@ -23643,20 +23763,20 @@ function useTableData$1 (_ref) {
|
|
|
23643
23763
|
sorter: p.sorter
|
|
23644
23764
|
});
|
|
23645
23765
|
} else {
|
|
23646
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
23766
|
+
apiHandler.readList(configuration.mapping, _objectSpread$g(_objectSpread$g({}, catalogItem), {}, {
|
|
23647
23767
|
filterContex: filterContex
|
|
23648
23768
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
23649
|
-
setState(_objectSpread$
|
|
23769
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23650
23770
|
data: data.data.map(function (dt) {
|
|
23651
|
-
return _objectSpread$
|
|
23771
|
+
return _objectSpread$g(_objectSpread$g({}, dt), {}, {
|
|
23652
23772
|
_id: dt._id || dt.ID || nanoid()
|
|
23653
23773
|
});
|
|
23654
23774
|
}),
|
|
23655
|
-
pagination: _objectSpread$
|
|
23775
|
+
pagination: _objectSpread$g(_objectSpread$g({}, p.pagination), {}, {
|
|
23656
23776
|
total: data.total
|
|
23657
23777
|
}),
|
|
23658
23778
|
loading: false,
|
|
23659
|
-
mappingData: _objectSpread$
|
|
23779
|
+
mappingData: _objectSpread$g(_objectSpread$g({}, catalogItem), {}, {
|
|
23660
23780
|
filterContex: filterContex
|
|
23661
23781
|
})
|
|
23662
23782
|
}));
|
|
@@ -23668,7 +23788,7 @@ function useTableData$1 (_ref) {
|
|
|
23668
23788
|
}
|
|
23669
23789
|
};
|
|
23670
23790
|
var onSelect = function onSelect(keys) {
|
|
23671
|
-
setState(_objectSpread$
|
|
23791
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23672
23792
|
selected: keys
|
|
23673
23793
|
}));
|
|
23674
23794
|
};
|
|
@@ -23678,7 +23798,7 @@ function useTableData$1 (_ref) {
|
|
|
23678
23798
|
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
23679
23799
|
while (1) switch (_context2.prev = _context2.next) {
|
|
23680
23800
|
case 0:
|
|
23681
|
-
setState(_objectSpread$
|
|
23801
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23682
23802
|
deleting: true
|
|
23683
23803
|
}));
|
|
23684
23804
|
newData = _toConsumableArray(state.data);
|
|
@@ -23693,7 +23813,7 @@ function useTableData$1 (_ref) {
|
|
|
23693
23813
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
23694
23814
|
return nd._id === state.selected[index];
|
|
23695
23815
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
23696
|
-
mappingData = _objectSpread$
|
|
23816
|
+
mappingData = _objectSpread$g(_objectSpread$g({}, mappingData), state.mappingData);
|
|
23697
23817
|
_context.next = 5;
|
|
23698
23818
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true);
|
|
23699
23819
|
case 5:
|
|
@@ -23743,7 +23863,7 @@ function useTableData$1 (_ref) {
|
|
|
23743
23863
|
}
|
|
23744
23864
|
_context2.next = 18;
|
|
23745
23865
|
return apiHandler.readList(configuration.mapping, {
|
|
23746
|
-
pagination: _objectSpread$
|
|
23866
|
+
pagination: _objectSpread$g(_objectSpread$g({}, state.pagination), {}, {
|
|
23747
23867
|
current: current
|
|
23748
23868
|
}),
|
|
23749
23869
|
columns: configuration.columns,
|
|
@@ -23755,11 +23875,11 @@ function useTableData$1 (_ref) {
|
|
|
23755
23875
|
newData = data.data;
|
|
23756
23876
|
total = data.total;
|
|
23757
23877
|
case 21:
|
|
23758
|
-
setState(_objectSpread$
|
|
23878
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23759
23879
|
selected: [],
|
|
23760
23880
|
deleting: false,
|
|
23761
23881
|
data: newData,
|
|
23762
|
-
pagination: _objectSpread$
|
|
23882
|
+
pagination: _objectSpread$g(_objectSpread$g({}, state.pagination), {}, {
|
|
23763
23883
|
current: current,
|
|
23764
23884
|
total: total
|
|
23765
23885
|
})
|
|
@@ -23775,12 +23895,12 @@ function useTableData$1 (_ref) {
|
|
|
23775
23895
|
};
|
|
23776
23896
|
}();
|
|
23777
23897
|
function setLoading() {
|
|
23778
|
-
setState(_objectSpread$
|
|
23898
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23779
23899
|
loading: true
|
|
23780
23900
|
}));
|
|
23781
23901
|
}
|
|
23782
|
-
return _objectSpread$
|
|
23783
|
-
configuration: _objectSpread$
|
|
23902
|
+
return _objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23903
|
+
configuration: _objectSpread$g(_objectSpread$g({}, configuration), {}, {
|
|
23784
23904
|
title: undefined
|
|
23785
23905
|
}),
|
|
23786
23906
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -23885,8 +24005,8 @@ function objectHash (obj) {
|
|
|
23885
24005
|
function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
23886
24006
|
function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
|
|
23887
24007
|
function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
23888
|
-
function ownKeys$
|
|
23889
|
-
function _objectSpread$
|
|
24008
|
+
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; }
|
|
24009
|
+
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; }
|
|
23890
24010
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
23891
24011
|
function useTableData (_ref) {
|
|
23892
24012
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -23953,7 +24073,7 @@ function useTableData (_ref) {
|
|
|
23953
24073
|
selected: [],
|
|
23954
24074
|
canDelete: !!apiHandler.canDelete,
|
|
23955
24075
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
23956
|
-
mappingData: _objectSpread$
|
|
24076
|
+
mappingData: _objectSpread$f(_objectSpread$f({}, parentData), {}, {
|
|
23957
24077
|
prefilter: {
|
|
23958
24078
|
select: globalFilter.select
|
|
23959
24079
|
}
|
|
@@ -23962,7 +24082,7 @@ function useTableData (_ref) {
|
|
|
23962
24082
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
23963
24083
|
state = _useState14[0],
|
|
23964
24084
|
setState = _useState14[1];
|
|
23965
|
-
var mapping = _objectSpread$
|
|
24085
|
+
var mapping = _objectSpread$f(_objectSpread$f({}, parentData), {}, {
|
|
23966
24086
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
23967
24087
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
23968
24088
|
});
|
|
@@ -24001,14 +24121,14 @@ function useTableData (_ref) {
|
|
|
24001
24121
|
}
|
|
24002
24122
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
24003
24123
|
var newInitData = initData;
|
|
24004
|
-
var newState = _objectSpread$
|
|
24124
|
+
var newState = _objectSpread$f({}, state);
|
|
24005
24125
|
var selected = [];
|
|
24006
24126
|
if (configuration.deselectOnUpdate == false) {
|
|
24007
24127
|
selected = state.selected;
|
|
24008
24128
|
}
|
|
24009
24129
|
var pagination = undefined;
|
|
24010
24130
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
24011
|
-
pagination = _objectSpread$
|
|
24131
|
+
pagination = _objectSpread$f(_objectSpread$f({}, state.pagination), {}, {
|
|
24012
24132
|
total: state.data.length + dataArray.length
|
|
24013
24133
|
});
|
|
24014
24134
|
}
|
|
@@ -24025,7 +24145,7 @@ function useTableData (_ref) {
|
|
|
24025
24145
|
dataRow: dataRow
|
|
24026
24146
|
}),
|
|
24027
24147
|
_data = _updateData.data;
|
|
24028
|
-
newState = _objectSpread$
|
|
24148
|
+
newState = _objectSpread$f(_objectSpread$f({}, newState), {}, {
|
|
24029
24149
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
24030
24150
|
data: _data,
|
|
24031
24151
|
selected: selected
|
|
@@ -24038,8 +24158,8 @@ function useTableData (_ref) {
|
|
|
24038
24158
|
dataRow: dataRow
|
|
24039
24159
|
}),
|
|
24040
24160
|
nextInitData = _updateData2.data;
|
|
24041
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
24042
|
-
filters: _objectSpread$
|
|
24161
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$f(_objectSpread$f(_objectSpread$f({}, filterData), {}, {
|
|
24162
|
+
filters: _objectSpread$f(_objectSpread$f(_objectSpread$f(_objectSpread$f(_objectSpread$f(_objectSpread$f({}, 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"])
|
|
24043
24163
|
}, 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 ? {
|
|
24044
24164
|
genericProps: globalFilter.toggle
|
|
24045
24165
|
} : undefined), {}, {
|
|
@@ -24049,7 +24169,7 @@ function useTableData (_ref) {
|
|
|
24049
24169
|
_data2 = _aplyFilterAndSortati.data,
|
|
24050
24170
|
_pagination2 = _aplyFilterAndSortati.pagination;
|
|
24051
24171
|
newInitData = nextInitData;
|
|
24052
|
-
newState = _objectSpread$
|
|
24172
|
+
newState = _objectSpread$f(_objectSpread$f({}, newState), {}, {
|
|
24053
24173
|
pagination: _pagination2,
|
|
24054
24174
|
data: _data2,
|
|
24055
24175
|
selected: selected
|
|
@@ -24059,8 +24179,8 @@ function useTableData (_ref) {
|
|
|
24059
24179
|
if (apiHandler.canCreate) {
|
|
24060
24180
|
apiCreate(data).then(function (res) {
|
|
24061
24181
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
24062
|
-
initData && setInitData(_objectSpread$
|
|
24063
|
-
setState(_objectSpread$
|
|
24182
|
+
initData && setInitData(_objectSpread$f({}, initData));
|
|
24183
|
+
setState(_objectSpread$f({}, state));
|
|
24064
24184
|
}
|
|
24065
24185
|
});
|
|
24066
24186
|
}
|
|
@@ -24073,7 +24193,7 @@ function useTableData (_ref) {
|
|
|
24073
24193
|
var triggerRefresh = function triggerRefresh() {
|
|
24074
24194
|
var _configuration$filter7;
|
|
24075
24195
|
setError(undefined);
|
|
24076
|
-
var newGlobalFilter = _objectSpread$
|
|
24196
|
+
var newGlobalFilter = _objectSpread$f({}, globalFilter);
|
|
24077
24197
|
//on refresh update default filter, since global value can change
|
|
24078
24198
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
24079
24199
|
var _configuration$filter8;
|
|
@@ -24084,7 +24204,7 @@ function useTableData (_ref) {
|
|
|
24084
24204
|
newGlobalFilter["default"] = _defaultFilter;
|
|
24085
24205
|
setGlobaFilter(newGlobalFilter);
|
|
24086
24206
|
}
|
|
24087
|
-
onChange(_objectSpread$
|
|
24207
|
+
onChange(_objectSpread$f({
|
|
24088
24208
|
pagination: state.pagination
|
|
24089
24209
|
}, filterData), newGlobalFilter, true);
|
|
24090
24210
|
};
|
|
@@ -24103,7 +24223,7 @@ function useTableData (_ref) {
|
|
|
24103
24223
|
order: c.defaultSortOrder
|
|
24104
24224
|
};
|
|
24105
24225
|
});
|
|
24106
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
24226
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24107
24227
|
loading: false
|
|
24108
24228
|
}));else {
|
|
24109
24229
|
onChange({
|
|
@@ -24160,11 +24280,11 @@ function useTableData (_ref) {
|
|
|
24160
24280
|
case 0:
|
|
24161
24281
|
prefilter = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : globalFilter;
|
|
24162
24282
|
refresh = _args2.length > 2 ? _args2[2] : undefined;
|
|
24163
|
-
setState(_objectSpread$
|
|
24283
|
+
setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24164
24284
|
loading: true
|
|
24165
24285
|
}));
|
|
24166
24286
|
currentData = initData;
|
|
24167
|
-
filterData = _objectSpread$
|
|
24287
|
+
filterData = _objectSpread$f(_objectSpread$f(_objectSpread$f(_objectSpread$f(_objectSpread$f(_objectSpread$f({}, 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
|
|
24168
24288
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref5) {
|
|
24169
24289
|
var _ref6 = _slicedToArray(_ref5, 2);
|
|
24170
24290
|
_ref6[0];
|
|
@@ -24172,7 +24292,7 @@ function useTableData (_ref) {
|
|
|
24172
24292
|
return v != null;
|
|
24173
24293
|
}));
|
|
24174
24294
|
currentFilterHash = objectHash(filterData);
|
|
24175
|
-
currentPagination = _objectSpread$
|
|
24295
|
+
currentPagination = _objectSpread$f(_objectSpread$f({}, p.pagination), {}, {
|
|
24176
24296
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
24177
24297
|
});
|
|
24178
24298
|
filterHash.current = currentFilterHash;
|
|
@@ -24180,7 +24300,7 @@ function useTableData (_ref) {
|
|
|
24180
24300
|
_context2.next = 19;
|
|
24181
24301
|
break;
|
|
24182
24302
|
}
|
|
24183
|
-
ssf = _objectSpread$
|
|
24303
|
+
ssf = _objectSpread$f({
|
|
24184
24304
|
pagination: currentPagination,
|
|
24185
24305
|
columns: configuration.columns,
|
|
24186
24306
|
filters: filterData,
|
|
@@ -24194,7 +24314,7 @@ function useTableData (_ref) {
|
|
|
24194
24314
|
data = _context2.sent;
|
|
24195
24315
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
24196
24316
|
currentData = data.data;
|
|
24197
|
-
currentPagination = _objectSpread$
|
|
24317
|
+
currentPagination = _objectSpread$f(_objectSpread$f({}, currentPagination), {}, {
|
|
24198
24318
|
total: data.total
|
|
24199
24319
|
});
|
|
24200
24320
|
_context2.next = 28;
|
|
@@ -24211,7 +24331,7 @@ function useTableData (_ref) {
|
|
|
24211
24331
|
currentData = _data3.data;
|
|
24212
24332
|
setInitData(currentData);
|
|
24213
24333
|
case 25:
|
|
24214
|
-
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$
|
|
24334
|
+
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$f(_objectSpread$f({}, p), {}, {
|
|
24215
24335
|
pagination: currentPagination,
|
|
24216
24336
|
filters: filterData,
|
|
24217
24337
|
data: currentData,
|
|
@@ -24220,11 +24340,11 @@ function useTableData (_ref) {
|
|
|
24220
24340
|
currentData = _data4;
|
|
24221
24341
|
currentPagination = pagination;
|
|
24222
24342
|
case 28:
|
|
24223
|
-
setState(_objectSpread$
|
|
24343
|
+
setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24224
24344
|
loading: false,
|
|
24225
24345
|
data: currentData,
|
|
24226
24346
|
pagination: currentPagination,
|
|
24227
|
-
mappingData: _objectSpread$
|
|
24347
|
+
mappingData: _objectSpread$f(_objectSpread$f({}, parentData), {}, {
|
|
24228
24348
|
prefilter: prefilter
|
|
24229
24349
|
}),
|
|
24230
24350
|
currentFetchUrl: currentUrl
|
|
@@ -24244,7 +24364,7 @@ function useTableData (_ref) {
|
|
|
24244
24364
|
};
|
|
24245
24365
|
}();
|
|
24246
24366
|
var onSelect = function onSelect(keys) {
|
|
24247
|
-
setState(_objectSpread$
|
|
24367
|
+
setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24248
24368
|
selected: keys
|
|
24249
24369
|
}));
|
|
24250
24370
|
};
|
|
@@ -24255,7 +24375,7 @@ function useTableData (_ref) {
|
|
|
24255
24375
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
24256
24376
|
while (1) switch (_context4.prev = _context4.next) {
|
|
24257
24377
|
case 0:
|
|
24258
|
-
setState(_objectSpread$
|
|
24378
|
+
setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24259
24379
|
deleting: true
|
|
24260
24380
|
}));
|
|
24261
24381
|
newData = _toConsumableArray(state.data);
|
|
@@ -24295,7 +24415,7 @@ function useTableData (_ref) {
|
|
|
24295
24415
|
} finally {
|
|
24296
24416
|
_iterator.f();
|
|
24297
24417
|
}
|
|
24298
|
-
mappingData = _objectSpread$
|
|
24418
|
+
mappingData = _objectSpread$f(_objectSpread$f(_objectSpread$f({}, mappingData), state.mappingData), mapToggle);
|
|
24299
24419
|
deleteResult = undefined;
|
|
24300
24420
|
_context3.prev = 7;
|
|
24301
24421
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -24386,12 +24506,12 @@ function useTableData (_ref) {
|
|
|
24386
24506
|
break;
|
|
24387
24507
|
}
|
|
24388
24508
|
_context4.next = 25;
|
|
24389
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
24390
|
-
pagination: _objectSpread$
|
|
24509
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$f({
|
|
24510
|
+
pagination: _objectSpread$f(_objectSpread$f({}, state.pagination), {}, {
|
|
24391
24511
|
current: current
|
|
24392
24512
|
}),
|
|
24393
24513
|
columns: configuration.columns,
|
|
24394
|
-
filters: _objectSpread$
|
|
24514
|
+
filters: _objectSpread$f(_objectSpread$f(_objectSpread$f(_objectSpread$f(_objectSpread$f(_objectSpread$f({}, 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"]),
|
|
24395
24515
|
sorter: filterData.sorter
|
|
24396
24516
|
}, 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 ? {
|
|
24397
24517
|
genericProps: globalFilter.toggle
|
|
@@ -24402,11 +24522,11 @@ function useTableData (_ref) {
|
|
|
24402
24522
|
total = data.total;
|
|
24403
24523
|
case 28:
|
|
24404
24524
|
setInitData(newInitData);
|
|
24405
|
-
setState(_objectSpread$
|
|
24525
|
+
setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24406
24526
|
selected: [],
|
|
24407
24527
|
deleting: false,
|
|
24408
24528
|
data: newData,
|
|
24409
|
-
pagination: _objectSpread$
|
|
24529
|
+
pagination: _objectSpread$f(_objectSpread$f({}, state.pagination), {}, {
|
|
24410
24530
|
current: current === 0 ? 1 : current,
|
|
24411
24531
|
total: total
|
|
24412
24532
|
})
|
|
@@ -24427,14 +24547,14 @@ function useTableData (_ref) {
|
|
|
24427
24547
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
24428
24548
|
return;
|
|
24429
24549
|
}
|
|
24430
|
-
var newGlobalFilter = _objectSpread$
|
|
24550
|
+
var newGlobalFilter = _objectSpread$f({}, globalFilter);
|
|
24431
24551
|
if (value !== null && value !== void 0 && value.length) {
|
|
24432
24552
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
24433
24553
|
} else {
|
|
24434
24554
|
newGlobalFilter.select = {};
|
|
24435
24555
|
}
|
|
24436
24556
|
setGlobaFilter(newGlobalFilter);
|
|
24437
|
-
onChange(_objectSpread$
|
|
24557
|
+
onChange(_objectSpread$f({
|
|
24438
24558
|
pagination: state.pagination
|
|
24439
24559
|
}, filterData), newGlobalFilter);
|
|
24440
24560
|
};
|
|
@@ -24448,11 +24568,11 @@ function useTableData (_ref) {
|
|
|
24448
24568
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
24449
24569
|
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', 1];
|
|
24450
24570
|
});
|
|
24451
|
-
var newGlobalFilter = _objectSpread$
|
|
24571
|
+
var newGlobalFilter = _objectSpread$f(_objectSpread$f({}, globalFilter), {}, {
|
|
24452
24572
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
24453
24573
|
});
|
|
24454
24574
|
setGlobaFilter(newGlobalFilter);
|
|
24455
|
-
onChange(_objectSpread$
|
|
24575
|
+
onChange(_objectSpread$f({
|
|
24456
24576
|
pagination: state.pagination
|
|
24457
24577
|
}, filterData), newGlobalFilter);
|
|
24458
24578
|
};
|
|
@@ -24462,7 +24582,7 @@ function useTableData (_ref) {
|
|
|
24462
24582
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
24463
24583
|
return;
|
|
24464
24584
|
}
|
|
24465
|
-
var newGlobalFilter = _objectSpread$
|
|
24585
|
+
var newGlobalFilter = _objectSpread$f(_objectSpread$f({}, globalFilter), {}, {
|
|
24466
24586
|
search: {}
|
|
24467
24587
|
});
|
|
24468
24588
|
if (value) {
|
|
@@ -24476,7 +24596,7 @@ function useTableData (_ref) {
|
|
|
24476
24596
|
});
|
|
24477
24597
|
}
|
|
24478
24598
|
setGlobaFilter(newGlobalFilter);
|
|
24479
|
-
onChange(_objectSpread$
|
|
24599
|
+
onChange(_objectSpread$f({
|
|
24480
24600
|
pagination: state.pagination
|
|
24481
24601
|
}, filterData), newGlobalFilter);
|
|
24482
24602
|
};
|
|
@@ -24486,17 +24606,17 @@ function useTableData (_ref) {
|
|
|
24486
24606
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
24487
24607
|
return;
|
|
24488
24608
|
}
|
|
24489
|
-
var newGlobalFilter = _objectSpread$
|
|
24609
|
+
var newGlobalFilter = _objectSpread$f({}, globalFilter);
|
|
24490
24610
|
newGlobalFilter.timeStamp = {
|
|
24491
24611
|
fromTimeStamp: [from],
|
|
24492
24612
|
toTimeStamp: [to]
|
|
24493
24613
|
};
|
|
24494
24614
|
setGlobaFilter(newGlobalFilter);
|
|
24495
|
-
onChange(_objectSpread$
|
|
24615
|
+
onChange(_objectSpread$f({
|
|
24496
24616
|
pagination: state.pagination
|
|
24497
24617
|
}, filterData), newGlobalFilter);
|
|
24498
24618
|
};
|
|
24499
|
-
return _objectSpread$
|
|
24619
|
+
return _objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24500
24620
|
title: title,
|
|
24501
24621
|
configuration: configuration,
|
|
24502
24622
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -24536,8 +24656,8 @@ function StandardTable (_ref) {
|
|
|
24536
24656
|
});
|
|
24537
24657
|
}
|
|
24538
24658
|
|
|
24539
|
-
function ownKeys$
|
|
24540
|
-
function _objectSpread$
|
|
24659
|
+
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; }
|
|
24660
|
+
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; }
|
|
24541
24661
|
function Table (props) {
|
|
24542
24662
|
var root = useStore();
|
|
24543
24663
|
var variant = useMemo(function () {
|
|
@@ -24545,15 +24665,15 @@ function Table (props) {
|
|
|
24545
24665
|
return config.variant;
|
|
24546
24666
|
}, [props.id]);
|
|
24547
24667
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
24548
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
24668
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$e({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$e({}, props))]
|
|
24549
24669
|
});
|
|
24550
24670
|
}
|
|
24551
24671
|
|
|
24552
24672
|
function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
24553
24673
|
function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
|
|
24554
24674
|
function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
24555
|
-
function ownKeys$
|
|
24556
|
-
function _objectSpread$
|
|
24675
|
+
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; }
|
|
24676
|
+
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; }
|
|
24557
24677
|
function useAGGrid (_ref) {
|
|
24558
24678
|
var id = _ref.id,
|
|
24559
24679
|
filter = _ref.filter,
|
|
@@ -24647,7 +24767,7 @@ function useAGGrid (_ref) {
|
|
|
24647
24767
|
value = _ref3[1];
|
|
24648
24768
|
if (_idx == 0) {
|
|
24649
24769
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
24650
|
-
rdat.push(_objectSpread$
|
|
24770
|
+
rdat.push(_objectSpread$d(_objectSpread$d({}, rd), {}, {
|
|
24651
24771
|
grouping: [idx.toString()]
|
|
24652
24772
|
}));
|
|
24653
24773
|
var sp = key.split(':');
|
|
@@ -24790,8 +24910,8 @@ var value = "value-FCA-6";
|
|
|
24790
24910
|
var css_248z$a = ".overlay-lm0tm {\n position: absolute;\n z-index: 1;\n background-color: rgba(247,247,247,0.45882);\n height: 60vh;\n width: 100%;\n}\n.loader-LaXZy {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 50px;\n height: 50px;\n border: 3px solid rgba(0, 0, 0, 0.3);\n border-radius: 50%;\n border-top-color: #fff;\n animation: spin-qUdpu 1s ease-in-out infinite;\n -webkit-animation: spin-qUdpu 1s ease-in-out infinite;\n}\n.flex-yQdda {\n display: flex;\n}\n\n.bar-Y663f {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin-top: 7%;\n}\n\n.value-FCA-6 {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: -moz-fit-content;\n width: fit-content;\n}\n@keyframes spin-qUdpu {\n to {\n -webkit-transform: rotate(360deg);\n }\n}\n";
|
|
24791
24911
|
styleInject(css_248z$a);
|
|
24792
24912
|
|
|
24793
|
-
function ownKeys$
|
|
24794
|
-
function _objectSpread$
|
|
24913
|
+
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; }
|
|
24914
|
+
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; }
|
|
24795
24915
|
var AGChart = function AGChart(_ref) {
|
|
24796
24916
|
var data = _ref.data;
|
|
24797
24917
|
var groupedData = [];
|
|
@@ -24799,11 +24919,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
24799
24919
|
data.forEach(function (dt) {
|
|
24800
24920
|
if (dt.count == 0) return;
|
|
24801
24921
|
if (groupedData.length > dt.grouping[0]) {
|
|
24802
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
24922
|
+
groupedData[dt.grouping[0]].push(_objectSpread$c(_objectSpread$c({}, dt), {}, {
|
|
24803
24923
|
count: Number(dt.count)
|
|
24804
24924
|
}));
|
|
24805
24925
|
} else {
|
|
24806
|
-
groupedData.push([_objectSpread$
|
|
24926
|
+
groupedData.push([_objectSpread$c(_objectSpread$c({}, dt), {}, {
|
|
24807
24927
|
count: Number(dt.count)
|
|
24808
24928
|
})]);
|
|
24809
24929
|
}
|
|
@@ -24844,8 +24964,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
24844
24964
|
});
|
|
24845
24965
|
};
|
|
24846
24966
|
|
|
24847
|
-
function ownKeys$
|
|
24848
|
-
function _objectSpread$
|
|
24967
|
+
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; }
|
|
24968
|
+
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; }
|
|
24849
24969
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
24850
24970
|
var id = _ref.id,
|
|
24851
24971
|
filter = _ref.filter,
|
|
@@ -24938,7 +25058,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
24938
25058
|
});
|
|
24939
25059
|
});
|
|
24940
25060
|
}
|
|
24941
|
-
return _objectSpread$
|
|
25061
|
+
return _objectSpread$b(_objectSpread$b({}, column), {}, {
|
|
24942
25062
|
cellRenderer: renderer
|
|
24943
25063
|
});
|
|
24944
25064
|
});
|
|
@@ -25212,8 +25332,8 @@ var CustomText$1 = observer(CustomText, {
|
|
|
25212
25332
|
forwardRef: true
|
|
25213
25333
|
});
|
|
25214
25334
|
|
|
25215
|
-
function ownKeys$
|
|
25216
|
-
function _objectSpread$
|
|
25335
|
+
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; }
|
|
25336
|
+
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; }
|
|
25217
25337
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
25218
25338
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
25219
25339
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -25276,7 +25396,7 @@ function useFilterBoxData (id) {
|
|
|
25276
25396
|
} finally {
|
|
25277
25397
|
_iterator.f();
|
|
25278
25398
|
}
|
|
25279
|
-
return _objectSpread$
|
|
25399
|
+
return _objectSpread$a(_objectSpread$a({}, state), ob);
|
|
25280
25400
|
}
|
|
25281
25401
|
return {
|
|
25282
25402
|
configuration: configuration,
|
|
@@ -25290,8 +25410,8 @@ function useFilterBoxData (id) {
|
|
|
25290
25410
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
25291
25411
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
25292
25412
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
25293
|
-
function ownKeys$
|
|
25294
|
-
function _objectSpread$
|
|
25413
|
+
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; }
|
|
25414
|
+
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; }
|
|
25295
25415
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
25296
25416
|
var id = _ref.id,
|
|
25297
25417
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -25319,7 +25439,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
25319
25439
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
25320
25440
|
mode: "single",
|
|
25321
25441
|
apiInterface: filter.requestOptions,
|
|
25322
|
-
wholeData: _objectSpread$
|
|
25442
|
+
wholeData: _objectSpread$9(_objectSpread$9({}, state.filter), {}, {
|
|
25323
25443
|
tab: tab
|
|
25324
25444
|
}),
|
|
25325
25445
|
mapping: filter.requestMapping,
|
|
@@ -25551,8 +25671,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
25551
25671
|
return false;
|
|
25552
25672
|
});
|
|
25553
25673
|
|
|
25554
|
-
function ownKeys$
|
|
25555
|
-
function _objectSpread$
|
|
25674
|
+
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; }
|
|
25675
|
+
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; }
|
|
25556
25676
|
function useUIBuilderData (id) {
|
|
25557
25677
|
var save = undefined;
|
|
25558
25678
|
var root = useStore();
|
|
@@ -25584,7 +25704,7 @@ function useUIBuilderData (id) {
|
|
|
25584
25704
|
var configuration = _useMemo.configuration;
|
|
25585
25705
|
useEffect(function () {
|
|
25586
25706
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
25587
|
-
return setFilter(_objectSpread$
|
|
25707
|
+
return setFilter(_objectSpread$8(_objectSpread$8({}, filter), {}, {
|
|
25588
25708
|
sessionGuid: res
|
|
25589
25709
|
}));
|
|
25590
25710
|
});
|
|
@@ -25607,8 +25727,8 @@ function useUIBuilderData (id) {
|
|
|
25607
25727
|
};
|
|
25608
25728
|
}
|
|
25609
25729
|
|
|
25610
|
-
function ownKeys$
|
|
25611
|
-
function _objectSpread$
|
|
25730
|
+
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; }
|
|
25731
|
+
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; }
|
|
25612
25732
|
function UIBuilder(_ref) {
|
|
25613
25733
|
var id = _ref.id;
|
|
25614
25734
|
var state = useUIBuilderData(id);
|
|
@@ -25635,7 +25755,7 @@ function UIBuilder(_ref) {
|
|
|
25635
25755
|
override = {
|
|
25636
25756
|
value: newFilter[item.field],
|
|
25637
25757
|
setValue: function setValue(newVal) {
|
|
25638
|
-
var newFilter = _objectSpread$
|
|
25758
|
+
var newFilter = _objectSpread$7({}, state.filter);
|
|
25639
25759
|
newFilter[item.field] = newVal;
|
|
25640
25760
|
state.setFilter(newFilter);
|
|
25641
25761
|
}
|
|
@@ -25683,7 +25803,7 @@ function UIBuilder(_ref) {
|
|
|
25683
25803
|
case 'AGGrid':
|
|
25684
25804
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
25685
25805
|
id: item.id,
|
|
25686
|
-
filter: _objectSpread$
|
|
25806
|
+
filter: _objectSpread$7({
|
|
25687
25807
|
optionCodices: JSON.stringify(state.data)
|
|
25688
25808
|
}, state.filter),
|
|
25689
25809
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -25843,8 +25963,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
25843
25963
|
};
|
|
25844
25964
|
var OrgItem$1 = observer(OrgItem);
|
|
25845
25965
|
|
|
25846
|
-
function ownKeys$
|
|
25847
|
-
function _objectSpread$
|
|
25966
|
+
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; }
|
|
25967
|
+
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; }
|
|
25848
25968
|
function useTransformJson (_ref) {
|
|
25849
25969
|
var id = _ref.id;
|
|
25850
25970
|
var _useState = useState(),
|
|
@@ -25910,7 +26030,7 @@ function useTransformJson (_ref) {
|
|
|
25910
26030
|
}();
|
|
25911
26031
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
25912
26032
|
var _data$children;
|
|
25913
|
-
return _objectSpread$
|
|
26033
|
+
return _objectSpread$6(_objectSpread$6({}, data), {}, {
|
|
25914
26034
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
25915
26035
|
data: data,
|
|
25916
26036
|
configuration: configuration,
|
|
@@ -26569,8 +26689,8 @@ function useCatalogEditor (id) {
|
|
|
26569
26689
|
};
|
|
26570
26690
|
}
|
|
26571
26691
|
|
|
26572
|
-
function ownKeys$
|
|
26573
|
-
function _objectSpread$
|
|
26692
|
+
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; }
|
|
26693
|
+
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; }
|
|
26574
26694
|
function DragDropUpload(_ref) {
|
|
26575
26695
|
var api2Params = _ref.api2Params,
|
|
26576
26696
|
catalogId = _ref.catalogId,
|
|
@@ -26675,7 +26795,7 @@ function DragDropUpload(_ref) {
|
|
|
26675
26795
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
26676
26796
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
26677
26797
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
26678
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
26798
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$5(_objectSpread$5({}, props), {}, {
|
|
26679
26799
|
children: [/*#__PURE__*/jsx("p", {
|
|
26680
26800
|
className: "ant-upload-drag-icon",
|
|
26681
26801
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -30557,53 +30677,6 @@ function Detail(_ref) {
|
|
|
30557
30677
|
}
|
|
30558
30678
|
var DetailWithObserver = observer(Detail);
|
|
30559
30679
|
|
|
30560
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
30561
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
30562
|
-
var LOG$1 = getLogger('Backoffice', 'ErrorBoundary');
|
|
30563
|
-
var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
30564
|
-
function ErrorBoundary(props) {
|
|
30565
|
-
var _this;
|
|
30566
|
-
_classCallCheck(this, ErrorBoundary);
|
|
30567
|
-
_this = _callSuper(this, ErrorBoundary, [props]);
|
|
30568
|
-
_this.state = {
|
|
30569
|
-
hasError: false
|
|
30570
|
-
};
|
|
30571
|
-
return _this;
|
|
30572
|
-
}
|
|
30573
|
-
_inherits(ErrorBoundary, _React$Component);
|
|
30574
|
-
return _createClass(ErrorBoundary, [{
|
|
30575
|
-
key: "componentDidCatch",
|
|
30576
|
-
value: function componentDidCatch(error, errorInfo) {
|
|
30577
|
-
LOG$1.error(new DivaError('Error in Backoffice', {
|
|
30578
|
-
cause: error,
|
|
30579
|
-
custom: {
|
|
30580
|
-
errorInfo: errorInfo,
|
|
30581
|
-
code: 'BACKO_0001'
|
|
30582
|
-
}
|
|
30583
|
-
}));
|
|
30584
|
-
}
|
|
30585
|
-
}, {
|
|
30586
|
-
key: "render",
|
|
30587
|
-
value: function render() {
|
|
30588
|
-
if (this.state.hasError) {
|
|
30589
|
-
return /*#__PURE__*/jsx(Result$1, {
|
|
30590
|
-
status: "500",
|
|
30591
|
-
subTitle: "Es ist ein Fehler aufgetreten, versuchen Sie es sp\xE4ter nochmal oder kontaktieren Sie den Support."
|
|
30592
|
-
});
|
|
30593
|
-
}
|
|
30594
|
-
return this.props.children;
|
|
30595
|
-
}
|
|
30596
|
-
}], [{
|
|
30597
|
-
key: "getDerivedStateFromError",
|
|
30598
|
-
value: function getDerivedStateFromError(error) {
|
|
30599
|
-
// Update state so the next render will show the fallback UI.
|
|
30600
|
-
return {
|
|
30601
|
-
hasError: true
|
|
30602
|
-
};
|
|
30603
|
-
}
|
|
30604
|
-
}]);
|
|
30605
|
-
}(React.Component);
|
|
30606
|
-
|
|
30607
30680
|
function Modal() {
|
|
30608
30681
|
var _info$action2, _info$action3, _info$action4, _info$action5, _info$action6, _info$action7;
|
|
30609
30682
|
var root = useStore();
|
|
@@ -30841,14 +30914,14 @@ var MenuWrapper = function MenuWrapper() {
|
|
|
30841
30914
|
};
|
|
30842
30915
|
var Navigation = observer(MenuWrapper);
|
|
30843
30916
|
|
|
30844
|
-
var wrapper$1 = "wrapper-
|
|
30845
|
-
var css_248z$3 = ".wrapper-
|
|
30917
|
+
var wrapper$1 = "wrapper-Q13-g";
|
|
30918
|
+
var css_248z$3 = ".wrapper-Q13-g {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n";
|
|
30846
30919
|
styleInject(css_248z$3);
|
|
30847
30920
|
|
|
30848
|
-
var wrapper = "wrapper-
|
|
30849
|
-
var select = "select-
|
|
30850
|
-
var button = "button-
|
|
30851
|
-
var css_248z$2 = ".wrapper-
|
|
30921
|
+
var wrapper = "wrapper-IcNC5";
|
|
30922
|
+
var select = "select-jVMz-";
|
|
30923
|
+
var button = "button-78H38";
|
|
30924
|
+
var css_248z$2 = ".wrapper-IcNC5 {\n display: flex;\n gap: 16px;\n margin: 8px;\n justify-content: flex-start;\n}\n\n.select-jVMz- {\n z-index: 1000;\n margin: 8px;\n flex-grow: 0.5;\n min-width: 100px;\n}\n.select-jVMz- div {\n border-color: grey !important;\n}\n.select-jVMz- div {\n box-shadow: none;\n box-shadow: initial;\n}\n\n.button-78H38 {\n width: 40px;\n justify-content: center;\n}\n";
|
|
30852
30925
|
styleInject(css_248z$2);
|
|
30853
30926
|
|
|
30854
30927
|
var ArticleSelection = function ArticleSelection(_ref) {
|
|
@@ -30944,9 +31017,9 @@ var groupBadgeStyles = {
|
|
|
30944
31017
|
};
|
|
30945
31018
|
var ArticleSelection$1 = observer(ArticleSelection);
|
|
30946
31019
|
|
|
30947
|
-
function ownKeys$
|
|
30948
|
-
function _objectSpread$
|
|
30949
|
-
function useWysiwyg(_ref) {
|
|
31020
|
+
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; }
|
|
31021
|
+
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; }
|
|
31022
|
+
function useWysiwyg$1(_ref) {
|
|
30950
31023
|
var tool = _ref.tool,
|
|
30951
31024
|
visible = _ref.visible;
|
|
30952
31025
|
var _useDivaCore = useDivaCore(),
|
|
@@ -30991,7 +31064,7 @@ function useWysiwyg(_ref) {
|
|
|
30991
31064
|
_context.next = 3;
|
|
30992
31065
|
return fetch(root.configurationStore.apiConfig.enricherService + '/packages/' + id + '/mask', {
|
|
30993
31066
|
method: 'GET',
|
|
30994
|
-
headers: _objectSpread$
|
|
31067
|
+
headers: _objectSpread$4({}, jwt ? {
|
|
30995
31068
|
Authorization: 'Bearer ' + jwt
|
|
30996
31069
|
} : {})
|
|
30997
31070
|
}).then(function (r) {
|
|
@@ -31162,8 +31235,44 @@ function useWysiwyg(_ref) {
|
|
|
31162
31235
|
};
|
|
31163
31236
|
}
|
|
31164
31237
|
|
|
31165
|
-
|
|
31166
|
-
|
|
31238
|
+
var LOG$1 = getLogger('Backoffice', 'ErrorBoundary');
|
|
31239
|
+
var ErrorBoundary = function ErrorBoundary(_ref) {
|
|
31240
|
+
var children = _ref.children,
|
|
31241
|
+
_ref$errorCode = _ref.errorCode,
|
|
31242
|
+
errorCode = _ref$errorCode === void 0 ? 'BACKO_0001' : _ref$errorCode,
|
|
31243
|
+
addToErrorLog = _ref.addToErrorLog;
|
|
31244
|
+
return /*#__PURE__*/jsx(ErrorBoundary$1, {
|
|
31245
|
+
FallbackComponent: FallbackComponent,
|
|
31246
|
+
onError: function onError(err) {
|
|
31247
|
+
LOG$1.error(new DivaError$1('Error in Backoffice', {
|
|
31248
|
+
cause: err,
|
|
31249
|
+
custom: {
|
|
31250
|
+
code: errorCode,
|
|
31251
|
+
addToErrorLog: addToErrorLog
|
|
31252
|
+
}
|
|
31253
|
+
}));
|
|
31254
|
+
},
|
|
31255
|
+
children: children
|
|
31256
|
+
});
|
|
31257
|
+
};
|
|
31258
|
+
var FallbackComponent = function FallbackComponent(_ref2) {
|
|
31259
|
+
_ref2.error;
|
|
31260
|
+
var resetErrorBoundary = _ref2.resetErrorBoundary;
|
|
31261
|
+
var root = useStore();
|
|
31262
|
+
useEffect(function () {
|
|
31263
|
+
root.setResetErrorBoundary(resetErrorBoundary);
|
|
31264
|
+
return function () {
|
|
31265
|
+
root.setResetErrorBoundary();
|
|
31266
|
+
};
|
|
31267
|
+
}, []);
|
|
31268
|
+
return /*#__PURE__*/jsx(Result$1, {
|
|
31269
|
+
status: "500",
|
|
31270
|
+
subTitle: "Es ist ein Fehler aufgetreten, versuchen Sie es sp\xE4ter nochmal oder kontaktieren Sie den Support."
|
|
31271
|
+
});
|
|
31272
|
+
};
|
|
31273
|
+
|
|
31274
|
+
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; }
|
|
31275
|
+
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; }
|
|
31167
31276
|
var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
31168
31277
|
var _state$articleCodex;
|
|
31169
31278
|
var tool = _ref.tool,
|
|
@@ -31171,57 +31280,135 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
31171
31280
|
var _useDivaCore = useDivaCore(),
|
|
31172
31281
|
organizationId = _useDivaCore.state.organization._id;
|
|
31173
31282
|
var root = useStore();
|
|
31174
|
-
var state = useWysiwyg({
|
|
31283
|
+
var state = useWysiwyg$1({
|
|
31175
31284
|
tool: tool,
|
|
31176
31285
|
visible: visible
|
|
31177
31286
|
});
|
|
31287
|
+
var _useTranslation = useTranslation(),
|
|
31288
|
+
t = _useTranslation.t;
|
|
31178
31289
|
if (state !== null && state !== void 0 && state.pack) {
|
|
31179
|
-
if (!state.pack.catalogCodex
|
|
31180
|
-
children:
|
|
31181
|
-
});
|
|
31182
|
-
if (!state.pack.catalogCodex) return /*#__PURE__*/jsx(Fragment, {
|
|
31183
|
-
children: "catalogCodex in Mask Package missing"
|
|
31184
|
-
});
|
|
31185
|
-
if (!state.pack.accountId) return /*#__PURE__*/jsx(Fragment, {
|
|
31186
|
-
children: "accountId in Mask Package missing"
|
|
31290
|
+
if (!state.pack.catalogCodex || !state.pack.accountId) return /*#__PURE__*/jsx(Fragment, {
|
|
31291
|
+
children: t('backoffice.wysiwyg.configurator.error')
|
|
31187
31292
|
});
|
|
31188
31293
|
}
|
|
31189
|
-
return /*#__PURE__*/
|
|
31190
|
-
|
|
31191
|
-
children:
|
|
31192
|
-
|
|
31193
|
-
|
|
31194
|
-
|
|
31294
|
+
return /*#__PURE__*/jsx(ErrorBoundary, {
|
|
31295
|
+
errorCode: "BACKO_0004",
|
|
31296
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
31297
|
+
className: wrapper$1,
|
|
31298
|
+
children: [/*#__PURE__*/jsx(ArticleSelection$1, {
|
|
31299
|
+
state: state
|
|
31300
|
+
}), state.pack && !state.doReset && /*#__PURE__*/jsx("div", {
|
|
31301
|
+
hidden: !state.articleCodex,
|
|
31302
|
+
style: {
|
|
31303
|
+
height: 'calc(100% - 71px)'
|
|
31304
|
+
},
|
|
31305
|
+
children: /*#__PURE__*/jsx(WebPlannerReact, {
|
|
31306
|
+
settings: state.settings,
|
|
31307
|
+
parameters: _objectSpread$3(_objectSpread$3({
|
|
31308
|
+
articleCodexes: (_state$articleCodex = state.articleCodex) !== null && _state$articleCodex !== void 0 ? _state$articleCodex : '',
|
|
31309
|
+
variantValues: '',
|
|
31310
|
+
resetArticle: '',
|
|
31311
|
+
disableToggle: '1',
|
|
31312
|
+
startDivaNr: 'DIVA-1234567890'
|
|
31313
|
+
}, !!state.doNavigate ? {
|
|
31314
|
+
initMode: 'OPENCONFIGTABGROUP',
|
|
31315
|
+
opt: state.doNavigate
|
|
31316
|
+
} : {}), {}, {
|
|
31317
|
+
catalogCodex: state.pack.catalogCodex,
|
|
31318
|
+
accountGuid: state.pack.accountId,
|
|
31319
|
+
returnTo: 'DONT_SAVE_BASKET',
|
|
31320
|
+
organizationId: organizationId,
|
|
31321
|
+
no3DConnection: 'true'
|
|
31322
|
+
}),
|
|
31323
|
+
internal: {
|
|
31324
|
+
catalogMask: state.pack,
|
|
31325
|
+
actions: {
|
|
31326
|
+
toggleLoading: root.contentStore.toggleToolLoading.bind(root.contentStore)
|
|
31327
|
+
}
|
|
31328
|
+
},
|
|
31329
|
+
isVisible: !!state.articleCodex
|
|
31330
|
+
}, state.articleCodex)
|
|
31331
|
+
})]
|
|
31332
|
+
})
|
|
31333
|
+
});
|
|
31334
|
+
};
|
|
31335
|
+
|
|
31336
|
+
function useWysiwyg(_ref) {
|
|
31337
|
+
var tool = _ref.tool;
|
|
31338
|
+
_ref.visible;
|
|
31339
|
+
tool.parameters;
|
|
31340
|
+
_objectDestructuringEmpty(useDivaCore());
|
|
31341
|
+
var root = useStore();
|
|
31342
|
+
var _useState = useState([]),
|
|
31343
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31344
|
+
data = _useState2[0],
|
|
31345
|
+
setData = _useState2[1];
|
|
31346
|
+
useEffect(function () {
|
|
31347
|
+
var _tool$parameters$data, _tool$parameters, _root$resetErrorBound;
|
|
31348
|
+
var newData = _resoveLanguage(toJS((_tool$parameters$data = (_tool$parameters = tool.parameters) === null || _tool$parameters === void 0 || (_tool$parameters = _tool$parameters.data) === null || _tool$parameters === void 0 ? void 0 : _tool$parameters.content) !== null && _tool$parameters$data !== void 0 ? _tool$parameters$data : []), root.contentStore.toolsLanguage);
|
|
31349
|
+
setData(newData);
|
|
31350
|
+
(_root$resetErrorBound = root.resetErrorBoundary) === null || _root$resetErrorBound === void 0 || _root$resetErrorBound.call(root);
|
|
31351
|
+
}, [tool.parameters, tool.parameters.data]);
|
|
31352
|
+
return {
|
|
31353
|
+
data: data
|
|
31354
|
+
};
|
|
31355
|
+
}
|
|
31356
|
+
var _resoveLanguage = function resoveLanguage(contents, lang) {
|
|
31357
|
+
for (var i = 0; i < contents.length; i++) {
|
|
31358
|
+
var c = contents[i];
|
|
31359
|
+
switch (c.type) {
|
|
31360
|
+
case 'Gallery':
|
|
31361
|
+
case 'Wrapper':
|
|
31362
|
+
c.content = _resoveLanguage(c.content, lang);
|
|
31363
|
+
break;
|
|
31364
|
+
case 'Image':
|
|
31365
|
+
if (c.altText) c.altText = getTranslation(c.altText, lang);
|
|
31366
|
+
case 'Video':
|
|
31367
|
+
c.url = getTranslation(c.url, lang);
|
|
31368
|
+
break;
|
|
31369
|
+
case 'RichText':
|
|
31370
|
+
case 'Title':
|
|
31371
|
+
c.text = getTranslation(c.text, lang);
|
|
31372
|
+
break;
|
|
31373
|
+
case 'URL':
|
|
31374
|
+
if (c.text) c.text = getTranslation(c.text, lang);
|
|
31375
|
+
c.url = getTranslation(c.url, lang);
|
|
31376
|
+
break;
|
|
31377
|
+
}
|
|
31378
|
+
}
|
|
31379
|
+
return contents;
|
|
31380
|
+
};
|
|
31381
|
+
var getTranslation = function getTranslation(text, lang) {
|
|
31382
|
+
if (_typeof(text) === 'object') {
|
|
31383
|
+
return text[lang] || text['de'] || text[Object.keys(text)[0]];
|
|
31384
|
+
} else {
|
|
31385
|
+
return text;
|
|
31386
|
+
}
|
|
31387
|
+
};
|
|
31388
|
+
|
|
31389
|
+
var WsyiwygContentItem = function WsyiwygContentItem(_ref) {
|
|
31390
|
+
var tool = _ref.tool,
|
|
31391
|
+
visible = _ref.visible;
|
|
31392
|
+
var _useWysiwygContentIte = useWysiwyg({
|
|
31393
|
+
tool: tool,
|
|
31394
|
+
visible: visible
|
|
31395
|
+
}),
|
|
31396
|
+
data = _useWysiwygContentIte.data;
|
|
31397
|
+
return /*#__PURE__*/jsx(ErrorBoundary, {
|
|
31398
|
+
errorCode: "BACKO_0004",
|
|
31399
|
+
addToErrorLog: data,
|
|
31400
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
31195
31401
|
style: {
|
|
31196
|
-
|
|
31197
|
-
|
|
31198
|
-
|
|
31199
|
-
|
|
31200
|
-
|
|
31201
|
-
|
|
31202
|
-
|
|
31203
|
-
|
|
31204
|
-
|
|
31205
|
-
|
|
31206
|
-
}, !!state.doNavigate ? {
|
|
31207
|
-
initMode: 'OPENCONFIGTABGROUP',
|
|
31208
|
-
opt: state.doNavigate
|
|
31209
|
-
} : {}), {}, {
|
|
31210
|
-
catalogCodex: state.pack.catalogCodex,
|
|
31211
|
-
accountGuid: state.pack.accountId,
|
|
31212
|
-
returnTo: 'DONT_SAVE_BASKET',
|
|
31213
|
-
organizationId: organizationId,
|
|
31214
|
-
no3DConnection: 'true'
|
|
31215
|
-
}),
|
|
31216
|
-
internal: {
|
|
31217
|
-
catalogMask: state.pack,
|
|
31218
|
-
actions: {
|
|
31219
|
-
toggleLoading: root.contentStore.toggleToolLoading.bind(root.contentStore)
|
|
31220
|
-
}
|
|
31221
|
-
},
|
|
31222
|
-
isVisible: !!state.articleCodex
|
|
31223
|
-
}, state.articleCodex)
|
|
31224
|
-
})]
|
|
31402
|
+
display: 'flex',
|
|
31403
|
+
flexDirection: 'column',
|
|
31404
|
+
height: '100%'
|
|
31405
|
+
},
|
|
31406
|
+
children: [/*#__PURE__*/jsx(ContentItemComponent, {
|
|
31407
|
+
settings: {
|
|
31408
|
+
contentItems: data !== null && data !== void 0 ? data : []
|
|
31409
|
+
}
|
|
31410
|
+
}), ";"]
|
|
31411
|
+
})
|
|
31225
31412
|
});
|
|
31226
31413
|
};
|
|
31227
31414
|
|
|
@@ -31232,7 +31419,7 @@ var draghandle = "draghandle-f5b0N";
|
|
|
31232
31419
|
var midHandle = "mid-handle--qh50";
|
|
31233
31420
|
var toolItem = "tool-item-KyKgQ";
|
|
31234
31421
|
var sel = "sel-iUm8X";
|
|
31235
|
-
var css_248z$1 = ".wrapper-njnwX {\n position: absolute;\n top: 0px;\n}\n.tools-selector-BHV3Z {\n z-index: 2000;\n width: 36px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: 16px;\n align-items: center;\n background-color: #001529;\n color: rgba(255, 255, 255, 0.85);\n padding-top: 16px;\n height: 100%;\n}\n\n.container-BucHG {\n right: 37px;\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: #fff;\n z-index:
|
|
31422
|
+
var css_248z$1 = ".wrapper-njnwX {\n position: absolute;\n top: 0px;\n}\n.tools-selector-BHV3Z {\n z-index: 2000;\n width: 36px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: 16px;\n align-items: center;\n background-color: #001529;\n color: rgba(255, 255, 255, 0.85);\n padding-top: 16px;\n height: 100%;\n}\n\n.container-BucHG {\n right: 37px;\n height: 100%;\n width: 100%;\n position: absolute;\n background-color: #fff;\n z-index: 1100;\n}\n\n.pinned-vk2AT.container-BucHG {\n position: relative;\n right: auto;\n right: initial;\n}\n\n.draghandle-f5b0N {\n position: absolute;\n height: 100%;\n top: 0px;\n left: 0;\n width: 2px;\n cursor: ew-resize;\n background-color: gray;\n}\n\n.mid-handle--qh50 {\n position: absolute;\n width: 5px;\n height: 32px;\n background-color: #fff;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-left: 2px solid grey;\n border-right: 2px solid grey;\n}\n\n.tool-item-KyKgQ {\n writing-mode: vertical-lr;\n padding: 10px;\n text-orientation: mixed;\n cursor: pointer;\n position: relative;\n}\n\n.tool-item-KyKgQ::after {\n content: '';\n position: absolute;\n width: 3px;\n height: 0px;\n left: 0;\n bottom: 50%;\n background-color: rgba(255, 255, 255, 0.85);\n transition: all ease-in-out 0.2s;\n}\n.tool-item-KyKgQ:hover::after,\n.sel-iUm8X::after {\n height: 100%;\n bottom: 0;\n}\n";
|
|
31236
31423
|
styleInject(css_248z$1);
|
|
31237
31424
|
|
|
31238
31425
|
var overlay = "overlay-Dr5pn";
|
|
@@ -31267,6 +31454,8 @@ function Spinner() {
|
|
|
31267
31454
|
}
|
|
31268
31455
|
var Spinner$1 = observer(Spinner);
|
|
31269
31456
|
|
|
31457
|
+
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; }
|
|
31458
|
+
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; }
|
|
31270
31459
|
var Toolbar = function Toolbar(_ref) {
|
|
31271
31460
|
_objectDestructuringEmpty(_ref);
|
|
31272
31461
|
var root = useStore();
|
|
@@ -31320,9 +31509,10 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
31320
31509
|
visible: !root.contentStore.hideTools
|
|
31321
31510
|
});
|
|
31322
31511
|
break;
|
|
31323
|
-
case '
|
|
31324
|
-
ToolElement = /*#__PURE__*/jsx(
|
|
31325
|
-
|
|
31512
|
+
case 'ContentItem':
|
|
31513
|
+
ToolElement = /*#__PURE__*/jsx(WsyiwygContentItem, {
|
|
31514
|
+
tool: tool,
|
|
31515
|
+
visible: !root.contentStore.hideTools
|
|
31326
31516
|
});
|
|
31327
31517
|
break;
|
|
31328
31518
|
}
|
|
@@ -31336,9 +31526,11 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
31336
31526
|
children: [ToolElement && /*#__PURE__*/jsxs("div", {
|
|
31337
31527
|
className: classnames(container, root.contentStore.toolPinned ? pinned : undefined),
|
|
31338
31528
|
hidden: root.contentStore.hideTools,
|
|
31339
|
-
style: {
|
|
31529
|
+
style: _objectSpread$2({
|
|
31340
31530
|
width: width
|
|
31341
|
-
},
|
|
31531
|
+
}, tool !== null && tool !== void 0 && tool.offsetRight ? {
|
|
31532
|
+
right: tool.offsetRight
|
|
31533
|
+
} : {}),
|
|
31342
31534
|
children: [/*#__PURE__*/jsx(Spinner$1, {}), ToolElement, /*#__PURE__*/jsx("div", {
|
|
31343
31535
|
className: draghandle,
|
|
31344
31536
|
onMouseDown: handler,
|