@crystaldesign/diva-backoffice 25.1.1-rc.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 -675
- 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'),
|
|
@@ -7848,22 +7842,6 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7848
7842
|
value: false
|
|
7849
7843
|
}],
|
|
7850
7844
|
permission: 'backoffice_sys_admin_organizations'
|
|
7851
|
-
}, {
|
|
7852
|
-
name: ['settings', 'renderjobSeparateMaterials'],
|
|
7853
|
-
label: t('backoffice.form.organizationdetails.items.settings.renderjobSeparateMaterials'),
|
|
7854
|
-
permission: 'backoffice_admin_organizations',
|
|
7855
|
-
type: 'radio',
|
|
7856
|
-
optionType: 'button',
|
|
7857
|
-
options: [{
|
|
7858
|
-
label: t('backoffice.form.organizationdetails.items.vererbt'),
|
|
7859
|
-
value: undefined
|
|
7860
|
-
}, {
|
|
7861
|
-
label: t('backoffice.form.organizationdetails.items.ja'),
|
|
7862
|
-
value: true
|
|
7863
|
-
}, {
|
|
7864
|
-
label: t('backoffice.form.organizationdetails.items.nein'),
|
|
7865
|
-
value: false
|
|
7866
|
-
}]
|
|
7867
7845
|
}, {
|
|
7868
7846
|
name: ['settings', 'enableAR'],
|
|
7869
7847
|
label: t('backoffice.form.organizationdetails.items.settings.enableAR'),
|
|
@@ -7954,10 +7932,7 @@ function loadConfiguration(t, root, config, lang) {
|
|
|
7954
7932
|
style: {
|
|
7955
7933
|
marginBottom: '40px'
|
|
7956
7934
|
},
|
|
7957
|
-
permission: 'backoffice_admin_organizations'
|
|
7958
|
-
hidden: function hidden(data) {
|
|
7959
|
-
return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
|
|
7960
|
-
}
|
|
7935
|
+
permission: 'backoffice_admin_organizations'
|
|
7961
7936
|
}, {
|
|
7962
7937
|
name: 'iln',
|
|
7963
7938
|
label: t('backoffice.form.organizationdetails.items.iln'),
|
|
@@ -12780,8 +12755,8 @@ var navMinified = "nav-minified-tSt-a";
|
|
|
12780
12755
|
var navOverlay = "nav-overlay-rKJNC";
|
|
12781
12756
|
var navSettings = "nav-settings-82cjv";
|
|
12782
12757
|
var menuLabel = "menu-label-4dXQk";
|
|
12783
|
-
var css_248z$
|
|
12784
|
-
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);
|
|
12785
12760
|
|
|
12786
12761
|
function MenuLabel (_ref) {
|
|
12787
12762
|
var disabled = _ref.disabled,
|
|
@@ -13159,8 +13134,8 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
13159
13134
|
}]);
|
|
13160
13135
|
}();
|
|
13161
13136
|
|
|
13162
|
-
function ownKeys$
|
|
13163
|
-
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; }
|
|
13164
13139
|
var _default$6 = /*#__PURE__*/function () {
|
|
13165
13140
|
function _default(root) {
|
|
13166
13141
|
_classCallCheck(this, _default);
|
|
@@ -13237,7 +13212,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13237
13212
|
if (index >= 0) {
|
|
13238
13213
|
this._additionalMenuElements[index] = {
|
|
13239
13214
|
key: key,
|
|
13240
|
-
element: _objectSpread$
|
|
13215
|
+
element: _objectSpread$R(_objectSpread$R({}, this._additionalMenuElements[index].element), {}, {
|
|
13241
13216
|
items: items,
|
|
13242
13217
|
selected: selected
|
|
13243
13218
|
})
|
|
@@ -13288,7 +13263,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13288
13263
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
13289
13264
|
this.root.navigate('/' + path);
|
|
13290
13265
|
}
|
|
13291
|
-
this._menuElement1 = _objectSpread$
|
|
13266
|
+
this._menuElement1 = _objectSpread$R(_objectSpread$R({}, this.menuElement1), {}, {
|
|
13292
13267
|
selected: this._selectedMenuKeys[0]
|
|
13293
13268
|
});
|
|
13294
13269
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -13532,7 +13507,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
13532
13507
|
return items.filter(function (item) {
|
|
13533
13508
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
13534
13509
|
}).map(function (item) {
|
|
13535
|
-
return _objectSpread$
|
|
13510
|
+
return _objectSpread$R(_objectSpread$R({}, item), {}, {
|
|
13536
13511
|
items: item.items ? _this4.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
13537
13512
|
subMenu: item.subMenu ? _this4.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
13538
13513
|
});
|
|
@@ -15278,8 +15253,8 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
15278
15253
|
}]);
|
|
15279
15254
|
}();
|
|
15280
15255
|
|
|
15281
|
-
function ownKeys$
|
|
15282
|
-
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; }
|
|
15283
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; } } }; }
|
|
15284
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; } }
|
|
15285
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; }
|
|
@@ -15401,7 +15376,7 @@ function useFormData (_ref) {
|
|
|
15401
15376
|
multipleEditingData = inboundData;
|
|
15402
15377
|
}
|
|
15403
15378
|
return {
|
|
15404
|
-
loadedData: _onLoadFields(_objectSpread$
|
|
15379
|
+
loadedData: _onLoadFields(_objectSpread$Q({}, dt)),
|
|
15405
15380
|
multipleEditingData: multipleEditingData
|
|
15406
15381
|
};
|
|
15407
15382
|
}, [inboundData, selectedItemsIndex]),
|
|
@@ -15438,7 +15413,7 @@ function useFormData (_ref) {
|
|
|
15438
15413
|
setFieldErrors = _useState20[1];
|
|
15439
15414
|
useEffect(function () {
|
|
15440
15415
|
var _loadedData$_id2;
|
|
15441
|
-
setState(_objectSpread$
|
|
15416
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15442
15417
|
data: loadedData,
|
|
15443
15418
|
origData: JSON.parse(JSON.stringify(inboundData !== null && inboundData !== void 0 ? inboundData : {})),
|
|
15444
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),
|
|
@@ -15540,7 +15515,7 @@ function useFormData (_ref) {
|
|
|
15540
15515
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
15541
15516
|
while (1) switch (_context2.prev = _context2.next) {
|
|
15542
15517
|
case 0:
|
|
15543
|
-
newData = merge(_objectSpread$
|
|
15518
|
+
newData = merge(_objectSpread$Q({}, state.data), values);
|
|
15544
15519
|
if (!skipApi) {
|
|
15545
15520
|
_context2.next = 3;
|
|
15546
15521
|
break;
|
|
@@ -15550,7 +15525,7 @@ function useFormData (_ref) {
|
|
|
15550
15525
|
root.actions.toggleLoading('saving_form');
|
|
15551
15526
|
_context2.prev = 4;
|
|
15552
15527
|
_context2.next = 7;
|
|
15553
|
-
return setDynamicFields(_objectSpread$
|
|
15528
|
+
return setDynamicFields(_objectSpread$Q({}, state.data), newData);
|
|
15554
15529
|
case 7:
|
|
15555
15530
|
newData = _context2.sent;
|
|
15556
15531
|
_context2.next = 10;
|
|
@@ -15565,7 +15540,7 @@ function useFormData (_ref) {
|
|
|
15565
15540
|
root.actions.toggleLoading('saving_form');
|
|
15566
15541
|
throw _context2.t0;
|
|
15567
15542
|
case 17:
|
|
15568
|
-
setState(_objectSpread$
|
|
15543
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15569
15544
|
loading: true
|
|
15570
15545
|
}));
|
|
15571
15546
|
finalData = state.data;
|
|
@@ -15618,14 +15593,14 @@ function useFormData (_ref) {
|
|
|
15618
15593
|
_context2.next = 47;
|
|
15619
15594
|
break;
|
|
15620
15595
|
}
|
|
15621
|
-
setFieldErrors(_objectSpread$
|
|
15596
|
+
setFieldErrors(_objectSpread$Q(_objectSpread$Q({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
|
|
15622
15597
|
return _context2.abrupt("return", undefined);
|
|
15623
15598
|
case 47:
|
|
15624
15599
|
throw _context2.t1;
|
|
15625
15600
|
case 48:
|
|
15626
15601
|
_context2.prev = 48;
|
|
15627
15602
|
root.actions.toggleLoading('saving_form');
|
|
15628
|
-
setState(_objectSpread$
|
|
15603
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15629
15604
|
data: finalData,
|
|
15630
15605
|
loading: false
|
|
15631
15606
|
}));
|
|
@@ -15655,7 +15630,7 @@ function useFormData (_ref) {
|
|
|
15655
15630
|
}
|
|
15656
15631
|
var updateHiddenRequiredDisabled = function updateHiddenRequiredDisabled(data, changedFields) {
|
|
15657
15632
|
if (!(selectedItems !== null && selectedItems !== void 0 && selectedItems.length)) return;
|
|
15658
|
-
var wholeData = Object.assign(_objectSpread$
|
|
15633
|
+
var wholeData = Object.assign(_objectSpread$Q({}, state.data), _objectSpread$Q({}, changedFields !== null && changedFields !== void 0 ? changedFields : data));
|
|
15659
15634
|
var newState = getHiddenRequredDisabled(wholeData, selectedItems);
|
|
15660
15635
|
if (JSON.stringify(newState) !== JSON.stringify(hiddenRequiredDisabled)) {
|
|
15661
15636
|
setHiddenRequiredDisabled(newState);
|
|
@@ -15668,14 +15643,14 @@ function useFormData (_ref) {
|
|
|
15668
15643
|
}
|
|
15669
15644
|
};
|
|
15670
15645
|
var onInputChanged = function onInputChanged(id, value, d) {
|
|
15671
|
-
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);
|
|
15672
15647
|
if (id) {
|
|
15673
15648
|
setFieldInObject(id, data, value);
|
|
15674
|
-
var newFieldErrors = _objectSpread$
|
|
15649
|
+
var newFieldErrors = _objectSpread$Q({}, fieldErrors);
|
|
15675
15650
|
delete newFieldErrors[id.toString()];
|
|
15676
15651
|
setFieldErrors(newFieldErrors);
|
|
15677
15652
|
}
|
|
15678
|
-
setState(_objectSpread$
|
|
15653
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15679
15654
|
data: data
|
|
15680
15655
|
}));
|
|
15681
15656
|
return data;
|
|
@@ -15707,12 +15682,12 @@ function useFormData (_ref) {
|
|
|
15707
15682
|
var _value$value;
|
|
15708
15683
|
if (((_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value) === val) {
|
|
15709
15684
|
if (configuration.itemSelectorReset) {
|
|
15710
|
-
setState(_objectSpread$
|
|
15685
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15711
15686
|
data: _defineProperty({}, name, val)
|
|
15712
15687
|
}));
|
|
15713
15688
|
} else {
|
|
15714
|
-
setState(_objectSpread$
|
|
15715
|
-
data: _objectSpread$
|
|
15689
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15690
|
+
data: _objectSpread$Q(_objectSpread$Q({}, state.data), {}, _defineProperty({}, name, val))
|
|
15716
15691
|
}));
|
|
15717
15692
|
}
|
|
15718
15693
|
setSelectedItemsIndex(idx);
|
|
@@ -15722,12 +15697,12 @@ function useFormData (_ref) {
|
|
|
15722
15697
|
var val = _ref6.value;
|
|
15723
15698
|
if (value === val) {
|
|
15724
15699
|
if (configuration.itemSelectorReset) {
|
|
15725
|
-
setState(_objectSpread$
|
|
15700
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15726
15701
|
data: _defineProperty({}, name, val)
|
|
15727
15702
|
}));
|
|
15728
15703
|
} else {
|
|
15729
|
-
setState(_objectSpread$
|
|
15730
|
-
data: _objectSpread$
|
|
15704
|
+
setState(_objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
15705
|
+
data: _objectSpread$Q(_objectSpread$Q({}, state.data), {}, _defineProperty({}, name, val))
|
|
15731
15706
|
}));
|
|
15732
15707
|
}
|
|
15733
15708
|
setSelectedItemsIndex(idx);
|
|
@@ -16008,7 +15983,7 @@ function useFormData (_ref) {
|
|
|
16008
15983
|
for (var i = 0; i < configuration.tools.length; i++) {
|
|
16009
15984
|
var _tool$defaultOpen;
|
|
16010
15985
|
var tool = configuration.tools[i];
|
|
16011
|
-
tools.push(_objectSpread$
|
|
15986
|
+
tools.push(_objectSpread$Q(_objectSpread$Q({}, tool), {}, {
|
|
16012
15987
|
parameters: {
|
|
16013
15988
|
data: state.data
|
|
16014
15989
|
},
|
|
@@ -16110,7 +16085,7 @@ function useFormData (_ref) {
|
|
|
16110
16085
|
})) return;
|
|
16111
16086
|
setRemovedMedias([].concat(_toConsumableArray(removedMedias), [media]));
|
|
16112
16087
|
};
|
|
16113
|
-
return _objectSpread$
|
|
16088
|
+
return _objectSpread$Q(_objectSpread$Q({}, state), {}, {
|
|
16114
16089
|
getIsHidden: getIsHidden,
|
|
16115
16090
|
setUsedPreset: setUsedPreset,
|
|
16116
16091
|
configuration: configuration,
|
|
@@ -16227,8 +16202,8 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
16227
16202
|
};
|
|
16228
16203
|
|
|
16229
16204
|
var _excluded$3 = ["key", "name"];
|
|
16230
|
-
function ownKeys$
|
|
16231
|
-
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; }
|
|
16232
16207
|
var FormList$2 = function FormList(_ref) {
|
|
16233
16208
|
var _item$initialValue;
|
|
16234
16209
|
var value = _ref.value,
|
|
@@ -16281,7 +16256,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
16281
16256
|
var aName = [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n));
|
|
16282
16257
|
var hidden = state.getIsHidden(i, state.data, [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), [name]));
|
|
16283
16258
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
16284
|
-
return /*#__PURE__*/createElement(Form$1.Item, _objectSpread$
|
|
16259
|
+
return /*#__PURE__*/createElement(Form$1.Item, _objectSpread$P(_objectSpread$P({}, restField), {}, {
|
|
16285
16260
|
id: n.join(),
|
|
16286
16261
|
key: n.join(),
|
|
16287
16262
|
name: n,
|
|
@@ -16293,7 +16268,7 @@ var FormList$2 = function FormList(_ref) {
|
|
|
16293
16268
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
16294
16269
|
help: state.fieldErrors[n.toString()],
|
|
16295
16270
|
hidden: hidden
|
|
16296
|
-
}), getElement(_objectSpread$
|
|
16271
|
+
}), getElement(_objectSpread$P(_objectSpread$P({}, i), {}, {
|
|
16297
16272
|
name: n
|
|
16298
16273
|
}), setCanSave, state, aName, state.onInputChanged, onError, root, form, hidden));
|
|
16299
16274
|
})
|
|
@@ -16458,8 +16433,8 @@ var Result = function Result(_ref) {
|
|
|
16458
16433
|
|
|
16459
16434
|
var success = "success-tRJ7j";
|
|
16460
16435
|
var error = "error-MtAFB";
|
|
16461
|
-
var css_248z$
|
|
16462
|
-
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);
|
|
16463
16438
|
|
|
16464
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";
|
|
16465
16440
|
|
|
@@ -16521,13 +16496,13 @@ var CustomButton = function CustomButton(_ref) {
|
|
|
16521
16496
|
};
|
|
16522
16497
|
var CustomButton$1 = observer(CustomButton);
|
|
16523
16498
|
|
|
16524
|
-
var wrapper$
|
|
16499
|
+
var wrapper$6 = "wrapper-GVe2h";
|
|
16525
16500
|
var buttonGroup = "button-group-GYt-T";
|
|
16526
|
-
var css_248z$
|
|
16527
|
-
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);
|
|
16528
16503
|
|
|
16529
|
-
function ownKeys$
|
|
16530
|
-
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; }
|
|
16531
16506
|
var SubTitle = function SubTitle(_ref) {
|
|
16532
16507
|
var _item$orientation, _item$buttonIds;
|
|
16533
16508
|
var item = _ref.item,
|
|
@@ -16536,9 +16511,9 @@ var SubTitle = function SubTitle(_ref) {
|
|
|
16536
16511
|
t = _useTranslation.t;
|
|
16537
16512
|
return /*#__PURE__*/jsx(Divider, {
|
|
16538
16513
|
orientation: (_item$orientation = item.orientation) !== null && _item$orientation !== void 0 ? _item$orientation : 'left',
|
|
16539
|
-
style: _objectSpread$
|
|
16514
|
+
style: _objectSpread$O({}, item.style),
|
|
16540
16515
|
children: /*#__PURE__*/jsxs("div", {
|
|
16541
|
-
className: wrapper$
|
|
16516
|
+
className: wrapper$6,
|
|
16542
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) {
|
|
16543
16518
|
return /*#__PURE__*/jsx("div", {
|
|
16544
16519
|
className: buttonGroup,
|
|
@@ -16775,19 +16750,20 @@ function parseDataEntry(item, selectMapping) {
|
|
|
16775
16750
|
* Returns the data of the selected option(s) based on the selectMapping configuration
|
|
16776
16751
|
*/
|
|
16777
16752
|
function parseReturnData(options, selectMapping) {
|
|
16753
|
+
if (!options) return undefined;
|
|
16778
16754
|
if (Array.isArray(options)) return options.map(function (option) {
|
|
16779
16755
|
return parseReturnData(option, selectMapping);
|
|
16780
16756
|
});
|
|
16781
16757
|
return (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? options.value : options.data;
|
|
16782
16758
|
}
|
|
16783
16759
|
|
|
16784
|
-
var wrapper$
|
|
16785
|
-
var css_248z$
|
|
16786
|
-
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);
|
|
16787
16763
|
|
|
16788
16764
|
var _excluded$2 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title"];
|
|
16789
|
-
function ownKeys$
|
|
16790
|
-
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; }
|
|
16791
16767
|
var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
16792
16768
|
var apiInterface = _ref.apiInterface,
|
|
16793
16769
|
selectMapping = _ref.selectMapping,
|
|
@@ -16811,8 +16787,8 @@ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
|
|
|
16811
16787
|
});
|
|
16812
16788
|
return /*#__PURE__*/jsxs("div", {
|
|
16813
16789
|
ref: ref,
|
|
16814
|
-
className: classnames(title ? wrapper$
|
|
16815
|
-
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), {}, {
|
|
16816
16792
|
showSearch: search,
|
|
16817
16793
|
loading: state.loading,
|
|
16818
16794
|
options: state.options,
|
|
@@ -17429,8 +17405,8 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
17429
17405
|
}]);
|
|
17430
17406
|
}(_default$d);
|
|
17431
17407
|
|
|
17432
|
-
function ownKeys$
|
|
17433
|
-
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; }
|
|
17434
17410
|
getLogger('Backoffice', 'SelectClientRelationCatalog');
|
|
17435
17411
|
function useSelectClientRelationCatalog (_ref) {
|
|
17436
17412
|
var onSelectedCatalog = _ref.onSelectedCatalog,
|
|
@@ -17599,7 +17575,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
17599
17575
|
case 22:
|
|
17600
17576
|
supplierData = _context2.sent;
|
|
17601
17577
|
case 23:
|
|
17602
|
-
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$
|
|
17578
|
+
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$M(_objectSpread$M({}, _selectedSupplier), {}, {
|
|
17603
17579
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
17604
17580
|
}), supplierData);
|
|
17605
17581
|
if (catalogId && catalogList.find(function (c) {
|
|
@@ -17665,8 +17641,8 @@ var customSelect = "custom-select-ESUJX";
|
|
|
17665
17641
|
var customSelectOption = "custom-select-option-dUA7N";
|
|
17666
17642
|
var avatarWrapper = "avatar-wrapper-Vg-xe";
|
|
17667
17643
|
var selectTextWrapper = "select-text-wrapper-hPSZW";
|
|
17668
|
-
var css_248z$
|
|
17669
|
-
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);
|
|
17670
17646
|
|
|
17671
17647
|
var Selector = function Selector(_ref) {
|
|
17672
17648
|
var items = _ref.items,
|
|
@@ -17820,8 +17796,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
17820
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; } } }; }
|
|
17821
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; } }
|
|
17822
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; }
|
|
17823
|
-
function ownKeys$
|
|
17824
|
-
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; }
|
|
17825
17801
|
function useSelectData (_ref) {
|
|
17826
17802
|
var data = _ref.data,
|
|
17827
17803
|
onChange = _ref.onChange,
|
|
@@ -18004,7 +17980,7 @@ function useSelectData (_ref) {
|
|
|
18004
17980
|
setFetching(true);
|
|
18005
17981
|
serverSideParams = {
|
|
18006
17982
|
filters: selectMapping !== null && selectMapping !== void 0 && selectMapping.searchField ? selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.searchField.reduce(function (filter, field) {
|
|
18007
|
-
return _objectSpread$
|
|
17983
|
+
return _objectSpread$L(_objectSpread$L({}, filter), value !== undefined ? _defineProperty({}, field.field, [value, field.filter, true]) : {});
|
|
18008
17984
|
}, {}) : {
|
|
18009
17985
|
_id: [value, 'contains']
|
|
18010
17986
|
},
|
|
@@ -18210,8 +18186,8 @@ function useSelectData (_ref) {
|
|
|
18210
18186
|
};
|
|
18211
18187
|
}
|
|
18212
18188
|
|
|
18213
|
-
var css_248z$
|
|
18214
|
-
styleInject(css_248z$
|
|
18189
|
+
var css_248z$o = ".darkmode .ant-select-selection-search-input {\n color: #fff;\n}\n";
|
|
18190
|
+
styleInject(css_248z$o);
|
|
18215
18191
|
|
|
18216
18192
|
var SelectWrapper = function SelectWrapper(_ref) {
|
|
18217
18193
|
var onChange = _ref.onChange,
|
|
@@ -18290,14 +18266,14 @@ var SelectWrapper = function SelectWrapper(_ref) {
|
|
|
18290
18266
|
};
|
|
18291
18267
|
var Select = observer(SelectWrapper);
|
|
18292
18268
|
|
|
18293
|
-
var wrapper$
|
|
18269
|
+
var wrapper$4 = "wrapper-WStAk";
|
|
18294
18270
|
var headerWrapper = "header-wrapper-gWQuH";
|
|
18295
18271
|
var buttonsWrapper$1 = "buttons-wrapper-7ebR9";
|
|
18296
|
-
var css_248z$
|
|
18297
|
-
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);
|
|
18298
18274
|
|
|
18299
|
-
function ownKeys$
|
|
18300
|
-
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; }
|
|
18301
18277
|
var LOG$9 = getLogger('Backoffice', 'Translation Form');
|
|
18302
18278
|
function useTranslationHook (item, state) {
|
|
18303
18279
|
var root = useStore();
|
|
@@ -18430,7 +18406,7 @@ function useTranslationHook (item, state) {
|
|
|
18430
18406
|
case 0:
|
|
18431
18407
|
_context2.next = 2;
|
|
18432
18408
|
return apiHandler.create({
|
|
18433
|
-
locales: _objectSpread$
|
|
18409
|
+
locales: _objectSpread$K({
|
|
18434
18410
|
de: {},
|
|
18435
18411
|
it: {},
|
|
18436
18412
|
fr: {},
|
|
@@ -18479,8 +18455,8 @@ function useTranslationHook (item, state) {
|
|
|
18479
18455
|
};
|
|
18480
18456
|
}
|
|
18481
18457
|
|
|
18482
|
-
function ownKeys$
|
|
18483
|
-
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; }
|
|
18484
18460
|
var Translation = function Translation(_ref) {
|
|
18485
18461
|
var item = _ref.item,
|
|
18486
18462
|
state = _ref.state,
|
|
@@ -18498,7 +18474,7 @@ var Translation = function Translation(_ref) {
|
|
|
18498
18474
|
_onChange = _useTranslationHook.onChange,
|
|
18499
18475
|
autoTranslate = _useTranslationHook.autoTranslate;
|
|
18500
18476
|
return /*#__PURE__*/jsxs("div", {
|
|
18501
|
-
className: wrapper$
|
|
18477
|
+
className: wrapper$4,
|
|
18502
18478
|
children: [/*#__PURE__*/jsxs("div", {
|
|
18503
18479
|
className: headerWrapper,
|
|
18504
18480
|
children: [/*#__PURE__*/jsx("div", {
|
|
@@ -18530,7 +18506,7 @@ var Translation = function Translation(_ref) {
|
|
|
18530
18506
|
var hidden = state.getIsHidden(i, data);
|
|
18531
18507
|
var newAbsoluteName = absoluteName !== '' ? [].concat(_toConsumableArray(Array.isArray(absoluteName) ? absoluteName : [absoluteName]), _toConsumableArray(n)) : n;
|
|
18532
18508
|
return /*#__PURE__*/jsx(React.Fragment, {
|
|
18533
|
-
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$
|
|
18509
|
+
children: ['subTitle', 'array'].includes(i.type) ? getElement(_objectSpread$J(_objectSpread$J({}, i), {}, {
|
|
18534
18510
|
name: n
|
|
18535
18511
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden, currentLang) : /*#__PURE__*/jsx(Form$1.Item, {
|
|
18536
18512
|
id: idx.toString(),
|
|
@@ -18543,7 +18519,7 @@ var Translation = function Translation(_ref) {
|
|
|
18543
18519
|
validateStatus: !!state.fieldErrors[n.toString()] ? 'error' : undefined,
|
|
18544
18520
|
help: state.fieldErrors[n.toString()],
|
|
18545
18521
|
hidden: hidden,
|
|
18546
|
-
children: getElement(_objectSpread$
|
|
18522
|
+
children: getElement(_objectSpread$J(_objectSpread$J({}, i), {}, {
|
|
18547
18523
|
name: n
|
|
18548
18524
|
}), setCanSave, state, newAbsoluteName, state.onInputChanged, onError, root, form, hidden)
|
|
18549
18525
|
})
|
|
@@ -18878,8 +18854,8 @@ var Text$1 = observer(Text);
|
|
|
18878
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; } } }; }
|
|
18879
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; } }
|
|
18880
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; }
|
|
18881
|
-
function ownKeys$
|
|
18882
|
-
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; }
|
|
18883
18859
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName) {
|
|
18884
18860
|
var _isReadonly, _state$hiddenRequired;
|
|
18885
18861
|
if (hidden) return /*#__PURE__*/jsx(Fragment, {});
|
|
@@ -18914,7 +18890,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
18914
18890
|
}
|
|
18915
18891
|
});
|
|
18916
18892
|
case 'selectSimple':
|
|
18917
|
-
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$
|
|
18893
|
+
return /*#__PURE__*/jsx(SimpleSelect, _objectSpread$I(_objectSpread$I({}, item), {}, {
|
|
18918
18894
|
disabled: disabled,
|
|
18919
18895
|
onChange: function onChange(value) {
|
|
18920
18896
|
_onChange(absoluteName, value);
|
|
@@ -19118,7 +19094,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
19118
19094
|
value: item.value,
|
|
19119
19095
|
options: item.options.map(function (o) {
|
|
19120
19096
|
var _o$disabled;
|
|
19121
|
-
return _objectSpread$
|
|
19097
|
+
return _objectSpread$I(_objectSpread$I({}, o), {}, {
|
|
19122
19098
|
disabled: (_o$disabled = o.disabled) === null || _o$disabled === void 0 ? void 0 : _o$disabled.call(o, state.data)
|
|
19123
19099
|
});
|
|
19124
19100
|
}),
|
|
@@ -19139,7 +19115,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
19139
19115
|
},
|
|
19140
19116
|
icon: item.icon,
|
|
19141
19117
|
callback: function callback(data) {
|
|
19142
|
-
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));
|
|
19143
19119
|
}
|
|
19144
19120
|
});
|
|
19145
19121
|
case 'media':
|
|
@@ -19160,7 +19136,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
19160
19136
|
var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
19161
19137
|
var _useTranslation = useTranslation(),
|
|
19162
19138
|
t = _useTranslation.t;
|
|
19163
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
19139
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$I(_objectSpread$I({}, props), {}, {
|
|
19164
19140
|
ref: ref,
|
|
19165
19141
|
disabled: true,
|
|
19166
19142
|
value: t(props.translationPrefix + '.' + props.value)
|
|
@@ -19179,8 +19155,8 @@ function isReadonly(item, data) {
|
|
|
19179
19155
|
return false;
|
|
19180
19156
|
}
|
|
19181
19157
|
|
|
19182
|
-
function ownKeys$
|
|
19183
|
-
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; }
|
|
19184
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; } } }; }
|
|
19185
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; } }
|
|
19186
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; }
|
|
@@ -19230,13 +19206,13 @@ var Presets = function Presets(_ref) {
|
|
|
19230
19206
|
} finally {
|
|
19231
19207
|
_iterator.f();
|
|
19232
19208
|
}
|
|
19233
|
-
var data = _objectSpread$
|
|
19209
|
+
var data = _objectSpread$H(_objectSpread$H({}, form.getFieldsValue(names)), {}, {
|
|
19234
19210
|
newPresetName: newPresetName
|
|
19235
19211
|
});
|
|
19236
19212
|
data.dpi = parseInt(data.dpi);
|
|
19237
19213
|
data.organization = root.getGlobalValue('organizationId');
|
|
19238
19214
|
apiHandler.create({}, state.configuration.createPresetMapping, data);
|
|
19239
|
-
var dt = _objectSpread$
|
|
19215
|
+
var dt = _objectSpread$H(_objectSpread$H({}, form.getFieldsValue(names)), {}, {
|
|
19240
19216
|
name: newPresetName
|
|
19241
19217
|
});
|
|
19242
19218
|
setPresets({
|
|
@@ -19578,8 +19554,8 @@ function getLabel(item, t) {
|
|
|
19578
19554
|
}
|
|
19579
19555
|
var Form = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
19580
19556
|
|
|
19581
|
-
function ownKeys$
|
|
19582
|
-
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; }
|
|
19583
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; } } }; }
|
|
19584
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; } }
|
|
19585
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; }
|
|
@@ -19781,7 +19757,7 @@ function useRoleSelectorData (_ref) {
|
|
|
19781
19757
|
roles.forEach(function (r) {
|
|
19782
19758
|
//check if after the changes the role is selected
|
|
19783
19759
|
if (value.includes(r._id)) {
|
|
19784
|
-
var newValue = _objectSpread$
|
|
19760
|
+
var newValue = _objectSpread$G(_objectSpread$G({}, r), {}, {
|
|
19785
19761
|
selected: true
|
|
19786
19762
|
});
|
|
19787
19763
|
//add it to the new list as selected role
|
|
@@ -19817,7 +19793,7 @@ function useRoleSelectorData (_ref) {
|
|
|
19817
19793
|
}
|
|
19818
19794
|
}
|
|
19819
19795
|
} else {
|
|
19820
|
-
var _newValue = _objectSpread$
|
|
19796
|
+
var _newValue = _objectSpread$G(_objectSpread$G({}, r), {}, {
|
|
19821
19797
|
selected: false
|
|
19822
19798
|
});
|
|
19823
19799
|
//add it to the new list as unselected role
|
|
@@ -20021,7 +19997,7 @@ function _updateRoles() {
|
|
|
20021
19997
|
userRole = userRoles.find(function (r) {
|
|
20022
19998
|
return r._id == role._id;
|
|
20023
19999
|
});
|
|
20024
|
-
newRole = _objectSpread$
|
|
20000
|
+
newRole = _objectSpread$G({}, role);
|
|
20025
20001
|
if (userRole) {
|
|
20026
20002
|
newRole.selected = true;
|
|
20027
20003
|
newRole.inherited = userRole.inherited;
|
|
@@ -20241,7 +20217,7 @@ function _fetchOptions() {
|
|
|
20241
20217
|
case 4:
|
|
20242
20218
|
result = _context11.sent;
|
|
20243
20219
|
options = result.data.map(function (d) {
|
|
20244
|
-
return _objectSpread$
|
|
20220
|
+
return _objectSpread$G(_objectSpread$G({}, d), {}, {
|
|
20245
20221
|
label: d.displayName,
|
|
20246
20222
|
value: d._id,
|
|
20247
20223
|
isLeaf: !d.hasChildren
|
|
@@ -20340,11 +20316,11 @@ var skeleton = "skeleton--xCI0";
|
|
|
20340
20316
|
var filterField = "filterField-1kU1O";
|
|
20341
20317
|
var parentScroll = "parent-scroll-GmaL9";
|
|
20342
20318
|
var parent = "parent-NZJ3S";
|
|
20343
|
-
var css_248z$
|
|
20344
|
-
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);
|
|
20345
20321
|
|
|
20346
|
-
function ownKeys$
|
|
20347
|
-
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; }
|
|
20348
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; } } }; }
|
|
20349
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; } }
|
|
20350
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; }
|
|
@@ -20404,8 +20380,8 @@ function _generateCSV() {
|
|
|
20404
20380
|
break;
|
|
20405
20381
|
}
|
|
20406
20382
|
_context2.next = 21;
|
|
20407
|
-
return generateCSV(_objectSpread$
|
|
20408
|
-
mappingData: _objectSpread$
|
|
20383
|
+
return generateCSV(_objectSpread$F(_objectSpread$F({}, exportParams.children), {}, {
|
|
20384
|
+
mappingData: _objectSpread$F(_objectSpread$F({}, parent), {}, {
|
|
20409
20385
|
parentId: exportParams.mappingData._id
|
|
20410
20386
|
})
|
|
20411
20387
|
}), csvData);
|
|
@@ -20513,8 +20489,8 @@ function _downloadFile() {
|
|
|
20513
20489
|
return _downloadFile.apply(this, arguments);
|
|
20514
20490
|
}
|
|
20515
20491
|
|
|
20516
|
-
function ownKeys$
|
|
20517
|
-
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; }
|
|
20518
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; } } }; }
|
|
20519
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; } }
|
|
20520
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; }
|
|
@@ -20933,7 +20909,7 @@ function useRelationSelectorData (_ref) {
|
|
|
20933
20909
|
var activeItem = _step.value;
|
|
20934
20910
|
if ((activeItem === null || activeItem === void 0 ? void 0 : activeItem._id) === (addedData === null || addedData === void 0 ? void 0 : addedData._id)) {
|
|
20935
20911
|
addedObjects.push(addedData);
|
|
20936
|
-
getSplittedItems(_objectSpread$
|
|
20912
|
+
getSplittedItems(_objectSpread$E(_objectSpread$E({}, activeItem), {}, {
|
|
20937
20913
|
userId: data === null || data === void 0 ? void 0 : data._id
|
|
20938
20914
|
}));
|
|
20939
20915
|
ret = true;
|
|
@@ -21138,8 +21114,8 @@ function useRelationSelectorData (_ref) {
|
|
|
21138
21114
|
};
|
|
21139
21115
|
}
|
|
21140
21116
|
|
|
21141
|
-
function ownKeys$
|
|
21142
|
-
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; }
|
|
21143
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; } } }; }
|
|
21144
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; } }
|
|
21145
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; }
|
|
@@ -21272,7 +21248,7 @@ function ActionButton (_ref) {
|
|
|
21272
21248
|
_iterator2.f();
|
|
21273
21249
|
}
|
|
21274
21250
|
_context.next = 19;
|
|
21275
|
-
return apiInterface.update(_objectSpread$
|
|
21251
|
+
return apiInterface.update(_objectSpread$D(_objectSpread$D({}, data), {}, {
|
|
21276
21252
|
state: toSwitch
|
|
21277
21253
|
}), data);
|
|
21278
21254
|
case 19:
|
|
@@ -21429,14 +21405,14 @@ function _simpleChangeValue() {
|
|
|
21429
21405
|
break;
|
|
21430
21406
|
}
|
|
21431
21407
|
for (i = 0; i < action.newValues.length; i++) {
|
|
21432
|
-
fieldsToUpdate = _objectSpread$
|
|
21408
|
+
fieldsToUpdate = _objectSpread$D(_objectSpread$D({}, fieldsToUpdate), {}, _defineProperty({}, action.newValues[i].field, action.newValues[i].value));
|
|
21433
21409
|
}
|
|
21434
21410
|
if (!apiInterface.canUpdate) {
|
|
21435
21411
|
_context2.next = 9;
|
|
21436
21412
|
break;
|
|
21437
21413
|
}
|
|
21438
21414
|
_context2.next = 7;
|
|
21439
|
-
return apiInterface.update(_objectSpread$
|
|
21415
|
+
return apiInterface.update(_objectSpread$D({}, fieldsToUpdate), data);
|
|
21440
21416
|
case 7:
|
|
21441
21417
|
response = _context2.sent;
|
|
21442
21418
|
return _context2.abrupt("return", response);
|
|
@@ -21451,7 +21427,7 @@ function _simpleChangeValue() {
|
|
|
21451
21427
|
return _simpleChangeValue.apply(this, arguments);
|
|
21452
21428
|
}
|
|
21453
21429
|
function A(props) {
|
|
21454
|
-
return /*#__PURE__*/jsx("a", _objectSpread$
|
|
21430
|
+
return /*#__PURE__*/jsx("a", _objectSpread$D({}, props));
|
|
21455
21431
|
}
|
|
21456
21432
|
|
|
21457
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; } } }; }
|
|
@@ -21586,11 +21562,11 @@ var newscroller = "newscroller-INKeD";
|
|
|
21586
21562
|
var antCollapseHeader = "ant-collapse-header--6FgU";
|
|
21587
21563
|
var itemTitle = "item-title--BTvC";
|
|
21588
21564
|
var itemDesc = "item-desc-DBiiF";
|
|
21589
|
-
var css_248z$
|
|
21590
|
-
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);
|
|
21591
21567
|
|
|
21592
|
-
function ownKeys$
|
|
21593
|
-
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; }
|
|
21594
21570
|
var DropDown = function DropDown(_ref) {
|
|
21595
21571
|
var _curItem$data$length;
|
|
21596
21572
|
var split = _ref.split,
|
|
@@ -21622,7 +21598,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
21622
21598
|
});
|
|
21623
21599
|
return /*#__PURE__*/jsx(Collapse, {
|
|
21624
21600
|
onChange: function onChange() {
|
|
21625
|
-
return getSplittedItems(_objectSpread$
|
|
21601
|
+
return getSplittedItems(_objectSpread$C(_objectSpread$C({}, item.item), {}, {
|
|
21626
21602
|
parentId: item.parentId
|
|
21627
21603
|
}), 0);
|
|
21628
21604
|
},
|
|
@@ -21880,8 +21856,8 @@ var RelationSelector = function RelationSelector(_ref, ref) {
|
|
|
21880
21856
|
};
|
|
21881
21857
|
var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
|
|
21882
21858
|
|
|
21883
|
-
function ownKeys$
|
|
21884
|
-
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; }
|
|
21885
21861
|
function useFormListData (_ref) {
|
|
21886
21862
|
var _configuration$defaul;
|
|
21887
21863
|
var id = _ref.id,
|
|
@@ -21961,7 +21937,7 @@ function useFormListData (_ref) {
|
|
|
21961
21937
|
if (updated.length == state.length) {
|
|
21962
21938
|
newState = state.map(function (s, i) {
|
|
21963
21939
|
var _updated$find;
|
|
21964
|
-
return _objectSpread$
|
|
21940
|
+
return _objectSpread$B(_objectSpread$B({}, s), {}, {
|
|
21965
21941
|
data: (_updated$find = updated.find(function (u) {
|
|
21966
21942
|
return u.index == i;
|
|
21967
21943
|
})) === null || _updated$find === void 0 ? void 0 : _updated$find.data
|
|
@@ -22098,8 +22074,8 @@ var FormList = function FormList(_ref, ref) {
|
|
|
22098
22074
|
};
|
|
22099
22075
|
var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
22100
22076
|
|
|
22101
|
-
function ownKeys$
|
|
22102
|
-
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; }
|
|
22103
22079
|
var LOG$6 = getLogger('Backoffice', 'SelectOrCreate');
|
|
22104
22080
|
function useSelectOrCreateData (_ref) {
|
|
22105
22081
|
var id = _ref.id,
|
|
@@ -22196,7 +22172,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
22196
22172
|
_context.next = 7;
|
|
22197
22173
|
return apiHandler.readList(configuration.readMapping, mappingData, {
|
|
22198
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) {
|
|
22199
|
-
return _objectSpread$
|
|
22175
|
+
return _objectSpread$A(_objectSpread$A({}, filter), {}, _defineProperty({}, field.field, [value, field.filter, true]));
|
|
22200
22176
|
}, {}) : {
|
|
22201
22177
|
_id: [value, 'contains']
|
|
22202
22178
|
},
|
|
@@ -22507,8 +22483,8 @@ var Multiple = function Multiple(_ref3) {
|
|
|
22507
22483
|
});
|
|
22508
22484
|
};
|
|
22509
22485
|
|
|
22510
|
-
function ownKeys$
|
|
22511
|
-
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; }
|
|
22512
22488
|
function useListData (_ref) {
|
|
22513
22489
|
var id = _ref.id,
|
|
22514
22490
|
data = _ref.data;
|
|
@@ -22551,7 +22527,7 @@ function useListData (_ref) {
|
|
|
22551
22527
|
case 3:
|
|
22552
22528
|
result = _context.sent;
|
|
22553
22529
|
setListData(result.data.map(parseField));
|
|
22554
|
-
initData = _objectSpread$
|
|
22530
|
+
initData = _objectSpread$z({}, data);
|
|
22555
22531
|
setUpdatedObject(initData);
|
|
22556
22532
|
setLoading(false);
|
|
22557
22533
|
case 8:
|
|
@@ -22592,7 +22568,7 @@ function useListData (_ref) {
|
|
|
22592
22568
|
});
|
|
22593
22569
|
(_configuration$itemMa7 = configuration.itemMapping.itemUpdate) === null || _configuration$itemMa7 === void 0 || _configuration$itemMa7.forEach(function (field) {
|
|
22594
22570
|
var parsedField = field.field.split('.');
|
|
22595
|
-
item.itemUpdate = _objectSpread$
|
|
22571
|
+
item.itemUpdate = _objectSpread$z(_objectSpread$z({}, field), {}, {
|
|
22596
22572
|
value: dataEntry[parsedField[parsedField.length - 1]]
|
|
22597
22573
|
});
|
|
22598
22574
|
});
|
|
@@ -22623,16 +22599,16 @@ function useListData (_ref) {
|
|
|
22623
22599
|
console.error('field with more than 2 parts not allowed');
|
|
22624
22600
|
return;
|
|
22625
22601
|
}
|
|
22626
|
-
var updObj = _objectSpread$
|
|
22602
|
+
var updObj = _objectSpread$z({}, updatedObject);
|
|
22627
22603
|
if (fields.length === 1) {
|
|
22628
|
-
updObj = _objectSpread$
|
|
22604
|
+
updObj = _objectSpread$z(_objectSpread$z({}, updObj), {}, _defineProperty({}, fields[0], value));
|
|
22629
22605
|
} else if (fields.length === 2) {
|
|
22630
22606
|
var updatedField = updObj[fields[0]].find(function (v) {
|
|
22631
22607
|
return v.id === item.id.trim();
|
|
22632
22608
|
});
|
|
22633
22609
|
if (updatedField) {
|
|
22634
|
-
var updatedFieldCopy = _objectSpread$
|
|
22635
|
-
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) {
|
|
22636
22612
|
return v.id === item.id.trim() ? updatedFieldCopy : v;
|
|
22637
22613
|
})));
|
|
22638
22614
|
}
|
|
@@ -22641,11 +22617,11 @@ function useListData (_ref) {
|
|
|
22641
22617
|
var acItems = listData;
|
|
22642
22618
|
for (var i = 0; i < acItems.length; i++) {
|
|
22643
22619
|
if (i == index) {
|
|
22644
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
22620
|
+
acItems[i].itemUpdate = _objectSpread$z(_objectSpread$z({}, acItems[i].itemUpdate), {}, {
|
|
22645
22621
|
value: value
|
|
22646
22622
|
});
|
|
22647
22623
|
} else if (!acItems[i].itemUpdate.multiselect) {
|
|
22648
|
-
acItems[i].itemUpdate = _objectSpread$
|
|
22624
|
+
acItems[i].itemUpdate = _objectSpread$z(_objectSpread$z({}, acItems[i].itemUpdate), {}, {
|
|
22649
22625
|
value: !value
|
|
22650
22626
|
});
|
|
22651
22627
|
}
|
|
@@ -22999,8 +22975,8 @@ var jsoneditor = "jsoneditor-WMs15";
|
|
|
22999
22975
|
var preview = "preview-9wK81";
|
|
23000
22976
|
var previewButton = "preview-button-vupuG";
|
|
23001
22977
|
var editButton = "edit-button-m6r3M";
|
|
23002
|
-
var css_248z$
|
|
23003
|
-
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);
|
|
23004
22980
|
|
|
23005
22981
|
var JsonEditor = function JsonEditor(_ref, ref) {
|
|
23006
22982
|
var id = _ref.id,
|
|
@@ -23159,8 +23135,8 @@ function calcNaturalCanvasSize(image, crop) {
|
|
|
23159
23135
|
};
|
|
23160
23136
|
}
|
|
23161
23137
|
|
|
23162
|
-
function ownKeys$
|
|
23163
|
-
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; }
|
|
23164
23140
|
var ImageCropper = function ImageCropper(_ref, ref) {
|
|
23165
23141
|
var id = _ref.id,
|
|
23166
23142
|
data = _ref.data,
|
|
@@ -23268,12 +23244,12 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
23268
23244
|
}
|
|
23269
23245
|
function onEnter(e) {
|
|
23270
23246
|
if (e.key != 'Enter') return;
|
|
23271
|
-
setCrop(_objectSpread$
|
|
23247
|
+
setCrop(_objectSpread$y(_objectSpread$y({}, crop), {}, {
|
|
23272
23248
|
unit: 'px',
|
|
23273
23249
|
width: Number(widthInputElement.current.value),
|
|
23274
23250
|
height: Number(heightInputElement.current.value)
|
|
23275
23251
|
}));
|
|
23276
|
-
setCompletedCrop(_objectSpread$
|
|
23252
|
+
setCompletedCrop(_objectSpread$y(_objectSpread$y({}, crop), {}, {
|
|
23277
23253
|
unit: 'px',
|
|
23278
23254
|
width: Number(widthInputElement.current.value),
|
|
23279
23255
|
height: Number(heightInputElement.current.value)
|
|
@@ -23351,8 +23327,8 @@ var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
|
23351
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; } } }; }
|
|
23352
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; } }
|
|
23353
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; }
|
|
23354
|
-
function ownKeys$
|
|
23355
|
-
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; }
|
|
23356
23332
|
function useDescriptions (_ref) {
|
|
23357
23333
|
var id = _ref.id;
|
|
23358
23334
|
var root = useStore();
|
|
@@ -23445,7 +23421,7 @@ function _getDisplayData() {
|
|
|
23445
23421
|
return _regeneratorRuntime.wrap(function _callee3$(_context4) {
|
|
23446
23422
|
while (1) switch (_context4.prev = _context4.next) {
|
|
23447
23423
|
case 0:
|
|
23448
|
-
displayData = _objectSpread$
|
|
23424
|
+
displayData = _objectSpread$x({}, data);
|
|
23449
23425
|
_iterator = _createForOfIteratorHelper$9(items);
|
|
23450
23426
|
_context4.prev = 2;
|
|
23451
23427
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
@@ -23721,8 +23697,8 @@ var FileUploadWrapper = function FileUploadWrapper(_ref) {
|
|
|
23721
23697
|
};
|
|
23722
23698
|
var FileUploadBeta = observer(FileUploadWrapper);
|
|
23723
23699
|
|
|
23724
|
-
function ownKeys$
|
|
23725
|
-
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; }
|
|
23726
23702
|
function useGridData (_ref) {
|
|
23727
23703
|
var id = _ref.id,
|
|
23728
23704
|
data = _ref.data;
|
|
@@ -23765,11 +23741,11 @@ function useGridData (_ref) {
|
|
|
23765
23741
|
function reducer(state, action) {
|
|
23766
23742
|
switch (action.type) {
|
|
23767
23743
|
case 'update':
|
|
23768
|
-
return _objectSpread$
|
|
23744
|
+
return _objectSpread$w(_objectSpread$w({}, state), {}, _defineProperty({}, action.data.divaNr, _objectSpread$w(_objectSpread$w({}, action.data), {}, {
|
|
23769
23745
|
buffer: Buffer.from(action.data.buffer)
|
|
23770
23746
|
})));
|
|
23771
23747
|
case 'delete':
|
|
23772
|
-
var newState = _objectSpread$
|
|
23748
|
+
var newState = _objectSpread$w({}, state);
|
|
23773
23749
|
delete newState[action.data.divaNr];
|
|
23774
23750
|
return newState;
|
|
23775
23751
|
default:
|
|
@@ -23779,19 +23755,19 @@ function reducer(state, action) {
|
|
|
23779
23755
|
|
|
23780
23756
|
var grid = "grid-sGemi";
|
|
23781
23757
|
var textWrapper = "text-wrapper-xsPXE";
|
|
23782
|
-
var css_248z$
|
|
23783
|
-
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);
|
|
23784
23760
|
|
|
23785
|
-
var wrapper$
|
|
23786
|
-
var container$
|
|
23787
|
-
var css_248z$
|
|
23788
|
-
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);
|
|
23789
23765
|
|
|
23790
23766
|
var ToolTipInfo = function ToolTipInfo(props) {
|
|
23791
23767
|
var _useTranslation = useTranslation(),
|
|
23792
23768
|
t = _useTranslation.t;
|
|
23793
23769
|
return /*#__PURE__*/jsx("div", {
|
|
23794
|
-
className: wrapper$
|
|
23770
|
+
className: wrapper$3,
|
|
23795
23771
|
children: /*#__PURE__*/jsx(Card, {
|
|
23796
23772
|
title: t('backoffice.tooltipinfo.useroverview'),
|
|
23797
23773
|
styles: {
|
|
@@ -23804,7 +23780,7 @@ var ToolTipInfo = function ToolTipInfo(props) {
|
|
|
23804
23780
|
width: 230
|
|
23805
23781
|
},
|
|
23806
23782
|
children: /*#__PURE__*/jsx("div", {
|
|
23807
|
-
className: container$
|
|
23783
|
+
className: container$4
|
|
23808
23784
|
})
|
|
23809
23785
|
})
|
|
23810
23786
|
});
|
|
@@ -23856,8 +23832,8 @@ var Grid = function Grid(_ref) {
|
|
|
23856
23832
|
});
|
|
23857
23833
|
};
|
|
23858
23834
|
|
|
23859
|
-
function ownKeys$
|
|
23860
|
-
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; }
|
|
23861
23837
|
var useMediaUpload = function useMediaUpload(_ref) {
|
|
23862
23838
|
var id = _ref.id;
|
|
23863
23839
|
var root = useStore();
|
|
@@ -23976,7 +23952,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
23976
23952
|
onRemove: onRemove,
|
|
23977
23953
|
customRequest: customRequest,
|
|
23978
23954
|
fileList: fileList.map(function (f) {
|
|
23979
|
-
return _objectSpread$
|
|
23955
|
+
return _objectSpread$v(_objectSpread$v({}, f), {}, {
|
|
23980
23956
|
url: f.url
|
|
23981
23957
|
});
|
|
23982
23958
|
}),
|
|
@@ -23988,8 +23964,8 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
23988
23964
|
var small = "small-NY1-k";
|
|
23989
23965
|
var medium = "medium---QcO";
|
|
23990
23966
|
var big = "big--E39S";
|
|
23991
|
-
var css_248z$
|
|
23992
|
-
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);
|
|
23993
23969
|
|
|
23994
23970
|
var MediaUpload = observer(function (_ref) {
|
|
23995
23971
|
var id = _ref.id;
|
|
@@ -24049,8 +24025,8 @@ var editableRow = "editable-row-9BEHi";
|
|
|
24049
24025
|
var checkbox = "checkbox-H7R-w";
|
|
24050
24026
|
var editableCellValueWrap = "editable-cell-value-wrap-ugTs4";
|
|
24051
24027
|
var contentWidth = "content-width-hGyVI";
|
|
24052
|
-
var css_248z$
|
|
24053
|
-
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);
|
|
24054
24030
|
|
|
24055
24031
|
function BooleanCell (_ref) {
|
|
24056
24032
|
var children = _ref.children,
|
|
@@ -24733,8 +24709,8 @@ function LinkCell (_ref) {
|
|
|
24733
24709
|
|
|
24734
24710
|
var _excluded$1 = ["index"],
|
|
24735
24711
|
_excluded2 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
24736
|
-
function ownKeys$
|
|
24737
|
-
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; }
|
|
24738
24714
|
var LOG$4 = getLogger('Backoffice', 'CellRenderer');
|
|
24739
24715
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
24740
24716
|
var CustomRow = function CustomRow(_ref) {
|
|
@@ -24748,7 +24724,7 @@ var CustomRow = function CustomRow(_ref) {
|
|
|
24748
24724
|
component: false,
|
|
24749
24725
|
children: /*#__PURE__*/jsx(EditableContext.Provider, {
|
|
24750
24726
|
value: form,
|
|
24751
|
-
children: /*#__PURE__*/jsx("tr", _objectSpread$
|
|
24727
|
+
children: /*#__PURE__*/jsx("tr", _objectSpread$u({}, props))
|
|
24752
24728
|
})
|
|
24753
24729
|
});
|
|
24754
24730
|
};
|
|
@@ -24801,7 +24777,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
24801
24777
|
if ((record === null || record === void 0 ? void 0 : record.ItemField) == 'LongDescription') {
|
|
24802
24778
|
longDescriptionType = 'text';
|
|
24803
24779
|
}
|
|
24804
|
-
var modifiedColumn = _objectSpread$
|
|
24780
|
+
var modifiedColumn = _objectSpread$u(_objectSpread$u({}, column), {}, {
|
|
24805
24781
|
type: longDescriptionType || (column === null || column === void 0 ? void 0 : column.type)
|
|
24806
24782
|
});
|
|
24807
24783
|
if (column) {
|
|
@@ -24814,40 +24790,40 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
24814
24790
|
};
|
|
24815
24791
|
switch (modifiedColumn.type) {
|
|
24816
24792
|
case 'boolean':
|
|
24817
|
-
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$
|
|
24793
|
+
childNode = /*#__PURE__*/jsx(BooleanCell, _objectSpread$u({}, cellProps));
|
|
24818
24794
|
break;
|
|
24819
24795
|
case 'text':
|
|
24820
|
-
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$
|
|
24796
|
+
childNode = /*#__PURE__*/jsx(TextCell, _objectSpread$u({}, cellProps));
|
|
24821
24797
|
break;
|
|
24822
24798
|
case 'select':
|
|
24823
|
-
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$
|
|
24799
|
+
childNode = /*#__PURE__*/jsx(DropdownCell, _objectSpread$u({}, cellProps));
|
|
24824
24800
|
case 'media':
|
|
24825
|
-
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$
|
|
24801
|
+
childNode = /*#__PURE__*/jsx(MediaViewerCell, _objectSpread$u({}, cellProps));
|
|
24826
24802
|
break;
|
|
24827
24803
|
case 'mediaItem':
|
|
24828
|
-
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$
|
|
24804
|
+
childNode = /*#__PURE__*/jsx(MediaItemViewerCell, _objectSpread$u({}, cellProps));
|
|
24829
24805
|
break;
|
|
24830
24806
|
case 'unixTimeStamp':
|
|
24831
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$
|
|
24807
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCell, _objectSpread$u({}, cellProps));
|
|
24832
24808
|
break;
|
|
24833
24809
|
case 'unixTimeStampCheck':
|
|
24834
|
-
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$
|
|
24810
|
+
childNode = /*#__PURE__*/jsx(UnixTimeStampCheckCell, _objectSpread$u({}, cellProps));
|
|
24835
24811
|
break;
|
|
24836
24812
|
case 'icon':
|
|
24837
|
-
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$
|
|
24813
|
+
childNode = /*#__PURE__*/jsx(IconCell, _objectSpread$u({}, cellProps));
|
|
24838
24814
|
break;
|
|
24839
24815
|
case 'progress':
|
|
24840
|
-
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$
|
|
24816
|
+
childNode = /*#__PURE__*/jsx(ProgressCell, _objectSpread$u({}, cellProps));
|
|
24841
24817
|
break;
|
|
24842
24818
|
case 'link':
|
|
24843
|
-
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$
|
|
24819
|
+
childNode = /*#__PURE__*/jsx(LinkCell, _objectSpread$u({}, cellProps));
|
|
24844
24820
|
break;
|
|
24845
24821
|
default:
|
|
24846
|
-
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$
|
|
24822
|
+
childNode = /*#__PURE__*/jsx(StringCell, _objectSpread$u({}, cellProps));
|
|
24847
24823
|
break;
|
|
24848
24824
|
}
|
|
24849
24825
|
}
|
|
24850
|
-
return /*#__PURE__*/jsx("td", _objectSpread$
|
|
24826
|
+
return /*#__PURE__*/jsx("td", _objectSpread$u(_objectSpread$u({}, restProps), {}, {
|
|
24851
24827
|
children: childNode
|
|
24852
24828
|
}));
|
|
24853
24829
|
};
|
|
@@ -25036,11 +25012,11 @@ function useAGHistogram (_ref) {
|
|
|
25036
25012
|
};
|
|
25037
25013
|
}
|
|
25038
25014
|
|
|
25039
|
-
var container$
|
|
25015
|
+
var container$3 = "container-2r-OJ";
|
|
25040
25016
|
var column1 = "column1-9viTK";
|
|
25041
25017
|
var spinner = "spinner-00VcK";
|
|
25042
|
-
var css_248z$
|
|
25043
|
-
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);
|
|
25044
25020
|
|
|
25045
25021
|
var Panel = Collapse.Panel;
|
|
25046
25022
|
function AGHistogram (_ref) {
|
|
@@ -25153,7 +25129,7 @@ function AGHistogram (_ref) {
|
|
|
25153
25129
|
children: /*#__PURE__*/jsx(Panel, {
|
|
25154
25130
|
header: headerText,
|
|
25155
25131
|
children: /*#__PURE__*/jsxs("div", {
|
|
25156
|
-
className: container$
|
|
25132
|
+
className: container$3,
|
|
25157
25133
|
children: [!loadingHistogram && /*#__PURE__*/jsx("div", {
|
|
25158
25134
|
className: classnames(column1, 'ag-theme-alpine'),
|
|
25159
25135
|
style: {
|
|
@@ -25199,8 +25175,8 @@ var SMChart = function SMChart(props) {
|
|
|
25199
25175
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
25200
25176
|
};
|
|
25201
25177
|
|
|
25202
|
-
function ownKeys$
|
|
25203
|
-
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; }
|
|
25204
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; } } }; }
|
|
25205
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; } }
|
|
25206
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; }
|
|
@@ -25395,7 +25371,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
25395
25371
|
// Convert to Dayjs
|
|
25396
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
|
|
25397
25373
|
]
|
|
25398
|
-
}), ((_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), {}, {
|
|
25399
25375
|
style: {
|
|
25400
25376
|
minWidth: '200px'
|
|
25401
25377
|
},
|
|
@@ -25500,7 +25476,7 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
25500
25476
|
},
|
|
25501
25477
|
dataSource: data,
|
|
25502
25478
|
loading: state.loading,
|
|
25503
|
-
pagination: _objectSpread$
|
|
25479
|
+
pagination: _objectSpread$t(_objectSpread$t({}, state.pagination), {}, {
|
|
25504
25480
|
showTotal: function showTotal(total, range) {
|
|
25505
25481
|
return "".concat(range[0], "-").concat(range[1], " of ").concat(total, " Elements");
|
|
25506
25482
|
},
|
|
@@ -25807,7 +25783,7 @@ function BulkAction(_ref6) {
|
|
|
25807
25783
|
}
|
|
25808
25784
|
_context4.t0 = data;
|
|
25809
25785
|
_context4.next = 11;
|
|
25810
|
-
return apiInterface.update(_objectSpread$
|
|
25786
|
+
return apiInterface.update(_objectSpread$t(_objectSpread$t({}, dataEntry), updatedData), dataEntry, action.apiCallbackMapping);
|
|
25811
25787
|
case 11:
|
|
25812
25788
|
_context4.t1 = _context4.sent;
|
|
25813
25789
|
_context4.t0.push.call(_context4.t0, _context4.t1);
|
|
@@ -25920,8 +25896,8 @@ function SelectionText(_ref8) {
|
|
|
25920
25896
|
});
|
|
25921
25897
|
}
|
|
25922
25898
|
|
|
25923
|
-
function ownKeys$
|
|
25924
|
-
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; }
|
|
25925
25901
|
function getColumnFilterProps (_ref) {
|
|
25926
25902
|
var filter = _ref.filter,
|
|
25927
25903
|
title = _ref.title;
|
|
@@ -26284,7 +26260,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
26284
26260
|
});
|
|
26285
26261
|
},
|
|
26286
26262
|
options: filter.map(function (f) {
|
|
26287
|
-
return _objectSpread$
|
|
26263
|
+
return _objectSpread$s(_objectSpread$s({}, f), {}, {
|
|
26288
26264
|
label: t(f.label)
|
|
26289
26265
|
});
|
|
26290
26266
|
})
|
|
@@ -26333,7 +26309,7 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
26333
26309
|
setDisplaySelectedvalues = _useState4[1];
|
|
26334
26310
|
var options = [];
|
|
26335
26311
|
options = filter.map(function (f) {
|
|
26336
|
-
return _objectSpread$
|
|
26312
|
+
return _objectSpread$s(_objectSpread$s({}, f), {}, {
|
|
26337
26313
|
label: t(f.label)
|
|
26338
26314
|
});
|
|
26339
26315
|
});
|
|
@@ -26407,8 +26383,8 @@ var multiSelectProps = function multiSelectProps(title, filter) {
|
|
|
26407
26383
|
};
|
|
26408
26384
|
};
|
|
26409
26385
|
|
|
26410
|
-
function ownKeys$
|
|
26411
|
-
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; }
|
|
26412
26388
|
function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilter) {
|
|
26413
26389
|
var columns = configuration.columns.filter(function (c) {
|
|
26414
26390
|
if (typeof c.hidden == 'boolean' && c.hidden) {
|
|
@@ -26461,7 +26437,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
|
|
|
26461
26437
|
}
|
|
26462
26438
|
function mapColumn(column, onUpdate) {
|
|
26463
26439
|
var _column$field, _column$children;
|
|
26464
|
-
return _objectSpread$
|
|
26440
|
+
return _objectSpread$r(_objectSpread$r(_objectSpread$r({}, column), {}, {
|
|
26465
26441
|
hidden: false,
|
|
26466
26442
|
width: column.width || 100,
|
|
26467
26443
|
dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
|
|
@@ -26511,8 +26487,8 @@ function updateData (_ref) {
|
|
|
26511
26487
|
};
|
|
26512
26488
|
}
|
|
26513
26489
|
|
|
26514
|
-
function ownKeys$
|
|
26515
|
-
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; }
|
|
26516
26492
|
function applyFilterAndSortation (_ref) {
|
|
26517
26493
|
var data = _ref.data,
|
|
26518
26494
|
filters = _ref.filters,
|
|
@@ -26527,7 +26503,7 @@ function applyFilterAndSortation (_ref) {
|
|
|
26527
26503
|
processedData = sort(sorter || [], processedData);
|
|
26528
26504
|
return {
|
|
26529
26505
|
data: processedData,
|
|
26530
|
-
pagination: _objectSpread$
|
|
26506
|
+
pagination: _objectSpread$q(_objectSpread$q({}, pagination), {}, {
|
|
26531
26507
|
total: processedData.length
|
|
26532
26508
|
})
|
|
26533
26509
|
};
|
|
@@ -26612,8 +26588,8 @@ function filter(f, data) {
|
|
|
26612
26588
|
}
|
|
26613
26589
|
|
|
26614
26590
|
var _excluded = ["_id"];
|
|
26615
|
-
function ownKeys$
|
|
26616
|
-
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; }
|
|
26617
26593
|
function useTableData$1 (_ref) {
|
|
26618
26594
|
var _configuration$apiInt;
|
|
26619
26595
|
var id = _ref.id;
|
|
@@ -26668,7 +26644,7 @@ function useTableData$1 (_ref) {
|
|
|
26668
26644
|
var _configuration$create;
|
|
26669
26645
|
if (!dataRow) return;
|
|
26670
26646
|
var id = v4();
|
|
26671
|
-
var processedDataRow = unflatten(_objectSpread$
|
|
26647
|
+
var processedDataRow = unflatten(_objectSpread$p({
|
|
26672
26648
|
_id: id,
|
|
26673
26649
|
ID: id
|
|
26674
26650
|
}, dataRow));
|
|
@@ -26680,11 +26656,11 @@ function useTableData$1 (_ref) {
|
|
|
26680
26656
|
newData = _updateData.data;
|
|
26681
26657
|
_updateData.prevDataRow;
|
|
26682
26658
|
_updateData.index;
|
|
26683
|
-
var newState = _objectSpread$
|
|
26659
|
+
var newState = _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26684
26660
|
data: newData
|
|
26685
26661
|
});
|
|
26686
26662
|
if (!filterServerSide) {
|
|
26687
|
-
var res = applyFilterAndSortation(_objectSpread$
|
|
26663
|
+
var res = applyFilterAndSortation(_objectSpread$p(_objectSpread$p({}, filterData), {}, {
|
|
26688
26664
|
data: newData
|
|
26689
26665
|
}));
|
|
26690
26666
|
newState.data = res.data;
|
|
@@ -26696,33 +26672,33 @@ function useTableData$1 (_ref) {
|
|
|
26696
26672
|
var formData = new FormData();
|
|
26697
26673
|
processedDataRow._id;
|
|
26698
26674
|
var value = _objectWithoutProperties(processedDataRow, _excluded);
|
|
26699
|
-
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), {}, {
|
|
26700
26676
|
filterContex: filterContex,
|
|
26701
26677
|
value: JSON.stringify([value])
|
|
26702
26678
|
}), formData, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (d) {
|
|
26703
26679
|
if (d && d.Result && d.Result == 'Success') return;
|
|
26704
|
-
setState(_objectSpread$
|
|
26680
|
+
setState(_objectSpread$p({}, oldState));
|
|
26705
26681
|
});
|
|
26706
26682
|
}, [state, catalogItem, filterData]);
|
|
26707
26683
|
useEffect(function () {
|
|
26708
26684
|
if (!catalogItem) return;
|
|
26709
|
-
setState(_objectSpread$
|
|
26685
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26710
26686
|
loading: true,
|
|
26711
|
-
mappingData: _objectSpread$
|
|
26687
|
+
mappingData: _objectSpread$p(_objectSpread$p({}, catalogItem), {}, {
|
|
26712
26688
|
filterContex: filterContex
|
|
26713
26689
|
})
|
|
26714
26690
|
}));
|
|
26715
26691
|
if (!filterServerSide) {
|
|
26716
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
26692
|
+
apiHandler.readList(configuration.mapping, _objectSpread$p(_objectSpread$p({}, catalogItem), {}, {
|
|
26717
26693
|
filterContex: filterContex
|
|
26718
26694
|
}), undefined, catalogItem.sessionGuid).then(function (data) {
|
|
26719
26695
|
var newData = data.data.map(function (d) {
|
|
26720
|
-
return _objectSpread$
|
|
26696
|
+
return _objectSpread$p(_objectSpread$p({}, d), {}, {
|
|
26721
26697
|
_id: d._id || d.ID || nanoid()
|
|
26722
26698
|
});
|
|
26723
26699
|
});
|
|
26724
26700
|
onChange({
|
|
26725
|
-
pagination: _objectSpread$
|
|
26701
|
+
pagination: _objectSpread$p({}, state.pagination),
|
|
26726
26702
|
filters: {},
|
|
26727
26703
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
26728
26704
|
return c.defaultSortOrder;
|
|
@@ -26738,7 +26714,7 @@ function useTableData$1 (_ref) {
|
|
|
26738
26714
|
});
|
|
26739
26715
|
} else {
|
|
26740
26716
|
onChange({
|
|
26741
|
-
pagination: _objectSpread$
|
|
26717
|
+
pagination: _objectSpread$p({}, state.pagination),
|
|
26742
26718
|
filters: {},
|
|
26743
26719
|
sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
|
|
26744
26720
|
return c.defaultSortOrder;
|
|
@@ -26754,17 +26730,17 @@ function useTableData$1 (_ref) {
|
|
|
26754
26730
|
}
|
|
26755
26731
|
}, [filterContex, catalogItem]);
|
|
26756
26732
|
var onChange = function onChange(p, dataParam) {
|
|
26757
|
-
setState(_objectSpread$
|
|
26733
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26758
26734
|
loading: true
|
|
26759
26735
|
}));
|
|
26760
26736
|
if (!filterServerSide) {
|
|
26761
26737
|
var unfilteredData = dataParam ? dataParam : state.unfilteredData;
|
|
26762
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
26738
|
+
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$p(_objectSpread$p({}, p), {}, {
|
|
26763
26739
|
data: unfilteredData
|
|
26764
26740
|
})),
|
|
26765
26741
|
data = _applyFilterAndSortat.data,
|
|
26766
26742
|
pagination = _applyFilterAndSortat.pagination;
|
|
26767
|
-
setState(_objectSpread$
|
|
26743
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26768
26744
|
data: data,
|
|
26769
26745
|
pagination: pagination,
|
|
26770
26746
|
loading: false,
|
|
@@ -26775,20 +26751,20 @@ function useTableData$1 (_ref) {
|
|
|
26775
26751
|
sorter: p.sorter
|
|
26776
26752
|
});
|
|
26777
26753
|
} else {
|
|
26778
|
-
apiHandler.readList(configuration.mapping, _objectSpread$
|
|
26754
|
+
apiHandler.readList(configuration.mapping, _objectSpread$p(_objectSpread$p({}, catalogItem), {}, {
|
|
26779
26755
|
filterContex: filterContex
|
|
26780
26756
|
}), p, catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid).then(function (data) {
|
|
26781
|
-
setState(_objectSpread$
|
|
26757
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26782
26758
|
data: data.data.map(function (dt) {
|
|
26783
|
-
return _objectSpread$
|
|
26759
|
+
return _objectSpread$p(_objectSpread$p({}, dt), {}, {
|
|
26784
26760
|
_id: dt._id || dt.ID || nanoid()
|
|
26785
26761
|
});
|
|
26786
26762
|
}),
|
|
26787
|
-
pagination: _objectSpread$
|
|
26763
|
+
pagination: _objectSpread$p(_objectSpread$p({}, p.pagination), {}, {
|
|
26788
26764
|
total: data.total
|
|
26789
26765
|
}),
|
|
26790
26766
|
loading: false,
|
|
26791
|
-
mappingData: _objectSpread$
|
|
26767
|
+
mappingData: _objectSpread$p(_objectSpread$p({}, catalogItem), {}, {
|
|
26792
26768
|
filterContex: filterContex
|
|
26793
26769
|
})
|
|
26794
26770
|
}));
|
|
@@ -26809,7 +26785,7 @@ function useTableData$1 (_ref) {
|
|
|
26809
26785
|
filters['_id'] = [id, 'eq', false];
|
|
26810
26786
|
_context.next = 4;
|
|
26811
26787
|
return apiHandler.readList(configuration.mapping, {
|
|
26812
|
-
pagination: _objectSpread$
|
|
26788
|
+
pagination: _objectSpread$p({}, state.pagination),
|
|
26813
26789
|
columns: configuration.columns,
|
|
26814
26790
|
filters: filters,
|
|
26815
26791
|
sorter: filterData.sorter
|
|
@@ -26828,7 +26804,7 @@ function useTableData$1 (_ref) {
|
|
|
26828
26804
|
};
|
|
26829
26805
|
}();
|
|
26830
26806
|
var onSelect = function onSelect(keys) {
|
|
26831
|
-
setState(_objectSpread$
|
|
26807
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26832
26808
|
selected: keys
|
|
26833
26809
|
}));
|
|
26834
26810
|
};
|
|
@@ -26838,7 +26814,7 @@ function useTableData$1 (_ref) {
|
|
|
26838
26814
|
return _regeneratorRuntime.wrap(function _callee2$(_context3) {
|
|
26839
26815
|
while (1) switch (_context3.prev = _context3.next) {
|
|
26840
26816
|
case 0:
|
|
26841
|
-
setState(_objectSpread$
|
|
26817
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26842
26818
|
deleting: true
|
|
26843
26819
|
}));
|
|
26844
26820
|
newData = _toConsumableArray(state.data);
|
|
@@ -26853,7 +26829,7 @@ function useTableData$1 (_ref) {
|
|
|
26853
26829
|
mappingData = (_newData$filter = newData.filter(function (nd) {
|
|
26854
26830
|
return nd._id === state.selected[index];
|
|
26855
26831
|
})) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
|
|
26856
|
-
mappingData = _objectSpread$
|
|
26832
|
+
mappingData = _objectSpread$p(_objectSpread$p({}, mappingData), state.mappingData);
|
|
26857
26833
|
_context2.next = 5;
|
|
26858
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);
|
|
26859
26835
|
case 5:
|
|
@@ -26903,7 +26879,7 @@ function useTableData$1 (_ref) {
|
|
|
26903
26879
|
}
|
|
26904
26880
|
_context3.next = 18;
|
|
26905
26881
|
return apiHandler.readList(configuration.mapping, {
|
|
26906
|
-
pagination: _objectSpread$
|
|
26882
|
+
pagination: _objectSpread$p(_objectSpread$p({}, state.pagination), {}, {
|
|
26907
26883
|
current: current
|
|
26908
26884
|
}),
|
|
26909
26885
|
columns: configuration.columns,
|
|
@@ -26915,11 +26891,11 @@ function useTableData$1 (_ref) {
|
|
|
26915
26891
|
newData = data.data;
|
|
26916
26892
|
total = data.total;
|
|
26917
26893
|
case 21:
|
|
26918
|
-
setState(_objectSpread$
|
|
26894
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26919
26895
|
selected: [],
|
|
26920
26896
|
deleting: false,
|
|
26921
26897
|
data: newData,
|
|
26922
|
-
pagination: _objectSpread$
|
|
26898
|
+
pagination: _objectSpread$p(_objectSpread$p({}, state.pagination), {}, {
|
|
26923
26899
|
current: current,
|
|
26924
26900
|
total: total
|
|
26925
26901
|
})
|
|
@@ -26935,12 +26911,12 @@ function useTableData$1 (_ref) {
|
|
|
26935
26911
|
};
|
|
26936
26912
|
}();
|
|
26937
26913
|
function setLoading() {
|
|
26938
|
-
setState(_objectSpread$
|
|
26914
|
+
setState(_objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26939
26915
|
loading: true
|
|
26940
26916
|
}));
|
|
26941
26917
|
}
|
|
26942
|
-
return _objectSpread$
|
|
26943
|
-
configuration: _objectSpread$
|
|
26918
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
26919
|
+
configuration: _objectSpread$p(_objectSpread$p({}, configuration), {}, {
|
|
26944
26920
|
title: undefined
|
|
26945
26921
|
}),
|
|
26946
26922
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate),
|
|
@@ -27052,8 +27028,8 @@ function objectHash (obj) {
|
|
|
27052
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; } } }; }
|
|
27053
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; } }
|
|
27054
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; }
|
|
27055
|
-
function ownKeys$
|
|
27056
|
-
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; }
|
|
27057
27033
|
var LOG$2 = getLogger('Backoffice', 'TableData');
|
|
27058
27034
|
function useTableData (_ref) {
|
|
27059
27035
|
var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
|
|
@@ -27111,7 +27087,7 @@ function useTableData (_ref) {
|
|
|
27111
27087
|
var _useState13 = useState({
|
|
27112
27088
|
loading: true,
|
|
27113
27089
|
deleting: false,
|
|
27114
|
-
pagination: _objectSpread$
|
|
27090
|
+
pagination: _objectSpread$o({
|
|
27115
27091
|
current: 1,
|
|
27116
27092
|
pageSize: 20,
|
|
27117
27093
|
total: 0,
|
|
@@ -27120,7 +27096,7 @@ function useTableData (_ref) {
|
|
|
27120
27096
|
selected: [],
|
|
27121
27097
|
canDelete: !!apiHandler.canDelete,
|
|
27122
27098
|
canSelect: !!apiHandler.canDelete || !!((_configuration$bulkAc = configuration.bulkActions) !== null && _configuration$bulkAc !== void 0 && _configuration$bulkAc.length),
|
|
27123
|
-
mappingData: _objectSpread$
|
|
27099
|
+
mappingData: _objectSpread$o(_objectSpread$o({}, parentData), {}, {
|
|
27124
27100
|
prefilter: {
|
|
27125
27101
|
select: globalFilter.select
|
|
27126
27102
|
}
|
|
@@ -27129,7 +27105,7 @@ function useTableData (_ref) {
|
|
|
27129
27105
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
27130
27106
|
state = _useState14[0],
|
|
27131
27107
|
setState = _useState14[1];
|
|
27132
|
-
var mapping = _objectSpread$
|
|
27108
|
+
var mapping = _objectSpread$o(_objectSpread$o({}, parentData), {}, {
|
|
27133
27109
|
catalogCodex: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.codex,
|
|
27134
27110
|
sessionGuID: catalogItem === null || catalogItem === void 0 ? void 0 : catalogItem.sessionGuid
|
|
27135
27111
|
});
|
|
@@ -27168,14 +27144,14 @@ function useTableData (_ref) {
|
|
|
27168
27144
|
}
|
|
27169
27145
|
var dataArray = Array.isArray(data) ? data : [data];
|
|
27170
27146
|
var newInitData = initData;
|
|
27171
|
-
var newState = _objectSpread$
|
|
27147
|
+
var newState = _objectSpread$o({}, state);
|
|
27172
27148
|
var selected = [];
|
|
27173
27149
|
if (configuration.deselectOnUpdate == false) {
|
|
27174
27150
|
selected = state.selected;
|
|
27175
27151
|
}
|
|
27176
27152
|
var pagination = undefined;
|
|
27177
27153
|
if (state.pagination.total !== state.data.length + dataArray.length) {
|
|
27178
|
-
pagination = _objectSpread$
|
|
27154
|
+
pagination = _objectSpread$o(_objectSpread$o({}, state.pagination), {}, {
|
|
27179
27155
|
total: state.data.length + dataArray.length
|
|
27180
27156
|
});
|
|
27181
27157
|
}
|
|
@@ -27192,7 +27168,7 @@ function useTableData (_ref) {
|
|
|
27192
27168
|
dataRow: dataRow
|
|
27193
27169
|
}),
|
|
27194
27170
|
_data = _updateData.data;
|
|
27195
|
-
newState = _objectSpread$
|
|
27171
|
+
newState = _objectSpread$o(_objectSpread$o({}, newState), {}, {
|
|
27196
27172
|
pagination: (_pagination = pagination) !== null && _pagination !== void 0 ? _pagination : newState.pagination,
|
|
27197
27173
|
data: _data,
|
|
27198
27174
|
selected: selected
|
|
@@ -27205,8 +27181,8 @@ function useTableData (_ref) {
|
|
|
27205
27181
|
dataRow: dataRow
|
|
27206
27182
|
}),
|
|
27207
27183
|
nextInitData = _updateData2.data;
|
|
27208
|
-
var _applyFilterAndSortat = applyFilterAndSortation(_objectSpread$
|
|
27209
|
-
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"])
|
|
27210
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 ? {
|
|
27211
27187
|
genericProps: globalFilter.toggle
|
|
27212
27188
|
} : undefined), {}, {
|
|
@@ -27216,7 +27192,7 @@ function useTableData (_ref) {
|
|
|
27216
27192
|
_data2 = _applyFilterAndSortat.data,
|
|
27217
27193
|
_pagination2 = _applyFilterAndSortat.pagination;
|
|
27218
27194
|
newInitData = nextInitData;
|
|
27219
|
-
newState = _objectSpread$
|
|
27195
|
+
newState = _objectSpread$o(_objectSpread$o({}, newState), {}, {
|
|
27220
27196
|
pagination: _pagination2,
|
|
27221
27197
|
data: _data2,
|
|
27222
27198
|
selected: selected
|
|
@@ -27226,8 +27202,8 @@ function useTableData (_ref) {
|
|
|
27226
27202
|
if (apiHandler.canCreate) {
|
|
27227
27203
|
apiCreate(data).then(function (res) {
|
|
27228
27204
|
if (!res || (res === null || res === void 0 ? void 0 : res.Error) !== undefined) {
|
|
27229
|
-
initData && setInitData(_objectSpread$
|
|
27230
|
-
setState(_objectSpread$
|
|
27205
|
+
initData && setInitData(_objectSpread$o({}, initData));
|
|
27206
|
+
setState(_objectSpread$o({}, state));
|
|
27231
27207
|
}
|
|
27232
27208
|
});
|
|
27233
27209
|
}
|
|
@@ -27240,7 +27216,7 @@ function useTableData (_ref) {
|
|
|
27240
27216
|
var triggerRefresh = function triggerRefresh() {
|
|
27241
27217
|
var _configuration$filter7;
|
|
27242
27218
|
setError(undefined);
|
|
27243
|
-
var newGlobalFilter = _objectSpread$
|
|
27219
|
+
var newGlobalFilter = _objectSpread$o({}, globalFilter);
|
|
27244
27220
|
//on refresh update default filter, since global value can change
|
|
27245
27221
|
if ((_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && _configuration$filter7["default"]) {
|
|
27246
27222
|
var _configuration$filter8;
|
|
@@ -27251,7 +27227,7 @@ function useTableData (_ref) {
|
|
|
27251
27227
|
newGlobalFilter["default"] = _defaultFilter;
|
|
27252
27228
|
setGlobaFilter(newGlobalFilter);
|
|
27253
27229
|
}
|
|
27254
|
-
onChange(_objectSpread$
|
|
27230
|
+
onChange(_objectSpread$o({
|
|
27255
27231
|
pagination: state.pagination
|
|
27256
27232
|
}, filterData), newGlobalFilter, true);
|
|
27257
27233
|
};
|
|
@@ -27269,7 +27245,7 @@ function useTableData (_ref) {
|
|
|
27269
27245
|
order: c.defaultSortOrder
|
|
27270
27246
|
};
|
|
27271
27247
|
});
|
|
27272
|
-
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$
|
|
27248
|
+
if (configuration.initialCall === false && !catalogItem) setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27273
27249
|
loading: false
|
|
27274
27250
|
}));else {
|
|
27275
27251
|
onChange({
|
|
@@ -27312,7 +27288,7 @@ function useTableData (_ref) {
|
|
|
27312
27288
|
case 0:
|
|
27313
27289
|
filters = {};
|
|
27314
27290
|
filters['_id'] = [id, 'eq', false];
|
|
27315
|
-
ssf = _objectSpread$
|
|
27291
|
+
ssf = _objectSpread$o({
|
|
27316
27292
|
pagination: {
|
|
27317
27293
|
current: 1,
|
|
27318
27294
|
pageSize: 1
|
|
@@ -27365,11 +27341,11 @@ function useTableData (_ref) {
|
|
|
27365
27341
|
prefilter = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : globalFilter;
|
|
27366
27342
|
refresh = _args3.length > 2 ? _args3[2] : undefined;
|
|
27367
27343
|
clearSelection = _args3.length > 3 ? _args3[3] : undefined;
|
|
27368
|
-
setState(_objectSpread$
|
|
27344
|
+
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27369
27345
|
loading: true
|
|
27370
27346
|
}));
|
|
27371
27347
|
currentData = initData;
|
|
27372
|
-
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
|
|
27373
27349
|
filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
|
|
27374
27350
|
var _ref7 = _slicedToArray(_ref6, 2);
|
|
27375
27351
|
_ref7[0];
|
|
@@ -27377,7 +27353,7 @@ function useTableData (_ref) {
|
|
|
27377
27353
|
return v != null;
|
|
27378
27354
|
}));
|
|
27379
27355
|
currentFilterHash = objectHash(filterData);
|
|
27380
|
-
currentPagination = _objectSpread$
|
|
27356
|
+
currentPagination = _objectSpread$o(_objectSpread$o({}, p.pagination), {}, {
|
|
27381
27357
|
current: currentFilterHash == filterHash.current ? p.pagination.current : 1
|
|
27382
27358
|
});
|
|
27383
27359
|
filterHash.current = currentFilterHash;
|
|
@@ -27385,7 +27361,7 @@ function useTableData (_ref) {
|
|
|
27385
27361
|
_context3.next = 20;
|
|
27386
27362
|
break;
|
|
27387
27363
|
}
|
|
27388
|
-
ssf = _objectSpread$
|
|
27364
|
+
ssf = _objectSpread$o({
|
|
27389
27365
|
pagination: currentPagination,
|
|
27390
27366
|
columns: configuration.columns,
|
|
27391
27367
|
filters: filterData,
|
|
@@ -27399,7 +27375,7 @@ function useTableData (_ref) {
|
|
|
27399
27375
|
data = _context3.sent;
|
|
27400
27376
|
currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
|
|
27401
27377
|
currentData = data.data;
|
|
27402
|
-
currentPagination = _objectSpread$
|
|
27378
|
+
currentPagination = _objectSpread$o(_objectSpread$o({}, currentPagination), {}, {
|
|
27403
27379
|
total: data.total
|
|
27404
27380
|
});
|
|
27405
27381
|
_context3.next = 29;
|
|
@@ -27416,7 +27392,7 @@ function useTableData (_ref) {
|
|
|
27416
27392
|
currentData = _data3.data;
|
|
27417
27393
|
setInitData(currentData);
|
|
27418
27394
|
case 26:
|
|
27419
|
-
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$
|
|
27395
|
+
_applyFilterAndSortat2 = applyFilterAndSortation(_objectSpread$o(_objectSpread$o({}, p), {}, {
|
|
27420
27396
|
pagination: currentPagination,
|
|
27421
27397
|
filters: filterData,
|
|
27422
27398
|
data: currentData,
|
|
@@ -27425,11 +27401,11 @@ function useTableData (_ref) {
|
|
|
27425
27401
|
currentData = _data4;
|
|
27426
27402
|
currentPagination = pagination;
|
|
27427
27403
|
case 29:
|
|
27428
|
-
setState(_objectSpread$
|
|
27404
|
+
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27429
27405
|
loading: false,
|
|
27430
27406
|
data: currentData,
|
|
27431
27407
|
pagination: currentPagination,
|
|
27432
|
-
mappingData: _objectSpread$
|
|
27408
|
+
mappingData: _objectSpread$o(_objectSpread$o({}, parentData), {}, {
|
|
27433
27409
|
prefilter: prefilter
|
|
27434
27410
|
}),
|
|
27435
27411
|
currentFetchUrl: currentUrl
|
|
@@ -27451,7 +27427,7 @@ function useTableData (_ref) {
|
|
|
27451
27427
|
};
|
|
27452
27428
|
}();
|
|
27453
27429
|
var onSelect = function onSelect(keys) {
|
|
27454
|
-
setState(_objectSpread$
|
|
27430
|
+
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27455
27431
|
selected: keys
|
|
27456
27432
|
}));
|
|
27457
27433
|
};
|
|
@@ -27462,7 +27438,7 @@ function useTableData (_ref) {
|
|
|
27462
27438
|
return _regeneratorRuntime.wrap(function _callee4$(_context5) {
|
|
27463
27439
|
while (1) switch (_context5.prev = _context5.next) {
|
|
27464
27440
|
case 0:
|
|
27465
|
-
setState(_objectSpread$
|
|
27441
|
+
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27466
27442
|
deleting: true
|
|
27467
27443
|
}));
|
|
27468
27444
|
newData = _toConsumableArray(state.data);
|
|
@@ -27502,7 +27478,7 @@ function useTableData (_ref) {
|
|
|
27502
27478
|
} finally {
|
|
27503
27479
|
_iterator.f();
|
|
27504
27480
|
}
|
|
27505
|
-
mappingData = _objectSpread$
|
|
27481
|
+
mappingData = _objectSpread$o(_objectSpread$o(_objectSpread$o({}, mappingData), state.mappingData), mapToggle);
|
|
27506
27482
|
deleteResult = undefined;
|
|
27507
27483
|
_context4.prev = 7;
|
|
27508
27484
|
if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
|
|
@@ -27592,12 +27568,12 @@ function useTableData (_ref) {
|
|
|
27592
27568
|
break;
|
|
27593
27569
|
}
|
|
27594
27570
|
_context5.next = 25;
|
|
27595
|
-
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$
|
|
27596
|
-
pagination: _objectSpread$
|
|
27571
|
+
return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$o({
|
|
27572
|
+
pagination: _objectSpread$o(_objectSpread$o({}, state.pagination), {}, {
|
|
27597
27573
|
current: current
|
|
27598
27574
|
}),
|
|
27599
27575
|
columns: configuration.columns,
|
|
27600
|
-
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"]),
|
|
27601
27577
|
sorter: filterData.sorter
|
|
27602
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 ? {
|
|
27603
27579
|
genericProps: globalFilter.toggle
|
|
@@ -27608,11 +27584,11 @@ function useTableData (_ref) {
|
|
|
27608
27584
|
total = data.total;
|
|
27609
27585
|
case 28:
|
|
27610
27586
|
setInitData(newInitData);
|
|
27611
|
-
setState(_objectSpread$
|
|
27587
|
+
setState(_objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27612
27588
|
selected: [],
|
|
27613
27589
|
deleting: false,
|
|
27614
27590
|
data: newData,
|
|
27615
|
-
pagination: _objectSpread$
|
|
27591
|
+
pagination: _objectSpread$o(_objectSpread$o({}, state.pagination), {}, {
|
|
27616
27592
|
current: current === 0 ? 1 : current,
|
|
27617
27593
|
total: total
|
|
27618
27594
|
})
|
|
@@ -27633,14 +27609,14 @@ function useTableData (_ref) {
|
|
|
27633
27609
|
LOG$2.error(new DivaError('No global select filter defiend'));
|
|
27634
27610
|
return;
|
|
27635
27611
|
}
|
|
27636
|
-
var newGlobalFilter = _objectSpread$
|
|
27612
|
+
var newGlobalFilter = _objectSpread$o({}, globalFilter);
|
|
27637
27613
|
if (value !== null && value !== void 0 && value.length) {
|
|
27638
27614
|
newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
|
|
27639
27615
|
} else {
|
|
27640
27616
|
newGlobalFilter.select = {};
|
|
27641
27617
|
}
|
|
27642
27618
|
setGlobaFilter(newGlobalFilter);
|
|
27643
|
-
onChange(_objectSpread$
|
|
27619
|
+
onChange(_objectSpread$o({
|
|
27644
27620
|
pagination: state.pagination
|
|
27645
27621
|
}, filterData), newGlobalFilter);
|
|
27646
27622
|
};
|
|
@@ -27654,11 +27630,11 @@ function useTableData (_ref) {
|
|
|
27654
27630
|
configuration.filter.toggle.fields.forEach(function (f) {
|
|
27655
27631
|
return toggleFilter[f] = [configuration.filter.toggle.globalValue ? root.getGlobalValue(configuration.filter.toggle.globalValue) : true, 'eq', !configuration.filter.toggle.isAnd];
|
|
27656
27632
|
});
|
|
27657
|
-
var newGlobalFilter = _objectSpread$
|
|
27633
|
+
var newGlobalFilter = _objectSpread$o(_objectSpread$o({}, globalFilter), {}, {
|
|
27658
27634
|
toggle: globalFilter.toggle ? undefined : toggleFilter
|
|
27659
27635
|
});
|
|
27660
27636
|
setGlobaFilter(newGlobalFilter);
|
|
27661
|
-
onChange(_objectSpread$
|
|
27637
|
+
onChange(_objectSpread$o({
|
|
27662
27638
|
pagination: state.pagination
|
|
27663
27639
|
}, filterData), newGlobalFilter, undefined, true);
|
|
27664
27640
|
};
|
|
@@ -27671,7 +27647,7 @@ function useTableData (_ref) {
|
|
|
27671
27647
|
LOG$2.error(new DivaError('No global search filter defiend'));
|
|
27672
27648
|
return;
|
|
27673
27649
|
}
|
|
27674
|
-
var newGlobalFilter = _objectSpread$
|
|
27650
|
+
var newGlobalFilter = _objectSpread$o(_objectSpread$o({}, globalFilter), {}, {
|
|
27675
27651
|
search: {}
|
|
27676
27652
|
});
|
|
27677
27653
|
if (value) {
|
|
@@ -27685,7 +27661,7 @@ function useTableData (_ref) {
|
|
|
27685
27661
|
});
|
|
27686
27662
|
}
|
|
27687
27663
|
setGlobaFilter(newGlobalFilter);
|
|
27688
|
-
onChange(_objectSpread$
|
|
27664
|
+
onChange(_objectSpread$o({
|
|
27689
27665
|
pagination: state.pagination
|
|
27690
27666
|
}, filterData), newGlobalFilter);
|
|
27691
27667
|
};
|
|
@@ -27695,17 +27671,17 @@ function useTableData (_ref) {
|
|
|
27695
27671
|
LOG$2.error(new DivaError('No global period filter defiend'));
|
|
27696
27672
|
return;
|
|
27697
27673
|
}
|
|
27698
|
-
var newGlobalFilter = _objectSpread$
|
|
27674
|
+
var newGlobalFilter = _objectSpread$o({}, globalFilter);
|
|
27699
27675
|
newGlobalFilter.timeStamp = {
|
|
27700
27676
|
fromTimeStamp: [from],
|
|
27701
27677
|
toTimeStamp: [to]
|
|
27702
27678
|
};
|
|
27703
27679
|
setGlobaFilter(newGlobalFilter);
|
|
27704
|
-
onChange(_objectSpread$
|
|
27680
|
+
onChange(_objectSpread$o({
|
|
27705
27681
|
pagination: state.pagination
|
|
27706
27682
|
}, filterData), newGlobalFilter);
|
|
27707
27683
|
};
|
|
27708
|
-
return _objectSpread$
|
|
27684
|
+
return _objectSpread$o(_objectSpread$o({}, state), {}, {
|
|
27709
27685
|
title: title,
|
|
27710
27686
|
configuration: configuration,
|
|
27711
27687
|
columns: mapColumns(configuration, root.actions.userHasPermission, onUpdate, selectedData, globalFilter),
|
|
@@ -27747,8 +27723,8 @@ function StandardTable (_ref) {
|
|
|
27747
27723
|
});
|
|
27748
27724
|
}
|
|
27749
27725
|
|
|
27750
|
-
function ownKeys$
|
|
27751
|
-
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; }
|
|
27752
27728
|
function Table (props) {
|
|
27753
27729
|
var root = useStore();
|
|
27754
27730
|
var variant = useMemo(function () {
|
|
@@ -27756,15 +27732,15 @@ function Table (props) {
|
|
|
27756
27732
|
return config.variant;
|
|
27757
27733
|
}, [props.id]);
|
|
27758
27734
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
27759
|
-
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))]
|
|
27760
27736
|
});
|
|
27761
27737
|
}
|
|
27762
27738
|
|
|
27763
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; } } }; }
|
|
27764
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; } }
|
|
27765
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; }
|
|
27766
|
-
function ownKeys$
|
|
27767
|
-
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; }
|
|
27768
27744
|
function useAGGrid (_ref) {
|
|
27769
27745
|
var id = _ref.id,
|
|
27770
27746
|
filter = _ref.filter,
|
|
@@ -27858,7 +27834,7 @@ function useAGGrid (_ref) {
|
|
|
27858
27834
|
value = _ref3[1];
|
|
27859
27835
|
if (_idx == 0) {
|
|
27860
27836
|
var _supplierData$Options2, _supplierData$Options3, _supplierData$Optionv2, _supplierData$Optionv3;
|
|
27861
|
-
rdat.push(_objectSpread$
|
|
27837
|
+
rdat.push(_objectSpread$m(_objectSpread$m({}, rd), {}, {
|
|
27862
27838
|
grouping: [idx.toString()]
|
|
27863
27839
|
}));
|
|
27864
27840
|
var sp = key.split(':');
|
|
@@ -27998,11 +27974,11 @@ var loader = "loader-LaXZy";
|
|
|
27998
27974
|
var flex = "flex-yQdda";
|
|
27999
27975
|
var bar = "bar-Y663f";
|
|
28000
27976
|
var value = "value-FCA-6";
|
|
28001
|
-
var css_248z$
|
|
28002
|
-
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);
|
|
28003
27979
|
|
|
28004
|
-
function ownKeys$
|
|
28005
|
-
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; }
|
|
28006
27982
|
var AGChart = function AGChart(_ref) {
|
|
28007
27983
|
var data = _ref.data;
|
|
28008
27984
|
var groupedData = [];
|
|
@@ -28010,11 +27986,11 @@ var AGChart = function AGChart(_ref) {
|
|
|
28010
27986
|
data.forEach(function (dt) {
|
|
28011
27987
|
if (dt.count == 0) return;
|
|
28012
27988
|
if (groupedData.length > dt.grouping[0]) {
|
|
28013
|
-
groupedData[dt.grouping[0]].push(_objectSpread$
|
|
27989
|
+
groupedData[dt.grouping[0]].push(_objectSpread$l(_objectSpread$l({}, dt), {}, {
|
|
28014
27990
|
count: Number(dt.count)
|
|
28015
27991
|
}));
|
|
28016
27992
|
} else {
|
|
28017
|
-
groupedData.push([_objectSpread$
|
|
27993
|
+
groupedData.push([_objectSpread$l(_objectSpread$l({}, dt), {}, {
|
|
28018
27994
|
count: Number(dt.count)
|
|
28019
27995
|
})]);
|
|
28020
27996
|
}
|
|
@@ -28055,8 +28031,8 @@ var AGChart = function AGChart(_ref) {
|
|
|
28055
28031
|
});
|
|
28056
28032
|
};
|
|
28057
28033
|
|
|
28058
|
-
function ownKeys$
|
|
28059
|
-
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; }
|
|
28060
28036
|
var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
28061
28037
|
var id = _ref.id,
|
|
28062
28038
|
filter = _ref.filter,
|
|
@@ -28149,7 +28125,7 @@ var AGGrid = /*#__PURE__*/memo(function (_ref) {
|
|
|
28149
28125
|
});
|
|
28150
28126
|
});
|
|
28151
28127
|
}
|
|
28152
|
-
return _objectSpread$
|
|
28128
|
+
return _objectSpread$k(_objectSpread$k({}, column), {}, {
|
|
28153
28129
|
cellRenderer: renderer
|
|
28154
28130
|
});
|
|
28155
28131
|
});
|
|
@@ -28419,8 +28395,8 @@ var CustomText = function CustomText(_ref) {
|
|
|
28419
28395
|
};
|
|
28420
28396
|
var CustomText$1 = observer(CustomText);
|
|
28421
28397
|
|
|
28422
|
-
function ownKeys$
|
|
28423
|
-
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; }
|
|
28424
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; } } }; }
|
|
28425
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; } }
|
|
28426
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; }
|
|
@@ -28483,7 +28459,7 @@ function useFilterBoxData (id) {
|
|
|
28483
28459
|
} finally {
|
|
28484
28460
|
_iterator.f();
|
|
28485
28461
|
}
|
|
28486
|
-
return _objectSpread$
|
|
28462
|
+
return _objectSpread$j(_objectSpread$j({}, state), ob);
|
|
28487
28463
|
}
|
|
28488
28464
|
return {
|
|
28489
28465
|
configuration: configuration,
|
|
@@ -28497,8 +28473,8 @@ function useFilterBoxData (id) {
|
|
|
28497
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; } } }; }
|
|
28498
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; } }
|
|
28499
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; }
|
|
28500
|
-
function ownKeys$
|
|
28501
|
-
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; }
|
|
28502
28478
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
28503
28479
|
var id = _ref.id,
|
|
28504
28480
|
onChangeFilter = _ref.onChangeFilter,
|
|
@@ -28526,7 +28502,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
28526
28502
|
}), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
|
|
28527
28503
|
mode: "single",
|
|
28528
28504
|
apiInterface: filter.requestOptions,
|
|
28529
|
-
wholeData: _objectSpread$
|
|
28505
|
+
wholeData: _objectSpread$i(_objectSpread$i({}, state.filter), {}, {
|
|
28530
28506
|
tab: tab
|
|
28531
28507
|
}),
|
|
28532
28508
|
mapping: filter.requestMapping,
|
|
@@ -28758,8 +28734,8 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
28758
28734
|
return false;
|
|
28759
28735
|
});
|
|
28760
28736
|
|
|
28761
|
-
function ownKeys$
|
|
28762
|
-
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; }
|
|
28763
28739
|
function useUIBuilderData (id) {
|
|
28764
28740
|
var save = undefined;
|
|
28765
28741
|
var root = useStore();
|
|
@@ -28791,7 +28767,7 @@ function useUIBuilderData (id) {
|
|
|
28791
28767
|
var configuration = _useMemo.configuration;
|
|
28792
28768
|
useEffect(function () {
|
|
28793
28769
|
root.dataStore.getApi2SessionGuid().then(function (res) {
|
|
28794
|
-
return setFilter(_objectSpread$
|
|
28770
|
+
return setFilter(_objectSpread$h(_objectSpread$h({}, filter), {}, {
|
|
28795
28771
|
sessionGuid: res
|
|
28796
28772
|
}));
|
|
28797
28773
|
});
|
|
@@ -28814,8 +28790,8 @@ function useUIBuilderData (id) {
|
|
|
28814
28790
|
};
|
|
28815
28791
|
}
|
|
28816
28792
|
|
|
28817
|
-
function ownKeys$
|
|
28818
|
-
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; }
|
|
28819
28795
|
function UIBuilder(_ref) {
|
|
28820
28796
|
var id = _ref.id;
|
|
28821
28797
|
var state = useUIBuilderData(id);
|
|
@@ -28842,7 +28818,7 @@ function UIBuilder(_ref) {
|
|
|
28842
28818
|
override = {
|
|
28843
28819
|
value: newFilter[item.field],
|
|
28844
28820
|
setValue: function setValue(newVal) {
|
|
28845
|
-
var newFilter = _objectSpread$
|
|
28821
|
+
var newFilter = _objectSpread$g({}, state.filter);
|
|
28846
28822
|
newFilter[item.field] = newVal;
|
|
28847
28823
|
state.setFilter(newFilter);
|
|
28848
28824
|
}
|
|
@@ -28890,7 +28866,7 @@ function UIBuilder(_ref) {
|
|
|
28890
28866
|
case 'AGGrid':
|
|
28891
28867
|
return /*#__PURE__*/jsx(AGGrid, {
|
|
28892
28868
|
id: item.id,
|
|
28893
|
-
filter: _objectSpread$
|
|
28869
|
+
filter: _objectSpread$g({
|
|
28894
28870
|
optionCodices: JSON.stringify(state.data)
|
|
28895
28871
|
}, state.filter),
|
|
28896
28872
|
override: item.id == 'AGGridTopOptionValues' ? {
|
|
@@ -28944,8 +28920,8 @@ var retailerChild = "retailer-child-5ll0K";
|
|
|
28944
28920
|
var supplier = "supplier-8sm0I";
|
|
28945
28921
|
var dealer = "dealer-xgnku";
|
|
28946
28922
|
var association = "association-b8uVW";
|
|
28947
|
-
var css_248z$
|
|
28948
|
-
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);
|
|
28949
28925
|
|
|
28950
28926
|
function getColorClass(data) {
|
|
28951
28927
|
switch (data.type) {
|
|
@@ -29050,8 +29026,8 @@ var OrgItem = function OrgItem(_ref) {
|
|
|
29050
29026
|
};
|
|
29051
29027
|
var OrgItem$1 = observer(OrgItem);
|
|
29052
29028
|
|
|
29053
|
-
function ownKeys$
|
|
29054
|
-
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; }
|
|
29055
29031
|
function useTransformJson (_ref) {
|
|
29056
29032
|
var id = _ref.id;
|
|
29057
29033
|
var _useState = useState(),
|
|
@@ -29117,7 +29093,7 @@ function useTransformJson (_ref) {
|
|
|
29117
29093
|
}();
|
|
29118
29094
|
var _transformData = function transformData(data, itemChain, parentOrgId) {
|
|
29119
29095
|
var _data$children;
|
|
29120
|
-
return _objectSpread$
|
|
29096
|
+
return _objectSpread$f(_objectSpread$f({}, data), {}, {
|
|
29121
29097
|
label: /*#__PURE__*/jsx(OrgItem$1, {
|
|
29122
29098
|
data: data,
|
|
29123
29099
|
configuration: configuration,
|
|
@@ -29177,9 +29153,9 @@ var arrow = "arrow-Rd0hp";
|
|
|
29177
29153
|
var openClass = "open-class--gGXs";
|
|
29178
29154
|
var breadcrumb = "breadcrumb-Z0VvH";
|
|
29179
29155
|
var selected = "selected-w-sfW";
|
|
29180
|
-
var disabled$
|
|
29181
|
-
var css_248z$
|
|
29182
|
-
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);
|
|
29183
29159
|
|
|
29184
29160
|
var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
|
|
29185
29161
|
var open = _ref.open,
|
|
@@ -29202,7 +29178,7 @@ var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
|
|
|
29202
29178
|
var _root$dataStore;
|
|
29203
29179
|
return root === null || root === void 0 || (_root$dataStore = root.dataStore) === null || _root$dataStore === void 0 ? void 0 : _root$dataStore.setSelectedOrganizationId(data.id);
|
|
29204
29180
|
},
|
|
29205
|
-
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)
|
|
29206
29182
|
};
|
|
29207
29183
|
})
|
|
29208
29184
|
})
|
|
@@ -29212,8 +29188,8 @@ var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
|
|
|
29212
29188
|
|
|
29213
29189
|
var collapsibleInner = "collapsible-inner-rI8kI";
|
|
29214
29190
|
var toolbarLeft = "toolbar-left-X9WRo";
|
|
29215
|
-
var css_248z$
|
|
29216
|
-
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);
|
|
29217
29193
|
|
|
29218
29194
|
var Legend = function Legend(props) {
|
|
29219
29195
|
return /*#__PURE__*/jsx(List$1, {
|
|
@@ -29267,8 +29243,8 @@ var Legend = function Legend(props) {
|
|
|
29267
29243
|
var buttonsWrapper = "buttons-wrapper-Bubkr";
|
|
29268
29244
|
var mask = "mask-ssagp";
|
|
29269
29245
|
var transformWrapper = "transform-wrapper--8t0v";
|
|
29270
|
-
var css_248z$
|
|
29271
|
-
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);
|
|
29272
29248
|
|
|
29273
29249
|
var ZoomWrapper = function ZoomWrapper(_ref) {
|
|
29274
29250
|
var _children = _ref.children,
|
|
@@ -29778,8 +29754,8 @@ function useCatalogEditor (id) {
|
|
|
29778
29754
|
};
|
|
29779
29755
|
}
|
|
29780
29756
|
|
|
29781
|
-
function ownKeys$
|
|
29782
|
-
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; }
|
|
29783
29759
|
function DragDropUpload(_ref) {
|
|
29784
29760
|
var api2Params = _ref.api2Params,
|
|
29785
29761
|
catalogId = _ref.catalogId,
|
|
@@ -29884,7 +29860,7 @@ function DragDropUpload(_ref) {
|
|
|
29884
29860
|
children: [importStarted && /*#__PURE__*/jsx("p", {
|
|
29885
29861
|
children: t('backoffice.catalogeditor.classimportstarted')
|
|
29886
29862
|
}), !importStarted && /*#__PURE__*/jsxs(Fragment, {
|
|
29887
|
-
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$
|
|
29863
|
+
children: [/*#__PURE__*/jsxs(Dragger, _objectSpread$e(_objectSpread$e({}, props), {}, {
|
|
29888
29864
|
children: [/*#__PURE__*/jsx("p", {
|
|
29889
29865
|
className: "ant-upload-drag-icon",
|
|
29890
29866
|
children: /*#__PURE__*/jsx(InboxOutlined, {})
|
|
@@ -30101,12 +30077,12 @@ function CatalogEditor(_ref) {
|
|
|
30101
30077
|
}
|
|
30102
30078
|
var CatalogEditor$1 = observer(CatalogEditor);
|
|
30103
30079
|
|
|
30104
|
-
function ownKeys$
|
|
30105
|
-
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; }
|
|
30106
30082
|
var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(props, ref) {
|
|
30107
30083
|
var _root$contentStore$bo, _root$contentStore$ri;
|
|
30108
30084
|
var root = useStore();
|
|
30109
|
-
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$
|
|
30085
|
+
return /*#__PURE__*/jsx(Spreadsheet$1, _objectSpread$d(_objectSpread$d({}, props), {}, {
|
|
30110
30086
|
ref: ref,
|
|
30111
30087
|
darkMode: root.contentStore.theme == 'darkmode',
|
|
30112
30088
|
jwt: root.dataStore.jwt,
|
|
@@ -30118,15 +30094,15 @@ var SpreadsheetWrapper = /*#__PURE__*/forwardRef(function SpreadsheetWrapper(pro
|
|
|
30118
30094
|
var Spreadsheet = observer(SpreadsheetWrapper);
|
|
30119
30095
|
|
|
30120
30096
|
function PackageSelector(_ref) {
|
|
30121
|
-
var
|
|
30097
|
+
var organizationId = _ref.organizationId,
|
|
30098
|
+
selectedPackage = _ref.selectedPackage,
|
|
30122
30099
|
setSelectedPackage = _ref.setSelectedPackage,
|
|
30123
|
-
enricherService = _ref.enricherService
|
|
30124
|
-
organizationId = _ref.organizationId;
|
|
30100
|
+
enricherService = _ref.enricherService;
|
|
30125
30101
|
var _useTranslation = useTranslation(),
|
|
30126
30102
|
t = _useTranslation.t;
|
|
30127
30103
|
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
30128
30104
|
apiInterface: {
|
|
30129
|
-
read: enricherService + "/packages?filter=organizationId==\"".concat(organizationId, "\"
|
|
30105
|
+
read: enricherService + "/packages?fields=name;_id&filter=organizationId==\"".concat(organizationId, "\"")
|
|
30130
30106
|
},
|
|
30131
30107
|
apiMapping: {
|
|
30132
30108
|
type: 'query',
|
|
@@ -30139,7 +30115,7 @@ function PackageSelector(_ref) {
|
|
|
30139
30115
|
label: '${name}',
|
|
30140
30116
|
value: '${_id}'
|
|
30141
30117
|
},
|
|
30142
|
-
title: t('backoffice.
|
|
30118
|
+
title: t('backoffice.menu.items.label.IDMEnricherEditorTablePackages'),
|
|
30143
30119
|
value: {
|
|
30144
30120
|
_id: selectedPackage
|
|
30145
30121
|
},
|
|
@@ -30355,7 +30331,7 @@ function useModule$1 (currentModules) {
|
|
|
30355
30331
|
icon: /*#__PURE__*/jsx(ApartmentOutlined, {}),
|
|
30356
30332
|
label: /*#__PURE__*/jsx(Link, {
|
|
30357
30333
|
to: 'catalogs/idmeditor/packages/' + packageId + '/partlistpos' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
30358
|
-
children: t('backoffice.menu.
|
|
30334
|
+
children: t('backoffice.menu.items.label.IDMEnricherEditorTablePartlistPos')
|
|
30359
30335
|
})
|
|
30360
30336
|
}, {
|
|
30361
30337
|
key: 'groups',
|
|
@@ -30367,6 +30343,16 @@ function useModule$1 (currentModules) {
|
|
|
30367
30343
|
to: 'catalogs/idmeditor/packages/' + packageId + '/groups' + (searchParams ? '?' + searchParams.toString() : ''),
|
|
30368
30344
|
children: t('backoffice.menu.items.label.IDMEnricherEditorTableGroups')
|
|
30369
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
|
+
})
|
|
30370
30356
|
}];
|
|
30371
30357
|
}, [packageId]);
|
|
30372
30358
|
if (!packageId) throw new Error('packageId is required');
|
|
@@ -31511,6 +31497,67 @@ var config$1 = {
|
|
|
31511
31497
|
}]
|
|
31512
31498
|
};
|
|
31513
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
|
+
|
|
31514
31561
|
function useConfiguration (configuration) {
|
|
31515
31562
|
var _useState = useState([]),
|
|
31516
31563
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -31551,59 +31598,6 @@ function useConfiguration (configuration) {
|
|
|
31551
31598
|
};
|
|
31552
31599
|
}
|
|
31553
31600
|
|
|
31554
|
-
function PrefilterSelector (_ref) {
|
|
31555
|
-
var type = _ref.type,
|
|
31556
|
-
packageId = _ref.packageId,
|
|
31557
|
-
selectedSerie = _ref.selectedSerie,
|
|
31558
|
-
setSelectedSerie = _ref.setSelectedSerie,
|
|
31559
|
-
selectedFeature = _ref.selectedFeature,
|
|
31560
|
-
setSelectedFeature = _ref.setSelectedFeature,
|
|
31561
|
-
enricherService = _ref.enricherService,
|
|
31562
|
-
dataSet = _ref.dataSet;
|
|
31563
|
-
var _useTranslation = useTranslation(),
|
|
31564
|
-
t = _useTranslation.t,
|
|
31565
|
-
i18n = _useTranslation.i18n;
|
|
31566
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
31567
|
-
children: [type === 'item' && /*#__PURE__*/jsx(SimpleSelect, {
|
|
31568
|
-
apiInterface: {
|
|
31569
|
-
read: enricherService + '/packages/' + packageId + '/' + dataSet + "/series?fields=seriesName[".concat(i18n.language.toLocaleUpperCase(), "];_id")
|
|
31570
|
-
},
|
|
31571
|
-
selectMapping: {
|
|
31572
|
-
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
|
31573
|
-
value: '${_id}'
|
|
31574
|
-
},
|
|
31575
|
-
autoSelectFirst: true,
|
|
31576
|
-
title: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingSerie'),
|
|
31577
|
-
value: selectedSerie,
|
|
31578
|
-
onChange: function onChange(value) {
|
|
31579
|
-
return setSelectedSerie(value);
|
|
31580
|
-
},
|
|
31581
|
-
search: true,
|
|
31582
|
-
style: {
|
|
31583
|
-
width: 200
|
|
31584
|
-
}
|
|
31585
|
-
}), type === 'option' && /*#__PURE__*/jsx(SimpleSelect, {
|
|
31586
|
-
apiInterface: {
|
|
31587
|
-
read: enricherService + '/packages/' + packageId + '/' + dataSet + "/features?fields=featureText[".concat(i18n.language.toLocaleUpperCase(), "];featureNo;_id")
|
|
31588
|
-
},
|
|
31589
|
-
selectMapping: {
|
|
31590
|
-
label: "${featureText.".concat(i18n.language.toLocaleUpperCase(), "} (${featureNo})"),
|
|
31591
|
-
value: '${_id}'
|
|
31592
|
-
},
|
|
31593
|
-
autoSelectFirst: true,
|
|
31594
|
-
title: t('backoffice.menu.items.label.IDMEnricherEditorTableRenamingFeature'),
|
|
31595
|
-
value: selectedFeature,
|
|
31596
|
-
onChange: function onChange(value) {
|
|
31597
|
-
return setSelectedFeature(value);
|
|
31598
|
-
},
|
|
31599
|
-
search: true,
|
|
31600
|
-
style: {
|
|
31601
|
-
width: 200
|
|
31602
|
-
}
|
|
31603
|
-
})]
|
|
31604
|
-
});
|
|
31605
|
-
}
|
|
31606
|
-
|
|
31607
31601
|
var RenamingFeature = function RenamingFeature() {
|
|
31608
31602
|
return /*#__PURE__*/jsx(RenamingTable, {
|
|
31609
31603
|
type: "features",
|
|
@@ -31709,11 +31703,14 @@ var RenamingTable = function RenamingTable(_ref) {
|
|
|
31709
31703
|
return updateNavigation(id);
|
|
31710
31704
|
},
|
|
31711
31705
|
enricherService: apiConfig.enricherService
|
|
31712
|
-
}), /*#__PURE__*/jsx(
|
|
31713
|
-
type: type == 'items' ? 'item' : type == 'options' ? 'option' : type,
|
|
31706
|
+
}), type === 'items' && /*#__PURE__*/jsx(SeriesSelector$1, {
|
|
31714
31707
|
packageId: packageId,
|
|
31715
31708
|
selectedSerie: selectedSerie,
|
|
31716
31709
|
setSelectedSerie: setSelectedSerie,
|
|
31710
|
+
enricherService: apiConfig.enricherService,
|
|
31711
|
+
dataSet: 'lookup'
|
|
31712
|
+
}), type === 'options' && /*#__PURE__*/jsx(FeatureSelector$1, {
|
|
31713
|
+
packageId: packageId,
|
|
31717
31714
|
selectedFeature: selectedFeature,
|
|
31718
31715
|
setSelectedFeature: setSelectedFeature,
|
|
31719
31716
|
enricherService: apiConfig.enricherService,
|
|
@@ -32194,12 +32191,14 @@ var ExclusivityTable = function ExclusivityTable(_ref) {
|
|
|
32194
32191
|
return updateNavigation(id);
|
|
32195
32192
|
},
|
|
32196
32193
|
enricherService: apiConfig.enricherService
|
|
32197
|
-
}), /*#__PURE__*/jsx(
|
|
32198
|
-
type: type.slice(1) //remove the first character 'e' from the type
|
|
32199
|
-
,
|
|
32194
|
+
}), type === 'eitem' && /*#__PURE__*/jsx(SeriesSelector$1, {
|
|
32200
32195
|
packageId: packageId,
|
|
32201
32196
|
selectedSerie: selectedSerie,
|
|
32202
32197
|
setSelectedSerie: setSelectedSerie,
|
|
32198
|
+
enricherService: apiConfig.enricherService,
|
|
32199
|
+
dataSet: 'exclusivities'
|
|
32200
|
+
}), type === 'eoption' && /*#__PURE__*/jsx(FeatureSelector$1, {
|
|
32201
|
+
packageId: packageId,
|
|
32203
32202
|
selectedFeature: selectedFeature,
|
|
32204
32203
|
setSelectedFeature: setSelectedFeature,
|
|
32205
32204
|
enricherService: apiConfig.enricherService,
|
|
@@ -32313,241 +32312,1338 @@ function TableTabGroups () {
|
|
|
32313
32312
|
field: '_id',
|
|
32314
32313
|
editable: false,
|
|
32315
32314
|
cellDataType: 'objectId'
|
|
32316
|
-
}]
|
|
32317
|
-
};
|
|
32318
|
-
}, [apiInterface]);
|
|
32319
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
32320
|
-
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
32321
|
-
title: /*#__PURE__*/jsxs("div", {
|
|
32322
|
-
children: [t('backoffice.menu.items.label.IDMEnricherEditorTableTabGroups'), /*#__PURE__*/jsx(Space$1, {
|
|
32323
|
-
style: {
|
|
32324
|
-
"float": 'right'
|
|
32325
|
-
},
|
|
32326
|
-
children: /*#__PURE__*/jsx(PackageSelector, {
|
|
32327
|
-
organizationId: organizationId,
|
|
32328
|
-
selectedPackage: packageId,
|
|
32329
|
-
setSelectedPackage: function setSelectedPackage(id) {
|
|
32330
|
-
return updateNavigation(id);
|
|
32331
|
-
},
|
|
32332
|
-
enricherService: apiConfig.enricherService
|
|
32333
|
-
})
|
|
32334
|
-
})]
|
|
32335
|
-
})
|
|
32336
|
-
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
32337
|
-
gridId: 'crud-grid_tabgroups',
|
|
32338
|
-
applicationData: applicationData,
|
|
32339
|
-
configuration: configuration
|
|
32340
|
-
})]
|
|
32341
|
-
});
|
|
32342
|
-
}
|
|
32343
|
-
|
|
32344
|
-
function TablePartlistPos () {
|
|
32345
|
-
var _useTranslation = useTranslation(),
|
|
32346
|
-
t = _useTranslation.t;
|
|
32347
|
-
var _useModule = useModule$1(['
|
|
32348
|
-
packageId = _useModule.packageId,
|
|
32349
|
-
organizationId = _useModule.organizationId,
|
|
32350
|
-
updateNavigation = _useModule.updateNavigation,
|
|
32351
|
-
apiConfig = _useModule.apiConfig;
|
|
32352
|
-
var posInvisibility = useMemo(function () {
|
|
32353
|
-
return [{
|
|
32354
|
-
name: t('backoffice.idmCatalogEditor.partlistpos.label.pi0'),
|
|
32355
|
-
value: '0'
|
|
32356
|
-
}, {
|
|
32357
|
-
name: t('backoffice.idmCatalogEditor.partlistpos.label.pi1'),
|
|
32358
|
-
value: '1'
|
|
32359
|
-
}, {
|
|
32360
|
-
name: t('backoffice.idmCatalogEditor.partlistpos.label.pi2'),
|
|
32361
|
-
value: '2'
|
|
32362
|
-
}];
|
|
32363
|
-
}, [t]);
|
|
32364
|
-
var applicationData = useMemo(function () {
|
|
32365
|
-
return {
|
|
32366
|
-
packageId: packageId,
|
|
32367
|
-
organizationId: organizationId
|
|
32368
|
-
};
|
|
32369
|
-
}, [packageId, organizationId]);
|
|
32370
|
-
var apiInterface = useMemo(function () {
|
|
32371
|
-
return {
|
|
32372
|
-
//TODO: Es gibt globale Tabgroups, die vordefiniert sind und pro Enricher Paket nochmals angepasst werden können -endpoint anpassen?
|
|
32373
|
-
read: apiConfig.enricherService + '/packages/${packageId}/partlistpos',
|
|
32374
|
-
create: apiConfig.enricherService + '/packages/${packageId}/partlistpos',
|
|
32375
|
-
restore: apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
|
32376
|
-
"delete": apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}',
|
|
32377
|
-
update: apiConfig.enricherService + '/packages/${packageId}/partlistpos/${_id}'
|
|
32378
|
-
};
|
|
32379
|
-
}, []);
|
|
32380
|
-
var configuration = useMemo(function () {
|
|
32381
|
-
return {
|
|
32382
|
-
type: 'dotnetSSM',
|
|
32383
|
-
apiInterface: apiInterface,
|
|
32384
|
-
dateFormat: 'LL',
|
|
32385
|
-
floatingFilter: true,
|
|
32386
|
-
colDef: [{
|
|
32387
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.partlistKey',
|
|
32388
|
-
field: 'partlistKey',
|
|
32389
|
-
editable: false
|
|
32390
|
-
}, {
|
|
32391
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.itemRefSerieNo',
|
|
32392
|
-
field: 'itemRefSerieNo',
|
|
32393
|
-
cellDataType: 'number',
|
|
32394
|
-
editable: false
|
|
32395
|
-
}, {
|
|
32396
|
-
headerName: 'backoffice.idmEnricher.properties.partlistpos.itemRefSerieNoDisplayText',
|
|
32397
|
-
marryChildren: true,
|
|
32398
|
-
editable: false,
|
|
32399
|
-
children: [{
|
|
32400
|
-
field: 'itemRefSerieNoDisplayText.DE',
|
|
32401
|
-
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32402
|
-
isDictionary: true,
|
|
32403
|
-
editable: false
|
|
32404
|
-
}, {
|
|
32405
|
-
field: 'itemRefSerieNoDisplayText.EN',
|
|
32406
|
-
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32407
|
-
isDictionary: true,
|
|
32408
|
-
editable: false
|
|
32409
|
-
}, {
|
|
32410
|
-
field: 'itemRefSerieNoDisplayText.FR',
|
|
32411
|
-
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32412
|
-
isDictionary: true,
|
|
32413
|
-
editable: false
|
|
32414
|
-
}, {
|
|
32415
|
-
field: 'itemRefSerieNoDisplayText.IT',
|
|
32416
|
-
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32417
|
-
isDictionary: true,
|
|
32418
|
-
editable: false
|
|
32419
|
-
}]
|
|
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'
|
|
32420
33625
|
}, {
|
|
32421
|
-
|
|
32422
|
-
|
|
32423
|
-
editable: false
|
|
32424
|
-
}, {
|
|
32425
|
-
headerName: 'backoffice.idmEnricher.properties.partlistpos.itemRefTypeNoDisplayText',
|
|
32426
|
-
marryChildren: true,
|
|
33626
|
+
field: 'pgPricefactors',
|
|
33627
|
+
cellDataType: 'object',
|
|
32427
33628
|
editable: false,
|
|
32428
|
-
|
|
32429
|
-
field: 'itemRefTypeNoDisplayText.DE',
|
|
32430
|
-
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32431
|
-
isDictionary: true,
|
|
32432
|
-
editable: false
|
|
32433
|
-
}, {
|
|
32434
|
-
field: 'itemRefTypeNoDisplayText.EN',
|
|
32435
|
-
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32436
|
-
isDictionary: true,
|
|
32437
|
-
editable: false
|
|
32438
|
-
}, {
|
|
32439
|
-
field: 'itemRefTypeNoDisplayText.FR',
|
|
32440
|
-
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32441
|
-
isDictionary: true,
|
|
32442
|
-
editable: false
|
|
32443
|
-
}, {
|
|
32444
|
-
field: 'itemRefTypeNoDisplayText.IT',
|
|
32445
|
-
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32446
|
-
isDictionary: true,
|
|
32447
|
-
editable: false
|
|
32448
|
-
}]
|
|
32449
|
-
}, {
|
|
32450
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.decisionPosCount',
|
|
32451
|
-
field: 'posCountValue',
|
|
32452
|
-
cellDataType: 'number',
|
|
32453
|
-
editable: false
|
|
32454
|
-
}, {
|
|
32455
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.decisionPosCountDisplayText',
|
|
32456
|
-
marryChildren: true,
|
|
32457
|
-
editable: false,
|
|
32458
|
-
children: [{
|
|
32459
|
-
field: 'decisionPosCountDisplayText.DE',
|
|
32460
|
-
headerName: 'backoffice.idmEnricher.general.label.DE',
|
|
32461
|
-
isDictionary: true,
|
|
32462
|
-
editable: false
|
|
32463
|
-
}, {
|
|
32464
|
-
field: 'decisionPosCountDisplayText.EN',
|
|
32465
|
-
headerName: 'backoffice.idmEnricher.general.label.EN',
|
|
32466
|
-
isDictionary: true,
|
|
32467
|
-
editable: false
|
|
32468
|
-
}, {
|
|
32469
|
-
field: 'decisionPosCountDisplayText.FR',
|
|
32470
|
-
headerName: 'backoffice.idmEnricher.general.label.FR',
|
|
32471
|
-
isDictionary: true,
|
|
32472
|
-
editable: false
|
|
32473
|
-
}, {
|
|
32474
|
-
field: 'decisionPosCountDisplayText.IT',
|
|
32475
|
-
headerName: 'backoffice.idmEnricher.general.label.IT',
|
|
32476
|
-
isDictionary: true,
|
|
32477
|
-
editable: false
|
|
32478
|
-
}]
|
|
32479
|
-
}, {
|
|
32480
|
-
field: 'decisions',
|
|
32481
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.decisions',
|
|
32482
|
-
cellDataType: 'lookup',
|
|
32483
|
-
editable: true,
|
|
32484
|
-
customParams: {
|
|
32485
|
-
nameField: 'decisionRefsDisplayTexts',
|
|
32486
|
-
filterCellType: 'number',
|
|
32487
|
-
displayLabelTemplate: '${name} (${value})',
|
|
32488
|
-
multiple: true,
|
|
32489
|
-
translated: true
|
|
32490
|
-
},
|
|
32491
|
-
additionalFields: ['decisionRefsDisplayTexts'],
|
|
32492
|
-
isDictionary: true
|
|
32493
|
-
}, {
|
|
32494
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.posCountValue',
|
|
32495
|
-
field: 'posCountValue',
|
|
32496
|
-
cellDataType: 'number',
|
|
32497
|
-
editable: false
|
|
32498
|
-
}, {
|
|
32499
|
-
headerName: 'backoffice.idmEnricher.general.partlistpos.label.posInvisibility',
|
|
32500
|
-
field: 'posInvisibility',
|
|
32501
|
-
cellDataType: 'enum',
|
|
32502
|
-
customParams: {
|
|
32503
|
-
enumData: posInvisibility,
|
|
32504
|
-
displayLabelTemplate: '${name} (${value})'
|
|
32505
|
-
},
|
|
32506
|
-
editable: false
|
|
32507
|
-
}, {
|
|
32508
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.retailPrefix',
|
|
32509
|
-
field: 'retailPrefix',
|
|
32510
|
-
editable: true
|
|
32511
|
-
}, {
|
|
32512
|
-
headerName: 'backoffice.idmEnricher.partlistpos.label.retailArtilceNumber',
|
|
32513
|
-
field: 'retailArtilceNumber',
|
|
32514
|
-
editable: true
|
|
33629
|
+
hide: true
|
|
32515
33630
|
}, {
|
|
32516
|
-
field: '
|
|
32517
|
-
cellDataType: '
|
|
33631
|
+
field: 'articlePricefactors',
|
|
33632
|
+
cellDataType: 'object',
|
|
32518
33633
|
editable: false,
|
|
32519
|
-
hide: true
|
|
32520
|
-
defaultValue: '${organizationId}'
|
|
32521
|
-
}, {
|
|
32522
|
-
headerName: 'backoffice.idmEnricher.general.label.lastUpdatedDate',
|
|
32523
|
-
field: 'lastUpdatedDate',
|
|
32524
|
-
cellDataType: 'dateString',
|
|
32525
|
-
editable: false
|
|
32526
|
-
}, {
|
|
32527
|
-
headerName: 'backoffice.idmEnricher.general.label.createdDate',
|
|
32528
|
-
field: 'createdDate',
|
|
32529
|
-
cellDataType: 'dateString',
|
|
32530
|
-
editable: false
|
|
32531
|
-
}, {
|
|
32532
|
-
headerName: 'backoffice.idmEnricher.general.label.createdBy',
|
|
32533
|
-
field: 'createdByDisplayText',
|
|
32534
|
-
editable: false
|
|
32535
|
-
}, {
|
|
32536
|
-
headerName: 'backoffice.idmEnricher.general.label.lastUpdatedBy',
|
|
32537
|
-
field: 'lastUpdatedByDisplayText',
|
|
32538
|
-
editable: false
|
|
33634
|
+
hide: true
|
|
32539
33635
|
}, {
|
|
32540
|
-
|
|
32541
|
-
|
|
33636
|
+
field: 'seriePricefactors',
|
|
33637
|
+
cellDataType: 'object',
|
|
32542
33638
|
editable: false,
|
|
32543
|
-
|
|
33639
|
+
hide: true
|
|
32544
33640
|
}]
|
|
32545
33641
|
};
|
|
32546
|
-
}, [apiInterface
|
|
33642
|
+
}, [apiInterface]);
|
|
32547
33643
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
32548
33644
|
children: [/*#__PURE__*/jsx(Descriptions$1, {
|
|
32549
33645
|
title: /*#__PURE__*/jsxs("div", {
|
|
32550
|
-
children: [t('backoffice.menu.items.label.
|
|
33646
|
+
children: [t('backoffice.menu.items.label.IDMEnricherEditorTablePriceLists'), /*#__PURE__*/jsx(Space$1, {
|
|
32551
33647
|
style: {
|
|
32552
33648
|
"float": 'right'
|
|
32553
33649
|
},
|
|
@@ -32562,9 +33658,11 @@ function TablePartlistPos () {
|
|
|
32562
33658
|
})]
|
|
32563
33659
|
})
|
|
32564
33660
|
}), /*#__PURE__*/jsx(Spreadsheet, {
|
|
33661
|
+
ref: spreadsheetRef,
|
|
32565
33662
|
gridId: 'crud-grid_epartlistpos',
|
|
32566
33663
|
applicationData: applicationData,
|
|
32567
|
-
configuration: configuration
|
|
33664
|
+
configuration: configuration,
|
|
33665
|
+
hooks: hooks
|
|
32568
33666
|
})]
|
|
32569
33667
|
});
|
|
32570
33668
|
}
|
|
@@ -32616,6 +33714,9 @@ function Content$3() {
|
|
|
32616
33714
|
}), /*#__PURE__*/jsx(Route, {
|
|
32617
33715
|
path: ":packageId/groups",
|
|
32618
33716
|
element: /*#__PURE__*/jsx(TableGroups, {})
|
|
33717
|
+
}), /*#__PURE__*/jsx(Route, {
|
|
33718
|
+
path: ":packageId/pricelists",
|
|
33719
|
+
element: /*#__PURE__*/jsx(TablePriceList, {})
|
|
32619
33720
|
})]
|
|
32620
33721
|
});
|
|
32621
33722
|
}
|
|
@@ -33524,7 +34625,7 @@ function SeriesSelector(_ref) {
|
|
|
33524
34625
|
i18n = _useTranslation.i18n;
|
|
33525
34626
|
return /*#__PURE__*/jsx(SimpleSelect, {
|
|
33526
34627
|
apiInterface: {
|
|
33527
|
-
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(';')) : '')
|
|
33528
34629
|
},
|
|
33529
34630
|
selectMapping: {
|
|
33530
34631
|
label: "${seriesName.".concat(i18n.language.toLocaleUpperCase(), "}"),
|
|
@@ -36867,38 +37968,9 @@ function TablePriceFeatureGroups () {
|
|
|
36867
37968
|
});
|
|
36868
37969
|
}
|
|
36869
37970
|
|
|
36870
|
-
function getPriceFeatureGroups(selectedSerie, language) {
|
|
36871
|
-
var _selectedSerie$pricef, _selectedSerie$pricef4;
|
|
36872
|
-
if (!(selectedSerie !== null && selectedSerie !== void 0 && selectedSerie.pricefeaturegroups)) {
|
|
36873
|
-
return [];
|
|
36874
|
-
}
|
|
36875
|
-
var priceFeatureGroups = (_selectedSerie$pricef = selectedSerie.pricefeaturegroups) === null || _selectedSerie$pricef === void 0 ? void 0 : _selectedSerie$pricef.map(function (priceFeatureGroups, i) {
|
|
36876
|
-
var _selectedSerie$pricef2, _selectedSerie$pricef3;
|
|
36877
|
-
return {
|
|
36878
|
-
id: priceFeatureGroups,
|
|
36879
|
-
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,
|
|
36880
|
-
keys: [],
|
|
36881
|
-
keysDisplayTexts: []
|
|
36882
|
-
};
|
|
36883
|
-
});
|
|
36884
|
-
(_selectedSerie$pricef4 = selectedSerie.pricefeaturegroupsKeys) === null || _selectedSerie$pricef4 === void 0 || _selectedSerie$pricef4.forEach(function (priceFeatureGroupKey, i) {
|
|
36885
|
-
var pfgSplit = priceFeatureGroupKey.split('_');
|
|
36886
|
-
var pfgId = pfgSplit[0].replace('PRFG', '');
|
|
36887
|
-
var pfg = priceFeatureGroups.find(function (pfg) {
|
|
36888
|
-
return pfg.id == pfgId;
|
|
36889
|
-
});
|
|
36890
|
-
if (pfg) {
|
|
36891
|
-
var _selectedSerie$pricef5;
|
|
36892
|
-
pfg.keys.push(priceFeatureGroupKey);
|
|
36893
|
-
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()]);
|
|
36894
|
-
}
|
|
36895
|
-
});
|
|
36896
|
-
return priceFeatureGroups;
|
|
36897
|
-
}
|
|
36898
37971
|
function TablePrices () {
|
|
36899
37972
|
var _useTranslation = useTranslation(),
|
|
36900
|
-
t = _useTranslation.t
|
|
36901
|
-
i18n = _useTranslation.i18n;
|
|
37973
|
+
t = _useTranslation.t;
|
|
36902
37974
|
var _useModule = useModule(['prices']),
|
|
36903
37975
|
catalogId = _useModule.catalogId,
|
|
36904
37976
|
updateNavigation = _useModule.updateNavigation,
|
|
@@ -36915,9 +37987,7 @@ function TablePrices () {
|
|
|
36915
37987
|
serieId: selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie._id
|
|
36916
37988
|
};
|
|
36917
37989
|
}, [organizationId, catalogId, selectedSerie]);
|
|
36918
|
-
var priceFeatureGroups =
|
|
36919
|
-
return getPriceFeatureGroups(selectedSerie, i18n.language);
|
|
36920
|
-
}, [selectedSerie, i18n.language]);
|
|
37990
|
+
var priceFeatureGroups = usePriceFeatureGroupsFromSerie(selectedSerie);
|
|
36921
37991
|
var apiInterface = useMemo(function () {
|
|
36922
37992
|
return {
|
|
36923
37993
|
read: apiConfig.idmService + '/v3.0/catalogs/${catalogId}/series/${serieId}/prices',
|
|
@@ -38283,11 +39353,16 @@ var ErrorBoundary = function ErrorBoundary(_ref) {
|
|
|
38283
39353
|
var FallbackComponent = function FallbackComponent(_ref2) {
|
|
38284
39354
|
_ref2.error;
|
|
38285
39355
|
var resetErrorBoundary = _ref2.resetErrorBoundary;
|
|
38286
|
-
var root =
|
|
39356
|
+
var root = null;
|
|
39357
|
+
try {
|
|
39358
|
+
root = useStore();
|
|
39359
|
+
} catch (_unused) {}
|
|
38287
39360
|
useEffect(function () {
|
|
38288
|
-
|
|
39361
|
+
var _root;
|
|
39362
|
+
(_root = root) === null || _root === void 0 || _root.setResetErrorBoundary(resetErrorBoundary);
|
|
38289
39363
|
return function () {
|
|
38290
|
-
|
|
39364
|
+
var _root2;
|
|
39365
|
+
(_root2 = root) === null || _root2 === void 0 || _root2.setResetErrorBoundary();
|
|
38291
39366
|
};
|
|
38292
39367
|
}, []);
|
|
38293
39368
|
return /*#__PURE__*/jsx(Result$1, {
|