@crystaldesign/diva-backoffice 26.13.0-beta.26 → 26.13.0-beta.28
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 +1224 -603
- package/build/types/backoffice/src/layout/Toolbar/Tools/DivaAgent/agentMount.d.ts +16 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/DivaAgent/agentMount.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/DivaAgent/index.d.ts +1 -1
- package/build/types/backoffice/src/layout/Toolbar/Tools/DivaAgent/index.d.ts.map +1 -1
- package/build/types/backoffice/src/tests/unit/ui/IDMCatalogEditor/Tables/measureUnitValidator.test.d.ts +2 -0
- package/build/types/backoffice/src/tests/unit/ui/IDMCatalogEditor/Tables/measureUnitValidator.test.d.ts.map +1 -0
- package/build/types/backoffice/src/tests/unit/ui/IDMEnricherEditor/TableEnrichment/propertySchemaParity.test.d.ts +2 -0
- package/build/types/backoffice/src/tests/unit/ui/IDMEnricherEditor/TableEnrichment/propertySchemaParity.test.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/config/readiness.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/CommonComponents/SpreadsheetWrapper/index.d.ts +5 -2
- package/build/types/backoffice/src/ui/CommonComponents/SpreadsheetWrapper/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Form/elements.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Features.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/measureUnitValidator.d.ts +10 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/measureUnitValidator.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableEnrichment/PropertyListPanel.d.ts +2 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableEnrichment/PropertyListPanel.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableEnrichment/propertyColumn.d.ts +5 -2
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableEnrichment/propertyColumn.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMGlobalPropertyDefinitionsEditor/Tables/PropertyDefinitions.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/TreeChart/DuplicateOrganization/index.d.ts +18 -0
- package/build/types/backoffice/src/ui/TreeChart/DuplicateOrganization/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/TreeChart/OrgItem/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/TreeChart/ZoomWrapper/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/TreeChart/getNewChildData.d.ts +10 -0
- package/build/types/backoffice/src/ui/TreeChart/getNewChildData.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/TreeChart/types.d.ts +7 -1
- package/build/types/backoffice/src/ui/TreeChart/types.d.ts.map +1 -1
- package/package.json +12 -12
package/build/esm/index.js
CHANGED
|
@@ -172,7 +172,7 @@ import Slider$1 from 'antd/es/slider';
|
|
|
172
172
|
import message$1 from 'antd/es/message';
|
|
173
173
|
import Popconfirm$1 from 'antd/es/popconfirm';
|
|
174
174
|
import { GoogleGenAI } from '@google/genai';
|
|
175
|
-
import { mergeToolsets,
|
|
175
|
+
import { mergeToolsets, AiCatalogChat, bridgeAutoConnectWanted, detachBridgeClients, subscribeToBridgeStatus, getBridgeStatusSnapshot, getBridgeWorkspaceSnapshot } from '@crystaldesign/diva-agent';
|
|
176
176
|
import DivaWebPlanner from '@crystaldesign/web-planner-logic';
|
|
177
177
|
import _toArray from '@babel/runtime/helpers/toArray';
|
|
178
178
|
import InboxOutlined$1 from '@ant-design/icons/lib/icons/InboxOutlined';
|
|
@@ -242,9 +242,9 @@ function plannerBasesEditedAt(path, plannerTools) {
|
|
|
242
242
|
return _toConsumableArray(new Set([packageId].concat(_toConsumableArray(keyedBy))));
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
function _createForOfIteratorHelper$
|
|
246
|
-
function _unsupportedIterableToArray$
|
|
247
|
-
function _arrayLikeToArray$
|
|
245
|
+
function _createForOfIteratorHelper$15(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$15(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; } } }; }
|
|
246
|
+
function _unsupportedIterableToArray$15(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$15(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$15(r, a) : void 0; } }
|
|
247
|
+
function _arrayLikeToArray$15(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; }
|
|
248
248
|
var MAX_HEADLESS_INSTANCES = 3;
|
|
249
249
|
/** How long the mounted view gets to rebuild its planner before a consumer builds its own. */
|
|
250
250
|
var VIEW_REBUILD_WAIT_MS = 30000;
|
|
@@ -408,7 +408,7 @@ var WebplannerInstanceStore = /*#__PURE__*/function () {
|
|
|
408
408
|
value: function flagStale(baseIds) {
|
|
409
409
|
var bases = new Set(baseIds);
|
|
410
410
|
// A creation in flight is a use in progress — it discards its result and builds again on the new data.
|
|
411
|
-
var _iterator = _createForOfIteratorHelper$
|
|
411
|
+
var _iterator = _createForOfIteratorHelper$15(bases),
|
|
412
412
|
_step;
|
|
413
413
|
try {
|
|
414
414
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -422,7 +422,7 @@ var WebplannerInstanceStore = /*#__PURE__*/function () {
|
|
|
422
422
|
_iterator.f();
|
|
423
423
|
}
|
|
424
424
|
if (this._activeKey && this._activeInstance && bases.has(baseOf(this._activeKey))) this._staleInstances.add(this._activeInstance);
|
|
425
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
425
|
+
var _iterator2 = _createForOfIteratorHelper$15(this._headless),
|
|
426
426
|
_step2;
|
|
427
427
|
try {
|
|
428
428
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -929,11 +929,11 @@ function staleBasesOf(message) {
|
|
|
929
929
|
return bases.length ? bases : undefined;
|
|
930
930
|
}
|
|
931
931
|
|
|
932
|
-
function _createForOfIteratorHelper$
|
|
933
|
-
function _unsupportedIterableToArray$
|
|
934
|
-
function _arrayLikeToArray$
|
|
935
|
-
function ownKeys$
|
|
936
|
-
function _objectSpread$
|
|
932
|
+
function _createForOfIteratorHelper$14(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$14(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; } } }; }
|
|
933
|
+
function _unsupportedIterableToArray$14(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$14(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$14(r, a) : void 0; } }
|
|
934
|
+
function _arrayLikeToArray$14(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; }
|
|
935
|
+
function ownKeys$2D(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; }
|
|
936
|
+
function _objectSpread$2D(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2D(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2D(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
937
937
|
var LOG$t = getLogger('Backoffice', 'ApplyMapping');
|
|
938
938
|
function applyMapping (_ref) {
|
|
939
939
|
var mappable = _ref.mappable,
|
|
@@ -954,10 +954,10 @@ function applyMapping (_ref) {
|
|
|
954
954
|
var newValue = {};
|
|
955
955
|
newValue[newKey] = valueToAdd;
|
|
956
956
|
if ((startValue === null || startValue === void 0 ? void 0 : startValue[newKey]) != undefined) {
|
|
957
|
-
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$
|
|
957
|
+
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$2D(_objectSpread$2D({}, startValue[newKey]), valueToAdd);else startValue[newKey] = type == 'addToSourceValue' ? startValue[newKey] + valueToAdd : valueToAdd;
|
|
958
958
|
return startValue;
|
|
959
959
|
}
|
|
960
|
-
if (newIdx == 1) return _objectSpread$
|
|
960
|
+
if (newIdx == 1) return _objectSpread$2D(_objectSpread$2D({}, startValue), newValue);
|
|
961
961
|
return _getTarget(idx + 1, keys, startValue, newValue);
|
|
962
962
|
};
|
|
963
963
|
returnValue = _getTarget(0, key.split('.'), returnValue, value);
|
|
@@ -966,7 +966,7 @@ function applyMapping (_ref) {
|
|
|
966
966
|
function meetsCondition(map) {
|
|
967
967
|
if (!map.condition) return true;
|
|
968
968
|
var value = mappingData[map.condition.field];
|
|
969
|
-
var _iterator = _createForOfIteratorHelper$
|
|
969
|
+
var _iterator = _createForOfIteratorHelper$14(map.condition.values),
|
|
970
970
|
_step;
|
|
971
971
|
try {
|
|
972
972
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -1045,7 +1045,7 @@ function applyMapping (_ref) {
|
|
|
1045
1045
|
_url.href = _url.href.replace('&' + m.targetField + '=${' + m.targetField + '}', '');
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
1048
|
+
var _iterator2 = _createForOfIteratorHelper$14(_url.searchParams.entries()),
|
|
1049
1049
|
_step2;
|
|
1050
1050
|
try {
|
|
1051
1051
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -1085,8 +1085,8 @@ function applyMapping (_ref) {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
}
|
|
1087
1087
|
|
|
1088
|
-
function ownKeys$
|
|
1089
|
-
function _objectSpread$
|
|
1088
|
+
function ownKeys$2C(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; }
|
|
1089
|
+
function _objectSpread$2C(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2C(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2C(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1090
1090
|
function parseServersideFilters (_ref) {
|
|
1091
1091
|
var baseUrl = _ref.baseUrl,
|
|
1092
1092
|
columns = _ref.columns,
|
|
@@ -1242,7 +1242,7 @@ var ALL_FIELDS_OPERATORS = ['ne', 'doesnotcontain', 'isnull'];
|
|
|
1242
1242
|
* has to check both fields. Expands such column filters (keyed by `column.field`) into one entry per field.
|
|
1243
1243
|
*/
|
|
1244
1244
|
function expandFallbackFieldFilters(filters, columns) {
|
|
1245
|
-
var expanded = _objectSpread$
|
|
1245
|
+
var expanded = _objectSpread$2C({}, filters);
|
|
1246
1246
|
// parseFilter treats group index 0 as "no OR group", so numbering starts at 1.
|
|
1247
1247
|
var orGroup = 1;
|
|
1248
1248
|
for (var _i = 0, _getLeafColumns = getLeafColumns(columns); _i < _getLeafColumns.length; _i++) {
|
|
@@ -1292,8 +1292,8 @@ function getLeafColumns(columns) {
|
|
|
1292
1292
|
});
|
|
1293
1293
|
}
|
|
1294
1294
|
|
|
1295
|
-
function ownKeys$
|
|
1296
|
-
function _objectSpread$
|
|
1295
|
+
function ownKeys$2B(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; }
|
|
1296
|
+
function _objectSpread$2B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2B(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1297
1297
|
var LOG$s = getLogger('Backoffice', 'ApiHandler');
|
|
1298
1298
|
var jp = require('jsonpath');
|
|
1299
1299
|
var _default$c = /*#__PURE__*/function () {
|
|
@@ -1474,7 +1474,7 @@ var _default$c = /*#__PURE__*/function () {
|
|
|
1474
1474
|
_context2.next = 21;
|
|
1475
1475
|
return fetch(finalUrl, {
|
|
1476
1476
|
method: this._updateMethod,
|
|
1477
|
-
headers: _objectSpread$
|
|
1477
|
+
headers: _objectSpread$2B(_objectSpread$2B({}, jwt ? {
|
|
1478
1478
|
Authorization: 'Bearer ' + jwt
|
|
1479
1479
|
} : {}), {}, {
|
|
1480
1480
|
'Content-Type': 'application/json'
|
|
@@ -1569,7 +1569,7 @@ var _default$c = /*#__PURE__*/function () {
|
|
|
1569
1569
|
rootStore: this._rootStore,
|
|
1570
1570
|
fallBackToParams: true
|
|
1571
1571
|
});
|
|
1572
|
-
if (data) createData = _objectSpread$
|
|
1572
|
+
if (data) createData = _objectSpread$2B({}, data);
|
|
1573
1573
|
} else if (data !== undefined) {
|
|
1574
1574
|
createData = applyMapping({
|
|
1575
1575
|
mappable: data,
|
|
@@ -1834,7 +1834,7 @@ var _default$c = /*#__PURE__*/function () {
|
|
|
1834
1834
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1835
1835
|
case 2:
|
|
1836
1836
|
jwt = (_this$_rootStore5 = this._rootStore) === null || _this$_rootStore5 === void 0 ? void 0 : _this$_rootStore5.dataStore.jwt;
|
|
1837
|
-
url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1837
|
+
url = filterServerSide ? parseServersideFilters(_objectSpread$2B(_objectSpread$2B({}, filterServerSide), {}, {
|
|
1838
1838
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1839
1839
|
baseUrl: this._readListUrl,
|
|
1840
1840
|
prefilter: prefilter
|
|
@@ -1854,7 +1854,7 @@ var _default$c = /*#__PURE__*/function () {
|
|
|
1854
1854
|
});
|
|
1855
1855
|
case 6:
|
|
1856
1856
|
response = _context8.sent;
|
|
1857
|
-
return _context8.abrupt("return", _objectSpread$
|
|
1857
|
+
return _context8.abrupt("return", _objectSpread$2B(_objectSpread$2B({}, response), {}, {
|
|
1858
1858
|
data: response.data.map(function (d) {
|
|
1859
1859
|
return _this2.aplyJsonPath(d, _this2._readJsonPath);
|
|
1860
1860
|
})
|
|
@@ -1878,7 +1878,7 @@ var _default$c = /*#__PURE__*/function () {
|
|
|
1878
1878
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1879
1879
|
}
|
|
1880
1880
|
(_this$_rootStore6 = this._rootStore) === null || _this$_rootStore6 === void 0 ? void 0 : _this$_rootStore6.dataStore.jwt;
|
|
1881
|
-
var url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1881
|
+
var url = filterServerSide ? parseServersideFilters(_objectSpread$2B(_objectSpread$2B({}, filterServerSide), {}, {
|
|
1882
1882
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1883
1883
|
baseUrl: this._readListUrl,
|
|
1884
1884
|
prefilter: prefilter
|
|
@@ -2808,8 +2808,8 @@ var contentItemPath = function contentItemPath(idPlaceholder) {
|
|
|
2808
2808
|
return "/contentItems/".concat(idPlaceholder);
|
|
2809
2809
|
};
|
|
2810
2810
|
|
|
2811
|
-
function ownKeys$
|
|
2812
|
-
function _objectSpread$
|
|
2811
|
+
function ownKeys$2A(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; }
|
|
2812
|
+
function _objectSpread$2A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2A(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2813
2813
|
var PROMPT_RESOLUTION_VALUE_STRINGS = promptAndAiTesterOptions.aiImageTester.resolutionOptions.map(function (o) {
|
|
2814
2814
|
return o.apiValue;
|
|
2815
2815
|
});
|
|
@@ -2852,7 +2852,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
2852
2852
|
var _i$permission;
|
|
2853
2853
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
2854
2854
|
});
|
|
2855
|
-
config = _objectSpread$
|
|
2855
|
+
config = _objectSpread$2A(_objectSpread$2A({}, config), {}, {
|
|
2856
2856
|
items: filteredItems
|
|
2857
2857
|
});
|
|
2858
2858
|
}
|
|
@@ -9991,6 +9991,74 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
9991
9991
|
value: false
|
|
9992
9992
|
}]
|
|
9993
9993
|
}, {
|
|
9994
|
+
name: ['settings', 'enableDivaAdvisor'],
|
|
9995
|
+
label: t('backoffice.form.organizationdetails.items.settings.enableDivaAdvisor'),
|
|
9996
|
+
tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
|
9997
|
+
permission: 'backoffice_admin_organizations',
|
|
9998
|
+
type: 'radio',
|
|
9999
|
+
optionType: 'button',
|
|
10000
|
+
options: [{
|
|
10001
|
+
label: t('backoffice.form.organizationdetails.items.vererbt'),
|
|
10002
|
+
value: undefined
|
|
10003
|
+
}, {
|
|
10004
|
+
label: t('backoffice.form.organizationdetails.items.ja'),
|
|
10005
|
+
value: true
|
|
10006
|
+
}, {
|
|
10007
|
+
label: t('backoffice.form.organizationdetails.items.nein'),
|
|
10008
|
+
value: false
|
|
10009
|
+
}]
|
|
10010
|
+
},
|
|
10011
|
+
// The agent and MCP licenses stay hidden until a customer role grants use:diva_agent / use:diva_agent_mcp: no
|
|
10012
|
+
// customer gets either yet, and without such a role a switch here would change nothing (internal users hold the
|
|
10013
|
+
// _internal permissions, which need no license). Re-enable both entries together with that role.
|
|
10014
|
+
// MCP must not be used by external (customer) users for now: the bridge hands guides and knowhow to their client
|
|
10015
|
+
// verbatim and lists every tool to every user, so diva-ai opens it with the internal permission only
|
|
10016
|
+
// (access.ts hasBridgeAccess) until MCP for customers has its own design.
|
|
10017
|
+
// {
|
|
10018
|
+
// name: ['settings', 'enableDivaAgent'],
|
|
10019
|
+
// label: t('backoffice.form.organizationdetails.items.settings.enableDivaAgent'),
|
|
10020
|
+
// tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
|
10021
|
+
// permission: 'backoffice_admin_organizations',
|
|
10022
|
+
// type: 'radio',
|
|
10023
|
+
// optionType: 'button',
|
|
10024
|
+
// options: [
|
|
10025
|
+
// {
|
|
10026
|
+
// label: t('backoffice.form.organizationdetails.items.vererbt'),
|
|
10027
|
+
// value: undefined,
|
|
10028
|
+
// },
|
|
10029
|
+
// {
|
|
10030
|
+
// label: t('backoffice.form.organizationdetails.items.ja'),
|
|
10031
|
+
// value: true,
|
|
10032
|
+
// },
|
|
10033
|
+
// {
|
|
10034
|
+
// label: t('backoffice.form.organizationdetails.items.nein'),
|
|
10035
|
+
// value: false,
|
|
10036
|
+
// },
|
|
10037
|
+
// ],
|
|
10038
|
+
// },
|
|
10039
|
+
// {
|
|
10040
|
+
// name: ['settings', 'enableDivaAgentMcp'],
|
|
10041
|
+
// label: t('backoffice.form.organizationdetails.items.settings.enableDivaAgentMcp'),
|
|
10042
|
+
// tabgroup: t('backoffice.form.organizationdetails.items.licenses'),
|
|
10043
|
+
// permission: 'backoffice_admin_organizations',
|
|
10044
|
+
// type: 'radio',
|
|
10045
|
+
// optionType: 'button',
|
|
10046
|
+
// options: [
|
|
10047
|
+
// {
|
|
10048
|
+
// label: t('backoffice.form.organizationdetails.items.vererbt'),
|
|
10049
|
+
// value: undefined,
|
|
10050
|
+
// },
|
|
10051
|
+
// {
|
|
10052
|
+
// label: t('backoffice.form.organizationdetails.items.ja'),
|
|
10053
|
+
// value: true,
|
|
10054
|
+
// },
|
|
10055
|
+
// {
|
|
10056
|
+
// label: t('backoffice.form.organizationdetails.items.nein'),
|
|
10057
|
+
// value: false,
|
|
10058
|
+
// },
|
|
10059
|
+
// ],
|
|
10060
|
+
// },
|
|
10061
|
+
{
|
|
9994
10062
|
name: ['settings', 'pricePreview'],
|
|
9995
10063
|
label: t('backoffice.form.organizationdetails.items.settings.pricePreview'),
|
|
9996
10064
|
permission: 'backoffice_admin_organizations',
|
|
@@ -14050,6 +14118,21 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
14050
14118
|
root === null || root === void 0 || (_root$dataStore = root.dataStore) === null || _root$dataStore === void 0 || _root$dataStore.setSelectedOrganizationId(data._id);
|
|
14051
14119
|
}
|
|
14052
14120
|
},
|
|
14121
|
+
duplicateAction: {
|
|
14122
|
+
actionType: 'Detail',
|
|
14123
|
+
label: t('backoffice.orgtree.duplicateAction.label', 'Duplizieren'),
|
|
14124
|
+
title: t('backoffice.orgtree.duplicateAction.title', 'Organisation duplizieren'),
|
|
14125
|
+
id: 'FormOrganizationDetails',
|
|
14126
|
+
type: 'Form',
|
|
14127
|
+
apiInterface: {
|
|
14128
|
+
read: '${authService}/v2/organizations/${organizationId}?inherit=false',
|
|
14129
|
+
create: '${authService}/v2/organizations/${organizationId}/duplicate?parentId=${parentId}'
|
|
14130
|
+
},
|
|
14131
|
+
callback: function callback(data) {
|
|
14132
|
+
var _root$dataStore2;
|
|
14133
|
+
root === null || root === void 0 || (_root$dataStore2 = root.dataStore) === null || _root$dataStore2 === void 0 || _root$dataStore2.setSelectedOrganizationId(data._id);
|
|
14134
|
+
}
|
|
14135
|
+
},
|
|
14053
14136
|
additionalActions: [{
|
|
14054
14137
|
actionType: 'Callback',
|
|
14055
14138
|
label: t('backoffice.orgtree.openAction'),
|
|
@@ -15674,9 +15757,9 @@ function MenuLabel (_ref) {
|
|
|
15674
15757
|
});
|
|
15675
15758
|
}
|
|
15676
15759
|
|
|
15677
|
-
function _createForOfIteratorHelper$
|
|
15678
|
-
function _unsupportedIterableToArray$
|
|
15679
|
-
function _arrayLikeToArray$
|
|
15760
|
+
function _createForOfIteratorHelper$13(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$13(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; } } }; }
|
|
15761
|
+
function _unsupportedIterableToArray$13(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$13(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$13(r, a) : void 0; } }
|
|
15762
|
+
function _arrayLikeToArray$13(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; }
|
|
15680
15763
|
function applyRule(_ref) {
|
|
15681
15764
|
var rules = _ref.rules,
|
|
15682
15765
|
data = _ref.data,
|
|
@@ -15685,7 +15768,7 @@ function applyRule(_ref) {
|
|
|
15685
15768
|
//if or we start with false until the first time some result is true
|
|
15686
15769
|
//if and we start with true until the frist time some result is false
|
|
15687
15770
|
var result = !or;
|
|
15688
|
-
var _iterator = _createForOfIteratorHelper$
|
|
15771
|
+
var _iterator = _createForOfIteratorHelper$13(rules),
|
|
15689
15772
|
_step;
|
|
15690
15773
|
try {
|
|
15691
15774
|
var _loop = function _loop() {
|
|
@@ -15757,7 +15840,7 @@ function aplyRules(_ref2) {
|
|
|
15757
15840
|
if (!data || data.length == 0) return {
|
|
15758
15841
|
applied: false
|
|
15759
15842
|
};
|
|
15760
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
15843
|
+
var _iterator2 = _createForOfIteratorHelper$13(data),
|
|
15761
15844
|
_step2;
|
|
15762
15845
|
try {
|
|
15763
15846
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -15780,19 +15863,19 @@ function aplyRules(_ref2) {
|
|
|
15780
15863
|
};
|
|
15781
15864
|
}
|
|
15782
15865
|
|
|
15783
|
-
function ownKeys$
|
|
15784
|
-
function _objectSpread$
|
|
15866
|
+
function ownKeys$2z(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; }
|
|
15867
|
+
function _objectSpread$2z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15785
15868
|
/**
|
|
15786
15869
|
* Wraps 16x16 path data from Bootstrap Icons (MIT) in the antd `Icon`, so it sizes like the antd icons and takes the
|
|
15787
15870
|
* surrounding text color (`currentColor`) in the light and the dark theme.
|
|
15788
15871
|
*/
|
|
15789
15872
|
function svgIcon(paths) {
|
|
15790
15873
|
var Svg = function Svg(props) {
|
|
15791
|
-
return /*#__PURE__*/jsx("svg", _objectSpread$
|
|
15874
|
+
return /*#__PURE__*/jsx("svg", _objectSpread$2z(_objectSpread$2z({
|
|
15792
15875
|
viewBox: "0 0 16 16"
|
|
15793
15876
|
}, props), {}, {
|
|
15794
15877
|
children: paths.map(function (path) {
|
|
15795
|
-
return /*#__PURE__*/jsx("path", _objectSpread$
|
|
15878
|
+
return /*#__PURE__*/jsx("path", _objectSpread$2z({}, path), path.d);
|
|
15796
15879
|
})
|
|
15797
15880
|
}));
|
|
15798
15881
|
};
|
|
@@ -16033,8 +16116,8 @@ function getIcon(icon) {
|
|
|
16033
16116
|
return undefined;
|
|
16034
16117
|
}
|
|
16035
16118
|
|
|
16036
|
-
function ownKeys$
|
|
16037
|
-
function _objectSpread$
|
|
16119
|
+
function ownKeys$2y(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; }
|
|
16120
|
+
function _objectSpread$2y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16038
16121
|
/**
|
|
16039
16122
|
* Browser-persisted per-tool user preferences (docked width/pin/open + popout geometry).
|
|
16040
16123
|
* Keyed by the owning toolbar's preference key: the tool id, or one shared slot key for
|
|
@@ -16045,19 +16128,19 @@ var STORAGE_PREFIX$1 = 'divaTool:preferences:';
|
|
|
16045
16128
|
|
|
16046
16129
|
/** Last known size + on-screen position of a tool's popout window. */
|
|
16047
16130
|
|
|
16048
|
-
function isFiniteNumber(value) {
|
|
16131
|
+
function isFiniteNumber$1(value) {
|
|
16049
16132
|
return typeof value === 'number' && Number.isFinite(value);
|
|
16050
16133
|
}
|
|
16051
16134
|
|
|
16052
16135
|
/** Drops fields with unexpected types so corrupt storage can never break the toolbar. */
|
|
16053
16136
|
function sanitize$1(raw) {
|
|
16054
16137
|
var prefs = {};
|
|
16055
|
-
if (isFiniteNumber(raw === null || raw === void 0 ? void 0 : raw.width)) prefs.width = raw.width;
|
|
16138
|
+
if (isFiniteNumber$1(raw === null || raw === void 0 ? void 0 : raw.width)) prefs.width = raw.width;
|
|
16056
16139
|
if (typeof (raw === null || raw === void 0 ? void 0 : raw.pinned) === 'boolean') prefs.pinned = raw.pinned;
|
|
16057
16140
|
if (typeof (raw === null || raw === void 0 ? void 0 : raw.open) === 'boolean') prefs.open = raw.open;
|
|
16058
16141
|
var bounds = raw === null || raw === void 0 ? void 0 : raw.popoutBounds;
|
|
16059
16142
|
if (bounds && ['width', 'height', 'left', 'top'].every(function (k) {
|
|
16060
|
-
return isFiniteNumber(bounds[k]);
|
|
16143
|
+
return isFiniteNumber$1(bounds[k]);
|
|
16061
16144
|
})) {
|
|
16062
16145
|
prefs.popoutBounds = {
|
|
16063
16146
|
width: bounds.width,
|
|
@@ -16080,14 +16163,14 @@ function readToolPreferences(toolId) {
|
|
|
16080
16163
|
/** Merges the given fields into the tool's stored preferences. Best-effort — preferences are non-essential. */
|
|
16081
16164
|
function updateToolPreferences(toolId, patch) {
|
|
16082
16165
|
try {
|
|
16083
|
-
localStorage.setItem(STORAGE_PREFIX$1 + toolId, JSON.stringify(_objectSpread$
|
|
16166
|
+
localStorage.setItem(STORAGE_PREFIX$1 + toolId, JSON.stringify(_objectSpread$2y(_objectSpread$2y({}, readToolPreferences(toolId)), patch)));
|
|
16084
16167
|
} catch (_unused2) {
|
|
16085
16168
|
// storage unavailable / quota exceeded
|
|
16086
16169
|
}
|
|
16087
16170
|
}
|
|
16088
16171
|
|
|
16089
|
-
function ownKeys$
|
|
16090
|
-
function _objectSpread$
|
|
16172
|
+
function ownKeys$2x(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; }
|
|
16173
|
+
function _objectSpread$2x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2x(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16091
16174
|
var DEFAULT_WIDTH = 500;
|
|
16092
16175
|
|
|
16093
16176
|
/** The toolbar lent to a temporary owner, see ToolBarStore.borrowTools. */
|
|
@@ -16214,7 +16297,7 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
16214
16297
|
// The page updates a tool it has lent out: this version comes back at the end of the loan, until then the
|
|
16215
16298
|
// tool keeps showing the borrower's data
|
|
16216
16299
|
loan.own = tool;
|
|
16217
|
-
return _objectSpread$
|
|
16300
|
+
return _objectSpread$2x(_objectSpread$2x({}, tool), {}, {
|
|
16218
16301
|
parameters: loan.parameters
|
|
16219
16302
|
});
|
|
16220
16303
|
}));
|
|
@@ -16282,7 +16365,7 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
16282
16365
|
var loan = _this4._loans.get(tool.id);
|
|
16283
16366
|
if (!loan) return tool;
|
|
16284
16367
|
loan.parameters = tool.parameters;
|
|
16285
|
-
return _objectSpread$
|
|
16368
|
+
return _objectSpread$2x(_objectSpread$2x({}, loan.own), {}, {
|
|
16286
16369
|
parameters: tool.parameters
|
|
16287
16370
|
});
|
|
16288
16371
|
}));
|
|
@@ -16820,11 +16903,11 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
16820
16903
|
}]);
|
|
16821
16904
|
}();
|
|
16822
16905
|
|
|
16823
|
-
function ownKeys$
|
|
16824
|
-
function _objectSpread$
|
|
16825
|
-
function _createForOfIteratorHelper$
|
|
16826
|
-
function _unsupportedIterableToArray$
|
|
16827
|
-
function _arrayLikeToArray$
|
|
16906
|
+
function ownKeys$2w(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; }
|
|
16907
|
+
function _objectSpread$2w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2w(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16908
|
+
function _createForOfIteratorHelper$12(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$12(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; } } }; }
|
|
16909
|
+
function _unsupportedIterableToArray$12(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$12(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$12(r, a) : void 0; } }
|
|
16910
|
+
function _arrayLikeToArray$12(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; }
|
|
16828
16911
|
var _default$6 = /*#__PURE__*/function () {
|
|
16829
16912
|
function _default(root) {
|
|
16830
16913
|
_classCallCheck(this, _default);
|
|
@@ -16866,7 +16949,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
16866
16949
|
var initKeys = this.root.navigationState.path == '' ? [] : this.keysFormPath(this._menu, this.root.navigationState.path);
|
|
16867
16950
|
var checkedKeys = [];
|
|
16868
16951
|
var currentMenu = this._menu;
|
|
16869
|
-
var _iterator = _createForOfIteratorHelper$
|
|
16952
|
+
var _iterator = _createForOfIteratorHelper$12(initKeys),
|
|
16870
16953
|
_step;
|
|
16871
16954
|
try {
|
|
16872
16955
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -16875,7 +16958,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
16875
16958
|
var level = currentMenu;
|
|
16876
16959
|
var lastResolved = void 0;
|
|
16877
16960
|
var chainOk = true;
|
|
16878
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
16961
|
+
var _iterator2 = _createForOfIteratorHelper$12(key),
|
|
16879
16962
|
_step2;
|
|
16880
16963
|
try {
|
|
16881
16964
|
var _loop = function _loop() {
|
|
@@ -16970,7 +17053,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
16970
17053
|
if (index >= 0) {
|
|
16971
17054
|
this._additionalMenuElements[index] = {
|
|
16972
17055
|
key: key,
|
|
16973
|
-
element: _objectSpread$
|
|
17056
|
+
element: _objectSpread$2w(_objectSpread$2w({}, this._additionalMenuElements[index].element), {}, {
|
|
16974
17057
|
items: items,
|
|
16975
17058
|
selected: selected
|
|
16976
17059
|
})
|
|
@@ -17046,7 +17129,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
17046
17129
|
// A host with its own navigation has no menu columns to keep in sync (see `RootStore.menu`).
|
|
17047
17130
|
if (this._menuElement1) {
|
|
17048
17131
|
var _this$_menu$find;
|
|
17049
|
-
this._menuElement1 = _objectSpread$
|
|
17132
|
+
this._menuElement1 = _objectSpread$2w(_objectSpread$2w({}, this._menuElement1), {}, {
|
|
17050
17133
|
selected: this._selectedMenuKeys[0]
|
|
17051
17134
|
});
|
|
17052
17135
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -17336,7 +17419,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
17336
17419
|
}
|
|
17337
17420
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
17338
17421
|
}).map(function (item) {
|
|
17339
|
-
return _objectSpread$
|
|
17422
|
+
return _objectSpread$2w(_objectSpread$2w({}, item), {}, {
|
|
17340
17423
|
items: item.items ? _this5.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
17341
17424
|
subMenu: item.subMenu ? _this5.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
17342
17425
|
});
|
|
@@ -18136,9 +18219,9 @@ var _default$3 = /*#__PURE__*/function () {
|
|
|
18136
18219
|
}]);
|
|
18137
18220
|
}();
|
|
18138
18221
|
|
|
18139
|
-
function _createForOfIteratorHelper$
|
|
18140
|
-
function _unsupportedIterableToArray$
|
|
18141
|
-
function _arrayLikeToArray$
|
|
18222
|
+
function _createForOfIteratorHelper$11(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$11(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; } } }; }
|
|
18223
|
+
function _unsupportedIterableToArray$11(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$11(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$11(r, a) : void 0; } }
|
|
18224
|
+
function _arrayLikeToArray$11(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; }
|
|
18142
18225
|
var LOG$r = getLogger('Backoffice', 'DownloadStore');
|
|
18143
18226
|
var DownloadStore = /*#__PURE__*/function () {
|
|
18144
18227
|
function DownloadStore(_rootStore) {
|
|
@@ -18166,7 +18249,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
18166
18249
|
_context2.next = 23;
|
|
18167
18250
|
break;
|
|
18168
18251
|
}
|
|
18169
|
-
_iterator = _createForOfIteratorHelper$
|
|
18252
|
+
_iterator = _createForOfIteratorHelper$11(action.download);
|
|
18170
18253
|
_context2.prev = 8;
|
|
18171
18254
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
18172
18255
|
var _download$params, _data$fileFormat, _data$fileUrl;
|
|
@@ -18562,7 +18645,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
18562
18645
|
successCount = 0;
|
|
18563
18646
|
failedCount = 0;
|
|
18564
18647
|
promises = [];
|
|
18565
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
18648
|
+
_iterator2 = _createForOfIteratorHelper$11(props.data);
|
|
18566
18649
|
_context7.prev = 5;
|
|
18567
18650
|
_iterator2.s();
|
|
18568
18651
|
case 7:
|
|
@@ -18705,8 +18788,8 @@ var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
18705
18788
|
return _createClass(_default);
|
|
18706
18789
|
}(_default$c);
|
|
18707
18790
|
|
|
18708
|
-
function ownKeys$
|
|
18709
|
-
function _objectSpread$
|
|
18791
|
+
function ownKeys$2v(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; }
|
|
18792
|
+
function _objectSpread$2v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18710
18793
|
var LOG$q = getLogger('Backoffice', 'ContextStore');
|
|
18711
18794
|
|
|
18712
18795
|
/**
|
|
@@ -18748,7 +18831,7 @@ var ContextStore = /*#__PURE__*/function () {
|
|
|
18748
18831
|
key: "updateContext",
|
|
18749
18832
|
value: function updateContext(contextId, updates) {
|
|
18750
18833
|
var currentState = this.contexts.get(contextId) || {};
|
|
18751
|
-
var updatedState = _objectSpread$
|
|
18834
|
+
var updatedState = _objectSpread$2v(_objectSpread$2v({}, currentState), updates);
|
|
18752
18835
|
this.contexts.set(contextId, updatedState);
|
|
18753
18836
|
LOG$q.debug("Updated context ".concat(contextId), {
|
|
18754
18837
|
updatedState: updatedState
|
|
@@ -18764,8 +18847,8 @@ var ContextStore = /*#__PURE__*/function () {
|
|
|
18764
18847
|
}]);
|
|
18765
18848
|
}();
|
|
18766
18849
|
|
|
18767
|
-
function ownKeys$
|
|
18768
|
-
function _objectSpread$
|
|
18850
|
+
function ownKeys$2u(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; }
|
|
18851
|
+
function _objectSpread$2u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2u(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18769
18852
|
|
|
18770
18853
|
/**
|
|
18771
18854
|
* An operation a table offers beyond cell edits - adding a matrix column, a server-side bulk removal. The VIEW
|
|
@@ -18854,7 +18937,7 @@ var GridRegistry = /*#__PURE__*/function () {
|
|
|
18854
18937
|
key: "register",
|
|
18855
18938
|
value: function register(entry) {
|
|
18856
18939
|
var id = ++this._seq;
|
|
18857
|
-
this._entries = [].concat(_toConsumableArray(this._entries), [_objectSpread$
|
|
18940
|
+
this._entries = [].concat(_toConsumableArray(this._entries), [_objectSpread$2u({
|
|
18858
18941
|
id: id
|
|
18859
18942
|
}, entry)]);
|
|
18860
18943
|
return id;
|
|
@@ -19146,8 +19229,8 @@ function useBorrowedTools(tools) {
|
|
|
19146
19229
|
}, []);
|
|
19147
19230
|
}
|
|
19148
19231
|
|
|
19149
|
-
function ownKeys$
|
|
19150
|
-
function _objectSpread$
|
|
19232
|
+
function ownKeys$2t(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; }
|
|
19233
|
+
function _objectSpread$2t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2t(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19151
19234
|
function fetchFileData(_x) {
|
|
19152
19235
|
return _fetchFileData.apply(this, arguments);
|
|
19153
19236
|
}
|
|
@@ -19307,7 +19390,7 @@ function _uploadMediaItem() {
|
|
|
19307
19390
|
_context4.next = 4;
|
|
19308
19391
|
return fetch("".concat(root, "/v1/assets/uploads"), {
|
|
19309
19392
|
method: 'POST',
|
|
19310
|
-
headers: _objectSpread$
|
|
19393
|
+
headers: _objectSpread$2t({
|
|
19311
19394
|
'Content-Type': 'application/json'
|
|
19312
19395
|
}, auth),
|
|
19313
19396
|
body: JSON.stringify({
|
|
@@ -19373,7 +19456,7 @@ function _uploadMediaItem() {
|
|
|
19373
19456
|
_context4.next = 31;
|
|
19374
19457
|
return fetch("".concat(root, "/v1/assets/uploads/complete"), {
|
|
19375
19458
|
method: 'POST',
|
|
19376
|
-
headers: _objectSpread$
|
|
19459
|
+
headers: _objectSpread$2t({
|
|
19377
19460
|
'Content-Type': 'application/json'
|
|
19378
19461
|
}, auth),
|
|
19379
19462
|
body: JSON.stringify({
|
|
@@ -19418,7 +19501,7 @@ function _uploadMediaItem() {
|
|
|
19418
19501
|
refUrl = (_ref$url = ref.url) !== null && _ref$url !== void 0 ? _ref$url : ref.cdnUrl;
|
|
19419
19502
|
return _context4.abrupt("return", {
|
|
19420
19503
|
_id: mediaItem._id,
|
|
19421
|
-
ref: _objectSpread$
|
|
19504
|
+
ref: _objectSpread$2t(_objectSpread$2t({}, ref), {}, {
|
|
19422
19505
|
_id: ref._id,
|
|
19423
19506
|
url: refUrl
|
|
19424
19507
|
})
|
|
@@ -19679,9 +19762,9 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
19679
19762
|
}]);
|
|
19680
19763
|
}();
|
|
19681
19764
|
|
|
19682
|
-
function _createForOfIteratorHelper
|
|
19683
|
-
function _unsupportedIterableToArray
|
|
19684
|
-
function _arrayLikeToArray
|
|
19765
|
+
function _createForOfIteratorHelper$10(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$10(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; } } }; }
|
|
19766
|
+
function _unsupportedIterableToArray$10(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$10(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$10(r, a) : void 0; } }
|
|
19767
|
+
function _arrayLikeToArray$10(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; }
|
|
19685
19768
|
function processFormMediaBeforeSave(_x, _x2, _x3) {
|
|
19686
19769
|
return _processFormMediaBeforeSave.apply(this, arguments);
|
|
19687
19770
|
}
|
|
@@ -19699,7 +19782,7 @@ function _processFormMediaBeforeSave() {
|
|
|
19699
19782
|
_context.next = 3;
|
|
19700
19783
|
return processItems(data, items, root);
|
|
19701
19784
|
case 3:
|
|
19702
|
-
_iterator = _createForOfIteratorHelper
|
|
19785
|
+
_iterator = _createForOfIteratorHelper$10(removedMedias);
|
|
19703
19786
|
_context.prev = 4;
|
|
19704
19787
|
_iterator.s();
|
|
19705
19788
|
case 6:
|
|
@@ -19741,7 +19824,7 @@ function _processItems() {
|
|
|
19741
19824
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
19742
19825
|
while (1) switch (_context2.prev = _context2.next) {
|
|
19743
19826
|
case 0:
|
|
19744
|
-
_iterator2 = _createForOfIteratorHelper
|
|
19827
|
+
_iterator2 = _createForOfIteratorHelper$10(items);
|
|
19745
19828
|
_context2.prev = 1;
|
|
19746
19829
|
_iterator2.s();
|
|
19747
19830
|
case 3:
|
|
@@ -19863,11 +19946,11 @@ function getData$1(id, data) {
|
|
|
19863
19946
|
}
|
|
19864
19947
|
}
|
|
19865
19948
|
|
|
19866
|
-
function _createForOfIteratorHelper
|
|
19867
|
-
function _unsupportedIterableToArray
|
|
19868
|
-
function _arrayLikeToArray
|
|
19869
|
-
function ownKeys$
|
|
19870
|
-
function _objectSpread$
|
|
19949
|
+
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; } } }; }
|
|
19950
|
+
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; } }
|
|
19951
|
+
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; }
|
|
19952
|
+
function ownKeys$2s(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; }
|
|
19953
|
+
function _objectSpread$2s(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2s(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2s(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19871
19954
|
function toNamePath$2(name) {
|
|
19872
19955
|
if (name === undefined || name === '') return [];
|
|
19873
19956
|
return Array.isArray(name) ? name : [name];
|
|
@@ -19938,7 +20021,7 @@ function useFormData (_ref) {
|
|
|
19938
20021
|
var _useMemo = useMemo(function () {
|
|
19939
20022
|
setCanSave === null || setCanSave === void 0 || setCanSave(true);
|
|
19940
20023
|
var baseConfiguration = configurationOverride !== null && configurationOverride !== void 0 ? configurationOverride : root.configurationStore.getConfiguration(id, 'Form');
|
|
19941
|
-
var configuration = _objectSpread$
|
|
20024
|
+
var configuration = _objectSpread$2s(_objectSpread$2s({}, baseConfiguration), {}, {
|
|
19942
20025
|
apiInterface: apiInterface !== null && apiInterface !== void 0 ? apiInterface : baseConfiguration.apiInterface
|
|
19943
20026
|
});
|
|
19944
20027
|
var c = {
|
|
@@ -19997,7 +20080,7 @@ function useFormData (_ref) {
|
|
|
19997
20080
|
setSelectedItems = _useState14[1];
|
|
19998
20081
|
var _onLoadFields = function onLoadFields(data) {
|
|
19999
20082
|
var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : selectedItems;
|
|
20000
|
-
var _iterator = _createForOfIteratorHelper
|
|
20083
|
+
var _iterator = _createForOfIteratorHelper$$(items),
|
|
20001
20084
|
_step;
|
|
20002
20085
|
try {
|
|
20003
20086
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -20038,7 +20121,7 @@ function useFormData (_ref) {
|
|
|
20038
20121
|
multipleEditingData = inboundData;
|
|
20039
20122
|
}
|
|
20040
20123
|
return {
|
|
20041
|
-
loadedData: _onLoadFields(_objectSpread$
|
|
20124
|
+
loadedData: _onLoadFields(_objectSpread$2s({}, dt)),
|
|
20042
20125
|
multipleEditingData: multipleEditingData
|
|
20043
20126
|
};
|
|
20044
20127
|
}, [inboundData]),
|
|
@@ -20065,7 +20148,7 @@ function useFormData (_ref) {
|
|
|
20065
20148
|
setFieldErrors = _useState20[1];
|
|
20066
20149
|
useEffect(function () {
|
|
20067
20150
|
var _ref3, _loadedData$_id2;
|
|
20068
|
-
setState(_objectSpread$
|
|
20151
|
+
setState(_objectSpread$2s(_objectSpread$2s({}, state), {}, {
|
|
20069
20152
|
data: loadedData,
|
|
20070
20153
|
origData: JSON.parse(JSON.stringify((_ref3 = storedData !== null && storedData !== void 0 ? storedData : inboundData) !== null && _ref3 !== void 0 ? _ref3 : {})),
|
|
20071
20154
|
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),
|
|
@@ -20178,7 +20261,7 @@ function useFormData (_ref) {
|
|
|
20178
20261
|
root.actions.toggleLoading('saving_form');
|
|
20179
20262
|
_context2.prev = 4;
|
|
20180
20263
|
_context2.next = 7;
|
|
20181
|
-
return setDynamicFields(_objectSpread$
|
|
20264
|
+
return setDynamicFields(_objectSpread$2s({}, state.data), newData);
|
|
20182
20265
|
case 7:
|
|
20183
20266
|
newData = _context2.sent;
|
|
20184
20267
|
_context2.next = 10;
|
|
@@ -20193,7 +20276,7 @@ function useFormData (_ref) {
|
|
|
20193
20276
|
root.actions.toggleLoading('saving_form');
|
|
20194
20277
|
throw _context2.t0;
|
|
20195
20278
|
case 17:
|
|
20196
|
-
setState(_objectSpread$
|
|
20279
|
+
setState(_objectSpread$2s(_objectSpread$2s({}, state), {}, {
|
|
20197
20280
|
loading: true
|
|
20198
20281
|
}));
|
|
20199
20282
|
finalData = state.data;
|
|
@@ -20246,14 +20329,14 @@ function useFormData (_ref) {
|
|
|
20246
20329
|
_context2.next = 47;
|
|
20247
20330
|
break;
|
|
20248
20331
|
}
|
|
20249
|
-
setFieldErrors(_objectSpread$
|
|
20332
|
+
setFieldErrors(_objectSpread$2s(_objectSpread$2s({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
20250
20333
|
return _context2.abrupt("return", undefined);
|
|
20251
20334
|
case 47:
|
|
20252
20335
|
throw _context2.t1;
|
|
20253
20336
|
case 48:
|
|
20254
20337
|
_context2.prev = 48;
|
|
20255
20338
|
root.actions.toggleLoading('saving_form');
|
|
20256
|
-
setState(_objectSpread$
|
|
20339
|
+
setState(_objectSpread$2s(_objectSpread$2s({}, state), {}, {
|
|
20257
20340
|
data: finalData,
|
|
20258
20341
|
loading: false
|
|
20259
20342
|
}));
|
|
@@ -20309,18 +20392,18 @@ function useFormData (_ref) {
|
|
|
20309
20392
|
var data = d !== null && d !== void 0 ? d : mergeWith(cloneDeep(state.data), formValues, mergeFormWithCustomizer);
|
|
20310
20393
|
if (id) {
|
|
20311
20394
|
setFieldInObject(id, data, value);
|
|
20312
|
-
var newFieldErrors = _objectSpread$
|
|
20395
|
+
var newFieldErrors = _objectSpread$2s({}, fieldErrors);
|
|
20313
20396
|
delete newFieldErrors[id.toString()];
|
|
20314
20397
|
setFieldErrors(newFieldErrors);
|
|
20315
20398
|
}
|
|
20316
|
-
setState(_objectSpread$
|
|
20399
|
+
setState(_objectSpread$2s(_objectSpread$2s({}, state), {}, {
|
|
20317
20400
|
data: data
|
|
20318
20401
|
}));
|
|
20319
20402
|
return data;
|
|
20320
20403
|
};
|
|
20321
20404
|
var getItem = function getItem(id) {
|
|
20322
20405
|
var items = selectedItems;
|
|
20323
|
-
var _iterator2 = _createForOfIteratorHelper
|
|
20406
|
+
var _iterator2 = _createForOfIteratorHelper$$(items),
|
|
20324
20407
|
_step2;
|
|
20325
20408
|
try {
|
|
20326
20409
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -20369,10 +20452,10 @@ function useFormData (_ref) {
|
|
|
20369
20452
|
} else {
|
|
20370
20453
|
data[name] = val;
|
|
20371
20454
|
}
|
|
20372
|
-
if (configuration.itemSelectorReset) setState(_objectSpread$
|
|
20455
|
+
if (configuration.itemSelectorReset) setState(_objectSpread$2s(_objectSpread$2s({}, state), {}, {
|
|
20373
20456
|
data: data
|
|
20374
|
-
}));else setState(_objectSpread$
|
|
20375
|
-
data: _objectSpread$
|
|
20457
|
+
}));else setState(_objectSpread$2s(_objectSpread$2s({}, state), {}, {
|
|
20458
|
+
data: _objectSpread$2s(_objectSpread$2s({}, state.data), data)
|
|
20376
20459
|
}));
|
|
20377
20460
|
if (Array.isArray(configuration.items[selectorIdx[0]]) && Array.isArray(configuration.items[selectorIdx[0]][selectorIdx[1]])) {
|
|
20378
20461
|
setSelectedItemsIndex([selectorIdx[0], selectorIdx[1]]);
|
|
@@ -20405,12 +20488,12 @@ function useFormData (_ref) {
|
|
|
20405
20488
|
var val = _ref8.value;
|
|
20406
20489
|
if (value === val) {
|
|
20407
20490
|
if (configuration.itemSelectorReset) {
|
|
20408
|
-
setState(_objectSpread$
|
|
20491
|
+
setState(_objectSpread$2s(_objectSpread$2s({}, state), {}, {
|
|
20409
20492
|
data: _defineProperty({}, name, val)
|
|
20410
20493
|
}));
|
|
20411
20494
|
} else {
|
|
20412
|
-
setState(_objectSpread$
|
|
20413
|
-
data: _objectSpread$
|
|
20495
|
+
setState(_objectSpread$2s(_objectSpread$2s({}, state), {}, {
|
|
20496
|
+
data: _objectSpread$2s(_objectSpread$2s({}, state.data), {}, _defineProperty({}, name, val))
|
|
20414
20497
|
}));
|
|
20415
20498
|
}
|
|
20416
20499
|
setSelectedItemsIndex([selectedItemsIndex[0], idx]);
|
|
@@ -20496,7 +20579,7 @@ function useFormData (_ref) {
|
|
|
20496
20579
|
return _getDynamicValue.apply(this, arguments);
|
|
20497
20580
|
};
|
|
20498
20581
|
items = selectedItems !== null && selectedItems !== void 0 ? selectedItems : configuration.items;
|
|
20499
|
-
_iterator4 = _createForOfIteratorHelper
|
|
20582
|
+
_iterator4 = _createForOfIteratorHelper$$(items);
|
|
20500
20583
|
_context6.prev = 4;
|
|
20501
20584
|
_iterator4.s();
|
|
20502
20585
|
case 6:
|
|
@@ -20582,7 +20665,7 @@ function useFormData (_ref) {
|
|
|
20582
20665
|
var _configuration$tools;
|
|
20583
20666
|
return (_configuration$tools = configuration.tools) === null || _configuration$tools === void 0 ? void 0 : _configuration$tools.map(function (tool) {
|
|
20584
20667
|
var _tool$defaultOpen;
|
|
20585
|
-
return _objectSpread$
|
|
20668
|
+
return _objectSpread$2s(_objectSpread$2s({}, tool), {}, {
|
|
20586
20669
|
parameters: {
|
|
20587
20670
|
data: state.data,
|
|
20588
20671
|
formInstance: form,
|
|
@@ -20604,7 +20687,7 @@ function useFormData (_ref) {
|
|
|
20604
20687
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
20605
20688
|
while (1) switch (_context3.prev = _context3.next) {
|
|
20606
20689
|
case 0:
|
|
20607
|
-
_iterator3 = _createForOfIteratorHelper
|
|
20690
|
+
_iterator3 = _createForOfIteratorHelper$$(items);
|
|
20608
20691
|
_context3.prev = 1;
|
|
20609
20692
|
_iterator3.s();
|
|
20610
20693
|
case 3:
|
|
@@ -20730,7 +20813,7 @@ function useFormData (_ref) {
|
|
|
20730
20813
|
}
|
|
20731
20814
|
});
|
|
20732
20815
|
}
|
|
20733
|
-
return _objectSpread$
|
|
20816
|
+
return _objectSpread$2s(_objectSpread$2s({}, state), {}, {
|
|
20734
20817
|
getIsHidden: getIsHidden,
|
|
20735
20818
|
setUsedPreset: setUsedPreset,
|
|
20736
20819
|
configuration: configuration,
|
|
@@ -20848,8 +20931,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
20848
20931
|
};
|
|
20849
20932
|
|
|
20850
20933
|
var _excluded$h = ["key", "name"];
|
|
20851
|
-
function ownKeys$
|
|
20852
|
-
function _objectSpread$
|
|
20934
|
+
function ownKeys$2r(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; }
|
|
20935
|
+
function _objectSpread$2r(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2r(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20853
20936
|
var FormList$2 = function FormList(_ref) {
|
|
20854
20937
|
var value = _ref.value,
|
|
20855
20938
|
item = _ref.item,
|
|
@@ -20914,7 +20997,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
20914
20997
|
var n = [name].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate && postFixName ? Array.isArray(postFixName) ? postFixName : [postFixName] : []));
|
|
20915
20998
|
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
20916
20999
|
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
20917
|
-
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$
|
|
21000
|
+
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$2r(_objectSpread$2r({}, restField), {}, {
|
|
20918
21001
|
id: n.join(),
|
|
20919
21002
|
key: n.join(),
|
|
20920
21003
|
name: n,
|
|
@@ -20926,7 +21009,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
20926
21009
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
20927
21010
|
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
20928
21011
|
hidden: hidden
|
|
20929
|
-
}), getElement(_objectSpread$
|
|
21012
|
+
}), getElement(_objectSpread$2r(_objectSpread$2r({}, i), {}, {
|
|
20930
21013
|
name: n
|
|
20931
21014
|
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
20932
21015
|
})
|
|
@@ -21160,8 +21243,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
21160
21243
|
var css_248z$1i = ".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";
|
|
21161
21244
|
styleInject(css_248z$1i);
|
|
21162
21245
|
|
|
21163
|
-
function ownKeys$
|
|
21164
|
-
function _objectSpread$
|
|
21246
|
+
function ownKeys$2q(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; }
|
|
21247
|
+
function _objectSpread$2q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21165
21248
|
var SubTitle = function SubTitle(_ref) {
|
|
21166
21249
|
var _item$label, _item$orientation, _item$buttonIds;
|
|
21167
21250
|
var item = _ref.item,
|
|
@@ -21171,7 +21254,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
21171
21254
|
var title = (_item$label = item.label) !== null && _item$label !== void 0 ? _item$label : Array.isArray(item.name) ? item.name[0].toString() : item.name;
|
|
21172
21255
|
return /*#__PURE__*/jsx(Divider, {
|
|
21173
21256
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'horizontal',
|
|
21174
|
-
style: _objectSpread$
|
|
21257
|
+
style: _objectSpread$2q({}, item.style),
|
|
21175
21258
|
children: /*#__PURE__*/jsxs("div", {
|
|
21176
21259
|
className: wrapper$a,
|
|
21177
21260
|
children: [t(title, title), ((_item$buttonIds = item.buttonIds) === null || _item$buttonIds === void 0 ? void 0 : _item$buttonIds.length) && item.buttonIds.map(function (b) {
|
|
@@ -21262,15 +21345,15 @@ var InputComponent = function InputComponent(_ref, ref) {
|
|
|
21262
21345
|
};
|
|
21263
21346
|
var InputComponent$1 = observer(/*#__PURE__*/React.forwardRef(InputComponent));
|
|
21264
21347
|
|
|
21265
|
-
function _createForOfIteratorHelper$
|
|
21266
|
-
function _unsupportedIterableToArray$
|
|
21267
|
-
function _arrayLikeToArray$
|
|
21348
|
+
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; } } }; }
|
|
21349
|
+
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; } }
|
|
21350
|
+
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; }
|
|
21268
21351
|
function getCombinedValues(data, pattern) {
|
|
21269
21352
|
if (!pattern || !data) {
|
|
21270
21353
|
return data;
|
|
21271
21354
|
}
|
|
21272
21355
|
var value = pattern;
|
|
21273
|
-
var _iterator = _createForOfIteratorHelper$
|
|
21356
|
+
var _iterator = _createForOfIteratorHelper$_(pattern.matchAll(/\$\{(.*?)\}/g)),
|
|
21274
21357
|
_step;
|
|
21275
21358
|
try {
|
|
21276
21359
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -21465,8 +21548,8 @@ var css_248z$1h = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;
|
|
|
21465
21548
|
styleInject(css_248z$1h);
|
|
21466
21549
|
|
|
21467
21550
|
var _excluded$g = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title", "sharedState"];
|
|
21468
|
-
function ownKeys$
|
|
21469
|
-
function _objectSpread$
|
|
21551
|
+
function ownKeys$2p(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; }
|
|
21552
|
+
function _objectSpread$2p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2p(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21470
21553
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
21471
21554
|
var apiInterface = _ref.apiInterface,
|
|
21472
21555
|
selectMapping = _ref.selectMapping,
|
|
@@ -21493,7 +21576,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
|
21493
21576
|
return /*#__PURE__*/jsxs("div", {
|
|
21494
21577
|
ref: ref,
|
|
21495
21578
|
className: classNames(title ? wrapper$9 : undefined),
|
|
21496
|
-
children: [title, /*#__PURE__*/jsx(Select, _objectSpread$
|
|
21579
|
+
children: [title, /*#__PURE__*/jsx(Select, _objectSpread$2p(_objectSpread$2p({}, selectProps), {}, {
|
|
21497
21580
|
showSearch: search,
|
|
21498
21581
|
loading: state.loading,
|
|
21499
21582
|
options: state.options,
|
|
@@ -22110,8 +22193,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
22110
22193
|
}]);
|
|
22111
22194
|
}(_default$c);
|
|
22112
22195
|
|
|
22113
|
-
function ownKeys$
|
|
22114
|
-
function _objectSpread$
|
|
22196
|
+
function ownKeys$2o(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; }
|
|
22197
|
+
function _objectSpread$2o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22115
22198
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
22116
22199
|
function useSelectClientRelationCatalog (_ref) {
|
|
22117
22200
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -22280,7 +22363,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
22280
22363
|
case 22:
|
|
22281
22364
|
supplierData = _context2.sent;
|
|
22282
22365
|
case 23:
|
|
22283
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
22366
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$2o(_objectSpread$2o({}, _selectedSupplier), {}, {
|
|
22284
22367
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
22285
22368
|
}), supplierData);
|
|
22286
22369
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -22510,11 +22593,11 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
22510
22593
|
});
|
|
22511
22594
|
}
|
|
22512
22595
|
|
|
22513
|
-
function _createForOfIteratorHelper$
|
|
22514
|
-
function _unsupportedIterableToArray$
|
|
22515
|
-
function _arrayLikeToArray$
|
|
22516
|
-
function ownKeys$
|
|
22517
|
-
function _objectSpread$
|
|
22596
|
+
function _createForOfIteratorHelper$Z(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$Z(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; } } }; }
|
|
22597
|
+
function _unsupportedIterableToArray$Z(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$Z(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$Z(r, a) : void 0; } }
|
|
22598
|
+
function _arrayLikeToArray$Z(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; }
|
|
22599
|
+
function ownKeys$2n(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; }
|
|
22600
|
+
function _objectSpread$2n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2n(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22518
22601
|
function useSelectData (_ref) {
|
|
22519
22602
|
var data = _ref.data,
|
|
22520
22603
|
onChange = _ref.onChange,
|
|
@@ -22768,7 +22851,7 @@ function useSelectData (_ref) {
|
|
|
22768
22851
|
}
|
|
22769
22852
|
emails = initData;
|
|
22770
22853
|
optionByValue = new Map();
|
|
22771
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
22854
|
+
_iterator2 = _createForOfIteratorHelper$Z(emails);
|
|
22772
22855
|
_context4.prev = 12;
|
|
22773
22856
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
22774
22857
|
var email, list, opt;
|
|
@@ -22835,7 +22918,7 @@ function useSelectData (_ref) {
|
|
|
22835
22918
|
}
|
|
22836
22919
|
keys = initData;
|
|
22837
22920
|
_optionByValue = new Map();
|
|
22838
|
-
_iterator3 = _createForOfIteratorHelper$
|
|
22921
|
+
_iterator3 = _createForOfIteratorHelper$Z(keys);
|
|
22839
22922
|
_context4.prev = 35;
|
|
22840
22923
|
_loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2() {
|
|
22841
22924
|
var key, list, opt;
|
|
@@ -22986,7 +23069,7 @@ function useSelectData (_ref) {
|
|
|
22986
23069
|
setFetching(true);
|
|
22987
23070
|
serverSideParams = {
|
|
22988
23071
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? (_selectMapping$search = selectMapping.searchField) === null || _selectMapping$search === void 0 ? void 0 : _selectMapping$search.reduce(function (filter, field) {
|
|
22989
|
-
return _objectSpread$
|
|
23072
|
+
return _objectSpread$2n(_objectSpread$2n({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
22990
23073
|
}, {}) : {
|
|
22991
23074
|
_id: [value, 'contains']
|
|
22992
23075
|
},
|
|
@@ -23063,7 +23146,7 @@ function useSelectData (_ref) {
|
|
|
23063
23146
|
var verifySelection = function verifySelection(opt) {
|
|
23064
23147
|
if (disabledConfig == undefined) return [];
|
|
23065
23148
|
var _missingFields = [];
|
|
23066
|
-
var _iterator = _createForOfIteratorHelper$
|
|
23149
|
+
var _iterator = _createForOfIteratorHelper$Z(disabledConfig),
|
|
23067
23150
|
_step;
|
|
23068
23151
|
try {
|
|
23069
23152
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -23463,8 +23546,8 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
23463
23546
|
var css_248z$1e = ".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";
|
|
23464
23547
|
styleInject(css_248z$1e);
|
|
23465
23548
|
|
|
23466
|
-
function ownKeys$
|
|
23467
|
-
function _objectSpread$
|
|
23549
|
+
function ownKeys$2m(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; }
|
|
23550
|
+
function _objectSpread$2m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23468
23551
|
var LOG$n = getLogger('Backoffice', 'Translation Form');
|
|
23469
23552
|
|
|
23470
23553
|
/** The languages a translation field edits - also the ones the content item preview offers. */
|
|
@@ -23606,7 +23689,7 @@ function useTranslationHook (item, state) {
|
|
|
23606
23689
|
case 0:
|
|
23607
23690
|
_context2.next = 2;
|
|
23608
23691
|
return apiHandler.create({
|
|
23609
|
-
locales: _objectSpread$
|
|
23692
|
+
locales: _objectSpread$2m({
|
|
23610
23693
|
de: {},
|
|
23611
23694
|
it: {},
|
|
23612
23695
|
fr: {},
|
|
@@ -23655,8 +23738,8 @@ function useTranslationHook (item, state) {
|
|
|
23655
23738
|
};
|
|
23656
23739
|
}
|
|
23657
23740
|
|
|
23658
|
-
function ownKeys$
|
|
23659
|
-
function _objectSpread$
|
|
23741
|
+
function ownKeys$2l(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; }
|
|
23742
|
+
function _objectSpread$2l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23660
23743
|
var HiddenFormField = function HiddenFormField() {
|
|
23661
23744
|
return null;
|
|
23662
23745
|
};
|
|
@@ -23722,7 +23805,7 @@ var Translation = function Translation(_ref) {
|
|
|
23722
23805
|
}, key);
|
|
23723
23806
|
}
|
|
23724
23807
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
23725
|
-
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$
|
|
23808
|
+
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$2l(_objectSpread$2l({}, i), {}, {
|
|
23726
23809
|
name: n
|
|
23727
23810
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden, currentLang, newFormName) : /*#__PURE__*/jsx(Form$2.Item, {
|
|
23728
23811
|
id: idx.toString(),
|
|
@@ -23735,7 +23818,7 @@ var Translation = function Translation(_ref) {
|
|
|
23735
23818
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
23736
23819
|
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
23737
23820
|
hidden: hidden,
|
|
23738
|
-
children: getElement(_objectSpread$
|
|
23821
|
+
children: getElement(_objectSpread$2l(_objectSpread$2l({}, i), {}, {
|
|
23739
23822
|
name: n
|
|
23740
23823
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden)
|
|
23741
23824
|
})
|
|
@@ -24222,8 +24305,8 @@ function deltaFromColors(mainHex, valueHex) {
|
|
|
24222
24305
|
return avg;
|
|
24223
24306
|
}
|
|
24224
24307
|
|
|
24225
|
-
function ownKeys$
|
|
24226
|
-
function _objectSpread$
|
|
24308
|
+
function ownKeys$2k(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; }
|
|
24309
|
+
function _objectSpread$2k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24227
24310
|
function FormSlider(_ref) {
|
|
24228
24311
|
var item = _ref.item,
|
|
24229
24312
|
disabled = _ref.disabled,
|
|
@@ -24257,7 +24340,7 @@ function FormSlider(_ref) {
|
|
|
24257
24340
|
children: t('backoffice.form.slider.apiDefaultHint', {
|
|
24258
24341
|
defaultValue: 'Not set (Gemini API default, typically 1). Move the slider to set.'
|
|
24259
24342
|
})
|
|
24260
|
-
}) : null, /*#__PURE__*/jsx(Slider, _objectSpread$
|
|
24343
|
+
}) : null, /*#__PURE__*/jsx(Slider, _objectSpread$2k(_objectSpread$2k({
|
|
24261
24344
|
min: item.min,
|
|
24262
24345
|
max: item.max,
|
|
24263
24346
|
step: item.step
|
|
@@ -24285,11 +24368,11 @@ function FormSlider(_ref) {
|
|
|
24285
24368
|
});
|
|
24286
24369
|
}
|
|
24287
24370
|
|
|
24288
|
-
function _createForOfIteratorHelper$
|
|
24289
|
-
function _unsupportedIterableToArray$
|
|
24290
|
-
function _arrayLikeToArray$
|
|
24291
|
-
function ownKeys$
|
|
24292
|
-
function _objectSpread$
|
|
24371
|
+
function _createForOfIteratorHelper$Y(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$Y(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; } } }; }
|
|
24372
|
+
function _unsupportedIterableToArray$Y(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$Y(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$Y(r, a) : void 0; } }
|
|
24373
|
+
function _arrayLikeToArray$Y(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; }
|
|
24374
|
+
function ownKeys$2j(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; }
|
|
24375
|
+
function _objectSpread$2j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24293
24376
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName, formName) {
|
|
24294
24377
|
var _isReadonly, _state$hiddenRequired, _state$data$_id, _state$data;
|
|
24295
24378
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -24326,7 +24409,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
24326
24409
|
}
|
|
24327
24410
|
});
|
|
24328
24411
|
case 'selectSimple':
|
|
24329
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
24412
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$2j(_objectSpread$2j({}, item), {}, {
|
|
24330
24413
|
disabled: disabled,
|
|
24331
24414
|
onChange: function onChange(value) {
|
|
24332
24415
|
_onChange(absoluteName, value);
|
|
@@ -24402,7 +24485,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
24402
24485
|
mappingData: state.data,
|
|
24403
24486
|
callback: function callback(data) {
|
|
24404
24487
|
if (!item.callbackMapping) return;
|
|
24405
|
-
var _iterator = _createForOfIteratorHelper$
|
|
24488
|
+
var _iterator = _createForOfIteratorHelper$Y(item.callbackMapping),
|
|
24406
24489
|
_step;
|
|
24407
24490
|
try {
|
|
24408
24491
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -24567,22 +24650,30 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
24567
24650
|
})
|
|
24568
24651
|
});
|
|
24569
24652
|
case 'radio':
|
|
24570
|
-
|
|
24571
|
-
|
|
24572
|
-
|
|
24573
|
-
|
|
24574
|
-
|
|
24575
|
-
|
|
24576
|
-
|
|
24577
|
-
|
|
24578
|
-
|
|
24579
|
-
|
|
24580
|
-
|
|
24581
|
-
|
|
24582
|
-
|
|
24583
|
-
|
|
24584
|
-
|
|
24585
|
-
|
|
24653
|
+
{
|
|
24654
|
+
var RadioOption = item.optionType == 'button' ? Radio.Button : Radio;
|
|
24655
|
+
return /*#__PURE__*/jsx(Radio.Group, {
|
|
24656
|
+
defaultValue: item.defaultValue,
|
|
24657
|
+
value: item.value,
|
|
24658
|
+
buttonStyle: item.buttonStyle,
|
|
24659
|
+
onChange: function onChange(_ref) {
|
|
24660
|
+
var value = _ref.target.value;
|
|
24661
|
+
_onChange(absoluteName, value);
|
|
24662
|
+
},
|
|
24663
|
+
children: item.options.map(function (o, i) {
|
|
24664
|
+
var _o$disabled;
|
|
24665
|
+
return (
|
|
24666
|
+
/*#__PURE__*/
|
|
24667
|
+
// keyed by index: options may share a value (several organization types are stored as undefined), antd would key them by value
|
|
24668
|
+
jsx(RadioOption, {
|
|
24669
|
+
value: o.value,
|
|
24670
|
+
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, state.data),
|
|
24671
|
+
children: o.label
|
|
24672
|
+
}, i)
|
|
24673
|
+
);
|
|
24674
|
+
})
|
|
24675
|
+
});
|
|
24676
|
+
}
|
|
24586
24677
|
case 'button':
|
|
24587
24678
|
return /*#__PURE__*/jsx(CustomButton$1, {
|
|
24588
24679
|
id: item.buttonId,
|
|
@@ -24593,7 +24684,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
24593
24684
|
},
|
|
24594
24685
|
icon: item.icon,
|
|
24595
24686
|
callback: function callback(data) {
|
|
24596
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
24687
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$2j(_objectSpread$2j({}, state.data), data));
|
|
24597
24688
|
}
|
|
24598
24689
|
});
|
|
24599
24690
|
case 'media':
|
|
@@ -24631,7 +24722,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
24631
24722
|
var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
24632
24723
|
var _useTranslation = useTranslation(),
|
|
24633
24724
|
t = _useTranslation.t;
|
|
24634
|
-
return /*#__PURE__*/jsx(Input$1, _objectSpread$
|
|
24725
|
+
return /*#__PURE__*/jsx(Input$1, _objectSpread$2j(_objectSpread$2j({}, props), {}, {
|
|
24635
24726
|
ref: ref,
|
|
24636
24727
|
disabled: true,
|
|
24637
24728
|
value: t(props.translationPrefix + '.' + props.value)
|
|
@@ -24650,11 +24741,11 @@ function isReadonly(item, data) {
|
|
|
24650
24741
|
return false;
|
|
24651
24742
|
}
|
|
24652
24743
|
|
|
24653
|
-
function ownKeys$
|
|
24654
|
-
function _objectSpread$
|
|
24655
|
-
function _createForOfIteratorHelper$
|
|
24656
|
-
function _unsupportedIterableToArray$
|
|
24657
|
-
function _arrayLikeToArray$
|
|
24744
|
+
function ownKeys$2i(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; }
|
|
24745
|
+
function _objectSpread$2i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24746
|
+
function _createForOfIteratorHelper$X(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$X(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; } } }; }
|
|
24747
|
+
function _unsupportedIterableToArray$X(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$X(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$X(r, a) : void 0; } }
|
|
24748
|
+
function _arrayLikeToArray$X(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; }
|
|
24658
24749
|
var Presets = function Presets(_ref) {
|
|
24659
24750
|
var state = _ref.state,
|
|
24660
24751
|
apiHandler = _ref.apiHandler,
|
|
@@ -24689,7 +24780,7 @@ var Presets = function Presets(_ref) {
|
|
|
24689
24780
|
if (state.selectedItems == undefined) return;
|
|
24690
24781
|
setIsModalVisible(false);
|
|
24691
24782
|
var names = [];
|
|
24692
|
-
var _iterator = _createForOfIteratorHelper$
|
|
24783
|
+
var _iterator = _createForOfIteratorHelper$X(state.selectedItems),
|
|
24693
24784
|
_step;
|
|
24694
24785
|
try {
|
|
24695
24786
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -24701,13 +24792,13 @@ var Presets = function Presets(_ref) {
|
|
|
24701
24792
|
} finally {
|
|
24702
24793
|
_iterator.f();
|
|
24703
24794
|
}
|
|
24704
|
-
var data = _objectSpread$
|
|
24795
|
+
var data = _objectSpread$2i(_objectSpread$2i({}, form.getFieldsValue(names)), {}, {
|
|
24705
24796
|
newPresetName: newPresetName
|
|
24706
24797
|
});
|
|
24707
24798
|
data.dpi = parseInt(data.dpi);
|
|
24708
24799
|
data.organization = root.getGlobalValue('organizationId');
|
|
24709
24800
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
24710
|
-
var dt = _objectSpread$
|
|
24801
|
+
var dt = _objectSpread$2i(_objectSpread$2i({}, form.getFieldsValue(names)), {}, {
|
|
24711
24802
|
name: newPresetName
|
|
24712
24803
|
});
|
|
24713
24804
|
setPresets({
|
|
@@ -24841,8 +24932,8 @@ function ModalProgressBar(_ref) {
|
|
|
24841
24932
|
});
|
|
24842
24933
|
}
|
|
24843
24934
|
|
|
24844
|
-
function ownKeys$
|
|
24845
|
-
function _objectSpread$
|
|
24935
|
+
function ownKeys$2h(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; }
|
|
24936
|
+
function _objectSpread$2h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24846
24937
|
function ItemSelector(_ref) {
|
|
24847
24938
|
var state = _ref.state,
|
|
24848
24939
|
setCanSave = _ref.setCanSave,
|
|
@@ -24859,7 +24950,7 @@ function ItemSelector(_ref) {
|
|
|
24859
24950
|
rules: state.getRules(itemSelector, state.data),
|
|
24860
24951
|
label: itemSelector.label ? t(itemSelector.label, itemSelector.label) : itemSelector.name,
|
|
24861
24952
|
valuePropName: itemSelector.type == 'checkbox' ? 'checked' : 'value',
|
|
24862
|
-
children: getElement(_objectSpread$
|
|
24953
|
+
children: getElement(_objectSpread$2h(_objectSpread$2h({}, itemSelector), {}, {
|
|
24863
24954
|
value: itemSelector.type == 'select' ? itemSelector.values[state.selectedItemsIndex[idx]] : undefined
|
|
24864
24955
|
}), setCanSave, state, itemSelector.name, state.onItemSelectorChanged, onErrorInternal)
|
|
24865
24956
|
}, itemSelector.name.toString());
|
|
@@ -25251,11 +25342,11 @@ function getLabel(item, t) {
|
|
|
25251
25342
|
}
|
|
25252
25343
|
var Form$1 = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
25253
25344
|
|
|
25254
|
-
function ownKeys$
|
|
25255
|
-
function _objectSpread$
|
|
25256
|
-
function _createForOfIteratorHelper$
|
|
25257
|
-
function _unsupportedIterableToArray$
|
|
25258
|
-
function _arrayLikeToArray$
|
|
25345
|
+
function ownKeys$2g(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25346
|
+
function _objectSpread$2g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25347
|
+
function _createForOfIteratorHelper$W(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$W(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; } } }; }
|
|
25348
|
+
function _unsupportedIterableToArray$W(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$W(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$W(r, a) : void 0; } }
|
|
25349
|
+
function _arrayLikeToArray$W(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; }
|
|
25259
25350
|
function useRoleSelectorData (_ref) {
|
|
25260
25351
|
var userId = _ref.userId,
|
|
25261
25352
|
id = _ref.id;
|
|
@@ -25412,7 +25503,7 @@ function useRoleSelectorData (_ref) {
|
|
|
25412
25503
|
} else {
|
|
25413
25504
|
var internalOptions = options;
|
|
25414
25505
|
var organizationList = [];
|
|
25415
|
-
var _iterator = _createForOfIteratorHelper$
|
|
25506
|
+
var _iterator = _createForOfIteratorHelper$W(selected),
|
|
25416
25507
|
_step;
|
|
25417
25508
|
try {
|
|
25418
25509
|
var _loop = function _loop() {
|
|
@@ -25454,7 +25545,7 @@ function useRoleSelectorData (_ref) {
|
|
|
25454
25545
|
roles.forEach(function (r) {
|
|
25455
25546
|
//check if after the changes the role is selected
|
|
25456
25547
|
if (value.includes(r._id)) {
|
|
25457
|
-
var newValue = _objectSpread$
|
|
25548
|
+
var newValue = _objectSpread$2g(_objectSpread$2g({}, r), {}, {
|
|
25458
25549
|
selected: true
|
|
25459
25550
|
});
|
|
25460
25551
|
//add it to the new list as selected role
|
|
@@ -25490,7 +25581,7 @@ function useRoleSelectorData (_ref) {
|
|
|
25490
25581
|
}
|
|
25491
25582
|
}
|
|
25492
25583
|
} else {
|
|
25493
|
-
var _newValue = _objectSpread$
|
|
25584
|
+
var _newValue = _objectSpread$2g(_objectSpread$2g({}, r), {}, {
|
|
25494
25585
|
selected: false
|
|
25495
25586
|
});
|
|
25496
25587
|
//add it to the new list as unselected role
|
|
@@ -25547,7 +25638,7 @@ function useRoleSelectorData (_ref) {
|
|
|
25547
25638
|
while (1) switch (_context5.prev = _context5.next) {
|
|
25548
25639
|
case 0:
|
|
25549
25640
|
setLoading(true);
|
|
25550
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
25641
|
+
_iterator2 = _createForOfIteratorHelper$W(addedRoles);
|
|
25551
25642
|
_context5.prev = 2;
|
|
25552
25643
|
_iterator2.s();
|
|
25553
25644
|
case 4:
|
|
@@ -25556,7 +25647,7 @@ function useRoleSelectorData (_ref) {
|
|
|
25556
25647
|
break;
|
|
25557
25648
|
}
|
|
25558
25649
|
role = _step2.value;
|
|
25559
|
-
_iterator4 = _createForOfIteratorHelper$
|
|
25650
|
+
_iterator4 = _createForOfIteratorHelper$W(role.organizations);
|
|
25560
25651
|
_context5.prev = 7;
|
|
25561
25652
|
_iterator4.s();
|
|
25562
25653
|
case 9:
|
|
@@ -25596,7 +25687,7 @@ function useRoleSelectorData (_ref) {
|
|
|
25596
25687
|
_iterator2.f();
|
|
25597
25688
|
return _context5.finish(30);
|
|
25598
25689
|
case 33:
|
|
25599
|
-
_iterator3 = _createForOfIteratorHelper$
|
|
25690
|
+
_iterator3 = _createForOfIteratorHelper$W(removedRoles);
|
|
25600
25691
|
_context5.prev = 34;
|
|
25601
25692
|
_iterator3.s();
|
|
25602
25693
|
case 36:
|
|
@@ -25605,7 +25696,7 @@ function useRoleSelectorData (_ref) {
|
|
|
25605
25696
|
break;
|
|
25606
25697
|
}
|
|
25607
25698
|
_role = _step3.value;
|
|
25608
|
-
_iterator5 = _createForOfIteratorHelper$
|
|
25699
|
+
_iterator5 = _createForOfIteratorHelper$W(_role.organizations);
|
|
25609
25700
|
_context5.prev = 39;
|
|
25610
25701
|
_iterator5.s();
|
|
25611
25702
|
case 41:
|
|
@@ -25682,7 +25773,7 @@ function _updateRoles() {
|
|
|
25682
25773
|
return fetchUserRoles(apiHandler, userId, currentOrganization);
|
|
25683
25774
|
case 3:
|
|
25684
25775
|
userRoles = _context7.sent;
|
|
25685
|
-
_iterator6 = _createForOfIteratorHelper$
|
|
25776
|
+
_iterator6 = _createForOfIteratorHelper$W(roles);
|
|
25686
25777
|
_context7.prev = 5;
|
|
25687
25778
|
_loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2() {
|
|
25688
25779
|
var _removedRole$organiza3;
|
|
@@ -25694,7 +25785,7 @@ function _updateRoles() {
|
|
|
25694
25785
|
userRole = userRoles.find(function (r) {
|
|
25695
25786
|
return r._id == role._id;
|
|
25696
25787
|
});
|
|
25697
|
-
newRole = _objectSpread$
|
|
25788
|
+
newRole = _objectSpread$2g({}, role);
|
|
25698
25789
|
if (userRole) {
|
|
25699
25790
|
newRole.selected = true;
|
|
25700
25791
|
newRole.inherited = userRole.inherited;
|
|
@@ -25914,7 +26005,7 @@ function _fetchOptions() {
|
|
|
25914
26005
|
case 4:
|
|
25915
26006
|
result = _context11.sent;
|
|
25916
26007
|
options = result.data.map(function (d) {
|
|
25917
|
-
return _objectSpread$
|
|
26008
|
+
return _objectSpread$2g(_objectSpread$2g({}, d), {}, {
|
|
25918
26009
|
label: d.displayName,
|
|
25919
26010
|
value: d._id,
|
|
25920
26011
|
isLeaf: !d.hasChildren
|
|
@@ -26018,11 +26109,11 @@ var infiniteScrollContainer = "infiniteScrollContainer-8G1wc";
|
|
|
26018
26109
|
var css_248z$1c = ".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 flex: 1;\n min-height: 0;\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: hidden;\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.container--O28P {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n}\n\n.infiniteScrollContainer-8G1wc {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.infiniteScrollContainer-8G1wc .infinite-scroll-component__outerdiv {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.infiniteScrollContainer-8G1wc .infinite-scroll-component {\n flex: 1 !important;\n min-height: 0 !important;\n height: auto !important;\n display: flex !important;\n flex-direction: column !important;\n}\n";
|
|
26019
26110
|
styleInject(css_248z$1c);
|
|
26020
26111
|
|
|
26021
|
-
function ownKeys$
|
|
26022
|
-
function _objectSpread$
|
|
26023
|
-
function _createForOfIteratorHelper$
|
|
26024
|
-
function _unsupportedIterableToArray$
|
|
26025
|
-
function _arrayLikeToArray$
|
|
26112
|
+
function ownKeys$2f(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; }
|
|
26113
|
+
function _objectSpread$2f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26114
|
+
function _createForOfIteratorHelper$V(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$V(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; } } }; }
|
|
26115
|
+
function _unsupportedIterableToArray$V(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$V(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$V(r, a) : void 0; } }
|
|
26116
|
+
function _arrayLikeToArray$V(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; }
|
|
26026
26117
|
function generateCSV(_x, _x2) {
|
|
26027
26118
|
return _generateCSV.apply(this, arguments);
|
|
26028
26119
|
}
|
|
@@ -26052,7 +26143,7 @@ function _generateCSV() {
|
|
|
26052
26143
|
data = res.data;
|
|
26053
26144
|
count += res.data.length;
|
|
26054
26145
|
total = res.total;
|
|
26055
|
-
_iterator = _createForOfIteratorHelper$
|
|
26146
|
+
_iterator = _createForOfIteratorHelper$V(data);
|
|
26056
26147
|
_context2.prev = 10;
|
|
26057
26148
|
_iterator.s();
|
|
26058
26149
|
case 12:
|
|
@@ -26062,7 +26153,7 @@ function _generateCSV() {
|
|
|
26062
26153
|
}
|
|
26063
26154
|
parent = _step.value;
|
|
26064
26155
|
line = [];
|
|
26065
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
26156
|
+
_iterator2 = _createForOfIteratorHelper$V(exportParams.fields);
|
|
26066
26157
|
try {
|
|
26067
26158
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
26068
26159
|
field = _step2.value;
|
|
@@ -26079,8 +26170,8 @@ function _generateCSV() {
|
|
|
26079
26170
|
break;
|
|
26080
26171
|
}
|
|
26081
26172
|
_context2.next = 21;
|
|
26082
|
-
return generateCSV(_objectSpread$
|
|
26083
|
-
mappingData: _objectSpread$
|
|
26173
|
+
return generateCSV(_objectSpread$2f(_objectSpread$2f({}, exportParams.children), {}, {
|
|
26174
|
+
mappingData: _objectSpread$2f(_objectSpread$2f({}, parent), {}, {
|
|
26084
26175
|
parentId: exportParams.mappingData._id
|
|
26085
26176
|
})
|
|
26086
26177
|
}), csvData);
|
|
@@ -26203,11 +26294,11 @@ function _downloadFile() {
|
|
|
26203
26294
|
return _downloadFile.apply(this, arguments);
|
|
26204
26295
|
}
|
|
26205
26296
|
|
|
26206
|
-
function ownKeys$
|
|
26207
|
-
function _objectSpread$
|
|
26208
|
-
function _createForOfIteratorHelper$
|
|
26209
|
-
function _unsupportedIterableToArray$
|
|
26210
|
-
function _arrayLikeToArray$
|
|
26297
|
+
function ownKeys$2e(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; }
|
|
26298
|
+
function _objectSpread$2e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26299
|
+
function _createForOfIteratorHelper$U(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$U(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; } } }; }
|
|
26300
|
+
function _unsupportedIterableToArray$U(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$U(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$U(r, a) : void 0; } }
|
|
26301
|
+
function _arrayLikeToArray$U(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; }
|
|
26211
26302
|
var deletedObjects = [];
|
|
26212
26303
|
var addedObjects = [];
|
|
26213
26304
|
|
|
@@ -26332,7 +26423,7 @@ function useRelationSelectorData (_ref) {
|
|
|
26332
26423
|
});
|
|
26333
26424
|
roles = [];
|
|
26334
26425
|
filter = {};
|
|
26335
|
-
_iterator3 = _createForOfIteratorHelper$
|
|
26426
|
+
_iterator3 = _createForOfIteratorHelper$U(configuration.search.fields);
|
|
26336
26427
|
try {
|
|
26337
26428
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
26338
26429
|
searchField = _step3.value;
|
|
@@ -26479,7 +26570,7 @@ function useRelationSelectorData (_ref) {
|
|
|
26479
26570
|
filteredItems.push(data === null || data === void 0 ? void 0 : data._id);
|
|
26480
26571
|
}
|
|
26481
26572
|
}
|
|
26482
|
-
_iterator4 = _createForOfIteratorHelper$
|
|
26573
|
+
_iterator4 = _createForOfIteratorHelper$U(addedObjects);
|
|
26483
26574
|
_context3.prev = 7;
|
|
26484
26575
|
_iterator4.s();
|
|
26485
26576
|
case 9:
|
|
@@ -26616,14 +26707,14 @@ function useRelationSelectorData (_ref) {
|
|
|
26616
26707
|
return;
|
|
26617
26708
|
}
|
|
26618
26709
|
});
|
|
26619
|
-
var _iterator = _createForOfIteratorHelper$
|
|
26710
|
+
var _iterator = _createForOfIteratorHelper$U(activeItems),
|
|
26620
26711
|
_step;
|
|
26621
26712
|
try {
|
|
26622
26713
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
26623
26714
|
var activeItem = _step.value;
|
|
26624
26715
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
26625
26716
|
addedObjects.push(addedData);
|
|
26626
|
-
getSplittedItems(_objectSpread$
|
|
26717
|
+
getSplittedItems(_objectSpread$2e(_objectSpread$2e({}, activeItem), {}, {
|
|
26627
26718
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
26628
26719
|
}));
|
|
26629
26720
|
ret = true;
|
|
@@ -26746,7 +26837,7 @@ function useRelationSelectorData (_ref) {
|
|
|
26746
26837
|
function mapToCascaderData(data) {
|
|
26747
26838
|
var options = [];
|
|
26748
26839
|
var tempCascaderData = [];
|
|
26749
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
26840
|
+
var _iterator2 = _createForOfIteratorHelper$U(data),
|
|
26750
26841
|
_step2;
|
|
26751
26842
|
try {
|
|
26752
26843
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -26828,11 +26919,11 @@ function useRelationSelectorData (_ref) {
|
|
|
26828
26919
|
};
|
|
26829
26920
|
}
|
|
26830
26921
|
|
|
26831
|
-
function ownKeys$
|
|
26832
|
-
function _objectSpread$
|
|
26833
|
-
function _createForOfIteratorHelper$
|
|
26834
|
-
function _unsupportedIterableToArray$
|
|
26835
|
-
function _arrayLikeToArray$
|
|
26922
|
+
function ownKeys$2d(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; }
|
|
26923
|
+
function _objectSpread$2d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26924
|
+
function _createForOfIteratorHelper$T(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$T(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; } } }; }
|
|
26925
|
+
function _unsupportedIterableToArray$T(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$T(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$T(r, a) : void 0; } }
|
|
26926
|
+
function _arrayLikeToArray$T(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; }
|
|
26836
26927
|
function resolveActionErrorText(action, t) {
|
|
26837
26928
|
if (!action.errorText) return undefined;
|
|
26838
26929
|
return t(action.errorText);
|
|
@@ -26868,7 +26959,7 @@ function ActionButton (_ref) {
|
|
|
26868
26959
|
};
|
|
26869
26960
|
var disable = false;
|
|
26870
26961
|
if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
|
|
26871
|
-
var _iterator = _createForOfIteratorHelper$
|
|
26962
|
+
var _iterator = _createForOfIteratorHelper$T(ruleData !== null && ruleData !== void 0 ? ruleData : data),
|
|
26872
26963
|
_step;
|
|
26873
26964
|
try {
|
|
26874
26965
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -26965,7 +27056,7 @@ function ActionButton (_ref) {
|
|
|
26965
27056
|
_context.next = 20;
|
|
26966
27057
|
break;
|
|
26967
27058
|
}
|
|
26968
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
27059
|
+
_iterator2 = _createForOfIteratorHelper$T(action.switchValues);
|
|
26969
27060
|
try {
|
|
26970
27061
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
26971
27062
|
element = _step2.value;
|
|
@@ -26977,7 +27068,7 @@ function ActionButton (_ref) {
|
|
|
26977
27068
|
_iterator2.f();
|
|
26978
27069
|
}
|
|
26979
27070
|
_context.next = 19;
|
|
26980
|
-
return apiInterface.update(_objectSpread$
|
|
27071
|
+
return apiInterface.update(_objectSpread$2d(_objectSpread$2d({}, data), {}, {
|
|
26981
27072
|
state: toSwitch
|
|
26982
27073
|
}), data);
|
|
26983
27074
|
case 19:
|
|
@@ -27028,7 +27119,7 @@ function ActionButton (_ref) {
|
|
|
27028
27119
|
switch (action.actionType) {
|
|
27029
27120
|
case 'SwitchButton':
|
|
27030
27121
|
var switchLabel;
|
|
27031
|
-
var _iterator3 = _createForOfIteratorHelper$
|
|
27122
|
+
var _iterator3 = _createForOfIteratorHelper$T(action.switchLable),
|
|
27032
27123
|
_step3;
|
|
27033
27124
|
try {
|
|
27034
27125
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
@@ -27113,14 +27204,14 @@ function _simpleChangeValue() {
|
|
|
27113
27204
|
break;
|
|
27114
27205
|
}
|
|
27115
27206
|
for (i = 0; i < action.newValues.length; i++) {
|
|
27116
|
-
fieldsToUpdate = _objectSpread$
|
|
27207
|
+
fieldsToUpdate = _objectSpread$2d(_objectSpread$2d({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
27117
27208
|
}
|
|
27118
27209
|
if (!apiInterface.canUpdate) {
|
|
27119
27210
|
_context2.next = 9;
|
|
27120
27211
|
break;
|
|
27121
27212
|
}
|
|
27122
27213
|
_context2.next = 7;
|
|
27123
|
-
return apiInterface.update(_objectSpread$
|
|
27214
|
+
return apiInterface.update(_objectSpread$2d({}, fieldsToUpdate), data);
|
|
27124
27215
|
case 7:
|
|
27125
27216
|
response = _context2.sent;
|
|
27126
27217
|
return _context2.abrupt("return", response);
|
|
@@ -27135,15 +27226,15 @@ function _simpleChangeValue() {
|
|
|
27135
27226
|
return _simpleChangeValue.apply(this, arguments);
|
|
27136
27227
|
}
|
|
27137
27228
|
function A(props) {
|
|
27138
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
27229
|
+
return /*#__PURE__*/jsx("a", _objectSpread$2d({}, props));
|
|
27139
27230
|
}
|
|
27140
27231
|
|
|
27141
|
-
function _createForOfIteratorHelper$
|
|
27142
|
-
function _unsupportedIterableToArray$
|
|
27143
|
-
function _arrayLikeToArray$
|
|
27232
|
+
function _createForOfIteratorHelper$S(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$S(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; } } }; }
|
|
27233
|
+
function _unsupportedIterableToArray$S(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$S(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$S(r, a) : void 0; } }
|
|
27234
|
+
function _arrayLikeToArray$S(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; }
|
|
27144
27235
|
function filter$1(input, getActiveItem, filterFields) {
|
|
27145
27236
|
var filter = {};
|
|
27146
|
-
var _iterator = _createForOfIteratorHelper$
|
|
27237
|
+
var _iterator = _createForOfIteratorHelper$S(filterFields),
|
|
27147
27238
|
_step;
|
|
27148
27239
|
try {
|
|
27149
27240
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -27273,8 +27364,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
27273
27364
|
var css_248z$1b = ".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";
|
|
27274
27365
|
styleInject(css_248z$1b);
|
|
27275
27366
|
|
|
27276
|
-
function ownKeys$
|
|
27277
|
-
function _objectSpread$
|
|
27367
|
+
function ownKeys$2c(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; }
|
|
27368
|
+
function _objectSpread$2c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27278
27369
|
var DropDown = function DropDown(_ref) {
|
|
27279
27370
|
var _curItem$data$length;
|
|
27280
27371
|
var split = _ref.split,
|
|
@@ -27306,7 +27397,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
27306
27397
|
});
|
|
27307
27398
|
return /*#__PURE__*/jsx(Collapse, {
|
|
27308
27399
|
onChange: function onChange() {
|
|
27309
|
-
return getSplittedItems(_objectSpread$
|
|
27400
|
+
return getSplittedItems(_objectSpread$2c(_objectSpread$2c({}, item.item), {}, {
|
|
27310
27401
|
parentId: item.parentId
|
|
27311
27402
|
}), 0);
|
|
27312
27403
|
},
|
|
@@ -27566,8 +27657,8 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
27566
27657
|
};
|
|
27567
27658
|
var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
|
|
27568
27659
|
|
|
27569
|
-
function ownKeys$
|
|
27570
|
-
function _objectSpread$
|
|
27660
|
+
function ownKeys$2b(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; }
|
|
27661
|
+
function _objectSpread$2b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27571
27662
|
function useFormListData (_ref) {
|
|
27572
27663
|
var _configuration$defaul;
|
|
27573
27664
|
var id = _ref.id,
|
|
@@ -27647,7 +27738,7 @@ function useFormListData (_ref) {
|
|
|
27647
27738
|
if (updated.length == state.length) {
|
|
27648
27739
|
newState = state.map(function (s, i) {
|
|
27649
27740
|
var _updated$find;
|
|
27650
|
-
return _objectSpread$
|
|
27741
|
+
return _objectSpread$2b(_objectSpread$2b({}, s), {}, {
|
|
27651
27742
|
data: (_updated$find = updated.find(function (u) {
|
|
27652
27743
|
return u.index == i;
|
|
27653
27744
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -27784,8 +27875,8 @@ var FormList = function FormList(_ref, ref) {
|
|
|
27784
27875
|
};
|
|
27785
27876
|
var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
27786
27877
|
|
|
27787
|
-
function ownKeys$
|
|
27788
|
-
function _objectSpread$
|
|
27878
|
+
function ownKeys$2a(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; }
|
|
27879
|
+
function _objectSpread$2a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27789
27880
|
var LOG$k = getLogger('Backoffice', 'SelectOrCreate');
|
|
27790
27881
|
function useSelectOrCreateData (_ref) {
|
|
27791
27882
|
var id = _ref.id,
|
|
@@ -27882,7 +27973,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
27882
27973
|
_context.next = 7;
|
|
27883
27974
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
27884
27975
|
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) {
|
|
27885
|
-
return _objectSpread$
|
|
27976
|
+
return _objectSpread$2a(_objectSpread$2a({}, filter), {}, _defineProperty({}, field.field, [value, field.filter]));
|
|
27886
27977
|
}, {}) : {
|
|
27887
27978
|
_id: [value, 'contains']
|
|
27888
27979
|
},
|
|
@@ -28193,8 +28284,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
28193
28284
|
});
|
|
28194
28285
|
};
|
|
28195
28286
|
|
|
28196
|
-
function ownKeys$
|
|
28197
|
-
function _objectSpread$
|
|
28287
|
+
function ownKeys$29(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; }
|
|
28288
|
+
function _objectSpread$29(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$29(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$29(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28198
28289
|
function useListData (_ref) {
|
|
28199
28290
|
var id = _ref.id,
|
|
28200
28291
|
data = _ref.data;
|
|
@@ -28237,7 +28328,7 @@ function useListData (_ref) {
|
|
|
28237
28328
|
case 3:
|
|
28238
28329
|
result = _context.sent;
|
|
28239
28330
|
setListData(result.data.map(parseField));
|
|
28240
|
-
initData = _objectSpread$
|
|
28331
|
+
initData = _objectSpread$29({}, data);
|
|
28241
28332
|
setUpdatedObject(initData);
|
|
28242
28333
|
setLoading(false);
|
|
28243
28334
|
case 8:
|
|
@@ -28278,7 +28369,7 @@ function useListData (_ref) {
|
|
|
28278
28369
|
});
|
|
28279
28370
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
28280
28371
|
var parsedField = field.field.split('.');
|
|
28281
|
-
item.itemUpdate = _objectSpread$
|
|
28372
|
+
item.itemUpdate = _objectSpread$29(_objectSpread$29({}, field), {}, {
|
|
28282
28373
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
28283
28374
|
});
|
|
28284
28375
|
});
|
|
@@ -28309,16 +28400,16 @@ function useListData (_ref) {
|
|
|
28309
28400
|
console.error('field with more than 2 parts not allowed');
|
|
28310
28401
|
return;
|
|
28311
28402
|
}
|
|
28312
|
-
var updObj = _objectSpread$
|
|
28403
|
+
var updObj = _objectSpread$29({}, updatedObject);
|
|
28313
28404
|
if (fields.length === 1) {
|
|
28314
|
-
updObj = _objectSpread$
|
|
28405
|
+
updObj = _objectSpread$29(_objectSpread$29({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
28315
28406
|
} else if (fields.length === 2) {
|
|
28316
28407
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
28317
28408
|
return v.id === item.id.trim();
|
|
28318
28409
|
});
|
|
28319
28410
|
if (updatedField) {
|
|
28320
|
-
var updatedFieldCopy = _objectSpread$
|
|
28321
|
-
updObj = _objectSpread$
|
|
28411
|
+
var updatedFieldCopy = _objectSpread$29(_objectSpread$29({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
28412
|
+
updObj = _objectSpread$29(_objectSpread$29({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
28322
28413
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
28323
28414
|
})));
|
|
28324
28415
|
}
|
|
@@ -28327,11 +28418,11 @@ function useListData (_ref) {
|
|
|
28327
28418
|
var acItems = listData;
|
|
28328
28419
|
for (var i = 0; i < acItems.length; i++) {
|
|
28329
28420
|
if (i == index) {
|
|
28330
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
28421
|
+
acItems[i].itemUpdate = _objectSpread$29(_objectSpread$29({}, acItems[i].itemUpdate), {}, {
|
|
28331
28422
|
value: value
|
|
28332
28423
|
});
|
|
28333
28424
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
28334
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
28425
|
+
acItems[i].itemUpdate = _objectSpread$29(_objectSpread$29({}, acItems[i].itemUpdate), {}, {
|
|
28335
28426
|
value: !value
|
|
28336
28427
|
});
|
|
28337
28428
|
}
|
|
@@ -28699,8 +28790,8 @@ var editButton = "edit-button-m6r3M";
|
|
|
28699
28790
|
var css_248z$1a = ".jsoneditor-WMs15 .preview-9wK81 {\n background-color: #f19e34;\n}\n\n.jsoneditor-WMs15 .preview-button-vupuG {\n background-image: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22iso-8859-1%22%3F%3E%3C!-- Generator%3A Adobe Illustrator 19.0.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%3Csvg version%3D%221.1%22 id%3D%22Layer_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%09 viewBox%3D%220 0 502 502%22 style%3D%22enable-background%3Anew 0 0 502 502%3B%22 xml%3Aspace%3D%22preserve%22 fill%3D%22%23fff%22%3E%3Cg%3E%09%3Cg%3E%09%09%3Cg%3E%09%09%09%3Cpath d%3D%22M478.482%2C448.601l-101.6-101.599c8.089-15.262%2C12.339-32.29%2C12.339-49.717c0-35.689-18.182-69.164-47.804-88.743V92.53%09%09%09%09c0-2.652-1.054-5.196-2.929-7.071l-82.529-82.53C254.083%2C1.054%2C251.54%2C0%2C248.888%2C0H24.371c-5.522%2C0-10%2C4.477-10%2C10v427.735%09%09%09%09c0%2C5.523%2C4.478%2C10%2C10%2C10h307.046c5.522%2C0%2C10-4.477%2C10-10v-37.722l92.825%2C92.825c5.908%2C5.908%2C13.764%2C9.162%2C22.119%2C9.162%09%09%09%09c8.356%2C0%2C16.212-3.254%2C22.12-9.162C490.678%2C480.642%2C490.678%2C460.797%2C478.482%2C448.601z M307.276%2C82.53h-48.387V34.143%09%09%09%09l24.193%2C24.193L307.276%2C82.53z M321.417%2C396.377v31.358H34.371V20h204.517v72.53c0%2C5.523%2C4.478%2C10%2C10%2C10h72.529v95.662%09%09%09%09l0.009%2C0.014c-12.214-4.741-25.275-7.215-38.499-7.215c-58.61%2C0-106.294%2C47.683-106.294%2C106.293s47.684%2C106.293%2C106.294%2C106.293%09%09%09%09c13.224%2C0%2C26.285-2.474%2C38.499-7.215L321.417%2C396.377z M328.948%2C370.291c-0.848%2C0.536-1.706%2C1.057-2.574%2C1.563%09%09%09%09c-13.131%2C7.67-28.154%2C11.724-43.446%2C11.724c-47.583%2C0-86.294-38.711-86.294-86.293c0-47.582%2C38.711-86.293%2C86.294-86.293%09%09%09%09c15.291%2C0%2C30.315%2C4.054%2C43.447%2C11.724c26.428%2C15.435%2C42.846%2C44.008%2C42.846%2C74.569c0%2C16.35-4.595%2C32.264-13.289%2C46.022%09%09%09%09C349.097%2C354.125%2C339.766%2C363.455%2C328.948%2C370.291z M464.339%2C478.696c-2.131%2C2.131-4.964%2C3.304-7.978%2C3.304%09%09%09%09c-3.014%2C0-5.847-1.173-7.977-3.304l-98.706-98.706l-0.008-0.001c5.856-4.74%2C11.221-10.104%2C15.961-15.96l0.001%2C0.008%09%09%09%09l98.707%2C98.707C468.737%2C467.142%2C468.737%2C474.298%2C464.339%2C478.696z%22%2F%3E%09%09%09%3Cpath d%3D%22M246.838%2C238.403c-20.641%2C12.674-32.964%2C34.686-32.964%2C58.882c0%2C5.523%2C4.478%2C10%2C10%2C10c5.522%2C0%2C10-4.477%2C10-10%09%09%09%09c0-17.19%2C8.759-32.83%2C23.429-41.838c4.707-2.89%2C6.179-9.048%2C3.289-13.754C257.702%2C236.986%2C251.544%2C235.513%2C246.838%2C238.403z%22%2F%3E%09%09%09%3Cpath d%3D%22M317.708%2C237.624c-10.52-6.145-22.547-9.392-34.781-9.392c-5.522%2C0-10%2C4.477-10%2C10s4.478%2C10%2C10%2C10%09%09%09%09c8.693%2C0%2C17.232%2C2.304%2C24.693%2C6.662c1.586%2C0.926%2C3.321%2C1.367%2C5.034%2C1.367c3.438%2C0%2C6.785-1.775%2C8.645-4.958%09%09%09%09C324.085%2C246.533%2C322.477%2C240.409%2C317.708%2C237.624z%22%2F%3E%09%09%3C%2Fg%3E%09%3C%2Fg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n background-size: 20px;\n background-repeat: no-repeat;\n background-position: center;\n}\n.jsoneditor-WMs15 .preview-button-vupuG:hover {\n border: 0;\n}\n.jsoneditor-WMs15 .preview-button-vupuG:disabled {\n opacity: 0.3;\n}\n\n.jsoneditor-WMs15 .edit-button-m6r3M {\n background-image: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22iso-8859-1%22%3F%3E%3C!-- Generator%3A Adobe Illustrator 16.0.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%3C!DOCTYPE svg PUBLIC %22-%2F%2FW3C%2F%2FDTD SVG 1.1%2F%2FEN%22 %22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg version%3D%221.1%22 id%3D%22Capa_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%09 width%3D%22494.936px%22 height%3D%22494.936px%22 viewBox%3D%220 0 494.936 494.936%22 style%3D%22enable-background%3Anew 0 0 494.936 494.936%3B%22%09 xml%3Aspace%3D%22preserve%22 fill%3D%22%23fff%22%3E%3Cg%3E%09%3Cg%3E%09%09%3Cpath d%3D%22M389.844%2C182.85c-6.743%2C0-12.21%2C5.467-12.21%2C12.21v222.968c0%2C23.562-19.174%2C42.735-42.736%2C42.735H67.157%09%09%09c-23.562%2C0-42.736-19.174-42.736-42.735V150.285c0-23.562%2C19.174-42.735%2C42.736-42.735h267.741c6.743%2C0%2C12.21-5.467%2C12.21-12.21%09%09%09s-5.467-12.21-12.21-12.21H67.157C30.126%2C83.13%2C0%2C113.255%2C0%2C150.285v267.743c0%2C37.029%2C30.126%2C67.155%2C67.157%2C67.155h267.741%09%09%09c37.03%2C0%2C67.156-30.126%2C67.156-67.155V195.061C402.054%2C188.318%2C396.587%2C182.85%2C389.844%2C182.85z%22%2F%3E%09%09%3Cpath d%3D%22M483.876%2C20.791c-14.72-14.72-38.669-14.714-53.377%2C0L221.352%2C229.944c-0.28%2C0.28-3.434%2C3.559-4.251%2C5.396l-28.963%2C65.069%09%09%09c-2.057%2C4.619-1.056%2C10.027%2C2.521%2C13.6c2.337%2C2.336%2C5.461%2C3.576%2C8.639%2C3.576c1.675%2C0%2C3.362-0.346%2C4.96-1.057l65.07-28.963%09%09%09c1.83-0.815%2C5.114-3.97%2C5.396-4.25L483.876%2C74.169c7.131-7.131%2C11.06-16.61%2C11.06-26.692%09%09%09C494.936%2C37.396%2C491.007%2C27.915%2C483.876%2C20.791z M466.61%2C56.897L257.457%2C266.05c-0.035%2C0.036-0.055%2C0.078-0.089%2C0.107%09%09%09l-33.989%2C15.131L238.51%2C247.3c0.03-0.036%2C0.071-0.055%2C0.107-0.09L447.765%2C38.058c5.038-5.039%2C13.819-5.033%2C18.846%2C0.005%09%09%09c2.518%2C2.51%2C3.905%2C5.855%2C3.905%2C9.414C470.516%2C51.036%2C469.127%2C54.38%2C466.61%2C56.897z%22%2F%3E%09%3C%2Fg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n}\n\n/* The orange menu while the JSON preview shows (see useJsonEditorData.previewMode) wins over both themes */\n.jsoneditor-WMs15 .jsoneditor-menu.preview-9wK81,\n.darkmode .jsoneditor-WMs15 .jsoneditor-menu.preview-9wK81 {\n background-color: #f19e34;\n}\n";
|
|
28700
28791
|
styleInject(css_248z$1a);
|
|
28701
28792
|
|
|
28702
|
-
function ownKeys$
|
|
28703
|
-
function _objectSpread$
|
|
28793
|
+
function ownKeys$28(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; }
|
|
28794
|
+
function _objectSpread$28(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$28(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$28(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28704
28795
|
var JsonEditor = function JsonEditor(_ref, ref) {
|
|
28705
28796
|
var id = _ref.id,
|
|
28706
28797
|
value = _ref.value,
|
|
@@ -28729,7 +28820,7 @@ var JsonEditor = function JsonEditor(_ref, ref) {
|
|
|
28729
28820
|
var _state$configuration$;
|
|
28730
28821
|
return (_state$configuration$ = state.configuration.tools) === null || _state$configuration$ === void 0 ? void 0 : _state$configuration$.map(function (tool) {
|
|
28731
28822
|
var _tool$defaultOpen;
|
|
28732
|
-
return _objectSpread$
|
|
28823
|
+
return _objectSpread$28(_objectSpread$28({}, tool), {}, {
|
|
28733
28824
|
parameters: {
|
|
28734
28825
|
data: state.curData,
|
|
28735
28826
|
submit: function submit() {
|
|
@@ -28887,8 +28978,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
28887
28978
|
};
|
|
28888
28979
|
}
|
|
28889
28980
|
|
|
28890
|
-
function ownKeys$
|
|
28891
|
-
function _objectSpread$
|
|
28981
|
+
function ownKeys$27(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; }
|
|
28982
|
+
function _objectSpread$27(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$27(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$27(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28892
28983
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
28893
28984
|
var id = _ref.id,
|
|
28894
28985
|
data = _ref.data,
|
|
@@ -28996,12 +29087,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
28996
29087
|
}
|
|
28997
29088
|
function onEnter(e) {
|
|
28998
29089
|
if (e.key != 'Enter') return;
|
|
28999
|
-
setCrop(_objectSpread$
|
|
29090
|
+
setCrop(_objectSpread$27(_objectSpread$27({}, crop), {}, {
|
|
29000
29091
|
unit: 'px',
|
|
29001
29092
|
width: Number(widthInputElement.current.value),
|
|
29002
29093
|
height: Number(heightInputElement.current.value)
|
|
29003
29094
|
}));
|
|
29004
|
-
setCompletedCrop(_objectSpread$
|
|
29095
|
+
setCompletedCrop(_objectSpread$27(_objectSpread$27({}, crop), {}, {
|
|
29005
29096
|
unit: 'px',
|
|
29006
29097
|
width: Number(widthInputElement.current.value),
|
|
29007
29098
|
height: Number(heightInputElement.current.value)
|
|
@@ -29076,11 +29167,11 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
29076
29167
|
};
|
|
29077
29168
|
var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
29078
29169
|
|
|
29079
|
-
function _createForOfIteratorHelper$
|
|
29080
|
-
function _unsupportedIterableToArray$
|
|
29081
|
-
function _arrayLikeToArray$
|
|
29082
|
-
function ownKeys$
|
|
29083
|
-
function _objectSpread$
|
|
29170
|
+
function _createForOfIteratorHelper$R(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$R(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; } } }; }
|
|
29171
|
+
function _unsupportedIterableToArray$R(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$R(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(r, a) : void 0; } }
|
|
29172
|
+
function _arrayLikeToArray$R(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; }
|
|
29173
|
+
function ownKeys$26(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; }
|
|
29174
|
+
function _objectSpread$26(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$26(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$26(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29084
29175
|
function useDescriptions (_ref) {
|
|
29085
29176
|
var id = _ref.id;
|
|
29086
29177
|
var root = useStore();
|
|
@@ -29173,8 +29264,8 @@ function _getDisplayData() {
|
|
|
29173
29264
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
29174
29265
|
while (1) switch (_context4.prev = _context4.next) {
|
|
29175
29266
|
case 0:
|
|
29176
|
-
displayData = _objectSpread$
|
|
29177
|
-
_iterator = _createForOfIteratorHelper$
|
|
29267
|
+
displayData = _objectSpread$26({}, data);
|
|
29268
|
+
_iterator = _createForOfIteratorHelper$R(items);
|
|
29178
29269
|
_context4.prev = 2;
|
|
29179
29270
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
29180
29271
|
var item, itemWithMappingData, apiHandler, response, mappingData;
|
|
@@ -29290,9 +29381,9 @@ var DescriptionWrapper = function DescriptionWrapper(_ref) {
|
|
|
29290
29381
|
};
|
|
29291
29382
|
var Description = observer(DescriptionWrapper);
|
|
29292
29383
|
|
|
29293
|
-
function _createForOfIteratorHelper$
|
|
29294
|
-
function _unsupportedIterableToArray$
|
|
29295
|
-
function _arrayLikeToArray$
|
|
29384
|
+
function _createForOfIteratorHelper$Q(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$Q(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; } } }; }
|
|
29385
|
+
function _unsupportedIterableToArray$Q(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$Q(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$Q(r, a) : void 0; } }
|
|
29386
|
+
function _arrayLikeToArray$Q(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; }
|
|
29296
29387
|
var FileUploadWrapper$1 = function FileUploadWrapper(_ref) {
|
|
29297
29388
|
var id = _ref.id;
|
|
29298
29389
|
var _useDivaCore = useDivaCore(),
|
|
@@ -29353,7 +29444,7 @@ var FileUploadWrapper$1 = function FileUploadWrapper(_ref) {
|
|
|
29353
29444
|
case 0:
|
|
29354
29445
|
setLoading(true);
|
|
29355
29446
|
_context.prev = 1;
|
|
29356
|
-
_iterator = _createForOfIteratorHelper$
|
|
29447
|
+
_iterator = _createForOfIteratorHelper$Q(organizations);
|
|
29357
29448
|
_context.prev = 3;
|
|
29358
29449
|
_iterator.s();
|
|
29359
29450
|
case 5:
|
|
@@ -29449,8 +29540,8 @@ var FileUploadWrapper$1 = function FileUploadWrapper(_ref) {
|
|
|
29449
29540
|
};
|
|
29450
29541
|
var FileUploadBeta = observer(FileUploadWrapper$1);
|
|
29451
29542
|
|
|
29452
|
-
function ownKeys$
|
|
29453
|
-
function _objectSpread$
|
|
29543
|
+
function ownKeys$25(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; }
|
|
29544
|
+
function _objectSpread$25(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$25(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$25(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29454
29545
|
function useGridData (_ref) {
|
|
29455
29546
|
var id = _ref.id,
|
|
29456
29547
|
data = _ref.data;
|
|
@@ -29493,11 +29584,11 @@ function useGridData (_ref) {
|
|
|
29493
29584
|
function reducer(state, action) {
|
|
29494
29585
|
switch (action.type) {
|
|
29495
29586
|
case 'update':
|
|
29496
|
-
return _objectSpread$
|
|
29587
|
+
return _objectSpread$25(_objectSpread$25({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$25(_objectSpread$25({}, action.data), {}, {
|
|
29497
29588
|
buffer: Buffer.from(action.data.buffer)
|
|
29498
29589
|
})));
|
|
29499
29590
|
case 'delete':
|
|
29500
|
-
var newState = _objectSpread$
|
|
29591
|
+
var newState = _objectSpread$25({}, state);
|
|
29501
29592
|
delete newState[action.data.divaNr];
|
|
29502
29593
|
return newState;
|
|
29503
29594
|
default:
|
|
@@ -29584,8 +29675,8 @@ var Grid = function Grid(_ref) {
|
|
|
29584
29675
|
});
|
|
29585
29676
|
};
|
|
29586
29677
|
|
|
29587
|
-
function ownKeys$
|
|
29588
|
-
function _objectSpread$
|
|
29678
|
+
function ownKeys$24(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; }
|
|
29679
|
+
function _objectSpread$24(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$24(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$24(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29589
29680
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
29590
29681
|
var id = _ref.id;
|
|
29591
29682
|
var root = useStore();
|
|
@@ -29794,7 +29885,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
29794
29885
|
onRemove: onRemove,
|
|
29795
29886
|
customRequest: customRequest,
|
|
29796
29887
|
fileList: fileList.map(function (f) {
|
|
29797
|
-
return _objectSpread$
|
|
29888
|
+
return _objectSpread$24(_objectSpread$24({}, f), {}, {
|
|
29798
29889
|
url: f.url
|
|
29799
29890
|
});
|
|
29800
29891
|
}),
|
|
@@ -29898,8 +29989,8 @@ var TableSummary = function TableSummary(_ref) {
|
|
|
29898
29989
|
});
|
|
29899
29990
|
};
|
|
29900
29991
|
|
|
29901
|
-
function ownKeys$
|
|
29902
|
-
function _objectSpread$
|
|
29992
|
+
function ownKeys$23(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; }
|
|
29993
|
+
function _objectSpread$23(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$23(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$23(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29903
29994
|
function getExpandedRowRenderer (config, root) {
|
|
29904
29995
|
return function (record) {
|
|
29905
29996
|
var data = record;
|
|
@@ -29921,7 +30012,7 @@ function customSubTable(columns, datasource) {
|
|
|
29921
30012
|
// map custom columns to antd columns
|
|
29922
30013
|
var antcols = columns.map(function (col) {
|
|
29923
30014
|
var _col$width;
|
|
29924
|
-
return _objectSpread$
|
|
30015
|
+
return _objectSpread$23(_objectSpread$23({}, col), {}, {
|
|
29925
30016
|
title: col.title,
|
|
29926
30017
|
dataIndex: col.field,
|
|
29927
30018
|
key: col.field,
|
|
@@ -29987,9 +30078,9 @@ function BooleanCell (_ref) {
|
|
|
29987
30078
|
}
|
|
29988
30079
|
}
|
|
29989
30080
|
|
|
29990
|
-
function _createForOfIteratorHelper$
|
|
29991
|
-
function _unsupportedIterableToArray$
|
|
29992
|
-
function _arrayLikeToArray$
|
|
30081
|
+
function _createForOfIteratorHelper$P(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$P(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; } } }; }
|
|
30082
|
+
function _unsupportedIterableToArray$P(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$P(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$P(r, a) : void 0; } }
|
|
30083
|
+
function _arrayLikeToArray$P(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; }
|
|
29993
30084
|
function StringCell (_ref) {
|
|
29994
30085
|
var children = _ref.children,
|
|
29995
30086
|
column = _ref.column,
|
|
@@ -30107,7 +30198,7 @@ function matchesColorCondition(record, value, operation, field, onValue) {
|
|
|
30107
30198
|
}
|
|
30108
30199
|
function getColor(column, record, value) {
|
|
30109
30200
|
if (column.color && record) {
|
|
30110
|
-
var _iterator = _createForOfIteratorHelper$
|
|
30201
|
+
var _iterator = _createForOfIteratorHelper$P(column.color),
|
|
30111
30202
|
_step;
|
|
30112
30203
|
try {
|
|
30113
30204
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -30302,9 +30393,9 @@ function DropdownCell (_ref) {
|
|
|
30302
30393
|
}
|
|
30303
30394
|
}
|
|
30304
30395
|
|
|
30305
|
-
function _createForOfIteratorHelper$
|
|
30306
|
-
function _unsupportedIterableToArray$
|
|
30307
|
-
function _arrayLikeToArray$
|
|
30396
|
+
function _createForOfIteratorHelper$O(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$O(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; } } }; }
|
|
30397
|
+
function _unsupportedIterableToArray$O(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$O(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$O(r, a) : void 0; } }
|
|
30398
|
+
function _arrayLikeToArray$O(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; }
|
|
30308
30399
|
function MediaViewerCell (_ref) {
|
|
30309
30400
|
var children = _ref.children,
|
|
30310
30401
|
column = _ref.column;
|
|
@@ -30328,7 +30419,7 @@ function MediaViewerCell (_ref) {
|
|
|
30328
30419
|
if (column.imageEnding && !url.endsWith('glb')) previewUrl = url.endsWith('.jpg') ? url.replace('.jpg', '') + column.imageEnding + '.jpg' : url.replace('.png', '') + column.imageEnding + '.png';
|
|
30329
30420
|
if (column.includedFileEndings) {
|
|
30330
30421
|
var supported = false;
|
|
30331
|
-
var _iterator = _createForOfIteratorHelper$
|
|
30422
|
+
var _iterator = _createForOfIteratorHelper$O(column.includedFileEndings),
|
|
30332
30423
|
_step;
|
|
30333
30424
|
try {
|
|
30334
30425
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -30673,15 +30764,15 @@ function MediaItemViewerCell (_ref) {
|
|
|
30673
30764
|
});
|
|
30674
30765
|
}
|
|
30675
30766
|
|
|
30676
|
-
function _createForOfIteratorHelper$
|
|
30677
|
-
function _unsupportedIterableToArray$
|
|
30678
|
-
function _arrayLikeToArray$
|
|
30767
|
+
function _createForOfIteratorHelper$N(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$N(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; } } }; }
|
|
30768
|
+
function _unsupportedIterableToArray$N(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$N(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$N(r, a) : void 0; } }
|
|
30769
|
+
function _arrayLikeToArray$N(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; }
|
|
30679
30770
|
function IconCell (_ref) {
|
|
30680
30771
|
var children = _ref.children,
|
|
30681
30772
|
column = _ref.column;
|
|
30682
30773
|
if (!column) throw new Error('icon column doesnt support editing');
|
|
30683
30774
|
function resolveIconMapping(value) {
|
|
30684
|
-
var _iterator = _createForOfIteratorHelper$
|
|
30775
|
+
var _iterator = _createForOfIteratorHelper$N(column.iconMapping),
|
|
30685
30776
|
_step;
|
|
30686
30777
|
try {
|
|
30687
30778
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -30784,8 +30875,8 @@ function ArrayCell (_ref) {
|
|
|
30784
30875
|
|
|
30785
30876
|
var _excluded$f = ["index"],
|
|
30786
30877
|
_excluded2$2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
30787
|
-
function ownKeys$
|
|
30788
|
-
function _objectSpread$
|
|
30878
|
+
function ownKeys$22(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; }
|
|
30879
|
+
function _objectSpread$22(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$22(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$22(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30789
30880
|
var LOG$i = getLogger('Backoffice', 'CellRenderer');
|
|
30790
30881
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
30791
30882
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -30799,7 +30890,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
30799
30890
|
component: false,
|
|
30800
30891
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
30801
30892
|
value: form,
|
|
30802
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
30893
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$22({}, props))
|
|
30803
30894
|
})
|
|
30804
30895
|
});
|
|
30805
30896
|
};
|
|
@@ -30852,7 +30943,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
30852
30943
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
30853
30944
|
longDescriptionType = 'text';
|
|
30854
30945
|
}
|
|
30855
|
-
var modifiedColumn = _objectSpread$
|
|
30946
|
+
var modifiedColumn = _objectSpread$22(_objectSpread$22({}, column), {}, {
|
|
30856
30947
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
30857
30948
|
});
|
|
30858
30949
|
if (column) {
|
|
@@ -30865,43 +30956,43 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
30865
30956
|
};
|
|
30866
30957
|
switch (modifiedColumn.type) {
|
|
30867
30958
|
case 'boolean':
|
|
30868
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
30959
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$22({}, cellProps));
|
|
30869
30960
|
break;
|
|
30870
30961
|
case 'text':
|
|
30871
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
30962
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$22({}, cellProps));
|
|
30872
30963
|
break;
|
|
30873
30964
|
case 'select':
|
|
30874
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
30965
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$22({}, cellProps));
|
|
30875
30966
|
case 'media':
|
|
30876
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
30967
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$22({}, cellProps));
|
|
30877
30968
|
break;
|
|
30878
30969
|
case 'mediaItem':
|
|
30879
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
30970
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$22({}, cellProps));
|
|
30880
30971
|
break;
|
|
30881
30972
|
case 'unixTimeStamp':
|
|
30882
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
30973
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$22({}, cellProps));
|
|
30883
30974
|
break;
|
|
30884
30975
|
case 'unixTimeStampCheck':
|
|
30885
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
30976
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$22({}, cellProps));
|
|
30886
30977
|
break;
|
|
30887
30978
|
case 'icon':
|
|
30888
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
30979
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$22({}, cellProps));
|
|
30889
30980
|
break;
|
|
30890
30981
|
case 'progress':
|
|
30891
|
-
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$
|
|
30982
|
+
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$22({}, cellProps));
|
|
30892
30983
|
break;
|
|
30893
30984
|
case 'link':
|
|
30894
|
-
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$
|
|
30985
|
+
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$22({}, cellProps));
|
|
30895
30986
|
break;
|
|
30896
30987
|
case 'array':
|
|
30897
|
-
childNode = /*#__PURE__*/jsx(ArrayCell, _objectSpread$
|
|
30988
|
+
childNode = /*#__PURE__*/jsx(ArrayCell, _objectSpread$22({}, cellProps));
|
|
30898
30989
|
break;
|
|
30899
30990
|
default:
|
|
30900
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
30991
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$22({}, cellProps));
|
|
30901
30992
|
break;
|
|
30902
30993
|
}
|
|
30903
30994
|
}
|
|
30904
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
30995
|
+
return /*#__PURE__*/jsx("td", _objectSpread$22(_objectSpread$22({}, restProps), {}, {
|
|
30905
30996
|
children: childNode
|
|
30906
30997
|
}));
|
|
30907
30998
|
};
|
|
@@ -31268,6 +31359,27 @@ function resolveAgentCatalogId(_ref) {
|
|
|
31268
31359
|
routeCatalogId = _ref.routeCatalogId;
|
|
31269
31360
|
return packageId ? catalogId : routeCatalogId !== null && routeCatalogId !== void 0 ? routeCatalogId : catalogId;
|
|
31270
31361
|
}
|
|
31362
|
+
|
|
31363
|
+
/** The organization's license flags of the agent features (diva-auth organization settings, inherited from the parents). */
|
|
31364
|
+
|
|
31365
|
+
/** What the agent panel offers the user in the current organization: the chat (advisor or full agent), the MCP bridge. */
|
|
31366
|
+
|
|
31367
|
+
/**
|
|
31368
|
+
* The UI side of diva-ai's access check (domain/divaAgent/access.ts), on the `view:` halves of the permissions: an
|
|
31369
|
+
* internal permission counts in every organization, a licensed one only where the organization has the feature's
|
|
31370
|
+
* license flag, and the MCP bridge needs the chat as well — and, for now, the internal MCP permission: MCP is not
|
|
31371
|
+
* released for customers (diva-ai access.ts hasBridgeAccess). diva-ai enforces the same again on the `use:` halves.
|
|
31372
|
+
*/
|
|
31373
|
+
function agentAccess(hasPermission, license) {
|
|
31374
|
+
var holds = function holds(object, flag) {
|
|
31375
|
+
return hasPermission("".concat(object, "_internal")) || hasPermission(object) && (license === null || license === void 0 ? void 0 : license[flag]) === true;
|
|
31376
|
+
};
|
|
31377
|
+
var chat = holds('diva_advisor', 'enableDivaAdvisor') || holds('diva_agent', 'enableDivaAgent');
|
|
31378
|
+
return {
|
|
31379
|
+
chat: chat,
|
|
31380
|
+
mcp: chat && hasPermission('diva_agent_mcp_internal')
|
|
31381
|
+
};
|
|
31382
|
+
}
|
|
31271
31383
|
/**
|
|
31272
31384
|
* The panel appears on an editor (a resolved catalog or package) and on list views that opt in — always only with
|
|
31273
31385
|
* the permission and never on a placeholder view.
|
|
@@ -31290,11 +31402,11 @@ function shouldMountAgentTool(_ref2) {
|
|
|
31290
31402
|
return !!(catalogId || packageId || divaAgent);
|
|
31291
31403
|
}
|
|
31292
31404
|
|
|
31293
|
-
function _createForOfIteratorHelper$
|
|
31294
|
-
function _unsupportedIterableToArray$
|
|
31295
|
-
function _arrayLikeToArray$
|
|
31296
|
-
function ownKeys$
|
|
31297
|
-
function _objectSpread$
|
|
31405
|
+
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; } } }; }
|
|
31406
|
+
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; } }
|
|
31407
|
+
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; }
|
|
31408
|
+
function ownKeys$21(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; }
|
|
31409
|
+
function _objectSpread$21(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$21(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$21(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31298
31410
|
|
|
31299
31411
|
/**
|
|
31300
31412
|
* Props for the useTools hook
|
|
@@ -31319,6 +31431,7 @@ function _objectSpread$20(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
|
31319
31431
|
* @returns {Function} removeSecondaryTables - Function to remove secondary tables
|
|
31320
31432
|
*/
|
|
31321
31433
|
var useTools = function useTools(_ref) {
|
|
31434
|
+
var _root$dataStore$curre;
|
|
31322
31435
|
var catalog = _ref.catalog,
|
|
31323
31436
|
enricherPackage = _ref.enricherPackage,
|
|
31324
31437
|
isApi2 = _ref.isApi2,
|
|
@@ -31337,7 +31450,7 @@ var useTools = function useTools(_ref) {
|
|
|
31337
31450
|
var routeCatalogId = routeCatalogIdOf(root.navigationState.path);
|
|
31338
31451
|
var isoLanguageIds = (catalog === null || catalog === void 0 ? void 0 : catalog.isoLanguageIds) || (enricherPackage === null || enricherPackage === void 0 ? void 0 : enricherPackage.isoLanguageIds);
|
|
31339
31452
|
var createTool = function createTool(tool) {
|
|
31340
|
-
return _objectSpread$
|
|
31453
|
+
return _objectSpread$21({
|
|
31341
31454
|
startWidth: 600,
|
|
31342
31455
|
defaultPinned: true,
|
|
31343
31456
|
defaultOpen: false
|
|
@@ -31368,7 +31481,7 @@ var useTools = function useTools(_ref) {
|
|
|
31368
31481
|
name: 'Konfigurator',
|
|
31369
31482
|
type: 'Configurator',
|
|
31370
31483
|
where: 'right',
|
|
31371
|
-
parameters: _objectSpread$
|
|
31484
|
+
parameters: _objectSpread$21({
|
|
31372
31485
|
catalogId: catalogId,
|
|
31373
31486
|
packageId: packageId,
|
|
31374
31487
|
isIDMData: !isApi2 ? '1' : undefined
|
|
@@ -31433,8 +31546,10 @@ var useTools = function useTools(_ref) {
|
|
|
31433
31546
|
*/
|
|
31434
31547
|
var addedRightIds = useRef([]);
|
|
31435
31548
|
var addedBottomIds = useRef([]);
|
|
31436
|
-
//
|
|
31437
|
-
var agentPermitted =
|
|
31549
|
+
// The chat (advisor or agent) gates the agent tool; the MCP bridge needs it as well and only adds to the panel.
|
|
31550
|
+
var agentPermitted = agentAccess(function (object) {
|
|
31551
|
+
return root.actions.userHasPermission(object);
|
|
31552
|
+
}, (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.settings).chat;
|
|
31438
31553
|
useEffect(function () {
|
|
31439
31554
|
var _root$contentStore$ri, _root$contentStore$bo, _root$contentStore$ri2, _root$contentStore$bo2;
|
|
31440
31555
|
var tools = [];
|
|
@@ -31456,7 +31571,7 @@ var useTools = function useTools(_ref) {
|
|
|
31456
31571
|
if (mainInformationWindowCodex) {
|
|
31457
31572
|
tools.push(createInformationWindow(mainInformationWindowCodex, false));
|
|
31458
31573
|
}
|
|
31459
|
-
var _iterator = _createForOfIteratorHelper$
|
|
31574
|
+
var _iterator = _createForOfIteratorHelper$M(conditionalTools || []),
|
|
31460
31575
|
_step;
|
|
31461
31576
|
try {
|
|
31462
31577
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -31521,11 +31636,11 @@ function InformationButton(_ref) {
|
|
|
31521
31636
|
});
|
|
31522
31637
|
}
|
|
31523
31638
|
|
|
31524
|
-
function ownKeys$
|
|
31525
|
-
function _objectSpread$
|
|
31526
|
-
function _createForOfIteratorHelper$
|
|
31527
|
-
function _unsupportedIterableToArray$
|
|
31528
|
-
function _arrayLikeToArray$
|
|
31639
|
+
function ownKeys$20(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; }
|
|
31640
|
+
function _objectSpread$20(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$20(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$20(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31641
|
+
function _createForOfIteratorHelper$L(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$L(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; } } }; }
|
|
31642
|
+
function _unsupportedIterableToArray$L(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$L(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$L(r, a) : void 0; } }
|
|
31643
|
+
function _arrayLikeToArray$L(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; }
|
|
31529
31644
|
dayjs.extend(customParseFormat);
|
|
31530
31645
|
dayjs.extend(advancedFormat);
|
|
31531
31646
|
dayjs.extend(weekday);
|
|
@@ -31589,12 +31704,12 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
31589
31704
|
if (state.configuration.mergeFields && state.data) {
|
|
31590
31705
|
for (var i = 0; i < data.length; i++) {
|
|
31591
31706
|
var dt = flatten(data[i]);
|
|
31592
|
-
var _iterator = _createForOfIteratorHelper$
|
|
31707
|
+
var _iterator = _createForOfIteratorHelper$L(state.configuration.mergeFields),
|
|
31593
31708
|
_step;
|
|
31594
31709
|
try {
|
|
31595
31710
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
31596
31711
|
var merge = _step.value;
|
|
31597
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
31712
|
+
var _iterator2 = _createForOfIteratorHelper$L(merge.valueKeys),
|
|
31598
31713
|
_step2;
|
|
31599
31714
|
try {
|
|
31600
31715
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -31644,7 +31759,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
31644
31759
|
if (data && data.length > 0) {
|
|
31645
31760
|
data = data.map(function (dt) {
|
|
31646
31761
|
var _ref2, _dt$catalogItem;
|
|
31647
|
-
return _objectSpread$
|
|
31762
|
+
return _objectSpread$20(_objectSpread$20({}, dt), {}, {
|
|
31648
31763
|
catalogItem: (_ref2 = (_dt$catalogItem = dt.catalogItem) !== null && _dt$catalogItem !== void 0 ? _dt$catalogItem : state.catalogItem) !== null && _ref2 !== void 0 ? _ref2 : null
|
|
31649
31764
|
});
|
|
31650
31765
|
});
|
|
@@ -31800,13 +31915,13 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
31800
31915
|
// Convert to Dayjs
|
|
31801
31916
|
(_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 && _state$globalFilter4[0] ? dayjs((_state$globalFilter5 = state.globalFilter) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5.timeStamp) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5['toTimeStamp']) === null || _state$globalFilter5 === void 0 ? void 0 : _state$globalFilter5[0]) : dayjs(new Date()) // Convert to Dayjs
|
|
31802
31917
|
]
|
|
31803
|
-
}), selectFilter && (selectFilter.selectVariant === 'select' ? /*#__PURE__*/jsx(LookupSelect, _objectSpread$
|
|
31918
|
+
}), selectFilter && (selectFilter.selectVariant === 'select' ? /*#__PURE__*/jsx(LookupSelect, _objectSpread$20(_objectSpread$20({}, selectFilter.settings), {}, {
|
|
31804
31919
|
minWidth: "200px",
|
|
31805
31920
|
value: (_state$globalFilter$s = state.globalFilter.select) === null || _state$globalFilter$s === void 0 || (_state$globalFilter$s = _state$globalFilter$s[selectFilter.filterField]) === null || _state$globalFilter$s === void 0 ? void 0 : _state$globalFilter$s[0],
|
|
31806
31921
|
onChange: function onChange(selected) {
|
|
31807
31922
|
state.onGlobalFilterSelect(normalizeTableFilterSelectValue(selected, selectFilter.filterField));
|
|
31808
31923
|
}
|
|
31809
|
-
})) : /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
31924
|
+
})) : /*#__PURE__*/jsx(SimpleSelect, _objectSpread$20(_objectSpread$20({}, selectFilter.settings), {}, {
|
|
31810
31925
|
style: {
|
|
31811
31926
|
minWidth: '200px'
|
|
31812
31927
|
},
|
|
@@ -31916,7 +32031,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
31916
32031
|
root: tableLoadingSpin
|
|
31917
32032
|
}
|
|
31918
32033
|
},
|
|
31919
|
-
pagination: _objectSpread$
|
|
32034
|
+
pagination: _objectSpread$20(_objectSpread$20({}, state.pagination), {}, {
|
|
31920
32035
|
showTotal: function showTotal(total, range) {
|
|
31921
32036
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
31922
32037
|
},
|
|
@@ -32014,7 +32129,7 @@ function CopyButton(_ref5) {
|
|
|
32014
32129
|
case 0:
|
|
32015
32130
|
copyAction = state.configuration.copyAction;
|
|
32016
32131
|
if (((_state$configuration$20 = state.configuration.copyAction) === null || _state$configuration$20 === void 0 ? void 0 : _state$configuration$20.apiInterface) != undefined) {
|
|
32017
|
-
_iterator3 = _createForOfIteratorHelper$
|
|
32132
|
+
_iterator3 = _createForOfIteratorHelper$L(state.selected);
|
|
32018
32133
|
try {
|
|
32019
32134
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
32020
32135
|
selectedRow = _step3.value;
|
|
@@ -32145,7 +32260,7 @@ function BulkAction(_ref8) {
|
|
|
32145
32260
|
var allowed = useMemo(function () {
|
|
32146
32261
|
// if isValue is not set check if all fields have the same value, otherwise check if all fields have the given isValue
|
|
32147
32262
|
if (!action.rule) return true;
|
|
32148
|
-
var _iterator4 = _createForOfIteratorHelper$
|
|
32263
|
+
var _iterator4 = _createForOfIteratorHelper$L(action.rule),
|
|
32149
32264
|
_step4;
|
|
32150
32265
|
try {
|
|
32151
32266
|
var _loop = function _loop() {
|
|
@@ -32250,7 +32365,7 @@ function BulkAction(_ref8) {
|
|
|
32250
32365
|
}
|
|
32251
32366
|
_context5.t0 = data;
|
|
32252
32367
|
_context5.next = 14;
|
|
32253
|
-
return apiInterface.update(_objectSpread$
|
|
32368
|
+
return apiInterface.update(_objectSpread$20(_objectSpread$20({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
32254
32369
|
case 14:
|
|
32255
32370
|
_context5.t1 = _context5.sent;
|
|
32256
32371
|
_context5.t0.push.call(_context5.t0, _context5.t1);
|
|
@@ -32368,11 +32483,11 @@ function SelectionText(_ref10) {
|
|
|
32368
32483
|
});
|
|
32369
32484
|
}
|
|
32370
32485
|
|
|
32371
|
-
function _createForOfIteratorHelper$
|
|
32372
|
-
function _unsupportedIterableToArray$
|
|
32373
|
-
function _arrayLikeToArray$
|
|
32374
|
-
function ownKeys$
|
|
32375
|
-
function _objectSpread$
|
|
32486
|
+
function _createForOfIteratorHelper$K(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$K(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; } } }; }
|
|
32487
|
+
function _unsupportedIterableToArray$K(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$K(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$K(r, a) : void 0; } }
|
|
32488
|
+
function _arrayLikeToArray$K(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; }
|
|
32489
|
+
function ownKeys$1$(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; }
|
|
32490
|
+
function _objectSpread$1$(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1$(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1$(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32376
32491
|
function getColumnFilterProps (_ref) {
|
|
32377
32492
|
var filter = _ref.filter,
|
|
32378
32493
|
title = _ref.title;
|
|
@@ -32744,7 +32859,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
32744
32859
|
});
|
|
32745
32860
|
},
|
|
32746
32861
|
options: filter.map(function (f) {
|
|
32747
|
-
return _objectSpread$
|
|
32862
|
+
return _objectSpread$1$(_objectSpread$1$({}, f), {}, {
|
|
32748
32863
|
label: t(f.label)
|
|
32749
32864
|
});
|
|
32750
32865
|
})
|
|
@@ -32785,7 +32900,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
32785
32900
|
var getMultiSelectDisplayValues = function getMultiSelectDisplayValues(selectedKeys, filter) {
|
|
32786
32901
|
var values = selectedKeys[selectedKeys.length - 1] === 'in' ? selectedKeys.slice(0, -1) : selectedKeys;
|
|
32787
32902
|
var displayValues = [];
|
|
32788
|
-
var _iterator = _createForOfIteratorHelper$
|
|
32903
|
+
var _iterator = _createForOfIteratorHelper$K(values),
|
|
32789
32904
|
_step;
|
|
32790
32905
|
try {
|
|
32791
32906
|
var _loop = function _loop() {
|
|
@@ -32823,7 +32938,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
32823
32938
|
t = _useTranslation3.t;
|
|
32824
32939
|
var options = [];
|
|
32825
32940
|
options = filter.map(function (f) {
|
|
32826
|
-
return _objectSpread$
|
|
32941
|
+
return _objectSpread$1$(_objectSpread$1$({}, f), {}, {
|
|
32827
32942
|
label: t(f.label)
|
|
32828
32943
|
});
|
|
32829
32944
|
});
|
|
@@ -32894,8 +33009,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
32894
33009
|
};
|
|
32895
33010
|
};
|
|
32896
33011
|
|
|
32897
|
-
function ownKeys$
|
|
32898
|
-
function _objectSpread$
|
|
33012
|
+
function ownKeys$1_(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; }
|
|
33013
|
+
function _objectSpread$1_(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1_(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1_(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32899
33014
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter, filterState) {
|
|
32900
33015
|
var columns = configuration.columns.filter(function (c) {
|
|
32901
33016
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -32953,7 +33068,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
32953
33068
|
function mapColumn(column, onUpdate, filterState) {
|
|
32954
33069
|
var _column$field, _filterState$filters$, _filterState$filters, _column$children;
|
|
32955
33070
|
var key = column.field || column.title;
|
|
32956
|
-
return _objectSpread$
|
|
33071
|
+
return _objectSpread$1_(_objectSpread$1_(_objectSpread$1_(_objectSpread$1_({}, column), {}, {
|
|
32957
33072
|
hidden: false,
|
|
32958
33073
|
width: column.width || 100,
|
|
32959
33074
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
@@ -33014,8 +33129,8 @@ function updateData (_ref) {
|
|
|
33014
33129
|
};
|
|
33015
33130
|
}
|
|
33016
33131
|
|
|
33017
|
-
function ownKeys$
|
|
33018
|
-
function _objectSpread$
|
|
33132
|
+
function ownKeys$1Z(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; }
|
|
33133
|
+
function _objectSpread$1Z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1Z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1Z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33019
33134
|
function applyFilterAndSortation (_ref) {
|
|
33020
33135
|
var data = _ref.data,
|
|
33021
33136
|
filters = _ref.filters,
|
|
@@ -33030,7 +33145,7 @@ function applyFilterAndSortation (_ref) {
|
|
|
33030
33145
|
processedData = sort(sorter || [], processedData);
|
|
33031
33146
|
return {
|
|
33032
33147
|
data: processedData,
|
|
33033
|
-
pagination: _objectSpread$
|
|
33148
|
+
pagination: _objectSpread$1Z(_objectSpread$1Z({}, pagination), {}, {
|
|
33034
33149
|
total: processedData.length
|
|
33035
33150
|
})
|
|
33036
33151
|
};
|
|
@@ -33115,8 +33230,8 @@ function filter(f, data) {
|
|
|
33115
33230
|
}
|
|
33116
33231
|
|
|
33117
33232
|
var _excluded$e = ["_id"];
|
|
33118
|
-
function ownKeys$
|
|
33119
|
-
function _objectSpread$
|
|
33233
|
+
function ownKeys$1Y(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; }
|
|
33234
|
+
function _objectSpread$1Y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1Y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1Y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33120
33235
|
function useTableData$1 (_ref) {
|
|
33121
33236
|
var _configuration$apiInt;
|
|
33122
33237
|
var id = _ref.id;
|
|
@@ -33171,7 +33286,7 @@ function useTableData$1 (_ref) {
|
|
|
33171
33286
|
var _configuration$create;
|
|
33172
33287
|
if (!dataRow) return;
|
|
33173
33288
|
var id = v4();
|
|
33174
|
-
var processedDataRow = unflatten(_objectSpread$
|
|
33289
|
+
var processedDataRow = unflatten(_objectSpread$1Y({
|
|
33175
33290
|
_id: id,
|
|
33176
33291
|
ID: id
|
|
33177
33292
|
}, dataRow));
|
|
@@ -33183,11 +33298,11 @@ function useTableData$1 (_ref) {
|
|
|
33183
33298
|
newData = _updateData.data;
|
|
33184
33299
|
_updateData.prevDataRow;
|
|
33185
33300
|
_updateData.index;
|
|
33186
|
-
var newState = _objectSpread$
|
|
33301
|
+
var newState = _objectSpread$1Y(_objectSpread$1Y({}, state), {}, {
|
|
33187
33302
|
data: newData
|
|
33188
33303
|
});
|
|
33189
33304
|
if (!filterServerSide) {
|
|
33190
|
-
var res = applyFilterAndSortation(_objectSpread$
|
|
33305
|
+
var res = applyFilterAndSortation(_objectSpread$1Y(_objectSpread$1Y({}, filterData), {}, {
|
|
33191
33306
|
data: newData
|
|
33192
33307
|
}));
|
|
33193
33308
|
newState.data = res.data;
|
|
@@ -33199,33 +33314,33 @@ function useTableData$1 (_ref) {
|
|
|
33199
33314
|
var formData = new FormData();
|
|
33200
33315
|
processedDataRow._id;
|
|
33201
33316
|
var value = _objectWithoutProperties(processedDataRow, _excluded$e);
|
|
33202
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
33317
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$1Y(_objectSpread$1Y({}, catalogItem), {}, {
|
|
33203
33318
|
filterContex: filterContex,
|
|
33204
33319
|
value: JSON.stringify([value])
|
|
33205
33320
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
33206
33321
|
if (d && d.Result && d.Result == 'Success') return;
|
|
33207
|
-
setState(_objectSpread$
|
|
33322
|
+
setState(_objectSpread$1Y({}, oldState));
|
|
33208
33323
|
});
|
|
33209
33324
|
}, [state, catalogItem, filterData]);
|
|
33210
33325
|
useEffect(function () {
|
|
33211
33326
|
if (!catalogItem) return;
|
|
33212
|
-
setState(_objectSpread$
|
|
33327
|
+
setState(_objectSpread$1Y(_objectSpread$1Y({}, state), {}, {
|
|
33213
33328
|
loading: true,
|
|
33214
|
-
mappingData: _objectSpread$
|
|
33329
|
+
mappingData: _objectSpread$1Y(_objectSpread$1Y({}, catalogItem), {}, {
|
|
33215
33330
|
filterContex: filterContex
|
|
33216
33331
|
})
|
|
33217
33332
|
}));
|
|
33218
33333
|
if (!filterServerSide) {
|
|
33219
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
33334
|
+
apiHandler.readList(configuration.mapping, _objectSpread$1Y(_objectSpread$1Y({}, catalogItem), {}, {
|
|
33220
33335
|
filterContex: filterContex
|
|
33221
33336
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
33222
33337
|
var newData = data.data.map(function (d) {
|
|
33223
|
-
return _objectSpread$
|
|
33338
|
+
return _objectSpread$1Y(_objectSpread$1Y({}, d), {}, {
|
|
33224
33339
|
_id: d._id || d.ID || nanoid()
|
|
33225
33340
|
});
|
|
33226
33341
|
});
|
|
33227
33342
|
onChange({
|
|
33228
|
-
pagination: _objectSpread$
|
|
33343
|
+
pagination: _objectSpread$1Y({}, state.pagination),
|
|
33229
33344
|
filters: {},
|
|
33230
33345
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
33231
33346
|
return c.defaultSortOrder;
|
|
@@ -33241,7 +33356,7 @@ function useTableData$1 (_ref) {
|
|
|
33241
33356
|
});
|
|
33242
33357
|
} else {
|
|
33243
33358
|
onChange({
|
|
33244
|
-
pagination: _objectSpread$
|
|
33359
|
+
pagination: _objectSpread$1Y({}, state.pagination),
|
|
33245
33360
|
filters: {},
|
|
33246
33361
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
33247
33362
|
return c.defaultSortOrder;
|
|
@@ -33257,17 +33372,17 @@ function useTableData$1 (_ref) {
|
|
|
33257
33372
|
}
|
|
33258
33373
|
}, [filterContex, catalogItem]);
|
|
33259
33374
|
var onChange = function onChange(p, dataParam) {
|
|
33260
|
-
setState(_objectSpread$
|
|
33375
|
+
setState(_objectSpread$1Y(_objectSpread$1Y({}, state), {}, {
|
|
33261
33376
|
loading: true
|
|
33262
33377
|
}));
|
|
33263
33378
|
if (!filterServerSide) {
|
|
33264
33379
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
33265
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
33380
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$1Y(_objectSpread$1Y({}, p), {}, {
|
|
33266
33381
|
data: unfilteredData
|
|
33267
33382
|
})),
|
|
33268
33383
|
data = _applyFilterAndSortat.data,
|
|
33269
33384
|
pagination = _applyFilterAndSortat.pagination;
|
|
33270
|
-
setState(_objectSpread$
|
|
33385
|
+
setState(_objectSpread$1Y(_objectSpread$1Y({}, state), {}, {
|
|
33271
33386
|
data: data,
|
|
33272
33387
|
pagination: pagination,
|
|
33273
33388
|
loading: false,
|
|
@@ -33278,20 +33393,20 @@ function useTableData$1 (_ref) {
|
|
|
33278
33393
|
sorter: p.sorter
|
|
33279
33394
|
});
|
|
33280
33395
|
} else {
|
|
33281
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
33396
|
+
apiHandler.readList(configuration.mapping, _objectSpread$1Y(_objectSpread$1Y({}, catalogItem), {}, {
|
|
33282
33397
|
filterContex: filterContex
|
|
33283
33398
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
33284
|
-
setState(_objectSpread$
|
|
33399
|
+
setState(_objectSpread$1Y(_objectSpread$1Y({}, state), {}, {
|
|
33285
33400
|
data: data.data.map(function (dt) {
|
|
33286
|
-
return _objectSpread$
|
|
33401
|
+
return _objectSpread$1Y(_objectSpread$1Y({}, dt), {}, {
|
|
33287
33402
|
_id: dt._id || dt.ID || nanoid()
|
|
33288
33403
|
});
|
|
33289
33404
|
}),
|
|
33290
|
-
pagination: _objectSpread$
|
|
33405
|
+
pagination: _objectSpread$1Y(_objectSpread$1Y({}, p.pagination), {}, {
|
|
33291
33406
|
total: data.total
|
|
33292
33407
|
}),
|
|
33293
33408
|
loading: false,
|
|
33294
|
-
mappingData: _objectSpread$
|
|
33409
|
+
mappingData: _objectSpread$1Y(_objectSpread$1Y({}, catalogItem), {}, {
|
|
33295
33410
|
filterContex: filterContex
|
|
33296
33411
|
})
|
|
33297
33412
|
}));
|
|
@@ -33312,7 +33427,7 @@ function useTableData$1 (_ref) {
|
|
|
33312
33427
|
filters['_id'] = [id, 'eq', false];
|
|
33313
33428
|
_context.next = 4;
|
|
33314
33429
|
return apiHandler.readList(configuration.mapping, {
|
|
33315
|
-
pagination: _objectSpread$
|
|
33430
|
+
pagination: _objectSpread$1Y({}, state.pagination),
|
|
33316
33431
|
columns: configuration.columns,
|
|
33317
33432
|
filters: filters,
|
|
33318
33433
|
sorter: filterData.sorter
|
|
@@ -33331,7 +33446,7 @@ function useTableData$1 (_ref) {
|
|
|
33331
33446
|
};
|
|
33332
33447
|
}();
|
|
33333
33448
|
var onSelect = function onSelect(keys) {
|
|
33334
|
-
setState(_objectSpread$
|
|
33449
|
+
setState(_objectSpread$1Y(_objectSpread$1Y({}, state), {}, {
|
|
33335
33450
|
selected: keys
|
|
33336
33451
|
}));
|
|
33337
33452
|
};
|
|
@@ -33341,7 +33456,7 @@ function useTableData$1 (_ref) {
|
|
|
33341
33456
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
33342
33457
|
while (1) switch (_context3.prev = _context3.next) {
|
|
33343
33458
|
case 0:
|
|
33344
|
-
setState(_objectSpread$
|
|
33459
|
+
setState(_objectSpread$1Y(_objectSpread$1Y({}, state), {}, {
|
|
33345
33460
|
deleting: true
|
|
33346
33461
|
}));
|
|
33347
33462
|
newData = _toConsumableArray(state.data);
|
|
@@ -33356,7 +33471,7 @@ function useTableData$1 (_ref) {
|
|
|
33356
33471
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
33357
33472
|
return nd._id === state.selected[index];
|
|
33358
33473
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
33359
|
-
mappingData = _objectSpread$
|
|
33474
|
+
mappingData = _objectSpread$1Y(_objectSpread$1Y({}, mappingData), state.mappingData);
|
|
33360
33475
|
_context2.next = 5;
|
|
33361
33476
|
return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid);
|
|
33362
33477
|
case 5:
|
|
@@ -33406,7 +33521,7 @@ function useTableData$1 (_ref) {
|
|
|
33406
33521
|
}
|
|
33407
33522
|
_context3.next = 18;
|
|
33408
33523
|
return apiHandler.readList(configuration.mapping, {
|
|
33409
|
-
pagination: _objectSpread$
|
|
33524
|
+
pagination: _objectSpread$1Y(_objectSpread$1Y({}, state.pagination), {}, {
|
|
33410
33525
|
current: current
|
|
33411
33526
|
}),
|
|
33412
33527
|
columns: configuration.columns,
|
|
@@ -33418,11 +33533,11 @@ function useTableData$1 (_ref) {
|
|
|
33418
33533
|
newData = data.data;
|
|
33419
33534
|
total = data.total;
|
|
33420
33535
|
case 21:
|
|
33421
|
-
setState(_objectSpread$
|
|
33536
|
+
setState(_objectSpread$1Y(_objectSpread$1Y({}, state), {}, {
|
|
33422
33537
|
selected: [],
|
|
33423
33538
|
deleting: false,
|
|
33424
33539
|
data: newData,
|
|
33425
|
-
pagination: _objectSpread$
|
|
33540
|
+
pagination: _objectSpread$1Y(_objectSpread$1Y({}, state.pagination), {}, {
|
|
33426
33541
|
current: current,
|
|
33427
33542
|
total: total
|
|
33428
33543
|
})
|
|
@@ -33438,12 +33553,12 @@ function useTableData$1 (_ref) {
|
|
|
33438
33553
|
};
|
|
33439
33554
|
}();
|
|
33440
33555
|
function setLoading() {
|
|
33441
|
-
setState(_objectSpread$
|
|
33556
|
+
setState(_objectSpread$1Y(_objectSpread$1Y({}, state), {}, {
|
|
33442
33557
|
loading: true
|
|
33443
33558
|
}));
|
|
33444
33559
|
}
|
|
33445
|
-
return _objectSpread$
|
|
33446
|
-
configuration: _objectSpread$
|
|
33560
|
+
return _objectSpread$1Y(_objectSpread$1Y({}, state), {}, {
|
|
33561
|
+
configuration: _objectSpread$1Y(_objectSpread$1Y({}, configuration), {}, {
|
|
33447
33562
|
title: undefined
|
|
33448
33563
|
}),
|
|
33449
33564
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -33539,8 +33654,8 @@ var translation = {
|
|
|
33539
33654
|
SUPPLIER: 'backoffice.translation.supplier'
|
|
33540
33655
|
};
|
|
33541
33656
|
|
|
33542
|
-
function ownKeys$
|
|
33543
|
-
function _objectSpread$
|
|
33657
|
+
function ownKeys$1X(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; }
|
|
33658
|
+
function _objectSpread$1X(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1X(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1X(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33544
33659
|
/**
|
|
33545
33660
|
* Route/menu-driven overrides for a single shared table module (e.g. list URL filter on `read.list`, default create payload).
|
|
33546
33661
|
*/
|
|
@@ -33548,10 +33663,10 @@ function mergeTableConfiguration(base, readListUrl, genericType) {
|
|
|
33548
33663
|
if (!readListUrl && !genericType) {
|
|
33549
33664
|
return base;
|
|
33550
33665
|
}
|
|
33551
|
-
var next = _objectSpread$
|
|
33666
|
+
var next = _objectSpread$1X({}, base);
|
|
33552
33667
|
if (readListUrl && _typeof(next.apiInterface) === 'object' && next.apiInterface.read && _typeof(next.apiInterface.read) === 'object') {
|
|
33553
|
-
next.apiInterface = _objectSpread$
|
|
33554
|
-
read: _objectSpread$
|
|
33668
|
+
next.apiInterface = _objectSpread$1X(_objectSpread$1X({}, next.apiInterface), {}, {
|
|
33669
|
+
read: _objectSpread$1X(_objectSpread$1X({}, next.apiInterface.read), {}, {
|
|
33555
33670
|
list: readListUrl
|
|
33556
33671
|
})
|
|
33557
33672
|
});
|
|
@@ -33581,11 +33696,11 @@ function objectHash (obj) {
|
|
|
33581
33696
|
return hash(hashable);
|
|
33582
33697
|
}
|
|
33583
33698
|
|
|
33584
|
-
function _createForOfIteratorHelper$
|
|
33585
|
-
function _unsupportedIterableToArray$
|
|
33586
|
-
function _arrayLikeToArray$
|
|
33587
|
-
function ownKeys$
|
|
33588
|
-
function _objectSpread$
|
|
33699
|
+
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; } } }; }
|
|
33700
|
+
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; } }
|
|
33701
|
+
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; }
|
|
33702
|
+
function ownKeys$1W(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; }
|
|
33703
|
+
function _objectSpread$1W(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1W(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1W(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33589
33704
|
var LOG$g = getLogger('Backoffice', 'TableData');
|
|
33590
33705
|
function useTableData (_ref) {
|
|
33591
33706
|
var _persistedTableState$, _configuration$filter, _configuration$filter2, _ref2, _configuration$filter3, _configuration$filter4, _configuration$filter5, _ref3, _configuration$filter6, _configuration$filter7, _configuration$filter8, _persistedTableState$2, _configuration$filter9, _configuration$filter10, _persistedTableState$3, _configuration$bulkAc, _configuration$apiInt, _ref5, _configuration$readMa;
|
|
@@ -33606,8 +33721,8 @@ function useTableData (_ref) {
|
|
|
33606
33721
|
var apiHandler = useMemo(function () {
|
|
33607
33722
|
if (configProp) {
|
|
33608
33723
|
// Store entry is minimal (type+title only); pass the full apiInterface directly
|
|
33609
|
-
var apiInterface = readListUrlOverride && _typeof(configProp.apiInterface) === 'object' && configProp.apiInterface.read ? _objectSpread$
|
|
33610
|
-
read: _objectSpread$
|
|
33724
|
+
var apiInterface = readListUrlOverride && _typeof(configProp.apiInterface) === 'object' && configProp.apiInterface.read ? _objectSpread$1W(_objectSpread$1W({}, configProp.apiInterface), {}, {
|
|
33725
|
+
read: _objectSpread$1W(_objectSpread$1W({}, configProp.apiInterface.read), {}, {
|
|
33611
33726
|
list: readListUrlOverride
|
|
33612
33727
|
})
|
|
33613
33728
|
}) : configProp.apiInterface;
|
|
@@ -33618,8 +33733,8 @@ function useTableData (_ref) {
|
|
|
33618
33733
|
}
|
|
33619
33734
|
var base = baseConfiguration;
|
|
33620
33735
|
if (_typeof(base.apiInterface) === 'object' && base.apiInterface.read && _typeof(base.apiInterface.read) === 'object') {
|
|
33621
|
-
return root.getApiHandler(id, _objectSpread$
|
|
33622
|
-
read: _objectSpread$
|
|
33736
|
+
return root.getApiHandler(id, _objectSpread$1W(_objectSpread$1W({}, base.apiInterface), {}, {
|
|
33737
|
+
read: _objectSpread$1W(_objectSpread$1W({}, base.apiInterface.read), {}, {
|
|
33623
33738
|
list: readListUrlOverride
|
|
33624
33739
|
})
|
|
33625
33740
|
}));
|
|
@@ -33673,7 +33788,7 @@ function useTableData (_ref) {
|
|
|
33673
33788
|
var _useState13 = useState({
|
|
33674
33789
|
loading: true,
|
|
33675
33790
|
deleting: false,
|
|
33676
|
-
pagination: _objectSpread$
|
|
33791
|
+
pagination: _objectSpread$1W(_objectSpread$1W({
|
|
33677
33792
|
current: 1,
|
|
33678
33793
|
pageSize: 20,
|
|
33679
33794
|
total: 0,
|
|
@@ -33682,7 +33797,7 @@ function useTableData (_ref) {
|
|
|
33682
33797
|
selected: (_persistedTableState$3 = persistedTableState === null || persistedTableState === void 0 ? void 0 : persistedTableState.selected) !== null && _persistedTableState$3 !== void 0 ? _persistedTableState$3 : [],
|
|
33683
33798
|
canDelete: !!apiHandler.canDelete,
|
|
33684
33799
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
33685
|
-
mappingData: _objectSpread$
|
|
33800
|
+
mappingData: _objectSpread$1W(_objectSpread$1W({}, parentData), {}, {
|
|
33686
33801
|
prefilter: {
|
|
33687
33802
|
select: globalFilter.select
|
|
33688
33803
|
},
|
|
@@ -33693,7 +33808,7 @@ function useTableData (_ref) {
|
|
|
33693
33808
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
33694
33809
|
state = _useState14[0],
|
|
33695
33810
|
setState = _useState14[1];
|
|
33696
|
-
var mappingData = _objectSpread$
|
|
33811
|
+
var mappingData = _objectSpread$1W(_objectSpread$1W(_objectSpread$1W({}, parentData), state.data), {}, {
|
|
33697
33812
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
33698
33813
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
33699
33814
|
});
|
|
@@ -33733,7 +33848,7 @@ function useTableData (_ref) {
|
|
|
33733
33848
|
}
|
|
33734
33849
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
33735
33850
|
var newInitData = initData;
|
|
33736
|
-
var newState = _objectSpread$
|
|
33851
|
+
var newState = _objectSpread$1W({}, state);
|
|
33737
33852
|
var selected = [];
|
|
33738
33853
|
if (configuration.deselectOnUpdate == false) {
|
|
33739
33854
|
selected = state.selected;
|
|
@@ -33750,7 +33865,7 @@ function useTableData (_ref) {
|
|
|
33750
33865
|
dataRow: dataRow
|
|
33751
33866
|
}),
|
|
33752
33867
|
_data = _updateData.data;
|
|
33753
|
-
newState = _objectSpread$
|
|
33868
|
+
newState = _objectSpread$1W(_objectSpread$1W({}, newState), {}, {
|
|
33754
33869
|
data: _data,
|
|
33755
33870
|
selected: selected
|
|
33756
33871
|
});
|
|
@@ -33762,8 +33877,8 @@ function useTableData (_ref) {
|
|
|
33762
33877
|
dataRow: dataRow
|
|
33763
33878
|
}),
|
|
33764
33879
|
nextInitData = _updateData2.data;
|
|
33765
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
33766
|
-
filters: _objectSpread$
|
|
33880
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$1W(_objectSpread$1W(_objectSpread$1W({}, filterData), {}, {
|
|
33881
|
+
filters: _objectSpread$1W(_objectSpread$1W(_objectSpread$1W(_objectSpread$1W(_objectSpread$1W(_objectSpread$1W({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter12 = configuration.filter) !== null && _configuration$filter12 !== void 0 && (_configuration$filter12 = _configuration$filter12.toggle) !== null && _configuration$filter12 !== void 0 && _configuration$filter12.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
|
|
33767
33882
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter13 = configuration.filter) !== null && _configuration$filter13 !== void 0 && (_configuration$filter13 = _configuration$filter13.toggle) !== null && _configuration$filter13 !== void 0 && _configuration$filter13.inQuery ? {
|
|
33768
33883
|
genericProps: globalFilter.toggle
|
|
33769
33884
|
} : undefined), {}, {
|
|
@@ -33773,7 +33888,7 @@ function useTableData (_ref) {
|
|
|
33773
33888
|
_data2 = _applyFilterAndSortat.data,
|
|
33774
33889
|
pagination = _applyFilterAndSortat.pagination;
|
|
33775
33890
|
newInitData = nextInitData;
|
|
33776
|
-
newState = _objectSpread$
|
|
33891
|
+
newState = _objectSpread$1W(_objectSpread$1W({}, newState), {}, {
|
|
33777
33892
|
pagination: pagination,
|
|
33778
33893
|
data: _data2,
|
|
33779
33894
|
selected: selected
|
|
@@ -33783,8 +33898,8 @@ function useTableData (_ref) {
|
|
|
33783
33898
|
if (apiHandler.canCreate) {
|
|
33784
33899
|
apiCreate(data).then(function (res) {
|
|
33785
33900
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
33786
|
-
initData && setInitData(_objectSpread$
|
|
33787
|
-
setState(_objectSpread$
|
|
33901
|
+
initData && setInitData(_objectSpread$1W({}, initData));
|
|
33902
|
+
setState(_objectSpread$1W({}, state));
|
|
33788
33903
|
}
|
|
33789
33904
|
});
|
|
33790
33905
|
}
|
|
@@ -33797,7 +33912,7 @@ function useTableData (_ref) {
|
|
|
33797
33912
|
var triggerRefresh = function triggerRefresh() {
|
|
33798
33913
|
var _configuration$filter14;
|
|
33799
33914
|
setError(undefined);
|
|
33800
|
-
var newGlobalFilter = _objectSpread$
|
|
33915
|
+
var newGlobalFilter = _objectSpread$1W({}, globalFilter);
|
|
33801
33916
|
//on refresh update default filter, since global value can change
|
|
33802
33917
|
if ((_configuration$filter14 = configuration.filter) !== null && _configuration$filter14 !== void 0 && _configuration$filter14["default"]) {
|
|
33803
33918
|
var _configuration$filter15;
|
|
@@ -33808,7 +33923,7 @@ function useTableData (_ref) {
|
|
|
33808
33923
|
newGlobalFilter["default"] = _defaultFilter;
|
|
33809
33924
|
setGlobaFilter(newGlobalFilter);
|
|
33810
33925
|
}
|
|
33811
|
-
onChange(_objectSpread$
|
|
33926
|
+
onChange(_objectSpread$1W({
|
|
33812
33927
|
pagination: state.pagination
|
|
33813
33928
|
}, filterData), newGlobalFilter, true);
|
|
33814
33929
|
};
|
|
@@ -33826,7 +33941,7 @@ function useTableData (_ref) {
|
|
|
33826
33941
|
order: c.defaultSortOrder
|
|
33827
33942
|
};
|
|
33828
33943
|
});
|
|
33829
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
33944
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$1W(_objectSpread$1W({}, state), {}, {
|
|
33830
33945
|
loading: false
|
|
33831
33946
|
}));else {
|
|
33832
33947
|
var _persistedTableState$4, _persistedTableState$5, _persistedTableState$6, _persistedTableState$7;
|
|
@@ -33881,7 +33996,7 @@ function useTableData (_ref) {
|
|
|
33881
33996
|
case 0:
|
|
33882
33997
|
filters = {};
|
|
33883
33998
|
filters['_id'] = [id, 'eq', false];
|
|
33884
|
-
ssf = _objectSpread$
|
|
33999
|
+
ssf = _objectSpread$1W({
|
|
33885
34000
|
pagination: {
|
|
33886
34001
|
current: 1,
|
|
33887
34002
|
pageSize: 1
|
|
@@ -33892,7 +34007,7 @@ function useTableData (_ref) {
|
|
|
33892
34007
|
genericProps: globalFilter.toggle
|
|
33893
34008
|
} : undefined);
|
|
33894
34009
|
_context2.next = 5;
|
|
33895
|
-
return apiHandler.readList(readMapping, _objectSpread$
|
|
34010
|
+
return apiHandler.readList(readMapping, _objectSpread$1W(_objectSpread$1W({}, mappingData), state.mappingData), ssf);
|
|
33896
34011
|
case 5:
|
|
33897
34012
|
data = _context2.sent;
|
|
33898
34013
|
return _context2.abrupt("return", data);
|
|
@@ -33936,12 +34051,12 @@ function useTableData (_ref) {
|
|
|
33936
34051
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
33937
34052
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
33938
34053
|
overwriteMappingData = _args3.length > 4 ? _args3[4] : undefined;
|
|
33939
|
-
setState(_objectSpread$
|
|
34054
|
+
setState(_objectSpread$1W(_objectSpread$1W({}, state), {}, {
|
|
33940
34055
|
mappingData: overwriteMappingData !== null && overwriteMappingData !== void 0 ? overwriteMappingData : state.mappingData,
|
|
33941
34056
|
loading: true
|
|
33942
34057
|
}));
|
|
33943
34058
|
currentData = initData;
|
|
33944
|
-
filterData = _objectSpread$
|
|
34059
|
+
filterData = _objectSpread$1W(_objectSpread$1W(_objectSpread$1W(_objectSpread$1W({}, prefilter.search), ((_configuration$filter17 = configuration.filter) === null || _configuration$filter17 === void 0 || (_configuration$filter17 = _configuration$filter17.select) === null || _configuration$filter17 === void 0 ? void 0 : _configuration$filter17.applyDefaultValue) !== false || ((_configuration$filter18 = configuration.filter) === null || _configuration$filter18 === void 0 || (_configuration$filter18 = _configuration$filter18.select) === null || _configuration$filter18 === void 0 ? void 0 : _configuration$filter18.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter19 = (_configuration$filter20 = configuration.filter) === null || _configuration$filter20 === void 0 || (_configuration$filter20 = _configuration$filter20.select) === null || _configuration$filter20 === void 0 ? void 0 : _configuration$filter20.filterField) !== null && _configuration$filter19 !== void 0 ? _configuration$filter19 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
|
|
33945
34060
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref9) {
|
|
33946
34061
|
var _ref10 = _slicedToArray(_ref9, 2);
|
|
33947
34062
|
_ref10[0];
|
|
@@ -33949,7 +34064,7 @@ function useTableData (_ref) {
|
|
|
33949
34064
|
return v != null;
|
|
33950
34065
|
}));
|
|
33951
34066
|
currentFilterHash = objectHash(filterData);
|
|
33952
|
-
currentPagination = _objectSpread$
|
|
34067
|
+
currentPagination = _objectSpread$1W(_objectSpread$1W({}, p.pagination), {}, {
|
|
33953
34068
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
33954
34069
|
});
|
|
33955
34070
|
filterHash.current = currentFilterHash;
|
|
@@ -33957,7 +34072,7 @@ function useTableData (_ref) {
|
|
|
33957
34072
|
_context3.next = 21;
|
|
33958
34073
|
break;
|
|
33959
34074
|
}
|
|
33960
|
-
ssf = _objectSpread$
|
|
34075
|
+
ssf = _objectSpread$1W({
|
|
33961
34076
|
pagination: currentPagination,
|
|
33962
34077
|
columns: configuration.columns,
|
|
33963
34078
|
filters: filterData,
|
|
@@ -33966,12 +34081,12 @@ function useTableData (_ref) {
|
|
|
33966
34081
|
genericProps: prefilter.toggle
|
|
33967
34082
|
} : undefined);
|
|
33968
34083
|
_context3.next = 15;
|
|
33969
|
-
return apiHandler.readList(readMapping, _objectSpread$
|
|
34084
|
+
return apiHandler.readList(readMapping, _objectSpread$1W(_objectSpread$1W({}, mappingData), overwriteMappingData), ssf, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid, parseFilter(!(configuration !== null && configuration !== void 0 && (_configuration$filter22 = configuration.filter) !== null && _configuration$filter22 !== void 0 && (_configuration$filter22 = _configuration$filter22.toggle) !== null && _configuration$filter22 !== void 0 && _configuration$filter22.inQuery) ? (_prefilter$toggle = prefilter.toggle) !== null && _prefilter$toggle !== void 0 ? _prefilter$toggle : {} : {}, (_parseFilter = parseFilter(expandFallbackFieldFilters(p.filters, configuration.columns), undefined)) === null || _parseFilter === void 0 ? void 0 : _parseFilter.slice(1, -1)));
|
|
33970
34085
|
case 15:
|
|
33971
34086
|
data = _context3.sent;
|
|
33972
|
-
currentUrl = apiHandler.getReadListUrl(readMapping, _objectSpread$
|
|
34087
|
+
currentUrl = apiHandler.getReadListUrl(readMapping, _objectSpread$1W(_objectSpread$1W({}, mappingData), state.mappingData), ssf);
|
|
33973
34088
|
currentData = data.data;
|
|
33974
|
-
currentPagination = _objectSpread$
|
|
34089
|
+
currentPagination = _objectSpread$1W(_objectSpread$1W({}, currentPagination), {}, {
|
|
33975
34090
|
total: data.total
|
|
33976
34091
|
});
|
|
33977
34092
|
_context3.next = 30;
|
|
@@ -33988,7 +34103,7 @@ function useTableData (_ref) {
|
|
|
33988
34103
|
currentData = _data3.data;
|
|
33989
34104
|
setInitData(currentData);
|
|
33990
34105
|
case 27:
|
|
33991
|
-
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$
|
|
34106
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$1W(_objectSpread$1W({}, p), {}, {
|
|
33992
34107
|
pagination: currentPagination,
|
|
33993
34108
|
filters: filterData,
|
|
33994
34109
|
data: currentData,
|
|
@@ -33997,11 +34112,11 @@ function useTableData (_ref) {
|
|
|
33997
34112
|
currentData = _data4;
|
|
33998
34113
|
currentPagination = pagination;
|
|
33999
34114
|
case 30:
|
|
34000
|
-
setState(_objectSpread$
|
|
34115
|
+
setState(_objectSpread$1W(_objectSpread$1W({}, state), {}, {
|
|
34001
34116
|
loading: false,
|
|
34002
34117
|
data: currentData,
|
|
34003
34118
|
pagination: currentPagination,
|
|
34004
|
-
mappingData: _objectSpread$
|
|
34119
|
+
mappingData: _objectSpread$1W(_objectSpread$1W(_objectSpread$1W(_objectSpread$1W({}, parentData), state.mappingData), overwriteMappingData), {}, {
|
|
34005
34120
|
prefilter: prefilter
|
|
34006
34121
|
}),
|
|
34007
34122
|
currentFetchUrl: currentUrl
|
|
@@ -34023,7 +34138,7 @@ function useTableData (_ref) {
|
|
|
34023
34138
|
};
|
|
34024
34139
|
}();
|
|
34025
34140
|
var onSelect = function onSelect(keys) {
|
|
34026
|
-
setState(_objectSpread$
|
|
34141
|
+
setState(_objectSpread$1W(_objectSpread$1W({}, state), {}, {
|
|
34027
34142
|
selected: keys
|
|
34028
34143
|
}));
|
|
34029
34144
|
};
|
|
@@ -34034,7 +34149,7 @@ function useTableData (_ref) {
|
|
|
34034
34149
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
34035
34150
|
while (1) switch (_context5.prev = _context5.next) {
|
|
34036
34151
|
case 0:
|
|
34037
|
-
setState(_objectSpread$
|
|
34152
|
+
setState(_objectSpread$1W(_objectSpread$1W({}, state), {}, {
|
|
34038
34153
|
deleting: true
|
|
34039
34154
|
}));
|
|
34040
34155
|
newData = _toConsumableArray(state.data);
|
|
@@ -34061,7 +34176,7 @@ function useTableData (_ref) {
|
|
|
34061
34176
|
})) === null || _newData$filter2 === void 0 ? void 0 : _newData$filter2[0];
|
|
34062
34177
|
}
|
|
34063
34178
|
mapToggle = {};
|
|
34064
|
-
_iterator = _createForOfIteratorHelper$
|
|
34179
|
+
_iterator = _createForOfIteratorHelper$J((_configuration$filter25 = (_configuration$filter26 = configuration.filter) === null || _configuration$filter26 === void 0 || (_configuration$filter26 = _configuration$filter26.toggle) === null || _configuration$filter26 === void 0 ? void 0 : _configuration$filter26.fields) !== null && _configuration$filter25 !== void 0 ? _configuration$filter25 : []);
|
|
34065
34180
|
try {
|
|
34066
34181
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
34067
34182
|
field = _step.value;
|
|
@@ -34074,7 +34189,7 @@ function useTableData (_ref) {
|
|
|
34074
34189
|
} finally {
|
|
34075
34190
|
_iterator.f();
|
|
34076
34191
|
}
|
|
34077
|
-
mappingData = _objectSpread$
|
|
34192
|
+
mappingData = _objectSpread$1W(_objectSpread$1W(_objectSpread$1W({}, mappingData), state.mappingData), mapToggle);
|
|
34078
34193
|
deleteResult = undefined;
|
|
34079
34194
|
_context4.prev = 7;
|
|
34080
34195
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -34164,12 +34279,12 @@ function useTableData (_ref) {
|
|
|
34164
34279
|
break;
|
|
34165
34280
|
}
|
|
34166
34281
|
_context5.next = 25;
|
|
34167
|
-
return apiHandler.readList(readMapping, _objectSpread$
|
|
34168
|
-
pagination: _objectSpread$
|
|
34282
|
+
return apiHandler.readList(readMapping, _objectSpread$1W(_objectSpread$1W({}, mappingData), state.mappingData), _objectSpread$1W({
|
|
34283
|
+
pagination: _objectSpread$1W(_objectSpread$1W({}, state.pagination), {}, {
|
|
34169
34284
|
current: current
|
|
34170
34285
|
}),
|
|
34171
34286
|
columns: configuration.columns,
|
|
34172
|
-
filters: _objectSpread$
|
|
34287
|
+
filters: _objectSpread$1W(_objectSpread$1W(_objectSpread$1W(_objectSpread$1W(_objectSpread$1W(_objectSpread$1W({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter23 = configuration.filter) !== null && _configuration$filter23 !== void 0 && (_configuration$filter23 = _configuration$filter23.toggle) !== null && _configuration$filter23 !== void 0 && _configuration$filter23.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
|
|
34173
34288
|
sorter: filterData.sorter
|
|
34174
34289
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter24 = configuration.filter) !== null && _configuration$filter24 !== void 0 && (_configuration$filter24 = _configuration$filter24.toggle) !== null && _configuration$filter24 !== void 0 && _configuration$filter24.inQuery ? {
|
|
34175
34290
|
genericProps: globalFilter.toggle
|
|
@@ -34180,11 +34295,11 @@ function useTableData (_ref) {
|
|
|
34180
34295
|
total = data.total;
|
|
34181
34296
|
case 28:
|
|
34182
34297
|
setInitData(newInitData);
|
|
34183
|
-
setState(_objectSpread$
|
|
34298
|
+
setState(_objectSpread$1W(_objectSpread$1W({}, state), {}, {
|
|
34184
34299
|
selected: [],
|
|
34185
34300
|
deleting: false,
|
|
34186
34301
|
data: newData,
|
|
34187
|
-
pagination: _objectSpread$
|
|
34302
|
+
pagination: _objectSpread$1W(_objectSpread$1W({}, state.pagination), {}, {
|
|
34188
34303
|
current: current === 0 ? 1 : current,
|
|
34189
34304
|
total: total
|
|
34190
34305
|
})
|
|
@@ -34205,7 +34320,7 @@ function useTableData (_ref) {
|
|
|
34205
34320
|
LOG$g.error(new DivaError('No global select filter defiend'));
|
|
34206
34321
|
return;
|
|
34207
34322
|
}
|
|
34208
|
-
var newGlobalFilter = _objectSpread$
|
|
34323
|
+
var newGlobalFilter = _objectSpread$1W({}, globalFilter);
|
|
34209
34324
|
if (value !== null && value !== void 0 && value.length) {
|
|
34210
34325
|
var selectValue = Array.isArray(value) ? value : [value];
|
|
34211
34326
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, selectValue.length > 1 ? [].concat(_toConsumableArray(selectValue), ['in']) : [selectValue[0], selectFilterOperation]);
|
|
@@ -34213,7 +34328,7 @@ function useTableData (_ref) {
|
|
|
34213
34328
|
newGlobalFilter.select = {};
|
|
34214
34329
|
}
|
|
34215
34330
|
setGlobaFilter(newGlobalFilter);
|
|
34216
|
-
onChange(_objectSpread$
|
|
34331
|
+
onChange(_objectSpread$1W({
|
|
34217
34332
|
pagination: state.pagination
|
|
34218
34333
|
}, filterData), newGlobalFilter);
|
|
34219
34334
|
};
|
|
@@ -34224,16 +34339,16 @@ function useTableData (_ref) {
|
|
|
34224
34339
|
return;
|
|
34225
34340
|
}
|
|
34226
34341
|
var toggleFilter = {};
|
|
34227
|
-
var mappingData = _objectSpread$
|
|
34342
|
+
var mappingData = _objectSpread$1W({}, state.mappingData);
|
|
34228
34343
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
34229
34344
|
mappingData[f] = !globalFilter.toggle && configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : undefined;
|
|
34230
34345
|
toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
34231
34346
|
});
|
|
34232
|
-
var newGlobalFilter = _objectSpread$
|
|
34347
|
+
var newGlobalFilter = _objectSpread$1W(_objectSpread$1W({}, globalFilter), {}, {
|
|
34233
34348
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
34234
34349
|
});
|
|
34235
34350
|
setGlobaFilter(newGlobalFilter);
|
|
34236
|
-
onChange(_objectSpread$
|
|
34351
|
+
onChange(_objectSpread$1W({
|
|
34237
34352
|
pagination: state.pagination
|
|
34238
34353
|
}, filterData), newGlobalFilter, true, true, mappingData);
|
|
34239
34354
|
};
|
|
@@ -34246,7 +34361,7 @@ function useTableData (_ref) {
|
|
|
34246
34361
|
LOG$g.error(new DivaError('No global search filter defiend'));
|
|
34247
34362
|
return;
|
|
34248
34363
|
}
|
|
34249
|
-
var newGlobalFilter = _objectSpread$
|
|
34364
|
+
var newGlobalFilter = _objectSpread$1W(_objectSpread$1W({}, globalFilter), {}, {
|
|
34250
34365
|
search: {}
|
|
34251
34366
|
});
|
|
34252
34367
|
if (value) {
|
|
@@ -34260,7 +34375,7 @@ function useTableData (_ref) {
|
|
|
34260
34375
|
});
|
|
34261
34376
|
}
|
|
34262
34377
|
setGlobaFilter(newGlobalFilter);
|
|
34263
|
-
onChange(_objectSpread$
|
|
34378
|
+
onChange(_objectSpread$1W({
|
|
34264
34379
|
pagination: state.pagination
|
|
34265
34380
|
}, filterData), newGlobalFilter);
|
|
34266
34381
|
};
|
|
@@ -34270,20 +34385,20 @@ function useTableData (_ref) {
|
|
|
34270
34385
|
LOG$g.error(new DivaError('No global period filter defiend'));
|
|
34271
34386
|
return;
|
|
34272
34387
|
}
|
|
34273
|
-
var newGlobalFilter = _objectSpread$
|
|
34388
|
+
var newGlobalFilter = _objectSpread$1W({}, globalFilter);
|
|
34274
34389
|
newGlobalFilter.timeStamp = {
|
|
34275
34390
|
fromTimeStamp: [from],
|
|
34276
34391
|
toTimeStamp: [to]
|
|
34277
34392
|
};
|
|
34278
34393
|
if (!configuration.filter.period.onlyAsMappingData) setGlobaFilter(newGlobalFilter);
|
|
34279
|
-
onChange(_objectSpread$
|
|
34394
|
+
onChange(_objectSpread$1W({
|
|
34280
34395
|
pagination: state.pagination
|
|
34281
|
-
}, filterData), undefined, true, undefined, _objectSpread$
|
|
34396
|
+
}, filterData), undefined, true, undefined, _objectSpread$1W(_objectSpread$1W({}, state.mappingData), {}, {
|
|
34282
34397
|
from: from,
|
|
34283
34398
|
to: to
|
|
34284
34399
|
}));
|
|
34285
34400
|
};
|
|
34286
|
-
return _objectSpread$
|
|
34401
|
+
return _objectSpread$1W(_objectSpread$1W({}, state), {}, {
|
|
34287
34402
|
title: title,
|
|
34288
34403
|
configuration: configuration,
|
|
34289
34404
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter, persistFilters ? filterData : undefined),
|
|
@@ -34329,8 +34444,8 @@ function StandardTable (_ref) {
|
|
|
34329
34444
|
});
|
|
34330
34445
|
}
|
|
34331
34446
|
|
|
34332
|
-
function ownKeys$
|
|
34333
|
-
function _objectSpread$
|
|
34447
|
+
function ownKeys$1V(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; }
|
|
34448
|
+
function _objectSpread$1V(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1V(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1V(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34334
34449
|
function Table (props) {
|
|
34335
34450
|
var root = useStore();
|
|
34336
34451
|
var variant = useMemo(function () {
|
|
@@ -34338,15 +34453,15 @@ function Table (props) {
|
|
|
34338
34453
|
return config.variant;
|
|
34339
34454
|
}, [props.id]);
|
|
34340
34455
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
34341
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
34456
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$1V({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$1V({}, props))]
|
|
34342
34457
|
});
|
|
34343
34458
|
}
|
|
34344
34459
|
|
|
34345
|
-
function _createForOfIteratorHelper$
|
|
34346
|
-
function _unsupportedIterableToArray$
|
|
34347
|
-
function _arrayLikeToArray$
|
|
34348
|
-
function ownKeys$
|
|
34349
|
-
function _objectSpread$
|
|
34460
|
+
function _createForOfIteratorHelper$I(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$I(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; } } }; }
|
|
34461
|
+
function _unsupportedIterableToArray$I(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$I(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$I(r, a) : void 0; } }
|
|
34462
|
+
function _arrayLikeToArray$I(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; }
|
|
34463
|
+
function ownKeys$1U(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; }
|
|
34464
|
+
function _objectSpread$1U(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1U(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1U(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34350
34465
|
function useAGGrid (_ref) {
|
|
34351
34466
|
var id = _ref.id,
|
|
34352
34467
|
filter = _ref.filter,
|
|
@@ -34440,7 +34555,7 @@ function useAGGrid (_ref) {
|
|
|
34440
34555
|
value = _ref3[1];
|
|
34441
34556
|
if (_idx == 0) {
|
|
34442
34557
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
34443
|
-
rdat.push(_objectSpread$
|
|
34558
|
+
rdat.push(_objectSpread$1U(_objectSpread$1U({}, rd), {}, {
|
|
34444
34559
|
grouping: [idx.toString()]
|
|
34445
34560
|
}));
|
|
34446
34561
|
var sp = key.split(':');
|
|
@@ -34468,7 +34583,7 @@ function useAGGrid (_ref) {
|
|
|
34468
34583
|
_context.next = 51;
|
|
34469
34584
|
break;
|
|
34470
34585
|
}
|
|
34471
|
-
_iterator = _createForOfIteratorHelper$
|
|
34586
|
+
_iterator = _createForOfIteratorHelper$I(configuration.mergerFields);
|
|
34472
34587
|
_context.prev = 9;
|
|
34473
34588
|
_iterator.s();
|
|
34474
34589
|
case 11:
|
|
@@ -34485,7 +34600,7 @@ function useAGGrid (_ref) {
|
|
|
34485
34600
|
}
|
|
34486
34601
|
merged = '';
|
|
34487
34602
|
first = true;
|
|
34488
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
34603
|
+
_iterator2 = _createForOfIteratorHelper$I(mergeEntry.fieldId);
|
|
34489
34604
|
_context.prev = 18;
|
|
34490
34605
|
_iterator2.s();
|
|
34491
34606
|
case 20:
|
|
@@ -34583,8 +34698,8 @@ var value = "value-FCA-6";
|
|
|
34583
34698
|
var css_248z$14 = ".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";
|
|
34584
34699
|
styleInject(css_248z$14);
|
|
34585
34700
|
|
|
34586
|
-
function ownKeys$
|
|
34587
|
-
function _objectSpread$
|
|
34701
|
+
function ownKeys$1T(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; }
|
|
34702
|
+
function _objectSpread$1T(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1T(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1T(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34588
34703
|
var AGChart = function AGChart(_ref) {
|
|
34589
34704
|
var data = _ref.data;
|
|
34590
34705
|
var groupedData = [];
|
|
@@ -34592,11 +34707,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
34592
34707
|
data.forEach(function (dt) {
|
|
34593
34708
|
if (dt.count == 0) return;
|
|
34594
34709
|
if (groupedData.length > dt.grouping[0]) {
|
|
34595
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
34710
|
+
groupedData[dt.grouping[0]].push(_objectSpread$1T(_objectSpread$1T({}, dt), {}, {
|
|
34596
34711
|
count: Number(dt.count)
|
|
34597
34712
|
}));
|
|
34598
34713
|
} else {
|
|
34599
|
-
groupedData.push([_objectSpread$
|
|
34714
|
+
groupedData.push([_objectSpread$1T(_objectSpread$1T({}, dt), {}, {
|
|
34600
34715
|
count: Number(dt.count)
|
|
34601
34716
|
})]);
|
|
34602
34717
|
}
|
|
@@ -34637,8 +34752,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
34637
34752
|
});
|
|
34638
34753
|
};
|
|
34639
34754
|
|
|
34640
|
-
function ownKeys$
|
|
34641
|
-
function _objectSpread$
|
|
34755
|
+
function ownKeys$1S(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; }
|
|
34756
|
+
function _objectSpread$1S(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1S(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1S(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34642
34757
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
34643
34758
|
var id = _ref.id,
|
|
34644
34759
|
filter = _ref.filter,
|
|
@@ -34731,7 +34846,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
34731
34846
|
});
|
|
34732
34847
|
});
|
|
34733
34848
|
}
|
|
34734
|
-
return _objectSpread$
|
|
34849
|
+
return _objectSpread$1S(_objectSpread$1S({}, column), {}, {
|
|
34735
34850
|
cellRenderer: renderer
|
|
34736
34851
|
});
|
|
34737
34852
|
});
|
|
@@ -35001,11 +35116,11 @@ var CustomText = function CustomText(_ref) {
|
|
|
35001
35116
|
};
|
|
35002
35117
|
var CustomText$1 = observer(CustomText);
|
|
35003
35118
|
|
|
35004
|
-
function ownKeys$
|
|
35005
|
-
function _objectSpread$
|
|
35006
|
-
function _createForOfIteratorHelper$
|
|
35007
|
-
function _unsupportedIterableToArray$
|
|
35008
|
-
function _arrayLikeToArray$
|
|
35119
|
+
function ownKeys$1R(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; }
|
|
35120
|
+
function _objectSpread$1R(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1R(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1R(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35121
|
+
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; } } }; }
|
|
35122
|
+
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; } }
|
|
35123
|
+
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; }
|
|
35009
35124
|
function useFilterBoxData (id) {
|
|
35010
35125
|
var root = useStore();
|
|
35011
35126
|
var _useMemo = useMemo(function () {
|
|
@@ -35053,7 +35168,7 @@ function useFilterBoxData (id) {
|
|
|
35053
35168
|
}
|
|
35054
35169
|
function reducer(state, actions) {
|
|
35055
35170
|
var ob = {};
|
|
35056
|
-
var _iterator = _createForOfIteratorHelper$
|
|
35171
|
+
var _iterator = _createForOfIteratorHelper$H(actions),
|
|
35057
35172
|
_step;
|
|
35058
35173
|
try {
|
|
35059
35174
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -35065,7 +35180,7 @@ function useFilterBoxData (id) {
|
|
|
35065
35180
|
} finally {
|
|
35066
35181
|
_iterator.f();
|
|
35067
35182
|
}
|
|
35068
|
-
return _objectSpread$
|
|
35183
|
+
return _objectSpread$1R(_objectSpread$1R({}, state), ob);
|
|
35069
35184
|
}
|
|
35070
35185
|
return {
|
|
35071
35186
|
configuration: configuration,
|
|
@@ -35076,11 +35191,11 @@ function useFilterBoxData (id) {
|
|
|
35076
35191
|
};
|
|
35077
35192
|
}
|
|
35078
35193
|
|
|
35079
|
-
function _createForOfIteratorHelper$
|
|
35080
|
-
function _unsupportedIterableToArray$
|
|
35081
|
-
function _arrayLikeToArray$
|
|
35082
|
-
function ownKeys$
|
|
35083
|
-
function _objectSpread$
|
|
35194
|
+
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; } } }; }
|
|
35195
|
+
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; } }
|
|
35196
|
+
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; }
|
|
35197
|
+
function ownKeys$1Q(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; }
|
|
35198
|
+
function _objectSpread$1Q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1Q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1Q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35084
35199
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
35085
35200
|
var id = _ref.id,
|
|
35086
35201
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -35108,7 +35223,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
35108
35223
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(LookupSelect, {
|
|
35109
35224
|
mode: "single",
|
|
35110
35225
|
apiInterface: filter.requestOptions,
|
|
35111
|
-
wholeData: _objectSpread$
|
|
35226
|
+
wholeData: _objectSpread$1Q(_objectSpread$1Q({}, state.filter), {}, {
|
|
35112
35227
|
tab: tab
|
|
35113
35228
|
}),
|
|
35114
35229
|
mapping: filter.requestMapping,
|
|
@@ -35216,7 +35331,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
35216
35331
|
}
|
|
35217
35332
|
function getLabelByValue(targetValue, data) {
|
|
35218
35333
|
if (!data) return;
|
|
35219
|
-
var _iterator = _createForOfIteratorHelper$
|
|
35334
|
+
var _iterator = _createForOfIteratorHelper$G(data),
|
|
35220
35335
|
_step;
|
|
35221
35336
|
try {
|
|
35222
35337
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -35340,8 +35455,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
35340
35455
|
return false;
|
|
35341
35456
|
});
|
|
35342
35457
|
|
|
35343
|
-
function ownKeys$
|
|
35344
|
-
function _objectSpread$
|
|
35458
|
+
function ownKeys$1P(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; }
|
|
35459
|
+
function _objectSpread$1P(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1P(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1P(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35345
35460
|
function useUIBuilderData (id) {
|
|
35346
35461
|
var save = undefined;
|
|
35347
35462
|
var root = useStore();
|
|
@@ -35373,7 +35488,7 @@ function useUIBuilderData (id) {
|
|
|
35373
35488
|
var configuration = _useMemo.configuration;
|
|
35374
35489
|
useEffect(function () {
|
|
35375
35490
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
35376
|
-
return setFilter(_objectSpread$
|
|
35491
|
+
return setFilter(_objectSpread$1P(_objectSpread$1P({}, filter), {}, {
|
|
35377
35492
|
sessionGuid: res
|
|
35378
35493
|
}));
|
|
35379
35494
|
});
|
|
@@ -35396,8 +35511,8 @@ function useUIBuilderData (id) {
|
|
|
35396
35511
|
};
|
|
35397
35512
|
}
|
|
35398
35513
|
|
|
35399
|
-
function ownKeys$
|
|
35400
|
-
function _objectSpread$
|
|
35514
|
+
function ownKeys$1O(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; }
|
|
35515
|
+
function _objectSpread$1O(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1O(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1O(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35401
35516
|
function UIBuilder(_ref) {
|
|
35402
35517
|
var id = _ref.id;
|
|
35403
35518
|
var state = useUIBuilderData(id);
|
|
@@ -35424,7 +35539,7 @@ function UIBuilder(_ref) {
|
|
|
35424
35539
|
override = {
|
|
35425
35540
|
value: newFilter[item.field],
|
|
35426
35541
|
setValue: function setValue(newVal) {
|
|
35427
|
-
var newFilter = _objectSpread$
|
|
35542
|
+
var newFilter = _objectSpread$1O({}, state.filter);
|
|
35428
35543
|
newFilter[item.field] = newVal;
|
|
35429
35544
|
state.setFilter(newFilter);
|
|
35430
35545
|
}
|
|
@@ -35472,7 +35587,7 @@ function UIBuilder(_ref) {
|
|
|
35472
35587
|
case 'AGGrid':
|
|
35473
35588
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
35474
35589
|
id: item.id,
|
|
35475
|
-
filter: _objectSpread$
|
|
35590
|
+
filter: _objectSpread$1O({
|
|
35476
35591
|
optionCodices: JSON.stringify(state.data)
|
|
35477
35592
|
}, state.filter),
|
|
35478
35593
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -35530,6 +35645,249 @@ var campaign = "campaign-zlrTx";
|
|
|
35530
35645
|
var css_248z$13 = ".label-rYNbb {\n width: 225px;\n background-color: #fff;\n cursor: pointer;\n padding: 10px 15px;\n border-radius: 5px;\n display: flex;\n gap: 12px;\n flex-direction: column;\n font-weight: 500;\n}\n\n.not-clickable-wHc5V {\n cursor: inherit;\n color: grey;\n}\n\n.selected-34dYg {\n font-weight: 630;\n}\n\n.description-iFui2 {\n font-weight: 300;\n font-size: small;\n margin-top: -8px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .org-tree-node-label .org-tree-node-label-inner {\n padding: 0;\n padding: initial;\n}\n\n.darkmode .org-tree-container {\n background-color: rgb(20, 20, 20);\n}\n\n.org-tree-container .org-tree-node-label .ant-btn-default:disabled, .org-tree-container .org-tree-node-label .ant-btn-primary:disabled {\n border-color: #d9d9d9;\n color: rgba(0, 0, 0, 0.25);\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.retailer-YNzAh {\n border-bottom: #81c784 solid 5px;\n}\n\n.retailer-child-5ll0K {\n border-bottom: #c8e6c9 solid 5px;\n}\n\n.supplier-8sm0I {\n border-bottom: #ba68c8 solid 5px;\n}\n\n.dealer-xgnku {\n border-bottom: #e1bee7 solid 5px;\n}\n\n.association-b8uVW {\n border-bottom: #fff176 solid 5px;\n}\n\n.campaign-zlrTx {\n border-bottom: #64b5f6 solid 5px;\n}\n";
|
|
35531
35646
|
styleInject(css_248z$13);
|
|
35532
35647
|
|
|
35648
|
+
/**
|
|
35649
|
+
* The form data a new child organization of `parent` starts with. It decides which organization types the form offers.
|
|
35650
|
+
*/
|
|
35651
|
+
function getNewChildData(parent) {
|
|
35652
|
+
var _parent$settings;
|
|
35653
|
+
return {
|
|
35654
|
+
parentType: parent.type === 'RETAILERCHILD' ? 'RETAILER' : parent.type === 'CAMPAIGN' ? 'RETAILER' : parent.type,
|
|
35655
|
+
isNew: true,
|
|
35656
|
+
parentIsCampaign: (_parent$settings = parent.settings) === null || _parent$settings === void 0 ? void 0 : _parent$settings.isCampaign
|
|
35657
|
+
};
|
|
35658
|
+
}
|
|
35659
|
+
|
|
35660
|
+
function ownKeys$1N(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; }
|
|
35661
|
+
function _objectSpread$1N(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1N(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1N(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35662
|
+
var SOURCE_MAPPING = {
|
|
35663
|
+
type: 'query',
|
|
35664
|
+
map: [{
|
|
35665
|
+
targetField: 'organizationId',
|
|
35666
|
+
sourceField: 'id'
|
|
35667
|
+
}]
|
|
35668
|
+
};
|
|
35669
|
+
|
|
35670
|
+
// the place of the source in the hierarchy and server-managed metadata do not belong to the copy
|
|
35671
|
+
var NOT_COPIED_FIELDS = ['_id', 'parent', 'parentOrganizations', 'childOrganizations', 'childTypes', 'created', 'lastUpdated', 'createdBy', 'lastUpdatedBy', 'createdBy_displayText', 'lastUpdatedBy_displayText',
|
|
35672
|
+
// unique per organization, it selects the supplier on login
|
|
35673
|
+
'iln'];
|
|
35674
|
+
|
|
35675
|
+
// bind the organization 1:1 to an external Meta or LeadTable campaign, the copy needs its own
|
|
35676
|
+
var NOT_COPIED_CAMPAIGN_FIELDS = ['metaAdSetId', 'metaCampaignId', 'leadTableCampaignId', 'leadTableCustomerId', 'leadTableUrl'];
|
|
35677
|
+
function getWritableOrgs(org) {
|
|
35678
|
+
var _org$children;
|
|
35679
|
+
var result = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
35680
|
+
if (org.writePermission) result.push(org);
|
|
35681
|
+
(_org$children = org.children) === null || _org$children === void 0 || _org$children.forEach(function (child) {
|
|
35682
|
+
return getWritableOrgs(child, result);
|
|
35683
|
+
});
|
|
35684
|
+
return result;
|
|
35685
|
+
}
|
|
35686
|
+
|
|
35687
|
+
/**
|
|
35688
|
+
* Button that asks for the parent of the copy and then opens the create form prefilled with the values of the source.
|
|
35689
|
+
*/
|
|
35690
|
+
var DuplicateOrganization = function DuplicateOrganization(_ref) {
|
|
35691
|
+
var action = _ref.action,
|
|
35692
|
+
source = _ref.source,
|
|
35693
|
+
parent = _ref.parent,
|
|
35694
|
+
tree = _ref.tree,
|
|
35695
|
+
onDuplicated = _ref.onDuplicated;
|
|
35696
|
+
var _useTranslation = useTranslation(),
|
|
35697
|
+
t = _useTranslation.t;
|
|
35698
|
+
var root = useStore();
|
|
35699
|
+
var _useState = useState(false),
|
|
35700
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35701
|
+
open = _useState2[0],
|
|
35702
|
+
setOpen = _useState2[1];
|
|
35703
|
+
var _useState3 = useState(false),
|
|
35704
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
35705
|
+
loading = _useState4[0],
|
|
35706
|
+
setLoading = _useState4[1];
|
|
35707
|
+
var _useState5 = useState(true),
|
|
35708
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
35709
|
+
sameLevel = _useState6[0],
|
|
35710
|
+
setSameLevel = _useState6[1];
|
|
35711
|
+
var _useState7 = useState(),
|
|
35712
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
35713
|
+
otherParentId = _useState8[0],
|
|
35714
|
+
setOtherParentId = _useState8[1];
|
|
35715
|
+
var writableOrgs = useMemo(function () {
|
|
35716
|
+
return getWritableOrgs(tree);
|
|
35717
|
+
}, [tree]);
|
|
35718
|
+
var target = sameLevel ? parent : writableOrgs.find(function (org) {
|
|
35719
|
+
return org.id === otherParentId;
|
|
35720
|
+
});
|
|
35721
|
+
var openDialog = function openDialog() {
|
|
35722
|
+
setSameLevel(!!parent.writePermission);
|
|
35723
|
+
setOtherParentId(undefined);
|
|
35724
|
+
setOpen(true);
|
|
35725
|
+
};
|
|
35726
|
+
var openForm = /*#__PURE__*/function () {
|
|
35727
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
35728
|
+
var _sourceData$settings;
|
|
35729
|
+
var apiInterface, createUrl, sourceData, _sourceData, values, campaignSettings;
|
|
35730
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
35731
|
+
while (1) switch (_context.prev = _context.next) {
|
|
35732
|
+
case 0:
|
|
35733
|
+
if (target) {
|
|
35734
|
+
_context.next = 2;
|
|
35735
|
+
break;
|
|
35736
|
+
}
|
|
35737
|
+
return _context.abrupt("return");
|
|
35738
|
+
case 2:
|
|
35739
|
+
apiInterface = action.apiInterface;
|
|
35740
|
+
createUrl = _typeof(apiInterface) == 'object' && typeof apiInterface.create == 'string' ? apiInterface.create : undefined;
|
|
35741
|
+
setLoading(true);
|
|
35742
|
+
_context.prev = 5;
|
|
35743
|
+
_context.next = 8;
|
|
35744
|
+
return new _default$c({
|
|
35745
|
+
apiInterface: apiInterface,
|
|
35746
|
+
type: 'Button'
|
|
35747
|
+
}, root).read(SOURCE_MAPPING, {
|
|
35748
|
+
id: source.id
|
|
35749
|
+
});
|
|
35750
|
+
case 8:
|
|
35751
|
+
sourceData = _context.sent;
|
|
35752
|
+
if ((_sourceData = sourceData) !== null && _sourceData !== void 0 && _sourceData._id) {
|
|
35753
|
+
_context.next = 11;
|
|
35754
|
+
break;
|
|
35755
|
+
}
|
|
35756
|
+
throw new Error("Organization ".concat(source.id, " could not be loaded"));
|
|
35757
|
+
case 11:
|
|
35758
|
+
_context.next = 17;
|
|
35759
|
+
break;
|
|
35760
|
+
case 13:
|
|
35761
|
+
_context.prev = 13;
|
|
35762
|
+
_context.t0 = _context["catch"](5);
|
|
35763
|
+
root.addError(t('backoffice.orgtree.duplicateAction.loadError', 'Die Organisation konnte nicht geladen werden.'));
|
|
35764
|
+
return _context.abrupt("return");
|
|
35765
|
+
case 17:
|
|
35766
|
+
_context.prev = 17;
|
|
35767
|
+
setLoading(false);
|
|
35768
|
+
return _context.finish(17);
|
|
35769
|
+
case 20:
|
|
35770
|
+
setOpen(false);
|
|
35771
|
+
values = Object.fromEntries(Object.entries(sourceData).filter(function (_ref3) {
|
|
35772
|
+
var _ref4 = _slicedToArray(_ref3, 1),
|
|
35773
|
+
key = _ref4[0];
|
|
35774
|
+
return !NOT_COPIED_FIELDS.includes(key);
|
|
35775
|
+
}));
|
|
35776
|
+
campaignSettings = (_sourceData$settings = sourceData.settings) === null || _sourceData$settings === void 0 ? void 0 : _sourceData$settings.campaignSettings;
|
|
35777
|
+
if (campaignSettings) {
|
|
35778
|
+
values.settings = _objectSpread$1N(_objectSpread$1N({}, sourceData.settings), {}, {
|
|
35779
|
+
campaignSettings: Object.fromEntries(Object.entries(campaignSettings).filter(function (_ref5) {
|
|
35780
|
+
var _ref6 = _slicedToArray(_ref5, 1),
|
|
35781
|
+
key = _ref6[0];
|
|
35782
|
+
return !NOT_COPIED_CAMPAIGN_FIELDS.includes(key);
|
|
35783
|
+
}))
|
|
35784
|
+
});
|
|
35785
|
+
}
|
|
35786
|
+
root.detailStore.openRightDetail({
|
|
35787
|
+
configurationId: action.id,
|
|
35788
|
+
type: action.type,
|
|
35789
|
+
title: typeof action.title == 'function' ? action.title(source) : action.title,
|
|
35790
|
+
// the form fills ${parentId} from the mapping data
|
|
35791
|
+
apiInterface: {
|
|
35792
|
+
create: createUrl === null || createUrl === void 0 ? void 0 : createUrl.replace('${organizationId}', encodeURIComponent(source.id))
|
|
35793
|
+
},
|
|
35794
|
+
mappingData: {
|
|
35795
|
+
id: target.id
|
|
35796
|
+
},
|
|
35797
|
+
data: _objectSpread$1N(_objectSpread$1N({}, values), {}, {
|
|
35798
|
+
displayName: t('backoffice.orgtree.duplicateAction.copyName', {
|
|
35799
|
+
defaultValue: '{{name}} (Kopie)',
|
|
35800
|
+
name: sourceData.displayName
|
|
35801
|
+
})
|
|
35802
|
+
}, getNewChildData(target)),
|
|
35803
|
+
callback: onDuplicated
|
|
35804
|
+
});
|
|
35805
|
+
case 25:
|
|
35806
|
+
case "end":
|
|
35807
|
+
return _context.stop();
|
|
35808
|
+
}
|
|
35809
|
+
}, _callee, null, [[5, 13, 17, 20]]);
|
|
35810
|
+
}));
|
|
35811
|
+
return function openForm() {
|
|
35812
|
+
return _ref2.apply(this, arguments);
|
|
35813
|
+
};
|
|
35814
|
+
}();
|
|
35815
|
+
return (
|
|
35816
|
+
/*#__PURE__*/
|
|
35817
|
+
// the dialog is rendered inside the tree node, keep its clicks from selecting the node
|
|
35818
|
+
jsxs("div", {
|
|
35819
|
+
onClick: function onClick(e) {
|
|
35820
|
+
return e.stopPropagation();
|
|
35821
|
+
},
|
|
35822
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
35823
|
+
block: true,
|
|
35824
|
+
color: "orange",
|
|
35825
|
+
variant: "solid",
|
|
35826
|
+
onClick: openDialog,
|
|
35827
|
+
children: action.label
|
|
35828
|
+
}), /*#__PURE__*/jsx(Modal$2, {
|
|
35829
|
+
open: open,
|
|
35830
|
+
title: typeof action.title == 'function' ? action.title(source) : action.title,
|
|
35831
|
+
okText: t('backoffice.orgtree.duplicateAction.ok', 'Weiter'),
|
|
35832
|
+
cancelText: t('backoffice.orgtree.duplicateAction.cancel', 'Abbrechen'),
|
|
35833
|
+
okButtonProps: {
|
|
35834
|
+
disabled: !target
|
|
35835
|
+
},
|
|
35836
|
+
confirmLoading: loading,
|
|
35837
|
+
onOk: openForm,
|
|
35838
|
+
onCancel: function onCancel() {
|
|
35839
|
+
return setOpen(false);
|
|
35840
|
+
},
|
|
35841
|
+
children: /*#__PURE__*/jsxs(Space, {
|
|
35842
|
+
direction: "vertical",
|
|
35843
|
+
style: {
|
|
35844
|
+
width: '100%'
|
|
35845
|
+
},
|
|
35846
|
+
children: [/*#__PURE__*/jsx(Radio.Group, {
|
|
35847
|
+
value: sameLevel,
|
|
35848
|
+
onChange: function onChange(e) {
|
|
35849
|
+
return setSameLevel(e.target.value);
|
|
35850
|
+
},
|
|
35851
|
+
children: /*#__PURE__*/jsxs(Space, {
|
|
35852
|
+
direction: "vertical",
|
|
35853
|
+
children: [/*#__PURE__*/jsx(Radio, {
|
|
35854
|
+
value: true,
|
|
35855
|
+
disabled: !parent.writePermission,
|
|
35856
|
+
children: t('backoffice.orgtree.duplicateAction.sameLevel', {
|
|
35857
|
+
defaultValue: 'Gleiche Ebene ({{parent}})',
|
|
35858
|
+
parent: parent.displayName
|
|
35859
|
+
})
|
|
35860
|
+
}), /*#__PURE__*/jsx(Radio, {
|
|
35861
|
+
value: false,
|
|
35862
|
+
children: t('backoffice.orgtree.duplicateAction.otherParent', 'Andere Parent-Org wählen')
|
|
35863
|
+
})]
|
|
35864
|
+
})
|
|
35865
|
+
}), !sameLevel && /*#__PURE__*/jsx(Select, {
|
|
35866
|
+
showSearch: true,
|
|
35867
|
+
style: {
|
|
35868
|
+
width: '100%'
|
|
35869
|
+
},
|
|
35870
|
+
placeholder: t('backoffice.orgtree.duplicateAction.parentPlaceholder', 'Parent-Org auswählen'),
|
|
35871
|
+
value: otherParentId,
|
|
35872
|
+
onChange: setOtherParentId,
|
|
35873
|
+
filterOption: function filterOption(input, option) {
|
|
35874
|
+
var _option$label;
|
|
35875
|
+
return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').toLowerCase().includes(input.toLowerCase());
|
|
35876
|
+
},
|
|
35877
|
+
options: writableOrgs.map(function (org) {
|
|
35878
|
+
return {
|
|
35879
|
+
value: org.id,
|
|
35880
|
+
label: org.displayName
|
|
35881
|
+
};
|
|
35882
|
+
})
|
|
35883
|
+
})]
|
|
35884
|
+
})
|
|
35885
|
+
})]
|
|
35886
|
+
})
|
|
35887
|
+
);
|
|
35888
|
+
};
|
|
35889
|
+
var DuplicateOrganization$1 = observer(DuplicateOrganization);
|
|
35890
|
+
|
|
35533
35891
|
function getColorClass(data) {
|
|
35534
35892
|
switch (data.type) {
|
|
35535
35893
|
case 'RETAILER':
|
|
@@ -35549,7 +35907,7 @@ function getColorClass(data) {
|
|
|
35549
35907
|
}
|
|
35550
35908
|
}
|
|
35551
35909
|
var OrgItem = function OrgItem(_ref) {
|
|
35552
|
-
var _data$description, _itemChain,
|
|
35910
|
+
var _data$description, _itemChain, _itemChain2, _itemChain3, _data$children, _itemChain4, _configuration$additi;
|
|
35553
35911
|
var data = _ref.data,
|
|
35554
35912
|
itemChain = _ref.itemChain,
|
|
35555
35913
|
configuration = _ref.configuration,
|
|
@@ -35587,17 +35945,23 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
35587
35945
|
id: "create",
|
|
35588
35946
|
defaultLabel: t('backoffice.table.emailtemplates.createAction.title'),
|
|
35589
35947
|
mappingData: data,
|
|
35590
|
-
data:
|
|
35591
|
-
parentType: data.type === 'RETAILERCHILD' ? 'RETAILER' : data.type === 'CAMPAIGN' ? 'RETAILER' : data.type,
|
|
35592
|
-
isNew: true,
|
|
35593
|
-
parentIsCampaign: (_data$settings = data.settings) === null || _data$settings === void 0 ? void 0 : _data$settings.isCampaign
|
|
35594
|
-
},
|
|
35948
|
+
data: getNewChildData(data),
|
|
35595
35949
|
callback: function callback(data) {
|
|
35596
35950
|
var _configuration$create, _configuration$create2;
|
|
35597
35951
|
setUpdate(update + 1);
|
|
35598
35952
|
(_configuration$create = configuration.createAction) === null || _configuration$create === void 0 || (_configuration$create2 = _configuration$create.callback) === null || _configuration$create2 === void 0 || _configuration$create2.call(_configuration$create, data);
|
|
35599
35953
|
}
|
|
35600
|
-
}, "create"), configuration.
|
|
35954
|
+
}, "create"), configuration.duplicateAction && data.readPermission && itemChain.length > 1 && ((_itemChain2 = itemChain[itemChain.length - 1]) === null || _itemChain2 === void 0 ? void 0 : _itemChain2.id) == data.id && /*#__PURE__*/jsx(DuplicateOrganization$1, {
|
|
35955
|
+
action: configuration.duplicateAction,
|
|
35956
|
+
source: data,
|
|
35957
|
+
parent: itemChain[itemChain.length - 2],
|
|
35958
|
+
tree: itemChain[0],
|
|
35959
|
+
onDuplicated: function onDuplicated(data) {
|
|
35960
|
+
var _configuration$duplic, _configuration$duplic2;
|
|
35961
|
+
setUpdate(update + 1);
|
|
35962
|
+
(_configuration$duplic = configuration.duplicateAction) === null || _configuration$duplic === void 0 || (_configuration$duplic2 = _configuration$duplic.callback) === null || _configuration$duplic2 === void 0 || _configuration$duplic2.call(_configuration$duplic, data);
|
|
35963
|
+
}
|
|
35964
|
+
}), configuration.deleteAction && data.deletePermission && ((_itemChain3 = itemChain[itemChain.length - 1]) === null || _itemChain3 === void 0 ? void 0 : _itemChain3.id) == data.id && !((_data$children = data.children) !== null && _data$children !== void 0 && _data$children.length) && /*#__PURE__*/jsx(ActionButton, {
|
|
35601
35965
|
action: configuration.deleteAction,
|
|
35602
35966
|
type: "Button",
|
|
35603
35967
|
buttonType: "primary",
|
|
@@ -35615,7 +35979,7 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
35615
35979
|
setUpdate(update + 1);
|
|
35616
35980
|
});
|
|
35617
35981
|
}
|
|
35618
|
-
}, "delete"), ((
|
|
35982
|
+
}, "delete"), ((_itemChain4 = itemChain[itemChain.length - 1]) === null || _itemChain4 === void 0 ? void 0 : _itemChain4.id) == data.id && root.dataStore.organizationId !== data.id && ((_configuration$additi = configuration.additionalActions) === null || _configuration$additi === void 0 ? void 0 : _configuration$additi.map(function (action, i) {
|
|
35619
35983
|
var _action$id;
|
|
35620
35984
|
return /*#__PURE__*/jsx(ActionButton, {
|
|
35621
35985
|
action: action,
|
|
@@ -35947,8 +36311,12 @@ var ZoomWrapper = function ZoomWrapper(_ref) {
|
|
|
35947
36311
|
window.removeEventListener('wheel', onScrolling);
|
|
35948
36312
|
};
|
|
35949
36313
|
}, [onScrolling, focused]);
|
|
35950
|
-
return /*#__PURE__*/jsx(TransformWrapper
|
|
35951
|
-
|
|
36314
|
+
return /*#__PURE__*/jsx(TransformWrapper
|
|
36315
|
+
// onInit instead of ref: react-zoom-pan-pinch (up to 4.2.0) reads props.ref, which React warns about
|
|
36316
|
+
, {
|
|
36317
|
+
onInit: function onInit(controls) {
|
|
36318
|
+
transformComponentRef.current = controls;
|
|
36319
|
+
},
|
|
35952
36320
|
pinch: {
|
|
35953
36321
|
step: 5
|
|
35954
36322
|
},
|
|
@@ -37754,6 +38122,9 @@ function createConfirmedUpdater(params) {
|
|
|
37754
38122
|
}
|
|
37755
38123
|
|
|
37756
38124
|
var _excluded$d = ["toolbarToolId", "agentBoundParent"];
|
|
38125
|
+
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; } } }; }
|
|
38126
|
+
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; } }
|
|
38127
|
+
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; }
|
|
37757
38128
|
function ownKeys$1I(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; }
|
|
37758
38129
|
function _objectSpread$1I(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1I(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1I(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37759
38130
|
/**
|
|
@@ -37833,28 +38204,31 @@ var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(_re
|
|
|
37833
38204
|
}
|
|
37834
38205
|
})
|
|
37835
38206
|
}) : undefined;
|
|
37836
|
-
var updateConfirmationRef = useRef();
|
|
38207
|
+
var updateConfirmationRef = useRef([]);
|
|
37837
38208
|
var updateConfirmation = (_props$configuration3 = props.configuration) === null || _props$configuration3 === void 0 ? void 0 : _props$configuration3.updateConfirmation;
|
|
37838
|
-
|
|
37839
|
-
|
|
37840
|
-
|
|
37841
|
-
|
|
37842
|
-
|
|
37843
|
-
|
|
37844
|
-
|
|
37845
|
-
|
|
37846
|
-
|
|
37847
|
-
|
|
37848
|
-
|
|
37849
|
-
|
|
37850
|
-
|
|
37851
|
-
|
|
37852
|
-
|
|
37853
|
-
|
|
37854
|
-
|
|
37855
|
-
|
|
37856
|
-
|
|
37857
|
-
|
|
38209
|
+
var bulkTemplate = removeTemplates === null || removeTemplates === void 0 ? void 0 : removeTemplates.bulk;
|
|
38210
|
+
updateConfirmationRef.current = updateConfirmation && bulkTemplate ? [updateConfirmation].flat().map(function (options) {
|
|
38211
|
+
return createUpdateConfirmationReview({
|
|
38212
|
+
options: options,
|
|
38213
|
+
t: t,
|
|
38214
|
+
modal: modal,
|
|
38215
|
+
agentWrite: function agentWrite() {
|
|
38216
|
+
return root.gridRegistry.agentWriteTo(handleRef.current);
|
|
38217
|
+
},
|
|
38218
|
+
rowLabel: function rowLabel(id, key) {
|
|
38219
|
+
return key !== null && key !== void 0 ? key : id;
|
|
38220
|
+
},
|
|
38221
|
+
sendConfirmed: createConfirmedUpdater({
|
|
38222
|
+
bulk: bulkTemplate,
|
|
38223
|
+
confirmParam: options.confirmParam,
|
|
38224
|
+
applicationData: props.applicationData,
|
|
38225
|
+
jwt: function jwt() {
|
|
38226
|
+
var _root$dataStore$jwt2;
|
|
38227
|
+
return (_root$dataStore$jwt2 = root.dataStore.jwt) !== null && _root$dataStore$jwt2 !== void 0 ? _root$dataStore$jwt2 : undefined;
|
|
38228
|
+
}
|
|
38229
|
+
})
|
|
38230
|
+
});
|
|
38231
|
+
}) : [];
|
|
37858
38232
|
var viewConfiguration = props.configuration;
|
|
37859
38233
|
var configuration = useMemo(function () {
|
|
37860
38234
|
var _viewConfiguration$ap, _viewConfiguration$ap2;
|
|
@@ -37865,7 +38239,7 @@ var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(_re
|
|
|
37865
38239
|
apiInterface: _objectSpread$1I(_objectSpread$1I({}, viewConfiguration.apiInterface), {}, {
|
|
37866
38240
|
reviewBulkResponse: function () {
|
|
37867
38241
|
var _reviewBulkResponse = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(response, request) {
|
|
37868
|
-
var reviewed;
|
|
38242
|
+
var reviewed, _iterator, _step, review;
|
|
37869
38243
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
37870
38244
|
while (1) switch (_context.prev = _context.next) {
|
|
37871
38245
|
case 0:
|
|
@@ -37883,21 +38257,40 @@ var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(_re
|
|
|
37883
38257
|
_context.t0 = response;
|
|
37884
38258
|
case 7:
|
|
37885
38259
|
reviewed = _context.t0;
|
|
37886
|
-
|
|
37887
|
-
|
|
38260
|
+
_iterator = _createForOfIteratorHelper$F(updateConfirmationRef.current);
|
|
38261
|
+
_context.prev = 9;
|
|
38262
|
+
_iterator.s();
|
|
38263
|
+
case 11:
|
|
38264
|
+
if ((_step = _iterator.n()).done) {
|
|
38265
|
+
_context.next = 18;
|
|
37888
38266
|
break;
|
|
37889
38267
|
}
|
|
37890
|
-
|
|
37891
|
-
|
|
37892
|
-
|
|
38268
|
+
review = _step.value;
|
|
38269
|
+
_context.next = 15;
|
|
38270
|
+
return review(reviewed, request);
|
|
38271
|
+
case 15:
|
|
37893
38272
|
reviewed = _context.sent;
|
|
37894
|
-
case
|
|
38273
|
+
case 16:
|
|
38274
|
+
_context.next = 11;
|
|
38275
|
+
break;
|
|
38276
|
+
case 18:
|
|
38277
|
+
_context.next = 23;
|
|
38278
|
+
break;
|
|
38279
|
+
case 20:
|
|
38280
|
+
_context.prev = 20;
|
|
38281
|
+
_context.t1 = _context["catch"](9);
|
|
38282
|
+
_iterator.e(_context.t1);
|
|
38283
|
+
case 23:
|
|
38284
|
+
_context.prev = 23;
|
|
38285
|
+
_iterator.f();
|
|
38286
|
+
return _context.finish(23);
|
|
38287
|
+
case 26:
|
|
37895
38288
|
return _context.abrupt("return", inUseReviewRef.current ? inUseReviewRef.current(reviewed, request) : reviewed);
|
|
37896
|
-
case
|
|
38289
|
+
case 27:
|
|
37897
38290
|
case "end":
|
|
37898
38291
|
return _context.stop();
|
|
37899
38292
|
}
|
|
37900
|
-
}, _callee);
|
|
38293
|
+
}, _callee, null, [[9, 20, 23, 26]]);
|
|
37901
38294
|
}));
|
|
37902
38295
|
function reviewBulkResponse(_x, _x2) {
|
|
37903
38296
|
return _reviewBulkResponse.apply(this, arguments);
|
|
@@ -66139,6 +66532,21 @@ var TableItems = observer(function () {
|
|
|
66139
66532
|
});
|
|
66140
66533
|
});
|
|
66141
66534
|
|
|
66535
|
+
/** IDM requires FEATURE_TYPE/MEASURE/MEASURE_UNIT once MEASURE is there, which a measure parameter writes. */
|
|
66536
|
+
function measureUnitValidator(t) {
|
|
66537
|
+
// blank counts as empty on both sides, like the service: a blank parameter writes no MEASURE
|
|
66538
|
+
var isBlank = function isBlank(value) {
|
|
66539
|
+
return value === undefined || value === null || String(value).trim() === '';
|
|
66540
|
+
};
|
|
66541
|
+
return function (_ref) {
|
|
66542
|
+
var value = _ref.value,
|
|
66543
|
+
data = _ref.data;
|
|
66544
|
+
return !isBlank(data === null || data === void 0 ? void 0 : data.measureParameter) && isBlank(value) ? t('backoffice.idmCatalog.features.validation.measureUnitRequired', {
|
|
66545
|
+
defaultValue: 'Die Maßeinheit ist Pflicht, wenn ein Maßparameter gesetzt ist.'
|
|
66546
|
+
}) : undefined;
|
|
66547
|
+
};
|
|
66548
|
+
}
|
|
66549
|
+
|
|
66142
66550
|
var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
|
|
66143
66551
|
var organizationId = _ref.organizationId,
|
|
66144
66552
|
selectedCatalog = _ref.selectedCatalog,
|
|
@@ -66234,6 +66642,8 @@ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
|
|
|
66234
66642
|
}, {
|
|
66235
66643
|
field: 'featureT',
|
|
66236
66644
|
headerName: 'backoffice.idmCatalog.features.label.featureT',
|
|
66645
|
+
// FEATURE/FEATURE_TYPE is a required element of the IDM schema
|
|
66646
|
+
required: true,
|
|
66237
66647
|
cellDataType: 'enum',
|
|
66238
66648
|
customParams: {
|
|
66239
66649
|
enumData: featureT,
|
|
@@ -66243,6 +66653,7 @@ var Features$2 = /*#__PURE__*/forwardRef(function Features(_ref, ref) {
|
|
|
66243
66653
|
}, {
|
|
66244
66654
|
field: 'measureUnit',
|
|
66245
66655
|
headerName: 'backoffice.idmCatalog.features.label.measureUnit',
|
|
66656
|
+
cellValueValidator: measureUnitValidator(t),
|
|
66246
66657
|
editable: true
|
|
66247
66658
|
}, {
|
|
66248
66659
|
field: 'measureParameter',
|
|
@@ -77879,36 +78290,92 @@ function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
77879
78290
|
|
|
77880
78291
|
/** The language key of a value that is the same in every language - every type but a text (see the enricher service). */
|
|
77881
78292
|
var LANGUAGE_NEUTRAL_KEY = 'ALL';
|
|
77882
|
-
|
|
77883
|
-
|
|
77884
|
-
|
|
77885
|
-
|
|
77886
|
-
|
|
77887
|
-
|
|
77888
|
-
|
|
77889
|
-
|
|
78293
|
+
var isListEntry = function isListEntry(value) {
|
|
78294
|
+
return ['string', 'number', 'boolean'].includes(_typeof(value));
|
|
78295
|
+
};
|
|
78296
|
+
var isFiniteNumber = function isFiniteNumber(value) {
|
|
78297
|
+
return typeof value === 'number' && Number.isFinite(value);
|
|
78298
|
+
};
|
|
78299
|
+
var parseNumber = function parseNumber(text) {
|
|
78300
|
+
return text.trim() !== '' && Number.isFinite(Number(text)) ? Number(text) : text;
|
|
78301
|
+
};
|
|
78302
|
+
|
|
78303
|
+
/** The entry types a list's schema can name (`items.type`); a list without one holds texts. */
|
|
78304
|
+
var LIST_ENTRY_TYPES = {
|
|
77890
78305
|
number: {
|
|
77891
|
-
|
|
77892
|
-
|
|
77893
|
-
return typeof value === 'number' && Number.isFinite(value);
|
|
77894
|
-
}
|
|
78306
|
+
fits: isFiniteNumber,
|
|
78307
|
+
parse: parseNumber
|
|
77895
78308
|
},
|
|
77896
|
-
|
|
77897
|
-
|
|
77898
|
-
|
|
77899
|
-
|
|
77900
|
-
|
|
77901
|
-
});
|
|
77902
|
-
}
|
|
78309
|
+
integer: {
|
|
78310
|
+
fits: function fits(entry) {
|
|
78311
|
+
return Number.isInteger(entry);
|
|
78312
|
+
},
|
|
78313
|
+
parse: parseNumber
|
|
77903
78314
|
},
|
|
77904
|
-
|
|
77905
|
-
|
|
77906
|
-
|
|
77907
|
-
|
|
78315
|
+
"boolean": {
|
|
78316
|
+
fits: function fits(entry) {
|
|
78317
|
+
return typeof entry === 'boolean';
|
|
78318
|
+
},
|
|
78319
|
+
parse: function parse(text) {
|
|
78320
|
+
return text === 'true' ? true : text === 'false' ? false : text;
|
|
77908
78321
|
}
|
|
77909
78322
|
}
|
|
77910
78323
|
};
|
|
77911
|
-
|
|
78324
|
+
|
|
78325
|
+
/** The parts of a definition's JSON schema a column uses. */
|
|
78326
|
+
|
|
78327
|
+
var isSchema = function isSchema(value) {
|
|
78328
|
+
return _typeof(value) === 'object' && value !== null && !Array.isArray(value);
|
|
78329
|
+
};
|
|
78330
|
+
|
|
78331
|
+
/** The definition's schema; undefined when there is none, or it is no JSON object. */
|
|
78332
|
+
function parseSchema(schema) {
|
|
78333
|
+
if (!schema) return undefined;
|
|
78334
|
+
try {
|
|
78335
|
+
var parsed = JSON.parse(schema);
|
|
78336
|
+
return isSchema(parsed) ? parsed : undefined;
|
|
78337
|
+
} catch (_unused) {
|
|
78338
|
+
return undefined;
|
|
78339
|
+
}
|
|
78340
|
+
}
|
|
78341
|
+
|
|
78342
|
+
/** The cell of a property type that is not a text; a list's entries follow its schema. */
|
|
78343
|
+
function typedCellOf(type, entryType) {
|
|
78344
|
+
switch (type) {
|
|
78345
|
+
case 'boolean':
|
|
78346
|
+
return {
|
|
78347
|
+
cell: 'boolean',
|
|
78348
|
+
fits: function fits(value) {
|
|
78349
|
+
return typeof value === 'boolean';
|
|
78350
|
+
}
|
|
78351
|
+
};
|
|
78352
|
+
case 'number':
|
|
78353
|
+
return {
|
|
78354
|
+
cell: 'number',
|
|
78355
|
+
fits: isFiniteNumber
|
|
78356
|
+
};
|
|
78357
|
+
case 'list':
|
|
78358
|
+
return {
|
|
78359
|
+
cell: 'array',
|
|
78360
|
+
fits: function fits(value) {
|
|
78361
|
+
var _entryType$fits;
|
|
78362
|
+
return Array.isArray(value) && value.every((_entryType$fits = entryType === null || entryType === void 0 ? void 0 : entryType.fits) !== null && _entryType$fits !== void 0 ? _entryType$fits : function (entry) {
|
|
78363
|
+
return typeof entry === 'string';
|
|
78364
|
+
});
|
|
78365
|
+
}
|
|
78366
|
+
};
|
|
78367
|
+
case 'object':
|
|
78368
|
+
return {
|
|
78369
|
+
cell: 'object',
|
|
78370
|
+
fits: function fits(value) {
|
|
78371
|
+
return _typeof(value) === 'object' && value !== null;
|
|
78372
|
+
}
|
|
78373
|
+
};
|
|
78374
|
+
default:
|
|
78375
|
+
return undefined;
|
|
78376
|
+
}
|
|
78377
|
+
}
|
|
78378
|
+
var isSet$1 = function isSet(value) {
|
|
77912
78379
|
return value !== undefined && value !== null && value !== '';
|
|
77913
78380
|
};
|
|
77914
78381
|
var asText = function asText(value) {
|
|
@@ -77919,7 +78386,7 @@ var asText = function asText(value) {
|
|
|
77919
78386
|
function valuesInForce(data, key) {
|
|
77920
78387
|
var _data$translatedProp, _data$prop;
|
|
77921
78388
|
var own = data === null || data === void 0 || (_data$translatedProp = data.translatedProp) === null || _data$translatedProp === void 0 ? void 0 : _data$translatedProp[key];
|
|
77922
|
-
return own && Object.values(own).some(isSet) ? own : data === null || data === void 0 || (_data$prop = data.prop) === null || _data$prop === void 0 ? void 0 : _data$prop[key];
|
|
78389
|
+
return own && Object.values(own).some(isSet$1) ? own : data === null || data === void 0 || (_data$prop = data.prop) === null || _data$prop === void 0 ? void 0 : _data$prop[key];
|
|
77923
78390
|
}
|
|
77924
78391
|
|
|
77925
78392
|
/**
|
|
@@ -77935,14 +78402,14 @@ function mismatchOf(values, typed, languages) {
|
|
|
77935
78402
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
77936
78403
|
lang = _ref2[0],
|
|
77937
78404
|
text = _ref2[1];
|
|
77938
|
-
return lang !== LANGUAGE_NEUTRAL_KEY && isSet(text);
|
|
78405
|
+
return lang !== LANGUAGE_NEUTRAL_KEY && isSet$1(text);
|
|
77939
78406
|
});
|
|
77940
|
-
return isSet(value) && !hasText ? asText(value) : undefined;
|
|
78407
|
+
return isSet$1(value) && !hasText ? asText(value) : undefined;
|
|
77941
78408
|
}
|
|
77942
|
-
if (isSet(value)) return typed.fits(value) ? undefined : asText(value);
|
|
78409
|
+
if (isSet$1(value)) return typed.fits(value) ? undefined : asText(value);
|
|
77943
78410
|
var text = [].concat(_toConsumableArray(languages), _toConsumableArray(Object.keys(values !== null && values !== void 0 ? values : {}))).map(function (lang) {
|
|
77944
78411
|
return values === null || values === void 0 ? void 0 : values[lang];
|
|
77945
|
-
}).find(isSet);
|
|
78412
|
+
}).find(isSet$1);
|
|
77946
78413
|
return text === undefined ? undefined : asText(text);
|
|
77947
78414
|
}
|
|
77948
78415
|
/**
|
|
@@ -77950,14 +78417,21 @@ function mismatchOf(values, typed, languages) {
|
|
|
77950
78417
|
* language (translatedProp.<key>.<LANG>), every other type one column for all languages (translatedProp.<key>.ALL) with
|
|
77951
78418
|
* the spreadsheet's standard cell, which stores the value as that type. The cell shows the value in force - the pack's
|
|
77952
78419
|
* own, else the inherited one - and an edit writes the pack's own. A value stored before its definition's type changed
|
|
77953
|
-
* shows with a warning, and an edit replaces it with a value of the type.
|
|
78420
|
+
* shows with a warning, and an edit replaces it with a value of the type. The JSON editor of an object checks the value
|
|
78421
|
+
* against the definition's schema; a list's schema decides the type of its entries and may fix the values they take.
|
|
77954
78422
|
*/
|
|
77955
78423
|
function buildPropertyColumn(_ref3) {
|
|
78424
|
+
var _parsedSchema$items, _parsedSchema$items2;
|
|
77956
78425
|
var key = _ref3.key,
|
|
77957
78426
|
type = _ref3.type,
|
|
78427
|
+
schema = _ref3.schema,
|
|
77958
78428
|
languages = _ref3.languages,
|
|
77959
78429
|
viewOnly = _ref3.viewOnly;
|
|
77960
|
-
var
|
|
78430
|
+
var parsedSchema = parseSchema(schema);
|
|
78431
|
+
var entryType = type === 'list' ? LIST_ENTRY_TYPES[String(parsedSchema === null || parsedSchema === void 0 || (_parsedSchema$items = parsedSchema.items) === null || _parsedSchema$items === void 0 ? void 0 : _parsedSchema$items.type)] : undefined;
|
|
78432
|
+
var listEnum = type === 'list' ? parsedSchema === null || parsedSchema === void 0 || (_parsedSchema$items2 = parsedSchema.items) === null || _parsedSchema$items2 === void 0 ? void 0 : _parsedSchema$items2["enum"] : undefined;
|
|
78433
|
+
var choices = Array.isArray(listEnum) ? listEnum.filter(isListEntry) : undefined;
|
|
78434
|
+
var typed = typedCellOf(type, entryType);
|
|
77961
78435
|
// A value that does not fit the column shows with a warning, every other one in the column's own cell
|
|
77962
78436
|
var cellRendererSelector = function cellRendererSelector(params) {
|
|
77963
78437
|
var text = mismatchOf(valuesInForce(params.data, key), typed, languages);
|
|
@@ -77969,30 +78443,36 @@ function buildPropertyColumn(_ref3) {
|
|
|
77969
78443
|
}
|
|
77970
78444
|
};
|
|
77971
78445
|
};
|
|
78446
|
+
// A server-side grid holds only the fields its columns bind, also in the row a save of another cell answers with, and
|
|
78447
|
+
// the warning reads every value of the key - one of the old form too. Bound whole, the read requests them in two paths
|
|
78448
|
+
// instead of their languages' paths (it drops the paths below them).
|
|
78449
|
+
var valueFields = ["translatedProp.".concat(key), "prop.".concat(key)];
|
|
77972
78450
|
if (!typed) {
|
|
77973
78451
|
var column = createTranslatedColumnConfig('translatedProp.' + key, key, languages, false, 'withPlaceholder', {
|
|
77974
78452
|
placeHolderField: 'origProp.' + key,
|
|
77975
78453
|
combinedField: 'prop.' + key
|
|
77976
78454
|
}, ['origProp.' + key, 'prop.' + key], !viewOnly);
|
|
78455
|
+
var withWarning = function withWarning(additionalFields) {
|
|
78456
|
+
return {
|
|
78457
|
+
cellRendererSelector: cellRendererSelector,
|
|
78458
|
+
additionalFields: [].concat(_toConsumableArray(additionalFields !== null && additionalFields !== void 0 ? additionalFields : []), valueFields)
|
|
78459
|
+
};
|
|
78460
|
+
};
|
|
77977
78461
|
return column.children ? _objectSpread$D(_objectSpread$D({}, column), {}, {
|
|
77978
78462
|
children: column.children.map(function (languageColumn) {
|
|
77979
|
-
return _objectSpread$D(_objectSpread$D({}, languageColumn),
|
|
77980
|
-
cellRendererSelector: cellRendererSelector
|
|
77981
|
-
});
|
|
78463
|
+
return _objectSpread$D(_objectSpread$D({}, languageColumn), withWarning(languageColumn.additionalFields));
|
|
77982
78464
|
})
|
|
77983
|
-
}) : _objectSpread$D(_objectSpread$D({}, column),
|
|
77984
|
-
cellRendererSelector: cellRendererSelector
|
|
77985
|
-
});
|
|
78465
|
+
}) : _objectSpread$D(_objectSpread$D({}, column), withWarning(column.additionalFields));
|
|
77986
78466
|
}
|
|
77987
78467
|
var field = "translatedProp.".concat(key, ".").concat(LANGUAGE_NEUTRAL_KEY);
|
|
77988
78468
|
var effectiveField = "prop.".concat(key, ".").concat(LANGUAGE_NEUTRAL_KEY);
|
|
77989
|
-
return _objectSpread$D({
|
|
78469
|
+
return _objectSpread$D(_objectSpread$D(_objectSpread$D({
|
|
77990
78470
|
headerName: key,
|
|
77991
78471
|
field: field,
|
|
77992
78472
|
cellDataType: typed.cell,
|
|
77993
78473
|
editable: !viewOnly,
|
|
77994
78474
|
isDictionary: true,
|
|
77995
|
-
additionalFields: ["origProp.".concat(key, ".").concat(LANGUAGE_NEUTRAL_KEY), effectiveField],
|
|
78475
|
+
additionalFields: ["origProp.".concat(key, ".").concat(LANGUAGE_NEUTRAL_KEY), effectiveField].concat(valueFields),
|
|
77996
78476
|
// An edit staged meanwhile sits in translatedProp only, so the pack's own value is read first; a flag without any
|
|
77997
78477
|
// value is off, like the standard boolean cell shows it. A value of another type is no value of the cell: it shows
|
|
77998
78478
|
// with a warning, and the editor starts empty.
|
|
@@ -78001,7 +78481,17 @@ function buildPropertyColumn(_ref3) {
|
|
|
78001
78481
|
var value = (_params$data$translat = (_params$data = params.data) === null || _params$data === void 0 || (_params$data = _params$data.translatedProp) === null || _params$data === void 0 || (_params$data = _params$data[key]) === null || _params$data === void 0 ? void 0 : _params$data[LANGUAGE_NEUTRAL_KEY]) !== null && _params$data$translat !== void 0 ? _params$data$translat : (_params$data2 = params.data) === null || _params$data2 === void 0 || (_params$data2 = _params$data2.prop) === null || _params$data2 === void 0 || (_params$data2 = _params$data2[key]) === null || _params$data2 === void 0 ? void 0 : _params$data2[LANGUAGE_NEUTRAL_KEY];
|
|
78002
78482
|
return typed.fits(value) ? value : typed.cell === 'boolean' ? false : undefined;
|
|
78003
78483
|
},
|
|
78004
|
-
cellRendererSelector: cellRendererSelector
|
|
78484
|
+
cellRendererSelector: cellRendererSelector
|
|
78485
|
+
}, type === 'object' && parsedSchema && {
|
|
78486
|
+
cellEditorParams: {
|
|
78487
|
+
schema: parsedSchema
|
|
78488
|
+
}
|
|
78489
|
+
}), type === 'list' && (entryType || choices) && {
|
|
78490
|
+
cellEditorParams: {
|
|
78491
|
+
parseEntry: entryType === null || entryType === void 0 ? void 0 : entryType.parse,
|
|
78492
|
+
choices: choices
|
|
78493
|
+
}
|
|
78494
|
+
}), {}, {
|
|
78005
78495
|
// The filter compares the value in force, like the cell shows it
|
|
78006
78496
|
filterModelParser: function filterModelParser(params) {
|
|
78007
78497
|
return applyFilterToAddtionalColumn(params.filterModel, field, effectiveField, undefined, typed.cell === 'boolean');
|
|
@@ -78397,11 +78887,13 @@ var EnrichmentTable = observer(function (_ref) {
|
|
|
78397
78887
|
var _next$key, _next$key2;
|
|
78398
78888
|
var key = _ref3.key,
|
|
78399
78889
|
propType = _ref3.type,
|
|
78890
|
+
schema = _ref3.schema,
|
|
78400
78891
|
description = _ref3.description,
|
|
78401
78892
|
codexKey = _ref3.codexKey;
|
|
78402
78893
|
next[key] = {
|
|
78403
78894
|
// The latest type decides: a definition without one (or not released here) is a text
|
|
78404
78895
|
type: propType,
|
|
78896
|
+
schema: schema,
|
|
78405
78897
|
description: description !== null && description !== void 0 ? description : (_next$key = next[key]) === null || _next$key === void 0 ? void 0 : _next$key.description,
|
|
78406
78898
|
codexKey: codexKey !== null && codexKey !== void 0 ? codexKey : (_next$key2 = next[key]) === null || _next$key2 === void 0 ? void 0 : _next$key2.codexKey
|
|
78407
78899
|
};
|
|
@@ -78440,7 +78932,8 @@ var EnrichmentTable = observer(function (_ref) {
|
|
|
78440
78932
|
return _objectSpread$C(_objectSpread$C({}, p), {}, _defineProperty({}, v.addProperty, {
|
|
78441
78933
|
codexKey: v.codexKey,
|
|
78442
78934
|
description: v.description,
|
|
78443
|
-
type: v.type
|
|
78935
|
+
type: v.type,
|
|
78936
|
+
schema: v.schema
|
|
78444
78937
|
}));
|
|
78445
78938
|
});
|
|
78446
78939
|
}, []);
|
|
@@ -78512,12 +79005,14 @@ var EnrichmentTable = observer(function (_ref) {
|
|
|
78512
79005
|
var key = _ref5.key,
|
|
78513
79006
|
codexKey = _ref5.codexKey,
|
|
78514
79007
|
description = _ref5.description,
|
|
78515
|
-
propType = _ref5.type
|
|
79008
|
+
propType = _ref5.type,
|
|
79009
|
+
schema = _ref5.schema;
|
|
78516
79010
|
return addProperty({
|
|
78517
79011
|
addProperty: key,
|
|
78518
79012
|
codexKey: codexKey,
|
|
78519
79013
|
description: description,
|
|
78520
|
-
type: propType
|
|
79014
|
+
type: propType,
|
|
79015
|
+
schema: schema
|
|
78521
79016
|
});
|
|
78522
79017
|
},
|
|
78523
79018
|
onRemove: viewOnly ? undefined : removeProperty
|
|
@@ -78701,17 +79196,21 @@ var EnrichmentTable = observer(function (_ref) {
|
|
|
78701
79196
|
}, {
|
|
78702
79197
|
lookupField: 'type',
|
|
78703
79198
|
targetField: 'type'
|
|
79199
|
+
}, {
|
|
79200
|
+
lookupField: 'schema',
|
|
79201
|
+
targetField: 'schema'
|
|
78704
79202
|
}]
|
|
78705
79203
|
}
|
|
78706
79204
|
}
|
|
78707
79205
|
}]), _toConsumableArray(shownProps.map(function (key) {
|
|
78708
|
-
var _propertyMeta$key, _propertyMeta$key2, _propertyMeta$key3;
|
|
79206
|
+
var _propertyMeta$key, _propertyMeta$key2, _propertyMeta$key3, _propertyMeta$key4;
|
|
78709
79207
|
var description = (_propertyMeta$key = propertyMeta[key]) === null || _propertyMeta$key === void 0 ? void 0 : _propertyMeta$key.description;
|
|
78710
79208
|
var codexKey = (_propertyMeta$key2 = propertyMeta[key]) === null || _propertyMeta$key2 === void 0 ? void 0 : _propertyMeta$key2.codexKey;
|
|
78711
79209
|
// The header names the key, what the property is for shows on hover; its definition's type decides the cell
|
|
78712
79210
|
var columnConfig = collapseSecondaryLanguages(buildPropertyColumn({
|
|
78713
79211
|
key: key,
|
|
78714
79212
|
type: (_propertyMeta$key3 = propertyMeta[key]) === null || _propertyMeta$key3 === void 0 ? void 0 : _propertyMeta$key3.type,
|
|
79213
|
+
schema: (_propertyMeta$key4 = propertyMeta[key]) === null || _propertyMeta$key4 === void 0 ? void 0 : _propertyMeta$key4.schema,
|
|
78715
79214
|
languages: propertyLanguages,
|
|
78716
79215
|
viewOnly: viewOnly
|
|
78717
79216
|
}), 'translatedProp.' + key);
|
|
@@ -91401,7 +91900,7 @@ var hasPlannedArticle = function hasPlannedArticle(planner) {
|
|
|
91401
91900
|
return Object.keys((_planner$getDivaArtic = planner.getDivaArticles()) !== null && _planner$getDivaArtic !== void 0 ? _planner$getDivaArtic : {}).length > 0;
|
|
91402
91901
|
};
|
|
91403
91902
|
var DivaAgent = function DivaAgent(_ref) {
|
|
91404
|
-
var _findRegisteredTool, _registeredTool$eleme, _registeredTool$eleme2, _registeredTool$param, _registeredTool$eleme3, _root$i18n$language, _root$navigationState3, _core$state$organizat, _core$state$organizat2, _root$navigationState4, _catalogMatch
|
|
91903
|
+
var _findRegisteredTool, _registeredTool$eleme, _registeredTool$eleme2, _registeredTool$param, _registeredTool$eleme3, _root$i18n$language, _root$navigationState3, _core$state$organizat, _core$state$organizat2, _root$navigationState4, _catalogMatch$, _root$dataStore$curre;
|
|
91405
91904
|
var tool = _ref.tool;
|
|
91406
91905
|
var root = useStore();
|
|
91407
91906
|
var core = useDivaCore();
|
|
@@ -91757,35 +92256,15 @@ var DivaAgent = function DivaAgent(_ref) {
|
|
|
91757
92256
|
id: (_catalogMatch$ = catalogMatch === null || catalogMatch === void 0 ? void 0 : catalogMatch[1]) !== null && _catalogMatch$ !== void 0 ? _catalogMatch$ : catalogId
|
|
91758
92257
|
}) : undefined;
|
|
91759
92258
|
|
|
91760
|
-
//
|
|
91761
|
-
var
|
|
91762
|
-
|
|
91763
|
-
|
|
91764
|
-
|
|
91765
|
-
|
|
91766
|
-
|
|
91767
|
-
|
|
91768
|
-
|
|
91769
|
-
ref: panelRef,
|
|
91770
|
-
children: /*#__PURE__*/jsx(AgentBridgeStandalone, {
|
|
91771
|
-
divaWebPlanner: planner,
|
|
91772
|
-
plannerInitError: initError,
|
|
91773
|
-
revealPlannerView: revealPlannerView,
|
|
91774
|
-
getVisiblePlanner: getVisiblePlanner,
|
|
91775
|
-
getExpectedSelection: getExpectedSelection,
|
|
91776
|
-
refreshStalePlanner: refreshStalePlanner,
|
|
91777
|
-
extraToolsets: extraToolsets,
|
|
91778
|
-
useCase: "backoffice",
|
|
91779
|
-
contextKey: contextKey,
|
|
91780
|
-
style: {
|
|
91781
|
-
flex: '1 1 0',
|
|
91782
|
-
minHeight: 0,
|
|
91783
|
-
height: 'auto'
|
|
91784
|
-
}
|
|
91785
|
-
})
|
|
91786
|
-
})
|
|
91787
|
-
});
|
|
91788
|
-
}
|
|
92259
|
+
// The chat (advisor or agent) carries the panel; the MCP bridge comes on top of it, never alone.
|
|
92260
|
+
var _agentAccess = agentAccess(function (object) {
|
|
92261
|
+
return root.actions.userHasPermission(object);
|
|
92262
|
+
}, (_root$dataStore$curre = root.dataStore.currentOrganization) === null || _root$dataStore$curre === void 0 ? void 0 : _root$dataStore$curre.settings),
|
|
92263
|
+
chatPermitted = _agentAccess.chat,
|
|
92264
|
+
mcpPermitted = _agentAccess.mcp;
|
|
92265
|
+
|
|
92266
|
+
// Without the chat the panel is being unmounted (useTools) — mounting the chat now would only collect 403s.
|
|
92267
|
+
if (!chatPermitted) return null;
|
|
91789
92268
|
return /*#__PURE__*/jsx(ErrorBoundary, {
|
|
91790
92269
|
errorCode: "BACKO_0005",
|
|
91791
92270
|
children: /*#__PURE__*/jsxs("div", {
|
|
@@ -96486,6 +96965,21 @@ var ENTITY_TYPES = [{
|
|
|
96486
96965
|
fallback: 'Option'
|
|
96487
96966
|
}];
|
|
96488
96967
|
|
|
96968
|
+
/** A schema of a definition is itself checked against JSON schema draft-07, the version the enricher takes. */
|
|
96969
|
+
var DRAFT_07 = {
|
|
96970
|
+
$ref: 'http://json-schema.org/draft-07/schema#'
|
|
96971
|
+
};
|
|
96972
|
+
|
|
96973
|
+
/** The definition's schema, which the enricher stores as JSON text, as the JSON value the cell edits. */
|
|
96974
|
+
function schemaOf(text) {
|
|
96975
|
+
if (typeof text !== 'string' || !text.trim()) return undefined;
|
|
96976
|
+
try {
|
|
96977
|
+
return JSON.parse(text);
|
|
96978
|
+
} catch (_unused) {
|
|
96979
|
+
return text;
|
|
96980
|
+
}
|
|
96981
|
+
}
|
|
96982
|
+
|
|
96489
96983
|
/** The selected definition, as far as its content item is concerned. */
|
|
96490
96984
|
|
|
96491
96985
|
var selectionOf = function selectionOf(node) {
|
|
@@ -96544,10 +97038,11 @@ var PropertyDefinitions = /*#__PURE__*/forwardRef(function PropertyDefinitions(_
|
|
|
96544
97038
|
return {
|
|
96545
97039
|
type: 'dotnetSSM',
|
|
96546
97040
|
agentGridId: 'propertyDefinitions',
|
|
96547
|
-
agentDescription: "The property definitions shared by every organization — one row per property key, the key is unique across all organizations. A key is addable as a column in the enrichment tables of a pack only through a row here. description = the column header there, so a SHORT label; type = what a value is stored as: string (a text per language), boolean, number, list (of texts) or object (JSON) - every type but string once for all languages; codexKey = key of the GLOBAL CMS content item the column's info button opens, picked from the global content items (not the property key); entityTypes = the enrichment views offering it (empty = all). global (default on) offers it to every organization; switched off, only the organizations in allowedOrganizationIds and their sub-organizations get it — the list is kept but ignored while global is on. Deleting a row whose key still has values deletes those values in every organization; to stop offering a key, switch global off and empty the organizations instead. Changing the type of a key that has values is refused for you: the answer lists the places, report them - only the user can confirm the change, in the table, and the values keep their old form until they are edited.",
|
|
97041
|
+
agentDescription: "The property definitions shared by every organization — one row per property key, the key is unique across all organizations. A key is addable as a column in the enrichment tables of a pack only through a row here. description = the column header there, so a SHORT label; type = what a value is stored as: string (a text per language), boolean, number, list (of texts, or of the entry type its schema names) or object (JSON) - every type but string once for all languages; schema = optional JSON schema (draft-07, as JSON text) of an object or list property, which every value must match - for a list, items.type names the entry type (string by default, number, integer or boolean) and items.enum the values an entry may take; the enricher refuses a schema the backoffice editor would not check the same way and says why (e.g. enum needs a type beside it), and a type other than object or list while a schema is set - remove the schema first; codexKey = key of the GLOBAL CMS content item the column's info button opens, picked from the global content items (not the property key); entityTypes = the enrichment views offering it (empty = all). global (default on) offers it to every organization; switched off, only the organizations in allowedOrganizationIds and their sub-organizations get it — the list is kept but ignored while global is on. Deleting a row whose key still has values deletes those values in every organization; to stop offering a key, switch global off and empty the organizations instead. Changing the type of a key that has values, or setting a schema some of them do not match, is refused for you: the answer lists the places, report them - only the user can confirm the change, in the table, and the values keep their old form until they are edited.",
|
|
96548
97042
|
inUseReview: true,
|
|
96549
|
-
// The values of a key keep their form when its type changes
|
|
96550
|
-
|
|
97043
|
+
// The values of a key keep their form when its type changes, or a schema they do not match is set: the server
|
|
97044
|
+
// asks for a confirmation first
|
|
97045
|
+
updateConfirmation: [{
|
|
96551
97046
|
errorCode: 'PROPERTY_DEFINITION_TYPE_IN_USE',
|
|
96552
97047
|
confirmParam: 'confirmTypeChange',
|
|
96553
97048
|
title: t('backoffice.idmPropertyDefinitions.typeChange.title', {
|
|
@@ -96566,7 +97061,26 @@ var PropertyDefinitions = /*#__PURE__*/forwardRef(function PropertyDefinitions(_
|
|
|
96566
97061
|
okText: t('backoffice.idmPropertyDefinitions.typeChange.confirm', {
|
|
96567
97062
|
defaultValue: 'Trotzdem ändern'
|
|
96568
97063
|
})
|
|
96569
|
-
},
|
|
97064
|
+
}, {
|
|
97065
|
+
errorCode: 'PROPERTY_DEFINITION_SCHEMA_VIOLATED',
|
|
97066
|
+
confirmParam: 'confirmTypeChange',
|
|
97067
|
+
title: t('backoffice.idmPropertyDefinitions.schemaChange.title', {
|
|
97068
|
+
defaultValue: 'Schema setzen?'
|
|
97069
|
+
}),
|
|
97070
|
+
entry: function entry(name, count) {
|
|
97071
|
+
return t('backoffice.idmPropertyDefinitions.schemaChange.entry', {
|
|
97072
|
+
name: name,
|
|
97073
|
+
count: count,
|
|
97074
|
+
defaultValue: '{{name}}: {{count}} Werte passen nicht zum Schema'
|
|
97075
|
+
});
|
|
97076
|
+
},
|
|
97077
|
+
question: t('backoffice.idmPropertyDefinitions.schemaChange.question', {
|
|
97078
|
+
defaultValue: 'Die Werte bleiben, wie sie sind. Beim Bearbeiten prüft der Editor sie gegen das neue Schema, erst dann müssen sie passen.'
|
|
97079
|
+
}),
|
|
97080
|
+
okText: t('backoffice.idmPropertyDefinitions.schemaChange.confirm', {
|
|
97081
|
+
defaultValue: 'Trotzdem setzen'
|
|
97082
|
+
})
|
|
97083
|
+
}],
|
|
96570
97084
|
apiInterface: apiInterface,
|
|
96571
97085
|
dateFormat: 'DD.MM.YYYY, HH:mm:ss',
|
|
96572
97086
|
floatingFilter: true,
|
|
@@ -96600,6 +97114,32 @@ var PropertyDefinitions = /*#__PURE__*/forwardRef(function PropertyDefinitions(_
|
|
|
96600
97114
|
value: 'object'
|
|
96601
97115
|
}]
|
|
96602
97116
|
}
|
|
97117
|
+
}, {
|
|
97118
|
+
// Stored as JSON text - its keywords ($schema, $ref) cannot be field names in the enricher's database - and
|
|
97119
|
+
// edited as the JSON value in the JSON editor, which checks it against draft-07
|
|
97120
|
+
headerName: 'backoffice.idmPropertyDefinitions.label.schema',
|
|
97121
|
+
colId: 'schema',
|
|
97122
|
+
cellDataType: 'object',
|
|
97123
|
+
additionalFields: ['schema'],
|
|
97124
|
+
sortable: false,
|
|
97125
|
+
// Also while a schema is left after a change to another type: the enricher refuses that type until it is removed
|
|
97126
|
+
editable: function editable(_ref2) {
|
|
97127
|
+
var data = _ref2.data;
|
|
97128
|
+
return (data === null || data === void 0 ? void 0 : data.type) === 'object' || (data === null || data === void 0 ? void 0 : data.type) === 'list' || !!(data !== null && data !== void 0 && data.schema);
|
|
97129
|
+
},
|
|
97130
|
+
valueGetter: function valueGetter(_ref3) {
|
|
97131
|
+
var data = _ref3.data;
|
|
97132
|
+
return schemaOf(data === null || data === void 0 ? void 0 : data.schema);
|
|
97133
|
+
},
|
|
97134
|
+
cellEditToRowUpdate: function cellEditToRowUpdate(_ref4) {
|
|
97135
|
+
var newValue = _ref4.newValue;
|
|
97136
|
+
return {
|
|
97137
|
+
schema: newValue === undefined || newValue === null ? null : JSON.stringify(newValue)
|
|
97138
|
+
};
|
|
97139
|
+
},
|
|
97140
|
+
cellEditorParams: {
|
|
97141
|
+
schema: DRAFT_07
|
|
97142
|
+
}
|
|
96603
97143
|
}, {
|
|
96604
97144
|
headerName: 'backoffice.idmPropertyDefinitions.label.description',
|
|
96605
97145
|
field: 'description',
|
|
@@ -96621,9 +97161,9 @@ var PropertyDefinitions = /*#__PURE__*/forwardRef(function PropertyDefinitions(_
|
|
|
96621
97161
|
type: 'contains'
|
|
96622
97162
|
},
|
|
96623
97163
|
lookupValue: 'description',
|
|
96624
|
-
lookupLabelTemplate: function lookupLabelTemplate(
|
|
96625
|
-
var value =
|
|
96626
|
-
name =
|
|
97164
|
+
lookupLabelTemplate: function lookupLabelTemplate(_ref5) {
|
|
97165
|
+
var value = _ref5.value,
|
|
97166
|
+
name = _ref5.name;
|
|
96627
97167
|
return name ? "".concat(value, " \u2013 ").concat(name) : value;
|
|
96628
97168
|
},
|
|
96629
97169
|
// The key is what gets stored, so an item without one cannot be chosen
|
|
@@ -96650,10 +97190,10 @@ var PropertyDefinitions = /*#__PURE__*/forwardRef(function PropertyDefinitions(_
|
|
|
96650
97190
|
cellDataType: 'enum',
|
|
96651
97191
|
editable: true,
|
|
96652
97192
|
customParams: {
|
|
96653
|
-
enumData: ENTITY_TYPES.map(function (
|
|
96654
|
-
var value =
|
|
96655
|
-
label =
|
|
96656
|
-
fallback =
|
|
97193
|
+
enumData: ENTITY_TYPES.map(function (_ref6) {
|
|
97194
|
+
var value = _ref6.value,
|
|
97195
|
+
label = _ref6.label,
|
|
97196
|
+
fallback = _ref6.fallback;
|
|
96657
97197
|
return {
|
|
96658
97198
|
value: value,
|
|
96659
97199
|
name: t(label, {
|
|
@@ -96673,18 +97213,18 @@ var PropertyDefinitions = /*#__PURE__*/forwardRef(function PropertyDefinitions(_
|
|
|
96673
97213
|
headerName: 'backoffice.idmPropertyDefinitions.label.allowedOrganizationIds',
|
|
96674
97214
|
field: 'allowedOrganizationIds',
|
|
96675
97215
|
cellDataType: 'lookup',
|
|
96676
|
-
editable: function editable(
|
|
96677
|
-
var data =
|
|
97216
|
+
editable: function editable(_ref7) {
|
|
97217
|
+
var data = _ref7.data;
|
|
96678
97218
|
return !(data !== null && data !== void 0 && data.global);
|
|
96679
97219
|
},
|
|
96680
|
-
cellRendererSelector: function cellRendererSelector(
|
|
96681
|
-
var data =
|
|
97220
|
+
cellRendererSelector: function cellRendererSelector(_ref8) {
|
|
97221
|
+
var data = _ref8.data;
|
|
96682
97222
|
return data !== null && data !== void 0 && data.global ? {
|
|
96683
97223
|
component: VisibleToAllOrganizationsCell
|
|
96684
97224
|
} : undefined;
|
|
96685
97225
|
},
|
|
96686
|
-
tooltipValueGetter: function tooltipValueGetter(
|
|
96687
|
-
var data =
|
|
97226
|
+
tooltipValueGetter: function tooltipValueGetter(_ref9) {
|
|
97227
|
+
var data = _ref9.data;
|
|
96688
97228
|
return data !== null && data !== void 0 && data.global ? t(VISIBLE_TO_ALL_ORGANIZATIONS.key, {
|
|
96689
97229
|
defaultValue: VISIBLE_TO_ALL_ORGANIZATIONS.defaultValue
|
|
96690
97230
|
}) : undefined;
|
|
@@ -101813,6 +102353,10 @@ var text$2 = function text(value) {
|
|
|
101813
102353
|
var amount = function amount(value) {
|
|
101814
102354
|
return typeof value === 'number' ? value : typeof value === 'string' && value.trim() !== '' ? Number(value) : NaN;
|
|
101815
102355
|
};
|
|
102356
|
+
// what the transfer writes as an element — 0 included
|
|
102357
|
+
var isSet = function isSet(value) {
|
|
102358
|
+
return typeof value === 'number' || text$2(value) !== undefined;
|
|
102359
|
+
};
|
|
101816
102360
|
var rowsAt = function rowsAt(row, path, context) {
|
|
101817
102361
|
var value = context.valueOf(row, path);
|
|
101818
102362
|
return Array.isArray(value) ? value : [];
|
|
@@ -101838,6 +102382,83 @@ var isOnPlanner = function isOnPlanner(row, context) {
|
|
|
101838
102382
|
return context.valueOf(row, 'customData.SAP.SAP_MAW1_ZZPLTOL') === '004';
|
|
101839
102383
|
};
|
|
101840
102384
|
|
|
102385
|
+
/**
|
|
102386
|
+
* A table SI_O_S_ARTIKEL_POST takes as repeated rows, with the elements its schema requires in every row (minOccurs 1
|
|
102387
|
+
* in diva-pfister-article `static/SI_O_S_ARTIKEL_POST.xsd`) — the transfer refuses a message missing one, SAP PI
|
|
102388
|
+
* would answer it with a bare "Server Error".
|
|
102389
|
+
*/
|
|
102390
|
+
|
|
102391
|
+
var SAP_TABLES = [{
|
|
102392
|
+
key: 'sapMandatoryEk',
|
|
102393
|
+
reasonDefault: 'EK-Kondition mit Betrag ohne Konditionsart, Währung oder Preiseinheit',
|
|
102394
|
+
path: 'customData.SAP.SAP_KONP_EK',
|
|
102395
|
+
mandatory: ['SAP_KONP_KSCHL', 'SAP_KONP_KONWA', 'SAP_KONP_KPEIN'],
|
|
102396
|
+
amounts: {
|
|
102397
|
+
PB00: 'customData.CALC_KONP_KBETR'
|
|
102398
|
+
}
|
|
102399
|
+
}, {
|
|
102400
|
+
key: 'sapMandatoryVk',
|
|
102401
|
+
reasonDefault: 'VK-Kondition mit Betrag ohne Konditionsart, Verkaufsorganisation, Vertriebsweg, Währung oder Preiseinheit',
|
|
102402
|
+
path: 'customData.SAP.SAP_KONP_VK',
|
|
102403
|
+
mandatory: ['SAP_KONP_KSCHL', 'SAP_KONP_VKORG', 'SAP_KONP_VTWEG', 'SAP_KONP_KONWA', 'SAP_KONP_KPEIN'],
|
|
102404
|
+
amounts: {
|
|
102405
|
+
VKP0: 'customData.KONP_VKP0_3',
|
|
102406
|
+
ZVLP: 'customData.KONP_VLP0_2',
|
|
102407
|
+
ZRBK: 'customData.KONP_ZRBK',
|
|
102408
|
+
ZL00: 'customData.KONP_ZL00'
|
|
102409
|
+
}
|
|
102410
|
+
}, {
|
|
102411
|
+
key: 'sapMandatoryMarm',
|
|
102412
|
+
reasonDefault: 'Mengeneinheit ohne Einheit',
|
|
102413
|
+
path: 'customData.SAP.SAP_MARM',
|
|
102414
|
+
mandatory: ['SAP_MARM_MEINH']
|
|
102415
|
+
}, {
|
|
102416
|
+
key: 'sapMandatoryMvke',
|
|
102417
|
+
reasonDefault: 'Vertriebsliniendaten ohne Verkaufsorganisation oder Vertriebsweg',
|
|
102418
|
+
path: 'customData.SAP.SAP_MVKE',
|
|
102419
|
+
mandatory: ['SAP_MVKE_VKORG', 'SAP_MVKE_VTWEG']
|
|
102420
|
+
}, {
|
|
102421
|
+
key: 'sapMandatoryAusp',
|
|
102422
|
+
reasonDefault: 'Klassifizierungsmerkmal ohne Name oder Wert',
|
|
102423
|
+
path: 'customData.SAP.SAP_AUSP',
|
|
102424
|
+
mandatory: ['SAP_AUSP_ATNAM', 'SAP_AUSP_ATWRT']
|
|
102425
|
+
}, {
|
|
102426
|
+
key: 'sapMandatoryMlgn',
|
|
102427
|
+
reasonDefault: 'Lagernummerndaten ohne Lagernummer',
|
|
102428
|
+
path: 'customData.SAP.SAP_MLGN',
|
|
102429
|
+
mandatory: ['SAP_MLGN_LGNUM']
|
|
102430
|
+
}, {
|
|
102431
|
+
key: 'sapMandatoryMlgt',
|
|
102432
|
+
reasonDefault: 'Lagertypdaten ohne Lagernummer, Lagertyp oder Lagerplatz',
|
|
102433
|
+
path: 'customData.SAP.SAP_MLGT',
|
|
102434
|
+
mandatory: ['SAP_MLGT_LGNUM', 'SAP_MLGT_LGTYP', 'SAP_MLGT_LGPLA']
|
|
102435
|
+
}];
|
|
102436
|
+
|
|
102437
|
+
/** Every row of the table the transfer sends carries the schema's mandatory elements. */
|
|
102438
|
+
var sapTableRule = function sapTableRule(_ref) {
|
|
102439
|
+
var key = _ref.key,
|
|
102440
|
+
reasonDefault = _ref.reasonDefault,
|
|
102441
|
+
path = _ref.path,
|
|
102442
|
+
mandatory = _ref.mandatory,
|
|
102443
|
+
amounts = _ref.amounts;
|
|
102444
|
+
return {
|
|
102445
|
+
key: key,
|
|
102446
|
+
reason: "backoffice.assortmentmanager.articledata.readiness.".concat(key),
|
|
102447
|
+
reasonDefault: reasonDefault,
|
|
102448
|
+
holds: function holds(row, context) {
|
|
102449
|
+
return rowsAt(row, path, context).every(function (entry) {
|
|
102450
|
+
if (amounts) {
|
|
102451
|
+
var amountPath = typeof entry.SAP_KONP_KSCHL === 'string' ? amounts[entry.SAP_KONP_KSCHL] : undefined;
|
|
102452
|
+
if (!isSet(amountPath ? context.valueOf(row, amountPath) : entry.SAP_KONP_KBETR)) return true;
|
|
102453
|
+
}
|
|
102454
|
+
return mandatory.every(function (name) {
|
|
102455
|
+
return isSet(entry[name]);
|
|
102456
|
+
});
|
|
102457
|
+
});
|
|
102458
|
+
}
|
|
102459
|
+
};
|
|
102460
|
+
};
|
|
102461
|
+
|
|
101841
102462
|
/**
|
|
101842
102463
|
* Legacy SAP_MARM validation (validateSapMarm): the COL row's X is the number of packages; once package rows exist
|
|
101843
102464
|
* they are exactly C01…CX, each with its dimensions and weight. A COL row without packages is allowed. Also shown per
|
|
@@ -101881,7 +102502,7 @@ var COLLI_PACKAGES_RULE = {
|
|
|
101881
102502
|
* Row fields the rules read that no catalogue column carries — the article grid projects them as hidden
|
|
101882
102503
|
* columns so the loaded rows hold them (and a duplicated row starts without them).
|
|
101883
102504
|
*/
|
|
101884
|
-
var READINESS_PROJECTION_FIELDS = ['divaNr'];
|
|
102505
|
+
var READINESS_PROJECTION_FIELDS = ['divaNr', 'customData.SAP.SAP_KONP_VK', 'customData.SAP.SAP_MLGN', 'customData.SAP.SAP_MLGT'];
|
|
101885
102506
|
|
|
101886
102507
|
/**
|
|
101887
102508
|
* What an article has to satisfy before Pfister's SAP transfer accepts it — the checks the legacy made
|
|
@@ -101923,7 +102544,7 @@ var ARTICLE_READINESS_RULES = [{
|
|
|
101923
102544
|
return condition.SAP_KONP_KSCHL === 'PB00';
|
|
101924
102545
|
});
|
|
101925
102546
|
}
|
|
101926
|
-
}, {
|
|
102547
|
+
}].concat(_toConsumableArray(SAP_TABLES.map(sapTableRule)), [{
|
|
101927
102548
|
// SAP: "Zum EAN-Typ HE ist keine interne Nummernvergabe vorgesehen"
|
|
101928
102549
|
key: 'eanForNumtpHe',
|
|
101929
102550
|
reason: 'backoffice.assortmentmanager.articledata.readiness.eanForNumtpHe',
|
|
@@ -101960,7 +102581,7 @@ var ARTICLE_READINESS_RULES = [{
|
|
|
101960
102581
|
holds: function holds(row, context) {
|
|
101961
102582
|
return inList(row, 'customData.SAP.SAP_MARA_PRDHA', 'PRODH', context);
|
|
101962
102583
|
}
|
|
101963
|
-
}];
|
|
102584
|
+
}]);
|
|
101964
102585
|
|
|
101965
102586
|
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; }
|
|
101966
102587
|
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; }
|