@crystaldesign/diva-backoffice 24.9.0-rc.9 → 24.10.0-beta.1

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.
Files changed (2) hide show
  1. package/build/esm/index.js +47 -40
  2. package/package.json +3 -3
@@ -10,8 +10,8 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
10
10
  import _createClass from '@babel/runtime/helpers/createClass';
11
11
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
12
12
  import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
13
- import _get from '@babel/runtime/helpers/get';
14
13
  import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
14
+ import _get from '@babel/runtime/helpers/get';
15
15
  import _inherits from '@babel/runtime/helpers/inherits';
16
16
  import _regeneratorRuntime from '@babel/runtime/regenerator';
17
17
  import _typeof from '@babel/runtime/helpers/typeof';
@@ -152,7 +152,7 @@ function aplyMapping (_ref) {
152
152
  if (isFormData) {
153
153
  returnValue.set(key, value);
154
154
  } else {
155
- var getTarget = function getTarget(idx, keys, startValue, valueToAdd) {
155
+ var _getTarget = function getTarget(idx, keys, startValue, valueToAdd) {
156
156
  var newIdx = keys.length - idx;
157
157
  var newKey = keys[newIdx - 1];
158
158
  var newValue = {};
@@ -162,9 +162,9 @@ function aplyMapping (_ref) {
162
162
  return startValue;
163
163
  }
164
164
  if (newIdx == 1) return _objectSpread$J(_objectSpread$J({}, startValue), newValue);
165
- return getTarget(idx + 1, keys, startValue, newValue);
165
+ return _getTarget(idx + 1, keys, startValue, newValue);
166
166
  };
167
- returnValue = getTarget(0, key.split('.'), returnValue, value);
167
+ returnValue = _getTarget(0, key.split('.'), returnValue, value);
168
168
  }
169
169
  }
170
170
  function meetsCondition(map) {
@@ -1139,6 +1139,7 @@ var _default$d = /*#__PURE__*/function () {
1139
1139
 
1140
1140
  function _callSuper$7(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$7() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
1141
1141
  function _isNativeReflectConstruct$7() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$7 = function _isNativeReflectConstruct() { return !!t; })(); }
1142
+ function _superPropGet$3(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }
1142
1143
  var _default$c = /*#__PURE__*/function (_ApiHandler) {
1143
1144
  function _default(configuration, root) {
1144
1145
  _classCallCheck(this, _default);
@@ -1163,7 +1164,7 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
1163
1164
  element = data[index];
1164
1165
  _context.t0 = result;
1165
1166
  _context.next = 7;
1166
- return _get(_getPrototypeOf(_default.prototype), "update", this).call(this, element);
1167
+ return _superPropGet$3(_default, "update", this, 3)([element]);
1167
1168
  case 7:
1168
1169
  _context.t1 = _context.sent;
1169
1170
  _context.t0.push.call(_context.t0, _context.t1);
@@ -1202,7 +1203,7 @@ var _default$c = /*#__PURE__*/function (_ApiHandler) {
1202
1203
  element = data[index];
1203
1204
  _context2.t0 = result;
1204
1205
  _context2.next = 7;
1205
- return _get(_getPrototypeOf(_default.prototype), "create", this).call(this, element, mapping, mappingData);
1206
+ return _superPropGet$3(_default, "create", this, 3)([element, mapping, mappingData]);
1206
1207
  case 7:
1207
1208
  _context2.t1 = _context2.sent;
1208
1209
  _context2.t0.push.call(_context2.t0, _context2.t1);
@@ -1445,6 +1446,7 @@ var _default$a = /*#__PURE__*/function (_ApiHandler) {
1445
1446
 
1446
1447
  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)); }
1447
1448
  function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() { return !!t; })(); }
1449
+ function _superPropGet$2(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }
1448
1450
  var _default$9 = /*#__PURE__*/function (_ApiHandler) {
1449
1451
  function _default(configuration, rootStore) {
1450
1452
  var _this;
@@ -1485,7 +1487,7 @@ var _default$9 = /*#__PURE__*/function (_ApiHandler) {
1485
1487
  }, {
1486
1488
  key: "readList",
1487
1489
  value: function readList(mapping, mappingData) {
1488
- return _get(_getPrototypeOf(_default.prototype), "readList", this).call(this, mapping, mappingData, {
1490
+ return _superPropGet$2(_default, "readList", this, 3)([mapping, mappingData, {
1489
1491
  pagination: {
1490
1492
  pageSize: 1000
1491
1493
  },
@@ -1493,13 +1495,14 @@ var _default$9 = /*#__PURE__*/function (_ApiHandler) {
1493
1495
  field: '_id',
1494
1496
  title: '_id'
1495
1497
  }]
1496
- });
1498
+ }]);
1497
1499
  }
1498
1500
  }]);
