@crystaldesign/diva-backoffice 25.1.0-beta.39 → 25.1.0-beta.40
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 +1112 -348
- package/build/types/backoffice/src/layout/Navigation/types.d.ts +1 -0
- package/build/types/backoffice/src/layout/Navigation/types.d.ts.map +1 -1
- package/build/types/backoffice/src/layout/Toolbar/index.d.ts.map +1 -1
- package/build/types/backoffice/src/store/ToolBarStore.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/OptionCombinations.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupFinishes.d.ts +10 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupFinishes.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupPercentageSurcharge.d.ts +10 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/Tables/PriceFeatureGroupPercentageSurcharge.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/{CatalogSelector/index.d.ts → PrefilterSelectors/CatalogSelector.d.ts} +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/CatalogSelector.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/FeatureSelector.d.ts +10 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/FeatureSelector.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/SeriesSelector.d.ts +11 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelectors/SeriesSelector.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableItems/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TableOptions/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePriceFeatureGroups/index.d.ts +3 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePriceFeatureGroups/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePrices/index.d.ts +3 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePrices/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCatalogEditor/useModule.d.ts.map +1 -1
- package/package.json +9 -9
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/CatalogSelector/index.d.ts.map +0 -1
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelector/index.d.ts +0 -11
- package/build/types/backoffice/src/ui/IDMCatalogEditor/components/PrefilterSelector/index.d.ts.map +0 -1
package/build/esm/index.js
CHANGED
|
@@ -150,8 +150,8 @@ import PushpinOutlined from '@ant-design/icons/lib/icons/PushpinOutlined';
|
|
|
150
150
|
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; } } }; }
|
|
151
151
|
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; } }
|
|
152
152
|
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; }
|
|
153
|
-
function ownKeys$
|
|
154
|
-
function _objectSpread$
|
|
153
|
+
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; }
|
|
154
|
+
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; }
|
|
155
155
|
var LOG$e = getLogger('Backoffice', 'ApplyMapping');
|
|
156
156
|
function applyMapping (_ref) {
|
|
157
157
|
var mappable = _ref.mappable,
|
|
@@ -172,10 +172,10 @@ function applyMapping (_ref) {
|
|
|
172
172
|
var newValue = {};
|
|
173
173
|
newValue[newKey] = valueToAdd;
|
|
174
174
|
if ((startValue === null || startValue === void 0 ? void 0 : startValue[newKey]) != undefined) {
|
|
175
|
-
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$
|
|
175
|
+
if (_typeof(startValue[newKey]) == 'object') startValue[newKey] = _objectSpread$Q(_objectSpread$Q({}, startValue[newKey]), valueToAdd);else startValue[newKey] = type == 'addToSourceValue' ? startValue[newKey] + valueToAdd : valueToAdd;
|
|
176
176
|
return startValue;
|
|
177
177
|
}
|
|
178
|
-
if (newIdx == 1) return _objectSpread$
|
|
178
|
+
if (newIdx == 1) return _objectSpread$Q(_objectSpread$Q({}, startValue), newValue);
|
|
179
179
|
return _getTarget(idx + 1, keys, startValue, newValue);
|
|
180
180
|
};
|
|
181
181
|
returnValue = _getTarget(0, key.split('.'), returnValue, value);
|
|
@@ -476,8 +476,8 @@ function getLeafColumns(columns) {
|
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
-
function ownKeys$
|
|
480
|
-
function _objectSpread$
|
|
479
|
+
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; }
|
|
480
|
+
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; }
|
|
481
481
|
var LOG$d = getLogger('Backoffice', 'ApiHandler');
|
|
482
482
|
var jp = require('jsonpath');
|
|
483
483
|
var _default$d = /*#__PURE__*/function () {
|
|
@@ -656,7 +656,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
656
656
|
_context2.next = 20;
|
|
657
657
|
return fetch(finalUrl, {
|
|
658
658
|
method: this._updateMethod,
|
|
659
|
-
headers: _objectSpread$
|
|
659
|
+
headers: _objectSpread$P(_objectSpread$P({}, jwt ? {
|
|
660
660
|
Authorization: 'Bearer ' + jwt
|
|
661
661
|
} : {}), {}, {
|
|
662
662
|
'Content-Type': 'application/json'
|
|
@@ -749,7 +749,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
749
749
|
rootStore: this._rootStore,
|
|
750
750
|
fallBackToParams: true
|
|
751
751
|
});
|
|
752
|
-
if (data) createData = _objectSpread$
|
|
752
|
+
if (data) createData = _objectSpread$P({}, data);
|
|
753
753
|
} else if (data !== undefined) {
|
|
754
754
|
createData = applyMapping({
|
|
755
755
|
mappable: data,
|
|
@@ -1011,7 +1011,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1011
1011
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1012
1012
|
case 2:
|
|
1013
1013
|
jwt = (_this$_rootStore5 = this._rootStore) === null || _this$_rootStore5 === void 0 ? void 0 : _this$_rootStore5.dataStore.jwt;
|
|
1014
|
-
url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1014
|
+
url = filterServerSide ? parseServersideFilters(_objectSpread$P(_objectSpread$P({}, filterServerSide), {}, {
|
|
1015
1015
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1016
1016
|
baseUrl: this._readListUrl,
|
|
1017
1017
|
prefilter: prefilter
|
|
@@ -1031,7 +1031,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1031
1031
|
});
|
|
1032
1032
|
case 6:
|
|
1033
1033
|
response = _context8.sent;
|
|
1034
|
-
return _context8.abrupt("return", _objectSpread$
|
|
1034
|
+
return _context8.abrupt("return", _objectSpread$P(_objectSpread$P({}, response), {}, {
|
|
1035
1035
|
data: response.data.map(function (d) {
|
|
1036
1036
|
return _this2.aplyJsonPath(d, _this2._readJsonPath);
|
|
1037
1037
|
})
|
|
@@ -1055,7 +1055,7 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1055
1055
|
throw new Error('Read List endpoint is missing in configuration.');
|
|
1056
1056
|
}
|
|
1057
1057
|
(_this$_rootStore6 = this._rootStore) === null || _this$_rootStore6 === void 0 ? void 0 : _this$_rootStore6.dataStore.jwt;
|
|
1058
|
-
var url = filterServerSide ? parseServersideFilters(_objectSpread$
|
|
1058
|
+
var url = filterServerSide ? parseServersideFilters(_objectSpread$P(_objectSpread$P({}, filterServerSide), {}, {
|
|
1059
1059
|
columns: this._filterFields ? filterServerSide.columns : undefined,
|
|
1060
1060
|
baseUrl: this._readListUrl,
|
|
1061
1061
|
prefilter: prefilter
|
|
@@ -1262,8 +1262,8 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1262
1262
|
}]);
|
|
1263
1263
|
}(_default$d);
|
|
1264
1264
|
|
|
1265
|
-
function ownKeys$
|
|
1266
|
-
function _objectSpread$
|
|
1265
|
+
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; }
|
|
1266
|
+
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; }
|
|
1267
1267
|
function _callSuper$5(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1268
1268
|
function _isNativeReflectConstruct$5() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1269
1269
|
var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
@@ -1362,7 +1362,7 @@ var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1362
1362
|
_context2.next = 5;
|
|
1363
1363
|
return fetch(this._createUrl + '?ref=true', {
|
|
1364
1364
|
method: this._createMethod,
|
|
1365
|
-
headers: _objectSpread$
|
|
1365
|
+
headers: _objectSpread$O({}, jwt ? {
|
|
1366
1366
|
Authorization: 'Bearer ' + jwt
|
|
1367
1367
|
} : {}),
|
|
1368
1368
|
body: data
|
|
@@ -1740,8 +1740,8 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1740
1740
|
}]);
|
|
1741
1741
|
}(_default$d);
|
|
1742
1742
|
|
|
1743
|
-
function ownKeys$
|
|
1744
|
-
function _objectSpread$
|
|
1743
|
+
function ownKeys$N(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1744
|
+
function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$N(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$N(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1745
1745
|
var _default$7 = /*#__PURE__*/function () {
|
|
1746
1746
|
function _default(root) {
|
|
1747
1747
|
_classCallCheck(this, _default);
|
|
@@ -1777,7 +1777,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1777
1777
|
var _i$permission;
|
|
1778
1778
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
1779
1779
|
});
|
|
1780
|
-
config = _objectSpread$
|
|
1780
|
+
config = _objectSpread$N(_objectSpread$N({}, config), {}, {
|
|
1781
1781
|
items: filteredItems
|
|
1782
1782
|
});
|
|
1783
1783
|
}
|
|
@@ -13062,11 +13062,15 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
13062
13062
|
}, {
|
|
13063
13063
|
key: "openTool",
|
|
13064
13064
|
value: function openTool(toolId) {
|
|
13065
|
-
|
|
13066
|
-
this._currentLanguage = this.defaultLanguage;
|
|
13065
|
+
// Only allow opening enabled tools
|
|
13067
13066
|
var tool = this._tools.find(function (t) {
|
|
13068
13067
|
return t.id === toolId;
|
|
13069
13068
|
});
|
|
13069
|
+
if (tool !== null && tool !== void 0 && tool.disabled) {
|
|
13070
|
+
return;
|
|
13071
|
+
}
|
|
13072
|
+
this._openedToolId = toolId;
|
|
13073
|
+
this._currentLanguage = this.defaultLanguage;
|
|
13070
13074
|
if (tool) {
|
|
13071
13075
|
var _tool$startWidth;
|
|
13072
13076
|
this._width = Math.max((_tool$startWidth = tool.startWidth) !== null && _tool$startWidth !== void 0 ? _tool$startWidth : DEFAULT_WIDTH, this._width);
|
|
@@ -13136,8 +13140,8 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
13136
13140
|
}]);
|
|
13137
13141
|
}();
|
|
13138
13142
|
|
|
13139
|
-
function ownKeys$
|
|
13140
|
-
function _objectSpread$
|
|
13143
|
+
function ownKeys$M(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13144
|
+
function _objectSpread$M(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$M(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$M(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13141
13145
|
var _default$6 = /*#__PURE__*/function () {
|
|
13142
13146
|
function _default(root) {
|
|
13143
13147
|
_classCallCheck(this, _default);
|
|
@@ -13214,7 +13218,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13214
13218
|
if (index >= 0) {
|
|
13215
13219
|
this._additionalMenuElements[index] = {
|
|
13216
13220
|
key: key,
|
|
13217
|
-
element: _objectSpread$
|
|
13221
|
+
element: _objectSpread$M(_objectSpread$M({}, this._additionalMenuElements[index].element), {}, {
|
|
13218
13222
|
items: items,
|
|
13219
13223
|
selected: selected
|
|
13220
13224
|
})
|
|
@@ -13265,7 +13269,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13265
13269
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
13266
13270
|
this.root.navigate('/' + path);
|
|
13267
13271
|
}
|
|
13268
|
-
this._menuElement1 = _objectSpread$
|
|
13272
|
+
this._menuElement1 = _objectSpread$M(_objectSpread$M({}, this.menuElement1), {}, {
|
|
13269
13273
|
selected: this._selectedMenuKeys[0]
|
|
13270
13274
|
});
|
|
13271
13275
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -13509,7 +13513,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13509
13513
|
return items.filter(function (item) {
|
|
13510
13514
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
13511
13515
|
}).map(function (item) {
|
|
13512
|
-
return _objectSpread$
|
|
13516
|
+
return _objectSpread$M(_objectSpread$M({}, item), {}, {
|
|
13513
13517
|
items: item.items ? _this4.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
13514
13518
|
subMenu: item.subMenu ? _this4.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
13515
13519
|
});
|
|
@@ -15248,8 +15252,8 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
15248
15252
|
}]);
|
|
15249
15253
|
}();
|
|
15250
15254
|
|
|
15251
|
-
function ownKeys$
|
|
15252
|
-
function _objectSpread$
|
|
15255
|
+
function ownKeys$L(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15256
|
+
function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$L(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$L(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15253
15257
|
function _createForOfIteratorHelper$j(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$j(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
15254
15258
|
function _unsupportedIterableToArray$j(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$j(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$j(r, a) : void 0; } }
|
|
15255
15259
|
function _arrayLikeToArray$j(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -15371,7 +15375,7 @@ function useFormData (_ref) {
|
|
|
15371
15375
|
multipleEditingData = inboundData;
|
|
15372
15376
|
}
|
|
15373
15377
|
return {
|
|
15374
|
-
loadedData: _onLoadFields(_objectSpread$
|
|
15378
|
+
loadedData: _onLoadFields(_objectSpread$L({}, dt)),
|
|
15375
15379
|
multipleEditingData: multipleEditingData
|
|
15376
15380
|
};
|
|
15377
15381
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -15408,7 +15412,7 @@ function useFormData (_ref) {
|
|
|
15408
15412
|
setFieldErrors = _useState20[1];
|
|
15409
15413
|
useEffect(function () {
|
|
15410
15414
|
var _loadedData$_id2;
|
|
15411
|
-
setState(_objectSpread$
|
|
15415
|
+
setState(_objectSpread$L(_objectSpread$L({}, state), {}, {
|
|
15412
15416
|
data: loadedData,
|
|
15413
15417
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
15414
15418
|
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),
|
|
@@ -15510,7 +15514,7 @@ function useFormData (_ref) {
|
|
|
15510
15514
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
15511
15515
|
while (1) switch (_context2.prev = _context2.next) {
|
|
15512
15516
|
case 0:
|
|
15513
|
-
newData = merge(_objectSpread$
|
|
15517
|
+
newData = merge(_objectSpread$L({}, state.data), values);
|
|
15514
15518
|
if (!skipApi) {
|
|
15515
15519
|
_context2.next = 3;
|
|
15516
15520
|
break;
|
|
@@ -15520,7 +15524,7 @@ function useFormData (_ref) {
|
|
|
15520
15524
|
root.actions.toggleLoading('saving_form');
|
|
15521
15525
|
_context2.prev = 4;
|
|
15522
15526
|
_context2.next = 7;
|
|
15523
|
-
return setDynamicFields(_objectSpread$
|
|
15527
|
+
return setDynamicFields(_objectSpread$L({}, state.data), newData);
|
|
15524
15528
|
case 7:
|
|
15525
15529
|
newData = _context2.sent;
|
|
15526
15530
|
_context2.next = 10;
|
|
@@ -15535,7 +15539,7 @@ function useFormData (_ref) {
|
|
|
15535
15539
|
root.actions.toggleLoading('saving_form');
|
|
15536
15540
|
throw _context2.t0;
|
|
15537
15541
|
case 17:
|
|
15538
|
-
setState(_objectSpread$
|
|
15542
|
+
setState(_objectSpread$L(_objectSpread$L({}, state), {}, {
|
|
15539
15543
|
loading: true
|
|
15540
15544
|
}));
|
|
15541
15545
|
finalData = state.data;
|
|
@@ -15588,14 +15592,14 @@ function useFormData (_ref) {
|
|
|
15588
15592
|
_context2.next = 47;
|
|
15589
15593
|
break;
|
|
15590
15594
|
}
|
|
15591
|
-
setFieldErrors(_objectSpread$
|
|
15595
|
+
setFieldErrors(_objectSpread$L(_objectSpread$L({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
15592
15596
|
return _context2.abrupt("return", undefined);
|
|
15593
15597
|
case 47:
|
|
15594
15598
|
throw _context2.t1;
|
|
15595
15599
|
case 48:
|
|
15596
15600
|
_context2.prev = 48;
|
|
15597
15601
|
root.actions.toggleLoading('saving_form');
|
|
15598
|
-
setState(_objectSpread$
|
|
15602
|
+
setState(_objectSpread$L(_objectSpread$L({}, state), {}, {
|
|
15599
15603
|
data: finalData,
|
|
15600
15604
|
loading: false
|
|
15601
15605
|
}));
|
|
@@ -15625,7 +15629,7 @@ function useFormData (_ref) {
|
|
|
15625
15629
|
}
|
|
15626
15630
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
15627
15631
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
15628
|
-
var wholeData = Object.assign(_objectSpread$
|
|
15632
|
+
var wholeData = Object.assign(_objectSpread$L({}, state.data), _objectSpread$L({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
15629
15633
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
15630
15634
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
15631
15635
|
setHiddenRequiredDisabled(newState);
|
|
@@ -15638,14 +15642,14 @@ function useFormData (_ref) {
|
|
|
15638
15642
|
}
|
|
15639
15643
|
};
|
|
15640
15644
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
15641
|
-
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$
|
|
15645
|
+
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$L({}, state.data), state.form.getFieldsValue(), mergeCustomizer);
|
|
15642
15646
|
if (id) {
|
|
15643
15647
|
setFieldInObject(id, data, value);
|
|
15644
|
-
var newFieldErrors = _objectSpread$
|
|
15648
|
+
var newFieldErrors = _objectSpread$L({}, fieldErrors);
|
|
15645
15649
|
delete newFieldErrors[id.toString()];
|
|
15646
15650
|
setFieldErrors(newFieldErrors);
|
|
15647
15651
|
}
|
|
15648
|
-
setState(_objectSpread$
|
|
15652
|
+
setState(_objectSpread$L(_objectSpread$L({}, state), {}, {
|
|
15649
15653
|
data: data
|
|
15650
15654
|
}));
|
|
15651
15655
|
return data;
|
|
@@ -15677,12 +15681,12 @@ function useFormData (_ref) {
|
|
|
15677
15681
|
var _value$value;
|
|
15678
15682
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
15679
15683
|
if (configuration.itemSelectorReset) {
|
|
15680
|
-
setState(_objectSpread$
|
|
15684
|
+
setState(_objectSpread$L(_objectSpread$L({}, state), {}, {
|
|
15681
15685
|
data: _defineProperty({}, name, val)
|
|
15682
15686
|
}));
|
|
15683
15687
|
} else {
|
|
15684
|
-
setState(_objectSpread$
|
|
15685
|
-
data: _objectSpread$
|
|
15688
|
+
setState(_objectSpread$L(_objectSpread$L({}, state), {}, {
|
|
15689
|
+
data: _objectSpread$L(_objectSpread$L({}, state.data), {}, _defineProperty({}, name, val))
|
|
15686
15690
|
}));
|
|
15687
15691
|
}
|
|
15688
15692
|
setSelectedItemsIndex(idx);
|
|
@@ -15692,12 +15696,12 @@ function useFormData (_ref) {
|
|
|
15692
15696
|
var val = _ref6.value;
|
|
15693
15697
|
if (value === val) {
|
|
15694
15698
|
if (configuration.itemSelectorReset) {
|
|
15695
|
-
setState(_objectSpread$
|
|
15699
|
+
setState(_objectSpread$L(_objectSpread$L({}, state), {}, {
|
|
15696
15700
|
data: _defineProperty({}, name, val)
|
|
15697
15701
|
}));
|
|
15698
15702
|
} else {
|
|
15699
|
-
setState(_objectSpread$
|
|
15700
|
-
data: _objectSpread$
|
|
15703
|
+
setState(_objectSpread$L(_objectSpread$L({}, state), {}, {
|
|
15704
|
+
data: _objectSpread$L(_objectSpread$L({}, state.data), {}, _defineProperty({}, name, val))
|
|
15701
15705
|
}));
|
|
15702
15706
|
}
|
|
15703
15707
|
setSelectedItemsIndex(idx);
|
|
@@ -15978,7 +15982,7 @@ function useFormData (_ref) {
|
|
|
15978
15982
|
for (var i = 0; i < configuration.tools.length; i++) {
|
|
15979
15983
|
var _tool$defaultOpen;
|
|
15980
15984
|
var tool = configuration.tools[i];
|
|
15981
|
-
tools.push(_objectSpread$
|
|
15985
|
+
tools.push(_objectSpread$L(_objectSpread$L({}, tool), {}, {
|
|
15982
15986
|
parameters: {
|
|
15983
15987
|
data: state.data
|
|
15984
15988
|
},
|
|
@@ -16080,7 +16084,7 @@ function useFormData (_ref) {
|
|
|
16080
16084
|
})) return;
|
|
16081
16085
|
setRemovedMedias([].concat(_toConsumableArray(removedMedias), [media]));
|
|
16082
16086
|
};
|
|
16083
|
-
return _objectSpread$
|
|
16087
|
+
return _objectSpread$L(_objectSpread$L({}, state), {}, {
|
|
16084
16088
|
getIsHidden: getIsHidden,
|
|
16085
16089
|
setUsedPreset: setUsedPreset,
|
|
16086
16090
|
configuration: configuration,
|
|
@@ -16197,8 +16201,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
16197
16201
|
};
|
|
16198
16202
|
|
|
16199
16203
|
var _excluded$3 = ["key", "name"];
|
|
16200
|
-
function ownKeys$
|
|
16201
|
-
function _objectSpread$
|
|
16204
|
+
function ownKeys$K(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16205
|
+
function _objectSpread$K(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$K(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$K(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16202
16206
|
var FormList$2 = function FormList(_ref) {
|
|
16203
16207
|
var _item$initialValue;
|
|
16204
16208
|
var value = _ref.value,
|
|
@@ -16251,7 +16255,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
16251
16255
|
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
16252
16256
|
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
16253
16257
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
16254
|
-
return /*#__PURE__*/createElement(Form$1.Item, _objectSpread$
|
|
16258
|
+
return /*#__PURE__*/createElement(Form$1.Item, _objectSpread$K(_objectSpread$K({}, restField), {}, {
|
|
16255
16259
|
id: n.join(),
|
|
16256
16260
|
key: n.join(),
|
|
16257
16261
|
name: n,
|
|
@@ -16263,7 +16267,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
16263
16267
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
16264
16268
|
help: state.fieldErrors[n.toString()],
|
|
16265
16269
|
hidden: hidden
|
|
16266
|
-
}), getElement(_objectSpread$
|
|
16270
|
+
}), getElement(_objectSpread$K(_objectSpread$K({}, i), {}, {
|
|
16267
16271
|
name: n
|
|
16268
16272
|
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
16269
16273
|
})
|
|
@@ -16496,8 +16500,8 @@ var buttonGroup = "button-group-GYt-T";
|
|
|
16496
16500
|
var css_248z$n = ".wrapper-GVe2h {\n display: flex;\n flex-direction: row;\n gap: 12px;\n}\n\n.button-group-GYt-T {\n display: flex;\n flex-direction: row;\n gap: 12px;\n margin: 0 12px;\n}\n";
|
|
16497
16501
|
styleInject(css_248z$n);
|
|
16498
16502
|
|
|
16499
|
-
function ownKeys$
|
|
16500
|
-
function _objectSpread$
|
|
16503
|
+
function ownKeys$J(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16504
|
+
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$J(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$J(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16501
16505
|
var SubTitle = function SubTitle(_ref) {
|
|
16502
16506
|
var _item$orientation, _item$buttonIds;
|
|
16503
16507
|
var item = _ref.item,
|
|
@@ -16506,7 +16510,7 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
16506
16510
|
t = _useTranslation.t;
|
|
16507
16511
|
return /*#__PURE__*/jsx(Divider, {
|
|
16508
16512
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
16509
|
-
style: _objectSpread$
|
|
16513
|
+
style: _objectSpread$J({}, item.style),
|
|
16510
16514
|
children: /*#__PURE__*/jsxs("div", {
|
|
16511
16515
|
className: wrapper$5,
|
|
16512
16516
|
children: [Array.isArray(item.name) ? t(item.name[0].toString()) : t(item.name), ((_item$buttonIds = item.buttonIds) === null || _item$buttonIds === void 0 ? void 0 : _item$buttonIds.length) && item.buttonIds.map(function (b) {
|
|
@@ -16756,8 +16760,8 @@ var css_248z$m = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\
|
|
|
16756
16760
|
styleInject(css_248z$m);
|
|
16757
16761
|
|
|
16758
16762
|
var _excluded$2 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title"];
|
|
16759
|
-
function ownKeys$
|
|
16760
|
-
function _objectSpread$
|
|
16763
|
+
function ownKeys$I(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16764
|
+
function _objectSpread$I(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$I(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$I(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16761
16765
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
16762
16766
|
var apiInterface = _ref.apiInterface,
|
|
16763
16767
|
selectMapping = _ref.selectMapping,
|
|
@@ -16782,7 +16786,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
|
16782
16786
|
return /*#__PURE__*/jsxs("div", {
|
|
16783
16787
|
ref: ref,
|
|
16784
16788
|
className: classnames(title ? wrapper$4 : undefined),
|
|
16785
|
-
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$
|
|
16789
|
+
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$I(_objectSpread$I({}, selectProps), {}, {
|
|
16786
16790
|
showSearch: search,
|
|
16787
16791
|
loading: state.loading,
|
|
16788
16792
|
options: state.options,
|
|
@@ -17399,8 +17403,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
17399
17403
|
}]);
|
|
17400
17404
|
}(_default$d);
|
|
17401
17405
|
|
|
17402
|
-
function ownKeys$
|
|
17403
|
-
function _objectSpread$
|
|
17406
|
+
function ownKeys$H(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17407
|
+
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$H(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$H(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17404
17408
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
17405
17409
|
function useSelectClientRelationCatalog (_ref) {
|
|
17406
17410
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -17569,7 +17573,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
17569
17573
|
case 22:
|
|
17570
17574
|
supplierData = _context2.sent;
|
|
17571
17575
|
case 23:
|
|
17572
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
17576
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$H(_objectSpread$H({}, _selectedSupplier), {}, {
|
|
17573
17577
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
17574
17578
|
}), supplierData);
|
|
17575
17579
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -17790,8 +17794,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
17790
17794
|
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; } } }; }
|
|
17791
17795
|
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; } }
|
|
17792
17796
|
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; }
|
|
17793
|
-
function ownKeys$
|
|
17794
|
-
function _objectSpread$
|
|
17797
|
+
function ownKeys$G(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17798
|
+
function _objectSpread$G(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$G(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$G(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17795
17799
|
function useSelectData (_ref) {
|
|
17796
17800
|
var data = _ref.data,
|
|
17797
17801
|
onChange = _ref.onChange,
|
|
@@ -17974,7 +17978,7 @@ function useSelectData (_ref) {
|
|
|
17974
17978
|
setFetching(true);
|
|
17975
17979
|
serverSideParams = {
|
|
17976
17980
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
17977
|
-
return _objectSpread$
|
|
17981
|
+
return _objectSpread$G(_objectSpread$G({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
17978
17982
|
}, {}) : {
|
|
17979
17983
|
_id: [value, 'contains']
|
|
17980
17984
|
},
|
|
@@ -18266,8 +18270,8 @@ var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
|
18266
18270
|
var css_248z$j = ".wrapper-WStAk {\n display: flex;\n flex-direction: column;\n}\n.header-wrapper-gWQuH {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-left: 64px;\n}\n\n.buttons-wrapper-7ebR9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-grow: 1;\n}\n";
|
|
18267
18271
|
styleInject(css_248z$j);
|
|
18268
18272
|
|
|
18269
|
-
function ownKeys$
|
|
18270
|
-
function _objectSpread$
|
|
18273
|
+
function ownKeys$F(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18274
|
+
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$F(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$F(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18271
18275
|
var LOG$9 = getLogger('Backoffice', 'Translation Form');
|
|
18272
18276
|
function useTranslationHook (item, state) {
|
|
18273
18277
|
var root = useStore();
|
|
@@ -18400,7 +18404,7 @@ function useTranslationHook (item, state) {
|
|
|
18400
18404
|
case 0:
|
|
18401
18405
|
_context2.next = 2;
|
|
18402
18406
|
return apiHandler.create({
|
|
18403
|
-
locales: _objectSpread$
|
|
18407
|
+
locales: _objectSpread$F({
|
|
18404
18408
|
de: {},
|
|
18405
18409
|
it: {},
|
|
18406
18410
|
fr: {},
|
|
@@ -18449,8 +18453,8 @@ function useTranslationHook (item, state) {
|
|
|
18449
18453
|
};
|
|
18450
18454
|
}
|
|
18451
18455
|
|
|
18452
|
-
function ownKeys$
|
|
18453
|
-
function _objectSpread$
|
|
18456
|
+
function ownKeys$E(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18457
|
+
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$E(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$E(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18454
18458
|
var Translation = function Translation(_ref) {
|
|
18455
18459
|
var item = _ref.item,
|
|
18456
18460
|
state = _ref.state,
|
|
@@ -18500,7 +18504,7 @@ var Translation = function Translation(_ref) {
|
|
|
18500
18504
|
var hidden = state.getIsHidden(i, data);
|
|
18501
18505
|
var newAbsoluteName = absoluteName !== '' ? [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n)) : n;
|
|
18502
18506
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
18503
|
-
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$
|
|
18507
|
+
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$E(_objectSpread$E({}, i), {}, {
|
|
18504
18508
|
name: n
|
|
18505
18509
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden, currentLang) : /*#__PURE__*/jsx(Form$1.Item, {
|
|
18506
18510
|
id: idx.toString(),
|
|
@@ -18513,7 +18517,7 @@ var Translation = function Translation(_ref) {
|
|
|
18513
18517
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
18514
18518
|
help: state.fieldErrors[n.toString()],
|
|
18515
18519
|
hidden: hidden,
|
|
18516
|
-
children: getElement(_objectSpread$
|
|
18520
|
+
children: getElement(_objectSpread$E(_objectSpread$E({}, i), {}, {
|
|
18517
18521
|
name: n
|
|
18518
18522
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden)
|
|
18519
18523
|
})
|
|
@@ -18848,8 +18852,8 @@ var Text$1 = observer(Text);
|
|
|
18848
18852
|
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; } } }; }
|
|
18849
18853
|
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; } }
|
|
18850
18854
|
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; }
|
|
18851
|
-
function ownKeys$
|
|
18852
|
-
function _objectSpread$
|
|
18855
|
+
function ownKeys$D(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18856
|
+
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$D(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$D(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18853
18857
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
|
|
18854
18858
|
var _isReadonly, _state$hiddenRequired;
|
|
18855
18859
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -18884,7 +18888,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
18884
18888
|
}
|
|
18885
18889
|
});
|
|
18886
18890
|
case 'selectSimple':
|
|
18887
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
18891
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$D(_objectSpread$D({}, item), {}, {
|
|
18888
18892
|
disabled: disabled,
|
|
18889
18893
|
onChange: function onChange(value) {
|
|
18890
18894
|
_onChange(absoluteName, value);
|
|
@@ -19088,7 +19092,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
19088
19092
|
value: item.value,
|
|
19089
19093
|
options: item.options.map(function (o) {
|
|
19090
19094
|
var _o$disabled;
|
|
19091
|
-
return _objectSpread$
|
|
19095
|
+
return _objectSpread$D(_objectSpread$D({}, o), {}, {
|
|
19092
19096
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, state.data)
|
|
19093
19097
|
});
|
|
19094
19098
|
}),
|
|
@@ -19109,7 +19113,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
19109
19113
|
},
|
|
19110
19114
|
icon: item.icon,
|
|
19111
19115
|
callback: function callback(data) {
|
|
19112
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
19116
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$D(_objectSpread$D({}, state.data), data));
|
|
19113
19117
|
}
|
|
19114
19118
|
});
|
|
19115
19119
|
case 'media':
|
|
@@ -19130,7 +19134,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
19130
19134
|
var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
19131
19135
|
var _useTranslation = useTranslation(),
|
|
19132
19136
|
t = _useTranslation.t;
|
|
19133
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
19137
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$D(_objectSpread$D({}, props), {}, {
|
|
19134
19138
|
ref: ref,
|
|
19135
19139
|
disabled: true,
|
|
19136
19140
|
value: t(props.translationPrefix + '.' + props.value)
|
|
@@ -19149,8 +19153,8 @@ function isReadonly(item, data) {
|
|
|
19149
19153
|
return false;
|
|
19150
19154
|
}
|
|
19151
19155
|
|
|
19152
|
-
function ownKeys$
|
|
19153
|
-
function _objectSpread$
|
|
19156
|
+
function ownKeys$C(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19157
|
+
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$C(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$C(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19154
19158
|
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; } } }; }
|
|
19155
19159
|
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; } }
|
|
19156
19160
|
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; }
|
|
@@ -19200,13 +19204,13 @@ var Presets = function Presets(_ref) {
|
|
|
19200
19204
|
} finally {
|
|
19201
19205
|
_iterator.f();
|
|
19202
19206
|
}
|
|
19203
|
-
var data = _objectSpread$
|
|
19207
|
+
var data = _objectSpread$C(_objectSpread$C({}, form.getFieldsValue(names)), {}, {
|
|
19204
19208
|
newPresetName: newPresetName
|
|
19205
19209
|
});
|
|
19206
19210
|
data.dpi = parseInt(data.dpi);
|
|
19207
19211
|
data.organization = root.getGlobalValue('organizationId');
|
|
19208
19212
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
19209
|
-
var dt = _objectSpread$
|
|
19213
|
+
var dt = _objectSpread$C(_objectSpread$C({}, form.getFieldsValue(names)), {}, {
|
|
19210
19214
|
name: newPresetName
|
|
19211
19215
|
});
|
|
19212
19216
|
setPresets({
|
|
@@ -19548,8 +19552,8 @@ function getLabel(item, t) {
|
|
|
19548
19552
|
}
|
|
19549
19553
|
var Form = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
19550
19554
|
|
|
19551
|
-
function ownKeys$
|
|
19552
|
-
function _objectSpread$
|
|
19555
|
+
function ownKeys$B(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19556
|
+
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$B(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19553
19557
|
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; } } }; }
|
|
19554
19558
|
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; } }
|
|
19555
19559
|
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; }
|
|
@@ -19751,7 +19755,7 @@ function useRoleSelectorData (_ref) {
|
|
|
19751
19755
|
roles.forEach(function (r) {
|
|
19752
19756
|
//check if after the changes the role is selected
|
|
19753
19757
|
if (value.includes(r._id)) {
|
|
19754
|
-
var newValue = _objectSpread$
|
|
19758
|
+
var newValue = _objectSpread$B(_objectSpread$B({}, r), {}, {
|
|
19755
19759
|
selected: true
|
|
19756
19760
|
});
|
|
19757
19761
|
//add it to the new list as selected role
|
|
@@ -19787,7 +19791,7 @@ function useRoleSelectorData (_ref) {
|
|
|
19787
19791
|
}
|
|
19788
19792
|
}
|
|
19789
19793
|
} else {
|
|
19790
|
-
var _newValue = _objectSpread$
|
|
19794
|
+
var _newValue = _objectSpread$B(_objectSpread$B({}, r), {}, {
|
|
19791
19795
|
selected: false
|
|
19792
19796
|
});
|
|
19793
19797
|
//add it to the new list as unselected role
|
|
@@ -19991,7 +19995,7 @@ function _updateRoles() {
|
|
|
19991
19995
|
userRole = userRoles.find(function (r) {
|
|
19992
19996
|
return r._id == role._id;
|
|
19993
19997
|
});
|
|
19994
|
-
newRole = _objectSpread$
|
|
19998
|
+
newRole = _objectSpread$B({}, role);
|
|
19995
19999
|
if (userRole) {
|
|
19996
20000
|
newRole.selected = true;
|
|
19997
20001
|
newRole.inherited = userRole.inherited;
|
|
@@ -20211,7 +20215,7 @@ function _fetchOptions() {
|
|
|
20211
20215
|
case 4:
|
|
20212
20216
|
result = _context11.sent;
|
|
20213
20217
|
options = result.data.map(function (d) {
|
|
20214
|
-
return _objectSpread$
|
|
20218
|
+
return _objectSpread$B(_objectSpread$B({}, d), {}, {
|
|
20215
20219
|
label: d.displayName,
|
|
20216
20220
|
value: d._id,
|
|
20217
20221
|
isLeaf: !d.hasChildren
|
|
@@ -20313,8 +20317,8 @@ var parent = "parent-NZJ3S";
|
|
|
20313
20317
|
var css_248z$i = ".permission-Button-XctsZ {\n position: relative;\n top: 25px;\n left: -30px;\n float: right;\n height: 20px;\n z-index: 1000;\n}\n.select-lzft- {\n width: 100%;\n}\n.loadingOption-qCkRw {\n margin-top: 11px;\n padding-left: 500px;\n}\n.scroller-lrdk9 {\n overflow: auto;\n height: 100%;\n}\n\n.skeleton--xCI0 {\n padding-left: 25px;\n padding-bottom: 10px;\n}\n.filterField-1kU1O {\n display: flex;\n gap: 10px;\n}\n.filterField-1kU1O button {\n height: 32px;\n}\n.filterField-1kU1O div {\n height: 32px;\n}\n\n.parent-scroll-GmaL9 {\n overflow: auto;\n padding: 24px;\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.parent-NZJ3S {\n overflow: auto;\n padding: 24px;\n height: 100%;\n}\n\n.parent-scroll-GmaL9 .ant-spin-container {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component__outerdiv {\n height: 100%;\n}\n.parent-scroll-GmaL9 .infinite-scroll-component {\n height: 100% !important;\n}\n";
|
|
20314
20318
|
styleInject(css_248z$i);
|
|
20315
20319
|
|
|
20316
|
-
function ownKeys$
|
|
20317
|
-
function _objectSpread$
|
|
20320
|
+
function ownKeys$A(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20321
|
+
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$A(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20318
20322
|
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; } } }; }
|
|
20319
20323
|
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; } }
|
|
20320
20324
|
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; }
|
|
@@ -20374,8 +20378,8 @@ function _generateCSV() {
|
|
|
20374
20378
|
break;
|
|
20375
20379
|
}
|
|
20376
20380
|
_context2.next = 21;
|
|
20377
|
-
return generateCSV(_objectSpread$
|
|
20378
|
-
mappingData: _objectSpread$
|
|
20381
|
+
return generateCSV(_objectSpread$A(_objectSpread$A({}, exportParams.children), {}, {
|
|
20382
|
+
mappingData: _objectSpread$A(_objectSpread$A({}, parent), {}, {
|
|
20379
20383
|
parentId: exportParams.mappingData._id
|
|
20380
20384
|
})
|
|
20381
20385
|
}), csvData);
|
|
@@ -20483,8 +20487,8 @@ function _downloadFile() {
|
|
|
20483
20487
|
return _downloadFile.apply(this, arguments);
|
|
20484
20488
|
}
|
|
20485
20489
|
|
|
20486
|
-
function ownKeys$
|
|
20487
|
-
function _objectSpread$
|
|
20490
|
+
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; }
|
|
20491
|
+
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; }
|
|
20488
20492
|
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; } } }; }
|
|
20489
20493
|
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; } }
|
|
20490
20494
|
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; }
|
|
@@ -20903,7 +20907,7 @@ function useRelationSelectorData (_ref) {
|
|
|
20903
20907
|
var activeItem = _step.value;
|
|
20904
20908
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
20905
20909
|
addedObjects.push(addedData);
|
|
20906
|
-
getSplittedItems(_objectSpread$
|
|
20910
|
+
getSplittedItems(_objectSpread$z(_objectSpread$z({}, activeItem), {}, {
|
|
20907
20911
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
20908
20912
|
}));
|
|
20909
20913
|
ret = true;
|
|
@@ -21108,8 +21112,8 @@ function useRelationSelectorData (_ref) {
|
|
|
21108
21112
|
};
|
|
21109
21113
|
}
|
|
21110
21114
|
|
|
21111
|
-
function ownKeys$
|
|
21112
|
-
function _objectSpread$
|
|
21115
|
+
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; }
|
|
21116
|
+
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; }
|
|
21113
21117
|
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; } } }; }
|
|
21114
21118
|
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; } }
|
|
21115
21119
|
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; }
|
|
@@ -21242,7 +21246,7 @@ function ActionButton (_ref) {
|
|
|
21242
21246
|
_iterator2.f();
|
|
21243
21247
|
}
|
|
21244
21248
|
_context.next = 19;
|
|
21245
|
-
return apiInterface.update(_objectSpread$
|
|
21249
|
+
return apiInterface.update(_objectSpread$y(_objectSpread$y({}, data), {}, {
|
|
21246
21250
|
state: toSwitch
|
|
21247
21251
|
}), data);
|
|
21248
21252
|
case 19:
|
|
@@ -21399,14 +21403,14 @@ function _simpleChangeValue() {
|
|
|
21399
21403
|
break;
|
|
21400
21404
|
}
|
|
21401
21405
|
for (i = 0; i < action.newValues.length; i++) {
|
|
21402
|
-
fieldsToUpdate = _objectSpread$
|
|
21406
|
+
fieldsToUpdate = _objectSpread$y(_objectSpread$y({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
21403
21407
|
}
|
|
21404
21408
|
if (!apiInterface.canUpdate) {
|
|
21405
21409
|
_context2.next = 9;
|
|
21406
21410
|
break;
|
|
21407
21411
|
}
|
|
21408
21412
|
_context2.next = 7;
|
|
21409
|
-
return apiInterface.update(_objectSpread$
|
|
21413
|
+
return apiInterface.update(_objectSpread$y({}, fieldsToUpdate), data);
|
|
21410
21414
|
case 7:
|
|
21411
21415
|
response = _context2.sent;
|
|
21412
21416
|
return _context2.abrupt("return", response);
|
|
@@ -21421,7 +21425,7 @@ function _simpleChangeValue() {
|
|
|
21421
21425
|
return _simpleChangeValue.apply(this, arguments);
|
|
21422
21426
|
}
|
|
21423
21427
|
function A(props) {
|
|
21424
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
21428
|
+
return /*#__PURE__*/jsx("a", _objectSpread$y({}, props));
|
|
21425
21429
|
}
|
|
21426
21430
|
|
|
21427
21431
|
function _createForOfIteratorHelper$a(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$a(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -21559,8 +21563,8 @@ var itemDesc = "item-desc-DBiiF";
|
|
|
21559
21563
|
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";
|
|
21560
21564
|
styleInject(css_248z$h);
|
|
21561
21565
|
|
|
21562
|
-
function ownKeys$
|
|
21563
|
-
function _objectSpread$
|
|
21566
|
+
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; }
|
|
21567
|
+
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; }
|
|
21564
21568
|
var DropDown = function DropDown(_ref) {
|
|
21565
21569
|
var _curItem$data$length;
|
|
21566
21570
|
var split = _ref.split,
|
|
@@ -21592,7 +21596,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
21592
21596
|
});
|
|
21593
21597
|
return /*#__PURE__*/jsx(Collapse, {
|
|
21594
21598
|
onChange: function onChange() {
|
|
21595
|
-
return getSplittedItems(_objectSpread$
|
|
21599
|
+
return getSplittedItems(_objectSpread$x(_objectSpread$x({}, item.item), {}, {
|
|
21596
21600
|
parentId: item.parentId
|
|
21597
21601
|
}), 0);
|
|
21598
21602
|
},
|
|
@@ -21850,8 +21854,8 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
21850
21854
|
};
|
|
21851
21855
|
var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
|
|
21852
21856
|
|
|
21853
|
-
function ownKeys$
|
|
21854
|
-
function _objectSpread$
|
|
21857
|
+
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; }
|
|
21858
|
+
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; }
|
|
21855
21859
|
function useFormListData (_ref) {
|
|
21856
21860
|
var _configuration$defaul;
|
|
21857
21861
|
var id = _ref.id,
|
|
@@ -21931,7 +21935,7 @@ function useFormListData (_ref) {
|
|
|
21931
21935
|
if (updated.length == state.length) {
|
|
21932
21936
|
newState = state.map(function (s, i) {
|
|
21933
21937
|
var _updated$find;
|
|
21934
|
-
return _objectSpread$
|
|
21938
|
+
return _objectSpread$w(_objectSpread$w({}, s), {}, {
|
|
21935
21939
|
data: (_updated$find = updated.find(function (u) {
|
|
21936
21940
|
return u.index == i;
|
|
21937
21941
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -22068,8 +22072,8 @@ var FormList = function FormList(_ref, ref) {
|
|
|
22068
22072
|
};
|
|
22069
22073
|
var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
22070
22074
|
|
|
22071
|
-
function ownKeys$
|
|
22072
|
-
function _objectSpread$
|
|
22075
|
+
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; }
|
|
22076
|
+
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; }
|
|
22073
22077
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
22074
22078
|
function useSelectOrCreateData (_ref) {
|
|
22075
22079
|
var id = _ref.id,
|
|
@@ -22166,7 +22170,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
22166
22170
|
_context.next = 7;
|
|
22167
22171
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
22168
22172
|
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) {
|
|
22169
|
-
return _objectSpread$
|
|
22173
|
+
return _objectSpread$v(_objectSpread$v({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
22170
22174
|
}, {}) : {
|
|
22171
22175
|
_id: [value, 'contains']
|
|
22172
22176
|
},
|
|
@@ -22477,8 +22481,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
22477
22481
|
});
|
|
22478
22482
|
};
|
|
22479
22483
|
|
|
22480
|
-
function ownKeys$
|
|
22481
|
-
function _objectSpread$
|
|
22484
|
+
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; }
|
|
22485
|
+
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; }
|
|
22482
22486
|
function useListData (_ref) {
|
|
22483
22487
|
var id = _ref.id,
|
|
22484
22488
|
data = _ref.data;
|
|
@@ -22521,7 +22525,7 @@ function useListData (_ref) {
|
|
|
22521
22525
|
case 3:
|
|
22522
22526
|
result = _context.sent;
|
|
22523
22527
|
setListData(result.data.map(parseField));
|
|
22524
|
-
initData = _objectSpread$
|
|
22528
|
+
initData = _objectSpread$u({}, data);
|
|
22525
22529
|
setUpdatedObject(initData);
|
|
22526
22530
|
setLoading(false);
|
|
22527
22531
|
case 8:
|
|
@@ -22562,7 +22566,7 @@ function useListData (_ref) {
|
|
|
22562
22566
|
});
|
|
22563
22567
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
22564
22568
|
var parsedField = field.field.split('.');
|
|
22565
|
-
item.itemUpdate = _objectSpread$
|
|
22569
|
+
item.itemUpdate = _objectSpread$u(_objectSpread$u({}, field), {}, {
|
|
22566
22570
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
22567
22571
|
});
|
|
22568
22572
|
});
|
|
@@ -22593,16 +22597,16 @@ function useListData (_ref) {
|
|
|
22593
22597
|
console.error('field with more than 2 parts not allowed');
|
|
22594
22598
|
return;
|
|
22595
22599
|
}
|
|
22596
|
-
var updObj = _objectSpread$
|
|
22600
|
+
var updObj = _objectSpread$u({}, updatedObject);
|
|
22597
22601
|
if (fields.length === 1) {
|
|
22598
|
-
updObj = _objectSpread$
|
|
22602
|
+
updObj = _objectSpread$u(_objectSpread$u({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
22599
22603
|
} else if (fields.length === 2) {
|
|
22600
22604
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
22601
22605
|
return v.id === item.id.trim();
|
|
22602
22606
|
});
|
|
22603
22607
|
if (updatedField) {
|
|
22604
|
-
var updatedFieldCopy = _objectSpread$
|
|
22605
|
-
updObj = _objectSpread$
|
|
22608
|
+
var updatedFieldCopy = _objectSpread$u(_objectSpread$u({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
22609
|
+
updObj = _objectSpread$u(_objectSpread$u({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
22606
22610
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
22607
22611
|
})));
|
|
22608
22612
|
}
|
|
@@ -22611,11 +22615,11 @@ function useListData (_ref) {
|
|
|
22611
22615
|
var acItems = listData;
|
|
22612
22616
|
for (var i = 0; i < acItems.length; i++) {
|
|
22613
22617
|
if (i == index) {
|
|
22614
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
22618
|
+
acItems[i].itemUpdate = _objectSpread$u(_objectSpread$u({}, acItems[i].itemUpdate), {}, {
|
|
22615
22619
|
value: value
|
|
22616
22620
|
});
|
|
22617
22621
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
22618
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
22622
|
+
acItems[i].itemUpdate = _objectSpread$u(_objectSpread$u({}, acItems[i].itemUpdate), {}, {
|
|
22619
22623
|
value: !value
|
|
22620
22624
|
});
|
|
22621
22625
|
}
|
|
@@ -23129,8 +23133,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
23129
23133
|
};
|
|
23130
23134
|
}
|
|
23131
23135
|
|
|
23132
|
-
function ownKeys$
|
|
23133
|
-
function _objectSpread$
|
|
23136
|
+
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; }
|
|
23137
|
+
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; }
|
|
23134
23138
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
23135
23139
|
var id = _ref.id,
|
|
23136
23140
|
data = _ref.data,
|
|
@@ -23238,12 +23242,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
23238
23242
|
}
|
|
23239
23243
|
function onEnter(e) {
|
|
23240
23244
|
if (e.key != 'Enter') return;
|
|
23241
|
-
setCrop(_objectSpread$
|
|
23245
|
+
setCrop(_objectSpread$t(_objectSpread$t({}, crop), {}, {
|
|
23242
23246
|
unit: 'px',
|
|
23243
23247
|
width: Number(widthInputElement.current.value),
|
|
23244
23248
|
height: Number(heightInputElement.current.value)
|
|
23245
23249
|
}));
|
|
23246
|
-
setCompletedCrop(_objectSpread$
|
|
23250
|
+
setCompletedCrop(_objectSpread$t(_objectSpread$t({}, crop), {}, {
|
|
23247
23251
|
unit: 'px',
|
|
23248
23252
|
width: Number(widthInputElement.current.value),
|
|
23249
23253
|
height: Number(heightInputElement.current.value)
|
|
@@ -23321,8 +23325,8 @@ var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
|
23321
23325
|
function _createForOfIteratorHelper$9(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$9(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
23322
23326
|
function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$9(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$9(r, a) : void 0; } }
|
|
23323
23327
|
function _arrayLikeToArray$9(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
23324
|
-
function ownKeys$
|
|
23325
|
-
function _objectSpread$
|
|
23328
|
+
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; }
|
|
23329
|
+
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; }
|
|
23326
23330
|
function useDescriptions (_ref) {
|
|
23327
23331
|
var id = _ref.id;
|
|
23328
23332
|
var root = useStore();
|
|
@@ -23415,7 +23419,7 @@ function _getDisplayData() {
|
|
|
23415
23419
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
23416
23420
|
while (1) switch (_context4.prev = _context4.next) {
|
|
23417
23421
|
case 0:
|
|
23418
|
-
displayData = _objectSpread$
|
|
23422
|
+
displayData = _objectSpread$s({}, data);
|
|
23419
23423
|
_iterator = _createForOfIteratorHelper$9(items);
|
|
23420
23424
|
_context4.prev = 2;
|
|
23421
23425
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -23691,8 +23695,8 @@ var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
|
23691
23695
|
};
|
|
23692
23696
|
var FileUploadBeta = observer(FileUploadWrapper);
|
|
23693
23697
|
|
|
23694
|
-
function ownKeys$
|
|
23695
|
-
function _objectSpread$
|
|
23698
|
+
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; }
|
|
23699
|
+
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; }
|
|
23696
23700
|
function useGridData (_ref) {
|
|
23697
23701
|
var id = _ref.id,
|
|
23698
23702
|
data = _ref.data;
|
|
@@ -23735,11 +23739,11 @@ function useGridData (_ref) {
|
|
|
23735
23739
|
function reducer(state, action) {
|
|
23736
23740
|
switch (action.type) {
|
|
23737
23741
|
case 'update':
|
|
23738
|
-
return _objectSpread$
|
|
23742
|
+
return _objectSpread$r(_objectSpread$r({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$r(_objectSpread$r({}, action.data), {}, {
|
|
23739
23743
|
buffer: Buffer.from(action.data.buffer)
|
|
23740
23744
|
})));
|
|
23741
23745
|
case 'delete':
|
|
23742
|
-
var newState = _objectSpread$
|
|
23746
|
+
var newState = _objectSpread$r({}, state);
|
|
23743
23747
|
delete newState[action.data.divaNr];
|
|
23744
23748
|
return newState;
|
|
23745
23749
|
default:
|
|
@@ -23826,8 +23830,8 @@ var Grid = function Grid(_ref) {
|
|
|
23826
23830
|
});
|
|
23827
23831
|
};
|
|
23828
23832
|
|
|
23829
|
-
function ownKeys$
|
|
23830
|
-
function _objectSpread$
|
|
23833
|
+
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; }
|
|
23834
|
+
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; }
|
|
23831
23835
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
23832
23836
|
var id = _ref.id;
|
|
23833
23837
|
var root = useStore();
|
|
@@ -23946,7 +23950,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
23946
23950
|
onRemove: onRemove,
|
|
23947
23951
|
customRequest: customRequest,
|
|
23948
23952
|
fileList: fileList.map(function (f) {
|
|
23949
|
-
return _objectSpread$
|
|
23953
|
+
return _objectSpread$q(_objectSpread$q({}, f), {}, {
|
|
23950
23954
|
url: f.url
|
|
23951
23955
|
});
|
|
23952
23956
|
}),
|
|
@@ -24703,8 +24707,8 @@ function LinkCell (_ref) {
|
|
|
24703
24707
|
|
|
24704
24708
|
var _excluded$1 = ["index"],
|
|
24705
24709
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
24706
|
-
function ownKeys$
|
|
24707
|
-
function _objectSpread$
|
|
24710
|
+
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; }
|
|
24711
|
+
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; }
|
|
24708
24712
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
24709
24713
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
24710
24714
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -24718,7 +24722,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
24718
24722
|
component: false,
|
|
24719
24723
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
24720
24724
|
value: form,
|
|
24721
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
24725
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$p({}, props))
|
|
24722
24726
|
})
|
|
24723
24727
|
});
|
|
24724
24728
|
};
|
|
@@ -24771,7 +24775,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
24771
24775
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
24772
24776
|
longDescriptionType = 'text';
|
|
24773
24777
|
}
|
|
24774
|
-
var modifiedColumn = _objectSpread$
|
|
24778
|
+
var modifiedColumn = _objectSpread$p(_objectSpread$p({}, column), {}, {
|
|
24775
24779
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
24776
24780
|
});
|
|
24777
24781
|
if (column) {
|
|
@@ -24784,40 +24788,40 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
24784
24788
|
};
|
|
24785
24789
|
switch (modifiedColumn.type) {
|
|
24786
24790
|
case 'boolean':
|
|
24787
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
24791
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$p({}, cellProps));
|
|
24788
24792
|
break;
|
|
24789
24793
|
case 'text':
|
|
24790
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
24794
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$p({}, cellProps));
|
|
24791
24795
|
break;
|
|
24792
24796
|
case 'select':
|
|
24793
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
24797
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$p({}, cellProps));
|
|
24794
24798
|
case 'media':
|
|
24795
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
24799
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$p({}, cellProps));
|
|
24796
24800
|
break;
|
|
24797
24801
|
case 'mediaItem':
|
|
24798
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
24802
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$p({}, cellProps));
|
|
24799
24803
|
break;
|
|
24800
24804
|
case 'unixTimeStamp':
|
|
24801
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
24805
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$p({}, cellProps));
|
|
24802
24806
|
break;
|
|
24803
24807
|
case 'unixTimeStampCheck':
|
|
24804
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
24808
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$p({}, cellProps));
|
|
24805
24809
|
break;
|
|
24806
24810
|
case 'icon':
|
|
24807
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
24811
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$p({}, cellProps));
|
|
24808
24812
|
break;
|
|
24809
24813
|
case 'progress':
|
|
24810
|
-
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$
|
|
24814
|
+
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$p({}, cellProps));
|
|
24811
24815
|
break;
|
|
24812
24816
|
case 'link':
|
|
24813
|
-
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$
|
|
24817
|
+
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$p({}, cellProps));
|
|
24814
24818
|
break;
|
|
24815
24819
|
default:
|
|
24816
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
24820
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$p({}, cellProps));
|
|
24817
24821
|
break;
|
|
24818
24822
|
}
|
|
24819
24823
|
}
|
|
24820
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
24824
|
+
return /*#__PURE__*/jsx("td", _objectSpread$p(_objectSpread$p({}, restProps), {}, {
|
|
24821
24825
|
children: childNode
|
|
24822
24826
|
}));
|
|
24823
24827
|
};
|
|
@@ -25169,8 +25173,8 @@ var SMChart = function SMChart(props) {
|
|
|
25169
25173
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
25170
25174
|
};
|
|
25171
25175
|
|
|
25172
|
-
function ownKeys$
|
|
25173
|
-
function _objectSpread$
|
|
25176
|
+
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; }
|
|
25177
|
+
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; }
|
|
25174
25178
|
function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
25175
25179
|
function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0; } }
|
|
25176
25180
|
function _arrayLikeToArray$4(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -25365,7 +25369,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
25365
25369
|
// Convert to Dayjs
|
|
25366
25370
|
(_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
|
|
25367
25371
|
]
|
|
25368
|
-
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
25372
|
+
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$o(_objectSpread$o({}, (_state$configuration$5 = state.configuration.filter) === null || _state$configuration$5 === void 0 ? void 0 : _state$configuration$5.select.settings), {}, {
|
|
25369
25373
|
style: {
|
|
25370
25374
|
minWidth: '200px'
|
|
25371
25375
|
},
|
|
@@ -25470,7 +25474,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
25470
25474
|
},
|
|
25471
25475
|
dataSource: data,
|
|
25472
25476
|
loading: state.loading,
|
|
25473
|
-
pagination: _objectSpread$
|
|
25477
|
+
pagination: _objectSpread$o(_objectSpread$o({}, state.pagination), {}, {
|
|
25474
25478
|
showTotal: function showTotal(total, range) {
|
|
25475
25479
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
25476
25480
|
},
|
|
@@ -25777,7 +25781,7 @@ function BulkAction(_ref6) {
|
|
|
25777
25781
|
}
|
|
25778
25782
|
_context4.t0 = data;
|
|
25779
25783
|
_context4.next = 11;
|
|
25780
|
-
return apiInterface.update(_objectSpread$
|
|
25784
|
+
return apiInterface.update(_objectSpread$o(_objectSpread$o({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
25781
25785
|
case 11:
|
|
25782
25786
|
_context4.t1 = _context4.sent;
|
|
25783
25787
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -25890,8 +25894,8 @@ function SelectionText(_ref8) {
|
|
|
25890
25894
|
});
|
|
25891
25895
|
}
|
|
25892
25896
|
|
|
25893
|
-
function ownKeys$
|
|
25894
|
-
function _objectSpread$
|
|
25897
|
+
function ownKeys$n(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25898
|
+
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25895
25899
|
function getColumnFilterProps (_ref) {
|
|
25896
25900
|
var filter = _ref.filter,
|
|
25897
25901
|
title = _ref.title;
|
|
@@ -26254,7 +26258,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
26254
26258
|
});
|
|
26255
26259
|
},
|
|
26256
26260
|
options: filter.map(function (f) {
|
|
26257
|
-
return _objectSpread$
|
|
26261
|
+
return _objectSpread$n(_objectSpread$n({}, f), {}, {
|
|
26258
26262
|
label: t(f.label)
|
|
26259
26263
|
});
|
|
26260
26264
|
})
|
|
@@ -26303,7 +26307,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
26303
26307
|
setDisplaySelectedvalues = _useState4[1];
|
|
26304
26308
|
var options = [];
|
|
26305
26309
|
options = filter.map(function (f) {
|
|
26306
|
-
return _objectSpread$
|
|
26310
|
+
return _objectSpread$n(_objectSpread$n({}, f), {}, {
|
|
26307
26311
|
label: t(f.label)
|
|
26308
26312
|
});
|
|
26309
26313
|
});
|
|
@@ -26377,8 +26381,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
26377
26381
|
};
|
|
26378
26382
|
};
|
|
26379
26383
|
|
|
26380
|
-
function ownKeys$
|
|
26381
|
-
function _objectSpread$
|
|
26384
|
+
function ownKeys$m(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26385
|
+
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26382
26386
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
26383
26387
|
var columns = configuration.columns.filter(function (c) {
|
|
26384
26388
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -26431,7 +26435,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
26431
26435
|
}
|
|
26432
26436
|
function mapColumn(column, onUpdate) {
|
|
26433
26437
|
var _column$field, _column$children;
|
|
26434
|
-
return _objectSpread$
|
|
26438
|
+
return _objectSpread$m(_objectSpread$m(_objectSpread$m({}, column), {}, {
|
|
26435
26439
|
hidden: false,
|
|
26436
26440
|
width: column.width || 100,
|
|
26437
26441
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
@@ -26481,8 +26485,8 @@ function updateData (_ref) {
|
|
|
26481
26485
|
};
|
|
26482
26486
|
}
|
|
26483
26487
|
|
|
26484
|
-
function ownKeys$
|
|
26485
|
-
function _objectSpread$
|
|
26488
|
+
function ownKeys$l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26489
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26486
26490
|
function applyFilterAndSortation (_ref) {
|
|
26487
26491
|
var data = _ref.data,
|
|
26488
26492
|
filters = _ref.filters,
|
|
@@ -26497,7 +26501,7 @@ function applyFilterAndSortation (_ref) {
|
|
|
26497
26501
|
processedData = sort(sorter || [], processedData);
|
|
26498
26502
|
return {
|
|
26499
26503
|
data: processedData,
|
|
26500
|
-
pagination: _objectSpread$
|
|
26504
|
+
pagination: _objectSpread$l(_objectSpread$l({}, pagination), {}, {
|
|
26501
26505
|
total: processedData.length
|
|
26502
26506
|
})
|
|
26503
26507
|
};
|
|
@@ -26582,8 +26586,8 @@ function filter(f, data) {
|
|
|
26582
26586
|
}
|
|
26583
26587
|
|
|
26584
26588
|
var _excluded = ["_id"];
|
|
26585
|
-
function ownKeys$
|
|
26586
|
-
function _objectSpread$
|
|
26589
|
+
function ownKeys$k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26590
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26587
26591
|
function useTableData$1 (_ref) {
|
|
26588
26592
|
var _configuration$apiInt;
|
|
26589
26593
|
var id = _ref.id;
|
|
@@ -26638,7 +26642,7 @@ function useTableData$1 (_ref) {
|
|
|
26638
26642
|
var _configuration$create;
|
|
26639
26643
|
if (!dataRow) return;
|
|
26640
26644
|
var id = v4();
|
|
26641
|
-
var processedDataRow = unflatten(_objectSpread$
|
|
26645
|
+
var processedDataRow = unflatten(_objectSpread$k({
|
|
26642
26646
|
_id: id,
|
|
26643
26647
|
ID: id
|
|
26644
26648
|
}, dataRow));
|
|
@@ -26650,11 +26654,11 @@ function useTableData$1 (_ref) {
|
|
|
26650
26654
|
newData = _updateData.data;
|
|
26651
26655
|
_updateData.prevDataRow;
|
|
26652
26656
|
_updateData.index;
|
|
26653
|
-
var newState = _objectSpread$
|
|
26657
|
+
var newState = _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
26654
26658
|
data: newData
|
|
26655
26659
|
});
|
|
26656
26660
|
if (!filterServerSide) {
|
|
26657
|
-
var res = applyFilterAndSortation(_objectSpread$
|
|
26661
|
+
var res = applyFilterAndSortation(_objectSpread$k(_objectSpread$k({}, filterData), {}, {
|
|
26658
26662
|
data: newData
|
|
26659
26663
|
}));
|
|
26660
26664
|
newState.data = res.data;
|
|
@@ -26666,33 +26670,33 @@ function useTableData$1 (_ref) {
|
|
|
26666
26670
|
var formData = new FormData();
|
|
26667
26671
|
processedDataRow._id;
|
|
26668
26672
|
var value = _objectWithoutProperties(processedDataRow, _excluded);
|
|
26669
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
26673
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$k(_objectSpread$k({}, catalogItem), {}, {
|
|
26670
26674
|
filterContex: filterContex,
|
|
26671
26675
|
value: JSON.stringify([value])
|
|
26672
26676
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
26673
26677
|
if (d && d.Result && d.Result == 'Success') return;
|
|
26674
|
-
setState(_objectSpread$
|
|
26678
|
+
setState(_objectSpread$k({}, oldState));
|
|
26675
26679
|
});
|
|
26676
26680
|
}, [state, catalogItem, filterData]);
|
|
26677
26681
|
useEffect(function () {
|
|
26678
26682
|
if (!catalogItem) return;
|
|
26679
|
-
setState(_objectSpread$
|
|
26683
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
26680
26684
|
loading: true,
|
|
26681
|
-
mappingData: _objectSpread$
|
|
26685
|
+
mappingData: _objectSpread$k(_objectSpread$k({}, catalogItem), {}, {
|
|
26682
26686
|
filterContex: filterContex
|
|
26683
26687
|
})
|
|
26684
26688
|
}));
|
|
26685
26689
|
if (!filterServerSide) {
|
|
26686
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
26690
|
+
apiHandler.readList(configuration.mapping, _objectSpread$k(_objectSpread$k({}, catalogItem), {}, {
|
|
26687
26691
|
filterContex: filterContex
|
|
26688
26692
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
26689
26693
|
var newData = data.data.map(function (d) {
|
|
26690
|
-
return _objectSpread$
|
|
26694
|
+
return _objectSpread$k(_objectSpread$k({}, d), {}, {
|
|
26691
26695
|
_id: d._id || d.ID || nanoid()
|
|
26692
26696
|
});
|
|
26693
26697
|
});
|
|
26694
26698
|
onChange({
|
|
26695
|
-
pagination: _objectSpread$
|
|
26699
|
+
pagination: _objectSpread$k({}, state.pagination),
|
|
26696
26700
|
filters: {},
|
|
26697
26701
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
26698
26702
|
return c.defaultSortOrder;
|
|
@@ -26708,7 +26712,7 @@ function useTableData$1 (_ref) {
|
|
|
26708
26712
|
});
|
|
26709
26713
|
} else {
|
|
26710
26714
|
onChange({
|
|
26711
|
-
pagination: _objectSpread$
|
|
26715
|
+
pagination: _objectSpread$k({}, state.pagination),
|
|
26712
26716
|
filters: {},
|
|
26713
26717
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
26714
26718
|
return c.defaultSortOrder;
|
|
@@ -26724,17 +26728,17 @@ function useTableData$1 (_ref) {
|
|
|
26724
26728
|
}
|
|
26725
26729
|
}, [filterContex, catalogItem]);
|
|
26726
26730
|
var onChange = function onChange(p, dataParam) {
|
|
26727
|
-
setState(_objectSpread$
|
|
26731
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
26728
26732
|
loading: true
|
|
26729
26733
|
}));
|
|
26730
26734
|
if (!filterServerSide) {
|
|
26731
26735
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
26732
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
26736
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$k(_objectSpread$k({}, p), {}, {
|
|
26733
26737
|
data: unfilteredData
|
|
26734
26738
|
})),
|
|
26735
26739
|
data = _applyFilterAndSortat.data,
|
|
26736
26740
|
pagination = _applyFilterAndSortat.pagination;
|
|
26737
|
-
setState(_objectSpread$
|
|
26741
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
26738
26742
|
data: data,
|
|
26739
26743
|
pagination: pagination,
|
|
26740
26744
|
loading: false,
|
|
@@ -26745,20 +26749,20 @@ function useTableData$1 (_ref) {
|
|
|
26745
26749
|
sorter: p.sorter
|
|
26746
26750
|
});
|
|
26747
26751
|
} else {
|
|
26748
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
26752
|
+
apiHandler.readList(configuration.mapping, _objectSpread$k(_objectSpread$k({}, catalogItem), {}, {
|
|
26749
26753
|
filterContex: filterContex
|
|
26750
26754
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
26751
|
-
setState(_objectSpread$
|
|
26755
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
26752
26756
|
data: data.data.map(function (dt) {
|
|
26753
|
-
return _objectSpread$
|
|
26757
|
+
return _objectSpread$k(_objectSpread$k({}, dt), {}, {
|
|
26754
26758
|
_id: dt._id || dt.ID || nanoid()
|
|
26755
26759
|
});
|
|
26756
26760
|
}),
|
|
26757
|
-
pagination: _objectSpread$
|
|
26761
|
+
pagination: _objectSpread$k(_objectSpread$k({}, p.pagination), {}, {
|
|
26758
26762
|
total: data.total
|
|
26759
26763
|
}),
|
|
26760
26764
|
loading: false,
|
|
26761
|
-
mappingData: _objectSpread$
|
|
26765
|
+
mappingData: _objectSpread$k(_objectSpread$k({}, catalogItem), {}, {
|
|
26762
26766
|
filterContex: filterContex
|
|
26763
26767
|
})
|
|
26764
26768
|
}));
|
|
@@ -26779,7 +26783,7 @@ function useTableData$1 (_ref) {
|
|
|
26779
26783
|
filters['_id'] = [id, 'eq', false];
|
|
26780
26784
|
_context.next = 4;
|
|
26781
26785
|
return apiHandler.readList(configuration.mapping, {
|
|
26782
|
-
pagination: _objectSpread$
|
|
26786
|
+
pagination: _objectSpread$k({}, state.pagination),
|
|
26783
26787
|
columns: configuration.columns,
|
|
26784
26788
|
filters: filters,
|
|
26785
26789
|
sorter: filterData.sorter
|
|
@@ -26798,7 +26802,7 @@ function useTableData$1 (_ref) {
|
|
|
26798
26802
|
};
|
|
26799
26803
|
}();
|
|
26800
26804
|
var onSelect = function onSelect(keys) {
|
|
26801
|
-
setState(_objectSpread$
|
|
26805
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
26802
26806
|
selected: keys
|
|
26803
26807
|
}));
|
|
26804
26808
|
};
|
|
@@ -26808,7 +26812,7 @@ function useTableData$1 (_ref) {
|
|
|
26808
26812
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
26809
26813
|
while (1) switch (_context3.prev = _context3.next) {
|
|
26810
26814
|
case 0:
|
|
26811
|
-
setState(_objectSpread$
|
|
26815
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
26812
26816
|
deleting: true
|
|
26813
26817
|
}));
|
|
26814
26818
|
newData = _toConsumableArray(state.data);
|
|
@@ -26823,7 +26827,7 @@ function useTableData$1 (_ref) {
|
|
|
26823
26827
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
26824
26828
|
return nd._id === state.selected[index];
|
|
26825
26829
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
26826
|
-
mappingData = _objectSpread$
|
|
26830
|
+
mappingData = _objectSpread$k(_objectSpread$k({}, mappingData), state.mappingData);
|
|
26827
26831
|
_context2.next = 5;
|
|
26828
26832
|
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);
|
|
26829
26833
|
case 5:
|
|
@@ -26873,7 +26877,7 @@ function useTableData$1 (_ref) {
|
|
|
26873
26877
|
}
|
|
26874
26878
|
_context3.next = 18;
|
|
26875
26879
|
return apiHandler.readList(configuration.mapping, {
|
|
26876
|
-
pagination: _objectSpread$
|
|
26880
|
+
pagination: _objectSpread$k(_objectSpread$k({}, state.pagination), {}, {
|
|
26877
26881
|
current: current
|
|
26878
26882
|
}),
|
|
26879
26883
|
columns: configuration.columns,
|
|
@@ -26885,11 +26889,11 @@ function useTableData$1 (_ref) {
|
|
|
26885
26889
|
newData = data.data;
|
|
26886
26890
|
total = data.total;
|
|
26887
26891
|
case 21:
|
|
26888
|
-
setState(_objectSpread$
|
|
26892
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
26889
26893
|
selected: [],
|
|
26890
26894
|
deleting: false,
|
|
26891
26895
|
data: newData,
|
|
26892
|
-
pagination: _objectSpread$
|
|
26896
|
+
pagination: _objectSpread$k(_objectSpread$k({}, state.pagination), {}, {
|
|
26893
26897
|
current: current,
|
|
26894
26898
|
total: total
|
|
26895
26899
|
})
|
|
@@ -26905,12 +26909,12 @@ function useTableData$1 (_ref) {
|
|
|
26905
26909
|
};
|
|
26906
26910
|
}();
|
|
26907
26911
|
function setLoading() {
|
|
26908
|
-
setState(_objectSpread$
|
|
26912
|
+
setState(_objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
26909
26913
|
loading: true
|
|
26910
26914
|
}));
|
|
26911
26915
|
}
|
|
26912
|
-
return _objectSpread$
|
|
26913
|
-
configuration: _objectSpread$
|
|
26916
|
+
return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
26917
|
+
configuration: _objectSpread$k(_objectSpread$k({}, configuration), {}, {
|
|
26914
26918
|
title: undefined
|
|
26915
26919
|
}),
|
|
26916
26920
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -27022,8 +27026,8 @@ function objectHash (obj) {
|
|
|
27022
27026
|
function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
27023
27027
|
function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
|
|
27024
27028
|
function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
27025
|
-
function ownKeys$
|
|
27026
|
-
function _objectSpread$
|
|
27029
|
+
function ownKeys$j(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27030
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27027
27031
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
27028
27032
|
function useTableData (_ref) {
|
|
27029
27033
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -27081,7 +27085,7 @@ function useTableData (_ref) {
|
|
|
27081
27085
|
var _useState13 = useState({
|
|
27082
27086
|
loading: true,
|
|
27083
27087
|
deleting: false,
|
|
27084
|
-
pagination: _objectSpread$
|
|
27088
|
+
pagination: _objectSpread$j({
|
|
27085
27089
|
current: 1,
|
|
27086
27090
|
pageSize: 20,
|
|
27087
27091
|
total: 0,
|
|
@@ -27090,7 +27094,7 @@ function useTableData (_ref) {
|
|
|
27090
27094
|
selected: [],
|
|
27091
27095
|
canDelete: !!apiHandler.canDelete,
|
|
27092
27096
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
27093
|
-
mappingData: _objectSpread$
|
|
27097
|
+
mappingData: _objectSpread$j(_objectSpread$j({}, parentData), {}, {
|
|
27094
27098
|
prefilter: {
|
|
27095
27099
|
select: globalFilter.select
|
|
27096
27100
|
}
|
|
@@ -27099,7 +27103,7 @@ function useTableData (_ref) {
|
|
|
27099
27103
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
27100
27104
|
state = _useState14[0],
|
|
27101
27105
|
setState = _useState14[1];
|
|
27102
|
-
var mapping = _objectSpread$
|
|
27106
|
+
var mapping = _objectSpread$j(_objectSpread$j({}, parentData), {}, {
|
|
27103
27107
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
27104
27108
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
27105
27109
|
});
|
|
@@ -27138,14 +27142,14 @@ function useTableData (_ref) {
|
|
|
27138
27142
|
}
|
|
27139
27143
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
27140
27144
|
var newInitData = initData;
|
|
27141
|
-
var newState = _objectSpread$
|
|
27145
|
+
var newState = _objectSpread$j({}, state);
|
|
27142
27146
|
var selected = [];
|
|
27143
27147
|
if (configuration.deselectOnUpdate == false) {
|
|
27144
27148
|
selected = state.selected;
|
|
27145
27149
|
}
|
|
27146
27150
|
var pagination = undefined;
|
|
27147
27151
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
27148
|
-
pagination = _objectSpread$
|
|
27152
|
+
pagination = _objectSpread$j(_objectSpread$j({}, state.pagination), {}, {
|
|
27149
27153
|
total: state.data.length + dataArray.length
|
|
27150
27154
|
});
|
|
27151
27155
|
}
|
|
@@ -27162,7 +27166,7 @@ function useTableData (_ref) {
|
|
|
27162
27166
|
dataRow: dataRow
|
|
27163
27167
|
}),
|
|
27164
27168
|
_data = _updateData.data;
|
|
27165
|
-
newState = _objectSpread$
|
|
27169
|
+
newState = _objectSpread$j(_objectSpread$j({}, newState), {}, {
|
|
27166
27170
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
27167
27171
|
data: _data,
|
|
27168
27172
|
selected: selected
|
|
@@ -27175,8 +27179,8 @@ function useTableData (_ref) {
|
|
|
27175
27179
|
dataRow: dataRow
|
|
27176
27180
|
}),
|
|
27177
27181
|
nextInitData = _updateData2.data;
|
|
27178
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
27179
|
-
filters: _objectSpread$
|
|
27182
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$j(_objectSpread$j(_objectSpread$j({}, filterData), {}, {
|
|
27183
|
+
filters: _objectSpread$j(_objectSpread$j(_objectSpread$j(_objectSpread$j(_objectSpread$j(_objectSpread$j({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter5 = configuration.filter) !== null && _configuration$filter5 !== void 0 && (_configuration$filter5 = _configuration$filter5.toggle) !== null && _configuration$filter5 !== void 0 && _configuration$filter5.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
|
|
27180
27184
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter6 = configuration.filter) !== null && _configuration$filter6 !== void 0 && (_configuration$filter6 = _configuration$filter6.toggle) !== null && _configuration$filter6 !== void 0 && _configuration$filter6.inQuery ? {
|
|
27181
27185
|
genericProps: globalFilter.toggle
|
|
27182
27186
|
} : undefined), {}, {
|
|
@@ -27186,7 +27190,7 @@ function useTableData (_ref) {
|
|
|
27186
27190
|
_data2 = _applyFilterAndSortat.data,
|
|
27187
27191
|
_pagination2 = _applyFilterAndSortat.pagination;
|
|
27188
27192
|
newInitData = nextInitData;
|
|
27189
|
-
newState = _objectSpread$
|
|
27193
|
+
newState = _objectSpread$j(_objectSpread$j({}, newState), {}, {
|
|
27190
27194
|
pagination: _pagination2,
|
|
27191
27195
|
data: _data2,
|
|
27192
27196
|
selected: selected
|
|
@@ -27196,8 +27200,8 @@ function useTableData (_ref) {
|
|
|
27196
27200
|
if (apiHandler.canCreate) {
|
|
27197
27201
|
apiCreate(data).then(function (res) {
|
|
27198
27202
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
27199
|
-
initData && setInitData(_objectSpread$
|
|
27200
|
-
setState(_objectSpread$
|
|
27203
|
+
initData && setInitData(_objectSpread$j({}, initData));
|
|
27204
|
+
setState(_objectSpread$j({}, state));
|
|
27201
27205
|
}
|
|
27202
27206
|
});
|
|
27203
27207
|
}
|
|
@@ -27210,7 +27214,7 @@ function useTableData (_ref) {
|
|
|
27210
27214
|
var triggerRefresh = function triggerRefresh() {
|
|
27211
27215
|
var _configuration$filter7;
|
|
27212
27216
|
setError(undefined);
|
|
27213
|
-
var newGlobalFilter = _objectSpread$
|
|
27217
|
+
var newGlobalFilter = _objectSpread$j({}, globalFilter);
|
|
27214
27218
|
//on refresh update default filter, since global value can change
|
|
27215
27219
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
27216
27220
|
var _configuration$filter8;
|
|
@@ -27221,7 +27225,7 @@ function useTableData (_ref) {
|
|
|
27221
27225
|
newGlobalFilter["default"] = _defaultFilter;
|
|
27222
27226
|
setGlobaFilter(newGlobalFilter);
|
|
27223
27227
|
}
|
|
27224
|
-
onChange(_objectSpread$
|
|
27228
|
+
onChange(_objectSpread$j({
|
|
27225
27229
|
pagination: state.pagination
|
|
27226
27230
|
}, filterData), newGlobalFilter, true);
|
|
27227
27231
|
};
|
|
@@ -27239,7 +27243,7 @@ function useTableData (_ref) {
|
|
|
27239
27243
|
order: c.defaultSortOrder
|
|
27240
27244
|
};
|
|
27241
27245
|
});
|
|
27242
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
27246
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
27243
27247
|
loading: false
|
|
27244
27248
|
}));else {
|
|
27245
27249
|
onChange({
|
|
@@ -27282,7 +27286,7 @@ function useTableData (_ref) {
|
|
|
27282
27286
|
case 0:
|
|
27283
27287
|
filters = {};
|
|
27284
27288
|
filters['_id'] = [id, 'eq', false];
|
|
27285
|
-
ssf = _objectSpread$
|
|
27289
|
+
ssf = _objectSpread$j({
|
|
27286
27290
|
pagination: {
|
|
27287
27291
|
current: 1,
|
|
27288
27292
|
pageSize: 1
|
|
@@ -27335,11 +27339,11 @@ function useTableData (_ref) {
|
|
|
27335
27339
|
prefilter = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : globalFilter;
|
|
27336
27340
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
27337
27341
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
27338
|
-
setState(_objectSpread$
|
|
27342
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
27339
27343
|
loading: true
|
|
27340
27344
|
}));
|
|
27341
27345
|
currentData = initData;
|
|
27342
|
-
filterData = _objectSpread$
|
|
27346
|
+
filterData = _objectSpread$j(_objectSpread$j(_objectSpread$j(_objectSpread$j({}, prefilter.search), ((_configuration$filter10 = configuration.filter) === null || _configuration$filter10 === void 0 || (_configuration$filter10 = _configuration$filter10.select) === null || _configuration$filter10 === void 0 ? void 0 : _configuration$filter10.applyDefaultValue) !== false || ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter12 = (_configuration$filter13 = configuration.filter) === null || _configuration$filter13 === void 0 || (_configuration$filter13 = _configuration$filter13.select) === null || _configuration$filter13 === void 0 ? void 0 : _configuration$filter13.filterField) !== null && _configuration$filter12 !== void 0 ? _configuration$filter12 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
|
|
27343
27347
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
|
|
27344
27348
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
27345
27349
|
_ref7[0];
|
|
@@ -27347,7 +27351,7 @@ function useTableData (_ref) {
|
|
|
27347
27351
|
return v != null;
|
|
27348
27352
|
}));
|
|
27349
27353
|
currentFilterHash = objectHash(filterData);
|
|
27350
|
-
currentPagination = _objectSpread$
|
|
27354
|
+
currentPagination = _objectSpread$j(_objectSpread$j({}, p.pagination), {}, {
|
|
27351
27355
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
27352
27356
|
});
|
|
27353
27357
|
filterHash.current = currentFilterHash;
|
|
@@ -27355,7 +27359,7 @@ function useTableData (_ref) {
|
|
|
27355
27359
|
_context3.next = 20;
|
|
27356
27360
|
break;
|
|
27357
27361
|
}
|
|
27358
|
-
ssf = _objectSpread$
|
|
27362
|
+
ssf = _objectSpread$j({
|
|
27359
27363
|
pagination: currentPagination,
|
|
27360
27364
|
columns: configuration.columns,
|
|
27361
27365
|
filters: filterData,
|
|
@@ -27369,7 +27373,7 @@ function useTableData (_ref) {
|
|
|
27369
27373
|
data = _context3.sent;
|
|
27370
27374
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
27371
27375
|
currentData = data.data;
|
|
27372
|
-
currentPagination = _objectSpread$
|
|
27376
|
+
currentPagination = _objectSpread$j(_objectSpread$j({}, currentPagination), {}, {
|
|
27373
27377
|
total: data.total
|
|
27374
27378
|
});
|
|
27375
27379
|
_context3.next = 29;
|
|
@@ -27386,7 +27390,7 @@ function useTableData (_ref) {
|
|
|
27386
27390
|
currentData = _data3.data;
|
|
27387
27391
|
setInitData(currentData);
|
|
27388
27392
|
case 26:
|
|
27389
|
-
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$
|
|
27393
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$j(_objectSpread$j({}, p), {}, {
|
|
27390
27394
|
pagination: currentPagination,
|
|
27391
27395
|
filters: filterData,
|
|
27392
27396
|
data: currentData,
|
|
@@ -27395,11 +27399,11 @@ function useTableData (_ref) {
|
|
|
27395
27399
|
currentData = _data4;
|
|
27396
27400
|
currentPagination = pagination;
|
|
27397
27401
|
case 29:
|
|
27398
|
-
setState(_objectSpread$
|
|
27402
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
27399
27403
|
loading: false,
|
|
27400
27404
|
data: currentData,
|
|
27401
27405
|
pagination: currentPagination,
|
|
27402
|
-
mappingData: _objectSpread$
|
|
27406
|
+
mappingData: _objectSpread$j(_objectSpread$j({}, parentData), {}, {
|
|
27403
27407
|
prefilter: prefilter
|
|
27404
27408
|
}),
|
|
27405
27409
|
currentFetchUrl: currentUrl
|
|
@@ -27421,7 +27425,7 @@ function useTableData (_ref) {
|
|
|
27421
27425
|
};
|
|
27422
27426
|
}();
|
|
27423
27427
|
var onSelect = function onSelect(keys) {
|
|
27424
|
-
setState(_objectSpread$
|
|
27428
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
27425
27429
|
selected: keys
|
|
27426
27430
|
}));
|
|
27427
27431
|
};
|
|
@@ -27432,7 +27436,7 @@ function useTableData (_ref) {
|
|
|
27432
27436
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
27433
27437
|
while (1) switch (_context5.prev = _context5.next) {
|
|
27434
27438
|
case 0:
|
|
27435
|
-
setState(_objectSpread$
|
|
27439
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
27436
27440
|
deleting: true
|
|
27437
27441
|
}));
|
|
27438
27442
|
newData = _toConsumableArray(state.data);
|
|
@@ -27472,7 +27476,7 @@ function useTableData (_ref) {
|
|
|
27472
27476
|
} finally {
|
|
27473
27477
|
_iterator.f();
|
|
27474
27478
|
}
|
|
27475
|
-
mappingData = _objectSpread$
|
|
27479
|
+
mappingData = _objectSpread$j(_objectSpread$j(_objectSpread$j({}, mappingData), state.mappingData), mapToggle);
|
|
27476
27480
|
deleteResult = undefined;
|
|
27477
27481
|
_context4.prev = 7;
|
|
27478
27482
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -27562,12 +27566,12 @@ function useTableData (_ref) {
|
|
|
27562
27566
|
break;
|
|
27563
27567
|
}
|
|
27564
27568
|
_context5.next = 25;
|
|
27565
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
27566
|
-
pagination: _objectSpread$
|
|
27569
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$j({
|
|
27570
|
+
pagination: _objectSpread$j(_objectSpread$j({}, state.pagination), {}, {
|
|
27567
27571
|
current: current
|
|
27568
27572
|
}),
|
|
27569
27573
|
columns: configuration.columns,
|
|
27570
|
-
filters: _objectSpread$
|
|
27574
|
+
filters: _objectSpread$j(_objectSpread$j(_objectSpread$j(_objectSpread$j(_objectSpread$j(_objectSpread$j({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter16 = configuration.filter) !== null && _configuration$filter16 !== void 0 && (_configuration$filter16 = _configuration$filter16.toggle) !== null && _configuration$filter16 !== void 0 && _configuration$filter16.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
|
|
27571
27575
|
sorter: filterData.sorter
|
|
27572
27576
|
}, configuration !== null && configuration !== void 0 && (_configuration$filter17 = configuration.filter) !== null && _configuration$filter17 !== void 0 && (_configuration$filter17 = _configuration$filter17.toggle) !== null && _configuration$filter17 !== void 0 && _configuration$filter17.inQuery ? {
|
|
27573
27577
|
genericProps: globalFilter.toggle
|
|
@@ -27578,11 +27582,11 @@ function useTableData (_ref) {
|
|
|
27578
27582
|
total = data.total;
|
|
27579
27583
|
case 28:
|
|
27580
27584
|
setInitData(newInitData);
|
|
27581
|
-
setState(_objectSpread$
|
|
27585
|
+
setState(_objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
27582
27586
|
selected: [],
|
|
27583
27587
|
deleting: false,
|
|
27584
27588
|
data: newData,
|
|
27585
|
-
pagination: _objectSpread$
|
|
27589
|
+
pagination: _objectSpread$j(_objectSpread$j({}, state.pagination), {}, {
|
|
27586
27590
|
current: current === 0 ? 1 : current,
|
|
27587
27591
|
total: total
|
|
27588
27592
|
})
|
|
@@ -27603,14 +27607,14 @@ function useTableData (_ref) {
|
|
|
27603
27607
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
27604
27608
|
return;
|
|
27605
27609
|
}
|
|
27606
|
-
var newGlobalFilter = _objectSpread$
|
|
27610
|
+
var newGlobalFilter = _objectSpread$j({}, globalFilter);
|
|
27607
27611
|
if (value !== null && value !== void 0 && value.length) {
|
|
27608
27612
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
27609
27613
|
} else {
|
|
27610
27614
|
newGlobalFilter.select = {};
|
|
27611
27615
|
}
|
|
27612
27616
|
setGlobaFilter(newGlobalFilter);
|
|
27613
|
-
onChange(_objectSpread$
|
|
27617
|
+
onChange(_objectSpread$j({
|
|
27614
27618
|
pagination: state.pagination
|
|
27615
27619
|
}, filterData), newGlobalFilter);
|
|
27616
27620
|
};
|
|
@@ -27624,11 +27628,11 @@ function useTableData (_ref) {
|
|
|
27624
27628
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
27625
27629
|
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
27626
27630
|
});
|
|
27627
|
-
var newGlobalFilter = _objectSpread$
|
|
27631
|
+
var newGlobalFilter = _objectSpread$j(_objectSpread$j({}, globalFilter), {}, {
|
|
27628
27632
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
27629
27633
|
});
|
|
27630
27634
|
setGlobaFilter(newGlobalFilter);
|
|
27631
|
-
onChange(_objectSpread$
|
|
27635
|
+
onChange(_objectSpread$j({
|
|
27632
27636
|
pagination: state.pagination
|
|
27633
27637
|
}, filterData), newGlobalFilter, undefined, true);
|
|
27634
27638
|
};
|
|
@@ -27641,7 +27645,7 @@ function useTableData (_ref) {
|
|
|
27641
27645
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
27642
27646
|
return;
|
|
27643
27647
|
}
|
|
27644
|
-
var newGlobalFilter = _objectSpread$
|
|
27648
|
+
var newGlobalFilter = _objectSpread$j(_objectSpread$j({}, globalFilter), {}, {
|
|
27645
27649
|
search: {}
|
|
27646
27650
|
});
|
|
27647
27651
|
if (value) {
|
|
@@ -27655,7 +27659,7 @@ function useTableData (_ref) {
|
|
|
27655
27659
|
});
|
|
27656
27660
|
}
|
|
27657
27661
|
setGlobaFilter(newGlobalFilter);
|
|
27658
|
-
onChange(_objectSpread$
|
|
27662
|
+
onChange(_objectSpread$j({
|
|
27659
27663
|
pagination: state.pagination
|
|
27660
27664
|
}, filterData), newGlobalFilter);
|
|
27661
27665
|
};
|
|
@@ -27665,17 +27669,17 @@ function useTableData (_ref) {
|
|
|
27665
27669
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
27666
27670
|
return;
|
|
27667
27671
|
}
|
|
27668
|
-
var newGlobalFilter = _objectSpread$
|
|
27672
|
+
var newGlobalFilter = _objectSpread$j({}, globalFilter);
|
|
27669
27673
|
newGlobalFilter.timeStamp = {
|
|
27670
27674
|
fromTimeStamp: [from],
|
|
27671
27675
|
toTimeStamp: [to]
|
|
27672
27676
|
};
|
|
27673
27677
|
setGlobaFilter(newGlobalFilter);
|
|
27674
|
-
onChange(_objectSpread$
|
|
27678
|
+
onChange(_objectSpread$j({
|
|
27675
27679
|
pagination: state.pagination
|
|
27676
27680
|
}, filterData), newGlobalFilter);
|
|
27677
27681
|
};
|
|
27678
|
-
return _objectSpread$
|
|
27682
|
+
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
27679
27683
|
title: title,
|
|
27680
27684
|
configuration: configuration,
|
|
27681
27685
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -27717,8 +27721,8 @@ function StandardTable (_ref) {
|
|
|
27717
27721
|
});
|
|
27718
27722
|
}
|
|
27719
27723
|
|
|
27720
|
-
function ownKeys$
|
|
27721
|
-
function _objectSpread$
|
|
27724
|
+
function ownKeys$i(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27725
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27722
27726
|
function Table (props) {
|
|
27723
27727
|
var root = useStore();
|
|
27724
27728
|
var variant = useMemo(function () {
|
|
@@ -27726,15 +27730,15 @@ function Table (props) {
|
|
|
27726
27730
|
return config.variant;
|
|
27727
27731
|
}, [props.id]);
|
|
27728
27732
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
27729
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
27733
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$i({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$i({}, props))]
|
|
27730
27734
|
});
|
|
27731
27735
|
}
|
|
27732
27736
|
|
|
27733
27737
|
function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
27734
27738
|
function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
|
|
27735
27739
|
function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
27736
|
-
function ownKeys$
|
|
27737
|
-
function _objectSpread$
|
|
27740
|
+
function ownKeys$h(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27741
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27738
27742
|
function useAGGrid (_ref) {
|
|
27739
27743
|
var id = _ref.id,
|
|
27740
27744
|
filter = _ref.filter,
|
|
@@ -27828,7 +27832,7 @@ function useAGGrid (_ref) {
|
|
|
27828
27832
|
value = _ref3[1];
|
|
27829
27833
|
if (_idx == 0) {
|
|
27830
27834
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
27831
|
-
rdat.push(_objectSpread$
|
|
27835
|
+
rdat.push(_objectSpread$h(_objectSpread$h({}, rd), {}, {
|
|
27832
27836
|
grouping: [idx.toString()]
|
|
27833
27837
|
}));
|
|
27834
27838
|
var sp = key.split(':');
|
|
@@ -27971,8 +27975,8 @@ var value = "value-FCA-6";
|
|
|
27971
27975
|
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";
|
|
27972
27976
|
styleInject(css_248z$a);
|
|
27973
27977
|
|
|
27974
|
-
function ownKeys$
|
|
27975
|
-
function _objectSpread$
|
|
27978
|
+
function ownKeys$g(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27979
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27976
27980
|
var AGChart = function AGChart(_ref) {
|
|
27977
27981
|
var data = _ref.data;
|
|
27978
27982
|
var groupedData = [];
|
|
@@ -27980,11 +27984,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
27980
27984
|
data.forEach(function (dt) {
|
|
27981
27985
|
if (dt.count == 0) return;
|
|
27982
27986
|
if (groupedData.length > dt.grouping[0]) {
|
|
27983
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
27987
|
+
groupedData[dt.grouping[0]].push(_objectSpread$g(_objectSpread$g({}, dt), {}, {
|
|
27984
27988
|
count: Number(dt.count)
|
|
27985
27989
|
}));
|
|
27986
27990
|
} else {
|
|
27987
|
-
groupedData.push([_objectSpread$
|
|
27991
|
+
groupedData.push([_objectSpread$g(_objectSpread$g({}, dt), {}, {
|
|
27988
27992
|
count: Number(dt.count)
|
|
27989
27993
|
})]);
|
|
27990
27994
|
}
|
|
@@ -28025,8 +28029,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
28025
28029
|
});
|
|
28026
28030
|
};
|
|
28027
28031
|
|
|
28028
|
-
function ownKeys$
|
|
28029
|
-
function _objectSpread$
|
|
28032
|
+
function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28033
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28030
28034
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
28031
28035
|
var id = _ref.id,
|
|
28032
28036
|
filter = _ref.filter,
|
|
@@ -28119,7 +28123,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
28119
28123
|
});
|
|
28120
28124
|
});
|
|
28121
28125
|
}
|
|
28122
|
-
return _objectSpread$
|
|
28126
|
+
return _objectSpread$f(_objectSpread$f({}, column), {}, {
|
|
28123
28127
|
cellRenderer: renderer
|
|
28124
28128
|
});
|
|
28125
28129
|
});
|
|
@@ -28389,8 +28393,8 @@ var CustomText = function CustomText(_ref) {
|
|
|
28389
28393
|
};
|
|
28390
28394
|
var CustomText$1 = observer(CustomText);
|
|
28391
28395
|
|
|
28392
|
-
function ownKeys$
|
|
28393
|
-
function _objectSpread$
|
|
28396
|
+
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28397
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28394
28398
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
28395
28399
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
28396
28400
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -28453,7 +28457,7 @@ function useFilterBoxData (id) {
|
|
|
28453
28457
|
} finally {
|
|
28454
28458
|
_iterator.f();
|
|
28455
28459
|
}
|
|
28456
|
-
return _objectSpread$
|
|
28460
|
+
return _objectSpread$e(_objectSpread$e({}, state), ob);
|
|
28457
28461
|
}
|
|
28458
28462
|
return {
|
|
28459
28463
|
configuration: configuration,
|
|
@@ -28467,8 +28471,8 @@ function useFilterBoxData (id) {
|
|
|
28467
28471
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
28468
28472
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
28469
28473
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
28470
|
-
function ownKeys$
|
|
28471
|
-
function _objectSpread$
|
|
28474
|
+
function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28475
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28472
28476
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
28473
28477
|
var id = _ref.id,
|
|
28474
28478
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -28496,7 +28500,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
28496
28500
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
28497
28501
|
mode: "single",
|
|
28498
28502
|
apiInterface: filter.requestOptions,
|
|
28499
|
-
wholeData: _objectSpread$
|
|
28503
|
+
wholeData: _objectSpread$d(_objectSpread$d({}, state.filter), {}, {
|
|
28500
28504
|
tab: tab
|
|
28501
28505
|
}),
|
|
28502
28506
|
mapping: filter.requestMapping,
|
|
@@ -28728,8 +28732,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
28728
28732
|
return false;
|
|
28729
28733
|
});
|
|
28730
28734
|
|
|
28731
|
-
function ownKeys$
|
|
28732
|
-
function _objectSpread$
|
|
28735
|
+
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28736
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28733
28737
|
function useUIBuilderData (id) {
|
|
28734
28738
|
var save = undefined;
|
|
28735
28739
|
var root = useStore();
|
|
@@ -28761,7 +28765,7 @@ function useUIBuilderData (id) {
|
|
|
28761
28765
|
var configuration = _useMemo.configuration;
|
|
28762
28766
|
useEffect(function () {
|
|
28763
28767
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
28764
|
-
return setFilter(_objectSpread$
|
|
28768
|
+
return setFilter(_objectSpread$c(_objectSpread$c({}, filter), {}, {
|
|
28765
28769
|
sessionGuid: res
|
|
28766
28770
|
}));
|
|
28767
28771
|
});
|
|
@@ -28784,8 +28788,8 @@ function useUIBuilderData (id) {
|
|
|
28784
28788
|
};
|
|
28785
28789
|
}
|
|
28786
28790
|
|
|
28787
|
-
function ownKeys$
|
|
28788
|
-
function _objectSpread$
|
|
28791
|
+
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28792
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28789
28793
|
function UIBuilder(_ref) {
|
|
28790
28794
|
var id = _ref.id;
|
|
28791
28795
|
var state = useUIBuilderData(id);
|
|
@@ -28812,7 +28816,7 @@ function UIBuilder(_ref) {
|
|
|
28812
28816
|
override = {
|
|
28813
28817
|
value: newFilter[item.field],
|
|
28814
28818
|
setValue: function setValue(newVal) {
|
|
28815
|
-
var newFilter = _objectSpread$
|
|
28819
|
+
var newFilter = _objectSpread$b({}, state.filter);
|
|
28816
28820
|
newFilter[item.field] = newVal;
|
|
28817
28821
|
state.setFilter(newFilter);
|
|
28818
28822
|
}
|
|
@@ -28860,7 +28864,7 @@ function UIBuilder(_ref) {
|
|
|
28860
28864
|
case 'AGGrid':
|
|
28861
28865
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
28862
28866
|
id: item.id,
|
|
28863
|
-
filter: _objectSpread$
|
|
28867
|
+
filter: _objectSpread$b({
|
|
28864
28868
|
optionCodices: JSON.stringify(state.data)
|
|
28865
28869
|
}, state.filter),
|
|
28866
28870
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -29020,8 +29024,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
29020
29024
|
};
|
|
29021
29025
|
var OrgItem$1 = observer(OrgItem);
|
|
29022
29026
|
|
|
29023
|
-
function ownKeys$
|
|
29024
|
-
function _objectSpread$
|
|
29027
|
+
function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29028
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29025
29029
|
function useTransformJson (_ref) {
|
|
29026
29030
|
var id = _ref.id;
|
|
29027
29031
|
var _useState = useState(),
|
|
@@ -29087,7 +29091,7 @@ function useTransformJson (_ref) {
|
|
|
29087
29091
|
}();
|
|
29088
29092
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
29089
29093
|
var _data$children;
|
|
29090
|
-
return _objectSpread$
|
|
29094
|
+
return _objectSpread$a(_objectSpread$a({}, data), {}, {
|
|
29091
29095
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
29092
29096
|
data: data,
|
|
29093
29097
|
configuration: configuration,
|
|
@@ -29147,7 +29151,7 @@ var arrow = "arrow-Rd0hp";
|
|
|
29147
29151
|
var openClass = "open-class--gGXs";
|
|
29148
29152
|
var breadcrumb = "breadcrumb-Z0VvH";
|
|
29149
29153
|
var selected = "selected-w-sfW";
|
|
29150
|
-
var disabled = "disabled-0nado";
|
|
29154
|
+
var disabled$1 = "disabled-0nado";
|
|
29151
29155
|
var css_248z$8 = ".trigger-wrapper-OkPRc {\n width: 100%;\n padding: 12px 0px;\n display: flex;\n gap: 32px;\n}\n\n.arrow-Rd0hp {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%228%22 height%3D%2213%22 viewBox%3D%220 0 8 13%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cpath d%3D%22M0.947266 1.14893L6.94727 6.29178L0.947266 11.9489%22 stroke%3D%22%236F6F6F%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E %3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n transform: rotateZ(0deg);\n transition: all 0.35s ease;\n width: 20.8px;\n height: 22.4px;\n cursor: pointer;\n}\n\n.open-class--gGXs {\n transform: rotateZ(90deg);\n}\n\n.breadcrumb-Z0VvH {\n transition: color 0.3s;\n}\n.breadcrumb-Z0VvH:hover:not(.selected-w-sfW) {\n cursor: pointer;\n color: #000;\n}\n\n.selected-w-sfW {\n color: #000;\n font-weight: 400;\n}\n\n.selected-w-sfW {\n color: #000;\n font-weight: 400;\n}\n\n.disabled-0nado {\n pointer-events: none;\n color: lightgray;\n}\n\n.darkmode .selected-w-sfW {\n color: #fff;\n font-weight: 400;\n}\n";
|
|
29152
29156
|
styleInject(css_248z$8);
|
|
29153
29157
|
|
|
@@ -29172,7 +29176,7 @@ var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
|
|
|
29172
29176
|
var _root$dataStore;
|
|
29173
29177
|
return root === null || root === void 0 || (_root$dataStore = root.dataStore) === null || _root$dataStore === void 0 ? void 0 : _root$dataStore.setSelectedOrganizationId(data.id);
|
|
29174
29178
|
},
|
|
29175
|
-
className: classnames(breadcrumb, root.dataStore.selectedOrganizationId === data.id ? selected : undefined, !data.readPermission ? disabled : undefined)
|
|
29179
|
+
className: classnames(breadcrumb, root.dataStore.selectedOrganizationId === data.id ? selected : undefined, !data.readPermission ? disabled$1 : undefined)
|
|
29176
29180
|
};
|
|
29177
29181
|
})
|
|
29178
29182
|
})
|
|
@@ -29748,8 +29752,8 @@ function useCatalogEditor (id) {
|
|
|
29748
29752
|
};
|
|
29749
29753
|
}
|
|
29750
29754
|
|
|
29751
|
-
function ownKeys$
|
|
29752
|
-
function _objectSpread$
|
|
29755
|
+
function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29756
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29753
29757
|
function DragDropUpload(_ref) {
|
|
29754
29758
|
var api2Params = _ref.api2Params,
|
|
29755
29759
|
catalogId = _ref.catalogId,
|
|
@@ -29854,7 +29858,7 @@ function DragDropUpload(_ref) {
|
|
|
29854
29858
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
29855
29859
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
29856
29860
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
29857
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
29861
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$9(_objectSpread$9({}, props), {}, {
|
|
29858
29862
|
children: [/*#__PURE__*/jsx("p", {
|
|
29859
29863
|
className: "ant-upload-drag-icon",
|
|
29860
29864
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -30071,12 +30075,12 @@ function CatalogEditor(_ref) {
|
|
|
30071
30075
|
}
|
|
30072
30076
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
30073
30077
|
|
|
30074
|
-
function ownKeys$
|
|
30075
|
-
function _objectSpread$
|
|
30078
|
+
function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30079
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30076
30080
|
var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(props, ref) {
|
|
30077
30081
|
var _root$contentStore$bo, _root$contentStore$ri;
|
|
30078
30082
|
var root = useStore();
|
|
30079
|
-
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$
|
|
30083
|
+
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
30080
30084
|
ref: ref,
|
|
30081
30085
|
darkMode: root.contentStore.theme == 'darkmode',
|
|
30082
30086
|
jwt: root.dataStore.jwt,
|
|
@@ -31504,7 +31508,7 @@ function useConfiguration (configuration) {
|
|
|
31504
31508
|
};
|
|
31505
31509
|
}
|
|
31506
31510
|
|
|
31507
|
-
function PrefilterSelector
|
|
31511
|
+
function PrefilterSelector (_ref) {
|
|
31508
31512
|
var type = _ref.type,
|
|
31509
31513
|
packageId = _ref.packageId,
|
|
31510
31514
|
selectedSerie = _ref.selectedSerie,
|
|
@@ -31630,7 +31634,7 @@ var RenamingTable = function RenamingTable(_ref) {
|
|
|
31630
31634
|
return updateNavigation(id);
|
|
31631
31635
|
},
|
|
31632
31636
|
enricherService: apiConfig.enricherService
|
|
31633
|
-
}), /*#__PURE__*/jsx(PrefilterSelector
|
|
31637
|
+
}), /*#__PURE__*/jsx(PrefilterSelector, {
|
|
31634
31638
|
type: type == 'items' ? 'item' : type == 'options' ? 'option' : type,
|
|
31635
31639
|
packageId: packageId,
|
|
31636
31640
|
selectedSerie: selectedSerie,
|
|
@@ -32096,7 +32100,7 @@ var ExclusivityTable = function ExclusivityTable(_ref) {
|
|
|
32096
32100
|
return updateNavigation(id);
|
|
32097
32101
|
},
|
|
32098
32102
|
enricherService: apiConfig.enricherService
|
|
32099
|
-
}), /*#__PURE__*/jsx(PrefilterSelector
|
|
32103
|
+
}), /*#__PURE__*/jsx(PrefilterSelector, {
|
|
32100
32104
|
type: type.slice(1) //remove the first character 'e' from the type
|
|
32101
32105
|
,
|
|
32102
32106
|
packageId: packageId,
|
|
@@ -32565,8 +32569,8 @@ function useNavigation () {
|
|
|
32565
32569
|
};
|
|
32566
32570
|
}
|
|
32567
32571
|
|
|
32568
|
-
function ownKeys$
|
|
32569
|
-
function _objectSpread$
|
|
32572
|
+
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32573
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32570
32574
|
function UploadButton (_ref) {
|
|
32571
32575
|
var action = _ref.action,
|
|
32572
32576
|
title = _ref.title,
|
|
@@ -32609,7 +32613,7 @@ function UploadButton (_ref) {
|
|
|
32609
32613
|
fileList: fileList
|
|
32610
32614
|
};
|
|
32611
32615
|
return /*#__PURE__*/jsx(Fragment, {
|
|
32612
|
-
children: /*#__PURE__*/jsx(Upload$2, _objectSpread$
|
|
32616
|
+
children: /*#__PURE__*/jsx(Upload$2, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
32613
32617
|
children: /*#__PURE__*/jsx(Button$1, {
|
|
32614
32618
|
icon: /*#__PURE__*/jsx(UploadOutlined$1, {}),
|
|
32615
32619
|
disabled: disabled,
|
|
@@ -33429,55 +33433,33 @@ function CatalogSelector(_ref) {
|
|
|
33429
33433
|
});
|
|
33430
33434
|
}
|
|
33431
33435
|
|
|
33432
|
-
function
|
|
33433
|
-
var
|
|
33434
|
-
catalogId = _ref.catalogId,
|
|
33436
|
+
function SeriesSelector(_ref) {
|
|
33437
|
+
var catalogId = _ref.catalogId,
|
|
33435
33438
|
selectedSerie = _ref.selectedSerie,
|
|
33436
33439
|
setSelectedSerie = _ref.setSelectedSerie,
|
|
33437
|
-
|
|
33438
|
-
|
|
33439
|
-
idmService = _ref.idmService;
|
|
33440
|
+
idmService = _ref.idmService,
|
|
33441
|
+
additionalFields = _ref.additionalFields;
|
|
33440
33442
|
var _useTranslation = useTranslation(),
|
|
33441
33443
|
t = _useTranslation.t,
|
|
33442
33444
|
i18n = _useTranslation.i18n;
|
|
33443
|
-
return /*#__PURE__*/
|
|
33444
|
-
|
|
33445
|
-
|
|
33446
|
-
|
|
33447
|
-
|
|
33448
|
-
|
|
33449
|
-
|
|
33450
|
-
|
|
33451
|
-
|
|
33452
|
-
|
|
33453
|
-
|
|
33454
|
-
|
|
33455
|
-
|
|
33456
|
-
|
|
33457
|
-
|
|
33458
|
-
|
|
33459
|
-
|
|
33460
|
-
|
|
33461
|
-
}
|
|
33462
|
-
}), type === 'option' && /*#__PURE__*/jsx(SimpleSelect, {
|
|
33463
|
-
apiInterface: {
|
|
33464
|
-
read: idmService + '/v3.0/catalogs/' + catalogId + "/features?fields=featureText[".concat(i18n.language.toLocaleUpperCase(), "];featureNo;_id")
|
|
33465
|
-
},
|
|
33466
|
-
selectMapping: {
|
|
33467
|
-
label: "${featureText.".concat(i18n.language.toLocaleUpperCase(), "} (${featureNo})"),
|
|
33468
|
-
value: '${_id}'
|
|
33469
|
-
},
|
|
33470
|
-
autoSelectFirst: true,
|
|
33471
|
-
title: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures'),
|
|
33472
|
-
value: selectedFeature,
|
|
33473
|
-
onChange: function onChange(value) {
|
|
33474
|
-
return setSelectedFeature ? setSelectedFeature(value) : null;
|
|
33475
|
-
},
|
|
33476
|
-
search: true,
|
|
33477
|
-
style: {
|
|
33478
|
-
width: 200
|
|
33479
|
-
}
|
|
33480
|
-
})]
|
|
33445
|
+
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
33446
|
+
apiInterface: {
|
|
33447
|
+
read: idmService + '/v3.0/catalogs/' + catalogId + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id").concat(additionalFields ? ";".concat(additionalFields.join(';')) : '')
|
|
33448
|
+
},
|
|
33449
|
+
selectMapping: {
|
|
33450
|
+
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
|
33451
|
+
value: '${_id}'
|
|
33452
|
+
},
|
|
33453
|
+
autoSelectFirst: true,
|
|
33454
|
+
title: t('backoffice.menu.items.label.IDMCatalogEditorTableSeries'),
|
|
33455
|
+
value: selectedSerie,
|
|
33456
|
+
onChange: function onChange(value) {
|
|
33457
|
+
return setSelectedSerie ? setSelectedSerie(value) : null;
|
|
33458
|
+
},
|
|
33459
|
+
search: true,
|
|
33460
|
+
style: {
|
|
33461
|
+
width: 200
|
|
33462
|
+
}
|
|
33481
33463
|
});
|
|
33482
33464
|
}
|
|
33483
33465
|
|
|
@@ -33575,6 +33557,26 @@ function useModule (currentModules) {
|
|
|
33575
33557
|
to: 'catalogs/idmeditor/catalogs/' + catalogId + '/partlists' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
33576
33558
|
children: t('backoffice.menu.items.label.IDMCatalogEditorTablePartlists')
|
|
33577
33559
|
})
|
|
33560
|
+
}, {
|
|
33561
|
+
key: 'pricefeaturegroups',
|
|
33562
|
+
style: {
|
|
33563
|
+
margin: 0
|
|
33564
|
+
},
|
|
33565
|
+
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
33566
|
+
label: /*#__PURE__*/jsx(Link, {
|
|
33567
|
+
to: 'catalogs/idmeditor/catalogs/' + catalogId + '/pricefeaturegroups' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
33568
|
+
children: t('backoffice.menu.items.label.IDMCatalogEditorTablePriceFeatureGroups')
|
|
33569
|
+
})
|
|
33570
|
+
}, {
|
|
33571
|
+
key: 'prices',
|
|
33572
|
+
style: {
|
|
33573
|
+
margin: 0
|
|
33574
|
+
},
|
|
33575
|
+
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
33576
|
+
label: /*#__PURE__*/jsx(Link, {
|
|
33577
|
+
to: 'catalogs/idmeditor/catalogs/' + catalogId + '/prices' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
33578
|
+
children: t('backoffice.menu.items.label.IDMCatalogEditorTablePrices')
|
|
33579
|
+
})
|
|
33578
33580
|
}];
|
|
33579
33581
|
}, [catalogId]);
|
|
33580
33582
|
if (!catalogId) throw new Error('catalogId is required');
|
|
@@ -34003,8 +34005,7 @@ function TableItems () {
|
|
|
34003
34005
|
return updateNavigation(id);
|
|
34004
34006
|
},
|
|
34005
34007
|
idmService: apiConfig.idmService
|
|
34006
|
-
}), /*#__PURE__*/jsx(
|
|
34007
|
-
type: 'item',
|
|
34008
|
+
}), /*#__PURE__*/jsx(SeriesSelector, {
|
|
34008
34009
|
catalogId: catalogId,
|
|
34009
34010
|
selectedSerie: selectedSerie,
|
|
34010
34011
|
setSelectedSerie: setSelectedSerie,
|
|
@@ -34646,6 +34647,35 @@ function TableFeatures () {
|
|
|
34646
34647
|
});
|
|
34647
34648
|
}
|
|
34648
34649
|
|
|
34650
|
+
function FeatureSelector(_ref) {
|
|
34651
|
+
var catalogId = _ref.catalogId,
|
|
34652
|
+
selectedFeature = _ref.selectedFeature,
|
|
34653
|
+
setSelectedFeature = _ref.setSelectedFeature,
|
|
34654
|
+
idmService = _ref.idmService;
|
|
34655
|
+
var _useTranslation = useTranslation(),
|
|
34656
|
+
t = _useTranslation.t,
|
|
34657
|
+
i18n = _useTranslation.i18n;
|
|
34658
|
+
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
34659
|
+
apiInterface: {
|
|
34660
|
+
read: idmService + '/v3.0/catalogs/' + catalogId + "/features?fields=featureText[".concat(i18n.language.toLocaleUpperCase(), "];featureNo;_id")
|
|
34661
|
+
},
|
|
34662
|
+
selectMapping: {
|
|
34663
|
+
label: "${featureText.".concat(i18n.language.toLocaleUpperCase(), "} (${featureNo})"),
|
|
34664
|
+
value: '${_id}'
|
|
34665
|
+
},
|
|
34666
|
+
autoSelectFirst: true,
|
|
34667
|
+
title: t('backoffice.menu.items.label.IDMCatalogEditorTableFeatures'),
|
|
34668
|
+
value: selectedFeature,
|
|
34669
|
+
onChange: function onChange(value) {
|
|
34670
|
+
return setSelectedFeature ? setSelectedFeature(value) : null;
|
|
34671
|
+
},
|
|
34672
|
+
search: true,
|
|
34673
|
+
style: {
|
|
34674
|
+
width: 200
|
|
34675
|
+
}
|
|
34676
|
+
});
|
|
34677
|
+
}
|
|
34678
|
+
|
|
34649
34679
|
function TableOptions () {
|
|
34650
34680
|
var _useTranslation = useTranslation(),
|
|
34651
34681
|
t = _useTranslation.t;
|
|
@@ -34672,8 +34702,7 @@ function TableOptions () {
|
|
|
34672
34702
|
return updateNavigation(id);
|
|
34673
34703
|
},
|
|
34674
34704
|
idmService: apiConfig.idmService
|
|
34675
|
-
}), /*#__PURE__*/jsx(
|
|
34676
|
-
type: 'option',
|
|
34705
|
+
}), /*#__PURE__*/jsx(FeatureSelector, {
|
|
34677
34706
|
catalogId: catalogId,
|
|
34678
34707
|
selectedFeature: selectedFeature,
|
|
34679
34708
|
setSelectedFeature: setSelectedFeature,
|
|
@@ -34841,8 +34870,8 @@ function TableFeatureClasses () {
|
|
|
34841
34870
|
});
|
|
34842
34871
|
}
|
|
34843
34872
|
|
|
34844
|
-
function ownKeys$
|
|
34845
|
-
function _objectSpread$
|
|
34873
|
+
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34874
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34846
34875
|
var ACTION_TYPES = {
|
|
34847
34876
|
SET_FEATURE_DEFAULT: 'SET_FEATURE_DEFAULT',
|
|
34848
34877
|
SET_FEATURE_FIXED: 'SET_FEATURE_FIXED',
|
|
@@ -34914,7 +34943,7 @@ function OptionCombinationsExpandedEditor(_ref) {
|
|
|
34914
34943
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
34915
34944
|
form = _Form$useForm2[0];
|
|
34916
34945
|
var initialValues = useMemo(function () {
|
|
34917
|
-
return _objectSpread$
|
|
34946
|
+
return _objectSpread$6({
|
|
34918
34947
|
actionType: ACTION_TYPES.SET_FEATURE_DEFAULT,
|
|
34919
34948
|
referenceType: REFERENCE_TYPES.OPTION_REF
|
|
34920
34949
|
}, parseValue(value));
|
|
@@ -35212,6 +35241,10 @@ function OptionCombinations(_ref8) {
|
|
|
35212
35241
|
field: 'actions',
|
|
35213
35242
|
cellDataType: 'text'
|
|
35214
35243
|
}] : []), [{
|
|
35244
|
+
headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
|
|
35245
|
+
field: 'sequence',
|
|
35246
|
+
cellDataType: 'number'
|
|
35247
|
+
}, {
|
|
35215
35248
|
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
35216
35249
|
field: 'lastUpdatedDate',
|
|
35217
35250
|
cellDataType: 'dateString',
|
|
@@ -36089,6 +36122,727 @@ function TablePartlists () {
|
|
|
36089
36122
|
});
|
|
36090
36123
|
}
|
|
36091
36124
|
|
|
36125
|
+
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
36126
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
36127
|
+
function PriceFeatureGroupPercentageSurcharge(_ref) {
|
|
36128
|
+
var _priceFeatureGroup$fe3, _priceFeatureGroup$fe4;
|
|
36129
|
+
var priceFeatureGroup = _ref.priceFeatureGroup,
|
|
36130
|
+
catalogId = _ref.catalogId,
|
|
36131
|
+
apiConfig = _ref.apiConfig,
|
|
36132
|
+
setNodeDataValue = _ref.setNodeDataValue,
|
|
36133
|
+
setIsPercentage = _ref.setIsPercentage;
|
|
36134
|
+
var _useTranslation = useTranslation(),
|
|
36135
|
+
i18n = _useTranslation.i18n;
|
|
36136
|
+
var addFeature = useCallback(function (value) {
|
|
36137
|
+
var _priceFeatureGroup$fe, _priceFeatureGroup$fe2;
|
|
36138
|
+
var newRefs = [].concat(_toConsumableArray((_priceFeatureGroup$fe = priceFeatureGroup.featureNos) !== null && _priceFeatureGroup$fe !== void 0 ? _priceFeatureGroup$fe : []), [value.featureNos]);
|
|
36139
|
+
var newRefsDisplayTexts = [].concat(_toConsumableArray((_priceFeatureGroup$fe2 = priceFeatureGroup.featureNosDisplayTexts) !== null && _priceFeatureGroup$fe2 !== void 0 ? _priceFeatureGroup$fe2 : []), [value.featureNosDisplayTexts]);
|
|
36140
|
+
setNodeDataValue({
|
|
36141
|
+
featureNos: newRefs,
|
|
36142
|
+
featureNosDisplayTexts: newRefsDisplayTexts,
|
|
36143
|
+
isPercentage: true
|
|
36144
|
+
});
|
|
36145
|
+
}, []);
|
|
36146
|
+
var removeFeature = useCallback(function (value) {
|
|
36147
|
+
var index = priceFeatureGroup.featureNos.findIndex(function (featureNo) {
|
|
36148
|
+
return featureNo === value;
|
|
36149
|
+
});
|
|
36150
|
+
var newRefs = _toConsumableArray(priceFeatureGroup.featureNos);
|
|
36151
|
+
var newRefsDisplayTexts = _toConsumableArray(priceFeatureGroup.featureNosDisplayTexts);
|
|
36152
|
+
newRefs.splice(index, 1);
|
|
36153
|
+
newRefsDisplayTexts.splice(index, 1);
|
|
36154
|
+
var updatedPriceFeatureGroup = _objectSpread$5(_objectSpread$5({}, priceFeatureGroup), {}, {
|
|
36155
|
+
featureNos: newRefs,
|
|
36156
|
+
featureNosDisplayTexts: newRefsDisplayTexts
|
|
36157
|
+
});
|
|
36158
|
+
if (newRefs.length === 0) {
|
|
36159
|
+
updatedPriceFeatureGroup.isPercentage = undefined;
|
|
36160
|
+
}
|
|
36161
|
+
setNodeDataValue(updatedPriceFeatureGroup);
|
|
36162
|
+
}, []);
|
|
36163
|
+
var _onDataUpdated = useCallback(function (event) {
|
|
36164
|
+
var count = event.api.getDisplayedRowCount();
|
|
36165
|
+
//one row is always present, it is the row to add new data
|
|
36166
|
+
if (count === 1) {
|
|
36167
|
+
setIsPercentage(undefined);
|
|
36168
|
+
} else {
|
|
36169
|
+
setIsPercentage(true);
|
|
36170
|
+
}
|
|
36171
|
+
}, []);
|
|
36172
|
+
var applicationData = useMemo(function () {
|
|
36173
|
+
return {
|
|
36174
|
+
catalogId: catalogId,
|
|
36175
|
+
priceFeatureGroupId: priceFeatureGroup._id
|
|
36176
|
+
};
|
|
36177
|
+
}, [catalogId, priceFeatureGroup._id]);
|
|
36178
|
+
var apiInterface = {
|
|
36179
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${priceFeatureGroupId}/percentagesurcharges',
|
|
36180
|
+
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${priceFeatureGroupId}/percentagesurcharges',
|
|
36181
|
+
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${priceFeatureGroupId}/percentagesurcharges/${_id}',
|
|
36182
|
+
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${priceFeatureGroupId}/percentagesurcharges/${_id}',
|
|
36183
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${priceFeatureGroupId}/percentagesurcharges/${_id}'
|
|
36184
|
+
};
|
|
36185
|
+
return /*#__PURE__*/jsx(Spreadsheet, {
|
|
36186
|
+
gridId: 'crud-grid_priceFeatureGroupPercentageSurcharge',
|
|
36187
|
+
applicationData: applicationData,
|
|
36188
|
+
hooks: {
|
|
36189
|
+
onDataUpdated: function onDataUpdated(event) {
|
|
36190
|
+
return _onDataUpdated(event);
|
|
36191
|
+
}
|
|
36192
|
+
},
|
|
36193
|
+
configuration: {
|
|
36194
|
+
type: 'dotnetSSM',
|
|
36195
|
+
apiInterface: apiInterface,
|
|
36196
|
+
dateFormat: 'LL',
|
|
36197
|
+
colDef: [].concat(_toConsumableArray((_priceFeatureGroup$fe3 = (_priceFeatureGroup$fe4 = priceFeatureGroup.featureNos) === null || _priceFeatureGroup$fe4 === void 0 ? void 0 : _priceFeatureGroup$fe4.map(function (featureNos, i) {
|
|
36198
|
+
var _priceFeatureGroup$fe5, _priceFeatureGroup$fe6;
|
|
36199
|
+
return {
|
|
36200
|
+
headerName: (_priceFeatureGroup$fe5 = (_priceFeatureGroup$fe6 = priceFeatureGroup.featureNosDisplayTexts) === null || _priceFeatureGroup$fe6 === void 0 || (_priceFeatureGroup$fe6 = _priceFeatureGroup$fe6[i]) === null || _priceFeatureGroup$fe6 === void 0 ? void 0 : _priceFeatureGroup$fe6[i18n.language.toUpperCase()]) !== null && _priceFeatureGroup$fe5 !== void 0 ? _priceFeatureGroup$fe5 : featureNos,
|
|
36201
|
+
field: "optionsSetRefs.".concat(featureNos),
|
|
36202
|
+
editable: true,
|
|
36203
|
+
isDictionary: true,
|
|
36204
|
+
lockPosition: 'left',
|
|
36205
|
+
headerComponentParams: {
|
|
36206
|
+
additionalElement: /*#__PURE__*/jsx(Button, {
|
|
36207
|
+
icon: /*#__PURE__*/jsx(DeleteOutlined$1, {}),
|
|
36208
|
+
type: "text",
|
|
36209
|
+
size: "small",
|
|
36210
|
+
onClick: function onClick(e) {
|
|
36211
|
+
e.stopPropagation();
|
|
36212
|
+
removeFeature(featureNos);
|
|
36213
|
+
}
|
|
36214
|
+
})
|
|
36215
|
+
}
|
|
36216
|
+
};
|
|
36217
|
+
})) !== null && _priceFeatureGroup$fe3 !== void 0 ? _priceFeatureGroup$fe3 : []), [{
|
|
36218
|
+
headerName: 'backoffice.idmCatalog.priceFeatureGroupPercentageSurcharge.label.newFeature',
|
|
36219
|
+
field: 'featureNos',
|
|
36220
|
+
editable: false,
|
|
36221
|
+
filter: false,
|
|
36222
|
+
lockPosition: 'left',
|
|
36223
|
+
headerComponent: 'editColumnHeader',
|
|
36224
|
+
headerComponentParams: {
|
|
36225
|
+
onChange: addFeature,
|
|
36226
|
+
editorElement: 'lookup',
|
|
36227
|
+
editorElementProps: {
|
|
36228
|
+
nameField: 'featureNosDisplayTexts',
|
|
36229
|
+
apiInterface: {
|
|
36230
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
|
|
36231
|
+
},
|
|
36232
|
+
filter: function filter(_, lookupData) {
|
|
36233
|
+
var _priceFeatureGroup$fe7;
|
|
36234
|
+
return !((_priceFeatureGroup$fe7 = priceFeatureGroup.featureNos) !== null && _priceFeatureGroup$fe7 !== void 0 && _priceFeatureGroup$fe7.includes(lookupData.featureNo));
|
|
36235
|
+
},
|
|
36236
|
+
lookupValue: 'featureText',
|
|
36237
|
+
lookupKey: 'featureNo',
|
|
36238
|
+
lookupKeyFilterType: {
|
|
36239
|
+
type: 'equals',
|
|
36240
|
+
filterType: 'number'
|
|
36241
|
+
},
|
|
36242
|
+
multiple: false,
|
|
36243
|
+
translated: true
|
|
36244
|
+
}
|
|
36245
|
+
}
|
|
36246
|
+
}, {
|
|
36247
|
+
headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
|
|
36248
|
+
field: 'sequence',
|
|
36249
|
+
cellDataType: 'number'
|
|
36250
|
+
}, {
|
|
36251
|
+
headerName: 'backoffice.idmCatalog.priceFeatureGroupPercentageSurcharge.label.priceFactor',
|
|
36252
|
+
field: 'priceFactor',
|
|
36253
|
+
cellDataType: 'number'
|
|
36254
|
+
}, {
|
|
36255
|
+
headerName: 'backoffice.idmCatalog.priceFeatureGroupPercentageSurcharge.label.priceFeatureGroups',
|
|
36256
|
+
field: 'priceFeatureGroups',
|
|
36257
|
+
cellDataType: 'array'
|
|
36258
|
+
}, {
|
|
36259
|
+
headerName: 'backoffice.idmCatalog.priceGroupFinishes.label.validFromDate',
|
|
36260
|
+
field: 'validFromDate',
|
|
36261
|
+
cellDataType: 'dateString'
|
|
36262
|
+
}, {
|
|
36263
|
+
headerName: 'backoffice.idmCatalog.priceGroupFinishes.label.validUntilDate',
|
|
36264
|
+
field: 'validUntilDate',
|
|
36265
|
+
cellDataType: 'dateString'
|
|
36266
|
+
}, {
|
|
36267
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
36268
|
+
field: 'createdDate',
|
|
36269
|
+
cellDataType: 'dateString',
|
|
36270
|
+
editable: false
|
|
36271
|
+
}, {
|
|
36272
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
36273
|
+
field: 'createdByDisplayText',
|
|
36274
|
+
editable: false
|
|
36275
|
+
}, {
|
|
36276
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
36277
|
+
field: 'lastUpdatedByDisplayText',
|
|
36278
|
+
editable: false
|
|
36279
|
+
}, {
|
|
36280
|
+
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
36281
|
+
field: '_id',
|
|
36282
|
+
editable: false
|
|
36283
|
+
}, {
|
|
36284
|
+
field: 'organizationId',
|
|
36285
|
+
editable: false,
|
|
36286
|
+
hide: true,
|
|
36287
|
+
lockVisible: true,
|
|
36288
|
+
suppressColumnsToolPanel: true,
|
|
36289
|
+
defaultValue: '${organizationId}'
|
|
36290
|
+
}, {
|
|
36291
|
+
field: 'catalogId',
|
|
36292
|
+
editable: false,
|
|
36293
|
+
hide: true,
|
|
36294
|
+
lockVisible: true,
|
|
36295
|
+
suppressColumnsToolPanel: true,
|
|
36296
|
+
defaultValue: '${catalogId}'
|
|
36297
|
+
}, {
|
|
36298
|
+
field: 'optionsSetRefs',
|
|
36299
|
+
hide: true,
|
|
36300
|
+
lockVisible: true,
|
|
36301
|
+
suppressColumnsToolPanel: true
|
|
36302
|
+
}])
|
|
36303
|
+
}
|
|
36304
|
+
});
|
|
36305
|
+
}
|
|
36306
|
+
|
|
36307
|
+
function PriceFeatureGroupFinishes(_ref) {
|
|
36308
|
+
var _priceFeatureGroup$fe3, _priceFeatureGroup$fe4;
|
|
36309
|
+
var priceFeatureGroup = _ref.priceFeatureGroup,
|
|
36310
|
+
catalogId = _ref.catalogId,
|
|
36311
|
+
apiConfig = _ref.apiConfig,
|
|
36312
|
+
setNodeDataValue = _ref.setNodeDataValue,
|
|
36313
|
+
setIsPercentage = _ref.setIsPercentage;
|
|
36314
|
+
var _useTranslation = useTranslation(),
|
|
36315
|
+
i18n = _useTranslation.i18n;
|
|
36316
|
+
var addFeature = useCallback(function (value) {
|
|
36317
|
+
var _priceFeatureGroup$fe, _priceFeatureGroup$fe2;
|
|
36318
|
+
var newRefs = [].concat(_toConsumableArray((_priceFeatureGroup$fe = priceFeatureGroup.featureNos) !== null && _priceFeatureGroup$fe !== void 0 ? _priceFeatureGroup$fe : []), [value.featureNos]);
|
|
36319
|
+
var newRefsDisplayTexts = [].concat(_toConsumableArray((_priceFeatureGroup$fe2 = priceFeatureGroup.featureNosDisplayTexts) !== null && _priceFeatureGroup$fe2 !== void 0 ? _priceFeatureGroup$fe2 : []), [value.featureNosDisplayTexts]);
|
|
36320
|
+
setNodeDataValue({
|
|
36321
|
+
featureNos: newRefs,
|
|
36322
|
+
featureNosDisplayTexts: newRefsDisplayTexts
|
|
36323
|
+
});
|
|
36324
|
+
}, []);
|
|
36325
|
+
var removeFeature = useCallback(function (value) {
|
|
36326
|
+
var index = priceFeatureGroup.featureNos.findIndex(function (featureNo) {
|
|
36327
|
+
return featureNo === value;
|
|
36328
|
+
});
|
|
36329
|
+
var newRefs = _toConsumableArray(priceFeatureGroup.featureNos);
|
|
36330
|
+
var newRefsDisplayTexts = _toConsumableArray(priceFeatureGroup.featureNosDisplayTexts);
|
|
36331
|
+
newRefs.splice(index, 1);
|
|
36332
|
+
newRefsDisplayTexts.splice(index, 1);
|
|
36333
|
+
setNodeDataValue({
|
|
36334
|
+
featureNos: newRefs,
|
|
36335
|
+
featureNosDisplayTexts: newRefsDisplayTexts
|
|
36336
|
+
});
|
|
36337
|
+
}, []);
|
|
36338
|
+
var _onDataUpdated = useCallback(function (event) {
|
|
36339
|
+
var count = event.api.getDisplayedRowCount();
|
|
36340
|
+
//one row is always present, it is the row to add new data
|
|
36341
|
+
if (count === 1) {
|
|
36342
|
+
setIsPercentage(undefined);
|
|
36343
|
+
} else {
|
|
36344
|
+
setIsPercentage(false);
|
|
36345
|
+
}
|
|
36346
|
+
}, []);
|
|
36347
|
+
var applicationData = useMemo(function () {
|
|
36348
|
+
return {
|
|
36349
|
+
catalogId: catalogId,
|
|
36350
|
+
priceFeatureGroupId: priceFeatureGroup._id
|
|
36351
|
+
};
|
|
36352
|
+
}, [catalogId, priceFeatureGroup._id]);
|
|
36353
|
+
var apiInterface = {
|
|
36354
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${priceFeatureGroupId}/finishes',
|
|
36355
|
+
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${priceFeatureGroupId}/finishes',
|
|
36356
|
+
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${priceFeatureGroupId}/finishes/${_id}',
|
|
36357
|
+
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${priceFeatureGroupId}/finishes/${_id}',
|
|
36358
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${priceFeatureGroupId}/finishes/${_id}'
|
|
36359
|
+
};
|
|
36360
|
+
return /*#__PURE__*/jsx(Spreadsheet, {
|
|
36361
|
+
gridId: 'crud-grid_priceGroupFinishes',
|
|
36362
|
+
applicationData: applicationData,
|
|
36363
|
+
hooks: {
|
|
36364
|
+
onDataUpdated: function onDataUpdated(event) {
|
|
36365
|
+
return _onDataUpdated(event);
|
|
36366
|
+
}
|
|
36367
|
+
},
|
|
36368
|
+
configuration: {
|
|
36369
|
+
type: 'dotnetSSM',
|
|
36370
|
+
apiInterface: apiInterface,
|
|
36371
|
+
dateFormat: 'LL',
|
|
36372
|
+
colDef: [].concat(_toConsumableArray((_priceFeatureGroup$fe3 = (_priceFeatureGroup$fe4 = priceFeatureGroup.featureNos) === null || _priceFeatureGroup$fe4 === void 0 ? void 0 : _priceFeatureGroup$fe4.map(function (featureNos, i) {
|
|
36373
|
+
var _priceFeatureGroup$fe5, _priceFeatureGroup$fe6;
|
|
36374
|
+
return {
|
|
36375
|
+
headerName: (_priceFeatureGroup$fe5 = (_priceFeatureGroup$fe6 = priceFeatureGroup.featureNosDisplayTexts) === null || _priceFeatureGroup$fe6 === void 0 || (_priceFeatureGroup$fe6 = _priceFeatureGroup$fe6[i]) === null || _priceFeatureGroup$fe6 === void 0 ? void 0 : _priceFeatureGroup$fe6[i18n.language.toUpperCase()]) !== null && _priceFeatureGroup$fe5 !== void 0 ? _priceFeatureGroup$fe5 : featureNos,
|
|
36376
|
+
field: "optionsSetRefs.".concat(featureNos),
|
|
36377
|
+
editable: true,
|
|
36378
|
+
isDictionary: true,
|
|
36379
|
+
lockPosition: 'left',
|
|
36380
|
+
headerComponentParams: {
|
|
36381
|
+
additionalElement: /*#__PURE__*/jsx(Button, {
|
|
36382
|
+
icon: /*#__PURE__*/jsx(DeleteOutlined$1, {}),
|
|
36383
|
+
type: "text",
|
|
36384
|
+
size: "small",
|
|
36385
|
+
onClick: function onClick(e) {
|
|
36386
|
+
e.stopPropagation();
|
|
36387
|
+
removeFeature(featureNos);
|
|
36388
|
+
}
|
|
36389
|
+
})
|
|
36390
|
+
}
|
|
36391
|
+
};
|
|
36392
|
+
})) !== null && _priceFeatureGroup$fe3 !== void 0 ? _priceFeatureGroup$fe3 : []), [{
|
|
36393
|
+
headerName: 'backoffice.idmCatalog.priceGroupFinishes.label.newFeature',
|
|
36394
|
+
field: 'featureNos',
|
|
36395
|
+
editable: false,
|
|
36396
|
+
filter: false,
|
|
36397
|
+
lockPosition: 'left',
|
|
36398
|
+
headerComponent: 'editColumnHeader',
|
|
36399
|
+
headerComponentParams: {
|
|
36400
|
+
onChange: addFeature,
|
|
36401
|
+
editorElement: 'lookup',
|
|
36402
|
+
editorElementProps: {
|
|
36403
|
+
nameField: 'featureNosDisplayTexts',
|
|
36404
|
+
apiInterface: {
|
|
36405
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/features'
|
|
36406
|
+
},
|
|
36407
|
+
filter: function filter(_, lookupData) {
|
|
36408
|
+
var _priceFeatureGroup$fe7;
|
|
36409
|
+
return !((_priceFeatureGroup$fe7 = priceFeatureGroup.featureNos) !== null && _priceFeatureGroup$fe7 !== void 0 && _priceFeatureGroup$fe7.includes(lookupData.featureNo));
|
|
36410
|
+
},
|
|
36411
|
+
lookupValue: 'featureText',
|
|
36412
|
+
lookupKey: 'featureNo',
|
|
36413
|
+
lookupKeyFilterType: {
|
|
36414
|
+
type: 'equals',
|
|
36415
|
+
filterType: 'number'
|
|
36416
|
+
},
|
|
36417
|
+
multiple: false,
|
|
36418
|
+
translated: true
|
|
36419
|
+
}
|
|
36420
|
+
}
|
|
36421
|
+
}, {
|
|
36422
|
+
headerName: 'backoffice.idmCatalogEditor.general.label.sequenceNo',
|
|
36423
|
+
field: 'sequence',
|
|
36424
|
+
cellDataType: 'number'
|
|
36425
|
+
}, {
|
|
36426
|
+
headerName: 'backoffice.idmCatalog.priceGroupFinishes.label.priceField',
|
|
36427
|
+
field: 'priceField',
|
|
36428
|
+
cellDataType: 'number'
|
|
36429
|
+
}, {
|
|
36430
|
+
headerName: 'backoffice.idmCatalog.priceGroupFinishes.label.supplierPriceGroup',
|
|
36431
|
+
field: 'supplierPriceGroup',
|
|
36432
|
+
cellDataType: 'text'
|
|
36433
|
+
}, {
|
|
36434
|
+
headerName: 'backoffice.idmCatalog.priceGroupFinishes.label.validFromDate',
|
|
36435
|
+
field: 'validFromDate',
|
|
36436
|
+
cellDataType: 'dateString'
|
|
36437
|
+
}, {
|
|
36438
|
+
headerName: 'backoffice.idmCatalog.priceGroupFinishes.label.validUntilDate',
|
|
36439
|
+
field: 'validUntilDate',
|
|
36440
|
+
cellDataType: 'dateString'
|
|
36441
|
+
}, {
|
|
36442
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
36443
|
+
field: 'createdDate',
|
|
36444
|
+
cellDataType: 'dateString',
|
|
36445
|
+
editable: false
|
|
36446
|
+
}, {
|
|
36447
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
36448
|
+
field: 'createdByDisplayText',
|
|
36449
|
+
editable: false
|
|
36450
|
+
}, {
|
|
36451
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
36452
|
+
field: 'lastUpdatedByDisplayText',
|
|
36453
|
+
editable: false
|
|
36454
|
+
}, {
|
|
36455
|
+
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
36456
|
+
field: '_id',
|
|
36457
|
+
editable: false
|
|
36458
|
+
}, {
|
|
36459
|
+
field: 'organizationId',
|
|
36460
|
+
editable: false,
|
|
36461
|
+
hide: true,
|
|
36462
|
+
lockVisible: true,
|
|
36463
|
+
suppressColumnsToolPanel: true,
|
|
36464
|
+
defaultValue: '${organizationId}'
|
|
36465
|
+
}, {
|
|
36466
|
+
field: 'catalogId',
|
|
36467
|
+
editable: false,
|
|
36468
|
+
hide: true,
|
|
36469
|
+
lockVisible: true,
|
|
36470
|
+
suppressColumnsToolPanel: true,
|
|
36471
|
+
defaultValue: '${catalogId}'
|
|
36472
|
+
}, {
|
|
36473
|
+
field: 'optionsSetRefs',
|
|
36474
|
+
hide: true,
|
|
36475
|
+
lockVisible: true,
|
|
36476
|
+
suppressColumnsToolPanel: true
|
|
36477
|
+
}])
|
|
36478
|
+
}
|
|
36479
|
+
});
|
|
36480
|
+
}
|
|
36481
|
+
|
|
36482
|
+
function TablePriceFeatureGroups () {
|
|
36483
|
+
var _useTranslation = useTranslation(),
|
|
36484
|
+
t = _useTranslation.t;
|
|
36485
|
+
var root = useStore();
|
|
36486
|
+
var spreadsheetRef = useRef(null);
|
|
36487
|
+
var _useModule = useModule(['pricefeaturegroups']),
|
|
36488
|
+
catalogId = _useModule.catalogId,
|
|
36489
|
+
organizationId = _useModule.organizationId,
|
|
36490
|
+
updateNavigation = _useModule.updateNavigation,
|
|
36491
|
+
apiConfig = _useModule.apiConfig;
|
|
36492
|
+
var _React$useState = React.useState(),
|
|
36493
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
36494
|
+
selectedPriceFeatureGroup = _React$useState2[0],
|
|
36495
|
+
setSelectedPriceFeatureGroup = _React$useState2[1];
|
|
36496
|
+
var _React$useState3 = React.useState(),
|
|
36497
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
36498
|
+
selectedNodeId = _React$useState4[0],
|
|
36499
|
+
setSelectedNodeId = _React$useState4[1];
|
|
36500
|
+
var _React$useState5 = React.useState(undefined),
|
|
36501
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
36502
|
+
isPercentage = _React$useState6[0],
|
|
36503
|
+
setIsPercentage = _React$useState6[1];
|
|
36504
|
+
useEffect(function () {
|
|
36505
|
+
if (selectedPriceFeatureGroup !== null && selectedPriceFeatureGroup !== void 0 && selectedPriceFeatureGroup._id) {
|
|
36506
|
+
var _root$contentStore$bo;
|
|
36507
|
+
root.contentStore.bottomToolBar.tools = [{
|
|
36508
|
+
id: 'priceFeatureGroupFinishes',
|
|
36509
|
+
name: t('backoffice.menu.items.label.IDMCatalogEditorTablePriceFeatureGroupFinishes'),
|
|
36510
|
+
element: /*#__PURE__*/jsx(PriceFeatureGroupFinishes, {
|
|
36511
|
+
priceFeatureGroup: selectedPriceFeatureGroup,
|
|
36512
|
+
catalogId: catalogId,
|
|
36513
|
+
apiConfig: apiConfig,
|
|
36514
|
+
setNodeDataValue: function setNodeDataValue(data) {
|
|
36515
|
+
return spreadsheetRef.current.setNodeDataValue(selectedNodeId, data);
|
|
36516
|
+
},
|
|
36517
|
+
setIsPercentage: setIsPercentage
|
|
36518
|
+
}),
|
|
36519
|
+
disabled: isPercentage === true
|
|
36520
|
+
}, {
|
|
36521
|
+
id: 'priceFeatureGroupPercentageSurcharge',
|
|
36522
|
+
name: t('backoffice.menu.items.label.IDMCatalogEditorTablePriceFeatureGroupPercentageSurcharge'),
|
|
36523
|
+
element: /*#__PURE__*/jsx(PriceFeatureGroupPercentageSurcharge, {
|
|
36524
|
+
priceFeatureGroup: selectedPriceFeatureGroup,
|
|
36525
|
+
catalogId: catalogId,
|
|
36526
|
+
apiConfig: apiConfig,
|
|
36527
|
+
setNodeDataValue: function setNodeDataValue(data) {
|
|
36528
|
+
return spreadsheetRef.current.setNodeDataValue(selectedNodeId, data);
|
|
36529
|
+
},
|
|
36530
|
+
setIsPercentage: setIsPercentage
|
|
36531
|
+
}),
|
|
36532
|
+
startWidth: 300,
|
|
36533
|
+
defaultPinned: false,
|
|
36534
|
+
defaultOpen: false,
|
|
36535
|
+
disabled: isPercentage === false
|
|
36536
|
+
}];
|
|
36537
|
+
var openTool = (_root$contentStore$bo = root.contentStore.bottomToolBar.currentOpenTool) === null || _root$contentStore$bo === void 0 ? void 0 : _root$contentStore$bo.id;
|
|
36538
|
+
root.contentStore.bottomToolBar.openTool(isPercentage === true ? 'priceFeatureGroupPercentageSurcharge' : isPercentage === false ? 'priceFeatureGroupFinishes' : openTool !== null && openTool !== void 0 ? openTool : 'priceFeatureGroupFinishes');
|
|
36539
|
+
} else {
|
|
36540
|
+
root.contentStore.bottomToolBar.tools = [];
|
|
36541
|
+
}
|
|
36542
|
+
}, [selectedPriceFeatureGroup, isPercentage]);
|
|
36543
|
+
useEffect(function () {
|
|
36544
|
+
//remove secondary table, when pricefeaturegroups are unmounted
|
|
36545
|
+
return function () {
|
|
36546
|
+
root.contentStore.bottomToolBar.tools = [];
|
|
36547
|
+
};
|
|
36548
|
+
}, []);
|
|
36549
|
+
var applicationData = useMemo(function () {
|
|
36550
|
+
return {
|
|
36551
|
+
catalogId: catalogId,
|
|
36552
|
+
organizationId: organizationId
|
|
36553
|
+
};
|
|
36554
|
+
}, [catalogId]);
|
|
36555
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
36556
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
36557
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
36558
|
+
children: [t('backoffice.menu.items.label.IDMCatalogEditorTablePriceFeatureGroups'), /*#__PURE__*/jsx(Space$1, {
|
|
36559
|
+
style: {
|
|
36560
|
+
"float": 'right'
|
|
36561
|
+
},
|
|
36562
|
+
children: /*#__PURE__*/jsx(CatalogSelector, {
|
|
36563
|
+
selectedCatalog: catalogId,
|
|
36564
|
+
setSelectedCatalog: function setSelectedCatalog(id) {
|
|
36565
|
+
return updateNavigation(id);
|
|
36566
|
+
},
|
|
36567
|
+
idmService: apiConfig.idmService,
|
|
36568
|
+
organizationId: organizationId
|
|
36569
|
+
})
|
|
36570
|
+
})]
|
|
36571
|
+
})
|
|
36572
|
+
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
36573
|
+
gridId: 'crud-grid_pricefeaturegroups',
|
|
36574
|
+
ref: spreadsheetRef,
|
|
36575
|
+
applicationData: applicationData,
|
|
36576
|
+
hooks: {
|
|
36577
|
+
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
|
36578
|
+
if (event.selection.length == 1) {
|
|
36579
|
+
setSelectedPriceFeatureGroup(event.selection[0].node.data);
|
|
36580
|
+
setSelectedNodeId(event.selection[0].node.id);
|
|
36581
|
+
setIsPercentage(event.selection[0].node.data.isPercentage);
|
|
36582
|
+
} else {
|
|
36583
|
+
setSelectedPriceFeatureGroup(undefined);
|
|
36584
|
+
setSelectedNodeId(undefined);
|
|
36585
|
+
setIsPercentage(undefined);
|
|
36586
|
+
}
|
|
36587
|
+
},
|
|
36588
|
+
onDataUpdated: function onDataUpdated(_ref) {
|
|
36589
|
+
var updates = _ref.updates;
|
|
36590
|
+
var current = updates.find(function (update) {
|
|
36591
|
+
return update.node.id == selectedNodeId;
|
|
36592
|
+
});
|
|
36593
|
+
if (current) {
|
|
36594
|
+
setSelectedPriceFeatureGroup(current.data);
|
|
36595
|
+
}
|
|
36596
|
+
}
|
|
36597
|
+
},
|
|
36598
|
+
configuration: {
|
|
36599
|
+
type: 'dotnetSSM',
|
|
36600
|
+
apiInterface: {
|
|
36601
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups',
|
|
36602
|
+
create: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups',
|
|
36603
|
+
restore: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${_id}',
|
|
36604
|
+
"delete": apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${_id}',
|
|
36605
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/pricefeaturegroups/${_id}'
|
|
36606
|
+
},
|
|
36607
|
+
dateFormat: 'LL',
|
|
36608
|
+
colDef: [{
|
|
36609
|
+
field: 'priceFeatureGroupNo',
|
|
36610
|
+
headerName: 'backoffice.idmCatalog.pricefeaturegroups.label.priceFeatureGroupNo',
|
|
36611
|
+
required: true
|
|
36612
|
+
}, {
|
|
36613
|
+
headerName: 'backoffice.idmCatalog.pricefeaturegroups.label.priceFeatureGroupText',
|
|
36614
|
+
marryChildren: true,
|
|
36615
|
+
children: [{
|
|
36616
|
+
field: 'priceFeatureGroupText.DE',
|
|
36617
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
36618
|
+
isDictionary: true,
|
|
36619
|
+
required: true
|
|
36620
|
+
}, {
|
|
36621
|
+
field: 'priceFeatureGroupText.EN',
|
|
36622
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
36623
|
+
isDictionary: true
|
|
36624
|
+
}, {
|
|
36625
|
+
field: 'priceFeatureGroupText.FR',
|
|
36626
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
36627
|
+
isDictionary: true
|
|
36628
|
+
}, {
|
|
36629
|
+
field: 'priceFeatureGroupText.IT',
|
|
36630
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
36631
|
+
isDictionary: true
|
|
36632
|
+
}]
|
|
36633
|
+
}, {
|
|
36634
|
+
field: 'comment',
|
|
36635
|
+
headerName: 'backoffice.idmCatalog.pricefeaturegroups.label.comment'
|
|
36636
|
+
}, {
|
|
36637
|
+
field: 'additionalPrice',
|
|
36638
|
+
headerName: 'backoffice.idmCatalog.pricefeaturegroups.label.additionalPrice',
|
|
36639
|
+
required: true,
|
|
36640
|
+
cellDataType: 'boolean',
|
|
36641
|
+
defaultValue: false
|
|
36642
|
+
}, {
|
|
36643
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
36644
|
+
field: 'lastUpdatedDate',
|
|
36645
|
+
cellDataType: 'dateString',
|
|
36646
|
+
editable: false
|
|
36647
|
+
}, {
|
|
36648
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
36649
|
+
field: 'createdDate',
|
|
36650
|
+
cellDataType: 'dateString',
|
|
36651
|
+
editable: false
|
|
36652
|
+
}, {
|
|
36653
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
36654
|
+
field: 'createdByDisplayText',
|
|
36655
|
+
editable: false
|
|
36656
|
+
}, {
|
|
36657
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
36658
|
+
field: 'lastUpdatedByDisplayText',
|
|
36659
|
+
editable: false
|
|
36660
|
+
}, {
|
|
36661
|
+
headerName: 'backoffice.idmCatalog.general.label._id',
|
|
36662
|
+
field: '_id',
|
|
36663
|
+
editable: false
|
|
36664
|
+
}, {
|
|
36665
|
+
field: 'organizationId',
|
|
36666
|
+
editable: false,
|
|
36667
|
+
hide: true,
|
|
36668
|
+
lockVisible: true,
|
|
36669
|
+
suppressColumnsToolPanel: true,
|
|
36670
|
+
defaultValue: '${organizationId}'
|
|
36671
|
+
}, {
|
|
36672
|
+
field: 'catalogId',
|
|
36673
|
+
editable: false,
|
|
36674
|
+
hide: true,
|
|
36675
|
+
lockVisible: true,
|
|
36676
|
+
suppressColumnsToolPanel: true,
|
|
36677
|
+
defaultValue: '${catalogId}'
|
|
36678
|
+
}, {
|
|
36679
|
+
field: 'isPercentage',
|
|
36680
|
+
editable: false,
|
|
36681
|
+
hide: true,
|
|
36682
|
+
lockVisible: true,
|
|
36683
|
+
suppressColumnsToolPanel: true,
|
|
36684
|
+
defaultValue: null
|
|
36685
|
+
}, {
|
|
36686
|
+
field: 'featureNos',
|
|
36687
|
+
editable: false,
|
|
36688
|
+
hide: true,
|
|
36689
|
+
lockVisible: true,
|
|
36690
|
+
suppressColumnsToolPanel: true,
|
|
36691
|
+
additionalFields: ['featureNosDisplayTexts']
|
|
36692
|
+
}]
|
|
36693
|
+
}
|
|
36694
|
+
})]
|
|
36695
|
+
});
|
|
36696
|
+
}
|
|
36697
|
+
|
|
36698
|
+
function TablePrices () {
|
|
36699
|
+
var _priceFeatureGroups$m;
|
|
36700
|
+
var _useTranslation = useTranslation(),
|
|
36701
|
+
t = _useTranslation.t,
|
|
36702
|
+
i18n = _useTranslation.i18n;
|
|
36703
|
+
var _useModule = useModule(['prices']),
|
|
36704
|
+
catalogId = _useModule.catalogId,
|
|
36705
|
+
updateNavigation = _useModule.updateNavigation,
|
|
36706
|
+
apiConfig = _useModule.apiConfig,
|
|
36707
|
+
organizationId = _useModule.organizationId;
|
|
36708
|
+
var _React$useState = React.useState(),
|
|
36709
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
36710
|
+
selectedSerie = _React$useState2[0],
|
|
36711
|
+
setSelectedSerie = _React$useState2[1];
|
|
36712
|
+
var applicationData = useMemo(function () {
|
|
36713
|
+
return {
|
|
36714
|
+
organizationId: organizationId,
|
|
36715
|
+
catalogId: catalogId,
|
|
36716
|
+
serieId: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id
|
|
36717
|
+
};
|
|
36718
|
+
}, [organizationId, catalogId, selectedSerie]);
|
|
36719
|
+
var priceFeatureGroups = useMemo(function () {
|
|
36720
|
+
return getPriceFeatureGroups(selectedSerie, i18n.language);
|
|
36721
|
+
}, [selectedSerie, i18n.language]);
|
|
36722
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
36723
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
36724
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
36725
|
+
children: [t('backoffice.menu.prices.label.IDMCatalogEditorTablePrices'), /*#__PURE__*/jsxs(Space$1, {
|
|
36726
|
+
style: {
|
|
36727
|
+
"float": 'right'
|
|
36728
|
+
},
|
|
36729
|
+
children: [/*#__PURE__*/jsx(CatalogSelector, {
|
|
36730
|
+
organizationId: organizationId,
|
|
36731
|
+
selectedCatalog: catalogId,
|
|
36732
|
+
setSelectedCatalog: function setSelectedCatalog(id) {
|
|
36733
|
+
return updateNavigation(id);
|
|
36734
|
+
},
|
|
36735
|
+
idmService: apiConfig.idmService
|
|
36736
|
+
}), /*#__PURE__*/jsx(SeriesSelector, {
|
|
36737
|
+
catalogId: catalogId,
|
|
36738
|
+
selectedSerie: selectedSerie,
|
|
36739
|
+
setSelectedSerie: setSelectedSerie,
|
|
36740
|
+
idmService: apiConfig.idmService,
|
|
36741
|
+
additionalFields: ['pricefeaturegroups', 'pricefeaturegroupsDisplayTexts', 'pricefeaturegroupsKeys']
|
|
36742
|
+
})]
|
|
36743
|
+
})]
|
|
36744
|
+
})
|
|
36745
|
+
}), selectedSerie && /*#__PURE__*/jsx(Spreadsheet, {
|
|
36746
|
+
gridId: 'crud-grid_prices',
|
|
36747
|
+
applicationData: applicationData,
|
|
36748
|
+
configuration: {
|
|
36749
|
+
type: 'dotnetSSM',
|
|
36750
|
+
idCol: 'typeNo',
|
|
36751
|
+
apiInterface: {
|
|
36752
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${serieId}/prices',
|
|
36753
|
+
update: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${serieId}/items/${typeNo}/prices',
|
|
36754
|
+
usePut: true
|
|
36755
|
+
},
|
|
36756
|
+
dateFormat: 'LL',
|
|
36757
|
+
floatingFilter: true,
|
|
36758
|
+
colDef: [{
|
|
36759
|
+
field: 'typeNo',
|
|
36760
|
+
headerName: 'backoffice.idmCatalog.prices.label.typeNo',
|
|
36761
|
+
cellDataType: 'lookup',
|
|
36762
|
+
customParams: {
|
|
36763
|
+
nameField: 'typeNoDisplayText',
|
|
36764
|
+
displayLabelTemplate: '${name} (${value})',
|
|
36765
|
+
apiInterface: {
|
|
36766
|
+
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${serieId}/items'
|
|
36767
|
+
},
|
|
36768
|
+
lookupValue: 'shortText',
|
|
36769
|
+
lookupKey: 'typeNo',
|
|
36770
|
+
multiple: false,
|
|
36771
|
+
translated: true
|
|
36772
|
+
},
|
|
36773
|
+
additionalFields: ['typeNoDisplayText'],
|
|
36774
|
+
isDictionary: true,
|
|
36775
|
+
editable: false
|
|
36776
|
+
}].concat(_toConsumableArray((_priceFeatureGroups$m = priceFeatureGroups.map(function (priceFeatureGroup) {
|
|
36777
|
+
var _priceFeatureGroup$ke;
|
|
36778
|
+
return {
|
|
36779
|
+
headerName: priceFeatureGroup.displayText,
|
|
36780
|
+
marryChildren: true,
|
|
36781
|
+
children: _toConsumableArray((_priceFeatureGroup$ke = priceFeatureGroup.keys.map(function (key) {
|
|
36782
|
+
return {
|
|
36783
|
+
headerName: key,
|
|
36784
|
+
field: "prices.".concat(key),
|
|
36785
|
+
editable: true,
|
|
36786
|
+
isDictionary: true,
|
|
36787
|
+
cellDataType: 'number'
|
|
36788
|
+
};
|
|
36789
|
+
})) !== null && _priceFeatureGroup$ke !== void 0 ? _priceFeatureGroup$ke : [])
|
|
36790
|
+
};
|
|
36791
|
+
})) !== null && _priceFeatureGroups$m !== void 0 ? _priceFeatureGroups$m : []), [{
|
|
36792
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedDate',
|
|
36793
|
+
field: 'lastUpdatedDate',
|
|
36794
|
+
cellDataType: 'dateString',
|
|
36795
|
+
editable: false
|
|
36796
|
+
}, {
|
|
36797
|
+
headerName: 'backoffice.idmCatalog.general.label.createdDate',
|
|
36798
|
+
field: 'createdDate',
|
|
36799
|
+
cellDataType: 'dateString',
|
|
36800
|
+
editable: false
|
|
36801
|
+
}, {
|
|
36802
|
+
headerName: 'backoffice.idmCatalog.general.label.createdByDisplayText',
|
|
36803
|
+
field: 'createdByDisplayText',
|
|
36804
|
+
editable: false
|
|
36805
|
+
}, {
|
|
36806
|
+
headerName: 'backoffice.idmCatalog.general.label.lastUpdatedByDisplayText',
|
|
36807
|
+
field: 'lastUpdatedByDisplayText',
|
|
36808
|
+
editable: false
|
|
36809
|
+
}, {
|
|
36810
|
+
field: 'prices',
|
|
36811
|
+
editable: false,
|
|
36812
|
+
hide: true,
|
|
36813
|
+
lockVisible: true,
|
|
36814
|
+
suppressColumnsToolPanel: true
|
|
36815
|
+
}])
|
|
36816
|
+
}
|
|
36817
|
+
})]
|
|
36818
|
+
});
|
|
36819
|
+
}
|
|
36820
|
+
function getPriceFeatureGroups(selectedSerie, language) {
|
|
36821
|
+
var _selectedSerie$pricef;
|
|
36822
|
+
if (!selectedSerie) {
|
|
36823
|
+
return [];
|
|
36824
|
+
}
|
|
36825
|
+
var priceFeatureGroups = (_selectedSerie$pricef = selectedSerie.pricefeaturegroups) === null || _selectedSerie$pricef === void 0 ? void 0 : _selectedSerie$pricef.map(function (priceFeatureGroups, i) {
|
|
36826
|
+
var _selectedSerie$pricef2, _selectedSerie$pricef3;
|
|
36827
|
+
return {
|
|
36828
|
+
id: priceFeatureGroups,
|
|
36829
|
+
displayText: (_selectedSerie$pricef2 = (_selectedSerie$pricef3 = selectedSerie.pricefeaturegroupsDisplayTexts) === null || _selectedSerie$pricef3 === void 0 || (_selectedSerie$pricef3 = _selectedSerie$pricef3[i]) === null || _selectedSerie$pricef3 === void 0 ? void 0 : _selectedSerie$pricef3[language.toUpperCase()]) !== null && _selectedSerie$pricef2 !== void 0 ? _selectedSerie$pricef2 : priceFeatureGroups,
|
|
36830
|
+
keys: []
|
|
36831
|
+
};
|
|
36832
|
+
});
|
|
36833
|
+
selectedSerie.pricefeaturegroupsKeys.forEach(function (priceFeatureGroupKey) {
|
|
36834
|
+
var pfgSplit = priceFeatureGroupKey.split('_');
|
|
36835
|
+
var pfgId = pfgSplit[0].replace('PRFG', '');
|
|
36836
|
+
var pfg = priceFeatureGroups.find(function (pfg) {
|
|
36837
|
+
return pfg.id == pfgId;
|
|
36838
|
+
});
|
|
36839
|
+
if (pfg) {
|
|
36840
|
+
pfg.keys.push(priceFeatureGroupKey);
|
|
36841
|
+
}
|
|
36842
|
+
});
|
|
36843
|
+
return priceFeatureGroups;
|
|
36844
|
+
}
|
|
36845
|
+
|
|
36092
36846
|
function IDMCatalogEditor (_ref) {
|
|
36093
36847
|
_objectDestructuringEmpty(_ref);
|
|
36094
36848
|
return /*#__PURE__*/jsx("div", {
|
|
@@ -36130,6 +36884,12 @@ function Content$1() {
|
|
|
36130
36884
|
}), /*#__PURE__*/jsx(Route, {
|
|
36131
36885
|
path: ":catalogId/detailinfos",
|
|
36132
36886
|
element: /*#__PURE__*/jsx(TableDetailInfos, {})
|
|
36887
|
+
}), /*#__PURE__*/jsx(Route, {
|
|
36888
|
+
path: ":catalogId/pricefeaturegroups",
|
|
36889
|
+
element: /*#__PURE__*/jsx(TablePriceFeatureGroups, {})
|
|
36890
|
+
}), /*#__PURE__*/jsx(Route, {
|
|
36891
|
+
path: ":catalogId/prices",
|
|
36892
|
+
element: /*#__PURE__*/jsx(TablePrices, {})
|
|
36133
36893
|
})]
|
|
36134
36894
|
});
|
|
36135
36895
|
}
|
|
@@ -36755,9 +37515,10 @@ var bottom = "bottom-cqyfS";
|
|
|
36755
37515
|
var midHandle = "mid-handle--qh50";
|
|
36756
37516
|
var toolsSelector = "tools-selector-BHV3Z";
|
|
36757
37517
|
var toolItem = "tool-item-KyKgQ";
|
|
37518
|
+
var disabled = "disabled-6aIG9";
|
|
36758
37519
|
var sel = "sel-iUm8X";
|
|
36759
37520
|
var button = "button-K-0KR";
|
|
36760
|
-
var css_248z$3 = ".container-BucHG {\n height: 100%;\n width: 100%;\n position: relative;\n z-index: 1001;\n overflow: auto;\n}\n\n.right--XETU .container-BucHG {\n z-index: 1003;\n}\n\n.unpinned-right-tbnNb.container-BucHG {\n right: 37px;\n position: absolute;\n}\n\n.draghandle-f5b0N {\n position: absolute;\n top: 0px;\n background-color: rgba(128, 128, 128, 0.3);\n z-index: 1002;\n}\n\n.right--XETU .draghandle-f5b0N {\n height: 100%;\n width: 2px;\n left: -1px;\n cursor: ew-resize;\n z-index: 1004;\n}\n\n.bottom-cqyfS .draghandle-f5b0N {\n height: 2px;\n width: 100%;\n cursor: ns-resize;\n}\n\n.mid-handle--qh50 {\n position: absolute;\n background-color: rgba(128, 128, 128, 0.3);\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.right--XETU .mid-handle--qh50 {\n width: 5px;\n height: 32px;\n border-left: 2px solid grey;\n border-right: 2px solid grey;\n}\n\n.bottom-cqyfS .mid-handle--qh50 {\n height: 5px;\n width: 32px;\n border-top: 2px solid gray;\n border-bottom: 2px solid gray;\n}\n\n.tools-selector-BHV3Z {\n z-index: 1000;\n display: flex;\n position: relative;\n gap: 16px;\n align-items: center;\n background-color: #f5f5f5;\n}\n\n.darkmode .tools-selector-BHV3Z {\n background-color: #001529;\n color: rgba(255, 255, 255, 0.85);\n}\n\n.right--XETU .tools-selector-BHV3Z {\n width: 36px;\n height: 100%;\n padding-top: 16px;\n flex-direction: column;\n}\n\n.bottom-cqyfS .tools-selector-BHV3Z {\n width: 100%;\n height: 36px;\n padding-top: 0;\n flex-direction: row;\n}\n\n.tool-item-KyKgQ {\n padding: 10px;\n cursor: pointer;\n position: relative;\n}\n\n.right--XETU .tool-item-KyKgQ {\n writing-mode: vertical-lr;\n text-orientation: mixed;\n}\n\n.tool-item-KyKgQ::after {\n content: '';\n position: absolute;\n background-color: #0088ff;\n transition: all ease-in-out 0.2s;\n}\n\n.right--XETU .tool-item-KyKgQ::after {\n width: 3px;\n height: 0px;\n left: 1px;\n bottom: 50%;\n}\n\n.right--XETU .tool-item-KyKgQ:hover::after,\n.right--XETU .sel-iUm8X::after {\n height: 100%;\n bottom: 0;\n}\n\n.bottom-cqyfS .tool-item-KyKgQ::after {\n width: 0px;\n height: 3px;\n bottom: 1px;\n left: 50%;\n}\n\n.bottom-cqyfS .tool-item-KyKgQ:hover::after,\n.bottom-cqyfS .sel-iUm8X::after {\n width: 100%;\n left: 0;\n}\n\n.button-K-0KR {\n width: 40px;\n justify-content: center;\n}\n";
|
|
37521
|
+
var css_248z$3 = ".container-BucHG {\n height: 100%;\n width: 100%;\n position: relative;\n z-index: 1001;\n overflow: auto;\n}\n\n.right--XETU .container-BucHG {\n z-index: 1003;\n}\n\n.unpinned-right-tbnNb.container-BucHG {\n right: 37px;\n position: absolute;\n}\n\n.draghandle-f5b0N {\n position: absolute;\n top: 0px;\n background-color: rgba(128, 128, 128, 0.3);\n z-index: 1002;\n}\n\n.right--XETU .draghandle-f5b0N {\n height: 100%;\n width: 2px;\n left: -1px;\n cursor: ew-resize;\n z-index: 1004;\n}\n\n.bottom-cqyfS .draghandle-f5b0N {\n height: 2px;\n width: 100%;\n cursor: ns-resize;\n}\n\n.mid-handle--qh50 {\n position: absolute;\n background-color: rgba(128, 128, 128, 0.3);\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.right--XETU .mid-handle--qh50 {\n width: 5px;\n height: 32px;\n border-left: 2px solid grey;\n border-right: 2px solid grey;\n}\n\n.bottom-cqyfS .mid-handle--qh50 {\n height: 5px;\n width: 32px;\n border-top: 2px solid gray;\n border-bottom: 2px solid gray;\n}\n\n.tools-selector-BHV3Z {\n z-index: 1000;\n display: flex;\n position: relative;\n gap: 16px;\n align-items: center;\n background-color: #f5f5f5;\n}\n\n.darkmode .tools-selector-BHV3Z {\n background-color: #001529;\n color: rgba(255, 255, 255, 0.85);\n}\n\n.right--XETU .tools-selector-BHV3Z {\n width: 36px;\n height: 100%;\n padding-top: 16px;\n flex-direction: column;\n}\n\n.bottom-cqyfS .tools-selector-BHV3Z {\n width: 100%;\n height: 36px;\n padding-top: 0;\n flex-direction: row;\n}\n\n.tool-item-KyKgQ {\n padding: 10px;\n cursor: pointer;\n position: relative;\n}\n\n.tool-item-KyKgQ.disabled-6aIG9 {\n opacity: 0.5;\n cursor: default;\n}\n\n.right--XETU .tool-item-KyKgQ {\n writing-mode: vertical-lr;\n text-orientation: mixed;\n}\n\n.tool-item-KyKgQ::after {\n content: '';\n position: absolute;\n background-color: #0088ff;\n transition: all ease-in-out 0.2s;\n}\n\n.right--XETU .tool-item-KyKgQ::after {\n width: 3px;\n height: 0px;\n left: 1px;\n bottom: 50%;\n}\n\n.right--XETU .tool-item-KyKgQ:not(.disabled-6aIG9):hover::after,\n.right--XETU .sel-iUm8X::after {\n height: 100%;\n bottom: 0;\n}\n\n.bottom-cqyfS .tool-item-KyKgQ::after {\n width: 0px;\n height: 3px;\n bottom: 1px;\n left: 50%;\n}\n\n.bottom-cqyfS .tool-item-KyKgQ:not(.disabled-6aIG9):hover::after,\n.bottom-cqyfS .sel-iUm8X::after {\n width: 100%;\n left: 0;\n}\n\n.button-K-0KR {\n width: 40px;\n justify-content: center;\n}\n";
|
|
36761
37522
|
styleInject(css_248z$3);
|
|
36762
37523
|
|
|
36763
37524
|
var wrapper$1 = "wrapper-Q13-g";
|
|
@@ -37263,7 +38024,6 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
37263
38024
|
})
|
|
37264
38025
|
}), !toolBar.hidden && toolBar.currentOpenTool && /*#__PURE__*/jsx("div", {
|
|
37265
38026
|
className: classnames(container$1, _defineProperty({}, unpinnedRight, !toolBar.pinned && position === 'right')),
|
|
37266
|
-
hidden: toolBar.hidden,
|
|
37267
38027
|
style: {
|
|
37268
38028
|
width: position === 'right' ? toolBar.width : undefined,
|
|
37269
38029
|
minWidth: position === 'right' ? toolBar.width : undefined,
|
|
@@ -37275,7 +38035,7 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
37275
38035
|
toolbar: toolBar,
|
|
37276
38036
|
loading: toolBar.isLoading(toolBar.currentOpenTool.id)
|
|
37277
38037
|
})
|
|
37278
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
38038
|
+
}, toolBar.currentOpenTool.id), /*#__PURE__*/jsxs("div", {
|
|
37279
38039
|
className: classnames(toolsSelector),
|
|
37280
38040
|
children: [/*#__PURE__*/jsxs("div", {
|
|
37281
38041
|
children: [!toolBar.pinned && /*#__PURE__*/jsx(PushpinOutlined, {
|
|
@@ -37293,9 +38053,10 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
37293
38053
|
}), toolBar.tools.map(function (t) {
|
|
37294
38054
|
var _toolBar$currentOpenT;
|
|
37295
38055
|
return /*#__PURE__*/jsx("div", {
|
|
37296
|
-
className: classnames(toolItem, _defineProperty({}, sel, t.id === ((_toolBar$currentOpenT = toolBar.currentOpenTool) === null || _toolBar$currentOpenT === void 0 ? void 0 : _toolBar$currentOpenT.id))),
|
|
38056
|
+
className: classnames(toolItem, _defineProperty(_defineProperty({}, sel, t.id === ((_toolBar$currentOpenT = toolBar.currentOpenTool) === null || _toolBar$currentOpenT === void 0 ? void 0 : _toolBar$currentOpenT.id)), disabled, t.disabled)),
|
|
37297
38057
|
onClick: function onClick() {
|
|
37298
38058
|
var _toolBar$currentOpenT2;
|
|
38059
|
+
if (t.disabled) return;
|
|
37299
38060
|
if (((_toolBar$currentOpenT2 = toolBar.currentOpenTool) === null || _toolBar$currentOpenT2 === void 0 ? void 0 : _toolBar$currentOpenT2.id) != t.id) {
|
|
37300
38061
|
toolBar.openTool(t.id);
|
|
37301
38062
|
toolBar.hidden = false;
|
|
@@ -37311,25 +38072,28 @@ var Toolbar = function Toolbar(_ref) {
|
|
|
37311
38072
|
};
|
|
37312
38073
|
var Toolbar$1 = observer(Toolbar);
|
|
37313
38074
|
function ToolElement(_ref2) {
|
|
37314
|
-
var _tool$element;
|
|
37315
38075
|
var tool = _ref2.tool,
|
|
37316
38076
|
toolbar = _ref2.toolbar,
|
|
37317
38077
|
loading = _ref2.loading;
|
|
37318
|
-
var Tool = (
|
|
37319
|
-
|
|
37320
|
-
|
|
37321
|
-
|
|
37322
|
-
|
|
37323
|
-
|
|
37324
|
-
|
|
37325
|
-
|
|
37326
|
-
|
|
37327
|
-
|
|
37328
|
-
|
|
37329
|
-
|
|
37330
|
-
|
|
37331
|
-
|
|
37332
|
-
|
|
38078
|
+
var Tool = useMemo(function () {
|
|
38079
|
+
var _tool$element;
|
|
38080
|
+
var Tool = (_tool$element = tool.element) !== null && _tool$element !== void 0 ? _tool$element : /*#__PURE__*/jsx(Fragment, {});
|
|
38081
|
+
switch (tool.type) {
|
|
38082
|
+
case 'Configurator':
|
|
38083
|
+
Tool = /*#__PURE__*/jsx(Wsyiwyg, {
|
|
38084
|
+
tool: tool,
|
|
38085
|
+
toolbar: toolbar
|
|
38086
|
+
});
|
|
38087
|
+
break;
|
|
38088
|
+
case 'ContentItem':
|
|
38089
|
+
Tool = /*#__PURE__*/jsx(WsyiwygContentItem, {
|
|
38090
|
+
tool: tool,
|
|
38091
|
+
toolbar: toolbar
|
|
38092
|
+
});
|
|
38093
|
+
break;
|
|
38094
|
+
}
|
|
38095
|
+
return Tool;
|
|
38096
|
+
}, [tool.id, tool.type, tool.parameters]);
|
|
37333
38097
|
return /*#__PURE__*/jsx(Layout$1, {
|
|
37334
38098
|
style: {
|
|
37335
38099
|
height: '100%',
|