@crystaldesign/diva-backoffice 24.11.0-beta.14 → 24.11.0-beta.16
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 +684 -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',
|
|
@@ -7981,6 +8018,11 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7981
8018
|
type: 'select',
|
|
7982
8019
|
mode: 'single',
|
|
7983
8020
|
allowClear: true,
|
|
8021
|
+
readonly: {
|
|
8022
|
+
field: 'state',
|
|
8023
|
+
op: 'gt',
|
|
8024
|
+
value: 3
|
|
8025
|
+
},
|
|
7984
8026
|
values: ['PROD', 'PROD_SEC', 'PROD_CLOSE', 'PROD_MILIEU', 'SHO', 'CONFIG_INFO', 'AR_INFO', 'PROD_DETAIL', 'CAT', 'PLN', 'LOG', 'FUNC', 'COMMERCIAL', 'TPL', 'ASI', 'PLT', 'CAI', 'BAN', 'INF', 'OTH', 'ART', 'OPV']
|
|
7985
8027
|
}, {
|
|
7986
8028
|
name: 'priority',
|
|
@@ -8235,6 +8277,11 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
8235
8277
|
label: t('backoffice.form.renderjob.items.functionType'),
|
|
8236
8278
|
type: 'select',
|
|
8237
8279
|
mode: 'single',
|
|
8280
|
+
readonly: {
|
|
8281
|
+
field: 'state',
|
|
8282
|
+
op: 'gt',
|
|
8283
|
+
value: 3
|
|
8284
|
+
},
|
|
8238
8285
|
allowClear: true,
|
|
8239
8286
|
values: ['PROD', 'PROD_SEC', 'PROD_CLOSE', 'PROD_MILIEU', 'SHO', 'CONFIG_INFO', 'AR_INFO', 'PROD_DETAIL', 'CAT', 'PLN', 'LOG', 'FUNC', 'COMMERCIAL', 'TPL', 'ASI', 'PLT', 'CAI', 'BAN', 'INF', 'OTH', 'ART', 'OPV']
|
|
8240
8287
|
}, {
|
|
@@ -11266,8 +11313,8 @@ function getIcon(icon) {
|
|
|
11266
11313
|
return undefined;
|
|
11267
11314
|
}
|
|
11268
11315
|
|
|
11269
|
-
function ownKeys$
|
|
11270
|
-
function _objectSpread$
|
|
11316
|
+
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; }
|
|
11317
|
+
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
11318
|
var _default$6 = /*#__PURE__*/function () {
|
|
11272
11319
|
function _default(root) {
|
|
11273
11320
|
_classCallCheck(this, _default);
|
|
@@ -11279,6 +11326,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11279
11326
|
_defineProperty(this, "_menuElement2", void 0);
|
|
11280
11327
|
_defineProperty(this, "_additionalMenuElements", []);
|
|
11281
11328
|
_defineProperty(this, "_tools", []);
|
|
11329
|
+
_defineProperty(this, "_toolsLanguage", 'de');
|
|
11282
11330
|
_defineProperty(this, "_openedToolId", undefined);
|
|
11283
11331
|
_defineProperty(this, "_hideTools", true);
|
|
11284
11332
|
_defineProperty(this, "_toolLoading", new Map());
|
|
@@ -11290,6 +11338,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11290
11338
|
if (theme) {
|
|
11291
11339
|
this._theme = theme;
|
|
11292
11340
|
}
|
|
11341
|
+
this._toolsLanguage = root.i18n.language;
|
|
11293
11342
|
}
|
|
11294
11343
|
return _createClass(_default, [{
|
|
11295
11344
|
key: "initMenu",
|
|
@@ -11366,6 +11415,14 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11366
11415
|
set: function set(val) {
|
|
11367
11416
|
this._toolPinned = val;
|
|
11368
11417
|
}
|
|
11418
|
+
}, {
|
|
11419
|
+
key: "toolsLanguage",
|
|
11420
|
+
get: function get() {
|
|
11421
|
+
return this._toolsLanguage;
|
|
11422
|
+
},
|
|
11423
|
+
set: function set(lang) {
|
|
11424
|
+
this._toolsLanguage = lang;
|
|
11425
|
+
}
|
|
11369
11426
|
}, {
|
|
11370
11427
|
key: "isToolLoading",
|
|
11371
11428
|
get: function get() {
|
|
@@ -11389,7 +11446,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11389
11446
|
if (index >= 0) {
|
|
11390
11447
|
this._additionalMenuElements[index] = {
|
|
11391
11448
|
key: key,
|
|
11392
|
-
element: _objectSpread$
|
|
11449
|
+
element: _objectSpread$I(_objectSpread$I({}, this._additionalMenuElements[index].element), {}, {
|
|
11393
11450
|
items: items,
|
|
11394
11451
|
selected: selected
|
|
11395
11452
|
})
|
|
@@ -11432,13 +11489,15 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11432
11489
|
key: "updateSelectedMenuKeys",
|
|
11433
11490
|
value: function updateSelectedMenuKeys(key, element, skipFill) {
|
|
11434
11491
|
var _this$_menu$find,
|
|
11435
|
-
_this2 = this
|
|
11492
|
+
_this2 = this,
|
|
11493
|
+
_this$root$resetError,
|
|
11494
|
+
_this$root;
|
|
11436
11495
|
if (!skipFill) {
|
|
11437
11496
|
this._selectedMenuKeys = this.fillSelectedUntilFistLeaf(element.menu, this._selectedMenuKeys, element.pos, key);
|
|
11438
11497
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
11439
11498
|
this.root.navigate('/' + path);
|
|
11440
11499
|
}
|
|
11441
|
-
this._menuElement1 = _objectSpread$
|
|
11500
|
+
this._menuElement1 = _objectSpread$I(_objectSpread$I({}, this.menuElement1), {}, {
|
|
11442
11501
|
selected: this._selectedMenuKeys[0]
|
|
11443
11502
|
});
|
|
11444
11503
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -11465,6 +11524,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11465
11524
|
this._additionalMenuElements = [];
|
|
11466
11525
|
this.root.detailStore.closeLeftDetail();
|
|
11467
11526
|
this.root.detailStore.closeRightDetail();
|
|
11527
|
+
(_this$root$resetError = (_this$root = this.root).resetErrorBoundary) === null || _this$root$resetError === void 0 || _this$root$resetError.call(_this$root);
|
|
11468
11528
|
}
|
|
11469
11529
|
}, {
|
|
11470
11530
|
key: "onToggleOpenMenuElement",
|
|
@@ -11681,7 +11741,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11681
11741
|
return items.filter(function (item) {
|
|
11682
11742
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
11683
11743
|
}).map(function (item) {
|
|
11684
|
-
return _objectSpread$
|
|
11744
|
+
return _objectSpread$I(_objectSpread$I({}, item), {}, {
|
|
11685
11745
|
items: item.items ? _this4.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
11686
11746
|
subMenu: item.subMenu ? _this4.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
11687
11747
|
});
|
|
@@ -12748,13 +12808,13 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
12748
12808
|
}]);
|
|
12749
12809
|
}();
|
|
12750
12810
|
|
|
12751
|
-
function _callSuper$
|
|
12752
|
-
function _isNativeReflectConstruct$
|
|
12811
|
+
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)); }
|
|
12812
|
+
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12753
12813
|
var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
12754
12814
|
function _default(configuration, rootStore) {
|
|
12755
12815
|
var _this;
|
|
12756
12816
|
_classCallCheck(this, _default);
|
|
12757
|
-
_this = _callSuper$
|
|
12817
|
+
_this = _callSuper$1(this, _default, [configuration, rootStore]);
|
|
12758
12818
|
_defineProperty(_this, "presetApiHandler", void 0);
|
|
12759
12819
|
_defineProperty(_this, "test", '');
|
|
12760
12820
|
_this.presetApiHandler = new _default$d({
|
|
@@ -12767,9 +12827,9 @@ var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
12767
12827
|
}(_default$d);
|
|
12768
12828
|
|
|
12769
12829
|
var _default$1 = /*#__PURE__*/function () {
|
|
12770
|
-
function _default(actions, handler,
|
|
12830
|
+
function _default(actions, handler, i18n, navigate, navigationState) {
|
|
12771
12831
|
_classCallCheck(this, _default);
|
|
12772
|
-
this.
|
|
12832
|
+
this.i18n = i18n;
|
|
12773
12833
|
this.navigate = navigate;
|
|
12774
12834
|
_defineProperty(this, "detailStore", void 0);
|
|
12775
12835
|
_defineProperty(this, "modalStore", void 0);
|
|
@@ -12779,10 +12839,11 @@ var _default$1 = /*#__PURE__*/function () {
|
|
|
12779
12839
|
_defineProperty(this, "downloadStore", void 0);
|
|
12780
12840
|
_defineProperty(this, "actions", void 0);
|
|
12781
12841
|
_defineProperty(this, "handler", void 0);
|
|
12782
|
-
_defineProperty(this, "error", void 0);
|
|
12783
12842
|
_defineProperty(this, "showSnow", void 0);
|
|
12784
12843
|
_defineProperty(this, "translationService", undefined);
|
|
12785
12844
|
_defineProperty(this, "navigationState", void 0);
|
|
12845
|
+
_defineProperty(this, "error", void 0);
|
|
12846
|
+
_defineProperty(this, "resetErrorBoundary", undefined);
|
|
12786
12847
|
this.actions = actions;
|
|
12787
12848
|
this.handler = handler;
|
|
12788
12849
|
this.navigationState = navigationState;
|
|
@@ -12808,6 +12869,16 @@ var _default$1 = /*#__PURE__*/function () {
|
|
|
12808
12869
|
value: function addError(error) {
|
|
12809
12870
|
this.error = error;
|
|
12810
12871
|
}
|
|
12872
|
+
}, {
|
|
12873
|
+
key: "t",
|
|
12874
|
+
get: function get() {
|
|
12875
|
+
return this.i18n.t;
|
|
12876
|
+
}
|
|
12877
|
+
}, {
|
|
12878
|
+
key: "setResetErrorBoundary",
|
|
12879
|
+
value: function setResetErrorBoundary(resetErrorBoundary) {
|
|
12880
|
+
this.resetErrorBoundary = resetErrorBoundary;
|
|
12881
|
+
}
|
|
12811
12882
|
}, {
|
|
12812
12883
|
key: "getGlobalValue",
|
|
12813
12884
|
value: function getGlobalValue(key) {
|
|
@@ -12888,7 +12959,7 @@ var StoreProvider = function StoreProvider(_ref) {
|
|
|
12888
12959
|
searchParams = _useSearchParams2[0];
|
|
12889
12960
|
var location = useLocation();
|
|
12890
12961
|
var navigate = useNavigate();
|
|
12891
|
-
var _useState = useState(new _default$1(actions, handler,
|
|
12962
|
+
var _useState = useState(new _default$1(actions, handler, i18n, navigate, {
|
|
12892
12963
|
searchParams: searchParams,
|
|
12893
12964
|
path: (_location$pathname = location.pathname) !== null && _location$pathname !== void 0 ? _location$pathname : '/'
|
|
12894
12965
|
})),
|
|
@@ -12945,8 +13016,8 @@ function removeEmpty(data) {
|
|
|
12945
13016
|
return undefined;
|
|
12946
13017
|
}
|
|
12947
13018
|
|
|
12948
|
-
function ownKeys$
|
|
12949
|
-
function _objectSpread$
|
|
13019
|
+
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; }
|
|
13020
|
+
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
13021
|
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
13022
|
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
13023
|
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 +13115,7 @@ function useFormData (_ref) {
|
|
|
13044
13115
|
multipleEditingData = inboundData;
|
|
13045
13116
|
}
|
|
13046
13117
|
return {
|
|
13047
|
-
loadedData: onLoadFields(_objectSpread$
|
|
13118
|
+
loadedData: onLoadFields(_objectSpread$H({}, dt)),
|
|
13048
13119
|
multipleEditingData: multipleEditingData
|
|
13049
13120
|
};
|
|
13050
13121
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -13081,7 +13152,7 @@ function useFormData (_ref) {
|
|
|
13081
13152
|
setFieldErrors = _useState14[1];
|
|
13082
13153
|
useEffect(function () {
|
|
13083
13154
|
var _loadedData$_id2;
|
|
13084
|
-
setState(_objectSpread$
|
|
13155
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13085
13156
|
data: loadedData,
|
|
13086
13157
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
13087
13158
|
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 +13247,7 @@ function useFormData (_ref) {
|
|
|
13176
13247
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
13177
13248
|
while (1) switch (_context2.prev = _context2.next) {
|
|
13178
13249
|
case 0:
|
|
13179
|
-
newData = merge$1(_objectSpread$
|
|
13250
|
+
newData = merge$1(_objectSpread$H({}, state.data), values);
|
|
13180
13251
|
if (!skipApi) {
|
|
13181
13252
|
_context2.next = 3;
|
|
13182
13253
|
break;
|
|
@@ -13184,12 +13255,12 @@ function useFormData (_ref) {
|
|
|
13184
13255
|
return _context2.abrupt("return", newData);
|
|
13185
13256
|
case 3:
|
|
13186
13257
|
_context2.next = 5;
|
|
13187
|
-
return setDynamicFields(_objectSpread$
|
|
13258
|
+
return setDynamicFields(_objectSpread$H({}, state.data), newData);
|
|
13188
13259
|
case 5:
|
|
13189
13260
|
newData = _context2.sent;
|
|
13190
|
-
newData = onSaveFields(_objectSpread$
|
|
13261
|
+
newData = onSaveFields(_objectSpread$H({}, state.data), newData);
|
|
13191
13262
|
newData = removeEmpty(newData);
|
|
13192
|
-
setState(_objectSpread$
|
|
13263
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13193
13264
|
loading: true
|
|
13194
13265
|
}));
|
|
13195
13266
|
finalData = state.data;
|
|
@@ -13238,13 +13309,13 @@ function useFormData (_ref) {
|
|
|
13238
13309
|
_context2.next = 37;
|
|
13239
13310
|
break;
|
|
13240
13311
|
}
|
|
13241
|
-
setFieldErrors(_objectSpread$
|
|
13312
|
+
setFieldErrors(_objectSpread$H(_objectSpread$H({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
13242
13313
|
return _context2.abrupt("return", undefined);
|
|
13243
13314
|
case 37:
|
|
13244
13315
|
throw _context2.t0;
|
|
13245
13316
|
case 38:
|
|
13246
13317
|
_context2.prev = 38;
|
|
13247
|
-
setState(_objectSpread$
|
|
13318
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13248
13319
|
data: finalData,
|
|
13249
13320
|
loading: false
|
|
13250
13321
|
}));
|
|
@@ -13274,7 +13345,7 @@ function useFormData (_ref) {
|
|
|
13274
13345
|
}
|
|
13275
13346
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
13276
13347
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
13277
|
-
var wholeData = Object.assign(_objectSpread$
|
|
13348
|
+
var wholeData = Object.assign(_objectSpread$H({}, state.data), _objectSpread$H({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
13278
13349
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
13279
13350
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
13280
13351
|
setHiddenRequiredDisabled(newState);
|
|
@@ -13287,18 +13358,41 @@ function useFormData (_ref) {
|
|
|
13287
13358
|
}
|
|
13288
13359
|
};
|
|
13289
13360
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
13290
|
-
var data = d !== null && d !== void 0 ? d :
|
|
13361
|
+
var data = d !== null && d !== void 0 ? d : deepMerge({}, state.data, state.form.getFieldsValue());
|
|
13291
13362
|
if (id) {
|
|
13292
13363
|
setFieldInObject(id, data, value);
|
|
13293
|
-
var newFieldErrors = _objectSpread$
|
|
13364
|
+
var newFieldErrors = _objectSpread$H({}, fieldErrors);
|
|
13294
13365
|
delete newFieldErrors[id.toString()];
|
|
13295
13366
|
setFieldErrors(newFieldErrors);
|
|
13296
13367
|
}
|
|
13297
|
-
setState(_objectSpread$
|
|
13368
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13298
13369
|
data: data
|
|
13299
13370
|
}));
|
|
13300
13371
|
return data;
|
|
13301
13372
|
};
|
|
13373
|
+
|
|
13374
|
+
// had to be progammed custom because we need to remove array entrys when they are missing in data2 and still are in data1
|
|
13375
|
+
function isObject(item) {
|
|
13376
|
+
return item && _typeof(item) === 'object' && !Array.isArray(item);
|
|
13377
|
+
}
|
|
13378
|
+
function deepMerge(target) {
|
|
13379
|
+
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key2 = 1; _key2 < _len; _key2++) {
|
|
13380
|
+
sources[_key2 - 1] = arguments[_key2];
|
|
13381
|
+
}
|
|
13382
|
+
if (!sources.length) return target;
|
|
13383
|
+
var source = sources.shift();
|
|
13384
|
+
if (isObject(target) && isObject(source)) {
|
|
13385
|
+
for (var _key3 in source) {
|
|
13386
|
+
if (isObject(source[_key3])) {
|
|
13387
|
+
if (!target[_key3]) Object.assign(target, _defineProperty({}, _key3, {}));
|
|
13388
|
+
deepMerge(target[_key3], source[_key3]);
|
|
13389
|
+
} else {
|
|
13390
|
+
Object.assign(target, _defineProperty({}, _key3, source[_key3]));
|
|
13391
|
+
}
|
|
13392
|
+
}
|
|
13393
|
+
}
|
|
13394
|
+
return deepMerge.apply(void 0, [target].concat(sources));
|
|
13395
|
+
}
|
|
13302
13396
|
var setNewData = function setNewData(newData, orig) {
|
|
13303
13397
|
if (usedPreset.used === true) {
|
|
13304
13398
|
var usdPreset = presets.data[usedPreset.index];
|
|
@@ -13320,12 +13414,12 @@ function useFormData (_ref) {
|
|
|
13320
13414
|
var _value$value;
|
|
13321
13415
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
13322
13416
|
if (configuration.itemSelectorReset) {
|
|
13323
|
-
setState(_objectSpread$
|
|
13417
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13324
13418
|
data: _defineProperty({}, name, val)
|
|
13325
13419
|
}));
|
|
13326
13420
|
} else {
|
|
13327
|
-
setState(_objectSpread$
|
|
13328
|
-
data: _objectSpread$
|
|
13421
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13422
|
+
data: _objectSpread$H(_objectSpread$H({}, state.data), {}, _defineProperty({}, name, val))
|
|
13329
13423
|
}));
|
|
13330
13424
|
}
|
|
13331
13425
|
setSelectedItemsIndex(idx);
|
|
@@ -13335,12 +13429,12 @@ function useFormData (_ref) {
|
|
|
13335
13429
|
var val = _ref6.value;
|
|
13336
13430
|
if (value === val) {
|
|
13337
13431
|
if (configuration.itemSelectorReset) {
|
|
13338
|
-
setState(_objectSpread$
|
|
13432
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13339
13433
|
data: _defineProperty({}, name, val)
|
|
13340
13434
|
}));
|
|
13341
13435
|
} else {
|
|
13342
|
-
setState(_objectSpread$
|
|
13343
|
-
data: _objectSpread$
|
|
13436
|
+
setState(_objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13437
|
+
data: _objectSpread$H(_objectSpread$H({}, state.data), {}, _defineProperty({}, name, val))
|
|
13344
13438
|
}));
|
|
13345
13439
|
}
|
|
13346
13440
|
setSelectedItemsIndex(idx);
|
|
@@ -13483,7 +13577,30 @@ function useFormData (_ref) {
|
|
|
13483
13577
|
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
13578
|
return hidden;
|
|
13485
13579
|
};
|
|
13486
|
-
|
|
13580
|
+
|
|
13581
|
+
//updating tools
|
|
13582
|
+
useEffect(function () {
|
|
13583
|
+
var _configuration$tools;
|
|
13584
|
+
if ((_configuration$tools = configuration.tools) !== null && _configuration$tools !== void 0 && _configuration$tools.length) {
|
|
13585
|
+
var tools = [];
|
|
13586
|
+
for (var i = 0; i < configuration.tools.length; i++) {
|
|
13587
|
+
var tool = configuration.tools[i];
|
|
13588
|
+
tools.push(_objectSpread$H({
|
|
13589
|
+
parameters: {
|
|
13590
|
+
data: state.data
|
|
13591
|
+
},
|
|
13592
|
+
startWidth: 600,
|
|
13593
|
+
offsetRight: 1037
|
|
13594
|
+
}, tool));
|
|
13595
|
+
}
|
|
13596
|
+
root.contentStore.tools = tools;
|
|
13597
|
+
return function () {
|
|
13598
|
+
root.contentStore.tools = [];
|
|
13599
|
+
};
|
|
13600
|
+
}
|
|
13601
|
+
return;
|
|
13602
|
+
}, [state.data]);
|
|
13603
|
+
return _objectSpread$H(_objectSpread$H({}, state), {}, {
|
|
13487
13604
|
getIsHidden: getIsHidden,
|
|
13488
13605
|
setUsedPreset: setUsedPreset,
|
|
13489
13606
|
configuration: configuration,
|
|
@@ -13595,8 +13712,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
13595
13712
|
});
|
|
13596
13713
|
};
|
|
13597
13714
|
|
|
13598
|
-
function ownKeys$
|
|
13599
|
-
function _objectSpread$
|
|
13715
|
+
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; }
|
|
13716
|
+
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
13717
|
var FormList$2 = function FormList(_ref) {
|
|
13601
13718
|
var _item$initialValue;
|
|
13602
13719
|
var value = _ref.value,
|
|
@@ -13645,7 +13762,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
13645
13762
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
13646
13763
|
help: state.fieldErrors[n.toString()],
|
|
13647
13764
|
hidden: hidden,
|
|
13648
|
-
children: getElement(_objectSpread$
|
|
13765
|
+
children: getElement(_objectSpread$G(_objectSpread$G({}, i), {}, {
|
|
13649
13766
|
name: n
|
|
13650
13767
|
}), state.data, setCanSave, state, state.onInputChanged, onError, root, form, hidden)
|
|
13651
13768
|
}, idx);
|
|
@@ -13883,8 +14000,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
13883
14000
|
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
14001
|
styleInject(css_248z$n);
|
|
13885
14002
|
|
|
13886
|
-
function ownKeys$
|
|
13887
|
-
function _objectSpread$
|
|
14003
|
+
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; }
|
|
14004
|
+
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
14005
|
var SubTitle = function SubTitle(_ref) {
|
|
13889
14006
|
var _item$orientation, _item$buttonIds;
|
|
13890
14007
|
var item = _ref.item,
|
|
@@ -13893,7 +14010,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
13893
14010
|
t = _useTranslation.t;
|
|
13894
14011
|
return /*#__PURE__*/jsx(Divider, {
|
|
13895
14012
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
13896
|
-
style: _objectSpread$
|
|
14013
|
+
style: _objectSpread$F({}, item.style),
|
|
13897
14014
|
children: /*#__PURE__*/jsxs("div", {
|
|
13898
14015
|
className: wrapper$5,
|
|
13899
14016
|
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 +14254,8 @@ var css_248z$m = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\
|
|
|
14137
14254
|
styleInject(css_248z$m);
|
|
14138
14255
|
|
|
14139
14256
|
var _excluded$3 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title"];
|
|
14140
|
-
function ownKeys$
|
|
14141
|
-
function _objectSpread$
|
|
14257
|
+
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; }
|
|
14258
|
+
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
14259
|
var SelectWrapper$1 = function SelectWrapper(_ref) {
|
|
14143
14260
|
var apiInterface = _ref.apiInterface,
|
|
14144
14261
|
selectMapping = _ref.selectMapping,
|
|
@@ -14162,7 +14279,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref) {
|
|
|
14162
14279
|
});
|
|
14163
14280
|
return /*#__PURE__*/jsxs("div", {
|
|
14164
14281
|
className: classnames(title ? wrapper$4 : undefined),
|
|
14165
|
-
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$
|
|
14282
|
+
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$E(_objectSpread$E({}, selectProps), {}, {
|
|
14166
14283
|
showSearch: search,
|
|
14167
14284
|
loading: state.loading,
|
|
14168
14285
|
options: state.options,
|
|
@@ -14208,14 +14325,14 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
14208
14325
|
});
|
|
14209
14326
|
};
|
|
14210
14327
|
|
|
14211
|
-
function _callSuper
|
|
14212
|
-
function _isNativeReflectConstruct
|
|
14328
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
14329
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14213
14330
|
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
14331
|
var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
14215
14332
|
function _default(configuration, rootStore) {
|
|
14216
14333
|
var _this;
|
|
14217
14334
|
_classCallCheck(this, _default);
|
|
14218
|
-
_this = _callSuper
|
|
14335
|
+
_this = _callSuper(this, _default, [configuration, rootStore]);
|
|
14219
14336
|
_defineProperty(_this, "_accountSessionData", void 0);
|
|
14220
14337
|
_defineProperty(_this, "_api2Location", void 0);
|
|
14221
14338
|
_defineProperty(_this, "_sessionGuid", void 0);
|
|
@@ -14793,8 +14910,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
14793
14910
|
}]);
|
|
14794
14911
|
}(_default$d);
|
|
14795
14912
|
|
|
14796
|
-
function ownKeys$
|
|
14797
|
-
function _objectSpread$
|
|
14913
|
+
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; }
|
|
14914
|
+
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
14915
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
14799
14916
|
function useSelectClientRelationCatalog (_ref) {
|
|
14800
14917
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -14963,7 +15080,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
14963
15080
|
case 22:
|
|
14964
15081
|
supplierData = _context2.sent;
|
|
14965
15082
|
case 23:
|
|
14966
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
15083
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$D(_objectSpread$D({}, _selectedSupplier), {}, {
|
|
14967
15084
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
14968
15085
|
}), supplierData);
|
|
14969
15086
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -15184,8 +15301,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
15184
15301
|
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
15302
|
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
15303
|
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$
|
|
15304
|
+
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; }
|
|
15305
|
+
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
15306
|
function useSelectData (_ref) {
|
|
15190
15307
|
var data = _ref.data,
|
|
15191
15308
|
onChange = _ref.onChange,
|
|
@@ -15298,7 +15415,7 @@ function useSelectData (_ref) {
|
|
|
15298
15415
|
if (initalValue == undefined) {
|
|
15299
15416
|
setInitValue(newData);
|
|
15300
15417
|
}
|
|
15301
|
-
var initData = isArray(newData) ? newData : [newData];
|
|
15418
|
+
var initData = Array.isArray(newData) ? newData : [newData];
|
|
15302
15419
|
var value = initData.map(function (d) {
|
|
15303
15420
|
var _d$data, _d$_id, _d$selectMapping$valu, _d$data2, _ref2, _d$value, _d$data3;
|
|
15304
15421
|
return {
|
|
@@ -15366,7 +15483,7 @@ function useSelectData (_ref) {
|
|
|
15366
15483
|
setFetching(true);
|
|
15367
15484
|
serverSideParams = {
|
|
15368
15485
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
15369
|
-
return _objectSpread$
|
|
15486
|
+
return _objectSpread$C(_objectSpread$C({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
15370
15487
|
}, {}) : {
|
|
15371
15488
|
_id: [value, 'contains']
|
|
15372
15489
|
},
|
|
@@ -15658,14 +15775,17 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
15658
15775
|
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
15776
|
styleInject(css_248z$j);
|
|
15660
15777
|
|
|
15661
|
-
function ownKeys$
|
|
15662
|
-
function _objectSpread$
|
|
15778
|
+
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; }
|
|
15779
|
+
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
15780
|
var LOG$8 = getLogger('Backoffice', 'Translation Form');
|
|
15664
15781
|
function useTranslationHook (item, state) {
|
|
15665
15782
|
var root = useStore();
|
|
15666
15783
|
var _useDivaCore = useDivaCore(),
|
|
15667
15784
|
toggleLoading = _useDivaCore.actions.toggleLoading;
|
|
15668
|
-
var
|
|
15785
|
+
var _useTranslation = useTranslation(),
|
|
15786
|
+
t = _useTranslation.t,
|
|
15787
|
+
i18n = _useTranslation.i18n;
|
|
15788
|
+
var _useState = useState(i18n.language),
|
|
15669
15789
|
_useState2 = _slicedToArray(_useState, 2),
|
|
15670
15790
|
currentLang = _useState2[0],
|
|
15671
15791
|
setCurrentLang = _useState2[1];
|
|
@@ -15678,111 +15798,109 @@ function useTranslationHook (item, state) {
|
|
|
15678
15798
|
};
|
|
15679
15799
|
}, [item]),
|
|
15680
15800
|
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
|
-
}];
|
|
15801
|
+
var langs = ['de', 'it', 'fr', 'en'];
|
|
15802
|
+
var options = langs.map(function (l) {
|
|
15803
|
+
return {
|
|
15804
|
+
value: l,
|
|
15805
|
+
label: t('backoffice.form.applicationtranslationedit.items.' + l)
|
|
15806
|
+
};
|
|
15807
|
+
});
|
|
15694
15808
|
var autoTranslate = /*#__PURE__*/function () {
|
|
15695
15809
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
15696
|
-
var itemsToTranslate,
|
|
15810
|
+
var itemsToTranslate, i, _itemsToTranslate$i, name, value, translation, lang;
|
|
15697
15811
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
15698
15812
|
while (1) switch (_context.prev = _context.next) {
|
|
15699
15813
|
case 0:
|
|
15700
15814
|
toggleLoading('TRANSLATION');
|
|
15701
15815
|
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);
|
|
15816
|
+
itemsToTranslate = getItemsToTranslate(currentLang);
|
|
15725
15817
|
i = 0;
|
|
15726
|
-
case
|
|
15818
|
+
case 4:
|
|
15727
15819
|
if (!(i < itemsToTranslate.length)) {
|
|
15728
|
-
_context.next =
|
|
15820
|
+
_context.next = 29;
|
|
15729
15821
|
break;
|
|
15730
15822
|
}
|
|
15731
15823
|
_itemsToTranslate$i = itemsToTranslate[i], name = _itemsToTranslate$i.name, value = _itemsToTranslate$i.value;
|
|
15732
15824
|
if (!(value === undefined || isValidURL(value))) {
|
|
15733
|
-
_context.next =
|
|
15825
|
+
_context.next = 8;
|
|
15734
15826
|
break;
|
|
15735
15827
|
}
|
|
15736
|
-
return _context.abrupt("continue",
|
|
15737
|
-
case
|
|
15828
|
+
return _context.abrupt("continue", 26);
|
|
15829
|
+
case 8:
|
|
15738
15830
|
translation = void 0;
|
|
15739
|
-
_context.prev =
|
|
15740
|
-
_context.next =
|
|
15831
|
+
_context.prev = 9;
|
|
15832
|
+
_context.next = 12;
|
|
15741
15833
|
return getTranslation(currentLang, value);
|
|
15742
|
-
case
|
|
15834
|
+
case 12:
|
|
15743
15835
|
translation = _context.sent;
|
|
15744
15836
|
_context.t0 = _regeneratorRuntime.keys(translation);
|
|
15745
|
-
case
|
|
15837
|
+
case 14:
|
|
15746
15838
|
if ((_context.t1 = _context.t0()).done) {
|
|
15747
|
-
_context.next =
|
|
15839
|
+
_context.next = 21;
|
|
15748
15840
|
break;
|
|
15749
15841
|
}
|
|
15750
15842
|
lang = _context.t1.value;
|
|
15751
15843
|
if (!(lang == currentLang)) {
|
|
15752
|
-
_context.next =
|
|
15844
|
+
_context.next = 18;
|
|
15753
15845
|
break;
|
|
15754
15846
|
}
|
|
15755
|
-
return _context.abrupt("continue",
|
|
15756
|
-
case
|
|
15847
|
+
return _context.abrupt("continue", 14);
|
|
15848
|
+
case 18:
|
|
15757
15849
|
state.onInputChanged([].concat(_toConsumableArray(name), [lang]), translation[lang]);
|
|
15758
|
-
_context.next =
|
|
15850
|
+
_context.next = 14;
|
|
15759
15851
|
break;
|
|
15760
|
-
case
|
|
15761
|
-
_context.next =
|
|
15852
|
+
case 21:
|
|
15853
|
+
_context.next = 26;
|
|
15762
15854
|
break;
|
|
15763
|
-
case
|
|
15764
|
-
_context.prev =
|
|
15765
|
-
_context.t2 = _context["catch"](
|
|
15855
|
+
case 23:
|
|
15856
|
+
_context.prev = 23;
|
|
15857
|
+
_context.t2 = _context["catch"](9);
|
|
15766
15858
|
LOG$8.error({
|
|
15767
15859
|
message: 'Error on translating ' + value,
|
|
15768
15860
|
name: ''
|
|
15769
15861
|
});
|
|
15770
|
-
case
|
|
15862
|
+
case 26:
|
|
15771
15863
|
i++;
|
|
15772
|
-
_context.next =
|
|
15864
|
+
_context.next = 4;
|
|
15773
15865
|
break;
|
|
15774
|
-
case
|
|
15866
|
+
case 29:
|
|
15775
15867
|
toggleLoading('TRANSLATION');
|
|
15776
|
-
case
|
|
15868
|
+
case 30:
|
|
15777
15869
|
case "end":
|
|
15778
15870
|
return _context.stop();
|
|
15779
15871
|
}
|
|
15780
|
-
}, _callee, null, [[
|
|
15872
|
+
}, _callee, null, [[9, 23]]);
|
|
15781
15873
|
}));
|
|
15782
15874
|
return function autoTranslate() {
|
|
15783
15875
|
return _ref.apply(this, arguments);
|
|
15784
15876
|
};
|
|
15785
15877
|
}();
|
|
15878
|
+
var getItemsToTranslate = function getItemsToTranslate(lang) {
|
|
15879
|
+
var itemsToTranslate = [];
|
|
15880
|
+
var _getToTranslateItems = function getToTranslateItems(items) {
|
|
15881
|
+
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : state.data;
|
|
15882
|
+
var namePrefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
15883
|
+
for (var i = 0; i < items.length; i++) {
|
|
15884
|
+
var im = items[i];
|
|
15885
|
+
var itemNameAsArray = Array.isArray(im.name) ? im.name : [im.name];
|
|
15886
|
+
if (im.doTranslate) {
|
|
15887
|
+
itemsToTranslate.push({
|
|
15888
|
+
name: [].concat(_toConsumableArray(namePrefix), _toConsumableArray(itemNameAsArray)),
|
|
15889
|
+
value: state.getData([].concat(_toConsumableArray(itemNameAsArray), _toConsumableArray(lang ? [lang] : [])), data)
|
|
15890
|
+
});
|
|
15891
|
+
}
|
|
15892
|
+
if (im.type == 'array') {
|
|
15893
|
+
var arrayData = state.getData(im.name, state.data);
|
|
15894
|
+
for (var j = 0; j < arrayData.length; j++) {
|
|
15895
|
+
var d = arrayData[j];
|
|
15896
|
+
_getToTranslateItems(im.items, d, [].concat(_toConsumableArray(itemNameAsArray), [j]));
|
|
15897
|
+
}
|
|
15898
|
+
}
|
|
15899
|
+
}
|
|
15900
|
+
};
|
|
15901
|
+
_getToTranslateItems(item.items);
|
|
15902
|
+
return itemsToTranslate;
|
|
15903
|
+
};
|
|
15786
15904
|
var getTranslation = /*#__PURE__*/function () {
|
|
15787
15905
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(lang, value) {
|
|
15788
15906
|
var result;
|
|
@@ -15791,7 +15909,7 @@ function useTranslationHook (item, state) {
|
|
|
15791
15909
|
case 0:
|
|
15792
15910
|
_context2.next = 2;
|
|
15793
15911
|
return apiHandler.create({
|
|
15794
|
-
locales: _objectSpread$
|
|
15912
|
+
locales: _objectSpread$B({
|
|
15795
15913
|
de: {},
|
|
15796
15914
|
it: {},
|
|
15797
15915
|
fr: {},
|
|
@@ -15829,6 +15947,7 @@ function useTranslationHook (item, state) {
|
|
|
15829
15947
|
};
|
|
15830
15948
|
var onChange = function onChange(value) {
|
|
15831
15949
|
state.onInputChanged();
|
|
15950
|
+
root.contentStore.toolsLanguage = value;
|
|
15832
15951
|
setCurrentLang(value);
|
|
15833
15952
|
};
|
|
15834
15953
|
return {
|
|
@@ -15839,8 +15958,8 @@ function useTranslationHook (item, state) {
|
|
|
15839
15958
|
};
|
|
15840
15959
|
}
|
|
15841
15960
|
|
|
15842
|
-
function ownKeys$
|
|
15843
|
-
function _objectSpread$
|
|
15961
|
+
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; }
|
|
15962
|
+
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
15963
|
var Translation = function Translation(_ref) {
|
|
15845
15964
|
var item = _ref.item,
|
|
15846
15965
|
state = _ref.state,
|
|
@@ -15888,7 +16007,7 @@ var Translation = function Translation(_ref) {
|
|
|
15888
16007
|
var hidden = state.getIsHidden(i, data);
|
|
15889
16008
|
return /*#__PURE__*/jsx(Fragment, {
|
|
15890
16009
|
children: ['subTitle', 'array'].includes(i.type) ? /*#__PURE__*/jsx(Fragment, {
|
|
15891
|
-
children: getElement(_objectSpread$
|
|
16010
|
+
children: getElement(_objectSpread$A(_objectSpread$A({}, i), {}, {
|
|
15892
16011
|
name: n
|
|
15893
16012
|
}), state.data, setCanSave, state, state.onInputChanged, onError, root, form, hidden, currentLang)
|
|
15894
16013
|
}) : /*#__PURE__*/jsx(Form$1.Item, {
|
|
@@ -15902,7 +16021,7 @@ var Translation = function Translation(_ref) {
|
|
|
15902
16021
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
15903
16022
|
help: state.fieldErrors[n.toString()],
|
|
15904
16023
|
hidden: hidden,
|
|
15905
|
-
children: getElement(_objectSpread$
|
|
16024
|
+
children: getElement(_objectSpread$A(_objectSpread$A({}, i), {}, {
|
|
15906
16025
|
name: n
|
|
15907
16026
|
}), state.data, setCanSave, state, state.onInputChanged, onError, root, form, hidden)
|
|
15908
16027
|
}, idx)
|
|
@@ -15918,8 +16037,8 @@ var Translation$1 = observer(Translation, {
|
|
|
15918
16037
|
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
16038
|
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
16039
|
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$
|
|
16040
|
+
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; }
|
|
16041
|
+
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
16042
|
function getElement(item, data, setCanSave, state, _onChange, _onError, root, form, hidden, postFixName) {
|
|
15924
16043
|
var _isReadonly, _state$hiddenRequired;
|
|
15925
16044
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -15953,7 +16072,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
15953
16072
|
}
|
|
15954
16073
|
});
|
|
15955
16074
|
case 'selectSimple':
|
|
15956
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
16075
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$z(_objectSpread$z({}, item), {}, {
|
|
15957
16076
|
disabled: disabled,
|
|
15958
16077
|
onChange: function onChange(value) {
|
|
15959
16078
|
_onChange(name, value);
|
|
@@ -15996,7 +16115,10 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
15996
16115
|
addonAfter: item.suffix,
|
|
15997
16116
|
disabled: disabled,
|
|
15998
16117
|
value: item.value,
|
|
15999
|
-
placeholder: item.placeholder
|
|
16118
|
+
placeholder: item.placeholder,
|
|
16119
|
+
onBlur: function onBlur() {
|
|
16120
|
+
return state.onInputChanged();
|
|
16121
|
+
}
|
|
16000
16122
|
});
|
|
16001
16123
|
case 'detailaction':
|
|
16002
16124
|
return /*#__PURE__*/jsx(Button, {
|
|
@@ -16140,7 +16262,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
16140
16262
|
value: item.value,
|
|
16141
16263
|
options: item.options.map(function (o) {
|
|
16142
16264
|
var _o$disabled;
|
|
16143
|
-
return _objectSpread$
|
|
16265
|
+
return _objectSpread$z(_objectSpread$z({}, o), {}, {
|
|
16144
16266
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, data)
|
|
16145
16267
|
});
|
|
16146
16268
|
}),
|
|
@@ -16162,7 +16284,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
16162
16284
|
},
|
|
16163
16285
|
icon: item.icon,
|
|
16164
16286
|
callback: function callback(data) {
|
|
16165
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
16287
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$z(_objectSpread$z({}, state.data), data));
|
|
16166
16288
|
}
|
|
16167
16289
|
});
|
|
16168
16290
|
default:
|
|
@@ -16172,7 +16294,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
16172
16294
|
function DisplayInput(props) {
|
|
16173
16295
|
var _useTranslation = useTranslation(),
|
|
16174
16296
|
t = _useTranslation.t;
|
|
16175
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
16297
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$z(_objectSpread$z({}, props), {}, {
|
|
16176
16298
|
disabled: true,
|
|
16177
16299
|
value: t(props.translationPrefix + '.' + props.value)
|
|
16178
16300
|
}));
|
|
@@ -16190,8 +16312,8 @@ function isReadonly(item, data) {
|
|
|
16190
16312
|
return false;
|
|
16191
16313
|
}
|
|
16192
16314
|
|
|
16193
|
-
function ownKeys$
|
|
16194
|
-
function _objectSpread$
|
|
16315
|
+
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; }
|
|
16316
|
+
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
16317
|
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
16318
|
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
16319
|
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 +16363,13 @@ var Presets = function Presets(_ref) {
|
|
|
16241
16363
|
} finally {
|
|
16242
16364
|
_iterator.f();
|
|
16243
16365
|
}
|
|
16244
|
-
var data = _objectSpread$
|
|
16366
|
+
var data = _objectSpread$y(_objectSpread$y({}, form.getFieldsValue(names)), {}, {
|
|
16245
16367
|
newPresetName: newPresetName
|
|
16246
16368
|
});
|
|
16247
16369
|
data.dpi = parseInt(data.dpi);
|
|
16248
16370
|
data.organization = root.getGlobalValue('organizationId');
|
|
16249
16371
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
16250
|
-
var dt = _objectSpread$
|
|
16372
|
+
var dt = _objectSpread$y(_objectSpread$y({}, form.getFieldsValue(names)), {}, {
|
|
16251
16373
|
name: newPresetName
|
|
16252
16374
|
});
|
|
16253
16375
|
setPresets({
|
|
@@ -16568,8 +16690,8 @@ var Form = observer(FormWrapper$1, {
|
|
|
16568
16690
|
forwardRef: true
|
|
16569
16691
|
});
|
|
16570
16692
|
|
|
16571
|
-
function ownKeys$
|
|
16572
|
-
function _objectSpread$
|
|
16693
|
+
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; }
|
|
16694
|
+
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
16695
|
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
16696
|
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
16697
|
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 +16893,7 @@ function useRoleSelectorData (_ref) {
|
|
|
16771
16893
|
roles.forEach(function (r) {
|
|
16772
16894
|
//check if after the changes the role is selected
|
|
16773
16895
|
if (value.includes(r._id)) {
|
|
16774
|
-
var newValue = _objectSpread$
|
|
16896
|
+
var newValue = _objectSpread$x(_objectSpread$x({}, r), {}, {
|
|
16775
16897
|
selected: true
|
|
16776
16898
|
});
|
|
16777
16899
|
//add it to the new list as selected role
|
|
@@ -16807,7 +16929,7 @@ function useRoleSelectorData (_ref) {
|
|
|
16807
16929
|
}
|
|
16808
16930
|
}
|
|
16809
16931
|
} else {
|
|
16810
|
-
var _newValue = _objectSpread$
|
|
16932
|
+
var _newValue = _objectSpread$x(_objectSpread$x({}, r), {}, {
|
|
16811
16933
|
selected: false
|
|
16812
16934
|
});
|
|
16813
16935
|
//add it to the new list as unselected role
|
|
@@ -17011,7 +17133,7 @@ function _updateRoles() {
|
|
|
17011
17133
|
userRole = userRoles.find(function (r) {
|
|
17012
17134
|
return r._id == role._id;
|
|
17013
17135
|
});
|
|
17014
|
-
newRole = _objectSpread$
|
|
17136
|
+
newRole = _objectSpread$x({}, role);
|
|
17015
17137
|
if (userRole) {
|
|
17016
17138
|
newRole.selected = true;
|
|
17017
17139
|
newRole.inherited = userRole.inherited;
|
|
@@ -17231,7 +17353,7 @@ function _fetchOptions() {
|
|
|
17231
17353
|
case 4:
|
|
17232
17354
|
result = _context11.sent;
|
|
17233
17355
|
options = result.data.map(function (d) {
|
|
17234
|
-
return _objectSpread$
|
|
17356
|
+
return _objectSpread$x(_objectSpread$x({}, d), {}, {
|
|
17235
17357
|
label: d.displayName,
|
|
17236
17358
|
value: d._id,
|
|
17237
17359
|
isLeaf: !d.hasChildren
|
|
@@ -17335,8 +17457,8 @@ var parent = "parent-NZJ3S";
|
|
|
17335
17457
|
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
17458
|
styleInject(css_248z$i);
|
|
17337
17459
|
|
|
17338
|
-
function ownKeys$
|
|
17339
|
-
function _objectSpread$
|
|
17460
|
+
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; }
|
|
17461
|
+
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
17462
|
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
17463
|
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
17464
|
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 +17518,8 @@ function _generateCSV() {
|
|
|
17396
17518
|
break;
|
|
17397
17519
|
}
|
|
17398
17520
|
_context2.next = 21;
|
|
17399
|
-
return generateCSV(_objectSpread$
|
|
17400
|
-
mappingData: _objectSpread$
|
|
17521
|
+
return generateCSV(_objectSpread$w(_objectSpread$w({}, exportParams.children), {}, {
|
|
17522
|
+
mappingData: _objectSpread$w(_objectSpread$w({}, parent), {}, {
|
|
17401
17523
|
parentId: exportParams.mappingData._id
|
|
17402
17524
|
})
|
|
17403
17525
|
}), csvData);
|
|
@@ -17459,8 +17581,8 @@ var generateCSVData = /*#__PURE__*/function () {
|
|
|
17459
17581
|
};
|
|
17460
17582
|
}();
|
|
17461
17583
|
|
|
17462
|
-
function ownKeys$
|
|
17463
|
-
function _objectSpread$
|
|
17584
|
+
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; }
|
|
17585
|
+
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
17586
|
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
17587
|
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
17588
|
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 +18001,7 @@ function useRelationSelectorData (_ref) {
|
|
|
17879
18001
|
var activeItem = _step.value;
|
|
17880
18002
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
17881
18003
|
addedObjects.push(addedData);
|
|
17882
|
-
getSplittedItems(_objectSpread$
|
|
18004
|
+
getSplittedItems(_objectSpread$v(_objectSpread$v({}, activeItem), {}, {
|
|
17883
18005
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
17884
18006
|
}));
|
|
17885
18007
|
ret = true;
|
|
@@ -18084,8 +18206,8 @@ function useRelationSelectorData (_ref) {
|
|
|
18084
18206
|
};
|
|
18085
18207
|
}
|
|
18086
18208
|
|
|
18087
|
-
function ownKeys$
|
|
18088
|
-
function _objectSpread$
|
|
18209
|
+
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; }
|
|
18210
|
+
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
18211
|
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
18212
|
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
18213
|
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 +18340,7 @@ function ActionButton (_ref) {
|
|
|
18218
18340
|
_iterator2.f();
|
|
18219
18341
|
}
|
|
18220
18342
|
_context.next = 19;
|
|
18221
|
-
return apiInterface.update(_objectSpread$
|
|
18343
|
+
return apiInterface.update(_objectSpread$u(_objectSpread$u({}, data), {}, {
|
|
18222
18344
|
state: toSwitch
|
|
18223
18345
|
}), data);
|
|
18224
18346
|
case 19:
|
|
@@ -18375,14 +18497,14 @@ function _simpleChangeValue() {
|
|
|
18375
18497
|
break;
|
|
18376
18498
|
}
|
|
18377
18499
|
for (i = 0; i < action.newValues.length; i++) {
|
|
18378
|
-
fieldsToUpdate = _objectSpread$
|
|
18500
|
+
fieldsToUpdate = _objectSpread$u(_objectSpread$u({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
18379
18501
|
}
|
|
18380
18502
|
if (!apiInterface.canUpdate) {
|
|
18381
18503
|
_context2.next = 9;
|
|
18382
18504
|
break;
|
|
18383
18505
|
}
|
|
18384
18506
|
_context2.next = 7;
|
|
18385
|
-
return apiInterface.update(_objectSpread$
|
|
18507
|
+
return apiInterface.update(_objectSpread$u({}, fieldsToUpdate), data);
|
|
18386
18508
|
case 7:
|
|
18387
18509
|
response = _context2.sent;
|
|
18388
18510
|
return _context2.abrupt("return", response);
|
|
@@ -18397,7 +18519,7 @@ function _simpleChangeValue() {
|
|
|
18397
18519
|
return _simpleChangeValue.apply(this, arguments);
|
|
18398
18520
|
}
|
|
18399
18521
|
function A(props) {
|
|
18400
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
18522
|
+
return /*#__PURE__*/jsx("a", _objectSpread$u({}, props));
|
|
18401
18523
|
}
|
|
18402
18524
|
|
|
18403
18525
|
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 +18657,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
18535
18657
|
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
18658
|
styleInject(css_248z$h);
|
|
18537
18659
|
|
|
18538
|
-
function ownKeys$
|
|
18539
|
-
function _objectSpread$
|
|
18660
|
+
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; }
|
|
18661
|
+
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
18662
|
var DropDown = function DropDown(_ref) {
|
|
18541
18663
|
var _curItem$data$length;
|
|
18542
18664
|
var split = _ref.split,
|
|
@@ -18568,7 +18690,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
18568
18690
|
});
|
|
18569
18691
|
return /*#__PURE__*/jsx(Collapse, {
|
|
18570
18692
|
onChange: function onChange() {
|
|
18571
|
-
return getSplittedItems(_objectSpread$
|
|
18693
|
+
return getSplittedItems(_objectSpread$t(_objectSpread$t({}, item.item), {}, {
|
|
18572
18694
|
parentId: item.parentId
|
|
18573
18695
|
}), 0);
|
|
18574
18696
|
},
|
|
@@ -18828,8 +18950,8 @@ var RelationSelector$1 = observer(RelationSelector, {
|
|
|
18828
18950
|
forwardRef: true
|
|
18829
18951
|
});
|
|
18830
18952
|
|
|
18831
|
-
function ownKeys$
|
|
18832
|
-
function _objectSpread$
|
|
18953
|
+
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; }
|
|
18954
|
+
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
18955
|
function useFormListData (_ref) {
|
|
18834
18956
|
var _configuration$defaul;
|
|
18835
18957
|
var id = _ref.id,
|
|
@@ -18909,7 +19031,7 @@ function useFormListData (_ref) {
|
|
|
18909
19031
|
if (updated.length == state.length) {
|
|
18910
19032
|
newState = state.map(function (s, i) {
|
|
18911
19033
|
var _updated$find;
|
|
18912
|
-
return _objectSpread$
|
|
19034
|
+
return _objectSpread$s(_objectSpread$s({}, s), {}, {
|
|
18913
19035
|
data: (_updated$find = updated.find(function (u) {
|
|
18914
19036
|
return u.index == i;
|
|
18915
19037
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -19048,8 +19170,8 @@ var FormList$1 = observer(FormList, {
|
|
|
19048
19170
|
forwardRef: true
|
|
19049
19171
|
});
|
|
19050
19172
|
|
|
19051
|
-
function ownKeys$
|
|
19052
|
-
function _objectSpread$
|
|
19173
|
+
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; }
|
|
19174
|
+
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
19175
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
19054
19176
|
function useSelectOrCreateData (_ref) {
|
|
19055
19177
|
var id = _ref.id,
|
|
@@ -19146,7 +19268,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
19146
19268
|
_context.next = 7;
|
|
19147
19269
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
19148
19270
|
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$
|
|
19271
|
+
return _objectSpread$r(_objectSpread$r({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
19150
19272
|
}, {}) : {
|
|
19151
19273
|
_id: [value, 'contains']
|
|
19152
19274
|
},
|
|
@@ -19459,8 +19581,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
19459
19581
|
});
|
|
19460
19582
|
};
|
|
19461
19583
|
|
|
19462
|
-
function ownKeys$
|
|
19463
|
-
function _objectSpread$
|
|
19584
|
+
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; }
|
|
19585
|
+
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
19586
|
function useListData (_ref) {
|
|
19465
19587
|
var id = _ref.id,
|
|
19466
19588
|
data = _ref.data;
|
|
@@ -19503,7 +19625,7 @@ function useListData (_ref) {
|
|
|
19503
19625
|
case 3:
|
|
19504
19626
|
result = _context.sent;
|
|
19505
19627
|
setListData(result.data.map(parseField));
|
|
19506
|
-
initData = _objectSpread$
|
|
19628
|
+
initData = _objectSpread$q({}, data);
|
|
19507
19629
|
setUpdatedObject(initData);
|
|
19508
19630
|
setLoading(false);
|
|
19509
19631
|
case 8:
|
|
@@ -19544,7 +19666,7 @@ function useListData (_ref) {
|
|
|
19544
19666
|
});
|
|
19545
19667
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
19546
19668
|
var parsedField = field.field.split('.');
|
|
19547
|
-
item.itemUpdate = _objectSpread$
|
|
19669
|
+
item.itemUpdate = _objectSpread$q(_objectSpread$q({}, field), {}, {
|
|
19548
19670
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
19549
19671
|
});
|
|
19550
19672
|
});
|
|
@@ -19575,16 +19697,16 @@ function useListData (_ref) {
|
|
|
19575
19697
|
console.error('field with more than 2 parts not allowed');
|
|
19576
19698
|
return;
|
|
19577
19699
|
}
|
|
19578
|
-
var updObj = _objectSpread$
|
|
19700
|
+
var updObj = _objectSpread$q({}, updatedObject);
|
|
19579
19701
|
if (fields.length === 1) {
|
|
19580
|
-
updObj = _objectSpread$
|
|
19702
|
+
updObj = _objectSpread$q(_objectSpread$q({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
19581
19703
|
} else if (fields.length === 2) {
|
|
19582
19704
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
19583
19705
|
return v.id === item.id.trim();
|
|
19584
19706
|
});
|
|
19585
19707
|
if (updatedField) {
|
|
19586
|
-
var updatedFieldCopy = _objectSpread$
|
|
19587
|
-
updObj = _objectSpread$
|
|
19708
|
+
var updatedFieldCopy = _objectSpread$q(_objectSpread$q({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
19709
|
+
updObj = _objectSpread$q(_objectSpread$q({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
19588
19710
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
19589
19711
|
})));
|
|
19590
19712
|
}
|
|
@@ -19593,11 +19715,11 @@ function useListData (_ref) {
|
|
|
19593
19715
|
var acItems = listData;
|
|
19594
19716
|
for (var i = 0; i < acItems.length; i++) {
|
|
19595
19717
|
if (i == index) {
|
|
19596
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
19718
|
+
acItems[i].itemUpdate = _objectSpread$q(_objectSpread$q({}, acItems[i].itemUpdate), {}, {
|
|
19597
19719
|
value: value
|
|
19598
19720
|
});
|
|
19599
19721
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
19600
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
19722
|
+
acItems[i].itemUpdate = _objectSpread$q(_objectSpread$q({}, acItems[i].itemUpdate), {}, {
|
|
19601
19723
|
value: !value
|
|
19602
19724
|
});
|
|
19603
19725
|
}
|
|
@@ -20115,8 +20237,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
20115
20237
|
};
|
|
20116
20238
|
}
|
|
20117
20239
|
|
|
20118
|
-
function ownKeys$
|
|
20119
|
-
function _objectSpread$
|
|
20240
|
+
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; }
|
|
20241
|
+
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
20242
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
20121
20243
|
var id = _ref.id,
|
|
20122
20244
|
data = _ref.data,
|
|
@@ -20224,12 +20346,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
20224
20346
|
}
|
|
20225
20347
|
function onEnter(e) {
|
|
20226
20348
|
if (e.key != 'Enter') return;
|
|
20227
|
-
setCrop(_objectSpread$
|
|
20349
|
+
setCrop(_objectSpread$p(_objectSpread$p({}, crop), {}, {
|
|
20228
20350
|
unit: 'px',
|
|
20229
20351
|
width: Number(widthInputElement.current.value),
|
|
20230
20352
|
height: Number(heightInputElement.current.value)
|
|
20231
20353
|
}));
|
|
20232
|
-
setCompletedCrop(_objectSpread$
|
|
20354
|
+
setCompletedCrop(_objectSpread$p(_objectSpread$p({}, crop), {}, {
|
|
20233
20355
|
unit: 'px',
|
|
20234
20356
|
width: Number(widthInputElement.current.value),
|
|
20235
20357
|
height: Number(heightInputElement.current.value)
|
|
@@ -20309,8 +20431,8 @@ var ImageCropper$1 = observer(ImageCropper, {
|
|
|
20309
20431
|
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
20432
|
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
20433
|
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$
|
|
20434
|
+
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; }
|
|
20435
|
+
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
20436
|
function useDescriptions (_ref) {
|
|
20315
20437
|
var id = _ref.id;
|
|
20316
20438
|
var root = useStore();
|
|
@@ -20403,7 +20525,7 @@ function _getDisplayData() {
|
|
|
20403
20525
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
20404
20526
|
while (1) switch (_context4.prev = _context4.next) {
|
|
20405
20527
|
case 0:
|
|
20406
|
-
displayData = _objectSpread$
|
|
20528
|
+
displayData = _objectSpread$o({}, data);
|
|
20407
20529
|
_iterator = _createForOfIteratorHelper$9(items);
|
|
20408
20530
|
_context4.prev = 2;
|
|
20409
20531
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -20679,8 +20801,8 @@ var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
|
20679
20801
|
};
|
|
20680
20802
|
var FileUploadBeta = observer(FileUploadWrapper);
|
|
20681
20803
|
|
|
20682
|
-
function ownKeys$
|
|
20683
|
-
function _objectSpread$
|
|
20804
|
+
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; }
|
|
20805
|
+
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
20806
|
function useGridData (_ref) {
|
|
20685
20807
|
var id = _ref.id,
|
|
20686
20808
|
data = _ref.data;
|
|
@@ -20723,11 +20845,11 @@ function useGridData (_ref) {
|
|
|
20723
20845
|
function reducer(state, action) {
|
|
20724
20846
|
switch (action.type) {
|
|
20725
20847
|
case 'update':
|
|
20726
|
-
return _objectSpread$
|
|
20848
|
+
return _objectSpread$n(_objectSpread$n({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$n(_objectSpread$n({}, action.data), {}, {
|
|
20727
20849
|
buffer: Buffer.from(action.data.buffer)
|
|
20728
20850
|
})));
|
|
20729
20851
|
case 'delete':
|
|
20730
|
-
var newState = _objectSpread$
|
|
20852
|
+
var newState = _objectSpread$n({}, state);
|
|
20731
20853
|
delete newState[action.data.divaNr];
|
|
20732
20854
|
return newState;
|
|
20733
20855
|
default:
|
|
@@ -20812,8 +20934,8 @@ var Grid = function Grid(_ref) {
|
|
|
20812
20934
|
});
|
|
20813
20935
|
};
|
|
20814
20936
|
|
|
20815
|
-
function ownKeys$
|
|
20816
|
-
function _objectSpread$
|
|
20937
|
+
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; }
|
|
20938
|
+
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
20939
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
20818
20940
|
var id = _ref.id;
|
|
20819
20941
|
var root = useStore();
|
|
@@ -20932,7 +21054,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
20932
21054
|
onRemove: onRemove,
|
|
20933
21055
|
customRequest: customRequest,
|
|
20934
21056
|
fileList: fileList.map(function (f) {
|
|
20935
|
-
return _objectSpread$
|
|
21057
|
+
return _objectSpread$m(_objectSpread$m({}, f), {}, {
|
|
20936
21058
|
url: f.url
|
|
20937
21059
|
});
|
|
20938
21060
|
}),
|
|
@@ -21651,8 +21773,8 @@ function IconCell (_ref) {
|
|
|
21651
21773
|
|
|
21652
21774
|
var _excluded$2 = ["index"],
|
|
21653
21775
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
21654
|
-
function ownKeys$
|
|
21655
|
-
function _objectSpread$
|
|
21776
|
+
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; }
|
|
21777
|
+
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
21778
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
21657
21779
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
21658
21780
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -21666,7 +21788,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
21666
21788
|
component: false,
|
|
21667
21789
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
21668
21790
|
value: form,
|
|
21669
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
21791
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$l({}, props))
|
|
21670
21792
|
})
|
|
21671
21793
|
});
|
|
21672
21794
|
};
|
|
@@ -21719,7 +21841,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
21719
21841
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
21720
21842
|
longDescriptionType = 'text';
|
|
21721
21843
|
}
|
|
21722
|
-
var modifiedColumn = _objectSpread$
|
|
21844
|
+
var modifiedColumn = _objectSpread$l(_objectSpread$l({}, column), {}, {
|
|
21723
21845
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
21724
21846
|
});
|
|
21725
21847
|
if (column) {
|
|
@@ -21732,34 +21854,34 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
21732
21854
|
};
|
|
21733
21855
|
switch (modifiedColumn.type) {
|
|
21734
21856
|
case 'boolean':
|
|
21735
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
21857
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$l({}, cellProps));
|
|
21736
21858
|
break;
|
|
21737
21859
|
case 'text':
|
|
21738
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
21860
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$l({}, cellProps));
|
|
21739
21861
|
break;
|
|
21740
21862
|
case 'select':
|
|
21741
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
21863
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$l({}, cellProps));
|
|
21742
21864
|
case 'media':
|
|
21743
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
21865
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$l({}, cellProps));
|
|
21744
21866
|
break;
|
|
21745
21867
|
case 'mediaItem':
|
|
21746
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
21868
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$l({}, cellProps));
|
|
21747
21869
|
break;
|
|
21748
21870
|
case 'unixTimeStamp':
|
|
21749
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
21871
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$l({}, cellProps));
|
|
21750
21872
|
break;
|
|
21751
21873
|
case 'unixTimeStampCheck':
|
|
21752
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
21874
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$l({}, cellProps));
|
|
21753
21875
|
break;
|
|
21754
21876
|
case 'icon':
|
|
21755
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
21877
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$l({}, cellProps));
|
|
21756
21878
|
break;
|
|
21757
21879
|
default:
|
|
21758
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
21880
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$l({}, cellProps));
|
|
21759
21881
|
break;
|
|
21760
21882
|
}
|
|
21761
21883
|
}
|
|
21762
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
21884
|
+
return /*#__PURE__*/jsx("td", _objectSpread$l(_objectSpread$l({}, restProps), {}, {
|
|
21763
21885
|
children: childNode
|
|
21764
21886
|
}));
|
|
21765
21887
|
};
|
|
@@ -22112,8 +22234,8 @@ var SMChart = function SMChart(props) {
|
|
|
22112
22234
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
22113
22235
|
};
|
|
22114
22236
|
|
|
22115
|
-
function ownKeys$
|
|
22116
|
-
function _objectSpread$
|
|
22237
|
+
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; }
|
|
22238
|
+
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
22239
|
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
22240
|
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
22241
|
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 +22248,7 @@ dayjs.extend(weekYear);
|
|
|
22126
22248
|
Select$1.Option;
|
|
22127
22249
|
var LOG$3 = getLogger('Backoffice', 'BaseTable');
|
|
22128
22250
|
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$
|
|
22251
|
+
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
22252
|
var state = _ref.state;
|
|
22131
22253
|
var root = useStore();
|
|
22132
22254
|
var _useState = useState(0),
|
|
@@ -22298,7 +22420,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
22298
22420
|
// Convert to Dayjs
|
|
22299
22421
|
(_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
22422
|
]
|
|
22301
|
-
}), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
22423
|
+
}), ((_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
22424
|
style: {
|
|
22303
22425
|
minWidth: '200px'
|
|
22304
22426
|
},
|
|
@@ -22313,10 +22435,15 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
22313
22435
|
total: state.pagination.total,
|
|
22314
22436
|
min: (_state$configuration$9 = state.configuration.rules) === null || _state$configuration$9 === void 0 ? void 0 : _state$configuration$9.min,
|
|
22315
22437
|
deleting: state.deleting,
|
|
22316
|
-
onDelete: state.onDelete
|
|
22438
|
+
onDelete: state.onDelete,
|
|
22439
|
+
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) {
|
|
22440
|
+
return state.data.find(function (d) {
|
|
22441
|
+
return d._id == id;
|
|
22442
|
+
});
|
|
22443
|
+
})))
|
|
22317
22444
|
}), state.configuration.copyAction !== undefined && /*#__PURE__*/jsx(CopyButton, {
|
|
22318
22445
|
state: state
|
|
22319
|
-
}), (_state$configuration$
|
|
22446
|
+
}), (_state$configuration$12 = state.configuration.bulkActions) === null || _state$configuration$12 === void 0 ? void 0 : _state$configuration$12.map(function (action) {
|
|
22320
22447
|
return /*#__PURE__*/jsx(BulkAction, {
|
|
22321
22448
|
action: action,
|
|
22322
22449
|
state: state
|
|
@@ -22324,15 +22451,15 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
22324
22451
|
}), state.configuration.createAction && checkPermission(state.configuration.createAction.permission) && /*#__PURE__*/jsx(ActionButton, {
|
|
22325
22452
|
action: state.configuration.createAction,
|
|
22326
22453
|
callback: function callback(data) {
|
|
22327
|
-
var _state$onUpdate, _state$configuration$
|
|
22454
|
+
var _state$onUpdate, _state$configuration$13, _state$configuration$14;
|
|
22328
22455
|
(_state$onUpdate = state.onUpdate) === null || _state$onUpdate === void 0 || _state$onUpdate.call(state, data);
|
|
22329
|
-
(_state$configuration$
|
|
22456
|
+
(_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
22457
|
},
|
|
22331
22458
|
type: "Button",
|
|
22332
22459
|
id: 'create',
|
|
22333
22460
|
defaultLabel: t('backoffice.table.emailtemplates.createAction.title'),
|
|
22334
22461
|
isCreateButton: true,
|
|
22335
|
-
disabled: state.configuration.createAction.disableOnToggle === !!state.globalFilter.toggle,
|
|
22462
|
+
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
22463
|
data: state.configuration.createActionMapping ? aplyMapping({
|
|
22337
22464
|
mapable: {},
|
|
22338
22465
|
mapping: state.configuration.createActionMapping,
|
|
@@ -22379,17 +22506,17 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
22379
22506
|
}), /*#__PURE__*/jsx(Table$1, {
|
|
22380
22507
|
scroll: {
|
|
22381
22508
|
x: '100%',
|
|
22382
|
-
y: (_state$configuration$
|
|
22509
|
+
y: (_state$configuration$17 = state.configuration.height) !== null && _state$configuration$17 !== void 0 ? _state$configuration$17 : '60vh'
|
|
22383
22510
|
},
|
|
22384
22511
|
rowClassName: editableRow,
|
|
22385
22512
|
components: cellRenderer,
|
|
22386
22513
|
rowKey: function rowKey(dataRow) {
|
|
22387
|
-
var _state$configuration$
|
|
22388
|
-
return goTroughObject(dataRow, (_state$configuration$
|
|
22514
|
+
var _state$configuration$18, _state$configuration$19;
|
|
22515
|
+
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
22516
|
},
|
|
22390
22517
|
dataSource: data,
|
|
22391
22518
|
loading: state.loading,
|
|
22392
|
-
pagination: _objectSpread$
|
|
22519
|
+
pagination: _objectSpread$k(_objectSpread$k({}, state.pagination), {}, {
|
|
22393
22520
|
showTotal: function showTotal(total, range) {
|
|
22394
22521
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
22395
22522
|
},
|
|
@@ -22422,7 +22549,8 @@ function DeleteButton(_ref2) {
|
|
|
22422
22549
|
_ref2$min = _ref2.min,
|
|
22423
22550
|
min = _ref2$min === void 0 ? 0 : _ref2$min,
|
|
22424
22551
|
deleting = _ref2.deleting,
|
|
22425
|
-
onDelete = _ref2.onDelete
|
|
22552
|
+
onDelete = _ref2.onDelete,
|
|
22553
|
+
disabled = _ref2.disabled;
|
|
22426
22554
|
var _useTranslation2 = useTranslation(),
|
|
22427
22555
|
t = _useTranslation2.t;
|
|
22428
22556
|
var hasSelected = (selected === null || selected === void 0 ? void 0 : selected.length) > 0;
|
|
@@ -22437,12 +22565,12 @@ function DeleteButton(_ref2) {
|
|
|
22437
22565
|
color: 'red'
|
|
22438
22566
|
}
|
|
22439
22567
|
}),
|
|
22440
|
-
disabled: !hasSelected,
|
|
22568
|
+
disabled: !hasSelected || disabled,
|
|
22441
22569
|
onConfirm: allowDelete ? onDelete : undefined,
|
|
22442
22570
|
cancelText: allowDelete ? t('backoffice.basetable.cancle') : /*#__PURE__*/jsx(Fragment, {}),
|
|
22443
22571
|
children: /*#__PURE__*/jsx(Button, {
|
|
22444
22572
|
type: "primary",
|
|
22445
|
-
disabled: !hasSelected,
|
|
22573
|
+
disabled: !hasSelected || disabled,
|
|
22446
22574
|
loading: deleting,
|
|
22447
22575
|
danger: true,
|
|
22448
22576
|
children: t('action.delete')
|
|
@@ -22459,13 +22587,13 @@ function CopyButton(_ref3) {
|
|
|
22459
22587
|
}, root);
|
|
22460
22588
|
var onCopy = /*#__PURE__*/function () {
|
|
22461
22589
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
22462
|
-
var _state$configuration$
|
|
22590
|
+
var _state$configuration$20;
|
|
22463
22591
|
var copyAction, _iterator3, _step3, selectedRow;
|
|
22464
22592
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
22465
22593
|
while (1) switch (_context.prev = _context.next) {
|
|
22466
22594
|
case 0:
|
|
22467
22595
|
copyAction = state.configuration.copyAction;
|
|
22468
|
-
if (((_state$configuration$
|
|
22596
|
+
if (((_state$configuration$20 = state.configuration.copyAction) === null || _state$configuration$20 === void 0 ? void 0 : _state$configuration$20.apiInterface) != undefined) {
|
|
22469
22597
|
_iterator3 = _createForOfIteratorHelper$4(state.selected);
|
|
22470
22598
|
try {
|
|
22471
22599
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
@@ -22500,13 +22628,13 @@ function CopyButton(_ref3) {
|
|
|
22500
22628
|
}();
|
|
22501
22629
|
var onCopyAction = /*#__PURE__*/function () {
|
|
22502
22630
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
22503
|
-
var _state$configuration$
|
|
22631
|
+
var _state$configuration$21, _state$configuration$22;
|
|
22504
22632
|
var copyAction, id, filter, data;
|
|
22505
22633
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
22506
22634
|
while (1) switch (_context3.prev = _context3.next) {
|
|
22507
22635
|
case 0:
|
|
22508
22636
|
copyAction = state.configuration.copyAction;
|
|
22509
|
-
if (!(copyAction.id == undefined || copyAction.actionType != 'Detail' || ((_state$configuration$
|
|
22637
|
+
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
22638
|
_context3.next = 3;
|
|
22511
22639
|
break;
|
|
22512
22640
|
}
|
|
@@ -22536,7 +22664,7 @@ function CopyButton(_ref3) {
|
|
|
22536
22664
|
configurationId: copyAction === null || copyAction === void 0 ? void 0 : copyAction.id,
|
|
22537
22665
|
data: data.data[0],
|
|
22538
22666
|
type: copyAction === null || copyAction === void 0 ? void 0 : copyAction.type,
|
|
22539
|
-
mapping: (_state$configuration$
|
|
22667
|
+
mapping: (_state$configuration$22 = state.configuration.createAction) === null || _state$configuration$22 === void 0 ? void 0 : _state$configuration$22.mapping,
|
|
22540
22668
|
mappingData: data.data[0],
|
|
22541
22669
|
callback: function () {
|
|
22542
22670
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(e) {
|
|
@@ -22577,13 +22705,13 @@ function CopyButton(_ref3) {
|
|
|
22577
22705
|
});
|
|
22578
22706
|
}
|
|
22579
22707
|
function BulkAction(_ref6) {
|
|
22580
|
-
var _state$
|
|
22708
|
+
var _state$selected3;
|
|
22581
22709
|
var action = _ref6.action,
|
|
22582
22710
|
state = _ref6.state;
|
|
22583
22711
|
var root = useStore();
|
|
22584
22712
|
var _useTranslation4 = useTranslation(),
|
|
22585
22713
|
t = _useTranslation4.t;
|
|
22586
|
-
var hasSelected = ((_state$
|
|
22714
|
+
var hasSelected = ((_state$selected3 = state.selected) === null || _state$selected3 === void 0 ? void 0 : _state$selected3.length) > 0;
|
|
22587
22715
|
var selectedData = useMemo(function () {
|
|
22588
22716
|
var _state$data2;
|
|
22589
22717
|
return ((_state$data2 = state.data) === null || _state$data2 === void 0 ? void 0 : _state$data2.filter(function (d) {
|
|
@@ -22689,7 +22817,7 @@ function BulkAction(_ref6) {
|
|
|
22689
22817
|
}
|
|
22690
22818
|
_context4.t0 = data;
|
|
22691
22819
|
_context4.next = 10;
|
|
22692
|
-
return apiInterface.update(_objectSpread$
|
|
22820
|
+
return apiInterface.update(_objectSpread$k(_objectSpread$k({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
22693
22821
|
case 10:
|
|
22694
22822
|
_context4.t1 = _context4.sent;
|
|
22695
22823
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -22789,8 +22917,8 @@ function SelectionText(_ref8) {
|
|
|
22789
22917
|
});
|
|
22790
22918
|
}
|
|
22791
22919
|
|
|
22792
|
-
function ownKeys$
|
|
22793
|
-
function _objectSpread$
|
|
22920
|
+
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; }
|
|
22921
|
+
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
22922
|
function getColumnFilterProps (_ref) {
|
|
22795
22923
|
var filter = _ref.filter,
|
|
22796
22924
|
title = _ref.title;
|
|
@@ -23153,7 +23281,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
23153
23281
|
});
|
|
23154
23282
|
},
|
|
23155
23283
|
options: filter.map(function (f) {
|
|
23156
|
-
return _objectSpread$
|
|
23284
|
+
return _objectSpread$j(_objectSpread$j({}, f), {}, {
|
|
23157
23285
|
label: t(f.label)
|
|
23158
23286
|
});
|
|
23159
23287
|
})
|
|
@@ -23202,7 +23330,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
23202
23330
|
setDisplaySelectedvalues = _useState4[1];
|
|
23203
23331
|
var options = [];
|
|
23204
23332
|
options = filter.map(function (f) {
|
|
23205
|
-
return _objectSpread$
|
|
23333
|
+
return _objectSpread$j(_objectSpread$j({}, f), {}, {
|
|
23206
23334
|
label: t(f.label)
|
|
23207
23335
|
});
|
|
23208
23336
|
});
|
|
@@ -23276,8 +23404,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
23276
23404
|
};
|
|
23277
23405
|
};
|
|
23278
23406
|
|
|
23279
|
-
function ownKeys$
|
|
23280
|
-
function _objectSpread$
|
|
23407
|
+
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; }
|
|
23408
|
+
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
23409
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
23282
23410
|
var columns = configuration.columns.filter(function (c) {
|
|
23283
23411
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -23302,6 +23430,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
23302
23430
|
return /*#__PURE__*/jsx(Space, {
|
|
23303
23431
|
size: "middle",
|
|
23304
23432
|
children: rowAction.map(function (a, index) {
|
|
23433
|
+
var _a$disabled;
|
|
23305
23434
|
if (a.actionType === 'Detail' && a.type === 'Form' && data != undefined && data.length > 1) {
|
|
23306
23435
|
dt = data;
|
|
23307
23436
|
}
|
|
@@ -23316,6 +23445,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
23316
23445
|
onUpdate === null || onUpdate === void 0 || onUpdate(data);
|
|
23317
23446
|
(_a$callback = a.callback) === null || _a$callback === void 0 || _a$callback.call(a, data);
|
|
23318
23447
|
},
|
|
23448
|
+
disabled: (_a$disabled = a.disabled) === null || _a$disabled === void 0 ? void 0 : _a$disabled.call(a, dt),
|
|
23319
23449
|
type: "Link",
|
|
23320
23450
|
data: dt,
|
|
23321
23451
|
defaultLabel: "Details"
|
|
@@ -23328,7 +23458,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
23328
23458
|
}
|
|
23329
23459
|
function mapColumn(column, onUpdate) {
|
|
23330
23460
|
var _column$field, _column$children;
|
|
23331
|
-
return _objectSpread$
|
|
23461
|
+
return _objectSpread$i(_objectSpread$i(_objectSpread$i({}, column), {}, {
|
|
23332
23462
|
width: column.width || 100,
|
|
23333
23463
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
23334
23464
|
key: column.field || column.title,
|
|
@@ -23377,8 +23507,8 @@ function updateData (_ref) {
|
|
|
23377
23507
|
};
|
|
23378
23508
|
}
|
|
23379
23509
|
|
|
23380
|
-
function ownKeys$
|
|
23381
|
-
function _objectSpread$
|
|
23510
|
+
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; }
|
|
23511
|
+
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
23512
|
function aplyFilterAndSortation (_ref) {
|
|
23383
23513
|
var data = _ref.data,
|
|
23384
23514
|
filters = _ref.filters,
|
|
@@ -23393,7 +23523,7 @@ function aplyFilterAndSortation (_ref) {
|
|
|
23393
23523
|
processedData = sort(sorter || [], processedData);
|
|
23394
23524
|
return {
|
|
23395
23525
|
data: processedData,
|
|
23396
|
-
pagination: _objectSpread$
|
|
23526
|
+
pagination: _objectSpread$h(_objectSpread$h({}, pagination), {}, {
|
|
23397
23527
|
total: processedData.length
|
|
23398
23528
|
})
|
|
23399
23529
|
};
|
|
@@ -23478,8 +23608,8 @@ function filter(f, data) {
|
|
|
23478
23608
|
}
|
|
23479
23609
|
|
|
23480
23610
|
var _excluded$1 = ["_id"];
|
|
23481
|
-
function ownKeys$
|
|
23482
|
-
function _objectSpread$
|
|
23611
|
+
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; }
|
|
23612
|
+
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
23613
|
function useTableData$1 (_ref) {
|
|
23484
23614
|
var _configuration$apiInt;
|
|
23485
23615
|
var id = _ref.id;
|
|
@@ -23534,7 +23664,7 @@ function useTableData$1 (_ref) {
|
|
|
23534
23664
|
var _configuration$create;
|
|
23535
23665
|
if (!dataRow) return;
|
|
23536
23666
|
var id = v4();
|
|
23537
|
-
var processedDataRow = flat.unflatten(_objectSpread$
|
|
23667
|
+
var processedDataRow = flat.unflatten(_objectSpread$g({
|
|
23538
23668
|
_id: id,
|
|
23539
23669
|
ID: id
|
|
23540
23670
|
}, dataRow));
|
|
@@ -23546,11 +23676,11 @@ function useTableData$1 (_ref) {
|
|
|
23546
23676
|
newData = _updateData.data;
|
|
23547
23677
|
_updateData.prevDataRow;
|
|
23548
23678
|
_updateData.index;
|
|
23549
|
-
var newState = _objectSpread$
|
|
23679
|
+
var newState = _objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23550
23680
|
data: newData
|
|
23551
23681
|
});
|
|
23552
23682
|
if (!filterServerSide) {
|
|
23553
|
-
var res = aplyFilterAndSortation(_objectSpread$
|
|
23683
|
+
var res = aplyFilterAndSortation(_objectSpread$g(_objectSpread$g({}, filterData), {}, {
|
|
23554
23684
|
data: newData
|
|
23555
23685
|
}));
|
|
23556
23686
|
newState.data = res.data;
|
|
@@ -23562,33 +23692,33 @@ function useTableData$1 (_ref) {
|
|
|
23562
23692
|
var formData = new FormData();
|
|
23563
23693
|
processedDataRow._id;
|
|
23564
23694
|
var value = _objectWithoutProperties(processedDataRow, _excluded$1);
|
|
23565
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
23695
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$g(_objectSpread$g({}, catalogItem), {}, {
|
|
23566
23696
|
filterContex: filterContex,
|
|
23567
23697
|
value: JSON.stringify([value])
|
|
23568
23698
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
23569
23699
|
if (d && d.Result && d.Result == 'Success') return;
|
|
23570
|
-
setState(_objectSpread$
|
|
23700
|
+
setState(_objectSpread$g({}, oldState));
|
|
23571
23701
|
});
|
|
23572
23702
|
}, [state, catalogItem, filterData]);
|
|
23573
23703
|
useEffect(function () {
|
|
23574
23704
|
if (!catalogItem) return;
|
|
23575
|
-
setState(_objectSpread$
|
|
23705
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23576
23706
|
loading: true,
|
|
23577
|
-
mappingData: _objectSpread$
|
|
23707
|
+
mappingData: _objectSpread$g(_objectSpread$g({}, catalogItem), {}, {
|
|
23578
23708
|
filterContex: filterContex
|
|
23579
23709
|
})
|
|
23580
23710
|
}));
|
|
23581
23711
|
if (!filterServerSide) {
|
|
23582
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
23712
|
+
apiHandler.readList(configuration.mapping, _objectSpread$g(_objectSpread$g({}, catalogItem), {}, {
|
|
23583
23713
|
filterContex: filterContex
|
|
23584
23714
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
23585
23715
|
var newData = data.data.map(function (d) {
|
|
23586
|
-
return _objectSpread$
|
|
23716
|
+
return _objectSpread$g(_objectSpread$g({}, d), {}, {
|
|
23587
23717
|
_id: d._id || d.ID || nanoid()
|
|
23588
23718
|
});
|
|
23589
23719
|
});
|
|
23590
23720
|
onChange({
|
|
23591
|
-
pagination: _objectSpread$
|
|
23721
|
+
pagination: _objectSpread$g({}, state.pagination),
|
|
23592
23722
|
filters: {},
|
|
23593
23723
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
23594
23724
|
return c.defaultSortOrder;
|
|
@@ -23605,7 +23735,7 @@ function useTableData$1 (_ref) {
|
|
|
23605
23735
|
});
|
|
23606
23736
|
} else {
|
|
23607
23737
|
onChange({
|
|
23608
|
-
pagination: _objectSpread$
|
|
23738
|
+
pagination: _objectSpread$g({}, state.pagination),
|
|
23609
23739
|
filters: {},
|
|
23610
23740
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
23611
23741
|
return c.defaultSortOrder;
|
|
@@ -23622,17 +23752,17 @@ function useTableData$1 (_ref) {
|
|
|
23622
23752
|
}
|
|
23623
23753
|
}, [filterContex, catalogItem]);
|
|
23624
23754
|
var onChange = function onChange(p, dataParam) {
|
|
23625
|
-
setState(_objectSpread$
|
|
23755
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23626
23756
|
loading: true
|
|
23627
23757
|
}));
|
|
23628
23758
|
if (!filterServerSide) {
|
|
23629
23759
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
23630
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
23760
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$g(_objectSpread$g({}, p), {}, {
|
|
23631
23761
|
data: unfilteredData
|
|
23632
23762
|
})),
|
|
23633
23763
|
data = _aplyFilterAndSortati.data,
|
|
23634
23764
|
pagination = _aplyFilterAndSortati.pagination;
|
|
23635
|
-
setState(_objectSpread$
|
|
23765
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23636
23766
|
data: data,
|
|
23637
23767
|
pagination: pagination,
|
|
23638
23768
|
loading: false,
|
|
@@ -23643,20 +23773,20 @@ function useTableData$1 (_ref) {
|
|
|
23643
23773
|
sorter: p.sorter
|
|
23644
23774
|
});
|
|
23645
23775
|
} else {
|
|
23646
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
23776
|
+
apiHandler.readList(configuration.mapping, _objectSpread$g(_objectSpread$g({}, catalogItem), {}, {
|
|
23647
23777
|
filterContex: filterContex
|
|
23648
23778
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
23649
|
-
setState(_objectSpread$
|
|
23779
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23650
23780
|
data: data.data.map(function (dt) {
|
|
23651
|
-
return _objectSpread$
|
|
23781
|
+
return _objectSpread$g(_objectSpread$g({}, dt), {}, {
|
|
23652
23782
|
_id: dt._id || dt.ID || nanoid()
|
|
23653
23783
|
});
|
|
23654
23784
|
}),
|
|
23655
|
-
pagination: _objectSpread$
|
|
23785
|
+
pagination: _objectSpread$g(_objectSpread$g({}, p.pagination), {}, {
|
|
23656
23786
|
total: data.total
|
|
23657
23787
|
}),
|
|
23658
23788
|
loading: false,
|
|
23659
|
-
mappingData: _objectSpread$
|
|
23789
|
+
mappingData: _objectSpread$g(_objectSpread$g({}, catalogItem), {}, {
|
|
23660
23790
|
filterContex: filterContex
|
|
23661
23791
|
})
|
|
23662
23792
|
}));
|
|
@@ -23668,7 +23798,7 @@ function useTableData$1 (_ref) {
|
|
|
23668
23798
|
}
|
|
23669
23799
|
};
|
|
23670
23800
|
var onSelect = function onSelect(keys) {
|
|
23671
|
-
setState(_objectSpread$
|
|
23801
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23672
23802
|
selected: keys
|
|
23673
23803
|
}));
|
|
23674
23804
|
};
|
|
@@ -23678,7 +23808,7 @@ function useTableData$1 (_ref) {
|
|
|
23678
23808
|
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
23679
23809
|
while (1) switch (_context2.prev = _context2.next) {
|
|
23680
23810
|
case 0:
|
|
23681
|
-
setState(_objectSpread$
|
|
23811
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23682
23812
|
deleting: true
|
|
23683
23813
|
}));
|
|
23684
23814
|
newData = _toConsumableArray(state.data);
|
|
@@ -23693,7 +23823,7 @@ function useTableData$1 (_ref) {
|
|
|
23693
23823
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
23694
23824
|
return nd._id === state.selected[index];
|
|
23695
23825
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
23696
|
-
mappingData = _objectSpread$
|
|
23826
|
+
mappingData = _objectSpread$g(_objectSpread$g({}, mappingData), state.mappingData);
|
|
23697
23827
|
_context.next = 5;
|
|
23698
23828
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true);
|
|
23699
23829
|
case 5:
|
|
@@ -23743,7 +23873,7 @@ function useTableData$1 (_ref) {
|
|
|
23743
23873
|
}
|
|
23744
23874
|
_context2.next = 18;
|
|
23745
23875
|
return apiHandler.readList(configuration.mapping, {
|
|
23746
|
-
pagination: _objectSpread$
|
|
23876
|
+
pagination: _objectSpread$g(_objectSpread$g({}, state.pagination), {}, {
|
|
23747
23877
|
current: current
|
|
23748
23878
|
}),
|
|
23749
23879
|
columns: configuration.columns,
|
|
@@ -23755,11 +23885,11 @@ function useTableData$1 (_ref) {
|
|
|
23755
23885
|
newData = data.data;
|
|
23756
23886
|
total = data.total;
|
|
23757
23887
|
case 21:
|
|
23758
|
-
setState(_objectSpread$
|
|
23888
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23759
23889
|
selected: [],
|
|
23760
23890
|
deleting: false,
|
|
23761
23891
|
data: newData,
|
|
23762
|
-
pagination: _objectSpread$
|
|
23892
|
+
pagination: _objectSpread$g(_objectSpread$g({}, state.pagination), {}, {
|
|
23763
23893
|
current: current,
|
|
23764
23894
|
total: total
|
|
23765
23895
|
})
|
|
@@ -23775,12 +23905,12 @@ function useTableData$1 (_ref) {
|
|
|
23775
23905
|
};
|
|
23776
23906
|
}();
|
|
23777
23907
|
function setLoading() {
|
|
23778
|
-
setState(_objectSpread$
|
|
23908
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23779
23909
|
loading: true
|
|
23780
23910
|
}));
|
|
23781
23911
|
}
|
|
23782
|
-
return _objectSpread$
|
|
23783
|
-
configuration: _objectSpread$
|
|
23912
|
+
return _objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
23913
|
+
configuration: _objectSpread$g(_objectSpread$g({}, configuration), {}, {
|
|
23784
23914
|
title: undefined
|
|
23785
23915
|
}),
|
|
23786
23916
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -23885,8 +24015,8 @@ function objectHash (obj) {
|
|
|
23885
24015
|
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
24016
|
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
24017
|
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$
|
|
24018
|
+
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; }
|
|
24019
|
+
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
24020
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
23891
24021
|
function useTableData (_ref) {
|
|
23892
24022
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -23953,7 +24083,7 @@ function useTableData (_ref) {
|
|
|
23953
24083
|
selected: [],
|
|
23954
24084
|
canDelete: !!apiHandler.canDelete,
|
|
23955
24085
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
23956
|
-
mappingData: _objectSpread$
|
|
24086
|
+
mappingData: _objectSpread$f(_objectSpread$f({}, parentData), {}, {
|
|
23957
24087
|
prefilter: {
|
|
23958
24088
|
select: globalFilter.select
|
|
23959
24089
|
}
|
|
@@ -23962,7 +24092,7 @@ function useTableData (_ref) {
|
|
|
23962
24092
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
23963
24093
|
state = _useState14[0],
|
|
23964
24094
|
setState = _useState14[1];
|
|
23965
|
-
var mapping = _objectSpread$
|
|
24095
|
+
var mapping = _objectSpread$f(_objectSpread$f({}, parentData), {}, {
|
|
23966
24096
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
23967
24097
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
23968
24098
|
});
|
|
@@ -24001,14 +24131,14 @@ function useTableData (_ref) {
|
|
|
24001
24131
|
}
|
|
24002
24132
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
24003
24133
|
var newInitData = initData;
|
|
24004
|
-
var newState = _objectSpread$
|
|
24134
|
+
var newState = _objectSpread$f({}, state);
|
|
24005
24135
|
var selected = [];
|
|
24006
24136
|
if (configuration.deselectOnUpdate == false) {
|
|
24007
24137
|
selected = state.selected;
|
|
24008
24138
|
}
|
|
24009
24139
|
var pagination = undefined;
|
|
24010
24140
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
24011
|
-
pagination = _objectSpread$
|
|
24141
|
+
pagination = _objectSpread$f(_objectSpread$f({}, state.pagination), {}, {
|
|
24012
24142
|
total: state.data.length + dataArray.length
|
|
24013
24143
|
});
|
|
24014
24144
|
}
|
|
@@ -24025,7 +24155,7 @@ function useTableData (_ref) {
|
|
|
24025
24155
|
dataRow: dataRow
|
|
24026
24156
|
}),
|
|
24027
24157
|
_data = _updateData.data;
|
|
24028
|
-
newState = _objectSpread$
|
|
24158
|
+
newState = _objectSpread$f(_objectSpread$f({}, newState), {}, {
|
|
24029
24159
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
24030
24160
|
data: _data,
|
|
24031
24161
|
selected: selected
|
|
@@ -24038,8 +24168,8 @@ function useTableData (_ref) {
|
|
|
24038
24168
|
dataRow: dataRow
|
|
24039
24169
|
}),
|
|
24040
24170
|
nextInitData = _updateData2.data;
|
|
24041
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
24042
|
-
filters: _objectSpread$
|
|
24171
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$f(_objectSpread$f(_objectSpread$f({}, filterData), {}, {
|
|
24172
|
+
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
24173
|
}, 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
24174
|
genericProps: globalFilter.toggle
|
|
24045
24175
|
} : undefined), {}, {
|
|
@@ -24049,7 +24179,7 @@ function useTableData (_ref) {
|
|
|
24049
24179
|
_data2 = _aplyFilterAndSortati.data,
|
|
24050
24180
|
_pagination2 = _aplyFilterAndSortati.pagination;
|
|
24051
24181
|
newInitData = nextInitData;
|
|
24052
|
-
newState = _objectSpread$
|
|
24182
|
+
newState = _objectSpread$f(_objectSpread$f({}, newState), {}, {
|
|
24053
24183
|
pagination: _pagination2,
|
|
24054
24184
|
data: _data2,
|
|
24055
24185
|
selected: selected
|
|
@@ -24059,8 +24189,8 @@ function useTableData (_ref) {
|
|
|
24059
24189
|
if (apiHandler.canCreate) {
|
|
24060
24190
|
apiCreate(data).then(function (res) {
|
|
24061
24191
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
24062
|
-
initData && setInitData(_objectSpread$
|
|
24063
|
-
setState(_objectSpread$
|
|
24192
|
+
initData && setInitData(_objectSpread$f({}, initData));
|
|
24193
|
+
setState(_objectSpread$f({}, state));
|
|
24064
24194
|
}
|
|
24065
24195
|
});
|
|
24066
24196
|
}
|
|
@@ -24073,7 +24203,7 @@ function useTableData (_ref) {
|
|
|
24073
24203
|
var triggerRefresh = function triggerRefresh() {
|
|
24074
24204
|
var _configuration$filter7;
|
|
24075
24205
|
setError(undefined);
|
|
24076
|
-
var newGlobalFilter = _objectSpread$
|
|
24206
|
+
var newGlobalFilter = _objectSpread$f({}, globalFilter);
|
|
24077
24207
|
//on refresh update default filter, since global value can change
|
|
24078
24208
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
24079
24209
|
var _configuration$filter8;
|
|
@@ -24084,7 +24214,7 @@ function useTableData (_ref) {
|
|
|
24084
24214
|
newGlobalFilter["default"] = _defaultFilter;
|
|
24085
24215
|
setGlobaFilter(newGlobalFilter);
|
|
24086
24216
|
}
|
|
24087
|
-
onChange(_objectSpread$
|
|
24217
|
+
onChange(_objectSpread$f({
|
|
24088
24218
|
pagination: state.pagination
|
|
24089
24219
|
}, filterData), newGlobalFilter, true);
|
|
24090
24220
|
};
|
|
@@ -24103,7 +24233,7 @@ function useTableData (_ref) {
|
|
|
24103
24233
|
order: c.defaultSortOrder
|
|
24104
24234
|
};
|
|
24105
24235
|
});
|
|
24106
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
24236
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24107
24237
|
loading: false
|
|
24108
24238
|
}));else {
|
|
24109
24239
|
onChange({
|
|
@@ -24160,11 +24290,11 @@ function useTableData (_ref) {
|
|
|
24160
24290
|
case 0:
|
|
24161
24291
|
prefilter = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : globalFilter;
|
|
24162
24292
|
refresh = _args2.length > 2 ? _args2[2] : undefined;
|
|
24163
|
-
setState(_objectSpread$
|
|
24293
|
+
setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24164
24294
|
loading: true
|
|
24165
24295
|
}));
|
|
24166
24296
|
currentData = initData;
|
|
24167
|
-
filterData = _objectSpread$
|
|
24297
|
+
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
24298
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref5) {
|
|
24169
24299
|
var _ref6 = _slicedToArray(_ref5, 2);
|
|
24170
24300
|
_ref6[0];
|
|
@@ -24172,7 +24302,7 @@ function useTableData (_ref) {
|
|
|
24172
24302
|
return v != null;
|
|
24173
24303
|
}));
|
|
24174
24304
|
currentFilterHash = objectHash(filterData);
|
|
24175
|
-
currentPagination = _objectSpread$
|
|
24305
|
+
currentPagination = _objectSpread$f(_objectSpread$f({}, p.pagination), {}, {
|
|
24176
24306
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
24177
24307
|
});
|
|
24178
24308
|
filterHash.current = currentFilterHash;
|
|
@@ -24180,7 +24310,7 @@ function useTableData (_ref) {
|
|
|
24180
24310
|
_context2.next = 19;
|
|
24181
24311
|
break;
|
|
24182
24312
|
}
|
|
24183
|
-
ssf = _objectSpread$
|
|
24313
|
+
ssf = _objectSpread$f({
|
|
24184
24314
|
pagination: currentPagination,
|
|
24185
24315
|
columns: configuration.columns,
|
|
24186
24316
|
filters: filterData,
|
|
@@ -24194,7 +24324,7 @@ function useTableData (_ref) {
|
|
|
24194
24324
|
data = _context2.sent;
|
|
24195
24325
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
24196
24326
|
currentData = data.data;
|
|
24197
|
-
currentPagination = _objectSpread$
|
|
24327
|
+
currentPagination = _objectSpread$f(_objectSpread$f({}, currentPagination), {}, {
|
|
24198
24328
|
total: data.total
|
|
24199
24329
|
});
|
|
24200
24330
|
_context2.next = 28;
|
|
@@ -24211,7 +24341,7 @@ function useTableData (_ref) {
|
|
|
24211
24341
|
currentData = _data3.data;
|
|
24212
24342
|
setInitData(currentData);
|
|
24213
24343
|
case 25:
|
|
24214
|
-
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$
|
|
24344
|
+
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$f(_objectSpread$f({}, p), {}, {
|
|
24215
24345
|
pagination: currentPagination,
|
|
24216
24346
|
filters: filterData,
|
|
24217
24347
|
data: currentData,
|
|
@@ -24220,11 +24350,11 @@ function useTableData (_ref) {
|
|
|
24220
24350
|
currentData = _data4;
|
|
24221
24351
|
currentPagination = pagination;
|
|
24222
24352
|
case 28:
|
|
24223
|
-
setState(_objectSpread$
|
|
24353
|
+
setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24224
24354
|
loading: false,
|
|
24225
24355
|
data: currentData,
|
|
24226
24356
|
pagination: currentPagination,
|
|
24227
|
-
mappingData: _objectSpread$
|
|
24357
|
+
mappingData: _objectSpread$f(_objectSpread$f({}, parentData), {}, {
|
|
24228
24358
|
prefilter: prefilter
|
|
24229
24359
|
}),
|
|
24230
24360
|
currentFetchUrl: currentUrl
|
|
@@ -24244,7 +24374,7 @@ function useTableData (_ref) {
|
|
|
24244
24374
|
};
|
|
24245
24375
|
}();
|
|
24246
24376
|
var onSelect = function onSelect(keys) {
|
|
24247
|
-
setState(_objectSpread$
|
|
24377
|
+
setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24248
24378
|
selected: keys
|
|
24249
24379
|
}));
|
|
24250
24380
|
};
|
|
@@ -24255,7 +24385,7 @@ function useTableData (_ref) {
|
|
|
24255
24385
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
24256
24386
|
while (1) switch (_context4.prev = _context4.next) {
|
|
24257
24387
|
case 0:
|
|
24258
|
-
setState(_objectSpread$
|
|
24388
|
+
setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24259
24389
|
deleting: true
|
|
24260
24390
|
}));
|
|
24261
24391
|
newData = _toConsumableArray(state.data);
|
|
@@ -24295,7 +24425,7 @@ function useTableData (_ref) {
|
|
|
24295
24425
|
} finally {
|
|
24296
24426
|
_iterator.f();
|
|
24297
24427
|
}
|
|
24298
|
-
mappingData = _objectSpread$
|
|
24428
|
+
mappingData = _objectSpread$f(_objectSpread$f(_objectSpread$f({}, mappingData), state.mappingData), mapToggle);
|
|
24299
24429
|
deleteResult = undefined;
|
|
24300
24430
|
_context3.prev = 7;
|
|
24301
24431
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -24386,12 +24516,12 @@ function useTableData (_ref) {
|
|
|
24386
24516
|
break;
|
|
24387
24517
|
}
|
|
24388
24518
|
_context4.next = 25;
|
|
24389
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
24390
|
-
pagination: _objectSpread$
|
|
24519
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$f({
|
|
24520
|
+
pagination: _objectSpread$f(_objectSpread$f({}, state.pagination), {}, {
|
|
24391
24521
|
current: current
|
|
24392
24522
|
}),
|
|
24393
24523
|
columns: configuration.columns,
|
|
24394
|
-
filters: _objectSpread$
|
|
24524
|
+
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
24525
|
sorter: filterData.sorter
|
|
24396
24526
|
}, 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
24527
|
genericProps: globalFilter.toggle
|
|
@@ -24402,11 +24532,11 @@ function useTableData (_ref) {
|
|
|
24402
24532
|
total = data.total;
|
|
24403
24533
|
case 28:
|
|
24404
24534
|
setInitData(newInitData);
|
|
24405
|
-
setState(_objectSpread$
|
|
24535
|
+
setState(_objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24406
24536
|
selected: [],
|
|
24407
24537
|
deleting: false,
|
|
24408
24538
|
data: newData,
|
|
24409
|
-
pagination: _objectSpread$
|
|
24539
|
+
pagination: _objectSpread$f(_objectSpread$f({}, state.pagination), {}, {
|
|
24410
24540
|
current: current === 0 ? 1 : current,
|
|
24411
24541
|
total: total
|
|
24412
24542
|
})
|
|
@@ -24427,14 +24557,14 @@ function useTableData (_ref) {
|
|
|
24427
24557
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
24428
24558
|
return;
|
|
24429
24559
|
}
|
|
24430
|
-
var newGlobalFilter = _objectSpread$
|
|
24560
|
+
var newGlobalFilter = _objectSpread$f({}, globalFilter);
|
|
24431
24561
|
if (value !== null && value !== void 0 && value.length) {
|
|
24432
24562
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
24433
24563
|
} else {
|
|
24434
24564
|
newGlobalFilter.select = {};
|
|
24435
24565
|
}
|
|
24436
24566
|
setGlobaFilter(newGlobalFilter);
|
|
24437
|
-
onChange(_objectSpread$
|
|
24567
|
+
onChange(_objectSpread$f({
|
|
24438
24568
|
pagination: state.pagination
|
|
24439
24569
|
}, filterData), newGlobalFilter);
|
|
24440
24570
|
};
|
|
@@ -24448,11 +24578,11 @@ function useTableData (_ref) {
|
|
|
24448
24578
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
24449
24579
|
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', 1];
|
|
24450
24580
|
});
|
|
24451
|
-
var newGlobalFilter = _objectSpread$
|
|
24581
|
+
var newGlobalFilter = _objectSpread$f(_objectSpread$f({}, globalFilter), {}, {
|
|
24452
24582
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
24453
24583
|
});
|
|
24454
24584
|
setGlobaFilter(newGlobalFilter);
|
|
24455
|
-
onChange(_objectSpread$
|
|
24585
|
+
onChange(_objectSpread$f({
|
|
24456
24586
|
pagination: state.pagination
|
|
24457
24587
|
}, filterData), newGlobalFilter);
|
|
24458
24588
|
};
|
|
@@ -24462,7 +24592,7 @@ function useTableData (_ref) {
|
|
|
24462
24592
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
24463
24593
|
return;
|
|
24464
24594
|
}
|
|
24465
|
-
var newGlobalFilter = _objectSpread$
|
|
24595
|
+
var newGlobalFilter = _objectSpread$f(_objectSpread$f({}, globalFilter), {}, {
|
|
24466
24596
|
search: {}
|
|
24467
24597
|
});
|
|
24468
24598
|
if (value) {
|
|
@@ -24476,7 +24606,7 @@ function useTableData (_ref) {
|
|
|
24476
24606
|
});
|
|
24477
24607
|
}
|
|
24478
24608
|
setGlobaFilter(newGlobalFilter);
|
|
24479
|
-
onChange(_objectSpread$
|
|
24609
|
+
onChange(_objectSpread$f({
|
|
24480
24610
|
pagination: state.pagination
|
|
24481
24611
|
}, filterData), newGlobalFilter);
|
|
24482
24612
|
};
|
|
@@ -24486,17 +24616,17 @@ function useTableData (_ref) {
|
|
|
24486
24616
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
24487
24617
|
return;
|
|
24488
24618
|
}
|
|
24489
|
-
var newGlobalFilter = _objectSpread$
|
|
24619
|
+
var newGlobalFilter = _objectSpread$f({}, globalFilter);
|
|
24490
24620
|
newGlobalFilter.timeStamp = {
|
|
24491
24621
|
fromTimeStamp: [from],
|
|
24492
24622
|
toTimeStamp: [to]
|
|
24493
24623
|
};
|
|
24494
24624
|
setGlobaFilter(newGlobalFilter);
|
|
24495
|
-
onChange(_objectSpread$
|
|
24625
|
+
onChange(_objectSpread$f({
|
|
24496
24626
|
pagination: state.pagination
|
|
24497
24627
|
}, filterData), newGlobalFilter);
|
|
24498
24628
|
};
|
|
24499
|
-
return _objectSpread$
|
|
24629
|
+
return _objectSpread$f(_objectSpread$f({}, state), {}, {
|
|
24500
24630
|
title: title,
|
|
24501
24631
|
configuration: configuration,
|
|
24502
24632
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -24536,8 +24666,8 @@ function StandardTable (_ref) {
|
|
|
24536
24666
|
});
|
|
24537
24667
|
}
|
|
24538
24668
|
|
|
24539
|
-
function ownKeys$
|
|
24540
|
-
function _objectSpread$
|
|
24669
|
+
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; }
|
|
24670
|
+
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
24671
|
function Table (props) {
|
|
24542
24672
|
var root = useStore();
|
|
24543
24673
|
var variant = useMemo(function () {
|
|
@@ -24545,15 +24675,15 @@ function Table (props) {
|
|
|
24545
24675
|
return config.variant;
|
|
24546
24676
|
}, [props.id]);
|
|
24547
24677
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
24548
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
24678
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$e({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$e({}, props))]
|
|
24549
24679
|
});
|
|
24550
24680
|
}
|
|
24551
24681
|
|
|
24552
24682
|
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
24683
|
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
24684
|
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$
|
|
24685
|
+
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; }
|
|
24686
|
+
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
24687
|
function useAGGrid (_ref) {
|
|
24558
24688
|
var id = _ref.id,
|
|
24559
24689
|
filter = _ref.filter,
|
|
@@ -24647,7 +24777,7 @@ function useAGGrid (_ref) {
|
|
|
24647
24777
|
value = _ref3[1];
|
|
24648
24778
|
if (_idx == 0) {
|
|
24649
24779
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
24650
|
-
rdat.push(_objectSpread$
|
|
24780
|
+
rdat.push(_objectSpread$d(_objectSpread$d({}, rd), {}, {
|
|
24651
24781
|
grouping: [idx.toString()]
|
|
24652
24782
|
}));
|
|
24653
24783
|
var sp = key.split(':');
|
|
@@ -24790,8 +24920,8 @@ var value = "value-FCA-6";
|
|
|
24790
24920
|
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
24921
|
styleInject(css_248z$a);
|
|
24792
24922
|
|
|
24793
|
-
function ownKeys$
|
|
24794
|
-
function _objectSpread$
|
|
24923
|
+
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; }
|
|
24924
|
+
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
24925
|
var AGChart = function AGChart(_ref) {
|
|
24796
24926
|
var data = _ref.data;
|
|
24797
24927
|
var groupedData = [];
|
|
@@ -24799,11 +24929,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
24799
24929
|
data.forEach(function (dt) {
|
|
24800
24930
|
if (dt.count == 0) return;
|
|
24801
24931
|
if (groupedData.length > dt.grouping[0]) {
|
|
24802
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
24932
|
+
groupedData[dt.grouping[0]].push(_objectSpread$c(_objectSpread$c({}, dt), {}, {
|
|
24803
24933
|
count: Number(dt.count)
|
|
24804
24934
|
}));
|
|
24805
24935
|
} else {
|
|
24806
|
-
groupedData.push([_objectSpread$
|
|
24936
|
+
groupedData.push([_objectSpread$c(_objectSpread$c({}, dt), {}, {
|
|
24807
24937
|
count: Number(dt.count)
|
|
24808
24938
|
})]);
|
|
24809
24939
|
}
|
|
@@ -24844,8 +24974,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
24844
24974
|
});
|
|
24845
24975
|
};
|
|
24846
24976
|
|
|
24847
|
-
function ownKeys$
|
|
24848
|
-
function _objectSpread$
|
|
24977
|
+
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; }
|
|
24978
|
+
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
24979
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
24850
24980
|
var id = _ref.id,
|
|
24851
24981
|
filter = _ref.filter,
|
|
@@ -24938,7 +25068,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
24938
25068
|
});
|
|
24939
25069
|
});
|
|
24940
25070
|
}
|
|
24941
|
-
return _objectSpread$
|
|
25071
|
+
return _objectSpread$b(_objectSpread$b({}, column), {}, {
|
|
24942
25072
|
cellRenderer: renderer
|
|
24943
25073
|
});
|
|
24944
25074
|
});
|
|
@@ -25212,8 +25342,8 @@ var CustomText$1 = observer(CustomText, {
|
|
|
25212
25342
|
forwardRef: true
|
|
25213
25343
|
});
|
|
25214
25344
|
|
|
25215
|
-
function ownKeys$
|
|
25216
|
-
function _objectSpread$
|
|
25345
|
+
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; }
|
|
25346
|
+
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
25347
|
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
25348
|
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
25349
|
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 +25406,7 @@ function useFilterBoxData (id) {
|
|
|
25276
25406
|
} finally {
|
|
25277
25407
|
_iterator.f();
|
|
25278
25408
|
}
|
|
25279
|
-
return _objectSpread$
|
|
25409
|
+
return _objectSpread$a(_objectSpread$a({}, state), ob);
|
|
25280
25410
|
}
|
|
25281
25411
|
return {
|
|
25282
25412
|
configuration: configuration,
|
|
@@ -25290,8 +25420,8 @@ function useFilterBoxData (id) {
|
|
|
25290
25420
|
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
25421
|
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
25422
|
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$
|
|
25423
|
+
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; }
|
|
25424
|
+
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
25425
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
25296
25426
|
var id = _ref.id,
|
|
25297
25427
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -25319,7 +25449,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
25319
25449
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
25320
25450
|
mode: "single",
|
|
25321
25451
|
apiInterface: filter.requestOptions,
|
|
25322
|
-
wholeData: _objectSpread$
|
|
25452
|
+
wholeData: _objectSpread$9(_objectSpread$9({}, state.filter), {}, {
|
|
25323
25453
|
tab: tab
|
|
25324
25454
|
}),
|
|
25325
25455
|
mapping: filter.requestMapping,
|
|
@@ -25551,8 +25681,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
25551
25681
|
return false;
|
|
25552
25682
|
});
|
|
25553
25683
|
|
|
25554
|
-
function ownKeys$
|
|
25555
|
-
function _objectSpread$
|
|
25684
|
+
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; }
|
|
25685
|
+
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
25686
|
function useUIBuilderData (id) {
|
|
25557
25687
|
var save = undefined;
|
|
25558
25688
|
var root = useStore();
|
|
@@ -25584,7 +25714,7 @@ function useUIBuilderData (id) {
|
|
|
25584
25714
|
var configuration = _useMemo.configuration;
|
|
25585
25715
|
useEffect(function () {
|
|
25586
25716
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
25587
|
-
return setFilter(_objectSpread$
|
|
25717
|
+
return setFilter(_objectSpread$8(_objectSpread$8({}, filter), {}, {
|
|
25588
25718
|
sessionGuid: res
|
|
25589
25719
|
}));
|
|
25590
25720
|
});
|
|
@@ -25607,8 +25737,8 @@ function useUIBuilderData (id) {
|
|
|
25607
25737
|
};
|
|
25608
25738
|
}
|
|
25609
25739
|
|
|
25610
|
-
function ownKeys$
|
|
25611
|
-
function _objectSpread$
|
|
25740
|
+
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; }
|
|
25741
|
+
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
25742
|
function UIBuilder(_ref) {
|
|
25613
25743
|
var id = _ref.id;
|
|
25614
25744
|
var state = useUIBuilderData(id);
|
|
@@ -25635,7 +25765,7 @@ function UIBuilder(_ref) {
|
|
|
25635
25765
|
override = {
|
|
25636
25766
|
value: newFilter[item.field],
|
|
25637
25767
|
setValue: function setValue(newVal) {
|
|
25638
|
-
var newFilter = _objectSpread$
|
|
25768
|
+
var newFilter = _objectSpread$7({}, state.filter);
|
|
25639
25769
|
newFilter[item.field] = newVal;
|
|
25640
25770
|
state.setFilter(newFilter);
|
|
25641
25771
|
}
|
|
@@ -25683,7 +25813,7 @@ function UIBuilder(_ref) {
|
|
|
25683
25813
|
case 'AGGrid':
|
|
25684
25814
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
25685
25815
|
id: item.id,
|
|
25686
|
-
filter: _objectSpread$
|
|
25816
|
+
filter: _objectSpread$7({
|
|
25687
25817
|
optionCodices: JSON.stringify(state.data)
|
|
25688
25818
|
}, state.filter),
|
|
25689
25819
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -25843,8 +25973,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
25843
25973
|
};
|
|
25844
25974
|
var OrgItem$1 = observer(OrgItem);
|
|
25845
25975
|
|
|
25846
|
-
function ownKeys$
|
|
25847
|
-
function _objectSpread$
|
|
25976
|
+
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; }
|
|
25977
|
+
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
25978
|
function useTransformJson (_ref) {
|
|
25849
25979
|
var id = _ref.id;
|
|
25850
25980
|
var _useState = useState(),
|
|
@@ -25910,7 +26040,7 @@ function useTransformJson (_ref) {
|
|
|
25910
26040
|
}();
|
|
25911
26041
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
25912
26042
|
var _data$children;
|
|
25913
|
-
return _objectSpread$
|
|
26043
|
+
return _objectSpread$6(_objectSpread$6({}, data), {}, {
|
|
25914
26044
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
25915
26045
|
data: data,
|
|
25916
26046
|
configuration: configuration,
|
|
@@ -26569,8 +26699,8 @@ function useCatalogEditor (id) {
|
|
|
26569
26699
|
};
|
|
26570
26700
|
}
|
|
26571
26701
|
|
|
26572
|
-
function ownKeys$
|
|
26573
|
-
function _objectSpread$
|
|
26702
|
+
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; }
|
|
26703
|
+
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
26704
|
function DragDropUpload(_ref) {
|
|
26575
26705
|
var api2Params = _ref.api2Params,
|
|
26576
26706
|
catalogId = _ref.catalogId,
|
|
@@ -26675,7 +26805,7 @@ function DragDropUpload(_ref) {
|
|
|
26675
26805
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
26676
26806
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
26677
26807
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
26678
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
26808
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$5(_objectSpread$5({}, props), {}, {
|
|
26679
26809
|
children: [/*#__PURE__*/jsx("p", {
|
|
26680
26810
|
className: "ant-upload-drag-icon",
|
|
26681
26811
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -30557,53 +30687,6 @@ function Detail(_ref) {
|
|
|
30557
30687
|
}
|
|
30558
30688
|
var DetailWithObserver = observer(Detail);
|
|
30559
30689
|
|
|
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
30690
|
function Modal() {
|
|
30608
30691
|
var _info$action2, _info$action3, _info$action4, _info$action5, _info$action6, _info$action7;
|
|
30609
30692
|
var root = useStore();
|
|
@@ -30841,14 +30924,14 @@ var MenuWrapper = function MenuWrapper() {
|
|
|
30841
30924
|
};
|
|
30842
30925
|
var Navigation = observer(MenuWrapper);
|
|
30843
30926
|
|
|
30844
|
-
var wrapper$1 = "wrapper-
|
|
30845
|
-
var css_248z$3 = ".wrapper-
|
|
30927
|
+
var wrapper$1 = "wrapper-Q13-g";
|
|
30928
|
+
var css_248z$3 = ".wrapper-Q13-g {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n";
|
|
30846
30929
|
styleInject(css_248z$3);
|
|
30847
30930
|
|
|
30848
|
-
var wrapper = "wrapper-
|
|
30849
|
-
var select = "select-
|
|
30850
|
-
var button = "button-
|
|
30851
|
-
var css_248z$2 = ".wrapper-
|
|
30931
|
+
var wrapper = "wrapper-IcNC5";
|
|
30932
|
+
var select = "select-jVMz-";
|
|
30933
|
+
var button = "button-78H38";
|
|
30934
|
+
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
30935
|
styleInject(css_248z$2);
|
|
30853
30936
|
|
|
30854
30937
|
var ArticleSelection = function ArticleSelection(_ref) {
|
|
@@ -30944,9 +31027,9 @@ var groupBadgeStyles = {
|
|
|
30944
31027
|
};
|
|
30945
31028
|
var ArticleSelection$1 = observer(ArticleSelection);
|
|
30946
31029
|
|
|
30947
|
-
function ownKeys$
|
|
30948
|
-
function _objectSpread$
|
|
30949
|
-
function useWysiwyg(_ref) {
|
|
31030
|
+
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; }
|
|
31031
|
+
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; }
|
|
31032
|
+
function useWysiwyg$1(_ref) {
|
|
30950
31033
|
var tool = _ref.tool,
|
|
30951
31034
|
visible = _ref.visible;
|
|
30952
31035
|
var _useDivaCore = useDivaCore(),
|
|
@@ -30991,7 +31074,7 @@ function useWysiwyg(_ref) {
|
|
|
30991
31074
|
_context.next = 3;
|
|
30992
31075
|
return fetch(root.configurationStore.apiConfig.enricherService + '/packages/' + id + '/mask', {
|
|
30993
31076
|
method: 'GET',
|
|
30994
|
-
headers: _objectSpread$
|
|
31077
|
+
headers: _objectSpread$4({}, jwt ? {
|
|
30995
31078
|
Authorization: 'Bearer ' + jwt
|
|
30996
31079
|
} : {})
|
|
30997
31080
|
}).then(function (r) {
|
|
@@ -31162,8 +31245,44 @@ function useWysiwyg(_ref) {
|
|
|
31162
31245
|
};
|
|
31163
31246
|
}
|
|
31164
31247
|
|
|
31165
|
-
|
|
31166
|
-
|
|
31248
|
+
var LOG$1 = getLogger('Backoffice', 'ErrorBoundary');
|
|
31249
|
+
var ErrorBoundary = function ErrorBoundary(_ref) {
|
|
31250
|
+
var children = _ref.children,
|
|
31251
|
+
_ref$errorCode = _ref.errorCode,
|
|
31252
|
+
errorCode = _ref$errorCode === void 0 ? 'BACKO_0001' : _ref$errorCode,
|
|
31253
|
+
addToErrorLog = _ref.addToErrorLog;
|
|
31254
|
+
return /*#__PURE__*/jsx(ErrorBoundary$1, {
|
|
31255
|
+
FallbackComponent: FallbackComponent,
|
|
31256
|
+
onError: function onError(err) {
|
|
31257
|
+
LOG$1.error(new DivaError$1('Error in Backoffice', {
|
|
31258
|
+
cause: err,
|
|
31259
|
+
custom: {
|
|
31260
|
+
code: errorCode,
|
|
31261
|
+
addToErrorLog: addToErrorLog
|
|
31262
|
+
}
|
|
31263
|
+
}));
|
|
31264
|
+
},
|
|
31265
|
+
children: children
|
|
31266
|
+
});
|
|
31267
|
+
};
|
|
31268
|
+
var FallbackComponent = function FallbackComponent(_ref2) {
|
|
31269
|
+
_ref2.error;
|
|
31270
|
+
var resetErrorBoundary = _ref2.resetErrorBoundary;
|
|
31271
|
+
var root = useStore();
|
|
31272
|
+
useEffect(function () {
|
|
31273
|
+
root.setResetErrorBoundary(resetErrorBoundary);
|
|
31274
|
+
return function () {
|
|
31275
|
+
root.setResetErrorBoundary();
|
|
31276
|
+
};
|
|
31277
|
+
}, []);
|
|
31278
|
+
return /*#__PURE__*/jsx(Result$1, {
|
|
31279
|
+
status: "500",
|
|
31280
|
+
subTitle: "Es ist ein Fehler aufgetreten, versuchen Sie es sp\xE4ter nochmal oder kontaktieren Sie den Support."
|
|
31281
|
+
});
|
|
31282
|
+
};
|
|
31283
|
+
|
|
31284
|
+
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; }
|
|
31285
|
+
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
31286
|
var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
31168
31287
|
var _state$articleCodex;
|
|
31169
31288
|
var tool = _ref.tool,
|
|
@@ -31171,57 +31290,135 @@ var Wsyiwyg = function Wsyiwyg(_ref) {
|
|
|
31171
31290
|
var _useDivaCore = useDivaCore(),
|
|
31172
31291
|
organizationId = _useDivaCore.state.organization._id;
|
|
31173
31292
|
var root = useStore();
|
|
31174
|
-
var state = useWysiwyg({
|
|
31293
|
+
var state = useWysiwyg$1({
|
|
31175
31294
|
tool: tool,
|
|
31176
31295
|
visible: visible
|
|
31177
31296
|
});
|
|
31297
|
+
var _useTranslation = useTranslation(),
|
|
31298
|
+
t = _useTranslation.t;
|
|
31178
31299
|
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"
|
|
31300
|
+
if (!state.pack.catalogCodex || !state.pack.accountId) return /*#__PURE__*/jsx(Fragment, {
|
|
31301
|
+
children: t('backoffice.wysiwyg.configurator.error')
|
|
31187
31302
|
});
|
|
31188
31303
|
}
|
|
31189
|
-
return /*#__PURE__*/
|
|
31190
|
-
|
|
31191
|
-
children:
|
|
31192
|
-
|
|
31193
|
-
|
|
31194
|
-
|
|
31304
|
+
return /*#__PURE__*/jsx(ErrorBoundary, {
|
|
31305
|
+
errorCode: "BACKO_0004",
|
|
31306
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
31307
|
+
className: wrapper$1,
|
|
31308
|
+
children: [/*#__PURE__*/jsx(ArticleSelection$1, {
|
|
31309
|
+
state: state
|
|
31310
|
+
}), state.pack && !state.doReset && /*#__PURE__*/jsx("div", {
|
|
31311
|
+
hidden: !state.articleCodex,
|
|
31312
|
+
style: {
|
|
31313
|
+
height: 'calc(100% - 71px)'
|
|
31314
|
+
},
|
|
31315
|
+
children: /*#__PURE__*/jsx(WebPlannerReact, {
|
|
31316
|
+
settings: state.settings,
|
|
31317
|
+
parameters: _objectSpread$3(_objectSpread$3({
|
|
31318
|
+
articleCodexes: (_state$articleCodex = state.articleCodex) !== null && _state$articleCodex !== void 0 ? _state$articleCodex : '',
|
|
31319
|
+
variantValues: '',
|
|
31320
|
+
resetArticle: '',
|
|
31321
|
+
disableToggle: '1',
|
|
31322
|
+
startDivaNr: 'DIVA-1234567890'
|
|
31323
|
+
}, !!state.doNavigate ? {
|
|
31324
|
+
initMode: 'OPENCONFIGTABGROUP',
|
|
31325
|
+
opt: state.doNavigate
|
|
31326
|
+
} : {}), {}, {
|
|
31327
|
+
catalogCodex: state.pack.catalogCodex,
|
|
31328
|
+
accountGuid: state.pack.accountId,
|
|
31329
|
+
returnTo: 'DONT_SAVE_BASKET',
|
|
31330
|
+
organizationId: organizationId,
|
|
31331
|
+
no3DConnection: 'true'
|
|
31332
|
+
}),
|
|
31333
|
+
internal: {
|
|
31334
|
+
catalogMask: state.pack,
|
|
31335
|
+
actions: {
|
|
31336
|
+
toggleLoading: root.contentStore.toggleToolLoading.bind(root.contentStore)
|
|
31337
|
+
}
|
|
31338
|
+
},
|
|
31339
|
+
isVisible: !!state.articleCodex
|
|
31340
|
+
}, state.articleCodex)
|
|
31341
|
+
})]
|
|
31342
|
+
})
|
|
31343
|
+
});
|
|
31344
|
+
};
|
|
31345
|
+
|
|
31346
|
+
function useWysiwyg(_ref) {
|
|
31347
|
+
var tool = _ref.tool;
|
|
31348
|
+
_ref.visible;
|
|
31349
|
+
tool.parameters;
|
|
31350
|
+
_objectDestructuringEmpty(useDivaCore());
|
|
31351
|
+
var root = useStore();
|
|
31352
|
+
var _useState = useState([]),
|
|
31353
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31354
|
+
data = _useState2[0],
|
|
31355
|
+
setData = _useState2[1];
|
|
31356
|
+
useEffect(function () {
|
|
31357
|
+
var _tool$parameters$data, _tool$parameters, _root$resetErrorBound;
|
|
31358
|
+
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);
|
|
31359
|
+
setData(newData);
|
|
31360
|
+
(_root$resetErrorBound = root.resetErrorBoundary) === null || _root$resetErrorBound === void 0 || _root$resetErrorBound.call(root);
|
|
31361
|
+
}, [tool.parameters, tool.parameters.data]);
|
|
31362
|
+
return {
|
|
31363
|
+
data: data
|
|
31364
|
+
};
|
|
31365
|
+
}
|
|
31366
|
+
var _resoveLanguage = function resoveLanguage(contents, lang) {
|
|
31367
|
+
for (var i = 0; i < contents.length; i++) {
|
|
31368
|
+
var c = contents[i];
|
|
31369
|
+
switch (c.type) {
|
|
31370
|
+
case 'Gallery':
|
|
31371
|
+
case 'Wrapper':
|
|
31372
|
+
c.content = _resoveLanguage(c.content, lang);
|
|
31373
|
+
break;
|
|
31374
|
+
case 'Image':
|
|
31375
|
+
if (c.altText) c.altText = getTranslation(c.altText, lang);
|
|
31376
|
+
case 'Video':
|
|
31377
|
+
c.url = getTranslation(c.url, lang);
|
|
31378
|
+
break;
|
|
31379
|
+
case 'RichText':
|
|
31380
|
+
case 'Title':
|
|
31381
|
+
c.text = getTranslation(c.text, lang);
|
|
31382
|
+
break;
|
|
31383
|
+
case 'URL':
|
|
31384
|
+
if (c.text) c.text = getTranslation(c.text, lang);
|
|
31385
|
+
c.url = getTranslation(c.url, lang);
|
|
31386
|
+
break;
|
|
31387
|
+
}
|
|
31388
|
+
}
|
|
31389
|
+
return contents;
|
|
31390
|
+
};
|
|
31391
|
+
var getTranslation = function getTranslation(text, lang) {
|
|
31392
|
+
if (_typeof(text) === 'object') {
|
|
31393
|
+
return text[lang] || text['de'] || text[Object.keys(text)[0]];
|
|
31394
|
+
} else {
|
|
31395
|
+
return text;
|
|
31396
|
+
}
|
|
31397
|
+
};
|
|
31398
|
+
|
|
31399
|
+
var WsyiwygContentItem = function WsyiwygContentItem(_ref) {
|
|
31400
|
+
var tool = _ref.tool,
|
|
31401
|
+
visible = _ref.visible;
|
|
31402
|
+
var _useWysiwygContentIte = useWysiwyg({
|
|
31403
|
+
tool: tool,
|
|
31404
|
+
visible: visible
|
|
31405
|
+
}),
|
|
31406
|
+
data = _useWysiwygContentIte.data;
|
|
31407
|
+
return /*#__PURE__*/jsx(ErrorBoundary, {
|
|
31408
|
+
errorCode: "BACKO_0004",
|
|
31409
|
+
addToErrorLog: data,
|
|
31410
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
31195
31411
|
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
|
-
})]
|
|
31412
|
+
display: 'flex',
|
|
31413
|
+
flexDirection: 'column',
|
|
31414
|
+
height: '100%'
|
|
31415
|
+
},
|
|
31416
|
+
children: [/*#__PURE__*/jsx(ContentItemComponent, {
|
|
31417
|
+
settings: {
|
|
31418
|
+
contentItems: data !== null && data !== void 0 ? data : []
|
|
31419
|
+
}
|
|
31420
|
+
}), ";"]
|
|
31421
|
+
})
|
|
31225
31422
|
});
|
|
31226
31423
|
};
|
|
31227
31424
|
|
|
@@ -31232,7 +31429,7 @@ var draghandle = "draghandle-f5b0N";
|
|
|
31232
31429
|
var midHandle = "mid-handle--qh50";
|
|
31233
31430
|
var toolItem = "tool-item-KyKgQ";
|
|
31234
31431
|
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:
|
|
31432
|
+
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
31433
|
styleInject(css_248z$1);
|
|
31237
31434
|
|
|
31238
31435
|
var overlay = "overlay-Dr5pn";
|
|
@@ -31267,6 +31464,8 @@ function Spinner() {
|
|
|
31267
31464
|
}
|
|
31268
31465
|
var Spinner$1 = observer(Spinner);
|
|
31269
31466
|
|
|
31467
|
+
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; }
|
|
31468
|
+
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
31469
|
var Toolbar = function Toolbar(_ref) {
|
|
31271
31470
|
_objectDestructuringEmpty(_ref);
|
|
31272
31471
|
var root = useStore();
|
|
@@ -31320,9 +31519,10 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
31320
31519
|
visible: !root.contentStore.hideTools
|
|
31321
31520
|
});
|
|
31322
31521
|
break;
|
|
31323
|
-
case '
|
|
31324
|
-
ToolElement = /*#__PURE__*/jsx(
|
|
31325
|
-
|
|
31522
|
+
case 'ContentItem':
|
|
31523
|
+
ToolElement = /*#__PURE__*/jsx(WsyiwygContentItem, {
|
|
31524
|
+
tool: tool,
|
|
31525
|
+
visible: !root.contentStore.hideTools
|
|
31326
31526
|
});
|
|
31327
31527
|
break;
|
|
31328
31528
|
}
|
|
@@ -31336,9 +31536,11 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
31336
31536
|
children: [ToolElement && /*#__PURE__*/jsxs("div", {
|
|
31337
31537
|
className: classnames(container, root.contentStore.toolPinned ? pinned : undefined),
|
|
31338
31538
|
hidden: root.contentStore.hideTools,
|
|
31339
|
-
style: {
|
|
31539
|
+
style: _objectSpread$2({
|
|
31340
31540
|
width: width
|
|
31341
|
-
},
|
|
31541
|
+
}, tool !== null && tool !== void 0 && tool.offsetRight ? {
|
|
31542
|
+
right: tool.offsetRight
|
|
31543
|
+
} : {}),
|
|
31342
31544
|
children: [/*#__PURE__*/jsx(Spinner$1, {}), ToolElement, /*#__PURE__*/jsx("div", {
|
|
31343
31545
|
className: draghandle,
|
|
31344
31546
|
onMouseDown: handler,
|