@crystaldesign/diva-backoffice 24.6.0-beta.2 → 24.6.0-beta.21
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 +45 -52
- package/package.json +2 -2
package/build/esm/index.js
CHANGED
|
@@ -11132,7 +11132,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11132
11132
|
}
|
|
11133
11133
|
}, _callee, null, [[8, 17, 20, 23]]);
|
|
11134
11134
|
}));
|
|
11135
|
-
return function (
|
|
11135
|
+
return function (_x) {
|
|
11136
11136
|
return _ref2.apply(this, arguments);
|
|
11137
11137
|
};
|
|
11138
11138
|
}());
|
|
@@ -11174,7 +11174,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11174
11174
|
}
|
|
11175
11175
|
}, _callee2, this);
|
|
11176
11176
|
}));
|
|
11177
|
-
function donwloadFile(
|
|
11177
|
+
function donwloadFile(_x2, _x3) {
|
|
11178
11178
|
return _donwloadFile.apply(this, arguments);
|
|
11179
11179
|
}
|
|
11180
11180
|
return donwloadFile;
|
|
@@ -11214,7 +11214,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11214
11214
|
}
|
|
11215
11215
|
}, _callee3, this);
|
|
11216
11216
|
}));
|
|
11217
|
-
function connectionFile(
|
|
11217
|
+
function connectionFile(_x4, _x5, _x6, _x7, _x8) {
|
|
11218
11218
|
return _connectionFile.apply(this, arguments);
|
|
11219
11219
|
}
|
|
11220
11220
|
return connectionFile;
|
|
@@ -11278,23 +11278,15 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11278
11278
|
}
|
|
11279
11279
|
}, _callee4, this, [[14, 22]]);
|
|
11280
11280
|
}));
|
|
11281
|
-
function getConnectionData(
|
|
11281
|
+
function getConnectionData(_x9, _x10) {
|
|
11282
11282
|
return _getConnectionData.apply(this, arguments);
|
|
11283
11283
|
}
|
|
11284
11284
|
return getConnectionData;
|
|
11285
11285
|
}()
|
|
11286
11286
|
}, {
|
|
11287
11287
|
key: "downloadRequest",
|
|
11288
|
-
value: function (
|
|
11289
|
-
function
|
|
11290
|
-
return _downloadRequest.apply(this, arguments);
|
|
11291
|
-
}
|
|
11292
|
-
downloadRequest.toString = function () {
|
|
11293
|
-
return _downloadRequest.toString();
|
|
11294
|
-
};
|
|
11295
|
-
return downloadRequest;
|
|
11296
|
-
}( /*#__PURE__*/function () {
|
|
11297
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(download, data) {
|
|
11288
|
+
value: function () {
|
|
11289
|
+
var _downloadRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(download, data) {
|
|
11298
11290
|
var _this$_rootStore2;
|
|
11299
11291
|
var url, result, base64File, a, mimeType, res;
|
|
11300
11292
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
@@ -11344,10 +11336,11 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11344
11336
|
}
|
|
11345
11337
|
}, _callee5, this);
|
|
11346
11338
|
}));
|
|
11347
|
-
|
|
11348
|
-
return
|
|
11349
|
-
}
|
|
11350
|
-
|
|
11339
|
+
function downloadRequest(_x11, _x12) {
|
|
11340
|
+
return _downloadRequest.apply(this, arguments);
|
|
11341
|
+
}
|
|
11342
|
+
return downloadRequest;
|
|
11343
|
+
}()
|
|
11351
11344
|
}, {
|
|
11352
11345
|
key: "checkCondition",
|
|
11353
11346
|
value: function checkCondition(download, data) {
|
|
@@ -11423,7 +11416,7 @@ var DownloadStore = /*#__PURE__*/function () {
|
|
|
11423
11416
|
}
|
|
11424
11417
|
}, _callee6, this, [[3, 16, 19, 22]]);
|
|
11425
11418
|
}));
|
|
11426
|
-
function openDownload(
|
|
11419
|
+
function openDownload(_x13) {
|
|
11427
11420
|
return _openDownload.apply(this, arguments);
|
|
11428
11421
|
}
|
|
11429
11422
|
return openDownload;
|
|
@@ -13084,7 +13077,7 @@ function useFormData (_ref) {
|
|
|
13084
13077
|
mediaHandler = _useDivaCore2.handler.mediaHandler;
|
|
13085
13078
|
var onSave = /*#__PURE__*/function () {
|
|
13086
13079
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(values) {
|
|
13087
|
-
var newData, finalData, response, i, _configuration$additi, additional, additionalApi,
|
|
13080
|
+
var newData, finalData, response, i, _configuration$additi, additional, additionalApi, data, errorCode, item;
|
|
13088
13081
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
13089
13082
|
while (1) switch (_context2.prev = _context2.next) {
|
|
13090
13083
|
case 0:
|
|
@@ -13125,12 +13118,12 @@ function useFormData (_ref) {
|
|
|
13125
13118
|
additionalApi = new _default$d({
|
|
13126
13119
|
apiInterface: additional.apiInterface
|
|
13127
13120
|
}, root);
|
|
13128
|
-
|
|
13121
|
+
data = {};
|
|
13129
13122
|
if (additional.addBaseUrl) {
|
|
13130
|
-
|
|
13123
|
+
data[additional.addBaseUrl] = window.location.origin;
|
|
13131
13124
|
}
|
|
13132
13125
|
_context2.next = 23;
|
|
13133
|
-
return additionalApi.create(
|
|
13126
|
+
return additionalApi.create(data, additional.mapping, response);
|
|
13134
13127
|
case 23:
|
|
13135
13128
|
i++;
|
|
13136
13129
|
_context2.next = 16;
|
|
@@ -13619,9 +13612,9 @@ var JsonEditor$2 = function JsonEditor(_ref) {
|
|
|
13619
13612
|
mode: 'code',
|
|
13620
13613
|
onChange: function onChange() {
|
|
13621
13614
|
try {
|
|
13622
|
-
var
|
|
13615
|
+
var e = jsonEditor.current.get();
|
|
13623
13616
|
jsonEditor.current.validate();
|
|
13624
|
-
_onChange === null || _onChange === void 0 || _onChange(
|
|
13617
|
+
_onChange === null || _onChange === void 0 || _onChange(e);
|
|
13625
13618
|
setCanSave(savable);
|
|
13626
13619
|
} catch (_unused) {
|
|
13627
13620
|
setCanSave(false);
|
|
@@ -13727,7 +13720,7 @@ function useButtonData (_ref) {
|
|
|
13727
13720
|
}, [loading]);
|
|
13728
13721
|
var onClick = /*#__PURE__*/function () {
|
|
13729
13722
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
13730
|
-
var
|
|
13723
|
+
var result, _ref3, _result$error, newData;
|
|
13731
13724
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
13732
13725
|
while (1) switch (_context.prev = _context.next) {
|
|
13733
13726
|
case 0:
|
|
@@ -13736,21 +13729,21 @@ function useButtonData (_ref) {
|
|
|
13736
13729
|
_context.next = 4;
|
|
13737
13730
|
return apiHandler.create({}, configuration.mapping, data);
|
|
13738
13731
|
case 4:
|
|
13739
|
-
|
|
13740
|
-
if (!
|
|
13732
|
+
result = _context.sent;
|
|
13733
|
+
if (!result || result.error || result.Error) {
|
|
13741
13734
|
configuration.resultTranslation && setActionResult({
|
|
13742
13735
|
type: 'error',
|
|
13743
|
-
message: configuration.resultTranslation ? t(configuration.resultTranslation.failed) : (_ref3 = (_result$error =
|
|
13736
|
+
message: configuration.resultTranslation ? t(configuration.resultTranslation.failed) : (_ref3 = (_result$error = result.error) !== null && _result$error !== void 0 ? _result$error : result.Error) !== null && _ref3 !== void 0 ? _ref3 : 'Failed'
|
|
13744
13737
|
});
|
|
13745
13738
|
} else {
|
|
13746
13739
|
configuration.resultTranslation && setActionResult({
|
|
13747
13740
|
type: 'success',
|
|
13748
|
-
message: configuration.resultTranslation ? t(configuration.resultTranslation.success) :
|
|
13741
|
+
message: configuration.resultTranslation ? t(configuration.resultTranslation.success) : result !== null && result !== void 0 && result.result ? result.result : 'Success'
|
|
13749
13742
|
});
|
|
13750
13743
|
if (callback) {
|
|
13751
13744
|
newData = aplyMapping({
|
|
13752
13745
|
mapable: {},
|
|
13753
|
-
mappingData:
|
|
13746
|
+
mappingData: result,
|
|
13754
13747
|
mapping: configuration.resultMapping,
|
|
13755
13748
|
rootStore: root,
|
|
13756
13749
|
fallBackToParams: true
|
|
@@ -14671,7 +14664,7 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
14671
14664
|
}, [supplier]);
|
|
14672
14665
|
var onSelectSupplier = /*#__PURE__*/function () {
|
|
14673
14666
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id, catalogId) {
|
|
14674
|
-
var _catalogList$, _selectedSupplier, catalogList,
|
|
14667
|
+
var _catalogList$, _selectedSupplier, catalogList, supplierData;
|
|
14675
14668
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
14676
14669
|
while (1) switch (_context2.prev = _context2.next) {
|
|
14677
14670
|
case 0:
|
|
@@ -14721,11 +14714,11 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
14721
14714
|
_context2.next = 22;
|
|
14722
14715
|
return apiHandler.readSupplierData(id);
|
|
14723
14716
|
case 22:
|
|
14724
|
-
|
|
14717
|
+
supplierData = _context2.sent;
|
|
14725
14718
|
case 23:
|
|
14726
14719
|
onSelectedSupplier === null || onSelectedSupplier === void 0 || onSelectedSupplier(_objectSpread$u(_objectSpread$u({}, _selectedSupplier), {}, {
|
|
14727
14720
|
supplierGuid: catalogList === null || catalogList === void 0 || (_catalogList$ = catalogList[0]) === null || _catalogList$ === void 0 ? void 0 : _catalogList$.Subfolder
|
|
14728
|
-
}),
|
|
14721
|
+
}), supplierData);
|
|
14729
14722
|
if (catalogId && catalogList.find(function (c) {
|
|
14730
14723
|
return c._id == catalogId;
|
|
14731
14724
|
})) setSelectedCatalog(catalogId);
|
|
@@ -16259,9 +16252,9 @@ function useSelectOrCreateData (_ref) {
|
|
|
16259
16252
|
var index = selected.findIndex(function (s) {
|
|
16260
16253
|
return s.value == removed.value;
|
|
16261
16254
|
});
|
|
16262
|
-
var
|
|
16263
|
-
|
|
16264
|
-
setSelected(
|
|
16255
|
+
var newSelected = _toConsumableArray(selected);
|
|
16256
|
+
newSelected.splice(index, 1);
|
|
16257
|
+
setSelected(newSelected);
|
|
16265
16258
|
} else {
|
|
16266
16259
|
setSelected([]);
|
|
16267
16260
|
}
|
|
@@ -16569,25 +16562,25 @@ function useProcess (_ref) {
|
|
|
16569
16562
|
}();
|
|
16570
16563
|
var save = /*#__PURE__*/function () {
|
|
16571
16564
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(state) {
|
|
16572
|
-
var newState,
|
|
16565
|
+
var newState, index;
|
|
16573
16566
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
16574
16567
|
while (1) switch (_context2.prev = _context2.next) {
|
|
16575
16568
|
case 0:
|
|
16576
16569
|
newState = [];
|
|
16577
|
-
|
|
16570
|
+
index = 0;
|
|
16578
16571
|
case 2:
|
|
16579
|
-
if (!(
|
|
16572
|
+
if (!(index < state.length)) {
|
|
16580
16573
|
_context2.next = 11;
|
|
16581
16574
|
break;
|
|
16582
16575
|
}
|
|
16583
16576
|
_context2.t0 = newState;
|
|
16584
16577
|
_context2.next = 6;
|
|
16585
|
-
return saveData(state[
|
|
16578
|
+
return saveData(state[index], newState);
|
|
16586
16579
|
case 6:
|
|
16587
16580
|
_context2.t1 = _context2.sent;
|
|
16588
16581
|
_context2.t0.push.call(_context2.t0, _context2.t1);
|
|
16589
16582
|
case 8:
|
|
16590
|
-
|
|
16583
|
+
index++;
|
|
16591
16584
|
_context2.next = 2;
|
|
16592
16585
|
break;
|
|
16593
16586
|
case 11:
|
|
@@ -22034,27 +22027,27 @@ var Legend = function Legend(props) {
|
|
|
22034
22027
|
itemLayout: "horizontal",
|
|
22035
22028
|
dataSource: [{
|
|
22036
22029
|
title: 'DIVA Retailer',
|
|
22037
|
-
description: 'Retailer-Organisationen werden dazu
|
|
22030
|
+
description: 'Retailer-Organisationen werden dazu verwendet, Katalogdaten für den Handel aufzubereiten.' + 'Hierbei werden die Kataloge der Hersteller importiert und für den Verkauf angepasst, beispielsweise durch die Anpassung von Preisen.' + 'Diese Organisationen können entweder direkt im Handel genutzt werden oder weiterhin in verschiedene Kanäle unterteilt werden.',
|
|
22038
22031
|
color: '#81c784'
|
|
22039
22032
|
}, {
|
|
22040
22033
|
title: 'DIVA Retailer Kanal',
|
|
22041
|
-
description: 'Organisationen die unterhalb einer Retailer-Organisation angesiedelt sind, haben Zugriff auf
|
|
22034
|
+
description: 'Organisationen, die unterhalb einer Retailer-Organisation angesiedelt sind, haben Zugriff auf deren Katalogdaten.' + 'Sie können beispielsweise dazu genutzt werden, die verschiedenen Filialen eines Händlers zu organisieren.' + 'In diesem Kontext können die Katalogdaten nicht mehr angepasst werden, sodass beispielsweise Preise direkt übernommen werden.',
|
|
22042
22035
|
color: '#c8e6c9'
|
|
22043
22036
|
}, {
|
|
22044
22037
|
title: 'DIVA Supplier',
|
|
22045
|
-
description: 'Supplier-Organisationen dienen dazu Kataloge für
|
|
22038
|
+
description: 'Supplier-Organisationen dienen dazu, Kataloge für Hersteller zu erstellen.' + 'Dabei werden Kataloge entweder neu aufgebaut oder als IDM-Kataloge importiert.',
|
|
22046
22039
|
color: '#ba68c8'
|
|
22047
22040
|
}, {
|
|
22048
22041
|
title: 'DIVA Dealer',
|
|
22049
|
-
description: '
|
|
22042
|
+
description: 'Organisationen unterhalb einer Supplier-Organisation werden in DIVA als Dealer bezeichnet.' + 'Über diese Dealer-Organisationen werden Kataloge der Supplier-Organisation für verschiedene Retailer-Organisationen freigegeben.',
|
|
22050
22043
|
color: '#e1bee7'
|
|
22051
22044
|
}, {
|
|
22052
22045
|
title: 'DIVA Verband',
|
|
22053
|
-
description: 'Verbandsorganisationen werden
|
|
22046
|
+
description: 'Verbandsorganisationen werden genutzt, um Kataloge für mehrere Retailer-Organisationen aufzubereiten.' + 'Dabei werden Kataloge von einer Supplier-Organisation importiert und für den Handel angepasst.' + 'In den verschiedenen Retailer-Organisationen müssen dann nur noch die Unterschiede gepflegt werden.',
|
|
22054
22047
|
color: '#fff176'
|
|
22055
22048
|
}, {
|
|
22056
22049
|
title: 'Hülsenorganisation',
|
|
22057
|
-
description: 'Diese Organisationen können nicht im Frontend genutzt werden und haben auch keinen Zugriff auf Katalogdaten.' + 'Sie
|
|
22050
|
+
description: 'Diese Organisationen können nicht im Frontend genutzt werden und haben auch keinen Zugriff auf Katalogdaten.' + 'Sie dienen lediglich dazu, die Struktur der Organisation aufzubauen und abzubilden.',
|
|
22058
22051
|
color: '#fff'
|
|
22059
22052
|
}],
|
|
22060
22053
|
renderItem: function renderItem(item, index) {
|
|
@@ -25126,7 +25119,7 @@ function useJsonEditorData (id, setCanSave, onChange, onError) {
|
|
|
25126
25119
|
}
|
|
25127
25120
|
function _save() {
|
|
25128
25121
|
_save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(original) {
|
|
25129
|
-
var
|
|
25122
|
+
var data;
|
|
25130
25123
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
25131
25124
|
while (1) switch (_context.prev = _context.next) {
|
|
25132
25125
|
case 0:
|
|
@@ -25138,7 +25131,7 @@ function useJsonEditorData (id, setCanSave, onChange, onError) {
|
|
|
25138
25131
|
_context.next = 4;
|
|
25139
25132
|
return apiHandler.update(curData, original);
|
|
25140
25133
|
case 4:
|
|
25141
|
-
|
|
25134
|
+
data = _context.sent;
|
|
25142
25135
|
_context.next = 11;
|
|
25143
25136
|
break;
|
|
25144
25137
|
case 7:
|
|
@@ -25149,9 +25142,9 @@ function useJsonEditorData (id, setCanSave, onChange, onError) {
|
|
|
25149
25142
|
_context.next = 10;
|
|
25150
25143
|
return apiHandler.create(curData);
|
|
25151
25144
|
case 10:
|
|
25152
|
-
|
|
25145
|
+
data = _context.sent;
|
|
25153
25146
|
case 11:
|
|
25154
|
-
onChange === null || onChange === void 0 || onChange(
|
|
25147
|
+
onChange === null || onChange === void 0 || onChange(data);
|
|
25155
25148
|
_context.next = 18;
|
|
25156
25149
|
break;
|
|
25157
25150
|
case 14:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
|
3
|
-
"version": "24.6.0-beta.
|
|
3
|
+
"version": "24.6.0-beta.21",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@testing-library/jest-dom": "^5.15.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
},
|
|
52
52
|
"module": "build/esm/index.js",
|
|
53
53
|
"types": "./build/types/backoffice/src/index.d.ts",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "51e8ea8c874c6dac6e8334267aed32de7dd3b62c"
|
|
55
55
|
}
|