@crystaldesign/diva-backoffice 26.8.0-beta.21 → 26.8.0-beta.23
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 +600 -390
- package/build/types/backoffice/src/ui/CommonComponents/commonEnums.d.ts +10 -0
- package/build/types/backoffice/src/ui/CommonComponents/commonEnums.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/CommonComponents/createTranslatedColumnConfig.d.ts +2 -1
- package/build/types/backoffice/src/ui/CommonComponents/createTranslatedColumnConfig.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/CatalogVersions.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/IdmCatalogs.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/Items.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePrices/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts.map +1 -1
- package/build/types/backoffice/src/utils/getIcons.d.ts.map +1 -1
- package/package.json +9 -9
package/build/esm/index.js
CHANGED
|
@@ -71,6 +71,12 @@ import OpenAIOutlined from '@ant-design/icons/OpenAIOutlined';
|
|
|
71
71
|
import SendOutlined from '@ant-design/icons/SendOutlined';
|
|
72
72
|
import ToolOutlined from '@ant-design/icons/ToolOutlined';
|
|
73
73
|
import BellOutlined from '@ant-design/icons/BellOutlined';
|
|
74
|
+
import CodeSandboxOutlined from '@ant-design/icons/CodeSandboxOutlined';
|
|
75
|
+
import BookOutlined from '@ant-design/icons/BookOutlined';
|
|
76
|
+
import GroupOutlined from '@ant-design/icons/GroupOutlined';
|
|
77
|
+
import BankOutlined from '@ant-design/icons/BankOutlined';
|
|
78
|
+
import SlidersOutlined from '@ant-design/icons/SlidersOutlined';
|
|
79
|
+
import FlagOutlined from '@ant-design/icons/FlagOutlined';
|
|
74
80
|
import cloneDeep from 'lodash/cloneDeep';
|
|
75
81
|
import InfoCircleOutlined from '@ant-design/icons/InfoCircleOutlined';
|
|
76
82
|
import DivaUtils$1, { nanoid, DivaError as DivaError$1 } from '@crystaldesign/diva-utils';
|
|
@@ -183,8 +189,8 @@ import { GoogleGenAI } from '@google/genai';
|
|
|
183
189
|
function _createForOfIteratorHelper$B(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$B(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
184
190
|
function _unsupportedIterableToArray$B(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$B(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$B(r, a) : void 0; } }
|
|
185
191
|
function _arrayLikeToArray$B(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
186
|
-
function ownKeys$
|
|
187
|
-
function _objectSpread$
|
|
192
|
+
function ownKeys$1C(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; }
|
|
193
|
+
function _objectSpread$1C(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1C(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1C(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
188
194
|
var LOG$l = getLogger('Backoffice', 'ApplyMapping');
|
|
189
195
|
function applyMapping (_ref) {
|
|
190
196
|
var mappable = _ref.mappable,
|
|
@@ -205,10 +211,10 @@ function applyMapping (_ref) {
|
|
|
205
211
|
var newValue = {};
|
|
206
212
|
newValue[newKey] = valueToAdd;
|
|
207
213
|
if ((startValue === null || startValue === void 0 ? void 0 : startValue[newKey]) != undefined) {
|
|
208
|
-
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$
|
|
214
|
+
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$1C(_objectSpread$1C({}, startValue[newKey]), valueToAdd);else startValue[newKey] = type == 'addToSourceValue' ? startValue[newKey] + valueToAdd : valueToAdd;
|
|
209
215
|
return startValue;
|
|
210
216
|
}
|
|
211
|
-
if (newIdx == 1) return _objectSpread$
|
|
217
|
+
if (newIdx == 1) return _objectSpread$1C(_objectSpread$1C({}, startValue), newValue);
|
|
212
218
|
return _getTarget(idx + 1, keys, startValue, newValue);
|
|
213
219
|
};
|
|
214
220
|
returnValue = _getTarget(0, key.split('.'), returnValue, value);
|
|
@@ -511,8 +517,8 @@ function getLeafColumns(columns) {
|
|
|
511
517
|
});
|
|
512
518
|
}
|
|
513
519
|
|
|
514
|
-
function ownKeys$
|
|
515
|
-
function _objectSpread$
|
|
520
|
+
function ownKeys$1B(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; }
|
|
521
|
+
function _objectSpread$1B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1B(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
516
522
|
var LOG$k = getLogger('Backoffice', 'ApiHandler');
|
|
517
523
|
var jp = require('jsonpath');
|
|
518
524
|
var _default$c = /*#__PURE__*/function () {
|
|
@@ -691,7 +697,7 @@ var _default$c = /*#__PURE__*/function () {
|
|
|
691
697
|
_context2.next = 20;
|
|
692
698
|
return fetch(finalUrl, {
|
|
693
699
|
method: this._updateMethod,
|
|
694
|
-
headers: _objectSpread$
|
|
700
|
+
headers: _objectSpread$1B(_objectSpread$1B({}, jwt ? {
|
|
695
701
|
Authorization: 'Bearer ' + jwt
|
|
696
702
|
} : {}), {}, {
|
|
697
703
|
'Content-Type': 'application/json'
|
|
@@ -784,7 +790,7 @@ var _default$c = /*#__PURE__*/function () {
|
|
|
784
790
|
rootStore: this._rootStore,
|
|
785
791
|
fallBackToParams: true
|
|
786
792
|
});
|
|
787
|
-
if (data) createData = _objectSpread$
|
|
793
|
+
if (data) createData = _objectSpread$1B({}, data);
|
|
788
794
|
} else if (data !== undefined) {
|
|
789
795
|
createData = applyMapping({
|
|
790
796
|
mappable: data,
|
|
@@ -1046,7 +1052,7 @@ var _default$c = /*#__PURE__*/function () {
|
|
|
1046
1052
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1047
1053
|
case 2:
|
|
1048
1054
|
jwt = (_this$_rootStore5 = this._rootStore) === null || _this$_rootStore5 === void 0 ? void 0 : _this$_rootStore5.dataStore.jwt;
|
|
1049
|
-
url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1055
|
+
url = filterServerSide ? parseServersideFilters(_objectSpread$1B(_objectSpread$1B({}, filterServerSide), {}, {
|
|
1050
1056
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1051
1057
|
baseUrl: this._readListUrl,
|
|
1052
1058
|
prefilter: prefilter
|
|
@@ -1066,7 +1072,7 @@ var _default$c = /*#__PURE__*/function () {
|
|
|
1066
1072
|
});
|
|
1067
1073
|
case 6:
|
|
1068
1074
|
response = _context8.sent;
|
|
1069
|
-
return _context8.abrupt("return", _objectSpread$
|
|
1075
|
+
return _context8.abrupt("return", _objectSpread$1B(_objectSpread$1B({}, response), {}, {
|
|
1070
1076
|
data: response.data.map(function (d) {
|
|
1071
1077
|
return _this2.aplyJsonPath(d, _this2._readJsonPath);
|
|
1072
1078
|
})
|
|
@@ -1090,7 +1096,7 @@ var _default$c = /*#__PURE__*/function () {
|
|
|
1090
1096
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1091
1097
|
}
|
|
1092
1098
|
(_this$_rootStore6 = this._rootStore) === null || _this$_rootStore6 === void 0 ? void 0 : _this$_rootStore6.dataStore.jwt;
|
|
1093
|
-
var url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1099
|
+
var url = filterServerSide ? parseServersideFilters(_objectSpread$1B(_objectSpread$1B({}, filterServerSide), {}, {
|
|
1094
1100
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1095
1101
|
baseUrl: this._readListUrl,
|
|
1096
1102
|
prefilter: prefilter
|
|
@@ -2005,8 +2011,8 @@ function buildContentTranslationItems(content, t) {
|
|
|
2005
2011
|
return translationItems;
|
|
2006
2012
|
}
|
|
2007
2013
|
|
|
2008
|
-
function ownKeys$
|
|
2009
|
-
function _objectSpread$
|
|
2014
|
+
function ownKeys$1A(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; }
|
|
2015
|
+
function _objectSpread$1A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1A(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2010
2016
|
var PROMPT_RESOLUTION_VALUE_STRINGS = promptAndAiTesterOptions.aiImageTester.resolutionOptions.map(function (o) {
|
|
2011
2017
|
return o.apiValue;
|
|
2012
2018
|
});
|
|
@@ -2047,7 +2053,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
2047
2053
|
var _i$permission;
|
|
2048
2054
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
2049
2055
|
});
|
|
2050
|
-
config = _objectSpread$
|
|
2056
|
+
config = _objectSpread$1A(_objectSpread$1A({}, config), {}, {
|
|
2051
2057
|
items: filteredItems
|
|
2052
2058
|
});
|
|
2053
2059
|
}
|
|
@@ -15047,6 +15053,18 @@ function getIcon(icon) {
|
|
|
15047
15053
|
return /*#__PURE__*/jsx(BellOutlined, {});
|
|
15048
15054
|
case 'ToolOutlined':
|
|
15049
15055
|
return /*#__PURE__*/jsx(ToolOutlined, {});
|
|
15056
|
+
case 'CodeSandboxOutlined':
|
|
15057
|
+
return /*#__PURE__*/jsx(CodeSandboxOutlined, {});
|
|
15058
|
+
case 'BookOutlined':
|
|
15059
|
+
return /*#__PURE__*/jsx(BookOutlined, {});
|
|
15060
|
+
case 'GroupOutlined':
|
|
15061
|
+
return /*#__PURE__*/jsx(GroupOutlined, {});
|
|
15062
|
+
case 'BankOutlined':
|
|
15063
|
+
return /*#__PURE__*/jsx(BankOutlined, {});
|
|
15064
|
+
case 'SlidersOutlined':
|
|
15065
|
+
return /*#__PURE__*/jsx(SlidersOutlined, {});
|
|
15066
|
+
case 'FlagOutlined':
|
|
15067
|
+
return /*#__PURE__*/jsx(FlagOutlined, {});
|
|
15050
15068
|
}
|
|
15051
15069
|
return undefined;
|
|
15052
15070
|
}
|
|
@@ -15354,8 +15372,8 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
15354
15372
|
}]);
|
|
15355
15373
|
}();
|
|
15356
15374
|
|
|
15357
|
-
function ownKeys$
|
|
15358
|
-
function _objectSpread$
|
|
15375
|
+
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; }
|
|
15376
|
+
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; }
|
|
15359
15377
|
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; } } }; }
|
|
15360
15378
|
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; } }
|
|
15361
15379
|
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; }
|
|
@@ -15498,7 +15516,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
15498
15516
|
if (index >= 0) {
|
|
15499
15517
|
this._additionalMenuElements[index] = {
|
|
15500
15518
|
key: key,
|
|
15501
|
-
element: _objectSpread$
|
|
15519
|
+
element: _objectSpread$1z(_objectSpread$1z({}, this._additionalMenuElements[index].element), {}, {
|
|
15502
15520
|
items: items,
|
|
15503
15521
|
selected: selected
|
|
15504
15522
|
})
|
|
@@ -15549,7 +15567,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
15549
15567
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
15550
15568
|
this.root.navigate('/' + path);
|
|
15551
15569
|
}
|
|
15552
|
-
this._menuElement1 = _objectSpread$
|
|
15570
|
+
this._menuElement1 = _objectSpread$1z(_objectSpread$1z({}, this.menuElement1), {}, {
|
|
15553
15571
|
selected: this._selectedMenuKeys[0]
|
|
15554
15572
|
});
|
|
15555
15573
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -15825,7 +15843,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
15825
15843
|
}
|
|
15826
15844
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
15827
15845
|
}).map(function (item) {
|
|
15828
|
-
return _objectSpread$
|
|
15846
|
+
return _objectSpread$1z(_objectSpread$1z({}, item), {}, {
|
|
15829
15847
|
items: item.items ? _this5.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
15830
15848
|
subMenu: item.subMenu ? _this5.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
15831
15849
|
});
|
|
@@ -15855,6 +15873,55 @@ var menu = [{
|
|
|
15855
15873
|
permission: 'backoffice_catalog',
|
|
15856
15874
|
icon: 'FolderOutlined',
|
|
15857
15875
|
subMenu: [{
|
|
15876
|
+
id: 'IDM',
|
|
15877
|
+
path: 'idmeditor',
|
|
15878
|
+
label: 'backoffice.menu.items.label.IDMCatalogEditor',
|
|
15879
|
+
permission: 'backoffice_ce_idmee',
|
|
15880
|
+
icon: 'OrderedListOutlined',
|
|
15881
|
+
items: [{
|
|
15882
|
+
id: 'IDMEnricherEditor',
|
|
15883
|
+
path: 'packages',
|
|
15884
|
+
label: 'backoffice.menu.items.label.EnricherPackages',
|
|
15885
|
+
permission: 'enricher_packages',
|
|
15886
|
+
icon: 'CodeSandboxOutlined',
|
|
15887
|
+
haSubRoutes: true
|
|
15888
|
+
}, {
|
|
15889
|
+
id: 'IDMCatalogEditor',
|
|
15890
|
+
path: 'catalogs',
|
|
15891
|
+
label: 'backoffice.menu.items.label.IDMCatalogs',
|
|
15892
|
+
permission: 'idm_catalogs',
|
|
15893
|
+
icon: 'BookOutlined',
|
|
15894
|
+
haSubRoutes: true
|
|
15895
|
+
}, {
|
|
15896
|
+
id: 'IDMCollectionEditor',
|
|
15897
|
+
path: 'collections',
|
|
15898
|
+
label: 'backoffice.menu.items.label.EnricherCollections',
|
|
15899
|
+
permission: 'enricher_collections',
|
|
15900
|
+
icon: 'GroupOutlined',
|
|
15901
|
+
haSubRoutes: false
|
|
15902
|
+
}, {
|
|
15903
|
+
id: 'IDMOrganizationFeaturesEditor',
|
|
15904
|
+
path: 'organizationfeatures',
|
|
15905
|
+
label: 'backoffice.menu.items.label.IDMOrganizationFeatures',
|
|
15906
|
+
permission: 'idm_catalogs_edit',
|
|
15907
|
+
icon: 'BankOutlined',
|
|
15908
|
+
haSubRoutes: false
|
|
15909
|
+
}, {
|
|
15910
|
+
id: 'IDMOrganizationOptionsEditor',
|
|
15911
|
+
path: 'organizationoptions',
|
|
15912
|
+
label: 'backoffice.menu.items.label.IDMOrganizationOptions',
|
|
15913
|
+
permission: 'idm_catalogs_edit',
|
|
15914
|
+
icon: 'SlidersOutlined',
|
|
15915
|
+
haSubRoutes: false
|
|
15916
|
+
}, {
|
|
15917
|
+
id: 'IDMFeaturesEditor',
|
|
15918
|
+
path: 'features',
|
|
15919
|
+
label: 'backoffice.menu.items.label.IDMFeatures',
|
|
15920
|
+
permission: 'idm_global_features',
|
|
15921
|
+
icon: 'FlagOutlined',
|
|
15922
|
+
haSubRoutes: false
|
|
15923
|
+
}]
|
|
15924
|
+
}, {
|
|
15858
15925
|
id: 'TableCatalogTranslations',
|
|
15859
15926
|
path: 'translations',
|
|
15860
15927
|
label: 'backoffice.menu.items.label.TableCatalogTranslations',
|
|
@@ -15972,55 +16039,6 @@ var menu = [{
|
|
|
15972
16039
|
},
|
|
15973
16040
|
disabledLabel: 'backoffice.menu.item.label.disabled.supplier'
|
|
15974
16041
|
}]
|
|
15975
|
-
}, {
|
|
15976
|
-
id: 'IDM',
|
|
15977
|
-
path: 'idmeditor',
|
|
15978
|
-
label: 'backoffice.menu.items.label.IDMCatalogEditor',
|
|
15979
|
-
permission: 'backoffice_ce_idmee',
|
|
15980
|
-
icon: 'OrderedListOutlined',
|
|
15981
|
-
items: [{
|
|
15982
|
-
id: 'IDMFeaturesEditor',
|
|
15983
|
-
path: 'features',
|
|
15984
|
-
label: 'backoffice.menu.items.label.IDMFeatures',
|
|
15985
|
-
permission: 'idm_global_features',
|
|
15986
|
-
icon: 'HistoryOutlined',
|
|
15987
|
-
haSubRoutes: false
|
|
15988
|
-
}, {
|
|
15989
|
-
id: 'IDMOrganizationFeaturesEditor',
|
|
15990
|
-
path: 'organizationfeatures',
|
|
15991
|
-
label: 'backoffice.menu.items.label.IDMOrganizationFeatures',
|
|
15992
|
-
permission: 'idm_catalogs',
|
|
15993
|
-
icon: 'HistoryOutlined',
|
|
15994
|
-
haSubRoutes: false
|
|
15995
|
-
}, {
|
|
15996
|
-
id: 'IDMOrganizationOptionsEditor',
|
|
15997
|
-
path: 'organizationoptions',
|
|
15998
|
-
label: 'backoffice.menu.items.label.IDMOrganizationOptions',
|
|
15999
|
-
permission: 'idm_catalogs',
|
|
16000
|
-
icon: 'HistoryOutlined',
|
|
16001
|
-
haSubRoutes: false
|
|
16002
|
-
}, {
|
|
16003
|
-
id: 'IDMCatalogEditor',
|
|
16004
|
-
path: 'catalogs',
|
|
16005
|
-
label: 'backoffice.menu.items.label.IDMCatalogs',
|
|
16006
|
-
permission: 'idm_catalogs',
|
|
16007
|
-
icon: 'HistoryOutlined',
|
|
16008
|
-
haSubRoutes: true
|
|
16009
|
-
}, {
|
|
16010
|
-
id: 'IDMEnricherEditor',
|
|
16011
|
-
path: 'packages',
|
|
16012
|
-
label: 'backoffice.menu.items.label.EnricherPackages',
|
|
16013
|
-
permission: 'enricher_packages',
|
|
16014
|
-
icon: 'HistoryOutlined',
|
|
16015
|
-
haSubRoutes: true
|
|
16016
|
-
}, {
|
|
16017
|
-
id: 'IDMCollectionEditor',
|
|
16018
|
-
path: 'collections',
|
|
16019
|
-
label: 'backoffice.menu.items.label.EnricherCollections',
|
|
16020
|
-
permission: 'enricher_collections',
|
|
16021
|
-
icon: 'HistoryOutlined',
|
|
16022
|
-
haSubRoutes: false
|
|
16023
|
-
}]
|
|
16024
16042
|
}]
|
|
16025
16043
|
}, {
|
|
16026
16044
|
id: 'Adminarea',
|
|
@@ -17196,8 +17214,8 @@ var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
17196
17214
|
return _createClass(_default);
|
|
17197
17215
|
}(_default$c);
|
|
17198
17216
|
|
|
17199
|
-
function ownKeys$
|
|
17200
|
-
function _objectSpread$
|
|
17217
|
+
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; }
|
|
17218
|
+
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; }
|
|
17201
17219
|
var LOG$i = getLogger('Backoffice', 'ContextStore');
|
|
17202
17220
|
|
|
17203
17221
|
/**
|
|
@@ -17232,7 +17250,7 @@ var ContextStore = /*#__PURE__*/function () {
|
|
|
17232
17250
|
key: "updateContext",
|
|
17233
17251
|
value: function updateContext(contextId, updates) {
|
|
17234
17252
|
var currentState = this.contexts.get(contextId) || {};
|
|
17235
|
-
var updatedState = _objectSpread$
|
|
17253
|
+
var updatedState = _objectSpread$1y(_objectSpread$1y({}, currentState), updates);
|
|
17236
17254
|
this.contexts.set(contextId, updatedState);
|
|
17237
17255
|
LOG$i.debug("Updated context ".concat(contextId), {
|
|
17238
17256
|
updatedState: updatedState
|
|
@@ -17440,8 +17458,8 @@ function removeEmpty(data) {
|
|
|
17440
17458
|
return undefined;
|
|
17441
17459
|
}
|
|
17442
17460
|
|
|
17443
|
-
function ownKeys$
|
|
17444
|
-
function _objectSpread$
|
|
17461
|
+
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; }
|
|
17462
|
+
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; }
|
|
17445
17463
|
function fetchFileData(_x) {
|
|
17446
17464
|
return _fetchFileData.apply(this, arguments);
|
|
17447
17465
|
}
|
|
@@ -17601,7 +17619,7 @@ function _uploadMediaItem() {
|
|
|
17601
17619
|
_context4.next = 4;
|
|
17602
17620
|
return fetch("".concat(root, "/v1/assets/uploads"), {
|
|
17603
17621
|
method: 'POST',
|
|
17604
|
-
headers: _objectSpread$
|
|
17622
|
+
headers: _objectSpread$1x({
|
|
17605
17623
|
'Content-Type': 'application/json'
|
|
17606
17624
|
}, auth),
|
|
17607
17625
|
body: JSON.stringify({
|
|
@@ -17667,7 +17685,7 @@ function _uploadMediaItem() {
|
|
|
17667
17685
|
_context4.next = 31;
|
|
17668
17686
|
return fetch("".concat(root, "/v1/assets/uploads/complete"), {
|
|
17669
17687
|
method: 'POST',
|
|
17670
|
-
headers: _objectSpread$
|
|
17688
|
+
headers: _objectSpread$1x({
|
|
17671
17689
|
'Content-Type': 'application/json'
|
|
17672
17690
|
}, auth),
|
|
17673
17691
|
body: JSON.stringify({
|
|
@@ -17712,7 +17730,7 @@ function _uploadMediaItem() {
|
|
|
17712
17730
|
refUrl = (_ref$url = ref.url) !== null && _ref$url !== void 0 ? _ref$url : ref.cdnUrl;
|
|
17713
17731
|
return _context4.abrupt("return", {
|
|
17714
17732
|
_id: mediaItem._id,
|
|
17715
|
-
ref: _objectSpread$
|
|
17733
|
+
ref: _objectSpread$1x(_objectSpread$1x({}, ref), {}, {
|
|
17716
17734
|
_id: ref._id,
|
|
17717
17735
|
url: refUrl
|
|
17718
17736
|
})
|
|
@@ -18160,8 +18178,8 @@ function getData$1(id, data) {
|
|
|
18160
18178
|
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; } } }; }
|
|
18161
18179
|
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; } }
|
|
18162
18180
|
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; }
|
|
18163
|
-
function ownKeys$
|
|
18164
|
-
function _objectSpread$
|
|
18181
|
+
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; }
|
|
18182
|
+
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; }
|
|
18165
18183
|
function toNamePath$2(name) {
|
|
18166
18184
|
if (name === undefined || name === '') return [];
|
|
18167
18185
|
return Array.isArray(name) ? name : [name];
|
|
@@ -18231,7 +18249,7 @@ function useFormData (_ref) {
|
|
|
18231
18249
|
var _useMemo = useMemo(function () {
|
|
18232
18250
|
setCanSave === null || setCanSave === void 0 || setCanSave(true);
|
|
18233
18251
|
var baseConfiguration = configurationOverride !== null && configurationOverride !== void 0 ? configurationOverride : root.configurationStore.getConfiguration(id, 'Form');
|
|
18234
|
-
var configuration = _objectSpread$
|
|
18252
|
+
var configuration = _objectSpread$1w(_objectSpread$1w({}, baseConfiguration), {}, {
|
|
18235
18253
|
apiInterface: apiInterface !== null && apiInterface !== void 0 ? apiInterface : baseConfiguration.apiInterface
|
|
18236
18254
|
});
|
|
18237
18255
|
var c = {
|
|
@@ -18331,7 +18349,7 @@ function useFormData (_ref) {
|
|
|
18331
18349
|
multipleEditingData = inboundData;
|
|
18332
18350
|
}
|
|
18333
18351
|
return {
|
|
18334
|
-
loadedData: _onLoadFields(_objectSpread$
|
|
18352
|
+
loadedData: _onLoadFields(_objectSpread$1w({}, dt)),
|
|
18335
18353
|
multipleEditingData: multipleEditingData
|
|
18336
18354
|
};
|
|
18337
18355
|
}, [inboundData]),
|
|
@@ -18358,7 +18376,7 @@ function useFormData (_ref) {
|
|
|
18358
18376
|
setFieldErrors = _useState20[1];
|
|
18359
18377
|
useEffect(function () {
|
|
18360
18378
|
var _loadedData$_id2;
|
|
18361
|
-
setState(_objectSpread$
|
|
18379
|
+
setState(_objectSpread$1w(_objectSpread$1w({}, state), {}, {
|
|
18362
18380
|
data: loadedData,
|
|
18363
18381
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
18364
18382
|
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),
|
|
@@ -18471,7 +18489,7 @@ function useFormData (_ref) {
|
|
|
18471
18489
|
root.actions.toggleLoading('saving_form');
|
|
18472
18490
|
_context2.prev = 4;
|
|
18473
18491
|
_context2.next = 7;
|
|
18474
|
-
return setDynamicFields(_objectSpread$
|
|
18492
|
+
return setDynamicFields(_objectSpread$1w({}, state.data), newData);
|
|
18475
18493
|
case 7:
|
|
18476
18494
|
newData = _context2.sent;
|
|
18477
18495
|
_context2.next = 10;
|
|
@@ -18486,7 +18504,7 @@ function useFormData (_ref) {
|
|
|
18486
18504
|
root.actions.toggleLoading('saving_form');
|
|
18487
18505
|
throw _context2.t0;
|
|
18488
18506
|
case 17:
|
|
18489
|
-
setState(_objectSpread$
|
|
18507
|
+
setState(_objectSpread$1w(_objectSpread$1w({}, state), {}, {
|
|
18490
18508
|
loading: true
|
|
18491
18509
|
}));
|
|
18492
18510
|
finalData = state.data;
|
|
@@ -18539,14 +18557,14 @@ function useFormData (_ref) {
|
|
|
18539
18557
|
_context2.next = 47;
|
|
18540
18558
|
break;
|
|
18541
18559
|
}
|
|
18542
|
-
setFieldErrors(_objectSpread$
|
|
18560
|
+
setFieldErrors(_objectSpread$1w(_objectSpread$1w({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
18543
18561
|
return _context2.abrupt("return", undefined);
|
|
18544
18562
|
case 47:
|
|
18545
18563
|
throw _context2.t1;
|
|
18546
18564
|
case 48:
|
|
18547
18565
|
_context2.prev = 48;
|
|
18548
18566
|
root.actions.toggleLoading('saving_form');
|
|
18549
|
-
setState(_objectSpread$
|
|
18567
|
+
setState(_objectSpread$1w(_objectSpread$1w({}, state), {}, {
|
|
18550
18568
|
data: finalData,
|
|
18551
18569
|
loading: false
|
|
18552
18570
|
}));
|
|
@@ -18602,11 +18620,11 @@ function useFormData (_ref) {
|
|
|
18602
18620
|
var data = d !== null && d !== void 0 ? d : mergeWith(cloneDeep(state.data), formValues, mergeFormWithCustomizer);
|
|
18603
18621
|
if (id) {
|
|
18604
18622
|
setFieldInObject(id, data, value);
|
|
18605
|
-
var newFieldErrors = _objectSpread$
|
|
18623
|
+
var newFieldErrors = _objectSpread$1w({}, fieldErrors);
|
|
18606
18624
|
delete newFieldErrors[id.toString()];
|
|
18607
18625
|
setFieldErrors(newFieldErrors);
|
|
18608
18626
|
}
|
|
18609
|
-
setState(_objectSpread$
|
|
18627
|
+
setState(_objectSpread$1w(_objectSpread$1w({}, state), {}, {
|
|
18610
18628
|
data: data
|
|
18611
18629
|
}));
|
|
18612
18630
|
return data;
|
|
@@ -18662,10 +18680,10 @@ function useFormData (_ref) {
|
|
|
18662
18680
|
} else {
|
|
18663
18681
|
data[name] = val;
|
|
18664
18682
|
}
|
|
18665
|
-
if (configuration.itemSelectorReset) setState(_objectSpread$
|
|
18683
|
+
if (configuration.itemSelectorReset) setState(_objectSpread$1w(_objectSpread$1w({}, state), {}, {
|
|
18666
18684
|
data: data
|
|
18667
|
-
}));else setState(_objectSpread$
|
|
18668
|
-
data: _objectSpread$
|
|
18685
|
+
}));else setState(_objectSpread$1w(_objectSpread$1w({}, state), {}, {
|
|
18686
|
+
data: _objectSpread$1w(_objectSpread$1w({}, state.data), data)
|
|
18669
18687
|
}));
|
|
18670
18688
|
if (Array.isArray(configuration.items[selectorIdx[0]]) && Array.isArray(configuration.items[selectorIdx[0]][selectorIdx[1]])) {
|
|
18671
18689
|
setSelectedItemsIndex([selectorIdx[0], selectorIdx[1]]);
|
|
@@ -18698,12 +18716,12 @@ function useFormData (_ref) {
|
|
|
18698
18716
|
var val = _ref6.value;
|
|
18699
18717
|
if (value === val) {
|
|
18700
18718
|
if (configuration.itemSelectorReset) {
|
|
18701
|
-
setState(_objectSpread$
|
|
18719
|
+
setState(_objectSpread$1w(_objectSpread$1w({}, state), {}, {
|
|
18702
18720
|
data: _defineProperty({}, name, val)
|
|
18703
18721
|
}));
|
|
18704
18722
|
} else {
|
|
18705
|
-
setState(_objectSpread$
|
|
18706
|
-
data: _objectSpread$
|
|
18723
|
+
setState(_objectSpread$1w(_objectSpread$1w({}, state), {}, {
|
|
18724
|
+
data: _objectSpread$1w(_objectSpread$1w({}, state.data), {}, _defineProperty({}, name, val))
|
|
18707
18725
|
}));
|
|
18708
18726
|
}
|
|
18709
18727
|
setSelectedItemsIndex([selectedItemsIndex[0], idx]);
|
|
@@ -18878,7 +18896,7 @@ function useFormData (_ref) {
|
|
|
18878
18896
|
for (var i = 0; i < configuration.tools.length; i++) {
|
|
18879
18897
|
var _tool$defaultOpen;
|
|
18880
18898
|
var tool = configuration.tools[i];
|
|
18881
|
-
tools.push(_objectSpread$
|
|
18899
|
+
tools.push(_objectSpread$1w(_objectSpread$1w({}, tool), {}, {
|
|
18882
18900
|
parameters: {
|
|
18883
18901
|
data: state.data,
|
|
18884
18902
|
formInstance: form,
|
|
@@ -19031,7 +19049,7 @@ function useFormData (_ref) {
|
|
|
19031
19049
|
}
|
|
19032
19050
|
});
|
|
19033
19051
|
}
|
|
19034
|
-
return _objectSpread$
|
|
19052
|
+
return _objectSpread$1w(_objectSpread$1w({}, state), {}, {
|
|
19035
19053
|
getIsHidden: getIsHidden,
|
|
19036
19054
|
setUsedPreset: setUsedPreset,
|
|
19037
19055
|
configuration: configuration,
|
|
@@ -19149,8 +19167,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
19149
19167
|
};
|
|
19150
19168
|
|
|
19151
19169
|
var _excluded$9 = ["key", "name"];
|
|
19152
|
-
function ownKeys$
|
|
19153
|
-
function _objectSpread$
|
|
19170
|
+
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; }
|
|
19171
|
+
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; }
|
|
19154
19172
|
var FormList$2 = function FormList(_ref) {
|
|
19155
19173
|
var value = _ref.value,
|
|
19156
19174
|
item = _ref.item,
|
|
@@ -19215,7 +19233,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
19215
19233
|
var n = [name].concat(_toConsumableArray(Array.isArray(i.name) ? i.name : [i.name]), _toConsumableArray(i.doTranslate && postFixName ? Array.isArray(postFixName) ? postFixName : [postFixName] : []));
|
|
19216
19234
|
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
19217
19235
|
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
19218
|
-
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$
|
|
19236
|
+
return /*#__PURE__*/createElement(Form$2.Item, _objectSpread$1v(_objectSpread$1v({}, restField), {}, {
|
|
19219
19237
|
id: n.join(),
|
|
19220
19238
|
key: n.join(),
|
|
19221
19239
|
name: n,
|
|
@@ -19227,7 +19245,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
19227
19245
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
19228
19246
|
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
19229
19247
|
hidden: hidden
|
|
19230
|
-
}), getElement(_objectSpread$
|
|
19248
|
+
}), getElement(_objectSpread$1v(_objectSpread$1v({}, i), {}, {
|
|
19231
19249
|
name: n
|
|
19232
19250
|
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
19233
19251
|
})
|
|
@@ -19461,8 +19479,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
19461
19479
|
var css_248z$O = ".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";
|
|
19462
19480
|
styleInject(css_248z$O);
|
|
19463
19481
|
|
|
19464
|
-
function ownKeys$
|
|
19465
|
-
function _objectSpread$
|
|
19482
|
+
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; }
|
|
19483
|
+
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; }
|
|
19466
19484
|
var SubTitle = function SubTitle(_ref) {
|
|
19467
19485
|
var _item$label, _item$orientation, _item$buttonIds;
|
|
19468
19486
|
var item = _ref.item,
|
|
@@ -19472,7 +19490,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
19472
19490
|
var title = (_item$label = item.label) !== null && _item$label !== void 0 ? _item$label : Array.isArray(item.name) ? item.name[0].toString() : item.name;
|
|
19473
19491
|
return /*#__PURE__*/jsx(Divider, {
|
|
19474
19492
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'horizontal',
|
|
19475
|
-
style: _objectSpread$
|
|
19493
|
+
style: _objectSpread$1u({}, item.style),
|
|
19476
19494
|
children: /*#__PURE__*/jsxs("div", {
|
|
19477
19495
|
className: wrapper$7,
|
|
19478
19496
|
children: [t(title, title), ((_item$buttonIds = item.buttonIds) === null || _item$buttonIds === void 0 ? void 0 : _item$buttonIds.length) && item.buttonIds.map(function (b) {
|
|
@@ -19766,8 +19784,8 @@ var css_248z$N = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\
|
|
|
19766
19784
|
styleInject(css_248z$N);
|
|
19767
19785
|
|
|
19768
19786
|
var _excluded$8 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title", "sharedState"];
|
|
19769
|
-
function ownKeys$
|
|
19770
|
-
function _objectSpread$
|
|
19787
|
+
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; }
|
|
19788
|
+
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; }
|
|
19771
19789
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
19772
19790
|
var apiInterface = _ref.apiInterface,
|
|
19773
19791
|
selectMapping = _ref.selectMapping,
|
|
@@ -19794,7 +19812,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
|
19794
19812
|
return /*#__PURE__*/jsxs("div", {
|
|
19795
19813
|
ref: ref,
|
|
19796
19814
|
className: classNames(title ? wrapper$6 : undefined),
|
|
19797
|
-
children: [title, /*#__PURE__*/jsx(Select, _objectSpread$
|
|
19815
|
+
children: [title, /*#__PURE__*/jsx(Select, _objectSpread$1t(_objectSpread$1t({}, selectProps), {}, {
|
|
19798
19816
|
showSearch: search,
|
|
19799
19817
|
loading: state.loading,
|
|
19800
19818
|
options: state.options,
|
|
@@ -20411,8 +20429,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
20411
20429
|
}]);
|
|
20412
20430
|
}(_default$c);
|
|
20413
20431
|
|
|
20414
|
-
function ownKeys$
|
|
20415
|
-
function _objectSpread$
|
|
20432
|
+
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; }
|
|
20433
|
+
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; }
|
|
20416
20434
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
20417
20435
|
function useSelectClientRelationCatalog (_ref) {
|
|
20418
20436
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -20581,7 +20599,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
20581
20599
|
case 22:
|
|
20582
20600
|
supplierData = _context2.sent;
|
|
20583
20601
|
case 23:
|
|
20584
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
20602
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$1s(_objectSpread$1s({}, _selectedSupplier), {}, {
|
|
20585
20603
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
20586
20604
|
}), supplierData);
|
|
20587
20605
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -20814,8 +20832,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
20814
20832
|
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; } } }; }
|
|
20815
20833
|
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; } }
|
|
20816
20834
|
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; }
|
|
20817
|
-
function ownKeys$
|
|
20818
|
-
function _objectSpread$
|
|
20835
|
+
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; }
|
|
20836
|
+
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; }
|
|
20819
20837
|
function useSelectData (_ref) {
|
|
20820
20838
|
var data = _ref.data,
|
|
20821
20839
|
onChange = _ref.onChange,
|
|
@@ -21287,7 +21305,7 @@ function useSelectData (_ref) {
|
|
|
21287
21305
|
setFetching(true);
|
|
21288
21306
|
serverSideParams = {
|
|
21289
21307
|
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) {
|
|
21290
|
-
return _objectSpread$
|
|
21308
|
+
return _objectSpread$1r(_objectSpread$1r({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
21291
21309
|
}, {}) : {
|
|
21292
21310
|
_id: [value, 'contains']
|
|
21293
21311
|
},
|
|
@@ -21764,8 +21782,8 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
21764
21782
|
var css_248z$K = ".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";
|
|
21765
21783
|
styleInject(css_248z$K);
|
|
21766
21784
|
|
|
21767
|
-
function ownKeys$
|
|
21768
|
-
function _objectSpread$
|
|
21785
|
+
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; }
|
|
21786
|
+
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; }
|
|
21769
21787
|
var LOG$f = getLogger('Backoffice', 'Translation Form');
|
|
21770
21788
|
function useTranslationHook (item, state) {
|
|
21771
21789
|
var root = useStore();
|
|
@@ -21898,7 +21916,7 @@ function useTranslationHook (item, state) {
|
|
|
21898
21916
|
case 0:
|
|
21899
21917
|
_context2.next = 2;
|
|
21900
21918
|
return apiHandler.create({
|
|
21901
|
-
locales: _objectSpread$
|
|
21919
|
+
locales: _objectSpread$1q({
|
|
21902
21920
|
de: {},
|
|
21903
21921
|
it: {},
|
|
21904
21922
|
fr: {},
|
|
@@ -21947,8 +21965,8 @@ function useTranslationHook (item, state) {
|
|
|
21947
21965
|
};
|
|
21948
21966
|
}
|
|
21949
21967
|
|
|
21950
|
-
function ownKeys$
|
|
21951
|
-
function _objectSpread$
|
|
21968
|
+
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; }
|
|
21969
|
+
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; }
|
|
21952
21970
|
var HiddenFormField = function HiddenFormField() {
|
|
21953
21971
|
return null;
|
|
21954
21972
|
};
|
|
@@ -22014,7 +22032,7 @@ var Translation = function Translation(_ref) {
|
|
|
22014
22032
|
}, key);
|
|
22015
22033
|
}
|
|
22016
22034
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
22017
|
-
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$
|
|
22035
|
+
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$1p(_objectSpread$1p({}, i), {}, {
|
|
22018
22036
|
name: n
|
|
22019
22037
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden, currentLang, newFormName) : /*#__PURE__*/jsx(Form$2.Item, {
|
|
22020
22038
|
id: idx.toString(),
|
|
@@ -22027,7 +22045,7 @@ var Translation = function Translation(_ref) {
|
|
|
22027
22045
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
22028
22046
|
help: (_state$fieldErrors$n$ = state.fieldErrors[n.toString()]) !== null && _state$fieldErrors$n$ !== void 0 ? _state$fieldErrors$n$ : i.helpText,
|
|
22029
22047
|
hidden: hidden,
|
|
22030
|
-
children: getElement(_objectSpread$
|
|
22048
|
+
children: getElement(_objectSpread$1p(_objectSpread$1p({}, i), {}, {
|
|
22031
22049
|
name: n
|
|
22032
22050
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden)
|
|
22033
22051
|
})
|
|
@@ -22514,8 +22532,8 @@ function deltaFromColors(mainHex, valueHex) {
|
|
|
22514
22532
|
return avg;
|
|
22515
22533
|
}
|
|
22516
22534
|
|
|
22517
|
-
function ownKeys$
|
|
22518
|
-
function _objectSpread$
|
|
22535
|
+
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; }
|
|
22536
|
+
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; }
|
|
22519
22537
|
function FormSlider(_ref) {
|
|
22520
22538
|
var item = _ref.item,
|
|
22521
22539
|
disabled = _ref.disabled,
|
|
@@ -22549,7 +22567,7 @@ function FormSlider(_ref) {
|
|
|
22549
22567
|
children: t('backoffice.form.slider.apiDefaultHint', {
|
|
22550
22568
|
defaultValue: 'Not set (Gemini API default, typically 1). Move the slider to set.'
|
|
22551
22569
|
})
|
|
22552
|
-
}) : null, /*#__PURE__*/jsx(Slider, _objectSpread$
|
|
22570
|
+
}) : null, /*#__PURE__*/jsx(Slider, _objectSpread$1o(_objectSpread$1o({
|
|
22553
22571
|
min: item.min,
|
|
22554
22572
|
max: item.max,
|
|
22555
22573
|
step: item.step
|
|
@@ -22580,8 +22598,8 @@ function FormSlider(_ref) {
|
|
|
22580
22598
|
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; } } }; }
|
|
22581
22599
|
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; } }
|
|
22582
22600
|
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; }
|
|
22583
|
-
function ownKeys$
|
|
22584
|
-
function _objectSpread$
|
|
22601
|
+
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; }
|
|
22602
|
+
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; }
|
|
22585
22603
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName, formName) {
|
|
22586
22604
|
var _isReadonly, _state$hiddenRequired, _state$data$_id, _state$data;
|
|
22587
22605
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -22618,7 +22636,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
22618
22636
|
}
|
|
22619
22637
|
});
|
|
22620
22638
|
case 'selectSimple':
|
|
22621
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
22639
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$1n(_objectSpread$1n({}, item), {}, {
|
|
22622
22640
|
disabled: disabled,
|
|
22623
22641
|
onChange: function onChange(value) {
|
|
22624
22642
|
_onChange(absoluteName, value);
|
|
@@ -22864,7 +22882,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
22864
22882
|
value: item.value,
|
|
22865
22883
|
options: item.options.map(function (o) {
|
|
22866
22884
|
var _o$disabled;
|
|
22867
|
-
return _objectSpread$
|
|
22885
|
+
return _objectSpread$1n(_objectSpread$1n({}, o), {}, {
|
|
22868
22886
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, state.data)
|
|
22869
22887
|
});
|
|
22870
22888
|
}),
|
|
@@ -22885,7 +22903,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
22885
22903
|
},
|
|
22886
22904
|
icon: item.icon,
|
|
22887
22905
|
callback: function callback(data) {
|
|
22888
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
22906
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$1n(_objectSpread$1n({}, state.data), data));
|
|
22889
22907
|
}
|
|
22890
22908
|
});
|
|
22891
22909
|
case 'media':
|
|
@@ -22923,7 +22941,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
22923
22941
|
var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
22924
22942
|
var _useTranslation = useTranslation(),
|
|
22925
22943
|
t = _useTranslation.t;
|
|
22926
|
-
return /*#__PURE__*/jsx(Input$1, _objectSpread$
|
|
22944
|
+
return /*#__PURE__*/jsx(Input$1, _objectSpread$1n(_objectSpread$1n({}, props), {}, {
|
|
22927
22945
|
ref: ref,
|
|
22928
22946
|
disabled: true,
|
|
22929
22947
|
value: t(props.translationPrefix + '.' + props.value)
|
|
@@ -22942,8 +22960,8 @@ function isReadonly(item, data) {
|
|
|
22942
22960
|
return false;
|
|
22943
22961
|
}
|
|
22944
22962
|
|
|
22945
|
-
function ownKeys$
|
|
22946
|
-
function _objectSpread$
|
|
22963
|
+
function ownKeys$1m(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; }
|
|
22964
|
+
function _objectSpread$1m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22947
22965
|
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; } } }; }
|
|
22948
22966
|
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; } }
|
|
22949
22967
|
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; }
|
|
@@ -22993,13 +23011,13 @@ var Presets = function Presets(_ref) {
|
|
|
22993
23011
|
} finally {
|
|
22994
23012
|
_iterator.f();
|
|
22995
23013
|
}
|
|
22996
|
-
var data = _objectSpread$
|
|
23014
|
+
var data = _objectSpread$1m(_objectSpread$1m({}, form.getFieldsValue(names)), {}, {
|
|
22997
23015
|
newPresetName: newPresetName
|
|
22998
23016
|
});
|
|
22999
23017
|
data.dpi = parseInt(data.dpi);
|
|
23000
23018
|
data.organization = root.getGlobalValue('organizationId');
|
|
23001
23019
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
23002
|
-
var dt = _objectSpread$
|
|
23020
|
+
var dt = _objectSpread$1m(_objectSpread$1m({}, form.getFieldsValue(names)), {}, {
|
|
23003
23021
|
name: newPresetName
|
|
23004
23022
|
});
|
|
23005
23023
|
setPresets({
|
|
@@ -23133,8 +23151,8 @@ function ModalProgressBar(_ref) {
|
|
|
23133
23151
|
});
|
|
23134
23152
|
}
|
|
23135
23153
|
|
|
23136
|
-
function ownKeys$
|
|
23137
|
-
function _objectSpread$
|
|
23154
|
+
function ownKeys$1l(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; }
|
|
23155
|
+
function _objectSpread$1l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23138
23156
|
function ItemSelector(_ref) {
|
|
23139
23157
|
var state = _ref.state,
|
|
23140
23158
|
setCanSave = _ref.setCanSave,
|
|
@@ -23151,7 +23169,7 @@ function ItemSelector(_ref) {
|
|
|
23151
23169
|
rules: state.getRules(itemSelector, state.data),
|
|
23152
23170
|
label: itemSelector.label ? t(itemSelector.label, itemSelector.label) : itemSelector.name,
|
|
23153
23171
|
valuePropName: itemSelector.type == 'checkbox' ? 'checked' : 'value',
|
|
23154
|
-
children: getElement(_objectSpread$
|
|
23172
|
+
children: getElement(_objectSpread$1l(_objectSpread$1l({}, itemSelector), {}, {
|
|
23155
23173
|
value: itemSelector.type == 'select' ? itemSelector.values[state.selectedItemsIndex[idx]] : undefined
|
|
23156
23174
|
}), setCanSave, state, itemSelector.name, state.onItemSelectorChanged, onErrorInternal)
|
|
23157
23175
|
}, itemSelector.name.toString());
|
|
@@ -23537,8 +23555,8 @@ function getLabel(item, t) {
|
|
|
23537
23555
|
}
|
|
23538
23556
|
var Form$1 = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
23539
23557
|
|
|
23540
|
-
function ownKeys$
|
|
23541
|
-
function _objectSpread$
|
|
23558
|
+
function ownKeys$1k(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; }
|
|
23559
|
+
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23542
23560
|
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; } } }; }
|
|
23543
23561
|
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; } }
|
|
23544
23562
|
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; }
|
|
@@ -23740,7 +23758,7 @@ function useRoleSelectorData (_ref) {
|
|
|
23740
23758
|
roles.forEach(function (r) {
|
|
23741
23759
|
//check if after the changes the role is selected
|
|
23742
23760
|
if (value.includes(r._id)) {
|
|
23743
|
-
var newValue = _objectSpread$
|
|
23761
|
+
var newValue = _objectSpread$1k(_objectSpread$1k({}, r), {}, {
|
|
23744
23762
|
selected: true
|
|
23745
23763
|
});
|
|
23746
23764
|
//add it to the new list as selected role
|
|
@@ -23776,7 +23794,7 @@ function useRoleSelectorData (_ref) {
|
|
|
23776
23794
|
}
|
|
23777
23795
|
}
|
|
23778
23796
|
} else {
|
|
23779
|
-
var _newValue = _objectSpread$
|
|
23797
|
+
var _newValue = _objectSpread$1k(_objectSpread$1k({}, r), {}, {
|
|
23780
23798
|
selected: false
|
|
23781
23799
|
});
|
|
23782
23800
|
//add it to the new list as unselected role
|
|
@@ -23980,7 +23998,7 @@ function _updateRoles() {
|
|
|
23980
23998
|
userRole = userRoles.find(function (r) {
|
|
23981
23999
|
return r._id == role._id;
|
|
23982
24000
|
});
|
|
23983
|
-
newRole = _objectSpread$
|
|
24001
|
+
newRole = _objectSpread$1k({}, role);
|
|
23984
24002
|
if (userRole) {
|
|
23985
24003
|
newRole.selected = true;
|
|
23986
24004
|
newRole.inherited = userRole.inherited;
|
|
@@ -24200,7 +24218,7 @@ function _fetchOptions() {
|
|
|
24200
24218
|
case 4:
|
|
24201
24219
|
result = _context11.sent;
|
|
24202
24220
|
options = result.data.map(function (d) {
|
|
24203
|
-
return _objectSpread$
|
|
24221
|
+
return _objectSpread$1k(_objectSpread$1k({}, d), {}, {
|
|
24204
24222
|
label: d.displayName,
|
|
24205
24223
|
value: d._id,
|
|
24206
24224
|
isLeaf: !d.hasChildren
|
|
@@ -24304,8 +24322,8 @@ var infiniteScrollContainer = "infiniteScrollContainer-8G1wc";
|
|
|
24304
24322
|
var css_248z$I = ".permission-Button-XctsZ {\n position: relative;\n top: 25px;\n left: -30px;\n float: right;\n height: 20px;\n z-index: 1000;\n}\n.select-lzft- {\n width: 100%;\n}\n.loadingOption-qCkRw {\n margin-top: 11px;\n padding-left: 500px;\n}\n.scroller-lrdk9 {\n overflow: auto;\n 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";
|
|
24305
24323
|
styleInject(css_248z$I);
|
|
24306
24324
|
|
|
24307
|
-
function ownKeys$
|
|
24308
|
-
function _objectSpread$
|
|
24325
|
+
function ownKeys$1j(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; }
|
|
24326
|
+
function _objectSpread$1j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24309
24327
|
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; } } }; }
|
|
24310
24328
|
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; } }
|
|
24311
24329
|
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; }
|
|
@@ -24365,8 +24383,8 @@ function _generateCSV() {
|
|
|
24365
24383
|
break;
|
|
24366
24384
|
}
|
|
24367
24385
|
_context2.next = 21;
|
|
24368
|
-
return generateCSV(_objectSpread$
|
|
24369
|
-
mappingData: _objectSpread$
|
|
24386
|
+
return generateCSV(_objectSpread$1j(_objectSpread$1j({}, exportParams.children), {}, {
|
|
24387
|
+
mappingData: _objectSpread$1j(_objectSpread$1j({}, parent), {}, {
|
|
24370
24388
|
parentId: exportParams.mappingData._id
|
|
24371
24389
|
})
|
|
24372
24390
|
}), csvData);
|
|
@@ -24474,8 +24492,8 @@ function _downloadFile() {
|
|
|
24474
24492
|
return _downloadFile.apply(this, arguments);
|
|
24475
24493
|
}
|
|
24476
24494
|
|
|
24477
|
-
function ownKeys$
|
|
24478
|
-
function _objectSpread$
|
|
24495
|
+
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; }
|
|
24496
|
+
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; }
|
|
24479
24497
|
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; } } }; }
|
|
24480
24498
|
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; } }
|
|
24481
24499
|
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; }
|
|
@@ -24894,7 +24912,7 @@ function useRelationSelectorData (_ref) {
|
|
|
24894
24912
|
var activeItem = _step.value;
|
|
24895
24913
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
24896
24914
|
addedObjects.push(addedData);
|
|
24897
|
-
getSplittedItems(_objectSpread$
|
|
24915
|
+
getSplittedItems(_objectSpread$1i(_objectSpread$1i({}, activeItem), {}, {
|
|
24898
24916
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
24899
24917
|
}));
|
|
24900
24918
|
ret = true;
|
|
@@ -25099,8 +25117,8 @@ function useRelationSelectorData (_ref) {
|
|
|
25099
25117
|
};
|
|
25100
25118
|
}
|
|
25101
25119
|
|
|
25102
|
-
function ownKeys$
|
|
25103
|
-
function _objectSpread$
|
|
25120
|
+
function ownKeys$1h(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; }
|
|
25121
|
+
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25104
25122
|
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; } } }; }
|
|
25105
25123
|
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; } }
|
|
25106
25124
|
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; }
|
|
@@ -25237,7 +25255,7 @@ function ActionButton (_ref) {
|
|
|
25237
25255
|
_iterator2.f();
|
|
25238
25256
|
}
|
|
25239
25257
|
_context.next = 19;
|
|
25240
|
-
return apiInterface.update(_objectSpread$
|
|
25258
|
+
return apiInterface.update(_objectSpread$1h(_objectSpread$1h({}, data), {}, {
|
|
25241
25259
|
state: toSwitch
|
|
25242
25260
|
}), data);
|
|
25243
25261
|
case 19:
|
|
@@ -25394,14 +25412,14 @@ function _simpleChangeValue() {
|
|
|
25394
25412
|
break;
|
|
25395
25413
|
}
|
|
25396
25414
|
for (i = 0; i < action.newValues.length; i++) {
|
|
25397
|
-
fieldsToUpdate = _objectSpread$
|
|
25415
|
+
fieldsToUpdate = _objectSpread$1h(_objectSpread$1h({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
25398
25416
|
}
|
|
25399
25417
|
if (!apiInterface.canUpdate) {
|
|
25400
25418
|
_context2.next = 9;
|
|
25401
25419
|
break;
|
|
25402
25420
|
}
|
|
25403
25421
|
_context2.next = 7;
|
|
25404
|
-
return apiInterface.update(_objectSpread$
|
|
25422
|
+
return apiInterface.update(_objectSpread$1h({}, fieldsToUpdate), data);
|
|
25405
25423
|
case 7:
|
|
25406
25424
|
response = _context2.sent;
|
|
25407
25425
|
return _context2.abrupt("return", response);
|
|
@@ -25416,7 +25434,7 @@ function _simpleChangeValue() {
|
|
|
25416
25434
|
return _simpleChangeValue.apply(this, arguments);
|
|
25417
25435
|
}
|
|
25418
25436
|
function A(props) {
|
|
25419
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
25437
|
+
return /*#__PURE__*/jsx("a", _objectSpread$1h({}, props));
|
|
25420
25438
|
}
|
|
25421
25439
|
|
|
25422
25440
|
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; } } }; }
|
|
@@ -25554,8 +25572,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
25554
25572
|
var css_248z$H = ".diva-component-DIVA_BACKOFFICE_NEW .title-cl-ZAj2y {\n color: black;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .description-m3mNY {\n color: grey;\n flex: 1 1 100%;\n margin-left: 25px;\n margin-top: -25px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-group-xWnj- {\n /* border-bottom: 1px solid black; */\n margin-bottom: 40px;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .delete-item-otdSr {\n cursor: pointer;\n position: relative;\n float: right;\n top: 13px;\n margin-right: 20px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .newscroller-INKeD {\n overflow: auto;\n height: 400px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-collapse-header--6FgU div {\n flex-wrap: wrap !important;\n}\n.diva-component-DIVA_BACKOFFICE_NEW a .item-title--BTvC {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.85);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .item-desc-DBiiF {\n padding: 0 0 0 30px;\n color: rgba(0, 0, 0, 0.45);\n}\n";
|
|
25555
25573
|
styleInject(css_248z$H);
|
|
25556
25574
|
|
|
25557
|
-
function ownKeys$
|
|
25558
|
-
function _objectSpread$
|
|
25575
|
+
function ownKeys$1g(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; }
|
|
25576
|
+
function _objectSpread$1g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25559
25577
|
var DropDown = function DropDown(_ref) {
|
|
25560
25578
|
var _curItem$data$length;
|
|
25561
25579
|
var split = _ref.split,
|
|
@@ -25587,7 +25605,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
25587
25605
|
});
|
|
25588
25606
|
return /*#__PURE__*/jsx(Collapse, {
|
|
25589
25607
|
onChange: function onChange() {
|
|
25590
|
-
return getSplittedItems(_objectSpread$
|
|
25608
|
+
return getSplittedItems(_objectSpread$1g(_objectSpread$1g({}, item.item), {}, {
|
|
25591
25609
|
parentId: item.parentId
|
|
25592
25610
|
}), 0);
|
|
25593
25611
|
},
|
|
@@ -25847,8 +25865,8 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
25847
25865
|
};
|
|
25848
25866
|
var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
|
|
25849
25867
|
|
|
25850
|
-
function ownKeys$
|
|
25851
|
-
function _objectSpread$
|
|
25868
|
+
function ownKeys$1f(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; }
|
|
25869
|
+
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25852
25870
|
function useFormListData (_ref) {
|
|
25853
25871
|
var _configuration$defaul;
|
|
25854
25872
|
var id = _ref.id,
|
|
@@ -25928,7 +25946,7 @@ function useFormListData (_ref) {
|
|
|
25928
25946
|
if (updated.length == state.length) {
|
|
25929
25947
|
newState = state.map(function (s, i) {
|
|
25930
25948
|
var _updated$find;
|
|
25931
|
-
return _objectSpread$
|
|
25949
|
+
return _objectSpread$1f(_objectSpread$1f({}, s), {}, {
|
|
25932
25950
|
data: (_updated$find = updated.find(function (u) {
|
|
25933
25951
|
return u.index == i;
|
|
25934
25952
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -26065,8 +26083,8 @@ var FormList = function FormList(_ref, ref) {
|
|
|
26065
26083
|
};
|
|
26066
26084
|
var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
26067
26085
|
|
|
26068
|
-
function ownKeys$
|
|
26069
|
-
function _objectSpread$
|
|
26086
|
+
function ownKeys$1e(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; }
|
|
26087
|
+
function _objectSpread$1e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26070
26088
|
var LOG$c = getLogger('Backoffice', 'SelectOrCreate');
|
|
26071
26089
|
function useSelectOrCreateData (_ref) {
|
|
26072
26090
|
var id = _ref.id,
|
|
@@ -26163,7 +26181,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
26163
26181
|
_context.next = 7;
|
|
26164
26182
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
26165
26183
|
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) {
|
|
26166
|
-
return _objectSpread$
|
|
26184
|
+
return _objectSpread$1e(_objectSpread$1e({}, filter), {}, _defineProperty({}, field.field, [value, field.filter]));
|
|
26167
26185
|
}, {}) : {
|
|
26168
26186
|
_id: [value, 'contains']
|
|
26169
26187
|
},
|
|
@@ -26474,8 +26492,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
26474
26492
|
});
|
|
26475
26493
|
};
|
|
26476
26494
|
|
|
26477
|
-
function ownKeys$
|
|
26478
|
-
function _objectSpread$
|
|
26495
|
+
function ownKeys$1d(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; }
|
|
26496
|
+
function _objectSpread$1d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26479
26497
|
function useListData (_ref) {
|
|
26480
26498
|
var id = _ref.id,
|
|
26481
26499
|
data = _ref.data;
|
|
@@ -26518,7 +26536,7 @@ function useListData (_ref) {
|
|
|
26518
26536
|
case 3:
|
|
26519
26537
|
result = _context.sent;
|
|
26520
26538
|
setListData(result.data.map(parseField));
|
|
26521
|
-
initData = _objectSpread$
|
|
26539
|
+
initData = _objectSpread$1d({}, data);
|
|
26522
26540
|
setUpdatedObject(initData);
|
|
26523
26541
|
setLoading(false);
|
|
26524
26542
|
case 8:
|
|
@@ -26559,7 +26577,7 @@ function useListData (_ref) {
|
|
|
26559
26577
|
});
|
|
26560
26578
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
26561
26579
|
var parsedField = field.field.split('.');
|
|
26562
|
-
item.itemUpdate = _objectSpread$
|
|
26580
|
+
item.itemUpdate = _objectSpread$1d(_objectSpread$1d({}, field), {}, {
|
|
26563
26581
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
26564
26582
|
});
|
|
26565
26583
|
});
|
|
@@ -26590,16 +26608,16 @@ function useListData (_ref) {
|
|
|
26590
26608
|
console.error('field with more than 2 parts not allowed');
|
|
26591
26609
|
return;
|
|
26592
26610
|
}
|
|
26593
|
-
var updObj = _objectSpread$
|
|
26611
|
+
var updObj = _objectSpread$1d({}, updatedObject);
|
|
26594
26612
|
if (fields.length === 1) {
|
|
26595
|
-
updObj = _objectSpread$
|
|
26613
|
+
updObj = _objectSpread$1d(_objectSpread$1d({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
26596
26614
|
} else if (fields.length === 2) {
|
|
26597
26615
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
26598
26616
|
return v.id === item.id.trim();
|
|
26599
26617
|
});
|
|
26600
26618
|
if (updatedField) {
|
|
26601
|
-
var updatedFieldCopy = _objectSpread$
|
|
26602
|
-
updObj = _objectSpread$
|
|
26619
|
+
var updatedFieldCopy = _objectSpread$1d(_objectSpread$1d({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
26620
|
+
updObj = _objectSpread$1d(_objectSpread$1d({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
26603
26621
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
26604
26622
|
})));
|
|
26605
26623
|
}
|
|
@@ -26608,11 +26626,11 @@ function useListData (_ref) {
|
|
|
26608
26626
|
var acItems = listData;
|
|
26609
26627
|
for (var i = 0; i < acItems.length; i++) {
|
|
26610
26628
|
if (i == index) {
|
|
26611
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
26629
|
+
acItems[i].itemUpdate = _objectSpread$1d(_objectSpread$1d({}, acItems[i].itemUpdate), {}, {
|
|
26612
26630
|
value: value
|
|
26613
26631
|
});
|
|
26614
26632
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
26615
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
26633
|
+
acItems[i].itemUpdate = _objectSpread$1d(_objectSpread$1d({}, acItems[i].itemUpdate), {}, {
|
|
26616
26634
|
value: !value
|
|
26617
26635
|
});
|
|
26618
26636
|
}
|
|
@@ -27126,8 +27144,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
27126
27144
|
};
|
|
27127
27145
|
}
|
|
27128
27146
|
|
|
27129
|
-
function ownKeys$
|
|
27130
|
-
function _objectSpread$
|
|
27147
|
+
function ownKeys$1c(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; }
|
|
27148
|
+
function _objectSpread$1c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27131
27149
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
27132
27150
|
var id = _ref.id,
|
|
27133
27151
|
data = _ref.data,
|
|
@@ -27235,12 +27253,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
27235
27253
|
}
|
|
27236
27254
|
function onEnter(e) {
|
|
27237
27255
|
if (e.key != 'Enter') return;
|
|
27238
|
-
setCrop(_objectSpread$
|
|
27256
|
+
setCrop(_objectSpread$1c(_objectSpread$1c({}, crop), {}, {
|
|
27239
27257
|
unit: 'px',
|
|
27240
27258
|
width: Number(widthInputElement.current.value),
|
|
27241
27259
|
height: Number(heightInputElement.current.value)
|
|
27242
27260
|
}));
|
|
27243
|
-
setCompletedCrop(_objectSpread$
|
|
27261
|
+
setCompletedCrop(_objectSpread$1c(_objectSpread$1c({}, crop), {}, {
|
|
27244
27262
|
unit: 'px',
|
|
27245
27263
|
width: Number(widthInputElement.current.value),
|
|
27246
27264
|
height: Number(heightInputElement.current.value)
|
|
@@ -27318,8 +27336,8 @@ var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
|
27318
27336
|
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; } } }; }
|
|
27319
27337
|
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; } }
|
|
27320
27338
|
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; }
|
|
27321
|
-
function ownKeys$
|
|
27322
|
-
function _objectSpread$
|
|
27339
|
+
function ownKeys$1b(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; }
|
|
27340
|
+
function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27323
27341
|
function useDescriptions (_ref) {
|
|
27324
27342
|
var id = _ref.id;
|
|
27325
27343
|
var root = useStore();
|
|
@@ -27412,7 +27430,7 @@ function _getDisplayData() {
|
|
|
27412
27430
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
27413
27431
|
while (1) switch (_context4.prev = _context4.next) {
|
|
27414
27432
|
case 0:
|
|
27415
|
-
displayData = _objectSpread$
|
|
27433
|
+
displayData = _objectSpread$1b({}, data);
|
|
27416
27434
|
_iterator = _createForOfIteratorHelper$m(items);
|
|
27417
27435
|
_context4.prev = 2;
|
|
27418
27436
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -27688,8 +27706,8 @@ var FileUploadWrapper$1 = function FileUploadWrapper(_ref) {
|
|
|
27688
27706
|
};
|
|
27689
27707
|
var FileUploadBeta = observer(FileUploadWrapper$1);
|
|
27690
27708
|
|
|
27691
|
-
function ownKeys$
|
|
27692
|
-
function _objectSpread$
|
|
27709
|
+
function ownKeys$1a(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; }
|
|
27710
|
+
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27693
27711
|
function useGridData (_ref) {
|
|
27694
27712
|
var id = _ref.id,
|
|
27695
27713
|
data = _ref.data;
|
|
@@ -27732,11 +27750,11 @@ function useGridData (_ref) {
|
|
|
27732
27750
|
function reducer(state, action) {
|
|
27733
27751
|
switch (action.type) {
|
|
27734
27752
|
case 'update':
|
|
27735
|
-
return _objectSpread$
|
|
27753
|
+
return _objectSpread$1a(_objectSpread$1a({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$1a(_objectSpread$1a({}, action.data), {}, {
|
|
27736
27754
|
buffer: Buffer.from(action.data.buffer)
|
|
27737
27755
|
})));
|
|
27738
27756
|
case 'delete':
|
|
27739
|
-
var newState = _objectSpread$
|
|
27757
|
+
var newState = _objectSpread$1a({}, state);
|
|
27740
27758
|
delete newState[action.data.divaNr];
|
|
27741
27759
|
return newState;
|
|
27742
27760
|
default:
|
|
@@ -27823,8 +27841,8 @@ var Grid = function Grid(_ref) {
|
|
|
27823
27841
|
});
|
|
27824
27842
|
};
|
|
27825
27843
|
|
|
27826
|
-
function ownKeys$
|
|
27827
|
-
function _objectSpread$
|
|
27844
|
+
function ownKeys$19(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; }
|
|
27845
|
+
function _objectSpread$19(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$19(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$19(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27828
27846
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
27829
27847
|
var id = _ref.id;
|
|
27830
27848
|
var root = useStore();
|
|
@@ -28033,7 +28051,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
28033
28051
|
onRemove: onRemove,
|
|
28034
28052
|
customRequest: customRequest,
|
|
28035
28053
|
fileList: fileList.map(function (f) {
|
|
28036
|
-
return _objectSpread$
|
|
28054
|
+
return _objectSpread$19(_objectSpread$19({}, f), {}, {
|
|
28037
28055
|
url: f.url
|
|
28038
28056
|
});
|
|
28039
28057
|
}),
|
|
@@ -28137,8 +28155,8 @@ var TableSummary = function TableSummary(_ref) {
|
|
|
28137
28155
|
});
|
|
28138
28156
|
};
|
|
28139
28157
|
|
|
28140
|
-
function ownKeys$
|
|
28141
|
-
function _objectSpread$
|
|
28158
|
+
function ownKeys$18(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; }
|
|
28159
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$18(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$18(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28142
28160
|
function getExpandedRowRenderer (config, root) {
|
|
28143
28161
|
return function (record) {
|
|
28144
28162
|
var data = record;
|
|
@@ -28160,7 +28178,7 @@ function customSubTable(columns, datasource) {
|
|
|
28160
28178
|
// map custom columns to antd columns
|
|
28161
28179
|
var antcols = columns.map(function (col) {
|
|
28162
28180
|
var _col$width;
|
|
28163
|
-
return _objectSpread$
|
|
28181
|
+
return _objectSpread$18(_objectSpread$18({}, col), {}, {
|
|
28164
28182
|
title: col.title,
|
|
28165
28183
|
dataIndex: col.field,
|
|
28166
28184
|
key: col.field,
|
|
@@ -29023,8 +29041,8 @@ function ArrayCell (_ref) {
|
|
|
29023
29041
|
|
|
29024
29042
|
var _excluded$7 = ["index"],
|
|
29025
29043
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
29026
|
-
function ownKeys$
|
|
29027
|
-
function _objectSpread$
|
|
29044
|
+
function ownKeys$17(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; }
|
|
29045
|
+
function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$17(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$17(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29028
29046
|
var LOG$a = getLogger('Backoffice', 'CellRenderer');
|
|
29029
29047
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
29030
29048
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -29038,7 +29056,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
29038
29056
|
component: false,
|
|
29039
29057
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
29040
29058
|
value: form,
|
|
29041
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
29059
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$17({}, props))
|
|
29042
29060
|
})
|
|
29043
29061
|
});
|
|
29044
29062
|
};
|
|
@@ -29091,7 +29109,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
29091
29109
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
29092
29110
|
longDescriptionType = 'text';
|
|
29093
29111
|
}
|
|
29094
|
-
var modifiedColumn = _objectSpread$
|
|
29112
|
+
var modifiedColumn = _objectSpread$17(_objectSpread$17({}, column), {}, {
|
|
29095
29113
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
29096
29114
|
});
|
|
29097
29115
|
if (column) {
|
|
@@ -29104,43 +29122,43 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
29104
29122
|
};
|
|
29105
29123
|
switch (modifiedColumn.type) {
|
|
29106
29124
|
case 'boolean':
|
|
29107
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
29125
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$17({}, cellProps));
|
|
29108
29126
|
break;
|
|
29109
29127
|
case 'text':
|
|
29110
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
29128
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$17({}, cellProps));
|
|
29111
29129
|
break;
|
|
29112
29130
|
case 'select':
|
|
29113
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
29131
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$17({}, cellProps));
|
|
29114
29132
|
case 'media':
|
|
29115
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
29133
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$17({}, cellProps));
|
|
29116
29134
|
break;
|
|
29117
29135
|
case 'mediaItem':
|
|
29118
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
29136
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$17({}, cellProps));
|
|
29119
29137
|
break;
|
|
29120
29138
|
case 'unixTimeStamp':
|
|
29121
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
29139
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$17({}, cellProps));
|
|
29122
29140
|
break;
|
|
29123
29141
|
case 'unixTimeStampCheck':
|
|
29124
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
29142
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$17({}, cellProps));
|
|
29125
29143
|
break;
|
|
29126
29144
|
case 'icon':
|
|
29127
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
29145
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$17({}, cellProps));
|
|
29128
29146
|
break;
|
|
29129
29147
|
case 'progress':
|
|
29130
|
-
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$
|
|
29148
|
+
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$17({}, cellProps));
|
|
29131
29149
|
break;
|
|
29132
29150
|
case 'link':
|
|
29133
|
-
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$
|
|
29151
|
+
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$17({}, cellProps));
|
|
29134
29152
|
break;
|
|
29135
29153
|
case 'array':
|
|
29136
|
-
childNode = /*#__PURE__*/jsx(ArrayCell, _objectSpread$
|
|
29154
|
+
childNode = /*#__PURE__*/jsx(ArrayCell, _objectSpread$17({}, cellProps));
|
|
29137
29155
|
break;
|
|
29138
29156
|
default:
|
|
29139
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
29157
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$17({}, cellProps));
|
|
29140
29158
|
break;
|
|
29141
29159
|
}
|
|
29142
29160
|
}
|
|
29143
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
29161
|
+
return /*#__PURE__*/jsx("td", _objectSpread$17(_objectSpread$17({}, restProps), {}, {
|
|
29144
29162
|
children: childNode
|
|
29145
29163
|
}));
|
|
29146
29164
|
};
|
|
@@ -29495,8 +29513,8 @@ var SMChart = function SMChart(props) {
|
|
|
29495
29513
|
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; } } }; }
|
|
29496
29514
|
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; } }
|
|
29497
29515
|
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; }
|
|
29498
|
-
function ownKeys$
|
|
29499
|
-
function _objectSpread$
|
|
29516
|
+
function ownKeys$16(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; }
|
|
29517
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$16(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$16(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29500
29518
|
|
|
29501
29519
|
/**
|
|
29502
29520
|
* Props for the useTools hook
|
|
@@ -29536,7 +29554,7 @@ var useTools = function useTools(_ref) {
|
|
|
29536
29554
|
var packageId = enricherPackage === null || enricherPackage === void 0 ? void 0 : enricherPackage._id;
|
|
29537
29555
|
var isoLanguageIds = (catalog === null || catalog === void 0 ? void 0 : catalog.isoLanguageIds) || (enricherPackage === null || enricherPackage === void 0 ? void 0 : enricherPackage.isoLanguageIds);
|
|
29538
29556
|
var createTool = function createTool(tool) {
|
|
29539
|
-
return _objectSpread$
|
|
29557
|
+
return _objectSpread$16({
|
|
29540
29558
|
startWidth: 600,
|
|
29541
29559
|
defaultPinned: true,
|
|
29542
29560
|
defaultOpen: false
|
|
@@ -29567,7 +29585,7 @@ var useTools = function useTools(_ref) {
|
|
|
29567
29585
|
name: 'Konfigurator',
|
|
29568
29586
|
type: 'Configurator',
|
|
29569
29587
|
where: 'right',
|
|
29570
|
-
parameters: _objectSpread$
|
|
29588
|
+
parameters: _objectSpread$16({
|
|
29571
29589
|
catalogId: catalogId,
|
|
29572
29590
|
packageId: packageId,
|
|
29573
29591
|
isIDMData: !isApi2 ? '1' : undefined
|
|
@@ -29657,8 +29675,8 @@ function InformationButton(_ref) {
|
|
|
29657
29675
|
});
|
|
29658
29676
|
}
|
|
29659
29677
|
|
|
29660
|
-
function ownKeys$
|
|
29661
|
-
function _objectSpread$
|
|
29678
|
+
function ownKeys$15(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$15(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$15(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$15(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29662
29680
|
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; } } }; }
|
|
29663
29681
|
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; } }
|
|
29664
29682
|
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; }
|
|
@@ -29780,7 +29798,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
29780
29798
|
if (data && data.length > 0) {
|
|
29781
29799
|
data = data.map(function (dt) {
|
|
29782
29800
|
var _ref2, _dt$catalogItem;
|
|
29783
|
-
return _objectSpread$
|
|
29801
|
+
return _objectSpread$15(_objectSpread$15({}, dt), {}, {
|
|
29784
29802
|
catalogItem: (_ref2 = (_dt$catalogItem = dt.catalogItem) !== null && _dt$catalogItem !== void 0 ? _dt$catalogItem : state.catalogItem) !== null && _ref2 !== void 0 ? _ref2 : null
|
|
29785
29803
|
});
|
|
29786
29804
|
});
|
|
@@ -29936,13 +29954,13 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
29936
29954
|
// Convert to Dayjs
|
|
29937
29955
|
(_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
|
|
29938
29956
|
]
|
|
29939
|
-
}), selectFilter && (selectFilter.selectVariant === 'select' ? /*#__PURE__*/jsx(Selector, _objectSpread$
|
|
29957
|
+
}), selectFilter && (selectFilter.selectVariant === 'select' ? /*#__PURE__*/jsx(Selector, _objectSpread$15(_objectSpread$15({}, selectFilter.settings), {}, {
|
|
29940
29958
|
minWidth: "200px",
|
|
29941
29959
|
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],
|
|
29942
29960
|
onChange: function onChange(selected) {
|
|
29943
29961
|
state.onGlobalFilterSelect(normalizeTableFilterSelectValue(selected, selectFilter.filterField));
|
|
29944
29962
|
}
|
|
29945
|
-
})) : /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
29963
|
+
})) : /*#__PURE__*/jsx(SimpleSelect, _objectSpread$15(_objectSpread$15({}, selectFilter.settings), {}, {
|
|
29946
29964
|
style: {
|
|
29947
29965
|
minWidth: '200px'
|
|
29948
29966
|
},
|
|
@@ -30052,7 +30070,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
30052
30070
|
root: tableLoadingSpin
|
|
30053
30071
|
}
|
|
30054
30072
|
},
|
|
30055
|
-
pagination: _objectSpread$
|
|
30073
|
+
pagination: _objectSpread$15(_objectSpread$15({}, state.pagination), {}, {
|
|
30056
30074
|
showTotal: function showTotal(total, range) {
|
|
30057
30075
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
30058
30076
|
},
|
|
@@ -30386,7 +30404,7 @@ function BulkAction(_ref8) {
|
|
|
30386
30404
|
}
|
|
30387
30405
|
_context5.t0 = data;
|
|
30388
30406
|
_context5.next = 14;
|
|
30389
|
-
return apiInterface.update(_objectSpread$
|
|
30407
|
+
return apiInterface.update(_objectSpread$15(_objectSpread$15({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
30390
30408
|
case 14:
|
|
30391
30409
|
_context5.t1 = _context5.sent;
|
|
30392
30410
|
_context5.t0.push.call(_context5.t0, _context5.t1);
|
|
@@ -30504,8 +30522,8 @@ function SelectionText(_ref10) {
|
|
|
30504
30522
|
});
|
|
30505
30523
|
}
|
|
30506
30524
|
|
|
30507
|
-
function ownKeys$
|
|
30508
|
-
function _objectSpread$
|
|
30525
|
+
function ownKeys$14(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; }
|
|
30526
|
+
function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$14(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$14(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30509
30527
|
function getColumnFilterProps (_ref) {
|
|
30510
30528
|
var filter = _ref.filter,
|
|
30511
30529
|
title = _ref.title;
|
|
@@ -30868,7 +30886,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
30868
30886
|
});
|
|
30869
30887
|
},
|
|
30870
30888
|
options: filter.map(function (f) {
|
|
30871
|
-
return _objectSpread$
|
|
30889
|
+
return _objectSpread$14(_objectSpread$14({}, f), {}, {
|
|
30872
30890
|
label: t(f.label)
|
|
30873
30891
|
});
|
|
30874
30892
|
})
|
|
@@ -30917,7 +30935,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
30917
30935
|
setDisplaySelectedvalues = _useState4[1];
|
|
30918
30936
|
var options = [];
|
|
30919
30937
|
options = filter.map(function (f) {
|
|
30920
|
-
return _objectSpread$
|
|
30938
|
+
return _objectSpread$14(_objectSpread$14({}, f), {}, {
|
|
30921
30939
|
label: t(f.label)
|
|
30922
30940
|
});
|
|
30923
30941
|
});
|
|
@@ -30991,8 +31009,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
30991
31009
|
};
|
|
30992
31010
|
};
|
|
30993
31011
|
|
|
30994
|
-
function ownKeys$
|
|
30995
|
-
function _objectSpread$
|
|
31012
|
+
function ownKeys$13(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; }
|
|
31013
|
+
function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$13(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$13(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30996
31014
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
30997
31015
|
var columns = configuration.columns.filter(function (c) {
|
|
30998
31016
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -31045,7 +31063,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
31045
31063
|
}
|
|
31046
31064
|
function mapColumn(column, onUpdate) {
|
|
31047
31065
|
var _column$field, _column$children;
|
|
31048
|
-
return _objectSpread$
|
|
31066
|
+
return _objectSpread$13(_objectSpread$13(_objectSpread$13({}, column), {}, {
|
|
31049
31067
|
hidden: false,
|
|
31050
31068
|
width: column.width || 100,
|
|
31051
31069
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
@@ -31095,8 +31113,8 @@ function updateData (_ref) {
|
|
|
31095
31113
|
};
|
|
31096
31114
|
}
|
|
31097
31115
|
|
|
31098
|
-
function ownKeys$
|
|
31099
|
-
function _objectSpread$
|
|
31116
|
+
function ownKeys$12(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; }
|
|
31117
|
+
function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$12(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$12(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31100
31118
|
function applyFilterAndSortation (_ref) {
|
|
31101
31119
|
var data = _ref.data,
|
|
31102
31120
|
filters = _ref.filters,
|
|
@@ -31111,7 +31129,7 @@ function applyFilterAndSortation (_ref) {
|
|
|
31111
31129
|
processedData = sort(sorter || [], processedData);
|
|
31112
31130
|
return {
|
|
31113
31131
|
data: processedData,
|
|
31114
|
-
pagination: _objectSpread$
|
|
31132
|
+
pagination: _objectSpread$12(_objectSpread$12({}, pagination), {}, {
|
|
31115
31133
|
total: processedData.length
|
|
31116
31134
|
})
|
|
31117
31135
|
};
|
|
@@ -31196,8 +31214,8 @@ function filter(f, data) {
|
|
|
31196
31214
|
}
|
|
31197
31215
|
|
|
31198
31216
|
var _excluded$6 = ["_id"];
|
|
31199
|
-
function ownKeys$
|
|
31200
|
-
function _objectSpread$
|
|
31217
|
+
function ownKeys$11(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; }
|
|
31218
|
+
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$11(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$11(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31201
31219
|
function useTableData$1 (_ref) {
|
|
31202
31220
|
var _configuration$apiInt;
|
|
31203
31221
|
var id = _ref.id;
|
|
@@ -31252,7 +31270,7 @@ function useTableData$1 (_ref) {
|
|
|
31252
31270
|
var _configuration$create;
|
|
31253
31271
|
if (!dataRow) return;
|
|
31254
31272
|
var id = v4();
|
|
31255
|
-
var processedDataRow = unflatten(_objectSpread$
|
|
31273
|
+
var processedDataRow = unflatten(_objectSpread$11({
|
|
31256
31274
|
_id: id,
|
|
31257
31275
|
ID: id
|
|
31258
31276
|
}, dataRow));
|
|
@@ -31264,11 +31282,11 @@ function useTableData$1 (_ref) {
|
|
|
31264
31282
|
newData = _updateData.data;
|
|
31265
31283
|
_updateData.prevDataRow;
|
|
31266
31284
|
_updateData.index;
|
|
31267
|
-
var newState = _objectSpread$
|
|
31285
|
+
var newState = _objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
31268
31286
|
data: newData
|
|
31269
31287
|
});
|
|
31270
31288
|
if (!filterServerSide) {
|
|
31271
|
-
var res = applyFilterAndSortation(_objectSpread$
|
|
31289
|
+
var res = applyFilterAndSortation(_objectSpread$11(_objectSpread$11({}, filterData), {}, {
|
|
31272
31290
|
data: newData
|
|
31273
31291
|
}));
|
|
31274
31292
|
newState.data = res.data;
|
|
@@ -31280,33 +31298,33 @@ function useTableData$1 (_ref) {
|
|
|
31280
31298
|
var formData = new FormData();
|
|
31281
31299
|
processedDataRow._id;
|
|
31282
31300
|
var value = _objectWithoutProperties(processedDataRow, _excluded$6);
|
|
31283
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
31301
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$11(_objectSpread$11({}, catalogItem), {}, {
|
|
31284
31302
|
filterContex: filterContex,
|
|
31285
31303
|
value: JSON.stringify([value])
|
|
31286
31304
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
31287
31305
|
if (d && d.Result && d.Result == 'Success') return;
|
|
31288
|
-
setState(_objectSpread$
|
|
31306
|
+
setState(_objectSpread$11({}, oldState));
|
|
31289
31307
|
});
|
|
31290
31308
|
}, [state, catalogItem, filterData]);
|
|
31291
31309
|
useEffect(function () {
|
|
31292
31310
|
if (!catalogItem) return;
|
|
31293
|
-
setState(_objectSpread$
|
|
31311
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
31294
31312
|
loading: true,
|
|
31295
|
-
mappingData: _objectSpread$
|
|
31313
|
+
mappingData: _objectSpread$11(_objectSpread$11({}, catalogItem), {}, {
|
|
31296
31314
|
filterContex: filterContex
|
|
31297
31315
|
})
|
|
31298
31316
|
}));
|
|
31299
31317
|
if (!filterServerSide) {
|
|
31300
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
31318
|
+
apiHandler.readList(configuration.mapping, _objectSpread$11(_objectSpread$11({}, catalogItem), {}, {
|
|
31301
31319
|
filterContex: filterContex
|
|
31302
31320
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
31303
31321
|
var newData = data.data.map(function (d) {
|
|
31304
|
-
return _objectSpread$
|
|
31322
|
+
return _objectSpread$11(_objectSpread$11({}, d), {}, {
|
|
31305
31323
|
_id: d._id || d.ID || nanoid()
|
|
31306
31324
|
});
|
|
31307
31325
|
});
|
|
31308
31326
|
onChange({
|
|
31309
|
-
pagination: _objectSpread$
|
|
31327
|
+
pagination: _objectSpread$11({}, state.pagination),
|
|
31310
31328
|
filters: {},
|
|
31311
31329
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
31312
31330
|
return c.defaultSortOrder;
|
|
@@ -31322,7 +31340,7 @@ function useTableData$1 (_ref) {
|
|
|
31322
31340
|
});
|
|
31323
31341
|
} else {
|
|
31324
31342
|
onChange({
|
|
31325
|
-
pagination: _objectSpread$
|
|
31343
|
+
pagination: _objectSpread$11({}, state.pagination),
|
|
31326
31344
|
filters: {},
|
|
31327
31345
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
31328
31346
|
return c.defaultSortOrder;
|
|
@@ -31338,17 +31356,17 @@ function useTableData$1 (_ref) {
|
|
|
31338
31356
|
}
|
|
31339
31357
|
}, [filterContex, catalogItem]);
|
|
31340
31358
|
var onChange = function onChange(p, dataParam) {
|
|
31341
|
-
setState(_objectSpread$
|
|
31359
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
31342
31360
|
loading: true
|
|
31343
31361
|
}));
|
|
31344
31362
|
if (!filterServerSide) {
|
|
31345
31363
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
31346
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
31364
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$11(_objectSpread$11({}, p), {}, {
|
|
31347
31365
|
data: unfilteredData
|
|
31348
31366
|
})),
|
|
31349
31367
|
data = _applyFilterAndSortat.data,
|
|
31350
31368
|
pagination = _applyFilterAndSortat.pagination;
|
|
31351
|
-
setState(_objectSpread$
|
|
31369
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
31352
31370
|
data: data,
|
|
31353
31371
|
pagination: pagination,
|
|
31354
31372
|
loading: false,
|
|
@@ -31359,20 +31377,20 @@ function useTableData$1 (_ref) {
|
|
|
31359
31377
|
sorter: p.sorter
|
|
31360
31378
|
});
|
|
31361
31379
|
} else {
|
|
31362
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
31380
|
+
apiHandler.readList(configuration.mapping, _objectSpread$11(_objectSpread$11({}, catalogItem), {}, {
|
|
31363
31381
|
filterContex: filterContex
|
|
31364
31382
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
31365
|
-
setState(_objectSpread$
|
|
31383
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
31366
31384
|
data: data.data.map(function (dt) {
|
|
31367
|
-
return _objectSpread$
|
|
31385
|
+
return _objectSpread$11(_objectSpread$11({}, dt), {}, {
|
|
31368
31386
|
_id: dt._id || dt.ID || nanoid()
|
|
31369
31387
|
});
|
|
31370
31388
|
}),
|
|
31371
|
-
pagination: _objectSpread$
|
|
31389
|
+
pagination: _objectSpread$11(_objectSpread$11({}, p.pagination), {}, {
|
|
31372
31390
|
total: data.total
|
|
31373
31391
|
}),
|
|
31374
31392
|
loading: false,
|
|
31375
|
-
mappingData: _objectSpread$
|
|
31393
|
+
mappingData: _objectSpread$11(_objectSpread$11({}, catalogItem), {}, {
|
|
31376
31394
|
filterContex: filterContex
|
|
31377
31395
|
})
|
|
31378
31396
|
}));
|
|
@@ -31393,7 +31411,7 @@ function useTableData$1 (_ref) {
|
|
|
31393
31411
|
filters['_id'] = [id, 'eq', false];
|
|
31394
31412
|
_context.next = 4;
|
|
31395
31413
|
return apiHandler.readList(configuration.mapping, {
|
|
31396
|
-
pagination: _objectSpread$
|
|
31414
|
+
pagination: _objectSpread$11({}, state.pagination),
|
|
31397
31415
|
columns: configuration.columns,
|
|
31398
31416
|
filters: filters,
|
|
31399
31417
|
sorter: filterData.sorter
|
|
@@ -31412,7 +31430,7 @@ function useTableData$1 (_ref) {
|
|
|
31412
31430
|
};
|
|
31413
31431
|
}();
|
|
31414
31432
|
var onSelect = function onSelect(keys) {
|
|
31415
|
-
setState(_objectSpread$
|
|
31433
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
31416
31434
|
selected: keys
|
|
31417
31435
|
}));
|
|
31418
31436
|
};
|
|
@@ -31422,7 +31440,7 @@ function useTableData$1 (_ref) {
|
|
|
31422
31440
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
31423
31441
|
while (1) switch (_context3.prev = _context3.next) {
|
|
31424
31442
|
case 0:
|
|
31425
|
-
setState(_objectSpread$
|
|
31443
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
31426
31444
|
deleting: true
|
|
31427
31445
|
}));
|
|
31428
31446
|
newData = _toConsumableArray(state.data);
|
|
@@ -31437,7 +31455,7 @@ function useTableData$1 (_ref) {
|
|
|
31437
31455
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
31438
31456
|
return nd._id === state.selected[index];
|
|
31439
31457
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
31440
|
-
mappingData = _objectSpread$
|
|
31458
|
+
mappingData = _objectSpread$11(_objectSpread$11({}, mappingData), state.mappingData);
|
|
31441
31459
|
_context2.next = 5;
|
|
31442
31460
|
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);
|
|
31443
31461
|
case 5:
|
|
@@ -31487,7 +31505,7 @@ function useTableData$1 (_ref) {
|
|
|
31487
31505
|
}
|
|
31488
31506
|
_context3.next = 18;
|
|
31489
31507
|
return apiHandler.readList(configuration.mapping, {
|
|
31490
|
-
pagination: _objectSpread$
|
|
31508
|
+
pagination: _objectSpread$11(_objectSpread$11({}, state.pagination), {}, {
|
|
31491
31509
|
current: current
|
|
31492
31510
|
}),
|
|
31493
31511
|
columns: configuration.columns,
|
|
@@ -31499,11 +31517,11 @@ function useTableData$1 (_ref) {
|
|
|
31499
31517
|
newData = data.data;
|
|
31500
31518
|
total = data.total;
|
|
31501
31519
|
case 21:
|
|
31502
|
-
setState(_objectSpread$
|
|
31520
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
31503
31521
|
selected: [],
|
|
31504
31522
|
deleting: false,
|
|
31505
31523
|
data: newData,
|
|
31506
|
-
pagination: _objectSpread$
|
|
31524
|
+
pagination: _objectSpread$11(_objectSpread$11({}, state.pagination), {}, {
|
|
31507
31525
|
current: current,
|
|
31508
31526
|
total: total
|
|
31509
31527
|
})
|
|
@@ -31519,12 +31537,12 @@ function useTableData$1 (_ref) {
|
|
|
31519
31537
|
};
|
|
31520
31538
|
}();
|
|
31521
31539
|
function setLoading() {
|
|
31522
|
-
setState(_objectSpread$
|
|
31540
|
+
setState(_objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
31523
31541
|
loading: true
|
|
31524
31542
|
}));
|
|
31525
31543
|
}
|
|
31526
|
-
return _objectSpread$
|
|
31527
|
-
configuration: _objectSpread$
|
|
31544
|
+
return _objectSpread$11(_objectSpread$11({}, state), {}, {
|
|
31545
|
+
configuration: _objectSpread$11(_objectSpread$11({}, configuration), {}, {
|
|
31528
31546
|
title: undefined
|
|
31529
31547
|
}),
|
|
31530
31548
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -31620,8 +31638,8 @@ var translation = {
|
|
|
31620
31638
|
SUPPLIER: 'backoffice.translation.supplier'
|
|
31621
31639
|
};
|
|
31622
31640
|
|
|
31623
|
-
function ownKeys
|
|
31624
|
-
function _objectSpread
|
|
31641
|
+
function ownKeys$10(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; }
|
|
31642
|
+
function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$10(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$10(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31625
31643
|
/**
|
|
31626
31644
|
* Route/menu-driven overrides for a single shared table module (e.g. list URL filter on `read.list`, default create payload).
|
|
31627
31645
|
*/
|
|
@@ -31629,10 +31647,10 @@ function mergeTableConfiguration(base, readListUrl, genericType) {
|
|
|
31629
31647
|
if (!readListUrl && !genericType) {
|
|
31630
31648
|
return base;
|
|
31631
31649
|
}
|
|
31632
|
-
var next = _objectSpread
|
|
31650
|
+
var next = _objectSpread$10({}, base);
|
|
31633
31651
|
if (readListUrl && _typeof(next.apiInterface) === 'object' && next.apiInterface.read && _typeof(next.apiInterface.read) === 'object') {
|
|
31634
|
-
next.apiInterface = _objectSpread
|
|
31635
|
-
read: _objectSpread
|
|
31652
|
+
next.apiInterface = _objectSpread$10(_objectSpread$10({}, next.apiInterface), {}, {
|
|
31653
|
+
read: _objectSpread$10(_objectSpread$10({}, next.apiInterface.read), {}, {
|
|
31636
31654
|
list: readListUrl
|
|
31637
31655
|
})
|
|
31638
31656
|
});
|
|
@@ -31665,8 +31683,8 @@ function objectHash (obj) {
|
|
|
31665
31683
|
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; } } }; }
|
|
31666
31684
|
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; } }
|
|
31667
31685
|
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; }
|
|
31668
|
-
function ownKeys
|
|
31669
|
-
function _objectSpread
|
|
31686
|
+
function ownKeys$$(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; }
|
|
31687
|
+
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$$(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$$(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31670
31688
|
var LOG$8 = getLogger('Backoffice', 'TableData');
|
|
31671
31689
|
function useTableData (_ref) {
|
|
31672
31690
|
var _configuration$filter, _configuration$filter2, _ref2, _configuration$filter3, _configuration$filter4, _configuration$filter5, _ref3, _configuration$filter6, _configuration$filter7, _configuration$filter8, _configuration$filter9, _configuration$filter10, _configuration$bulkAc, _configuration$apiInt, _ref5, _configuration$readMa;
|
|
@@ -31687,8 +31705,8 @@ function useTableData (_ref) {
|
|
|
31687
31705
|
var apiHandler = useMemo(function () {
|
|
31688
31706
|
if (configProp) {
|
|
31689
31707
|
// Store entry is minimal (type+title only); pass the full apiInterface directly
|
|
31690
|
-
var apiInterface = readListUrlOverride && _typeof(configProp.apiInterface) === 'object' && configProp.apiInterface.read ? _objectSpread
|
|
31691
|
-
read: _objectSpread
|
|
31708
|
+
var apiInterface = readListUrlOverride && _typeof(configProp.apiInterface) === 'object' && configProp.apiInterface.read ? _objectSpread$$(_objectSpread$$({}, configProp.apiInterface), {}, {
|
|
31709
|
+
read: _objectSpread$$(_objectSpread$$({}, configProp.apiInterface.read), {}, {
|
|
31692
31710
|
list: readListUrlOverride
|
|
31693
31711
|
})
|
|
31694
31712
|
}) : configProp.apiInterface;
|
|
@@ -31699,8 +31717,8 @@ function useTableData (_ref) {
|
|
|
31699
31717
|
}
|
|
31700
31718
|
var base = baseConfiguration;
|
|
31701
31719
|
if (_typeof(base.apiInterface) === 'object' && base.apiInterface.read && _typeof(base.apiInterface.read) === 'object') {
|
|
31702
|
-
return root.getApiHandler(id, _objectSpread
|
|
31703
|
-
read: _objectSpread
|
|
31720
|
+
return root.getApiHandler(id, _objectSpread$$(_objectSpread$$({}, base.apiInterface), {}, {
|
|
31721
|
+
read: _objectSpread$$(_objectSpread$$({}, base.apiInterface.read), {}, {
|
|
31704
31722
|
list: readListUrlOverride
|
|
31705
31723
|
})
|
|
31706
31724
|
}));
|
|
@@ -31751,7 +31769,7 @@ function useTableData (_ref) {
|
|
|
31751
31769
|
var _useState13 = useState({
|
|
31752
31770
|
loading: true,
|
|
31753
31771
|
deleting: false,
|
|
31754
|
-
pagination: _objectSpread
|
|
31772
|
+
pagination: _objectSpread$$({
|
|
31755
31773
|
current: 1,
|
|
31756
31774
|
pageSize: 20,
|
|
31757
31775
|
total: 0,
|
|
@@ -31760,7 +31778,7 @@ function useTableData (_ref) {
|
|
|
31760
31778
|
selected: [],
|
|
31761
31779
|
canDelete: !!apiHandler.canDelete,
|
|
31762
31780
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
31763
|
-
mappingData: _objectSpread
|
|
31781
|
+
mappingData: _objectSpread$$(_objectSpread$$({}, parentData), {}, {
|
|
31764
31782
|
prefilter: {
|
|
31765
31783
|
select: globalFilter.select
|
|
31766
31784
|
},
|
|
@@ -31771,7 +31789,7 @@ function useTableData (_ref) {
|
|
|
31771
31789
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
31772
31790
|
state = _useState14[0],
|
|
31773
31791
|
setState = _useState14[1];
|
|
31774
|
-
var mappingData = _objectSpread
|
|
31792
|
+
var mappingData = _objectSpread$$(_objectSpread$$(_objectSpread$$({}, parentData), state.data), {}, {
|
|
31775
31793
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
31776
31794
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
31777
31795
|
});
|
|
@@ -31811,7 +31829,7 @@ function useTableData (_ref) {
|
|
|
31811
31829
|
}
|
|
31812
31830
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
31813
31831
|
var newInitData = initData;
|
|
31814
|
-
var newState = _objectSpread
|
|
31832
|
+
var newState = _objectSpread$$({}, state);
|
|
31815
31833
|
var selected = [];
|
|
31816
31834
|
if (configuration.deselectOnUpdate == false) {
|
|
31817
31835
|
selected = state.selected;
|
|
@@ -31828,7 +31846,7 @@ function useTableData (_ref) {
|
|
|
31828
31846
|
dataRow: dataRow
|
|
31829
31847
|
}),
|
|
31830
31848
|
_data = _updateData.data;
|
|
31831
|
-
newState = _objectSpread
|
|
31849
|
+
newState = _objectSpread$$(_objectSpread$$({}, newState), {}, {
|
|
31832
31850
|
data: _data,
|
|
31833
31851
|
selected: selected
|
|
31834
31852
|
});
|
|
@@ -31840,8 +31858,8 @@ function useTableData (_ref) {
|
|
|
31840
31858
|
dataRow: dataRow
|
|
31841
31859
|
}),
|
|
31842
31860
|
nextInitData = _updateData2.data;
|
|
31843
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread
|
|
31844
|
-
filters: _objectSpread
|
|
31861
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$$(_objectSpread$$(_objectSpread$$({}, filterData), {}, {
|
|
31862
|
+
filters: _objectSpread$$(_objectSpread$$(_objectSpread$$(_objectSpread$$(_objectSpread$$(_objectSpread$$({}, 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"])
|
|
31845
31863
|
}, 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 ? {
|
|
31846
31864
|
genericProps: globalFilter.toggle
|
|
31847
31865
|
} : undefined), {}, {
|
|
@@ -31851,7 +31869,7 @@ function useTableData (_ref) {
|
|
|
31851
31869
|
_data2 = _applyFilterAndSortat.data,
|
|
31852
31870
|
pagination = _applyFilterAndSortat.pagination;
|
|
31853
31871
|
newInitData = nextInitData;
|
|
31854
|
-
newState = _objectSpread
|
|
31872
|
+
newState = _objectSpread$$(_objectSpread$$({}, newState), {}, {
|
|
31855
31873
|
pagination: pagination,
|
|
31856
31874
|
data: _data2,
|
|
31857
31875
|
selected: selected
|
|
@@ -31861,8 +31879,8 @@ function useTableData (_ref) {
|
|
|
31861
31879
|
if (apiHandler.canCreate) {
|
|
31862
31880
|
apiCreate(data).then(function (res) {
|
|
31863
31881
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
31864
|
-
initData && setInitData(_objectSpread
|
|
31865
|
-
setState(_objectSpread
|
|
31882
|
+
initData && setInitData(_objectSpread$$({}, initData));
|
|
31883
|
+
setState(_objectSpread$$({}, state));
|
|
31866
31884
|
}
|
|
31867
31885
|
});
|
|
31868
31886
|
}
|
|
@@ -31875,7 +31893,7 @@ function useTableData (_ref) {
|
|
|
31875
31893
|
var triggerRefresh = function triggerRefresh() {
|
|
31876
31894
|
var _configuration$filter14;
|
|
31877
31895
|
setError(undefined);
|
|
31878
|
-
var newGlobalFilter = _objectSpread
|
|
31896
|
+
var newGlobalFilter = _objectSpread$$({}, globalFilter);
|
|
31879
31897
|
//on refresh update default filter, since global value can change
|
|
31880
31898
|
if ((_configuration$filter14 = configuration.filter) !== null && _configuration$filter14 !== void 0 && _configuration$filter14["default"]) {
|
|
31881
31899
|
var _configuration$filter15;
|
|
@@ -31886,7 +31904,7 @@ function useTableData (_ref) {
|
|
|
31886
31904
|
newGlobalFilter["default"] = _defaultFilter;
|
|
31887
31905
|
setGlobaFilter(newGlobalFilter);
|
|
31888
31906
|
}
|
|
31889
|
-
onChange(_objectSpread
|
|
31907
|
+
onChange(_objectSpread$$({
|
|
31890
31908
|
pagination: state.pagination
|
|
31891
31909
|
}, filterData), newGlobalFilter, true);
|
|
31892
31910
|
};
|
|
@@ -31904,7 +31922,7 @@ function useTableData (_ref) {
|
|
|
31904
31922
|
order: c.defaultSortOrder
|
|
31905
31923
|
};
|
|
31906
31924
|
});
|
|
31907
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread
|
|
31925
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$$(_objectSpread$$({}, state), {}, {
|
|
31908
31926
|
loading: false
|
|
31909
31927
|
}));else {
|
|
31910
31928
|
onChange({
|
|
@@ -31947,7 +31965,7 @@ function useTableData (_ref) {
|
|
|
31947
31965
|
case 0:
|
|
31948
31966
|
filters = {};
|
|
31949
31967
|
filters['_id'] = [id, 'eq', false];
|
|
31950
|
-
ssf = _objectSpread
|
|
31968
|
+
ssf = _objectSpread$$({
|
|
31951
31969
|
pagination: {
|
|
31952
31970
|
current: 1,
|
|
31953
31971
|
pageSize: 1
|
|
@@ -31958,7 +31976,7 @@ function useTableData (_ref) {
|
|
|
31958
31976
|
genericProps: globalFilter.toggle
|
|
31959
31977
|
} : undefined);
|
|
31960
31978
|
_context2.next = 5;
|
|
31961
|
-
return apiHandler.readList(readMapping, _objectSpread
|
|
31979
|
+
return apiHandler.readList(readMapping, _objectSpread$$(_objectSpread$$({}, mappingData), state.mappingData), ssf);
|
|
31962
31980
|
case 5:
|
|
31963
31981
|
data = _context2.sent;
|
|
31964
31982
|
return _context2.abrupt("return", data);
|
|
@@ -32002,12 +32020,12 @@ function useTableData (_ref) {
|
|
|
32002
32020
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
32003
32021
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
32004
32022
|
overwriteMappingData = _args3.length > 4 ? _args3[4] : undefined;
|
|
32005
|
-
setState(_objectSpread
|
|
32023
|
+
setState(_objectSpread$$(_objectSpread$$({}, state), {}, {
|
|
32006
32024
|
mappingData: overwriteMappingData !== null && overwriteMappingData !== void 0 ? overwriteMappingData : state.mappingData,
|
|
32007
32025
|
loading: true
|
|
32008
32026
|
}));
|
|
32009
32027
|
currentData = initData;
|
|
32010
|
-
filterData = _objectSpread
|
|
32028
|
+
filterData = _objectSpread$$(_objectSpread$$(_objectSpread$$(_objectSpread$$({}, 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
|
|
32011
32029
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref9) {
|
|
32012
32030
|
var _ref10 = _slicedToArray(_ref9, 2);
|
|
32013
32031
|
_ref10[0];
|
|
@@ -32015,7 +32033,7 @@ function useTableData (_ref) {
|
|
|
32015
32033
|
return v != null;
|
|
32016
32034
|
}));
|
|
32017
32035
|
currentFilterHash = objectHash(filterData);
|
|
32018
|
-
currentPagination = _objectSpread
|
|
32036
|
+
currentPagination = _objectSpread$$(_objectSpread$$({}, p.pagination), {}, {
|
|
32019
32037
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
32020
32038
|
});
|
|
32021
32039
|
filterHash.current = currentFilterHash;
|
|
@@ -32023,7 +32041,7 @@ function useTableData (_ref) {
|
|
|
32023
32041
|
_context3.next = 21;
|
|
32024
32042
|
break;
|
|
32025
32043
|
}
|
|
32026
|
-
ssf = _objectSpread
|
|
32044
|
+
ssf = _objectSpread$$({
|
|
32027
32045
|
pagination: currentPagination,
|
|
32028
32046
|
columns: configuration.columns,
|
|
32029
32047
|
filters: filterData,
|
|
@@ -32032,12 +32050,12 @@ function useTableData (_ref) {
|
|
|
32032
32050
|
genericProps: prefilter.toggle
|
|
32033
32051
|
} : undefined);
|
|
32034
32052
|
_context3.next = 15;
|
|
32035
|
-
return apiHandler.readList(readMapping, _objectSpread
|
|
32053
|
+
return apiHandler.readList(readMapping, _objectSpread$$(_objectSpread$$({}, 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(p.filters, undefined)) === null || _parseFilter === void 0 ? void 0 : _parseFilter.slice(1, -1)));
|
|
32036
32054
|
case 15:
|
|
32037
32055
|
data = _context3.sent;
|
|
32038
|
-
currentUrl = apiHandler.getReadListUrl(readMapping, _objectSpread
|
|
32056
|
+
currentUrl = apiHandler.getReadListUrl(readMapping, _objectSpread$$(_objectSpread$$({}, mappingData), state.mappingData), ssf);
|
|
32039
32057
|
currentData = data.data;
|
|
32040
|
-
currentPagination = _objectSpread
|
|
32058
|
+
currentPagination = _objectSpread$$(_objectSpread$$({}, currentPagination), {}, {
|
|
32041
32059
|
total: data.total
|
|
32042
32060
|
});
|
|
32043
32061
|
_context3.next = 30;
|
|
@@ -32054,7 +32072,7 @@ function useTableData (_ref) {
|
|
|
32054
32072
|
currentData = _data3.data;
|
|
32055
32073
|
setInitData(currentData);
|
|
32056
32074
|
case 27:
|
|
32057
|
-
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread
|
|
32075
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$$(_objectSpread$$({}, p), {}, {
|
|
32058
32076
|
pagination: currentPagination,
|
|
32059
32077
|
filters: filterData,
|
|
32060
32078
|
data: currentData,
|
|
@@ -32063,11 +32081,11 @@ function useTableData (_ref) {
|
|
|
32063
32081
|
currentData = _data4;
|
|
32064
32082
|
currentPagination = pagination;
|
|
32065
32083
|
case 30:
|
|
32066
|
-
setState(_objectSpread
|
|
32084
|
+
setState(_objectSpread$$(_objectSpread$$({}, state), {}, {
|
|
32067
32085
|
loading: false,
|
|
32068
32086
|
data: currentData,
|
|
32069
32087
|
pagination: currentPagination,
|
|
32070
|
-
mappingData: _objectSpread
|
|
32088
|
+
mappingData: _objectSpread$$(_objectSpread$$(_objectSpread$$(_objectSpread$$({}, parentData), state.mappingData), overwriteMappingData), {}, {
|
|
32071
32089
|
prefilter: prefilter
|
|
32072
32090
|
}),
|
|
32073
32091
|
currentFetchUrl: currentUrl
|
|
@@ -32089,7 +32107,7 @@ function useTableData (_ref) {
|
|
|
32089
32107
|
};
|
|
32090
32108
|
}();
|
|
32091
32109
|
var onSelect = function onSelect(keys) {
|
|
32092
|
-
setState(_objectSpread
|
|
32110
|
+
setState(_objectSpread$$(_objectSpread$$({}, state), {}, {
|
|
32093
32111
|
selected: keys
|
|
32094
32112
|
}));
|
|
32095
32113
|
};
|
|
@@ -32100,7 +32118,7 @@ function useTableData (_ref) {
|
|
|
32100
32118
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
32101
32119
|
while (1) switch (_context5.prev = _context5.next) {
|
|
32102
32120
|
case 0:
|
|
32103
|
-
setState(_objectSpread
|
|
32121
|
+
setState(_objectSpread$$(_objectSpread$$({}, state), {}, {
|
|
32104
32122
|
deleting: true
|
|
32105
32123
|
}));
|
|
32106
32124
|
newData = _toConsumableArray(state.data);
|
|
@@ -32140,7 +32158,7 @@ function useTableData (_ref) {
|
|
|
32140
32158
|
} finally {
|
|
32141
32159
|
_iterator.f();
|
|
32142
32160
|
}
|
|
32143
|
-
mappingData = _objectSpread
|
|
32161
|
+
mappingData = _objectSpread$$(_objectSpread$$(_objectSpread$$({}, mappingData), state.mappingData), mapToggle);
|
|
32144
32162
|
deleteResult = undefined;
|
|
32145
32163
|
_context4.prev = 7;
|
|
32146
32164
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -32230,12 +32248,12 @@ function useTableData (_ref) {
|
|
|
32230
32248
|
break;
|
|
32231
32249
|
}
|
|
32232
32250
|
_context5.next = 25;
|
|
32233
|
-
return apiHandler.readList(readMapping, _objectSpread
|
|
32234
|
-
pagination: _objectSpread
|
|
32251
|
+
return apiHandler.readList(readMapping, _objectSpread$$(_objectSpread$$({}, mappingData), state.mappingData), _objectSpread$$({
|
|
32252
|
+
pagination: _objectSpread$$(_objectSpread$$({}, state.pagination), {}, {
|
|
32235
32253
|
current: current
|
|
32236
32254
|
}),
|
|
32237
32255
|
columns: configuration.columns,
|
|
32238
|
-
filters: _objectSpread
|
|
32256
|
+
filters: _objectSpread$$(_objectSpread$$(_objectSpread$$(_objectSpread$$(_objectSpread$$(_objectSpread$$({}, 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"]),
|
|
32239
32257
|
sorter: filterData.sorter
|
|
32240
32258
|
}, 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 ? {
|
|
32241
32259
|
genericProps: globalFilter.toggle
|
|
@@ -32246,11 +32264,11 @@ function useTableData (_ref) {
|
|
|
32246
32264
|
total = data.total;
|
|
32247
32265
|
case 28:
|
|
32248
32266
|
setInitData(newInitData);
|
|
32249
|
-
setState(_objectSpread
|
|
32267
|
+
setState(_objectSpread$$(_objectSpread$$({}, state), {}, {
|
|
32250
32268
|
selected: [],
|
|
32251
32269
|
deleting: false,
|
|
32252
32270
|
data: newData,
|
|
32253
|
-
pagination: _objectSpread
|
|
32271
|
+
pagination: _objectSpread$$(_objectSpread$$({}, state.pagination), {}, {
|
|
32254
32272
|
current: current === 0 ? 1 : current,
|
|
32255
32273
|
total: total
|
|
32256
32274
|
})
|
|
@@ -32271,7 +32289,7 @@ function useTableData (_ref) {
|
|
|
32271
32289
|
LOG$8.error(new DivaError('No global select filter defiend'));
|
|
32272
32290
|
return;
|
|
32273
32291
|
}
|
|
32274
|
-
var newGlobalFilter = _objectSpread
|
|
32292
|
+
var newGlobalFilter = _objectSpread$$({}, globalFilter);
|
|
32275
32293
|
if (value !== null && value !== void 0 && value.length) {
|
|
32276
32294
|
var selectValue = Array.isArray(value) ? value : [value];
|
|
32277
32295
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, selectValue.length > 1 ? [].concat(_toConsumableArray(selectValue), ['in']) : [selectValue[0], selectFilterOperation]);
|
|
@@ -32279,7 +32297,7 @@ function useTableData (_ref) {
|
|
|
32279
32297
|
newGlobalFilter.select = {};
|
|
32280
32298
|
}
|
|
32281
32299
|
setGlobaFilter(newGlobalFilter);
|
|
32282
|
-
onChange(_objectSpread
|
|
32300
|
+
onChange(_objectSpread$$({
|
|
32283
32301
|
pagination: state.pagination
|
|
32284
32302
|
}, filterData), newGlobalFilter);
|
|
32285
32303
|
};
|
|
@@ -32290,16 +32308,16 @@ function useTableData (_ref) {
|
|
|
32290
32308
|
return;
|
|
32291
32309
|
}
|
|
32292
32310
|
var toggleFilter = {};
|
|
32293
|
-
var mappingData = _objectSpread
|
|
32311
|
+
var mappingData = _objectSpread$$({}, state.mappingData);
|
|
32294
32312
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
32295
32313
|
mappingData[f] = !globalFilter.toggle && configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : undefined;
|
|
32296
32314
|
toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
32297
32315
|
});
|
|
32298
|
-
var newGlobalFilter = _objectSpread
|
|
32316
|
+
var newGlobalFilter = _objectSpread$$(_objectSpread$$({}, globalFilter), {}, {
|
|
32299
32317
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
32300
32318
|
});
|
|
32301
32319
|
setGlobaFilter(newGlobalFilter);
|
|
32302
|
-
onChange(_objectSpread
|
|
32320
|
+
onChange(_objectSpread$$({
|
|
32303
32321
|
pagination: state.pagination
|
|
32304
32322
|
}, filterData), newGlobalFilter, true, true, mappingData);
|
|
32305
32323
|
};
|
|
@@ -32312,7 +32330,7 @@ function useTableData (_ref) {
|
|
|
32312
32330
|
LOG$8.error(new DivaError('No global search filter defiend'));
|
|
32313
32331
|
return;
|
|
32314
32332
|
}
|
|
32315
|
-
var newGlobalFilter = _objectSpread
|
|
32333
|
+
var newGlobalFilter = _objectSpread$$(_objectSpread$$({}, globalFilter), {}, {
|
|
32316
32334
|
search: {}
|
|
32317
32335
|
});
|
|
32318
32336
|
if (value) {
|
|
@@ -32326,7 +32344,7 @@ function useTableData (_ref) {
|
|
|
32326
32344
|
});
|
|
32327
32345
|
}
|
|
32328
32346
|
setGlobaFilter(newGlobalFilter);
|
|
32329
|
-
onChange(_objectSpread
|
|
32347
|
+
onChange(_objectSpread$$({
|
|
32330
32348
|
pagination: state.pagination
|
|
32331
32349
|
}, filterData), newGlobalFilter);
|
|
32332
32350
|
};
|
|
@@ -32336,20 +32354,20 @@ function useTableData (_ref) {
|
|
|
32336
32354
|
LOG$8.error(new DivaError('No global period filter defiend'));
|
|
32337
32355
|
return;
|
|
32338
32356
|
}
|
|
32339
|
-
var newGlobalFilter = _objectSpread
|
|
32357
|
+
var newGlobalFilter = _objectSpread$$({}, globalFilter);
|
|
32340
32358
|
newGlobalFilter.timeStamp = {
|
|
32341
32359
|
fromTimeStamp: [from],
|
|
32342
32360
|
toTimeStamp: [to]
|
|
32343
32361
|
};
|
|
32344
32362
|
if (!configuration.filter.period.onlyAsMappingData) setGlobaFilter(newGlobalFilter);
|
|
32345
|
-
onChange(_objectSpread
|
|
32363
|
+
onChange(_objectSpread$$({
|
|
32346
32364
|
pagination: state.pagination
|
|
32347
|
-
}, filterData), undefined, true, undefined, _objectSpread
|
|
32365
|
+
}, filterData), undefined, true, undefined, _objectSpread$$(_objectSpread$$({}, state.mappingData), {}, {
|
|
32348
32366
|
from: from,
|
|
32349
32367
|
to: to
|
|
32350
32368
|
}));
|
|
32351
32369
|
};
|
|
32352
|
-
return _objectSpread
|
|
32370
|
+
return _objectSpread$$(_objectSpread$$({}, state), {}, {
|
|
32353
32371
|
title: title,
|
|
32354
32372
|
configuration: configuration,
|
|
32355
32373
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -32395,8 +32413,8 @@ function StandardTable (_ref) {
|
|
|
32395
32413
|
});
|
|
32396
32414
|
}
|
|
32397
32415
|
|
|
32398
|
-
function ownKeys$
|
|
32399
|
-
function _objectSpread$
|
|
32416
|
+
function ownKeys$_(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; }
|
|
32417
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$_(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$_(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32400
32418
|
function Table (props) {
|
|
32401
32419
|
var root = useStore();
|
|
32402
32420
|
var variant = useMemo(function () {
|
|
@@ -32404,15 +32422,15 @@ function Table (props) {
|
|
|
32404
32422
|
return config.variant;
|
|
32405
32423
|
}, [props.id]);
|
|
32406
32424
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
32407
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
32425
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$_({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$_({}, props))]
|
|
32408
32426
|
});
|
|
32409
32427
|
}
|
|
32410
32428
|
|
|
32411
32429
|
function _createForOfIteratorHelper$e(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$e(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
32412
32430
|
function _unsupportedIterableToArray$e(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$e(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$e(r, a) : void 0; } }
|
|
32413
32431
|
function _arrayLikeToArray$e(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
32414
|
-
function ownKeys$
|
|
32415
|
-
function _objectSpread$
|
|
32432
|
+
function ownKeys$Z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32433
|
+
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$Z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$Z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32416
32434
|
function useAGGrid (_ref) {
|
|
32417
32435
|
var id = _ref.id,
|
|
32418
32436
|
filter = _ref.filter,
|
|
@@ -32506,7 +32524,7 @@ function useAGGrid (_ref) {
|
|
|
32506
32524
|
value = _ref3[1];
|
|
32507
32525
|
if (_idx == 0) {
|
|
32508
32526
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
32509
|
-
rdat.push(_objectSpread$
|
|
32527
|
+
rdat.push(_objectSpread$Z(_objectSpread$Z({}, rd), {}, {
|
|
32510
32528
|
grouping: [idx.toString()]
|
|
32511
32529
|
}));
|
|
32512
32530
|
var sp = key.split(':');
|
|
@@ -32649,8 +32667,8 @@ var value = "value-FCA-6";
|
|
|
32649
32667
|
var css_248z$A = ".overlay-lm0tm {\n position: absolute;\n z-index: 1;\n background-color: rgba(247,247,247,0.45882);\n height: 60vh;\n width: 100%;\n}\n.loader-LaXZy {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 50px;\n height: 50px;\n border: 3px solid rgba(0, 0, 0, 0.3);\n border-radius: 50%;\n border-top-color: #fff;\n animation: spin-qUdpu 1s ease-in-out infinite;\n -webkit-animation: spin-qUdpu 1s ease-in-out infinite;\n}\n.flex-yQdda {\n display: flex;\n}\n\n.bar-Y663f {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin-top: 7%;\n}\n\n.value-FCA-6 {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: -moz-fit-content;\n width: fit-content;\n}\n@keyframes spin-qUdpu {\n to {\n -webkit-transform: rotate(360deg);\n }\n}\n";
|
|
32650
32668
|
styleInject(css_248z$A);
|
|
32651
32669
|
|
|
32652
|
-
function ownKeys$
|
|
32653
|
-
function _objectSpread$
|
|
32670
|
+
function ownKeys$Y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32671
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$Y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$Y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32654
32672
|
var AGChart = function AGChart(_ref) {
|
|
32655
32673
|
var data = _ref.data;
|
|
32656
32674
|
var groupedData = [];
|
|
@@ -32658,11 +32676,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
32658
32676
|
data.forEach(function (dt) {
|
|
32659
32677
|
if (dt.count == 0) return;
|
|
32660
32678
|
if (groupedData.length > dt.grouping[0]) {
|
|
32661
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
32679
|
+
groupedData[dt.grouping[0]].push(_objectSpread$Y(_objectSpread$Y({}, dt), {}, {
|
|
32662
32680
|
count: Number(dt.count)
|
|
32663
32681
|
}));
|
|
32664
32682
|
} else {
|
|
32665
|
-
groupedData.push([_objectSpread$
|
|
32683
|
+
groupedData.push([_objectSpread$Y(_objectSpread$Y({}, dt), {}, {
|
|
32666
32684
|
count: Number(dt.count)
|
|
32667
32685
|
})]);
|
|
32668
32686
|
}
|
|
@@ -32703,8 +32721,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
32703
32721
|
});
|
|
32704
32722
|
};
|
|
32705
32723
|
|
|
32706
|
-
function ownKeys$
|
|
32707
|
-
function _objectSpread$
|
|
32724
|
+
function ownKeys$X(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32725
|
+
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$X(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$X(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32708
32726
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
32709
32727
|
var id = _ref.id,
|
|
32710
32728
|
filter = _ref.filter,
|
|
@@ -32797,7 +32815,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
32797
32815
|
});
|
|
32798
32816
|
});
|
|
32799
32817
|
}
|
|
32800
|
-
return _objectSpread$
|
|
32818
|
+
return _objectSpread$X(_objectSpread$X({}, column), {}, {
|
|
32801
32819
|
cellRenderer: renderer
|
|
32802
32820
|
});
|
|
32803
32821
|
});
|
|
@@ -33067,8 +33085,8 @@ var CustomText = function CustomText(_ref) {
|
|
|
33067
33085
|
};
|
|
33068
33086
|
var CustomText$1 = observer(CustomText);
|
|
33069
33087
|
|
|
33070
|
-
function ownKeys$
|
|
33071
|
-
function _objectSpread$
|
|
33088
|
+
function ownKeys$W(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33089
|
+
function _objectSpread$W(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$W(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$W(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33072
33090
|
function _createForOfIteratorHelper$d(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$d(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
33073
33091
|
function _unsupportedIterableToArray$d(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$d(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$d(r, a) : void 0; } }
|
|
33074
33092
|
function _arrayLikeToArray$d(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -33131,7 +33149,7 @@ function useFilterBoxData (id) {
|
|
|
33131
33149
|
} finally {
|
|
33132
33150
|
_iterator.f();
|
|
33133
33151
|
}
|
|
33134
|
-
return _objectSpread$
|
|
33152
|
+
return _objectSpread$W(_objectSpread$W({}, state), ob);
|
|
33135
33153
|
}
|
|
33136
33154
|
return {
|
|
33137
33155
|
configuration: configuration,
|
|
@@ -33145,8 +33163,8 @@ function useFilterBoxData (id) {
|
|
|
33145
33163
|
function _createForOfIteratorHelper$c(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$c(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
33146
33164
|
function _unsupportedIterableToArray$c(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$c(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$c(r, a) : void 0; } }
|
|
33147
33165
|
function _arrayLikeToArray$c(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
33148
|
-
function ownKeys$
|
|
33149
|
-
function _objectSpread$
|
|
33166
|
+
function ownKeys$V(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33167
|
+
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$V(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$V(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33150
33168
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
33151
33169
|
var id = _ref.id,
|
|
33152
33170
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -33174,7 +33192,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
33174
33192
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Selector, {
|
|
33175
33193
|
mode: "single",
|
|
33176
33194
|
apiInterface: filter.requestOptions,
|
|
33177
|
-
wholeData: _objectSpread$
|
|
33195
|
+
wholeData: _objectSpread$V(_objectSpread$V({}, state.filter), {}, {
|
|
33178
33196
|
tab: tab
|
|
33179
33197
|
}),
|
|
33180
33198
|
mapping: filter.requestMapping,
|
|
@@ -33406,8 +33424,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
33406
33424
|
return false;
|
|
33407
33425
|
});
|
|
33408
33426
|
|
|
33409
|
-
function ownKeys$
|
|
33410
|
-
function _objectSpread$
|
|
33427
|
+
function ownKeys$U(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33428
|
+
function _objectSpread$U(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$U(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$U(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33411
33429
|
function useUIBuilderData (id) {
|
|
33412
33430
|
var save = undefined;
|
|
33413
33431
|
var root = useStore();
|
|
@@ -33439,7 +33457,7 @@ function useUIBuilderData (id) {
|
|
|
33439
33457
|
var configuration = _useMemo.configuration;
|
|
33440
33458
|
useEffect(function () {
|
|
33441
33459
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
33442
|
-
return setFilter(_objectSpread$
|
|
33460
|
+
return setFilter(_objectSpread$U(_objectSpread$U({}, filter), {}, {
|
|
33443
33461
|
sessionGuid: res
|
|
33444
33462
|
}));
|
|
33445
33463
|
});
|
|
@@ -33462,8 +33480,8 @@ function useUIBuilderData (id) {
|
|
|
33462
33480
|
};
|
|
33463
33481
|
}
|
|
33464
33482
|
|
|
33465
|
-
function ownKeys$
|
|
33466
|
-
function _objectSpread$
|
|
33483
|
+
function ownKeys$T(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33484
|
+
function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$T(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$T(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33467
33485
|
function UIBuilder(_ref) {
|
|
33468
33486
|
var id = _ref.id;
|
|
33469
33487
|
var state = useUIBuilderData(id);
|
|
@@ -33490,7 +33508,7 @@ function UIBuilder(_ref) {
|
|
|
33490
33508
|
override = {
|
|
33491
33509
|
value: newFilter[item.field],
|
|
33492
33510
|
setValue: function setValue(newVal) {
|
|
33493
|
-
var newFilter = _objectSpread$
|
|
33511
|
+
var newFilter = _objectSpread$T({}, state.filter);
|
|
33494
33512
|
newFilter[item.field] = newVal;
|
|
33495
33513
|
state.setFilter(newFilter);
|
|
33496
33514
|
}
|
|
@@ -33538,7 +33556,7 @@ function UIBuilder(_ref) {
|
|
|
33538
33556
|
case 'AGGrid':
|
|
33539
33557
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
33540
33558
|
id: item.id,
|
|
33541
|
-
filter: _objectSpread$
|
|
33559
|
+
filter: _objectSpread$T({
|
|
33542
33560
|
optionCodices: JSON.stringify(state.data)
|
|
33543
33561
|
}, state.filter),
|
|
33544
33562
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -33702,8 +33720,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
33702
33720
|
};
|
|
33703
33721
|
var OrgItem$1 = observer(OrgItem);
|
|
33704
33722
|
|
|
33705
|
-
function ownKeys$
|
|
33706
|
-
function _objectSpread$
|
|
33723
|
+
function ownKeys$S(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33724
|
+
function _objectSpread$S(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$S(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$S(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33707
33725
|
function useTransformJson (_ref) {
|
|
33708
33726
|
var id = _ref.id;
|
|
33709
33727
|
var _useState = useState(),
|
|
@@ -33769,7 +33787,7 @@ function useTransformJson (_ref) {
|
|
|
33769
33787
|
}();
|
|
33770
33788
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
33771
33789
|
var _data$children;
|
|
33772
|
-
return _objectSpread$
|
|
33790
|
+
return _objectSpread$S(_objectSpread$S({}, data), {}, {
|
|
33773
33791
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
33774
33792
|
data: data,
|
|
33775
33793
|
configuration: configuration,
|
|
@@ -34429,8 +34447,8 @@ function useCatalogEditor (id) {
|
|
|
34429
34447
|
};
|
|
34430
34448
|
}
|
|
34431
34449
|
|
|
34432
|
-
function ownKeys$
|
|
34433
|
-
function _objectSpread$
|
|
34450
|
+
function ownKeys$R(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34451
|
+
function _objectSpread$R(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$R(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$R(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34434
34452
|
function DragDropUpload(_ref) {
|
|
34435
34453
|
var api2Params = _ref.api2Params,
|
|
34436
34454
|
catalogId = _ref.catalogId,
|
|
@@ -34538,7 +34556,7 @@ function DragDropUpload(_ref) {
|
|
|
34538
34556
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
34539
34557
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
34540
34558
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
34541
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
34559
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$R(_objectSpread$R({}, props), {}, {
|
|
34542
34560
|
children: [/*#__PURE__*/jsx("p", {
|
|
34543
34561
|
className: "ant-upload-drag-icon",
|
|
34544
34562
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -34755,8 +34773,8 @@ function CatalogEditor(_ref) {
|
|
|
34755
34773
|
}
|
|
34756
34774
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
34757
34775
|
|
|
34758
|
-
function ownKeys$
|
|
34759
|
-
function _objectSpread$
|
|
34776
|
+
function ownKeys$Q(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34777
|
+
function _objectSpread$Q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$Q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$Q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34760
34778
|
var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(props, ref) {
|
|
34761
34779
|
var _root$contentStore$bo, _root$contentStore$ri;
|
|
34762
34780
|
var root = useStore();
|
|
@@ -34771,7 +34789,7 @@ var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(pro
|
|
|
34771
34789
|
style: {
|
|
34772
34790
|
display: 'contents'
|
|
34773
34791
|
},
|
|
34774
|
-
children: /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$
|
|
34792
|
+
children: /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$Q(_objectSpread$Q({}, props), {}, {
|
|
34775
34793
|
ref: ref,
|
|
34776
34794
|
darkMode: root.contentStore.theme == 'darkmode',
|
|
34777
34795
|
jwt: root.dataStore.jwt,
|
|
@@ -34781,8 +34799,8 @@ var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(pro
|
|
|
34781
34799
|
});
|
|
34782
34800
|
var Spreadsheet = observer(SpreadsheetWrapper);
|
|
34783
34801
|
|
|
34784
|
-
function ownKeys$
|
|
34785
|
-
function _objectSpread$
|
|
34802
|
+
function ownKeys$P(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34803
|
+
function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$P(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$P(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34786
34804
|
|
|
34787
34805
|
// Type definition for the context state
|
|
34788
34806
|
|
|
@@ -34804,14 +34822,14 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
34804
34822
|
loading: loading,
|
|
34805
34823
|
setOptions: function setOptions(options) {
|
|
34806
34824
|
var state = root.contextStore.getContext('enricher');
|
|
34807
|
-
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$
|
|
34825
|
+
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$P(_objectSpread$P({}, state[stateKey]), {}, {
|
|
34808
34826
|
options: options,
|
|
34809
34827
|
loading: false
|
|
34810
34828
|
})));
|
|
34811
34829
|
},
|
|
34812
34830
|
setLoading: function setLoading(loading) {
|
|
34813
34831
|
var state = root.contextStore.getContext('enricher');
|
|
34814
|
-
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$
|
|
34832
|
+
root.contextStore.updateContext('enricher', _defineProperty({}, stateKey, _objectSpread$P(_objectSpread$P({}, state[stateKey]), {}, {
|
|
34815
34833
|
loading: loading
|
|
34816
34834
|
})));
|
|
34817
34835
|
}
|
|
@@ -34922,7 +34940,7 @@ var useEnricherContext = function useEnricherContext() {
|
|
|
34922
34940
|
}, [urlPackageId, getContext().packageId, setSelectedPackage]);
|
|
34923
34941
|
|
|
34924
34942
|
// Return context + handlers
|
|
34925
|
-
return _objectSpread$
|
|
34943
|
+
return _objectSpread$P(_objectSpread$P({}, getContext()), {}, {
|
|
34926
34944
|
setSelectedSerie: setSelectedSerie,
|
|
34927
34945
|
setSelectedItem: setSelectedItem,
|
|
34928
34946
|
setSelectedFeature: setSelectedFeature,
|
|
@@ -35208,6 +35226,8 @@ function useModule$1 (currentModules) {
|
|
|
35208
35226
|
};
|
|
35209
35227
|
}
|
|
35210
35228
|
|
|
35229
|
+
function ownKeys$O(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35230
|
+
function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$O(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$O(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35211
35231
|
/**
|
|
35212
35232
|
* Creates a column configuration for translated fields in a spreadsheet
|
|
35213
35233
|
*
|
|
@@ -35219,6 +35239,7 @@ function useModule$1 (currentModules) {
|
|
|
35219
35239
|
* @param customParams - Custom parameters to be applied to each language variant
|
|
35220
35240
|
* @param additionalFields - Additional fields to be included with each language variant
|
|
35221
35241
|
* @param editable - Whether the field is editable
|
|
35242
|
+
* @param maxLength - Maximum number of characters allowed in the cell editor
|
|
35222
35243
|
* @returns Column configuration object for the spreadsheet
|
|
35223
35244
|
*/
|
|
35224
35245
|
function createTranslatedColumnConfig(field, headerName, languages) {
|
|
@@ -35227,7 +35248,17 @@ function createTranslatedColumnConfig(field, headerName, languages) {
|
|
|
35227
35248
|
var customParams = arguments.length > 5 ? arguments[5] : undefined;
|
|
35228
35249
|
var additionalFields = arguments.length > 6 ? arguments[6] : undefined;
|
|
35229
35250
|
var editable = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : true;
|
|
35251
|
+
var maxLength = arguments.length > 8 ? arguments[8] : undefined;
|
|
35230
35252
|
var langs = languages !== null && languages !== void 0 && languages.length ? languages : ['DE'];
|
|
35253
|
+
var buildCustomParams = function buildCustomParams(language) {
|
|
35254
|
+
var translatedCustomParams = customParams ? Object.keys(customParams).reduce(function (acc, key) {
|
|
35255
|
+
acc[key] = "".concat(customParams[key], ".").concat(language);
|
|
35256
|
+
return acc;
|
|
35257
|
+
}, {}) : undefined;
|
|
35258
|
+
return maxLength !== undefined ? _objectSpread$O(_objectSpread$O({}, translatedCustomParams), {}, {
|
|
35259
|
+
maxLength: maxLength
|
|
35260
|
+
}) : translatedCustomParams;
|
|
35261
|
+
};
|
|
35231
35262
|
if (langs.length == 1) {
|
|
35232
35263
|
return {
|
|
35233
35264
|
headerName: headerName,
|
|
@@ -35236,10 +35267,7 @@ function createTranslatedColumnConfig(field, headerName, languages) {
|
|
|
35236
35267
|
editable: editable,
|
|
35237
35268
|
isDictionary: true,
|
|
35238
35269
|
cellDataType: cellDataType,
|
|
35239
|
-
customParams:
|
|
35240
|
-
acc[key] = "".concat(customParams[key], ".").concat(langs[0]);
|
|
35241
|
-
return acc;
|
|
35242
|
-
}, {}) : undefined,
|
|
35270
|
+
customParams: buildCustomParams(langs[0]),
|
|
35243
35271
|
additionalFields: additionalFields ? additionalFields.map(function (field) {
|
|
35244
35272
|
return "".concat(field, ".").concat(langs[0]);
|
|
35245
35273
|
}) : undefined
|
|
@@ -35256,10 +35284,7 @@ function createTranslatedColumnConfig(field, headerName, languages) {
|
|
|
35256
35284
|
editable: editable,
|
|
35257
35285
|
isDictionary: true,
|
|
35258
35286
|
cellDataType: cellDataType,
|
|
35259
|
-
customParams:
|
|
35260
|
-
acc[key] = "".concat(customParams[key], ".").concat(language);
|
|
35261
|
-
return acc;
|
|
35262
|
-
}, {}) : undefined,
|
|
35287
|
+
customParams: buildCustomParams(language),
|
|
35263
35288
|
additionalFields: additionalFields ? additionalFields.map(function (field) {
|
|
35264
35289
|
return "".concat(field, ".").concat(language);
|
|
35265
35290
|
}) : undefined
|
|
@@ -36087,6 +36112,175 @@ var getItemTypeKey = function getItemTypeKey(t) {
|
|
|
36087
36112
|
}];
|
|
36088
36113
|
};
|
|
36089
36114
|
|
|
36115
|
+
/**
|
|
36116
|
+
* Returns an array of item type options with translated names for IDM catalog version 4.1
|
|
36117
|
+
*
|
|
36118
|
+
* @param t - Translation function from i18next
|
|
36119
|
+
* @returns Array of item type objects with name and value properties
|
|
36120
|
+
*/
|
|
36121
|
+
var getItemTypeKey41 = function getItemTypeKey41(t) {
|
|
36122
|
+
return [{
|
|
36123
|
+
name: t('backoffice.idmCatalogEditor.items.label.sessel'),
|
|
36124
|
+
value: 1
|
|
36125
|
+
}, {
|
|
36126
|
+
name: t('backoffice.idmCatalogEditor.items.label.clubchair'),
|
|
36127
|
+
value: 2
|
|
36128
|
+
}, {
|
|
36129
|
+
name: t('backoffice.idmCatalogEditor.items.label.relaxSessel'),
|
|
36130
|
+
value: 3
|
|
36131
|
+
}, {
|
|
36132
|
+
name: t('backoffice.idmCatalogEditor.items.label.longChair'),
|
|
36133
|
+
value: 4
|
|
36134
|
+
}, {
|
|
36135
|
+
name: t('backoffice.idmCatalogEditor.items.label.sofa'),
|
|
36136
|
+
value: 5
|
|
36137
|
+
}, {
|
|
36138
|
+
name: t('backoffice.idmCatalogEditor.items.label.polsterZwischenelement'),
|
|
36139
|
+
value: 6
|
|
36140
|
+
}, {
|
|
36141
|
+
name: t('backoffice.idmCatalogEditor.items.label.polsterEcke'),
|
|
36142
|
+
value: 7
|
|
36143
|
+
}, {
|
|
36144
|
+
name: t('backoffice.idmCatalogEditor.items.label.einzelliege'),
|
|
36145
|
+
value: 8
|
|
36146
|
+
}, {
|
|
36147
|
+
name: t('backoffice.idmCatalogEditor.items.label.polsterHocker'),
|
|
36148
|
+
value: 9
|
|
36149
|
+
}, {
|
|
36150
|
+
name: t('backoffice.idmCatalogEditor.items.label.kissen'),
|
|
36151
|
+
value: 10
|
|
36152
|
+
}, {
|
|
36153
|
+
name: t('backoffice.idmCatalogEditor.items.label.polsterAnstelltisch'),
|
|
36154
|
+
value: 11
|
|
36155
|
+
}, {
|
|
36156
|
+
name: t('backoffice.idmCatalogEditor.items.label.polsterKombinationen'),
|
|
36157
|
+
value: 13
|
|
36158
|
+
}, {
|
|
36159
|
+
name: t('backoffice.idmCatalogEditor.items.label.polsterAbschlusselement'),
|
|
36160
|
+
value: 14
|
|
36161
|
+
}, {
|
|
36162
|
+
name: t('backoffice.idmCatalogEditor.items.label.bettsofa'),
|
|
36163
|
+
value: 15
|
|
36164
|
+
}, {
|
|
36165
|
+
name: t('backoffice.idmCatalogEditor.items.label.fussbank'),
|
|
36166
|
+
value: 18
|
|
36167
|
+
}, {
|
|
36168
|
+
name: t('backoffice.idmCatalogEditor.items.label.kopfstuetze'),
|
|
36169
|
+
value: 19
|
|
36170
|
+
}, {
|
|
36171
|
+
name: t('backoffice.idmCatalogEditor.items.label.teppiche'),
|
|
36172
|
+
value: 21
|
|
36173
|
+
}, {
|
|
36174
|
+
name: t('backoffice.idmCatalogEditor.items.label.metrage'),
|
|
36175
|
+
value: 25
|
|
36176
|
+
}, {
|
|
36177
|
+
name: t('backoffice.idmCatalogEditor.items.label.korpuselement'),
|
|
36178
|
+
value: 1010
|
|
36179
|
+
}, {
|
|
36180
|
+
name: t('backoffice.idmCatalogEditor.items.label.schrank'),
|
|
36181
|
+
value: 1020
|
|
36182
|
+
}, {
|
|
36183
|
+
name: t('backoffice.idmCatalogEditor.items.label.vitrine'),
|
|
36184
|
+
value: 1030
|
|
36185
|
+
}, {
|
|
36186
|
+
name: t('backoffice.idmCatalogEditor.items.label.regal'),
|
|
36187
|
+
value: 1040
|
|
36188
|
+
}, {
|
|
36189
|
+
name: t('backoffice.idmCatalogEditor.items.label.highboardSideboard'),
|
|
36190
|
+
value: 1050
|
|
36191
|
+
}, {
|
|
36192
|
+
name: t('backoffice.idmCatalogEditor.items.label.tvPhonoMedienmoebel'),
|
|
36193
|
+
value: 1060
|
|
36194
|
+
}, {
|
|
36195
|
+
name: t('backoffice.idmCatalogEditor.items.label.front'),
|
|
36196
|
+
value: 1070
|
|
36197
|
+
}, {
|
|
36198
|
+
name: t('backoffice.idmCatalogEditor.items.label.regalsystemelement'),
|
|
36199
|
+
value: 1080
|
|
36200
|
+
}, {
|
|
36201
|
+
name: t('backoffice.idmCatalogEditor.items.label.konsoleKommode'),
|
|
36202
|
+
value: 1090
|
|
36203
|
+
}, {
|
|
36204
|
+
name: t('backoffice.idmCatalogEditor.items.label.couchtischBeistelltisch'),
|
|
36205
|
+
value: 1100
|
|
36206
|
+
}, {
|
|
36207
|
+
name: t('backoffice.idmCatalogEditor.items.label.esstisch'),
|
|
36208
|
+
value: 1110
|
|
36209
|
+
}, {
|
|
36210
|
+
name: t('backoffice.idmCatalogEditor.items.label.schreibtisch'),
|
|
36211
|
+
value: 1120
|
|
36212
|
+
}, {
|
|
36213
|
+
name: t('backoffice.idmCatalogEditor.items.label.sekretaer'),
|
|
36214
|
+
value: 1130
|
|
36215
|
+
}, {
|
|
36216
|
+
name: t('backoffice.idmCatalogEditor.items.label.stuhl41'),
|
|
36217
|
+
value: 1140
|
|
36218
|
+
}, {
|
|
36219
|
+
name: t('backoffice.idmCatalogEditor.items.label.hockerBarhocker'),
|
|
36220
|
+
value: 1150
|
|
36221
|
+
}, {
|
|
36222
|
+
name: t('backoffice.idmCatalogEditor.items.label.eckbankBank'),
|
|
36223
|
+
value: 1160
|
|
36224
|
+
}, {
|
|
36225
|
+
name: t('backoffice.idmCatalogEditor.items.label.kinderSpielmoebel'),
|
|
36226
|
+
value: 1170
|
|
36227
|
+
}, {
|
|
36228
|
+
name: t('backoffice.idmCatalogEditor.items.label.bett'),
|
|
36229
|
+
value: 1180
|
|
36230
|
+
}, {
|
|
36231
|
+
name: t('backoffice.idmCatalogEditor.items.label.matratzeLattenrost'),
|
|
36232
|
+
value: 1190
|
|
36233
|
+
}, {
|
|
36234
|
+
name: t('backoffice.idmCatalogEditor.items.label.nachttisch'),
|
|
36235
|
+
value: 1200
|
|
36236
|
+
}, {
|
|
36237
|
+
name: t('backoffice.idmCatalogEditor.items.label.rollStandcontainer'),
|
|
36238
|
+
value: 1210
|
|
36239
|
+
}, {
|
|
36240
|
+
name: t('backoffice.idmCatalogEditor.items.label.thekenanlagen'),
|
|
36241
|
+
value: 1220
|
|
36242
|
+
}, {
|
|
36243
|
+
name: t('backoffice.idmCatalogEditor.items.label.garderobeDielenmoebel'),
|
|
36244
|
+
value: 1230
|
|
36245
|
+
}, {
|
|
36246
|
+
name: t('backoffice.idmCatalogEditor.items.label.schuhschrank'),
|
|
36247
|
+
value: 1240
|
|
36248
|
+
}, {
|
|
36249
|
+
name: t('backoffice.idmCatalogEditor.items.label.truhen'),
|
|
36250
|
+
value: 1250
|
|
36251
|
+
}, {
|
|
36252
|
+
name: t('backoffice.idmCatalogEditor.items.label.spiegel'),
|
|
36253
|
+
value: 1260
|
|
36254
|
+
}, {
|
|
36255
|
+
name: t('backoffice.idmCatalogEditor.items.label.paneel'),
|
|
36256
|
+
value: 1270
|
|
36257
|
+
}, {
|
|
36258
|
+
name: t('backoffice.idmCatalogEditor.items.label.sockelFussgestell'),
|
|
36259
|
+
value: 1280
|
|
36260
|
+
}, {
|
|
36261
|
+
name: t('backoffice.idmCatalogEditor.items.label.abdeckplatte'),
|
|
36262
|
+
value: 1290
|
|
36263
|
+
}, {
|
|
36264
|
+
name: t('backoffice.idmCatalogEditor.items.label.kranzleiste'),
|
|
36265
|
+
value: 1300
|
|
36266
|
+
}, {
|
|
36267
|
+
name: t('backoffice.idmCatalogEditor.items.label.beleuchtung'),
|
|
36268
|
+
value: 1310
|
|
36269
|
+
}, {
|
|
36270
|
+
name: t('backoffice.idmCatalogEditor.items.label.kombinationSet'),
|
|
36271
|
+
value: 1320
|
|
36272
|
+
}, {
|
|
36273
|
+
name: t('backoffice.idmCatalogEditor.items.label.blendeAusgleichsstueck'),
|
|
36274
|
+
value: 1330
|
|
36275
|
+
}, {
|
|
36276
|
+
name: t('backoffice.idmCatalogEditor.items.label.zubehoer41'),
|
|
36277
|
+
value: 1340
|
|
36278
|
+
}, {
|
|
36279
|
+
name: t('backoffice.idmCatalogEditor.items.label.sonstige41'),
|
|
36280
|
+
value: 1350
|
|
36281
|
+
}];
|
|
36282
|
+
};
|
|
36283
|
+
|
|
36090
36284
|
/**
|
|
36091
36285
|
* Returns an array of item type class options with translated names
|
|
36092
36286
|
*
|
|
@@ -36500,8 +36694,9 @@ var TablePackages = observer(function () {
|
|
|
36500
36694
|
var _params$selectedNodes;
|
|
36501
36695
|
return (_params$selectedNodes = params.selectedNodes[0].data) !== null && _params$selectedNodes !== void 0 && _params$selectedNodes.isApi ? t('backoffice.idmEnricher.packages.download.tooltip.isApi') : undefined;
|
|
36502
36696
|
}, [t]);
|
|
36697
|
+
var canEditPackage = root.actions.userHasPermission('enricher_packages_edit');
|
|
36503
36698
|
var rowActions = useMemo(function () {
|
|
36504
|
-
return [{
|
|
36699
|
+
return [].concat(_toConsumableArray(canEditPackage ? [{
|
|
36505
36700
|
icon: getOpenIcon,
|
|
36506
36701
|
tooltip: getOpenTooltip,
|
|
36507
36702
|
action: function action(_ref3) {
|
|
@@ -36512,7 +36707,7 @@ var TablePackages = observer(function () {
|
|
|
36512
36707
|
disabled: function disabled(params) {
|
|
36513
36708
|
return !canOpen(params);
|
|
36514
36709
|
}
|
|
36515
|
-
}, {
|
|
36710
|
+
}] : []), [{
|
|
36516
36711
|
icon: /*#__PURE__*/jsx(DownloadOutlined, {}),
|
|
36517
36712
|
tooltip: getDownloadTooltip,
|
|
36518
36713
|
disabled: function disabled(params) {
|
|
@@ -36580,8 +36775,8 @@ var TablePackages = observer(function () {
|
|
|
36580
36775
|
}
|
|
36581
36776
|
return action;
|
|
36582
36777
|
}()
|
|
36583
|
-
}];
|
|
36584
|
-
}, [apiConfig.enricherService, root.dataStore.jwt, canOpen, canDownload, getOpenIcon, getOpenTooltip, getDownloadTooltip, setSelectedPackage, showLoadingModal, showErrorModal, closeModal, selectVersion, t]);
|
|
36778
|
+
}]);
|
|
36779
|
+
}, [apiConfig.enricherService, root.dataStore.jwt, canEditPackage, canOpen, canDownload, getOpenIcon, getOpenTooltip, getDownloadTooltip, setSelectedPackage, showLoadingModal, showErrorModal, closeModal, selectVersion, t]);
|
|
36585
36780
|
var apiInterface = useMemo(function () {
|
|
36586
36781
|
return {
|
|
36587
36782
|
read: apiConfig.enricherService + '/packages?organizationId=' + organizationId,
|
|
@@ -40459,6 +40654,17 @@ function IDMEnricherEditor (_ref) {
|
|
|
40459
40654
|
});
|
|
40460
40655
|
}
|
|
40461
40656
|
function Content$7() {
|
|
40657
|
+
var _useDivaCore = useDivaCore(),
|
|
40658
|
+
userHasPermission = _useDivaCore.actions.userHasPermission;
|
|
40659
|
+
if (!userHasPermission('enricher_packages_edit')) {
|
|
40660
|
+
//without the edit permission only the package overview is accessible, detail routes are blocked (also for deep links)
|
|
40661
|
+
return /*#__PURE__*/jsx(Routes, {
|
|
40662
|
+
children: /*#__PURE__*/jsx(Route, {
|
|
40663
|
+
path: "*",
|
|
40664
|
+
element: /*#__PURE__*/jsx(TablePackages, {})
|
|
40665
|
+
})
|
|
40666
|
+
});
|
|
40667
|
+
}
|
|
40462
40668
|
return /*#__PURE__*/jsxs(Routes, {
|
|
40463
40669
|
children: [/*#__PURE__*/jsx(Route, {
|
|
40464
40670
|
index: true,
|
|
@@ -41734,15 +41940,16 @@ var Catalogs = /*#__PURE__*/forwardRef(function Catalogs(_ref, ref) {
|
|
|
41734
41940
|
_id: catalog._id
|
|
41735
41941
|
};
|
|
41736
41942
|
}, [organizationId, catalog._id]);
|
|
41943
|
+
var canEditCatalog = root.actions.userHasPermission('idm_catalogs_edit');
|
|
41737
41944
|
var rowActions = useMemo(function () {
|
|
41738
41945
|
if (!setSelectedCatalog) return [];
|
|
41739
|
-
return [{
|
|
41946
|
+
return [].concat(_toConsumableArray(canEditCatalog ? [{
|
|
41740
41947
|
icon: /*#__PURE__*/jsx(EditOutlined$1, {}),
|
|
41741
41948
|
action: function action(_ref2) {
|
|
41742
41949
|
var selectedNodes = _ref2.selectedNodes;
|
|
41743
41950
|
setSelectedCatalog(selectedNodes[0].data._id, ['series'], './', true);
|
|
41744
41951
|
}
|
|
41745
|
-
}, {
|
|
41952
|
+
}] : []), [{
|
|
41746
41953
|
icon: /*#__PURE__*/jsx(DownloadOutlined$1, {}),
|
|
41747
41954
|
action: function () {
|
|
41748
41955
|
var _action = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
|
|
@@ -41842,8 +42049,8 @@ var Catalogs = /*#__PURE__*/forwardRef(function Catalogs(_ref, ref) {
|
|
|
41842
42049
|
}
|
|
41843
42050
|
return action;
|
|
41844
42051
|
}()
|
|
41845
|
-
}];
|
|
41846
|
-
}, [setSelectedCatalog, apiConfig, showLoadingModal, showErrorModal, closeModal, selectVersion, t, root.dataStore.jwt]);
|
|
42052
|
+
}]);
|
|
42053
|
+
}, [setSelectedCatalog, canEditCatalog, apiConfig, showLoadingModal, showErrorModal, closeModal, selectVersion, t, root.dataStore.jwt]);
|
|
41847
42054
|
var configuration = useMemo(function () {
|
|
41848
42055
|
var versionsBase = apiConfig.idmService + '/catalogs/${_id}/versions';
|
|
41849
42056
|
var apiInterface = {
|
|
@@ -42624,15 +42831,16 @@ var IdmCatalogs = /*#__PURE__*/forwardRef(function IdmCatalogs(_ref, ref) {
|
|
|
42624
42831
|
}
|
|
42625
42832
|
return orgPreFilter;
|
|
42626
42833
|
}, [organizationId, showApi2]);
|
|
42834
|
+
var canEditCatalog = root.actions.userHasPermission('idm_catalogs_edit');
|
|
42627
42835
|
var rowActions = useMemo(function () {
|
|
42628
42836
|
if (!setSelectedCatalog) return [];
|
|
42629
|
-
return [{
|
|
42837
|
+
return [].concat(_toConsumableArray(canEditCatalog ? [{
|
|
42630
42838
|
icon: /*#__PURE__*/jsx(EditOutlined$1, {}),
|
|
42631
42839
|
action: function action(_ref2) {
|
|
42632
42840
|
var selectedNodes = _ref2.selectedNodes;
|
|
42633
42841
|
setSelectedCatalog(selectedNodes[0].data._id, ['series'], './', true);
|
|
42634
42842
|
}
|
|
42635
|
-
}, {
|
|
42843
|
+
}] : []), [{
|
|
42636
42844
|
icon: /*#__PURE__*/jsx(DownloadOutlined$1, {}),
|
|
42637
42845
|
action: function () {
|
|
42638
42846
|
var _action = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
|
|
@@ -42732,8 +42940,8 @@ var IdmCatalogs = /*#__PURE__*/forwardRef(function IdmCatalogs(_ref, ref) {
|
|
|
42732
42940
|
}
|
|
42733
42941
|
return action;
|
|
42734
42942
|
}()
|
|
42735
|
-
}];
|
|
42736
|
-
}, [setSelectedCatalog, apiConfig, showLoadingModal, showErrorModal, closeModal, selectVersion, t, root.dataStore.jwt]);
|
|
42943
|
+
}]);
|
|
42944
|
+
}, [setSelectedCatalog, canEditCatalog, apiConfig, showLoadingModal, showErrorModal, closeModal, selectVersion, t, root.dataStore.jwt]);
|
|
42737
42945
|
var contextMenuItems = useMemo(function () {
|
|
42738
42946
|
var cloneCatalogItem = function cloneCatalogItem(_ref5) {
|
|
42739
42947
|
var selectedNodes = _ref5.selectedNodes;
|
|
@@ -43605,7 +43813,7 @@ var Items$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
43605
43813
|
cellDataType: 'number'
|
|
43606
43814
|
}, {
|
|
43607
43815
|
headerName: 'backoffice.idmCatalog.common.label.texts',
|
|
43608
|
-
children: [createTranslatedColumnConfig('shortText', 'backoffice.idmCatalog.general.label.shortText', (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds) || ['DE'], true), createTranslatedColumnConfig('fullText', 'backoffice.idmCatalog.general.label.fullText', (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds) || ['DE']), createTranslatedColumnConfig('planningAdvice', 'backoffice.idmCatalog.general.label.planningAdvice', (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds) || ['DE'])]
|
|
43816
|
+
children: [createTranslatedColumnConfig('shortText', 'backoffice.idmCatalog.general.label.shortText', (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds) || ['DE'], true, undefined, undefined, undefined, true, 30), createTranslatedColumnConfig('fullText', 'backoffice.idmCatalog.general.label.fullText', (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds) || ['DE']), createTranslatedColumnConfig('planningAdvice', 'backoffice.idmCatalog.general.label.planningAdvice', (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds) || ['DE'])]
|
|
43609
43817
|
}, {
|
|
43610
43818
|
headerName: 'backoffice.idmCatalog.items.label.articleNumbers',
|
|
43611
43819
|
children: [{
|
|
@@ -43710,7 +43918,7 @@ var Items$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
43710
43918
|
field: 'typeKey',
|
|
43711
43919
|
cellDataType: 'enum',
|
|
43712
43920
|
customParams: {
|
|
43713
|
-
enumData: getItemTypeKey(t),
|
|
43921
|
+
enumData: (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.major) === 4 ? getItemTypeKey41(t) : getItemTypeKey(t),
|
|
43714
43922
|
displayLabelTemplate: '${name} (${value})'
|
|
43715
43923
|
},
|
|
43716
43924
|
required: true
|
|
@@ -49704,23 +49912,14 @@ var TablePrices = observer(function () {
|
|
|
49704
49912
|
floatingFilter: true,
|
|
49705
49913
|
colDef: [{
|
|
49706
49914
|
field: 'itemId',
|
|
49915
|
+
headerName: 'backoffice.idmCatalog.prices.label.itemId',
|
|
49916
|
+
editable: false,
|
|
49917
|
+
initialHide: true
|
|
49918
|
+
}, {
|
|
49919
|
+
field: 'typeNo',
|
|
49707
49920
|
headerName: 'backoffice.idmCatalog.prices.label.typeNo',
|
|
49708
|
-
cellDataType: 'lookup',
|
|
49709
|
-
customParams: {
|
|
49710
|
-
nameField: 'typeNo',
|
|
49711
|
-
filterCellType: 'objectId',
|
|
49712
|
-
displayLabelTemplate: '${name} (${value})',
|
|
49713
|
-
apiInterface: {
|
|
49714
|
-
read: apiConfig.idmService + '/catalogs/${catalogId}/series/${serieId}/items'
|
|
49715
|
-
},
|
|
49716
|
-
lookupValue: 'typeNo',
|
|
49717
|
-
lookupKey: '_id',
|
|
49718
|
-
multiple: false,
|
|
49719
|
-
translated: false
|
|
49720
|
-
},
|
|
49721
|
-
additionalFields: ['typeNo'],
|
|
49722
49921
|
editable: false
|
|
49723
|
-
}, createTranslatedColumnConfig('typeNoDisplayText', 'backoffice.idmCatalog.
|
|
49922
|
+
}, createTranslatedColumnConfig('typeNoDisplayText', 'backoffice.idmCatalog.prices.label.shortText', (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds) || ['DE'], false, undefined, undefined, undefined, false), createTranslatedColumnConfig('typeNoFullText', 'backoffice.idmCatalog.prices.label.fullText', (selectedCatalog === null || selectedCatalog === void 0 ? void 0 : selectedCatalog.isoLanguageIds) || ['DE'], false, undefined, undefined, undefined, false), {
|
|
49724
49923
|
field: 'partListExclusive',
|
|
49725
49924
|
headerName: 'backoffice.idmCatalog.prices.label.partListExclusive',
|
|
49726
49925
|
editable: false,
|
|
@@ -50016,6 +50215,17 @@ function IDMCatalogEditor (_ref) {
|
|
|
50016
50215
|
});
|
|
50017
50216
|
}
|
|
50018
50217
|
function Content$6() {
|
|
50218
|
+
var _useDivaCore = useDivaCore(),
|
|
50219
|
+
userHasPermission = _useDivaCore.actions.userHasPermission;
|
|
50220
|
+
if (!userHasPermission('idm_catalogs_edit')) {
|
|
50221
|
+
//without the edit permission only the catalog overview is accessible, detail routes are blocked (also for deep links)
|
|
50222
|
+
return /*#__PURE__*/jsx(Routes, {
|
|
50223
|
+
children: /*#__PURE__*/jsx(Route, {
|
|
50224
|
+
path: "*",
|
|
50225
|
+
element: /*#__PURE__*/jsx(TableCatalogs, {})
|
|
50226
|
+
})
|
|
50227
|
+
});
|
|
50228
|
+
}
|
|
50019
50229
|
return /*#__PURE__*/jsxs(Routes, {
|
|
50020
50230
|
children: [/*#__PURE__*/jsx(Route, {
|
|
50021
50231
|
index: true,
|