datastake-daf 0.6.749 → 0.6.751

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 (34) hide show
  1. package/build/favicon.ico +0 -0
  2. package/build/logo192.png +0 -0
  3. package/build/logo512.png +0 -0
  4. package/build/manifest.json +25 -0
  5. package/build/robots.txt +3 -0
  6. package/dist/components/index.js +93 -92
  7. package/dist/layouts/index.js +7 -10
  8. package/dist/pages/index.js +286 -211
  9. package/dist/utils/index.js +24 -0
  10. package/package.json +1 -1
  11. package/src/@daf/core/components/Sidenav/Menu.jsx +9 -8
  12. package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/GenderDistribution/index.js +2 -2
  13. package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/Identification/hook.js +1 -1
  14. package/src/@daf/pages/Dashboards/SupplyChain/components/SupplyChainMap/index.js +6 -1
  15. package/src/@daf/pages/Dashboards/UserDashboard/components/MineSites/helper.js +3 -3
  16. package/src/@daf/pages/Locations/MineSite/index.jsx +1 -1
  17. package/src/@daf/pages/Summary/Minesite/components/MineDetailsSection/index.js +51 -0
  18. package/src/@daf/pages/Summary/Minesite/components/MineSiteDetails/config.js +31 -37
  19. package/src/@daf/pages/Summary/Minesite/components/MineSiteDetails/index.js +4 -16
  20. package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/config.js +6 -6
  21. package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/helper.js +13 -16
  22. package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/index.js +3 -3
  23. package/src/@daf/pages/Summary/Minesite/index.jsx +15 -19
  24. package/src/@daf/pages/Summary/Operator/components/Governance/config.js +4 -4
  25. package/src/@daf/pages/Summary/Operator/components/Governance/helper.js +8 -11
  26. package/src/@daf/pages/Summary/Operator/components/Governance/index.js +9 -3
  27. package/src/@daf/pages/Summary/Operator/index.jsx +6 -4
  28. package/src/@daf/pages/Summary/components/InformationAvailability/components/Contributions/index.js +16 -5
  29. package/src/@daf/pages/Summary/components/InformationAvailability/components/InformationCompleteness/index.js +2 -3
  30. package/src/@daf/pages/Summary/components/InformationAvailability/index.js +7 -4
  31. package/src/@daf/pages/Summary/hook.js +3 -3
  32. package/src/constants/locales/en/translation.js +8 -0
  33. package/src/constants/locales/fr/translation.js +8 -0
  34. package/src/constants/locales/sp/translation.js +8 -0
Binary file
Binary file
Binary file
@@ -0,0 +1,25 @@
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
@@ -9667,30 +9667,28 @@ const handleSectionChildren = _ref => {
9667
9667
  });
9668
9668
  };
9669
9669
 
9670
- const handleArrayChildren = _ref => {
9671
- let {
9672
- value,
9673
- config,
9674
- label,
9675
- level,
9676
- t,
9677
- rootForm,
9678
- allData,
9679
- user,
9680
- getApiBaseUrl = () => {},
9681
- getAppHeader = () => {},
9682
- app,
9683
- TreeNodeComponent
9684
- } = _ref;
9670
+ const handleArrayChildren = ({
9671
+ value,
9672
+ config,
9673
+ label,
9674
+ level,
9675
+ t,
9676
+ rootForm,
9677
+ allData,
9678
+ user,
9679
+ getApiBaseUrl = () => {},
9680
+ getAppHeader = () => {},
9681
+ app,
9682
+ TreeNodeComponent
9683
+ }) => {
9685
9684
  if (!Array.isArray(value)) {
9686
9685
  return null;
9687
9686
  }
9688
9687
  return value.map((item, itemIndex) => /*#__PURE__*/jsxRuntime.jsx("div", {
9689
9688
  className: "array-item",
9690
9689
  children: Object.keys(config.inputs).sort((a, b) => {
9691
- var _config$inputs$a, _config$inputs$b;
9692
- const positionA = ((_config$inputs$a = config.inputs[a]) === null || _config$inputs$a === void 0 ? void 0 : _config$inputs$a.position) || 0;
9693
- const positionB = ((_config$inputs$b = config.inputs[b]) === null || _config$inputs$b === void 0 ? void 0 : _config$inputs$b.position) || 0;
9690
+ const positionA = config.inputs[a]?.position || 0;
9691
+ const positionB = config.inputs[b]?.position || 0;
9694
9692
  return positionA - positionB;
9695
9693
  }).map(subInputKey => {
9696
9694
  const subInputConfig = config.inputs[subInputKey];
@@ -9708,9 +9706,9 @@ const handleArrayChildren = _ref => {
9708
9706
  getApiBaseUrl: getApiBaseUrl,
9709
9707
  getAppHeader: getAppHeader,
9710
9708
  app: app
9711
- }, "".concat(itemIndex, "-").concat(subInputKey));
9709
+ }, `${itemIndex}-${subInputKey}`);
9712
9710
  })
9713
- }, "".concat(itemIndex)));
9711
+ }, `${itemIndex}`));
9714
9712
  };