1499
1501
  }(_default$d);
1500
1502
 
1501
1503
  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)); }
1502
1504
  function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { return !!t; })(); }
1505
+ function _superPropGet$1(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }
1503
1506
  var _default$8 = /*#__PURE__*/function (_ApiHandler) {
1504
1507
  function _default(configuration, rootStore) {
1505
1508
  var _this;
@@ -1588,7 +1591,7 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
1588
1591
  break;
1589
1592
  }
1590
1593
  _context.next = 27;
1591
- return _get(_getPrototypeOf(_default.prototype), "create", this).call(this, newEntries[index]);
1594
+ return _superPropGet$1(_default, "create", this, 3)([newEntries[index]]);
1592
1595
  case 27:
1593
1596
  index++;
1594
1597
  _context.next = 24;
@@ -1638,7 +1641,7 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
1638
1641
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
1639
1642
  while (1) switch (_context3.prev = _context3.next) {
1640
1643
  case 0:
1641
- return _context3.abrupt("return", _get(_getPrototypeOf(_default.prototype), "read", this).call(this, mapping, mappingData));
1644
+ return _context3.abrupt("return", _superPropGet$1(_default, "read", this, 3)([mapping, mappingData]));
1642
1645
  case 1:
1643
1646
  case "end":
1644
1647
  return _context3.stop();
@@ -1657,7 +1660,7 @@ var _default$8 = /*#__PURE__*/function (_ApiHandler) {
1657
1660
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
1658
1661
  while (1) switch (_context4.prev = _context4.next) {
1659
1662
  case 0:
1660
- return _context4.abrupt("return", _get(_getPrototypeOf(_default.prototype), "readList", this).call(this, mapping, mappingData, filterServerSide));
1663
+ return _context4.abrupt("return", _superPropGet$1(_default, "readList", this, 3)([mapping, mappingData, filterServerSide]));
1661
1664
  case 1:
1662
1665
  case "end":
1663
1666
  return _context4.stop();
@@ -7221,7 +7224,7 @@ function loadConfiguration(t, root, config, lang) {
7221
7224
  value: 'PUBLIC'
7222
7225
  }]
7223
7226
  }, {
7224
- name: ['settings', 'crossOrganizations'],
7227
+ name: ['settings', 'crossOrganizationSetting'],
7225
7228
  label: t('backoffice.form.organizationdetails.items.settings.crossOrganizations'),
7226
7229
  permission: 'backoffice_sys_admin_organizations',
7227
7230
  type: 'radio',
@@ -7234,10 +7237,13 @@ function loadConfiguration(t, root, config, lang) {
7234
7237
  value: undefined
7235
7238
  }, {
7236
7239
  label: t('backoffice.form.organizationdetails.items.ja'),
7237
- value: true
7240
+ value: 'YES'
7238
7241
  }, {
7239
7242
  label: t('backoffice.form.organizationdetails.items.nein'),
7240
- value: false
7243
+ value: 'NO'
7244
+ }, {
7245
+ label: t('backoffice.form.organizationdetails.items.onlyChildren'),
7246
+ value: 'ONLY_CHILDREN'
7241
7247
  }]
7242
7248
  }, {
7243
7249
  name: ['settings', 'invitationType'],
@@ -7349,7 +7355,7 @@ function loadConfiguration(t, root, config, lang) {
7349
7355
  name: 'organizationId',
7350
7356
  hidden: true
7351
7357
  }];
7352
- var getItemsByContent = function getItemsByContent(content, path) {
7358
+ var _getItemsByContent = function getItemsByContent(content, path) {
7353
7359
  for (var i = 0; i < content.length; i++) {
7354
7360
  var item = content[i];
7355
7361
  var p = [].concat(_toConsumableArray(path), [i]);
@@ -7512,12 +7518,12 @@ function loadConfiguration(t, root, config, lang) {
7512
7518
  name: [].concat(_toConsumableArray(p), ['style']),
7513
7519
  hidden: true
7514
7520
  });
7515
- getItemsByContent(item.content, [].concat(_toConsumableArray(p), ['content']));
7521
+ _getItemsByContent(item.content, [].concat(_toConsumableArray(p), ['content']));
7516
7522
  break;
7517
7523
  }
7518
7524
  }
7519
7525
  };
