@crystaldesign/diva-backoffice 25.2.0-beta.1 → 25.2.0-beta.10
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 +1750 -659
- package/build/types/backoffice/src/ui/IDMCatalogEditor/modules/TablePrices/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMCommonComponents/usePriceFeatureGroupsFromSerie.d.ts +8 -0
- package/build/types/backoffice/src/ui/IDMCommonComponents/usePriceFeatureGroupsFromSerie.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceDisplayCellRenderer/index.d.ts +15 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceDisplayCellRenderer/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceFactorInput/index.d.ts +12 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/PriceFactorInput/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/index.d.ts +10 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/Tables/Prices/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/FeatureSelector.d.ts +11 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/FeatureSelector.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/PackageSelector.d.ts +10 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/PackageSelector.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/SeriesSelector.d.ts +12 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelectors/SeriesSelector.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PriceFactorCellRenderer/index.d.ts +16 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PriceFactorCellRenderer/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PriceFactorCellRenderer/priceFactorHelpers.d.ts +77 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PriceFactorCellRenderer/priceFactorHelpers.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PriceFactorCellRenderer/usePriceFactor.d.ts +30 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PriceFactorCellRenderer/usePriceFactor.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableExclusivity/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePriceList/index.d.ts +3 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePriceList/index.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/useModule.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts +1 -1
- package/build/types/backoffice/src/ui/SelectSimple/useSelectSimpleData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/utils/applyFilterAndSortation.d.ts +25 -24
- package/build/types/backoffice/src/ui/Table/utils/applyFilterAndSortation.d.ts.map +1 -1
- package/package.json +10 -10
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PackageSelector/index.d.ts +0 -8
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PackageSelector/index.d.ts.map +0 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelector/index.d.ts +0 -12
- package/build/types/backoffice/src/ui/IDMEnricherEditor/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$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; }
|
|
154
|
+
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; }
|
|
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$V(_objectSpread$V({}, 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$V(_objectSpread$V({}, 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$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; }
|
|
480
|
+
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; }
|
|
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$U(_objectSpread$U({}, 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$U({}, 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$U(_objectSpread$U({}, 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$U(_objectSpread$U({}, 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$U(_objectSpread$U({}, 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$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; }
|
|
1266
|
+
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; }
|
|
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$T({}, 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$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; }
|
|
1744
|
+
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; }
|
|
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$S(_objectSpread$S({}, config), {}, {
|
|
1781
1781
|
items: filteredItems
|
|
1782
1782
|
});
|
|
1783
1783
|
}
|
|
@@ -7817,10 +7817,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7817
7817
|
style: {
|
|
7818
7818
|
marginBottom: '20px'
|
|
7819
7819
|
},
|
|
7820
|
-
permission: 'backoffice_admin_organizations'
|
|
7821
|
-
hidden: function hidden(data) {
|
|
7822
|
-
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
|
7823
|
-
}
|
|
7820
|
+
permission: 'backoffice_admin_organizations'
|
|
7824
7821
|
}, {
|
|
7825
7822
|
name: 'Info',
|
|
7826
7823
|
type: 'text',
|
|
@@ -7828,10 +7825,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7828
7825
|
marginBottom: '30px'
|
|
7829
7826
|
},
|
|
7830
7827
|
text: t('backoffice.form.organizationdetails.items.licensesdesc'),
|
|
7831
|
-
permission: 'backoffice_admin_organizations'
|
|
7832
|
-
hidden: function hidden(data) {
|
|
7833
|
-
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
|
7834
|
-
}
|
|
7828
|
+
permission: 'backoffice_admin_organizations'
|
|
7835
7829
|
}, {
|
|
7836
7830
|
name: ['settings', 'enable3DExport'],
|
|
7837
7831
|
label: t('backoffice.form.organizationdetails.items.settings.enable3DExport'),
|
|
@@ -7938,10 +7932,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7938
7932
|
style: {
|
|
7939
7933
|
marginBottom: '40px'
|
|
7940
7934
|
},
|
|
7941
|
-
permission: 'backoffice_admin_organizations'
|
|
7942
|
-
hidden: function hidden(data) {
|
|
7943
|
-
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
|
7944
|
-
}
|
|
7935
|
+
permission: 'backoffice_admin_organizations'
|
|
7945
7936
|
}, {
|
|
7946
7937
|
name: 'iln',
|
|
7947
7938
|
label: t('backoffice.form.organizationdetails.items.iln'),
|
|
@@ -12764,8 +12755,8 @@ var navMinified = "nav-minified-tSt-a";
|
|
|
12764
12755
|
var navOverlay = "nav-overlay-rKJNC";
|
|
12765
12756
|
var navSettings = "nav-settings-82cjv";
|
|
12766
12757
|
var menuLabel = "menu-label-4dXQk";
|
|
12767
|
-
var css_248z$
|
|
12768
|
-
styleInject(css_248z$
|
|
12758
|
+
var css_248z$t = ".nav-minify-button-ZX7dm {\n color: rgba(255, 255, 255, 0.65);\n background: #001529;\n cursor: pointer;\n padding: 10px;\n height: 40px;\n}\n\n.nav-minify-button-ZX7dm:hover {\n color: #fff;\n background-color: rgba(0, 0, 0, 0.06);\n}\n\n.nav-minify-button-ZX7dm .anticon {\n float: right;\n}\n\n.nav-container-JCR24 {\n display: flex;\n min-width: 30px;\n overflow: visible;\n z-index: 10001;\n}\n\n.nav-container-JCR24 .ant-layout-sider-children {\n display: flex;\n flex-direction: column;\n}\n\n.nav-minified-tSt-a {\n flex: 0 0 30px !important;\n max-width: 30px !important;\n min-width: 30px !important;\n width: 30px !important;\n}\n\n.nav-minified-tSt-a {\n /* position: absolute !important; */\n height: 100%;\n z-index: 1;\n}\n\n.nav-overlay-rKJNC {\n max-width: 200px !important;\n min-width: 200px !important;\n width: 200px !important;\n}\n\n.nav-minified-tSt-a .ant-menu-root {\n display: none;\n}\n\n.nav-overlay-rKJNC .ant-menu-root {\n display: inline;\n display: initial;\n}\n\n.nav-settings-82cjv {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: auto 18px 55px;\n}\n\n.nav-container-JCR24 .ant-menu-title-content {\n overflow: visible;\n}\n\n.menu-label-4dXQk {\n display: flex;\n}\n\n.ant-menu .ant-menu-item .menu-label-4dXQk .anticon {\n margin-left: auto;\n margin-right: -6px;\n font-size: 10px;\n}\n\n.menu-label-4dXQk span:first-child {\n width: 120px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n";
|
|
12759
|
+
styleInject(css_248z$t);
|
|
12769
12760
|
|
|
12770
12761
|
function MenuLabel (_ref) {
|
|
12771
12762
|
var disabled = _ref.disabled,
|
|
@@ -13143,8 +13134,8 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
13143
13134
|
}]);
|
|
13144
13135
|
}();
|
|
13145
13136
|
|
|
13146
|
-
function ownKeys$
|
|
13147
|
-
function _objectSpread$
|
|
13137
|
+
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; }
|
|
13138
|
+
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; }
|
|
13148
13139
|
var _default$6 = /*#__PURE__*/function () {
|
|
13149
13140
|
function _default(root) {
|
|
13150
13141
|
_classCallCheck(this, _default);
|
|
@@ -13221,7 +13212,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13221
13212
|
if (index >= 0) {
|
|
13222
13213
|
this._additionalMenuElements[index] = {
|
|
13223
13214
|
key: key,
|
|
13224
|
-
element: _objectSpread$
|
|
13215
|
+
element: _objectSpread$R(_objectSpread$R({}, this._additionalMenuElements[index].element), {}, {
|
|
13225
13216
|
items: items,
|
|
13226
13217
|
selected: selected
|
|
13227
13218
|
})
|
|
@@ -13272,7 +13263,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13272
13263
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
13273
13264
|
this.root.navigate('/' + path);
|
|
13274
13265
|
}
|
|
13275
|
-
this._menuElement1 = _objectSpread$
|
|
13266
|
+
this._menuElement1 = _objectSpread$R(_objectSpread$R({}, this.menuElement1), {}, {
|
|
13276
13267
|
selected: this._selectedMenuKeys[0]
|
|
13277
13268
|
});
|
|
13278
13269
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -13516,7 +13507,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13516
13507
|
return items.filter(function (item) {
|
|
13517
13508
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
13518
13509
|
}).map(function (item) {
|
|
13519
|
-
return _objectSpread$
|
|
13510
|
+
return _objectSpread$R(_objectSpread$R({}, item), {}, {
|
|
13520
13511
|
items: item.items ? _this4.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
13521
13512
|
subMenu: item.subMenu ? _this4.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
13522
13513
|
});
|
|
@@ -15262,8 +15253,8 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
15262
15253
|
}]);
|
|
15263
15254
|
}();
|
|
15264
15255
|
|
|
15265
|
-
function ownKeys$
|
|
15266
|
-
function _objectSpread$
|
|
15256
|
+
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; }
|
|
15257
|
+
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; }
|
|
15267
15258
|
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; } } }; }
|
|
15268
15259
|
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; } }
|
|
15269
15260
|
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; }
|
|
@@ -15385,7 +15376,7 @@ function useFormData (_ref) {
|
|
|
15385
15376
|
multipleEditingData = inboundData;
|
|
15386
15377
|
}
|
|
15387
15378
|
return {
|
|
15388
|
-
loadedData: _onLoadFields(_objectSpread$
|
|
15379
|
+
loadedData: _onLoadFields(_objectSpread$Q({}, dt)),
|
|
15389
15380
|
multipleEditingData: multipleEditingData
|
|
15390
15381
|
};
|
|
15391
15382
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -15422,7 +15413,7 @@ function useFormData (_ref) {
|
|
|
15422
15413
|
setFieldErrors = _useState20[1];
|
|
15423
15414
|
useEffect(function () {
|
|
15424
15415
|
var _loadedData$_id2;
|
|
15425
|
-
setState(_objectSpread$
|
|
15416
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15426
15417
|
data: loadedData,
|
|
15427
15418
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
15428
15419
|
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),
|
|
@@ -15524,7 +15515,7 @@ function useFormData (_ref) {
|
|
|
15524
15515
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
15525
15516
|
while (1) switch (_context2.prev = _context2.next) {
|
|
15526
15517
|
case 0:
|
|
15527
|
-
newData = merge(_objectSpread$
|
|
15518
|
+
newData = merge(_objectSpread$Q({}, state.data), values);
|
|
15528
15519
|
if (!skipApi) {
|
|
15529
15520
|
_context2.next = 3;
|
|
15530
15521
|
break;
|
|
@@ -15534,7 +15525,7 @@ function useFormData (_ref) {
|
|
|
15534
15525
|
root.actions.toggleLoading('saving_form');
|
|
15535
15526
|
_context2.prev = 4;
|
|
15536
15527
|
_context2.next = 7;
|
|
15537
|
-
return setDynamicFields(_objectSpread$
|
|
15528
|
+
return setDynamicFields(_objectSpread$Q({}, state.data), newData);
|
|
15538
15529
|
case 7:
|
|
15539
15530
|
newData = _context2.sent;
|
|
15540
15531
|
_context2.next = 10;
|
|
@@ -15549,7 +15540,7 @@ function useFormData (_ref) {
|
|
|
15549
15540
|
root.actions.toggleLoading('saving_form');
|
|
15550
15541
|
throw _context2.t0;
|
|
15551
15542
|
case 17:
|
|
15552
|
-
setState(_objectSpread$
|
|
15543
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15553
15544
|
loading: true
|
|
15554
15545
|
}));
|
|
15555
15546
|
finalData = state.data;
|
|
@@ -15602,14 +15593,14 @@ function useFormData (_ref) {
|
|
|
15602
15593
|
_context2.next = 47;
|
|
15603
15594
|
break;
|
|
15604
15595
|
}
|
|
15605
|
-
setFieldErrors(_objectSpread$
|
|
15596
|
+
setFieldErrors(_objectSpread$Q(_objectSpread$Q({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
15606
15597
|
return _context2.abrupt("return", undefined);
|
|
15607
15598
|
case 47:
|
|
15608
15599
|
throw _context2.t1;
|
|
15609
15600
|
case 48:
|
|
15610
15601
|
_context2.prev = 48;
|
|
15611
15602
|
root.actions.toggleLoading('saving_form');
|
|
15612
|
-
setState(_objectSpread$
|
|
15603
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15613
15604
|
data: finalData,
|
|
15614
15605
|
loading: false
|
|
15615
15606
|
}));
|
|
@@ -15639,7 +15630,7 @@ function useFormData (_ref) {
|
|
|
15639
15630
|
}
|
|
15640
15631
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
15641
15632
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
15642
|
-
var wholeData = Object.assign(_objectSpread$
|
|
15633
|
+
var wholeData = Object.assign(_objectSpread$Q({}, state.data), _objectSpread$Q({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
15643
15634
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
15644
15635
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
15645
15636
|
setHiddenRequiredDisabled(newState);
|
|
@@ -15652,14 +15643,14 @@ function useFormData (_ref) {
|
|
|
15652
15643
|
}
|
|
15653
15644
|
};
|
|
15654
15645
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
15655
|
-
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$
|
|
15646
|
+
var data = d !== null && d !== void 0 ? d : mergeWith(_objectSpread$Q({}, state.data), state.form.getFieldsValue(), mergeCustomizer);
|
|
15656
15647
|
if (id) {
|
|
15657
15648
|
setFieldInObject(id, data, value);
|
|
15658
|
-
var newFieldErrors = _objectSpread$
|
|
15649
|
+
var newFieldErrors = _objectSpread$Q({}, fieldErrors);
|
|
15659
15650
|
delete newFieldErrors[id.toString()];
|
|
15660
15651
|
setFieldErrors(newFieldErrors);
|
|
15661
15652
|
}
|
|
15662
|
-
setState(_objectSpread$
|
|
15653
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15663
15654
|
data: data
|
|
15664
15655
|
}));
|
|
15665
15656
|
return data;
|
|
@@ -15691,12 +15682,12 @@ function useFormData (_ref) {
|
|
|
15691
15682
|
var _value$value;
|
|
15692
15683
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
15693
15684
|
if (configuration.itemSelectorReset) {
|
|
15694
|
-
setState(_objectSpread$
|
|
15685
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15695
15686
|
data: _defineProperty({}, name, val)
|
|
15696
15687
|
}));
|
|
15697
15688
|
} else {
|
|
15698
|
-
setState(_objectSpread$
|
|
15699
|
-
data: _objectSpread$
|
|
15689
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15690
|
+
data: _objectSpread$Q(_objectSpread$Q({}, state.data), {}, _defineProperty({}, name, val))
|
|
15700
15691
|
}));
|
|
15701
15692
|
}
|
|
15702
15693
|
setSelectedItemsIndex(idx);
|
|
@@ -15706,12 +15697,12 @@ function useFormData (_ref) {
|
|
|
15706
15697
|
var val = _ref6.value;
|
|
15707
15698
|
if (value === val) {
|
|
15708
15699
|
if (configuration.itemSelectorReset) {
|
|
15709
|
-
setState(_objectSpread$
|
|
15700
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15710
15701
|
data: _defineProperty({}, name, val)
|
|
15711
15702
|
}));
|
|
15712
15703
|
} else {
|
|
15713
|
-
setState(_objectSpread$
|
|
15714
|
-
data: _objectSpread$
|
|
15704
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15705
|
+
data: _objectSpread$Q(_objectSpread$Q({}, state.data), {}, _defineProperty({}, name, val))
|
|
15715
15706
|
}));
|
|
15716
15707
|
}
|
|
15717
15708
|
setSelectedItemsIndex(idx);
|
|
@@ -15992,7 +15983,7 @@ function useFormData (_ref) {
|
|
|
15992
15983
|
for (var i = 0; i < configuration.tools.length; i++) {
|
|
15993
15984
|
var _tool$defaultOpen;
|
|
15994
15985
|
var tool = configuration.tools[i];
|
|
15995
|
-
tools.push(_objectSpread$
|
|
15986
|
+
tools.push(_objectSpread$Q(_objectSpread$Q({}, tool), {}, {
|
|
15996
15987
|
parameters: {
|
|
15997
15988
|
data: state.data
|
|
15998
15989
|
},
|
|
@@ -16094,7 +16085,7 @@ function useFormData (_ref) {
|
|
|
16094
16085
|
})) return;
|
|
16095
16086
|
setRemovedMedias([].concat(_toConsumableArray(removedMedias), [media]));
|
|
16096
16087
|
};
|
|
16097
|
-
return _objectSpread$
|
|
16088
|
+
return _objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
16098
16089
|
getIsHidden: getIsHidden,
|
|
16099
16090
|
setUsedPreset: setUsedPreset,
|
|
16100
16091
|
configuration: configuration,
|
|
@@ -16211,8 +16202,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
16211
16202
|
};
|
|
16212
16203
|
|
|
16213
16204
|
var _excluded$3 = ["key", "name"];
|
|
16214
|
-
function ownKeys$
|
|
16215
|
-
function _objectSpread$
|
|
16205
|
+
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; }
|
|
16206
|
+
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; }
|
|
16216
16207
|
var FormList$2 = function FormList(_ref) {
|
|
16217
16208
|
var _item$initialValue;
|
|
16218
16209
|
var value = _ref.value,
|
|
@@ -16265,7 +16256,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
16265
16256
|
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
16266
16257
|
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
16267
16258
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
16268
|
-
return /*#__PURE__*/createElement(Form$1.Item, _objectSpread$
|
|
16259
|
+
return /*#__PURE__*/createElement(Form$1.Item, _objectSpread$P(_objectSpread$P({}, restField), {}, {
|
|
16269
16260
|
id: n.join(),
|
|
16270
16261
|
key: n.join(),
|
|
16271
16262
|
name: n,
|
|
@@ -16277,7 +16268,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
16277
16268
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
16278
16269
|
help: state.fieldErrors[n.toString()],
|
|
16279
16270
|
hidden: hidden
|
|
16280
|
-
}), getElement(_objectSpread$
|
|
16271
|
+
}), getElement(_objectSpread$P(_objectSpread$P({}, i), {}, {
|
|
16281
16272
|
name: n
|
|
16282
16273
|
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
16283
16274
|
})
|
|
@@ -16442,8 +16433,8 @@ var Result = function Result(_ref) {
|
|
|
16442
16433
|
|
|
16443
16434
|
var success = "success-tRJ7j";
|
|
16444
16435
|
var error = "error-MtAFB";
|
|
16445
|
-
var css_248z$
|
|
16446
|
-
styleInject(css_248z$
|
|
16436
|
+
var css_248z$s = ".success-tRJ7j {\n color: #fff !important;\n background-color: #449d44 !important;\n border-color: #398439 !important;\n}\n\n.error-MtAFB {\n color: #fff !important;\n background-color: #c9302c !important;\n border-color: #ac2925 !important;\n}\n";
|
|
16437
|
+
styleInject(css_248z$s);
|
|
16447
16438
|
|
|
16448
16439
|
var azureIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2048%2048%22%20width%3D%2248px%22%20height%3D%2248px%22%3E%20%3ClinearGradient%20id%3D%22k8yl7~hDat~FaoWq8WjN6a%22%20x1%3D%22-1254.397%22%20x2%3D%22-1261.911%22%20y1%3D%22877.268%22%20y2%3D%22899.466%22%20gradientTransform%3D%22translate%281981.75%20-1362.063%29%20scale%281.5625%29%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23114a8b%22%2F%3E%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%230669bc%22%2F%3E%20%3C%2FlinearGradient%3E%20%3Cpath%20fill%3D%22url%28%23k8yl7~hDat~FaoWq8WjN6a%29%22%20d%3D%22M17.634%2C6h11.305L17.203%2C40.773c-0.247%2C0.733-0.934%2C1.226-1.708%2C1.226H6.697%20c-0.994%2C0-1.8-0.806-1.8-1.8c0-0.196%2C0.032-0.39%2C0.094-0.576L15.926%2C7.227C16.173%2C6.494%2C16.86%2C6%2C17.634%2C6L17.634%2C6z%22%2F%3E%20%3Cpath%20fill%3D%22%230078d4%22%20d%3D%22M34.062%2C29.324H16.135c-0.458-0.001-0.83%2C0.371-0.831%2C0.829c0%2C0.231%2C0.095%2C0.451%2C0.264%2C0.608%20l11.52%2C10.752C27.423%2C41.826%2C27.865%2C42%2C28.324%2C42h10.151L34.062%2C29.324z%22%2F%3E%20%3ClinearGradient%20id%3D%22k8yl7~hDat~FaoWq8WjN6b%22%20x1%3D%22-1252.05%22%20x2%3D%22-1253.788%22%20y1%3D%22887.612%22%20y2%3D%22888.2%22%20gradientTransform%3D%22translate%281981.75%20-1362.063%29%20scale%281.5625%29%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%20%20%3Cstop%20offset%3D%220%22%20stop-opacity%3D%22.3%22%2F%3E%20%20%3Cstop%20offset%3D%22.071%22%20stop-opacity%3D%22.2%22%2F%3E%20%20%3Cstop%20offset%3D%22.321%22%20stop-opacity%3D%22.1%22%2F%3E%20%20%3Cstop%20offset%3D%22.623%22%20stop-opacity%3D%22.05%22%2F%3E%20%20%3Cstop%20offset%3D%221%22%20stop-opacity%3D%220%22%2F%3E%20%3C%2FlinearGradient%3E%20%3Cpath%20fill%3D%22url%28%23k8yl7~hDat~FaoWq8WjN6b%29%22%20d%3D%22M17.634%2C6c-0.783-0.003-1.476%2C0.504-1.712%2C1.25L5.005%2C39.595%20c-0.335%2C0.934%2C0.151%2C1.964%2C1.085%2C2.299C6.286%2C41.964%2C6.493%2C42%2C6.702%2C42h9.026c0.684-0.122%2C1.25-0.603%2C1.481-1.259l2.177-6.416%20l7.776%2C7.253c0.326%2C0.27%2C0.735%2C0.419%2C1.158%2C0.422h10.114l-4.436-12.676l-12.931%2C0.003L28.98%2C6H17.634z%22%2F%3E%20%3ClinearGradient%20id%3D%22k8yl7~hDat~FaoWq8WjN6c%22%20x1%3D%22-1252.952%22%20x2%3D%22-1244.704%22%20y1%3D%22876.6%22%20y2%3D%22898.575%22%20gradientTransform%3D%22translate%281981.75%20-1362.063%29%20scale%281.5625%29%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%233ccbf4%22%2F%3E%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%232892df%22%2F%3E%20%3C%2FlinearGradient%3E%20%3Cpath%20fill%3D%22url%28%23k8yl7~hDat~FaoWq8WjN6c%29%22%20d%3D%22M32.074%2C7.225C31.827%2C6.493%2C31.141%2C6%2C30.368%2C6h-12.6c0.772%2C0%2C1.459%2C0.493%2C1.705%2C1.224%20l10.935%2C32.399c0.318%2C0.942-0.188%2C1.963-1.13%2C2.281C29.093%2C41.968%2C28.899%2C42%2C28.703%2C42h12.6c0.994%2C0%2C1.8-0.806%2C1.8-1.801%20c0-0.196-0.032-0.39-0.095-0.575L32.074%2C7.225z%22%2F%3E%3C%2Fsvg%3E";
|
|
16449
16440
|
|
|
@@ -16505,13 +16496,13 @@ var CustomButton = function CustomButton(_ref) {
|
|
|
16505
16496
|
};
|
|
16506
16497
|
var CustomButton$1 = observer(CustomButton);
|
|
16507
16498
|
|
|
16508
|
-
var wrapper$
|
|
16499
|
+
var wrapper$6 = "wrapper-GVe2h";
|
|
16509
16500
|
var buttonGroup = "button-group-GYt-T";
|
|
16510
|
-
var css_248z$
|
|
16511
|
-
styleInject(css_248z$
|
|
16501
|
+
var css_248z$r = ".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";
|
|
16502
|
+
styleInject(css_248z$r);
|
|
16512
16503
|
|
|
16513
|
-
function ownKeys$
|
|
16514
|
-
function _objectSpread$
|
|
16504
|
+
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; }
|
|
16505
|
+
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; }
|
|
16515
16506
|
var SubTitle = function SubTitle(_ref) {
|
|
16516
16507
|
var _item$orientation, _item$buttonIds;
|
|
16517
16508
|
var item = _ref.item,
|
|
@@ -16520,9 +16511,9 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
16520
16511
|
t = _useTranslation.t;
|
|
16521
16512
|
return /*#__PURE__*/jsx(Divider, {
|
|
16522
16513
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
16523
|
-
style: _objectSpread$
|
|
16514
|
+
style: _objectSpread$O({}, item.style),
|
|
16524
16515
|
children: /*#__PURE__*/jsxs("div", {
|
|
16525
|
-
className: wrapper$
|
|
16516
|
+
className: wrapper$6,
|
|
16526
16517
|
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) {
|
|
16527
16518
|
return /*#__PURE__*/jsx("div", {
|
|
16528
16519
|
className: buttonGroup,
|
|
@@ -16759,19 +16750,20 @@ function parseDataEntry(item, selectMapping) {
|
|
|
16759
16750
|
* Returns the data of the selected option(s) based on the selectMapping configuration
|
|
16760
16751
|
*/
|
|
16761
16752
|
function parseReturnData(options, selectMapping) {
|
|
16753
|
+
if (!options) return undefined;
|
|
16762
16754
|
if (Array.isArray(options)) return options.map(function (option) {
|
|
16763
16755
|
return parseReturnData(option, selectMapping);
|
|
16764
16756
|
});
|
|
16765
16757
|
return (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? options.value : options.data;
|
|
16766
16758
|
}
|
|
16767
16759
|
|
|
16768
|
-
var wrapper$
|
|
16769
|
-
var css_248z$
|
|
16770
|
-
styleInject(css_248z$
|
|
16760
|
+
var wrapper$5 = "wrapper-4xyke";
|
|
16761
|
+
var css_248z$q = ".wrapper-4xyke {\n display: flex;\n flex-direction: column;\n min-height: 50px;\n justify-content: flex-end;\n font-size: 12px;\n}\n";
|
|
16762
|
+
styleInject(css_248z$q);
|
|
16771
16763
|
|
|
16772
16764
|
var _excluded$2 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title"];
|
|
16773
|
-
function ownKeys$
|
|
16774
|
-
function _objectSpread$
|
|
16765
|
+
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; }
|
|
16766
|
+
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; }
|
|
16775
16767
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
16776
16768
|
var apiInterface = _ref.apiInterface,
|
|
16777
16769
|
selectMapping = _ref.selectMapping,
|
|
@@ -16795,8 +16787,8 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
|
16795
16787
|
});
|
|
16796
16788
|
return /*#__PURE__*/jsxs("div", {
|
|
16797
16789
|
ref: ref,
|
|
16798
|
-
className: classnames(title ? wrapper$
|
|
16799
|
-
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$
|
|
16790
|
+
className: classnames(title ? wrapper$5 : undefined),
|
|
16791
|
+
children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$N(_objectSpread$N({}, selectProps), {}, {
|
|
16800
16792
|
showSearch: search,
|
|
16801
16793
|
loading: state.loading,
|
|
16802
16794
|
options: state.options,
|
|
@@ -17413,8 +17405,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
17413
17405
|
}]);
|
|
17414
17406
|
}(_default$d);
|
|
17415
17407
|
|
|
17416
|
-
function ownKeys$
|
|
17417
|
-
function _objectSpread$
|
|
17408
|
+
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; }
|
|
17409
|
+
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; }
|
|
17418
17410
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
17419
17411
|
function useSelectClientRelationCatalog (_ref) {
|
|
17420
17412
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -17583,7 +17575,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
17583
17575
|
case 22:
|
|
17584
17576
|
supplierData = _context2.sent;
|
|
17585
17577
|
case 23:
|
|
17586
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
17578
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$M(_objectSpread$M({}, _selectedSupplier), {}, {
|
|
17587
17579
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
17588
17580
|
}), supplierData);
|
|
17589
17581
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -17649,8 +17641,8 @@ var customSelect = "custom-select-ESUJX";
|
|
|
17649
17641
|
var customSelectOption = "custom-select-option-dUA7N";
|
|
17650
17642
|
var avatarWrapper = "avatar-wrapper-Vg-xe";
|
|
17651
17643
|
var selectTextWrapper = "select-text-wrapper-hPSZW";
|
|
17652
|
-
var css_248z$
|
|
17653
|
-
styleInject(css_248z$
|
|
17644
|
+
var css_248z$p = ".custom-select-ESUJX {\n width: 300px;\n}\n\n.custom-select-option-dUA7N.ant-select-item {\n margin: 0px 12px;\n padding: 0px;\n border-bottom: 1px solid #ddd;\n}\n\n.custom-select-option-dUA7N .ant-select-item-option-content {\n display: flex;\n align-items: center;\n}\n\n.avatar-wrapper-Vg-xe {\n margin-right: 5px;\n height: 30px;\n width: 24px;\n float: left;\n position: relative;\n}\n\n.avatar-wrapper-Vg-xe > span {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n\n.select-text-wrapper-hPSZW {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: normal;\n width: calc(100% - 29px);\n}\n";
|
|
17645
|
+
styleInject(css_248z$p);
|
|
17654
17646
|
|
|
17655
17647
|
var Selector = function Selector(_ref) {
|
|
17656
17648
|
var items = _ref.items,
|
|
@@ -17804,8 +17796,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
17804
17796
|
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; } } }; }
|
|
17805
17797
|
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; } }
|
|
17806
17798
|
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; }
|
|
17807
|
-
function ownKeys$
|
|
17808
|
-
function _objectSpread$
|
|
17799
|
+
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; }
|
|
17800
|
+
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; }
|
|
17809
17801
|
function useSelectData (_ref) {
|
|
17810
17802
|
var data = _ref.data,
|
|
17811
17803
|
onChange = _ref.onChange,
|
|
@@ -17988,7 +17980,7 @@ function useSelectData (_ref) {
|
|
|
17988
17980
|
setFetching(true);
|
|
17989
17981
|
serverSideParams = {
|
|
17990
17982
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
17991
|
-
return _objectSpread$
|
|
17983
|
+
return _objectSpread$L(_objectSpread$L({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
17992
17984
|
}, {}) : {
|
|
17993
17985
|
_id: [value, 'contains']
|
|
17994
17986
|
},
|
|
@@ -18194,8 +18186,8 @@ function useSelectData (_ref) {
|
|
|
18194
18186
|
};
|
|
18195
18187
|
}
|
|
18196
18188
|
|
|
18197
|
-
var css_248z$
|
|
18198
|
-
styleInject(css_248z$
|
|
18189
|
+
var css_248z$o = ".darkmode .ant-select-selection-search-input {\n color: #fff;\n}\n";
|
|
18190
|
+
styleInject(css_248z$o);
|
|
18199
18191
|
|
|
18200
18192
|
var SelectWrapper = function SelectWrapper(_ref) {
|
|
18201
18193
|
var onChange = _ref.onChange,
|
|
@@ -18274,14 +18266,14 @@ var SelectWrapper = function SelectWrapper(_ref) {
|
|
|
18274
18266
|
};
|
|
18275
18267
|
var Select = observer(SelectWrapper);
|
|
18276
18268
|
|
|
18277
|
-
var wrapper$
|
|
18269
|
+
var wrapper$4 = "wrapper-WStAk";
|
|
18278
18270
|
var headerWrapper = "header-wrapper-gWQuH";
|
|
18279
18271
|
var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
18280
|
-
var css_248z$
|
|
18281
|
-
styleInject(css_248z$
|
|
18272
|
+
var css_248z$n = ".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";
|
|
18273
|
+
styleInject(css_248z$n);
|
|
18282
18274
|
|
|
18283
|
-
function ownKeys$
|
|
18284
|
-
function _objectSpread$
|
|
18275
|
+
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; }
|
|
18276
|
+
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; }
|
|
18285
18277
|
var LOG$9 = getLogger('Backoffice', 'Translation Form');
|
|
18286
18278
|
function useTranslationHook (item, state) {
|
|
18287
18279
|
var root = useStore();
|
|
@@ -18414,7 +18406,7 @@ function useTranslationHook (item, state) {
|
|
|
18414
18406
|
case 0:
|
|
18415
18407
|
_context2.next = 2;
|
|
18416
18408
|
return apiHandler.create({
|
|
18417
|
-
locales: _objectSpread$
|
|
18409
|
+
locales: _objectSpread$K({
|
|
18418
18410
|
de: {},
|
|
18419
18411
|
it: {},
|
|
18420
18412
|
fr: {},
|
|
@@ -18463,8 +18455,8 @@ function useTranslationHook (item, state) {
|
|
|
18463
18455
|
};
|
|
18464
18456
|
}
|
|
18465
18457
|
|
|
18466
|
-
function ownKeys$
|
|
18467
|
-
function _objectSpread$
|
|
18458
|
+
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; }
|
|
18459
|
+
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; }
|
|
18468
18460
|
var Translation = function Translation(_ref) {
|
|
18469
18461
|
var item = _ref.item,
|
|
18470
18462
|
state = _ref.state,
|
|
@@ -18482,7 +18474,7 @@ var Translation = function Translation(_ref) {
|
|
|
18482
18474
|
_onChange = _useTranslationHook.onChange,
|
|
18483
18475
|
autoTranslate = _useTranslationHook.autoTranslate;
|
|
18484
18476
|
return /*#__PURE__*/jsxs("div", {
|
|
18485
|
-
className: wrapper$
|
|
18477
|
+
className: wrapper$4,
|
|
18486
18478
|
children: [/*#__PURE__*/jsxs("div", {
|
|
18487
18479
|
className: headerWrapper,
|
|
18488
18480
|
children: [/*#__PURE__*/jsx("div", {
|
|
@@ -18514,7 +18506,7 @@ var Translation = function Translation(_ref) {
|
|
|
18514
18506
|
var hidden = state.getIsHidden(i, data);
|
|
18515
18507
|
var newAbsoluteName = absoluteName !== '' ? [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n)) : n;
|
|
18516
18508
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
18517
|
-
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$
|
|
18509
|
+
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$J(_objectSpread$J({}, i), {}, {
|
|
18518
18510
|
name: n
|
|
18519
18511
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden, currentLang) : /*#__PURE__*/jsx(Form$1.Item, {
|
|
18520
18512
|
id: idx.toString(),
|
|
@@ -18527,7 +18519,7 @@ var Translation = function Translation(_ref) {
|
|
|
18527
18519
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
18528
18520
|
help: state.fieldErrors[n.toString()],
|
|
18529
18521
|
hidden: hidden,
|
|
18530
|
-
children: getElement(_objectSpread$
|
|
18522
|
+
children: getElement(_objectSpread$J(_objectSpread$J({}, i), {}, {
|
|
18531
18523
|
name: n
|
|
18532
18524
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden)
|
|
18533
18525
|
})
|
|
@@ -18862,8 +18854,8 @@ var Text$1 = observer(Text);
|
|
|
18862
18854
|
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; } } }; }
|
|
18863
18855
|
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; } }
|
|
18864
18856
|
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; }
|
|
18865
|
-
function ownKeys$
|
|
18866
|
-
function _objectSpread$
|
|
18857
|
+
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; }
|
|
18858
|
+
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; }
|
|
18867
18859
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
|
|
18868
18860
|
var _isReadonly, _state$hiddenRequired;
|
|
18869
18861
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -18898,7 +18890,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
18898
18890
|
}
|
|
18899
18891
|
});
|
|
18900
18892
|
case 'selectSimple':
|
|
18901
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
18893
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$I(_objectSpread$I({}, item), {}, {
|
|
18902
18894
|
disabled: disabled,
|
|
18903
18895
|
onChange: function onChange(value) {
|
|
18904
18896
|
_onChange(absoluteName, value);
|
|
@@ -19102,7 +19094,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
19102
19094
|
value: item.value,
|
|
19103
19095
|
options: item.options.map(function (o) {
|
|
19104
19096
|
var _o$disabled;
|
|
19105
|
-
return _objectSpread$
|
|
19097
|
+
return _objectSpread$I(_objectSpread$I({}, o), {}, {
|
|
19106
19098
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, state.data)
|
|
19107
19099
|
});
|
|
19108
19100
|
}),
|
|
@@ -19123,7 +19115,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
19123
19115
|
},
|
|
19124
19116
|
icon: item.icon,
|
|
19125
19117
|
callback: function callback(data) {
|
|
19126
|
-
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$
|
|
19118
|
+
return form === null || form === void 0 ? void 0 : form.setFieldsValue(_objectSpread$I(_objectSpread$I({}, state.data), data));
|
|
19127
19119
|
}
|
|
19128
19120
|
});
|
|
19129
19121
|
case 'media':
|
|
@@ -19144,7 +19136,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
19144
19136
|
var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
19145
19137
|
var _useTranslation = useTranslation(),
|
|
19146
19138
|
t = _useTranslation.t;
|
|
19147
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
19139
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$I(_objectSpread$I({}, props), {}, {
|
|
19148
19140
|
ref: ref,
|
|
19149
19141
|
disabled: true,
|
|
19150
19142
|
value: t(props.translationPrefix + '.' + props.value)
|
|
@@ -19163,8 +19155,8 @@ function isReadonly(item, data) {
|
|
|
19163
19155
|
return false;
|
|
19164
19156
|
}
|
|
19165
19157
|
|
|
19166
|
-
function ownKeys$
|
|
19167
|
-
function _objectSpread$
|
|
19158
|
+
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; }
|
|
19159
|
+
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; }
|
|
19168
19160
|
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; } } }; }
|
|
19169
19161
|
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; } }
|
|
19170
19162
|
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; }
|
|
@@ -19214,13 +19206,13 @@ var Presets = function Presets(_ref) {
|
|
|
19214
19206
|
} finally {
|
|
19215
19207
|
_iterator.f();
|
|
19216
19208
|
}
|
|
19217
|
-
var data = _objectSpread$
|
|
19209
|
+
var data = _objectSpread$H(_objectSpread$H({}, form.getFieldsValue(names)), {}, {
|
|
19218
19210
|
newPresetName: newPresetName
|
|
19219
19211
|
});
|
|
19220
19212
|
data.dpi = parseInt(data.dpi);
|
|
19221
19213
|
data.organization = root.getGlobalValue('organizationId');
|
|
19222
19214
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
19223
|
-
var dt = _objectSpread$
|
|
19215
|
+
var dt = _objectSpread$H(_objectSpread$H({}, form.getFieldsValue(names)), {}, {
|
|
19224
19216
|
name: newPresetName
|
|
19225
19217
|
});
|
|
19226
19218
|
setPresets({
|
|
@@ -19562,8 +19554,8 @@ function getLabel(item, t) {
|
|
|
19562
19554
|
}
|
|
19563
19555
|
var Form = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
19564
19556
|
|
|
19565
|
-
function ownKeys$
|
|
19566
|
-
function _objectSpread$
|
|
19557
|
+
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; }
|
|
19558
|
+
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; }
|
|
19567
19559
|
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; } } }; }
|
|
19568
19560
|
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; } }
|
|
19569
19561
|
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; }
|
|
@@ -19765,7 +19757,7 @@ function useRoleSelectorData (_ref) {
|
|
|
19765
19757
|
roles.forEach(function (r) {
|
|
19766
19758
|
//check if after the changes the role is selected
|
|
19767
19759
|
if (value.includes(r._id)) {
|
|
19768
|
-
var newValue = _objectSpread$
|
|
19760
|
+
var newValue = _objectSpread$G(_objectSpread$G({}, r), {}, {
|
|
19769
19761
|
selected: true
|
|
19770
19762
|
});
|
|
19771
19763
|
//add it to the new list as selected role
|
|
@@ -19801,7 +19793,7 @@ function useRoleSelectorData (_ref) {
|
|
|
19801
19793
|
}
|
|
19802
19794
|
}
|
|
19803
19795
|
} else {
|
|
19804
|
-
var _newValue = _objectSpread$
|
|
19796
|
+
var _newValue = _objectSpread$G(_objectSpread$G({}, r), {}, {
|
|
19805
19797
|
selected: false
|
|
19806
19798
|
});
|
|
19807
19799
|
//add it to the new list as unselected role
|
|
@@ -20005,7 +19997,7 @@ function _updateRoles() {
|
|
|
20005
19997
|
userRole = userRoles.find(function (r) {
|
|
20006
19998
|
return r._id == role._id;
|
|
20007
19999
|
});
|
|
20008
|
-
newRole = _objectSpread$
|
|
20000
|
+
newRole = _objectSpread$G({}, role);
|
|
20009
20001
|
if (userRole) {
|
|
20010
20002
|
newRole.selected = true;
|
|
20011
20003
|
newRole.inherited = userRole.inherited;
|
|
@@ -20225,7 +20217,7 @@ function _fetchOptions() {
|
|
|
20225
20217
|
case 4:
|
|
20226
20218
|
result = _context11.sent;
|
|
20227
20219
|
options = result.data.map(function (d) {
|
|
20228
|
-
return _objectSpread$
|
|
20220
|
+
return _objectSpread$G(_objectSpread$G({}, d), {}, {
|
|
20229
20221
|
label: d.displayName,
|
|
20230
20222
|
value: d._id,
|
|
20231
20223
|
isLeaf: !d.hasChildren
|
|
@@ -20324,11 +20316,11 @@ var skeleton = "skeleton--xCI0";
|
|
|
20324
20316
|
var filterField = "filterField-1kU1O";
|
|
20325
20317
|
var parentScroll = "parent-scroll-GmaL9";
|
|
20326
20318
|
var parent = "parent-NZJ3S";
|
|
20327
|
-
var css_248z$
|
|
20328
|
-
styleInject(css_248z$
|
|
20319
|
+
var css_248z$m = ".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";
|
|
20320
|
+
styleInject(css_248z$m);
|
|
20329
20321
|
|
|
20330
|
-
function ownKeys$
|
|
20331
|
-
function _objectSpread$
|
|
20322
|
+
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; }
|
|
20323
|
+
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; }
|
|
20332
20324
|
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; } } }; }
|
|
20333
20325
|
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; } }
|
|
20334
20326
|
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; }
|
|
@@ -20388,8 +20380,8 @@ function _generateCSV() {
|
|
|
20388
20380
|
break;
|
|
20389
20381
|
}
|
|
20390
20382
|
_context2.next = 21;
|
|
20391
|
-
return generateCSV(_objectSpread$
|
|
20392
|
-
mappingData: _objectSpread$
|
|
20383
|
+
return generateCSV(_objectSpread$F(_objectSpread$F({}, exportParams.children), {}, {
|
|
20384
|
+
mappingData: _objectSpread$F(_objectSpread$F({}, parent), {}, {
|
|
20393
20385
|
parentId: exportParams.mappingData._id
|
|
20394
20386
|
})
|
|
20395
20387
|
}), csvData);
|
|
@@ -20497,8 +20489,8 @@ function _downloadFile() {
|
|
|
20497
20489
|
return _downloadFile.apply(this, arguments);
|
|
20498
20490
|
}
|
|
20499
20491
|
|
|
20500
|
-
function ownKeys$
|
|
20501
|
-
function _objectSpread$
|
|
20492
|
+
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; }
|
|
20493
|
+
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; }
|
|
20502
20494
|
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; } } }; }
|
|
20503
20495
|
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; } }
|
|
20504
20496
|
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; }
|
|
@@ -20917,7 +20909,7 @@ function useRelationSelectorData (_ref) {
|
|
|
20917
20909
|
var activeItem = _step.value;
|
|
20918
20910
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
20919
20911
|
addedObjects.push(addedData);
|
|
20920
|
-
getSplittedItems(_objectSpread$
|
|
20912
|
+
getSplittedItems(_objectSpread$E(_objectSpread$E({}, activeItem), {}, {
|
|
20921
20913
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
20922
20914
|
}));
|
|
20923
20915
|
ret = true;
|
|
@@ -21122,8 +21114,8 @@ function useRelationSelectorData (_ref) {
|
|
|
21122
21114
|
};
|
|
21123
21115
|
}
|
|
21124
21116
|
|
|
21125
|
-
function ownKeys$
|
|
21126
|
-
function _objectSpread$
|
|
21117
|
+
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; }
|
|
21118
|
+
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; }
|
|
21127
21119
|
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; } } }; }
|
|
21128
21120
|
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; } }
|
|
21129
21121
|
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; }
|
|
@@ -21256,7 +21248,7 @@ function ActionButton (_ref) {
|
|
|
21256
21248
|
_iterator2.f();
|
|
21257
21249
|
}
|
|
21258
21250
|
_context.next = 19;
|
|
21259
|
-
return apiInterface.update(_objectSpread$
|
|
21251
|
+
return apiInterface.update(_objectSpread$D(_objectSpread$D({}, data), {}, {
|
|
21260
21252
|
state: toSwitch
|
|
21261
21253
|
}), data);
|
|
21262
21254
|
case 19:
|
|
@@ -21413,14 +21405,14 @@ function _simpleChangeValue() {
|
|
|
21413
21405
|
break;
|
|
21414
21406
|
}
|
|
21415
21407
|
for (i = 0; i < action.newValues.length; i++) {
|
|
21416
|
-
fieldsToUpdate = _objectSpread$
|
|
21408
|
+
fieldsToUpdate = _objectSpread$D(_objectSpread$D({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
21417
21409
|
}
|
|
21418
21410
|
if (!apiInterface.canUpdate) {
|
|
21419
21411
|
_context2.next = 9;
|
|
21420
21412
|
break;
|
|
21421
21413
|
}
|
|
21422
21414
|
_context2.next = 7;
|
|
21423
|
-
return apiInterface.update(_objectSpread$
|
|
21415
|
+
return apiInterface.update(_objectSpread$D({}, fieldsToUpdate), data);
|
|
21424
21416
|
case 7:
|
|
21425
21417
|
response = _context2.sent;
|
|
21426
21418
|
return _context2.abrupt("return", response);
|
|
@@ -21435,7 +21427,7 @@ function _simpleChangeValue() {
|
|
|
21435
21427
|
return _simpleChangeValue.apply(this, arguments);
|
|
21436
21428
|
}
|
|
21437
21429
|
function A(props) {
|
|
21438
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
21430
|
+
return /*#__PURE__*/jsx("a", _objectSpread$D({}, props));
|
|
21439
21431
|
}
|
|
21440
21432
|
|
|
21441
21433
|
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; } } }; }
|
|
@@ -21570,11 +21562,11 @@ var newscroller = "newscroller-INKeD";
|
|
|
21570
21562
|
var antCollapseHeader = "ant-collapse-header--6FgU";
|
|
21571
21563
|
var itemTitle = "item-title--BTvC";
|
|
21572
21564
|
var itemDesc = "item-desc-DBiiF";
|
|
21573
|
-
var css_248z$
|
|
21574
|
-
styleInject(css_248z$
|
|
21565
|
+
var css_248z$l = ".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";
|
|
21566
|
+
styleInject(css_248z$l);
|
|
21575
21567
|
|
|
21576
|
-
function ownKeys$
|
|
21577
|
-
function _objectSpread$
|
|
21568
|
+
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; }
|
|
21569
|
+
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; }
|
|
21578
21570
|
var DropDown = function DropDown(_ref) {
|
|
21579
21571
|
var _curItem$data$length;
|
|
21580
21572
|
var split = _ref.split,
|
|
@@ -21606,7 +21598,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
21606
21598
|
});
|
|
21607
21599
|
return /*#__PURE__*/jsx(Collapse, {
|
|
21608
21600
|
onChange: function onChange() {
|
|
21609
|
-
return getSplittedItems(_objectSpread$
|
|
21601
|
+
return getSplittedItems(_objectSpread$C(_objectSpread$C({}, item.item), {}, {
|
|
21610
21602
|
parentId: item.parentId
|
|
21611
21603
|
}), 0);
|
|
21612
21604
|
},
|
|
@@ -21864,8 +21856,8 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
21864
21856
|
};
|
|
21865
21857
|
var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
|
|
21866
21858
|
|
|
21867
|
-
function ownKeys$
|
|
21868
|
-
function _objectSpread$
|
|
21859
|
+
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; }
|
|
21860
|
+
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; }
|
|
21869
21861
|
function useFormListData (_ref) {
|
|
21870
21862
|
var _configuration$defaul;
|
|
21871
21863
|
var id = _ref.id,
|
|
@@ -21945,7 +21937,7 @@ function useFormListData (_ref) {
|
|
|
21945
21937
|
if (updated.length == state.length) {
|
|
21946
21938
|
newState = state.map(function (s, i) {
|
|
21947
21939
|
var _updated$find;
|
|
21948
|
-
return _objectSpread$
|
|
21940
|
+
return _objectSpread$B(_objectSpread$B({}, s), {}, {
|
|
21949
21941
|
data: (_updated$find = updated.find(function (u) {
|
|
21950
21942
|
return u.index == i;
|
|
21951
21943
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -22082,8 +22074,8 @@ var FormList = function FormList(_ref, ref) {
|
|
|
22082
22074
|
};
|
|
22083
22075
|
var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
22084
22076
|
|
|
22085
|
-
function ownKeys$
|
|
22086
|
-
function _objectSpread$
|
|
22077
|
+
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; }
|
|
22078
|
+
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; }
|
|
22087
22079
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
22088
22080
|
function useSelectOrCreateData (_ref) {
|
|
22089
22081
|
var id = _ref.id,
|
|
@@ -22180,7 +22172,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
22180
22172
|
_context.next = 7;
|
|
22181
22173
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
22182
22174
|
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) {
|
|
22183
|
-
return _objectSpread$
|
|
22175
|
+
return _objectSpread$A(_objectSpread$A({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
22184
22176
|
}, {}) : {
|
|
22185
22177
|
_id: [value, 'contains']
|
|
22186
22178
|
},
|
|
@@ -22491,8 +22483,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
22491
22483
|
});
|
|
22492
22484
|
};
|
|
22493
22485
|
|
|
22494
|
-
function ownKeys$
|
|
22495
|
-
function _objectSpread$
|
|
22486
|
+
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; }
|
|
22487
|
+
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; }
|
|
22496
22488
|
function useListData (_ref) {
|
|
22497
22489
|
var id = _ref.id,
|
|
22498
22490
|
data = _ref.data;
|
|
@@ -22535,7 +22527,7 @@ function useListData (_ref) {
|
|
|
22535
22527
|
case 3:
|
|
22536
22528
|
result = _context.sent;
|
|
22537
22529
|
setListData(result.data.map(parseField));
|
|
22538
|
-
initData = _objectSpread$
|
|
22530
|
+
initData = _objectSpread$z({}, data);
|
|
22539
22531
|
setUpdatedObject(initData);
|
|
22540
22532
|
setLoading(false);
|
|
22541
22533
|
case 8:
|
|
@@ -22576,7 +22568,7 @@ function useListData (_ref) {
|
|
|
22576
22568
|
});
|
|
22577
22569
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
22578
22570
|
var parsedField = field.field.split('.');
|
|
22579
|
-
item.itemUpdate = _objectSpread$
|
|
22571
|
+
item.itemUpdate = _objectSpread$z(_objectSpread$z({}, field), {}, {
|
|
22580
22572
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
22581
22573
|
});
|
|
22582
22574
|
});
|
|
@@ -22607,16 +22599,16 @@ function useListData (_ref) {
|
|
|
22607
22599
|
console.error('field with more than 2 parts not allowed');
|
|
22608
22600
|
return;
|
|
22609
22601
|
}
|
|
22610
|
-
var updObj = _objectSpread$
|
|
22602
|
+
var updObj = _objectSpread$z({}, updatedObject);
|
|
22611
22603
|
if (fields.length === 1) {
|
|
22612
|
-
updObj = _objectSpread$
|
|
22604
|
+
updObj = _objectSpread$z(_objectSpread$z({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
22613
22605
|
} else if (fields.length === 2) {
|
|
22614
22606
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
22615
22607
|
return v.id === item.id.trim();
|
|
22616
22608
|
});
|
|
22617
22609
|
if (updatedField) {
|
|
22618
|
-
var updatedFieldCopy = _objectSpread$
|
|
22619
|
-
updObj = _objectSpread$
|
|
22610
|
+
var updatedFieldCopy = _objectSpread$z(_objectSpread$z({}, updatedField), {}, _defineProperty({}, fields[1], value));
|
|
22611
|
+
updObj = _objectSpread$z(_objectSpread$z({}, updObj), {}, _defineProperty({}, fields[0], updObj[fields[0]].map(function (v) {
|
|
22620
22612
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
22621
22613
|
})));
|
|
22622
22614
|
}
|
|
@@ -22625,11 +22617,11 @@ function useListData (_ref) {
|
|
|
22625
22617
|
var acItems = listData;
|
|
22626
22618
|
for (var i = 0; i < acItems.length; i++) {
|
|
22627
22619
|
if (i == index) {
|
|
22628
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
22620
|
+
acItems[i].itemUpdate = _objectSpread$z(_objectSpread$z({}, acItems[i].itemUpdate), {}, {
|
|
22629
22621
|
value: value
|
|
22630
22622
|
});
|
|
22631
22623
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
22632
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
22624
|
+
acItems[i].itemUpdate = _objectSpread$z(_objectSpread$z({}, acItems[i].itemUpdate), {}, {
|
|
22633
22625
|
value: !value
|
|
22634
22626
|
});
|
|
22635
22627
|
}
|
|
@@ -22983,8 +22975,8 @@ var jsoneditor = "jsoneditor-WMs15";
|
|
|
22983
22975
|
var preview = "preview-9wK81";
|
|
22984
22976
|
var previewButton = "preview-button-vupuG";
|
|
22985
22977
|
var editButton = "edit-button-m6r3M";
|
|
22986
|
-
var css_248z$
|
|
22987
|
-
styleInject(css_248z$
|
|
22978
|
+
var css_248z$k = ".jsoneditor-WMs15 .jsoneditor-menu .jsoneditor-transform {\n display: none;\n}\n.jsoneditor-WMs15 .jsoneditor-menu .jsoneditor-repair {\n display: none;\n}\n.jsoneditor-WMs15 .jsoneditor-menu .jsoneditor-poweredBy {\n display: none;\n}\n.jsoneditor-WMs15 .preview-9wK81 {\n background-color: #f19e34;\n}\n\n.jsoneditor-WMs15 .preview-button-vupuG {\n background-image: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22iso-8859-1%22%3F%3E%3C!-- Generator%3A Adobe Illustrator 19.0.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%3Csvg version%3D%221.1%22 id%3D%22Layer_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%09 viewBox%3D%220 0 502 502%22 style%3D%22enable-background%3Anew 0 0 502 502%3B%22 xml%3Aspace%3D%22preserve%22 fill%3D%22%23fff%22%3E%3Cg%3E%09%3Cg%3E%09%09%3Cg%3E%09%09%09%3Cpath d%3D%22M478.482%2C448.601l-101.6-101.599c8.089-15.262%2C12.339-32.29%2C12.339-49.717c0-35.689-18.182-69.164-47.804-88.743V92.53%09%09%09%09c0-2.652-1.054-5.196-2.929-7.071l-82.529-82.53C254.083%2C1.054%2C251.54%2C0%2C248.888%2C0H24.371c-5.522%2C0-10%2C4.477-10%2C10v427.735%09%09%09%09c0%2C5.523%2C4.478%2C10%2C10%2C10h307.046c5.522%2C0%2C10-4.477%2C10-10v-37.722l92.825%2C92.825c5.908%2C5.908%2C13.764%2C9.162%2C22.119%2C9.162%09%09%09%09c8.356%2C0%2C16.212-3.254%2C22.12-9.162C490.678%2C480.642%2C490.678%2C460.797%2C478.482%2C448.601z M307.276%2C82.53h-48.387V34.143%09%09%09%09l24.193%2C24.193L307.276%2C82.53z M321.417%2C396.377v31.358H34.371V20h204.517v72.53c0%2C5.523%2C4.478%2C10%2C10%2C10h72.529v95.662%09%09%09%09l0.009%2C0.014c-12.214-4.741-25.275-7.215-38.499-7.215c-58.61%2C0-106.294%2C47.683-106.294%2C106.293s47.684%2C106.293%2C106.294%2C106.293%09%09%09%09c13.224%2C0%2C26.285-2.474%2C38.499-7.215L321.417%2C396.377z M328.948%2C370.291c-0.848%2C0.536-1.706%2C1.057-2.574%2C1.563%09%09%09%09c-13.131%2C7.67-28.154%2C11.724-43.446%2C11.724c-47.583%2C0-86.294-38.711-86.294-86.293c0-47.582%2C38.711-86.293%2C86.294-86.293%09%09%09%09c15.291%2C0%2C30.315%2C4.054%2C43.447%2C11.724c26.428%2C15.435%2C42.846%2C44.008%2C42.846%2C74.569c0%2C16.35-4.595%2C32.264-13.289%2C46.022%09%09%09%09C349.097%2C354.125%2C339.766%2C363.455%2C328.948%2C370.291z M464.339%2C478.696c-2.131%2C2.131-4.964%2C3.304-7.978%2C3.304%09%09%09%09c-3.014%2C0-5.847-1.173-7.977-3.304l-98.706-98.706l-0.008-0.001c5.856-4.74%2C11.221-10.104%2C15.961-15.96l0.001%2C0.008%09%09%09%09l98.707%2C98.707C468.737%2C467.142%2C468.737%2C474.298%2C464.339%2C478.696z%22%2F%3E%09%09%09%3Cpath d%3D%22M246.838%2C238.403c-20.641%2C12.674-32.964%2C34.686-32.964%2C58.882c0%2C5.523%2C4.478%2C10%2C10%2C10c5.522%2C0%2C10-4.477%2C10-10%09%09%09%09c0-17.19%2C8.759-32.83%2C23.429-41.838c4.707-2.89%2C6.179-9.048%2C3.289-13.754C257.702%2C236.986%2C251.544%2C235.513%2C246.838%2C238.403z%22%2F%3E%09%09%09%3Cpath d%3D%22M317.708%2C237.624c-10.52-6.145-22.547-9.392-34.781-9.392c-5.522%2C0-10%2C4.477-10%2C10s4.478%2C10%2C10%2C10%09%09%09%09c8.693%2C0%2C17.232%2C2.304%2C24.693%2C6.662c1.586%2C0.926%2C3.321%2C1.367%2C5.034%2C1.367c3.438%2C0%2C6.785-1.775%2C8.645-4.958%09%09%09%09C324.085%2C246.533%2C322.477%2C240.409%2C317.708%2C237.624z%22%2F%3E%09%09%3C%2Fg%3E%09%3C%2Fg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n background-size: 20px;\n background-repeat: no-repeat;\n background-position: center;\n}\n.jsoneditor-WMs15 .preview-button-vupuG:hover {\n border: 0;\n}\n.jsoneditor-WMs15 .preview-button-vupuG:disabled {\n opacity: 0.3;\n}\n\n.jsoneditor-WMs15 .edit-button-m6r3M {\n background-image: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22iso-8859-1%22%3F%3E%3C!-- Generator%3A Adobe Illustrator 16.0.0%2C SVG Export Plug-In . SVG Version%3A 6.00 Build 0) --%3E%3C!DOCTYPE svg PUBLIC %22-%2F%2FW3C%2F%2FDTD SVG 1.1%2F%2FEN%22 %22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg version%3D%221.1%22 id%3D%22Capa_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 x%3D%220px%22 y%3D%220px%22%09 width%3D%22494.936px%22 height%3D%22494.936px%22 viewBox%3D%220 0 494.936 494.936%22 style%3D%22enable-background%3Anew 0 0 494.936 494.936%3B%22%09 xml%3Aspace%3D%22preserve%22 fill%3D%22%23fff%22%3E%3Cg%3E%09%3Cg%3E%09%09%3Cpath d%3D%22M389.844%2C182.85c-6.743%2C0-12.21%2C5.467-12.21%2C12.21v222.968c0%2C23.562-19.174%2C42.735-42.736%2C42.735H67.157%09%09%09c-23.562%2C0-42.736-19.174-42.736-42.735V150.285c0-23.562%2C19.174-42.735%2C42.736-42.735h267.741c6.743%2C0%2C12.21-5.467%2C12.21-12.21%09%09%09s-5.467-12.21-12.21-12.21H67.157C30.126%2C83.13%2C0%2C113.255%2C0%2C150.285v267.743c0%2C37.029%2C30.126%2C67.155%2C67.157%2C67.155h267.741%09%09%09c37.03%2C0%2C67.156-30.126%2C67.156-67.155V195.061C402.054%2C188.318%2C396.587%2C182.85%2C389.844%2C182.85z%22%2F%3E%09%09%3Cpath d%3D%22M483.876%2C20.791c-14.72-14.72-38.669-14.714-53.377%2C0L221.352%2C229.944c-0.28%2C0.28-3.434%2C3.559-4.251%2C5.396l-28.963%2C65.069%09%09%09c-2.057%2C4.619-1.056%2C10.027%2C2.521%2C13.6c2.337%2C2.336%2C5.461%2C3.576%2C8.639%2C3.576c1.675%2C0%2C3.362-0.346%2C4.96-1.057l65.07-28.963%09%09%09c1.83-0.815%2C5.114-3.97%2C5.396-4.25L483.876%2C74.169c7.131-7.131%2C11.06-16.61%2C11.06-26.692%09%09%09C494.936%2C37.396%2C491.007%2C27.915%2C483.876%2C20.791z M466.61%2C56.897L257.457%2C266.05c-0.035%2C0.036-0.055%2C0.078-0.089%2C0.107%09%09%09l-33.989%2C15.131L238.51%2C247.3c0.03-0.036%2C0.071-0.055%2C0.107-0.09L447.765%2C38.058c5.038-5.039%2C13.819-5.033%2C18.846%2C0.005%09%09%09c2.518%2C2.51%2C3.905%2C5.855%2C3.905%2C9.414C470.516%2C51.036%2C469.127%2C54.38%2C466.61%2C56.897z%22%2F%3E%09%3C%2Fg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n}\n";
|
|
22979
|
+
styleInject(css_248z$k);
|
|
22988
22980
|
|
|
22989
22981
|
var JsonEditor = function JsonEditor(_ref, ref) {
|
|
22990
22982
|
var id = _ref.id,
|
|
@@ -23143,8 +23135,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
23143
23135
|
};
|
|
23144
23136
|
}
|
|
23145
23137
|
|
|
23146
|
-
function ownKeys$
|
|
23147
|
-
function _objectSpread$
|
|
23138
|
+
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; }
|
|
23139
|
+
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; }
|
|
23148
23140
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
23149
23141
|
var id = _ref.id,
|
|
23150
23142
|
data = _ref.data,
|
|
@@ -23252,12 +23244,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
23252
23244
|
}
|
|
23253
23245
|
function onEnter(e) {
|
|
23254
23246
|
if (e.key != 'Enter') return;
|
|
23255
|
-
setCrop(_objectSpread$
|
|
23247
|
+
setCrop(_objectSpread$y(_objectSpread$y({}, crop), {}, {
|
|
23256
23248
|
unit: 'px',
|
|
23257
23249
|
width: Number(widthInputElement.current.value),
|
|
23258
23250
|
height: Number(heightInputElement.current.value)
|
|
23259
23251
|
}));
|
|
23260
|
-
setCompletedCrop(_objectSpread$
|
|
23252
|
+
setCompletedCrop(_objectSpread$y(_objectSpread$y({}, crop), {}, {
|
|
23261
23253
|
unit: 'px',
|
|
23262
23254
|
width: Number(widthInputElement.current.value),
|
|
23263
23255
|
height: Number(heightInputElement.current.value)
|
|
@@ -23335,8 +23327,8 @@ var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
|
23335
23327
|
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; } } }; }
|
|
23336
23328
|
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; } }
|
|
23337
23329
|
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; }
|
|
23338
|
-
function ownKeys$
|
|
23339
|
-
function _objectSpread$
|
|
23330
|
+
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; }
|
|
23331
|
+
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; }
|
|
23340
23332
|
function useDescriptions (_ref) {
|
|
23341
23333
|
var id = _ref.id;
|
|
23342
23334
|
var root = useStore();
|
|
@@ -23429,7 +23421,7 @@ function _getDisplayData() {
|
|
|
23429
23421
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
23430
23422
|
while (1) switch (_context4.prev = _context4.next) {
|
|
23431
23423
|
case 0:
|
|
23432
|
-
displayData = _objectSpread$
|
|
23424
|
+
displayData = _objectSpread$x({}, data);
|
|
23433
23425
|
_iterator = _createForOfIteratorHelper$9(items);
|
|
23434
23426
|
_context4.prev = 2;
|
|
23435
23427
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -23705,8 +23697,8 @@ var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
|
23705
23697
|
};
|
|
23706
23698
|
var FileUploadBeta = observer(FileUploadWrapper);
|
|
23707
23699
|
|
|
23708
|
-
function ownKeys$
|
|
23709
|
-
function _objectSpread$
|
|
23700
|
+
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; }
|
|
23701
|
+
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; }
|
|
23710
23702
|
function useGridData (_ref) {
|
|
23711
23703
|
var id = _ref.id,
|
|
23712
23704
|
data = _ref.data;
|
|
@@ -23749,11 +23741,11 @@ function useGridData (_ref) {
|
|
|
23749
23741
|
function reducer(state, action) {
|
|
23750
23742
|
switch (action.type) {
|
|
23751
23743
|
case 'update':
|
|
23752
|
-
return _objectSpread$
|
|
23744
|
+
return _objectSpread$w(_objectSpread$w({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$w(_objectSpread$w({}, action.data), {}, {
|
|
23753
23745
|
buffer: Buffer.from(action.data.buffer)
|
|
23754
23746
|
})));
|
|
23755
23747
|
case 'delete':
|
|
23756
|
-
var newState = _objectSpread$
|
|
23748
|
+
var newState = _objectSpread$w({}, state);
|
|
23757
23749
|
delete newState[action.data.divaNr];
|
|
23758
23750
|
return newState;
|
|
23759
23751
|
default:
|
|
@@ -23763,19 +23755,19 @@ function reducer(state, action) {
|
|
|
23763
23755
|
|
|
23764
23756
|
var grid = "grid-sGemi";
|
|
23765
23757
|
var textWrapper = "text-wrapper-xsPXE";
|
|
23766
|
-
var css_248z$
|
|
23767
|
-
styleInject(css_248z$
|
|
23758
|
+
var css_248z$j = ".grid-sGemi {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n grid-auto-rows: min-content;\n grid-gap: 10px;\n}\n\n.text-wrapper-xsPXE {\n display: flex;\n justify-content: space-around;\n align-items: center;\n}\n";
|
|
23759
|
+
styleInject(css_248z$j);
|
|
23768
23760
|
|
|
23769
|
-
var wrapper$
|
|
23770
|
-
var container$
|
|
23771
|
-
var css_248z$
|
|
23772
|
-
styleInject(css_248z$
|
|
23761
|
+
var wrapper$3 = "wrapper-p-gR3";
|
|
23762
|
+
var container$4 = "container-DoZqe";
|
|
23763
|
+
var css_248z$i = ".wrapper-p-gR3 {\n background: #ececec;\n}\n\n.container-DoZqe {\n display: flex;\n justify-content: space-between;\n}\n";
|
|
23764
|
+
styleInject(css_248z$i);
|
|
23773
23765
|
|
|
23774
23766
|
var ToolTipInfo = function ToolTipInfo(props) {
|
|
23775
23767
|
var _useTranslation = useTranslation(),
|
|
23776
23768
|
t = _useTranslation.t;
|
|
23777
23769
|
return /*#__PURE__*/jsx("div", {
|
|
23778
|
-
className: wrapper$
|
|
23770
|
+
className: wrapper$3,
|
|
23779
23771
|
children: /*#__PURE__*/jsx(Card, {
|
|
23780
23772
|
title: t('backoffice.tooltipinfo.useroverview'),
|
|
23781
23773
|
styles: {
|
|
@@ -23788,7 +23780,7 @@ var ToolTipInfo = function ToolTipInfo(props) {
|
|
|
23788
23780
|
width: 230
|
|
23789
23781
|
},
|
|
23790
23782
|
children: /*#__PURE__*/jsx("div", {
|
|
23791
|
-
className: container$
|
|
23783
|
+
className: container$4
|
|
23792
23784
|
})
|
|
23793
23785
|
})
|
|
23794
23786
|
});
|
|
@@ -23840,8 +23832,8 @@ var Grid = function Grid(_ref) {
|
|
|
23840
23832
|
});
|
|
23841
23833
|
};
|
|
23842
23834
|
|
|
23843
|
-
function ownKeys$
|
|
23844
|
-
function _objectSpread$
|
|
23835
|
+
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; }
|
|
23836
|
+
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; }
|
|
23845
23837
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
23846
23838
|
var id = _ref.id;
|
|
23847
23839
|
var root = useStore();
|
|
@@ -23960,7 +23952,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
23960
23952
|
onRemove: onRemove,
|
|
23961
23953
|
customRequest: customRequest,
|
|
23962
23954
|
fileList: fileList.map(function (f) {
|
|
23963
|
-
return _objectSpread$
|
|
23955
|
+
return _objectSpread$v(_objectSpread$v({}, f), {}, {
|
|
23964
23956
|
url: f.url
|
|
23965
23957
|
});
|
|
23966
23958
|
}),
|
|
@@ -23972,8 +23964,8 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
23972
23964
|
var small = "small-NY1-k";
|
|
23973
23965
|
var medium = "medium---QcO";
|
|
23974
23966
|
var big = "big--E39S";
|
|
23975
|
-
var css_248z$
|
|
23976
|
-
styleInject(css_248z$
|
|
23967
|
+
var css_248z$h = ".diva-component-DIVA_BACKOFFICE_NEW .ant-upload-wrapper {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-spin-nested-loading {\n width: 100%;\n height: 100%;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .ant-table-wrapper, .diva-component-DIVA_BACKOFFICE_NEW .ant-table {\n height: inherit;\n overflow: auto;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-drawer-body .ant-spin-nested-loading {\n width: 100%;\n height: 80%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-spin-container {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .andt-table .ant-spin-container {\n display: flex;\n flex-direction: column;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-space-item .andt-table .ant-spin-container {\n height: calc(60vh - 90px);\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .andt-table .ant-table-container {\n height: calc(100% - 80px);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-list {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-list-item-container {\n width: 100% !important;\n height: 100% !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-select {\n width: 100% !important;\n height: 100% !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .small-NY1-k {\n width: 104px;\n height: 104px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .medium---QcO {\n width: 200px;\n height: 200px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .big--E39S {\n width: 400px;\n height: 400px;\n}\n";
|
|
23968
|
+
styleInject(css_248z$h);
|
|
23977
23969
|
|
|
23978
23970
|
var MediaUpload = observer(function (_ref) {
|
|
23979
23971
|
var id = _ref.id;
|
|
@@ -24033,8 +24025,8 @@ var editableRow = "editable-row-9BEHi";
|
|
|
24033
24025
|
var checkbox = "checkbox-H7R-w";
|
|
24034
24026
|
var editableCellValueWrap = "editable-cell-value-wrap-ugTs4";
|
|
24035
24027
|
var contentWidth = "content-width-hGyVI";
|
|
24036
|
-
var css_248z$
|
|
24037
|
-
styleInject(css_248z$
|
|
24028
|
+
var css_248z$g = ".checkbox-readonly-0-bzT {\n cursor: default;\n}\n\n.checkbox-readonly-0-bzT .ant-checkbox-input {\n cursor: default;\n}\n\n.checkbox-readonly-0-bzT .ant-checkbox {\n cursor: default;\n}\n\n.editable-row-9BEHi:hover .checkbox-H7R-w .ant-checkbox {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.6);\n}\n\n.editable-cell-value-wrap-ugTs4 {\n padding: 5px 12px;\n cursor: pointer;\n}\n\n.editable-row-9BEHi:hover .editable-cell-value-wrap-ugTs4 {\n padding: 4px 11px;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n}\n\n.content-width-hGyVI .ant-modal-confirm-content {\n width: 100%;\n}\n";
|
|
24029
|
+
styleInject(css_248z$g);
|
|
24038
24030
|
|
|
24039
24031
|
function BooleanCell (_ref) {
|
|
24040
24032
|
var children = _ref.children,
|
|
@@ -24717,8 +24709,8 @@ function LinkCell (_ref) {
|
|
|
24717
24709
|
|
|
24718
24710
|
var _excluded$1 = ["index"],
|
|
24719
24711
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
24720
|
-
function ownKeys$
|
|
24721
|
-
function _objectSpread$
|
|
24712
|
+
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; }
|
|
24713
|
+
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; }
|
|
24722
24714
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
24723
24715
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
24724
24716
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -24732,7 +24724,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
24732
24724
|
component: false,
|
|
24733
24725
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
24734
24726
|
value: form,
|
|
24735
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
24727
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$u({}, props))
|
|
24736
24728
|
})
|
|
24737
24729
|
});
|
|
24738
24730
|
};
|
|
@@ -24785,7 +24777,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
24785
24777
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
24786
24778
|
longDescriptionType = 'text';
|
|
24787
24779
|
}
|
|
24788
|
-
var modifiedColumn = _objectSpread$
|
|
24780
|
+
var modifiedColumn = _objectSpread$u(_objectSpread$u({}, column), {}, {
|
|
24789
24781
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
24790
24782
|
});
|
|
24791
24783
|
if (column) {
|
|
@@ -24798,40 +24790,40 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
24798
24790
|
};
|
|
24799
24791
|
switch (modifiedColumn.type) {
|
|
24800
24792
|
case 'boolean':
|
|
24801
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
24793
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$u({}, cellProps));
|
|
24802
24794
|
break;
|
|
24803
24795
|
case 'text':
|
|
24804
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
24796
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$u({}, cellProps));
|
|
24805
24797
|
break;
|
|
24806
24798
|
case 'select':
|
|
24807
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
24799
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$u({}, cellProps));
|
|
24808
24800
|
case 'media':
|
|
24809
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
24801
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$u({}, cellProps));
|
|
24810
24802
|
break;
|
|
24811
24803
|
case 'mediaItem':
|
|
24812
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
24804
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$u({}, cellProps));
|
|
24813
24805
|
break;
|
|
24814
24806
|
case 'unixTimeStamp':
|
|
24815
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
24807
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$u({}, cellProps));
|
|
24816
24808
|
break;
|
|
24817
24809
|
case 'unixTimeStampCheck':
|
|
24818
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
24810
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$u({}, cellProps));
|
|
24819
24811
|
break;
|
|
24820
24812
|
case 'icon':
|
|
24821
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
24813
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$u({}, cellProps));
|
|
24822
24814
|
break;
|
|
24823
24815
|
case 'progress':
|
|
24824
|
-
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$
|
|
24816
|
+
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$u({}, cellProps));
|
|
24825
24817
|
break;
|
|
24826
24818
|
case 'link':
|
|
24827
|
-
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$
|
|
24819
|
+
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$u({}, cellProps));
|
|
24828
24820
|
break;
|
|
24829
24821
|
default:
|
|
24830
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
24822
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$u({}, cellProps));
|
|
24831
24823
|
break;
|
|
24832
24824
|
}
|
|
24833
24825
|
}
|
|
24834
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
24826
|
+
return /*#__PURE__*/jsx("td", _objectSpread$u(_objectSpread$u({}, restProps), {}, {
|
|
24835
24827
|
children: childNode
|
|
24836
24828
|
}));
|
|
24837
24829
|
};
|
|
@@ -25020,11 +25012,11 @@ function useAGHistogram (_ref) {
|
|
|
25020
25012
|
};
|
|
25021
25013
|
}
|
|
25022
25014
|
|
|
25023
|
-
var container$
|
|
25015
|
+
var container$3 = "container-2r-OJ";
|
|
25024
25016
|
var column1 = "column1-9viTK";
|
|
25025
25017
|
var spinner = "spinner-00VcK";
|
|
25026
|
-
var css_248z$
|
|
25027
|
-
styleInject(css_248z$
|
|
25018
|
+
var css_248z$f = ".container-2r-OJ {\n display: flex;\n gap: 40px; /* Distribute the columns evenly */\n}\n\n.column-yZ2Qc {\n padding: 10px;\n}\n\n.column1-9viTK .column-yZ2Qc {\n flex: 8;\n}\n\n.column2-pCnEz .column-yZ2Qc {\n flex: 1;\n}\n\n.column3-QZDVv .column-yZ2Qc {\n flex: 3;\n}\n\n.spinner-00VcK {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n";
|
|
25019
|
+
styleInject(css_248z$f);
|
|
25028
25020
|
|
|
25029
25021
|
var Panel = Collapse.Panel;
|
|
25030
25022
|
function AGHistogram (_ref) {
|
|
@@ -25137,7 +25129,7 @@ function AGHistogram (_ref) {
|
|
|
25137
25129
|
children: /*#__PURE__*/jsx(Panel, {
|
|
25138
25130
|
header: headerText,
|
|
25139
25131
|
children: /*#__PURE__*/jsxs("div", {
|
|
25140
|
-
className: container$
|
|
25132
|
+
className: container$3,
|
|
25141
25133
|
children: [!loadingHistogram && /*#__PURE__*/jsx("div", {
|
|
25142
25134
|
className: classnames(column1, 'ag-theme-alpine'),
|
|
25143
25135
|
style: {
|
|
@@ -25183,8 +25175,8 @@ var SMChart = function SMChart(props) {
|
|
|
25183
25175
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
25184
25176
|
};
|
|
25185
25177
|
|
|
25186
|
-
function ownKeys$
|
|
25187
|
-
function _objectSpread$
|
|
25178
|
+
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; }
|
|
25179
|
+
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; }
|
|
25188
25180
|
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; } } }; }
|
|
25189
25181
|
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; } }
|
|
25190
25182
|
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; }
|
|
@@ -25379,7 +25371,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
25379
25371
|
// Convert to Dayjs
|
|
25380
25372
|
(_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
|
|
25381
25373
|
]
|
|
25382
|
-
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
25374
|
+
}), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$t(_objectSpread$t({}, (_state$configuration$5 = state.configuration.filter) === null || _state$configuration$5 === void 0 ? void 0 : _state$configuration$5.select.settings), {}, {
|
|
25383
25375
|
style: {
|
|
25384
25376
|
minWidth: '200px'
|
|
25385
25377
|
},
|
|
@@ -25484,7 +25476,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
25484
25476
|
},
|
|
25485
25477
|
dataSource: data,
|
|
25486
25478
|
loading: state.loading,
|
|
25487
|
-
pagination: _objectSpread$
|
|
25479
|
+
pagination: _objectSpread$t(_objectSpread$t({}, state.pagination), {}, {
|
|
25488
25480
|
showTotal: function showTotal(total, range) {
|
|
25489
25481
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
25490
25482
|
},
|
|
@@ -25791,7 +25783,7 @@ function BulkAction(_ref6) {
|
|
|
25791
25783
|
}
|
|
25792
25784
|
_context4.t0 = data;
|
|
25793
25785
|
_context4.next = 11;
|
|
25794
|
-
return apiInterface.update(_objectSpread$
|
|
25786
|
+
return apiInterface.update(_objectSpread$t(_objectSpread$t({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
25795
25787
|
case 11:
|
|
25796
25788
|
_context4.t1 = _context4.sent;
|
|
25797
25789
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -25904,8 +25896,8 @@ function SelectionText(_ref8) {
|
|
|
25904
25896
|
});
|
|
25905
25897
|
}
|
|
25906
25898
|
|
|
25907
|
-
function ownKeys$
|
|
25908
|
-
function _objectSpread$
|
|
25899
|
+
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; }
|
|
25900
|
+
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; }
|
|
25909
25901
|
function getColumnFilterProps (_ref) {
|
|
25910
25902
|
var filter = _ref.filter,
|
|
25911
25903
|
title = _ref.title;
|
|
@@ -26268,7 +26260,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
26268
26260
|
});
|
|
26269
26261
|
},
|
|
26270
26262
|
options: filter.map(function (f) {
|
|
26271
|
-
return _objectSpread$
|
|
26263
|
+
return _objectSpread$s(_objectSpread$s({}, f), {}, {
|
|
26272
26264
|
label: t(f.label)
|
|
26273
26265
|
});
|
|
26274
26266
|
})
|
|
@@ -26317,7 +26309,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
26317
26309
|
setDisplaySelectedvalues = _useState4[1];
|
|
26318
26310
|
var options = [];
|
|
26319
26311
|
options = filter.map(function (f) {
|
|
26320
|
-
return _objectSpread$
|
|
26312
|
+
return _objectSpread$s(_objectSpread$s({}, f), {}, {
|
|
26321
26313
|
label: t(f.label)
|
|
26322
26314
|
});
|
|
26323
26315
|
});
|
|
@@ -26391,8 +26383,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
26391
26383
|
};
|
|
26392
26384
|
};
|
|
26393
26385
|
|
|
26394
|
-
function ownKeys$
|
|
26395
|
-
function _objectSpread$
|
|
26386
|
+
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; }
|
|
26387
|
+
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; }
|
|
26396
26388
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
26397
26389
|
var columns = configuration.columns.filter(function (c) {
|
|
26398
26390
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -26445,7 +26437,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
26445
26437
|
}
|
|
26446
26438
|
function mapColumn(column, onUpdate) {
|
|
26447
26439
|
var _column$field, _column$children;
|
|
26448
|
-
return _objectSpread$
|
|
26440
|
+
return _objectSpread$r(_objectSpread$r(_objectSpread$r({}, column), {}, {
|
|
26449
26441
|
hidden: false,
|
|
26450
26442
|
width: column.width || 100,
|
|
26451
26443
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
@@ -26495,8 +26487,8 @@ function updateData (_ref) {
|
|
|
26495
26487
|
};
|
|
26496
26488
|
}
|
|
26497
26489
|
|
|
26498
|
-
function ownKeys$
|
|
26499
|
-
function _objectSpread$
|
|
26490
|
+
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; }
|
|
26491
|
+
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; }
|
|
26500
26492
|
function applyFilterAndSortation (_ref) {
|
|
26501
26493
|
var data = _ref.data,
|
|
26502
26494
|
filters = _ref.filters,
|
|
@@ -26511,7 +26503,7 @@ function applyFilterAndSortation (_ref) {
|
|
|
26511
26503
|
processedData = sort(sorter || [], processedData);
|
|
26512
26504
|
return {
|
|
26513
26505
|
data: processedData,
|
|
26514
|
-
pagination: _objectSpread$
|
|
26506
|
+
pagination: _objectSpread$q(_objectSpread$q({}, pagination), {}, {
|
|
26515
26507
|
total: processedData.length
|
|
26516
26508
|
})
|
|
26517
26509
|
};
|
|
@@ -26596,8 +26588,8 @@ function filter(f, data) {
|
|
|
26596
26588
|
}
|
|
26597
26589
|
|
|
26598
26590
|
var _excluded = ["_id"];
|
|
26599
|
-
function ownKeys$
|
|
26600
|
-
function _objectSpread$
|
|
26591
|
+
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; }
|
|
26592
|
+
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; }
|
|
26601
26593
|
function useTableData$1 (_ref) {
|
|
26602
26594
|
var _configuration$apiInt;
|
|
26603
26595
|
var id = _ref.id;
|
|
@@ -26652,7 +26644,7 @@ function useTableData$1 (_ref) {
|
|
|
26652
26644
|
var _configuration$create;
|
|
26653
26645
|
if (!dataRow) return;
|
|
26654
26646
|
var id = v4();
|
|
26655
|
-
var processedDataRow = unflatten(_objectSpread$
|
|
26647
|
+
var processedDataRow = unflatten(_objectSpread$p({
|
|
26656
26648
|
_id: id,
|
|
26657
26649
|
ID: id
|
|
26658
26650
|
}, dataRow));
|
|
@@ -26664,11 +26656,11 @@ function useTableData$1 (_ref) {
|
|
|
26664
26656
|
newData = _updateData.data;
|
|
26665
26657
|
_updateData.prevDataRow;
|
|
26666
26658
|
_updateData.index;
|
|
26667
|
-
var newState = _objectSpread$
|
|
26659
|
+
var newState = _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26668
26660
|
data: newData
|
|
26669
26661
|
});
|
|
26670
26662
|
if (!filterServerSide) {
|
|
26671
|
-
var res = applyFilterAndSortation(_objectSpread$
|
|
26663
|
+
var res = applyFilterAndSortation(_objectSpread$p(_objectSpread$p({}, filterData), {}, {
|
|
26672
26664
|
data: newData
|
|
26673
26665
|
}));
|
|
26674
26666
|
newState.data = res.data;
|
|
@@ -26680,33 +26672,33 @@ function useTableData$1 (_ref) {
|
|
|
26680
26672
|
var formData = new FormData();
|
|
26681
26673
|
processedDataRow._id;
|
|
26682
26674
|
var value = _objectWithoutProperties(processedDataRow, _excluded);
|
|
26683
|
-
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$
|
|
26675
|
+
apiHandler.create(undefined, (_configuration$create = configuration.createMapping) !== null && _configuration$create !== void 0 ? _configuration$create : configuration.mapping, _objectSpread$p(_objectSpread$p({}, catalogItem), {}, {
|
|
26684
26676
|
filterContex: filterContex,
|
|
26685
26677
|
value: JSON.stringify([value])
|
|
26686
26678
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
26687
26679
|
if (d && d.Result && d.Result == 'Success') return;
|
|
26688
|
-
setState(_objectSpread$
|
|
26680
|
+
setState(_objectSpread$p({}, oldState));
|
|
26689
26681
|
});
|
|
26690
26682
|
}, [state, catalogItem, filterData]);
|
|
26691
26683
|
useEffect(function () {
|
|
26692
26684
|
if (!catalogItem) return;
|
|
26693
|
-
setState(_objectSpread$
|
|
26685
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26694
26686
|
loading: true,
|
|
26695
|
-
mappingData: _objectSpread$
|
|
26687
|
+
mappingData: _objectSpread$p(_objectSpread$p({}, catalogItem), {}, {
|
|
26696
26688
|
filterContex: filterContex
|
|
26697
26689
|
})
|
|
26698
26690
|
}));
|
|
26699
26691
|
if (!filterServerSide) {
|
|
26700
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
26692
|
+
apiHandler.readList(configuration.mapping, _objectSpread$p(_objectSpread$p({}, catalogItem), {}, {
|
|
26701
26693
|
filterContex: filterContex
|
|
26702
26694
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
26703
26695
|
var newData = data.data.map(function (d) {
|
|
26704
|
-
return _objectSpread$
|
|
26696
|
+
return _objectSpread$p(_objectSpread$p({}, d), {}, {
|
|
26705
26697
|
_id: d._id || d.ID || nanoid()
|
|
26706
26698
|
});
|
|
26707
26699
|
});
|
|
26708
26700
|
onChange({
|
|
26709
|
-
pagination: _objectSpread$
|
|
26701
|
+
pagination: _objectSpread$p({}, state.pagination),
|
|
26710
26702
|
filters: {},
|
|
26711
26703
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
26712
26704
|
return c.defaultSortOrder;
|
|
@@ -26722,7 +26714,7 @@ function useTableData$1 (_ref) {
|
|
|
26722
26714
|
});
|
|
26723
26715
|
} else {
|
|
26724
26716
|
onChange({
|
|
26725
|
-
pagination: _objectSpread$
|
|
26717
|
+
pagination: _objectSpread$p({}, state.pagination),
|
|
26726
26718
|
filters: {},
|
|
26727
26719
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
26728
26720
|
return c.defaultSortOrder;
|
|
@@ -26738,17 +26730,17 @@ function useTableData$1 (_ref) {
|
|
|
26738
26730
|
}
|
|
26739
26731
|
}, [filterContex, catalogItem]);
|
|
26740
26732
|
var onChange = function onChange(p, dataParam) {
|
|
26741
|
-
setState(_objectSpread$
|
|
26733
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26742
26734
|
loading: true
|
|
26743
26735
|
}));
|
|
26744
26736
|
if (!filterServerSide) {
|
|
26745
26737
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
26746
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
26738
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$p(_objectSpread$p({}, p), {}, {
|
|
26747
26739
|
data: unfilteredData
|
|
26748
26740
|
})),
|
|
26749
26741
|
data = _applyFilterAndSortat.data,
|
|
26750
26742
|
pagination = _applyFilterAndSortat.pagination;
|
|
26751
|
-
setState(_objectSpread$
|
|
26743
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26752
26744
|
data: data,
|
|
26753
26745
|
pagination: pagination,
|
|
26754
26746
|
loading: false,
|
|
@@ -26759,20 +26751,20 @@ function useTableData$1 (_ref) {
|
|
|
26759
26751
|
sorter: p.sorter
|
|
26760
26752
|
});
|
|
26761
26753
|
} else {
|
|
26762
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
26754
|
+
apiHandler.readList(configuration.mapping, _objectSpread$p(_objectSpread$p({}, catalogItem), {}, {
|
|
26763
26755
|
filterContex: filterContex
|
|
26764
26756
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
26765
|
-
setState(_objectSpread$
|
|
26757
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26766
26758
|
data: data.data.map(function (dt) {
|
|
26767
|
-
return _objectSpread$
|
|
26759
|
+
return _objectSpread$p(_objectSpread$p({}, dt), {}, {
|
|
26768
26760
|
_id: dt._id || dt.ID || nanoid()
|
|
26769
26761
|
});
|
|
26770
26762
|
}),
|
|
26771
|
-
pagination: _objectSpread$
|
|
26763
|
+
pagination: _objectSpread$p(_objectSpread$p({}, p.pagination), {}, {
|
|
26772
26764
|
total: data.total
|
|
26773
26765
|
}),
|
|
26774
26766
|
loading: false,
|
|
26775
|
-
mappingData: _objectSpread$
|
|
26767
|
+
mappingData: _objectSpread$p(_objectSpread$p({}, catalogItem), {}, {
|
|
26776
26768
|
filterContex: filterContex
|
|
26777
26769
|
})
|
|
26778
26770
|
}));
|
|
@@ -26793,7 +26785,7 @@ function useTableData$1 (_ref) {
|
|
|
26793
26785
|
filters['_id'] = [id, 'eq', false];
|
|
26794
26786
|
_context.next = 4;
|
|
26795
26787
|
return apiHandler.readList(configuration.mapping, {
|
|
26796
|
-
pagination: _objectSpread$
|
|
26788
|
+
pagination: _objectSpread$p({}, state.pagination),
|
|
26797
26789
|
columns: configuration.columns,
|
|
26798
26790
|
filters: filters,
|
|
26799
26791
|
sorter: filterData.sorter
|
|
@@ -26812,7 +26804,7 @@ function useTableData$1 (_ref) {
|
|
|
26812
26804
|
};
|
|
26813
26805
|
}();
|
|
26814
26806
|
var onSelect = function onSelect(keys) {
|
|
26815
|
-
setState(_objectSpread$
|
|
26807
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26816
26808
|
selected: keys
|
|
26817
26809
|
}));
|
|
26818
26810
|
};
|
|
@@ -26822,7 +26814,7 @@ function useTableData$1 (_ref) {
|
|
|
26822
26814
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
26823
26815
|
while (1) switch (_context3.prev = _context3.next) {
|
|
26824
26816
|
case 0:
|
|
26825
|
-
setState(_objectSpread$
|
|
26817
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26826
26818
|
deleting: true
|
|
26827
26819
|
}));
|
|
26828
26820
|
newData = _toConsumableArray(state.data);
|
|
@@ -26837,7 +26829,7 @@ function useTableData$1 (_ref) {
|
|
|
26837
26829
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
26838
26830
|
return nd._id === state.selected[index];
|
|
26839
26831
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
26840
|
-
mappingData = _objectSpread$
|
|
26832
|
+
mappingData = _objectSpread$p(_objectSpread$p({}, mappingData), state.mappingData);
|
|
26841
26833
|
_context2.next = 5;
|
|
26842
26834
|
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);
|
|
26843
26835
|
case 5:
|
|
@@ -26887,7 +26879,7 @@ function useTableData$1 (_ref) {
|
|
|
26887
26879
|
}
|
|
26888
26880
|
_context3.next = 18;
|
|
26889
26881
|
return apiHandler.readList(configuration.mapping, {
|
|
26890
|
-
pagination: _objectSpread$
|
|
26882
|
+
pagination: _objectSpread$p(_objectSpread$p({}, state.pagination), {}, {
|
|
26891
26883
|
current: current
|
|
26892
26884
|
}),
|
|
26893
26885
|
columns: configuration.columns,
|
|
@@ -26899,11 +26891,11 @@ function useTableData$1 (_ref) {
|
|
|
26899
26891
|
newData = data.data;
|
|
26900
26892
|
total = data.total;
|
|
26901
26893
|
case 21:
|
|
26902
|
-
setState(_objectSpread$
|
|
26894
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26903
26895
|
selected: [],
|
|
26904
26896
|
deleting: false,
|
|
26905
26897
|
data: newData,
|
|
26906
|
-
pagination: _objectSpread$
|
|
26898
|
+
pagination: _objectSpread$p(_objectSpread$p({}, state.pagination), {}, {
|
|
26907
26899
|
current: current,
|
|
26908
26900
|
total: total
|
|
26909
26901
|
})
|
|
@@ -26919,12 +26911,12 @@ function useTableData$1 (_ref) {
|
|
|
26919
26911
|
};
|
|
26920
26912
|
}();
|
|
26921
26913
|
function setLoading() {
|
|
26922
|
-
setState(_objectSpread$
|
|
26914
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26923
26915
|
loading: true
|
|
26924
26916
|
}));
|
|
26925
26917
|
}
|
|
26926
|
-
return _objectSpread$
|
|
26927
|
-
configuration: _objectSpread$
|
|
26918
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26919
|
+
configuration: _objectSpread$p(_objectSpread$p({}, configuration), {}, {
|
|
26928
26920
|
title: undefined
|
|
26929
26921
|
}),
|
|
26930
26922
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -27036,8 +27028,8 @@ function objectHash (obj) {
|
|
|
27036
27028
|
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; } } }; }
|
|
27037
27029
|
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; } }
|
|
27038
27030
|
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; }
|
|
27039
|
-
function ownKeys$
|
|
27040
|
-
function _objectSpread$
|
|
27031
|
+
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; }
|
|
27032
|
+
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; }
|
|
27041
27033
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
27042
27034
|
function useTableData (_ref) {
|
|
27043
27035
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -27095,7 +27087,7 @@ function useTableData (_ref) {
|
|
|
27095
27087
|
var _useState13 = useState({
|
|
27096
27088
|
loading: true,
|
|
27097
27089
|
deleting: false,
|
|
27098
|
-
pagination: _objectSpread$
|
|
27090
|
+
pagination: _objectSpread$o({
|
|
27099
27091
|
current: 1,
|
|
27100
27092
|
pageSize: 20,
|
|
27101
27093
|
total: 0,
|
|
@@ -27104,7 +27096,7 @@ function useTableData (_ref) {
|
|
|
27104
27096
|
selected: [],
|
|
27105
27097
|
canDelete: !!apiHandler.canDelete,
|
|
27106
27098
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
27107
|
-
mappingData: _objectSpread$
|
|
27099
|
+
mappingData: _objectSpread$o(_objectSpread$o({}, parentData), {}, {
|
|
27108
27100
|
prefilter: {
|
|
27109
27101
|
select: globalFilter.select
|
|
27110
27102
|
}
|
|
@@ -27113,7 +27105,7 @@ function useTableData (_ref) {
|
|
|
27113
27105
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
27114
27106
|
state = _useState14[0],
|
|
27115
27107
|
setState = _useState14[1];
|
|
27116
|
-
var mapping = _objectSpread$
|
|
27108
|
+
var mapping = _objectSpread$o(_objectSpread$o({}, parentData), {}, {
|
|
27117
27109
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
27118
27110
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
27119
27111
|
});
|
|
@@ -27152,14 +27144,14 @@ function useTableData (_ref) {
|
|
|
27152
27144
|
}
|
|
27153
27145
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
27154
27146
|
var newInitData = initData;
|
|
27155
|
-
var newState = _objectSpread$
|
|
27147
|
+
var newState = _objectSpread$o({}, state);
|
|
27156
27148
|
var selected = [];
|
|
27157
27149
|
if (configuration.deselectOnUpdate == false) {
|
|
27158
27150
|
selected = state.selected;
|
|
27159
27151
|
}
|
|
27160
27152
|
var pagination = undefined;
|
|
27161
27153
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
27162
|
-
pagination = _objectSpread$
|
|
27154
|
+
pagination = _objectSpread$o(_objectSpread$o({}, state.pagination), {}, {
|
|
27163
27155
|
total: state.data.length + dataArray.length
|
|
27164
27156
|
});
|
|
27165
27157
|
}
|
|
@@ -27176,7 +27168,7 @@ function useTableData (_ref) {
|
|
|
27176
27168
|
dataRow: dataRow
|
|
27177
27169
|
}),
|
|
27178
27170
|
_data = _updateData.data;
|
|
27179
|
-
newState = _objectSpread$
|
|
27171
|
+
newState = _objectSpread$o(_objectSpread$o({}, newState), {}, {
|
|
27180
27172
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
27181
27173
|
data: _data,
|
|
27182
27174
|
selected: selected
|
|
@@ -27189,8 +27181,8 @@ function useTableData (_ref) {
|
|
|
27189
27181
|
dataRow: dataRow
|
|
27190
27182
|
}),
|
|
27191
27183
|
nextInitData = _updateData2.data;
|
|
27192
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
27193
|
-
filters: _objectSpread$
|
|
27184
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, filterData), {}, {
|
|
27185
|
+
filters: _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, 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"])
|
|
27194
27186
|
}, 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 ? {
|
|
27195
27187
|
genericProps: globalFilter.toggle
|
|
27196
27188
|
} : undefined), {}, {
|
|
@@ -27200,7 +27192,7 @@ function useTableData (_ref) {
|
|
|
27200
27192
|
_data2 = _applyFilterAndSortat.data,
|
|
27201
27193
|
_pagination2 = _applyFilterAndSortat.pagination;
|
|
27202
27194
|
newInitData = nextInitData;
|
|
27203
|
-
newState = _objectSpread$
|
|
27195
|
+
newState = _objectSpread$o(_objectSpread$o({}, newState), {}, {
|
|
27204
27196
|
pagination: _pagination2,
|
|
27205
27197
|
data: _data2,
|
|
27206
27198
|
selected: selected
|
|
@@ -27210,8 +27202,8 @@ function useTableData (_ref) {
|
|
|
27210
27202
|
if (apiHandler.canCreate) {
|
|
27211
27203
|
apiCreate(data).then(function (res) {
|
|
27212
27204
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
27213
|
-
initData && setInitData(_objectSpread$
|
|
27214
|
-
setState(_objectSpread$
|
|
27205
|
+
initData && setInitData(_objectSpread$o({}, initData));
|
|
27206
|
+
setState(_objectSpread$o({}, state));
|
|
27215
27207
|
}
|
|
27216
27208
|
});
|
|
27217
27209
|
}
|
|
@@ -27224,7 +27216,7 @@ function useTableData (_ref) {
|
|
|
27224
27216
|
var triggerRefresh = function triggerRefresh() {
|
|
27225
27217
|
var _configuration$filter7;
|
|
27226
27218
|
setError(undefined);
|
|
27227
|
-
var newGlobalFilter = _objectSpread$
|
|
27219
|
+
var newGlobalFilter = _objectSpread$o({}, globalFilter);
|
|
27228
27220
|
//on refresh update default filter, since global value can change
|
|
27229
27221
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
27230
27222
|
var _configuration$filter8;
|
|
@@ -27235,7 +27227,7 @@ function useTableData (_ref) {
|
|
|
27235
27227
|
newGlobalFilter["default"] = _defaultFilter;
|
|
27236
27228
|
setGlobaFilter(newGlobalFilter);
|
|
27237
27229
|
}
|
|
27238
|
-
onChange(_objectSpread$
|
|
27230
|
+
onChange(_objectSpread$o({
|
|
27239
27231
|
pagination: state.pagination
|
|
27240
27232
|
}, filterData), newGlobalFilter, true);
|
|
27241
27233
|
};
|
|
@@ -27253,7 +27245,7 @@ function useTableData (_ref) {
|
|
|
27253
27245
|
order: c.defaultSortOrder
|
|
27254
27246
|
};
|
|
27255
27247
|
});
|
|
27256
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
27248
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27257
27249
|
loading: false
|
|
27258
27250
|
}));else {
|
|
27259
27251
|
onChange({
|
|
@@ -27296,7 +27288,7 @@ function useTableData (_ref) {
|
|
|
27296
27288
|
case 0:
|
|
27297
27289
|
filters = {};
|
|
27298
27290
|
filters['_id'] = [id, 'eq', false];
|
|
27299
|
-
ssf = _objectSpread$
|
|
27291
|
+
ssf = _objectSpread$o({
|
|
27300
27292
|
pagination: {
|
|
27301
27293
|
current: 1,
|
|
27302
27294
|
pageSize: 1
|
|
@@ -27349,11 +27341,11 @@ function useTableData (_ref) {
|
|
|
27349
27341
|
prefilter = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : globalFilter;
|
|
27350
27342
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
27351
27343
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
27352
|
-
setState(_objectSpread$
|
|
27344
|
+
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27353
27345
|
loading: true
|
|
27354
27346
|
}));
|
|
27355
27347
|
currentData = initData;
|
|
27356
|
-
filterData = _objectSpread$
|
|
27348
|
+
filterData = _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, 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
|
|
27357
27349
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
|
|
27358
27350
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
27359
27351
|
_ref7[0];
|
|
@@ -27361,7 +27353,7 @@ function useTableData (_ref) {
|
|
|
27361
27353
|
return v != null;
|
|
27362
27354
|
}));
|
|
27363
27355
|
currentFilterHash = objectHash(filterData);
|
|
27364
|
-
currentPagination = _objectSpread$
|
|
27356
|
+
currentPagination = _objectSpread$o(_objectSpread$o({}, p.pagination), {}, {
|
|
27365
27357
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
27366
27358
|
});
|
|
27367
27359
|
filterHash.current = currentFilterHash;
|
|
@@ -27369,7 +27361,7 @@ function useTableData (_ref) {
|
|
|
27369
27361
|
_context3.next = 20;
|
|
27370
27362
|
break;
|
|
27371
27363
|
}
|
|
27372
|
-
ssf = _objectSpread$
|
|
27364
|
+
ssf = _objectSpread$o({
|
|
27373
27365
|
pagination: currentPagination,
|
|
27374
27366
|
columns: configuration.columns,
|
|
27375
27367
|
filters: filterData,
|
|
@@ -27383,7 +27375,7 @@ function useTableData (_ref) {
|
|
|
27383
27375
|
data = _context3.sent;
|
|
27384
27376
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
27385
27377
|
currentData = data.data;
|
|
27386
|
-
currentPagination = _objectSpread$
|
|
27378
|
+
currentPagination = _objectSpread$o(_objectSpread$o({}, currentPagination), {}, {
|
|
27387
27379
|
total: data.total
|
|
27388
27380
|
});
|
|
27389
27381
|
_context3.next = 29;
|
|
@@ -27400,7 +27392,7 @@ function useTableData (_ref) {
|
|
|
27400
27392
|
currentData = _data3.data;
|
|
27401
27393
|
setInitData(currentData);
|
|
27402
27394
|
case 26:
|
|
27403
|
-
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$
|
|
27395
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$o(_objectSpread$o({}, p), {}, {
|
|
27404
27396
|
pagination: currentPagination,
|
|
27405
27397
|
filters: filterData,
|
|
27406
27398
|
data: currentData,
|
|
@@ -27409,11 +27401,11 @@ function useTableData (_ref) {
|
|
|
27409
27401
|
currentData = _data4;
|
|
27410
27402
|
currentPagination = pagination;
|
|
27411
27403
|
case 29:
|
|
27412
|
-
setState(_objectSpread$
|
|
27404
|
+
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27413
27405
|
loading: false,
|
|
27414
27406
|
data: currentData,
|
|
27415
27407
|
pagination: currentPagination,
|
|
27416
|
-
mappingData: _objectSpread$
|
|
27408
|
+
mappingData: _objectSpread$o(_objectSpread$o({}, parentData), {}, {
|
|
27417
27409
|
prefilter: prefilter
|
|
27418
27410
|
}),
|
|
27419
27411
|
currentFetchUrl: currentUrl
|
|
@@ -27435,7 +27427,7 @@ function useTableData (_ref) {
|
|
|
27435
27427
|
};
|
|
27436
27428
|
}();
|
|
27437
27429
|
var onSelect = function onSelect(keys) {
|
|
27438
|
-
setState(_objectSpread$
|
|
27430
|
+
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27439
27431
|
selected: keys
|
|
27440
27432
|
}));
|
|
27441
27433
|
};
|
|
@@ -27446,7 +27438,7 @@ function useTableData (_ref) {
|
|
|
27446
27438
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
27447
27439
|
while (1) switch (_context5.prev = _context5.next) {
|
|
27448
27440
|
case 0:
|
|
27449
|
-
setState(_objectSpread$
|
|
27441
|
+
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27450
27442
|
deleting: true
|
|
27451
27443
|
}));
|
|
27452
27444
|
newData = _toConsumableArray(state.data);
|
|
@@ -27486,7 +27478,7 @@ function useTableData (_ref) {
|
|
|
27486
27478
|
} finally {
|
|
27487
27479
|
_iterator.f();
|
|
27488
27480
|
}
|
|
27489
|
-
mappingData = _objectSpread$
|
|
27481
|
+
mappingData = _objectSpread$o(_objectSpread$o(_objectSpread$o({}, mappingData), state.mappingData), mapToggle);
|
|
27490
27482
|
deleteResult = undefined;
|
|
27491
27483
|
_context4.prev = 7;
|
|
27492
27484
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -27576,12 +27568,12 @@ function useTableData (_ref) {
|
|
|
27576
27568
|
break;
|
|
27577
27569
|
}
|
|
27578
27570
|
_context5.next = 25;
|
|
27579
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
27580
|
-
pagination: _objectSpread$
|
|
27571
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$o({
|
|
27572
|
+
pagination: _objectSpread$o(_objectSpread$o({}, state.pagination), {}, {
|
|
27581
27573
|
current: current
|
|
27582
27574
|
}),
|
|
27583
27575
|
columns: configuration.columns,
|
|
27584
|
-
filters: _objectSpread$
|
|
27576
|
+
filters: _objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, 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"]),
|
|
27585
27577
|
sorter: filterData.sorter
|
|
27586
27578
|
}, 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 ? {
|
|
27587
27579
|
genericProps: globalFilter.toggle
|
|
@@ -27592,11 +27584,11 @@ function useTableData (_ref) {
|
|
|
27592
27584
|
total = data.total;
|
|
27593
27585
|
case 28:
|
|
27594
27586
|
setInitData(newInitData);
|
|
27595
|
-
setState(_objectSpread$
|
|
27587
|
+
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27596
27588
|
selected: [],
|
|
27597
27589
|
deleting: false,
|
|
27598
27590
|
data: newData,
|
|
27599
|
-
pagination: _objectSpread$
|
|
27591
|
+
pagination: _objectSpread$o(_objectSpread$o({}, state.pagination), {}, {
|
|
27600
27592
|
current: current === 0 ? 1 : current,
|
|
27601
27593
|
total: total
|
|
27602
27594
|
})
|
|
@@ -27617,14 +27609,14 @@ function useTableData (_ref) {
|
|
|
27617
27609
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
27618
27610
|
return;
|
|
27619
27611
|
}
|
|
27620
|
-
var newGlobalFilter = _objectSpread$
|
|
27612
|
+
var newGlobalFilter = _objectSpread$o({}, globalFilter);
|
|
27621
27613
|
if (value !== null && value !== void 0 && value.length) {
|
|
27622
27614
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
27623
27615
|
} else {
|
|
27624
27616
|
newGlobalFilter.select = {};
|
|
27625
27617
|
}
|
|
27626
27618
|
setGlobaFilter(newGlobalFilter);
|
|
27627
|
-
onChange(_objectSpread$
|
|
27619
|
+
onChange(_objectSpread$o({
|
|
27628
27620
|
pagination: state.pagination
|
|
27629
27621
|
}, filterData), newGlobalFilter);
|
|
27630
27622
|
};
|
|
@@ -27638,11 +27630,11 @@ function useTableData (_ref) {
|
|
|
27638
27630
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
27639
27631
|
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
27640
27632
|
});
|
|
27641
|
-
var newGlobalFilter = _objectSpread$
|
|
27633
|
+
var newGlobalFilter = _objectSpread$o(_objectSpread$o({}, globalFilter), {}, {
|
|
27642
27634
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
27643
27635
|
});
|
|
27644
27636
|
setGlobaFilter(newGlobalFilter);
|
|
27645
|
-
onChange(_objectSpread$
|
|
27637
|
+
onChange(_objectSpread$o({
|
|
27646
27638
|
pagination: state.pagination
|
|
27647
27639
|
}, filterData), newGlobalFilter, undefined, true);
|
|
27648
27640
|
};
|
|
@@ -27655,7 +27647,7 @@ function useTableData (_ref) {
|
|
|
27655
27647
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
27656
27648
|
return;
|
|
27657
27649
|
}
|
|
27658
|
-
var newGlobalFilter = _objectSpread$
|
|
27650
|
+
var newGlobalFilter = _objectSpread$o(_objectSpread$o({}, globalFilter), {}, {
|
|
27659
27651
|
search: {}
|
|
27660
27652
|
});
|
|
27661
27653
|
if (value) {
|
|
@@ -27669,7 +27661,7 @@ function useTableData (_ref) {
|
|
|
27669
27661
|
});
|
|
27670
27662
|
}
|
|
27671
27663
|
setGlobaFilter(newGlobalFilter);
|
|
27672
|
-
onChange(_objectSpread$
|
|
27664
|
+
onChange(_objectSpread$o({
|
|
27673
27665
|
pagination: state.pagination
|
|
27674
27666
|
}, filterData), newGlobalFilter);
|
|
27675
27667
|
};
|
|
@@ -27679,17 +27671,17 @@ function useTableData (_ref) {
|
|
|
27679
27671
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
27680
27672
|
return;
|
|
27681
27673
|
}
|
|
27682
|
-
var newGlobalFilter = _objectSpread$
|
|
27674
|
+
var newGlobalFilter = _objectSpread$o({}, globalFilter);
|
|
27683
27675
|
newGlobalFilter.timeStamp = {
|
|
27684
27676
|
fromTimeStamp: [from],
|
|
27685
27677
|
toTimeStamp: [to]
|
|
27686
27678
|
};
|
|
27687
27679
|
setGlobaFilter(newGlobalFilter);
|
|
27688
|
-
onChange(_objectSpread$
|
|
27680
|
+
onChange(_objectSpread$o({
|
|
27689
27681
|
pagination: state.pagination
|
|
27690
27682
|
}, filterData), newGlobalFilter);
|
|
27691
27683
|
};
|
|
27692
|
-
return _objectSpread$
|
|
27684
|
+
return _objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27693
27685
|
title: title,
|
|
27694
27686
|
configuration: configuration,
|
|
27695
27687
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -27731,8 +27723,8 @@ function StandardTable (_ref) {
|
|
|
27731
27723
|
});
|
|
27732
27724
|
}
|
|
27733
27725
|
|
|
27734
|
-
function ownKeys$
|
|
27735
|
-
function _objectSpread$
|
|
27726
|
+
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; }
|
|
27727
|
+
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; }
|
|
27736
27728
|
function Table (props) {
|
|
27737
27729
|
var root = useStore();
|
|
27738
27730
|
var variant = useMemo(function () {
|
|
@@ -27740,15 +27732,15 @@ function Table (props) {
|
|
|
27740
27732
|
return config.variant;
|
|
27741
27733
|
}, [props.id]);
|
|
27742
27734
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
27743
|
-
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$
|
|
27735
|
+
children: [(variant == 'Standard' || !variant) && /*#__PURE__*/jsx(StandardTable, _objectSpread$n({}, props)), variant == 'CatalogTable' && /*#__PURE__*/jsx(CatalogTable, _objectSpread$n({}, props))]
|
|
27744
27736
|
});
|
|
27745
27737
|
}
|
|
27746
27738
|
|
|
27747
27739
|
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; } } }; }
|
|
27748
27740
|
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; } }
|
|
27749
27741
|
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; }
|
|
27750
|
-
function ownKeys$
|
|
27751
|
-
function _objectSpread$
|
|
27742
|
+
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; }
|
|
27743
|
+
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; }
|
|
27752
27744
|
function useAGGrid (_ref) {
|
|
27753
27745
|
var id = _ref.id,
|
|
27754
27746
|
filter = _ref.filter,
|
|
@@ -27842,7 +27834,7 @@ function useAGGrid (_ref) {
|
|
|
27842
27834
|
value = _ref3[1];
|
|
27843
27835
|
if (_idx == 0) {
|
|
27844
27836
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
27845
|
-
rdat.push(_objectSpread$
|
|
27837
|
+
rdat.push(_objectSpread$m(_objectSpread$m({}, rd), {}, {
|
|
27846
27838
|
grouping: [idx.toString()]
|
|
27847
27839
|
}));
|
|
27848
27840
|
var sp = key.split(':');
|
|
@@ -27982,11 +27974,11 @@ var loader = "loader-LaXZy";
|
|
|
27982
27974
|
var flex = "flex-yQdda";
|
|
27983
27975
|
var bar = "bar-Y663f";
|
|
27984
27976
|
var value = "value-FCA-6";
|
|
27985
|
-
var css_248z$
|
|
27986
|
-
styleInject(css_248z$
|
|
27977
|
+
var css_248z$e = ".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";
|
|
27978
|
+
styleInject(css_248z$e);
|
|
27987
27979
|
|
|
27988
|
-
function ownKeys$
|
|
27989
|
-
function _objectSpread$
|
|
27980
|
+
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; }
|
|
27981
|
+
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; }
|
|
27990
27982
|
var AGChart = function AGChart(_ref) {
|
|
27991
27983
|
var data = _ref.data;
|
|
27992
27984
|
var groupedData = [];
|
|
@@ -27994,11 +27986,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
27994
27986
|
data.forEach(function (dt) {
|
|
27995
27987
|
if (dt.count == 0) return;
|
|
27996
27988
|
if (groupedData.length > dt.grouping[0]) {
|
|
27997
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
27989
|
+
groupedData[dt.grouping[0]].push(_objectSpread$l(_objectSpread$l({}, dt), {}, {
|
|
27998
27990
|
count: Number(dt.count)
|
|
27999
27991
|
}));
|
|
28000
27992
|
} else {
|
|
28001
|
-
groupedData.push([_objectSpread$
|
|
27993
|
+
groupedData.push([_objectSpread$l(_objectSpread$l({}, dt), {}, {
|
|
28002
27994
|
count: Number(dt.count)
|
|
28003
27995
|
})]);
|
|
28004
27996
|
}
|
|
@@ -28039,8 +28031,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
28039
28031
|
});
|
|
28040
28032
|
};
|
|
28041
28033
|
|
|
28042
|
-
function ownKeys$
|
|
28043
|
-
function _objectSpread$
|
|
28034
|
+
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; }
|
|
28035
|
+
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; }
|
|
28044
28036
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
28045
28037
|
var id = _ref.id,
|
|
28046
28038
|
filter = _ref.filter,
|
|
@@ -28133,7 +28125,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
28133
28125
|
});
|
|
28134
28126
|
});
|
|
28135
28127
|
}
|
|
28136
|
-
return _objectSpread$
|
|
28128
|
+
return _objectSpread$k(_objectSpread$k({}, column), {}, {
|
|
28137
28129
|
cellRenderer: renderer
|
|
28138
28130
|
});
|
|
28139
28131
|
});
|
|
@@ -28403,8 +28395,8 @@ var CustomText = function CustomText(_ref) {
|
|
|
28403
28395
|
};
|
|
28404
28396
|
var CustomText$1 = observer(CustomText);
|
|
28405
28397
|
|
|
28406
|
-
function ownKeys$
|
|
28407
|
-
function _objectSpread$
|
|
28398
|
+
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; }
|
|
28399
|
+
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; }
|
|
28408
28400
|
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; } } }; }
|
|
28409
28401
|
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; } }
|
|
28410
28402
|
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; }
|
|
@@ -28467,7 +28459,7 @@ function useFilterBoxData (id) {
|
|
|
28467
28459
|
} finally {
|
|
28468
28460
|
_iterator.f();
|
|
28469
28461
|
}
|
|
28470
|
-
return _objectSpread$
|
|
28462
|
+
return _objectSpread$j(_objectSpread$j({}, state), ob);
|
|
28471
28463
|
}
|
|
28472
28464
|
return {
|
|
28473
28465
|
configuration: configuration,
|
|
@@ -28481,8 +28473,8 @@ function useFilterBoxData (id) {
|
|
|
28481
28473
|
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; } } }; }
|
|
28482
28474
|
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; } }
|
|
28483
28475
|
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; }
|
|
28484
|
-
function ownKeys$
|
|
28485
|
-
function _objectSpread$
|
|
28476
|
+
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; }
|
|
28477
|
+
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; }
|
|
28486
28478
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
28487
28479
|
var id = _ref.id,
|
|
28488
28480
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -28510,7 +28502,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
28510
28502
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
28511
28503
|
mode: "single",
|
|
28512
28504
|
apiInterface: filter.requestOptions,
|
|
28513
|
-
wholeData: _objectSpread$
|
|
28505
|
+
wholeData: _objectSpread$i(_objectSpread$i({}, state.filter), {}, {
|
|
28514
28506
|
tab: tab
|
|
28515
28507
|
}),
|
|
28516
28508
|
mapping: filter.requestMapping,
|
|
@@ -28742,8 +28734,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
28742
28734
|
return false;
|
|
28743
28735
|
});
|
|
28744
28736
|
|
|
28745
|
-
function ownKeys$
|
|
28746
|
-
function _objectSpread$
|
|
28737
|
+
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; }
|
|
28738
|
+
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; }
|
|
28747
28739
|
function useUIBuilderData (id) {
|
|
28748
28740
|
var save = undefined;
|
|
28749
28741
|
var root = useStore();
|
|
@@ -28775,7 +28767,7 @@ function useUIBuilderData (id) {
|
|
|
28775
28767
|
var configuration = _useMemo.configuration;
|
|
28776
28768
|
useEffect(function () {
|
|
28777
28769
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
28778
|
-
return setFilter(_objectSpread$
|
|
28770
|
+
return setFilter(_objectSpread$h(_objectSpread$h({}, filter), {}, {
|
|
28779
28771
|
sessionGuid: res
|
|
28780
28772
|
}));
|
|
28781
28773
|
});
|
|
@@ -28798,8 +28790,8 @@ function useUIBuilderData (id) {
|
|
|
28798
28790
|
};
|
|
28799
28791
|
}
|
|
28800
28792
|
|
|
28801
|
-
function ownKeys$
|
|
28802
|
-
function _objectSpread$
|
|
28793
|
+
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; }
|
|
28794
|
+
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; }
|
|
28803
28795
|
function UIBuilder(_ref) {
|
|
28804
28796
|
var id = _ref.id;
|
|
28805
28797
|
var state = useUIBuilderData(id);
|
|
@@ -28826,7 +28818,7 @@ function UIBuilder(_ref) {
|
|
|
28826
28818
|
override = {
|
|
28827
28819
|
value: newFilter[item.field],
|
|
28828
28820
|
setValue: function setValue(newVal) {
|
|
28829
|
-
var newFilter = _objectSpread$
|
|
28821
|
+
var newFilter = _objectSpread$g({}, state.filter);
|
|
28830
28822
|
newFilter[item.field] = newVal;
|
|
28831
28823
|
state.setFilter(newFilter);
|
|
28832
28824
|
}
|
|
@@ -28874,7 +28866,7 @@ function UIBuilder(_ref) {
|
|
|
28874
28866
|
case 'AGGrid':
|
|
28875
28867
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
28876
28868
|
id: item.id,
|
|
28877
|
-
filter: _objectSpread$
|
|
28869
|
+
filter: _objectSpread$g({
|
|
28878
28870
|
optionCodices: JSON.stringify(state.data)
|
|
28879
28871
|
}, state.filter),
|
|
28880
28872
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -28928,8 +28920,8 @@ var retailerChild = "retailer-child-5ll0K";
|
|
|
28928
28920
|
var supplier = "supplier-8sm0I";
|
|
28929
28921
|
var dealer = "dealer-xgnku";
|
|
28930
28922
|
var association = "association-b8uVW";
|
|
28931
|
-
var css_248z$
|
|
28932
|
-
styleInject(css_248z$
|
|
28923
|
+
var css_248z$d = ".label-rYNbb {\n width: 225px;\n background-color: #fff;\n cursor: pointer;\n padding: 10px 15px;\n border-radius: 5px;\n display: flex;\n gap: 12px;\n flex-direction: column;\n font-weight: 500;\n}\n\n.not-clickable-wHc5V {\n cursor: inherit;\n color: grey;\n}\n\n.selected-34dYg {\n font-weight: 630;\n}\n\n.description-iFui2 {\n font-weight: 300;\n font-size: small;\n margin-top: -8px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .org-tree-node-label .org-tree-node-label-inner {\n padding: 0;\n padding: initial;\n}\n\n.darkmode .org-tree-container {\n background-color: rgb(20, 20, 20);\n}\n\n.org-tree-container .org-tree-node-label .ant-btn-default:disabled, .org-tree-container .org-tree-node-label .ant-btn-primary:disabled {\n border-color: #d9d9d9;\n color: rgba(0, 0, 0, 0.25);\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.retailer-YNzAh {\n border-bottom: #81c784 solid 5px;\n}\n\n.retailer-child-5ll0K {\n border-bottom: #c8e6c9 solid 5px;\n}\n\n.supplier-8sm0I {\n border-bottom: #ba68c8 solid 5px;\n}\n\n.dealer-xgnku {\n border-bottom: #e1bee7 solid 5px;\n}\n\n.association-b8uVW {\n border-bottom: #fff176 solid 5px;\n}\n";
|
|
28924
|
+
styleInject(css_248z$d);
|
|
28933
28925
|
|
|
28934
28926
|
function getColorClass(data) {
|
|
28935
28927
|
switch (data.type) {
|
|
@@ -29034,8 +29026,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
29034
29026
|
};
|
|
29035
29027
|
var OrgItem$1 = observer(OrgItem);
|
|
29036
29028
|
|
|
29037
|
-
function ownKeys$
|
|
29038
|
-
function _objectSpread$
|
|
29029
|
+
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; }
|
|
29030
|
+
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; }
|
|
29039
29031
|
function useTransformJson (_ref) {
|
|
29040
29032
|
var id = _ref.id;
|
|
29041
29033
|
var _useState = useState(),
|
|
@@ -29101,7 +29093,7 @@ function useTransformJson (_ref) {
|
|
|
29101
29093
|
}();
|
|
29102
29094
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
29103
29095
|
var _data$children;
|
|
29104
|
-
return _objectSpread$
|
|
29096
|
+
return _objectSpread$f(_objectSpread$f({}, data), {}, {
|
|
29105
29097
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
29106
29098
|
data: data,
|
|
29107
29099
|
configuration: configuration,
|
|
@@ -29161,9 +29153,9 @@ var arrow = "arrow-Rd0hp";
|
|
|
29161
29153
|
var openClass = "open-class--gGXs";
|
|
29162
29154
|
var breadcrumb = "breadcrumb-Z0VvH";
|
|
29163
29155
|
var selected = "selected-w-sfW";
|
|
29164
|
-
var disabled$
|
|
29165
|
-
var css_248z$
|
|
29166
|
-
styleInject(css_248z$
|
|
29156
|
+
var disabled$2 = "disabled-0nado";
|
|
29157
|
+
var css_248z$c = ".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";
|
|
29158
|
+
styleInject(css_248z$c);
|
|
29167
29159
|
|
|
29168
29160
|
var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
|
|
29169
29161
|
var open = _ref.open,
|
|
@@ -29186,7 +29178,7 @@ var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
|
|
|
29186
29178
|
var _root$dataStore;
|
|
29187
29179
|
return root === null || root === void 0 || (_root$dataStore = root.dataStore) === null || _root$dataStore === void 0 ? void 0 : _root$dataStore.setSelectedOrganizationId(data.id);
|
|
29188
29180
|
},
|
|
29189
|
-
className: classnames(breadcrumb, root.dataStore.selectedOrganizationId === data.id ? selected : undefined, !data.readPermission ? disabled$
|
|
29181
|
+
className: classnames(breadcrumb, root.dataStore.selectedOrganizationId === data.id ? selected : undefined, !data.readPermission ? disabled$2 : undefined)
|
|
29190
29182
|
};
|
|
29191
29183
|
})
|
|
29192
29184
|
})
|
|
@@ -29196,8 +29188,8 @@ var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
|
|
|
29196
29188
|
|
|
29197
29189
|
var collapsibleInner = "collapsible-inner-rI8kI";
|
|
29198
29190
|
var toolbarLeft = "toolbar-left-X9WRo";
|
|
29199
|
-
var css_248z$
|
|
29200
|
-
styleInject(css_248z$
|
|
29191
|
+
var css_248z$b = ".collapsible-inner-rI8kI {\n overflow: auto;\n padding: 32px 0;\n position: relative;\n}\n\n.toolbar-left-X9WRo {\n position: absolute;\n right: 22px;\n top: 10px;\n display: flex;\n gap: 10px;\n}\n";
|
|
29192
|
+
styleInject(css_248z$b);
|
|
29201
29193
|
|
|
29202
29194
|
var Legend = function Legend(props) {
|
|
29203
29195
|
return /*#__PURE__*/jsx(List$1, {
|
|
@@ -29251,8 +29243,8 @@ var Legend = function Legend(props) {
|
|
|
29251
29243
|
var buttonsWrapper = "buttons-wrapper-Bubkr";
|
|
29252
29244
|
var mask = "mask-ssagp";
|
|
29253
29245
|
var transformWrapper = "transform-wrapper--8t0v";
|
|
29254
|
-
var css_248z$
|
|
29255
|
-
styleInject(css_248z$
|
|
29246
|
+
var css_248z$a = ".buttons-wrapper-Bubkr {\n display: flex;\n gap: 6px;\n}\n\n.buttons-wrapper-Bubkr button {\n min-width: 24px;\n}\n\n.mask-ssagp {\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 1;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.45);\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-backdrop-filter: blur(3px);\n backdrop-filter: blur(3px);\n}\n.mask-ssagp p {\n font-size: 18px;\n font-weight: bold;\n background: rgba(255, 255, 255, 0.4);\n padding: 10px;\n border-radius: 5px;\n}\n\n.transform-wrapper--8t0v .ant-modal-mask,\n.transform-wrapper--8t0v .ant-modal-wrap {\n position: absolute;\n}\n";
|
|
29247
|
+
styleInject(css_248z$a);
|
|
29256
29248
|
|
|
29257
29249
|
var ZoomWrapper = function ZoomWrapper(_ref) {
|
|
29258
29250
|
var _children = _ref.children,
|
|
@@ -29762,8 +29754,8 @@ function useCatalogEditor (id) {
|
|
|
29762
29754
|
};
|
|
29763
29755
|
}
|
|
29764
29756
|
|
|
29765
|
-
function ownKeys$
|
|
29766
|
-
function _objectSpread$
|
|
29757
|
+
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; }
|
|
29758
|
+
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; }
|
|
29767
29759
|
function DragDropUpload(_ref) {
|
|
29768
29760
|
var api2Params = _ref.api2Params,
|
|
29769
29761
|
catalogId = _ref.catalogId,
|
|
@@ -29868,7 +29860,7 @@ function DragDropUpload(_ref) {
|
|
|
29868
29860
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
29869
29861
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
29870
29862
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
29871
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
29863
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$e(_objectSpread$e({}, props), {}, {
|
|
29872
29864
|
children: [/*#__PURE__*/jsx("p", {
|
|
29873
29865
|
className: "ant-upload-drag-icon",
|
|
29874
29866
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -30085,12 +30077,12 @@ function CatalogEditor(_ref) {
|
|
|
30085
30077
|
}
|
|
30086
30078
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
30087
30079
|
|
|
30088
|
-
function ownKeys$
|
|
30089
|
-
function _objectSpread$
|
|
30080
|
+
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; }
|
|
30081
|
+
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; }
|
|
30090
30082
|
var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(props, ref) {
|
|
30091
30083
|
var _root$contentStore$bo, _root$contentStore$ri;
|
|
30092
30084
|
var root = useStore();
|
|
30093
|
-
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$
|
|
30085
|
+
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$d(_objectSpread$d({}, props), {}, {
|
|
30094
30086
|
ref: ref,
|
|
30095
30087
|
darkMode: root.contentStore.theme == 'darkmode',
|
|
30096
30088
|
jwt: root.dataStore.jwt,
|
|
@@ -30102,15 +30094,15 @@ var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(pro
|
|
|
30102
30094
|
var Spreadsheet = observer(SpreadsheetWrapper);
|
|
30103
30095
|
|
|
30104
30096
|
function PackageSelector(_ref) {
|
|
30105
|
-
var
|
|
30097
|
+
var organizationId = _ref.organizationId,
|
|
30098
|
+
selectedPackage = _ref.selectedPackage,
|
|
30106
30099
|
setSelectedPackage = _ref.setSelectedPackage,
|
|
30107
|
-
enricherService = _ref.enricherService
|
|
30108
|
-
organizationId = _ref.organizationId;
|
|
30100
|
+
enricherService = _ref.enricherService;
|
|
30109
30101
|
var _useTranslation = useTranslation(),
|
|
30110
30102
|
t = _useTranslation.t;
|
|
30111
30103
|
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
30112
30104
|
apiInterface: {
|
|
30113
|
-
read: enricherService + "/packages?filter=organizationId==\"".concat(organizationId, "\"
|
|
30105
|
+
read: enricherService + "/packages?fields=name;_id&filter=organizationId==\"".concat(organizationId, "\"")
|
|
30114
30106
|
},
|
|
30115
30107
|
apiMapping: {
|
|
30116
30108
|
type: 'query',
|
|
@@ -30123,7 +30115,7 @@ function PackageSelector(_ref) {
|
|
|
30123
30115
|
label: '${name}',
|
|
30124
30116
|
value: '${_id}'
|
|
30125
30117
|
},
|
|
30126
|
-
title: t('backoffice.
|
|
30118
|
+
title: t('backoffice.menu.items.label.IDMEnricherEditorTablePackages'),
|
|
30127
30119
|
value: {
|
|
30128
30120
|
_id: selectedPackage
|
|
30129
30121
|
},
|
|
@@ -30339,7 +30331,7 @@ function useModule$1 (currentModules) {
|
|
|
30339
30331
|
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
30340
30332
|
label: /*#__PURE__*/jsx(Link, {
|
|
30341
30333
|
to: 'catalogs/idmeditor/packages/' + packageId + '/partlistpos' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
30342
|
-
children: t('backoffice.menu.
|
|
30334
|
+
children: t('backoffice.menu.items.label.IDMEnricherEditorTablePartlistPos')
|
|
30343
30335
|
})
|
|
30344
30336
|
}, {
|
|
30345
30337
|
key: 'groups',
|
|
@@ -30351,6 +30343,16 @@ function useModule$1 (currentModules) {
|
|
|
30351
30343
|
to: 'catalogs/idmeditor/packages/' + packageId + '/groups' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
30352
30344
|
children: t('backoffice.menu.items.label.IDMEnricherEditorTableGroups')
|
|
30353
30345
|
})
|
|
30346
|
+
}, {
|
|
30347
|
+
key: 'pricelists',
|
|
30348
|
+
style: {
|
|
30349
|
+
margin: 0
|
|
30350
|
+
},
|
|
30351
|
+
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
30352
|
+
label: /*#__PURE__*/jsx(Link, {
|
|
30353
|
+
to: 'catalogs/idmeditor/packages/' + packageId + '/pricelists' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
30354
|
+
children: t('backoffice.menu.items.label.IDMEnricherEditorTablePriceLists')
|
|
30355
|
+
})
|
|
30354
30356
|
}];
|
|
30355
30357
|
}, [packageId]);
|
|
30356
30358
|
if (!packageId) throw new Error('packageId is required');
|
|
@@ -31495,6 +31497,67 @@ var config$1 = {
|
|
|
31495
31497
|
}]
|
|
31496
31498
|
};
|
|
31497
31499
|
|
|
31500
|
+
function SeriesSelector$1(_ref) {
|
|
31501
|
+
var packageId = _ref.packageId,
|
|
31502
|
+
selectedSerie = _ref.selectedSerie,
|
|
31503
|
+
setSelectedSerie = _ref.setSelectedSerie,
|
|
31504
|
+
enricherService = _ref.enricherService,
|
|
31505
|
+
dataSet = _ref.dataSet,
|
|
31506
|
+
additionalFields = _ref.additionalFields;
|
|
31507
|
+
var _useTranslation = useTranslation(),
|
|
31508
|
+
t = _useTranslation.t,
|
|
31509
|
+
i18n = _useTranslation.i18n;
|
|
31510
|
+
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
31511
|
+
apiInterface: {
|
|
31512
|
+
read: enricherService + '/packages/' + packageId + '/' + dataSet + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo").concat(additionalFields ? ";".concat(additionalFields.join(';')) : '')
|
|
31513
|
+
},
|
|
31514
|
+
selectMapping: {
|
|
31515
|
+
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
|
31516
|
+
value: '${_id}'
|
|
31517
|
+
},
|
|
31518
|
+
autoSelectFirst: true,
|
|
31519
|
+
title: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingSerie'),
|
|
31520
|
+
value: selectedSerie,
|
|
31521
|
+
onChange: function onChange(value) {
|
|
31522
|
+
return setSelectedSerie ? setSelectedSerie(value) : null;
|
|
31523
|
+
},
|
|
31524
|
+
search: true,
|
|
31525
|
+
style: {
|
|
31526
|
+
width: 200
|
|
31527
|
+
}
|
|
31528
|
+
});
|
|
31529
|
+
}
|
|
31530
|
+
|
|
31531
|
+
function FeatureSelector$1(_ref) {
|
|
31532
|
+
var packageId = _ref.packageId,
|
|
31533
|
+
selectedFeature = _ref.selectedFeature,
|
|
31534
|
+
setSelectedFeature = _ref.setSelectedFeature,
|
|
31535
|
+
enricherService = _ref.enricherService,
|
|
31536
|
+
dataSet = _ref.dataSet;
|
|
31537
|
+
var _useTranslation = useTranslation(),
|
|
31538
|
+
t = _useTranslation.t,
|
|
31539
|
+
i18n = _useTranslation.i18n;
|
|
31540
|
+
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
31541
|
+
apiInterface: {
|
|
31542
|
+
read: enricherService + '/packages/' + packageId + '/' + dataSet + "/features?fields=featureText[".concat(i18n.language.toLocaleUpperCase(), "];featureNo;_id")
|
|
31543
|
+
},
|
|
31544
|
+
selectMapping: {
|
|
31545
|
+
label: "${featureText.".concat(i18n.language.toLocaleUpperCase(), "} (${featureNo})"),
|
|
31546
|
+
value: '${_id}'
|
|
31547
|
+
},
|
|
31548
|
+
autoSelectFirst: true,
|
|
31549
|
+
title: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingFeature'),
|
|
31550
|
+
value: selectedFeature,
|
|
31551
|
+
onChange: function onChange(value) {
|
|
31552
|
+
return setSelectedFeature ? setSelectedFeature(value) : null;
|
|
31553
|
+
},
|
|
31554
|
+
search: true,
|
|
31555
|
+
style: {
|
|
31556
|
+
width: 200
|
|
31557
|
+
}
|
|
31558
|
+
});
|
|
31559
|
+
}
|
|
31560
|
+
|
|
31498
31561
|
function useConfiguration (configuration) {
|
|
31499
31562
|
var _useState = useState([]),
|
|
31500
31563
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -31535,59 +31598,6 @@ function useConfiguration (configuration) {
|
|
|
31535
31598
|
};
|
|
31536
31599
|
}
|
|
31537
31600
|
|
|
31538
|
-
function PrefilterSelector (_ref) {
|
|
31539
|
-
var type = _ref.type,
|
|
31540
|
-
packageId = _ref.packageId,
|
|
31541
|
-
selectedSerie = _ref.selectedSerie,
|
|
31542
|
-
setSelectedSerie = _ref.setSelectedSerie,
|
|
31543
|
-
selectedFeature = _ref.selectedFeature,
|
|
31544
|
-
setSelectedFeature = _ref.setSelectedFeature,
|
|
31545
|
-
enricherService = _ref.enricherService,
|
|
31546
|
-
dataSet = _ref.dataSet;
|
|
31547
|
-
var _useTranslation = useTranslation(),
|
|
31548
|
-
t = _useTranslation.t,
|
|
31549
|
-
i18n = _useTranslation.i18n;
|
|
31550
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
31551
|
-
children: [type === 'item' && /*#__PURE__*/jsx(SimpleSelect, {
|
|
31552
|
-
apiInterface: {
|
|
31553
|
-
read: enricherService + '/packages/' + packageId + '/' + dataSet + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id")
|
|
31554
|
-
},
|
|
31555
|
-
selectMapping: {
|
|
31556
|
-
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
|
31557
|
-
value: '${_id}'
|
|
31558
|
-
},
|
|
31559
|
-
autoSelectFirst: true,
|
|
31560
|
-
title: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingSerie'),
|
|
31561
|
-
value: selectedSerie,
|
|
31562
|
-
onChange: function onChange(value) {
|
|
31563
|
-
return setSelectedSerie(value);
|
|
31564
|
-
},
|
|
31565
|
-
search: true,
|
|
31566
|
-
style: {
|
|
31567
|
-
width: 200
|
|
31568
|
-
}
|
|
31569
|
-
}), type === 'option' && /*#__PURE__*/jsx(SimpleSelect, {
|
|
31570
|
-
apiInterface: {
|
|
31571
|
-
read: enricherService + '/packages/' + packageId + '/' + dataSet + "/features?fields=featureText[".concat(i18n.language.toLocaleUpperCase(), "];featureNo;_id")
|
|
31572
|
-
},
|
|
31573
|
-
selectMapping: {
|
|
31574
|
-
label: "${featureText.".concat(i18n.language.toLocaleUpperCase(), "} (${featureNo})"),
|
|
31575
|
-
value: '${_id}'
|
|
31576
|
-
},
|
|
31577
|
-
autoSelectFirst: true,
|
|
31578
|
-
title: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingFeature'),
|
|
31579
|
-
value: selectedFeature,
|
|
31580
|
-
onChange: function onChange(value) {
|
|
31581
|
-
return setSelectedFeature(value);
|
|
31582
|
-
},
|
|
31583
|
-
search: true,
|
|
31584
|
-
style: {
|
|
31585
|
-
width: 200
|
|
31586
|
-
}
|
|
31587
|
-
})]
|
|
31588
|
-
});
|
|
31589
|
-
}
|
|
31590
|
-
|
|
31591
31601
|
var RenamingFeature = function RenamingFeature() {
|
|
31592
31602
|
return /*#__PURE__*/jsx(RenamingTable, {
|
|
31593
31603
|
type: "features",
|
|
@@ -31693,11 +31703,14 @@ var RenamingTable = function RenamingTable(_ref) {
|
|
|
31693
31703
|
return updateNavigation(id);
|
|
31694
31704
|
},
|
|
31695
31705
|
enricherService: apiConfig.enricherService
|
|
31696
|
-
}), /*#__PURE__*/jsx(
|
|
31697
|
-
type: type == 'items' ? 'item' : type == 'options' ? 'option' : type,
|
|
31706
|
+
}), type === 'items' && /*#__PURE__*/jsx(SeriesSelector$1, {
|
|
31698
31707
|
packageId: packageId,
|
|
31699
31708
|
selectedSerie: selectedSerie,
|
|
31700
31709
|
setSelectedSerie: setSelectedSerie,
|
|
31710
|
+
enricherService: apiConfig.enricherService,
|
|
31711
|
+
dataSet: 'lookup'
|
|
31712
|
+
}), type === 'options' && /*#__PURE__*/jsx(FeatureSelector$1, {
|
|
31713
|
+
packageId: packageId,
|
|
31701
31714
|
selectedFeature: selectedFeature,
|
|
31702
31715
|
setSelectedFeature: setSelectedFeature,
|
|
31703
31716
|
enricherService: apiConfig.enricherService,
|
|
@@ -32178,12 +32191,14 @@ var ExclusivityTable = function ExclusivityTable(_ref) {
|
|
|
32178
32191
|
return updateNavigation(id);
|
|
32179
32192
|
},
|
|
32180
32193
|
enricherService: apiConfig.enricherService
|
|
32181
|
-
}), /*#__PURE__*/jsx(
|
|
32182
|
-
type: type.slice(1) //remove the first character 'e' from the type
|
|
32183
|
-
,
|
|
32194
|
+
}), type === 'eitem' && /*#__PURE__*/jsx(SeriesSelector$1, {
|
|
32184
32195
|
packageId: packageId,
|
|
32185
32196
|
selectedSerie: selectedSerie,
|
|
32186
32197
|
setSelectedSerie: setSelectedSerie,
|
|
32198
|
+
enricherService: apiConfig.enricherService,
|
|
32199
|
+
dataSet: 'exclusivities'
|
|
32200
|
+
}), type === 'eoption' && /*#__PURE__*/jsx(FeatureSelector$1, {
|
|
32201
|
+
packageId: packageId,
|
|
32187
32202
|
selectedFeature: selectedFeature,
|
|
32188
32203
|
setSelectedFeature: setSelectedFeature,
|
|
32189
32204
|
enricherService: apiConfig.enricherService,
|
|
@@ -32297,241 +32312,1338 @@ function TableTabGroups () {
|
|
|
32297
32312
|
field: '_id',
|
|
32298
32313
|
editable: false,
|
|
32299
32314
|
cellDataType: 'objectId'
|
|
32300
|
-
}]
|
|
32301
|
-
};
|
|
32302
|
-
}, [apiInterface]);
|
|
32303
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
32304
|
-
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
32305
|
-
title: /*#__PURE__*/jsxs("div", {
|
|
32306
|
-
children: [t('backoffice.menu.items.label.IDMEnricherEditorTableTabGroups'), /*#__PURE__*/jsx(Space$1, {
|
|
32307
|
-
style: {
|
|
32308
|
-
"float": 'right'
|
|
32309
|
-
},
|
|
32310
|
-
children: /*#__PURE__*/jsx(PackageSelector, {
|
|
32311
|
-
organizationId: organizationId,
|
|
32312
|
-
selectedPackage: packageId,
|
|
32313
|
-
setSelectedPackage: function setSelectedPackage(id) {
|
|
32314
|
-
return updateNavigation(id);
|
|
32315
|
-
},
|
|
32316
|
-
enricherService: apiConfig.enricherService
|
|
32317
|
-
})
|
|
32318
|
-
})]
|
|
32319
|
-
})
|
|
32320
|
-
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
32321
|
-
gridId: 'crud-grid_tabgroups',
|
|
32322
|
-
applicationData: applicationData,
|
|
32323
|
-
configuration: configuration
|
|
32324
|
-
})]
|
|
32325
|
-
});
|
|
32326
|
-
}
|
|
32327
|
-
|
|
32328
|
-
function TablePartlistPos () {
|
|
32329
|
-
var _useTranslation = useTranslation(),
|
|
32330
|
-
t = _useTranslation.t;
|
|
32331
|
-
var _useModule = useModule$1(['
|
|
32332
|
-
packageId = _useModule.packageId,
|
|
32333
|
-
organizationId = _useModule.organizationId,
|
|
32334
|
-
updateNavigation = _useModule.updateNavigation,
|
|
32335
|
-
apiConfig = _useModule.apiConfig;
|
|
32336
|
-
var posInvisibility = useMemo(function () {
|
|
32337
|
-
return [{
|
|
32338
|
-
name: t('backoffice.idmCatalogEditor.partlistpos.label.pi0'),
|
|
32339
|
-
value: '0'
|
|
32340
|
-
}, {
|
|
32341
|
-
name: t('backoffice.idmCatalogEditor.partlistpos.label.pi1'),
|
|
32342
|
-
value: '1'
|
|
32343
|
-
}, {
|
|
32344
|
-
name: t('backoffice.idmCatalogEditor.partlistpos.label.pi2'),
|
|
32345
|
-
value: '2'
|
|
32346
|
-
}];
|
|
32347
|
-
}, [t]);
|
|
32348
|
-
var applicationData = useMemo(function () {
|
|
32349
|
-
return {
|
|
32350
|
-
packageId: packageId,
|
|
32351
|
-
organizationId: organizationId
|
|
32352
|
-
};
|
|
32353
|
-
}, [packageId, organizationId]);
|
|
32354
|
-
var apiInterface = useMemo(function () {
|
|
32355
|
-
return {
|
|
32356
|
-
//TODO: Es gibt globale Tabgroups, die vordefiniert sind und pro Enricher Paket nochmals angepasst werden können -endpoint anpassen?
|
|
32357
|
-
read: apiConfig.enricherService + '/packages/${packageId}/partlistpos',
|
|
32358
|
-
create: apiConfig.enricherService + '/packages/${packageId}/partlistpos',
|
|
32359
|
-
restore: apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
|
32360
|
-
"delete": apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
|
32361
|
-
update: apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}'
|
|
32362
|
-
};
|
|
32363
|
-
}, []);
|
|
32364
|
-
var configuration = useMemo(function () {
|
|
32365
|
-
return {
|
|
32366
|
-
type: 'dotnetSSM',
|
|
32367
|
-
apiInterface: apiInterface,
|
|
32368
|
-
dateFormat: 'LL',
|
|
32369
|
-
floatingFilter: true,
|
|
32370
|
-
colDef: [{
|
|
32371
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.partlistKey',
|
|
32372
|
-
field: 'partlistKey',
|
|
32373
|
-
editable: false
|
|
32374
|
-
}, {
|
|
32375
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.itemRefSerieNo',
|
|
32376
|
-
field: 'itemRefSerieNo',
|
|
32377
|
-
cellDataType: 'number',
|
|
32378
|
-
editable: false
|
|
32379
|
-
}, {
|
|
32380
|
-
headerName: 'backoffice.idmEnricher.properties.partlistpos.itemRefSerieNoDisplayText',
|
|
32381
|
-
marryChildren: true,
|
|
32382
|
-
editable: false,
|
|
32383
|
-
children: [{
|
|
32384
|
-
field: 'itemRefSerieNoDisplayText.DE',
|
|
32385
|
-
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32386
|
-
isDictionary: true,
|
|
32387
|
-
editable: false
|
|
32388
|
-
}, {
|
|
32389
|
-
field: 'itemRefSerieNoDisplayText.EN',
|
|
32390
|
-
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32391
|
-
isDictionary: true,
|
|
32392
|
-
editable: false
|
|
32393
|
-
}, {
|
|
32394
|
-
field: 'itemRefSerieNoDisplayText.FR',
|
|
32395
|
-
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32396
|
-
isDictionary: true,
|
|
32397
|
-
editable: false
|
|
32398
|
-
}, {
|
|
32399
|
-
field: 'itemRefSerieNoDisplayText.IT',
|
|
32400
|
-
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32401
|
-
isDictionary: true,
|
|
32402
|
-
editable: false
|
|
32403
|
-
}]
|
|
32315
|
+
}]
|
|
32316
|
+
};
|
|
32317
|
+
}, [apiInterface]);
|
|
32318
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
32319
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
32320
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
32321
|
+
children: [t('backoffice.menu.items.label.IDMEnricherEditorTableTabGroups'), /*#__PURE__*/jsx(Space$1, {
|
|
32322
|
+
style: {
|
|
32323
|
+
"float": 'right'
|
|
32324
|
+
},
|
|
32325
|
+
children: /*#__PURE__*/jsx(PackageSelector, {
|
|
32326
|
+
organizationId: organizationId,
|
|
32327
|
+
selectedPackage: packageId,
|
|
32328
|
+
setSelectedPackage: function setSelectedPackage(id) {
|
|
32329
|
+
return updateNavigation(id);
|
|
32330
|
+
},
|
|
32331
|
+
enricherService: apiConfig.enricherService
|
|
32332
|
+
})
|
|
32333
|
+
})]
|
|
32334
|
+
})
|
|
32335
|
+
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
32336
|
+
gridId: 'crud-grid_tabgroups',
|
|
32337
|
+
applicationData: applicationData,
|
|
32338
|
+
configuration: configuration
|
|
32339
|
+
})]
|
|
32340
|
+
});
|
|
32341
|
+
}
|
|
32342
|
+
|
|
32343
|
+
function TablePartlistPos () {
|
|
32344
|
+
var _useTranslation = useTranslation(),
|
|
32345
|
+
t = _useTranslation.t;
|
|
32346
|
+
var _useModule = useModule$1(['partlistpos']),
|
|
32347
|
+
packageId = _useModule.packageId,
|
|
32348
|
+
organizationId = _useModule.organizationId,
|
|
32349
|
+
updateNavigation = _useModule.updateNavigation,
|
|
32350
|
+
apiConfig = _useModule.apiConfig;
|
|
32351
|
+
var posInvisibility = useMemo(function () {
|
|
32352
|
+
return [{
|
|
32353
|
+
name: t('backoffice.idmCatalogEditor.partlistpos.label.pi0'),
|
|
32354
|
+
value: '0'
|
|
32355
|
+
}, {
|
|
32356
|
+
name: t('backoffice.idmCatalogEditor.partlistpos.label.pi1'),
|
|
32357
|
+
value: '1'
|
|
32358
|
+
}, {
|
|
32359
|
+
name: t('backoffice.idmCatalogEditor.partlistpos.label.pi2'),
|
|
32360
|
+
value: '2'
|
|
32361
|
+
}];
|
|
32362
|
+
}, [t]);
|
|
32363
|
+
var applicationData = useMemo(function () {
|
|
32364
|
+
return {
|
|
32365
|
+
packageId: packageId,
|
|
32366
|
+
organizationId: organizationId
|
|
32367
|
+
};
|
|
32368
|
+
}, [packageId, organizationId]);
|
|
32369
|
+
var apiInterface = useMemo(function () {
|
|
32370
|
+
return {
|
|
32371
|
+
//TODO: Es gibt globale Tabgroups, die vordefiniert sind und pro Enricher Paket nochmals angepasst werden können -endpoint anpassen?
|
|
32372
|
+
read: apiConfig.enricherService + '/packages/${packageId}/partlistpos',
|
|
32373
|
+
create: apiConfig.enricherService + '/packages/${packageId}/partlistpos',
|
|
32374
|
+
restore: apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
|
32375
|
+
"delete": apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
|
32376
|
+
update: apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}'
|
|
32377
|
+
};
|
|
32378
|
+
}, []);
|
|
32379
|
+
var configuration = useMemo(function () {
|
|
32380
|
+
return {
|
|
32381
|
+
type: 'dotnetSSM',
|
|
32382
|
+
apiInterface: apiInterface,
|
|
32383
|
+
dateFormat: 'LL',
|
|
32384
|
+
floatingFilter: true,
|
|
32385
|
+
colDef: [{
|
|
32386
|
+
headerName: 'backoffice.idmEnricher.partlistpos.label.partlistKey',
|
|
32387
|
+
field: 'partlistKey',
|
|
32388
|
+
editable: false
|
|
32389
|
+
}, {
|
|
32390
|
+
headerName: 'backoffice.idmEnricher.partlistpos.label.itemRefSerieNo',
|
|
32391
|
+
field: 'itemRefSerieNo',
|
|
32392
|
+
cellDataType: 'number',
|
|
32393
|
+
editable: false
|
|
32394
|
+
}, {
|
|
32395
|
+
headerName: 'backoffice.idmEnricher.properties.partlistpos.itemRefSerieNoDisplayText',
|
|
32396
|
+
marryChildren: true,
|
|
32397
|
+
editable: false,
|
|
32398
|
+
children: [{
|
|
32399
|
+
field: 'itemRefSerieNoDisplayText.DE',
|
|
32400
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32401
|
+
isDictionary: true,
|
|
32402
|
+
editable: false
|
|
32403
|
+
}, {
|
|
32404
|
+
field: 'itemRefSerieNoDisplayText.EN',
|
|
32405
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32406
|
+
isDictionary: true,
|
|
32407
|
+
editable: false
|
|
32408
|
+
}, {
|
|
32409
|
+
field: 'itemRefSerieNoDisplayText.FR',
|
|
32410
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32411
|
+
isDictionary: true,
|
|
32412
|
+
editable: false
|
|
32413
|
+
}, {
|
|
32414
|
+
field: 'itemRefSerieNoDisplayText.IT',
|
|
32415
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32416
|
+
isDictionary: true,
|
|
32417
|
+
editable: false
|
|
32418
|
+
}]
|
|
32419
|
+
}, {
|
|
32420
|
+
headerName: 'backoffice.idmEnricher.partlistpos.label.itemRefTypeNo',
|
|
32421
|
+
field: 'itemRefTypeNo',
|
|
32422
|
+
editable: false
|
|
32423
|
+
}, {
|
|
32424
|
+
headerName: 'backoffice.idmEnricher.properties.partlistpos.itemRefTypeNoDisplayText',
|
|
32425
|
+
marryChildren: true,
|
|
32426
|
+
editable: false,
|
|
32427
|
+
children: [{
|
|
32428
|
+
field: 'itemRefTypeNoDisplayText.DE',
|
|
32429
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32430
|
+
isDictionary: true,
|
|
32431
|
+
editable: false
|
|
32432
|
+
}, {
|
|
32433
|
+
field: 'itemRefTypeNoDisplayText.EN',
|
|
32434
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32435
|
+
isDictionary: true,
|
|
32436
|
+
editable: false
|
|
32437
|
+
}, {
|
|
32438
|
+
field: 'itemRefTypeNoDisplayText.FR',
|
|
32439
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32440
|
+
isDictionary: true,
|
|
32441
|
+
editable: false
|
|
32442
|
+
}, {
|
|
32443
|
+
field: 'itemRefTypeNoDisplayText.IT',
|
|
32444
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32445
|
+
isDictionary: true,
|
|
32446
|
+
editable: false
|
|
32447
|
+
}]
|
|
32448
|
+
}, {
|
|
32449
|
+
headerName: 'backoffice.idmEnricher.partlistpos.label.decisionPosCount',
|
|
32450
|
+
field: 'posCountValue',
|
|
32451
|
+
cellDataType: 'number',
|
|
32452
|
+
editable: false
|
|
32453
|
+
}, {
|
|
32454
|
+
headerName: 'backoffice.idmEnricher.partlistpos.label.decisionPosCountDisplayText',
|
|
32455
|
+
marryChildren: true,
|
|
32456
|
+
editable: false,
|
|
32457
|
+
children: [{
|
|
32458
|
+
field: 'decisionPosCountDisplayText.DE',
|
|
32459
|
+
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32460
|
+
isDictionary: true,
|
|
32461
|
+
editable: false
|
|
32462
|
+
}, {
|
|
32463
|
+
field: 'decisionPosCountDisplayText.EN',
|
|
32464
|
+
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32465
|
+
isDictionary: true,
|
|
32466
|
+
editable: false
|
|
32467
|
+
}, {
|
|
32468
|
+
field: 'decisionPosCountDisplayText.FR',
|
|
32469
|
+
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32470
|
+
isDictionary: true,
|
|
32471
|
+
editable: false
|
|
32472
|
+
}, {
|
|
32473
|
+
field: 'decisionPosCountDisplayText.IT',
|
|
32474
|
+
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32475
|
+
isDictionary: true,
|
|
32476
|
+
editable: false
|
|
32477
|
+
}]
|
|
32478
|
+
}, {
|
|
32479
|
+
field: 'decisions',
|
|
32480
|
+
headerName: 'backoffice.idmEnricher.partlistpos.label.decisions',
|
|
32481
|
+
cellDataType: 'lookup',
|
|
32482
|
+
editable: true,
|
|
32483
|
+
customParams: {
|
|
32484
|
+
nameField: 'decisionRefsDisplayTexts',
|
|
32485
|
+
filterCellType: 'number',
|
|
32486
|
+
displayLabelTemplate: '${name} (${value})',
|
|
32487
|
+
multiple: true,
|
|
32488
|
+
translated: true
|
|
32489
|
+
},
|
|
32490
|
+
additionalFields: ['decisionRefsDisplayTexts'],
|
|
32491
|
+
isDictionary: true
|
|
32492
|
+
}, {
|
|
32493
|
+
headerName: 'backoffice.idmEnricher.partlistpos.label.posCountValue',
|
|
32494
|
+
field: 'posCountValue',
|
|
32495
|
+
cellDataType: 'number',
|
|
32496
|
+
editable: false
|
|
32497
|
+
}, {
|
|
32498
|
+
headerName: 'backoffice.idmEnricher.general.partlistpos.label.posInvisibility',
|
|
32499
|
+
field: 'posInvisibility',
|
|
32500
|
+
cellDataType: 'enum',
|
|
32501
|
+
customParams: {
|
|
32502
|
+
enumData: posInvisibility,
|
|
32503
|
+
displayLabelTemplate: '${name} (${value})'
|
|
32504
|
+
},
|
|
32505
|
+
editable: false
|
|
32506
|
+
}, {
|
|
32507
|
+
headerName: 'backoffice.idmEnricher.partlistpos.label.retailPrefix',
|
|
32508
|
+
field: 'retailPrefix',
|
|
32509
|
+
editable: true
|
|
32510
|
+
}, {
|
|
32511
|
+
headerName: 'backoffice.idmEnricher.partlistpos.label.retailArtilceNumber',
|
|
32512
|
+
field: 'retailArtilceNumber',
|
|
32513
|
+
editable: true
|
|
32514
|
+
}, {
|
|
32515
|
+
field: 'organizationId',
|
|
32516
|
+
cellDataType: 'string',
|
|
32517
|
+
editable: false,
|
|
32518
|
+
hide: true,
|
|
32519
|
+
defaultValue: '${organizationId}'
|
|
32520
|
+
}, {
|
|
32521
|
+
headerName: 'backoffice.idmEnricher.general.label.lastUpdatedDate',
|
|
32522
|
+
field: 'lastUpdatedDate',
|
|
32523
|
+
cellDataType: 'dateString',
|
|
32524
|
+
editable: false
|
|
32525
|
+
}, {
|
|
32526
|
+
headerName: 'backoffice.idmEnricher.general.label.createdDate',
|
|
32527
|
+
field: 'createdDate',
|
|
32528
|
+
cellDataType: 'dateString',
|
|
32529
|
+
editable: false
|
|
32530
|
+
}, {
|
|
32531
|
+
headerName: 'backoffice.idmEnricher.general.label.createdBy',
|
|
32532
|
+
field: 'createdByDisplayText',
|
|
32533
|
+
editable: false
|
|
32534
|
+
}, {
|
|
32535
|
+
headerName: 'backoffice.idmEnricher.general.label.lastUpdatedBy',
|
|
32536
|
+
field: 'lastUpdatedByDisplayText',
|
|
32537
|
+
editable: false
|
|
32538
|
+
}, {
|
|
32539
|
+
headerName: 'backoffice.idmEnricher.general.label._id',
|
|
32540
|
+
field: '_id',
|
|
32541
|
+
editable: false,
|
|
32542
|
+
cellDataType: 'objectId'
|
|
32543
|
+
}]
|
|
32544
|
+
};
|
|
32545
|
+
}, [apiInterface, posInvisibility]);
|
|
32546
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
32547
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
32548
|
+
title: /*#__PURE__*/jsxs("div", {
|
|
32549
|
+
children: [t('backoffice.menu.items.label.IDMEnricherEditorTablePartlistPos'), /*#__PURE__*/jsx(Space$1, {
|
|
32550
|
+
style: {
|
|
32551
|
+
"float": 'right'
|
|
32552
|
+
},
|
|
32553
|
+
children: /*#__PURE__*/jsx(PackageSelector, {
|
|
32554
|
+
organizationId: organizationId,
|
|
32555
|
+
selectedPackage: packageId,
|
|
32556
|
+
setSelectedPackage: function setSelectedPackage(id) {
|
|
32557
|
+
return updateNavigation(id);
|
|
32558
|
+
},
|
|
32559
|
+
enricherService: apiConfig.enricherService
|
|
32560
|
+
})
|
|
32561
|
+
})]
|
|
32562
|
+
})
|
|
32563
|
+
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
32564
|
+
gridId: 'crud-grid_epartlistpos',
|
|
32565
|
+
applicationData: applicationData,
|
|
32566
|
+
configuration: configuration
|
|
32567
|
+
})]
|
|
32568
|
+
});
|
|
32569
|
+
}
|
|
32570
|
+
|
|
32571
|
+
/** Type of price modification that can be applied */
|
|
32572
|
+
|
|
32573
|
+
/** Represents a single price entry with its value and validation state */
|
|
32574
|
+
|
|
32575
|
+
/** State container for both factor and discount entries */
|
|
32576
|
+
|
|
32577
|
+
/**
|
|
32578
|
+
* Formats a list of values for display in the cell
|
|
32579
|
+
* For both types, displays the actual factor value (e.g., 0.8 for 20% discount)
|
|
32580
|
+
* @param values - The values to format
|
|
32581
|
+
* @param type - The type of price modification
|
|
32582
|
+
* @param locale - The locale to use for formatting
|
|
32583
|
+
* @returns The formatted string with values separated by semicolons
|
|
32584
|
+
*/
|
|
32585
|
+
var formatListValue = function formatListValue(values, type, locale) {
|
|
32586
|
+
if (!(values !== null && values !== void 0 && values.length)) return '-';
|
|
32587
|
+
var formatter = new Intl.NumberFormat(locale, {
|
|
32588
|
+
minimumFractionDigits: 1,
|
|
32589
|
+
maximumFractionDigits: 2
|
|
32590
|
+
});
|
|
32591
|
+
return values.map(function (value) {
|
|
32592
|
+
return formatter.format(value);
|
|
32593
|
+
}).join('; ');
|
|
32594
|
+
};
|
|
32595
|
+
|
|
32596
|
+
/**
|
|
32597
|
+
* Converts an internal value to its display representation
|
|
32598
|
+
* For factors: keeps the decimal value
|
|
32599
|
+
* For discounts: converts to percentage (e.g., 0.2 -> "20")
|
|
32600
|
+
* @param value - The internal value to convert
|
|
32601
|
+
* @param type - The type of price modification
|
|
32602
|
+
* @returns The display value as string
|
|
32603
|
+
*/
|
|
32604
|
+
var convertToDisplayValue = function convertToDisplayValue(value, type) {
|
|
32605
|
+
if (type === 'factor') return value;
|
|
32606
|
+
var numValue = parseFloat(value);
|
|
32607
|
+
return isNaN(numValue) ? '0' : Math.round(numValue * 100).toString();
|
|
32608
|
+
};
|
|
32609
|
+
|
|
32610
|
+
/**
|
|
32611
|
+
* Converts a display value back to its internal representation
|
|
32612
|
+
* For factors: keeps the input value
|
|
32613
|
+
* For discounts: converts from percentage to decimal (e.g., "20" -> "0.2")
|
|
32614
|
+
* @param value - The display value to convert
|
|
32615
|
+
* @param type - The type of price modification
|
|
32616
|
+
* @returns The internal value as string
|
|
32617
|
+
*/
|
|
32618
|
+
var convertFromDisplayValue = function convertFromDisplayValue(value, type) {
|
|
32619
|
+
if (type === 'factor') return value;
|
|
32620
|
+
var numValue = parseInt(value, 10);
|
|
32621
|
+
return isNaN(numValue) ? '0' : (numValue / 100).toString();
|
|
32622
|
+
};
|
|
32623
|
+
|
|
32624
|
+
/**
|
|
32625
|
+
* Validates if an input value is valid for the given type
|
|
32626
|
+
* For factors: must be >= 1
|
|
32627
|
+
* For discounts: must be >= 0 and <= 0.99
|
|
32628
|
+
* @param value - The value to validate
|
|
32629
|
+
* @param type - The type of price modification
|
|
32630
|
+
* @returns True if the value is valid for the given type
|
|
32631
|
+
*/
|
|
32632
|
+
var isValidInput = function isValidInput(value, type) {
|
|
32633
|
+
var numValue = parseFloat(value);
|
|
32634
|
+
if (isNaN(numValue)) return false;
|
|
32635
|
+
return type === 'factor' ? numValue >= 1 : numValue >= 0 && numValue <= 0.99;
|
|
32636
|
+
};
|
|
32637
|
+
|
|
32638
|
+
/**
|
|
32639
|
+
* Checks if a value is effective (should be saved)
|
|
32640
|
+
* For factors: must be > 1 (1 is valid but not effective)
|
|
32641
|
+
* For discounts: must be >= 0.01 (0 is valid but not effective)
|
|
32642
|
+
* @param value - The value to check
|
|
32643
|
+
* @param type - The type of price modification
|
|
32644
|
+
* @returns True if the value should be saved
|
|
32645
|
+
*/
|
|
32646
|
+
var isEffectiveValue = function isEffectiveValue(value, type) {
|
|
32647
|
+
var numValue = parseFloat(value);
|
|
32648
|
+
return type === 'factor' ? numValue > 1 : numValue >= 0.01;
|
|
32649
|
+
};
|
|
32650
|
+
|
|
32651
|
+
/**
|
|
32652
|
+
* Gets the default value for a given type
|
|
32653
|
+
* Factor: "1" (valid but not effective)
|
|
32654
|
+
* Discount: "0" (valid but not effective)
|
|
32655
|
+
* @param type - The type of price modification
|
|
32656
|
+
* @returns The default value as string
|
|
32657
|
+
*/
|
|
32658
|
+
var getDefaultValue = function getDefaultValue(type) {
|
|
32659
|
+
return type === 'factor' ? '1' : '0';
|
|
32660
|
+
};
|
|
32661
|
+
|
|
32662
|
+
/**
|
|
32663
|
+
* Checks if a value is the default value for its type
|
|
32664
|
+
* @param value - The value to check
|
|
32665
|
+
* @param type - The type of price modification
|
|
32666
|
+
* @returns True if the value is the default value for its type
|
|
32667
|
+
*/
|
|
32668
|
+
var isDefaultValue = function isDefaultValue(value, type) {
|
|
32669
|
+
return value === getDefaultValue(type);
|
|
32670
|
+
};
|
|
32671
|
+
|
|
32672
|
+
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; }
|
|
32673
|
+
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; }
|
|
32674
|
+
/**
|
|
32675
|
+
* Custom hook to manage price factor state and logic
|
|
32676
|
+
* @param props - Hook configuration
|
|
32677
|
+
* @param props.data - Data of the row
|
|
32678
|
+
* @param props.initialValue - Initial array of values
|
|
32679
|
+
* @param props.onSave - Callback to save values
|
|
32680
|
+
* @param props.onRefreshCell - Callback to refresh the cell after save
|
|
32681
|
+
*/
|
|
32682
|
+
function usePriceFactor(_ref) {
|
|
32683
|
+
var _ref$data = _ref.data,
|
|
32684
|
+
data = _ref$data === void 0 ? {} : _ref$data,
|
|
32685
|
+
initialValue = _ref.initialValue,
|
|
32686
|
+
onSave = _ref.onSave,
|
|
32687
|
+
onRefreshCell = _ref.onRefreshCell;
|
|
32688
|
+
var _useState = useState(false),
|
|
32689
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32690
|
+
isModalOpen = _useState2[0],
|
|
32691
|
+
setIsModalOpen = _useState2[1];
|
|
32692
|
+
var _useState3 = useState('factor'),
|
|
32693
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
32694
|
+
type = _useState4[0],
|
|
32695
|
+
setType = _useState4[1];
|
|
32696
|
+
var _useState5 = useState({
|
|
32697
|
+
factor: [],
|
|
32698
|
+
discount: []
|
|
32699
|
+
}),
|
|
32700
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
32701
|
+
entries = _useState6[0],
|
|
32702
|
+
setEntries = _useState6[1];
|
|
32703
|
+
var _useState7 = useState(false),
|
|
32704
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
32705
|
+
hasChangedCurrentType = _useState8[0],
|
|
32706
|
+
setHasChangedCurrentType = _useState8[1];
|
|
32707
|
+
var updateEntries = function updateEntries(newTypeEntries) {
|
|
32708
|
+
setHasChangedCurrentType(true);
|
|
32709
|
+
setEntries(function (prev) {
|
|
32710
|
+
return _objectSpread$c(_objectSpread$c({}, prev), {}, _defineProperty(_defineProperty({}, type, newTypeEntries), type === 'factor' ? 'discount' : 'factor', []));
|
|
32711
|
+
});
|
|
32712
|
+
};
|
|
32713
|
+
var handleModalOpen = useCallback(function () {
|
|
32714
|
+
var values = initialValue || [];
|
|
32715
|
+
var firstValue = values[0];
|
|
32716
|
+
var initialType = firstValue ? firstValue > 1 ? 'factor' : 'discount' : 'factor';
|
|
32717
|
+
var initialEntries = values.map(function (val) {
|
|
32718
|
+
return {
|
|
32719
|
+
value: val.toString(),
|
|
32720
|
+
isValid: isValidInput(val.toString(), initialType)
|
|
32721
|
+
};
|
|
32722
|
+
});
|
|
32723
|
+
|
|
32724
|
+
// Ensure at least one entry
|
|
32725
|
+
if (initialEntries.length === 0) {
|
|
32726
|
+
initialEntries.push({
|
|
32727
|
+
value: getDefaultValue(initialType),
|
|
32728
|
+
isValid: true
|
|
32729
|
+
});
|
|
32730
|
+
}
|
|
32731
|
+
setType(initialType);
|
|
32732
|
+
setEntries({
|
|
32733
|
+
factor: initialType === 'factor' ? initialEntries : [],
|
|
32734
|
+
discount: initialType === 'discount' ? initialEntries : []
|
|
32735
|
+
});
|
|
32736
|
+
setHasChangedCurrentType(false);
|
|
32737
|
+
setIsModalOpen(true);
|
|
32738
|
+
}, [initialValue]);
|
|
32739
|
+
var handleModalClose = function handleModalClose() {
|
|
32740
|
+
return setIsModalOpen(false);
|
|
32741
|
+
};
|
|
32742
|
+
var handleTypeChange = function handleTypeChange(newType) {
|
|
32743
|
+
setType(newType);
|
|
32744
|
+
// Always ensure at least one entry when switching types
|
|
32745
|
+
var newEntries = hasChangedCurrentType ? [] : entries[newType];
|
|
32746
|
+
setEntries(function (prev) {
|
|
32747
|
+
return _objectSpread$c(_objectSpread$c({}, prev), {}, _defineProperty({}, newType, newEntries.length > 0 ? newEntries : [{
|
|
32748
|
+
value: getDefaultValue(newType),
|
|
32749
|
+
isValid: true
|
|
32750
|
+
}]));
|
|
32751
|
+
});
|
|
32752
|
+
setHasChangedCurrentType(false);
|
|
32753
|
+
};
|
|
32754
|
+
var handleAddEntry = function handleAddEntry() {
|
|
32755
|
+
var defaultValue = getDefaultValue(type);
|
|
32756
|
+
updateEntries([].concat(_toConsumableArray(entries[type]), [{
|
|
32757
|
+
value: defaultValue,
|
|
32758
|
+
isValid: true
|
|
32759
|
+
}]));
|
|
32760
|
+
};
|
|
32761
|
+
var handleRemoveEntry = function handleRemoveEntry(index) {
|
|
32762
|
+
var currentEntries = entries[type];
|
|
32763
|
+
if (currentEntries.length === 1) {
|
|
32764
|
+
// Reset to default when removing last entry
|
|
32765
|
+
updateEntries([{
|
|
32766
|
+
value: getDefaultValue(type),
|
|
32767
|
+
isValid: true
|
|
32768
|
+
}]);
|
|
32769
|
+
} else {
|
|
32770
|
+
updateEntries(currentEntries.filter(function (_, i) {
|
|
32771
|
+
return i !== index;
|
|
32772
|
+
}));
|
|
32773
|
+
}
|
|
32774
|
+
};
|
|
32775
|
+
var handleEntryValueChange = function handleEntryValueChange(index, displayValue) {
|
|
32776
|
+
var actualValue = convertFromDisplayValue(displayValue, type);
|
|
32777
|
+
var newEntries = _toConsumableArray(entries[type]);
|
|
32778
|
+
newEntries[index] = {
|
|
32779
|
+
value: actualValue,
|
|
32780
|
+
isValid: isValidInput(actualValue, type)
|
|
32781
|
+
};
|
|
32782
|
+
updateEntries(newEntries);
|
|
32783
|
+
};
|
|
32784
|
+
var handleSave = /*#__PURE__*/function () {
|
|
32785
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
32786
|
+
var currentEntries, effectiveValues;
|
|
32787
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
32788
|
+
while (1) switch (_context.prev = _context.next) {
|
|
32789
|
+
case 0:
|
|
32790
|
+
currentEntries = entries[type]; // Don't save if we only have a default entry
|
|
32791
|
+
if (!(currentEntries.length === 1 && isDefaultValue(currentEntries[0].value, type))) {
|
|
32792
|
+
_context.next = 7;
|
|
32793
|
+
break;
|
|
32794
|
+
}
|
|
32795
|
+
_context.next = 4;
|
|
32796
|
+
return onSave(data, []);
|
|
32797
|
+
case 4:
|
|
32798
|
+
onRefreshCell();
|
|
32799
|
+
setIsModalOpen(false);
|
|
32800
|
+
return _context.abrupt("return");
|
|
32801
|
+
case 7:
|
|
32802
|
+
if (currentEntries.every(function (entry) {
|
|
32803
|
+
return entry.isValid;
|
|
32804
|
+
})) {
|
|
32805
|
+
_context.next = 9;
|
|
32806
|
+
break;
|
|
32807
|
+
}
|
|
32808
|
+
return _context.abrupt("return");
|
|
32809
|
+
case 9:
|
|
32810
|
+
// Filter out default and invalid values
|
|
32811
|
+
effectiveValues = currentEntries.filter(function (entry) {
|
|
32812
|
+
return !isDefaultValue(entry.value, type) && isEffectiveValue(entry.value, type);
|
|
32813
|
+
}).map(function (entry) {
|
|
32814
|
+
return parseFloat(entry.value);
|
|
32815
|
+
});
|
|
32816
|
+
_context.next = 12;
|
|
32817
|
+
return onSave(data, effectiveValues.length > 0 ? effectiveValues : []);
|
|
32818
|
+
case 12:
|
|
32819
|
+
onRefreshCell();
|
|
32820
|
+
setIsModalOpen(false);
|
|
32821
|
+
case 14:
|
|
32822
|
+
case "end":
|
|
32823
|
+
return _context.stop();
|
|
32824
|
+
}
|
|
32825
|
+
}, _callee);
|
|
32826
|
+
}));
|
|
32827
|
+
return function handleSave() {
|
|
32828
|
+
return _ref2.apply(this, arguments);
|
|
32829
|
+
};
|
|
32830
|
+
}();
|
|
32831
|
+
return {
|
|
32832
|
+
type: type,
|
|
32833
|
+
entries: entries[type],
|
|
32834
|
+
isModalOpen: isModalOpen,
|
|
32835
|
+
handleModalOpen: handleModalOpen,
|
|
32836
|
+
handleModalClose: handleModalClose,
|
|
32837
|
+
handleTypeChange: handleTypeChange,
|
|
32838
|
+
handleAddEntry: handleAddEntry,
|
|
32839
|
+
handleRemoveEntry: handleRemoveEntry,
|
|
32840
|
+
handleEntryValueChange: handleEntryValueChange,
|
|
32841
|
+
handleSave: handleSave
|
|
32842
|
+
};
|
|
32843
|
+
}
|
|
32844
|
+
|
|
32845
|
+
var cell = "cell-Noc7s";
|
|
32846
|
+
var typeSelector = "typeSelector-Y8Yly";
|
|
32847
|
+
var space = "space-T5Mkd";
|
|
32848
|
+
var input$1 = "input-SK-Fo";
|
|
32849
|
+
var addButton = "addButton-AVN8Y";
|
|
32850
|
+
var helpText = "helpText-QYQQF";
|
|
32851
|
+
var css_248z$9 = ".cell-Noc7s {\n min-width: 50px;\n height: 100%;\n}\n\n.typeSelector-Y8Yly {\n margin-bottom: 16px;\n}\n\n.space-T5Mkd {\n width: 100%;\n}\n\n.input-SK-Fo {\n width: 120px;\n}\n\n.addButton-AVN8Y {\n margin-top: 16px;\n text-align: right;\n}\n\n.helpText-QYQQF {\n margin-top: 8px;\n font-size: 12px;\n color: #666;\n}\n";
|
|
32852
|
+
styleInject(css_248z$9);
|
|
32853
|
+
|
|
32854
|
+
function PriceFactorCellRenderer(props) {
|
|
32855
|
+
var data = props.data,
|
|
32856
|
+
value = props.value,
|
|
32857
|
+
colDef = props.colDef,
|
|
32858
|
+
node = props.node,
|
|
32859
|
+
column = props.column,
|
|
32860
|
+
onSave = props.onSave,
|
|
32861
|
+
api = props.api,
|
|
32862
|
+
singleClick = props.singleClick;
|
|
32863
|
+
var _useTranslation = useTranslation(),
|
|
32864
|
+
t = _useTranslation.t,
|
|
32865
|
+
i18n = _useTranslation.i18n;
|
|
32866
|
+
var applySave = /*#__PURE__*/function () {
|
|
32867
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(data, value) {
|
|
32868
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
32869
|
+
while (1) switch (_context.prev = _context.next) {
|
|
32870
|
+
case 0:
|
|
32871
|
+
if (!onSave) {
|
|
32872
|
+
_context.next = 5;
|
|
32873
|
+
break;
|
|
32874
|
+
}
|
|
32875
|
+
_context.next = 3;
|
|
32876
|
+
return onSave(data, value);
|
|
32877
|
+
case 3:
|
|
32878
|
+
_context.next = 6;
|
|
32879
|
+
break;
|
|
32880
|
+
case 5:
|
|
32881
|
+
node === null || node === void 0 || node.setDataValue(colDef === null || colDef === void 0 ? void 0 : colDef.field, value);
|
|
32882
|
+
case 6:
|
|
32883
|
+
case "end":
|
|
32884
|
+
return _context.stop();
|
|
32885
|
+
}
|
|
32886
|
+
}, _callee);
|
|
32887
|
+
}));
|
|
32888
|
+
return function applySave(_x, _x2) {
|
|
32889
|
+
return _ref.apply(this, arguments);
|
|
32890
|
+
};
|
|
32891
|
+
}();
|
|
32892
|
+
var _usePriceFactor = usePriceFactor({
|
|
32893
|
+
data: data,
|
|
32894
|
+
initialValue: value,
|
|
32895
|
+
onSave: applySave,
|
|
32896
|
+
onRefreshCell: function onRefreshCell() {
|
|
32897
|
+
return api === null || api === void 0 ? void 0 : api.refreshCells({
|
|
32898
|
+
suppressFlash: true,
|
|
32899
|
+
rowNodes: node ? [node] : undefined,
|
|
32900
|
+
columns: column ? [column] : undefined
|
|
32901
|
+
});
|
|
32902
|
+
}
|
|
32903
|
+
}),
|
|
32904
|
+
type = _usePriceFactor.type,
|
|
32905
|
+
entries = _usePriceFactor.entries,
|
|
32906
|
+
isModalOpen = _usePriceFactor.isModalOpen,
|
|
32907
|
+
handleModalOpen = _usePriceFactor.handleModalOpen,
|
|
32908
|
+
handleModalClose = _usePriceFactor.handleModalClose,
|
|
32909
|
+
handleTypeChange = _usePriceFactor.handleTypeChange,
|
|
32910
|
+
handleAddEntry = _usePriceFactor.handleAddEntry,
|
|
32911
|
+
handleRemoveEntry = _usePriceFactor.handleRemoveEntry,
|
|
32912
|
+
handleEntryValueChange = _usePriceFactor.handleEntryValueChange,
|
|
32913
|
+
handleSave = _usePriceFactor.handleSave;
|
|
32914
|
+
var isDiscount = type === 'discount';
|
|
32915
|
+
var isSingleDefaultEntry = entries.length === 1 && isDefaultValue(entries[0].value, type);
|
|
32916
|
+
var hasInvalidEntries = entries.some(function (entry) {
|
|
32917
|
+
return entry.isValid === false;
|
|
32918
|
+
});
|
|
32919
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
32920
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
32921
|
+
onDoubleClick: function onDoubleClick(e) {
|
|
32922
|
+
e.stopPropagation();
|
|
32923
|
+
if (!singleClick) {
|
|
32924
|
+
handleModalOpen();
|
|
32925
|
+
}
|
|
32926
|
+
},
|
|
32927
|
+
className: cell,
|
|
32928
|
+
onClick: function onClick(e) {
|
|
32929
|
+
e.stopPropagation();
|
|
32930
|
+
if (singleClick) {
|
|
32931
|
+
handleModalOpen();
|
|
32932
|
+
}
|
|
32933
|
+
},
|
|
32934
|
+
children: formatListValue(value || [], type, i18n.language)
|
|
32935
|
+
}), /*#__PURE__*/jsxs(Modal$2, {
|
|
32936
|
+
title: colDef === null || colDef === void 0 ? void 0 : colDef.headerName,
|
|
32937
|
+
open: isModalOpen,
|
|
32938
|
+
onCancel: handleModalClose,
|
|
32939
|
+
onOk: handleSave,
|
|
32940
|
+
okText: t('backoffice.idmCatalog.prices.priceFactor.save'),
|
|
32941
|
+
okButtonProps: {
|
|
32942
|
+
disabled: hasInvalidEntries
|
|
32943
|
+
},
|
|
32944
|
+
cancelText: t('backoffice.idmCatalog.prices.priceFactor.cancel'),
|
|
32945
|
+
width: 500,
|
|
32946
|
+
wrapClassName: "ag-custom-component-popup",
|
|
32947
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
32948
|
+
className: typeSelector,
|
|
32949
|
+
children: /*#__PURE__*/jsxs(Radio.Group, {
|
|
32950
|
+
value: type,
|
|
32951
|
+
onChange: function onChange(e) {
|
|
32952
|
+
return handleTypeChange(e.target.value);
|
|
32953
|
+
},
|
|
32954
|
+
children: [/*#__PURE__*/jsx(Radio.Button, {
|
|
32955
|
+
value: "factor",
|
|
32956
|
+
children: t('backoffice.idmCatalog.prices.priceFactor.type.factor')
|
|
32957
|
+
}), /*#__PURE__*/jsx(Radio.Button, {
|
|
32958
|
+
value: "discount",
|
|
32959
|
+
children: t('backoffice.idmCatalog.prices.priceFactor.type.discount')
|
|
32960
|
+
})]
|
|
32961
|
+
})
|
|
32962
|
+
}), /*#__PURE__*/jsx(List$1, {
|
|
32963
|
+
dataSource: entries,
|
|
32964
|
+
renderItem: function renderItem(entry, index) {
|
|
32965
|
+
return /*#__PURE__*/jsx(List$1.Item, {
|
|
32966
|
+
children: /*#__PURE__*/jsx(Form$1.Item, {
|
|
32967
|
+
validateStatus: entry.isValid === false ? 'error' : undefined,
|
|
32968
|
+
help: entry.isValid === false ? t(isDiscount ? 'backoffice.idmCatalog.prices.priceFactor.error.invalidFactor' : 'backoffice.idmCatalog.prices.priceFactor.error.invalidDiscount') : undefined,
|
|
32969
|
+
className: space,
|
|
32970
|
+
children: /*#__PURE__*/jsxs(Space, {
|
|
32971
|
+
children: [/*#__PURE__*/jsx(Input, {
|
|
32972
|
+
type: "number",
|
|
32973
|
+
value: convertToDisplayValue(entry.value, type),
|
|
32974
|
+
onChange: function onChange(e) {
|
|
32975
|
+
return handleEntryValueChange(index, e.target.value);
|
|
32976
|
+
},
|
|
32977
|
+
step: isDiscount ? '1' : '0.1',
|
|
32978
|
+
min: isDiscount ? '0' : '1',
|
|
32979
|
+
max: isDiscount ? '99' : undefined,
|
|
32980
|
+
className: input$1,
|
|
32981
|
+
addonAfter: isDiscount ? '%' : undefined
|
|
32982
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
32983
|
+
type: "text",
|
|
32984
|
+
icon: /*#__PURE__*/jsx(DeleteOutlined$1, {}),
|
|
32985
|
+
onClick: function onClick() {
|
|
32986
|
+
return handleRemoveEntry(index);
|
|
32987
|
+
},
|
|
32988
|
+
danger: true,
|
|
32989
|
+
disabled: isSingleDefaultEntry,
|
|
32990
|
+
title: t('backoffice.idmCatalog.prices.priceFactor.action.remove')
|
|
32991
|
+
})]
|
|
32992
|
+
})
|
|
32993
|
+
})
|
|
32994
|
+
});
|
|
32995
|
+
}
|
|
32996
|
+
}), /*#__PURE__*/jsx("div", {
|
|
32997
|
+
className: addButton,
|
|
32998
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
32999
|
+
type: "dashed",
|
|
33000
|
+
onClick: handleAddEntry,
|
|
33001
|
+
icon: /*#__PURE__*/jsx(PlusOutlined, {}),
|
|
33002
|
+
children: t('backoffice.idmCatalog.prices.priceFactor.action.add')
|
|
33003
|
+
})
|
|
33004
|
+
}), /*#__PURE__*/jsx("div", {
|
|
33005
|
+
className: helpText,
|
|
33006
|
+
children: type === 'factor' ? t('backoffice.idmCatalog.prices.priceFactor.hint.factorRange') : t('backoffice.idmCatalog.prices.priceFactor.hint.discountRange')
|
|
33007
|
+
})]
|
|
33008
|
+
})]
|
|
33009
|
+
});
|
|
33010
|
+
}
|
|
33011
|
+
|
|
33012
|
+
var container$2 = "container-T4Tzz";
|
|
33013
|
+
var price = "price-NjOOy";
|
|
33014
|
+
var priceManual = "priceManual-i7wtQ";
|
|
33015
|
+
var originalPrice = "originalPrice-V8MP5";
|
|
33016
|
+
var difference = "difference-xT9ZP";
|
|
33017
|
+
var differencePositive = "differencePositive-hGhZO";
|
|
33018
|
+
var differenceNegative = "differenceNegative-3CEZA";
|
|
33019
|
+
var differenceNeutral = "differenceNeutral-wx8oE";
|
|
33020
|
+
var css_248z$8 = ".container-T4Tzz {\n display: flex;\n align-items: center;\n}\n\n.price-NjOOy {\n font-weight: normal;\n}\n\n.priceManual-i7wtQ {\n font-weight: bold;\n}\n\n.originalPrice-V8MP5 {\n color: #8c8c8c;\n margin: 0 8px;\n}\n\n.difference-xT9ZP {\n margin-left: 8px;\n}\n\n.differencePositive-hGhZO {\n color: #52c41a;\n}\n\n.differenceNegative-3CEZA {\n color: #ff4d4f;\n}\n\n.differenceNeutral-wx8oE {\n color: inherit;\n}\n";
|
|
33021
|
+
styleInject(css_248z$8);
|
|
33022
|
+
|
|
33023
|
+
function PriceDisplayCellRenderer(props) {
|
|
33024
|
+
var _colDef$field, _data$origPrices, _data$manualPrices, _currentPrice$toFixed, _origPrice$toFixed;
|
|
33025
|
+
var value = props.value,
|
|
33026
|
+
colDef = props.colDef,
|
|
33027
|
+
data = props.data,
|
|
33028
|
+
commas = props.commas;
|
|
33029
|
+
var priceGroup = colDef === null || colDef === void 0 || (_colDef$field = colDef.field) === null || _colDef$field === void 0 ? void 0 : _colDef$field.split('.')[1];
|
|
33030
|
+
var origPrice = priceGroup ? data === null || data === void 0 || (_data$origPrices = data.origPrices) === null || _data$origPrices === void 0 ? void 0 : _data$origPrices[priceGroup] : undefined;
|
|
33031
|
+
var currentPrice = value !== null && value !== void 0 ? value : undefined;
|
|
33032
|
+
var diffPercentage = origPrice && currentPrice ? (currentPrice - origPrice) / origPrice * 100 : undefined;
|
|
33033
|
+
var isManualPrice = priceGroup && (data === null || data === void 0 || (_data$manualPrices = data.manualPrices) === null || _data$manualPrices === void 0 ? void 0 : _data$manualPrices.includes(priceGroup));
|
|
33034
|
+
return /*#__PURE__*/jsxs("div", {
|
|
33035
|
+
className: container$2,
|
|
33036
|
+
children: [/*#__PURE__*/jsxs("span", {
|
|
33037
|
+
className: classnames(price, _defineProperty({}, priceManual, isManualPrice)),
|
|
33038
|
+
children: [(_currentPrice$toFixed = currentPrice === null || currentPrice === void 0 ? void 0 : currentPrice.toFixed(commas !== null && commas !== void 0 ? commas : 2)) !== null && _currentPrice$toFixed !== void 0 ? _currentPrice$toFixed : '-', isManualPrice && ' *']
|
|
33039
|
+
}), /*#__PURE__*/jsxs("span", {
|
|
33040
|
+
className: originalPrice,
|
|
33041
|
+
children: ["(", (_origPrice$toFixed = origPrice === null || origPrice === void 0 ? void 0 : origPrice.toFixed(commas !== null && commas !== void 0 ? commas : 2)) !== null && _origPrice$toFixed !== void 0 ? _origPrice$toFixed : '-', ")"]
|
|
33042
|
+
}), /*#__PURE__*/jsx("span", {
|
|
33043
|
+
className: classnames(difference, _defineProperty(_defineProperty(_defineProperty({}, differencePositive, diffPercentage !== undefined && diffPercentage > 0), differenceNegative, diffPercentage !== undefined && diffPercentage < 0), differenceNeutral, diffPercentage === undefined || diffPercentage === 0)),
|
|
33044
|
+
children: diffPercentage !== undefined ? /*#__PURE__*/jsxs(Fragment, {
|
|
33045
|
+
children: [diffPercentage > 0 ? '+' : '', diffPercentage.toFixed(2), "%"]
|
|
33046
|
+
}) : '-'
|
|
33047
|
+
})]
|
|
33048
|
+
});
|
|
33049
|
+
}
|
|
33050
|
+
|
|
33051
|
+
function usePriceFeatureGroupsFromSerie(serie) {
|
|
33052
|
+
var _useTranslation = useTranslation(),
|
|
33053
|
+
i18n = _useTranslation.i18n;
|
|
33054
|
+
return useMemo(function () {
|
|
33055
|
+
return getPriceFeatureGroups(serie, i18n.language);
|
|
33056
|
+
}, [serie, i18n.language]);
|
|
33057
|
+
}
|
|
33058
|
+
function getPriceFeatureGroups(selectedSerie, language) {
|
|
33059
|
+
var _selectedSerie$pricef, _selectedSerie$pricef4;
|
|
33060
|
+
if (!(selectedSerie !== null && selectedSerie !== void 0 && selectedSerie.pricefeaturegroups)) {
|
|
33061
|
+
return [];
|
|
33062
|
+
}
|
|
33063
|
+
var priceFeatureGroups = (_selectedSerie$pricef = selectedSerie.pricefeaturegroups) === null || _selectedSerie$pricef === void 0 ? void 0 : _selectedSerie$pricef.map(function (priceFeatureGroups, i) {
|
|
33064
|
+
var _selectedSerie$pricef2, _selectedSerie$pricef3;
|
|
33065
|
+
return {
|
|
33066
|
+
id: priceFeatureGroups,
|
|
33067
|
+
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,
|
|
33068
|
+
keys: [],
|
|
33069
|
+
keysDisplayTexts: []
|
|
33070
|
+
};
|
|
33071
|
+
});
|
|
33072
|
+
(_selectedSerie$pricef4 = selectedSerie.pricefeaturegroupsKeys) === null || _selectedSerie$pricef4 === void 0 || _selectedSerie$pricef4.forEach(function (priceFeatureGroupKey, i) {
|
|
33073
|
+
var pfgSplit = priceFeatureGroupKey.split('_');
|
|
33074
|
+
var pfgId = pfgSplit[0].replace('PRFG', '');
|
|
33075
|
+
var pfg = priceFeatureGroups.find(function (pfg) {
|
|
33076
|
+
return pfg.id == pfgId;
|
|
33077
|
+
});
|
|
33078
|
+
if (pfg) {
|
|
33079
|
+
var _selectedSerie$pricef5;
|
|
33080
|
+
pfg.keys.push(priceFeatureGroupKey);
|
|
33081
|
+
pfg.keysDisplayTexts.push((_selectedSerie$pricef5 = selectedSerie.pricefeaturegroupsKeysDisplayTexts) === null || _selectedSerie$pricef5 === void 0 || (_selectedSerie$pricef5 = _selectedSerie$pricef5[i]) === null || _selectedSerie$pricef5 === void 0 ? void 0 : _selectedSerie$pricef5[language.toUpperCase()]);
|
|
33082
|
+
}
|
|
33083
|
+
});
|
|
33084
|
+
return priceFeatureGroups;
|
|
33085
|
+
}
|
|
33086
|
+
|
|
33087
|
+
var wrapper$2 = "wrapper-5t6RT";
|
|
33088
|
+
var input = "input-leHam";
|
|
33089
|
+
var disabled$1 = "disabled-Llkqu";
|
|
33090
|
+
var css_248z$7 = ".wrapper-5t6RT {\n display: flex;\n flex-direction: column;\n min-height: 50px;\n justify-content: flex-end;\n font-size: 12px;\n}\n\n.input-leHam {\n position: relative;\n width: 200px;\n height: 32px;\n border: 1px solid #d9d9d9;\n background: #ffffff;\n padding: 0 11px;\n border-radius: 6px;\n font-size: 14px;\n line-height: 30px;\n cursor: pointer;\n}\n\n.darkmode .input-leHam {\n background: #141414;\n border: 1px solid #424242;\n}\n\n.input-leHam.disabled-Llkqu {\n cursor: default;\n color: rgba(0, 0, 0, 0.25);\n}\n\n.darkmode .input-leHam.disabled-Llkqu {\n color: rgba(255, 255, 255, 0.25);\n}\n\n.input-leHam:hover {\n border-color: #4096ff;\n}\n";
|
|
33091
|
+
styleInject(css_248z$7);
|
|
33092
|
+
|
|
33093
|
+
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; }
|
|
33094
|
+
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; }
|
|
33095
|
+
function PriceFactorInput(props) {
|
|
33096
|
+
return /*#__PURE__*/jsxs("div", {
|
|
33097
|
+
className: classnames(wrapper$2, props.className),
|
|
33098
|
+
children: [props.title, /*#__PURE__*/jsx(Tooltip$1, {
|
|
33099
|
+
title: props.tooltip,
|
|
33100
|
+
children: /*#__PURE__*/jsx("div", {
|
|
33101
|
+
id: "price-factor-input",
|
|
33102
|
+
className: classnames(input, _defineProperty({}, disabled$1, props.disabled)),
|
|
33103
|
+
children: /*#__PURE__*/jsx(PriceFactorCellRenderer, _objectSpread$b(_objectSpread$b({}, props), {}, {
|
|
33104
|
+
singleClick: true
|
|
33105
|
+
}))
|
|
33106
|
+
})
|
|
33107
|
+
})]
|
|
33108
|
+
});
|
|
33109
|
+
}
|
|
33110
|
+
|
|
33111
|
+
var inputHeader = "input-header--4KDP";
|
|
33112
|
+
var factorInput = "factor-input-MX85Z";
|
|
33113
|
+
var css_248z$6 = ".input-header--4KDP .ag-header-cell-text {\n width: 100%;\n}\n\n.factor-input-MX85Z {\n min-height: 0;\n flex: 1;\n}\n\n.factor-input-MX85Z #price-factor-input {\n width: 100%;\n background-color: var(--ag-input-background-color);\n border: var(--ag-input-border);\n border-radius: var(--ag-input-border-radius);\n color: var(--ag-input-text-color);\n height: var(--ag-input-height);\n line-height: var(--ag-input-height);\n font-size: var(--ag-font-size);\n}\n\n.factor-input-MX85Z #price-factor-input:hover {\n border-color: #4096ff;\n}\n";
|
|
33114
|
+
styleInject(css_248z$6);
|
|
33115
|
+
|
|
33116
|
+
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; }
|
|
33117
|
+
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; }
|
|
33118
|
+
function Prices (_ref) {
|
|
33119
|
+
var _pricelist$seriePrice;
|
|
33120
|
+
var organizationId = _ref.organizationId,
|
|
33121
|
+
packageId = _ref.packageId,
|
|
33122
|
+
apiConfig = _ref.apiConfig,
|
|
33123
|
+
pricelist = _ref.pricelist,
|
|
33124
|
+
setNodeDataValue = _ref.setNodeDataValue;
|
|
33125
|
+
var _React$useState = React.useState(),
|
|
33126
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
33127
|
+
selectedSerie = _React$useState2[0],
|
|
33128
|
+
setSelectedSerie = _React$useState2[1];
|
|
33129
|
+
var _useTranslation = useTranslation(),
|
|
33130
|
+
t = _useTranslation.t;
|
|
33131
|
+
var updatePgPriceFactor = useCallback(function (priceFeatureGroupItem, value) {
|
|
33132
|
+
if (!selectedSerie) return;
|
|
33133
|
+
|
|
33134
|
+
// Create copies of the objects to modify
|
|
33135
|
+
var newFactors = _objectSpread$a({}, pricelist.pgPricefactors);
|
|
33136
|
+
var serieFactors = _objectSpread$a({}, newFactors[selectedSerie.serieNo]);
|
|
33137
|
+
if (value.length === 0) {
|
|
33138
|
+
// Remove the empty price feature group
|
|
33139
|
+
delete serieFactors[priceFeatureGroupItem];
|
|
33140
|
+
|
|
33141
|
+
// If serie factors is now empty, remove the entire serie entry
|
|
33142
|
+
if (Object.keys(serieFactors).length === 0) {
|
|
33143
|
+
delete newFactors[selectedSerie.serieNo];
|
|
33144
|
+
} else {
|
|
33145
|
+
newFactors[selectedSerie.serieNo] = serieFactors;
|
|
33146
|
+
}
|
|
33147
|
+
|
|
33148
|
+
// If no more series exist, set pgPricefactors to undefined
|
|
33149
|
+
if (Object.keys(newFactors).length === 0) {
|
|
33150
|
+
setNodeDataValue({
|
|
33151
|
+
pgPricefactors: undefined
|
|
33152
|
+
});
|
|
33153
|
+
return;
|
|
33154
|
+
}
|
|
33155
|
+
} else {
|
|
33156
|
+
// Add/update the value
|
|
33157
|
+
serieFactors[priceFeatureGroupItem] = value;
|
|
33158
|
+
newFactors[selectedSerie.serieNo] = serieFactors;
|
|
33159
|
+
}
|
|
33160
|
+
setNodeDataValue({
|
|
33161
|
+
pgPricefactors: newFactors
|
|
33162
|
+
});
|
|
33163
|
+
}, [pricelist, selectedSerie, setNodeDataValue]);
|
|
33164
|
+
var updateArticlePriceFactor = useCallback(function (typeNo, value) {
|
|
33165
|
+
if (!selectedSerie) return;
|
|
33166
|
+
|
|
33167
|
+
// Create copies of the objects to modify
|
|
33168
|
+
var newFactors = _objectSpread$a({}, pricelist.articlePricefactors);
|
|
33169
|
+
var serieFactors = _objectSpread$a({}, newFactors[selectedSerie.serieNo]);
|
|
33170
|
+
if (value.length === 0) {
|
|
33171
|
+
// Remove the empty article price factor
|
|
33172
|
+
delete serieFactors[typeNo];
|
|
33173
|
+
|
|
33174
|
+
// If serie factors is now empty, remove the entire serie entry
|
|
33175
|
+
if (Object.keys(serieFactors).length === 0) {
|
|
33176
|
+
delete newFactors[selectedSerie.serieNo];
|
|
33177
|
+
} else {
|
|
33178
|
+
newFactors[selectedSerie.serieNo] = serieFactors;
|
|
33179
|
+
}
|
|
33180
|
+
|
|
33181
|
+
// If no more series exist, set articlePricefactors to undefined
|
|
33182
|
+
if (Object.keys(newFactors).length === 0) {
|
|
33183
|
+
setNodeDataValue({
|
|
33184
|
+
articlePricefactors: undefined
|
|
33185
|
+
});
|
|
33186
|
+
return;
|
|
33187
|
+
}
|
|
33188
|
+
} else {
|
|
33189
|
+
// Add/update the value
|
|
33190
|
+
serieFactors[typeNo] = value;
|
|
33191
|
+
newFactors[selectedSerie.serieNo] = serieFactors;
|
|
33192
|
+
}
|
|
33193
|
+
setNodeDataValue({
|
|
33194
|
+
articlePricefactors: newFactors
|
|
33195
|
+
});
|
|
33196
|
+
}, [pricelist, selectedSerie, setNodeDataValue]);
|
|
33197
|
+
var updateSeriePriceFactor = useCallback(function (value) {
|
|
33198
|
+
if (!selectedSerie) return;
|
|
33199
|
+
|
|
33200
|
+
// Create a copy of the object to modify
|
|
33201
|
+
var newFactors = _objectSpread$a({}, pricelist.seriePricefactors);
|
|
33202
|
+
if (value.length === 0) {
|
|
33203
|
+
// Remove the empty serie price factor
|
|
33204
|
+
delete newFactors[selectedSerie.serieNo];
|
|
33205
|
+
|
|
33206
|
+
// If no more series exist, set seriePricefactors to undefined
|
|
33207
|
+
if (Object.keys(newFactors).length === 0) {
|
|
33208
|
+
setNodeDataValue({
|
|
33209
|
+
seriePricefactors: undefined
|
|
33210
|
+
});
|
|
33211
|
+
return;
|
|
33212
|
+
}
|
|
33213
|
+
} else {
|
|
33214
|
+
// Add/update the value
|
|
33215
|
+
newFactors[selectedSerie.serieNo] = value;
|
|
33216
|
+
}
|
|
33217
|
+
setNodeDataValue({
|
|
33218
|
+
seriePricefactors: newFactors
|
|
33219
|
+
});
|
|
33220
|
+
}, [pricelist, selectedSerie, setNodeDataValue]);
|
|
33221
|
+
var applicationData = useMemo(function () {
|
|
33222
|
+
return {
|
|
33223
|
+
organizationId: organizationId,
|
|
33224
|
+
packageId: packageId,
|
|
33225
|
+
pricelistId: pricelist._id,
|
|
33226
|
+
serieNo: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo
|
|
33227
|
+
};
|
|
33228
|
+
}, [organizationId, packageId, selectedSerie, pricelist]);
|
|
33229
|
+
var apiInterface = useMemo(function () {
|
|
33230
|
+
return {
|
|
33231
|
+
read: apiConfig.enricherService + '/packages/${packageId}/pricelists/${pricelistId}/serie/${serieNo}/prices',
|
|
33232
|
+
update: apiConfig.enricherService + '/packages/${packageId}/pricelists/${pricelistId}/serie/${serieNo}/prices/${_id}'
|
|
33233
|
+
};
|
|
33234
|
+
}, []);
|
|
33235
|
+
var priceFeatureGroups = usePriceFeatureGroupsFromSerie(selectedSerie);
|
|
33236
|
+
var configuration = useMemo(function () {
|
|
33237
|
+
var _priceFeatureGroups$m;
|
|
33238
|
+
return {
|
|
33239
|
+
type: 'dotnetSSM',
|
|
33240
|
+
apiInterface: apiInterface,
|
|
33241
|
+
dateFormat: 'LL',
|
|
33242
|
+
floatingFilter: true,
|
|
33243
|
+
colDef: [{
|
|
33244
|
+
field: 'typeNo',
|
|
33245
|
+
headerName: 'backoffice.idmCatalog.prices.label.typeNo',
|
|
33246
|
+
cellDataType: 'lookup',
|
|
33247
|
+
customParams: {
|
|
33248
|
+
nameField: 'typeNoDisplayText',
|
|
33249
|
+
displayLabelTemplate: '${name} (${value})',
|
|
33250
|
+
multiple: false,
|
|
33251
|
+
translated: true
|
|
33252
|
+
},
|
|
33253
|
+
additionalFields: ['typeNoDisplayText'],
|
|
33254
|
+
isDictionary: true,
|
|
33255
|
+
editable: false
|
|
33256
|
+
}, {
|
|
33257
|
+
headerName: 'backoffice.idmCatalog.prices.priceFactor.label.factor',
|
|
33258
|
+
field: 'itemFactor',
|
|
33259
|
+
cellDataType: 'number',
|
|
33260
|
+
cellRenderer: PriceFactorCellRenderer,
|
|
33261
|
+
valueGetter: function valueGetter(_ref2) {
|
|
33262
|
+
var _pricelist$articlePri;
|
|
33263
|
+
var data = _ref2.data;
|
|
33264
|
+
if (!data) return;
|
|
33265
|
+
return (_pricelist$articlePri = pricelist.articlePricefactors) === null || _pricelist$articlePri === void 0 || (_pricelist$articlePri = _pricelist$articlePri[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) === null || _pricelist$articlePri === void 0 ? void 0 : _pricelist$articlePri[data.typeNo];
|
|
33266
|
+
},
|
|
33267
|
+
cellRendererParams: {
|
|
33268
|
+
onSave: function () {
|
|
33269
|
+
var _onSave = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(data, value) {
|
|
33270
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
33271
|
+
while (1) switch (_context.prev = _context.next) {
|
|
33272
|
+
case 0:
|
|
33273
|
+
updateArticlePriceFactor(data.typeNo, value);
|
|
33274
|
+
case 1:
|
|
33275
|
+
case "end":
|
|
33276
|
+
return _context.stop();
|
|
33277
|
+
}
|
|
33278
|
+
}, _callee);
|
|
33279
|
+
}));
|
|
33280
|
+
function onSave(_x, _x2) {
|
|
33281
|
+
return _onSave.apply(this, arguments);
|
|
33282
|
+
}
|
|
33283
|
+
return onSave;
|
|
33284
|
+
}()
|
|
33285
|
+
},
|
|
33286
|
+
editable: false
|
|
33287
|
+
}].concat(_toConsumableArray((_priceFeatureGroups$m = priceFeatureGroups === null || priceFeatureGroups === void 0 ? void 0 : priceFeatureGroups.map(function (priceFeatureGroup) {
|
|
33288
|
+
var _priceFeatureGroup$ke, _priceFeatureGroup$ke2;
|
|
33289
|
+
return {
|
|
33290
|
+
headerName: priceFeatureGroup.displayText,
|
|
33291
|
+
marryChildren: true,
|
|
33292
|
+
children: _toConsumableArray((_priceFeatureGroup$ke = (_priceFeatureGroup$ke2 = priceFeatureGroup.keys) === null || _priceFeatureGroup$ke2 === void 0 ? void 0 : _priceFeatureGroup$ke2.map(function (priceFeatureGroupItem, j) {
|
|
33293
|
+
var _priceFeatureGroup$ke3, _pricelist$pgPricefac;
|
|
33294
|
+
return {
|
|
33295
|
+
headerName: priceFeatureGroupItem,
|
|
33296
|
+
field: "prices.".concat(priceFeatureGroupItem),
|
|
33297
|
+
editable: true,
|
|
33298
|
+
isDictionary: true,
|
|
33299
|
+
cellDataType: 'number',
|
|
33300
|
+
headerTooltip: (_priceFeatureGroup$ke3 = priceFeatureGroup.keysDisplayTexts) === null || _priceFeatureGroup$ke3 === void 0 ? void 0 : _priceFeatureGroup$ke3[j],
|
|
33301
|
+
cellRenderer: PriceDisplayCellRenderer,
|
|
33302
|
+
cellRendererParams: {
|
|
33303
|
+
commas: pricelist.commas
|
|
33304
|
+
},
|
|
33305
|
+
additionalFields: ["origPrices.".concat(priceFeatureGroupItem)],
|
|
33306
|
+
headerClass: inputHeader,
|
|
33307
|
+
headerComponentParams: {
|
|
33308
|
+
additionalElement: /*#__PURE__*/jsx(PriceFactorInput, {
|
|
33309
|
+
onSave: (/*#__PURE__*/function () {
|
|
33310
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(data, value) {
|
|
33311
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
33312
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
33313
|
+
case 0:
|
|
33314
|
+
updatePgPriceFactor(priceFeatureGroupItem, value);
|
|
33315
|
+
case 1:
|
|
33316
|
+
case "end":
|
|
33317
|
+
return _context2.stop();
|
|
33318
|
+
}
|
|
33319
|
+
}, _callee2);
|
|
33320
|
+
}));
|
|
33321
|
+
return function (_x3, _x4) {
|
|
33322
|
+
return _ref3.apply(this, arguments);
|
|
33323
|
+
};
|
|
33324
|
+
}()),
|
|
33325
|
+
value: (_pricelist$pgPricefac = pricelist.pgPricefactors) === null || _pricelist$pgPricefac === void 0 || (_pricelist$pgPricefac = _pricelist$pgPricefac[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo]) === null || _pricelist$pgPricefac === void 0 ? void 0 : _pricelist$pgPricefac[priceFeatureGroupItem],
|
|
33326
|
+
className: factorInput,
|
|
33327
|
+
tooltip: t('backoffice.idmCatalog.prices.priceFactor.label.pfg')
|
|
33328
|
+
})
|
|
33329
|
+
}
|
|
33330
|
+
};
|
|
33331
|
+
})) !== null && _priceFeatureGroup$ke !== void 0 ? _priceFeatureGroup$ke : [])
|
|
33332
|
+
};
|
|
33333
|
+
})) !== null && _priceFeatureGroups$m !== void 0 ? _priceFeatureGroups$m : []), [{
|
|
33334
|
+
field: 'prices',
|
|
33335
|
+
editable: false,
|
|
33336
|
+
hide: true,
|
|
33337
|
+
lockVisible: true,
|
|
33338
|
+
suppressColumnsToolPanel: true,
|
|
33339
|
+
additionalFields: ['origPrices']
|
|
33340
|
+
}, {
|
|
33341
|
+
field: 'organizationId',
|
|
33342
|
+
editable: false,
|
|
33343
|
+
hide: true,
|
|
33344
|
+
lockVisible: true,
|
|
33345
|
+
suppressColumnsToolPanel: true,
|
|
33346
|
+
defaultValue: '${organizationId}'
|
|
33347
|
+
}, {
|
|
33348
|
+
field: 'manualPrices',
|
|
33349
|
+
editable: false,
|
|
33350
|
+
hide: true,
|
|
33351
|
+
lockVisible: true,
|
|
33352
|
+
suppressColumnsToolPanel: true
|
|
33353
|
+
}, {
|
|
33354
|
+
headerName: 'backoffice.idmEnricher.general.label.lastUpdatedDate',
|
|
33355
|
+
field: 'lastUpdatedDate',
|
|
33356
|
+
cellDataType: 'dateString',
|
|
33357
|
+
editable: false
|
|
33358
|
+
}, {
|
|
33359
|
+
headerName: 'backoffice.idmEnricher.general.label.createdDate',
|
|
33360
|
+
field: 'createdDate',
|
|
33361
|
+
cellDataType: 'dateString',
|
|
33362
|
+
editable: false
|
|
33363
|
+
}, {
|
|
33364
|
+
headerName: 'backoffice.idmEnricher.general.label.createdBy',
|
|
33365
|
+
field: 'createdByDisplayText',
|
|
33366
|
+
editable: false
|
|
33367
|
+
}, {
|
|
33368
|
+
headerName: 'backoffice.idmEnricher.general.label.lastUpdatedBy',
|
|
33369
|
+
field: 'lastUpdatedByDisplayText',
|
|
33370
|
+
editable: false
|
|
33371
|
+
}, {
|
|
33372
|
+
headerName: 'backoffice.idmEnricher.general.label._id',
|
|
33373
|
+
field: '_id',
|
|
33374
|
+
editable: false
|
|
33375
|
+
}])
|
|
33376
|
+
};
|
|
33377
|
+
}, [apiInterface, selectedSerie, pricelist, priceFeatureGroups]);
|
|
33378
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
33379
|
+
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
33380
|
+
title: /*#__PURE__*/jsx("div", {
|
|
33381
|
+
children: /*#__PURE__*/jsxs(Space$1, {
|
|
33382
|
+
style: {
|
|
33383
|
+
"float": 'right'
|
|
33384
|
+
},
|
|
33385
|
+
children: [/*#__PURE__*/jsx(PriceFactorInput, {
|
|
33386
|
+
value: (_pricelist$seriePrice = pricelist.seriePricefactors) === null || _pricelist$seriePrice === void 0 ? void 0 : _pricelist$seriePrice[selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo],
|
|
33387
|
+
title: t('backoffice.idmCatalog.prices.priceFactor.label.series'),
|
|
33388
|
+
onSave: (/*#__PURE__*/function () {
|
|
33389
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_, value) {
|
|
33390
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
33391
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
33392
|
+
case 0:
|
|
33393
|
+
updateSeriePriceFactor(value);
|
|
33394
|
+
case 1:
|
|
33395
|
+
case "end":
|
|
33396
|
+
return _context3.stop();
|
|
33397
|
+
}
|
|
33398
|
+
}, _callee3);
|
|
33399
|
+
}));
|
|
33400
|
+
return function (_x5, _x6) {
|
|
33401
|
+
return _ref4.apply(this, arguments);
|
|
33402
|
+
};
|
|
33403
|
+
}()),
|
|
33404
|
+
disabled: !selectedSerie
|
|
33405
|
+
}), /*#__PURE__*/jsx(SeriesSelector$1, {
|
|
33406
|
+
packageId: packageId,
|
|
33407
|
+
selectedSerie: selectedSerie,
|
|
33408
|
+
setSelectedSerie: setSelectedSerie,
|
|
33409
|
+
enricherService: apiConfig.enricherService,
|
|
33410
|
+
dataSet: 'lookup',
|
|
33411
|
+
additionalFields: ['pricefeaturegroups', 'pricefeaturegroupsDisplayTexts', 'pricefeaturegroupsKeys', 'pricefeaturegroupsKeysDisplayTexts']
|
|
33412
|
+
})]
|
|
33413
|
+
})
|
|
33414
|
+
})
|
|
33415
|
+
}), selectedSerie && /*#__PURE__*/jsx(Spreadsheet, {
|
|
33416
|
+
gridId: 'crud-grid_enricherprices',
|
|
33417
|
+
applicationData: applicationData,
|
|
33418
|
+
configuration: configuration
|
|
33419
|
+
})]
|
|
33420
|
+
});
|
|
33421
|
+
}
|
|
33422
|
+
|
|
33423
|
+
function TablePriceList () {
|
|
33424
|
+
var _useTranslation = useTranslation(),
|
|
33425
|
+
t = _useTranslation.t;
|
|
33426
|
+
var root = useStore();
|
|
33427
|
+
var spreadsheetRef = useRef(null);
|
|
33428
|
+
var _useModule = useModule$1(['pricelists']),
|
|
33429
|
+
packageId = _useModule.packageId,
|
|
33430
|
+
organizationId = _useModule.organizationId,
|
|
33431
|
+
updateNavigation = _useModule.updateNavigation,
|
|
33432
|
+
apiConfig = _useModule.apiConfig;
|
|
33433
|
+
var _React$useState = React.useState(),
|
|
33434
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
33435
|
+
selectedPriceList = _React$useState2[0],
|
|
33436
|
+
setSelectedPriceList = _React$useState2[1];
|
|
33437
|
+
var _React$useState3 = React.useState(),
|
|
33438
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
33439
|
+
selectedNodeId = _React$useState4[0],
|
|
33440
|
+
setSelectedNodeId = _React$useState4[1];
|
|
33441
|
+
var setNodeDataValue = useCallback(function (data) {
|
|
33442
|
+
spreadsheetRef.current.setNodeDataValue(selectedNodeId, data);
|
|
33443
|
+
}, [selectedNodeId]);
|
|
33444
|
+
useEffect(function () {
|
|
33445
|
+
if (selectedPriceList !== null && selectedPriceList !== void 0 && selectedPriceList._id) {
|
|
33446
|
+
root.contentStore.bottomToolBar.tools = [{
|
|
33447
|
+
id: 'pricelistpos',
|
|
33448
|
+
name: t('backoffice.menu.prices.label.IDMCatalogEditorTablePrices'),
|
|
33449
|
+
elementComponent: Prices,
|
|
33450
|
+
elementProps: {
|
|
33451
|
+
organizationId: organizationId,
|
|
33452
|
+
packageId: packageId,
|
|
33453
|
+
apiConfig: apiConfig,
|
|
33454
|
+
pricelist: selectedPriceList,
|
|
33455
|
+
setNodeDataValue: setNodeDataValue
|
|
33456
|
+
},
|
|
33457
|
+
startWidth: 300,
|
|
33458
|
+
defaultPinned: false,
|
|
33459
|
+
defaultOpen: false
|
|
33460
|
+
}];
|
|
33461
|
+
} else {
|
|
33462
|
+
root.contentStore.bottomToolBar.tools = [];
|
|
33463
|
+
}
|
|
33464
|
+
}, [selectedPriceList, setNodeDataValue]);
|
|
33465
|
+
useEffect(function () {
|
|
33466
|
+
return function () {
|
|
33467
|
+
root.contentStore.bottomToolBar.tools = [];
|
|
33468
|
+
};
|
|
33469
|
+
}, []);
|
|
33470
|
+
var applicationData = useMemo(function () {
|
|
33471
|
+
return {
|
|
33472
|
+
packageId: packageId,
|
|
33473
|
+
organizationId: organizationId
|
|
33474
|
+
};
|
|
33475
|
+
}, [packageId, organizationId]);
|
|
33476
|
+
var apiInterface = useMemo(function () {
|
|
33477
|
+
return {
|
|
33478
|
+
read: apiConfig.enricherService + '/packages/${packageId}/pricelists',
|
|
33479
|
+
create: apiConfig.enricherService + '/packages/${packageId}/pricelists',
|
|
33480
|
+
restore: apiConfig.enricherService + '/packages/${packageId}/pricelists/${_id}',
|
|
33481
|
+
"delete": apiConfig.enricherService + '/packages/${packageId}/pricelists/${_id}',
|
|
33482
|
+
update: apiConfig.enricherService + '/packages/${packageId}/pricelists/${_id}'
|
|
33483
|
+
};
|
|
33484
|
+
}, []);
|
|
33485
|
+
var hooks = useMemo(function () {
|
|
33486
|
+
return {
|
|
33487
|
+
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
|
33488
|
+
if (event.selection.length == 1) {
|
|
33489
|
+
setSelectedPriceList(event.selection[0].node.data);
|
|
33490
|
+
setSelectedNodeId(event.selection[0].node.id);
|
|
33491
|
+
} else {
|
|
33492
|
+
setSelectedPriceList(undefined);
|
|
33493
|
+
setSelectedNodeId(undefined);
|
|
33494
|
+
}
|
|
33495
|
+
},
|
|
33496
|
+
onDataUpdated: function onDataUpdated(event) {
|
|
33497
|
+
var current = event.updates.find(function (update) {
|
|
33498
|
+
return update.node.id && update.node.id === selectedNodeId;
|
|
33499
|
+
});
|
|
33500
|
+
if (current) {
|
|
33501
|
+
setSelectedPriceList(current.data);
|
|
33502
|
+
}
|
|
33503
|
+
}
|
|
33504
|
+
};
|
|
33505
|
+
}, [selectedNodeId]);
|
|
33506
|
+
var roundingOptions = useMemo(function () {
|
|
33507
|
+
return [{
|
|
33508
|
+
name: t('backoffice.idmEnricher.pricelists.rounding.r1'),
|
|
33509
|
+
value: 1
|
|
33510
|
+
}, {
|
|
33511
|
+
name: t('backoffice.idmEnricher.pricelists.rounding.r2'),
|
|
33512
|
+
value: 2
|
|
33513
|
+
}, {
|
|
33514
|
+
name: t('backoffice.idmEnricher.pricelists.rounding.r3'),
|
|
33515
|
+
value: 3
|
|
33516
|
+
}];
|
|
33517
|
+
}, []);
|
|
33518
|
+
var configuration = useMemo(function () {
|
|
33519
|
+
return {
|
|
33520
|
+
type: 'dotnetSSM',
|
|
33521
|
+
apiInterface: apiInterface,
|
|
33522
|
+
dateFormat: 'LL',
|
|
33523
|
+
floatingFilter: true,
|
|
33524
|
+
colDef: [{
|
|
33525
|
+
headerName: 'backoffice.idmEnricher.pricelists.label.name',
|
|
33526
|
+
field: 'name',
|
|
33527
|
+
editable: true
|
|
33528
|
+
}, {
|
|
33529
|
+
headerName: 'backoffice.idmEnricher.pricelists.label.basedPricelistId',
|
|
33530
|
+
field: 'basedPricelistId',
|
|
33531
|
+
editable: true,
|
|
33532
|
+
cellDataType: 'lookup',
|
|
33533
|
+
customParams: {
|
|
33534
|
+
filterCellType: 'id',
|
|
33535
|
+
nameField: 'basedPricelistDisplayName',
|
|
33536
|
+
apiInterface: {
|
|
33537
|
+
read: apiConfig.enricherService + '/packages/${packageId}/pricelists'
|
|
33538
|
+
},
|
|
33539
|
+
lookupValue: 'name',
|
|
33540
|
+
lookupKey: '_id',
|
|
33541
|
+
filter: function filter(rowData, lookupData) {
|
|
33542
|
+
return rowData._id !== lookupData._id;
|
|
33543
|
+
}
|
|
33544
|
+
},
|
|
33545
|
+
additionalFields: ['basedPricelistDisplayName']
|
|
33546
|
+
}, {
|
|
33547
|
+
headerName: 'backoffice.idmEnricher.pricelists.label.priceFactor',
|
|
33548
|
+
field: 'pricefactors',
|
|
33549
|
+
cellDataType: 'array',
|
|
33550
|
+
cellRenderer: PriceFactorCellRenderer,
|
|
33551
|
+
editable: false,
|
|
33552
|
+
equals: function equals(a, b) {
|
|
33553
|
+
return !!((a === null || a === void 0 ? void 0 : a.length) === (b === null || b === void 0 ? void 0 : b.length) && a !== null && a !== void 0 && a.every(function (value, index) {
|
|
33554
|
+
return value === (b === null || b === void 0 ? void 0 : b[index]);
|
|
33555
|
+
}));
|
|
33556
|
+
}
|
|
33557
|
+
}, {
|
|
33558
|
+
headerName: 'backoffice.idmEnricher.pricelists.label.rounding',
|
|
33559
|
+
field: 'rounding',
|
|
33560
|
+
editable: true,
|
|
33561
|
+
cellDataType: 'enum',
|
|
33562
|
+
customParams: {
|
|
33563
|
+
enumData: roundingOptions,
|
|
33564
|
+
displayLabelTemplate: '${name} (${value})'
|
|
33565
|
+
}
|
|
33566
|
+
}, {
|
|
33567
|
+
headerName: 'backoffice.idmEnricher.pricelists.label.commas',
|
|
33568
|
+
field: 'commas',
|
|
33569
|
+
editable: true,
|
|
33570
|
+
cellDataType: 'number'
|
|
33571
|
+
}, {
|
|
33572
|
+
headerName: 'backoffice.idmEnricher.pricelists.label.currency',
|
|
33573
|
+
field: 'currency',
|
|
33574
|
+
editable: true
|
|
33575
|
+
}, {
|
|
33576
|
+
headerName: 'backoffice.idmEnricher.pricelists.label.forPublishing',
|
|
33577
|
+
field: 'forPublishing',
|
|
33578
|
+
editable: true,
|
|
33579
|
+
cellDataType: 'boolean'
|
|
33580
|
+
}, {
|
|
33581
|
+
headerName: 'backoffice.idmEnricher.pricelists.label.validFrom',
|
|
33582
|
+
field: 'validFrom',
|
|
33583
|
+
editable: true,
|
|
33584
|
+
cellDataType: 'dateString'
|
|
33585
|
+
}, {
|
|
33586
|
+
headerName: 'backoffice.idmEnricher.pricelists.label.validTo',
|
|
33587
|
+
field: 'validTo',
|
|
33588
|
+
editable: true,
|
|
33589
|
+
cellDataType: 'dateString'
|
|
33590
|
+
}, {
|
|
33591
|
+
field: 'packageId',
|
|
33592
|
+
cellDataType: 'string',
|
|
33593
|
+
editable: false,
|
|
33594
|
+
hide: true,
|
|
33595
|
+
defaultValue: '${packageId}'
|
|
33596
|
+
}, {
|
|
33597
|
+
field: 'organizationId',
|
|
33598
|
+
cellDataType: 'string',
|
|
33599
|
+
editable: false,
|
|
33600
|
+
hide: true,
|
|
33601
|
+
defaultValue: '${organizationId}'
|
|
33602
|
+
}, {
|
|
33603
|
+
headerName: 'backoffice.idmEnricher.general.label.lastUpdatedDate',
|
|
33604
|
+
field: 'lastUpdatedDate',
|
|
33605
|
+
cellDataType: 'dateString',
|
|
33606
|
+
editable: false
|
|
33607
|
+
}, {
|
|
33608
|
+
headerName: 'backoffice.idmEnricher.general.label.createdDate',
|
|
33609
|
+
field: 'createdDate',
|
|
33610
|
+
cellDataType: 'dateString',
|
|
33611
|
+
editable: false
|
|
33612
|
+
}, {
|
|
33613
|
+
headerName: 'backoffice.idmEnricher.general.label.createdBy',
|
|
33614
|
+
field: 'createdByDisplayText',
|
|
33615
|
+
editable: false
|
|
33616
|
+
}, {
|
|
33617
|
+
headerName: 'backoffice.idmEnricher.general.label.lastUpdatedBy',
|
|
33618
|
+
field: 'lastUpdatedByDisplayText',
|
|
33619
|
+
editable: false
|
|
33620
|
+
}, {
|
|
33621
|
+
headerName: 'backoffice.idmEnricher.general.label._id',
|
|
33622
|
+
field: '_id',
|
|
33623
|
+
editable: false,
|
|
33624
|
+
cellDataType: 'objectId'
|
|
32404
33625
|
}, {
|
|
32405
|
-
|
|
32406
|
-
|
|
32407
|
-
editable: false
|
|
32408
|
-
}, {
|
|
32409
|
-
headerName: 'backoffice.idmEnricher.properties.partlistpos.itemRefTypeNoDisplayText',
|
|
32410
|
-
marryChildren: true,
|
|
33626
|
+
field: 'pgPricefactors',
|
|
33627
|
+
cellDataType: 'object',
|
|
32411
33628
|
editable: false,
|
|
32412
|
-
|
|
32413
|
-
field: 'itemRefTypeNoDisplayText.DE',
|
|
32414
|
-
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32415
|
-
isDictionary: true,
|
|
32416
|
-
editable: false
|
|
32417
|
-
}, {
|
|
32418
|
-
field: 'itemRefTypeNoDisplayText.EN',
|
|
32419
|
-
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32420
|
-
isDictionary: true,
|
|
32421
|
-
editable: false
|
|
32422
|
-
}, {
|
|
32423
|
-
field: 'itemRefTypeNoDisplayText.FR',
|
|
32424
|
-
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32425
|
-
isDictionary: true,
|
|
32426
|
-
editable: false
|
|
32427
|
-
}, {
|
|
32428
|
-
field: 'itemRefTypeNoDisplayText.IT',
|
|
32429
|
-
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32430
|
-
isDictionary: true,
|
|
32431
|
-
editable: false
|
|
32432
|
-
}]
|
|
32433
|
-
}, {
|
|
32434
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.decisionPosCount',
|
|
32435
|
-
field: 'posCountValue',
|
|
32436
|
-
cellDataType: 'number',
|
|
32437
|
-
editable: false
|
|
32438
|
-
}, {
|
|
32439
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.decisionPosCountDisplayText',
|
|
32440
|
-
marryChildren: true,
|
|
32441
|
-
editable: false,
|
|
32442
|
-
children: [{
|
|
32443
|
-
field: 'decisionPosCountDisplayText.DE',
|
|
32444
|
-
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32445
|
-
isDictionary: true,
|
|
32446
|
-
editable: false
|
|
32447
|
-
}, {
|
|
32448
|
-
field: 'decisionPosCountDisplayText.EN',
|
|
32449
|
-
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32450
|
-
isDictionary: true,
|
|
32451
|
-
editable: false
|
|
32452
|
-
}, {
|
|
32453
|
-
field: 'decisionPosCountDisplayText.FR',
|
|
32454
|
-
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32455
|
-
isDictionary: true,
|
|
32456
|
-
editable: false
|
|
32457
|
-
}, {
|
|
32458
|
-
field: 'decisionPosCountDisplayText.IT',
|
|
32459
|
-
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32460
|
-
isDictionary: true,
|
|
32461
|
-
editable: false
|
|
32462
|
-
}]
|
|
32463
|
-
}, {
|
|
32464
|
-
field: 'decisions',
|
|
32465
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.decisions',
|
|
32466
|
-
cellDataType: 'lookup',
|
|
32467
|
-
editable: true,
|
|
32468
|
-
customParams: {
|
|
32469
|
-
nameField: 'decisionRefsDisplayTexts',
|
|
32470
|
-
filterCellType: 'number',
|
|
32471
|
-
displayLabelTemplate: '${name} (${value})',
|
|
32472
|
-
multiple: true,
|
|
32473
|
-
translated: true
|
|
32474
|
-
},
|
|
32475
|
-
additionalFields: ['decisionRefsDisplayTexts'],
|
|
32476
|
-
isDictionary: true
|
|
32477
|
-
}, {
|
|
32478
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.posCountValue',
|
|
32479
|
-
field: 'posCountValue',
|
|
32480
|
-
cellDataType: 'number',
|
|
32481
|
-
editable: false
|
|
32482
|
-
}, {
|
|
32483
|
-
headerName: 'backoffice.idmEnricher.general.partlistpos.label.posInvisibility',
|
|
32484
|
-
field: 'posInvisibility',
|
|
32485
|
-
cellDataType: 'enum',
|
|
32486
|
-
customParams: {
|
|
32487
|
-
enumData: posInvisibility,
|
|
32488
|
-
displayLabelTemplate: '${name} (${value})'
|
|
32489
|
-
},
|
|
32490
|
-
editable: false
|
|
32491
|
-
}, {
|
|
32492
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.retailPrefix',
|
|
32493
|
-
field: 'retailPrefix',
|
|
32494
|
-
editable: true
|
|
32495
|
-
}, {
|
|
32496
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.retailArtilceNumber',
|
|
32497
|
-
field: 'retailArtilceNumber',
|
|
32498
|
-
editable: true
|
|
33629
|
+
hide: true
|
|
32499
33630
|
}, {
|
|
32500
|
-
field: '
|
|
32501
|
-
cellDataType: '
|
|
33631
|
+
field: 'articlePricefactors',
|
|
33632
|
+
cellDataType: 'object',
|
|
32502
33633
|
editable: false,
|
|
32503
|
-
hide: true
|
|
32504
|
-
defaultValue: '${organizationId}'
|
|
32505
|
-
}, {
|
|
32506
|
-
headerName: 'backoffice.idmEnricher.general.label.lastUpdatedDate',
|
|
32507
|
-
field: 'lastUpdatedDate',
|
|
32508
|
-
cellDataType: 'dateString',
|
|
32509
|
-
editable: false
|
|
32510
|
-
}, {
|
|
32511
|
-
headerName: 'backoffice.idmEnricher.general.label.createdDate',
|
|
32512
|
-
field: 'createdDate',
|
|
32513
|
-
cellDataType: 'dateString',
|
|
32514
|
-
editable: false
|
|
32515
|
-
}, {
|
|
32516
|
-
headerName: 'backoffice.idmEnricher.general.label.createdBy',
|
|
32517
|
-
field: 'createdByDisplayText',
|
|
32518
|
-
editable: false
|
|
32519
|
-
}, {
|
|
32520
|
-
headerName: 'backoffice.idmEnricher.general.label.lastUpdatedBy',
|
|
32521
|
-
field: 'lastUpdatedByDisplayText',
|
|
32522
|
-
editable: false
|
|
33634
|
+
hide: true
|
|
32523
33635
|
}, {
|
|
32524
|
-
|
|
32525
|
-
|
|
33636
|
+
field: 'seriePricefactors',
|
|
33637
|
+
cellDataType: 'object',
|
|
32526
33638
|
editable: false,
|
|
32527
|
-
|
|
33639
|
+
hide: true
|
|
32528
33640
|
}]
|
|
32529
33641
|
};
|
|
32530
|
-
}, [apiInterface
|
|
33642
|
+
}, [apiInterface]);
|
|
32531
33643
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
32532
33644
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
32533
33645
|
title: /*#__PURE__*/jsxs("div", {
|
|
32534
|
-
children: [t('backoffice.menu.items.label.
|
|
33646
|
+
children: [t('backoffice.menu.items.label.IDMEnricherEditorTablePriceLists'), /*#__PURE__*/jsx(Space$1, {
|
|
32535
33647
|
style: {
|
|
32536
33648
|
"float": 'right'
|
|
32537
33649
|
},
|
|
@@ -32546,9 +33658,11 @@ function TablePartlistPos () {
|
|
|
32546
33658
|
})]
|
|
32547
33659
|
})
|
|
32548
33660
|
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
33661
|
+
ref: spreadsheetRef,
|
|
32549
33662
|
gridId: 'crud-grid_epartlistpos',
|
|
32550
33663
|
applicationData: applicationData,
|
|
32551
|
-
configuration: configuration
|
|
33664
|
+
configuration: configuration,
|
|
33665
|
+
hooks: hooks
|
|
32552
33666
|
})]
|
|
32553
33667
|
});
|
|
32554
33668
|
}
|
|
@@ -32600,6 +33714,9 @@ function Content$3() {
|
|
|
32600
33714
|
}), /*#__PURE__*/jsx(Route, {
|
|
32601
33715
|
path: ":packageId/groups",
|
|
32602
33716
|
element: /*#__PURE__*/jsx(TableGroups, {})
|
|
33717
|
+
}), /*#__PURE__*/jsx(Route, {
|
|
33718
|
+
path: ":packageId/pricelists",
|
|
33719
|
+
element: /*#__PURE__*/jsx(TablePriceList, {})
|
|
32603
33720
|
})]
|
|
32604
33721
|
});
|
|
32605
33722
|
}
|
|
@@ -33508,7 +34625,7 @@ function SeriesSelector(_ref) {
|
|
|
33508
34625
|
i18n = _useTranslation.i18n;
|
|
33509
34626
|
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
33510
34627
|
apiInterface: {
|
|
33511
|
-
read: idmService + '/v3.0/catalogs/' + catalogId + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id").concat(additionalFields ? ";".concat(additionalFields.join(';')) : '')
|
|
34628
|
+
read: idmService + '/v3.0/catalogs/' + catalogId + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo").concat(additionalFields ? ";".concat(additionalFields.join(';')) : '')
|
|
33512
34629
|
},
|
|
33513
34630
|
selectMapping: {
|
|
33514
34631
|
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
|
@@ -36851,38 +37968,9 @@ function TablePriceFeatureGroups () {
|
|
|
36851
37968
|
});
|
|
36852
37969
|
}
|
|
36853
37970
|
|
|
36854
|
-
function getPriceFeatureGroups(selectedSerie, language) {
|
|
36855
|
-
var _selectedSerie$pricef, _selectedSerie$pricef4;
|
|
36856
|
-
if (!(selectedSerie !== null && selectedSerie !== void 0 && selectedSerie.pricefeaturegroups)) {
|
|
36857
|
-
return [];
|
|
36858
|
-
}
|
|
36859
|
-
var priceFeatureGroups = (_selectedSerie$pricef = selectedSerie.pricefeaturegroups) === null || _selectedSerie$pricef === void 0 ? void 0 : _selectedSerie$pricef.map(function (priceFeatureGroups, i) {
|
|
36860
|
-
var _selectedSerie$pricef2, _selectedSerie$pricef3;
|
|
36861
|
-
return {
|
|
36862
|
-
id: priceFeatureGroups,
|
|
36863
|
-
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,
|
|
36864
|
-
keys: [],
|
|
36865
|
-
keysDisplayTexts: []
|
|
36866
|
-
};
|
|
36867
|
-
});
|
|
36868
|
-
(_selectedSerie$pricef4 = selectedSerie.pricefeaturegroupsKeys) === null || _selectedSerie$pricef4 === void 0 || _selectedSerie$pricef4.forEach(function (priceFeatureGroupKey, i) {
|
|
36869
|
-
var pfgSplit = priceFeatureGroupKey.split('_');
|
|
36870
|
-
var pfgId = pfgSplit[0].replace('PRFG', '');
|
|
36871
|
-
var pfg = priceFeatureGroups.find(function (pfg) {
|
|
36872
|
-
return pfg.id == pfgId;
|
|
36873
|
-
});
|
|
36874
|
-
if (pfg) {
|
|
36875
|
-
var _selectedSerie$pricef5;
|
|
36876
|
-
pfg.keys.push(priceFeatureGroupKey);
|
|
36877
|
-
pfg.keysDisplayTexts.push((_selectedSerie$pricef5 = selectedSerie.pricefeaturegroupsKeysDisplayTexts) === null || _selectedSerie$pricef5 === void 0 || (_selectedSerie$pricef5 = _selectedSerie$pricef5[i]) === null || _selectedSerie$pricef5 === void 0 ? void 0 : _selectedSerie$pricef5[language.toUpperCase()]);
|
|
36878
|
-
}
|
|
36879
|
-
});
|
|
36880
|
-
return priceFeatureGroups;
|
|
36881
|
-
}
|
|
36882
37971
|
function TablePrices () {
|
|
36883
37972
|
var _useTranslation = useTranslation(),
|
|
36884
|
-
t = _useTranslation.t
|
|
36885
|
-
i18n = _useTranslation.i18n;
|
|
37973
|
+
t = _useTranslation.t;
|
|
36886
37974
|
var _useModule = useModule(['prices']),
|
|
36887
37975
|
catalogId = _useModule.catalogId,
|
|
36888
37976
|
updateNavigation = _useModule.updateNavigation,
|
|
@@ -36899,9 +37987,7 @@ function TablePrices () {
|
|
|
36899
37987
|
serieId: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id
|
|
36900
37988
|
};
|
|
36901
37989
|
}, [organizationId, catalogId, selectedSerie]);
|
|
36902
|
-
var priceFeatureGroups =
|
|
36903
|
-
return getPriceFeatureGroups(selectedSerie, i18n.language);
|
|
36904
|
-
}, [selectedSerie, i18n.language]);
|
|
37990
|
+
var priceFeatureGroups = usePriceFeatureGroupsFromSerie(selectedSerie);
|
|
36905
37991
|
var apiInterface = useMemo(function () {
|
|
36906
37992
|
return {
|
|
36907
37993
|
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${serieId}/prices',
|
|
@@ -38267,11 +39353,16 @@ var ErrorBoundary = function ErrorBoundary(_ref) {
|
|
|
38267
39353
|
var FallbackComponent = function FallbackComponent(_ref2) {
|
|
38268
39354
|
_ref2.error;
|
|
38269
39355
|
var resetErrorBoundary = _ref2.resetErrorBoundary;
|
|
38270
|
-
var root =
|
|
39356
|
+
var root = null;
|
|
39357
|
+
try {
|
|
39358
|
+
root = useStore();
|
|
39359
|
+
} catch (_unused) {}
|
|
38271
39360
|
useEffect(function () {
|
|
38272
|
-
|
|
39361
|
+
var _root;
|
|
39362
|
+
(_root = root) === null || _root === void 0 || _root.setResetErrorBoundary(resetErrorBoundary);
|
|
38273
39363
|
return function () {
|
|
38274
|
-
|
|
39364
|
+
var _root2;
|
|
39365
|
+
(_root2 = root) === null || _root2 === void 0 || _root2.setResetErrorBoundary();
|
|
38275
39366
|
};
|
|
38276
39367
|
}, []);
|
|
38277
39368
|
return /*#__PURE__*/jsx(Result$1, {
|