9715
9713
 
9716
9714
  const noDafApps = ['tif', 'cukura']; //PACKAGE_CHANGE_LATER (remove sbg)
@@ -10070,37 +10068,42 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
10070
10068
  }
10071
10069
  };
10072
10070
 
10073
- const handleDataLinkWithTableKeys = ({
10074
- inputConfig,
10075
- inputKey,
10076
- value,
10077
- level,
10078
- t,
10079
- rootForm,
10080
- allData,
10081
- user,
10082
- getApiBaseUrl = () => {},
10083
- getAppHeader = () => {},
10084
- app,
10085
- TreeNodeComponent
10086
- }) => {
10087
- if (inputConfig?.type !== 'dataLink' || !inputConfig?.meta?.tableKeys) {
10071
+ const handleDataLinkWithTableKeys = _ref => {
10072
+ var _inputConfig$meta, _inputConfig$meta3, _inputConfig$meta4, _inputConfig$meta5;
10073
+ let {
10074
+ inputConfig,
10075
+ inputKey,
10076
+ value,
10077
+ level,
10078
+ t,
10079
+ rootForm,
10080
+ allData,
10081
+ user,
10082
+ getApiBaseUrl = () => {},
10083
+ getAppHeader = () => {},
10084
+ app,
10085
+ TreeNodeComponent
10086
+ } = _ref;
10087
+ if ((inputConfig === null || inputConfig === void 0 ? void 0 : inputConfig.type) !== 'dataLink' || !(inputConfig !== null && inputConfig !== void 0 && (_inputConfig$meta = inputConfig.meta) !== null && _inputConfig$meta !== void 0 && _inputConfig$meta.tableKeys)) {
10088
10088
  return null;
10089
10089
  }
10090
10090
  const tableKeys = inputConfig.meta.tableKeys;
10091
- const isAjaxModal = React.useMemo(() => !!inputConfig?.meta?.namespace, [inputConfig]);
10091
+ const isAjaxModal = React.useMemo(() => {
10092
+ var _inputConfig$meta2;
10093
+ return !!(inputConfig !== null && inputConfig !== void 0 && (_inputConfig$meta2 = inputConfig.meta) !== null && _inputConfig$meta2 !== void 0 && _inputConfig$meta2.namespace);
10094
+ }, [inputConfig]);
10092
10095
  const ajaxModalValues = useAjaxModal$2({
10093
10096
  name: inputKey,
10094
10097
  user,
10095
- namespace: inputConfig?.meta?.namespace,
10096
- skipFetch: inputConfig?.meta?.skipFetch,
10098
+ namespace: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta3 = inputConfig.meta) === null || _inputConfig$meta3 === void 0 ? void 0 : _inputConfig$meta3.namespace,
10099
+ skipFetch: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta4 = inputConfig.meta) === null || _inputConfig$meta4 === void 0 ? void 0 : _inputConfig$meta4.skipFetch,
10097
10100
  isAjaxModal,
10098
- formScope: inputConfig?.meta?.formScope,
10101
+ formScope: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta5 = inputConfig.meta) === null || _inputConfig$meta5 === void 0 ? void 0 : _inputConfig$meta5.formScope,
10099
10102
  APP: app,
10100
10103
  apiBaseUrl: getApiBaseUrl(),
10101
10104
  _getAppHeader: getAppHeader
10102
10105
  });