7520
- getItemsByContent(data.content, ['content']);
7526
+ _getItemsByContent(data.content, ['content']);
7521
7527
  return result;
7522
7528
  },
7523
7529
  apiInterface: {
@@ -12609,15 +12615,15 @@ var DownloadStore = /*#__PURE__*/function () {
12609
12615
  var link = document.createElement('a');
12610
12616
  link.href = url;
12611
12617
  link.download = name;
12612
- var clickHandler = function clickHandler() {
12618
+ var _clickHandler = function clickHandler() {
12613
12619
  setTimeout(function () {
12614
12620
  URL.revokeObjectURL(url);
12615
- removeEventListener('click', clickHandler);
12621
+ removeEventListener('click', _clickHandler);
12616
12622
  document.body.removeChild(link);
12617
12623
  }, 150);
12618
12624
  };
12619
12625
  document.body.appendChild(link);
12620
- link.addEventListener('click', clickHandler, false);
12626
+ link.addEventListener('click', _clickHandler, false);
12621
12627
  link.click();
12622
12628
  }
12623
12629
  }, {
@@ -14430,6 +14436,7 @@ var InputComponent$1 = observer(InputComponent, {
14430
14436
 
14431
14437
  function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
14432
14438
  function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { return !!t; })(); }
14439
+ function _superPropGet(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }
14433
14440
  var _default = /*#__PURE__*/function (_ApiHandler) {
14434
14441
  function _default(configuration, rootStore) {
14435
14442
  var _this;
@@ -14712,13 +14719,13 @@ var _default = /*#__PURE__*/function (_ApiHandler) {
14712
14719
  break;
14713
14720
  case 9:
14714
14721
  _context5.next = 11;
14715
- return _get(_getPrototypeOf(_default.prototype), "read", this).call(this, {
14722
+ return _superPropGet(_default, "read", this, 3)([{
14716
14723
  map: [{
14717
14724
  targetField: 'organizationId',
14718
14725
  sourceValue: organizationId
14719
14726
  }],
14720
14727
  type: 'query'
14721
- });
14728
+ }]);
14722
14729
  case 11:
14723
14730
  organization = _context5.sent;
14724
14731
  if (!(!organization || !((_organization$api2Loc = organization.api2Location) !== null && _organization$api2Loc !== void 0 && _organization$api2Loc.ek) && !((_organization$api2Loc2 = organization.api2Location) !== null && _organization$api2Loc2 !== void 0 && _organization$api2Loc2.vk))) {
@@ -15636,7 +15643,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
15636
15643
  form.resetFields();
15637
15644
  }
15638
15645
  }, [state.data]);
15639
- var trimStringsOfObject = function trimStringsOfObject(ob, prevOb) {
15646
+ var _trimStringsOfObject = function trimStringsOfObject(ob, prevOb) {
15640
15647
  if (typeof ob == 'string') {
15641
15648
  ob = ob.trim();
15642
15649
  return;
@@ -15650,10 +15657,10 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
15650
15657
  var ar = value;
15651
15658
  for (var i = 0; i < ar.length; i++) {
15652
15659
  var pO = prevOb === null || prevOb === void 0 ? void 0 : prevOb[key];
15653
- trimStringsOfObject(ar[i], pO === null || pO === void 0 ? void 0 : pO[i]);
15660
+ _trimStringsOfObject(ar[i], pO === null || pO === void 0 ? void 0 : pO[i]);
15654
15661
  }
15655
15662
  } else {
15656
- trimStringsOfObject(value, prevOb === null || prevOb === void 0 ? void 0 : prevOb[key]);
15663
+ _trimStringsOfObject(value, prevOb === null || prevOb === void 0 ? void 0 : prevOb[key]);
15657
15664
  }
15658
15665
  } else if (typeof value == 'string') {
15659
15666
  if (ob[key] !== (prevOb === null || prevOb === void 0 ? void 0 : prevOb[key])) {
@@ -15671,7 +15678,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
15671
15678
  _context.prev = 0;
15672
15679
  //normalize data before safing
15673
15680
  if (_typeof(values) == 'object' && values !== null) {
15674
- trimStringsOfObject(values, state.data);
15681
+ _trimStringsOfObject(values, state.data);
15675
15682
  }
15676
15683
  Object.entries(values).forEach(function (_ref5, idx) {
15677
15684
  var _ref6 = _slicedToArray(_ref5, 2),
@@ -21802,7 +21809,7 @@ var TableWrapper = function TableWrapper(_ref) {
21802
21809
  type: "default",
21803
21810
  size: 'middle',
21804
21811
  onClick: function onClick() {
21805
- return setAnalyticsVisible(!analyticsVisible);
21812
+ return !analyticsVisible ? setAnalyticsVisible(true) : undefined;
21806
21813
  },
21807
21814
  children: /*#__PURE__*/jsx(SMChart, {
21808
21815
  field: state.configuration.histogram.field,
@@ -25454,12 +25461,12 @@ function useTransformJson (_ref) {
25454
25461
  useEffect(function () {
25455
25462
  if (!data) return;
25456
25463
  var flat = [];
25457
- getFlatData(data, flat);
25464
+ _getFlatData(data, flat);
25458
25465
  setFlatData(flat);
25459
- var _getItemsChain = getItemsChain(data, []),
25466
+ var _getItemsChain = _getItemsChain3(data, []),
25460
25467
  c = _getItemsChain.itemChain;
25461
25468
  setItemChain(c);
25462
- setTransformedData(transformData(data, c));
25469
+ setTransformedData(_transformData(data, c));
25463
25470
  }, [data, root.dataStore.selectedOrganizationId]);
25464
25471
  var _useMemo = useMemo(function () {
25465
25472
  return {
@@ -25486,7 +25493,7 @@ function useTransformJson (_ref) {
25486
25493
  return _ref2.apply(this, arguments);
25487
25494
  };
25488
25495
  }();
25489
- var transformData = function transformData(data, itemChain, parentOrgId) {
25496
+ var _transformData = function transformData(data, itemChain, parentOrgId) {
25490
25497
  var _data$children;
25491
25498
  return _objectSpread$6(_objectSpread$6({}, data), {}, {
25492
25499
  label: /*#__PURE__*/jsx(OrgItem$1, {
@@ -25498,11 +25505,11 @@ function useTransformJson (_ref) {
25498
25505
  parentOrgId: parentOrgId
25499
25506
  }, data.id + '1'),
25500
25507
  children: (_data$children = data.children) === null || _data$children === void 0 ? void 0 : _data$children.map(function (c) {
25501
- return transformData(c, itemChain, data.id);
25508
+ return _transformData(c, itemChain, data.id);
25502
25509
  })
25503
25510
  });
25504
25511
  };
25505
- var getItemsChain = function getItemsChain(data, itemChain) {
25512
+ var _getItemsChain3 = function getItemsChain(data, itemChain) {
25506
25513
  if (root.dataStore.selectedOrganizationId == data.id) return {
25507
25514
  found: true,
25508
25515
  itemChain: [].concat(_toConsumableArray(itemChain), [data])
@@ -25510,7 +25517,7 @@ function useTransformJson (_ref) {
25510
25517
  if (data.children) {
25511
25518
  for (var i = 0; i < ((_data$children2 = data.children) === null || _data$children2 === void 0 ? void 0 : _data$children2.length); i++) {
25512
25519
  var _data$children2;
25513
- var _getItemsChain2 = getItemsChain(data.children[i], [].concat(_toConsumableArray(itemChain), [data])),
25520
+ var _getItemsChain2 = _getItemsChain3(data.children[i], [].concat(_toConsumableArray(itemChain), [data])),
25514
25521
  found = _getItemsChain2.found,
25515
25522
  newChain = _getItemsChain2.itemChain;
25516
25523
  if (found) return {
@@ -25524,14 +25531,14 @@ function useTransformJson (_ref) {
25524
25531
  itemChain: itemChain
25525
25532
  };
25526
25533
  };
25527
- var getFlatData = function getFlatData(data, flat) {
25534
+ var _getFlatData = function getFlatData(data, flat) {
25528
25535
  flat.push({
25529
25536
  label: data.displayName,
25530
25537
  value: data.id
25531
25538
  });
25532
25539
  for (var i = 0; i < ((_data$children3 = data.children) !== null && _data$children3 !== void 0 ? _data$children3 : []).length; i++) {
25533
25540
  var _data$children3;
25534
- getFlatData(data.children[i], flat);
25541
+ _getFlatData(data.children[i], flat);
25535
25542
  }
25536
25543
  };
25537
25544
  return {
@@ -30574,21 +30581,21 @@ function Router() {
30574
30581
  if (!root.configurationStore.hasConfig) {
30575
30582
  return [];
30576
30583
  }
30577
- var flat = function flat(menu, path) {
30584
+ var _flat = function flat(menu, path) {
30578
30585
  return menu.flatMap(function (item) {
30579
30586
  var newPath = item.path ? "".concat(path, "/").concat(item.path) : path;
30580
30587
  if (item.items) {
30581
- return flat(item.items, newPath);
30588
+ return _flat(item.items, newPath);
30582
30589
  }
30583
30590
  if (item.subMenu) {
30584
- return flat(item.subMenu, newPath);
30591
+ return _flat(item.subMenu, newPath);
30585
30592
  }
30586
30593
  return [_objectSpread$1(_objectSpread$1({}, item), {}, {
30587
30594
  path: newPath
30588
30595
  })];
30589
30596
  });
30590
30597
  };
30591
- return flat(menu, '');
30598
+ return _flat(menu, '');
30592
30599
  }, [root.configurationStore.hasConfig]);
30593
30600
  return /*#__PURE__*/jsx(Fragment, {
30594
30601
  children: !!routes.length && /*#__PURE__*/jsx(Routes, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "24.9.0-rc.9",
3
+ "version": "24.10.0-beta.1",
4
4
  "license": "COMMERCIAL",
5
5
  "devDependencies": {
6
6
  "@testing-library/jest-dom": "^5.15.0",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "@ant-design/icons": "5.0.1",
17
17
  "@babel/runtime": "7.18.0",
18
- "@crystaldesign/spreadsheet": "24.9.0-rc.9",
18
+ "@crystaldesign/spreadsheet": "24.10.0-beta.1",
19
19
  "@google/model-viewer": "3.4.0",
20
20
  "@tinymce/tinymce-react": "^3.13.0",
21
21
  "ag-charts-community": "^9.3.1",
@@ -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": "8b33d18979b29356dcd3daf16393c0d12a685ff2"
54
+ "gitHead": "f230d623780b92a696cb90c6137172997f6297b4"
55
55
  }