@crystaldesign/diva-backoffice 26.12.0-beta.2 → 26.12.0-beta.4
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 +1003 -358
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/components/ArticleTable/index.d.ts +10 -2
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/components/ArticleTable/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/hooks/useHeaderProducts.d.ts +15 -0
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/hooks/useHeaderProducts.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/hooks/useRefreshHeaderValues.d.ts +9 -0
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/hooks/useRefreshHeaderValues.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/index.d.ts +5 -2
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/logic/articleColumns.d.ts +2 -1
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/logic/articleColumns.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/logic/headerLink.d.ts +38 -0
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/logic/headerLink.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/logic/headerSync.d.ts +36 -0
- package/build/types/backoffice/src/ui/AssortmentManager/ArticleData/logic/headerSync.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/AffectedCount/index.d.ts +3 -2
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/AffectedCount/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/Content/index.d.ts +1 -1
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/components/Content/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useAffectedProducts.d.ts +6 -6
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useHeaderData.d.ts +14 -0
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useHeaderData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useSaveHeaderData.d.ts +7 -6
- package/build/types/backoffice/src/ui/AssortmentManager/HeaderData/hooks/useSaveHeaderData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssortmentManager/tests/headerLink.test.d.ts +2 -0
- package/build/types/backoffice/src/ui/AssortmentManager/tests/headerLink.test.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/AssortmentManager/tests/headerSync.test.d.ts +2 -0
- package/build/types/backoffice/src/ui/AssortmentManager/tests/headerSync.test.d.ts.map +1 -0
- package/build/types/backoffice/src/ui/IDMCollectionEditor/modules/TableCollections/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts.map +1 -1
- package/package.json +10 -10
package/build/esm/index.js
CHANGED
|
@@ -87,7 +87,7 @@ import DeleteOutlined from '@ant-design/icons/DeleteOutlined';
|
|
|
87
87
|
import JSONEditor from 'jsoneditor';
|
|
88
88
|
import 'jsoneditor/dist/jsoneditor.css';
|
|
89
89
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
90
|
-
import { MinusCircleOutlined, PlusOutlined, CheckOutlined, CopyOutlined, CalculatorOutlined, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, InfoCircleOutlined as InfoCircleOutlined$1, DownloadOutlined as DownloadOutlined$1, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, EditOutlined as EditOutlined$2, EyeOutlined as EyeOutlined$1, LoadingOutlined, DownOutlined as DownOutlined$1, FilePdfOutlined, UploadOutlined as UploadOutlined$2, GlobalOutlined, SearchOutlined as SearchOutlined$1, SendOutlined as SendOutlined$1, CheckCircleOutlined as CheckCircleOutlined$1, CloseCircleOutlined, PauseCircleOutlined, HeartOutlined, RightOutlined as RightOutlined$1, ReloadOutlined as ReloadOutlined$1, CloudSyncOutlined, HolderOutlined, WarningOutlined as WarningOutlined$1, DatabaseOutlined as DatabaseOutlined$1, DatabaseFilled, PaperClipOutlined, SettingOutlined as SettingOutlined$1, KeyOutlined as KeyOutlined$1, RedoOutlined, MenuUnfoldOutlined, MenuFoldOutlined } from '@ant-design/icons';
|
|
90
|
+
import { MinusCircleOutlined, PlusOutlined, CheckOutlined, CopyOutlined, CalculatorOutlined, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, InfoCircleOutlined as InfoCircleOutlined$1, DownloadOutlined as DownloadOutlined$1, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, EditOutlined as EditOutlined$2, EyeOutlined as EyeOutlined$1, LoadingOutlined, DownOutlined as DownOutlined$1, FilePdfOutlined, UploadOutlined as UploadOutlined$2, GlobalOutlined, SearchOutlined as SearchOutlined$1, SendOutlined as SendOutlined$1, CheckCircleOutlined as CheckCircleOutlined$1, CloseCircleOutlined, PauseCircleOutlined, HeartOutlined, RightOutlined as RightOutlined$1, ReloadOutlined as ReloadOutlined$1, CloudSyncOutlined, HolderOutlined, WarningOutlined as WarningOutlined$1, SyncOutlined as SyncOutlined$1, DatabaseOutlined as DatabaseOutlined$1, DatabaseFilled, PaperClipOutlined, SettingOutlined as SettingOutlined$1, KeyOutlined as KeyOutlined$1, RedoOutlined, MenuUnfoldOutlined, MenuFoldOutlined } from '@ant-design/icons';
|
|
91
91
|
import classNames from 'classnames';
|
|
92
92
|
import RTFEditor from '@crystaldesign/rtf-editor';
|
|
93
93
|
import debounce from 'lodash/debounce';
|
|
@@ -128,7 +128,7 @@ import QuestionOutlined from '@ant-design/icons/QuestionOutlined';
|
|
|
128
128
|
import { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';
|
|
129
129
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
130
130
|
import Descriptions$1 from 'antd/es/descriptions';
|
|
131
|
-
import { Spreadsheet as Spreadsheet$1, applyFilterToAddtionalColumn, SelectAllOption, SpreadsheetSearchInput } from '@crystaldesign/spreadsheet';
|
|
131
|
+
import { Spreadsheet as Spreadsheet$1, applyFilterToAddtionalColumn, SelectAllOption, resolveEnumValue, SpreadsheetSearchInput } from '@crystaldesign/spreadsheet';
|
|
132
132
|
import EditOutlined$1 from '@ant-design/icons/lib/icons/EditOutlined';
|
|
133
133
|
import Checkbox$2 from 'antd/es/checkbox/Checkbox';
|
|
134
134
|
import SyncOutlined from '@ant-design/icons/SyncOutlined';
|
|
@@ -204,12 +204,12 @@ import DivaWebPlanner from '@crystaldesign/web-planner-logic';
|
|
|
204
204
|
globalThis.process = { env:env };
|
|
205
205
|
})();
|
|
206
206
|
|
|
207
|
-
function _createForOfIteratorHelper$
|
|
208
|
-
function _unsupportedIterableToArray$
|
|
209
|
-
function _arrayLikeToArray$
|
|
207
|
+
function _createForOfIteratorHelper$Q(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$Q(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
208
|
+
function _unsupportedIterableToArray$Q(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$Q(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$Q(r, a) : void 0; } }
|
|
209
|
+
function _arrayLikeToArray$Q(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
210
210
|
function ownKeys$24(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
211
211
|
function _objectSpread$24(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$24(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$24(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
212
|
-
var LOG$
|
|
212
|
+
var LOG$t = getLogger('Backoffice', 'ApplyMapping');
|
|
213
213
|
function applyMapping (_ref) {
|
|
214
214
|
var mappable = _ref.mappable,
|
|
215
215
|
mappingData = _ref.mappingData,
|
|
@@ -241,7 +241,7 @@ function applyMapping (_ref) {
|
|
|
241
241
|
function meetsCondition(map) {
|
|
242
242
|
if (!map.condition) return true;
|
|
243
243
|
var value = mappingData[map.condition.field];
|
|
244
|
-
var _iterator = _createForOfIteratorHelper$
|
|
244
|
+
var _iterator = _createForOfIteratorHelper$Q(map.condition.values),
|
|
245
245
|
_step;
|
|
246
246
|
try {
|
|
247
247
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -320,7 +320,7 @@ function applyMapping (_ref) {
|
|
|
320
320
|
_url.href = _url.href.replace('&' + m.targetField + '=${' + m.targetField + '}', '');
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
323
|
+
var _iterator2 = _createForOfIteratorHelper$Q(_url.searchParams.entries()),
|
|
324
324
|
_step2;
|
|
325
325
|
try {
|
|
326
326
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -355,7 +355,7 @@ function applyMapping (_ref) {
|
|
|
355
355
|
}
|
|
356
356
|
return returnValue;
|
|
357
357
|
} catch (e) {
|
|
358
|
-
LOG$
|
|
358
|
+
LOG$t.debug('Mapabledata', mappable);
|
|
359
359
|
throw e;
|
|
360
360
|
}
|
|
361
361
|
}
|
|
@@ -569,7 +569,7 @@ function getLeafColumns(columns) {
|
|
|
569
569
|
|
|
570
570
|
function ownKeys$22(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
571
571
|
function _objectSpread$22(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$22(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$22(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
572
|
-
var LOG$
|
|
572
|
+
var LOG$s = getLogger('Backoffice', 'ApiHandler');
|
|
573
573
|
var jp = require('jsonpath');
|
|
574
574
|
var _default$c = /*#__PURE__*/function () {
|
|
575
575
|
function _default(configuration, _rootStore) {
|
|
@@ -1247,16 +1247,16 @@ var _default$c = /*#__PURE__*/function () {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
});
|
|
1249
1249
|
this._socket.on('error', function (error) {
|
|
1250
|
-
LOG$
|
|
1250
|
+
LOG$s.error(new DivaError('Error on connection', error));
|
|
1251
1251
|
});
|
|
1252
1252
|
this._socket.on('connect_error', function (error) {
|
|
1253
|
-
LOG$
|
|
1253
|
+
LOG$s.log("connect_error due to ".concat(error.message));
|
|
1254
1254
|
});
|
|
1255
1255
|
this._socket.on('connect', function () {
|
|
1256
|
-
LOG$
|
|
1256
|
+
LOG$s.debug('Successfully connected to socket');
|
|
1257
1257
|
});
|
|
1258
1258
|
this._socket.on('disconnect', function () {
|
|
1259
|
-
LOG$
|
|
1259
|
+
LOG$s.debug('Disconnect from socket');
|
|
1260
1260
|
});
|
|
1261
1261
|
return this._socket;
|
|
1262
1262
|
}
|
|
@@ -3119,7 +3119,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
3119
3119
|
},
|
|
3120
3120
|
apiInterface: {
|
|
3121
3121
|
read: {
|
|
3122
|
-
list: '${adminService}/taskStatus?filter=%5B%2B%5B%7BtaskType%2Ceq%2CIDM_IMPORT%7D%2C%7BtaskType%2Ceq%2CIDM_EXPORT%7D%5D%5D',
|
|
3122
|
+
list: '${adminService}/taskStatus?filter=%5B%2B%5B%7BtaskType%2Ceq%2CIDM_IMPORT%7D%2C%7BtaskType%2Ceq%2CIDM_EXPORT%7D%2C%7BtaskType%2Ceq%2CENRICHER_PUBLISH%7D%5D%5D',
|
|
3123
3123
|
fields: true,
|
|
3124
3124
|
filterServerSide: true
|
|
3125
3125
|
}
|
|
@@ -3591,7 +3591,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
3591
3591
|
},
|
|
3592
3592
|
apiInterface: {
|
|
3593
3593
|
read: {
|
|
3594
|
-
list: '${adminService}/taskStatus?filter=%5B%7BtaskType%2Cne%2CSAP_XML_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_DROPDOWNITEMS%7D%2C%7BtaskType%2Cne%2CSAP_TEMPLATEARTICLES%7D%2C%7BtaskType%2Cne%2CSAP_ARTICLE_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_SUPPLIERS%7D%2C%7BtaskType%2Cne%2CSAP_PRODUCTGROUPS%7D%2C%7BtaskType%2Cne%2CSAP_AUSP%7D%2C%7BtaskType%2Cne%2CPIM_SEND_CLASSIFICATION%7D%2C%7BtaskType%2Cne%2CSEND_SAP_ARTICLES%7D%2C%7BtaskType%2Cne%2CCRON%7D%2C%7BtaskType%2Cne%2CRETAIL_VERSIONING%7D%2C%7BtaskType%2Cne%2CSUPPLIER_VERSIONING%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_EXPORT%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_IMPORT%7D%2C%7BtaskType%2Cne%2CGET_PRODUCT_FEATURES_PIM%7D%2C%7BtaskType%2Cne%2CIDM_IMPORT%7D%2C%7BtaskType%2Cne%2CIDM_EXPORT%7D%2C%7BtaskType%2Cne%2CPARTLIST_IMPORT%7D%2C%7BtaskType%2Cne%2CARTICLE_IMPORT%7D%2C%7BtaskType%2Cne%2CPRICE_IMPORT%7D%2C%7BtaskType%2Cne%2COPVG_IMPORT%7D%5D',
|
|
3594
|
+
list: '${adminService}/taskStatus?filter=%5B%7BtaskType%2Cne%2CSAP_XML_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_DROPDOWNITEMS%7D%2C%7BtaskType%2Cne%2CSAP_TEMPLATEARTICLES%7D%2C%7BtaskType%2Cne%2CSAP_ARTICLE_IMPORT%7D%2C%7BtaskType%2Cne%2CSAP_SUPPLIERS%7D%2C%7BtaskType%2Cne%2CSAP_PRODUCTGROUPS%7D%2C%7BtaskType%2Cne%2CSAP_AUSP%7D%2C%7BtaskType%2Cne%2CPIM_SEND_CLASSIFICATION%7D%2C%7BtaskType%2Cne%2CSEND_SAP_ARTICLES%7D%2C%7BtaskType%2Cne%2CCRON%7D%2C%7BtaskType%2Cne%2CRETAIL_VERSIONING%7D%2C%7BtaskType%2Cne%2CSUPPLIER_VERSIONING%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_EXPORT%7D%2C%7BtaskType%2Cne%2CBACKOFFICE_CE_IMPORT%7D%2C%7BtaskType%2Cne%2CGET_PRODUCT_FEATURES_PIM%7D%2C%7BtaskType%2Cne%2CIDM_IMPORT%7D%2C%7BtaskType%2Cne%2CIDM_EXPORT%7D%2C%7BtaskType%2Cne%2CENRICHER_PUBLISH%7D%2C%7BtaskType%2Cne%2CPARTLIST_IMPORT%7D%2C%7BtaskType%2Cne%2CARTICLE_IMPORT%7D%2C%7BtaskType%2Cne%2CPRICE_IMPORT%7D%2C%7BtaskType%2Cne%2COPVG_IMPORT%7D%5D',
|
|
3595
3595
|
fields: true,
|
|
3596
3596
|
filterServerSide: true
|
|
3597
3597
|
}
|
|
@@ -14932,9 +14932,9 @@ function MenuLabel (_ref) {
|
|
|
14932
14932
|
});
|
|
14933
14933
|
}
|
|
14934
14934
|
|
|
14935
|
-
function _createForOfIteratorHelper$
|
|
14936
|
-
function _unsupportedIterableToArray$
|
|
14937
|
-
function _arrayLikeToArray$
|
|
14935
|
+
function _createForOfIteratorHelper$P(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$P(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
14936
|
+
function _unsupportedIterableToArray$P(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$P(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$P(r, a) : void 0; } }
|
|
14937
|
+
function _arrayLikeToArray$P(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14938
14938
|
function applyRule(_ref) {
|
|
14939
14939
|
var rules = _ref.rules,
|
|
14940
14940
|
data = _ref.data,
|
|
@@ -14943,7 +14943,7 @@ function applyRule(_ref) {
|
|
|
14943
14943
|
//if or we start with false until the first time some result is true
|
|
14944
14944
|
//if and we start with true until the frist time some result is false
|
|
14945
14945
|
var result = !or;
|
|
14946
|
-
var _iterator = _createForOfIteratorHelper$
|
|
14946
|
+
var _iterator = _createForOfIteratorHelper$P(rules),
|
|
14947
14947
|
_step;
|
|
14948
14948
|
try {
|
|
14949
14949
|
var _loop = function _loop() {
|
|
@@ -15015,7 +15015,7 @@ function aplyRules(_ref2) {
|
|
|
15015
15015
|
if (!data || data.length == 0) return {
|
|
15016
15016
|
applied: false
|
|
15017
15017
|
};
|
|
15018
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
15018
|
+
var _iterator2 = _createForOfIteratorHelper$P(data),
|
|
15019
15019
|
_step2;
|
|
15020
15020
|
try {
|
|
15021
15021
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -15811,9 +15811,9 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
15811
15811
|
|
|
15812
15812
|
function ownKeys$1$(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15813
15813
|
function _objectSpread$1$(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1$(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1$(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15814
|
-
function _createForOfIteratorHelper$
|
|
15815
|
-
function _unsupportedIterableToArray$
|
|
15816
|
-
function _arrayLikeToArray$
|
|
15814
|
+
function _createForOfIteratorHelper$O(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$O(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
15815
|
+
function _unsupportedIterableToArray$O(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$O(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$O(r, a) : void 0; } }
|
|
15816
|
+
function _arrayLikeToArray$O(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15817
15817
|
var _default$6 = /*#__PURE__*/function () {
|
|
15818
15818
|
function _default(root) {
|
|
15819
15819
|
_classCallCheck(this, _default);
|
|
@@ -15852,7 +15852,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
15852
15852
|
var initKeys = this.root.navigationState.path == '' ? [] : this.keysFormPath(this._menu, this.root.navigationState.path);
|
|
15853
15853
|
var checkedKeys = [];
|
|
15854
15854
|
var currentMenu = this._menu;
|
|
15855
|
-
var _iterator = _createForOfIteratorHelper$
|
|
15855
|
+
var _iterator = _createForOfIteratorHelper$O(initKeys),
|
|
15856
15856
|
_step;
|
|
15857
15857
|
try {
|
|
15858
15858
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -15861,7 +15861,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
15861
15861
|
var level = currentMenu;
|
|
15862
15862
|
var lastResolved = void 0;
|
|
15863
15863
|
var chainOk = true;
|
|
15864
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
15864
|
+
var _iterator2 = _createForOfIteratorHelper$O(key),
|
|
15865
15865
|
_step2;
|
|
15866
15866
|
try {
|
|
15867
15867
|
var _loop = function _loop() {
|
|
@@ -17172,10 +17172,10 @@ var _default$3 = /*#__PURE__*/function () {
|
|
|
17172
17172
|
}]);
|
|
17173
17173
|
}();
|
|
17174
17174
|
|
|
17175
|
-
function _createForOfIteratorHelper$
|
|
17176
|
-
function _unsupportedIterableToArray$
|
|
17177
|
-
function _arrayLikeToArray$
|
|
17178
|
-
var LOG$
|
|
17175
|
+
function _createForOfIteratorHelper$N(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$N(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
17176
|
+
function _unsupportedIterableToArray$N(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$N(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$N(r, a) : void 0; } }
|
|
17177
|
+
function _arrayLikeToArray$N(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
17178
|
+
var LOG$r = getLogger('Backoffice', 'DownloadStore');
|
|
17179
17179
|
var DownloadStore = /*#__PURE__*/function () {
|
|
17180
17180
|
function DownloadStore(_rootStore) {
|
|
17181
17181
|
var _this = this;
|
|
@@ -17202,7 +17202,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
17202
17202
|
_context2.next = 23;
|
|
17203
17203
|
break;
|
|
17204
17204
|
}
|
|
17205
|
-
_iterator = _createForOfIteratorHelper$
|
|
17205
|
+
_iterator = _createForOfIteratorHelper$N(action.download);
|
|
17206
17206
|
_context2.prev = 8;
|
|
17207
17207
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
17208
17208
|
var _download$params, _data$fileFormat, _data$fileUrl;
|
|
@@ -17231,7 +17231,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
17231
17231
|
_context.next = 11;
|
|
17232
17232
|
break;
|
|
17233
17233
|
}
|
|
17234
|
-
LOG$
|
|
17234
|
+
LOG$r.error(new DivaError("Failed to download file: ".concat(download.fileName, ". Status: ").concat(file.status, " ").concat(file.statusText)));
|
|
17235
17235
|
// Optionally, notify the user here
|
|
17236
17236
|
return _context.abrupt("break", 41);
|
|
17237
17237
|
case 11:
|
|
@@ -17245,7 +17245,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
17245
17245
|
case 17:
|
|
17246
17246
|
_context.prev = 17;
|
|
17247
17247
|
_context.t1 = _context["catch"](4);
|
|
17248
|
-
LOG$
|
|
17248
|
+
LOG$r.error(new DivaError("Error during file download (".concat(download.fileName, "):") + _context.t1));
|
|
17249
17249
|
// Optionally, notify the user here
|
|
17250
17250
|
case 20:
|
|
17251
17251
|
return _context.abrupt("break", 41);
|
|
@@ -17426,7 +17426,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
17426
17426
|
_context5.next = 4;
|
|
17427
17427
|
break;
|
|
17428
17428
|
}
|
|
17429
|
-
LOG$
|
|
17429
|
+
LOG$r.debug("The organization ".concat(data._id, " has no parentType of ").concat(validTypes.join(' or ')));
|
|
17430
17430
|
throw new Error("Current organization is no ".concat(type == 'RETAILER' ? 'retailer, retailer channel or association' : 'supplier or dealer'));
|
|
17431
17431
|
case 4:
|
|
17432
17432
|
orgData = data;
|
|
@@ -17445,7 +17445,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
17445
17445
|
_context5.next = 14;
|
|
17446
17446
|
break;
|
|
17447
17447
|
}
|
|
17448
|
-
LOG$
|
|
17448
|
+
LOG$r.debug("The organization ".concat(data._id, " has no type of ").concat(validTypes.join(' or '), " nor a parent organization"));
|
|
17449
17449
|
throw new Error("Current organization is no ".concat(type == 'RETAILER' ? 'retailer channel or association' : 'supplier or dealer'));
|
|
17450
17450
|
case 14:
|
|
17451
17451
|
_context5.prev = 14;
|
|
@@ -17507,7 +17507,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
17507
17507
|
_context6.next = 7;
|
|
17508
17508
|
break;
|
|
17509
17509
|
}
|
|
17510
|
-
LOG$
|
|
17510
|
+
LOG$r.error(new DivaError("Download request failed: ".concat(result.status, " ").concat(result.statusText)));
|
|
17511
17511
|
throw new Error("Download failed: ".concat(result.status, " ").concat(result.statusText));
|
|
17512
17512
|
case 7:
|
|
17513
17513
|
contentDisposition = result.headers.get('Content-Disposition');
|
|
@@ -17598,7 +17598,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
17598
17598
|
successCount = 0;
|
|
17599
17599
|
failedCount = 0;
|
|
17600
17600
|
promises = [];
|
|
17601
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
17601
|
+
_iterator2 = _createForOfIteratorHelper$N(props.data);
|
|
17602
17602
|
_context7.prev = 5;
|
|
17603
17603
|
_iterator2.s();
|
|
17604
17604
|
case 7:
|
|
@@ -17743,7 +17743,7 @@ var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
17743
17743
|
|
|
17744
17744
|
function ownKeys$1_(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17745
17745
|
function _objectSpread$1_(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1_(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1_(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17746
|
-
var LOG$
|
|
17746
|
+
var LOG$q = getLogger('Backoffice', 'ContextStore');
|
|
17747
17747
|
|
|
17748
17748
|
/**
|
|
17749
17749
|
* ContextStore is a store that manages the contexts of the application.
|
|
@@ -17779,7 +17779,7 @@ var ContextStore = /*#__PURE__*/function () {
|
|
|
17779
17779
|
var currentState = this.contexts.get(contextId) || {};
|
|
17780
17780
|
var updatedState = _objectSpread$1_(_objectSpread$1_({}, currentState), updates);
|
|
17781
17781
|
this.contexts.set(contextId, updatedState);
|
|
17782
|
-
LOG$
|
|
17782
|
+
LOG$q.debug("Updated context ".concat(contextId), {
|
|
17783
17783
|
updatedState: updatedState
|
|
17784
17784
|
});
|
|
17785
17785
|
}
|
|
@@ -18675,7 +18675,7 @@ function isExternalVid(file) {
|
|
|
18675
18675
|
}
|
|
18676
18676
|
|
|
18677
18677
|
var VIDEO_THUMB_PLACEHOLDER = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMDAwMDAwIiBoZWlnaHQ9IjgwMHB4IiB3aWR0aD0iODAwcHgiIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgCgkgdmlld0JveD0iMCAwIDQ5IDQ5IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGc+Cgk8Zz4KCQk8cGF0aCBkPSJNMzkuMjU2LDYuNUg5Ljc0NEM0LjM3MSw2LjUsMCwxMC44ODUsMCwxNi4yNzR2MTYuNDUxYzAsNS4zOSw0LjM3MSw5Ljc3NCw5Ljc0NCw5Ljc3NGgyOS41MTIKCQkJYzUuMzczLDAsOS43NDQtNC4zODUsOS43NDQtOS43NzRWMTYuMjc0QzQ5LDEwLjg4NSw0NC42MjksNi41LDM5LjI1Niw2LjV6IE00NywzMi43MjZjMCw0LjI4Ny0zLjQ3NCw3Ljc3NC03Ljc0NCw3Ljc3NEg5Ljc0NAoJCQlDNS40NzQsNDAuNSwyLDM3LjAxMiwyLDMyLjcyNlYxNi4yNzRDMiwxMS45ODgsNS40NzQsOC41LDkuNzQ0LDguNWgyOS41MTJjNC4yNywwLDcuNzQ0LDMuNDg4LDcuNzQ0LDcuNzc0VjMyLjcyNnoiLz4KCQk8cGF0aCBkPSJNMzMuMzYsMjQuMTM4bC0xMy44NTUtOC4xMTVjLTAuMzA4LTAuMTgtMC42OTEtMC4xODMtMS4wMDItMC4wMDVTMTgsMTYuNTI3LDE4LDE2Ljg4NnYxNi4yMjkKCQkJYzAsMC4zNTgsMC4xOTIsMC42OSwwLjUwMiwwLjg2OGMwLjE1NCwwLjA4OCwwLjMyNiwwLjEzMiwwLjQ5OCwwLjEzMmMwLjE3NSwwLDAuMzQ5LTAuMDQ2LDAuNTA1LTAuMTM3bDEzLjg1NS04LjExMwoJCQljMC4zMDYtMC4xNzksMC40OTUtMC41MDgsMC40OTUtMC44NjNTMzMuNjY3LDI0LjMxNywzMy4zNiwyNC4xMzh6IE0yMCwzMS4zN1YxOC42M2wxMC44NzYsNi4zNzFMMjAsMzEuMzd6Ii8+Cgk8L2c+CjwvZz4KPC9zdmc+';
|
|
18678
|
-
var LOG$
|
|
18678
|
+
var LOG$p = getLogger('Backoffice', 'MediaItem');
|
|
18679
18679
|
var MediaItem = /*#__PURE__*/function () {
|
|
18680
18680
|
function MediaItem(_ref) {
|
|
18681
18681
|
var media = _ref.media,
|
|
@@ -18788,7 +18788,7 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
18788
18788
|
_context2.prev = 8;
|
|
18789
18789
|
_context2.t0 = _context2["catch"](1);
|
|
18790
18790
|
this._mediaItemRefId = undefined;
|
|
18791
|
-
LOG$
|
|
18791
|
+
LOG$p.error(new DivaError$1('Failed to get media item ref, on next upload a new ref will be created', {
|
|
18792
18792
|
cause: _context2.t0
|
|
18793
18793
|
}));
|
|
18794
18794
|
case 12:
|
|
@@ -18885,9 +18885,9 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
18885
18885
|
}]);
|
|
18886
18886
|
}();
|
|
18887
18887
|
|
|
18888
|
-
function _createForOfIteratorHelper$
|
|
18889
|
-
function _unsupportedIterableToArray$
|
|
18890
|
-
function _arrayLikeToArray$
|
|
18888
|
+
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; } } }; }
|
|
18889
|
+
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; } }
|
|
18890
|
+
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; }
|
|
18891
18891
|
function processFormMediaBeforeSave(_x, _x2, _x3) {
|
|
18892
18892
|
return _processFormMediaBeforeSave.apply(this, arguments);
|
|
18893
18893
|
}
|
|
@@ -18905,7 +18905,7 @@ function _processFormMediaBeforeSave() {
|
|
|
18905
18905
|
_context.next = 3;
|
|
18906
18906
|
return processItems(data, items, root);
|
|
18907
18907
|
case 3:
|
|
18908
|
-
_iterator = _createForOfIteratorHelper$
|
|
18908
|
+
_iterator = _createForOfIteratorHelper$M(removedMedias);
|
|
18909
18909
|
_context.prev = 4;
|
|
18910
18910
|
_iterator.s();
|
|
18911
18911
|
case 6:
|
|
@@ -18947,7 +18947,7 @@ function _processItems() {
|
|
|
18947
18947
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
18948
18948
|
while (1) switch (_context2.prev = _context2.next) {
|
|
18949
18949
|
case 0:
|
|
18950
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
18950
|
+
_iterator2 = _createForOfIteratorHelper$M(items);
|
|
18951
18951
|
_context2.prev = 1;
|
|
18952
18952
|
_iterator2.s();
|
|
18953
18953
|
case 3:
|
|
@@ -19069,9 +19069,9 @@ function getData$1(id, data) {
|
|
|
19069
19069
|
}
|
|
19070
19070
|
}
|
|
19071
19071
|
|
|
19072
|
-
function _createForOfIteratorHelper$
|
|
19073
|
-
function _unsupportedIterableToArray$
|
|
19074
|
-
function _arrayLikeToArray$
|
|
19072
|
+
function _createForOfIteratorHelper$L(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$L(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
19073
|
+
function _unsupportedIterableToArray$L(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$L(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$L(r, a) : void 0; } }
|
|
19074
|
+
function _arrayLikeToArray$L(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
19075
19075
|
function ownKeys$1X(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19076
19076
|
function _objectSpread$1X(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1X(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1X(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19077
19077
|
function toNamePath$2(name) {
|
|
@@ -19202,7 +19202,7 @@ function useFormData (_ref) {
|
|
|
19202
19202
|
setSelectedItems = _useState14[1];
|
|
19203
19203
|
var _onLoadFields = function onLoadFields(data) {
|
|
19204
19204
|
var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : selectedItems;
|
|
19205
|
-
var _iterator = _createForOfIteratorHelper$
|
|
19205
|
+
var _iterator = _createForOfIteratorHelper$L(items),
|
|
19206
19206
|
_step;
|
|
19207
19207
|
try {
|
|
19208
19208
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -19525,7 +19525,7 @@ function useFormData (_ref) {
|
|
|
19525
19525
|
};
|
|
19526
19526
|
var getItem = function getItem(id) {
|
|
19527
19527
|
var items = selectedItems;
|
|
19528
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
19528
|
+
var _iterator2 = _createForOfIteratorHelper$L(items),
|
|
19529
19529
|
_step2;
|
|
19530
19530
|
try {
|
|
19531
19531
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -19701,7 +19701,7 @@ function useFormData (_ref) {
|
|
|
19701
19701
|
return _getDynamicValue.apply(this, arguments);
|
|
19702
19702
|
};
|
|
19703
19703
|
items = selectedItems !== null && selectedItems !== void 0 ? selectedItems : configuration.items;
|
|
19704
|
-
_iterator4 = _createForOfIteratorHelper$
|
|
19704
|
+
_iterator4 = _createForOfIteratorHelper$L(items);
|
|
19705
19705
|
_context6.prev = 4;
|
|
19706
19706
|
_iterator4.s();
|
|
19707
19707
|
case 6:
|
|
@@ -19817,7 +19817,7 @@ function useFormData (_ref) {
|
|
|
19817
19817
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
19818
19818
|
while (1) switch (_context3.prev = _context3.next) {
|
|
19819
19819
|
case 0:
|
|
19820
|
-
_iterator3 = _createForOfIteratorHelper$
|
|
19820
|
+
_iterator3 = _createForOfIteratorHelper$L(items);
|
|
19821
19821
|
_context3.prev = 1;
|
|
19822
19822
|
_iterator3.s();
|
|
19823
19823
|
case 3:
|
|
@@ -20475,15 +20475,15 @@ var InputComponent = function InputComponent(_ref, ref) {
|
|
|
20475
20475
|
};
|
|
20476
20476
|
var InputComponent$1 = observer(/*#__PURE__*/React.forwardRef(InputComponent));
|
|
20477
20477
|
|
|
20478
|
-
function _createForOfIteratorHelper$
|
|
20479
|
-
function _unsupportedIterableToArray$
|
|
20480
|
-
function _arrayLikeToArray$
|
|
20478
|
+
function _createForOfIteratorHelper$K(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$K(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
20479
|
+
function _unsupportedIterableToArray$K(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$K(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$K(r, a) : void 0; } }
|
|
20480
|
+
function _arrayLikeToArray$K(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
20481
20481
|
function getCombinedValues(data, pattern) {
|
|
20482
20482
|
if (!pattern || !data) {
|
|
20483
20483
|
return data;
|
|
20484
20484
|
}
|
|
20485
20485
|
var value = pattern;
|
|
20486
|
-
var _iterator = _createForOfIteratorHelper$
|
|
20486
|
+
var _iterator = _createForOfIteratorHelper$K(pattern.matchAll(/\$\{(.*?)\}/g)),
|
|
20487
20487
|
_step;
|
|
20488
20488
|
try {
|
|
20489
20489
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -20499,7 +20499,7 @@ function getCombinedValues(data, pattern) {
|
|
|
20499
20499
|
return value;
|
|
20500
20500
|
}
|
|
20501
20501
|
|
|
20502
|
-
var LOG$
|
|
20502
|
+
var LOG$o = getLogger('Backoffice', 'SelectSimple');
|
|
20503
20503
|
function useSelectSimpleData (_ref) {
|
|
20504
20504
|
var apiInterface = _ref.apiInterface,
|
|
20505
20505
|
selectMapping = _ref.selectMapping,
|
|
@@ -20574,7 +20574,7 @@ function useSelectSimpleData (_ref) {
|
|
|
20574
20574
|
var _options$;
|
|
20575
20575
|
setOptions(options);
|
|
20576
20576
|
if (value && options) {
|
|
20577
|
-
LOG$
|
|
20577
|
+
LOG$o.debug('value changed', toJS(value), toJS(options));
|
|
20578
20578
|
var _selected = findByValue(value, options, selectMapping);
|
|
20579
20579
|
var selectedValues = Array.isArray(_selected) ? _selected.map(function (item) {
|
|
20580
20580
|
return item.value;
|
|
@@ -20586,7 +20586,7 @@ function useSelectSimpleData (_ref) {
|
|
|
20586
20586
|
};
|
|
20587
20587
|
useEffect(function () {
|
|
20588
20588
|
if (configuredOptions) {
|
|
20589
|
-
if (apiHandler.canReadList) LOG$
|
|
20589
|
+
if (apiHandler.canReadList) LOG$o.warn('If options are provided, apiInterface will not be used');
|
|
20590
20590
|
setLoadedOptions(configuredOptions);
|
|
20591
20591
|
setLoading(false);
|
|
20592
20592
|
return;
|
|
@@ -20639,7 +20639,7 @@ function findByValue(value, options, selectMapping) {
|
|
|
20639
20639
|
return (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? option.value == value : getCombinedValues(option.data, selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.value) == getCombinedValues(value, selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.value);
|
|
20640
20640
|
});
|
|
20641
20641
|
if (!option) {
|
|
20642
|
-
LOG$
|
|
20642
|
+
LOG$o.debug('findByValue: option not found, add dummy option for current value', value, options);
|
|
20643
20643
|
//TODO: if we and server side filtering, the dummy option must be handled differently
|
|
20644
20644
|
option = {
|
|
20645
20645
|
label: (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? value : typeof (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.label) === 'function' ? selectMapping.label(value) : getCombinedValues(value, selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.label),
|
|
@@ -21723,9 +21723,9 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
21723
21723
|
});
|
|
21724
21724
|
}
|
|
21725
21725
|
|
|
21726
|
-
function _createForOfIteratorHelper$
|
|
21727
|
-
function _unsupportedIterableToArray$
|
|
21728
|
-
function _arrayLikeToArray$
|
|
21726
|
+
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; } } }; }
|
|
21727
|
+
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; } }
|
|
21728
|
+
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; }
|
|
21729
21729
|
function ownKeys$1S(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21730
21730
|
function _objectSpread$1S(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1S(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1S(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21731
21731
|
function useSelectData (_ref) {
|
|
@@ -21981,7 +21981,7 @@ function useSelectData (_ref) {
|
|
|
21981
21981
|
}
|
|
21982
21982
|
emails = initData;
|
|
21983
21983
|
optionByValue = new Map();
|
|
21984
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
21984
|
+
_iterator2 = _createForOfIteratorHelper$J(emails);
|
|
21985
21985
|
_context4.prev = 12;
|
|
21986
21986
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
21987
21987
|
var email, list, opt;
|
|
@@ -22048,7 +22048,7 @@ function useSelectData (_ref) {
|
|
|
22048
22048
|
}
|
|
22049
22049
|
keys = initData;
|
|
22050
22050
|
_optionByValue = new Map();
|
|
22051
|
-
_iterator3 = _createForOfIteratorHelper$
|
|
22051
|
+
_iterator3 = _createForOfIteratorHelper$J(keys);
|
|
22052
22052
|
_context4.prev = 35;
|
|
22053
22053
|
_loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2() {
|
|
22054
22054
|
var key, list, opt;
|
|
@@ -22276,7 +22276,7 @@ function useSelectData (_ref) {
|
|
|
22276
22276
|
var verifySelection = function verifySelection(opt) {
|
|
22277
22277
|
if (disabledConfig == undefined) return [];
|
|
22278
22278
|
var _missingFields = [];
|
|
22279
|
-
var _iterator = _createForOfIteratorHelper$
|
|
22279
|
+
var _iterator = _createForOfIteratorHelper$J(disabledConfig),
|
|
22280
22280
|
_step;
|
|
22281
22281
|
try {
|
|
22282
22282
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -22678,7 +22678,7 @@ styleInject(css_248z$W);
|
|
|
22678
22678
|
|
|
22679
22679
|
function ownKeys$1R(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22680
22680
|
function _objectSpread$1R(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1R(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1R(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22681
|
-
var LOG$
|
|
22681
|
+
var LOG$n = getLogger('Backoffice', 'Translation Form');
|
|
22682
22682
|
function useTranslationHook (item, state) {
|
|
22683
22683
|
var root = useStore();
|
|
22684
22684
|
var _useDivaCore = useDivaCore(),
|
|
@@ -22756,7 +22756,7 @@ function useTranslationHook (item, state) {
|
|
|
22756
22756
|
case 23:
|
|
22757
22757
|
_context.prev = 23;
|
|
22758
22758
|
_context.t2 = _context["catch"](9);
|
|
22759
|
-
LOG$
|
|
22759
|
+
LOG$n.error({
|
|
22760
22760
|
message: 'Error on translating ' + value,
|
|
22761
22761
|
name: ''
|
|
22762
22762
|
});
|
|
@@ -23035,7 +23035,7 @@ function FileInput(_ref3) {
|
|
|
23035
23035
|
});
|
|
23036
23036
|
}
|
|
23037
23037
|
|
|
23038
|
-
var LOG$
|
|
23038
|
+
var LOG$m = getLogger('Backoffice', 'AssetManager');
|
|
23039
23039
|
function Upload (_ref) {
|
|
23040
23040
|
var allowedTypes = _ref.allowedTypes,
|
|
23041
23041
|
media = _ref.media,
|
|
@@ -23067,10 +23067,10 @@ function Upload (_ref) {
|
|
|
23067
23067
|
if (!e) {
|
|
23068
23068
|
setError === null || setError === void 0 || setError(undefined);
|
|
23069
23069
|
} else if (e instanceof DivaError) {
|
|
23070
|
-
LOG$
|
|
23070
|
+
LOG$m.error(e);
|
|
23071
23071
|
setError(t('backoffice.mediaupload.error.' + e.name));
|
|
23072
23072
|
} else {
|
|
23073
|
-
LOG$
|
|
23073
|
+
LOG$m.error(new DivaError('An unexpected error occurred', {
|
|
23074
23074
|
cause: e
|
|
23075
23075
|
}));
|
|
23076
23076
|
setError(t('backoffice.mediaupload.error.unknown'));
|
|
@@ -23489,9 +23489,9 @@ function FormSlider(_ref) {
|
|
|
23489
23489
|
});
|
|
23490
23490
|
}
|
|
23491
23491
|
|
|
23492
|
-
function _createForOfIteratorHelper$
|
|
23493
|
-
function _unsupportedIterableToArray$
|
|
23494
|
-
function _arrayLikeToArray$
|
|
23492
|
+
function _createForOfIteratorHelper$I(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$I(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
23493
|
+
function _unsupportedIterableToArray$I(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$I(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$I(r, a) : void 0; } }
|
|
23494
|
+
function _arrayLikeToArray$I(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
23495
23495
|
function ownKeys$1O(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23496
23496
|
function _objectSpread$1O(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1O(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1O(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23497
23497
|
function getElement(item, setCanSave, state, absoluteName, _onChange, _onError, root, form, hidden, postFixName, formName) {
|
|
@@ -23606,7 +23606,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
|
|
|
23606
23606
|
mappingData: state.data,
|
|
23607
23607
|
callback: function callback(data) {
|
|
23608
23608
|
if (!item.callbackMapping) return;
|
|
23609
|
-
var _iterator = _createForOfIteratorHelper$
|
|
23609
|
+
var _iterator = _createForOfIteratorHelper$I(item.callbackMapping),
|
|
23610
23610
|
_step;
|
|
23611
23611
|
try {
|
|
23612
23612
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -23856,9 +23856,9 @@ function isReadonly(item, data) {
|
|
|
23856
23856
|
|
|
23857
23857
|
function ownKeys$1N(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23858
23858
|
function _objectSpread$1N(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1N(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1N(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23859
|
-
function _createForOfIteratorHelper$
|
|
23860
|
-
function _unsupportedIterableToArray$
|
|
23861
|
-
function _arrayLikeToArray$
|
|
23859
|
+
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; } } }; }
|
|
23860
|
+
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; } }
|
|
23861
|
+
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; }
|
|
23862
23862
|
var Presets = function Presets(_ref) {
|
|
23863
23863
|
var state = _ref.state,
|
|
23864
23864
|
apiHandler = _ref.apiHandler,
|
|
@@ -23893,7 +23893,7 @@ var Presets = function Presets(_ref) {
|
|
|
23893
23893
|
if (state.selectedItems == undefined) return;
|
|
23894
23894
|
setIsModalVisible(false);
|
|
23895
23895
|
var names = [];
|
|
23896
|
-
var _iterator = _createForOfIteratorHelper$
|
|
23896
|
+
var _iterator = _createForOfIteratorHelper$H(state.selectedItems),
|
|
23897
23897
|
_step;
|
|
23898
23898
|
try {
|
|
23899
23899
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -24071,7 +24071,7 @@ function ItemSelector(_ref) {
|
|
|
24071
24071
|
});
|
|
24072
24072
|
}
|
|
24073
24073
|
|
|
24074
|
-
var LOG$
|
|
24074
|
+
var LOG$l = getLogger('Backoffice', 'Form');
|
|
24075
24075
|
function toNamePath$1(name) {
|
|
24076
24076
|
if (name === undefined || name === '') return [];
|
|
24077
24077
|
return Array.isArray(name) ? name : [name];
|
|
@@ -24192,13 +24192,13 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
|
|
|
24192
24192
|
var onErrorInternal = function onErrorInternal(err, errorText) {
|
|
24193
24193
|
if (err instanceof DivaError && err.name) {
|
|
24194
24194
|
var _state$configuration$;
|
|
24195
|
-
LOG$
|
|
24195
|
+
LOG$l.error(err);
|
|
24196
24196
|
var errorTranslation = (_state$configuration$ = state.configuration.onError) === null || _state$configuration$ === void 0 ? void 0 : _state$configuration$[err.name];
|
|
24197
24197
|
onError === null || onError === void 0 || onError(errorTranslation ? t(errorTranslation, {
|
|
24198
24198
|
defaultValue: errorText
|
|
24199
24199
|
}) : err.message, false);
|
|
24200
24200
|
} else {
|
|
24201
|
-
LOG$
|
|
24201
|
+
LOG$l.error(new DivaError('An unexpected error prevented finishing', {
|
|
24202
24202
|
cause: err,
|
|
24203
24203
|
code: 'BACKO_0002'
|
|
24204
24204
|
}));
|
|
@@ -24451,9 +24451,9 @@ var Form$1 = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
|
|
|
24451
24451
|
|
|
24452
24452
|
function ownKeys$1L(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24453
24453
|
function _objectSpread$1L(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1L(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1L(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24454
|
-
function _createForOfIteratorHelper$
|
|
24455
|
-
function _unsupportedIterableToArray$
|
|
24456
|
-
function _arrayLikeToArray$
|
|
24454
|
+
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; } } }; }
|
|
24455
|
+
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; } }
|
|
24456
|
+
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; }
|
|
24457
24457
|
function useRoleSelectorData (_ref) {
|
|
24458
24458
|
var userId = _ref.userId,
|
|
24459
24459
|
id = _ref.id;
|
|
@@ -24610,7 +24610,7 @@ function useRoleSelectorData (_ref) {
|
|
|
24610
24610
|
} else {
|
|
24611
24611
|
var internalOptions = options;
|
|
24612
24612
|
var organizationList = [];
|
|
24613
|
-
var _iterator = _createForOfIteratorHelper$
|
|
24613
|
+
var _iterator = _createForOfIteratorHelper$G(selected),
|
|
24614
24614
|
_step;
|
|
24615
24615
|
try {
|
|
24616
24616
|
var _loop = function _loop() {
|
|
@@ -24745,7 +24745,7 @@ function useRoleSelectorData (_ref) {
|
|
|
24745
24745
|
while (1) switch (_context5.prev = _context5.next) {
|
|
24746
24746
|
case 0:
|
|
24747
24747
|
setLoading(true);
|
|
24748
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
24748
|
+
_iterator2 = _createForOfIteratorHelper$G(addedRoles);
|
|
24749
24749
|
_context5.prev = 2;
|
|
24750
24750
|
_iterator2.s();
|
|
24751
24751
|
case 4:
|
|
@@ -24754,7 +24754,7 @@ function useRoleSelectorData (_ref) {
|
|
|
24754
24754
|
break;
|
|
24755
24755
|
}
|
|
24756
24756
|
role = _step2.value;
|
|
24757
|
-
_iterator4 = _createForOfIteratorHelper$
|
|
24757
|
+
_iterator4 = _createForOfIteratorHelper$G(role.organizations);
|
|
24758
24758
|
_context5.prev = 7;
|
|
24759
24759
|
_iterator4.s();
|
|
24760
24760
|
case 9:
|
|
@@ -24794,7 +24794,7 @@ function useRoleSelectorData (_ref) {
|
|
|
24794
24794
|
_iterator2.f();
|
|
24795
24795
|
return _context5.finish(30);
|
|
24796
24796
|
case 33:
|
|
24797
|
-
_iterator3 = _createForOfIteratorHelper$
|
|
24797
|
+
_iterator3 = _createForOfIteratorHelper$G(removedRoles);
|
|
24798
24798
|
_context5.prev = 34;
|
|
24799
24799
|
_iterator3.s();
|
|
24800
24800
|
case 36:
|
|
@@ -24803,7 +24803,7 @@ function useRoleSelectorData (_ref) {
|
|
|
24803
24803
|
break;
|
|
24804
24804
|
}
|
|
24805
24805
|
_role = _step3.value;
|
|
24806
|
-
_iterator5 = _createForOfIteratorHelper$
|
|
24806
|
+
_iterator5 = _createForOfIteratorHelper$G(_role.organizations);
|
|
24807
24807
|
_context5.prev = 39;
|
|
24808
24808
|
_iterator5.s();
|
|
24809
24809
|
case 41:
|
|
@@ -24880,7 +24880,7 @@ function _updateRoles() {
|
|
|
24880
24880
|
return fetchUserRoles(apiHandler, userId, currentOrganization);
|
|
24881
24881
|
case 3:
|
|
24882
24882
|
userRoles = _context7.sent;
|
|
24883
|
-
_iterator6 = _createForOfIteratorHelper$
|
|
24883
|
+
_iterator6 = _createForOfIteratorHelper$G(roles);
|
|
24884
24884
|
_context7.prev = 5;
|
|
24885
24885
|
_loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2() {
|
|
24886
24886
|
var _removedRole$organiza3;
|
|
@@ -25218,9 +25218,9 @@ styleInject(css_248z$U);
|
|
|
25218
25218
|
|
|
25219
25219
|
function ownKeys$1K(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25220
25220
|
function _objectSpread$1K(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1K(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1K(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25221
|
-
function _createForOfIteratorHelper$
|
|
25222
|
-
function _unsupportedIterableToArray$
|
|
25223
|
-
function _arrayLikeToArray$
|
|
25221
|
+
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; } } }; }
|
|
25222
|
+
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; } }
|
|
25223
|
+
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; }
|
|
25224
25224
|
function generateCSV(_x, _x2) {
|
|
25225
25225
|
return _generateCSV.apply(this, arguments);
|
|
25226
25226
|
}
|
|
@@ -25250,7 +25250,7 @@ function _generateCSV() {
|
|
|
25250
25250
|
data = res.data;
|
|
25251
25251
|
count += res.data.length;
|
|
25252
25252
|
total = res.total;
|
|
25253
|
-
_iterator = _createForOfIteratorHelper$
|
|
25253
|
+
_iterator = _createForOfIteratorHelper$F(data);
|
|
25254
25254
|
_context2.prev = 10;
|
|
25255
25255
|
_iterator.s();
|
|
25256
25256
|
case 12:
|
|
@@ -25260,7 +25260,7 @@ function _generateCSV() {
|
|
|
25260
25260
|
}
|
|
25261
25261
|
parent = _step.value;
|
|
25262
25262
|
line = [];
|
|
25263
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
25263
|
+
_iterator2 = _createForOfIteratorHelper$F(exportParams.fields);
|
|
25264
25264
|
try {
|
|
25265
25265
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
25266
25266
|
field = _step2.value;
|
|
@@ -25403,9 +25403,9 @@ function _downloadFile() {
|
|
|
25403
25403
|
|
|
25404
25404
|
function ownKeys$1J(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25405
25405
|
function _objectSpread$1J(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1J(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1J(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25406
|
-
function _createForOfIteratorHelper$
|
|
25407
|
-
function _unsupportedIterableToArray$
|
|
25408
|
-
function _arrayLikeToArray$
|
|
25406
|
+
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; } } }; }
|
|
25407
|
+
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; } }
|
|
25408
|
+
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; }
|
|
25409
25409
|
var deletedObjects = [];
|
|
25410
25410
|
var addedObjects = [];
|
|
25411
25411
|
|
|
@@ -25530,7 +25530,7 @@ function useRelationSelectorData (_ref) {
|
|
|
25530
25530
|
});
|
|
25531
25531
|
roles = [];
|
|
25532
25532
|
filter = {};
|
|
25533
|
-
_iterator3 = _createForOfIteratorHelper$
|
|
25533
|
+
_iterator3 = _createForOfIteratorHelper$E(configuration.search.fields);
|
|
25534
25534
|
try {
|
|
25535
25535
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
25536
25536
|
searchField = _step3.value;
|
|
@@ -25677,7 +25677,7 @@ function useRelationSelectorData (_ref) {
|
|
|
25677
25677
|
filteredItems.push(data === null || data === void 0 ? void 0 : data._id);
|
|
25678
25678
|
}
|
|
25679
25679
|
}
|
|
25680
|
-
_iterator4 = _createForOfIteratorHelper$
|
|
25680
|
+
_iterator4 = _createForOfIteratorHelper$E(addedObjects);
|
|
25681
25681
|
_context3.prev = 7;
|
|
25682
25682
|
_iterator4.s();
|
|
25683
25683
|
case 9:
|
|
@@ -25814,7 +25814,7 @@ function useRelationSelectorData (_ref) {
|
|
|
25814
25814
|
return;
|
|
25815
25815
|
}
|
|
25816
25816
|
});
|
|
25817
|
-
var _iterator = _createForOfIteratorHelper$
|
|
25817
|
+
var _iterator = _createForOfIteratorHelper$E(activeItems),
|
|
25818
25818
|
_step;
|
|
25819
25819
|
try {
|
|
25820
25820
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -25944,7 +25944,7 @@ function useRelationSelectorData (_ref) {
|
|
|
25944
25944
|
function mapToCascaderData(data) {
|
|
25945
25945
|
var options = [];
|
|
25946
25946
|
var tempCascaderData = [];
|
|
25947
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
25947
|
+
var _iterator2 = _createForOfIteratorHelper$E(data),
|
|
25948
25948
|
_step2;
|
|
25949
25949
|
try {
|
|
25950
25950
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -26028,9 +26028,9 @@ function useRelationSelectorData (_ref) {
|
|
|
26028
26028
|
|
|
26029
26029
|
function ownKeys$1I(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26030
26030
|
function _objectSpread$1I(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1I(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1I(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26031
|
-
function _createForOfIteratorHelper$
|
|
26032
|
-
function _unsupportedIterableToArray$
|
|
26033
|
-
function _arrayLikeToArray$
|
|
26031
|
+
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; } } }; }
|
|
26032
|
+
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; } }
|
|
26033
|
+
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; }
|
|
26034
26034
|
function resolveActionErrorText(action, t) {
|
|
26035
26035
|
if (!action.errorText) return undefined;
|
|
26036
26036
|
return t(action.errorText);
|
|
@@ -26066,7 +26066,7 @@ function ActionButton (_ref) {
|
|
|
26066
26066
|
};
|
|
26067
26067
|
var disable = false;
|
|
26068
26068
|
if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
|
|
26069
|
-
var _iterator = _createForOfIteratorHelper$
|
|
26069
|
+
var _iterator = _createForOfIteratorHelper$D(ruleData !== null && ruleData !== void 0 ? ruleData : data),
|
|
26070
26070
|
_step;
|
|
26071
26071
|
try {
|
|
26072
26072
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -26163,7 +26163,7 @@ function ActionButton (_ref) {
|
|
|
26163
26163
|
_context.next = 20;
|
|
26164
26164
|
break;
|
|
26165
26165
|
}
|
|
26166
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
26166
|
+
_iterator2 = _createForOfIteratorHelper$D(action.switchValues);
|
|
26167
26167
|
try {
|
|
26168
26168
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
26169
26169
|
element = _step2.value;
|
|
@@ -26226,7 +26226,7 @@ function ActionButton (_ref) {
|
|
|
26226
26226
|
switch (action.actionType) {
|
|
26227
26227
|
case 'SwitchButton':
|
|
26228
26228
|
var switchLabel;
|
|
26229
|
-
var _iterator3 = _createForOfIteratorHelper$
|
|
26229
|
+
var _iterator3 = _createForOfIteratorHelper$D(action.switchLable),
|
|
26230
26230
|
_step3;
|
|
26231
26231
|
try {
|
|
26232
26232
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
@@ -26336,12 +26336,12 @@ function A(props) {
|
|
|
26336
26336
|
return /*#__PURE__*/jsx("a", _objectSpread$1I({}, props));
|
|
26337
26337
|
}
|
|
26338
26338
|
|
|
26339
|
-
function _createForOfIteratorHelper$
|
|
26340
|
-
function _unsupportedIterableToArray$
|
|
26341
|
-
function _arrayLikeToArray$
|
|
26339
|
+
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; } } }; }
|
|
26340
|
+
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; } }
|
|
26341
|
+
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; }
|
|
26342
26342
|
function filter$1(input, getActiveItem, filterFields) {
|
|
26343
26343
|
var filter = {};
|
|
26344
|
-
var _iterator = _createForOfIteratorHelper$
|
|
26344
|
+
var _iterator = _createForOfIteratorHelper$C(filterFields),
|
|
26345
26345
|
_step;
|
|
26346
26346
|
try {
|
|
26347
26347
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -26984,7 +26984,7 @@ var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
|
|
|
26984
26984
|
|
|
26985
26985
|
function ownKeys$1F(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26986
26986
|
function _objectSpread$1F(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1F(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1F(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26987
|
-
var LOG$
|
|
26987
|
+
var LOG$k = getLogger('Backoffice', 'SelectOrCreate');
|
|
26988
26988
|
function useSelectOrCreateData (_ref) {
|
|
26989
26989
|
var id = _ref.id,
|
|
26990
26990
|
data = _ref.data,
|
|
@@ -27053,13 +27053,13 @@ function useSelectOrCreateData (_ref) {
|
|
|
27053
27053
|
var _configuration$onErro;
|
|
27054
27054
|
var errorCode = e.name;
|
|
27055
27055
|
var errorMessage = (_configuration$onErro = configuration.onError) === null || _configuration$onErro === void 0 ? void 0 : _configuration$onErro[errorCode];
|
|
27056
|
-
LOG$
|
|
27056
|
+
LOG$k.error(e);
|
|
27057
27057
|
if (errorMessage) {
|
|
27058
27058
|
onError === null || onError === void 0 || onError(errorMessage, false);
|
|
27059
27059
|
return;
|
|
27060
27060
|
}
|
|
27061
27061
|
}
|
|
27062
|
-
LOG$
|
|
27062
|
+
LOG$k.error(new DivaError(message, {
|
|
27063
27063
|
cause: e,
|
|
27064
27064
|
code: code
|
|
27065
27065
|
}));
|
|
@@ -27706,7 +27706,7 @@ var ListWrapper = function ListWrapper(props, ref) {
|
|
|
27706
27706
|
};
|
|
27707
27707
|
var List = observer(/*#__PURE__*/React.forwardRef(ListWrapper));
|
|
27708
27708
|
|
|
27709
|
-
var LOG$
|
|
27709
|
+
var LOG$j = getLogger('Backoffice', 'JsonEditor');
|
|
27710
27710
|
function useJsonEditorData (id, setCanSave, onChange, onError) {
|
|
27711
27711
|
var _useState = useState(0),
|
|
27712
27712
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -27795,7 +27795,7 @@ function useJsonEditorData (id, setCanSave, onChange, onError) {
|
|
|
27795
27795
|
case 14:
|
|
27796
27796
|
_context.prev = 14;
|
|
27797
27797
|
_context.t0 = _context["catch"](0);
|
|
27798
|
-
LOG$
|
|
27798
|
+
LOG$j.error(new DivaError('Error saving data', {
|
|
27799
27799
|
cause: _context.t0,
|
|
27800
27800
|
code: 'BACKO_0002'
|
|
27801
27801
|
}));
|
|
@@ -28232,9 +28232,9 @@ var ImageCropper = function ImageCropper(_ref, ref) {
|
|
|
28232
28232
|
};
|
|
28233
28233
|
var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
|
|
28234
28234
|
|
|
28235
|
-
function _createForOfIteratorHelper$
|
|
28236
|
-
function _unsupportedIterableToArray$
|
|
28237
|
-
function _arrayLikeToArray$
|
|
28235
|
+
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; } } }; }
|
|
28236
|
+
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; } }
|
|
28237
|
+
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; }
|
|
28238
28238
|
function ownKeys$1C(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28239
28239
|
function _objectSpread$1C(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1C(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1C(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28240
28240
|
function useDescriptions (_ref) {
|
|
@@ -28330,7 +28330,7 @@ function _getDisplayData() {
|
|
|
28330
28330
|
while (1) switch (_context4.prev = _context4.next) {
|
|
28331
28331
|
case 0:
|
|
28332
28332
|
displayData = _objectSpread$1C({}, data);
|
|
28333
|
-
_iterator = _createForOfIteratorHelper$
|
|
28333
|
+
_iterator = _createForOfIteratorHelper$B(items);
|
|
28334
28334
|
_context4.prev = 2;
|
|
28335
28335
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
28336
28336
|
var item, itemWithMappingData, apiHandler, response, mappingData;
|
|
@@ -28446,9 +28446,9 @@ var DescriptionWrapper = function DescriptionWrapper(_ref) {
|
|
|
28446
28446
|
};
|
|
28447
28447
|
var Description = observer(DescriptionWrapper);
|
|
28448
28448
|
|
|
28449
|
-
function _createForOfIteratorHelper$
|
|
28450
|
-
function _unsupportedIterableToArray$
|
|
28451
|
-
function _arrayLikeToArray$
|
|
28449
|
+
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; } } }; }
|
|
28450
|
+
function _unsupportedIterableToArray$A(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$A(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$A(r, a) : void 0; } }
|
|
28451
|
+
function _arrayLikeToArray$A(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; }
|
|
28452
28452
|
var FileUploadWrapper$1 = function FileUploadWrapper(_ref) {
|
|
28453
28453
|
var id = _ref.id;
|
|
28454
28454
|
var _useDivaCore = useDivaCore(),
|
|
@@ -28509,7 +28509,7 @@ var FileUploadWrapper$1 = function FileUploadWrapper(_ref) {
|
|
|
28509
28509
|
case 0:
|
|
28510
28510
|
setLoading(true);
|
|
28511
28511
|
_context.prev = 1;
|
|
28512
|
-
_iterator = _createForOfIteratorHelper$
|
|
28512
|
+
_iterator = _createForOfIteratorHelper$A(organizations);
|
|
28513
28513
|
_context.prev = 3;
|
|
28514
28514
|
_iterator.s();
|
|
28515
28515
|
case 5:
|
|
@@ -29143,9 +29143,9 @@ function BooleanCell (_ref) {
|
|
|
29143
29143
|
}
|
|
29144
29144
|
}
|
|
29145
29145
|
|
|
29146
|
-
function _createForOfIteratorHelper$
|
|
29147
|
-
function _unsupportedIterableToArray$
|
|
29148
|
-
function _arrayLikeToArray$
|
|
29146
|
+
function _createForOfIteratorHelper$z(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$z(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
29147
|
+
function _unsupportedIterableToArray$z(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$z(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$z(r, a) : void 0; } }
|
|
29148
|
+
function _arrayLikeToArray$z(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
29149
29149
|
function StringCell (_ref) {
|
|
29150
29150
|
var children = _ref.children,
|
|
29151
29151
|
column = _ref.column,
|
|
@@ -29263,7 +29263,7 @@ function matchesColorCondition(record, value, operation, field, onValue) {
|
|
|
29263
29263
|
}
|
|
29264
29264
|
function getColor(column, record, value) {
|
|
29265
29265
|
if (column.color && record) {
|
|
29266
|
-
var _iterator = _createForOfIteratorHelper$
|
|
29266
|
+
var _iterator = _createForOfIteratorHelper$z(column.color),
|
|
29267
29267
|
_step;
|
|
29268
29268
|
try {
|
|
29269
29269
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -29458,9 +29458,9 @@ function DropdownCell (_ref) {
|
|
|
29458
29458
|
}
|
|
29459
29459
|
}
|
|
29460
29460
|
|
|
29461
|
-
function _createForOfIteratorHelper$
|
|
29462
|
-
function _unsupportedIterableToArray$
|
|
29463
|
-
function _arrayLikeToArray$
|
|
29461
|
+
function _createForOfIteratorHelper$y(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$y(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
29462
|
+
function _unsupportedIterableToArray$y(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$y(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$y(r, a) : void 0; } }
|
|
29463
|
+
function _arrayLikeToArray$y(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
29464
29464
|
function MediaViewerCell (_ref) {
|
|
29465
29465
|
var children = _ref.children,
|
|
29466
29466
|
column = _ref.column;
|
|
@@ -29484,7 +29484,7 @@ function MediaViewerCell (_ref) {
|
|
|
29484
29484
|
if (column.imageEnding && !url.endsWith('glb')) previewUrl = url.endsWith('.jpg') ? url.replace('.jpg', '') + column.imageEnding + '.jpg' : url.replace('.png', '') + column.imageEnding + '.png';
|
|
29485
29485
|
if (column.includedFileEndings) {
|
|
29486
29486
|
var supported = false;
|
|
29487
|
-
var _iterator = _createForOfIteratorHelper$
|
|
29487
|
+
var _iterator = _createForOfIteratorHelper$y(column.includedFileEndings),
|
|
29488
29488
|
_step;
|
|
29489
29489
|
try {
|
|
29490
29490
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -29829,15 +29829,15 @@ function MediaItemViewerCell (_ref) {
|
|
|
29829
29829
|
});
|
|
29830
29830
|
}
|
|
29831
29831
|
|
|
29832
|
-
function _createForOfIteratorHelper$
|
|
29833
|
-
function _unsupportedIterableToArray$
|
|
29834
|
-
function _arrayLikeToArray$
|
|
29832
|
+
function _createForOfIteratorHelper$x(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$x(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
29833
|
+
function _unsupportedIterableToArray$x(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$x(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$x(r, a) : void 0; } }
|
|
29834
|
+
function _arrayLikeToArray$x(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
29835
29835
|
function IconCell (_ref) {
|
|
29836
29836
|
var children = _ref.children,
|
|
29837
29837
|
column = _ref.column;
|
|
29838
29838
|
if (!column) throw new Error('icon column doesnt support editing');
|
|
29839
29839
|
function resolveIconMapping(value) {
|
|
29840
|
-
var _iterator = _createForOfIteratorHelper$
|
|
29840
|
+
var _iterator = _createForOfIteratorHelper$x(column.iconMapping),
|
|
29841
29841
|
_step;
|
|
29842
29842
|
try {
|
|
29843
29843
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -29942,7 +29942,7 @@ var _excluded$a = ["index"],
|
|
|
29942
29942
|
_excluded2$1 = ["children", "dataIndex", "record", "handleSave", "column"];
|
|
29943
29943
|
function ownKeys$1y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29944
29944
|
function _objectSpread$1y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29945
|
-
var LOG$
|
|
29945
|
+
var LOG$i = getLogger('Backoffice', 'CellRenderer');
|
|
29946
29946
|
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
29947
29947
|
var CustomRow = function CustomRow(_ref) {
|
|
29948
29948
|
_ref.index;
|
|
@@ -29984,7 +29984,7 @@ var CustomCell = function CustomCell(_ref2) {
|
|
|
29984
29984
|
case 7:
|
|
29985
29985
|
_context.prev = 7;
|
|
29986
29986
|
_context.t0 = _context["catch"](0);
|
|
29987
|
-
LOG$
|
|
29987
|
+
LOG$i.error(new DivaError('Save failed', {
|
|
29988
29988
|
cause: _context.t0,
|
|
29989
29989
|
custom: {
|
|
29990
29990
|
code: 'BACKO_0002'
|
|
@@ -30409,9 +30409,9 @@ var SMChart = function SMChart(props) {
|
|
|
30409
30409
|
}) : /*#__PURE__*/jsx(Fragment, {});
|
|
30410
30410
|
};
|
|
30411
30411
|
|
|
30412
|
-
function _createForOfIteratorHelper$
|
|
30413
|
-
function _unsupportedIterableToArray$
|
|
30414
|
-
function _arrayLikeToArray$
|
|
30412
|
+
function _createForOfIteratorHelper$w(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$w(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
30413
|
+
function _unsupportedIterableToArray$w(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$w(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$w(r, a) : void 0; } }
|
|
30414
|
+
function _arrayLikeToArray$w(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
30415
30415
|
function ownKeys$1x(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30416
30416
|
function _objectSpread$1x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1x(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30417
30417
|
|
|
@@ -30564,7 +30564,7 @@ var useTools = function useTools(_ref) {
|
|
|
30564
30564
|
if (mainInformationWindowCodex) {
|
|
30565
30565
|
tools.push(createInformationWindow(mainInformationWindowCodex, false));
|
|
30566
30566
|
}
|
|
30567
|
-
var _iterator = _createForOfIteratorHelper$
|
|
30567
|
+
var _iterator = _createForOfIteratorHelper$w(conditionalTools || []),
|
|
30568
30568
|
_step;
|
|
30569
30569
|
try {
|
|
30570
30570
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -30631,9 +30631,9 @@ function InformationButton(_ref) {
|
|
|
30631
30631
|
|
|
30632
30632
|
function ownKeys$1w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30633
30633
|
function _objectSpread$1w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1w(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30634
|
-
function _createForOfIteratorHelper$
|
|
30635
|
-
function _unsupportedIterableToArray$
|
|
30636
|
-
function _arrayLikeToArray$
|
|
30634
|
+
function _createForOfIteratorHelper$v(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$v(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
30635
|
+
function _unsupportedIterableToArray$v(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$v(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$v(r, a) : void 0; } }
|
|
30636
|
+
function _arrayLikeToArray$v(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
30637
30637
|
dayjs.extend(customParseFormat);
|
|
30638
30638
|
dayjs.extend(advancedFormat);
|
|
30639
30639
|
dayjs.extend(weekday);
|
|
@@ -30641,7 +30641,7 @@ dayjs.extend(localeData);
|
|
|
30641
30641
|
dayjs.extend(weekOfYear);
|
|
30642
30642
|
dayjs.extend(weekYear);
|
|
30643
30643
|
Select.Option;
|
|
30644
|
-
var LOG$
|
|
30644
|
+
var LOG$h = getLogger('Backoffice', 'BaseTable');
|
|
30645
30645
|
|
|
30646
30646
|
/** Maps full `Select` onChange payload (often `option.data`) to the filter field value. */
|
|
30647
30647
|
function normalizeTableFilterSelectValue(selected, filterField) {
|
|
@@ -30697,12 +30697,12 @@ var TableWrapper = function TableWrapper(_ref) {
|
|
|
30697
30697
|
if (state.configuration.mergeFields && state.data) {
|
|
30698
30698
|
for (var i = 0; i < data.length; i++) {
|
|
30699
30699
|
var dt = flatten(data[i]);
|
|
30700
|
-
var _iterator = _createForOfIteratorHelper$
|
|
30700
|
+
var _iterator = _createForOfIteratorHelper$v(state.configuration.mergeFields),
|
|
30701
30701
|
_step;
|
|
30702
30702
|
try {
|
|
30703
30703
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
30704
30704
|
var merge = _step.value;
|
|
30705
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
30705
|
+
var _iterator2 = _createForOfIteratorHelper$v(merge.valueKeys),
|
|
30706
30706
|
_step2;
|
|
30707
30707
|
try {
|
|
30708
30708
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -31122,7 +31122,7 @@ function CopyButton(_ref5) {
|
|
|
31122
31122
|
case 0:
|
|
31123
31123
|
copyAction = state.configuration.copyAction;
|
|
31124
31124
|
if (((_state$configuration$20 = state.configuration.copyAction) === null || _state$configuration$20 === void 0 ? void 0 : _state$configuration$20.apiInterface) != undefined) {
|
|
31125
|
-
_iterator3 = _createForOfIteratorHelper$
|
|
31125
|
+
_iterator3 = _createForOfIteratorHelper$v(state.selected);
|
|
31126
31126
|
try {
|
|
31127
31127
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
31128
31128
|
selectedRow = _step3.value;
|
|
@@ -31253,7 +31253,7 @@ function BulkAction(_ref8) {
|
|
|
31253
31253
|
var allowed = useMemo(function () {
|
|
31254
31254
|
// if isValue is not set check if all fields have the same value, otherwise check if all fields have the given isValue
|
|
31255
31255
|
if (!action.rule) return true;
|
|
31256
|
-
var _iterator4 = _createForOfIteratorHelper$
|
|
31256
|
+
var _iterator4 = _createForOfIteratorHelper$v(action.rule),
|
|
31257
31257
|
_step4;
|
|
31258
31258
|
try {
|
|
31259
31259
|
var _loop = function _loop() {
|
|
@@ -31410,7 +31410,7 @@ function BulkAction(_ref8) {
|
|
|
31410
31410
|
progressBar.setProgressBarOpen(false);
|
|
31411
31411
|
progressBar.setProgressBarPercentage(0);
|
|
31412
31412
|
}
|
|
31413
|
-
LOG$
|
|
31413
|
+
LOG$h.error(new DivaError('Error changing data', {
|
|
31414
31414
|
cause: _context5.t6,
|
|
31415
31415
|
code: 'BACKO_0002'
|
|
31416
31416
|
}));
|
|
@@ -31476,9 +31476,9 @@ function SelectionText(_ref10) {
|
|
|
31476
31476
|
});
|
|
31477
31477
|
}
|
|
31478
31478
|
|
|
31479
|
-
function _createForOfIteratorHelper$
|
|
31480
|
-
function _unsupportedIterableToArray$
|
|
31481
|
-
function _arrayLikeToArray$
|
|
31479
|
+
function _createForOfIteratorHelper$u(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$u(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
31480
|
+
function _unsupportedIterableToArray$u(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$u(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$u(r, a) : void 0; } }
|
|
31481
|
+
function _arrayLikeToArray$u(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
31482
31482
|
function ownKeys$1v(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31483
31483
|
function _objectSpread$1v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31484
31484
|
function getColumnFilterProps (_ref) {
|
|
@@ -31893,7 +31893,7 @@ var selectProps = function selectProps(title, filter) {
|
|
|
31893
31893
|
var getMultiSelectDisplayValues = function getMultiSelectDisplayValues(selectedKeys, filter) {
|
|
31894
31894
|
var values = selectedKeys[selectedKeys.length - 1] === 'in' ? selectedKeys.slice(0, -1) : selectedKeys;
|
|
31895
31895
|
var displayValues = [];
|
|
31896
|
-
var _iterator = _createForOfIteratorHelper$
|
|
31896
|
+
var _iterator = _createForOfIteratorHelper$u(values),
|
|
31897
31897
|
_step;
|
|
31898
31898
|
try {
|
|
31899
31899
|
var _loop = function _loop() {
|
|
@@ -32689,12 +32689,12 @@ function objectHash (obj) {
|
|
|
32689
32689
|
return hash(hashable);
|
|
32690
32690
|
}
|
|
32691
32691
|
|
|
32692
|
-
function _createForOfIteratorHelper$
|
|
32693
|
-
function _unsupportedIterableToArray$
|
|
32694
|
-
function _arrayLikeToArray$
|
|
32692
|
+
function _createForOfIteratorHelper$t(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$t(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
32693
|
+
function _unsupportedIterableToArray$t(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$t(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$t(r, a) : void 0; } }
|
|
32694
|
+
function _arrayLikeToArray$t(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
32695
32695
|
function ownKeys$1q(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
32696
32696
|
function _objectSpread$1q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32697
|
-
var LOG$
|
|
32697
|
+
var LOG$g = getLogger('Backoffice', 'TableData');
|
|
32698
32698
|
function useTableData (_ref) {
|
|
32699
32699
|
var _persistedTableState$, _configuration$filter, _configuration$filter2, _ref2, _configuration$filter3, _configuration$filter4, _configuration$filter5, _ref3, _configuration$filter6, _configuration$filter7, _configuration$filter8, _persistedTableState$2, _configuration$filter9, _configuration$filter10, _persistedTableState$3, _configuration$bulkAc, _configuration$apiInt, _ref5, _configuration$readMa;
|
|
32700
32700
|
var id = _ref.id,
|
|
@@ -33169,7 +33169,7 @@ function useTableData (_ref) {
|
|
|
33169
33169
|
})) === null || _newData$filter2 === void 0 ? void 0 : _newData$filter2[0];
|
|
33170
33170
|
}
|
|
33171
33171
|
mapToggle = {};
|
|
33172
|
-
_iterator = _createForOfIteratorHelper$
|
|
33172
|
+
_iterator = _createForOfIteratorHelper$t((_configuration$filter25 = (_configuration$filter26 = configuration.filter) === null || _configuration$filter26 === void 0 || (_configuration$filter26 = _configuration$filter26.toggle) === null || _configuration$filter26 === void 0 ? void 0 : _configuration$filter26.fields) !== null && _configuration$filter25 !== void 0 ? _configuration$filter25 : []);
|
|
33173
33173
|
try {
|
|
33174
33174
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
33175
33175
|
field = _step.value;
|
|
@@ -33310,7 +33310,7 @@ function useTableData (_ref) {
|
|
|
33310
33310
|
var onGlobalFilterSelect = function onGlobalFilterSelect(value) {
|
|
33311
33311
|
var _configuration$filter27;
|
|
33312
33312
|
if (!((_configuration$filter27 = configuration.filter) !== null && _configuration$filter27 !== void 0 && _configuration$filter27.select)) {
|
|
33313
|
-
LOG$
|
|
33313
|
+
LOG$g.error(new DivaError('No global select filter defiend'));
|
|
33314
33314
|
return;
|
|
33315
33315
|
}
|
|
33316
33316
|
var newGlobalFilter = _objectSpread$1q({}, globalFilter);
|
|
@@ -33328,7 +33328,7 @@ function useTableData (_ref) {
|
|
|
33328
33328
|
var onGlobalFilterToggle = function onGlobalFilterToggle() {
|
|
33329
33329
|
var _configuration$filter28;
|
|
33330
33330
|
if (!((_configuration$filter28 = configuration.filter) !== null && _configuration$filter28 !== void 0 && _configuration$filter28.toggle)) {
|
|
33331
|
-
LOG$
|
|
33331
|
+
LOG$g.error(new DivaError('No global toggle filter defined'));
|
|
33332
33332
|
return;
|
|
33333
33333
|
}
|
|
33334
33334
|
var toggleFilter = {};
|
|
@@ -33351,7 +33351,7 @@ function useTableData (_ref) {
|
|
|
33351
33351
|
var onGlobalFilterSearch = function onGlobalFilterSearch(value) {
|
|
33352
33352
|
var _configuration$filter29;
|
|
33353
33353
|
if (!((_configuration$filter29 = configuration.filter) !== null && _configuration$filter29 !== void 0 && _configuration$filter29.search)) {
|
|
33354
|
-
LOG$
|
|
33354
|
+
LOG$g.error(new DivaError('No global search filter defiend'));
|
|
33355
33355
|
return;
|
|
33356
33356
|
}
|
|
33357
33357
|
var newGlobalFilter = _objectSpread$1q(_objectSpread$1q({}, globalFilter), {}, {
|
|
@@ -33375,7 +33375,7 @@ function useTableData (_ref) {
|
|
|
33375
33375
|
var onGlobalFilterPeriod = function onGlobalFilterPeriod(from, to) {
|
|
33376
33376
|
var _configuration$filter31;
|
|
33377
33377
|
if (!((_configuration$filter31 = configuration.filter) !== null && _configuration$filter31 !== void 0 && _configuration$filter31.period)) {
|
|
33378
|
-
LOG$
|
|
33378
|
+
LOG$g.error(new DivaError('No global period filter defiend'));
|
|
33379
33379
|
return;
|
|
33380
33380
|
}
|
|
33381
33381
|
var newGlobalFilter = _objectSpread$1q({}, globalFilter);
|
|
@@ -33450,9 +33450,9 @@ function Table (props) {
|
|
|
33450
33450
|
});
|
|
33451
33451
|
}
|
|
33452
33452
|
|
|
33453
|
-
function _createForOfIteratorHelper$
|
|
33454
|
-
function _unsupportedIterableToArray$
|
|
33455
|
-
function _arrayLikeToArray$
|
|
33453
|
+
function _createForOfIteratorHelper$s(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$s(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
33454
|
+
function _unsupportedIterableToArray$s(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$s(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$s(r, a) : void 0; } }
|
|
33455
|
+
function _arrayLikeToArray$s(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
33456
33456
|
function ownKeys$1o(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33457
33457
|
function _objectSpread$1o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33458
33458
|
function useAGGrid (_ref) {
|
|
@@ -33576,7 +33576,7 @@ function useAGGrid (_ref) {
|
|
|
33576
33576
|
_context.next = 51;
|
|
33577
33577
|
break;
|
|
33578
33578
|
}
|
|
33579
|
-
_iterator = _createForOfIteratorHelper$
|
|
33579
|
+
_iterator = _createForOfIteratorHelper$s(configuration.mergerFields);
|
|
33580
33580
|
_context.prev = 9;
|
|
33581
33581
|
_iterator.s();
|
|
33582
33582
|
case 11:
|
|
@@ -33593,7 +33593,7 @@ function useAGGrid (_ref) {
|
|
|
33593
33593
|
}
|
|
33594
33594
|
merged = '';
|
|
33595
33595
|
first = true;
|
|
33596
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
33596
|
+
_iterator2 = _createForOfIteratorHelper$s(mergeEntry.fieldId);
|
|
33597
33597
|
_context.prev = 18;
|
|
33598
33598
|
_iterator2.s();
|
|
33599
33599
|
case 20:
|
|
@@ -34111,9 +34111,9 @@ var CustomText$1 = observer(CustomText);
|
|
|
34111
34111
|
|
|
34112
34112
|
function ownKeys$1l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34113
34113
|
function _objectSpread$1l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34114
|
-
function _createForOfIteratorHelper$
|
|
34115
|
-
function _unsupportedIterableToArray$
|
|
34116
|
-
function _arrayLikeToArray$
|
|
34114
|
+
function _createForOfIteratorHelper$r(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$r(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
34115
|
+
function _unsupportedIterableToArray$r(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$r(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$r(r, a) : void 0; } }
|
|
34116
|
+
function _arrayLikeToArray$r(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
34117
34117
|
function useFilterBoxData (id) {
|
|
34118
34118
|
var root = useStore();
|
|
34119
34119
|
var _useMemo = useMemo(function () {
|
|
@@ -34161,7 +34161,7 @@ function useFilterBoxData (id) {
|
|
|
34161
34161
|
}
|
|
34162
34162
|
function reducer(state, actions) {
|
|
34163
34163
|
var ob = {};
|
|
34164
|
-
var _iterator = _createForOfIteratorHelper$
|
|
34164
|
+
var _iterator = _createForOfIteratorHelper$r(actions),
|
|
34165
34165
|
_step;
|
|
34166
34166
|
try {
|
|
34167
34167
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -34184,9 +34184,9 @@ function useFilterBoxData (id) {
|
|
|
34184
34184
|
};
|
|
34185
34185
|
}
|
|
34186
34186
|
|
|
34187
|
-
function _createForOfIteratorHelper$
|
|
34188
|
-
function _unsupportedIterableToArray$
|
|
34189
|
-
function _arrayLikeToArray$
|
|
34187
|
+
function _createForOfIteratorHelper$q(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$q(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
34188
|
+
function _unsupportedIterableToArray$q(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$q(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$q(r, a) : void 0; } }
|
|
34189
|
+
function _arrayLikeToArray$q(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
34190
34190
|
function ownKeys$1k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34191
34191
|
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34192
34192
|
var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
@@ -34324,7 +34324,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
|
|
|
34324
34324
|
}
|
|
34325
34325
|
function getLabelByValue(targetValue, data) {
|
|
34326
34326
|
if (!data) return;
|
|
34327
|
-
var _iterator = _createForOfIteratorHelper$
|
|
34327
|
+
var _iterator = _createForOfIteratorHelper$q(data),
|
|
34328
34328
|
_step;
|
|
34329
34329
|
try {
|
|
34330
34330
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -38126,6 +38126,21 @@ var TablePackages = observer(function () {
|
|
|
38126
38126
|
field: "published.".concat(organizationId, ".publishedByDisplayText"),
|
|
38127
38127
|
editable: false,
|
|
38128
38128
|
isDictionary: 1
|
|
38129
|
+
}, {
|
|
38130
|
+
// computed by the package list endpoint, not stored - so it can neither be sorted nor filtered server-side
|
|
38131
|
+
headerName: 'backoffice.idmEnricher.packages.label.usedInCollections',
|
|
38132
|
+
field: 'usedInCollections',
|
|
38133
|
+
editable: false,
|
|
38134
|
+
sortable: false,
|
|
38135
|
+
filter: false,
|
|
38136
|
+
valueGetter: function valueGetter(_ref12) {
|
|
38137
|
+
var _data$usedInCollectio;
|
|
38138
|
+
var data = _ref12.data;
|
|
38139
|
+
return ((_data$usedInCollectio = data === null || data === void 0 ? void 0 : data.usedInCollections) !== null && _data$usedInCollectio !== void 0 ? _data$usedInCollectio : []).map(function (c) {
|
|
38140
|
+
var _c$name;
|
|
38141
|
+
return DivaUtils.getLocals((_c$name = c.name) !== null && _c$name !== void 0 ? _c$name : {}, i18n.language);
|
|
38142
|
+
}).filter(Boolean).join(', ');
|
|
38143
|
+
}
|
|
38129
38144
|
}, {
|
|
38130
38145
|
headerName: 'backoffice.idmEnricher.general.label._id',
|
|
38131
38146
|
field: '_id',
|
|
@@ -49213,9 +49228,9 @@ styleInject(css_248z$y);
|
|
|
49213
49228
|
|
|
49214
49229
|
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; }
|
|
49215
49230
|
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; }
|
|
49216
|
-
function _createForOfIteratorHelper$
|
|
49217
|
-
function _unsupportedIterableToArray$
|
|
49218
|
-
function _arrayLikeToArray$
|
|
49231
|
+
function _createForOfIteratorHelper$p(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$p(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
49232
|
+
function _unsupportedIterableToArray$p(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$p(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$p(r, a) : void 0; } }
|
|
49233
|
+
function _arrayLikeToArray$p(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
49219
49234
|
/**
|
|
49220
49235
|
* Parse / serialize option-combination "actions" cell strings (decisionType 2).
|
|
49221
49236
|
* Format: ACTION_TYPE:body with optional suffix =REFERENCE_TYPE#tail
|
|
@@ -49408,7 +49423,7 @@ function parseActionsCellValue(values) {
|
|
|
49408
49423
|
var list = values !== null && values !== void 0 ? values : [];
|
|
49409
49424
|
var actions = [];
|
|
49410
49425
|
var dropped = [];
|
|
49411
|
-
var _iterator = _createForOfIteratorHelper$
|
|
49426
|
+
var _iterator = _createForOfIteratorHelper$p(list),
|
|
49412
49427
|
_step;
|
|
49413
49428
|
try {
|
|
49414
49429
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -49537,7 +49552,7 @@ function serializeAction(action) {
|
|
|
49537
49552
|
}
|
|
49538
49553
|
function serializeActions(actions) {
|
|
49539
49554
|
var out = [];
|
|
49540
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
49555
|
+
var _iterator2 = _createForOfIteratorHelper$p(actions),
|
|
49541
49556
|
_step2;
|
|
49542
49557
|
try {
|
|
49543
49558
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -52601,9 +52616,9 @@ function activeFilterParser(colId, accessory) {
|
|
|
52601
52616
|
|
|
52602
52617
|
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; }
|
|
52603
52618
|
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; }
|
|
52604
|
-
function _createForOfIteratorHelper$
|
|
52605
|
-
function _unsupportedIterableToArray$
|
|
52606
|
-
function _arrayLikeToArray$
|
|
52619
|
+
function _createForOfIteratorHelper$o(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$o(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
52620
|
+
function _unsupportedIterableToArray$o(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$o(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$o(r, a) : void 0; } }
|
|
52621
|
+
function _arrayLikeToArray$o(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
52607
52622
|
/**
|
|
52608
52623
|
* Converts between the nested IDM ADDITIONAL_ITEMS groups of an item (mandatory/optional selection groups,
|
|
52609
52624
|
* SET_NO 1-9 per side) and the flat one-cell-per-accessory matrix the Zusatzartikel grid edits.
|
|
@@ -52663,7 +52678,7 @@ function readCells(item, isV4) {
|
|
|
52663
52678
|
for (var _i = 0, _arr = (_item$mandatory = item === null || item === void 0 ? void 0 : item[mandatory]) !== null && _item$mandatory !== void 0 ? _item$mandatory : []; _i < _arr.length; _i++) {
|
|
52664
52679
|
var _item$mandatory, _group$itemRef;
|
|
52665
52680
|
var group = _arr[_i];
|
|
52666
|
-
var _iterator = _createForOfIteratorHelper$
|
|
52681
|
+
var _iterator = _createForOfIteratorHelper$o((_group$itemRef = group.itemRef) !== null && _group$itemRef !== void 0 ? _group$itemRef : []),
|
|
52667
52682
|
_step;
|
|
52668
52683
|
try {
|
|
52669
52684
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -52679,7 +52694,7 @@ function readCells(item, isV4) {
|
|
|
52679
52694
|
for (var _i2 = 0, _arr2 = (_item$optional = item === null || item === void 0 ? void 0 : item[optional]) !== null && _item$optional !== void 0 ? _item$optional : []; _i2 < _arr2.length; _i2++) {
|
|
52680
52695
|
var _item$optional, _group$itemRef2;
|
|
52681
52696
|
var _group = _arr2[_i2];
|
|
52682
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
52697
|
+
var _iterator2 = _createForOfIteratorHelper$o((_group$itemRef2 = _group.itemRef) !== null && _group$itemRef2 !== void 0 ? _group$itemRef2 : []),
|
|
52683
52698
|
_step2;
|
|
52684
52699
|
try {
|
|
52685
52700
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -53371,9 +53386,9 @@ function AddAccessoryModal(_ref) {
|
|
|
53371
53386
|
});
|
|
53372
53387
|
}
|
|
53373
53388
|
|
|
53374
|
-
function _createForOfIteratorHelper$
|
|
53375
|
-
function _unsupportedIterableToArray$
|
|
53376
|
-
function _arrayLikeToArray$
|
|
53389
|
+
function _createForOfIteratorHelper$n(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$n(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
53390
|
+
function _unsupportedIterableToArray$n(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$n(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$n(r, a) : void 0; } }
|
|
53391
|
+
function _arrayLikeToArray$n(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
53377
53392
|
/**
|
|
53378
53393
|
* The accessory columns of the Zusatzartikel grid, fetched serie-wide from idm-service (rows are paged, so the
|
|
53379
53394
|
* column set cannot be derived from loaded rows). Columns added via `addColumns` live locally until a cell is filled.
|
|
@@ -53420,7 +53435,7 @@ function useAdditionalItemRefs(catalogId, serieId) {
|
|
|
53420
53435
|
return c.key;
|
|
53421
53436
|
}));
|
|
53422
53437
|
var fresh = [];
|
|
53423
|
-
var _iterator = _createForOfIteratorHelper$
|
|
53438
|
+
var _iterator = _createForOfIteratorHelper$n(added),
|
|
53424
53439
|
_step;
|
|
53425
53440
|
try {
|
|
53426
53441
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -54881,11 +54896,19 @@ function TableCollections () {
|
|
|
54881
54896
|
},
|
|
54882
54897
|
onDataUpdated: function onDataUpdated(_ref) {
|
|
54883
54898
|
var updates = _ref.updates;
|
|
54899
|
+
// a removed row has no node any more when the hook fires; its data still carries the id (the row id of this grid)
|
|
54884
54900
|
var current = updates.find(function (update) {
|
|
54885
|
-
|
|
54901
|
+
var _update$node;
|
|
54902
|
+
return ((_update$node = update.node) === null || _update$node === void 0 ? void 0 : _update$node.id) && update.node.id == selectedNodeId;
|
|
54886
54903
|
});
|
|
54887
54904
|
if (current) {
|
|
54888
54905
|
setSelectedCollection(current.data);
|
|
54906
|
+
} else if (updates.some(function (update) {
|
|
54907
|
+
var _update$data;
|
|
54908
|
+
return !update.node && ((_update$data = update.data) === null || _update$data === void 0 ? void 0 : _update$data._id) == selectedNodeId;
|
|
54909
|
+
})) {
|
|
54910
|
+
setSelectedCollection(undefined);
|
|
54911
|
+
setSelectedNodeId(undefined);
|
|
54889
54912
|
}
|
|
54890
54913
|
}
|
|
54891
54914
|
};
|
|
@@ -54912,6 +54935,12 @@ function TableCollections () {
|
|
|
54912
54935
|
cellDataType: 'boolean',
|
|
54913
54936
|
editable: true,
|
|
54914
54937
|
defaultValue: true
|
|
54938
|
+
}, {
|
|
54939
|
+
// set by the publish for the collection it creates automatically for the manufacturer of a catalog
|
|
54940
|
+
headerName: 'backoffice.idmEnricher.collections.label.isSupplierCollection',
|
|
54941
|
+
field: 'isSupplierCollection',
|
|
54942
|
+
cellDataType: 'boolean',
|
|
54943
|
+
editable: false
|
|
54915
54944
|
}, {
|
|
54916
54945
|
headerName: 'backoffice.idmEnricher.collections.label.name',
|
|
54917
54946
|
marryChildren: true,
|
|
@@ -55188,9 +55217,9 @@ var PropertyDefinitions = /*#__PURE__*/forwardRef(function PropertyDefinitions(_
|
|
|
55188
55217
|
|
|
55189
55218
|
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; }
|
|
55190
55219
|
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; }
|
|
55191
|
-
function _createForOfIteratorHelper$
|
|
55192
|
-
function _unsupportedIterableToArray$
|
|
55193
|
-
function _arrayLikeToArray$
|
|
55220
|
+
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; } } }; }
|
|
55221
|
+
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; } }
|
|
55222
|
+
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; }
|
|
55194
55223
|
/**
|
|
55195
55224
|
* Lets the user pick GLOBAL property definitions and copy the marked ones into the current organization. Definitions
|
|
55196
55225
|
* whose key already exists in the organization cannot be selected - adoption is a snapshot copy and the key is unique
|
|
@@ -55298,7 +55327,7 @@ function AdoptGlobalModal(_ref) {
|
|
|
55298
55327
|
return response.json();
|
|
55299
55328
|
case 9:
|
|
55300
55329
|
result = _context.sent;
|
|
55301
|
-
_iterator = _createForOfIteratorHelper$
|
|
55330
|
+
_iterator = _createForOfIteratorHelper$m((_result$errors$add = result === null || result === void 0 || (_result$errors = result.errors) === null || _result$errors === void 0 ? void 0 : _result$errors.add) !== null && _result$errors$add !== void 0 ? _result$errors$add : []);
|
|
55302
55331
|
try {
|
|
55303
55332
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
55304
55333
|
error = _step.value;
|
|
@@ -59412,9 +59441,9 @@ styleInject(css_248z$m);
|
|
|
59412
59441
|
|
|
59413
59442
|
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; }
|
|
59414
59443
|
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; }
|
|
59415
|
-
function _createForOfIteratorHelper$
|
|
59416
|
-
function _unsupportedIterableToArray$
|
|
59417
|
-
function _arrayLikeToArray$
|
|
59444
|
+
function _createForOfIteratorHelper$l(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$l(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
59445
|
+
function _unsupportedIterableToArray$l(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$l(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$l(r, a) : void 0; } }
|
|
59446
|
+
function _arrayLikeToArray$l(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
59418
59447
|
/**
|
|
59419
59448
|
* Builds the initial item list. When `selectedUrls` (the persisted
|
|
59420
59449
|
* `renderImages`) are present, the matching slides are selected and ordered
|
|
@@ -59437,7 +59466,7 @@ function buildItems(slides, selectedUrls) {
|
|
|
59437
59466
|
}));
|
|
59438
59467
|
var selected = [];
|
|
59439
59468
|
var rest = [];
|
|
59440
|
-
var _iterator = _createForOfIteratorHelper$
|
|
59469
|
+
var _iterator = _createForOfIteratorHelper$l(withMeta),
|
|
59441
59470
|
_step;
|
|
59442
59471
|
try {
|
|
59443
59472
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -59548,7 +59577,7 @@ function AIImageSelector(_ref2) {
|
|
|
59548
59577
|
// Running order number among the selected items, in list order.
|
|
59549
59578
|
var counter = 0;
|
|
59550
59579
|
var orderByKey = new Map();
|
|
59551
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
59580
|
+
var _iterator2 = _createForOfIteratorHelper$l(items),
|
|
59552
59581
|
_step2;
|
|
59553
59582
|
try {
|
|
59554
59583
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -60986,9 +61015,9 @@ styleInject(css_248z$i);
|
|
|
60986
61015
|
|
|
60987
61016
|
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; }
|
|
60988
61017
|
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; }
|
|
60989
|
-
function _createForOfIteratorHelper$
|
|
60990
|
-
function _unsupportedIterableToArray$
|
|
60991
|
-
function _arrayLikeToArray$
|
|
61018
|
+
function _createForOfIteratorHelper$k(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$k(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
61019
|
+
function _unsupportedIterableToArray$k(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$k(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$k(r, a) : void 0; } }
|
|
61020
|
+
function _arrayLikeToArray$k(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
60992
61021
|
var BYTES_IN_KIB = 1024;
|
|
60993
61022
|
|
|
60994
61023
|
/** A job without an explicit `nrOfVariants` behaves like a single variant. */
|
|
@@ -61095,7 +61124,7 @@ function buildDetailsPatch(job, fields, draft) {
|
|
|
61095
61124
|
value: next
|
|
61096
61125
|
});
|
|
61097
61126
|
};
|
|
61098
|
-
var _iterator = _createForOfIteratorHelper$
|
|
61127
|
+
var _iterator = _createForOfIteratorHelper$k(fields),
|
|
61099
61128
|
_step;
|
|
61100
61129
|
try {
|
|
61101
61130
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -61925,7 +61954,7 @@ function UndoNotification(_ref) {
|
|
|
61925
61954
|
|
|
61926
61955
|
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; }
|
|
61927
61956
|
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; }
|
|
61928
|
-
var LOG$
|
|
61957
|
+
var LOG$f = getLogger('Backoffice', 'RenderApprove');
|
|
61929
61958
|
|
|
61930
61959
|
/**
|
|
61931
61960
|
* Adds a manually uploaded image to an AI job's image variants and takes it over as
|
|
@@ -61981,7 +62010,7 @@ function useAddRenderJobImageVariant() {
|
|
|
61981
62010
|
err = new DivaError("Adding image variant failed: ".concat(response.status, " ").concat(response.statusText).concat(text ? " - ".concat(text) : ''), {
|
|
61982
62011
|
code: 'MEDIA_RENDERJOB_ADD_VARIANT_FAILED'
|
|
61983
62012
|
});
|
|
61984
|
-
LOG$
|
|
62013
|
+
LOG$f.error(err);
|
|
61985
62014
|
throw err;
|
|
61986
62015
|
case 12:
|
|
61987
62016
|
_context.next = 14;
|
|
@@ -62008,7 +62037,7 @@ function useAddRenderJobImageVariant() {
|
|
|
62008
62037
|
|
|
62009
62038
|
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; }
|
|
62010
62039
|
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; }
|
|
62011
|
-
var LOG$
|
|
62040
|
+
var LOG$e = getLogger('Backoffice', 'RenderApprove');
|
|
62012
62041
|
/** The media service answers failures with `{ error: '...' }` - surface that text instead of the raw body. */
|
|
62013
62042
|
function extractResponseError(body) {
|
|
62014
62043
|
if (!body) return '';
|
|
@@ -62079,7 +62108,7 @@ function useUpdateRenderJobPatch() {
|
|
|
62079
62108
|
err = new DivaError("Renderjob patch failed: ".concat(response.status, " ").concat(response.statusText).concat(detail ? " - ".concat(detail) : ''), {
|
|
62080
62109
|
code: 'MEDIA_RENDERJOB_PATCH_FAILED'
|
|
62081
62110
|
});
|
|
62082
|
-
LOG$
|
|
62111
|
+
LOG$e.error(err);
|
|
62083
62112
|
throw err;
|
|
62084
62113
|
case 15:
|
|
62085
62114
|
_context.next = 17;
|
|
@@ -62106,7 +62135,7 @@ function useUpdateRenderJobPatch() {
|
|
|
62106
62135
|
|
|
62107
62136
|
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; }
|
|
62108
62137
|
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; }
|
|
62109
|
-
var LOG$
|
|
62138
|
+
var LOG$d = getLogger('Backoffice', 'RenderApprove');
|
|
62110
62139
|
|
|
62111
62140
|
/**
|
|
62112
62141
|
* Thin wrapper around `PATCH ${mediaService}/renderjobs/:id/state`.
|
|
@@ -62163,7 +62192,7 @@ function useUpdateRenderJobState() {
|
|
|
62163
62192
|
err = new DivaError("State update failed: ".concat(response.status, " ").concat(response.statusText).concat(text ? " - ".concat(text) : ''), {
|
|
62164
62193
|
code: 'RENDERAPPROVE_UPDATE_STATE_FAILED'
|
|
62165
62194
|
});
|
|
62166
|
-
LOG$
|
|
62195
|
+
LOG$d.error(err);
|
|
62167
62196
|
throw err;
|
|
62168
62197
|
case 12:
|
|
62169
62198
|
_context.next = 14;
|
|
@@ -62642,7 +62671,7 @@ function UploadImageModal(_ref) {
|
|
|
62642
62671
|
|
|
62643
62672
|
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; }
|
|
62644
62673
|
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; }
|
|
62645
|
-
var LOG$
|
|
62674
|
+
var LOG$c = getLogger('Backoffice', 'RenderApprove');
|
|
62646
62675
|
function isProcessedDecision(decision) {
|
|
62647
62676
|
return decision === 'approve' || decision === 'reject' || decision === 'changedReadyForRenderer';
|
|
62648
62677
|
}
|
|
@@ -62937,7 +62966,7 @@ function useRenderApproveSession(_ref) {
|
|
|
62937
62966
|
return _context.abrupt("return");
|
|
62938
62967
|
case 20:
|
|
62939
62968
|
detail = (_message = _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) !== null && _message !== void 0 ? _message : 'Unknown error';
|
|
62940
|
-
LOG$
|
|
62969
|
+
LOG$c.error(new DivaError("RenderApprove selection validation failed: ".concat(detail), {
|
|
62941
62970
|
code: 'RENDERAPPROVE_SELECTION_INVALID'
|
|
62942
62971
|
}));
|
|
62943
62972
|
setIds([]);
|
|
@@ -62985,7 +63014,7 @@ function useRenderApproveSession(_ref) {
|
|
|
62985
63014
|
_context2.prev = 6;
|
|
62986
63015
|
_context2.t0 = _context2["catch"](1);
|
|
62987
63016
|
detail = (_message2 = _context2.t0 === null || _context2.t0 === void 0 ? void 0 : _context2.t0.message) !== null && _message2 !== void 0 ? _message2 : 'Unknown error';
|
|
62988
|
-
LOG$
|
|
63017
|
+
LOG$c.error(new DivaError("RenderApprove deferred flush failed for ".concat(pending.jobId, ": ").concat(detail), {
|
|
62989
63018
|
code: 'RENDERAPPROVE_FLUSH_FAILED'
|
|
62990
63019
|
}));
|
|
62991
63020
|
message.error(t('backoffice.renderapprove.messages.pendingActionSaveFailed', {
|
|
@@ -63272,10 +63301,10 @@ function useRenderApproveSession(_ref) {
|
|
|
63272
63301
|
|
|
63273
63302
|
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; }
|
|
63274
63303
|
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; }
|
|
63275
|
-
function _createForOfIteratorHelper$
|
|
63276
|
-
function _unsupportedIterableToArray$
|
|
63277
|
-
function _arrayLikeToArray$
|
|
63278
|
-
var LOG$
|
|
63304
|
+
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; } } }; }
|
|
63305
|
+
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; } }
|
|
63306
|
+
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; }
|
|
63307
|
+
var LOG$b = getLogger('Backoffice', 'RenderApprove');
|
|
63279
63308
|
function getMediaItemId(job) {
|
|
63280
63309
|
var list = job === null || job === void 0 ? void 0 : job.mediaItems;
|
|
63281
63310
|
if (!list || list.length === 0) return undefined;
|
|
@@ -63407,7 +63436,7 @@ function _fetchProductMedia() {
|
|
|
63407
63436
|
seen = new Set();
|
|
63408
63437
|
if (excludeUrl) seen.add(excludeUrl);
|
|
63409
63438
|
result = [];
|
|
63410
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
63439
|
+
_iterator2 = _createForOfIteratorHelper$j(sorted);
|
|
63411
63440
|
_context4.prev = 12;
|
|
63412
63441
|
_iterator2.s();
|
|
63413
63442
|
case 14:
|
|
@@ -63611,7 +63640,7 @@ function buildLeftSlides(left, renderImages, productMedia) {
|
|
|
63611
63640
|
});
|
|
63612
63641
|
if (renderImages.length === 0) return [left].concat(_toConsumableArray(remainingProduct));
|
|
63613
63642
|
var productByUrl = new Map();
|
|
63614
|
-
var _iterator = _createForOfIteratorHelper$
|
|
63643
|
+
var _iterator = _createForOfIteratorHelper$j(productMedia),
|
|
63615
63644
|
_step;
|
|
63616
63645
|
try {
|
|
63617
63646
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -63773,7 +63802,7 @@ function _resolveVariants() {
|
|
|
63773
63802
|
case 8:
|
|
63774
63803
|
_context8.prev = 8;
|
|
63775
63804
|
_context8.t0 = _context8["catch"](2);
|
|
63776
|
-
LOG$
|
|
63805
|
+
LOG$b.warn("Could not resolve image variant ".concat(mediaItemId, ": ").concat(_context8.t0 === null || _context8.t0 === void 0 ? void 0 : _context8.t0.message));
|
|
63777
63806
|
case 11:
|
|
63778
63807
|
return _context8.abrupt("return", _objectSpread$w(_objectSpread$w({}, (_media2 = media) !== null && _media2 !== void 0 ? _media2 : {
|
|
63779
63808
|
url: (_variant$url = variant.url) !== null && _variant$url !== void 0 ? _variant$url : null,
|
|
@@ -63892,7 +63921,7 @@ function useRenderJobData(id, refreshKey) {
|
|
|
63892
63921
|
// its own, so the result image is never held back by the (much slower)
|
|
63893
63922
|
// product media fan-out.
|
|
63894
63923
|
rightTask = (mediaItemId || mediaItemRef ? resolveMediaItem(baseUrl, jwt, mediaItemId, mediaItemRef) : Promise.resolve(null))["catch"](function (reason) {
|
|
63895
|
-
LOG$
|
|
63924
|
+
LOG$b.warn("Could not resolve right image for job ".concat(id, ": ").concat(reason === null || reason === void 0 ? void 0 : reason.message));
|
|
63896
63925
|
return null;
|
|
63897
63926
|
}).then(function (right) {
|
|
63898
63927
|
if (cancelled) return;
|
|
@@ -63907,7 +63936,7 @@ function useRenderJobData(id, refreshKey) {
|
|
|
63907
63936
|
setLoading(false);
|
|
63908
63937
|
});
|
|
63909
63938
|
productTask = (catalogService && typeof productId === 'string' && productId.length > 0 ? fetchProductMedia(catalogService, baseUrl, jwt, productId, left.url) : Promise.resolve([]))["catch"](function (reason) {
|
|
63910
|
-
LOG$
|
|
63939
|
+
LOG$b.warn("Could not load product media for job ".concat(id, ": ").concat(reason === null || reason === void 0 ? void 0 : reason.message));
|
|
63911
63940
|
return [];
|
|
63912
63941
|
}).then(function (productMedia) {
|
|
63913
63942
|
if (cancelled || productMedia.length === 0) return;
|
|
@@ -63919,7 +63948,7 @@ function useRenderJobData(id, refreshKey) {
|
|
|
63919
63948
|
});
|
|
63920
63949
|
});
|
|
63921
63950
|
variantsTask = resolveVariants(baseUrl, jwt, fetchedJob, mediaItemId)["catch"](function (reason) {
|
|
63922
|
-
LOG$
|
|
63951
|
+
LOG$b.warn("Could not load image variants for job ".concat(id, ": ").concat(reason === null || reason === void 0 ? void 0 : reason.message));
|
|
63923
63952
|
return [];
|
|
63924
63953
|
}).then(function (rightSlides) {
|
|
63925
63954
|
if (cancelled) return;
|
|
@@ -63965,7 +63994,7 @@ function useRenderJobData(id, refreshKey) {
|
|
|
63965
63994
|
return _context.abrupt("return");
|
|
63966
63995
|
case 35:
|
|
63967
63996
|
message = (_message = _context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) !== null && _message !== void 0 ? _message : 'Unknown error';
|
|
63968
|
-
LOG$
|
|
63997
|
+
LOG$b.error(new DivaError("Failed to load render job ".concat(id, ": ").concat(message), {
|
|
63969
63998
|
code: 'RENDERAPPROVE_LOAD_JOB'
|
|
63970
63999
|
}));
|
|
63971
64000
|
setError(message);
|
|
@@ -64003,10 +64032,10 @@ function useRenderJobData(id, refreshKey) {
|
|
|
64003
64032
|
|
|
64004
64033
|
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; }
|
|
64005
64034
|
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; }
|
|
64006
|
-
function _createForOfIteratorHelper$
|
|
64007
|
-
function _unsupportedIterableToArray$
|
|
64008
|
-
function _arrayLikeToArray$
|
|
64009
|
-
var LOG$
|
|
64035
|
+
function _createForOfIteratorHelper$i(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$i(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
64036
|
+
function _unsupportedIterableToArray$i(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$i(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$i(r, a) : void 0; } }
|
|
64037
|
+
function _arrayLikeToArray$i(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
64038
|
+
var LOG$a = getLogger('Backoffice', 'RenderApprove');
|
|
64010
64039
|
var METADATA_CHUNK_SIZE = 100;
|
|
64011
64040
|
var RESULT_CONCURRENCY = 6;
|
|
64012
64041
|
/** Message of the most recent rejection (state 9) in the job's state history. */
|
|
@@ -64014,7 +64043,7 @@ function latestRejectMessage(history) {
|
|
|
64014
64043
|
var _best;
|
|
64015
64044
|
if (!Array.isArray(history)) return undefined;
|
|
64016
64045
|
var best;
|
|
64017
|
-
var _iterator = _createForOfIteratorHelper$
|
|
64046
|
+
var _iterator = _createForOfIteratorHelper$i(history),
|
|
64018
64047
|
_step;
|
|
64019
64048
|
try {
|
|
64020
64049
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -64282,7 +64311,7 @@ function useSessionOverviewData(ids, enabled) {
|
|
|
64282
64311
|
case 13:
|
|
64283
64312
|
_context.prev = 13;
|
|
64284
64313
|
_context.t0 = _context["catch"](7);
|
|
64285
|
-
LOG$
|
|
64314
|
+
LOG$a.warn("Could not resolve result medium for job ".concat(id, ": ").concat(_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message));
|
|
64286
64315
|
case 16:
|
|
64287
64316
|
if (!cancelled) {
|
|
64288
64317
|
_context.next = 18;
|
|
@@ -64322,7 +64351,7 @@ function useSessionOverviewData(ids, enabled) {
|
|
|
64322
64351
|
return _context2.abrupt("return");
|
|
64323
64352
|
case 17:
|
|
64324
64353
|
detail = (_message = _context2.t0 === null || _context2.t0 === void 0 ? void 0 : _context2.t0.message) !== null && _message !== void 0 ? _message : 'Unknown error';
|
|
64325
|
-
LOG$
|
|
64354
|
+
LOG$a.error(new DivaError("RenderApprove overview load failed: ".concat(detail), {
|
|
64326
64355
|
code: 'RENDERAPPROVE_OVERVIEW_LOAD'
|
|
64327
64356
|
}));
|
|
64328
64357
|
setError(detail);
|
|
@@ -64377,7 +64406,7 @@ function useSessionOverviewData(ids, enabled) {
|
|
|
64377
64406
|
});
|
|
64378
64407
|
});
|
|
64379
64408
|
detail = (_message2 = _context3.t0 === null || _context3.t0 === void 0 ? void 0 : _context3.t0.message) !== null && _message2 !== void 0 ? _message2 : 'Unknown error';
|
|
64380
|
-
LOG$
|
|
64409
|
+
LOG$a.error(new DivaError("RenderApprove overview state update failed for ".concat(id, ": ").concat(detail), {
|
|
64381
64410
|
code: 'RENDERAPPROVE_OVERVIEW_UPDATE'
|
|
64382
64411
|
}));
|
|
64383
64412
|
throw _context3.t0;
|
|
@@ -64446,7 +64475,7 @@ function useSessionOverviewData(ids, enabled) {
|
|
|
64446
64475
|
|
|
64447
64476
|
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; }
|
|
64448
64477
|
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; }
|
|
64449
|
-
var LOG$
|
|
64478
|
+
var LOG$9 = getLogger('Backoffice', 'RenderApprove');
|
|
64450
64479
|
|
|
64451
64480
|
/**
|
|
64452
64481
|
* Takes one generated image variant over as the render job's result image via
|
|
@@ -64502,7 +64531,7 @@ function useSelectRenderJobVariant() {
|
|
|
64502
64531
|
err = new DivaError("Selecting image variant failed: ".concat(response.status, " ").concat(response.statusText).concat(text ? " - ".concat(text) : ''), {
|
|
64503
64532
|
code: 'MEDIA_RENDERJOB_SELECT_VARIANT_FAILED'
|
|
64504
64533
|
});
|
|
64505
|
-
LOG$
|
|
64534
|
+
LOG$9.error(err);
|
|
64506
64535
|
throw err;
|
|
64507
64536
|
case 12:
|
|
64508
64537
|
_context.next = 14;
|
|
@@ -67880,10 +67909,10 @@ var ASSORTMENT_MANAGER_FIELDS = [
|
|
|
67880
67909
|
excludeFromDuplicate: true
|
|
67881
67910
|
}];
|
|
67882
67911
|
|
|
67883
|
-
function _createForOfIteratorHelper$
|
|
67884
|
-
function _unsupportedIterableToArray$
|
|
67885
|
-
function _arrayLikeToArray$
|
|
67886
|
-
var LOG$
|
|
67912
|
+
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; } } }; }
|
|
67913
|
+
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; } }
|
|
67914
|
+
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; }
|
|
67915
|
+
var LOG$8 = getLogger('Backoffice', 'AssortmentManager');
|
|
67887
67916
|
|
|
67888
67917
|
/** One dropdownItems entry as the catalog service stores it. */
|
|
67889
67918
|
|
|
@@ -67891,7 +67920,7 @@ var LOG$7 = getLogger('Backoffice', 'AssortmentManager');
|
|
|
67891
67920
|
|
|
67892
67921
|
/** One entry of an enum cell list — the spreadsheet's `enumData` shape. */
|
|
67893
67922
|
|
|
67894
|
-
var PAGE_SIZE = 100;
|
|
67923
|
+
var PAGE_SIZE$1 = 100;
|
|
67895
67924
|
|
|
67896
67925
|
// the dropdown lists are static per organization — fetch each key once per session, shared by all tabs
|
|
67897
67926
|
var listCache = new Map();
|
|
@@ -67947,7 +67976,7 @@ function _fetchDropdownItemsPage() {
|
|
|
67947
67976
|
sourceValue: dropdownKey,
|
|
67948
67977
|
targetField: 'dropdownKey'
|
|
67949
67978
|
}, {
|
|
67950
|
-
sourceValue: PAGE_SIZE,
|
|
67979
|
+
sourceValue: PAGE_SIZE$1,
|
|
67951
67980
|
targetField: 'limit'
|
|
67952
67981
|
}, {
|
|
67953
67982
|
sourceValue: skip,
|
|
@@ -68023,7 +68052,7 @@ function _resolveDropdownItems() {
|
|
|
68023
68052
|
})["catch"](function (e) {
|
|
68024
68053
|
// do not cache a failure — the next use retries
|
|
68025
68054
|
resolvedCache["delete"](cacheKey);
|
|
68026
|
-
LOG$
|
|
68055
|
+
LOG$8.warn("Resolving dropdownItem '".concat(dropdownKey, "':'").concat(code, "' failed"), e);
|
|
68027
68056
|
return undefined;
|
|
68028
68057
|
});
|
|
68029
68058
|
resolvedCache.set(cacheKey, promise);
|
|
@@ -68106,7 +68135,7 @@ function _loadDropdownLists() {
|
|
|
68106
68135
|
}
|
|
68107
68136
|
batch = fetchDropdownLists(root, missing)["catch"](function (e) {
|
|
68108
68137
|
// do not cache a failure — the next mount retries; the affected columns stay text editors
|
|
68109
|
-
var _iterator = _createForOfIteratorHelper$
|
|
68138
|
+
var _iterator = _createForOfIteratorHelper$h(missing),
|
|
68110
68139
|
_step;
|
|
68111
68140
|
try {
|
|
68112
68141
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -68118,10 +68147,10 @@ function _loadDropdownLists() {
|
|
|
68118
68147
|
} finally {
|
|
68119
68148
|
_iterator.f();
|
|
68120
68149
|
}
|
|
68121
|
-
LOG$
|
|
68150
|
+
LOG$8.warn("Loading the dropdownItems lists '".concat(missing.join(', '), "' failed"), e);
|
|
68122
68151
|
return {};
|
|
68123
68152
|
});
|
|
68124
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
68153
|
+
_iterator2 = _createForOfIteratorHelper$h(missing);
|
|
68125
68154
|
_context5.prev = 5;
|
|
68126
68155
|
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
|
68127
68156
|
var key, list;
|
|
@@ -68234,7 +68263,7 @@ function useDropdownEnumData(root, dropdownKeys) {
|
|
|
68234
68263
|
var _excluded$2 = ["dropdownKey", "value"];
|
|
68235
68264
|
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; }
|
|
68236
68265
|
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; }
|
|
68237
|
-
var LOG$
|
|
68266
|
+
var LOG$7 = getLogger('Backoffice', 'AssortmentManager');
|
|
68238
68267
|
var SEARCH_DEBOUNCE_MS = 300;
|
|
68239
68268
|
/** Distance to the list end (px) at which the next page is requested. */
|
|
68240
68269
|
var SCROLL_THRESHOLD = 60;
|
|
@@ -68293,7 +68322,7 @@ function PagedDropdownSelect(_ref) {
|
|
|
68293
68322
|
term: term
|
|
68294
68323
|
}, result));
|
|
68295
68324
|
})["catch"](function (e) {
|
|
68296
|
-
LOG$
|
|
68325
|
+
LOG$7.warn("Loading dropdownItems for '".concat(dropdownKey, "' failed"), e);
|
|
68297
68326
|
if (requestSeq.current === seq) setPages({
|
|
68298
68327
|
term: term,
|
|
68299
68328
|
items: [],
|
|
@@ -68342,7 +68371,7 @@ function PagedDropdownSelect(_ref) {
|
|
|
68342
68371
|
case 13:
|
|
68343
68372
|
_context.prev = 13;
|
|
68344
68373
|
_context.t0 = _context["catch"](4);
|
|
68345
|
-
LOG$
|
|
68374
|
+
LOG$7.warn("Loading more dropdownItems for '".concat(dropdownKey, "' failed"), _context.t0);
|
|
68346
68375
|
case 16:
|
|
68347
68376
|
_context.prev = 16;
|
|
68348
68377
|
setLoadingMore(false);
|
|
@@ -68749,7 +68778,8 @@ function GroupCard(_ref) {
|
|
|
68749
68778
|
var Text = Typography.Text;
|
|
68750
68779
|
/**
|
|
68751
68780
|
* How many articles inherit the header values. Stays quiet while nothing is edited and turns into a warning
|
|
68752
|
-
* as soon as there are unsaved changes
|
|
68781
|
+
* as soon as there are unsaved changes: after the save exactly these articles show as outdated in the
|
|
68782
|
+
* article table, and each of them has to be refreshed there.
|
|
68753
68783
|
*
|
|
68754
68784
|
* The count is per supplier / EK group and not per field: the filter behind it does not look at individual
|
|
68755
68785
|
* fields, so a per-field number would be the same one repeated.
|
|
@@ -68786,7 +68816,7 @@ function AffectedCount(_ref) {
|
|
|
68786
68816
|
return /*#__PURE__*/jsxs(Text, {
|
|
68787
68817
|
type: "warning",
|
|
68788
68818
|
children: [/*#__PURE__*/jsx(WarningOutlined$1, {}), ' ', t('backoffice.assortmentmanager.headerdata.affected.dirty', {
|
|
68789
|
-
defaultValue: '{{count}} Artikel
|
|
68819
|
+
defaultValue: '{{count}} verknüpfte Artikel werden dadurch veraltet',
|
|
68790
68820
|
count: affected.count
|
|
68791
68821
|
})]
|
|
68792
68822
|
});
|
|
@@ -68842,18 +68872,19 @@ function toJsonPointer(key) {
|
|
|
68842
68872
|
/**
|
|
68843
68873
|
* Saves the header product through the catalog service.
|
|
68844
68874
|
*
|
|
68845
|
-
* `PATCH /v1/products/:id/headervalues` patches the header row and
|
|
68846
|
-
*
|
|
68847
|
-
*
|
|
68848
|
-
*
|
|
68875
|
+
* `PATCH /v1/products/:id/headervalues` patches the header row and nothing else — the products referencing
|
|
68876
|
+
* it keep their values until the user refreshes them one by one in the article table, which recognizes them
|
|
68877
|
+
* by comparing their header snapshot with the header row. The route lives in the catalog because that is
|
|
68878
|
+
* where `isHeader`, `headerValues` and `overrideValues` are defined and merged — going through a client
|
|
68879
|
+
* specific service is not necessary and would tie the assortment manager to one customer's article service.
|
|
68849
68880
|
*
|
|
68850
68881
|
* Only the changed paths are sent, as JSON Patch. That is the reason for using this endpoint over the older
|
|
68851
68882
|
* route through diva-pfister-article, whose `createProductFromDivaNr` was written to sync whole records out
|
|
68852
68883
|
* of the legacy SQL database and replaces `customData` wholesale — it forced the client to send the entire
|
|
68853
68884
|
* object back and silently dropped anything left out.
|
|
68854
68885
|
*
|
|
68855
|
-
* Which products inherit from this header is
|
|
68856
|
-
*
|
|
68886
|
+
* Which products inherit from this header is recorded on the products themselves (`headerValues._id`); the
|
|
68887
|
+
* client sends nothing about them.
|
|
68857
68888
|
*/
|
|
68858
68889
|
function useSaveHeaderData(root, data) {
|
|
68859
68890
|
var _useState = useState(false),
|
|
@@ -69149,10 +69180,10 @@ function Content$1(_ref) {
|
|
|
69149
69180
|
setBaseline(next);
|
|
69150
69181
|
form.setFieldsValue(next);
|
|
69151
69182
|
setChangedKeys(new Set());
|
|
69152
|
-
// the
|
|
69153
|
-
//
|
|
69183
|
+
// the articles are untouched — the article table shows them as outdated, and their values change only
|
|
69184
|
+
// when the user refreshes them one by one there, so this must not claim they are updated
|
|
69154
69185
|
message.success(t('backoffice.assortmentmanager.headerdata.saved', {
|
|
69155
|
-
defaultValue: 'Kopfdaten gespeichert.
|
|
69186
|
+
defaultValue: 'Kopfdaten gespeichert. {{count}} verknüpfte Artikel sind jetzt veraltet – Kopfdaten in den Positionsdaten pro Artikel aktualisieren.',
|
|
69156
69187
|
count: (_affected$count = affected.count) !== null && _affected$count !== void 0 ? _affected$count : 0
|
|
69157
69188
|
}));
|
|
69158
69189
|
onSaved === null || onSaved === void 0 || onSaved(saved);
|
|
@@ -69511,6 +69542,7 @@ function dropEmptyRows(rows) {
|
|
|
69511
69542
|
}
|
|
69512
69543
|
|
|
69513
69544
|
/** A catalog product carrying the header values of a supplier / EK group combination. */
|
|
69545
|
+
|
|
69514
69546
|
/**
|
|
69515
69547
|
* Fetches the header product (`isHeader: true`) of a supplier / EK group combination; undefined when
|
|
69516
69548
|
* the combination has none.
|
|
@@ -69527,6 +69559,7 @@ function dropEmptyRows(rows) {
|
|
|
69527
69559
|
function fetchHeaderProduct(_x, _x2, _x3) {
|
|
69528
69560
|
return _fetchHeaderProduct.apply(this, arguments);
|
|
69529
69561
|
}
|
|
69562
|
+
|
|
69530
69563
|
/** Loads the header product for a supplier / EK group combination as reactive state. */
|
|
69531
69564
|
function _fetchHeaderProduct() {
|
|
69532
69565
|
_fetchHeaderProduct = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(root, supplierNr, ekg) {
|
|
@@ -69759,13 +69792,13 @@ function useCreateHeaderData(root, supplierNr, ekg) {
|
|
|
69759
69792
|
}
|
|
69760
69793
|
|
|
69761
69794
|
/**
|
|
69762
|
-
* Counts the articles a change to the header values
|
|
69795
|
+
* Counts the articles a change to the header values concerns — the ones that show as outdated in the
|
|
69796
|
+
* article table after a save and can be refreshed there.
|
|
69763
69797
|
*
|
|
69764
|
-
* The filter
|
|
69765
|
-
*
|
|
69766
|
-
*
|
|
69767
|
-
*
|
|
69768
|
-
* articles that are already transferred.
|
|
69798
|
+
* The filter is the `headerValues._id` reference plus the two exclusions the refresh refuses anyway.
|
|
69799
|
+
* Deliberately unlike the SAP import path (`PfisterArticleService.updateHeaderValuesInProducts`), articles
|
|
69800
|
+
* already sent to SAP (`SentToSAPSuccess: true`) are excluded: transferred articles can never be refreshed,
|
|
69801
|
+
* so the article table does not report them as outdated either.
|
|
69769
69802
|
* `limit=0` makes this a pure count: the catalog service skips the data pipeline and only runs the count
|
|
69770
69803
|
* aggregation, so `total` arrives without any documents.
|
|
69771
69804
|
*/
|
|
@@ -69916,9 +69949,9 @@ function usePersistedFilter(organizationId) {
|
|
|
69916
69949
|
};
|
|
69917
69950
|
}
|
|
69918
69951
|
|
|
69919
|
-
function _createForOfIteratorHelper$
|
|
69920
|
-
function _unsupportedIterableToArray$
|
|
69921
|
-
function _arrayLikeToArray$
|
|
69952
|
+
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; } } }; }
|
|
69953
|
+
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; } }
|
|
69954
|
+
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; }
|
|
69922
69955
|
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; }
|
|
69923
69956
|
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; }
|
|
69924
69957
|
var ITEM_GROUPS = ASSORTMENT_MANAGER_FIELDS.filter(function (field) {
|
|
@@ -70113,7 +70146,7 @@ function HeaderData() {
|
|
|
70113
70146
|
var applyValueCouplings = useCallback(function (changedKey, value) {
|
|
70114
70147
|
var targets = COPY_TARGETS.get(changedKey);
|
|
70115
70148
|
if (!targets) return;
|
|
70116
|
-
var _iterator = _createForOfIteratorHelper$
|
|
70149
|
+
var _iterator = _createForOfIteratorHelper$g(targets),
|
|
70117
70150
|
_step;
|
|
70118
70151
|
try {
|
|
70119
70152
|
var _loop = function _loop() {
|
|
@@ -70202,7 +70235,7 @@ function HeaderData() {
|
|
|
70202
70235
|
assembled = {};
|
|
70203
70236
|
errors = [];
|
|
70204
70237
|
_context5.prev = 5;
|
|
70205
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
70238
|
+
_iterator2 = _createForOfIteratorHelper$g(ITEM_GROUPS);
|
|
70206
70239
|
_context5.prev = 7;
|
|
70207
70240
|
_iterator2.s();
|
|
70208
70241
|
case 9:
|
|
@@ -70516,11 +70549,160 @@ function isSentToSAP(data) {
|
|
|
70516
70549
|
return get(data, 'customData.SAP.SentToSAPSuccess') === true;
|
|
70517
70550
|
}
|
|
70518
70551
|
|
|
70552
|
+
/** Loads the header product of a supplier / EK group combination; undefined when the combination has none. */
|
|
70553
|
+
|
|
70554
|
+
/** The article paths the header row is looked up by — the key fields the catalog relinks on (`headerInheritance.keyFields`). */
|
|
70555
|
+
var HEADER_KEY_PATHS = {
|
|
70556
|
+
supplier: 'customData.SAP.SAP_EINA_LIFNR',
|
|
70557
|
+
ekg: 'customData.SAP.SAP_EINE_EKGRP'
|
|
70558
|
+
};
|
|
70559
|
+
|
|
70560
|
+
/**
|
|
70561
|
+
* The `headerValues` an article carries for its header row, in the shape the catalog service writes
|
|
70562
|
+
* itself (`buildHeaderValuesSnapshot`): the row's customData as the inheritance source plus its audit
|
|
70563
|
+
* fields (`lastUpdated` is what the outdated marker compares, see headerSync.ts).
|
|
70564
|
+
*/
|
|
70565
|
+
function headerValuesSnapshot(header) {
|
|
70566
|
+
var _header$customData;
|
|
70567
|
+
return {
|
|
70568
|
+
_id: header._id,
|
|
70569
|
+
customData: (_header$customData = header.customData) !== null && _header$customData !== void 0 ? _header$customData : {},
|
|
70570
|
+
created: header.created,
|
|
70571
|
+
createdBy: header.createdBy,
|
|
70572
|
+
createdBy_displayText: header.createdBy_displayText,
|
|
70573
|
+
lastUpdated: header.lastUpdated,
|
|
70574
|
+
lastUpdatedBy: header.lastUpdatedBy,
|
|
70575
|
+
lastUpdatedBy_displayText: header.lastUpdatedBy_displayText
|
|
70576
|
+
};
|
|
70577
|
+
}
|
|
70578
|
+
function asCode(value) {
|
|
70579
|
+
return typeof value === 'string' && value !== '' ? value : undefined;
|
|
70580
|
+
}
|
|
70581
|
+
|
|
70582
|
+
/** The two key codes of a row. */
|
|
70583
|
+
function keysOf(row) {
|
|
70584
|
+
return {
|
|
70585
|
+
supplier: asCode(get(row, HEADER_KEY_PATHS.supplier)),
|
|
70586
|
+
ekg: asCode(get(row, HEADER_KEY_PATHS.ekg))
|
|
70587
|
+
};
|
|
70588
|
+
}
|
|
70589
|
+
/**
|
|
70590
|
+
* Links the header row client side, the way the lookup cell fills its dependent fields: once both key
|
|
70591
|
+
* fields of a row are set, the header product is loaded and written into the row's `headerValues`, so
|
|
70592
|
+
* the placeholder cells show the inherited values before anything is saved and the commit carries the
|
|
70593
|
+
* link. The catalog service respects a body carrying `headerValues` on create and rebuilds the link
|
|
70594
|
+
* itself whenever the keys change later, so it stays the authority — this only moves the moment the
|
|
70595
|
+
* user sees the inheritance forward. A missing key, a combination without a header row and a failed
|
|
70596
|
+
* lookup all remove the link, as the server would: the previous header's values must not survive a
|
|
70597
|
+
* key change — and the catalog links the row on save anyway.
|
|
70598
|
+
*/
|
|
70599
|
+
function createHeaderLinker(resolveHeader) {
|
|
70600
|
+
/** The revision of the latest write per row — a link started by an earlier write is stale and must not land. */
|
|
70601
|
+
var latest = new Map();
|
|
70602
|
+
var revision = 0;
|
|
70603
|
+
var relink = /*#__PURE__*/function () {
|
|
70604
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(api, nodeId, handler, _ref, rev) {
|
|
70605
|
+
var supplier, ekg, header, node, row;
|
|
70606
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
70607
|
+
while (1) switch (_context.prev = _context.next) {
|
|
70608
|
+
case 0:
|
|
70609
|
+
supplier = _ref.supplier, ekg = _ref.ekg;
|
|
70610
|
+
if (!(supplier && ekg)) {
|
|
70611
|
+
_context.next = 7;
|
|
70612
|
+
break;
|
|
70613
|
+
}
|
|
70614
|
+
_context.next = 4;
|
|
70615
|
+
return resolveHeader(supplier, ekg)["catch"](function () {
|
|
70616
|
+
return undefined;
|
|
70617
|
+
});
|
|
70618
|
+
case 4:
|
|
70619
|
+
_context.t0 = _context.sent;
|
|
70620
|
+
_context.next = 8;
|
|
70621
|
+
break;
|
|
70622
|
+
case 7:
|
|
70623
|
+
_context.t0 = undefined;
|
|
70624
|
+
case 8:
|
|
70625
|
+
header = _context.t0;
|
|
70626
|
+
if (!(latest.get(nodeId) !== rev)) {
|
|
70627
|
+
_context.next = 11;
|
|
70628
|
+
break;
|
|
70629
|
+
}
|
|
70630
|
+
return _context.abrupt("return");
|
|
70631
|
+
case 11:
|
|
70632
|
+
node = api.getRowNode(nodeId);
|
|
70633
|
+
row = node === null || node === void 0 ? void 0 : node.data;
|
|
70634
|
+
if (!(!node || !row)) {
|
|
70635
|
+
_context.next = 15;
|
|
70636
|
+
break;
|
|
70637
|
+
}
|
|
70638
|
+
return _context.abrupt("return");
|
|
70639
|
+
case 15:
|
|
70640
|
+
if (!((header === null || header === void 0 ? void 0 : header._id) === get(row, 'headerValues._id'))) {
|
|
70641
|
+
_context.next = 17;
|
|
70642
|
+
break;
|
|
70643
|
+
}
|
|
70644
|
+
return _context.abrupt("return");
|
|
70645
|
+
case 17:
|
|
70646
|
+
_context.next = 19;
|
|
70647
|
+
return handler.updateRow(nodeId, {
|
|
70648
|
+
headerValues: header ? headerValuesSnapshot(header) : undefined
|
|
70649
|
+
}, true);
|
|
70650
|
+
case 19:
|
|
70651
|
+
// the grid repaints only cells whose own value changed on a row update; the placeholder cells read
|
|
70652
|
+
// `headerValues`, their own value (the override) is untouched — so they have to be forced
|
|
70653
|
+
api.refreshCells({
|
|
70654
|
+
rowNodes: [node],
|
|
70655
|
+
force: true
|
|
70656
|
+
});
|
|
70657
|
+
case 20:
|
|
70658
|
+
case "end":
|
|
70659
|
+
return _context.stop();
|
|
70660
|
+
}
|
|
70661
|
+
}, _callee);
|
|
70662
|
+
}));
|
|
70663
|
+
return function relink(_x, _x2, _x3, _x4, _x5) {
|
|
70664
|
+
return _ref2.apply(this, arguments);
|
|
70665
|
+
};
|
|
70666
|
+
}();
|
|
70667
|
+
return {
|
|
70668
|
+
/**
|
|
70669
|
+
* The grid's `hooks.onCellEditRequest`: every write into a cell arrives here; whenever it changes the
|
|
70670
|
+
* supplier / EK group combination (`oldData` vs `data`, the row as the write leaves it — whichever
|
|
70671
|
+
* column or source did it), the (re)link starts with the new keys. The transaction handler lock holds
|
|
70672
|
+
* the auto-commit back until the link is written, so the saved row carries it.
|
|
70673
|
+
*/
|
|
70674
|
+
onCellEditRequest: function onCellEditRequest(_ref3) {
|
|
70675
|
+
var oldData = _ref3.oldData,
|
|
70676
|
+
data = _ref3.data,
|
|
70677
|
+
node = _ref3.node,
|
|
70678
|
+
context = _ref3.context,
|
|
70679
|
+
api = _ref3.api;
|
|
70680
|
+
var keys = keysOf(data);
|
|
70681
|
+
var before = keysOf(oldData);
|
|
70682
|
+
if (keys.supplier === before.supplier && keys.ekg === before.ekg) return;
|
|
70683
|
+
var handler = context === null || context === void 0 ? void 0 : context.transactionHandler;
|
|
70684
|
+
var nodeId = node.id;
|
|
70685
|
+
if (!handler || !nodeId) return;
|
|
70686
|
+
var rev = ++revision;
|
|
70687
|
+
latest.set(nodeId, rev);
|
|
70688
|
+
handler.lock();
|
|
70689
|
+
relink(api, nodeId, handler, keys, rev)
|
|
70690
|
+
// the lookup handles its own failure (see relink); anything else (a row update that fails) must
|
|
70691
|
+
// neither surface here nor disturb the key write — the lock is released either way
|
|
70692
|
+
["catch"](function () {
|
|
70693
|
+
return undefined;
|
|
70694
|
+
})["finally"](function () {
|
|
70695
|
+
return handler.unlock();
|
|
70696
|
+
});
|
|
70697
|
+
}
|
|
70698
|
+
};
|
|
70699
|
+
}
|
|
70700
|
+
|
|
70519
70701
|
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; }
|
|
70520
70702
|
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; }
|
|
70521
|
-
function _createForOfIteratorHelper$
|
|
70522
|
-
function _unsupportedIterableToArray$
|
|
70523
|
-
function _arrayLikeToArray$
|
|
70703
|
+
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; } } }; }
|
|
70704
|
+
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; } }
|
|
70705
|
+
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; }
|
|
70524
70706
|
/**
|
|
70525
70707
|
* Languages of the multilanguage text objects, in display order. The products store the keys as the
|
|
70526
70708
|
* import delivered them — lowercase in the Pfister data; the uppercase `{ DE, FR, IT }` in the
|
|
@@ -70585,6 +70767,43 @@ var ARTICLE_LABEL_COMPANIONS = ASSORTMENT_MANAGER_FIELDS.flatMap(function (entry
|
|
|
70585
70767
|
}] : [];
|
|
70586
70768
|
});
|
|
70587
70769
|
|
|
70770
|
+
/** The label of a dropdown value in cells, editors and exports — the IDM shape "code - name". */
|
|
70771
|
+
var ENUM_LABEL_TEMPLATE = '${value} - ${name}';
|
|
70772
|
+
|
|
70773
|
+
/**
|
|
70774
|
+
* Resolves what reaches an inheritable dropdown column — a pick (the code), a typed name, or a
|
|
70775
|
+
* pasted label — to the stored code, through the spreadsheet's own enum resolution. The
|
|
70776
|
+
* withPlaceholder columns copy their cells formatted ("code - name", `useValueFormatterForExport`),
|
|
70777
|
+
* but the type's parser keeps pasted text verbatim, so a copied cell pasted elsewhere would store the
|
|
70778
|
+
* label as the override. A code outside the list stays as typed — the lists can lag behind the data.
|
|
70779
|
+
*/
|
|
70780
|
+
function enumCodeOf(enumData, input) {
|
|
70781
|
+
var _resolveEnumValue;
|
|
70782
|
+
var raw = String(input);
|
|
70783
|
+
return String((_resolveEnumValue = resolveEnumValue(enumData, raw, ENUM_LABEL_TEMPLATE)) !== null && _resolveEnumValue !== void 0 ? _resolveEnumValue : raw);
|
|
70784
|
+
}
|
|
70785
|
+
|
|
70786
|
+
/** An input the placeholder rule treats as "no own value". */
|
|
70787
|
+
function isBlankInput(value) {
|
|
70788
|
+
return value === undefined || value === null || value === '';
|
|
70789
|
+
}
|
|
70790
|
+
|
|
70791
|
+
/**
|
|
70792
|
+
* `valueParser` of an inheritable dropdown column without a companion: the code resolution of
|
|
70793
|
+
* {@link enumCodeOf} on top of the column type's placeholder rule — an empty input or the header's
|
|
70794
|
+
* own value clears the override (the type's parser answers the empty string for that, kept here so
|
|
70795
|
+
* both paths write the same cleared value).
|
|
70796
|
+
*/
|
|
70797
|
+
function placeholderEnumValueParser(enumData, placeHolderField) {
|
|
70798
|
+
return function (_ref) {
|
|
70799
|
+
var newValue = _ref.newValue,
|
|
70800
|
+
data = _ref.data;
|
|
70801
|
+
if (isBlankInput(newValue)) return '';
|
|
70802
|
+
var code = enumCodeOf(enumData, newValue);
|
|
70803
|
+
return code === get(data, placeHolderField) ? '' : code;
|
|
70804
|
+
};
|
|
70805
|
+
}
|
|
70806
|
+
|
|
70588
70807
|
/**
|
|
70589
70808
|
* `valueParser` of a dropdown column whose selection text lives in a `showAsLabelFor` companion: the
|
|
70590
70809
|
* parsed value is a field dictionary, which the spreadsheet applies to the row in ONE update (the
|
|
@@ -70598,13 +70817,12 @@ function companionValueParser(enumData, colId, companionColId, placeHolderField)
|
|
|
70598
70817
|
var names = new Map(enumData.map(function (entry) {
|
|
70599
70818
|
return [entry.value, entry.name];
|
|
70600
70819
|
}));
|
|
70601
|
-
return function (
|
|
70602
|
-
var newValue =
|
|
70603
|
-
data =
|
|
70820
|
+
return function (_ref2) {
|
|
70821
|
+
var newValue = _ref2.newValue,
|
|
70822
|
+
data = _ref2.data;
|
|
70604
70823
|
var placeholder = placeHolderField ? get(data, placeHolderField) : undefined;
|
|
70605
|
-
var
|
|
70606
|
-
if (
|
|
70607
|
-
var code = String(newValue);
|
|
70824
|
+
var code = isBlankInput(newValue) ? undefined : enumCodeOf(enumData, newValue);
|
|
70825
|
+
if (code === undefined || code === placeholder) return _defineProperty(_defineProperty({}, colId, undefined), companionColId, undefined);
|
|
70608
70826
|
return _defineProperty(_defineProperty({}, colId, code), companionColId, names.get(code));
|
|
70609
70827
|
};
|
|
70610
70828
|
}
|
|
@@ -70620,7 +70838,7 @@ function labelCompanionResets(oldData, data) {
|
|
|
70620
70838
|
return value === undefined || value === null || value === '';
|
|
70621
70839
|
};
|
|
70622
70840
|
var resets = {};
|
|
70623
|
-
var _iterator = _createForOfIteratorHelper$
|
|
70841
|
+
var _iterator = _createForOfIteratorHelper$f(ARTICLE_LABEL_COMPANIONS),
|
|
70624
70842
|
_step;
|
|
70625
70843
|
try {
|
|
70626
70844
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -70637,9 +70855,6 @@ function labelCompanionResets(oldData, data) {
|
|
|
70637
70855
|
return resets;
|
|
70638
70856
|
}
|
|
70639
70857
|
|
|
70640
|
-
/** The label of a dropdown value in cells, editors and exports — the IDM shape "code - name". */
|
|
70641
|
-
var ENUM_LABEL_TEMPLATE = '${value} - ${name}';
|
|
70642
|
-
|
|
70643
70858
|
/**
|
|
70644
70859
|
* "code - name" formatter of one list, with a lookup Map built once per column. The spreadsheet's own
|
|
70645
70860
|
* enum formatter copies and scans the whole list on every call, and its editor formats every option
|
|
@@ -70663,8 +70878,8 @@ function enumLabelFormatter(enumData) {
|
|
|
70663
70878
|
/** `valueFormatter` of a plain enum column — null and undefined stay blank, like the enum type's own formatter. */
|
|
70664
70879
|
function enumColumnFormatter(enumData) {
|
|
70665
70880
|
var label = enumLabelFormatter(enumData);
|
|
70666
|
-
return function (
|
|
70667
|
-
var value =
|
|
70881
|
+
return function (_ref5) {
|
|
70882
|
+
var value = _ref5.value;
|
|
70668
70883
|
return value === undefined || value === null ? '' : label(value);
|
|
70669
70884
|
};
|
|
70670
70885
|
}
|
|
@@ -70679,9 +70894,9 @@ function placeholderEnumColumnFormatter(enumData, placeHolderField) {
|
|
|
70679
70894
|
var isSet = function isSet(candidate) {
|
|
70680
70895
|
return candidate !== undefined && candidate !== null && candidate !== '';
|
|
70681
70896
|
};
|
|
70682
|
-
return function (
|
|
70683
|
-
var value =
|
|
70684
|
-
data =
|
|
70897
|
+
return function (_ref6) {
|
|
70898
|
+
var value = _ref6.value,
|
|
70899
|
+
data = _ref6.data;
|
|
70685
70900
|
var placeholder = get(data, placeHolderField);
|
|
70686
70901
|
return label(isSet(value) ? value : isSet(placeholder) ? placeholder : '');
|
|
70687
70902
|
};
|
|
@@ -70703,8 +70918,8 @@ function enumSetFilterParams(enumData) {
|
|
|
70703
70918
|
values: enumData.map(function (entry) {
|
|
70704
70919
|
return entry.value.includes("'") ? entry.value : "'".concat(entry.value, "'");
|
|
70705
70920
|
}),
|
|
70706
|
-
valueFormatter: function valueFormatter(
|
|
70707
|
-
var value =
|
|
70921
|
+
valueFormatter: function valueFormatter(_ref7) {
|
|
70922
|
+
var value = _ref7.value;
|
|
70708
70923
|
if (typeof value !== 'string') return '';
|
|
70709
70924
|
var code = value.startsWith("'") && value.endsWith("'") ? value.slice(1, -1) : value;
|
|
70710
70925
|
var name = names.get(code);
|
|
@@ -70842,8 +71057,8 @@ function inheritedColumn(field, t, enumLists) {
|
|
|
70842
71057
|
type: ['withPlaceholderNumber']
|
|
70843
71058
|
} : {}), enumData ? {
|
|
70844
71059
|
valueFormatter: placeholderEnumColumnFormatter(enumData, placeHolderField)
|
|
70845
|
-
} : {}), enumData
|
|
70846
|
-
valueParser: companionValueParser(enumData, colId, columnFieldOf(companion), placeHolderField)
|
|
71060
|
+
} : {}), enumData ? {
|
|
71061
|
+
valueParser: companion ? companionValueParser(enumData, colId, columnFieldOf(companion), placeHolderField) : placeholderEnumValueParser(enumData, placeHolderField)
|
|
70847
71062
|
} : {}), {}, {
|
|
70848
71063
|
// sort and filter redirect to combinedField through the withPlaceholder column type's own
|
|
70849
71064
|
// parsers; the placeholder values arrive through the shared `headerValues.customData` column —
|
|
@@ -70867,10 +71082,19 @@ function inheritedColumn(field, t, enumLists) {
|
|
|
70867
71082
|
/**
|
|
70868
71083
|
* The context identity columns (supplier + EK group): pulled in front of everything else, editable on
|
|
70869
71084
|
* the article level even though the catalogue locks them (the header page must keep them read-only —
|
|
70870
|
-
* its context comes from the page dropdowns).
|
|
70871
|
-
*
|
|
71085
|
+
* its context comes from the page dropdowns). The header link (`headerValues`) is made client side as
|
|
71086
|
+
* soon as both are set — the page's grid hook `onCellEditRequest` reacts to every write that changes
|
|
71087
|
+
* the combination (see headerLink.ts); the catalog service relinks on every save that changes them and
|
|
71088
|
+
* stays the authority. The client also pairs a row with its header row by these values for the refresh
|
|
71089
|
+
* marker (`headerSync.ts`). Although the catalogue flags them `showOnHeaderValues`,
|
|
71090
|
+
* they are NOT built as inheritable (placeholder) columns: the header row is found by exactly these
|
|
71091
|
+
* values, so its snapshot could only ever repeat the own value. They are plain enum columns on the
|
|
71092
|
+
* materialized path instead, like the IDM grids' dropdowns — the cell type copies the bare code,
|
|
71093
|
+
* resolves pasted labels and handles Enter/Tab itself, and no placeholder rule can clear a re-entered
|
|
71094
|
+
* key (which would unlink the header and drop the row out of the grid).
|
|
70872
71095
|
*/
|
|
70873
|
-
|
|
71096
|
+
// widened to string[]: the catalogue keys it is matched against are plain strings
|
|
71097
|
+
var CONTEXT_FIELD_KEYS = Object.values(HEADER_KEY_PATHS);
|
|
70874
71098
|
|
|
70875
71099
|
/**
|
|
70876
71100
|
* The `defaultValue`s of the grid's built-in create, keyed by column field. A new row owns nothing
|
|
@@ -70930,8 +71154,8 @@ function summaryColumn(group) {
|
|
|
70930
71154
|
}, group.pinned ? {
|
|
70931
71155
|
pinned: group.pinned
|
|
70932
71156
|
} : {}), {}, {
|
|
70933
|
-
valueGetter: function valueGetter(
|
|
70934
|
-
var data =
|
|
71157
|
+
valueGetter: function valueGetter(_ref8) {
|
|
71158
|
+
var data = _ref8.data;
|
|
70935
71159
|
var rows = get(data, group.key);
|
|
70936
71160
|
return Array.isArray(rows) ? rows.length : 0;
|
|
70937
71161
|
}
|
|
@@ -70942,7 +71166,8 @@ function summaryColumn(group) {
|
|
|
70942
71166
|
* Builds the article table's column tree from the field catalogue: one header group per catalogue
|
|
70943
71167
|
* `group` in file order, one column per `showOnArticle` entry; entries without a group render
|
|
70944
71168
|
* ungrouped at the top level. Header-inheritable text and number fields render as `withPlaceholder`
|
|
70945
|
-
* columns
|
|
71169
|
+
* columns (except the two context columns, see CONTEXT_FIELD_KEYS), multilanguage fields as nested
|
|
71170
|
+
* language groups, ITEM_GROUPs as row-count summaries.
|
|
70946
71171
|
* Fields naming a `commonColumn` collapse into one shared symbol column each, their own columns
|
|
70947
71172
|
* hidden.
|
|
70948
71173
|
*/
|
|
@@ -70962,8 +71187,9 @@ function buildArticleColDefs(t, commonColumnCellRenderer) {
|
|
|
70962
71187
|
};
|
|
70963
71188
|
|
|
70964
71189
|
// the context identity leads the table: supplier + EK group first, left pinned, ungrouped, and
|
|
70965
|
-
// editable on this level (a new row starts with them)
|
|
70966
|
-
|
|
71190
|
+
// editable on this level (a new row starts with them); plain columns, not inheritable ones — see
|
|
71191
|
+
// CONTEXT_FIELD_KEYS
|
|
71192
|
+
var _iterator2 = _createForOfIteratorHelper$f(CONTEXT_FIELD_KEYS),
|
|
70967
71193
|
_step2;
|
|
70968
71194
|
try {
|
|
70969
71195
|
var _loop = function _loop() {
|
|
@@ -70971,7 +71197,7 @@ function buildArticleColDefs(t, commonColumnCellRenderer) {
|
|
|
70971
71197
|
var entry = ASSORTMENT_MANAGER_FIELDS.find(function (candidate) {
|
|
70972
71198
|
return candidate.type !== 'ITEM_GROUP' && candidate.key === key && candidate.showOnArticle;
|
|
70973
71199
|
});
|
|
70974
|
-
if (entry) tree.push(_objectSpread$k(_objectSpread$k({},
|
|
71200
|
+
if (entry) tree.push(_objectSpread$k(_objectSpread$k({}, plainColumn(entry, t, enumLists)), {}, {
|
|
70975
71201
|
editable: editableUnlessSent,
|
|
70976
71202
|
pinned: 'left'
|
|
70977
71203
|
}));
|
|
@@ -70988,7 +71214,7 @@ function buildArticleColDefs(t, commonColumnCellRenderer) {
|
|
|
70988
71214
|
_iterator2.f();
|
|
70989
71215
|
}
|
|
70990
71216
|
var commonColumnFields = new Map();
|
|
70991
|
-
var _iterator3 = _createForOfIteratorHelper$
|
|
71217
|
+
var _iterator3 = _createForOfIteratorHelper$f(ASSORTMENT_MANAGER_FIELDS),
|
|
70992
71218
|
_step3;
|
|
70993
71219
|
try {
|
|
70994
71220
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
@@ -71002,7 +71228,7 @@ function buildArticleColDefs(t, commonColumnCellRenderer) {
|
|
|
71002
71228
|
} finally {
|
|
71003
71229
|
_iterator3.f();
|
|
71004
71230
|
}
|
|
71005
|
-
var _iterator4 = _createForOfIteratorHelper$
|
|
71231
|
+
var _iterator4 = _createForOfIteratorHelper$f(commonColumnFields),
|
|
71006
71232
|
_step4;
|
|
71007
71233
|
try {
|
|
71008
71234
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
@@ -71016,7 +71242,7 @@ function buildArticleColDefs(t, commonColumnCellRenderer) {
|
|
|
71016
71242
|
} finally {
|
|
71017
71243
|
_iterator4.f();
|
|
71018
71244
|
}
|
|
71019
|
-
var _iterator5 = _createForOfIteratorHelper$
|
|
71245
|
+
var _iterator5 = _createForOfIteratorHelper$f(ASSORTMENT_MANAGER_FIELDS),
|
|
71020
71246
|
_step5;
|
|
71021
71247
|
try {
|
|
71022
71248
|
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
@@ -71057,7 +71283,9 @@ function buildArticleColDefs(t, commonColumnCellRenderer) {
|
|
|
71057
71283
|
}
|
|
71058
71284
|
|
|
71059
71285
|
// hidden columns without a visual role: `headerValues.customData` projects the inherited values
|
|
71060
|
-
// for the placeholder cells,
|
|
71286
|
+
// for the placeholder cells, `headerValues._id` + `headerValues.lastUpdated` feed the outdated
|
|
71287
|
+
// comparison of the row style and the refresh action, and the remaining new-row defaults ride
|
|
71288
|
+
// along the same way
|
|
71061
71289
|
} catch (err) {
|
|
71062
71290
|
_iterator5.e(err);
|
|
71063
71291
|
} finally {
|
|
@@ -71069,13 +71297,13 @@ function buildArticleColDefs(t, commonColumnCellRenderer) {
|
|
|
71069
71297
|
sortable: false,
|
|
71070
71298
|
filter: false
|
|
71071
71299
|
};
|
|
71072
|
-
for (var _i = 0, _arr = ['headerValues.customData', 'headerValues._id']; _i < _arr.length; _i++) {
|
|
71300
|
+
for (var _i = 0, _arr = ['headerValues.customData', 'headerValues._id', 'headerValues.lastUpdated']; _i < _arr.length; _i++) {
|
|
71073
71301
|
var field = _arr[_i];
|
|
71074
71302
|
tree.push(withDefault(_objectSpread$k(_objectSpread$k({}, hidden), {}, {
|
|
71075
71303
|
field: field
|
|
71076
71304
|
})));
|
|
71077
71305
|
}
|
|
71078
|
-
var _iterator6 = _createForOfIteratorHelper$
|
|
71306
|
+
var _iterator6 = _createForOfIteratorHelper$f(pendingDefaults),
|
|
71079
71307
|
_step6;
|
|
71080
71308
|
try {
|
|
71081
71309
|
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
@@ -71095,6 +71323,271 @@ function buildArticleColDefs(t, commonColumnCellRenderer) {
|
|
|
71095
71323
|
return tree;
|
|
71096
71324
|
}
|
|
71097
71325
|
|
|
71326
|
+
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; } } }; }
|
|
71327
|
+
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; } }
|
|
71328
|
+
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; }
|
|
71329
|
+
|
|
71330
|
+
/** The article paths of the supplier / EK group context, in a fixed order — the key of {@link headerContextKey}. */
|
|
71331
|
+
var CONTEXT_PATHS = Object.values(HEADER_KEY_PATHS);
|
|
71332
|
+
|
|
71333
|
+
/**
|
|
71334
|
+
* The active header rows of the organization (`_id`, `lastUpdated`, key fields), keyed by product id and by
|
|
71335
|
+
* their supplier / EK group context ({@link headerContextKey}).
|
|
71336
|
+
*/
|
|
71337
|
+
|
|
71338
|
+
/**
|
|
71339
|
+
* The supplier / EK group context of a row as one map key — the client-side counterpart of the catalog's
|
|
71340
|
+
* header key fields (`headerInheritance.keyFields`), read from the materialized values. Undefined while a
|
|
71341
|
+
* key field is missing or empty: an incomplete context pairs with no header row.
|
|
71342
|
+
*/
|
|
71343
|
+
function headerContextKey(data) {
|
|
71344
|
+
var values = CONTEXT_PATHS.map(function (path) {
|
|
71345
|
+
return get(data, path);
|
|
71346
|
+
});
|
|
71347
|
+
if (values.some(function (value) {
|
|
71348
|
+
return typeof value !== 'string' || value === '';
|
|
71349
|
+
})) return undefined;
|
|
71350
|
+
return values.join('|');
|
|
71351
|
+
}
|
|
71352
|
+
|
|
71353
|
+
/** Indexes the loaded header rows for {@link isHeaderOutdated} and {@link hasUnlinkedHeader}. */
|
|
71354
|
+
function indexHeaderProducts(rows) {
|
|
71355
|
+
var byContext = new Map();
|
|
71356
|
+
var _iterator = _createForOfIteratorHelper$e(rows),
|
|
71357
|
+
_step;
|
|
71358
|
+
try {
|
|
71359
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
71360
|
+
var row = _step.value;
|
|
71361
|
+
var key = headerContextKey(row);
|
|
71362
|
+
if (key !== undefined) byContext.set(key, row);
|
|
71363
|
+
}
|
|
71364
|
+
} catch (err) {
|
|
71365
|
+
_iterator.e(err);
|
|
71366
|
+
} finally {
|
|
71367
|
+
_iterator.f();
|
|
71368
|
+
}
|
|
71369
|
+
return {
|
|
71370
|
+
byId: new Map(rows.map(function (row) {
|
|
71371
|
+
return [String(row._id), row];
|
|
71372
|
+
})),
|
|
71373
|
+
byContext: byContext
|
|
71374
|
+
};
|
|
71375
|
+
}
|
|
71376
|
+
|
|
71377
|
+
/**
|
|
71378
|
+
* An article whose header snapshot is older than the header row it references: the header was saved after
|
|
71379
|
+
* the article last pulled its values. Compared by timestamp — `headerValues.lastUpdated` is the header's
|
|
71380
|
+
* `lastUpdated` at snapshot time — so the header rows are loaded with a few fields instead of their whole
|
|
71381
|
+
* `customData`; an organization has thousands of them. Derived from the data on both sides, a header save
|
|
71382
|
+
* writes nothing into articles. Not reported for transferred articles (they can never be refreshed), for
|
|
71383
|
+
* articles without a link, and while the header rows are not loaded or the referenced row is gone.
|
|
71384
|
+
*/
|
|
71385
|
+
function isHeaderOutdated(data, headers) {
|
|
71386
|
+
var _headers$byId$get;
|
|
71387
|
+
if (!headers || isSentToSAP(data)) return false;
|
|
71388
|
+
var headerId = get(data, 'headerValues._id');
|
|
71389
|
+
if (headerId === undefined || headerId === null) return false;
|
|
71390
|
+
var headerStamp = (_headers$byId$get = headers.byId.get(String(headerId))) === null || _headers$byId$get === void 0 ? void 0 : _headers$byId$get.lastUpdated;
|
|
71391
|
+
var snapshotStamp = get(data, 'headerValues.lastUpdated');
|
|
71392
|
+
return typeof headerStamp === 'number' && typeof snapshotStamp === 'number' && headerStamp > snapshotStamp;
|
|
71393
|
+
}
|
|
71394
|
+
|
|
71395
|
+
/**
|
|
71396
|
+
* An article without a header link whose supplier / EK group context has a header row by now: the article
|
|
71397
|
+
* was imported or created before that header row existed (the import sets no link then, and a header save
|
|
71398
|
+
* writes nothing into articles). A refresh links it — the catalog resolves the header through the key
|
|
71399
|
+
* fields, not through the stored link. Not reported for transferred articles and while the header rows are
|
|
71400
|
+
* not loaded.
|
|
71401
|
+
*/
|
|
71402
|
+
function hasUnlinkedHeader(data, headers) {
|
|
71403
|
+
if (!headers || isSentToSAP(data)) return false;
|
|
71404
|
+
var headerId = get(data, 'headerValues._id');
|
|
71405
|
+
if (headerId !== undefined && headerId !== null) return false;
|
|
71406
|
+
var key = headerContextKey(data);
|
|
71407
|
+
return key !== undefined && headers.byContext.has(key);
|
|
71408
|
+
}
|
|
71409
|
+
|
|
71410
|
+
/** Whether the refresh action has something to pull: outdated header values, or a header row not linked yet. */
|
|
71411
|
+
function canRefreshHeader(data, headers) {
|
|
71412
|
+
return isHeaderOutdated(data, headers) || hasUnlinkedHeader(data, headers);
|
|
71413
|
+
}
|
|
71414
|
+
|
|
71415
|
+
/**
|
|
71416
|
+
* Pulls the current header values into one article through the catalog service
|
|
71417
|
+
* (`POST /v1/products/:id/headervalues/refresh`) and returns the updated article, which the grid uses to
|
|
71418
|
+
* replace its row. The server resolves the header row, rebuilds the merge and refuses transferred
|
|
71419
|
+
* articles — the client sends nothing but the id. No loading state here: the row action button shows its own.
|
|
71420
|
+
*/
|
|
71421
|
+
function useRefreshHeaderValues(root) {
|
|
71422
|
+
return useCallback(/*#__PURE__*/function () {
|
|
71423
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(articleId) {
|
|
71424
|
+
var apiHandler;
|
|
71425
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
71426
|
+
while (1) switch (_context.prev = _context.next) {
|
|
71427
|
+
case 0:
|
|
71428
|
+
apiHandler = new _default$c({
|
|
71429
|
+
type: 'AssortmentManagerArticleData',
|
|
71430
|
+
apiInterface: {
|
|
71431
|
+
// `create` is the apiInterface entry that POSTs; the route takes no body
|
|
71432
|
+
create: {
|
|
71433
|
+
url: "".concat(root.configurationStore.apiConfig.catalogService, "/v1/products/").concat(encodeURIComponent(articleId), "/headervalues/refresh"),
|
|
71434
|
+
method: 'POST'
|
|
71435
|
+
}
|
|
71436
|
+
}
|
|
71437
|
+
}, root);
|
|
71438
|
+
_context.next = 3;
|
|
71439
|
+
return apiHandler.create();
|
|
71440
|
+
case 3:
|
|
71441
|
+
return _context.abrupt("return", _context.sent);
|
|
71442
|
+
case 4:
|
|
71443
|
+
case "end":
|
|
71444
|
+
return _context.stop();
|
|
71445
|
+
}
|
|
71446
|
+
}, _callee);
|
|
71447
|
+
}));
|
|
71448
|
+
return function (_x) {
|
|
71449
|
+
return _ref.apply(this, arguments);
|
|
71450
|
+
};
|
|
71451
|
+
}(), [root]);
|
|
71452
|
+
}
|
|
71453
|
+
|
|
71454
|
+
var LOG$6 = getLogger('Backoffice', 'AssortmentManager');
|
|
71455
|
+
|
|
71456
|
+
/**
|
|
71457
|
+
* Rows per request. An organization has one header row per supplier / EK group combination — thousands, not
|
|
71458
|
+
* dozens — and every request pays the catalog's fixed cost, so the rows are fetched in one large page:
|
|
71459
|
+
* projected to the few compared fields a row is a few dozen bytes, which keeps even that page small.
|
|
71460
|
+
*/
|
|
71461
|
+
var PAGE_SIZE = 10000;
|
|
71462
|
+
|
|
71463
|
+
/**
|
|
71464
|
+
* The projection: only what `headerSync.ts` compares — the timestamp for the outdated marker and the key
|
|
71465
|
+
* fields to pair unlinked articles with their header row; `customData` alone would be several kB per row.
|
|
71466
|
+
*/
|
|
71467
|
+
var FIELDS = "{_id,lastUpdated,".concat(Object.values(HEADER_KEY_PATHS).join(','), "}");
|
|
71468
|
+
|
|
71469
|
+
/**
|
|
71470
|
+
* Loads in flight per organization. Duplicate effect runs (React's development double mount, a re-render
|
|
71471
|
+
* with a new `t`) share one load instead of paging through the header rows twice in lockstep; once
|
|
71472
|
+
* settled the entry is dropped, so the next mount of the page fetches fresh rows.
|
|
71473
|
+
*/
|
|
71474
|
+
var inFlight = new Map();
|
|
71475
|
+
/**
|
|
71476
|
+
* Loads every active header row (`isHeader`) of the organization, projected to `_id`, `lastUpdated` and the
|
|
71477
|
+
* key fields.
|
|
71478
|
+
* `organizationId` and `archived` belong in the filter for the same reasons as in
|
|
71479
|
+
* `HeaderData/hooks/useHeaderData.ts`: the products filter path applies neither by itself.
|
|
71480
|
+
*/
|
|
71481
|
+
function fetchHeaderProducts(_x) {
|
|
71482
|
+
return _fetchHeaderProducts.apply(this, arguments);
|
|
71483
|
+
}
|
|
71484
|
+
function _fetchHeaderProducts() {
|
|
71485
|
+
_fetchHeaderProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(root) {
|
|
71486
|
+
var rows, skip, apiHandler, res, page;
|
|
71487
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
71488
|
+
while (1) switch (_context.prev = _context.next) {
|
|
71489
|
+
case 0:
|
|
71490
|
+
rows = [];
|
|
71491
|
+
skip = 0;
|
|
71492
|
+
case 2:
|
|
71493
|
+
apiHandler = new _default$c({
|
|
71494
|
+
type: 'AssortmentManagerArticleData',
|
|
71495
|
+
apiInterface: {
|
|
71496
|
+
read: {
|
|
71497
|
+
list: "".concat(root.configurationStore.apiConfig.catalogService, "/v1/products?organizationIds=").concat(root.dataStore.organizationId, "&fields=").concat(FIELDS, "&limit=").concat(PAGE_SIZE, "&skip=").concat(skip)
|
|
71498
|
+
}
|
|
71499
|
+
}
|
|
71500
|
+
}, root);
|
|
71501
|
+
_context.next = 5;
|
|
71502
|
+
return apiHandler.readList({
|
|
71503
|
+
type: 'filter',
|
|
71504
|
+
map: [{
|
|
71505
|
+
globalValue: 'organizationId',
|
|
71506
|
+
targetField: 'organizationId',
|
|
71507
|
+
operation: 'eq',
|
|
71508
|
+
type: 'string'
|
|
71509
|
+
}, {
|
|
71510
|
+
sourceValue: true,
|
|
71511
|
+
targetField: 'isHeader',
|
|
71512
|
+
operation: 'eq'
|
|
71513
|
+
}, {
|
|
71514
|
+
sourceValue: false,
|
|
71515
|
+
targetField: 'archived',
|
|
71516
|
+
operation: 'eq'
|
|
71517
|
+
}]
|
|
71518
|
+
});
|
|
71519
|
+
case 5:
|
|
71520
|
+
res = _context.sent;
|
|
71521
|
+
page = res.data;
|
|
71522
|
+
rows.push.apply(rows, _toConsumableArray(page));
|
|
71523
|
+
if (!(page.length === 0 || rows.length >= res.total)) {
|
|
71524
|
+
_context.next = 10;
|
|
71525
|
+
break;
|
|
71526
|
+
}
|
|
71527
|
+
return _context.abrupt("return", rows);
|
|
71528
|
+
case 10:
|
|
71529
|
+
skip += PAGE_SIZE;
|
|
71530
|
+
_context.next = 2;
|
|
71531
|
+
break;
|
|
71532
|
+
case 13:
|
|
71533
|
+
case "end":
|
|
71534
|
+
return _context.stop();
|
|
71535
|
+
}
|
|
71536
|
+
}, _callee);
|
|
71537
|
+
}));
|
|
71538
|
+
return _fetchHeaderProducts.apply(this, arguments);
|
|
71539
|
+
}
|
|
71540
|
+
function loadHeaderProducts(root) {
|
|
71541
|
+
var key = String(root.dataStore.organizationId);
|
|
71542
|
+
var running = inFlight.get(key);
|
|
71543
|
+
if (running) return running;
|
|
71544
|
+
var promise = fetchHeaderProducts(root)["finally"](function () {
|
|
71545
|
+
inFlight["delete"](key);
|
|
71546
|
+
});
|
|
71547
|
+
inFlight.set(key, promise);
|
|
71548
|
+
return promise;
|
|
71549
|
+
}
|
|
71550
|
+
|
|
71551
|
+
/**
|
|
71552
|
+
* The header rows the article table compares the articles against (`isHeaderOutdated`, `hasUnlinkedHeader`).
|
|
71553
|
+
* Loaded once per mount — the grid waits for it, because ag-grid does not re-evaluate row classes when a
|
|
71554
|
+
* value outside the row data changes. A failed load degrades to "nothing marked" with a warning toast; the
|
|
71555
|
+
* articles themselves stay fully usable.
|
|
71556
|
+
*/
|
|
71557
|
+
function useHeaderProducts(root) {
|
|
71558
|
+
var _useTranslation = useTranslation(),
|
|
71559
|
+
t = _useTranslation.t;
|
|
71560
|
+
var _useState = useState({
|
|
71561
|
+
loading: true
|
|
71562
|
+
}),
|
|
71563
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
71564
|
+
state = _useState2[0],
|
|
71565
|
+
setState = _useState2[1];
|
|
71566
|
+
useEffect(function () {
|
|
71567
|
+
var active = true;
|
|
71568
|
+
setState({
|
|
71569
|
+
loading: true
|
|
71570
|
+
});
|
|
71571
|
+
loadHeaderProducts(root).then(function (rows) {
|
|
71572
|
+
if (active) setState({
|
|
71573
|
+
loading: false,
|
|
71574
|
+
headers: indexHeaderProducts(rows)
|
|
71575
|
+
});
|
|
71576
|
+
})["catch"](function (error) {
|
|
71577
|
+
LOG$6.warn('Loading the header rows failed — outdated header values are not marked', error);
|
|
71578
|
+
message.warning(t('backoffice.assortmentmanager.articledata.headers.error', 'Kopfzeilen konnten nicht geladen werden – veraltete Kopfdaten werden nicht markiert.'));
|
|
71579
|
+
if (active) setState({
|
|
71580
|
+
loading: false,
|
|
71581
|
+
headers: indexHeaderProducts([])
|
|
71582
|
+
});
|
|
71583
|
+
});
|
|
71584
|
+
return function () {
|
|
71585
|
+
active = false;
|
|
71586
|
+
};
|
|
71587
|
+
}, [root, t]);
|
|
71588
|
+
return state;
|
|
71589
|
+
}
|
|
71590
|
+
|
|
71098
71591
|
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; }
|
|
71099
71592
|
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; }
|
|
71100
71593
|
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; } } }; }
|
|
@@ -71326,7 +71819,8 @@ function CommonColumnCell(_ref) {
|
|
|
71326
71819
|
}
|
|
71327
71820
|
|
|
71328
71821
|
var lockedRow = "locked-row-xG3aZ";
|
|
71329
|
-
var
|
|
71822
|
+
var outdatedRow = "outdated-row-0YsBf";
|
|
71823
|
+
var css_248z$c = "/* SAP-locked articles (SentToSAPSuccess): the whole row is read-only and visibly inert */\n.locked-row-xG3aZ {\n opacity: 0.55;\n}\n\n/* articles whose header snapshot differs from the current header row (isHeaderOutdated): warning accent */\n.outdated-row-0YsBf {\n box-shadow: inset 4px 0 0 #faad14;\n}\n";
|
|
71330
71824
|
styleInject(css_248z$c);
|
|
71331
71825
|
|
|
71332
71826
|
/**
|
|
@@ -71334,11 +71828,16 @@ styleInject(css_248z$c);
|
|
|
71334
71828
|
* filters `/v1/products`. The organization scoping lives in the preFilter — the products filter path
|
|
71335
71829
|
* applies neither the organization nor `archived` by itself (see HeaderData/hooks/useHeaderData.ts).
|
|
71336
71830
|
* The supplier / EK group context is per row: the two leading columns name it; keeping the header
|
|
71337
|
-
* inheritance (`headerValues`)
|
|
71831
|
+
* inheritance (`headerValues`) linked to those values is a server concern. A header save changes no
|
|
71832
|
+
* article — rows whose header snapshot differs from the header row, or that are not linked to the
|
|
71833
|
+
* header row of their context yet, get a warning accent, and the page's row action pulls the current
|
|
71834
|
+
* header values in.
|
|
71338
71835
|
*/
|
|
71339
71836
|
var ArticleTable = /*#__PURE__*/forwardRef(function ArticleTable(_ref, ref) {
|
|
71340
71837
|
var searchTerm = _ref.searchTerm,
|
|
71341
|
-
hooks = _ref.hooks
|
|
71838
|
+
hooks = _ref.hooks,
|
|
71839
|
+
rowActions = _ref.rowActions,
|
|
71840
|
+
headers = _ref.headers;
|
|
71342
71841
|
var _useTranslation = useTranslation(),
|
|
71343
71842
|
t = _useTranslation.t;
|
|
71344
71843
|
var root = useStore();
|
|
@@ -71406,7 +71905,7 @@ var ArticleTable = /*#__PURE__*/forwardRef(function ArticleTable(_ref, ref) {
|
|
|
71406
71905
|
// the dropdown lists become the enum cells' data (module-level cache, shared with the header page)
|
|
71407
71906
|
var enumLists = useDropdownEnumData(root, ARTICLE_DROPDOWN_KEYS);
|
|
71408
71907
|
var configuration = useMemo(function () {
|
|
71409
|
-
return enumLists && allowedValues ? {
|
|
71908
|
+
return enumLists && allowedValues && headers ? {
|
|
71410
71909
|
type: 'nodejs',
|
|
71411
71910
|
// conditions go out as an Atlas Search query (`search`): the free text search and the
|
|
71412
71911
|
// column filters run on the Lucene index instead of regex document scans, and the
|
|
@@ -71439,18 +71938,23 @@ var ArticleTable = /*#__PURE__*/forwardRef(function ArticleTable(_ref, ref) {
|
|
|
71439
71938
|
restore: "".concat(root.configurationStore.apiConfig.catalogService, "/v1/products/${_id}/restore")
|
|
71440
71939
|
},
|
|
71441
71940
|
dateFormat: DISPLAY_DATE_FORMAT,
|
|
71941
|
+
// the empty row for a new article leads the grid — creating one never means scrolling to the end
|
|
71942
|
+
newRowTop: true,
|
|
71442
71943
|
// the dropdowns of restricted fields offer only the allowed codes
|
|
71443
71944
|
colDef: buildArticleColDefs(t, CommonColumnCell, restrictEnumLists(enumLists, allowedValues)),
|
|
71444
|
-
rowClassRules: _defineProperty({}, lockedRow, function (_ref2) {
|
|
71945
|
+
rowClassRules: _defineProperty(_defineProperty({}, lockedRow, function (_ref2) {
|
|
71445
71946
|
var data = _ref2.data;
|
|
71446
71947
|
return isSentToSAP(data);
|
|
71948
|
+
}), outdatedRow, function (_ref3) {
|
|
71949
|
+
var data = _ref3.data;
|
|
71950
|
+
return canRefreshHeader(data, headers);
|
|
71447
71951
|
})
|
|
71448
71952
|
} : undefined;
|
|
71449
|
-
}, [root, t, enumLists, allowedValues]);
|
|
71953
|
+
}, [root, t, enumLists, allowedValues, headers]);
|
|
71450
71954
|
|
|
71451
|
-
// the grid mounts only once the enum lists
|
|
71452
|
-
// the column definitions in later would give the configuration a new identity and needlessly
|
|
71453
|
-
// reload the grid
|
|
71955
|
+
// the grid mounts only once the enum lists, the allowed field values and the header rows are loaded —
|
|
71956
|
+
// swapping the column definitions in later would give the configuration a new identity and needlessly
|
|
71957
|
+
// reload the grid, and ag-grid evaluates the row classes only against what is loaded at render time
|
|
71454
71958
|
if (!configuration) return /*#__PURE__*/jsx(Spin, {});
|
|
71455
71959
|
return /*#__PURE__*/jsx(Spreadsheet, {
|
|
71456
71960
|
ref: ref,
|
|
@@ -71462,7 +71966,8 @@ var ArticleTable = /*#__PURE__*/forwardRef(function ArticleTable(_ref, ref) {
|
|
|
71462
71966
|
searchFields: ARTICLE_SEARCH_FIELDS,
|
|
71463
71967
|
searchText: searchTerm,
|
|
71464
71968
|
configuration: configuration,
|
|
71465
|
-
hooks: hooks
|
|
71969
|
+
hooks: hooks,
|
|
71970
|
+
rowActions: rowActions
|
|
71466
71971
|
// locks the context menu row operations for transferred articles; cell edits are locked per column
|
|
71467
71972
|
,
|
|
71468
71973
|
isRowEditable: function isRowEditable(node) {
|
|
@@ -71758,13 +72263,22 @@ var SUMMARY_COL_IDS = new Set(ARTICLE_ITEM_GROUPS.map(function (group) {
|
|
|
71758
72263
|
/**
|
|
71759
72264
|
* The article ("Positionsdaten") page of the assortment manager: lists all articles of the
|
|
71760
72265
|
* organization, narrowed by the free text search. The supplier / EK group context lives per row in
|
|
71761
|
-
* the two leading columns;
|
|
71762
|
-
*
|
|
72266
|
+
* the two leading columns; writes into them link the header row client side (`onCellEditRequest` →
|
|
72267
|
+
* headerLink), the catalog service relinks on every save that changes them. A header save does not
|
|
72268
|
+
* change the articles — rows whose header snapshot differs from the current header row show as
|
|
72269
|
+
* outdated, and the row action of the actions column pulls the current header values into one
|
|
72270
|
+
* article on request. The selected row feeds the ITEM_GROUP tabs in the bottom toolbar.
|
|
71763
72271
|
*/
|
|
71764
72272
|
function ArticleData() {
|
|
71765
72273
|
var _useTranslation = useTranslation(),
|
|
71766
72274
|
t = _useTranslation.t;
|
|
71767
72275
|
var root = useStore();
|
|
72276
|
+
var _theme$useToken = theme.useToken(),
|
|
72277
|
+
token = _theme$useToken.token;
|
|
72278
|
+
var refreshHeaderValues = useRefreshHeaderValues(root);
|
|
72279
|
+
// the comparison side of the outdated marker; the grid waits for it
|
|
72280
|
+
var _useHeaderProducts = useHeaderProducts(root),
|
|
72281
|
+
headers = _useHeaderProducts.headers;
|
|
71768
72282
|
var mainGridRef = useRef(null);
|
|
71769
72283
|
var _useState = useState(),
|
|
71770
72284
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -71797,46 +72311,71 @@ function ArticleData() {
|
|
|
71797
72311
|
if (flushNow) subtableFlushers.current.set(groupKey, flushNow);else subtableFlushers.current["delete"](groupKey);
|
|
71798
72312
|
}, []);
|
|
71799
72313
|
|
|
72314
|
+
/**
|
|
72315
|
+
* Saves the pending changes of the mounted subtable tabs. Counted as an active swap: a subtable save
|
|
72316
|
+
* landing meanwhile must not rebase the tabs on its own (see handleArticleSaved).
|
|
72317
|
+
*/
|
|
72318
|
+
var flushSubtables = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
72319
|
+
var flushers;
|
|
72320
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
72321
|
+
while (1) switch (_context.prev = _context.next) {
|
|
72322
|
+
case 0:
|
|
72323
|
+
activeSwaps.current++;
|
|
72324
|
+
_context.prev = 1;
|
|
72325
|
+
flushers = _toConsumableArray(subtableFlushers.current.values());
|
|
72326
|
+
if (!flushers.length) {
|
|
72327
|
+
_context.next = 6;
|
|
72328
|
+
break;
|
|
72329
|
+
}
|
|
72330
|
+
_context.next = 6;
|
|
72331
|
+
return Promise.allSettled(flushers.map(function (flushNow) {
|
|
72332
|
+
return flushNow();
|
|
72333
|
+
}));
|
|
72334
|
+
case 6:
|
|
72335
|
+
_context.prev = 6;
|
|
72336
|
+
activeSwaps.current--;
|
|
72337
|
+
return _context.finish(6);
|
|
72338
|
+
case 9:
|
|
72339
|
+
case "end":
|
|
72340
|
+
return _context.stop();
|
|
72341
|
+
}
|
|
72342
|
+
}, _callee, null, [[1,, 6, 9]]);
|
|
72343
|
+
})), []);
|
|
72344
|
+
|
|
71800
72345
|
/**
|
|
71801
72346
|
* Swaps the selected article only after the subtables saved their pending changes — the swap
|
|
71802
72347
|
* remounts the tabs, and a change still inside the flush delay would be dropped with them. Only
|
|
71803
72348
|
* the latest requested selection is applied, rapid clicks do not stack stale swaps.
|
|
71804
72349
|
*/
|
|
71805
72350
|
var applySelection = useCallback(/*#__PURE__*/function () {
|
|
71806
|
-
var
|
|
71807
|
-
var seq
|
|
71808
|
-
return _regeneratorRuntime.wrap(function
|
|
71809
|
-
while (1) switch (
|
|
72351
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(next) {
|
|
72352
|
+
var seq;
|
|
72353
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
72354
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
71810
72355
|
case 0:
|
|
71811
72356
|
seq = ++selectionSeq.current;
|
|
71812
72357
|
selectedArticleId.current = next === null || next === void 0 ? void 0 : next._id;
|
|
71813
|
-
|
|
71814
|
-
|
|
71815
|
-
|
|
71816
|
-
if (!flushers.length) {
|
|
71817
|
-
_context.next = 8;
|
|
71818
|
-
break;
|
|
71819
|
-
}
|
|
71820
|
-
_context.next = 8;
|
|
71821
|
-
return Promise.allSettled(flushers.map(function (flushNow) {
|
|
71822
|
-
return flushNow();
|
|
71823
|
-
}));
|
|
71824
|
-
case 8:
|
|
71825
|
-
_context.prev = 8;
|
|
71826
|
-
activeSwaps.current--;
|
|
71827
|
-
return _context.finish(8);
|
|
71828
|
-
case 11:
|
|
72358
|
+
_context2.next = 4;
|
|
72359
|
+
return flushSubtables();
|
|
72360
|
+
case 4:
|
|
71829
72361
|
if (seq === selectionSeq.current) setSelectedArticle(next);
|
|
71830
|
-
case
|
|
72362
|
+
case 5:
|
|
71831
72363
|
case "end":
|
|
71832
|
-
return
|
|
72364
|
+
return _context2.stop();
|
|
71833
72365
|
}
|
|
71834
|
-
},
|
|
72366
|
+
}, _callee2);
|
|
71835
72367
|
}));
|
|
71836
72368
|
return function (_x) {
|
|
71837
|
-
return
|
|
72369
|
+
return _ref2.apply(this, arguments);
|
|
71838
72370
|
};
|
|
71839
|
-
}(), []);
|
|
72371
|
+
}(), [flushSubtables]);
|
|
72372
|
+
|
|
72373
|
+
// the header row of a supplier / EK group combination, loaded with the header page's own query
|
|
72374
|
+
var headerLinker = useMemo(function () {
|
|
72375
|
+
return createHeaderLinker(function (supplierNr, ekg) {
|
|
72376
|
+
return fetchHeaderProduct(root, supplierNr, ekg);
|
|
72377
|
+
});
|
|
72378
|
+
}, [root]);
|
|
71840
72379
|
var hooks = useMemo(function () {
|
|
71841
72380
|
return {
|
|
71842
72381
|
onCellSelectionChanged: function onCellSelectionChanged(event) {
|
|
@@ -71871,22 +72410,29 @@ function ArticleData() {
|
|
|
71871
72410
|
node = _step$value.node,
|
|
71872
72411
|
oldData = _step$value.oldData,
|
|
71873
72412
|
data = _step$value.data;
|
|
72413
|
+
// a removed row has no node any more — nothing left to reset there
|
|
72414
|
+
if (!(node !== null && node !== void 0 && node.id)) continue;
|
|
71874
72415
|
var resets = labelCompanionResets(oldData, data);
|
|
71875
|
-
if (
|
|
72416
|
+
if (Object.keys(resets).length > 0) grid.setNodeDataValue(node.id, resets);
|
|
71876
72417
|
}
|
|
71877
72418
|
} catch (err) {
|
|
71878
72419
|
_iterator.e(err);
|
|
71879
72420
|
} finally {
|
|
71880
72421
|
_iterator.f();
|
|
71881
72422
|
}
|
|
71882
|
-
}
|
|
72423
|
+
},
|
|
72424
|
+
// every write into a cell — writes into supplier / EK group link the header row before the save
|
|
72425
|
+
onCellEditRequest: headerLinker.onCellEditRequest
|
|
71883
72426
|
};
|
|
71884
|
-
}, [root, applySelection]);
|
|
72427
|
+
}, [root, applySelection, headerLinker]);
|
|
71885
72428
|
|
|
71886
|
-
/**
|
|
71887
|
-
|
|
71888
|
-
|
|
71889
|
-
|
|
72429
|
+
/**
|
|
72430
|
+
* A subtable save or a header refresh returns the updated article: update the main grid row in place and
|
|
72431
|
+
* rebase the tabs on it. A row action knows its node and passes it; a subtable save resolves the row.
|
|
72432
|
+
*/
|
|
72433
|
+
var handleArticleSaved = useCallback(function (saved, node) {
|
|
72434
|
+
var _mainGridRef$current, _ref3, _selectedNode$data;
|
|
72435
|
+
// update the row from the response instead of refresh(): a server-side refresh refetches
|
|
71890
72436
|
// EVERY cached block (including a once-visited block at the far end of the list — a deep
|
|
71891
72437
|
// $search pagination query that runs into the server timeout), and the just-saved row would
|
|
71892
72438
|
// come back stale from the asynchronously updated search index anyway
|
|
@@ -71895,7 +72441,7 @@ function ArticleData() {
|
|
|
71895
72441
|
// this session keep their synthetic node id, so fall back to the selected node — guarded by
|
|
71896
72442
|
// the article id, because the selection may have moved on while this save was in flight
|
|
71897
72443
|
var selectedNode = selectedNodeId.current ? api === null || api === void 0 ? void 0 : api.getRowNode(selectedNodeId.current) : undefined;
|
|
71898
|
-
var rowNode = (
|
|
72444
|
+
var rowNode = (_ref3 = node !== null && node !== void 0 ? node : api === null || api === void 0 ? void 0 : api.getRowNode(String(saved._id))) !== null && _ref3 !== void 0 ? _ref3 : (selectedNode === null || selectedNode === void 0 || (_selectedNode$data = selectedNode.data) === null || _selectedNode$data === void 0 ? void 0 : _selectedNode$data._id) === saved._id ? selectedNode : undefined;
|
|
71899
72445
|
if (rowNode !== null && rowNode !== void 0 && rowNode.data) rowNode.updateData(_objectSpread$i(_objectSpread$i({}, rowNode.data), saved));
|
|
71900
72446
|
// a save landing while a swap is already flushing must not steal that swap, and a late save
|
|
71901
72447
|
// for a previously selected article must not pull the selection back to it — the rebase goes
|
|
@@ -71903,6 +72449,103 @@ function ArticleData() {
|
|
|
71903
72449
|
if (activeSwaps.current === 0 && selectedArticleId.current === saved._id) void applySelection(saved);
|
|
71904
72450
|
}, [applySelection]);
|
|
71905
72451
|
|
|
72452
|
+
// the actions column (Enricher table pattern): one button per row that pulls the current header values
|
|
72453
|
+
// into the article, enabled only while there is something to pull. Disabled rather than hidden — an
|
|
72454
|
+
// empty action cell would shrink the shared column to the width of nothing. Returns no ActionResult on
|
|
72455
|
+
// purpose: the grid would commit one to the server as a new change, while the row is already persisted
|
|
72456
|
+
// and replaced in place here
|
|
72457
|
+
var rowActions = useMemo(function () {
|
|
72458
|
+
return [{
|
|
72459
|
+
icon: function icon(_ref4) {
|
|
72460
|
+
var _selectedNodes$;
|
|
72461
|
+
var selectedNodes = _ref4.selectedNodes;
|
|
72462
|
+
return /*#__PURE__*/jsx(SyncOutlined$1, {
|
|
72463
|
+
style: canRefreshHeader((_selectedNodes$ = selectedNodes[0]) === null || _selectedNodes$ === void 0 ? void 0 : _selectedNodes$.data, headers) ? {
|
|
72464
|
+
color: token.colorWarning
|
|
72465
|
+
} : undefined
|
|
72466
|
+
});
|
|
72467
|
+
},
|
|
72468
|
+
// canRefreshHeader is false for transferred rows as well, so they stay disabled too
|
|
72469
|
+
disabled: function disabled(_ref5) {
|
|
72470
|
+
var _selectedNodes$2;
|
|
72471
|
+
var selectedNodes = _ref5.selectedNodes;
|
|
72472
|
+
return !canRefreshHeader((_selectedNodes$2 = selectedNodes[0]) === null || _selectedNodes$2 === void 0 ? void 0 : _selectedNodes$2.data, headers);
|
|
72473
|
+
},
|
|
72474
|
+
tooltip: function tooltip(_ref6) {
|
|
72475
|
+
var _selectedNodes$3;
|
|
72476
|
+
var selectedNodes = _ref6.selectedNodes;
|
|
72477
|
+
var data = (_selectedNodes$3 = selectedNodes[0]) === null || _selectedNodes$3 === void 0 ? void 0 : _selectedNodes$3.data;
|
|
72478
|
+
if (isSentToSAP(data)) {
|
|
72479
|
+
return t('backoffice.assortmentmanager.articledata.refreshHeader.lockedTooltip', 'Bereits an SAP übertragen – Kopfdaten können nicht aktualisiert werden');
|
|
72480
|
+
}
|
|
72481
|
+
if (isHeaderOutdated(data, headers)) return t('backoffice.assortmentmanager.articledata.refreshHeader.outdatedTooltip', 'Kopfdaten veraltet – jetzt aktualisieren');
|
|
72482
|
+
if (hasUnlinkedHeader(data, headers)) {
|
|
72483
|
+
return t('backoffice.assortmentmanager.articledata.refreshHeader.unlinkedTooltip', 'Kopfzeile vorhanden – Kopfdaten jetzt übernehmen');
|
|
72484
|
+
}
|
|
72485
|
+
return t('backoffice.assortmentmanager.articledata.refreshHeader.currentTooltip', 'Kopfdaten aktuell');
|
|
72486
|
+
},
|
|
72487
|
+
action: function () {
|
|
72488
|
+
var _action = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref7) {
|
|
72489
|
+
var _node$data2;
|
|
72490
|
+
var selectedNodes, node, id, refreshed;
|
|
72491
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
72492
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
72493
|
+
case 0:
|
|
72494
|
+
selectedNodes = _ref7.selectedNodes;
|
|
72495
|
+
node = selectedNodes[0];
|
|
72496
|
+
id = node === null || node === void 0 || (_node$data2 = node.data) === null || _node$data2 === void 0 ? void 0 : _node$data2._id;
|
|
72497
|
+
if (!(id === undefined)) {
|
|
72498
|
+
_context3.next = 5;
|
|
72499
|
+
break;
|
|
72500
|
+
}
|
|
72501
|
+
return _context3.abrupt("return");
|
|
72502
|
+
case 5:
|
|
72503
|
+
// the saving overlay blocks grid edits while the row is being replaced
|
|
72504
|
+
handleSubtableSavingChange('headerRefresh', true);
|
|
72505
|
+
_context3.prev = 6;
|
|
72506
|
+
if (!(selectedArticleId.current === id)) {
|
|
72507
|
+
_context3.next = 10;
|
|
72508
|
+
break;
|
|
72509
|
+
}
|
|
72510
|
+
_context3.next = 10;
|
|
72511
|
+
return flushSubtables();
|
|
72512
|
+
case 10:
|
|
72513
|
+
_context3.next = 12;
|
|
72514
|
+
return refreshHeaderValues(String(id));
|
|
72515
|
+
case 12:
|
|
72516
|
+
refreshed = _context3.sent;
|
|
72517
|
+
handleArticleSaved(refreshed, node);
|
|
72518
|
+
message.success(t('backoffice.assortmentmanager.articledata.refreshHeader.success', 'Kopfdaten übernommen.'));
|
|
72519
|
+
_context3.next = 20;
|
|
72520
|
+
break;
|
|
72521
|
+
case 17:
|
|
72522
|
+
_context3.prev = 17;
|
|
72523
|
+
_context3.t0 = _context3["catch"](6);
|
|
72524
|
+
// caught here: an error escaping the action only yields the grid's generic notification
|
|
72525
|
+
message.error(t('backoffice.assortmentmanager.articledata.refreshHeader.error', {
|
|
72526
|
+
defaultValue: 'Kopfdaten konnten nicht übernommen werden: {{message}}',
|
|
72527
|
+
message: _context3.t0 instanceof Error ? _context3.t0.message : String(_context3.t0)
|
|
72528
|
+
}));
|
|
72529
|
+
case 20:
|
|
72530
|
+
_context3.prev = 20;
|
|
72531
|
+
handleSubtableSavingChange('headerRefresh', false);
|
|
72532
|
+
return _context3.finish(20);
|
|
72533
|
+
case 23:
|
|
72534
|
+
case "end":
|
|
72535
|
+
return _context3.stop();
|
|
72536
|
+
}
|
|
72537
|
+
}, _callee3, null, [[6, 17, 20, 23]]);
|
|
72538
|
+
}));
|
|
72539
|
+
function action(_x2) {
|
|
72540
|
+
return _action.apply(this, arguments);
|
|
72541
|
+
}
|
|
72542
|
+
return action;
|
|
72543
|
+
}()
|
|
72544
|
+
}];
|
|
72545
|
+
},
|
|
72546
|
+
// `headers` resolves before the grid mounts (ArticleTable waits for it), so the grid sees the final actions
|
|
72547
|
+
[t, token.colorWarning, headers, refreshHeaderValues, handleArticleSaved, flushSubtables, handleSubtableSavingChange]);
|
|
72548
|
+
|
|
71906
72549
|
// registered per selection (Media table pattern): the tabs pick up the newly selected article,
|
|
71907
72550
|
// which reloads their rows — applySelection saved pending changes beforehand, so only unsavable
|
|
71908
72551
|
// (invalid) rows can be lost by that, and the tab warns when it drops them
|
|
@@ -71915,7 +72558,7 @@ function ArticleData() {
|
|
|
71915
72558
|
elementProps: {
|
|
71916
72559
|
group: group,
|
|
71917
72560
|
article: selectedArticle,
|
|
71918
|
-
onSaved:
|
|
72561
|
+
onSaved: handleArticleSaved,
|
|
71919
72562
|
registerFlusher: registerFlusher,
|
|
71920
72563
|
onSavingChange: handleSubtableSavingChange
|
|
71921
72564
|
},
|
|
@@ -71924,7 +72567,7 @@ function ArticleData() {
|
|
|
71924
72567
|
}
|
|
71925
72568
|
};
|
|
71926
72569
|
});
|
|
71927
|
-
}, [t, selectedArticle,
|
|
72570
|
+
}, [t, selectedArticle, handleArticleSaved, registerFlusher, handleSubtableSavingChange]);
|
|
71928
72571
|
useTools({
|
|
71929
72572
|
conditionalTools: conditionalTools
|
|
71930
72573
|
});
|
|
@@ -71952,7 +72595,9 @@ function ArticleData() {
|
|
|
71952
72595
|
children: [/*#__PURE__*/jsx(ArticleTable, {
|
|
71953
72596
|
ref: mainGridRef,
|
|
71954
72597
|
searchTerm: searchTerm,
|
|
71955
|
-
hooks: hooks
|
|
72598
|
+
hooks: hooks,
|
|
72599
|
+
rowActions: rowActions,
|
|
72600
|
+
headers: headers
|
|
71956
72601
|
}), subtableSaving && /*#__PURE__*/jsxs("div", {
|
|
71957
72602
|
className: savingOverlay,
|
|
71958
72603
|
children: [/*#__PURE__*/jsx(Spin, {
|