10103
- const dataLinkForm = ajaxModalValues?.form;
10106
+ const dataLinkForm = ajaxModalValues === null || ajaxModalValues === void 0 ? void 0 : ajaxModalValues.form;
10104
10107
  const createInputsAndValues = item => {
10105
10108
  const inputs = {};
10106
10109
  const values = {};
@@ -10113,19 +10116,20 @@ const handleDataLinkWithTableKeys = ({
10113
10116
  };
10114
10117
  const isUploadFieldEmpty = (fieldKey, itemToCheck) => {
10115
10118
  if (uploadTypeFields.includes(fieldKey)) {
10116
- const itemValue = itemToCheck?.[fieldKey];
10119
+ const itemValue = itemToCheck === null || itemToCheck === void 0 ? void 0 : itemToCheck[fieldKey];
10117
10120
  return itemValue === undefined || itemValue === null || Array.isArray(itemValue) && itemValue.length === 0;
10118
10121
  }
10119
10122
  return false;
10120
10123
  };
10121
10124
  const processedTableKeys = processConditionalTableKeys(tableKeys, item);
10122
10125
  processedTableKeys.filter(tableKey => tableKey !== 'datastakeId').filter(tableKey => !isUploadFieldEmpty(tableKey, item)).forEach(tableKey => {
10123
- const formInputConfig = dataLinkForm?.[tableKey] || dataLinkForm?.['identification']?.[tableKey];
10126
+ var _dataLinkForm$identif;
10127
+ const formInputConfig = (dataLinkForm === null || dataLinkForm === void 0 ? void 0 : dataLinkForm[tableKey]) || (dataLinkForm === null || dataLinkForm === void 0 || (_dataLinkForm$identif = dataLinkForm['identification']) === null || _dataLinkForm$identif === void 0 ? void 0 : _dataLinkForm$identif[tableKey]);
10124
10128
  if (formInputConfig) {
10125
- inputs[tableKey] = {
10126
- ...formInputConfig,
10129
+ var _item$linking, _formInputConfig$meta, _formInputConfig$tabl;
10130
+ inputs[tableKey] = _objectSpread2(_objectSpread2({}, formInputConfig), {}, {
10127
10131
  label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : formInputConfig.label || formInputConfig.tableLabel || tableKey
10128
- };
10132
+ });
10129
10133
  if (formInputConfig.label && typeof formInputConfig.label === 'object') {
10130
10134
  const dynamicLabelKeys = Object.keys(formInputConfig.label);
10131
10135
  let resolvedLabel = null;
@@ -10133,7 +10137,7 @@ const handleDataLinkWithTableKeys = ({
10133
10137
  const parts = labelKey.split(' is ');
10134
10138
  if (parts.length === 2) {
10135
10139
  const [conditionKey, conditionValue] = parts;
10136
- if (item?.[conditionKey] === conditionValue) {
10140
+ if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
10137
10141
  resolvedLabel = formInputConfig.label[labelKey];
10138
10142
  break;
10139
10143
  }
@@ -10141,16 +10145,17 @@ const handleDataLinkWithTableKeys = ({
10141
10145
  }
10142
10146
  inputs[tableKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey);
10143
10147
  }
10144
- values[tableKey] = item?.linking?.SCL?.[item?.[tableKey]]?.name || item[formInputConfig?.meta?.onNewSetValueKey] || item?.[formInputConfig?.tableLabel?.toLowerCase()] || item?.[tableKey];
10148
+ values[tableKey] = (item === null || item === void 0 || (_item$linking = item.linking) === null || _item$linking === void 0 || (_item$linking = _item$linking.SCL) === null || _item$linking === void 0 || (_item$linking = _item$linking[item === null || item === void 0 ? void 0 : item[tableKey]]) === null || _item$linking === void 0 ? void 0 : _item$linking.name) || item[formInputConfig === null || formInputConfig === void 0 || (_formInputConfig$meta = formInputConfig.meta) === null || _formInputConfig$meta === void 0 ? void 0 : _formInputConfig$meta.onNewSetValueKey] || (item === null || item === void 0 ? void 0 : item[formInputConfig === null || formInputConfig === void 0 || (_formInputConfig$tabl = formInputConfig.tableLabel) === null || _formInputConfig$tabl === void 0 ? void 0 : _formInputConfig$tabl.toLowerCase()]) || (item === null || item === void 0 ? void 0 : item[tableKey]);
10145
10149
  } else {
10150
+ var _item$linking2;
10146
10151
  inputs[tableKey] = {
10147
10152
  label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey,
10148
- type: inputConfig?.type
10153
+ type: inputConfig === null || inputConfig === void 0 ? void 0 : inputConfig.type
10149
10154
  };
10150
- values[tableKey] = item?.linking?.SCL?.[item?.[tableKey]]?.name || item?.[tableKey];
10155
+ values[tableKey] = (item === null || item === void 0 || (_item$linking2 = item.linking) === null || _item$linking2 === void 0 || (_item$linking2 = _item$linking2.SCL) === null || _item$linking2 === void 0 || (_item$linking2 = _item$linking2[item === null || item === void 0 ? void 0 : item[tableKey]]) === null || _item$linking2 === void 0 ? void 0 : _item$linking2.name) || (item === null || item === void 0 ? void 0 : item[tableKey]);
10151
10156
  }
10152
10157
  });
10153
- if (dataLinkForm?.identification && typeof dataLinkForm.identification === 'object') {
10158
+ if (dataLinkForm !== null && dataLinkForm !== void 0 && dataLinkForm.identification && typeof dataLinkForm.identification === 'object') {
10154
10159
  Object.keys(dataLinkForm.identification).filter(fieldKey => {
10155
10160
  if (uploadTypeFields.includes(fieldKey)) {
10156
10161
  return !isUploadFieldEmpty(fieldKey, item);
@@ -10160,11 +10165,11 @@ const handleDataLinkWithTableKeys = ({
10160
10165
  const formInputConfig = dataLinkForm.identification[fieldKey];
10161
10166
  return formInputConfig && typeof formInputConfig === 'object' && !Array.isArray(formInputConfig);
10162
10167
  }).forEach(fieldKey => {
10168
+ var _item$linking3, _formInputConfig$tabl2;
10163
10169
  const formInputConfig = dataLinkForm.identification[fieldKey];
10164
- inputs[fieldKey] = {
10165
- ...formInputConfig,
10170
+ inputs[fieldKey] = _objectSpread2(_objectSpread2({}, formInputConfig), {}, {
10166
10171
  label: uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : formInputConfig.label || formInputConfig.tableLabel || fieldKey
10167
- };
10172
+ });
10168
10173
  if (formInputConfig.label && typeof formInputConfig.label === 'object') {
10169
10174
  const dynamicLabelKeys = Object.keys(formInputConfig.label);
10170
10175
  let resolvedLabel = null;
@@ -10172,7 +10177,7 @@ const handleDataLinkWithTableKeys = ({
10172
10177
  const parts = labelKey.split(' is ');
10173
10178
  if (parts.length === 2) {
10174
10179
  const [conditionKey, conditionValue] = parts;
10175
- if (item?.[conditionKey] === conditionValue) {
10180
+ if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
10176
10181
  resolvedLabel = formInputConfig.label[labelKey];
10177
10182
  break;
10178
10183
  }
@@ -10180,7 +10185,7 @@ const handleDataLinkWithTableKeys = ({
10180
10185
  }
10181
10186
  inputs[fieldKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : fieldKey);
10182
10187
  }
10183
- values[fieldKey] = item?.linking?.SCL?.[item?.[fieldKey]]?.name || item?.[formInputConfig?.tableLabel?.toLowerCase()] || item?.[fieldKey];
10188
+ values[fieldKey] = (item === null || item === void 0 || (_item$linking3 = item.linking) === null || _item$linking3 === void 0 || (_item$linking3 = _item$linking3.SCL) === null || _item$linking3 === void 0 || (_item$linking3 = _item$linking3[item === null || item === void 0 ? void 0 : item[fieldKey]]) === null || _item$linking3 === void 0 ? void 0 : _item$linking3.name) || (item === null || item === void 0 ? void 0 : item[formInputConfig === null || formInputConfig === void 0 || (_formInputConfig$tabl2 = formInputConfig.tableLabel) === null || _formInputConfig$tabl2 === void 0 ? void 0 : _formInputConfig$tabl2.toLowerCase()]) || (item === null || item === void 0 ? void 0 : item[fieldKey]);
10184
10189
  });
10185
10190
  }
10186
10191
  return {
@@ -10190,7 +10195,7 @@ const handleDataLinkWithTableKeys = ({
10190
10195
  };
10191
10196
  if (Array.isArray(value)) {
10192
10197
  return value.map((item, itemIndex) => {
10193
- const datastakeIdValue = item?.datastakeId;
10198
+ const datastakeIdValue = item === null || item === void 0 ? void 0 : item.datastakeId;
10194
10199
  const {
10195
10200
  inputs,
10196
10201
  values
@@ -10199,9 +10204,9 @@ const handleDataLinkWithTableKeys = ({
10199
10204
  return null;
10200
10205
  }
10201
10206
  return /*#__PURE__*/jsxRuntime.jsx(TreeNodeComponent, {
10202
- nodeKey: datastakeIdValue || t(`No ID ${itemIndex + 1}`),
10207
+ nodeKey: datastakeIdValue || t("No ID ".concat(itemIndex + 1)),
10203
10208
  config: {
10204
- label: datastakeIdValue || t(`No ID ${itemIndex + 1}`),
10209
+ label: datastakeIdValue || t("No ID ".concat(itemIndex + 1)),
10205
10210
  type: 'custom-datalink',
10206
10211
  inputs: inputs
10207
10212
  },
@@ -10215,10 +10220,10 @@ const handleDataLinkWithTableKeys = ({
10215
10220
  getApiBaseUrl: getApiBaseUrl,
10216
10221
  getAppHeader: getAppHeader,
10217
10222
  app: app
10218
- }, `${inputKey}-${itemIndex}`);
10223
+ }, "".concat(inputKey, "-").concat(itemIndex));
10219
10224
  });
10220
10225
  } else {
10221
- const datastakeIdValue = value?.datastakeId;
10226
+ const datastakeIdValue = value === null || value === void 0 ? void 0 : value.datastakeId;
10222
10227
  const {
10223
10228
  inputs,
10224
10229
  values
@@ -10243,25 +10248,24 @@ const handleDataLinkWithTableKeys = ({
10243
10248
  getApiBaseUrl: getApiBaseUrl,
10244
10249
  getAppHeader: getAppHeader,
10245
10250
  app: app
10246
- }, `${inputKey}-single`);
10251
+ }, "".concat(inputKey, "-single"));
10247
10252
  }
10248
10253
  };
10249
10254
 
10250
- const handleGroupChildren = _ref => {
10251
- let {
10252
- config,
10253
- value,
10254
- allData,
10255
- level,
10256
- t,
10257
- rootForm,
10258
- user,
10259
- getApiBaseUrl = () => {},
10260
- getAppHeader = () => {},
10261
- app,
10262
- TreeNodeComponent
10263
- } = _ref;
10264
- if (!(config !== null && config !== void 0 && config.inputs)) {
10255
+ const handleGroupChildren = ({
10256
+ config,
10257
+ value,
10258
+ allData,
10259
+ level,
10260
+ t,
10261
+ rootForm,
10262
+ user,
10263
+ getApiBaseUrl = () => {},
10264
+ getAppHeader = () => {},
10265
+ app,
10266
+ TreeNodeComponent
10267
+ }) => {
10268
+ if (!config?.inputs) {
10265
10269
  return null;
10266
10270
  }
10267
10271
  const inputKeys = Object.keys(config.inputs);
@@ -10274,7 +10278,7 @@ const handleGroupChildren = _ref => {
10274
10278
  if (value && typeof value === 'object' && value[inputKey]) {
10275
10279
  inputValue = value[inputKey];
10276
10280
  } else {
10277
- inputValue = allData === null || allData === void 0 ? void 0 : allData[inputKey];
10281
+ inputValue = allData?.[inputKey];
10278
10282
  }
10279
10283
  return /*#__PURE__*/jsxRuntime.jsx(TreeNodeComponent, {
10280
10284
  nodeKey: inputKey,
@@ -10424,11 +10428,12 @@ const AjaxSubGroup$2 = ({
10424
10428
  };
10425
10429
 
10426
10430
  const handleAjaxSubGroupChildren = props => {
10427
- var _props$config;
10428
- if (((_props$config = props.config) === null || _props$config === void 0 ? void 0 : _props$config.type) !== 'ajaxSubGroup' || !Array.isArray(props.value)) {
10431
+ if (props.config?.type !== 'ajaxSubGroup' || !Array.isArray(props.value)) {
10429
10432
  return null;
10430
10433
  }
10431
- return [/*#__PURE__*/jsxRuntime.jsx(AjaxSubGroup$2, _objectSpread2({}, props), "ajax-subgroup")];
10434
+ return [/*#__PURE__*/jsxRuntime.jsx(AjaxSubGroup$2, {
10435
+ ...props
10436
+ }, "ajax-subgroup")];
10432
10437
  };
10433
10438
 
10434
10439
  const TreeNode = _ref => {
@@ -44920,7 +44925,6 @@ const modules = [{
44920
44925
  description: "Submit any query to gain crowdsourced wisdom from hard-to-reach territories."
44921
44926
  }];
44922
44927
 
44923
- /* eslint-disable no-unused-vars */
44924
44928
  const featureIsNotAvailable = (t, isDemo) => {
44925
44929
  antd.Modal.error({
44926
44930
  title: t("Feature not available"),
@@ -45060,12 +45064,7 @@ function SidenavMenu(_ref) {
45060
45064
  }
45061
45065
  });
45062
45066
  },
45063
- label: t(subitem.name),
45064
- icon: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
45065
- width: 15,
45066
- height: 15,
45067
- name: subitem.icon
45068
- })
45067
+ label: t(subitem.name)
45069
45068
  }))].filter(v => !!v)
45070
45069
  });
45071
45070
  React.useEffect(() => {
@@ -45268,7 +45267,7 @@ function SidenavMenu(_ref) {
45268
45267
  className: "title",
45269
45268
  label: t(item.name),
45270
45269
  key: "".concat(item.name, "-link")
45271
- } : null, ...item.items.filter(item => item.visible ? item.visible(user, project) : false).map((subitem, j) => subitem.items ? renderSubMenu(subitem, "".concat(subitem.name)) : {
45270
+ } : null, ...item.items.filter(item => item.visible ? item.visible(user, project) : false).map((subitem, j) => subitem.items ? renderSubMenu(subitem, "".concat(subitem.name)) : _objectSpread2(_objectSpread2({
45272
45271
  label: /*#__PURE__*/jsxRuntime.jsx(antd.Typography.Text, {
45273
45272
  ellipsis: {
45274
45273
  tooltip: t(subitem.name)
@@ -45281,12 +45280,14 @@ function SidenavMenu(_ref) {
45281
45280
  className: formatClassname([typeof selectedKeys[0] === "string" ? !!(selectedKeys[0].includes(subitem.path) || (subitem.subPath || []).find(p => matchPath(p, selectedKeys[0]))) && "selected-label" : ""]),
45282
45281
  children: t(subitem.name)
45283
45282
  }),
45284
- style: subitem.style ? subitem.style : {},
45283
+ style: subitem.style ? subitem.style : {}
45284
+ }, (subitem === null || subitem === void 0 ? void 0 : subitem.icon) && {
45285
45285
  icon: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
45286
45286
  width: 15,
45287
45287
  height: 15,
45288
- name: subitem === null || subitem === void 0 ? void 0 : subitem.icon
45289
- }),
45288
+ name: subitem.icon
45289
+ })
45290
+ }), {}, {
45290
45291
  key: "".concat(subitem.path, "-link-").concat(j),
45291
45292
  disabled: item.isDisabled || subitem.isDisabled,
45292
45293
  className: formatClassname([typeof selectedKeys[0] === "string" ? !!(selectedKeys[0].includes(subitem.path) || (subitem.subPath || []).find(p => matchPath(p, selectedKeys[0]))) && "selected-it" : ""]),
@@ -45305,7 +45306,7 @@ function SidenavMenu(_ref) {
45305
45306
  }
45306
45307
  });
45307
45308
  }
45308
- })].filter(v => !!v)
45309
+ }))].filter(v => !!v)
45309
45310
  })
45310
45311
  });
45311
45312
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
@@ -4676,12 +4676,7 @@ function SidenavMenu({
4676
4676
  }
4677
4677
  });
4678
4678
  },
4679
- label: t(subitem.name),
4680
- icon: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
4681
- width: 15,
4682
- height: 15,
4683
- name: subitem.icon
4684
- })
4679
+ label: t(subitem.name)
4685
4680
  }))].filter(v => !!v)
4686
4681
  });
4687
4682
  React.useEffect(() => {
@@ -4897,10 +4892,12 @@ function SidenavMenu({
4897
4892
  children: t(subitem.name)
4898
4893
  }),
4899
4894
  style: subitem.style ? subitem.style : {},
4900
- icon: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
4901
- width: 15,
4902
- height: 15,
4903
- name: subitem?.icon
4895
+ ...(subitem?.icon && {
4896
+ icon: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
4897
+ width: 15,
4898
+ height: 15,
4899
+ name: subitem.icon
4900
+ })
4904
4901
  }),
4905
4902
  key: `${subitem.path}-link-${j}`,
4906
4903
  disabled: item.isDisabled || subitem.isDisabled,