@crystaldesign/diva-backoffice 24.2.2-beta.1 → 24.2.2-beta.11

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.
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import React, { createContext, useState, useEffect, useMemo, useCallback, useRef, useImperativeHandle, useReducer, createRef, forwardRef, useContext, memo } from 'react';
3
3
  import 'antd/dist/reset.css';
4
- import { Button, Spin, Descriptions, Select as Select$1, Alert, Modal as Modal$2, Input, Popover, Typography, Divider, Avatar, Form as Form$1, Radio, DatePicker, Checkbox, InputNumber, Card, Tooltip, Upload, Space, Row, Col, Steps, Result as Result$1, Layout, Switch, Menu as Menu$1, Collapse, Table as Table$1, Popconfirm, Tabs, Image, Progress, Slider, Breadcrumb, List as List$1, message, Cascader, Skeleton, Drawer, ConfigProvider, theme } from 'antd';
4
+ import { Button, Spin, Descriptions, Select as Select$2, Alert, Modal as Modal$2, Input, Popover, Typography, Divider, Avatar, Form as Form$1, Radio, DatePicker, Checkbox, InputNumber, Card, Tooltip, Upload, Space, Row, Col, Steps, Result as Result$1, Layout, Switch, Menu as Menu$1, Collapse, Table as Table$1, Popconfirm, Tabs, Image, Progress, Slider, Breadcrumb, List as List$1, message, Cascader, Skeleton, Drawer, ConfigProvider, theme } from 'antd';
5
5
  import { observer } from 'mobx-react-lite';
6
6
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
7
7
  import { getLogger, CoreError, useDivaCore, useTranslation, DivaUtils } from '@crystaldesign/diva-core';
@@ -96,6 +96,7 @@ import classnames from 'classnames';
96
96
  import Collapsible from 'react-collapsible';
97
97
  import QuestionOutlined from '@ant-design/icons/QuestionOutlined';
98
98
  import { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch';
99
+ import { useTranslation as useTranslation$1 } from 'react-i18next';
99
100
  import { stringify } from 'csv';
100
101
  import InfiniteScroll from 'react-infinite-scroll-component';
101
102
  import ReactCrop from 'react-image-crop';
@@ -1913,26 +1914,28 @@ function loadConfiguration(t, root, config, lang) {
1913
1914
  },
1914
1915
  select: {
1915
1916
  filterField: 'status',
1916
- search: false,
1917
- defaultValue: t('backoffice.table.applicationlogs.filter.dropdown.all'),
1918
- applyDefaultValue: false,
1919
- options: [{
1920
- lable: t('backoffice.table.applicationlogs.filter.dropdown.all'),
1921
- value: '',
1922
- data: ''
1923
- }, {
1924
- lable: 'Timeout',
1925
- value: 'Timeout',
1926
- data: 'TIMEOUT'
1927
- }, {
1928
- lable: 'Success',
1929
- value: 'Success',
1930
- data: 'SUCCESS'
1931
- }, {
1932
- lable: 'Error',
1933
- value: 'Error',
1934
- data: 'ERROR'
1935
- }]
1917
+ settings: {
1918
+ search: false,
1919
+ options: [{
1920
+ label: t('backoffice.table.applicationlogs.filter.dropdown.all'),
1921
+ value: 'ALL',
1922
+ data: 'ALL'
1923
+ }, {
1924
+ label: 'Timeout',
1925
+ value: 'Timeout',
1926
+ data: 'TIMEOUT'
1927
+ }, {
1928
+ label: 'Success',
1929
+ value: 'Success',
1930
+ data: 'SUCCESS'
1931
+ }, {
1932
+ label: 'Error',
1933
+ value: 'Error',
1934
+ data: 'ERROR'
1935
+ }]
1936
+ },
1937
+ defaultValue: 'ALL',
1938
+ applyDefaultValue: false
1936
1939
  }
1937
1940
  },
1938
1941
  mapping: {
@@ -2978,21 +2981,17 @@ function loadConfiguration(t, root, config, lang) {
2978
2981
  type: 'Form',
2979
2982
  id: 'FormApplicationTranslationsEdit',
2980
2983
  title: t('backoffice.table.translation.title')
2981
- }, {
2982
- actionType: 'Detail',
2983
- type: 'Form',
2984
- id: 'FormApplicationTranslations',
2985
- title: 'Lokalisierung',
2986
- label: t('backoffice.rowAction.title.overwrite')
2987
2984
  }],
2988
2985
  filter: {
2989
2986
  select: {
2990
- search: true,
2987
+ settings: {
2988
+ search: true,
2989
+ apiInterface: {
2990
+ read: '${adminService}/locales/namespaces'
2991
+ }
2992
+ },
2991
2993
  defaultValue: 'default',
2992
- filterField: 'namespace',
2993
- apiInterface: {
2994
- read: '${adminService}/locales/namespaces'
2995
- }
2994
+ filterField: 'namespace'
2996
2995
  },
2997
2996
  search: {
2998
2997
  fields: ['key', 'locales.de.default', 'locales.fr.default', 'locales.en.default', 'locales.it.default']
@@ -3766,33 +3765,9 @@ function loadConfiguration(t, root, config, lang) {
3766
3765
  actionType: 'Modal',
3767
3766
  title: t('backoffice.table.invitations.rowAction.aktivateuser.title'),
3768
3767
  text: t('backoffice.table.invitations.rowAction.aktivateuser.text'),
3769
- label: t('backoffice.table.invitations.rowAction.aktivateuser.label'),
3770
- type: 'Form',
3771
- id: 'FormSendInvitation',
3772
- mapping: {
3773
- type: 'body',
3774
- map: [{
3775
- sourceField: '_id',
3776
- targetField: 'id'
3777
- }, {
3778
- sourceValue: window.location.origin,
3779
- targetField: 'redirectTo'
3780
- }, {
3781
- sourceField: 'organizationId',
3782
- targetField: 'organizationId'
3783
- }]
3768
+ label: function label(data) {
3769
+ return data.send == false ? t('backoffice.table.invitations.rowAction.aktivateuser.label') : t('backoffice.table.invitations.rowAction.resendMail');
3784
3770
  },
3785
- rule: [{
3786
- match: {
3787
- sourceField: 'send',
3788
- value: false
3789
- }
3790
- }]
3791
- }, {
3792
- actionType: 'Modal',
3793
- title: t('backoffice.table.invitations.rowAction.aktivateuser.title'),
3794
- text: t('backoffice.table.invitations.rowAction.aktivateuser.text'),
3795
- label: t('backoffice.table.invitations.rowAction.resendMail'),
3796
3771
  type: 'Form',
3797
3772
  id: 'FormSendInvitation',
3798
3773
  mapping: {
@@ -3807,13 +3782,7 @@ function loadConfiguration(t, root, config, lang) {
3807
3782
  sourceField: 'organizationId',
3808
3783
  targetField: 'organizationId'
3809
3784
  }]
3810
- },
3811
- rule: [{
3812
- match: {
3813
- sourceField: 'send',
3814
- value: true
3815
- }
3816
- }]
3785
+ }
3817
3786
  }]
3818
3787
  },
3819
3788
  TableSubOrganizations: {
@@ -8494,7 +8463,33 @@ function loadConfiguration(t, root, config, lang) {
8494
8463
  var _root$dataStore;
8495
8464
  root === null || root === void 0 || (_root$dataStore = root.dataStore) === null || _root$dataStore === void 0 || _root$dataStore.setSelectedOrganizationId(data._id);
8496
8465
  }
8497
- }
8466
+ },
8467
+ additionalActions: [{
8468
+ actionType: 'Callback',
8469
+ label: t('backoffice.orgtree.openAction'),
8470
+ id: 'ChangeToOrganization',
8471
+ rule: [{
8472
+ or: [{
8473
+ match: {
8474
+ sourceField: 'type',
8475
+ value: 'DEALER'
8476
+ }
8477
+ }, {
8478
+ match: {
8479
+ sourceField: 'type',
8480
+ value: 'RETAILER'
8481
+ }
8482
+ }, {
8483
+ match: {
8484
+ sourceField: 'type',
8485
+ value: 'RETAILERCHILD'
8486
+ }
8487
+ }]
8488
+ }],
8489
+ callback: function callback(data) {
8490
+ root === null || root === void 0 || root.actions.setOrganization(data.id);
8491
+ }
8492
+ }]
8498
8493
  },
