@crystaldesign/diva-backoffice 24.11.0-beta.27 → 24.11.0-beta.29
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 +608 -333
- 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/Content/index.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Navigation/types.d.ts +1 -0
- package/build/types/backoffice/src/layout/Navigation/types.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_ContentItem/useWysiwygContentItem.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/Fields/FormList/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/useFormData.d.ts +2 -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/CatalogTable/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/StandardTable/useTableData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/types.d.ts +1 -0
- package/build/types/backoffice/src/ui/Table/types.d.ts.map +1 -1
- package/package.json +3 -3
package/build/esm/index.js
CHANGED
|
@@ -138,8 +138,8 @@ import { ContentItemComponent } from '@crystaldesign/content-item';
|
|
|
138
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; } } }; }
|
|
139
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; } }
|
|
140
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; }
|
|
141
|
-
function ownKeys$
|
|
142
|
-
function _objectSpread$
|
|
141
|
+
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; }
|
|
142
|
+
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; }
|
|
143
143
|
var LOG$c = getLogger('Backoffice', 'AplyMapping');
|
|
144
144
|
function aplyMapping (_ref) {
|
|
145
145
|
var mapable = _ref.mapable,
|
|
@@ -160,10 +160,10 @@ function aplyMapping (_ref) {
|
|
|
160
160
|
var newValue = {};
|
|
161
161
|
newValue[newKey] = valueToAdd;
|
|
162
162
|
if ((startValue === null || startValue === void 0 ? void 0 : startValue[newKey]) != undefined) {
|
|
163
|
-
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$
|
|
163
|
+
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$N(_objectSpread$N({}, startValue[newKey]), valueToAdd);else startValue[newKey] = type == 'addToSourceValue' ? startValue[newKey] + valueToAdd : valueToAdd;
|
|
164
164
|
return startValue;
|
|
165
165
|
}
|
|
166
|
-
if (newIdx == 1) return _objectSpread$
|
|
166
|
+
if (newIdx == 1) return _objectSpread$N(_objectSpread$N({}, startValue), newValue);
|
|
167
167
|
return _getTarget(idx + 1, keys, startValue, newValue);
|
|
168
168
|
};
|
|
169
169
|
returnValue = _getTarget(0, key.split('.'), returnValue, value);
|
|
@@ -444,8 +444,8 @@ function getLeafColumns(columns) {
|
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
-
function ownKeys$
|
|
448
|
-
function _objectSpread$
|
|
447
|
+
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; }
|
|
448
|
+
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; }
|
|
449
449
|
var LOG$b = getLogger('Backoffice', 'ApiHandler');
|
|
450
450
|
var jp = require('jsonpath');
|
|
451
451
|
var _default$d = /*#__PURE__*/function () {
|
|
@@ -624,7 +624,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
624
624
|
_context2.next = 20;
|
|
625
625
|
return fetch(finalUrl, {
|
|
626
626
|
method: this._updateMethod,
|
|
627
|
-
headers: _objectSpread$
|
|
627
|
+
headers: _objectSpread$M(_objectSpread$M({}, jwt ? {
|
|
628
628
|
Authorization: 'Bearer ' + jwt
|
|
629
629
|
} : {}), {}, {
|
|
630
630
|
'Content-Type': 'application/json'
|
|
@@ -717,7 +717,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
717
717
|
rootStore: this._rootStore,
|
|
718
718
|
fallBackToParams: true
|
|
719
719
|
});
|
|
720
|
-
if (data) createData = _objectSpread$
|
|
720
|
+
if (data) createData = _objectSpread$M({}, data);
|
|
721
721
|
} else if (data !== undefined) {
|
|
722
722
|
createData = aplyMapping({
|
|
723
723
|
mapable: data,
|
|
@@ -860,7 +860,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
860
860
|
_context6.next = 7;
|
|
861
861
|
return fetch((_url = url) === null || _url === void 0 ? void 0 : _url.toString(), {
|
|
862
862
|
method: isApi2 ? 'POST' : 'DELETE',
|
|
863
|
-
headers: _objectSpread$
|
|
863
|
+
headers: _objectSpread$M({}, jwt ? {
|
|
864
864
|
Authorization: 'Bearer ' + jwt
|
|
865
865
|
} : {})
|
|
866
866
|
}).then( /*#__PURE__*/function () {
|
|
@@ -978,7 +978,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
978
978
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
979
979
|
case 2:
|
|
980
980
|
jwt = (_this$_rootStore5 = this._rootStore) === null || _this$_rootStore5 === void 0 ? void 0 : _this$_rootStore5.dataStore.jwt;
|
|
981
|
-
url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
981
|
+
url = filterServerSide ? parseServersideFilters(_objectSpread$M(_objectSpread$M({}, filterServerSide), {}, {
|
|
982
982
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
983
983
|
baseUrl: this._readListUrl,
|
|
984
984
|
prefilter: prefilter
|
|
@@ -998,7 +998,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
998
998
|
});
|
|
999
999
|
case 6:
|
|
1000
1000
|
response = _context8.sent;
|
|
1001
|
-
return _context8.abrupt("return", _objectSpread$
|
|
1001
|
+
return _context8.abrupt("return", _objectSpread$M(_objectSpread$M({}, response), {}, {
|
|
1002
1002
|
data: response.data.map(function (d) {
|
|
1003
1003
|
return _this2.aplyJsonPath(d, _this2._readJsonPath);
|
|
1004
1004
|
})
|
|
@@ -1022,7 +1022,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1022
1022
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1023
1023
|
}
|
|
1024
1024
|
(_this$_rootStore6 = this._rootStore) === null || _this$_rootStore6 === void 0 ? void 0 : _this$_rootStore6.dataStore.jwt;
|
|
1025
|
-
var url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1025
|
+
var url = filterServerSide ? parseServersideFilters(_objectSpread$M(_objectSpread$M({}, filterServerSide), {}, {
|
|
1026
1026
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1027
1027
|
baseUrl: this._readListUrl,
|
|
1028
1028
|
prefilter: prefilter
|
|
@@ -1229,8 +1229,8 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1229
1229
|
}]);
|
|
1230
1230
|
}(_default$d);
|
|
1231
1231
|
|
|
1232
|
-
function ownKeys$
|
|
1233
|
-
function _objectSpread$
|
|
1232
|
+
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; }
|
|
1233
|
+
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; }
|
|
1234
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
1235
|
function _isNativeReflectConstruct$5() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1236
1236
|
var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
@@ -1329,7 +1329,7 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1329
1329
|
_context2.next = 5;
|
|
1330
1330
|
return fetch(this._createUrl + '?ref=true', {
|
|
1331
1331
|
method: this._createMethod,
|
|
1332
|
-
headers: _objectSpread$
|
|
1332
|
+
headers: _objectSpread$L({}, jwt ? {
|
|
1333
1333
|
Authorization: 'Bearer ' + jwt
|
|
1334
1334
|
} : {}),
|
|
1335
1335
|
body: data
|
|
@@ -1707,8 +1707,8 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1707
1707
|
}]);
|
|
1708
1708
|
}(_default$d);
|
|
1709
1709
|
|
|
1710
|
-
function ownKeys$
|
|
1711
|
-
function _objectSpread$
|
|
1710
|
+
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; }
|
|
1711
|
+
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; }
|
|
1712
1712
|
var _default$7 = /*#__PURE__*/function () {
|
|
1713
1713
|
function _default(root) {
|
|
1714
1714
|
_classCallCheck(this, _default);
|
|
@@ -1744,7 +1744,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1744
1744
|
var _i$permission;
|
|
1745
1745
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
1746
1746
|
});
|
|
1747
|
-
config = _objectSpread$
|
|
1747
|
+
config = _objectSpread$K(_objectSpread$K({}, config), {}, {
|
|
1748
1748
|
items: filteredItems
|
|
1749
1749
|
});
|
|
1750
1750
|
}
|
|
@@ -2776,7 +2776,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
2776
2776
|
title: t('backoffice.table.catalogtranslation.title'),
|
|
2777
2777
|
type: 'Table',
|
|
2778
2778
|
variant: 'CatalogTable',
|
|
2779
|
-
height: '
|
|
2779
|
+
height: '50vh',
|
|
2780
2780
|
columns: [{
|
|
2781
2781
|
title: t('backoffice.table.catalogtranslation.columns.codex'),
|
|
2782
2782
|
field: 'ItemCodex',
|
|
@@ -3050,7 +3050,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3050
3050
|
field: 'ItemRefArticleCodex',
|
|
3051
3051
|
sorter: 3,
|
|
3052
3052
|
filter: 'advanced',
|
|
3053
|
-
width:
|
|
3053
|
+
width: 150
|
|
3054
3054
|
}, {
|
|
3055
3055
|
title: t('backoffice.table.partlists.columns.RefWidth'),
|
|
3056
3056
|
field: 'RefWidth',
|
|
@@ -3146,6 +3146,9 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3146
3146
|
title: t('backoffice.table.contentitems.title'),
|
|
3147
3147
|
type: 'Table',
|
|
3148
3148
|
canRefresh: true,
|
|
3149
|
+
pagination: {
|
|
3150
|
+
pageSize: 50
|
|
3151
|
+
},
|
|
3149
3152
|
copyAction: {
|
|
3150
3153
|
actionType: 'Detail',
|
|
3151
3154
|
type: 'Form',
|
|
@@ -3186,7 +3189,32 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3186
3189
|
field: 'description',
|
|
3187
3190
|
sorter: 1,
|
|
3188
3191
|
filter: 'advanced',
|
|
3189
|
-
width:
|
|
3192
|
+
width: 500
|
|
3193
|
+
}, {
|
|
3194
|
+
title: t('backoffice.table.roles.columns.supplier'),
|
|
3195
|
+
field: 'supplierName',
|
|
3196
|
+
sorter: 1,
|
|
3197
|
+
filter: 'advanced',
|
|
3198
|
+
width: 200
|
|
3199
|
+
}, {
|
|
3200
|
+
title: t('backoffice.table.roles.columns.catalogName'),
|
|
3201
|
+
field: 'catalogName',
|
|
3202
|
+
sorter: 1,
|
|
3203
|
+
filter: 'advanced',
|
|
3204
|
+
width: 200
|
|
3205
|
+
}, {
|
|
3206
|
+
title: t('backoffice.table.views.lastUpdatedBy'),
|
|
3207
|
+
field: 'lastUpdatedBy_displayText',
|
|
3208
|
+
sorter: 1,
|
|
3209
|
+
filter: 'advanced',
|
|
3210
|
+
width: 150
|
|
3211
|
+
}, {
|
|
3212
|
+
title: t('backoffice.table.views.lastUpdated'),
|
|
3213
|
+
field: 'lastUpdated',
|
|
3214
|
+
type: 'unixTimeStamp',
|
|
3215
|
+
sorter: 1,
|
|
3216
|
+
filter: 'advanced',
|
|
3217
|
+
width: 200
|
|
3190
3218
|
}, {
|
|
3191
3219
|
title: 'backoffice.content',
|
|
3192
3220
|
field: 'content',
|
|
@@ -3197,7 +3225,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3197
3225
|
sorter: 1,
|
|
3198
3226
|
defaultSortOrder: 'ascend',
|
|
3199
3227
|
filter: 'advanced',
|
|
3200
|
-
width:
|
|
3228
|
+
width: 150
|
|
3201
3229
|
}, {
|
|
3202
3230
|
title: t('backoffice._id'),
|
|
3203
3231
|
field: '_id',
|
|
@@ -3212,7 +3240,17 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
3212
3240
|
},
|
|
3213
3241
|
type: 'Form',
|
|
3214
3242
|
id: 'FormEditContentItem',
|
|
3215
|
-
title: t('backoffice.table.contentItem.edit')
|
|
3243
|
+
title: t('backoffice.table.contentItem.edit'),
|
|
3244
|
+
label: t('backoffice.edit')
|
|
3245
|
+
}, {
|
|
3246
|
+
actionType: 'Detail',
|
|
3247
|
+
hidden: function hidden(data) {
|
|
3248
|
+
return !!(data !== null && data !== void 0 && data.organizationId) || root.actions.userHasPermission('backoffice_edit_contentitem_template');
|
|
3249
|
+
},
|
|
3250
|
+
type: 'Form',
|
|
3251
|
+
id: 'FormShowContentItem',
|
|
3252
|
+
title: t('backoffice.table.contentItem.show'),
|
|
3253
|
+
label: t('backoffice.show')
|
|
3216
3254
|
}, {
|
|
3217
3255
|
actionType: 'Detail',
|
|
3218
3256
|
permission: 'backoffice_edit_contentitem_template',
|
|
@@ -7364,6 +7402,14 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7364
7402
|
name: 'description',
|
|
7365
7403
|
type: 'input',
|
|
7366
7404
|
label: t('description')
|
|
7405
|
+
}, {
|
|
7406
|
+
name: 'supplierName',
|
|
7407
|
+
type: 'input',
|
|
7408
|
+
label: t('backoffice.table.roles.columns.supplier')
|
|
7409
|
+
}, {
|
|
7410
|
+
name: 'catalogName',
|
|
7411
|
+
type: 'input',
|
|
7412
|
+
label: t('backoffice.table.roles.columns.catalogName')
|
|
7367
7413
|
}, {
|
|
7368
7414
|
name: 'organizationId',
|
|
7369
7415
|
hidden: true
|
|
@@ -7569,6 +7615,224 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7569
7615
|
create: '${catalogService}/contentItems'
|
|
7570
7616
|
}
|
|
7571
7617
|
},
|
|
7618
|
+
FormShowContentItem: {
|
|
7619
|
+
type: 'Form',
|
|
7620
|
+
items: [],
|
|
7621
|
+
itemsByData: function itemsByData(data, apiConfig) {
|
|
7622
|
+
var result = [{
|
|
7623
|
+
name: 'description',
|
|
7624
|
+
type: 'input',
|
|
7625
|
+
label: t('description')
|
|
7626
|
+
}, {
|
|
7627
|
+
name: 'supplierName',
|
|
7628
|
+
type: 'input',
|
|
7629
|
+
label: t('backoffice.table.roles.columns.supplier')
|
|
7630
|
+
}, {
|
|
7631
|
+
name: 'catalogName',
|
|
7632
|
+
type: 'input',
|
|
7633
|
+
label: t('backoffice.table.roles.columns.catalogName')
|
|
7634
|
+
}, {
|
|
7635
|
+
name: 'organizationId',
|
|
7636
|
+
hidden: true
|
|
7637
|
+
}];
|
|
7638
|
+
var translationItems = [];
|
|
7639
|
+
var _getItemsByContent2 = function getItemsByContent(content, path) {
|
|
7640
|
+
for (var i = 0; i < content.length; i++) {
|
|
7641
|
+
var item = content[i];
|
|
7642
|
+
var p = [].concat(_toConsumableArray(path), [i]);
|
|
7643
|
+
switch (item.type) {
|
|
7644
|
+
case 'Title':
|
|
7645
|
+
translationItems.push({
|
|
7646
|
+
name: 'Title',
|
|
7647
|
+
type: 'subTitle'
|
|
7648
|
+
});
|
|
7649
|
+
translationItems.push({
|
|
7650
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7651
|
+
hidden: true
|
|
7652
|
+
});
|
|
7653
|
+
translationItems.push({
|
|
7654
|
+
name: [].concat(_toConsumableArray(p), ['style']),
|
|
7655
|
+
hidden: true
|
|
7656
|
+
});
|
|
7657
|
+
translationItems.push({
|
|
7658
|
+
name: [].concat(_toConsumableArray(p), ['text']),
|
|
7659
|
+
type: 'input',
|
|
7660
|
+
label: t('backoffice.table.views.rowAction.label'),
|
|
7661
|
+
doTranslate: true
|
|
7662
|
+
});
|
|
7663
|
+
break;
|
|
7664
|
+
case 'RichText':
|
|
7665
|
+
translationItems.push({
|
|
7666
|
+
name: 'RichText',
|
|
7667
|
+
type: 'subTitle'
|
|
7668
|
+
});
|
|
7669
|
+
translationItems.push({
|
|
7670
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7671
|
+
hidden: true
|
|
7672
|
+
});
|
|
7673
|
+
translationItems.push({
|
|
7674
|
+
name: [].concat(_toConsumableArray(p), ['style']),
|
|
7675
|
+
hidden: true
|
|
7676
|
+
});
|
|
7677
|
+
translationItems.push({
|
|
7678
|
+
name: [].concat(_toConsumableArray(p), ['text']),
|
|
7679
|
+
type: 'richText',
|
|
7680
|
+
label: t('backoffice.table.views.rowAction.label'),
|
|
7681
|
+
doTranslate: true
|
|
7682
|
+
});
|
|
7683
|
+
break;
|
|
7684
|
+
case 'URL':
|
|
7685
|
+
translationItems.push({
|
|
7686
|
+
name: 'URL',
|
|
7687
|
+
type: 'subTitle'
|
|
7688
|
+
});
|
|
7689
|
+
translationItems.push({
|
|
7690
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7691
|
+
hidden: true
|
|
7692
|
+
});
|
|
7693
|
+
translationItems.push({
|
|
7694
|
+
name: [].concat(_toConsumableArray(p), ['url']),
|
|
7695
|
+
type: 'input',
|
|
7696
|
+
label: t('backoffice.form.api2servers.items.url'),
|
|
7697
|
+
doTranslate: true
|
|
7698
|
+
});
|
|
7699
|
+
translationItems.push({
|
|
7700
|
+
name: [].concat(_toConsumableArray(p), ['text']),
|
|
7701
|
+
type: 'input',
|
|
7702
|
+
label: t('backoffice.table.views.rowAction.label'),
|
|
7703
|
+
doTranslate: true
|
|
7704
|
+
});
|
|
7705
|
+
break;
|
|
7706
|
+
case 'Gallery':
|
|
7707
|
+
translationItems.push({
|
|
7708
|
+
name: 'Gallery',
|
|
7709
|
+
type: 'subTitle'
|
|
7710
|
+
});
|
|
7711
|
+
translationItems.push({
|
|
7712
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7713
|
+
hidden: true
|
|
7714
|
+
});
|
|
7715
|
+
translationItems.push({
|
|
7716
|
+
name: [].concat(_toConsumableArray(p), ['wrappingStyle']),
|
|
7717
|
+
hidden: true
|
|
7718
|
+
});
|
|
7719
|
+
translationItems.push({
|
|
7720
|
+
name: [].concat(_toConsumableArray(p), ['content']),
|
|
7721
|
+
type: 'array',
|
|
7722
|
+
initialValue: item.content,
|
|
7723
|
+
items: [{
|
|
7724
|
+
type: 'radio',
|
|
7725
|
+
name: 'type',
|
|
7726
|
+
label: t('Format'),
|
|
7727
|
+
required: true,
|
|
7728
|
+
optionType: 'button',
|
|
7729
|
+
defaultValue: 'Image',
|
|
7730
|
+
options: [{
|
|
7731
|
+
value: 'Image',
|
|
7732
|
+
label: 'Image'
|
|
7733
|
+
}, {
|
|
7734
|
+
value: 'Video',
|
|
7735
|
+
label: 'Video'
|
|
7736
|
+
}]
|
|
7737
|
+
}, {
|
|
7738
|
+
name: 'url',
|
|
7739
|
+
type: 'input',
|
|
7740
|
+
label: t('backoffice.form.api2servers.items.url'),
|
|
7741
|
+
doTranslate: true
|
|
7742
|
+
}, {
|
|
7743
|
+
name: 'altText',
|
|
7744
|
+
type: 'input',
|
|
7745
|
+
label: t('backoffice.table.views.rowAction.label'),
|
|
7746
|
+
doTranslate: true
|
|
7747
|
+
}, {
|
|
7748
|
+
name: 'style',
|
|
7749
|
+
hidden: true
|
|
7750
|
+
}, {
|
|
7751
|
+
name: 'cover',
|
|
7752
|
+
hidden: true
|
|
7753
|
+
}]
|
|
7754
|
+
});
|
|
7755
|
+
break;
|
|
7756
|
+
case 'Image':
|
|
7757
|
+
translationItems.push({
|
|
7758
|
+
name: 'Image',
|
|
7759
|
+
type: 'subTitle'
|
|
7760
|
+
});
|
|
7761
|
+
translationItems.push({
|
|
7762
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7763
|
+
hidden: true
|
|
7764
|
+
});
|
|
7765
|
+
translationItems.push({
|
|
7766
|
+
name: [].concat(_toConsumableArray(p), ['style']),
|
|
7767
|
+
hidden: true
|
|
7768
|
+
});
|
|
7769
|
+
translationItems.push({
|
|
7770
|
+
name: [].concat(_toConsumableArray(p), ['cover']),
|
|
7771
|
+
hidden: true
|
|
7772
|
+
});
|
|
7773
|
+
translationItems.push({
|
|
7774
|
+
name: [].concat(_toConsumableArray(p), ['url']),
|
|
7775
|
+
type: 'input',
|
|
7776
|
+
label: t('backoffice.form.api2servers.items.url'),
|
|
7777
|
+
doTranslate: true
|
|
7778
|
+
});
|
|
7779
|
+
translationItems.push({
|
|
7780
|
+
name: [].concat(_toConsumableArray(p), ['altText']),
|
|
7781
|
+
type: 'input',
|
|
7782
|
+
label: t('backoffice.table.views.rowAction.label'),
|
|
7783
|
+
doTranslate: true
|
|
7784
|
+
});
|
|
7785
|
+
break;
|
|
7786
|
+
case 'Video':
|
|
7787
|
+
translationItems.push({
|
|
7788
|
+
name: 'Video',
|
|
7789
|
+
type: 'subTitle'
|
|
7790
|
+
});
|
|
7791
|
+
translationItems.push({
|
|
7792
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7793
|
+
hidden: true
|
|
7794
|
+
});
|
|
7795
|
+
translationItems.push({
|
|
7796
|
+
name: [].concat(_toConsumableArray(p), ['url']),
|
|
7797
|
+
type: 'input',
|
|
7798
|
+
label: t('backoffice.form.api2servers.items.url'),
|
|
7799
|
+
doTranslate: true
|
|
7800
|
+
});
|
|
7801
|
+
break;
|
|
7802
|
+
case 'Wrapper':
|
|
7803
|
+
translationItems.push({
|
|
7804
|
+
name: [].concat(_toConsumableArray(p), ['type']),
|
|
7805
|
+
hidden: true
|
|
7806
|
+
});
|
|
7807
|
+
translationItems.push({
|
|
7808
|
+
name: [].concat(_toConsumableArray(p), ['style']),
|
|
7809
|
+
hidden: true
|
|
7810
|
+
});
|
|
7811
|
+
_getItemsByContent2(item.content, [].concat(_toConsumableArray(p), ['content']));
|
|
7812
|
+
break;
|
|
7813
|
+
}
|
|
7814
|
+
}
|
|
7815
|
+
};
|
|
7816
|
+
_getItemsByContent2(data.content, ['content']);
|
|
7817
|
+
result.push({
|
|
7818
|
+
type: 'translation',
|
|
7819
|
+
items: translationItems,
|
|
7820
|
+
name: '',
|
|
7821
|
+
apiInterface: {
|
|
7822
|
+
create: {
|
|
7823
|
+
url: apiConfig.adminService + '/locales/translate?translationService=' + config.translationService,
|
|
7824
|
+
method: 'POST'
|
|
7825
|
+
}
|
|
7826
|
+
}
|
|
7827
|
+
});
|
|
7828
|
+
return result;
|
|
7829
|
+
},
|
|
7830
|
+
tools: [{
|
|
7831
|
+
id: 'WYSIWYG_ContentItem',
|
|
7832
|
+
name: 'ContentItem Preview',
|
|
7833
|
+
type: 'ContentItem'
|
|
7834
|
+
}]
|
|
7835
|
+
},
|
|
7572
7836
|
FormApplicationTranslationsEdit: {
|
|
7573
7837
|
type: 'Form',
|
|
7574
7838
|
title: t('backoffice.form.applicationtranslationedit.title'),
|
|
@@ -11316,8 +11580,8 @@ function getIcon(icon) {
|
|
|
11316
11580
|
return undefined;
|
|
11317
11581
|
}
|
|
11318
11582
|
|
|
11319
|
-
function ownKeys$
|
|
11320
|
-
function _objectSpread$
|
|
11583
|
+
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; }
|
|
11584
|
+
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; }
|
|
11321
11585
|
var _default$6 = /*#__PURE__*/function () {
|
|
11322
11586
|
function _default(root) {
|
|
11323
11587
|
_classCallCheck(this, _default);
|
|
@@ -11449,7 +11713,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11449
11713
|
if (index >= 0) {
|
|
11450
11714
|
this._additionalMenuElements[index] = {
|
|
11451
11715
|
key: key,
|
|
11452
|
-
element: _objectSpread$
|
|
11716
|
+
element: _objectSpread$J(_objectSpread$J({}, this._additionalMenuElements[index].element), {}, {
|
|
11453
11717
|
items: items,
|
|
11454
11718
|
selected: selected
|
|
11455
11719
|
})
|
|
@@ -11500,7 +11764,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11500
11764
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
11501
11765
|
this.root.navigate('/' + path);
|
|
11502
11766
|
}
|
|
11503
|
-
this._menuElement1 = _objectSpread$
|
|
11767
|
+
this._menuElement1 = _objectSpread$J(_objectSpread$J({}, this.menuElement1), {}, {
|
|
11504
11768
|
selected: this._selectedMenuKeys[0]
|
|
11505
11769
|
});
|
|
11506
11770
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -11744,7 +12008,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
11744
12008
|
return items.filter(function (item) {
|
|
11745
12009
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
11746
12010
|
}).map(function (item) {
|
|
11747
|
-
return _objectSpread$
|
|
12011
|
+
return _objectSpread$J(_objectSpread$J({}, item), {}, {
|
|
11748
12012
|
items: item.items ? _this4.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
11749
12013
|
subMenu: item.subMenu ? _this4.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
11750
12014
|
});
|
|
@@ -13019,8 +13283,8 @@ function removeEmpty(data) {
|
|
|
13019
13283
|
return undefined;
|
|
13020
13284
|
}
|
|
13021
13285
|
|
|
13022
|
-
function ownKeys$
|
|
13023
|
-
function _objectSpread$
|
|
13286
|
+
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; }
|
|
13287
|
+
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; }
|
|
13024
13288
|
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; } } }; }
|
|
13025
13289
|
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; } }
|
|
13026
13290
|
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; }
|
|
@@ -13031,7 +13295,8 @@ function useFormData (_ref) {
|
|
|
13031
13295
|
skipApi = _ref.skipApi,
|
|
13032
13296
|
mappingData = _ref.mappingData,
|
|
13033
13297
|
apiInterface = _ref.apiInterface,
|
|
13034
|
-
form = _ref.form
|
|
13298
|
+
form = _ref.form,
|
|
13299
|
+
setCanSave = _ref.setCanSave;
|
|
13035
13300
|
var root = useStore();
|
|
13036
13301
|
var _useDivaCore = useDivaCore(),
|
|
13037
13302
|
apiConfig = _useDivaCore.state.apiConfig,
|
|
@@ -13090,6 +13355,9 @@ function useFormData (_ref) {
|
|
|
13090
13355
|
}
|
|
13091
13356
|
return newData;
|
|
13092
13357
|
};
|
|
13358
|
+
useEffect(function () {
|
|
13359
|
+
if (!configuration.apiInterface) setCanSave === null || setCanSave === void 0 || setCanSave(false);
|
|
13360
|
+
}, [configuration]);
|
|
13093
13361
|
var onLoadFields = function onLoadFields(data) {
|
|
13094
13362
|
var items = selectedItems !== null && selectedItems !== void 0 ? selectedItems : configuration.items;
|
|
13095
13363
|
if (Array.isArray(items[0])) items = configuration.items[0];
|
|
@@ -13126,7 +13394,7 @@ function useFormData (_ref) {
|
|
|
13126
13394
|
multipleEditingData = inboundData;
|
|
13127
13395
|
}
|
|
13128
13396
|
return {
|
|
13129
|
-
loadedData: onLoadFields(_objectSpread$
|
|
13397
|
+
loadedData: onLoadFields(_objectSpread$I({}, dt)),
|
|
13130
13398
|
multipleEditingData: multipleEditingData
|
|
13131
13399
|
};
|
|
13132
13400
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -13163,7 +13431,7 @@ function useFormData (_ref) {
|
|
|
13163
13431
|
setFieldErrors = _useState18[1];
|
|
13164
13432
|
useEffect(function () {
|
|
13165
13433
|
var _loadedData$_id2;
|
|
13166
|
-
setState(_objectSpread$
|
|
13434
|
+
setState(_objectSpread$I(_objectSpread$I({}, state), {}, {
|
|
13167
13435
|
data: loadedData,
|
|
13168
13436
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
13169
13437
|
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),
|
|
@@ -13261,7 +13529,7 @@ function useFormData (_ref) {
|
|
|
13261
13529
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
13262
13530
|
while (1) switch (_context2.prev = _context2.next) {
|
|
13263
13531
|
case 0:
|
|
13264
|
-
newData = merge$1(_objectSpread$
|
|
13532
|
+
newData = merge$1(_objectSpread$I({}, state.data), values);
|
|
13265
13533
|
if (!skipApi) {
|
|
13266
13534
|
_context2.next = 3;
|
|
13267
13535
|
break;
|
|
@@ -13269,12 +13537,12 @@ function useFormData (_ref) {
|
|
|
13269
13537
|
return _context2.abrupt("return", newData);
|
|
13270
13538
|
case 3:
|
|
13271
13539
|
_context2.next = 5;
|
|
13272
|
-
return setDynamicFields(_objectSpread$
|
|
13540
|
+
return setDynamicFields(_objectSpread$I({}, state.data), newData);
|
|
13273
13541
|
case 5:
|
|
13274
13542
|
newData = _context2.sent;
|
|
13275
|
-
newData = onSaveFields(_objectSpread$
|
|
13543
|
+
newData = onSaveFields(_objectSpread$I({}, state.data), newData);
|
|
13276
13544
|
newData = removeEmpty(newData);
|
|
13277
|
-
setState(_objectSpread$
|
|
13545
|
+
setState(_objectSpread$I(_objectSpread$I({}, state), {}, {
|
|
13278
13546
|
loading: true
|
|
13279
13547
|
}));
|
|
13280
13548
|
finalData = state.data;
|
|
@@ -13323,13 +13591,13 @@ function useFormData (_ref) {
|
|
|
13323
13591
|
_context2.next = 37;
|
|
13324
13592
|
break;
|
|
13325
13593
|
}
|
|
13326
|
-
setFieldErrors(_objectSpread$
|
|
13594
|
+
setFieldErrors(_objectSpread$I(_objectSpread$I({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
13327
13595
|
return _context2.abrupt("return", undefined);
|
|
13328
13596
|
case 37:
|
|
13329
13597
|
throw _context2.t0;
|
|
13330
13598
|
case 38:
|
|
13331
13599
|
_context2.prev = 38;
|
|
13332
|
-
setState(_objectSpread$
|
|
13600
|
+
setState(_objectSpread$I(_objectSpread$I({}, state), {}, {
|
|
13333
13601
|
data: finalData,
|
|
13334
13602
|
loading: false
|
|
13335
13603
|
}));
|
|
@@ -13359,7 +13627,7 @@ function useFormData (_ref) {
|
|
|
13359
13627
|
}
|
|
13360
13628
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
13361
13629
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
13362
|
-
var wholeData = Object.assign(_objectSpread$
|
|
13630
|
+
var wholeData = Object.assign(_objectSpread$I({}, state.data), _objectSpread$I({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
13363
13631
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
13364
13632
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
13365
13633
|
setHiddenRequiredDisabled(newState);
|
|
@@ -13372,41 +13640,18 @@ function useFormData (_ref) {
|
|
|
13372
13640
|
}
|
|
13373
13641
|
};
|
|
13374
13642
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
13375
|
-
var data = d !== null && d !== void 0 ? d :
|
|
13643
|
+
var data = d !== null && d !== void 0 ? d : merge$1(_objectSpread$I({}, state.data), state.form.getFieldsValue());
|
|
13376
13644
|
if (id) {
|
|
13377
13645
|
setFieldInObject(id, data, value);
|
|
13378
|
-
var newFieldErrors = _objectSpread$
|
|
13646
|
+
var newFieldErrors = _objectSpread$I({}, fieldErrors);
|
|
13379
13647
|
delete newFieldErrors[id.toString()];
|
|
13380
13648
|
setFieldErrors(newFieldErrors);
|
|
13381
13649
|
}
|
|
13382
|
-
setState(_objectSpread$
|
|
13650
|
+
setState(_objectSpread$I(_objectSpread$I({}, state), {}, {
|
|
13383
13651
|
data: data
|
|
13384
13652
|
}));
|
|
13385
13653
|
return data;
|
|
13386
13654
|
};
|
|
13387
|
-
|
|
13388
|
-
// had to be progammed custom because we need to remove array entrys when they are missing in data2 and still are in data1
|
|
13389
|
-
function isObject(item) {
|
|
13390
|
-
return item && _typeof(item) === 'object' && !Array.isArray(item);
|
|
13391
|
-
}
|
|
13392
|
-
function deepMerge(target) {
|
|
13393
|
-
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key2 = 1; _key2 < _len; _key2++) {
|
|
13394
|
-
sources[_key2 - 1] = arguments[_key2];
|
|
13395
|
-
}
|
|
13396
|
-
if (!sources.length) return target;
|
|
13397
|
-
var source = sources.shift();
|
|
13398
|
-
if (isObject(target) && isObject(source)) {
|
|
13399
|
-
for (var _key3 in source) {
|
|
13400
|
-
if (isObject(source[_key3])) {
|
|
13401
|
-
if (!target[_key3]) Object.assign(target, _defineProperty({}, _key3, {}));
|
|
13402
|
-
deepMerge(target[_key3], source[_key3]);
|
|
13403
|
-
} else {
|
|
13404
|
-
Object.assign(target, _defineProperty({}, _key3, source[_key3]));
|
|
13405
|
-
}
|
|
13406
|
-
}
|
|
13407
|
-
}
|
|
13408
|
-
return deepMerge.apply(void 0, [target].concat(sources));
|
|
13409
|
-
}
|
|
13410
13655
|
var setNewData = function setNewData(newData, orig) {
|
|
13411
13656
|
if (usedPreset.used === true) {
|
|
13412
13657
|
var usdPreset = presets.data[usedPreset.index];
|
|
@@ -13428,12 +13673,12 @@ function useFormData (_ref) {
|
|
|
13428
13673
|
var _value$value;
|
|
13429
13674
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
13430
13675
|
if (configuration.itemSelectorReset) {
|
|
13431
|
-
setState(_objectSpread$
|
|
13676
|
+
setState(_objectSpread$I(_objectSpread$I({}, state), {}, {
|
|
13432
13677
|
data: _defineProperty({}, name, val)
|
|
13433
13678
|
}));
|
|
13434
13679
|
} else {
|
|
13435
|
-
setState(_objectSpread$
|
|
13436
|
-
data: _objectSpread$
|
|
13680
|
+
setState(_objectSpread$I(_objectSpread$I({}, state), {}, {
|
|
13681
|
+
data: _objectSpread$I(_objectSpread$I({}, state.data), {}, _defineProperty({}, name, val))
|
|
13437
13682
|
}));
|
|
13438
13683
|
}
|
|
13439
13684
|
setSelectedItemsIndex(idx);
|
|
@@ -13443,12 +13688,12 @@ function useFormData (_ref) {
|
|
|
13443
13688
|
var val = _ref6.value;
|
|
13444
13689
|
if (value === val) {
|
|
13445
13690
|
if (configuration.itemSelectorReset) {
|
|
13446
|
-
setState(_objectSpread$
|
|
13691
|
+
setState(_objectSpread$I(_objectSpread$I({}, state), {}, {
|
|
13447
13692
|
data: _defineProperty({}, name, val)
|
|
13448
13693
|
}));
|
|
13449
13694
|
} else {
|
|
13450
|
-
setState(_objectSpread$
|
|
13451
|
-
data: _objectSpread$
|
|
13695
|
+
setState(_objectSpread$I(_objectSpread$I({}, state), {}, {
|
|
13696
|
+
data: _objectSpread$I(_objectSpread$I({}, state.data), {}, _defineProperty({}, name, val))
|
|
13452
13697
|
}));
|
|
13453
13698
|
}
|
|
13454
13699
|
setSelectedItemsIndex(idx);
|
|
@@ -13599,12 +13844,13 @@ function useFormData (_ref) {
|
|
|
13599
13844
|
var tools = [];
|
|
13600
13845
|
for (var i = 0; i < configuration.tools.length; i++) {
|
|
13601
13846
|
var tool = configuration.tools[i];
|
|
13602
|
-
tools.push(_objectSpread$
|
|
13847
|
+
tools.push(_objectSpread$I({
|
|
13603
13848
|
parameters: {
|
|
13604
13849
|
data: state.data
|
|
13605
13850
|
},
|
|
13606
|
-
startWidth:
|
|
13607
|
-
offsetRight: 1037
|
|
13851
|
+
startWidth: 500,
|
|
13852
|
+
offsetRight: 1037,
|
|
13853
|
+
defaultOpen: true
|
|
13608
13854
|
}, tool));
|
|
13609
13855
|
}
|
|
13610
13856
|
root.contentStore.tools = tools;
|
|
@@ -13614,7 +13860,7 @@ function useFormData (_ref) {
|
|
|
13614
13860
|
}
|
|
13615
13861
|
return;
|
|
13616
13862
|
}, [state.data]);
|
|
13617
|
-
return _objectSpread$
|
|
13863
|
+
return _objectSpread$I(_objectSpread$I({}, state), {}, {
|
|
13618
13864
|
getIsHidden: getIsHidden,
|
|
13619
13865
|
setUsedPreset: setUsedPreset,
|
|
13620
13866
|
configuration: configuration,
|
|
@@ -13728,8 +13974,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
13728
13974
|
});
|
|
13729
13975
|
};
|
|
13730
13976
|
|
|
13731
|
-
function ownKeys$
|
|
13732
|
-
function _objectSpread$
|
|
13977
|
+
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; }
|
|
13978
|
+
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; }
|
|
13733
13979
|
var FormList$2 = function FormList(_ref) {
|
|
13734
13980
|
var _item$initialValue;
|
|
13735
13981
|
var value = _ref.value,
|
|
@@ -13743,12 +13989,23 @@ var FormList$2 = function FormList(_ref) {
|
|
|
13743
13989
|
postFixName = _ref.postFixName;
|
|
13744
13990
|
var _useTranslation = useTranslation(),
|
|
13745
13991
|
t = _useTranslation.t;
|
|
13992
|
+
var remove = function remove(index, r) {
|
|
13993
|
+
r(index);
|
|
13994
|
+
var array = state.getData(item.name, state.data);
|
|
13995
|
+
if (array) {
|
|
13996
|
+
array.splice(index, 1);
|
|
13997
|
+
state.onInputChanged(Array.isArray(item.name) ? item.name : _toConsumableArray(item.name), array);
|
|
13998
|
+
}
|
|
13999
|
+
};
|
|
14000
|
+
var add = function add(a) {
|
|
14001
|
+
a();
|
|
14002
|
+
};
|
|
13746
14003
|
return /*#__PURE__*/jsx(Form$1.List, {
|
|
13747
14004
|
name: item.name,
|
|
13748
14005
|
initialValue: (_item$initialValue = item.initialValue) !== null && _item$initialValue !== void 0 ? _item$initialValue : value,
|
|
13749
14006
|
children: function children(fields, _ref2) {
|
|
13750
|
-
var
|
|
13751
|
-
|
|
14007
|
+
var a = _ref2.add,
|
|
14008
|
+
r = _ref2.remove;
|
|
13752
14009
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
13753
14010
|
children: [fields.map(function (field, idx) {
|
|
13754
14011
|
return /*#__PURE__*/jsxs("div", {
|
|
@@ -13758,7 +14015,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
13758
14015
|
},
|
|
13759
14016
|
children: [!item.disablePushOrPop && /*#__PURE__*/jsx(MinusCircleOutlined, {
|
|
13760
14017
|
onClick: function onClick() {
|
|
13761
|
-
return remove(field.name);
|
|
14018
|
+
return remove(field.name, r);
|
|
13762
14019
|
}
|
|
13763
14020
|
}), /*#__PURE__*/jsx("div", {
|
|
13764
14021
|
style: {
|
|
@@ -13778,7 +14035,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
13778
14035
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
13779
14036
|
help: state.fieldErrors[n.toString()],
|
|
13780
14037
|
hidden: hidden,
|
|
13781
|
-
children: getElement(_objectSpread$
|
|
14038
|
+
children: getElement(_objectSpread$H(_objectSpread$H({}, i), {}, {
|
|
13782
14039
|
name: n
|
|
13783
14040
|
}), state.data, setCanSave, state, state.onInputChanged, onError, root, form, hidden)
|
|
13784
14041
|
}, idx);
|
|
@@ -13789,7 +14046,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
13789
14046
|
children: /*#__PURE__*/jsx(Button, {
|
|
13790
14047
|
type: "dashed",
|
|
13791
14048
|
onClick: function onClick() {
|
|
13792
|
-
return add();
|
|
14049
|
+
return add(a);
|
|
13793
14050
|
},
|
|
13794
14051
|
block: true,
|
|
13795
14052
|
icon: /*#__PURE__*/jsx(PlusOutlined, {}),
|
|
@@ -14016,8 +14273,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
14016
14273
|
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";
|
|
14017
14274
|
styleInject(css_248z$n);
|
|
14018
14275
|
|
|
14019
|
-
function ownKeys$
|
|
14020
|
-
function _objectSpread$
|
|
14276
|
+
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; }
|
|
14277
|
+
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; }
|
|
14021
14278
|
var SubTitle = function SubTitle(_ref) {
|
|
14022
14279
|
var _item$orientation, _item$buttonIds;
|
|
14023
14280
|
var item = _ref.item,
|
|
@@ -14026,7 +14283,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
14026
14283
|
t = _useTranslation.t;
|
|
14027
14284
|
return /*#__PURE__*/jsx(Divider, {
|
|
14028
14285
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
14029
|
-
style: _objectSpread$
|
|
14286
|
+
style: _objectSpread$G({}, item.style),
|
|
14030
14287
|
children: /*#__PURE__*/jsxs("div", {
|
|
14031
14288
|
className: wrapper$5,
|
|
14032
14289
|
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) {
|
|
@@ -14270,8 +14527,8 @@ var css_248z$m = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\
|
|
|
14270
14527
|
styleInject(css_248z$m);
|
|
14271
14528
|
|
|
14272
14529
|
var _excluded$2 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title"];
|
|
14273
|
-
function ownKeys$
|
|
14274
|
-
function _objectSpread$
|
|
14530
|
+
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; }
|
|
14531
|
+
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; }
|
|
14275
14532
|
var SelectWrapper$1 = function SelectWrapper(_ref) {
|
|
14276
14533
|
var apiInterface = _ref.apiInterface,
|
|
14277
14534
|
selectMapping = _ref.selectMapping,
|
|
@@ -14295,7 +14552,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref) {
|
|
|
14295
14552
|
});
|
|
14296
14553
|
return /*#__PURE__*/jsxs("div", {
|
|
14297
14554
|
className: classnames(title ? wrapper$4 : undefined),
|
|
14298
|
-
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$
|
|
14555
|
+
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$F(_objectSpread$F({}, selectProps), {}, {
|
|
14299
14556
|
showSearch: search,
|
|
14300
14557
|
loading: state.loading,
|
|
14301
14558
|
options: state.options,
|
|
@@ -14926,8 +15183,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
14926
15183
|
}]);
|
|
14927
15184
|
}(_default$d);
|
|
14928
15185
|
|
|
14929
|
-
function ownKeys$
|
|
14930
|
-
function _objectSpread$
|
|
15186
|
+
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; }
|
|
15187
|
+
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; }
|
|
14931
15188
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
14932
15189
|
function useSelectClientRelationCatalog (_ref) {
|
|
14933
15190
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -15096,7 +15353,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
15096
15353
|
case 22:
|
|
15097
15354
|
supplierData = _context2.sent;
|
|
15098
15355
|
case 23:
|
|
15099
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
15356
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$E(_objectSpread$E({}, _selectedSupplier), {}, {
|
|
15100
15357
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
15101
15358
|
}), supplierData);
|
|
15102
15359
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -15317,8 +15574,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
15317
15574
|
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; } } }; }
|
|
15318
15575
|
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; } }
|
|
15319
15576
|
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; }
|
|
15320
|
-
function ownKeys$
|
|
15321
|
-
function _objectSpread$
|
|
15577
|
+
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; }
|
|
15578
|
+
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; }
|
|
15322
15579
|
function useSelectData (_ref) {
|
|
15323
15580
|
var data = _ref.data,
|
|
15324
15581
|
onChange = _ref.onChange,
|
|
@@ -15499,7 +15756,7 @@ function useSelectData (_ref) {
|
|
|
15499
15756
|
setFetching(true);
|
|
15500
15757
|
serverSideParams = {
|
|
15501
15758
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
15502
|
-
return _objectSpread$
|
|
15759
|
+
return _objectSpread$D(_objectSpread$D({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
15503
15760
|
}, {}) : {
|
|
15504
15761
|
_id: [value, 'contains']
|
|
15505
15762
|
},
|
|
@@ -15791,8 +16048,8 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
15791
16048
|
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";
|
|
15792
16049
|
styleInject(css_248z$j);
|
|
15793
16050
|
|
|
15794
|
-
function ownKeys$
|
|
15795
|
-
function _objectSpread$
|
|
16051
|
+
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; }
|
|
16052
|
+
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; }
|
|
15796
16053
|
var LOG$8 = getLogger('Backoffice', 'Translation Form');
|
|
15797
16054
|
function useTranslationHook (item, state) {
|
|
15798
16055
|
var root = useStore();
|
|
@@ -15925,7 +16182,7 @@ function useTranslationHook (item, state) {
|
|
|
15925
16182
|
case 0:
|
|
15926
16183
|
_context2.next = 2;
|
|
15927
16184
|
return apiHandler.create({
|
|
15928
|
-
locales: _objectSpread$
|
|
16185
|
+
locales: _objectSpread$C({
|
|
15929
16186
|
de: {},
|
|
15930
16187
|
it: {},
|
|
15931
16188
|
fr: {},
|
|
@@ -15974,8 +16231,8 @@ function useTranslationHook (item, state) {
|
|
|
15974
16231
|
};
|
|
15975
16232
|
}
|
|
15976
16233
|
|
|
15977
|
-
function ownKeys$
|
|
15978
|
-
function _objectSpread$
|
|
16234
|
+
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; }
|
|
16235
|
+
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; }
|
|
15979
16236
|
var Translation = function Translation(_ref) {
|
|
15980
16237
|
var item = _ref.item,
|
|
15981
16238
|
state = _ref.state,
|
|
@@ -16023,7 +16280,7 @@ var Translation = function Translation(_ref) {
|
|
|
16023
16280
|
var hidden = state.getIsHidden(i, data);
|
|
16024
16281
|
return /*#__PURE__*/jsx(Fragment, {
|
|
16025
16282
|
children: ['subTitle', 'array'].includes(i.type) ? /*#__PURE__*/jsx(Fragment, {
|
|
16026
|
-
children: getElement(_objectSpread$
|
|
16283
|
+
children: getElement(_objectSpread$B(_objectSpread$B({}, i), {}, {
|
|
16027
16284
|
name: n
|
|
16028
16285
|
}), state.data, setCanSave, state, state.onInputChanged, onError, root, form, hidden, currentLang)
|
|
16029
16286
|
}) : /*#__PURE__*/jsx(Form$1.Item, {
|
|
@@ -16037,7 +16294,7 @@ var Translation = function Translation(_ref) {
|
|
|
16037
16294
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
16038
16295
|
help: state.fieldErrors[n.toString()],
|
|
16039
16296
|
hidden: hidden,
|
|
16040
|
-
children: getElement(_objectSpread$
|
|
16297
|
+
children: getElement(_objectSpread$B(_objectSpread$B({}, i), {}, {
|
|
16041
16298
|
name: n
|
|
16042
16299
|
}), state.data, setCanSave, state, state.onInputChanged, onError, root, form, hidden)
|
|
16043
16300
|
}, idx)
|
|
@@ -16053,8 +16310,8 @@ var Translation$1 = observer(Translation, {
|
|
|
16053
16310
|
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; } } }; }
|
|
16054
16311
|
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; } }
|
|
16055
16312
|
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; }
|
|
16056
|
-
function ownKeys$
|
|
16057
|
-
function _objectSpread$
|
|
16313
|
+
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; }
|
|
16314
|
+
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; }
|
|
16058
16315
|
function getElement(item, data, setCanSave, state, _onChange, _onError, root, form, hidden, postFixName) {
|
|
16059
16316
|
var _isReadonly, _state$hiddenRequired;
|
|
16060
16317
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -16088,7 +16345,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
16088
16345
|
}
|
|
16089
16346
|
});
|
|
16090
16347
|
case 'selectSimple':
|
|
16091
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
16348
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$A(_objectSpread$A({}, item), {}, {
|
|
16092
16349
|
disabled: disabled,
|
|
16093
16350
|
onChange: function onChange(value) {
|
|
16094
16351
|
_onChange(name, value);
|
|
@@ -16278,7 +16535,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
16278
16535
|
value: item.value,
|
|
16279
16536
|
options: item.options.map(function (o) {
|
|
16280
16537
|
var _o$disabled;
|
|
16281
|
-
return _objectSpread$
|
|
16538
|
+
return _objectSpread$A(_objectSpread$A({}, o), {}, {
|
|
16282
16539
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, data)
|
|
16283
16540
|
});
|
|
16284
16541
|
}),
|
|
@@ -16300,7 +16557,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
16300
16557
|
},
|
|
16301
16558
|
icon: item.icon,
|
|
16302
16559
|
callback: function callback(data) {
|
|
16303
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
16560
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$A(_objectSpread$A({}, state.data), data));
|
|
16304
16561
|
}
|
|
16305
16562
|
});
|
|
16306
16563
|
default:
|
|
@@ -16310,7 +16567,7 @@ function getElement(item, data, setCanSave, state, _onChange, _onError, root, fo
|
|
|
16310
16567
|
function DisplayInput(props) {
|
|
16311
16568
|
var _useTranslation = useTranslation(),
|
|
16312
16569
|
t = _useTranslation.t;
|
|
16313
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
16570
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
16314
16571
|
disabled: true,
|
|
16315
16572
|
value: t(props.translationPrefix + '.' + props.value)
|
|
16316
16573
|
}));
|
|
@@ -16328,8 +16585,8 @@ function isReadonly(item, data) {
|
|
|
16328
16585
|
return false;
|
|
16329
16586
|
}
|
|
16330
16587
|
|
|
16331
|
-
function ownKeys$
|
|
16332
|
-
function _objectSpread$
|
|
16588
|
+
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; }
|
|
16589
|
+
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; }
|
|
16333
16590
|
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; } } }; }
|
|
16334
16591
|
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; } }
|
|
16335
16592
|
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; }
|
|
@@ -16379,13 +16636,13 @@ var Presets = function Presets(_ref) {
|
|
|
16379
16636
|
} finally {
|
|
16380
16637
|
_iterator.f();
|
|
16381
16638
|
}
|
|
16382
|
-
var data = _objectSpread$
|
|
16639
|
+
var data = _objectSpread$z(_objectSpread$z({}, form.getFieldsValue(names)), {}, {
|
|
16383
16640
|
newPresetName: newPresetName
|
|
16384
16641
|
});
|
|
16385
16642
|
data.dpi = parseInt(data.dpi);
|
|
16386
16643
|
data.organization = root.getGlobalValue('organizationId');
|
|
16387
16644
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
16388
|
-
var dt = _objectSpread$
|
|
16645
|
+
var dt = _objectSpread$z(_objectSpread$z({}, form.getFieldsValue(names)), {}, {
|
|
16389
16646
|
name: newPresetName
|
|
16390
16647
|
});
|
|
16391
16648
|
setPresets({
|
|
@@ -16550,7 +16807,8 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
16550
16807
|
data: data,
|
|
16551
16808
|
skipApi: skipApi,
|
|
16552
16809
|
mappingData: mappingData,
|
|
16553
|
-
form: form
|
|
16810
|
+
form: form,
|
|
16811
|
+
setCanSave: setCanSave
|
|
16554
16812
|
});
|
|
16555
16813
|
useEffect(function () {
|
|
16556
16814
|
if (state.data) {
|
|
@@ -16728,8 +16986,8 @@ var Form = observer(FormWrapper$1, {
|
|
|
16728
16986
|
forwardRef: true
|
|
16729
16987
|
});
|
|
16730
16988
|
|
|
16731
|
-
function ownKeys$
|
|
16732
|
-
function _objectSpread$
|
|
16989
|
+
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; }
|
|
16990
|
+
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; }
|
|
16733
16991
|
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; } } }; }
|
|
16734
16992
|
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; } }
|
|
16735
16993
|
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; }
|
|
@@ -16931,7 +17189,7 @@ function useRoleSelectorData (_ref) {
|
|
|
16931
17189
|
roles.forEach(function (r) {
|
|
16932
17190
|
//check if after the changes the role is selected
|
|
16933
17191
|
if (value.includes(r._id)) {
|
|
16934
|
-
var newValue = _objectSpread$
|
|
17192
|
+
var newValue = _objectSpread$y(_objectSpread$y({}, r), {}, {
|
|
16935
17193
|
selected: true
|
|
16936
17194
|
});
|
|
16937
17195
|
//add it to the new list as selected role
|
|
@@ -16967,7 +17225,7 @@ function useRoleSelectorData (_ref) {
|
|
|
16967
17225
|
}
|
|
16968
17226
|
}
|
|
16969
17227
|
} else {
|
|
16970
|
-
var _newValue = _objectSpread$
|
|
17228
|
+
var _newValue = _objectSpread$y(_objectSpread$y({}, r), {}, {
|
|
16971
17229
|
selected: false
|
|
16972
17230
|
});
|
|
16973
17231
|
//add it to the new list as unselected role
|
|
@@ -17171,7 +17429,7 @@ function _updateRoles() {
|
|
|
17171
17429
|
userRole = userRoles.find(function (r) {
|
|
17172
17430
|
return r._id == role._id;
|
|
17173
17431
|
});
|
|
17174
|
-
newRole = _objectSpread$
|
|
17432
|
+
newRole = _objectSpread$y({}, role);
|
|
17175
17433
|
if (userRole) {
|
|
17176
17434
|
newRole.selected = true;
|
|
17177
17435
|
newRole.inherited = userRole.inherited;
|
|
@@ -17391,7 +17649,7 @@ function _fetchOptions() {
|
|
|
17391
17649
|
case 4:
|
|
17392
17650
|
result = _context11.sent;
|
|
17393
17651
|
options = result.data.map(function (d) {
|
|
17394
|
-
return _objectSpread$
|
|
17652
|
+
return _objectSpread$y(_objectSpread$y({}, d), {}, {
|
|
17395
17653
|
label: d.displayName,
|
|
17396
17654
|
value: d._id,
|
|
17397
17655
|
isLeaf: !d.hasChildren
|
|
@@ -17495,8 +17753,8 @@ var parent = "parent-NZJ3S";
|
|
|
17495
17753
|
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";
|
|
17496
17754
|
styleInject(css_248z$i);
|
|
17497
17755
|
|
|
17498
|
-
function ownKeys$
|
|
17499
|
-
function _objectSpread$
|
|
17756
|
+
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; }
|
|
17757
|
+
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; }
|
|
17500
17758
|
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; } } }; }
|
|
17501
17759
|
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; } }
|
|
17502
17760
|
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; }
|
|
@@ -17556,8 +17814,8 @@ function _generateCSV() {
|
|
|
17556
17814
|
break;
|
|
17557
17815
|
}
|
|
17558
17816
|
_context2.next = 21;
|
|
17559
|
-
return generateCSV(_objectSpread$
|
|
17560
|
-
mappingData: _objectSpread$
|
|
17817
|
+
return generateCSV(_objectSpread$x(_objectSpread$x({}, exportParams.children), {}, {
|
|
17818
|
+
mappingData: _objectSpread$x(_objectSpread$x({}, parent), {}, {
|
|
17561
17819
|
parentId: exportParams.mappingData._id
|
|
17562
17820
|
})
|
|
17563
17821
|
}), csvData);
|
|
@@ -17619,8 +17877,8 @@ var generateCSVData = /*#__PURE__*/function () {
|
|
|
17619
17877
|
};
|
|
17620
17878
|
}();
|
|
17621
17879
|
|
|
17622
|
-
function ownKeys$
|
|
17623
|
-
function _objectSpread$
|
|
17880
|
+
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; }
|
|
17881
|
+
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; }
|
|
17624
17882
|
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; } } }; }
|
|
17625
17883
|
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; } }
|
|
17626
17884
|
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; }
|
|
@@ -18039,7 +18297,7 @@ function useRelationSelectorData (_ref) {
|
|
|
18039
18297
|
var activeItem = _step.value;
|
|
18040
18298
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
18041
18299
|
addedObjects.push(addedData);
|
|
18042
|
-
getSplittedItems(_objectSpread$
|
|
18300
|
+
getSplittedItems(_objectSpread$w(_objectSpread$w({}, activeItem), {}, {
|
|
18043
18301
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
18044
18302
|
}));
|
|
18045
18303
|
ret = true;
|
|
@@ -18244,8 +18502,8 @@ function useRelationSelectorData (_ref) {
|
|
|
18244
18502
|
};
|
|
18245
18503
|
}
|
|
18246
18504
|
|
|
18247
|
-
function ownKeys$
|
|
18248
|
-
function _objectSpread$
|
|
18505
|
+
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; }
|
|
18506
|
+
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; }
|
|
18249
18507
|
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; } } }; }
|
|
18250
18508
|
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; } }
|
|
18251
18509
|
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; }
|
|
@@ -18378,7 +18636,7 @@ function ActionButton (_ref) {
|
|
|
18378
18636
|
_iterator2.f();
|
|
18379
18637
|
}
|
|
18380
18638
|
_context.next = 19;
|
|
18381
|
-
return apiInterface.update(_objectSpread$
|
|
18639
|
+
return apiInterface.update(_objectSpread$v(_objectSpread$v({}, data), {}, {
|
|
18382
18640
|
state: toSwitch
|
|
18383
18641
|
}), data);
|
|
18384
18642
|
case 19:
|
|
@@ -18535,14 +18793,14 @@ function _simpleChangeValue() {
|
|
|
18535
18793
|
break;
|
|
18536
18794
|
}
|
|
18537
18795
|
for (i = 0; i < action.newValues.length; i++) {
|
|
18538
|
-
fieldsToUpdate = _objectSpread$
|
|
18796
|
+
fieldsToUpdate = _objectSpread$v(_objectSpread$v({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
18539
18797
|
}
|
|
18540
18798
|
if (!apiInterface.canUpdate) {
|
|
18541
18799
|
_context2.next = 9;
|
|
18542
18800
|
break;
|
|
18543
18801
|
}
|
|
18544
18802
|
_context2.next = 7;
|
|
18545
|
-
return apiInterface.update(_objectSpread$
|
|
18803
|
+
return apiInterface.update(_objectSpread$v({}, fieldsToUpdate), data);
|
|
18546
18804
|
case 7:
|
|
18547
18805
|
response = _context2.sent;
|
|
18548
18806
|
return _context2.abrupt("return", response);
|
|
@@ -18557,7 +18815,7 @@ function _simpleChangeValue() {
|
|
|
18557
18815
|
return _simpleChangeValue.apply(this, arguments);
|
|
18558
18816
|
}
|
|
18559
18817
|
function A(props) {
|
|
18560
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
18818
|
+
return /*#__PURE__*/jsx("a", _objectSpread$v({}, props));
|
|
18561
18819
|
}
|
|
18562
18820
|
|
|
18563
18821
|
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; } } }; }
|
|
@@ -18695,8 +18953,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
18695
18953
|
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";
|
|
18696
18954
|
styleInject(css_248z$h);
|
|
18697
18955
|
|
|
18698
|
-
function ownKeys$
|
|
18699
|
-
function _objectSpread$
|
|
18956
|
+
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; }
|
|
18957
|
+
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; }
|
|
18700
18958
|
var DropDown = function DropDown(_ref) {
|
|
18701
18959
|
var _curItem$data$length;
|
|
18702
18960
|
var split = _ref.split,
|
|
@@ -18728,7 +18986,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
18728
18986
|
});
|
|
18729
18987
|
return /*#__PURE__*/jsx(Collapse, {
|
|
18730
18988
|
onChange: function onChange() {
|
|
18731
|
-
return getSplittedItems(_objectSpread$
|
|
18989
|
+
return getSplittedItems(_objectSpread$u(_objectSpread$u({}, item.item), {}, {
|
|
18732
18990
|
parentId: item.parentId
|
|
18733
18991
|
}), 0);
|
|
18734
18992
|
},
|
|
@@ -18988,8 +19246,8 @@ var RelationSelector$1 = observer(RelationSelector, {
|
|
|
18988
19246
|
forwardRef: true
|
|
18989
19247
|
});
|
|
18990
19248
|
|
|
18991
|
-
function ownKeys$
|
|
18992
|
-
function _objectSpread$
|
|
19249
|
+
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; }
|
|
19250
|
+
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; }
|
|
18993
19251
|
function useFormListData (_ref) {
|
|
18994
19252
|
var _configuration$defaul;
|
|
18995
19253
|
var id = _ref.id,
|
|
@@ -19069,7 +19327,7 @@ function useFormListData (_ref) {
|
|
|
19069
19327
|
if (updated.length == state.length) {
|
|
19070
19328
|
newState = state.map(function (s, i) {
|
|
19071
19329
|
var _updated$find;
|
|
19072
|
-
return _objectSpread$
|
|
19330
|
+
return _objectSpread$t(_objectSpread$t({}, s), {}, {
|
|
19073
19331
|
data: (_updated$find = updated.find(function (u) {
|
|
19074
19332
|
return u.index == i;
|
|
19075
19333
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -19208,8 +19466,8 @@ var FormList$1 = observer(FormList, {
|
|
|
19208
19466
|
forwardRef: true
|
|
19209
19467
|
});
|
|
19210
19468
|
|
|
19211
|
-
function ownKeys$
|
|
19212
|
-
function _objectSpread$
|
|
19469
|
+
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; }
|
|
19470
|
+
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; }
|
|
19213
19471
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
19214
19472
|
function useSelectOrCreateData (_ref) {
|
|
19215
19473
|
var id = _ref.id,
|
|
@@ -19306,7 +19564,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
19306
19564
|
_context.next = 7;
|
|
19307
19565
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
19308
19566
|
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) {
|
|
19309
|
-
return _objectSpread$
|
|
19567
|
+
return _objectSpread$s(_objectSpread$s({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
19310
19568
|
}, {}) : {
|
|
19311
19569
|
_id: [value, 'contains']
|
|
19312
19570
|
},
|
|
@@ -19619,8 +19877,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
19619
19877
|
});
|
|
19620
19878
|
};
|
|
19621
19879
|
|
|
19622
|
-
function ownKeys$
|
|
19623
|
-
function _objectSpread$
|
|
19880
|
+
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; }
|
|
19881
|
+
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; }
|
|
19624
19882
|
function useListData (_ref) {
|
|
19625
19883
|
var id = _ref.id,
|
|
19626
19884
|
data = _ref.data;
|
|
@@ -19663,7 +19921,7 @@ function useListData (_ref) {
|
|
|
19663
19921
|
case 3:
|
|
19664
19922
|
result = _context.sent;
|
|
19665
19923
|
setListData(result.data.map(parseField));
|
|
19666
|
-
initData = _objectSpread$
|
|
19924
|
+
initData = _objectSpread$r({}, data);
|
|
19667
19925
|
setUpdatedObject(initData);
|
|
19668
19926
|
setLoading(false);
|
|
19669
19927
|
case 8:
|
|
@@ -19704,7 +19962,7 @@ function useListData (_ref) {
|
|
|
19704
19962
|
});
|
|
19705
19963
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
19706
19964
|
var parsedField = field.field.split('.');
|
|
19707
|
-
item.itemUpdate = _objectSpread$
|
|
19965
|
+
item.itemUpdate = _objectSpread$r(_objectSpread$r({}, field), {}, {
|
|
19708
19966
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
19709
19967
|
});
|
|
19710
19968
|
});
|
|
@@ -19735,16 +19993,16 @@ function useListData (_ref) {
|
|
|
19735
19993
|
console.error('field with more than 2 parts not allowed');
|
|
19736
19994
|
return;
|
|
19737
19995
|
}
|
|
19738
|
-
var updObj = _objectSpread$
|
|
19996
|
+
var updObj = _objectSpread$r({}, updatedObject);
|
|
19739
19997
|
if (fields.length === 1) {
|
|
19740
|
-
updObj = _objectSpread$
|
|
19998
|
+
updObj = _objectSpread$r(_objectSpread$r({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
19741
19999
|
} else if (fields.length === 2) {
|
|
19742
20000
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
19743
20001
|
return v.id === item.id.trim();
|
|
19744
20002
|
});
|
|
19745
20003
|
if (updatedField) {
|
|
19746
|
-
var updatedFieldCopy = _objectSpread$
|
|
19747
|
-
updObj = _objectSpread$
|
|
20004
|
+
var updatedFieldCopy = _objectSpread$r(_objectSpread$r({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
20005
|
+
updObj = _objectSpread$r(_objectSpread$r({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
19748
20006
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
19749
20007
|
})));
|
|
19750
20008
|
}
|
|
@@ -19753,11 +20011,11 @@ function useListData (_ref) {
|
|
|
19753
20011
|
var acItems = listData;
|
|
19754
20012
|
for (var i = 0; i < acItems.length; i++) {
|
|
19755
20013
|
if (i == index) {
|
|
19756
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
20014
|
+
acItems[i].itemUpdate = _objectSpread$r(_objectSpread$r({}, acItems[i].itemUpdate), {}, {
|
|
19757
20015
|
value: value
|
|
19758
20016
|
});
|
|
19759
20017
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
19760
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
20018
|
+
acItems[i].itemUpdate = _objectSpread$r(_objectSpread$r({}, acItems[i].itemUpdate), {}, {
|
|
19761
20019
|
value: !value
|
|
19762
20020
|
});
|
|
19763
20021
|
}
|
|
@@ -20275,8 +20533,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
20275
20533
|
};
|
|
20276
20534
|
}
|
|
20277
20535
|
|
|
20278
|
-
function ownKeys$
|
|
20279
|
-
function _objectSpread$
|
|
20536
|
+
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; }
|
|
20537
|
+
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; }
|
|
20280
20538
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
20281
20539
|
var id = _ref.id,
|
|
20282
20540
|
data = _ref.data,
|
|
@@ -20384,12 +20642,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
20384
20642
|
}
|
|
20385
20643
|
function onEnter(e) {
|
|
20386
20644
|
if (e.key != 'Enter') return;
|
|
20387
|
-
setCrop(_objectSpread$
|
|
20645
|
+
setCrop(_objectSpread$q(_objectSpread$q({}, crop), {}, {
|
|
20388
20646
|
unit: 'px',
|
|
20389
20647
|
width: Number(widthInputElement.current.value),
|
|
20390
20648
|
height: Number(heightInputElement.current.value)
|
|
20391
20649
|
}));
|
|
20392
|
-
setCompletedCrop(_objectSpread$
|
|
20650
|
+
setCompletedCrop(_objectSpread$q(_objectSpread$q({}, crop), {}, {
|
|
20393
20651
|
unit: 'px',
|
|
20394
20652
|
width: Number(widthInputElement.current.value),
|
|
20395
20653
|
height: Number(heightInputElement.current.value)
|
|
@@ -20469,8 +20727,8 @@ var ImageCropper$1 = observer(ImageCropper, {
|
|
|
20469
20727
|
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; } } }; }
|
|
20470
20728
|
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; } }
|
|
20471
20729
|
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; }
|
|
20472
|
-
function ownKeys$
|
|
20473
|
-
function _objectSpread$
|
|
20730
|
+
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; }
|
|
20731
|
+
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; }
|
|
20474
20732
|
function useDescriptions (_ref) {
|
|
20475
20733
|
var id = _ref.id;
|
|
20476
20734
|
var root = useStore();
|
|
@@ -20563,7 +20821,7 @@ function _getDisplayData() {
|
|
|
20563
20821
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
20564
20822
|
while (1) switch (_context4.prev = _context4.next) {
|
|
20565
20823
|
case 0:
|
|
20566
|
-
displayData = _objectSpread$
|
|
20824
|
+
displayData = _objectSpread$p({}, data);
|
|
20567
20825
|
_iterator = _createForOfIteratorHelper$9(items);
|
|
20568
20826
|
_context4.prev = 2;
|
|
20569
20827
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -20839,8 +21097,8 @@ var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
|
20839
21097
|
};
|
|
20840
21098
|
var FileUploadBeta = observer(FileUploadWrapper);
|
|
20841
21099
|
|
|
20842
|
-
function ownKeys$
|
|
20843
|
-
function _objectSpread$
|
|
21100
|
+
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; }
|
|
21101
|
+
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; }
|
|
20844
21102
|
function useGridData (_ref) {
|
|
20845
21103
|
var id = _ref.id,
|
|
20846
21104
|
data = _ref.data;
|
|
@@ -20883,11 +21141,11 @@ function useGridData (_ref) {
|
|
|
20883
21141
|
function reducer(state, action) {
|
|
20884
21142
|
switch (action.type) {
|
|
20885
21143
|
case 'update':
|
|
20886
|
-
return _objectSpread$
|
|
21144
|
+
return _objectSpread$o(_objectSpread$o({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$o(_objectSpread$o({}, action.data), {}, {
|
|
20887
21145
|
buffer: Buffer.from(action.data.buffer)
|
|
20888
21146
|
})));
|
|
20889
21147
|
case 'delete':
|
|
20890
|
-
var newState = _objectSpread$
|
|
21148
|
+
var newState = _objectSpread$o({}, state);
|
|
20891
21149
|
delete newState[action.data.divaNr];
|
|
20892
21150
|
return newState;
|
|
20893
21151
|
default:
|
|
@@ -20972,8 +21230,8 @@ var Grid = function Grid(_ref) {
|
|
|
20972
21230
|
});
|
|
20973
21231
|
};
|
|
20974
21232
|
|
|
20975
|
-
function ownKeys$
|
|
20976
|
-
function _objectSpread$
|
|
21233
|
+
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; }
|
|
21234
|
+
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; }
|
|
20977
21235
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
20978
21236
|
var id = _ref.id;
|
|
20979
21237
|
var root = useStore();
|
|
@@ -21092,7 +21350,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
21092
21350
|
onRemove: onRemove,
|
|
21093
21351
|
customRequest: customRequest,
|
|
21094
21352
|
fileList: fileList.map(function (f) {
|
|
21095
|
-
return _objectSpread$
|
|
21353
|
+
return _objectSpread$n(_objectSpread$n({}, f), {}, {
|
|
21096
21354
|
url: f.url
|
|
21097
21355
|
});
|
|
21098
21356
|
}),
|
|
@@ -21104,7 +21362,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
21104
21362
|
var small = "small-NY1-k";
|
|
21105
21363
|
var medium = "medium---QcO";
|
|
21106
21364
|
var big = "big--E39S";
|
|
21107
|
-
var css_248z$d = ".diva-component-DIVA_BACKOFFICE_NEW .ant-upload-wrapper {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-spin-nested-loading {\n width: 100%;\n height:
|
|
21365
|
+
var css_248z$d = ".diva-component-DIVA_BACKOFFICE_NEW .ant-upload-wrapper {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-spin-nested-loading {\n width: 100%;\n height: 100%;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .ant-table-wrapper, .diva-component-DIVA_BACKOFFICE_NEW .ant-table {\n height: inherit;\n overflow: auto;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-spin-container {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .andt-table .ant-spin-container {\n display: flex;\n flex-direction: column;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-space-item .andt-table .ant-spin-container {\n height: calc(60vh - 90px);\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .andt-table .ant-table-container {\n height: calc(100% - 80px);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-list {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-list-item-container {\n width: 100% !important;\n height: 100% !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-select {\n width: 100% !important;\n height: 100% !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .small-NY1-k {\n width: 104px;\n height: 104px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .medium---QcO {\n width: 200px;\n height: 200px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .big--E39S {\n width: 400px;\n height: 400px;\n}\n";
|
|
21108
21366
|
styleInject(css_248z$d);
|
|
21109
21367
|
|
|
21110
21368
|
var MediaUpload = observer(function (_ref) {
|
|
@@ -21811,8 +22069,8 @@ function IconCell (_ref) {
|
|
|
21811
22069
|
|
|
21812
22070
|
var _excluded$1 = ["index"],
|
|
21813
22071
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
21814
|
-
function ownKeys$
|
|
21815
|
-
function _objectSpread$
|
|
22072
|
+
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; }
|
|
22073
|
+
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; }
|
|
21816
22074
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
21817
22075
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
21818
22076
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -21826,7 +22084,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
21826
22084
|
component: false,
|
|
21827
22085
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
21828
22086
|
value: form,
|
|
21829
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
22087
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$m({}, props))
|
|
21830
22088
|
})
|
|
21831
22089
|
});
|
|
21832
22090
|
};
|
|
@@ -21879,7 +22137,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
21879
22137
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
21880
22138
|
longDescriptionType = 'text';
|
|
21881
22139
|
}
|
|
21882
|
-
var modifiedColumn = _objectSpread$
|
|
22140
|
+
var modifiedColumn = _objectSpread$m(_objectSpread$m({}, column), {}, {
|
|
21883
22141
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
21884
22142
|
});
|
|
21885
22143
|
if (column) {
|
|
@@ -21892,34 +22150,34 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
21892
22150
|
};
|
|
21893
22151
|
switch (modifiedColumn.type) {
|
|
21894
22152
|
case 'boolean':
|
|
21895
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
22153
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$m({}, cellProps));
|
|
21896
22154
|
break;
|
|
21897
22155
|
case 'text':
|
|
21898
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
22156
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$m({}, cellProps));
|
|
21899
22157
|
break;
|
|
21900
22158
|
case 'select':
|
|
21901
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
22159
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$m({}, cellProps));
|
|
21902
22160
|
case 'media':
|
|
21903
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
22161
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$m({}, cellProps));
|
|
21904
22162
|
break;
|
|
21905
22163
|
case 'mediaItem':
|
|
21906
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
22164
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$m({}, cellProps));
|
|
21907
22165
|
break;
|
|
21908
22166
|
case 'unixTimeStamp':
|
|
21909
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
22167
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$m({}, cellProps));
|
|
21910
22168
|
break;
|
|
21911
22169
|
case 'unixTimeStampCheck':
|
|
21912
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
22170
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$m({}, cellProps));
|
|
21913
22171
|
break;
|
|
21914
22172
|
case 'icon':
|
|
21915
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
22173
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$m({}, cellProps));
|
|
21916
22174
|
break;
|
|
21917
22175
|
default:
|
|
21918
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
22176
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$m({}, cellProps));
|
|
21919
22177
|
break;
|
|
21920
22178
|
}
|
|
21921
22179
|
}
|
|
21922
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
22180
|
+
return /*#__PURE__*/jsx("td", _objectSpread$m(_objectSpread$m({}, restProps), {}, {
|
|
21923
22181
|
children: childNode
|
|
21924
22182
|
}));
|
|
21925
22183
|
};
|
|
@@ -22272,8 +22530,8 @@ var SMChart = function SMChart(props) {
|
|
|
22272
22530
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
22273
22531
|
};
|
|
22274
22532
|
|
|
22275
|
-
function ownKeys$
|
|
22276
|
-
function _objectSpread$
|
|
22533
|
+
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; }
|
|
22534
|
+
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; }
|
|
22277
22535
|
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; } } }; }
|
|
22278
22536
|
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; } }
|
|
22279
22537
|
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; }
|
|
@@ -22286,7 +22544,7 @@ dayjs.extend(weekYear);
|
|
|
22286
22544
|
Select$1.Option;
|
|
22287
22545
|
var LOG$3 = getLogger('Backoffice', 'BaseTable');
|
|
22288
22546
|
var TableWrapper = function TableWrapper(_ref) {
|
|
22289
|
-
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$
|
|
22547
|
+
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$13, _state$configuration$14, _state$configuration$17, _state$configuration$18, _state$configuration$19;
|
|
22290
22548
|
var state = _ref.state;
|
|
22291
22549
|
var root = useStore();
|
|
22292
22550
|
var _useState = useState(0),
|
|
@@ -22466,7 +22724,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
22466
22724
|
// Convert to Dayjs
|
|
22467
22725
|
(_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
|
|
22468
22726
|
]
|
|
22469
|
-
}), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
22727
|
+
}), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$l(_objectSpread$l({}, (_state$configuration$8 = state.configuration.filter) === null || _state$configuration$8 === void 0 ? void 0 : _state$configuration$8.select.settings), {}, {
|
|
22470
22728
|
style: {
|
|
22471
22729
|
minWidth: '200px'
|
|
22472
22730
|
},
|
|
@@ -22500,18 +22758,18 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
22500
22758
|
setProgressBarPercentage: setProgressBarPercentage
|
|
22501
22759
|
} : undefined
|
|
22502
22760
|
}, action.id);
|
|
22503
|
-
}), state.configuration.createAction && checkPermission(state.configuration.createAction.permission) && /*#__PURE__*/jsx(ActionButton, {
|
|
22761
|
+
}), state.configuration.createAction && checkPermission(state.configuration.createAction.permission) && !((_state$configuration$13 = (_state$configuration$14 = state.configuration.createAction).hidden) !== null && _state$configuration$13 !== void 0 && _state$configuration$13.call(_state$configuration$14, data)) && /*#__PURE__*/jsx(ActionButton, {
|
|
22504
22762
|
action: state.configuration.createAction,
|
|
22505
22763
|
callback: function callback(data) {
|
|
22506
|
-
var _state$onUpdate, _state$configuration$
|
|
22764
|
+
var _state$onUpdate, _state$configuration$15, _state$configuration$16;
|
|
22507
22765
|
(_state$onUpdate = state.onUpdate) === null || _state$onUpdate === void 0 || _state$onUpdate.call(state, data);
|
|
22508
|
-
(_state$configuration$
|
|
22766
|
+
(_state$configuration$15 = state.configuration.createAction) === null || _state$configuration$15 === void 0 || (_state$configuration$16 = _state$configuration$15.callback) === null || _state$configuration$16 === void 0 || _state$configuration$16.call(_state$configuration$15, data);
|
|
22509
22767
|
},
|
|
22510
22768
|
type: "Button",
|
|
22511
22769
|
id: 'create',
|
|
22512
22770
|
defaultLabel: t('backoffice.table.emailtemplates.createAction.title'),
|
|
22513
22771
|
isCreateButton: true,
|
|
22514
|
-
disabled: state.configuration.createAction.disableOnToggle === !!state.globalFilter.toggle || ((_state$configuration$
|
|
22772
|
+
disabled: state.configuration.createAction.disableOnToggle === !!state.globalFilter.toggle || ((_state$configuration$17 = (_state$configuration$18 = state.configuration.createAction).disabled) === null || _state$configuration$17 === void 0 ? void 0 : _state$configuration$17.call(_state$configuration$18, data)),
|
|
22515
22773
|
data: state.configuration.createActionMapping ? aplyMapping({
|
|
22516
22774
|
mapable: {},
|
|
22517
22775
|
mapping: state.configuration.createActionMapping,
|
|
@@ -22556,19 +22814,20 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
22556
22814
|
closable: true,
|
|
22557
22815
|
onClose: state.resetError
|
|
22558
22816
|
}), /*#__PURE__*/jsx(Table$1, {
|
|
22817
|
+
className: "andt-table",
|
|
22559
22818
|
scroll: {
|
|
22560
22819
|
x: '100%',
|
|
22561
|
-
y: (_state$configuration$
|
|
22820
|
+
y: (_state$configuration$19 = state.configuration.height) !== null && _state$configuration$19 !== void 0 ? _state$configuration$19 : '100%'
|
|
22562
22821
|
},
|
|
22563
22822
|
rowClassName: editableRow,
|
|
22564
22823
|
components: cellRenderer,
|
|
22565
22824
|
rowKey: function rowKey(dataRow) {
|
|
22566
|
-
var _state$configuration$
|
|
22567
|
-
return goTroughObject(dataRow, (_state$configuration$
|
|
22825
|
+
var _state$configuration$20, _state$configuration$21;
|
|
22826
|
+
return goTroughObject(dataRow, (_state$configuration$20 = (_state$configuration$21 = state.configuration.rowKey) === null || _state$configuration$21 === void 0 ? void 0 : _state$configuration$21.split('.')) !== null && _state$configuration$20 !== void 0 ? _state$configuration$20 : ['_id'], 0);
|
|
22568
22827
|
},
|
|
22569
22828
|
dataSource: data,
|
|
22570
22829
|
loading: state.loading,
|
|
22571
|
-
pagination: _objectSpread$
|
|
22830
|
+
pagination: _objectSpread$l(_objectSpread$l({}, state.pagination), {}, {
|
|
22572
22831
|
showTotal: function showTotal(total, range) {
|
|
22573
22832
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
22574
22833
|
},
|
|
@@ -22642,13 +22901,13 @@ function CopyButton(_ref3) {
|
|
|
22642
22901
|
}, root);
|
|
22643
22902
|
var onCopy = /*#__PURE__*/function () {
|
|
22644
22903
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
22645
|
-
var _state$configuration$
|
|
22904
|
+
var _state$configuration$22;
|
|
22646
22905
|
var copyAction, _iterator3, _step3, selectedRow;
|
|
22647
22906
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
22648
22907
|
while (1) switch (_context.prev = _context.next) {
|
|
22649
22908
|
case 0:
|
|
22650
22909
|
copyAction = state.configuration.copyAction;
|
|
22651
|
-
if (((_state$configuration$
|
|
22910
|
+
if (((_state$configuration$22 = state.configuration.copyAction) === null || _state$configuration$22 === void 0 ? void 0 : _state$configuration$22.apiInterface) != undefined) {
|
|
22652
22911
|
_iterator3 = _createForOfIteratorHelper$4(state.selected);
|
|
22653
22912
|
try {
|
|
22654
22913
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
@@ -22683,13 +22942,13 @@ function CopyButton(_ref3) {
|
|
|
22683
22942
|
}();
|
|
22684
22943
|
var onCopyAction = /*#__PURE__*/function () {
|
|
22685
22944
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
22686
|
-
var _state$configuration$
|
|
22945
|
+
var _state$configuration$23, _state$configuration$24;
|
|
22687
22946
|
var copyAction, id, filter, data;
|
|
22688
22947
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
22689
22948
|
while (1) switch (_context3.prev = _context3.next) {
|
|
22690
22949
|
case 0:
|
|
22691
22950
|
copyAction = state.configuration.copyAction;
|
|
22692
|
-
if (!(copyAction.id == undefined || copyAction.actionType != 'Detail' || ((_state$configuration$
|
|
22951
|
+
if (!(copyAction.id == undefined || copyAction.actionType != 'Detail' || ((_state$configuration$23 = state.configuration.createAction) === null || _state$configuration$23 === void 0 ? void 0 : _state$configuration$23.actionType) != 'Detail')) {
|
|
22693
22952
|
_context3.next = 3;
|
|
22694
22953
|
break;
|
|
22695
22954
|
}
|
|
@@ -22719,7 +22978,7 @@ function CopyButton(_ref3) {
|
|
|
22719
22978
|
configurationId: copyAction === null || copyAction === void 0 ? void 0 : copyAction.id,
|
|
22720
22979
|
data: data.data[0],
|
|
22721
22980
|
type: copyAction === null || copyAction === void 0 ? void 0 : copyAction.type,
|
|
22722
|
-
mapping: (_state$configuration$
|
|
22981
|
+
mapping: (_state$configuration$24 = state.configuration.createAction) === null || _state$configuration$24 === void 0 ? void 0 : _state$configuration$24.mapping,
|
|
22723
22982
|
mappingData: data.data[0],
|
|
22724
22983
|
callback: function () {
|
|
22725
22984
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(e) {
|
|
@@ -22876,7 +23135,7 @@ function BulkAction(_ref6) {
|
|
|
22876
23135
|
}
|
|
22877
23136
|
_context4.t0 = data;
|
|
22878
23137
|
_context4.next = 11;
|
|
22879
|
-
return apiInterface.update(_objectSpread$
|
|
23138
|
+
return apiInterface.update(_objectSpread$l(_objectSpread$l({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
22880
23139
|
case 11:
|
|
22881
23140
|
_context4.t1 = _context4.sent;
|
|
22882
23141
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -22982,8 +23241,8 @@ function SelectionText(_ref8) {
|
|
|
22982
23241
|
});
|
|
22983
23242
|
}
|
|
22984
23243
|
|
|
22985
|
-
function ownKeys$
|
|
22986
|
-
function _objectSpread$
|
|
23244
|
+
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; }
|
|
23245
|
+
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; }
|
|
22987
23246
|
function getColumnFilterProps (_ref) {
|
|
22988
23247
|
var filter = _ref.filter,
|
|
22989
23248
|
title = _ref.title;
|
|
@@ -23346,7 +23605,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
23346
23605
|
});
|
|
23347
23606
|
},
|
|
23348
23607
|
options: filter.map(function (f) {
|
|
23349
|
-
return _objectSpread$
|
|
23608
|
+
return _objectSpread$k(_objectSpread$k({}, f), {}, {
|
|
23350
23609
|
label: t(f.label)
|
|
23351
23610
|
});
|
|
23352
23611
|
})
|
|
@@ -23395,7 +23654,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
23395
23654
|
setDisplaySelectedvalues = _useState4[1];
|
|
23396
23655
|
var options = [];
|
|
23397
23656
|
options = filter.map(function (f) {
|
|
23398
|
-
return _objectSpread$
|
|
23657
|
+
return _objectSpread$k(_objectSpread$k({}, f), {}, {
|
|
23399
23658
|
label: t(f.label)
|
|
23400
23659
|
});
|
|
23401
23660
|
});
|
|
@@ -23469,8 +23728,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
23469
23728
|
};
|
|
23470
23729
|
};
|
|
23471
23730
|
|
|
23472
|
-
function ownKeys$
|
|
23473
|
-
function _objectSpread$
|
|
23731
|
+
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; }
|
|
23732
|
+
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; }
|
|
23474
23733
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
23475
23734
|
var columns = configuration.columns.filter(function (c) {
|
|
23476
23735
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -23495,11 +23754,11 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
23495
23754
|
return /*#__PURE__*/jsx(Space, {
|
|
23496
23755
|
size: "middle",
|
|
23497
23756
|
children: rowAction.map(function (a, index) {
|
|
23498
|
-
var _a$disabled;
|
|
23757
|
+
var _a$hidden, _a$disabled;
|
|
23499
23758
|
if (a.actionType === 'Detail' && a.type === 'Form' && data != undefined && data.length > 1) {
|
|
23500
23759
|
dt = data;
|
|
23501
23760
|
}
|
|
23502
|
-
if (a.permission != undefined && !userHasPermission(a.permission)) {
|
|
23761
|
+
if (a.permission != undefined && !userHasPermission(a.permission) || (_a$hidden = a.hidden) !== null && _a$hidden !== void 0 && _a$hidden.call(a, dt)) {
|
|
23503
23762
|
return;
|
|
23504
23763
|
}
|
|
23505
23764
|
return /*#__PURE__*/jsx(ActionButton, {
|
|
@@ -23523,7 +23782,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
23523
23782
|
}
|
|
23524
23783
|
function mapColumn(column, onUpdate) {
|
|
23525
23784
|
var _column$field, _column$children;
|
|
23526
|
-
return _objectSpread$
|
|
23785
|
+
return _objectSpread$j(_objectSpread$j(_objectSpread$j({}, column), {}, {
|
|
23527
23786
|
width: column.width || 100,
|
|
23528
23787
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
23529
23788
|
key: column.field || column.title,
|
|
@@ -23572,8 +23831,8 @@ function updateData (_ref) {
|
|
|
23572
23831
|
};
|
|
23573
23832
|
}
|
|
23574
23833
|
|
|
23575
|
-
function ownKeys$
|
|
23576
|
-
function _objectSpread$
|
|
23834
|
+
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; }
|
|
23835
|
+
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; }
|
|
23577
23836
|
function aplyFilterAndSortation (_ref) {
|
|
23578
23837
|
var data = _ref.data,
|
|
23579
23838
|
filters = _ref.filters,
|
|
@@ -23588,7 +23847,7 @@ function aplyFilterAndSortation (_ref) {
|
|
|
23588
23847
|
processedData = sort(sorter || [], processedData);
|
|
23589
23848
|
return {
|
|
23590
23849
|
data: processedData,
|
|
23591
|
-
pagination: _objectSpread$
|
|
23850
|
+
pagination: _objectSpread$i(_objectSpread$i({}, pagination), {}, {
|
|
23592
23851
|
total: processedData.length
|
|
23593
23852
|
})
|
|
23594
23853
|
};
|
|
@@ -23673,8 +23932,8 @@ function filter(f, data) {
|
|
|
23673
23932
|
}
|
|
23674
23933
|
|
|
23675
23934
|
var _excluded = ["_id"];
|
|
23676
|
-
function ownKeys$
|
|
23677
|
-
function _objectSpread$
|
|
23935
|
+
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; }
|
|
23936
|
+
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; }
|
|
23678
23937
|
function useTableData$1 (_ref) {
|
|
23679
23938
|
var _configuration$apiInt;
|
|
23680
23939
|
var id = _ref.id;
|
|
@@ -23729,7 +23988,7 @@ function useTableData$1 (_ref) {
|
|
|
23729
23988
|
var _configuration$create;
|
|
23730
23989
|
if (!dataRow) return;
|
|
23731
23990
|
var id = v4();
|
|
23732
|
-
var processedDataRow = flat.unflatten(_objectSpread$
|
|
23991
|
+
var processedDataRow = flat.unflatten(_objectSpread$h({
|
|
23733
23992
|
_id: id,
|
|
23734
23993
|
ID: id
|
|
23735
23994
|
}, dataRow));
|
|
@@ -23741,11 +24000,11 @@ function useTableData$1 (_ref) {
|
|
|
23741
24000
|
newData = _updateData.data;
|
|
23742
24001
|
_updateData.prevDataRow;
|
|
23743
24002
|
_updateData.index;
|
|
23744
|
-
var newState = _objectSpread$
|
|
24003
|
+
var newState = _objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
23745
24004
|
data: newData
|
|
23746
24005
|
});
|
|
23747
24006
|
if (!filterServerSide) {
|
|
23748
|
-
var res = aplyFilterAndSortation(_objectSpread$
|
|
24007
|
+
var res = aplyFilterAndSortation(_objectSpread$h(_objectSpread$h({}, filterData), {}, {
|
|
23749
24008
|
data: newData
|
|
23750
24009
|
}));
|
|
23751
24010
|
newState.data = res.data;
|
|
@@ -23757,33 +24016,33 @@ function useTableData$1 (_ref) {
|
|
|
23757
24016
|
var formData = new FormData();
|
|
23758
24017
|
processedDataRow._id;
|
|
23759
24018
|
var value = _objectWithoutProperties(processedDataRow, _excluded);
|
|
23760
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
24019
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$h(_objectSpread$h({}, catalogItem), {}, {
|
|
23761
24020
|
filterContex: filterContex,
|
|
23762
24021
|
value: JSON.stringify([value])
|
|
23763
24022
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
23764
24023
|
if (d && d.Result && d.Result == 'Success') return;
|
|
23765
|
-
setState(_objectSpread$
|
|
24024
|
+
setState(_objectSpread$h({}, oldState));
|
|
23766
24025
|
});
|
|
23767
24026
|
}, [state, catalogItem, filterData]);
|
|
23768
24027
|
useEffect(function () {
|
|
23769
24028
|
if (!catalogItem) return;
|
|
23770
|
-
setState(_objectSpread$
|
|
24029
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
23771
24030
|
loading: true,
|
|
23772
|
-
mappingData: _objectSpread$
|
|
24031
|
+
mappingData: _objectSpread$h(_objectSpread$h({}, catalogItem), {}, {
|
|
23773
24032
|
filterContex: filterContex
|
|
23774
24033
|
})
|
|
23775
24034
|
}));
|
|
23776
24035
|
if (!filterServerSide) {
|
|
23777
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
24036
|
+
apiHandler.readList(configuration.mapping, _objectSpread$h(_objectSpread$h({}, catalogItem), {}, {
|
|
23778
24037
|
filterContex: filterContex
|
|
23779
24038
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
23780
24039
|
var newData = data.data.map(function (d) {
|
|
23781
|
-
return _objectSpread$
|
|
24040
|
+
return _objectSpread$h(_objectSpread$h({}, d), {}, {
|
|
23782
24041
|
_id: d._id || d.ID || nanoid()
|
|
23783
24042
|
});
|
|
23784
24043
|
});
|
|
23785
24044
|
onChange({
|
|
23786
|
-
pagination: _objectSpread$
|
|
24045
|
+
pagination: _objectSpread$h({}, state.pagination),
|
|
23787
24046
|
filters: {},
|
|
23788
24047
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
23789
24048
|
return c.defaultSortOrder;
|
|
@@ -23800,7 +24059,7 @@ function useTableData$1 (_ref) {
|
|
|
23800
24059
|
});
|
|
23801
24060
|
} else {
|
|
23802
24061
|
onChange({
|
|
23803
|
-
pagination: _objectSpread$
|
|
24062
|
+
pagination: _objectSpread$h({}, state.pagination),
|
|
23804
24063
|
filters: {},
|
|
23805
24064
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
23806
24065
|
return c.defaultSortOrder;
|
|
@@ -23817,17 +24076,17 @@ function useTableData$1 (_ref) {
|
|
|
23817
24076
|
}
|
|
23818
24077
|
}, [filterContex, catalogItem]);
|
|
23819
24078
|
var onChange = function onChange(p, dataParam) {
|
|
23820
|
-
setState(_objectSpread$
|
|
24079
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
23821
24080
|
loading: true
|
|
23822
24081
|
}));
|
|
23823
24082
|
if (!filterServerSide) {
|
|
23824
24083
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
23825
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
24084
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$h(_objectSpread$h({}, p), {}, {
|
|
23826
24085
|
data: unfilteredData
|
|
23827
24086
|
})),
|
|
23828
24087
|
data = _aplyFilterAndSortati.data,
|
|
23829
24088
|
pagination = _aplyFilterAndSortati.pagination;
|
|
23830
|
-
setState(_objectSpread$
|
|
24089
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
23831
24090
|
data: data,
|
|
23832
24091
|
pagination: pagination,
|
|
23833
24092
|
loading: false,
|
|
@@ -23838,20 +24097,20 @@ function useTableData$1 (_ref) {
|
|
|
23838
24097
|
sorter: p.sorter
|
|
23839
24098
|
});
|
|
23840
24099
|
} else {
|
|
23841
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
24100
|
+
apiHandler.readList(configuration.mapping, _objectSpread$h(_objectSpread$h({}, catalogItem), {}, {
|
|
23842
24101
|
filterContex: filterContex
|
|
23843
24102
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
23844
|
-
setState(_objectSpread$
|
|
24103
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
23845
24104
|
data: data.data.map(function (dt) {
|
|
23846
|
-
return _objectSpread$
|
|
24105
|
+
return _objectSpread$h(_objectSpread$h({}, dt), {}, {
|
|
23847
24106
|
_id: dt._id || dt.ID || nanoid()
|
|
23848
24107
|
});
|
|
23849
24108
|
}),
|
|
23850
|
-
pagination: _objectSpread$
|
|
24109
|
+
pagination: _objectSpread$h(_objectSpread$h({}, p.pagination), {}, {
|
|
23851
24110
|
total: data.total
|
|
23852
24111
|
}),
|
|
23853
24112
|
loading: false,
|
|
23854
|
-
mappingData: _objectSpread$
|
|
24113
|
+
mappingData: _objectSpread$h(_objectSpread$h({}, catalogItem), {}, {
|
|
23855
24114
|
filterContex: filterContex
|
|
23856
24115
|
})
|
|
23857
24116
|
}));
|
|
@@ -23863,7 +24122,7 @@ function useTableData$1 (_ref) {
|
|
|
23863
24122
|
}
|
|
23864
24123
|
};
|
|
23865
24124
|
var onSelect = function onSelect(keys) {
|
|
23866
|
-
setState(_objectSpread$
|
|
24125
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
23867
24126
|
selected: keys
|
|
23868
24127
|
}));
|
|
23869
24128
|
};
|
|
@@ -23873,7 +24132,7 @@ function useTableData$1 (_ref) {
|
|
|
23873
24132
|
return _regeneratorRuntime.wrap(function _callee$(_context2) {
|
|
23874
24133
|
while (1) switch (_context2.prev = _context2.next) {
|
|
23875
24134
|
case 0:
|
|
23876
|
-
setState(_objectSpread$
|
|
24135
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
23877
24136
|
deleting: true
|
|
23878
24137
|
}));
|
|
23879
24138
|
newData = _toConsumableArray(state.data);
|
|
@@ -23888,7 +24147,7 @@ function useTableData$1 (_ref) {
|
|
|
23888
24147
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
23889
24148
|
return nd._id === state.selected[index];
|
|
23890
24149
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
23891
|
-
mappingData = _objectSpread$
|
|
24150
|
+
mappingData = _objectSpread$h(_objectSpread$h({}, mappingData), state.mappingData);
|
|
23892
24151
|
_context.next = 5;
|
|
23893
24152
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true);
|
|
23894
24153
|
case 5:
|
|
@@ -23938,7 +24197,7 @@ function useTableData$1 (_ref) {
|
|
|
23938
24197
|
}
|
|
23939
24198
|
_context2.next = 18;
|
|
23940
24199
|
return apiHandler.readList(configuration.mapping, {
|
|
23941
|
-
pagination: _objectSpread$
|
|
24200
|
+
pagination: _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
|
|
23942
24201
|
current: current
|
|
23943
24202
|
}),
|
|
23944
24203
|
columns: configuration.columns,
|
|
@@ -23950,11 +24209,11 @@ function useTableData$1 (_ref) {
|
|
|
23950
24209
|
newData = data.data;
|
|
23951
24210
|
total = data.total;
|
|
23952
24211
|
case 21:
|
|
23953
|
-
setState(_objectSpread$
|
|
24212
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
23954
24213
|
selected: [],
|
|
23955
24214
|
deleting: false,
|
|
23956
24215
|
data: newData,
|
|
23957
|
-
pagination: _objectSpread$
|
|
24216
|
+
pagination: _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
|
|
23958
24217
|
current: current,
|
|
23959
24218
|
total: total
|
|
23960
24219
|
})
|
|
@@ -23970,12 +24229,12 @@ function useTableData$1 (_ref) {
|
|
|
23970
24229
|
};
|
|
23971
24230
|
}();
|
|
23972
24231
|
function setLoading() {
|
|
23973
|
-
setState(_objectSpread$
|
|
24232
|
+
setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
23974
24233
|
loading: true
|
|
23975
24234
|
}));
|
|
23976
24235
|
}
|
|
23977
|
-
return _objectSpread$
|
|
23978
|
-
configuration: _objectSpread$
|
|
24236
|
+
return _objectSpread$h(_objectSpread$h({}, state), {}, {
|
|
24237
|
+
configuration: _objectSpread$h(_objectSpread$h({}, configuration), {}, {
|
|
23979
24238
|
title: undefined
|
|
23980
24239
|
}),
|
|
23981
24240
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -24080,8 +24339,8 @@ function objectHash (obj) {
|
|
|
24080
24339
|
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; } } }; }
|
|
24081
24340
|
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; } }
|
|
24082
24341
|
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; }
|
|
24083
|
-
function ownKeys$
|
|
24084
|
-
function _objectSpread$
|
|
24342
|
+
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; }
|
|
24343
|
+
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; }
|
|
24085
24344
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
24086
24345
|
function useTableData (_ref) {
|
|
24087
24346
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -24139,16 +24398,16 @@ function useTableData (_ref) {
|
|
|
24139
24398
|
var _useState13 = useState({
|
|
24140
24399
|
loading: true,
|
|
24141
24400
|
deleting: false,
|
|
24142
|
-
pagination: {
|
|
24401
|
+
pagination: _objectSpread$g({
|
|
24143
24402
|
current: 1,
|
|
24144
|
-
pageSize:
|
|
24403
|
+
pageSize: 20,
|
|
24145
24404
|
total: 0,
|
|
24146
24405
|
showSizeChanger: true
|
|
24147
|
-
},
|
|
24406
|
+
}, configuration.pagination ? configuration.pagination : {}),
|
|
24148
24407
|
selected: [],
|
|
24149
24408
|
canDelete: !!apiHandler.canDelete,
|
|
24150
24409
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
24151
|
-
mappingData: _objectSpread$
|
|
24410
|
+
mappingData: _objectSpread$g(_objectSpread$g({}, parentData), {}, {
|
|
24152
24411
|
prefilter: {
|
|
24153
24412
|
select: globalFilter.select
|
|
24154
24413
|
}
|
|
@@ -24157,7 +24416,7 @@ function useTableData (_ref) {
|
|
|
24157
24416
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
24158
24417
|
state = _useState14[0],
|
|
24159
24418
|
setState = _useState14[1];
|
|
24160
|
-
var mapping = _objectSpread$
|
|
24419
|
+
var mapping = _objectSpread$g(_objectSpread$g({}, parentData), {}, {
|
|
24161
24420
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
24162
24421
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
24163
24422
|
});
|
|
@@ -24196,14 +24455,14 @@ function useTableData (_ref) {
|
|
|
24196
24455
|
}
|
|
24197
24456
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
24198
24457
|
var newInitData = initData;
|
|
24199
|
-
var newState = _objectSpread$
|
|
24458
|
+
var newState = _objectSpread$g({}, state);
|
|
24200
24459
|
var selected = [];
|
|
24201
24460
|
if (configuration.deselectOnUpdate == false) {
|
|
24202
24461
|
selected = state.selected;
|
|
24203
24462
|
}
|
|
24204
24463
|
var pagination = undefined;
|
|
24205
24464
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
24206
|
-
pagination = _objectSpread$
|
|
24465
|
+
pagination = _objectSpread$g(_objectSpread$g({}, state.pagination), {}, {
|
|
24207
24466
|
total: state.data.length + dataArray.length
|
|
24208
24467
|
});
|
|
24209
24468
|
}
|
|
@@ -24220,7 +24479,7 @@ function useTableData (_ref) {
|
|
|
24220
24479
|
dataRow: dataRow
|
|
24221
24480
|
}),
|
|
24222
24481
|
_data = _updateData.data;
|
|
24223
|
-
newState = _objectSpread$
|
|
24482
|
+
newState = _objectSpread$g(_objectSpread$g({}, newState), {}, {
|
|
24224
24483
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
24225
24484
|
data: _data,
|
|
24226
24485
|
selected: selected
|
|
@@ -24233,8 +24492,8 @@ function useTableData (_ref) {
|
|
|
24233
24492
|
dataRow: dataRow
|
|
24234
24493
|
}),
|
|
24235
24494
|
nextInitData = _updateData2.data;
|
|
24236
|
-
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$
|
|
24237
|
-
filters: _objectSpread$
|
|
24495
|
+
var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, filterData), {}, {
|
|
24496
|
+
filters: _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, 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"])
|
|
24238
24497
|
}, 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 ? {
|
|
24239
24498
|
genericProps: globalFilter.toggle
|
|
24240
24499
|
} : undefined), {}, {
|
|
@@ -24244,7 +24503,7 @@ function useTableData (_ref) {
|
|
|
24244
24503
|
_data2 = _aplyFilterAndSortati.data,
|
|
24245
24504
|
_pagination2 = _aplyFilterAndSortati.pagination;
|
|
24246
24505
|
newInitData = nextInitData;
|
|
24247
|
-
newState = _objectSpread$
|
|
24506
|
+
newState = _objectSpread$g(_objectSpread$g({}, newState), {}, {
|
|
24248
24507
|
pagination: _pagination2,
|
|
24249
24508
|
data: _data2,
|
|
24250
24509
|
selected: selected
|
|
@@ -24254,8 +24513,8 @@ function useTableData (_ref) {
|
|
|
24254
24513
|
if (apiHandler.canCreate) {
|
|
24255
24514
|
apiCreate(data).then(function (res) {
|
|
24256
24515
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
24257
|
-
initData && setInitData(_objectSpread$
|
|
24258
|
-
setState(_objectSpread$
|
|
24516
|
+
initData && setInitData(_objectSpread$g({}, initData));
|
|
24517
|
+
setState(_objectSpread$g({}, state));
|
|
24259
24518
|
}
|
|
24260
24519
|
});
|
|
24261
24520
|
}
|
|
@@ -24268,7 +24527,7 @@ function useTableData (_ref) {
|
|
|
24268
24527
|
var triggerRefresh = function triggerRefresh() {
|
|
24269
24528
|
var _configuration$filter7;
|
|
24270
24529
|
setError(undefined);
|
|
24271
|
-
var newGlobalFilter = _objectSpread$
|
|
24530
|
+
var newGlobalFilter = _objectSpread$g({}, globalFilter);
|
|
24272
24531
|
//on refresh update default filter, since global value can change
|
|
24273
24532
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
24274
24533
|
var _configuration$filter8;
|
|
@@ -24279,7 +24538,7 @@ function useTableData (_ref) {
|
|
|
24279
24538
|
newGlobalFilter["default"] = _defaultFilter;
|
|
24280
24539
|
setGlobaFilter(newGlobalFilter);
|
|
24281
24540
|
}
|
|
24282
|
-
onChange(_objectSpread$
|
|
24541
|
+
onChange(_objectSpread$g({
|
|
24283
24542
|
pagination: state.pagination
|
|
24284
24543
|
}, filterData), newGlobalFilter, true);
|
|
24285
24544
|
};
|
|
@@ -24298,7 +24557,7 @@ function useTableData (_ref) {
|
|
|
24298
24557
|
order: c.defaultSortOrder
|
|
24299
24558
|
};
|
|
24300
24559
|
});
|
|
24301
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
24560
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
24302
24561
|
loading: false
|
|
24303
24562
|
}));else {
|
|
24304
24563
|
onChange({
|
|
@@ -24355,11 +24614,11 @@ function useTableData (_ref) {
|
|
|
24355
24614
|
case 0:
|
|
24356
24615
|
prefilter = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : globalFilter;
|
|
24357
24616
|
refresh = _args2.length > 2 ? _args2[2] : undefined;
|
|
24358
|
-
setState(_objectSpread$
|
|
24617
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
24359
24618
|
loading: true
|
|
24360
24619
|
}));
|
|
24361
24620
|
currentData = initData;
|
|
24362
|
-
filterData = _objectSpread$
|
|
24621
|
+
filterData = _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, 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
|
|
24363
24622
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref5) {
|
|
24364
24623
|
var _ref6 = _slicedToArray(_ref5, 2);
|
|
24365
24624
|
_ref6[0];
|
|
@@ -24367,7 +24626,7 @@ function useTableData (_ref) {
|
|
|
24367
24626
|
return v != null;
|
|
24368
24627
|
}));
|
|
24369
24628
|
currentFilterHash = objectHash(filterData);
|
|
24370
|
-
currentPagination = _objectSpread$
|
|
24629
|
+
currentPagination = _objectSpread$g(_objectSpread$g({}, p.pagination), {}, {
|
|
24371
24630
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
24372
24631
|
});
|
|
24373
24632
|
filterHash.current = currentFilterHash;
|
|
@@ -24375,7 +24634,7 @@ function useTableData (_ref) {
|
|
|
24375
24634
|
_context2.next = 19;
|
|
24376
24635
|
break;
|
|
24377
24636
|
}
|
|
24378
|
-
ssf = _objectSpread$
|
|
24637
|
+
ssf = _objectSpread$g({
|
|
24379
24638
|
pagination: currentPagination,
|
|
24380
24639
|
columns: configuration.columns,
|
|
24381
24640
|
filters: filterData,
|
|
@@ -24389,7 +24648,7 @@ function useTableData (_ref) {
|
|
|
24389
24648
|
data = _context2.sent;
|
|
24390
24649
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
24391
24650
|
currentData = data.data;
|
|
24392
|
-
currentPagination = _objectSpread$
|
|
24651
|
+
currentPagination = _objectSpread$g(_objectSpread$g({}, currentPagination), {}, {
|
|
24393
24652
|
total: data.total
|
|
24394
24653
|
});
|
|
24395
24654
|
_context2.next = 28;
|
|
@@ -24406,7 +24665,7 @@ function useTableData (_ref) {
|
|
|
24406
24665
|
currentData = _data3.data;
|
|
24407
24666
|
setInitData(currentData);
|
|
24408
24667
|
case 25:
|
|
24409
|
-
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$
|
|
24668
|
+
_aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$g(_objectSpread$g({}, p), {}, {
|
|
24410
24669
|
pagination: currentPagination,
|
|
24411
24670
|
filters: filterData,
|
|
24412
24671
|
data: currentData,
|
|
@@ -24415,11 +24674,11 @@ function useTableData (_ref) {
|
|
|
24415
24674
|
currentData = _data4;
|
|
24416
24675
|
currentPagination = pagination;
|
|
24417
24676
|
case 28:
|
|
24418
|
-
setState(_objectSpread$
|
|
24677
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
24419
24678
|
loading: false,
|
|
24420
24679
|
data: currentData,
|
|
24421
24680
|
pagination: currentPagination,
|
|
24422
|
-
mappingData: _objectSpread$
|
|
24681
|
+
mappingData: _objectSpread$g(_objectSpread$g({}, parentData), {}, {
|
|
24423
24682
|
prefilter: prefilter
|
|
24424
24683
|
}),
|
|
24425
24684
|
currentFetchUrl: currentUrl
|
|
@@ -24439,7 +24698,7 @@ function useTableData (_ref) {
|
|
|
24439
24698
|
};
|
|
24440
24699
|
}();
|
|
24441
24700
|
var onSelect = function onSelect(keys) {
|
|
24442
|
-
setState(_objectSpread$
|
|
24701
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
24443
24702
|
selected: keys
|
|
24444
24703
|
}));
|
|
24445
24704
|
};
|
|
@@ -24450,7 +24709,7 @@ function useTableData (_ref) {
|
|
|
24450
24709
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
24451
24710
|
while (1) switch (_context4.prev = _context4.next) {
|
|
24452
24711
|
case 0:
|
|
24453
|
-
setState(_objectSpread$
|
|
24712
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
24454
24713
|
deleting: true
|
|
24455
24714
|
}));
|
|
24456
24715
|
newData = _toConsumableArray(state.data);
|
|
@@ -24490,7 +24749,7 @@ function useTableData (_ref) {
|
|
|
24490
24749
|
} finally {
|
|
24491
24750
|
_iterator.f();
|
|
24492
24751
|
}
|
|
24493
|
-
mappingData = _objectSpread$
|
|
24752
|
+
mappingData = _objectSpread$g(_objectSpread$g(_objectSpread$g({}, mappingData), state.mappingData), mapToggle);
|
|
24494
24753
|
deleteResult = undefined;
|
|
24495
24754
|
_context3.prev = 7;
|
|
24496
24755
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -24581,12 +24840,12 @@ function useTableData (_ref) {
|
|
|
24581
24840
|
break;
|
|
24582
24841
|
}
|
|
24583
24842
|
_context4.next = 25;
|
|
24584
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
24585
|
-
pagination: _objectSpread$
|
|
24843
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$g({
|
|
24844
|
+
pagination: _objectSpread$g(_objectSpread$g({}, state.pagination), {}, {
|
|
24586
24845
|
current: current
|
|
24587
24846
|
}),
|
|
24588
24847
|
columns: configuration.columns,
|
|
24589
|
-
filters: _objectSpread$
|
|
24848
|
+
filters: _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, 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"]),
|
|
24590
24849
|
sorter: filterData.sorter
|
|
24591
24850
|
}, 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 ? {
|
|
24592
24851
|
genericProps: globalFilter.toggle
|
|
@@ -24597,11 +24856,11 @@ function useTableData (_ref) {
|
|
|
24597
24856
|
total = data.total;
|
|
24598
24857
|
case 28:
|
|
24599
24858
|
setInitData(newInitData);
|
|
24600
|
-
setState(_objectSpread$
|
|
24859
|
+
setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
24601
24860
|
selected: [],
|
|
24602
24861
|
deleting: false,
|
|
24603
24862
|
data: newData,
|
|
24604
|
-
pagination: _objectSpread$
|
|
24863
|
+
pagination: _objectSpread$g(_objectSpread$g({}, state.pagination), {}, {
|
|
24605
24864
|
current: current === 0 ? 1 : current,
|
|
24606
24865
|
total: total
|
|
24607
24866
|
})
|
|
@@ -24622,14 +24881,14 @@ function useTableData (_ref) {
|
|
|
24622
24881
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
24623
24882
|
return;
|
|
24624
24883
|
}
|
|
24625
|
-
var newGlobalFilter = _objectSpread$
|
|
24884
|
+
var newGlobalFilter = _objectSpread$g({}, globalFilter);
|
|
24626
24885
|
if (value !== null && value !== void 0 && value.length) {
|
|
24627
24886
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
24628
24887
|
} else {
|
|
24629
24888
|
newGlobalFilter.select = {};
|
|
24630
24889
|
}
|
|
24631
24890
|
setGlobaFilter(newGlobalFilter);
|
|
24632
|
-
onChange(_objectSpread$
|
|
24891
|
+
onChange(_objectSpread$g({
|
|
24633
24892
|
pagination: state.pagination
|
|
24634
24893
|
}, filterData), newGlobalFilter);
|
|
24635
24894
|
};
|
|
@@ -24643,11 +24902,11 @@ function useTableData (_ref) {
|
|
|
24643
24902
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
24644
24903
|
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', 1];
|
|
24645
24904
|
});
|
|
24646
|
-
var newGlobalFilter = _objectSpread$
|
|
24905
|
+
var newGlobalFilter = _objectSpread$g(_objectSpread$g({}, globalFilter), {}, {
|
|
24647
24906
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
24648
24907
|
});
|
|
24649
24908
|
setGlobaFilter(newGlobalFilter);
|
|
24650
|
-
onChange(_objectSpread$
|
|
24909
|
+
onChange(_objectSpread$g({
|
|
24651
24910
|
pagination: state.pagination
|
|
24652
24911
|
}, filterData), newGlobalFilter);
|
|
24653
24912
|
};
|
|
@@ -24657,7 +24916,7 @@ function useTableData (_ref) {
|
|
|
24657
24916
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
24658
24917
|
return;
|
|
24659
24918
|
}
|
|
24660
|
-
var newGlobalFilter = _objectSpread$
|
|
24919
|
+
var newGlobalFilter = _objectSpread$g(_objectSpread$g({}, globalFilter), {}, {
|
|
24661
24920
|
search: {}
|
|
24662
24921
|
});
|
|
24663
24922
|
if (value) {
|
|
@@ -24671,7 +24930,7 @@ function useTableData (_ref) {
|
|
|
24671
24930
|
});
|
|
24672
24931
|
}
|
|
24673
24932
|
setGlobaFilter(newGlobalFilter);
|
|
24674
|
-
onChange(_objectSpread$
|
|
24933
|
+
onChange(_objectSpread$g({
|
|
24675
24934
|
pagination: state.pagination
|
|
24676
24935
|
}, filterData), newGlobalFilter);
|
|
24677
24936
|
};
|
|
@@ -24681,17 +24940,17 @@ function useTableData (_ref) {
|
|
|
24681
24940
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
24682
24941
|
return;
|
|
24683
24942
|
}
|
|
24684
|
-
var newGlobalFilter = _objectSpread$
|
|
24943
|
+
var newGlobalFilter = _objectSpread$g({}, globalFilter);
|
|
24685
24944
|
newGlobalFilter.timeStamp = {
|
|
24686
24945
|
fromTimeStamp: [from],
|
|
24687
24946
|
toTimeStamp: [to]
|
|
24688
24947
|
};
|
|
24689
24948
|
setGlobaFilter(newGlobalFilter);
|
|
24690
|
-
onChange(_objectSpread$
|
|
24949
|
+
onChange(_objectSpread$g({
|
|
24691
24950
|
pagination: state.pagination
|
|
24692
24951
|
}, filterData), newGlobalFilter);
|
|
24693
24952
|
};
|
|
24694
|
-
return _objectSpread$
|
|
24953
|
+
return _objectSpread$g(_objectSpread$g({}, state), {}, {
|
|
24695
24954
|
title: title,
|
|
24696
24955
|
configuration: configuration,
|
|
24697
24956
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -24731,8 +24990,8 @@ function StandardTable (_ref) {
|
|
|
24731
24990
|
});
|
|
24732
24991
|
}
|
|
24733
24992
|
|
|
24734
|
-
function ownKeys$
|
|
24735
|
-
function _objectSpread$
|
|
24993
|
+
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; }
|
|
24994
|
+
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; }
|
|
24736
24995
|
function Table (props) {
|
|
24737
24996
|
var root = useStore();
|
|
24738
24997
|
var variant = useMemo(function () {
|
|
@@ -24740,15 +24999,15 @@ function Table (props) {
|
|
|
24740
24999
|
return config.variant;
|
|
24741
25000
|
}, [props.id]);
|
|
24742
25001
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
24743
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
25002
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$f({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$f({}, props))]
|
|
24744
25003
|
});
|
|
24745
25004
|
}
|
|
24746
25005
|
|
|
24747
25006
|
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; } } }; }
|
|
24748
25007
|
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; } }
|
|
24749
25008
|
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; }
|
|
24750
|
-
function ownKeys$
|
|
24751
|
-
function _objectSpread$
|
|
25009
|
+
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; }
|
|
25010
|
+
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; }
|
|
24752
25011
|
function useAGGrid (_ref) {
|
|
24753
25012
|
var id = _ref.id,
|
|
24754
25013
|
filter = _ref.filter,
|
|
@@ -24842,7 +25101,7 @@ function useAGGrid (_ref) {
|
|
|
24842
25101
|
value = _ref3[1];
|
|
24843
25102
|
if (_idx == 0) {
|
|
24844
25103
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
24845
|
-
rdat.push(_objectSpread$
|
|
25104
|
+
rdat.push(_objectSpread$e(_objectSpread$e({}, rd), {}, {
|
|
24846
25105
|
grouping: [idx.toString()]
|
|
24847
25106
|
}));
|
|
24848
25107
|
var sp = key.split(':');
|
|
@@ -24985,8 +25244,8 @@ var value = "value-FCA-6";
|
|
|
24985
25244
|
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";
|
|
24986
25245
|
styleInject(css_248z$a);
|
|
24987
25246
|
|
|
24988
|
-
function ownKeys$
|
|
24989
|
-
function _objectSpread$
|
|
25247
|
+
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; }
|
|
25248
|
+
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; }
|
|
24990
25249
|
var AGChart = function AGChart(_ref) {
|
|
24991
25250
|
var data = _ref.data;
|
|
24992
25251
|
var groupedData = [];
|
|
@@ -24994,11 +25253,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
24994
25253
|
data.forEach(function (dt) {
|
|
24995
25254
|
if (dt.count == 0) return;
|
|
24996
25255
|
if (groupedData.length > dt.grouping[0]) {
|
|
24997
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
25256
|
+
groupedData[dt.grouping[0]].push(_objectSpread$d(_objectSpread$d({}, dt), {}, {
|
|
24998
25257
|
count: Number(dt.count)
|
|
24999
25258
|
}));
|
|
25000
25259
|
} else {
|
|
25001
|
-
groupedData.push([_objectSpread$
|
|
25260
|
+
groupedData.push([_objectSpread$d(_objectSpread$d({}, dt), {}, {
|
|
25002
25261
|
count: Number(dt.count)
|
|
25003
25262
|
})]);
|
|
25004
25263
|
}
|
|
@@ -25039,8 +25298,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
25039
25298
|
});
|
|
25040
25299
|
};
|
|
25041
25300
|
|
|
25042
|
-
function ownKeys$
|
|
25043
|
-
function _objectSpread$
|
|
25301
|
+
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; }
|
|
25302
|
+
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; }
|
|
25044
25303
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
25045
25304
|
var id = _ref.id,
|
|
25046
25305
|
filter = _ref.filter,
|
|
@@ -25133,7 +25392,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
25133
25392
|
});
|
|
25134
25393
|
});
|
|
25135
25394
|
}
|
|
25136
|
-
return _objectSpread$
|
|
25395
|
+
return _objectSpread$c(_objectSpread$c({}, column), {}, {
|
|
25137
25396
|
cellRenderer: renderer
|
|
25138
25397
|
});
|
|
25139
25398
|
});
|
|
@@ -25407,8 +25666,8 @@ var CustomText$1 = observer(CustomText, {
|
|
|
25407
25666
|
forwardRef: true
|
|
25408
25667
|
});
|
|
25409
25668
|
|
|
25410
|
-
function ownKeys$
|
|
25411
|
-
function _objectSpread$
|
|
25669
|
+
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; }
|
|
25670
|
+
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; }
|
|
25412
25671
|
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; } } }; }
|
|
25413
25672
|
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; } }
|
|
25414
25673
|
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; }
|
|
@@ -25471,7 +25730,7 @@ function useFilterBoxData (id) {
|
|
|
25471
25730
|
} finally {
|
|
25472
25731
|
_iterator.f();
|
|
25473
25732
|
}
|
|
25474
|
-
return _objectSpread$
|
|
25733
|
+
return _objectSpread$b(_objectSpread$b({}, state), ob);
|
|
25475
25734
|
}
|
|
25476
25735
|
return {
|
|
25477
25736
|
configuration: configuration,
|
|
@@ -25485,8 +25744,8 @@ function useFilterBoxData (id) {
|
|
|
25485
25744
|
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; } } }; }
|
|
25486
25745
|
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; } }
|
|
25487
25746
|
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; }
|
|
25488
|
-
function ownKeys$
|
|
25489
|
-
function _objectSpread$
|
|
25747
|
+
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; }
|
|
25748
|
+
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; }
|
|
25490
25749
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
25491
25750
|
var id = _ref.id,
|
|
25492
25751
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -25514,7 +25773,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
25514
25773
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
25515
25774
|
mode: "single",
|
|
25516
25775
|
apiInterface: filter.requestOptions,
|
|
25517
|
-
wholeData: _objectSpread$
|
|
25776
|
+
wholeData: _objectSpread$a(_objectSpread$a({}, state.filter), {}, {
|
|
25518
25777
|
tab: tab
|
|
25519
25778
|
}),
|
|
25520
25779
|
mapping: filter.requestMapping,
|
|
@@ -25746,8 +26005,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
25746
26005
|
return false;
|
|
25747
26006
|
});
|
|
25748
26007
|
|
|
25749
|
-
function ownKeys$
|
|
25750
|
-
function _objectSpread$
|
|
26008
|
+
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; }
|
|
26009
|
+
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; }
|
|
25751
26010
|
function useUIBuilderData (id) {
|
|
25752
26011
|
var save = undefined;
|
|
25753
26012
|
var root = useStore();
|
|
@@ -25779,7 +26038,7 @@ function useUIBuilderData (id) {
|
|
|
25779
26038
|
var configuration = _useMemo.configuration;
|
|
25780
26039
|
useEffect(function () {
|
|
25781
26040
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
25782
|
-
return setFilter(_objectSpread$
|
|
26041
|
+
return setFilter(_objectSpread$9(_objectSpread$9({}, filter), {}, {
|
|
25783
26042
|
sessionGuid: res
|
|
25784
26043
|
}));
|
|
25785
26044
|
});
|
|
@@ -25802,8 +26061,8 @@ function useUIBuilderData (id) {
|
|
|
25802
26061
|
};
|
|
25803
26062
|
}
|
|
25804
26063
|
|
|
25805
|
-
function ownKeys$
|
|
25806
|
-
function _objectSpread$
|
|
26064
|
+
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; }
|
|
26065
|
+
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; }
|
|
25807
26066
|
function UIBuilder(_ref) {
|
|
25808
26067
|
var id = _ref.id;
|
|
25809
26068
|
var state = useUIBuilderData(id);
|
|
@@ -25830,7 +26089,7 @@ function UIBuilder(_ref) {
|
|
|
25830
26089
|
override = {
|
|
25831
26090
|
value: newFilter[item.field],
|
|
25832
26091
|
setValue: function setValue(newVal) {
|
|
25833
|
-
var newFilter = _objectSpread$
|
|
26092
|
+
var newFilter = _objectSpread$8({}, state.filter);
|
|
25834
26093
|
newFilter[item.field] = newVal;
|
|
25835
26094
|
state.setFilter(newFilter);
|
|
25836
26095
|
}
|
|
@@ -25878,7 +26137,7 @@ function UIBuilder(_ref) {
|
|
|
25878
26137
|
case 'AGGrid':
|
|
25879
26138
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
25880
26139
|
id: item.id,
|
|
25881
|
-
filter: _objectSpread$
|
|
26140
|
+
filter: _objectSpread$8({
|
|
25882
26141
|
optionCodices: JSON.stringify(state.data)
|
|
25883
26142
|
}, state.filter),
|
|
25884
26143
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -26038,8 +26297,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
26038
26297
|
};
|
|
26039
26298
|
var OrgItem$1 = observer(OrgItem);
|
|
26040
26299
|
|
|
26041
|
-
function ownKeys$
|
|
26042
|
-
function _objectSpread$
|
|
26300
|
+
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; }
|
|
26301
|
+
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; }
|
|
26043
26302
|
function useTransformJson (_ref) {
|
|
26044
26303
|
var id = _ref.id;
|
|
26045
26304
|
var _useState = useState(),
|
|
@@ -26105,7 +26364,7 @@ function useTransformJson (_ref) {
|
|
|
26105
26364
|
}();
|
|
26106
26365
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
26107
26366
|
var _data$children;
|
|
26108
|
-
return _objectSpread$
|
|
26367
|
+
return _objectSpread$7(_objectSpread$7({}, data), {}, {
|
|
26109
26368
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
26110
26369
|
data: data,
|
|
26111
26370
|
configuration: configuration,
|
|
@@ -26764,8 +27023,8 @@ function useCatalogEditor (id) {
|
|
|
26764
27023
|
};
|
|
26765
27024
|
}
|
|
26766
27025
|
|
|
26767
|
-
function ownKeys$
|
|
26768
|
-
function _objectSpread$
|
|
27026
|
+
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; }
|
|
27027
|
+
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; }
|
|
26769
27028
|
function DragDropUpload(_ref) {
|
|
26770
27029
|
var api2Params = _ref.api2Params,
|
|
26771
27030
|
catalogId = _ref.catalogId,
|
|
@@ -26870,7 +27129,7 @@ function DragDropUpload(_ref) {
|
|
|
26870
27129
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
26871
27130
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
26872
27131
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
26873
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
27132
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$6(_objectSpread$6({}, props), {}, {
|
|
26874
27133
|
children: [/*#__PURE__*/jsx("p", {
|
|
26875
27134
|
className: "ant-upload-drag-icon",
|
|
26876
27135
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -27144,7 +27403,7 @@ function TablePackages () {
|
|
|
27144
27403
|
icon: /*#__PURE__*/jsx(EditOutlined, {}),
|
|
27145
27404
|
action: function action(_ref) {
|
|
27146
27405
|
var selectedNodes = _ref.selectedNodes;
|
|
27147
|
-
updateNavigation(selectedNodes[0].data._id, ['renaming', '
|
|
27406
|
+
updateNavigation(selectedNodes[0].data._id, ['renaming', 'features']);
|
|
27148
27407
|
},
|
|
27149
27408
|
disabled: function disabled(_ref2) {
|
|
27150
27409
|
var selectedNodes = _ref2.selectedNodes;
|
|
@@ -28916,6 +29175,8 @@ function Content$1() {
|
|
|
28916
29175
|
});
|
|
28917
29176
|
}
|
|
28918
29177
|
|
|
29178
|
+
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; }
|
|
29179
|
+
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; }
|
|
28919
29180
|
var ContentWrapper = function ContentWrapper(_ref) {
|
|
28920
29181
|
var id = _ref.id;
|
|
28921
29182
|
var root = useStore();
|
|
@@ -28934,11 +29195,13 @@ var ContentWrapper = function ContentWrapper(_ref) {
|
|
|
28934
29195
|
style: {
|
|
28935
29196
|
margin: 16,
|
|
28936
29197
|
position: 'relative',
|
|
28937
|
-
minHeight: 'auto'
|
|
29198
|
+
minHeight: 'auto',
|
|
29199
|
+
height: 'calc(100% - 32px)'
|
|
28938
29200
|
},
|
|
28939
29201
|
children: [current.configuration.type !== 'Group' && /*#__PURE__*/jsx(ContentCard, {
|
|
28940
29202
|
configId: current.id,
|
|
28941
|
-
type: current.configuration.type
|
|
29203
|
+
type: current.configuration.type,
|
|
29204
|
+
inGroup: false
|
|
28942
29205
|
}), current.configuration.type == 'Group' && /*#__PURE__*/jsx(Group, {
|
|
28943
29206
|
id: current.id
|
|
28944
29207
|
})]
|
|
@@ -28965,17 +29228,15 @@ var Group = observer(function (_ref2) {
|
|
|
28965
29228
|
direction: (_configuration$direct = configuration.direction) !== null && _configuration$direct !== void 0 ? _configuration$direct : 'vertical',
|
|
28966
29229
|
wrap: configuration.direction === 'horizontal',
|
|
28967
29230
|
size: "middle",
|
|
28968
|
-
style:
|
|
28969
|
-
maxWidth: '100%'
|
|
28970
|
-
} : {
|
|
28971
|
-
// backgroundColor: 'rgb(20,20,20)',
|
|
29231
|
+
style: {
|
|
28972
29232
|
maxWidth: '100%'
|
|
28973
29233
|
},
|
|
28974
29234
|
children: (_configuration$items = configuration.items) === null || _configuration$items === void 0 ? void 0 : _configuration$items.map(function (item) {
|
|
28975
29235
|
return !item.hide && /*#__PURE__*/jsx(ContentCard, {
|
|
28976
29236
|
configId: item.id,
|
|
28977
29237
|
type: item.type,
|
|
28978
|
-
direction: configuration.direction
|
|
29238
|
+
direction: configuration.direction,
|
|
29239
|
+
inGroup: true
|
|
28979
29240
|
}, item.id);
|
|
28980
29241
|
})
|
|
28981
29242
|
});
|
|
@@ -28983,19 +29244,22 @@ var Group = observer(function (_ref2) {
|
|
|
28983
29244
|
var ContentCard = observer(function (_ref3) {
|
|
28984
29245
|
var configId = _ref3.configId,
|
|
28985
29246
|
type = _ref3.type,
|
|
28986
|
-
direction = _ref3.direction
|
|
29247
|
+
direction = _ref3.direction,
|
|
29248
|
+
inGroup = _ref3.inGroup;
|
|
28987
29249
|
var root = useStore();
|
|
28988
29250
|
var configuration = root.configurationStore.getConfiguration(configId);
|
|
28989
29251
|
return /*#__PURE__*/jsxs("div", {
|
|
28990
|
-
style:
|
|
28991
|
-
|
|
28992
|
-
padding: direction == 'horizontal' ? 0 : 24,
|
|
28993
|
-
maxWidth: '100%'
|
|
29252
|
+
style: _objectSpread$5(_objectSpread$5({}, !inGroup ? {
|
|
29253
|
+
height: '100%'
|
|
28994
29254
|
} : {
|
|
28995
|
-
|
|
28996
|
-
|
|
28997
|
-
maxWidth: '100%'
|
|
28998
|
-
|
|
29255
|
+
maxHeight: '60vh'
|
|
29256
|
+
}), {}, {
|
|
29257
|
+
maxWidth: '100%',
|
|
29258
|
+
padding: direction == 'horizontal' ? 0 : 16,
|
|
29259
|
+
backgroundColor: root.contentStore.theme == 'lightmode' ? '#fff' : '#000',
|
|
29260
|
+
display: 'flex',
|
|
29261
|
+
flexDirection: 'column'
|
|
29262
|
+
}),
|
|
28999
29263
|
children: [type == 'Table' && /*#__PURE__*/jsx(Table, {
|
|
29000
29264
|
id: configId
|
|
29001
29265
|
}, configId), type == 'UIBuilder' && /*#__PURE__*/jsx(UIBuilder, {
|
|
@@ -30025,7 +30289,7 @@ var draghandle = "draghandle-f5b0N";
|
|
|
30025
30289
|
var midHandle = "mid-handle--qh50";
|
|
30026
30290
|
var toolItem = "tool-item-KyKgQ";
|
|
30027
30291
|
var sel = "sel-iUm8X";
|
|
30028
|
-
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:
|
|
30292
|
+
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: 10001;\n overflow: auto;\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";
|
|
30029
30293
|
styleInject(css_248z$1);
|
|
30030
30294
|
|
|
30031
30295
|
var overlay = "overlay-Dr5pn";
|
|
@@ -30127,6 +30391,17 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
30127
30391
|
if (tool) setWidth(tool === null || tool === void 0 ? void 0 : tool.startWidth);
|
|
30128
30392
|
}
|
|
30129
30393
|
}, [root.contentStore.hideTools]);
|
|
30394
|
+
useEffect(function () {
|
|
30395
|
+
if (root.contentStore.hideTools) {
|
|
30396
|
+
var _tool = root.contentStore.tools.find(function (t) {
|
|
30397
|
+
return t.defaultOpen;
|
|
30398
|
+
});
|
|
30399
|
+
if (_tool) {
|
|
30400
|
+
root.contentStore.openedToolId = _tool.id;
|
|
30401
|
+
root.contentStore.hideTools = false;
|
|
30402
|
+
}
|
|
30403
|
+
}
|
|
30404
|
+
}, [root.contentStore.tools]);
|
|
30130
30405
|
if (root.contentStore.tools.length === 0) return /*#__PURE__*/jsx(Fragment, {});
|
|
30131
30406
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
30132
30407
|
children: [ToolElement && /*#__PURE__*/jsxs("div", {
|