@crystaldesign/diva-backoffice 26.5.0-rc.7 → 26.6.0-beta.2
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 +341 -359
- package/build/types/backoffice/src/store/RootStore.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssetMananger/MediaItem.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/AssetMananger/utils.d.ts +14 -1
- package/build/types/backoffice/src/ui/AssetMananger/utils.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/MediaUpload/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/MediaUpload/types.d.ts +2 -3
- package/build/types/backoffice/src/ui/MediaUpload/types.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/MediaUpload/useMediaUpload.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Select/useSelectData.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/TreeChart/ZoomWrapper/index.d.ts.map +1 -1
- package/package.json +10 -10
- package/build/types/backoffice/src/ui/MediaUpload/MediaUploadApiHandler.d.ts +0 -22
- package/build/types/backoffice/src/ui/MediaUpload/MediaUploadApiHandler.d.ts.map +0 -1
package/build/esm/index.js
CHANGED
|
@@ -391,7 +391,7 @@ function parseFilter(filters, prefilter) {
|
|
|
391
391
|
|
|
392
392
|
//parse filter so multiple filter for one field are possible. Now they are always with AND Operater related.
|
|
393
393
|
|
|
394
|
-
Object.entries(filters
|
|
394
|
+
Object.entries(filters).filter(function (f) {
|
|
395
395
|
return f[1];
|
|
396
396
|
}).map(function (filter) {
|
|
397
397
|
var _filter = _slicedToArray(filter, 2),
|
|
@@ -504,7 +504,7 @@ function ownKeys$1r(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySym
|
|
|
504
504
|
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; }
|
|
505
505
|
var LOG$f = getLogger('Backoffice', 'ApiHandler');
|
|
506
506
|
var jp = require('jsonpath');
|
|
507
|
-
var _default$
|
|
507
|
+
var _default$c = /*#__PURE__*/function () {
|
|
508
508
|
function _default(configuration, _rootStore) {
|
|
509
509
|
var _this = this;
|
|
510
510
|
_classCallCheck(this, _default);
|
|
@@ -1196,13 +1196,13 @@ var _default$d = /*#__PURE__*/function () {
|
|
|
1196
1196
|
}]);
|
|
1197
1197
|
}();
|
|
1198
1198
|
|
|
1199
|
-
function _callSuper$
|
|
1200
|
-
function _isNativeReflectConstruct$
|
|
1199
|
+
function _callSuper$5(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1200
|
+
function _isNativeReflectConstruct$5() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1201
1201
|
function _superPropGet$3(t, e, o, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), e, o); return 2 & r && "function" == typeof p ? function (t) { return p.apply(o, t); } : p; }
|
|
1202
|
-
var _default$
|
|
1202
|
+
var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
1203
1203
|
function _default(configuration, root) {
|
|
1204
1204
|
_classCallCheck(this, _default);
|
|
1205
|
-
return _callSuper$
|
|
1205
|
+
return _callSuper$5(this, _default, [configuration, root]);
|
|
1206
1206
|
}
|
|
1207
1207
|
_inherits(_default, _ApiHandler);
|
|
1208
1208
|
return _createClass(_default, [{
|
|
@@ -1284,190 +1284,7 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1284
1284
|
return create;
|
|
1285
1285
|
}()
|
|
1286
1286
|
}]);
|
|
1287
|
-
}(_default$
|
|
1288
|
-
|
|
1289
|
-
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; }
|
|
1290
|
-
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; }
|
|
1291
|
-
function _callSuper$5(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1292
|
-
function _isNativeReflectConstruct$5() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1293
|
-
var _default$b = /*#__PURE__*/function (_ApiHandler) {
|
|
1294
|
-
function _default(configuration, root) {
|
|
1295
|
-
var _this;
|
|
1296
|
-
_classCallCheck(this, _default);
|
|
1297
|
-
_this = _callSuper$5(this, _default, [configuration, root]);
|
|
1298
|
-
_defineProperty(_this, "refApiHander", void 0);
|
|
1299
|
-
_defineProperty(_this, "targetApiHandler", void 0);
|
|
1300
|
-
_this.refApiHander = new _default$d({
|
|
1301
|
-
apiInterface: configuration.refApiInterface,
|
|
1302
|
-
type: 'MediaUpload'
|
|
1303
|
-
}, root);
|
|
1304
|
-
if (configuration.targetApiInterface) {
|
|
1305
|
-
_this.targetApiHandler = new _default$d({
|
|
1306
|
-
apiInterface: configuration.targetApiInterface,
|
|
1307
|
-
type: 'MediaUpload'
|
|
1308
|
-
}, root);
|
|
1309
|
-
}
|
|
1310
|
-
return _this;
|
|
1311
|
-
}
|
|
1312
|
-
_inherits(_default, _ApiHandler);
|
|
1313
|
-
return _createClass(_default, [{
|
|
1314
|
-
key: "canRead",
|
|
1315
|
-
get: function get() {
|
|
1316
|
-
var _this$targetApiHandle;
|
|
1317
|
-
return !!((_this$targetApiHandle = this.targetApiHandler) !== null && _this$targetApiHandle !== void 0 && _this$targetApiHandle.canRead);
|
|
1318
|
-
}
|
|
1319
|
-
}, {
|
|
1320
|
-
key: "read",
|
|
1321
|
-
value: function () {
|
|
1322
|
-
var _read = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(mapping, mappingData) {
|
|
1323
|
-
var _targetMapping, _targetMapping2, data, response, urlField, refField;
|
|
1324
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
1325
|
-
while (1) switch (_context.prev = _context.next) {
|
|
1326
|
-
case 0:
|
|
1327
|
-
if (!this.targetApiHandler) {
|
|
1328
|
-
_context.next = 8;
|
|
1329
|
-
break;
|
|
1330
|
-
}
|
|
1331
|
-
data = applyMapping({
|
|
1332
|
-
mappable: {},
|
|
1333
|
-
mapping: this.configuration.targetMapping,
|
|
1334
|
-
rootStore: this._rootStore
|
|
1335
|
-
});
|
|
1336
|
-
_context.next = 4;
|
|
1337
|
-
return this.targetApiHandler.read(mapping !== null && mapping !== void 0 ? mapping : {
|
|
1338
|
-
type: 'query',
|
|
1339
|
-
map: [{
|
|
1340
|
-
targetField: 'id',
|
|
1341
|
-
sourceField: '_id'
|
|
1342
|
-
}]
|
|
1343
|
-
}, data);
|
|
1344
|
-
case 4:
|
|
1345
|
-
response = _context.sent;
|
|
1346
|
-
urlField = (_targetMapping = this.configuration.targetMapping) === null || _targetMapping === void 0 || (_targetMapping = _targetMapping.map.find(function (m) {
|
|
1347
|
-
return m.sourceField == 'url';
|
|
1348
|
-
})) === null || _targetMapping === void 0 ? void 0 : _targetMapping.targetField;
|
|
1349
|
-
refField = (_targetMapping2 = this.configuration.targetMapping) === null || _targetMapping2 === void 0 || (_targetMapping2 = _targetMapping2.map.find(function (m) {
|
|
1350
|
-
return m.sourceField == 'ref';
|
|
1351
|
-
})) === null || _targetMapping2 === void 0 ? void 0 : _targetMapping2.targetField;
|
|
1352
|
-
return _context.abrupt("return", {
|
|
1353
|
-
url: response[urlField],
|
|
1354
|
-
ref: response[refField],
|
|
1355
|
-
targetId: response._id
|
|
1356
|
-
});
|
|
1357
|
-
case 8:
|
|
1358
|
-
return _context.abrupt("return", undefined);
|
|
1359
|
-
case 9:
|
|
1360
|
-
case "end":
|
|
1361
|
-
return _context.stop();
|
|
1362
|
-
}
|
|
1363
|
-
}, _callee, this);
|
|
1364
|
-
}));
|
|
1365
|
-
function read(_x, _x2) {
|
|
1366
|
-
return _read.apply(this, arguments);
|
|
1367
|
-
}
|
|
1368
|
-
return read;
|
|
1369
|
-
}()
|
|
1370
|
-
}, {
|
|
1371
|
-
key: "create",
|
|
1372
|
-
value: function () {
|
|
1373
|
-
var _create = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(data, mapping, mappingData) {
|
|
1374
|
-
var _this$_rootStore;
|
|
1375
|
-
var jwt, response, _data;
|
|
1376
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
1377
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
1378
|
-
case 0:
|
|
1379
|
-
if (this._createUrl) {
|
|
1380
|
-
_context2.next = 2;
|
|
1381
|
-
break;
|
|
1382
|
-
}
|
|
1383
|
-
throw new Error("Create endpoint is missing in configuration. ");
|
|
1384
|
-
case 2:
|
|
1385
|
-
jwt = (_this$_rootStore = this._rootStore) === null || _this$_rootStore === void 0 ? void 0 : _this$_rootStore.dataStore.jwt;
|
|
1386
|
-
_context2.next = 5;
|
|
1387
|
-
return fetch(this._createUrl + '?ref=true', {
|
|
1388
|
-
method: this._createMethod,
|
|
1389
|
-
headers: _objectSpread$1q({}, jwt ? {
|
|
1390
|
-
Authorization: 'Bearer ' + jwt
|
|
1391
|
-
} : {}),
|
|
1392
|
-
body: data
|
|
1393
|
-
}).then(function (r) {
|
|
1394
|
-
return r.json();
|
|
1395
|
-
});
|
|
1396
|
-
case 5:
|
|
1397
|
-
response = _context2.sent;
|
|
1398
|
-
if (!this.targetApiHandler) {
|
|
1399
|
-
_context2.next = 10;
|
|
1400
|
-
break;
|
|
1401
|
-
}
|
|
1402
|
-
_data = applyMapping({
|
|
1403
|
-
mappable: {},
|
|
1404
|
-
mapping: this.configuration.targetMapping,
|
|
1405
|
-
mappingData: {
|
|
1406
|
-
url: response.ref.url,
|
|
1407
|
-
ref: response.ref._id
|
|
1408
|
-
},
|
|
1409
|
-
rootStore: this._rootStore
|
|
1410
|
-
});
|
|
1411
|
-
_context2.next = 10;
|
|
1412
|
-
return this.targetApiHandler.update(_data, {
|
|
1413
|
-
_id: _data._id
|
|
1414
|
-
});
|
|
1415
|
-
case 10:
|
|
1416
|
-
return _context2.abrupt("return", {
|
|
1417
|
-
url: response.ref.url,
|
|
1418
|
-
ref: response.ref._id,
|
|
1419
|
-
fileName: response.ref.fileName
|
|
1420
|
-
});
|
|
1421
|
-
case 11:
|
|
1422
|
-
case "end":
|
|
1423
|
-
return _context2.stop();
|
|
1424
|
-
}
|
|
1425
|
-
}, _callee2, this);
|
|
1426
|
-
}));
|
|
1427
|
-
function create(_x3, _x4, _x5) {
|
|
1428
|
-
return _create.apply(this, arguments);
|
|
1429
|
-
}
|
|
1430
|
-
return create;
|
|
1431
|
-
}()
|
|
1432
|
-
}, {
|
|
1433
|
-
key: "delete",
|
|
1434
|
-
value: function () {
|
|
1435
|
-
var _delete2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(id, mapping, mappingData) {
|
|
1436
|
-
var data;
|
|
1437
|
-
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
1438
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
1439
|
-
case 0:
|
|
1440
|
-
_context3.next = 2;
|
|
1441
|
-
return this.refApiHander["delete"](id);
|
|
1442
|
-
case 2:
|
|
1443
|
-
if (!this.targetApiHandler) {
|
|
1444
|
-
_context3.next = 6;
|
|
1445
|
-
break;
|
|
1446
|
-
}
|
|
1447
|
-
data = applyMapping({
|
|
1448
|
-
mappable: {},
|
|
1449
|
-
mapping: this.configuration.targetMapping,
|
|
1450
|
-
mappingData: {
|
|
1451
|
-
url: '',
|
|
1452
|
-
ref: ''
|
|
1453
|
-
},
|
|
1454
|
-
rootStore: this._rootStore
|
|
1455
|
-
});
|
|
1456
|
-
_context3.next = 6;
|
|
1457
|
-
return this.targetApiHandler.update(mappingData, data);
|
|
1458
|
-
case 6:
|
|
1459
|
-
case "end":
|
|
1460
|
-
return _context3.stop();
|
|
1461
|
-
}
|
|
1462
|
-
}, _callee3, this);
|
|
1463
|
-
}));
|
|
1464
|
-
function _delete(_x6, _x7, _x8) {
|
|
1465
|
-
return _delete2.apply(this, arguments);
|
|
1466
|
-
}
|
|
1467
|
-
return _delete;
|
|
1468
|
-
}()
|
|
1469
|
-
}]);
|
|
1470
|
-
}(_default$d);
|
|
1287
|
+
}(_default$c);
|
|
1471
1288
|
|
|
1472
1289
|
function _callSuper$4(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1473
1290
|
function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -1481,10 +1298,10 @@ var _default$a = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1481
1298
|
_defineProperty(_this, "getSplitted", function (mapping, mappingData, filterServerSide) {
|
|
1482
1299
|
return _this.splittedApiHandler.readList(mapping, mappingData, filterServerSide);
|
|
1483
1300
|
});
|
|
1484
|
-
_this.searchApiHandler = new _default$
|
|
1301
|
+
_this.searchApiHandler = new _default$c({
|
|
1485
1302
|
apiInterface: configuration.searchApiInterface
|
|
1486
1303
|
}, rootStore);
|
|
1487
|
-
_this.splittedApiHandler = new _default$
|
|
1304
|
+
_this.splittedApiHandler = new _default$c({
|
|
1488
1305
|
apiInterface: configuration.splitApiInterface
|
|
1489
1306
|
}, rootStore);
|
|
1490
1307
|
return _this;
|
|
@@ -1501,7 +1318,7 @@ var _default$a = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1501
1318
|
return this.splittedApiHandler["delete"](id, mapping, mappingData);
|
|
1502
1319
|
}
|
|
1503
1320
|
}]);
|
|
1504
|
-
}(_default$
|
|
1321
|
+
}(_default$c);
|
|
1505
1322
|
|
|
1506
1323
|
function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1507
1324
|
function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -1513,10 +1330,10 @@ var _default$9 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1513
1330
|
_this = _callSuper$3(this, _default, [configuration, rootStore]);
|
|
1514
1331
|
_defineProperty(_this, "organizationApiHandler", void 0);
|
|
1515
1332
|
_defineProperty(_this, "rolesApiHandler", void 0);
|
|
1516
|
-
_this.organizationApiHandler = new _default$
|
|
1333
|
+
_this.organizationApiHandler = new _default$c({
|
|
1517
1334
|
apiInterface: configuration.organizationApiInterface
|
|
1518
1335
|
}, rootStore);
|
|
1519
|
-
_this.rolesApiHandler = new _default$
|
|
1336
|
+
_this.rolesApiHandler = new _default$c({
|
|
1520
1337
|
apiInterface: configuration.rolesApiInterface
|
|
1521
1338
|
}, rootStore);
|
|
1522
1339
|
return _this;
|
|
@@ -1557,7 +1374,7 @@ var _default$9 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1557
1374
|
}]);
|
|
1558
1375
|
}
|
|
1559
1376
|
}]);
|
|
1560
|
-
}(_default$
|
|
1377
|
+
}(_default$c);
|
|
1561
1378
|
|
|
1562
1379
|
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1563
1380
|
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -1762,7 +1579,7 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
1762
1579
|
}(Object.keys(variants));
|
|
1763
1580
|
}
|
|
1764
1581
|
}]);
|
|
1765
|
-
}(_default$
|
|
1582
|
+
}(_default$c);
|
|
1766
1583
|
|
|
1767
1584
|
var promptAndAiTesterOptions = {
|
|
1768
1585
|
aiImageTester: {
|
|
@@ -1895,8 +1712,8 @@ function replaceApiConfigPlaceholdersDeep(obj, apiConfig) {
|
|
|
1895
1712
|
}
|
|
1896
1713
|
}
|
|
1897
1714
|
|
|
1898
|
-
function ownKeys$
|
|
1899
|
-
function _objectSpread$
|
|
1715
|
+
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; }
|
|
1716
|
+
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; }
|
|
1900
1717
|
var PROMPT_RESOLUTION_VALUE_STRINGS = promptAndAiTesterOptions.aiImageTester.resolutionOptions.map(function (o) {
|
|
1901
1718
|
return o.apiValue;
|
|
1902
1719
|
});
|
|
@@ -1937,7 +1754,7 @@ var _default$7 = /*#__PURE__*/function () {
|
|
|
1937
1754
|
var _i$permission;
|
|
1938
1755
|
return !i.permission || _this.root.actions.userHasPermission((_i$permission = i.permission) === null || _i$permission === void 0 ? void 0 : _i$permission.toLocaleLowerCase());
|
|
1939
1756
|
});
|
|
1940
|
-
config = _objectSpread$
|
|
1757
|
+
config = _objectSpread$1q(_objectSpread$1q({}, config), {}, {
|
|
1941
1758
|
items: filteredItems
|
|
1942
1759
|
});
|
|
1943
1760
|
}
|
|
@@ -5242,7 +5059,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
5242
5059
|
icon: 'DownloadOutlined',
|
|
5243
5060
|
download: [{
|
|
5244
5061
|
type: 'request',
|
|
5245
|
-
request: '${mediaService}/
|
|
5062
|
+
request: '${mediaService}/v1/assets/${mediaItems}/download',
|
|
5246
5063
|
mapping: {
|
|
5247
5064
|
type: 'query',
|
|
5248
5065
|
map: [{
|
|
@@ -5250,7 +5067,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
5250
5067
|
targetField: 'mediaItems'
|
|
5251
5068
|
}]
|
|
5252
5069
|
},
|
|
5253
|
-
mediaType: '
|
|
5070
|
+
mediaType: 'file'
|
|
5254
5071
|
}]
|
|
5255
5072
|
}],
|
|
5256
5073
|
expandable: {
|
|
@@ -10107,6 +9924,22 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
10107
9924
|
hidden: function hidden(data) {
|
|
10108
9925
|
return !showCampaignFields(data);
|
|
10109
9926
|
}
|
|
9927
|
+
}, {
|
|
9928
|
+
name: ['settings', 'campaignSettings', 'activateForLandingpage'],
|
|
9929
|
+
label: t('backoffice.form.organizationdetails.items.activateForLandingpage'),
|
|
9930
|
+
tabgroup: t('backoffice.form.organizationdetails.campaignLandingPage'),
|
|
9931
|
+
type: 'checkbox',
|
|
9932
|
+
hidden: function hidden(data) {
|
|
9933
|
+
return !showCampaignFields(data);
|
|
9934
|
+
}
|
|
9935
|
+
}, {
|
|
9936
|
+
name: ['settings', 'campaignSettings', 'activateForWidgets'],
|
|
9937
|
+
label: t('backoffice.form.organizationdetails.items.activateForWidgets'),
|
|
9938
|
+
tabgroup: t('backoffice.form.organizationdetails.campaignLandingPage'),
|
|
9939
|
+
type: 'checkbox',
|
|
9940
|
+
hidden: function hidden(data) {
|
|
9941
|
+
return !showCampaignFields(data);
|
|
9942
|
+
}
|
|
10110
9943
|
}, {
|
|
10111
9944
|
type: 'subTitle',
|
|
10112
9945
|
name: t('backoffice.form.organizationdetails.campaignSection.marketingTracking'),
|
|
@@ -11001,14 +10834,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
11001
10834
|
filterServerSide: true
|
|
11002
10835
|
}
|
|
11003
10836
|
},
|
|
11004
|
-
selectMapping: {
|
|
11005
|
-
label: '${namespace}',
|
|
11006
|
-
value: 'namespace',
|
|
11007
|
-
searchField: [{
|
|
11008
|
-
field: 'namespace',
|
|
11009
|
-
filter: 'contains'
|
|
11010
|
-
}]
|
|
11011
|
-
},
|
|
11012
10837
|
required: true,
|
|
11013
10838
|
allowCreate: true
|
|
11014
10839
|
}, {
|
|
@@ -11370,7 +11195,7 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
11370
11195
|
method: 'POST'
|
|
11371
11196
|
},
|
|
11372
11197
|
read: {
|
|
11373
|
-
list: '${mediaService}/renderjobpresets
|
|
11198
|
+
list: '${mediaService}/renderjobpresets'
|
|
11374
11199
|
},
|
|
11375
11200
|
"delete": {
|
|
11376
11201
|
url: '${mediaService}/renderjobpresets/${id}'
|
|
@@ -13998,15 +13823,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
13998
13823
|
fileTypes: ['image/jpeg', 'image/jpg', 'image/png'],
|
|
13999
13824
|
size: 'medium',
|
|
14000
13825
|
title: t('backoffice.media.uploadorglogo.title'),
|
|
14001
|
-
apiInterface: {
|
|
14002
|
-
create: '${mediaService}/v1/mediaitems',
|
|
14003
|
-
"delete": '${mediaService}/v1/mediaitems/${id}',
|
|
14004
|
-
read: '${mediaService}/v1/mediaitems'
|
|
14005
|
-
},
|
|
14006
|
-
refApiInterface: {
|
|
14007
|
-
"delete": '${mediaService}/v1/mediaitems/refs/${id}',
|
|
14008
|
-
read: '${mediaService}/v1/mediaitems/refs'
|
|
14009
|
-
},
|
|
14010
13826
|
targetApiInterface: {
|
|
14011
13827
|
update: {
|
|
14012
13828
|
url: '${authService}/v2/organizations/{_id}',
|
|
@@ -14274,15 +14090,6 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
|
|
|
14274
14090
|
fileTypes: ['image/jpeg', 'image/jpg', 'image/png'],
|
|
14275
14091
|
size: 'medium',
|
|
14276
14092
|
title: t('backoffice.media.uploadorglogomobile.title'),
|
|
14277
|
-
apiInterface: {
|
|
14278
|
-
create: '${mediaService}/v1/mediaitems',
|
|
14279
|
-
"delete": '${mediaService}/v1/mediaitems/${id}',
|
|
14280
|
-
read: '${mediaService}/v1/mediaitems'
|
|
14281
|
-
},
|
|
14282
|
-
refApiInterface: {
|
|
14283
|
-
"delete": '${mediaService}/v1/mediaitems/refs/${id}',
|
|
14284
|
-
read: '${mediaService}/v1/mediaitems/refs'
|
|
14285
|
-
},
|
|
14286
14093
|
targetApiInterface: {
|
|
14287
14094
|
update: {
|
|
14288
14095
|
url: '${authService}/v2/organizations/{_id}',
|
|
@@ -15583,8 +15390,8 @@ var ToolBarStore = /*#__PURE__*/function () {
|
|
|
15583
15390
|
}]);
|
|
15584
15391
|
}();
|
|
15585
15392
|
|
|
15586
|
-
function ownKeys$
|
|
15587
|
-
function _objectSpread$
|
|
15393
|
+
function ownKeys$1p(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; }
|
|
15394
|
+
function _objectSpread$1p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1p(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15588
15395
|
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; } } }; }
|
|
15589
15396
|
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; } }
|
|
15590
15397
|
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; }
|
|
@@ -15725,7 +15532,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
15725
15532
|
if (index >= 0) {
|
|
15726
15533
|
this._additionalMenuElements[index] = {
|
|
15727
15534
|
key: key,
|
|
15728
|
-
element: _objectSpread$
|
|
15535
|
+
element: _objectSpread$1p(_objectSpread$1p({}, this._additionalMenuElements[index].element), {}, {
|
|
15729
15536
|
items: items,
|
|
15730
15537
|
selected: selected
|
|
15731
15538
|
})
|
|
@@ -15776,7 +15583,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
15776
15583
|
var path = this.getPath(element.menu, this._selectedMenuKeys, this.root.navigationState.searchParams);
|
|
15777
15584
|
this.root.navigate('/' + path);
|
|
15778
15585
|
}
|
|
15779
|
-
this._menuElement1 = _objectSpread$
|
|
15586
|
+
this._menuElement1 = _objectSpread$1p(_objectSpread$1p({}, this.menuElement1), {}, {
|
|
15780
15587
|
selected: this._selectedMenuKeys[0]
|
|
15781
15588
|
});
|
|
15782
15589
|
var menu2 = (_this$_menu$find = this._menu.find(function (element) {
|
|
@@ -16048,7 +15855,7 @@ var _default$6 = /*#__PURE__*/function () {
|
|
|
16048
15855
|
}
|
|
16049
15856
|
return !item.permission || hasPermission(item.permission.toLocaleLowerCase());
|
|
16050
15857
|
}).map(function (item) {
|
|
16051
|
-
return _objectSpread$
|
|
15858
|
+
return _objectSpread$1p(_objectSpread$1p({}, item), {}, {
|
|
16052
15859
|
items: item.items ? _this5.filterMenuByPermission(hasPermission, item.items) : undefined,
|
|
16053
15860
|
subMenu: item.subMenu ? _this5.filterMenuByPermission(hasPermission, item.subMenu) : undefined
|
|
16054
15861
|
});
|
|
@@ -17390,17 +17197,17 @@ var _default$2 = /*#__PURE__*/function (_ApiHandler) {
|
|
|
17390
17197
|
_this = _callSuper$1(this, _default, [configuration, rootStore]);
|
|
17391
17198
|
_defineProperty(_this, "presetApiHandler", void 0);
|
|
17392
17199
|
_defineProperty(_this, "test", '');
|
|
17393
|
-
_this.presetApiHandler = new _default$
|
|
17200
|
+
_this.presetApiHandler = new _default$c({
|
|
17394
17201
|
apiInterface: configuration.presetApiInterface
|
|
17395
17202
|
}, rootStore);
|
|
17396
17203
|
return _this;
|
|
17397
17204
|
}
|
|
17398
17205
|
_inherits(_default, _ApiHandler);
|
|
17399
17206
|
return _createClass(_default);
|
|
17400
|
-
}(_default$
|
|
17207
|
+
}(_default$c);
|
|
17401
17208
|
|
|
17402
|
-
function ownKeys$
|
|
17403
|
-
function _objectSpread$
|
|
17209
|
+
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; }
|
|
17210
|
+
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; }
|
|
17404
17211
|
var LOG$d = getLogger('Backoffice', 'ContextStore');
|
|
17405
17212
|
|
|
17406
17213
|
/**
|
|
@@ -17435,7 +17242,7 @@ var ContextStore = /*#__PURE__*/function () {
|
|
|
17435
17242
|
key: "updateContext",
|
|
17436
17243
|
value: function updateContext(contextId, updates) {
|
|
17437
17244
|
var currentState = this.contexts.get(contextId) || {};
|
|
17438
|
-
var updatedState = _objectSpread$
|
|
17245
|
+
var updatedState = _objectSpread$1o(_objectSpread$1o({}, currentState), updates);
|
|
17439
17246
|
this.contexts.set(contextId, updatedState);
|
|
17440
17247
|
LOG$d.debug("Updated context ".concat(contextId), {
|
|
17441
17248
|
updatedState: updatedState
|
|
@@ -17545,19 +17352,17 @@ var _default$1 = /*#__PURE__*/function () {
|
|
|
17545
17352
|
if (apiInterface) config.apiInterface = apiInterface;
|
|
17546
17353
|
switch (config.type) {
|
|
17547
17354
|
case 'FormList':
|
|
17548
|
-
return new _default$
|
|
17355
|
+
return new _default$b(this.configurationStore.getConfiguration(config.formId), this);
|
|
17549
17356
|
case 'SelectOrCreate':
|
|
17550
17357
|
return new _default$8(config, this);
|
|
17551
17358
|
case 'RoleSelector':
|
|
17552
17359
|
return new _default$9(config, this);
|
|
17553
|
-
case 'MediaUpload':
|
|
17554
|
-
return new _default$b(config, this);
|
|
17555
17360
|
case 'RelationSelector':
|
|
17556
17361
|
return new _default$a(config, this);
|
|
17557
17362
|
case 'Form':
|
|
17558
17363
|
return new _default$2(config, this);
|
|
17559
17364
|
default:
|
|
17560
|
-
return new _default$
|
|
17365
|
+
return new _default$c(config, this);
|
|
17561
17366
|
}
|
|
17562
17367
|
}
|
|
17563
17368
|
}]);
|
|
@@ -17645,6 +17450,8 @@ function removeEmpty(data) {
|
|
|
17645
17450
|
return undefined;
|
|
17646
17451
|
}
|
|
17647
17452
|
|
|
17453
|
+
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; }
|
|
17454
|
+
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; }
|
|
17648
17455
|
function fetchFileData(_x) {
|
|
17649
17456
|
return _fetchFileData.apply(this, arguments);
|
|
17650
17457
|
}
|
|
@@ -17783,37 +17590,148 @@ function _getMediaItemRef() {
|
|
|
17783
17590
|
}));
|
|
17784
17591
|
return _getMediaItemRef.apply(this, arguments);
|
|
17785
17592
|
}
|
|
17593
|
+
/**
|
|
17594
|
+
* Assets pipeline: POST /v1/assets/uploads → PUT to presigned URL → POST /v1/assets/uploads/complete with ref.
|
|
17595
|
+
* Returns the same shape the AssetMananger UI expects as legacy multipart (`_id`, `ref._id`, `ref.url`).
|
|
17596
|
+
*/
|
|
17786
17597
|
function uploadMediaItem(_x6, _x7, _x8) {
|
|
17787
17598
|
return _uploadMediaItem.apply(this, arguments);
|
|
17788
17599
|
}
|
|
17789
17600
|
function _uploadMediaItem() {
|
|
17790
|
-
_uploadMediaItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(baseUrl, jwt,
|
|
17791
|
-
var url;
|
|
17601
|
+
_uploadMediaItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(baseUrl, jwt, params) {
|
|
17602
|
+
var _simpleUpload$headers, _ref$url;
|
|
17603
|
+
var root, auth, startRes, startJson, row, simpleUpload, putRes, completeRes, completed, mediaItem, ref, refUrl;
|
|
17792
17604
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
17793
17605
|
while (1) switch (_context4.prev = _context4.next) {
|
|
17794
17606
|
case 0:
|
|
17795
|
-
|
|
17796
|
-
|
|
17797
|
-
|
|
17607
|
+
root = baseUrl.replace(/\/$/, '');
|
|
17608
|
+
auth = {
|
|
17609
|
+
Authorization: "Bearer ".concat(jwt)
|
|
17610
|
+
};
|
|
17611
|
+
_context4.next = 4;
|
|
17612
|
+
return fetch("".concat(root, "/v1/assets/uploads"), {
|
|
17798
17613
|
method: 'POST',
|
|
17799
|
-
headers: {
|
|
17800
|
-
|
|
17801
|
-
},
|
|
17802
|
-
body:
|
|
17803
|
-
|
|
17804
|
-
|
|
17805
|
-
|
|
17806
|
-
|
|
17807
|
-
|
|
17808
|
-
|
|
17809
|
-
|
|
17810
|
-
|
|
17614
|
+
headers: _objectSpread$1n({
|
|
17615
|
+
'Content-Type': 'application/json'
|
|
17616
|
+
}, auth),
|
|
17617
|
+
body: JSON.stringify({
|
|
17618
|
+
uploads: [{
|
|
17619
|
+
fileName: params.file.name,
|
|
17620
|
+
mimeType: params.file.type || 'application/octet-stream',
|
|
17621
|
+
size: params.file.size,
|
|
17622
|
+
organizationId: params.organizationId,
|
|
17623
|
+
mediaType: params.mediaType
|
|
17624
|
+
}]
|
|
17625
|
+
})
|
|
17811
17626
|
});
|
|
17812
|
-
case
|
|
17627
|
+
case 4:
|
|
17628
|
+
startRes = _context4.sent;
|
|
17629
|
+
if (startRes.ok) {
|
|
17630
|
+
_context4.next = 12;
|
|
17631
|
+
break;
|
|
17632
|
+
}
|
|
17633
|
+
_context4.t0 = Error;
|
|
17634
|
+
_context4.next = 9;
|
|
17635
|
+
return startRes.text();
|
|
17636
|
+
case 9:
|
|
17637
|
+
_context4.t1 = _context4.sent;
|
|
17638
|
+
_context4.t2 = {
|
|
17639
|
+
cause: _context4.t1
|
|
17640
|
+
};
|
|
17641
|
+
throw new _context4.t0('Could not start media upload', _context4.t2);
|
|
17642
|
+
case 12:
|
|
17643
|
+
_context4.next = 14;
|
|
17644
|
+
return startRes.json();
|
|
17645
|
+
case 14:
|
|
17646
|
+
startJson = _context4.sent;
|
|
17647
|
+
row = Array.isArray(startJson) ? startJson[0] : startJson;
|
|
17648
|
+
simpleUpload = row === null || row === void 0 ? void 0 : row.simpleUpload;
|
|
17649
|
+
if (!(!(simpleUpload !== null && simpleUpload !== void 0 && simpleUpload.url) || !(simpleUpload !== null && simpleUpload !== void 0 && simpleUpload.method))) {
|
|
17650
|
+
_context4.next = 19;
|
|
17651
|
+
break;
|
|
17652
|
+
}
|
|
17653
|
+
throw new Error('Upload initialization response is missing upload information');
|
|
17654
|
+
case 19:
|
|
17655
|
+
_context4.next = 21;
|
|
17656
|
+
return fetch(simpleUpload.url, {
|
|
17657
|
+
method: simpleUpload.method,
|
|
17658
|
+
headers: (_simpleUpload$headers = simpleUpload.headers) !== null && _simpleUpload$headers !== void 0 ? _simpleUpload$headers : {},
|
|
17659
|
+
body: params.file
|
|
17660
|
+
});
|
|
17661
|
+
case 21:
|
|
17662
|
+
putRes = _context4.sent;
|
|
17663
|
+
if (putRes.ok) {
|
|
17664
|
+
_context4.next = 29;
|
|
17665
|
+
break;
|
|
17666
|
+
}
|
|
17667
|
+
_context4.t3 = Error;
|
|
17668
|
+
_context4.next = 26;
|
|
17669
|
+
return putRes.text();
|
|
17670
|
+
case 26:
|
|
17671
|
+
_context4.t4 = _context4.sent;
|
|
17672
|
+
_context4.t5 = {
|
|
17673
|
+
cause: _context4.t4
|
|
17674
|
+
};
|
|
17675
|
+
throw new _context4.t3('Could not upload file to storage', _context4.t5);
|
|
17676
|
+
case 29:
|
|
17677
|
+
_context4.next = 31;
|
|
17678
|
+
return fetch("".concat(root, "/v1/assets/uploads/complete"), {
|
|
17679
|
+
method: 'POST',
|
|
17680
|
+
headers: _objectSpread$1n({
|
|
17681
|
+
'Content-Type': 'application/json'
|
|
17682
|
+
}, auth),
|
|
17683
|
+
body: JSON.stringify({
|
|
17684
|
+
uploadId: row.uploadId,
|
|
17685
|
+
fileName: params.file.name,
|
|
17686
|
+
organizationId: params.organizationId,
|
|
17687
|
+
mediaType: params.mediaType,
|
|
17688
|
+
ref: {
|
|
17689
|
+
functionType: params.functionType,
|
|
17690
|
+
metadata: {}
|
|
17691
|
+
}
|
|
17692
|
+
})
|
|
17693
|
+
});
|
|
17694
|
+
case 31:
|
|
17695
|
+
completeRes = _context4.sent;
|
|
17696
|
+
if (completeRes.ok) {
|
|
17697
|
+
_context4.next = 39;
|
|
17698
|
+
break;
|
|
17699
|
+
}
|
|
17700
|
+
_context4.t6 = Error;
|
|
17701
|
+
_context4.next = 36;
|
|
17702
|
+
return completeRes.text();
|
|
17703
|
+
case 36:
|
|
17704
|
+
_context4.t7 = _context4.sent;
|
|
17705
|
+
_context4.t8 = {
|
|
17706
|
+
cause: _context4.t7
|
|
17707
|
+
};
|
|
17708
|
+
throw new _context4.t6('Could not complete media upload', _context4.t8);
|
|
17709
|
+
case 39:
|
|
17710
|
+
_context4.next = 41;
|
|
17711
|
+
return completeRes.json();
|
|
17712
|
+
case 41:
|
|
17713
|
+
completed = _context4.sent;
|
|
17714
|
+
mediaItem = completed.mediaItem;
|
|
17715
|
+
ref = completed.mediaItemRef;
|
|
17716
|
+
if (!(!(mediaItem !== null && mediaItem !== void 0 && mediaItem._id) || !(ref !== null && ref !== void 0 && ref._id))) {
|
|
17717
|
+
_context4.next = 46;
|
|
17718
|
+
break;
|
|
17719
|
+
}
|
|
17720
|
+
throw new Error('Complete upload response missing media item or ref');
|
|
17721
|
+
case 46:
|
|
17722
|
+
refUrl = (_ref$url = ref.url) !== null && _ref$url !== void 0 ? _ref$url : ref.cdnUrl;
|
|
17723
|
+
return _context4.abrupt("return", {
|
|
17724
|
+
_id: mediaItem._id,
|
|
17725
|
+
ref: _objectSpread$1n(_objectSpread$1n({}, ref), {}, {
|
|
17726
|
+
_id: ref._id,
|
|
17727
|
+
url: refUrl
|
|
17728
|
+
})
|
|
17729
|
+
});
|
|
17730
|
+
case 48:
|
|
17813
17731
|
case "end":
|
|
17814
17732
|
return _context4.stop();
|
|
17815
17733
|
}
|
|
17816
|
-
}, _callee4
|
|
17734
|
+
}, _callee4);
|
|
17817
17735
|
}));
|
|
17818
17736
|
return _uploadMediaItem.apply(this, arguments);
|
|
17819
17737
|
}
|
|
@@ -18014,7 +17932,7 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
18014
17932
|
key: "upload",
|
|
18015
17933
|
value: function () {
|
|
18016
17934
|
var _upload = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(organizationId, functionType) {
|
|
18017
|
-
var
|
|
17935
|
+
var mediaType, response;
|
|
18018
17936
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
18019
17937
|
while (1) switch (_context3.prev = _context3.next) {
|
|
18020
17938
|
case 0:
|
|
@@ -18030,32 +17948,28 @@ var MediaItem = /*#__PURE__*/function () {
|
|
|
18030
17948
|
}
|
|
18031
17949
|
throw new Error('The MediaItem must be initialized before uploading');
|
|
18032
17950
|
case 4:
|
|
18033
|
-
|
|
18034
|
-
mediaitem = {
|
|
18035
|
-
fileName: this._file.name,
|
|
18036
|
-
organizationId: organizationId
|
|
18037
|
-
};
|
|
17951
|
+
mediaType = 'PCT';
|
|
18038
17952
|
if (isFileOfType(this._file, ['image/svg+xml'])) {
|
|
18039
|
-
|
|
17953
|
+
mediaType = 'SVG';
|
|
18040
17954
|
} else if (isFileOfType(this._file, ['image/*'])) {
|
|
18041
|
-
|
|
17955
|
+
mediaType = 'PCT';
|
|
18042
17956
|
} else if (isFileOfType(this._file, ['video/*'])) {
|
|
18043
|
-
|
|
18044
|
-
}
|
|
18045
|
-
|
|
18046
|
-
|
|
17957
|
+
mediaType = 'VID';
|
|
17958
|
+
}
|
|
17959
|
+
_context3.next = 8;
|
|
17960
|
+
return uploadMediaItem(this._config.baseUrl, this._config.jwt, {
|
|
17961
|
+
organizationId: organizationId,
|
|
17962
|
+
file: this._file,
|
|
17963
|
+
mediaType: mediaType,
|
|
18047
17964
|
functionType: functionType
|
|
18048
|
-
})
|
|
18049
|
-
|
|
18050
|
-
_context3.next = 12;
|
|
18051
|
-
return uploadMediaItem(this._config.baseUrl, this._config.jwt, formData);
|
|
18052
|
-
case 12:
|
|
17965
|
+
});
|
|
17966
|
+
case 8:
|
|
18053
17967
|
response = _context3.sent;
|
|
18054
17968
|
this._mediaItemRefId = response.ref._id;
|
|
18055
17969
|
this._mediaItemId = response._id;
|
|
18056
17970
|
this._itemRef = response.ref;
|
|
18057
17971
|
this._url = response.ref.url;
|
|
18058
|
-
case
|
|
17972
|
+
case 13:
|
|
18059
17973
|
case "end":
|
|
18060
17974
|
return _context3.stop();
|
|
18061
17975
|
}
|
|
@@ -18398,7 +18312,7 @@ function useFormData (_ref) {
|
|
|
18398
18312
|
}
|
|
18399
18313
|
// perform additional server actions before returning the data
|
|
18400
18314
|
additional = configuration.additionals[i];
|
|
18401
|
-
additionalApi = new _default$
|
|
18315
|
+
additionalApi = new _default$c({
|
|
18402
18316
|
apiInterface: additional.apiInterface
|
|
18403
18317
|
}, root);
|
|
18404
18318
|
data = {};
|
|
@@ -19595,7 +19509,7 @@ function useSelectSimpleData (_ref) {
|
|
|
19595
19509
|
var root = useStore();
|
|
19596
19510
|
var _useMemo = useMemo(function () {
|
|
19597
19511
|
return {
|
|
19598
|
-
apiHandler: new _default$
|
|
19512
|
+
apiHandler: new _default$c({
|
|
19599
19513
|
type: 'SelectSimple',
|
|
19600
19514
|
apiInterface: apiInterface
|
|
19601
19515
|
}, root)
|
|
@@ -20404,7 +20318,7 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
|
|
|
20404
20318
|
return getSupplierOptionValues;
|
|
20405
20319
|
}()
|
|
20406
20320
|
}]);
|
|
20407
|
-
}(_default$
|
|
20321
|
+
}(_default$c);
|
|
20408
20322
|
|
|
20409
20323
|
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; }
|
|
20410
20324
|
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; }
|
|
@@ -20839,7 +20753,7 @@ function useSelectData (_ref) {
|
|
|
20839
20753
|
var filterServerSide = _typeof(apiInterface) == 'object' && _typeof(apiInterface.read) == 'object' && apiInterface.read.filterServerSide;
|
|
20840
20754
|
var _useMemo = useMemo(function () {
|
|
20841
20755
|
return {
|
|
20842
|
-
apiHandler: new _default$
|
|
20756
|
+
apiHandler: new _default$c({
|
|
20843
20757
|
type: 'SelectOrCreate',
|
|
20844
20758
|
apiInterface: apiInterface
|
|
20845
20759
|
}, root)
|
|
@@ -21200,7 +21114,7 @@ function useSelectData (_ref) {
|
|
|
21200
21114
|
fetchRef.current += 1;
|
|
21201
21115
|
fetchId = fetchRef.current;
|
|
21202
21116
|
if (!filterServerSide) {
|
|
21203
|
-
_context.next =
|
|
21117
|
+
_context.next = 10;
|
|
21204
21118
|
break;
|
|
21205
21119
|
}
|
|
21206
21120
|
setFetching(true);
|
|
@@ -21232,17 +21146,9 @@ function useSelectData (_ref) {
|
|
|
21232
21146
|
});
|
|
21233
21147
|
case 7:
|
|
21234
21148
|
newOptions = _context.sent;
|
|
21235
|
-
|
|
21236
|
-
newOptions = [{
|
|
21237
|
-
data: value,
|
|
21238
|
-
label: value,
|
|
21239
|
-
disabled: false,
|
|
21240
|
-
value: value
|
|
21241
|
-
}];
|
|
21242
|
-
}
|
|
21243
|
-
_context.next = 13;
|
|
21149
|
+
_context.next = 12;
|
|
21244
21150
|
break;
|
|
21245
|
-
case
|
|
21151
|
+
case 10:
|
|
21246
21152
|
newOptions = initOptions.filter(function (opt) {
|
|
21247
21153
|
var _value$toLocaleLowerC;
|
|
21248
21154
|
return opt.label.toLocaleLowerCase().includes((_value$toLocaleLowerC = value === null || value === void 0 ? void 0 : value.toLocaleLowerCase()) !== null && _value$toLocaleLowerC !== void 0 ? _value$toLocaleLowerC : '');
|
|
@@ -21255,17 +21161,17 @@ function useSelectData (_ref) {
|
|
|
21255
21161
|
value: value
|
|
21256
21162
|
}];
|
|
21257
21163
|
}
|
|
21258
|
-
case
|
|
21164
|
+
case 12:
|
|
21259
21165
|
if (!(fetchId !== fetchRef.current)) {
|
|
21260
|
-
_context.next =
|
|
21166
|
+
_context.next = 14;
|
|
21261
21167
|
break;
|
|
21262
21168
|
}
|
|
21263
21169
|
return _context.abrupt("return");
|
|
21264
|
-
case
|
|
21170
|
+
case 14:
|
|
21265
21171
|
setOptions(newOptions);
|
|
21266
21172
|
setFetching(false);
|
|
21267
21173
|
return _context.abrupt("return", newOptions);
|
|
21268
|
-
case
|
|
21174
|
+
case 17:
|
|
21269
21175
|
case "end":
|
|
21270
21176
|
return _context.stop();
|
|
21271
21177
|
}
|
|
@@ -21277,7 +21183,7 @@ function useSelectData (_ref) {
|
|
|
21277
21183
|
}();
|
|
21278
21184
|
var fetch = React.useMemo(function () {
|
|
21279
21185
|
return debounce(loadOptions, 800);
|
|
21280
|
-
}, [selectMapping, initOptions, wholeData
|
|
21186
|
+
}, [selectMapping, initOptions, wholeData]);
|
|
21281
21187
|
var verifySelection = function verifySelection(opt) {
|
|
21282
21188
|
if (disabledConfig == undefined) return [];
|
|
21283
21189
|
var _missingFields = [];
|
|
@@ -21547,7 +21453,7 @@ function useTranslationHook (item, state) {
|
|
|
21547
21453
|
setCurrentLang = _useState2[1];
|
|
21548
21454
|
var _useMemo = useMemo(function () {
|
|
21549
21455
|
return {
|
|
21550
|
-
apiHandler: new _default$
|
|
21456
|
+
apiHandler: new _default$c({
|
|
21551
21457
|
type: 'SelectOrCreate',
|
|
21552
21458
|
apiInterface: item.apiInterface
|
|
21553
21459
|
}, root)
|
|
@@ -24905,7 +24811,7 @@ function ActionButton (_ref) {
|
|
|
24905
24811
|
});
|
|
24906
24812
|
return _context.abrupt("break", 41);
|
|
24907
24813
|
case 12:
|
|
24908
|
-
apiInterface = new _default$
|
|
24814
|
+
apiInterface = new _default$c({
|
|
24909
24815
|
apiInterface: action.apiInterface,
|
|
24910
24816
|
type: 'Button'
|
|
24911
24817
|
}, root);
|
|
@@ -25073,7 +24979,7 @@ function _simpleChangeValue() {
|
|
|
25073
24979
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
25074
24980
|
while (1) switch (_context2.prev = _context2.next) {
|
|
25075
24981
|
case 0:
|
|
25076
|
-
apiInterface = new _default$
|
|
24982
|
+
apiInterface = new _default$c({
|
|
25077
24983
|
apiInterface: action.apiInterface,
|
|
25078
24984
|
type: 'Button'
|
|
25079
24985
|
}, root);
|
|
@@ -25991,7 +25897,7 @@ function useSelectOrCreateData (_ref) {
|
|
|
25991
25897
|
}
|
|
25992
25898
|
// perform additional server actions before returning the data
|
|
25993
25899
|
additional = configuration.additionals[i];
|
|
25994
|
-
additionalApi = new _default$
|
|
25900
|
+
additionalApi = new _default$c({
|
|
25995
25901
|
apiInterface: additional.apiInterface
|
|
25996
25902
|
}, root);
|
|
25997
25903
|
_data = {};
|
|
@@ -27115,7 +27021,7 @@ function _getDisplayData() {
|
|
|
27115
27021
|
break;
|
|
27116
27022
|
}
|
|
27117
27023
|
itemWithMappingData = item;
|
|
27118
|
-
apiHandler = new _default$
|
|
27024
|
+
apiHandler = new _default$c({
|
|
27119
27025
|
type: 'Description',
|
|
27120
27026
|
apiInterface: item.value.apiInterface
|
|
27121
27027
|
}, root); // Only fetch the mapping data once
|
|
@@ -27531,104 +27437,180 @@ var useMediaUpload = function useMediaUpload(_ref) {
|
|
|
27531
27437
|
setWrongFileType = _useState6[1];
|
|
27532
27438
|
var _useMemo = useMemo(function () {
|
|
27533
27439
|
return {
|
|
27534
|
-
|
|
27535
|
-
|
|
27440
|
+
configuration: root.configurationStore.getConfiguration(id, 'MediaUpload'),
|
|
27441
|
+
targetApiHandler: function () {
|
|
27442
|
+
var configuration = root.configurationStore.getConfiguration(id, 'MediaUpload');
|
|
27443
|
+
if (!configuration.targetApiInterface) return undefined;
|
|
27444
|
+
return new _default$c({
|
|
27445
|
+
apiInterface: configuration.targetApiInterface,
|
|
27446
|
+
type: 'MediaUpload'
|
|
27447
|
+
}, root);
|
|
27448
|
+
}()
|
|
27536
27449
|
};
|
|
27537
|
-
}, [id]),
|
|
27450
|
+
}, [id, root]),
|
|
27538
27451
|
configuration = _useMemo.configuration,
|
|
27539
|
-
|
|
27452
|
+
targetApiHandler = _useMemo.targetApiHandler;
|
|
27540
27453
|
useEffect(function () {
|
|
27454
|
+
if (!targetApiHandler || !configuration.targetMapping) {
|
|
27455
|
+
setFileList([]);
|
|
27456
|
+
return;
|
|
27457
|
+
}
|
|
27541
27458
|
setLoading(true);
|
|
27542
|
-
|
|
27543
|
-
|
|
27544
|
-
|
|
27545
|
-
|
|
27546
|
-
|
|
27459
|
+
var data = applyMapping({
|
|
27460
|
+
mappable: {},
|
|
27461
|
+
mapping: configuration.targetMapping,
|
|
27462
|
+
rootStore: root
|
|
27463
|
+
});
|
|
27464
|
+
targetApiHandler.read({
|
|
27465
|
+
type: 'query',
|
|
27466
|
+
map: [{
|
|
27467
|
+
targetField: 'id',
|
|
27468
|
+
sourceField: '_id'
|
|
27469
|
+
}]
|
|
27470
|
+
}, data).then(function (response) {
|
|
27471
|
+
var _configuration$target, _configuration$target2;
|
|
27472
|
+
var urlField = (_configuration$target = configuration.targetMapping) === null || _configuration$target === void 0 || (_configuration$target = _configuration$target.map.find(function (m) {
|
|
27473
|
+
return m.sourceField === 'url';
|
|
27474
|
+
})) === null || _configuration$target === void 0 ? void 0 : _configuration$target.targetField;
|
|
27475
|
+
var refField = (_configuration$target2 = configuration.targetMapping) === null || _configuration$target2 === void 0 || (_configuration$target2 = _configuration$target2.map.find(function (m) {
|
|
27476
|
+
return m.sourceField === 'ref';
|
|
27477
|
+
})) === null || _configuration$target2 === void 0 ? void 0 : _configuration$target2.targetField;
|
|
27478
|
+
var url = urlField ? response === null || response === void 0 ? void 0 : response[urlField] : undefined;
|
|
27479
|
+
var ref = refField ? response === null || response === void 0 ? void 0 : response[refField] : undefined;
|
|
27480
|
+
if (url && ref) {
|
|
27547
27481
|
setFileList([{
|
|
27548
27482
|
uid: ref,
|
|
27549
27483
|
status: 'done',
|
|
27550
27484
|
url: url,
|
|
27551
|
-
targetId:
|
|
27485
|
+
targetId: response === null || response === void 0 ? void 0 : response._id
|
|
27552
27486
|
}]);
|
|
27553
27487
|
} else {
|
|
27554
27488
|
setFileList([]);
|
|
27555
27489
|
}
|
|
27556
|
-
|
|
27490
|
+
})["finally"](function () {
|
|
27491
|
+
return setLoading(false);
|
|
27557
27492
|
});
|
|
27558
|
-
}, [root.dataStore.selectedOrganizationId]);
|
|
27493
|
+
}, [configuration.targetMapping, root, root.dataStore.selectedOrganizationId, targetApiHandler]);
|
|
27559
27494
|
var onRemove = /*#__PURE__*/function () {
|
|
27560
|
-
var
|
|
27561
|
-
var file;
|
|
27495
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
27496
|
+
var file, _root$configurationSt, jwt, baseUrl, data;
|
|
27562
27497
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
27563
27498
|
while (1) switch (_context.prev = _context.next) {
|
|
27564
27499
|
case 0:
|
|
27565
27500
|
setLoading(true);
|
|
27566
27501
|
file = fileList[0];
|
|
27567
27502
|
if (!file) {
|
|
27568
|
-
_context.next =
|
|
27503
|
+
_context.next = 15;
|
|
27569
27504
|
break;
|
|
27570
27505
|
}
|
|
27571
|
-
|
|
27572
|
-
|
|
27573
|
-
|
|
27506
|
+
jwt = root.dataStore.jwt;
|
|
27507
|
+
baseUrl = (_root$configurationSt = root.configurationStore.apiConfig) === null || _root$configurationSt === void 0 ? void 0 : _root$configurationSt.mediaService;
|
|
27508
|
+
if (!(!jwt || !baseUrl)) {
|
|
27509
|
+
_context.next = 8;
|
|
27510
|
+
break;
|
|
27511
|
+
}
|
|
27512
|
+
setLoading(false);
|
|
27513
|
+
return _context.abrupt("return", false);
|
|
27514
|
+
case 8:
|
|
27515
|
+
_context.next = 10;
|
|
27516
|
+
return removeMediaItemRef(baseUrl, jwt, file.uid);
|
|
27517
|
+
case 10:
|
|
27518
|
+
if (!(targetApiHandler && configuration.targetMapping)) {
|
|
27519
|
+
_context.next = 14;
|
|
27520
|
+
break;
|
|
27521
|
+
}
|
|
27522
|
+
data = applyMapping({
|
|
27523
|
+
mappable: {},
|
|
27524
|
+
mapping: configuration.targetMapping,
|
|
27525
|
+
mappingData: {
|
|
27526
|
+
url: '',
|
|
27527
|
+
ref: ''
|
|
27528
|
+
},
|
|
27529
|
+
rootStore: root
|
|
27574
27530
|
});
|
|
27575
|
-
|
|
27531
|
+
_context.next = 14;
|
|
27532
|
+
return targetApiHandler.update(data, {
|
|
27533
|
+
_id: data._id
|
|
27534
|
+
});
|
|
27535
|
+
case 14:
|
|
27576
27536
|
setFileList([]);
|
|
27577
|
-
case
|
|
27537
|
+
case 15:
|
|
27578
27538
|
setLoading(false);
|
|
27579
27539
|
return _context.abrupt("return", true);
|
|
27580
|
-
case
|
|
27540
|
+
case 17:
|
|
27581
27541
|
case "end":
|
|
27582
27542
|
return _context.stop();
|
|
27583
27543
|
}
|
|
27584
27544
|
}, _callee);
|
|
27585
27545
|
}));
|
|
27586
27546
|
return function onRemove() {
|
|
27587
|
-
return
|
|
27547
|
+
return _ref2.apply(this, arguments);
|
|
27588
27548
|
};
|
|
27589
27549
|
}();
|
|
27590
27550
|
var customRequest = /*#__PURE__*/function () {
|
|
27591
|
-
var
|
|
27592
|
-
var
|
|
27551
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
|
|
27552
|
+
var _root$configurationSt2;
|
|
27553
|
+
var file, rc, jwt, baseUrl, organizationId, mediaType, response, data;
|
|
27593
27554
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
27594
27555
|
while (1) switch (_context2.prev = _context2.next) {
|
|
27595
27556
|
case 0:
|
|
27596
|
-
file =
|
|
27557
|
+
file = _ref3.file;
|
|
27597
27558
|
setLoading(true);
|
|
27598
|
-
|
|
27599
|
-
|
|
27600
|
-
|
|
27601
|
-
|
|
27602
|
-
|
|
27603
|
-
|
|
27604
|
-
|
|
27605
|
-
} else {
|
|
27606
|
-
mediaitem.mediaType = 'PCT';
|
|
27559
|
+
rc = file;
|
|
27560
|
+
jwt = root.dataStore.jwt;
|
|
27561
|
+
baseUrl = (_root$configurationSt2 = root.configurationStore.apiConfig) === null || _root$configurationSt2 === void 0 ? void 0 : _root$configurationSt2.mediaService;
|
|
27562
|
+
organizationId = root.dataStore.selectedOrganizationId;
|
|
27563
|
+
if (!(!jwt || !baseUrl || !organizationId)) {
|
|
27564
|
+
_context2.next = 9;
|
|
27565
|
+
break;
|
|
27607
27566
|
}
|
|
27608
|
-
|
|
27609
|
-
|
|
27567
|
+
setLoading(false);
|
|
27568
|
+
return _context2.abrupt("return");
|
|
27569
|
+
case 9:
|
|
27570
|
+
mediaType = rc.type === 'image/svg+xml' ? 'SVG' : 'PCT';
|
|
27571
|
+
_context2.next = 12;
|
|
27572
|
+
return uploadMediaItem(baseUrl, jwt, {
|
|
27573
|
+
organizationId: organizationId,
|
|
27574
|
+
file: rc,
|
|
27575
|
+
mediaType: mediaType,
|
|
27610
27576
|
functionType: 'LOG'
|
|
27611
|
-
})
|
|
27612
|
-
|
|
27613
|
-
_context2.next = 10;
|
|
27614
|
-
return apiHandler.create(formData);
|
|
27615
|
-
case 10:
|
|
27577
|
+
});
|
|
27578
|
+
case 12:
|
|
27616
27579
|
response = _context2.sent;
|
|
27580
|
+
if (!(targetApiHandler && configuration.targetMapping)) {
|
|
27581
|
+
_context2.next = 17;
|
|
27582
|
+
break;
|
|
27583
|
+
}
|
|
27584
|
+
data = applyMapping({
|
|
27585
|
+
mappable: {},
|
|
27586
|
+
mapping: configuration.targetMapping,
|
|
27587
|
+
mappingData: {
|
|
27588
|
+
url: response.ref.url,
|
|
27589
|
+
ref: response.ref._id
|
|
27590
|
+
},
|
|
27591
|
+
rootStore: root
|
|
27592
|
+
});
|
|
27593
|
+
_context2.next = 17;
|
|
27594
|
+
return targetApiHandler.update(data, {
|
|
27595
|
+
_id: data._id
|
|
27596
|
+
});
|
|
27597
|
+
case 17:
|
|
27617
27598
|
setFileList([{
|
|
27618
|
-
uid: response.ref,
|
|
27619
|
-
name:
|
|
27599
|
+
uid: response.ref._id,
|
|
27600
|
+
name: rc.name,
|
|
27620
27601
|
status: 'done',
|
|
27621
|
-
url: response.url
|
|
27602
|
+
url: response.ref.url,
|
|
27603
|
+
targetId: root.dataStore.selectedOrganizationId
|
|
27622
27604
|
}]);
|
|
27623
27605
|
setLoading(false);
|
|
27624
|
-
case
|
|
27606
|
+
case 19:
|
|
27625
27607
|
case "end":
|
|
27626
27608
|
return _context2.stop();
|
|
27627
27609
|
}
|
|
27628
27610
|
}, _callee2);
|
|
27629
27611
|
}));
|
|
27630
27612
|
return function customRequest(_x) {
|
|
27631
|
-
return
|
|
27613
|
+
return _ref4.apply(this, arguments);
|
|
27632
27614
|
};
|
|
27633
27615
|
}();
|
|
27634
27616
|
var beforeUpload = function beforeUpload(file) {
|
|
@@ -28708,7 +28690,7 @@ function useAGHistogram (_ref) {
|
|
|
28708
28690
|
onError = _ref.onError,
|
|
28709
28691
|
filterField = _ref.filterField;
|
|
28710
28692
|
var root = useStore();
|
|
28711
|
-
var apiHandler = new _default$
|
|
28693
|
+
var apiHandler = new _default$c({
|
|
28712
28694
|
apiInterface: apiInterface
|
|
28713
28695
|
}, root);
|
|
28714
28696
|
var _useState = useState(true),
|
|
@@ -29668,7 +29650,7 @@ function CopyButton(_ref5) {
|
|
|
29668
29650
|
var _state$configuration$23;
|
|
29669
29651
|
var state = _ref5.state;
|
|
29670
29652
|
var root = useStore();
|
|
29671
|
-
new _default$
|
|
29653
|
+
new _default$c({
|
|
29672
29654
|
apiInterface: state.configuration.apiInterface,
|
|
29673
29655
|
type: 'Table'
|
|
29674
29656
|
}, root);
|
|
@@ -29685,7 +29667,7 @@ function CopyButton(_ref5) {
|
|
|
29685
29667
|
try {
|
|
29686
29668
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
29687
29669
|
selectedRow = _step3.value;
|
|
29688
|
-
new _default$
|
|
29670
|
+
new _default$c({
|
|
29689
29671
|
apiInterface: copyAction.apiInterface,
|
|
29690
29672
|
type: 'Table'
|
|
29691
29673
|
}, root).create({
|
|
@@ -29882,7 +29864,7 @@ function BulkAction(_ref8) {
|
|
|
29882
29864
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
29883
29865
|
while (1) switch (_context5.prev = _context5.next) {
|
|
29884
29866
|
case 0:
|
|
29885
|
-
apiInterface = new _default$
|
|
29867
|
+
apiInterface = new _default$c({
|
|
29886
29868
|
apiInterface: action.apiInterface,
|
|
29887
29869
|
type: 'Form'
|
|
29888
29870
|
}, root);
|
|
@@ -33523,9 +33505,9 @@ var ZoomWrapper = function ZoomWrapper(_ref) {
|
|
|
33523
33505
|
},
|
|
33524
33506
|
maxScale: 2,
|
|
33525
33507
|
minScale: 0.2,
|
|
33508
|
+
smooth: true,
|
|
33526
33509
|
wheel: {
|
|
33527
|
-
|
|
33528
|
-
step: 0.2,
|
|
33510
|
+
step: 0.001,
|
|
33529
33511
|
activationKeys: ['Shift']
|
|
33530
33512
|
},
|
|
33531
33513
|
children: function children(_ref2) {
|
|
@@ -39007,7 +38989,7 @@ var Prices = observer(function (_ref) {
|
|
|
39007
38989
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
39008
38990
|
while (1) switch (_context8.prev = _context8.next) {
|
|
39009
38991
|
case 0:
|
|
39010
|
-
api = new _default$
|
|
38992
|
+
api = new _default$c({
|
|
39011
38993
|
type: 'AGGrid',
|
|
39012
38994
|
apiInterface: {
|
|
39013
38995
|
"delete": apiConfig.enricherService + "/packages/".concat(packageId, "/pricelists/").concat(pricelist._id, "/serie/").concat(selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.serieNo, "/prices/manual")
|
|
@@ -42389,7 +42371,7 @@ var useSeriesSelector = function useSeriesSelector(modules) {
|
|
|
42389
42371
|
case 6:
|
|
42390
42372
|
//fetching of pricefeatruegroups is slow, so we can't fetch it in the list, but only for the selected serie
|
|
42391
42373
|
seriesSelectorState.setLoading(true);
|
|
42392
|
-
api = new _default$
|
|
42374
|
+
api = new _default$c({
|
|
42393
42375
|
type: 'SelectSimple',
|
|
42394
42376
|
apiInterface: {
|
|
42395
42377
|
read: idmService + "/catalogs/".concat(catalogId, "/series/").concat(newSerie._id, "?fields=seriesName[").concat(i18n.language.toLocaleUpperCase(), "];_id;serieNo;pricefeaturegroups;pricefeaturegroupsDisplayTexts;pricefeaturegroupsKeys;pricefeaturegroupsKeysDisplayTexts;lastUpdatedDate")
|