8499
8494
  DescriptionCurrentOrganization: {
8500
8495
  type: 'Description',
@@ -11531,6 +11526,7 @@ function ActionButton (_ref) {
11531
11526
  danger = _ref.danger,
11532
11527
  buttonType = _ref.buttonType;
11533
11528
  var root = useStore();
11529
+ var label = typeof action.label == 'function' ? action.label(data) : action.label;
11534
11530
  var ButtonType = type == 'Button' ? Button : A;
11535
11531
  var disable = false;
11536
11532
  if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
@@ -11607,7 +11603,7 @@ function ActionButton (_ref) {
11607
11603
  width: action.width,
11608
11604
  footer: action.footer
11609
11605
  });
11610
- return _context.abrupt("break", 31);
11606
+ return _context.abrupt("break", 34);
11611
11607
  case 8:
11612
11608
  if (!(disable || shouldExecuted && !shouldExecuted())) {
11613
11609
  _context.next = 10;
@@ -11616,7 +11612,7 @@ function ActionButton (_ref) {
11616
11612
  return _context.abrupt("return");
11617
11613
  case 10:
11618
11614
  root.contentStore.setSelectedMenuItem(action.id);
11619
- return _context.abrupt("break", 31);
11615
+ return _context.abrupt("break", 34);
11620
11616
  case 12:
11621
11617
  if (!(disable || shouldExecuted && !shouldExecuted())) {
11622
11618
  _context.next = 14;
@@ -11629,7 +11625,7 @@ function ActionButton (_ref) {
11629
11625
  data: data,
11630
11626
  callback: callback !== null && callback !== void 0 ? callback : function () {}
11631
11627
  });
11632
- return _context.abrupt("break", 31);
11628
+ return _context.abrupt("break", 34);
11633
11629
  case 16:
11634
11630
  apiInterface = new _default$d({
11635
11631
  apiInterface: action.apiInterface,
@@ -11666,8 +11662,16 @@ function ActionButton (_ref) {
11666
11662
  _context.t1 = _context["catch"](17);
11667
11663
  root.error = action.errorText;
11668
11664
  case 30:
11669
- return _context.abrupt("break", 31);
11665
+ return _context.abrupt("break", 34);
11670
11666
  case 31:
11667
+ if (!(disable || shouldExecuted && !shouldExecuted())) {
11668
+ _context.next = 33;
11669
+ break;
11670
+ }
11671
+ return _context.abrupt("return");
11672
+ case 33:
11673
+ callback === null || callback === void 0 || callback(data);
11674
+ case 34:
11671
11675
  case "end":
11672
11676
  return _context.stop();
11673
11677
  }
@@ -11679,13 +11683,13 @@ function ActionButton (_ref) {
11679
11683
  }();
11680
11684
  switch (action.actionType) {
11681
11685
  case 'SwitchButton':
11682
- var lable;
11686
+ var switchLabel;
11683
11687
  var _iterator3 = _createForOfIteratorHelper$h(action.switchLable),
11684
11688
  _step3;
11685
11689
  try {
11686
11690
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
11687
11691
  var element = _step3.value;
11688
- if (element.sourceValue == data[action.switchField]) lable = element.targetValue;
11692
+ if (element.sourceValue == data[action.switchField]) switchLabel = element.targetValue;
11689
11693
  }
11690
11694
  } catch (err) {
11691
11695
  _iterator3.e(err);
@@ -11696,7 +11700,7 @@ function ActionButton (_ref) {
11696
11700
  disabled: disable,
11697
11701
  style: style,
11698
11702
  onClick: onClick,
11699
- children: lable
11703
+ children: switchLabel
11700
11704
  }, id);
11701
11705
  case 'Detail':
11702
11706
  return /*#__PURE__*/jsx(ButtonType, {
@@ -11705,7 +11709,7 @@ function ActionButton (_ref) {
11705
11709
  disabled: disable,
11706
11710
  style: style,
11707
11711
  onClick: onClick,
11708
- children: action.label || defaultLabel
11712
+ children: label || defaultLabel
11709
11713
  }, id);
11710
11714
  case 'GoTo':
11711
11715
  return /*#__PURE__*/jsx(ButtonType, {
@@ -11714,7 +11718,7 @@ function ActionButton (_ref) {
11714
11718
  disabled: disable,
11715
11719
  style: style,
11716
11720
  onClick: onClick,
11717
- children: action.label || defaultLabel
11721
+ children: label || defaultLabel
11718
11722
  }, id);
11719
11723
  case 'Modal':
11720
11724
  return /*#__PURE__*/jsx(ButtonType, {
@@ -11723,7 +11727,7 @@ function ActionButton (_ref) {
11723
11727
  disabled: disable,
11724
11728
  style: style,
11725
11729
  onClick: onClick,
11726
- children: action.label || defaultLabel
11730
+ children: label || defaultLabel
11727
11731
  }, id);
11728
11732
  case 'Download':
11729
11733
  var icon = /*#__PURE__*/jsx(FileExcelOutlined, {});
@@ -11745,7 +11749,16 @@ function ActionButton (_ref) {
11745
11749
  action: action
11746
11750
  });
11747
11751
  },
11748
- children: action.label || icon
11752
+ children: label || icon
11753
+ }, id);
11754
+ case 'Callback':
11755
+ return /*#__PURE__*/jsx(ButtonType, {
11756
+ type: buttonType,
11757
+ danger: danger,
11758
+ disabled: disable,
11759
+ style: style,
11760
+ onClick: onClick,
11761
+ children: label || defaultLabel
11749
11762
  }, id);
11750
11763
  default:
11751
11764
  throw new Error("Action type ".concat(action.actionType, " is not supported"));
@@ -12266,7 +12279,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref) {
12266
12279
  var filterServerSide = _typeof(apiInterface) == 'object' && _typeof(apiInterface.read) == 'object' && apiInterface.read.filterServerSide;
12267
12280
  var selected = state.selected;
12268
12281
  return /*#__PURE__*/jsx(Fragment, {
12269
- children: /*#__PURE__*/jsx(Select$1, {
12282
+ children: /*#__PURE__*/jsx(Select$2, {
12270
12283
  labelInValue: mode === 'tags' ? false : true,
12271
12284
  style: {
12272
12285
  width: '100%',
@@ -12292,7 +12305,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref) {
12292
12305
  })
12293
12306
  });
12294
12307
  };
12295
- var Select = observer(SelectWrapper$1, {
12308
+ var Select$1 = observer(SelectWrapper$1, {
12296
12309
  forwardRef: true
12297
12310
  });
12298
12311
 
@@ -12414,7 +12427,7 @@ var FileUploadWrapper = function FileUploadWrapper(_ref) {
12414
12427
  style: {
12415
12428
  marginTop: 18
12416
12429
  },
12417
- children: /*#__PURE__*/jsx(Select, {
12430
+ children: /*#__PURE__*/jsx(Select$1, {
12418
12431
  mode: "multiple",
12419
12432
  apiInterface: {
12420
12433
  read: {
@@ -13056,7 +13069,7 @@ var Presets = function Presets(_ref) {
13056
13069
  setUsedPreset = _ref.setUsedPreset,
13057
13070
  presets = _ref.presets,
13058
13071
  setPresets = _ref.setPresets;
13059
- var Option = Select$1.Option;
13072
+ var Option = Select$2.Option;
13060
13073
  var _useState = useState(false),
13061
13074
  _useState2 = _slicedToArray(_useState, 2),
13062
13075
  isModalVisible = _useState2[0],
@@ -13160,7 +13173,7 @@ var Presets = function Presets(_ref) {
13160
13173
  setValue(undefined);
13161
13174
  };
13162
13175
  return /*#__PURE__*/jsxs(Fragment, {
13163
- children: [/*#__PURE__*/jsx(Select$1, {
13176
+ children: [/*#__PURE__*/jsx(Select$2, {
13164
13177
  showSearch: true,
13165
13178
  value: value,
13166
13179
  placeholder: t('backoffice.form.presets.placeholder'),
@@ -14451,7 +14464,7 @@ var Selector = function Selector(_ref) {
14451
14464
  }
14452
14465
  }, [valueState]);
14453
14466
  return /*#__PURE__*/jsx(Fragment, {
14454
- children: /*#__PURE__*/jsx(Select$1, {
14467
+ children: /*#__PURE__*/jsx(Select$2, {
14455
14468
  className: customSelect,
14456
14469
  showSearch: true,
14457
14470
  labelInValue: true,
@@ -14470,7 +14483,7 @@ var Selector = function Selector(_ref) {
14470
14483
  return onSelect(option === null || option === void 0 ? void 0 : option.key);
14471
14484
  },
14472
14485
  children: items === null || items === void 0 ? void 0 : items.map(function (i) {
14473
- return /*#__PURE__*/jsxs(Select$1.Option, {
14486
+ return /*#__PURE__*/jsxs(Select$2.Option, {
14474
14487
  value: i.name,
14475
14488
  className: customSelectOption,
14476
14489
  children: [/*#__PURE__*/jsx("div", {
@@ -14564,7 +14577,8 @@ function useSelectSimpleData (_ref) {
14564
14577
  var apiInterface = _ref.apiInterface,
14565
14578
  selectMapping = _ref.selectMapping,
14566
14579
  onChange = _ref.onChange,
14567
- value = _ref.value;
14580
+ value = _ref.value,
14581
+ configuredOptions = _ref.options;
14568
14582
  var root = useStore();
14569
14583
  var _useMemo = useMemo(function () {
14570
14584
  return {
@@ -14575,23 +14589,18 @@ function useSelectSimpleData (_ref) {
14575
14589
  };
14576
14590
  }, []),
14577
14591
  apiHandler = _useMemo.apiHandler;
14578
- var _useState = useState(false),
14592
+ var _useState = useState(true),
14579
14593
  _useState2 = _slicedToArray(_useState, 2),
14580
14594
  loading = _useState2[0],
14581
14595
  setLoading = _useState2[1];
14582
- // used to skip the first render, because antd for some reason sets the value only on the second render
14583
- var _useState3 = useState(true),
14596
+ var _useState3 = useState(),
14584
14597
  _useState4 = _slicedToArray(_useState3, 2),
14585
- skipOnRender = _useState4[0],
14586
- setSkipOnRender = _useState4[1];
14587
- var _useState5 = useState([]),
14598
+ options = _useState4[0],
14599
+ setOptions = _useState4[1];
14600
+ var _useState5 = useState(),
14588
14601
  _useState6 = _slicedToArray(_useState5, 2),
14589
- options = _useState6[0],
14590
- setOptions = _useState6[1];
14591
- var _useState7 = useState(),
14592
- _useState8 = _slicedToArray(_useState7, 2),
14593
- selected = _useState8[0],
14594
- setSelected = _useState8[1];
14602
+ selected = _useState6[0],
14603
+ setSelected = _useState6[1];
14595
14604
  var currentValue = useMemo(function () {
14596
14605
  if (!selected) return undefined;
14597
14606
  if (Array.isArray(selected)) return selected.map(function (item) {
@@ -14600,8 +14609,10 @@ function useSelectSimpleData (_ref) {
14600
14609
  return selected.value;
14601
14610
  }, [selected]);
14602
14611
  useEffect(function () {
14603
- if (skipOnRender) {
14604
- setSkipOnRender(false);
14612
+ if (configuredOptions) {
14613
+ if (apiHandler.canReadList) LOG$8.warn('If options are provided, apiInterface will not be used');
14614
+ setOptions(configuredOptions);
14615
+ setLoading(false);
14605
14616
  return;
14606
14617
  }
14607
14618
  if (!apiHandler.canReadList) throw Error('SelectSimple: apiInterface must have readList method');
@@ -14613,13 +14624,17 @@ function useSelectSimpleData (_ref) {
14613
14624
  return parseDataEntry(item, selectMapping);
14614
14625
  });
14615
14626
  setOptions(options);
14616
- if (value) {
14617
- setSelected(findByValue(value, options, selectMapping));
14618
- }
14619
14627
  })["finally"](function () {
14620
14628
  setLoading(false);
14621
14629
  });
14622
- }, [skipOnRender]);
14630
+ }, []);
14631
+ useEffect(function () {
14632
+ // set the selected option only after the options are loaded
14633
+ if (value && options) {
14634
+ LOG$8.debug('value changed', value);
14635
+ setSelected(findByValue(value, options, selectMapping));
14636
+ }
14637
+ }, [value, options]);
14623
14638
  var onSelectionChanged = function onSelectionChanged(value, option) {
14624
14639
  setSelected(option);
14625
14640
  onChange === null || onChange === void 0 || onChange(parseReturnData(option, selectMapping));
@@ -14683,7 +14698,7 @@ function parseReturnData(options, selectMapping) {
14683
14698
  return (selectMapping === null || selectMapping === void 0 ? void 0 : selectMapping.externalValue) == 'value' ? options.value : options.data;
14684
14699
  }
14685
14700
 
14686
- var _excluded$2 = ["apiInterface", "selectMapping", "onChange", "value", "search"];
14701
+ var _excluded$2 = ["apiInterface", "selectMapping", "onChange", "value", "search", "options"];
14687
14702
  function ownKeys$t(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14688
14703
  function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14689
14704
  var SelectWrapper = function SelectWrapper(_ref) {
@@ -14692,15 +14707,17 @@ var SelectWrapper = function SelectWrapper(_ref) {
14692
14707
  onChange = _ref.onChange,
14693
14708
  value = _ref.value,
14694
14709
  search = _ref.search,
14710
+ options = _ref.options,
14695
14711
  selectProps = _objectWithoutProperties(_ref, _excluded$2);
14696
14712
  var state = useSelectSimpleData({
14697
14713
  apiInterface: apiInterface,
14698
14714
  selectMapping: selectMapping,
14699
14715
  onChange: onChange,
14700
14716
  value: value,
14701
- type: 'SelectSimple'
14717
+ type: 'SelectSimple',
14718
+ options: options
14702
14719
  });
14703
- return /*#__PURE__*/jsx(Select$1, _objectSpread$t(_objectSpread$t({}, selectProps), {}, {
14720
+ return /*#__PURE__*/jsx(Select$2, _objectSpread$t(_objectSpread$t({}, selectProps), {}, {
14704
14721
  showSearch: search,
14705
14722
  loading: state.loading,
14706
14723
  options: state.options,
@@ -14710,7 +14727,7 @@ var SelectWrapper = function SelectWrapper(_ref) {
14710
14727
  filterOption: filterOption
14711
14728
  }));
14712
14729
  };
14713
- var SelectSimple = observer(SelectWrapper, {
14730
+ var Select = observer(SelectWrapper, {
14714
14731
  forwardRef: true
14715
14732
  });
14716
14733
  var filterOption = function filterOption(input, option) {
@@ -14899,7 +14916,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
14899
14916
  var disabled = (_isReadonly = isReadonly(item, data)) !== null && _isReadonly !== void 0 ? _isReadonly : (_state$hiddenRequired2 = state.hiddenRequiredDisabled[typeof item.name == 'string' ? item.name : item.name.join('.')]) === null || _state$hiddenRequired2 === void 0 ? void 0 : _state$hiddenRequired2.disabled;
14900
14917
  switch (item.type) {
14901
14918
  case 'select':
14902
- return /*#__PURE__*/jsx(Select, {
14919
+ return /*#__PURE__*/jsx(Select$1, {
14903
14920
  initialValue: item.defaultValue,
14904
14921
  apiInterface: item.apiInterface,
14905
14922
  mode: item.mode,
@@ -14924,7 +14941,7 @@ var FormWrapper$1 = function FormWrapper(_ref, ref) {
14924
14941
  }
14925
14942
  }, state.selectedItemsIndex);
14926
14943
  case 'selectSimple':
14927
- return /*#__PURE__*/jsx(SelectSimple, _objectSpread$s(_objectSpread$s({}, item), {}, {
14944
+ return /*#__PURE__*/jsx(Select, _objectSpread$s(_objectSpread$s({}, item), {}, {
14928
14945
  disabled: disabled,
14929
14946
  onChange: function onChange(value) {
14930
14947
  _onChange(item.name, value);
@@ -16033,7 +16050,7 @@ var FormWrapper = function FormWrapper(_ref, ref) {
16033
16050
  span: 4
16034
16051
  }), /*#__PURE__*/jsx(Col, {
16035
16052
  span: 20,
16036
- children: /*#__PURE__*/jsx(Select$1, {
16053
+ children: /*#__PURE__*/jsx(Select$2, {
16037
16054
  style: {
16038
16055
  width: '100%'
16039
16056
  },
@@ -16744,7 +16761,7 @@ function DropdownCell (_ref) {
16744
16761
  noStyle: true,
16745
16762
  name: dataIndex,
16746
16763
  initialValue: column.translationPrefix ? t(column.translationPrefix + '.' + children[1]) : children,
16747
- children: /*#__PURE__*/jsx(Select$1, {
16764
+ children: /*#__PURE__*/jsx(Select$2, {
16748
16765
  style: {
16749
16766
  width: column.width - 20
16750
16767
  },
@@ -17727,10 +17744,10 @@ dayjs.extend(weekday);
17727
17744
  dayjs.extend(localeData);
17728
17745
  dayjs.extend(weekOfYear);
17729
17746
  dayjs.extend(weekYear);
17730
- Select$1.Option;
17747
+ Select$2.Option;
17731
17748
  var LOG$4 = getLogger('Backoffice', 'BaseTable');
17732
17749
  var TableWrapper = function TableWrapper(_ref) {
17733
- var _state$configuration$, _state$configuration$2, _state$configuration$3, _state$configuration$4, _state$configuration$5, _state$configuration$6, _state$globalFilter, _state$globalFilter2, _state$globalFilter3, _state$globalFilter4, _state$configuration$7, _state$configuration$8, _state$globalFilter$s, _state$configuration$9, _state$configuration$10, _state$configuration$11, _state$configuration$12, _state$configuration$13, _state$configuration$14, _state$configuration$15, _state$configuration$18;
17750
+ var _state$configuration$, _state$configuration$2, _state$configuration$3, _state$configuration$4, _state$configuration$5, _state$configuration$6, _state$globalFilter, _state$globalFilter2, _state$globalFilter3, _state$globalFilter4, _state$configuration$7, _state$configuration$8, _state$globalFilter$s, _state$configuration$9, _state$configuration$10, _state$configuration$13;
17734
17751
  var state = _ref.state;
17735
17752
  var root = useStore();
17736
17753
  var _useState = useState(0),
@@ -17875,34 +17892,25 @@ var TableWrapper = function TableWrapper(_ref) {
17875
17892
  // Convert to Dayjs
17876
17893
  (_state$globalFilter3 = state.globalFilter) !== null && _state$globalFilter3 !== void 0 && (_state$globalFilter3 = _state$globalFilter3.timeStamp) !== null && _state$globalFilter3 !== void 0 && (_state$globalFilter3 = _state$globalFilter3['toTimeStamp']) !== null && _state$globalFilter3 !== void 0 && _state$globalFilter3[0] ? dayjs((_state$globalFilter4 = state.globalFilter) === null || _state$globalFilter4 === void 0 || (_state$globalFilter4 = _state$globalFilter4.timeStamp) === null || _state$globalFilter4 === void 0 || (_state$globalFilter4 = _state$globalFilter4['toTimeStamp']) === null || _state$globalFilter4 === void 0 ? void 0 : _state$globalFilter4[0]) : dayjs(new Date()) // Convert to Dayjs
17877
17894
  ]
17878
- }), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(Select, _objectSpread$l(_objectSpread$l({
17879
- minWidth: "200px"
17880
- }, (_state$configuration$8 = state.configuration.filter) === null || _state$configuration$8 === void 0 ? void 0 : _state$configuration$8.select), {}, {
17881
- value: (_state$globalFilter$s = state.globalFilter.select) === null || _state$globalFilter$s === void 0 ? void 0 : _state$globalFilter$s[state.configuration.filter.select.filterField],
17882
- onChange: function onChange(option, applyDefaultValue, defaultValue) {
17883
- if (defaultValue != (Array.isArray(option) ? option[0] : option) || applyDefaultValue === true) {
17884
- var _value;
17885
- state.onGlobalFilterSelect((_value = option.value) !== null && _value !== void 0 ? _value : option);
17886
- } else {
17887
- state.onGlobalFilterSelect('');
17888
- }
17895
+ }), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(Select, _objectSpread$l(_objectSpread$l({}, (_state$configuration$8 = state.configuration.filter) === null || _state$configuration$8 === void 0 ? void 0 : _state$configuration$8.select.settings), {}, {
17896
+ style: {
17897
+ minWidth: '200px'
17889
17898
  },
17890
- search: (_state$configuration$9 = (_state$configuration$10 = state.configuration.filter) === null || _state$configuration$10 === void 0 ? void 0 : _state$configuration$10.select.search) !== null && _state$configuration$9 !== void 0 ? _state$configuration$9 : false,
17891
- mode: "single",
17892
- options: (_state$configuration$11 = state.configuration.filter) === null || _state$configuration$11 === void 0 ? void 0 : _state$configuration$11.select.options,
17893
- initialValue: (_state$configuration$12 = state.configuration.filter) === null || _state$configuration$12 === void 0 ? void 0 : _state$configuration$12.select.defaultValue,
17894
- applyDefaultValue: (_state$configuration$13 = state.configuration.filter) === null || _state$configuration$13 === void 0 ? void 0 : _state$configuration$13.select.applyDefaultValue
17899
+ value: (_state$globalFilter$s = state.globalFilter.select) === null || _state$globalFilter$s === void 0 || (_state$globalFilter$s = _state$globalFilter$s[state.configuration.filter.select.filterField]) === null || _state$globalFilter$s === void 0 ? void 0 : _state$globalFilter$s[0],
17900
+ onChange: function onChange(selected) {
17901
+ state.onGlobalFilterSelect(selected);
17902
+ }
17895
17903
  })), /*#__PURE__*/jsx(SelectionText, {
17896
17904
  selected: state.selected
17897
17905
  }), state.canDelete && /*#__PURE__*/jsx(DeleteButton, {
17898
17906
  selected: state.selected,
17899
17907
  total: state.pagination.total,
17900
- min: (_state$configuration$14 = state.configuration.rules) === null || _state$configuration$14 === void 0 ? void 0 : _state$configuration$14.min,
17908
+ min: (_state$configuration$9 = state.configuration.rules) === null || _state$configuration$9 === void 0 ? void 0 : _state$configuration$9.min,
17901
17909
  deleting: state.deleting,
17902
17910
  onDelete: state.onDelete
17903
17911
  }), state.configuration.copyAction !== undefined && /*#__PURE__*/jsx(CopyButton, {
17904
17912
  state: state
17905
- }), (_state$configuration$15 = state.configuration.bulkActions) === null || _state$configuration$15 === void 0 ? void 0 : _state$configuration$15.map(function (action) {
17913
+ }), (_state$configuration$10 = state.configuration.bulkActions) === null || _state$configuration$10 === void 0 ? void 0 : _state$configuration$10.map(function (action) {
17906
17914
  return /*#__PURE__*/jsx(BulkAction, {
17907
17915
  action: action,
17908
17916
  state: state
@@ -17910,9 +17918,9 @@ var TableWrapper = function TableWrapper(_ref) {
17910
17918
  }), state.configuration.createAction && checkPermission(state.configuration.createAction.permission) && /*#__PURE__*/jsx(ActionButton, {
17911
17919
  action: state.configuration.createAction,
17912
17920
  callback: function callback(data) {
17913
- var _state$onUpdate, _state$configuration$16, _state$configuration$17;
17921
+ var _state$onUpdate, _state$configuration$11, _state$configuration$12;
17914
17922
  (_state$onUpdate = state.onUpdate) === null || _state$onUpdate === void 0 || _state$onUpdate.call(state, data);
17915
- (_state$configuration$16 = state.configuration.createAction) === null || _state$configuration$16 === void 0 || (_state$configuration$17 = _state$configuration$16.callback) === null || _state$configuration$17 === void 0 || _state$configuration$17.call(_state$configuration$16, data);
17923
+ (_state$configuration$11 = state.configuration.createAction) === null || _state$configuration$11 === void 0 || (_state$configuration$12 = _state$configuration$11.callback) === null || _state$configuration$12 === void 0 || _state$configuration$12.call(_state$configuration$11, data);
17916
17924
  },
17917
17925
  type: "Button",
17918
17926
  id: 'create',
@@ -17959,13 +17967,13 @@ var TableWrapper = function TableWrapper(_ref) {
17959
17967
  }), /*#__PURE__*/jsx(Table$1, {
17960
17968
  scroll: {
17961
17969
  x: '100%',
17962
- y: (_state$configuration$18 = state.configuration.height) !== null && _state$configuration$18 !== void 0 ? _state$configuration$18 : '60vh'
17970
+ y: (_state$configuration$13 = state.configuration.height) !== null && _state$configuration$13 !== void 0 ? _state$configuration$13 : '60vh'
17963
17971
  },
17964
17972
  rowClassName: editableRow,
17965
17973
  components: cellRenderer,
17966
17974
  rowKey: function rowKey(dataRow) {
17967
- var _state$configuration$19, _state$configuration$20;
17968
- return goTroughObject(dataRow, (_state$configuration$19 = (_state$configuration$20 = state.configuration.rowKey) === null || _state$configuration$20 === void 0 ? void 0 : _state$configuration$20.split('.')) !== null && _state$configuration$19 !== void 0 ? _state$configuration$19 : ['_id'], 0);
17975
+ var _state$configuration$14, _state$configuration$15;
17976
+ return goTroughObject(dataRow, (_state$configuration$14 = (_state$configuration$15 = state.configuration.rowKey) === null || _state$configuration$15 === void 0 ? void 0 : _state$configuration$15.split('.')) !== null && _state$configuration$14 !== void 0 ? _state$configuration$14 : ['_id'], 0);
17969
17977
  },
17970
17978
  dataSource: data,
17971
17979
  loading: state.loading,
@@ -18039,13 +18047,13 @@ function CopyButton(_ref3) {
18039
18047
  }, root);
18040
18048
  var onCopy = /*#__PURE__*/function () {
18041
18049
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
18042
- var _state$configuration$21;
18050
+ var _state$configuration$16;
18043
18051
  var copyAction, _iterator3, _step3, selectedRow;
18044
18052
  return _regeneratorRuntime.wrap(function _callee$(_context) {
18045
18053
  while (1) switch (_context.prev = _context.next) {
18046
18054
  case 0:
18047
18055
  copyAction = state.configuration.copyAction;
18048
- if (((_state$configuration$21 = state.configuration.copyAction) === null || _state$configuration$21 === void 0 ? void 0 : _state$configuration$21.apiInterface) != undefined) {
18056
+ if (((_state$configuration$16 = state.configuration.copyAction) === null || _state$configuration$16 === void 0 ? void 0 : _state$configuration$16.apiInterface) != undefined) {
18049
18057
  _iterator3 = _createForOfIteratorHelper$8(state.selected);
18050
18058
  try {
18051
18059
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -18080,13 +18088,13 @@ function CopyButton(_ref3) {
18080
18088
  }();
18081
18089
  var onCopyAction = /*#__PURE__*/function () {
18082
18090
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
18083
- var _state$configuration$22, _state$configuration$23;
18091
+ var _state$configuration$17, _state$configuration$18;
18084
18092
  var copyAction, id, filter, data;
18085
18093
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
18086
18094
  while (1) switch (_context3.prev = _context3.next) {
18087
18095
  case 0:
18088
18096
  copyAction = state.configuration.copyAction;
18089
- if (!(copyAction.id == undefined || copyAction.actionType != 'Detail' || ((_state$configuration$22 = state.configuration.createAction) === null || _state$configuration$22 === void 0 ? void 0 : _state$configuration$22.actionType) != 'Detail')) {
18097
+ if (!(copyAction.id == undefined || copyAction.actionType != 'Detail' || ((_state$configuration$17 = state.configuration.createAction) === null || _state$configuration$17 === void 0 ? void 0 : _state$configuration$17.actionType) != 'Detail')) {
18090
18098
  _context3.next = 3;
18091
18099
  break;
18092
18100
  }
@@ -18116,7 +18124,7 @@ function CopyButton(_ref3) {
18116
18124
  configurationId: copyAction === null || copyAction === void 0 ? void 0 : copyAction.id,
18117
18125
  data: data.data[0],
18118
18126
  type: copyAction === null || copyAction === void 0 ? void 0 : copyAction.type,
18119
- mapping: (_state$configuration$23 = state.configuration.createAction) === null || _state$configuration$23 === void 0 ? void 0 : _state$configuration$23.mapping,
18127
+ mapping: (_state$configuration$18 = state.configuration.createAction) === null || _state$configuration$18 === void 0 ? void 0 : _state$configuration$18.mapping,
18120
18128
  mappingData: data.data[0],
18121
18129
  callback: function () {
18122
18130
  var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(e) {
@@ -18534,7 +18542,7 @@ var advancedProps = function advancedProps(title) {
18534
18542
  },
18535
18543
  children: /*#__PURE__*/jsxs(Space, {
18536
18544
  direction: "vertical",
18537
- children: [/*#__PURE__*/jsxs(Select$1, {
18545
+ children: [/*#__PURE__*/jsxs(Select$2, {
18538
18546
  defaultValue: "contains",
18539
18547
  style: {
18540
18548
  width: 188,
@@ -18543,28 +18551,28 @@ var advancedProps = function advancedProps(title) {
18543
18551
  onSelect: function onSelect(value) {
18544
18552
  setSelectedKeys([selectedKeys[0], value]);
18545
18553
  },
18546
- children: [/*#__PURE__*/jsx(Select$1.Option, {
18554
+ children: [/*#__PURE__*/jsx(Select$2.Option, {
18547
18555
  value: "eq",
18548
18556
  children: "Ist equivalent zu"
18549
- }), /*#__PURE__*/jsx(Select$1.Option, {
18557
+ }), /*#__PURE__*/jsx(Select$2.Option, {
18550
18558
  value: "ne",
18551
18559
  children: "Ist nicht equivalent zu"
18552
- }), /*#__PURE__*/jsx(Select$1.Option, {
18560
+ }), /*#__PURE__*/jsx(Select$2.Option, {
18553
18561
  value: "contains",
18554
18562
  children: "Enth\xE4lt"
18555
- }), /*#__PURE__*/jsx(Select$1.Option, {
18563
+ }), /*#__PURE__*/jsx(Select$2.Option, {
18556
18564
  value: "doesnotcontain",
18557
18565
  children: "Enth\xE4lt nicht"
18558
- }), /*#__PURE__*/jsx(Select$1.Option, {
18566
+ }), /*#__PURE__*/jsx(Select$2.Option, {
18559
18567
  value: "startswith",
18560
18568
  children: "Beginnt mit"
18561
- }), /*#__PURE__*/jsx(Select$1.Option, {
18569
+ }), /*#__PURE__*/jsx(Select$2.Option, {
18562
18570
  value: "endswith",
18563
18571
  children: "Endet mit"
18564
- }), /*#__PURE__*/jsx(Select$1.Option, {
18572
+ }), /*#__PURE__*/jsx(Select$2.Option, {
18565
18573
  value: "isnull",
18566
18574
  children: "Ist Null"
18567
- }), /*#__PURE__*/jsx(Select$1.Option, {
18575
+ }), /*#__PURE__*/jsx(Select$2.Option, {
18568
18576
  value: "isnotnull",
18569
18577
  children: "Ist nicht Null"
18570
18578
  })]
@@ -18711,7 +18719,7 @@ var selectProps = function selectProps(title, filter) {
18711
18719
  },
18712
18720
  children: /*#__PURE__*/jsxs(Space, {
18713
18721
  direction: "vertical",
18714
- children: [/*#__PURE__*/jsx(Select$1, {
18722
+ children: [/*#__PURE__*/jsx(Select$2, {
18715
18723
  placeholder: "Filter ".concat(title),
18716
18724
  value: selectedKeys[0],
18717
18725
  style: {
@@ -19372,7 +19380,7 @@ function ownKeys$g(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
19372
19380
  function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19373
19381
  var LOG$3 = getLogger('Backoffice', 'TableData');
19374
19382
  function useTableData (_ref) {
19375
- var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$filter4, _configuration$bulkAc, _configuration$apiInt;
19383
+ var _configuration$filter, _configuration$filter2, _configuration$filter3, _configuration$bulkAc, _configuration$apiInt;
19376
19384
  var id = _ref.id,
19377
19385
  i18n = _ref.i18n,
19378
19386
  parentData = _ref.parentData,
@@ -19412,7 +19420,7 @@ function useTableData (_ref) {
19412
19420
  return defaultFilter[f] = [configuration.filter["default"].globalValue ? root.getGlobalValue(configuration.filter["default"].globalValue) : true, 'eq'];
19413
19421
  });
19414
19422
  var _useState9 = useState({
19415
- select: (_configuration$filter3 = configuration.filter) !== null && _configuration$filter3 !== void 0 && _configuration$filter3.select && ((_configuration$filter4 = configuration.filter) === null || _configuration$filter4 === void 0 ? void 0 : _configuration$filter4.select.applyDefaultValue) !== false ? _defineProperty({}, configuration.filter.select.filterField, [configuration.filter.select.defaultValue, 'eq']) : undefined,
19423
+ select: (_configuration$filter3 = configuration.filter) !== null && _configuration$filter3 !== void 0 && (_configuration$filter3 = _configuration$filter3.select) !== null && _configuration$filter3 !== void 0 && _configuration$filter3.defaultValue ? _defineProperty({}, configuration.filter.select.filterField, [configuration.filter.select.defaultValue, 'eq']) : undefined,
19416
19424
  toggle: toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.defaultChecked && !(toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.inverted) || !(toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.defaultChecked) && toggleConfig !== null && toggleConfig !== void 0 && toggleConfig.inverted ? toggleFilter : undefined,
19417
19425
  "default": defaultFilter ? defaultFilter : undefined
19418
19426
  }),
@@ -19498,8 +19506,8 @@ function useTableData (_ref) {
19498
19506
  for (var i = 0; i < dataArray.length; i++) {
19499
19507
  var dataRow = dataArray[i];
19500
19508
  if (filterServerSide) {
19501
- var _configuration$filter5;
19502
- if ((_configuration$filter5 = configuration.filter) !== null && _configuration$filter5 !== void 0 && (_configuration$filter5 = _configuration$filter5.select) !== null && _configuration$filter5 !== void 0 && _configuration$filter5.filterField) {
19509
+ var _configuration$filter4;
19510
+ if ((_configuration$filter4 = configuration.filter) !== null && _configuration$filter4 !== void 0 && (_configuration$filter4 = _configuration$filter4.select) !== null && _configuration$filter4 !== void 0 && _configuration$filter4.filterField) {
19503
19511
  onGlobalFilterSelect(dataRow[configuration.filter.select.filterField]);
19504
19512
  } else {
19505
19513
  var _pagination;
@@ -19515,15 +19523,15 @@ function useTableData (_ref) {
19515
19523
  });
19516
19524
  }
19517
19525
  } else {
19518
- var _configuration$filter6, _configuration$filter7;
19526
+ var _configuration$filter5, _configuration$filter6;
19519
19527
  var _updateData2 = updateData({
19520
19528
  data: newInitData,
19521
19529
  dataRow: dataRow
19522
19530
  }),
19523
19531
  nextInitData = _updateData2.data;
19524
19532
  var _aplyFilterAndSortati = aplyFilterAndSortation(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, filterData), {}, {
19525
- filters: _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter6 = configuration.filter) !== null && _configuration$filter6 !== void 0 && (_configuration$filter6 = _configuration$filter6.toggle) !== null && _configuration$filter6 !== void 0 && _configuration$filter6.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
19526
- }, configuration !== null && configuration !== void 0 && (_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && (_configuration$filter7 = _configuration$filter7.toggle) !== null && _configuration$filter7 !== void 0 && _configuration$filter7.inQuery ? {
19533
+ filters: _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter5 = configuration.filter) !== null && _configuration$filter5 !== void 0 && (_configuration$filter5 = _configuration$filter5.toggle) !== null && _configuration$filter5 !== void 0 && _configuration$filter5.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"])
19534
+ }, configuration !== null && configuration !== void 0 && (_configuration$filter6 = configuration.filter) !== null && _configuration$filter6 !== void 0 && (_configuration$filter6 = _configuration$filter6.toggle) !== null && _configuration$filter6 !== void 0 && _configuration$filter6.inQuery ? {
19527
19535
  genericProps: globalFilter.toggle
19528
19536
  } : undefined), {}, {
19529
19537
  data: nextInitData,
@@ -19610,7 +19618,7 @@ function useTableData (_ref) {
19610
19618
  }, [configuration.title, parentData]);
19611
19619
  var onChange = /*#__PURE__*/function () {
19612
19620
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(p) {
19613
- var _configuration$filter8;
19621
+ var _configuration$filter7, _configuration$filter8, _configuration$filter9, _prefilter$select, _configuration$filter10, _configuration$filter11;
19614
19622
  var prefilter,
19615
19623
  refresh,
19616
19624
  currentData,
@@ -19618,7 +19626,7 @@ function useTableData (_ref) {
19618
19626
  currentFilterHash,
19619
19627
  currentPagination,
19620
19628
  currentUrl,
19621
- _configuration$filter9,
19629
+ _configuration$filter12,
19622
19630
  ssf,
19623
19631
  data,
19624
19632
  _data3,
@@ -19635,7 +19643,7 @@ function useTableData (_ref) {
19635
19643
  loading: true
19636
19644
  }));
19637
19645
  currentData = initData;
19638
- filterData = _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, p.filters), prefilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter8 = configuration.filter) !== null && _configuration$filter8 !== void 0 && (_configuration$filter8 = _configuration$filter8.toggle) !== null && _configuration$filter8 !== void 0 && _configuration$filter8.inQuery) ? prefilter.toggle : undefined), prefilter.select), prefilter.timeStamp), prefilter["default"]); //remove all null values
19646
+ filterData = _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, p.filters), prefilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter7 = configuration.filter) !== null && _configuration$filter7 !== void 0 && (_configuration$filter7 = _configuration$filter7.toggle) !== null && _configuration$filter7 !== void 0 && _configuration$filter7.inQuery) ? prefilter.toggle : undefined), ((_configuration$filter8 = configuration.filter) === null || _configuration$filter8 === void 0 || (_configuration$filter8 = _configuration$filter8.select) === null || _configuration$filter8 === void 0 ? void 0 : _configuration$filter8.applyDefaultValue) !== false || ((_configuration$filter9 = configuration.filter) === null || _configuration$filter9 === void 0 || (_configuration$filter9 = _configuration$filter9.select) === null || _configuration$filter9 === void 0 ? void 0 : _configuration$filter9.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter10 = (_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.filterField) !== null && _configuration$filter10 !== void 0 ? _configuration$filter10 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
19639
19647
  filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref5) {
19640
19648
  var _ref6 = _slicedToArray(_ref5, 2);
19641
19649
  _ref6[0];
@@ -19656,7 +19664,7 @@ function useTableData (_ref) {
19656
19664
  columns: configuration.columns,
19657
19665
  filters: filterData,
19658
19666
  sorter: p.sorter
19659
- }, configuration !== null && configuration !== void 0 && (_configuration$filter9 = configuration.filter) !== null && _configuration$filter9 !== void 0 && (_configuration$filter9 = _configuration$filter9.toggle) !== null && _configuration$filter9 !== void 0 && _configuration$filter9.inQuery ? {
19667
+ }, configuration !== null && configuration !== void 0 && (_configuration$filter12 = configuration.filter) !== null && _configuration$filter12 !== void 0 && (_configuration$filter12 = _configuration$filter12.toggle) !== null && _configuration$filter12 !== void 0 && _configuration$filter12.inQuery ? {
19660
19668
  genericProps: prefilter.toggle
19661
19669
  } : undefined);
19662
19670
  _context2.next = 13;
@@ -19722,7 +19730,7 @@ function useTableData (_ref) {
19722
19730
  var onDelete = /*#__PURE__*/function () {
19723
19731
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
19724
19732
  var _configuration$apiInt2;
19725
- var newData, newInitData, deleted, userPermissions, _loop, mappingData, deleteResult, _ret, index, total, pages, current, _configuration$filter10, _configuration$filter11, data;
19733
+ var newData, newInitData, deleted, userPermissions, _loop, mappingData, deleteResult, _ret, index, total, pages, current, _configuration$filter13, _configuration$filter14, data;
19726
19734
  return _regeneratorRuntime.wrap(function _callee3$(_context4) {
19727
19735
  while (1) switch (_context4.prev = _context4.next) {
19728
19736
  case 0:
@@ -19737,7 +19745,7 @@ function useTableData (_ref) {
19737
19745
  case 6:
19738
19746
  userPermissions = _context4.sent;
19739
19747
  _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop(index) {
19740
- var _configuration$rowKey, _configuration$filter12, _configuration$filter13;
19748
+ var _configuration$rowKey, _configuration$filter15, _configuration$filter16;
19741
19749
  var id, _newData$filter, _newData$filter2, mapToggle, _iterator, _step, _globalFilter$toggle, field, _globalFilter$toggle2, _configuration$delete, _configuration$onErro, _configuration$onErro2, deletedIndex, initDeletedIndex;
19742
19750
  return _regeneratorRuntime.wrap(function _loop$(_context3) {
19743
19751
  while (1) switch (_context3.prev = _context3.next) {
@@ -19753,7 +19761,7 @@ function useTableData (_ref) {
19753
19761
  })) === null || _newData$filter2 === void 0 ? void 0 : _newData$filter2[0];
19754
19762
  }
19755
19763
  mapToggle = {};
19756
- _iterator = _createForOfIteratorHelper$7((_configuration$filter12 = (_configuration$filter13 = configuration.filter) === null || _configuration$filter13 === void 0 || (_configuration$filter13 = _configuration$filter13.toggle) === null || _configuration$filter13 === void 0 ? void 0 : _configuration$filter13.fields) !== null && _configuration$filter12 !== void 0 ? _configuration$filter12 : []);
19764
+ _iterator = _createForOfIteratorHelper$7((_configuration$filter15 = (_configuration$filter16 = configuration.filter) === null || _configuration$filter16 === void 0 || (_configuration$filter16 = _configuration$filter16.toggle) === null || _configuration$filter16 === void 0 ? void 0 : _configuration$filter16.fields) !== null && _configuration$filter15 !== void 0 ? _configuration$filter15 : []);
19757
19765
  try {
19758
19766
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
19759
19767
  field = _step.value;
@@ -19862,9 +19870,9 @@ function useTableData (_ref) {
19862
19870
  current: current
19863
19871
  }),
19864
19872
  columns: configuration.columns,
19865
- filters: _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter10 = configuration.filter) !== null && _configuration$filter10 !== void 0 && (_configuration$filter10 = _configuration$filter10.toggle) !== null && _configuration$filter10 !== void 0 && _configuration$filter10.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
19873
+ filters: _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter13 = configuration.filter) !== null && _configuration$filter13 !== void 0 && (_configuration$filter13 = _configuration$filter13.toggle) !== null && _configuration$filter13 !== void 0 && _configuration$filter13.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
19866
19874
  sorter: filterData.sorter
19867
- }, configuration !== null && configuration !== void 0 && (_configuration$filter11 = configuration.filter) !== null && _configuration$filter11 !== void 0 && (_configuration$filter11 = _configuration$filter11.toggle) !== null && _configuration$filter11 !== void 0 && _configuration$filter11.inQuery ? {
19875
+ }, configuration !== null && configuration !== void 0 && (_configuration$filter14 = configuration.filter) !== null && _configuration$filter14 !== void 0 && (_configuration$filter14 = _configuration$filter14.toggle) !== null && _configuration$filter14 !== void 0 && _configuration$filter14.inQuery ? {
19868
19876
  genericProps: globalFilter.toggle
19869
19877
  } : undefined));
19870
19878
  case 25:
@@ -19893,13 +19901,13 @@ function useTableData (_ref) {
19893
19901
  };
19894
19902
  }();
19895
19903
  var onGlobalFilterSelect = function onGlobalFilterSelect(value) {
19896
- var _configuration$filter14;
19897
- if (!((_configuration$filter14 = configuration.filter) !== null && _configuration$filter14 !== void 0 && _configuration$filter14.select)) {
19904
+ var _configuration$filter17;
19905
+ if (!((_configuration$filter17 = configuration.filter) !== null && _configuration$filter17 !== void 0 && _configuration$filter17.select)) {
19898
19906
  LOG$3.error('No global select filter defiend');
19899
19907
  return;
19900
19908
  }
19901
19909
  var newGlobalFilter = _objectSpread$g({}, globalFilter);
19902
- if (value != '') {
19910
+ if (value !== null && value !== void 0 && value.length) {
19903
19911
  newGlobalFilter.select = _defineProperty({}, configuration.filter.select.filterField, Array.isArray(value) ? value : [value]);
19904
19912
  } else {
19905
19913
  newGlobalFilter.select = {};
@@ -19910,8 +19918,8 @@ function useTableData (_ref) {
19910
19918
  }, filterData), newGlobalFilter);
19911
19919
  };
19912
19920
  var onGlobalFilterToggle = function onGlobalFilterToggle() {
19913
- var _configuration$filter15;
19914
- if (!((_configuration$filter15 = configuration.filter) !== null && _configuration$filter15 !== void 0 && _configuration$filter15.toggle)) {
19921
+ var _configuration$filter18;
19922
+ if (!((_configuration$filter18 = configuration.filter) !== null && _configuration$filter18 !== void 0 && _configuration$filter18.toggle)) {
19915
19923
  LOG$3.error('No global toggle filter defiend');
19916
19924
  return;
19917
19925
  }
@@ -19928,8 +19936,8 @@ function useTableData (_ref) {
19928
19936
  }, filterData), newGlobalFilter);
19929
19937
  };
19930
19938
  var onGlobalFilterSearch = function onGlobalFilterSearch(value) {
19931
- var _configuration$filter16;
19932
- if (!((_configuration$filter16 = configuration.filter) !== null && _configuration$filter16 !== void 0 && _configuration$filter16.search)) {
19939
+ var _configuration$filter19;
19940
+ if (!((_configuration$filter19 = configuration.filter) !== null && _configuration$filter19 !== void 0 && _configuration$filter19.search)) {
19933
19941
  LOG$3.error('No global search filter defiend');
19934
19942
  return;
19935
19943
  }
@@ -19937,8 +19945,8 @@ function useTableData (_ref) {
19937
19945
  search: {}
19938
19946
  });
19939
19947
  if (value) {
19940
- var _configuration$filter17;
19941
- (_configuration$filter17 = configuration.filter) === null || _configuration$filter17 === void 0 || _configuration$filter17.search.fields.forEach(function (f) {
19948
+ var _configuration$filter20;
19949
+ (_configuration$filter20 = configuration.filter) === null || _configuration$filter20 === void 0 || _configuration$filter20.search.fields.forEach(function (f) {
19942
19950
  if (typeof f == 'string') {
19943
19951
  newGlobalFilter.search[f] = [value, 'contains', 0];
19944
19952
  } else {
@@ -19952,8 +19960,8 @@ function useTableData (_ref) {
19952
19960
  }, filterData), newGlobalFilter);
19953
19961
  };
19954
19962
  var onGlobalFilterPeriod = function onGlobalFilterPeriod(from, to) {
19955
- var _configuration$filter18;
19956
- if (!((_configuration$filter18 = configuration.filter) !== null && _configuration$filter18 !== void 0 && _configuration$filter18.period)) {
19963
+ var _configuration$filter21;
19964
+ if (!((_configuration$filter21 = configuration.filter) !== null && _configuration$filter21 !== void 0 && _configuration$filter21.period)) {
19957
19965
  LOG$3.error('No global period filter defiend');
19958
19966
  return;
19959
19967
  }
@@ -20787,7 +20795,7 @@ var FilterBox = /*#__PURE__*/memo(function (_ref) {
20787
20795
  return /*#__PURE__*/jsxs("div", {
20788
20796
  children: [/*#__PURE__*/jsx(Typography.Text, {
20789
20797
  children: filter.title
20790
- }), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select, {
20798
+ }), /*#__PURE__*/jsx("br", {}), /*#__PURE__*/jsx(Select$1, {
20791
20799
  mode: "single",
20792
20800
  apiInterface: filter.requestOptions,
20793
20801
  wholeData: _objectSpread$a(_objectSpread$a({}, state.filter), {}, {
@@ -21228,7 +21236,7 @@ function getColorClass(data) {
21228
21236
  }
21229
21237
  }
21230
21238
  var OrgItem = function OrgItem(_ref) {
21231
- var _data$description, _itemChain, _itemChain2, _data$children;
21239
+ var _data$description, _itemChain, _itemChain2, _data$children, _itemChain3, _configuration$additi;
21232
21240
  var data = _ref.data,
21233
21241
  itemChain = _ref.itemChain,
21234
21242
  configuration = _ref.configuration,
@@ -21259,7 +21267,7 @@ var OrgItem = function OrgItem(_ref) {
21259
21267
  }), /*#__PURE__*/jsx("div", {
21260
21268
  className: description$1,
21261
21269
  children: (_data$description = data.description) !== null && _data$description !== void 0 ? _data$description : ''
21262
- }), configuration.createAction && data.writePermission && !data.isNav && ((_itemChain = itemChain[itemChain.length - 1]) === null || _itemChain === void 0 ? void 0 : _itemChain.id) == data.id && /*#__PURE__*/jsx(ActionButton, {
21270
+ }), configuration.createAction && data.writePermission && ((_itemChain = itemChain[itemChain.length - 1]) === null || _itemChain === void 0 ? void 0 : _itemChain.id) == data.id && /*#__PURE__*/jsx(ActionButton, {
21263
21271
  action: configuration.createAction,
21264
21272
  type: "Button",
21265
21273
  buttonType: "primary",
@@ -21275,7 +21283,7 @@ var OrgItem = function OrgItem(_ref) {
21275
21283
  setUpdate(update + 1);
21276
21284
  (_configuration$create = configuration.createAction) === null || _configuration$create === void 0 || (_configuration$create2 = _configuration$create.callback) === null || _configuration$create2 === void 0 || _configuration$create2.call(_configuration$create, data);
21277
21285
  }
21278
- }, "create"), configuration.deleteAction && data.deletePermission && !data.isNav && ((_itemChain2 = itemChain[itemChain.length - 1]) === null || _itemChain2 === void 0 ? void 0 : _itemChain2.id) == data.id && !((_data$children = data.children) !== null && _data$children !== void 0 && _data$children.length) && /*#__PURE__*/jsx(ActionButton, {
21286
+ }, "create"), configuration.deleteAction && data.deletePermission && ((_itemChain2 = itemChain[itemChain.length - 1]) === null || _itemChain2 === void 0 ? void 0 : _itemChain2.id) == data.id && !((_data$children = data.children) !== null && _data$children !== void 0 && _data$children.length) && /*#__PURE__*/jsx(ActionButton, {
21279
21287
  action: configuration.deleteAction,
21280
21288
  type: "Button",
21281
21289
  buttonType: "primary",
@@ -21293,7 +21301,23 @@ var OrgItem = function OrgItem(_ref) {
21293
21301
  setUpdate(update + 1);
21294
21302
  });
21295
21303
  }
21296
- }, "delete")]
21304
+ }, "delete"), ((_itemChain3 = itemChain[itemChain.length - 1]) === null || _itemChain3 === void 0 ? void 0 : _itemChain3.id) == data.id && root.dataStore.organizationId !== data.id && ((_configuration$additi = configuration.additionalActions) === null || _configuration$additi === void 0 ? void 0 : _configuration$additi.map(function (action, i) {
21305
+ var _action$id;
21306
+ return /*#__PURE__*/jsx(ActionButton, {
21307
+ action: action,
21308
+ type: "Button",
21309
+ buttonType: "default",
21310
+ id: (_action$id = action.id) !== null && _action$id !== void 0 ? _action$id : i.toString(),
21311
+ mappingData: data,
21312
+ defaultLabel: "",
21313
+ data: data,
21314
+ callback: function callback() {
21315
+ var _action$callback;
21316
+ setUpdate(update + 1);
21317
+ action === null || action === void 0 || (_action$callback = action.callback) === null || _action$callback === void 0 || _action$callback.call(action, data);
21318
+ }
21319
+ }, action.id);
21320
+ }))]
21297
21321
  }, data.id);
21298
21322
  };
21299
21323
  var OrgItem$1 = observer(OrgItem);
@@ -21426,7 +21450,7 @@ var openClass = "open-class--gGXs";
21426
21450
  var breadcrumb = "breadcrumb-Z0VvH";
21427
21451
  var selected = "selected-w-sfW";
21428
21452
  var disabled = "disabled-0nado";
21429
- var css_248z$6 = ".trigger-wrapper-OkPRc {\n width: 100%;\n padding: 12px 0px;\n display: flex;\n gap: 32px;\n}\n\n.arrow-Rd0hp {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%228%22 height%3D%2213%22 viewBox%3D%220 0 8 13%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cpath d%3D%22M0.947266 1.14893L6.94727 6.29178L0.947266 11.9489%22 stroke%3D%22%236F6F6F%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E %3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n transform: rotateZ(0deg);\n transition: all 0.35s ease;\n width: 20.8px;\n height: 22.4px;\n}\n\n.open-class--gGXs {\n transform: rotateZ(90deg);\n}\n\n.breadcrumb-Z0VvH {\n transition: color 0.3s;\n}\n.breadcrumb-Z0VvH:hover:not(.selected-w-sfW) {\n cursor: pointer;\n color: #000;\n}\n\n.selected-w-sfW {\n color: #000;\n font-weight: 400;\n}\n\n.selected-w-sfW {\n color: #000;\n font-weight: 400;\n}\n\n.disabled-0nado {\n pointer-events: none;\n color: lightgray;\n}\n\n.darkmode .selected-w-sfW {\n color: #fff;\n font-weight: 400;\n}\n";
21453
+ var css_248z$6 = ".trigger-wrapper-OkPRc {\n width: 100%;\n padding: 12px 0px;\n display: flex;\n gap: 32px;\n}\n\n.arrow-Rd0hp {\n background-image: url(\"data:image/svg+xml,%3Csvg width%3D%228%22 height%3D%2213%22 viewBox%3D%220 0 8 13%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cpath d%3D%22M0.947266 1.14893L6.94727 6.29178L0.947266 11.9489%22 stroke%3D%22%236F6F6F%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%2F%3E %3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n transform: rotateZ(0deg);\n transition: all 0.35s ease;\n width: 20.8px;\n height: 22.4px;\n cursor: pointer;\n}\n\n.open-class--gGXs {\n transform: rotateZ(90deg);\n}\n\n.breadcrumb-Z0VvH {\n transition: color 0.3s;\n}\n.breadcrumb-Z0VvH:hover:not(.selected-w-sfW) {\n cursor: pointer;\n color: #000;\n}\n\n.selected-w-sfW {\n color: #000;\n font-weight: 400;\n}\n\n.selected-w-sfW {\n color: #000;\n font-weight: 400;\n}\n\n.disabled-0nado {\n pointer-events: none;\n color: lightgray;\n}\n\n.darkmode .selected-w-sfW {\n color: #fff;\n font-weight: 400;\n}\n";
21430
21454
  styleInject(css_248z$6);
21431
21455
 
21432
21456
  var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
@@ -21512,33 +21536,103 @@ var Legend = function Legend(props) {
21512
21536
  };
21513
21537
 
21514
21538
  var buttonsWrapper = "buttons-wrapper-Bubkr";
21515
- var css_248z$4 = ".buttons-wrapper-Bubkr {\n display: flex;\n gap: 6px;\n}\n\n.buttons-wrapper-Bubkr button {\n min-width: 24px;\n}\n";
21539
+ var mask = "mask-ssagp";
21540
+ var transformWrapper = "transform-wrapper--8t0v";
21541
+ var css_248z$4 = ".buttons-wrapper-Bubkr {\n display: flex;\n gap: 6px;\n}\n\n.buttons-wrapper-Bubkr button {\n min-width: 24px;\n}\n\n.mask-ssagp {\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 1;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.45);\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n -webkit-backdrop-filter: blur(3px);\n backdrop-filter: blur(3px);\n}\n.mask-ssagp p {\n font-size: 18px;\n font-weight: bold;\n background: rgba(255, 255, 255, 0.4);\n padding: 10px;\n border-radius: 5px;\n}\n\n.transform-wrapper--8t0v .ant-modal-mask,\n.transform-wrapper--8t0v .ant-modal-wrap {\n position: absolute;\n}\n";
21516
21542
  styleInject(css_248z$4);
21517
21543
 
21518
21544
  var ZoomWrapper = function ZoomWrapper(_ref) {
21519
21545
  var _children = _ref.children,
21520
- zoomToId = _ref.zoomToId;
21546
+ zoomToId = _ref.zoomToId,
21547
+ onInitialized = _ref.onInitialized;
21521
21548
  var transformComponentRef = useRef(null);
21522
21549
  var _useState = useState(true),
21523
21550
  _useState2 = _slicedToArray(_useState, 2),
21524
21551
  isInit = _useState2[0],
21525
21552
  setIsInit = _useState2[1];
21553
+ var _useState3 = useState(false),
21554
+ _useState4 = _slicedToArray(_useState3, 2),
21555
+ isGrapping = _useState4[0],
21556
+ setIsGrapping = _useState4[1];
21557
+ var _useState5 = useState(false),
21558
+ _useState6 = _slicedToArray(_useState5, 2),
21559
+ isZooming = _useState6[0],
21560
+ setIsZooming = _useState6[1];
21561
+ var _useState7 = useState(false),
21562
+ _useState8 = _slicedToArray(_useState7, 2),
21563
+ showModal = _useState8[0],
21564
+ setShowModal = _useState8[1];
21565
+ var _useState9 = useState(false),
21566
+ _useState10 = _slicedToArray(_useState9, 2),
21567
+ focused = _useState10[0],
21568
+ setFocused = _useState10[1];
21569
+ var _useTranslation = useTranslation$1(),
21570
+ t = _useTranslation.t;
21571
+ var zoomToImage = useCallback(function (id) {
21572
+ if (transformComponentRef.current) {
21573
+ var zoomToElement = transformComponentRef.current.zoomToElement;
21574
+ zoomToElement(id, 1, 700, 'easeOut');
21575
+ }
21576
+ }, []);
21526
21577
  useEffect(function () {
21527
21578
  if (!zoomToId) return;
21528
21579
  if (isInit) {
21529
21580
  setIsInit(false);
21530
21581
  setTimeout(function () {
21531
21582
  zoomToImage(zoomToId);
21583
+ onInitialized();
21532
21584
  }, 300);
21533
21585
  }
21534
21586
  zoomToImage(zoomToId);
21535
21587
  }, [zoomToId]);
21536
- var zoomToImage = function zoomToImage(id) {
21537
- if (transformComponentRef.current) {
21538
- var zoomToElement = transformComponentRef.current.zoomToElement;
21539
- zoomToElement(id, 1, 700, 'easeOut');
21588
+ var onKeyDown = useCallback(function (e) {
21589
+ if (e.key === 'Shift') {
21590
+ setIsZooming(true);
21540
21591
  }
21541
- };
21592
+ }, []);
21593
+ var onKeyUp = useCallback(function (e) {
21594
+ if (e.key === 'Shift') {
21595
+ setIsZooming(false);
21596
+ }
21597
+ }, []);
21598
+ var wheelEventTimout;
21599
+ var onScrolling = useCallback(function () {
21600
+ if (!isZooming) {
21601
+ clearTimeout(wheelEventTimout);
21602
+ setShowModal(true);
21603
+ wheelEventTimout = setTimeout(function () {
21604
+ setShowModal(false);
21605
+ }, 2000);
21606
+ }
21607
+ }, [isZooming]);
21608
+ var onMouseEnter = useCallback(function () {
21609
+ setFocused(true);
21610
+ }, [onScrolling]);
21611
+ var onMouseLeave = useCallback(function () {
21612
+ setFocused(false);
21613
+ }, [onScrolling]);
21614
+ var onMouseDown = useCallback(function () {
21615
+ setIsGrapping(true);
21616
+ }, []);
21617
+ var onMouseUp = useCallback(function () {
21618
+ setIsGrapping(false);
21619
+ }, []);
21620
+ useEffect(function () {
21621
+ if (focused) {
21622
+ window.addEventListener('keydown', onKeyDown);
21623
+ window.addEventListener('keyup', onKeyUp);
21624
+ window.addEventListener('wheel', onScrolling);
21625
+ } else {
21626
+ window.removeEventListener('keydown', onKeyDown);
21627
+ window.removeEventListener('keyup', onKeyUp);
21628
+ window.removeEventListener('wheel', onScrolling);
21629
+ }
21630
+ return function () {
21631
+ window.removeEventListener('keydown', onKeyDown);
21632
+ window.removeEventListener('keyup', onKeyUp);
21633
+ window.removeEventListener('wheel', onScrolling);
21634
+ };
21635
+ }, [onScrolling, focused]);
21542
21636
  return /*#__PURE__*/jsx(TransformWrapper, {
21543
21637
  ref: transformComponentRef,
21544
21638
  pinch: {
@@ -21548,7 +21642,8 @@ var ZoomWrapper = function ZoomWrapper(_ref) {
21548
21642
  minScale: 0.2,
21549
21643
  wheel: {
21550
21644
  smoothStep: 0.001,
21551
- step: 0.2
21645
+ step: 0.2,
21646
+ activationKeys: ['Shift']
21552
21647
  },
21553
21648
  children: function children(_ref2) {
21554
21649
  var zoomIn = _ref2.zoomIn,
@@ -21584,11 +21679,26 @@ var ZoomWrapper = function ZoomWrapper(_ref) {
21584
21679
  }),
21585
21680
  size: 'small'
21586
21681
  })]
21682
+ }), showModal && /*#__PURE__*/jsx("div", {
21683
+ className: mask,
21684
+ children: /*#__PURE__*/jsx("p", {
21685
+ children: t('backoffice.orgtree.zoomwrapper.zoominfo')
21686
+ })
21587
21687
  }), /*#__PURE__*/jsx(TransformComponent, {
21588
21688
  wrapperStyle: {
21589
- width: '100%'
21689
+ width: '100%',
21690
+ cursor: isZooming ? 'nesw-resize' : isGrapping ? 'grabbing' : 'grab'
21590
21691
  },
21591
- children: _children
21692
+ wrapperProps: {
21693
+ onMouseEnter: onMouseEnter,
21694
+ onMouseLeave: onMouseLeave,
21695
+ onMouseDown: onMouseDown,
21696
+ onMouseUp: onMouseUp
21697
+ },
21698
+ wrapperClass: transformWrapper,
21699
+ children: /*#__PURE__*/jsx(Fragment, {
21700
+ children: _children
21701
+ })
21592
21702
  })]
21593
21703
  });
21594
21704
  }
@@ -21604,7 +21714,7 @@ var SearchSelect = function SearchSelect(_ref) {
21604
21714
  var _root$dataStore;
21605
21715
  root === null || root === void 0 || (_root$dataStore = root.dataStore) === null || _root$dataStore === void 0 || _root$dataStore.setSelectedOrganizationId(value);
21606
21716
  };
21607
- return /*#__PURE__*/jsx(Select$1, {
21717
+ return /*#__PURE__*/jsx(Select$2, {
21608
21718
  showSearch: true,
21609
21719
  placeholder: t('filter.global'),
21610
21720
  allowClear: true,
@@ -21646,12 +21756,13 @@ var OrgTreeComponent = function OrgTreeComponent(_ref) {
21646
21756
  breadcrumbs: itemChain,
21647
21757
  open: open
21648
21758
  }),
21649
- onOpen: function onOpen() {
21759
+ onTriggerOpening: function onTriggerOpening() {
21650
21760
  return setOpen(true);
21651
21761
  },
21652
- onClose: function onClose() {
21762
+ onTriggerClosing: function onTriggerClosing() {
21653
21763
  return setOpen(false);
21654
21764
  },
21765
+ open: open,
21655
21766
  children: [/*#__PURE__*/jsxs("div", {
21656
21767
  className: toolbarLeft,
21657
21768
  children: [/*#__PURE__*/jsx(SearchSelect, {
@@ -21669,6 +21780,9 @@ var OrgTreeComponent = function OrgTreeComponent(_ref) {
21669
21780
  })]
21670
21781
  }), /*#__PURE__*/jsx(ZoomWrapper, {
21671
21782
  zoomToId: zoomToId,
21783
+ onInitialized: function onInitialized() {
21784
+ return setOpen(true);
21785
+ },
21672
21786
  children: /*#__PURE__*/jsx(OrgTree, {
21673
21787
  data: data,
21674
21788
  horizontal: !!configuration.horizontal,
@@ -24120,7 +24234,7 @@ var DropDown = function DropDown(_ref) {
24120
24234
  }, item.item._id);
24121
24235
  };
24122
24236
 
24123
- var Option = Select$1.Option;
24237
+ var Option = Select$2.Option;
24124
24238
  var RelationSelector = function RelationSelector(_ref, ref) {
24125
24239
  var _relationState$config, _relationState$config2, _relationState$config3, _searchPlaceholder;
24126
24240
  var id = _ref.id,
@@ -24146,7 +24260,7 @@ var RelationSelector = function RelationSelector(_ref, ref) {
24146
24260
  relationState.searchItems('');
24147
24261
  }, []);
24148
24262
  return /*#__PURE__*/jsxs(Fragment, {
24149
- children: [relationState.configuration.search != undefined && (((_relationState$config = relationState.configuration.filter) === null || _relationState$config === void 0 ? void 0 : _relationState$config.type) === 'default' ? /*#__PURE__*/jsxs(Select$1, {
24263
+ children: [relationState.configuration.search != undefined && (((_relationState$config = relationState.configuration.filter) === null || _relationState$config === void 0 ? void 0 : _relationState$config.type) === 'default' ? /*#__PURE__*/jsxs(Select$2, {
24150
24264
  className: select,
24151
24265
  showSearch: true,
24152
24266
  suffixIcon: /*#__PURE__*/jsx(PlusSquareOutlined, {}),