datastake-daf 0.6.784 → 0.6.785

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 (21) hide show
  1. package/dist/components/index.js +99 -99
  2. package/dist/pages/index.js +846 -65
  3. package/dist/style/datastake/mapbox-gl.css +330 -0
  4. package/dist/utils/index.js +58 -0
  5. package/package.json +1 -1
  6. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/KeyInformation/index.jsx +48 -0
  7. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/PlantedSpecies.jsx +73 -0
  8. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/SeedlingsHeight.jsx +44 -0
  9. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/Stats.jsx +86 -0
  10. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/VegetationHealth.jsx +73 -0
  11. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MangroveGrowth/index.jsx +92 -0
  12. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/components/MonitoringScopeAndFindings/index.jsx +348 -0
  13. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/config.js +35 -0
  14. package/src/@daf/pages/Summary/Activities/MonitoringCampaign/index.jsx +30 -0
  15. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CommunityParticipation/CommunityStats/helper.js +1 -1
  16. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleIndicators/index.jsx +1 -1
  17. package/src/@daf/pages/Summary/Activities/PlantingCycle/components/CycleOutcomes/index.jsx +1 -1
  18. package/src/@daf/pages/Summary/Activities/PlantingCycle/helper.js +0 -56
  19. package/src/@daf/utils/numbers.js +57 -0
  20. package/src/pages.js +1 -0
  21. package/src/utils.js +1 -1
@@ -8498,20 +8498,22 @@ const useHeader = _ref => {
8498
8498
  const {
8499
8499
  useToken: useToken$m
8500
8500
  } = antd.theme;
8501
- function BreadCrumbs({
8502
- breadcrumbs = [],
8503
- mainContWidth = 0
8504
- }) {
8501
+ function BreadCrumbs(_ref) {
8502
+ let {
8503
+ breadcrumbs = [],
8504
+ mainContWidth = 0
8505
+ } = _ref;
8505
8506
  const [splitIndex, setSplitIndex] = React.useState(0);
8506
8507
  const {
8507
8508
  token
8508
8509
  } = useToken$m();
8509
- const _renderBreadcrumb = (b, i, isLast, noOnClickLast = false) => {
8510
+ const _renderBreadcrumb = function (b, i, isLast) {
8511
+ let noOnClickLast = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
8510
8512
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
8511
8513
  className: "flex breadcrumb-item",
8512
- onClick: noOnClickLast && isLast ? undefined : b?.onClick,
8514
+ onClick: noOnClickLast && isLast ? undefined : b === null || b === void 0 ? void 0 : b.onClick,
8513
8515
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
8514
- children: b?.label
8516
+ children: b === null || b === void 0 ? void 0 : b.label
8515
8517
  }), !isLast && /*#__PURE__*/jsxRuntime.jsx("div", {
8516
8518
  className: "flex flex-column justify-content-center",
8517
8519
  children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
@@ -8521,7 +8523,7 @@ function BreadCrumbs({
8521
8523
  color: token.baseGray50
8522
8524
  })
8523
8525
  })]
8524
- }, `breadcrumb-item-${i}`);
8526
+ }, "breadcrumb-item-".concat(i));
8525
8527
  };
8526
8528
  React.useEffect(() => {
8527
8529
  const _placeholderCont = document.getElementById("header-breadcrumbs");
@@ -8564,7 +8566,7 @@ function BreadCrumbs({
8564
8566
  placement: "bottomRight",
8565
8567
  menu: {
8566
8568
  items: groupedBreadCrumbs[2].map((it, i) => ({
8567
- key: `items-${i}`,
8569
+ key: "items-".concat(i),
8568
8570
  label: it.label,
8569
8571
  onClick: it.onClick
8570
8572
  }))
@@ -9556,24 +9558,29 @@ const processConditionalTableKeys = (tableKeys, item) => {
9556
9558
  });
9557
9559
  return processedKeys;
9558
9560
  };
9559
- const renderFieldData = (type, value, user, config, getApiBaseUrl = () => {}, getAppHeader = () => {}, app, allValues, formValues = {}) => {
9561
+ const renderFieldData = function (type, value, user, config) {
9562
+ let getApiBaseUrl = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : () => {};
9563
+ let getAppHeader = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : () => {};
9564
+ let app = arguments.length > 6 ? arguments[6] : undefined;
9565
+ let allValues = arguments.length > 7 ? arguments[7] : undefined;
9566
+ let formValues = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : {};
9560
9567
  switch (type) {
9561
9568
  case 'year':
9562
9569
  return value !== '-' ? renderDateFormatted(value, 'YYYY', 'en') : '-';
9563
9570
  case 'date':
9564
9571
  {
9565
- const language = user?.language && user?.language === 'sp' ? 'es' : user?.language;
9572
+ const language = user !== null && user !== void 0 && user.language && (user === null || user === void 0 ? void 0 : user.language) === 'sp' ? 'es' : user === null || user === void 0 ? void 0 : user.language;
9566
9573
  return value !== '-' ? renderDateFormatted(value, 'DD MMM YYYY', language || 'en') : '-';
9567
9574
  }
9568
9575
  case 'select':
9569
9576
  {
9570
- const options = config?.options || [];
9577
+ const options = (config === null || config === void 0 ? void 0 : config.options) || [];
9571
9578
  const option = findOptions(value, options);
9572
9579
  return option;
9573
9580
  }
9574
9581
  case 'multiselect':
9575
9582
  {
9576
- const options = config?.options || [];
9583
+ const options = (config === null || config === void 0 ? void 0 : config.options) || [];
9577
9584
  const _val = typeof value === 'string' ? value.split(',').map(v => v.trim()) : value;
9578
9585
  const option = findOptions(_val, options);
9579
9586
  return option.join(', ');
@@ -9588,7 +9595,7 @@ const renderFieldData = (type, value, user, config, getApiBaseUrl = () => {}, ge
9588
9595
  formValues: formValues
9589
9596
  });
9590
9597
  case 'percentage':
9591
- return value === '-' || value === null || value === undefined ? '-' : `${value} %`;
9598
+ return value === '-' || value === null || value === undefined ? '-' : "".concat(value, " %");
9592
9599
  case 'geolocation':
9593
9600
  {
9594
9601
  const val = JSON.parse(value) || {};
@@ -9602,7 +9609,7 @@ const renderFieldData = (type, value, user, config, getApiBaseUrl = () => {}, ge
9602
9609
  case 'upload':
9603
9610
  case 'videoUpload':
9604
9611
  {
9605
- const documentName = allValues?.map(item => item?.name).join(', ');
9612
+ const documentName = allValues === null || allValues === void 0 ? void 0 : allValues.map(item => item === null || item === void 0 ? void 0 : item.name).join(', ');
9606
9613
  return documentName;
9607
9614
  }
9608
9615
  default:
@@ -9781,30 +9788,28 @@ const handleSectionChildren = ({
9781
9788
  });
9782
9789
  };
9783
9790
 
9784
- const handleArrayChildren = _ref => {
9785
- let {
9786
- value,
9787
- config,
9788
- label,
9789
- level,
9790
- t,
9791
- rootForm,
9792
- allData,
9793
- user,
9794
- getApiBaseUrl = () => {},
9795
- getAppHeader = () => {},
9796
- app,
9797
- TreeNodeComponent
9798
- } = _ref;
9791
+ const handleArrayChildren = ({
9792
+ value,
9793
+ config,
9794
+ label,
9795
+ level,
9796
+ t,
9797
+ rootForm,
9798
+ allData,
9799
+ user,
9800
+ getApiBaseUrl = () => {},
9801
+ getAppHeader = () => {},
9802
+ app,
9803
+ TreeNodeComponent
9804
+ }) => {
9799
9805
  if (!Array.isArray(value)) {
9800
9806
  return null;
9801
9807
  }
9802
9808
  return value.map((item, itemIndex) => /*#__PURE__*/jsxRuntime.jsx("div", {
9803
9809
  className: "array-item",
9804
9810
  children: Object.keys(config.inputs).sort((a, b) => {
9805
- var _config$inputs$a, _config$inputs$b;
9806
- const positionA = ((_config$inputs$a = config.inputs[a]) === null || _config$inputs$a === void 0 ? void 0 : _config$inputs$a.position) || 0;
9807
- const positionB = ((_config$inputs$b = config.inputs[b]) === null || _config$inputs$b === void 0 ? void 0 : _config$inputs$b.position) || 0;
9811
+ const positionA = config.inputs[a]?.position || 0;
9812
+ const positionB = config.inputs[b]?.position || 0;
9808
9813
  return positionA - positionB;
9809
9814
  }).map(subInputKey => {
9810
9815
  const subInputConfig = config.inputs[subInputKey];
@@ -9822,9 +9827,9 @@ const handleArrayChildren = _ref => {
9822
9827
  getApiBaseUrl: getApiBaseUrl,
9823
9828
  getAppHeader: getAppHeader,
9824
9829
  app: app
9825
- }, "".concat(itemIndex, "-").concat(subInputKey));
9830
+ }, `${itemIndex}-${subInputKey}`);
9826
9831
  })
9827
- }, "".concat(itemIndex)));
9832
+ }, `${itemIndex}`));
9828
9833
  };
9829
9834
 
9830
9835
  const noDafApps = ['tif', 'cukura']; //PACKAGE_CHANGE_LATER (remove sbg)
@@ -9969,44 +9974,44 @@ function useAjaxModal$2({
9969
9974
  }
9970
9975
 
9971
9976
  const mergeObject = obj => {
9972
- return Object.entries(obj || {}).reduce((acc, _ref) => {
9973
- let [key, value] = _ref;
9977
+ return Object.entries(obj || {}).reduce((acc, [key, value]) => {
9974
9978
  if (typeof value === "object" && !Array.isArray(value) && value !== null) {
9975
- return _objectSpread2(_objectSpread2({}, acc), value);
9979
+ return {
9980
+ ...acc,
9981
+ ...value
9982
+ };
9976
9983
  }
9977
- return _objectSpread2(_objectSpread2({}, acc), {}, {
9984
+ return {
9985
+ ...acc,
9978
9986
  [key]: value
9979
- });
9987
+ };
9980
9988
  }, {});
9981
9989
  };
9982
- const handleDataLinkGroupWithTableKeys = _ref2 => {
9983
- var _inputConfig$meta, _config$meta2, _inputConfig$meta3, _inputConfig$meta4, _inputConfig$meta5;
9984
- let {
9985
- config,
9986
- inputConfig,
9987
- inputKey,
9988
- value,
9989
- level,
9990
- t,
9991
- rootForm,
9992
- allData,
9993
- user,
9994
- getApiBaseUrl = () => {},
9995
- getAppHeader = () => {},
9996
- app,
9997
- TreeNodeComponent
9998
- } = _ref2;
9990
+ const handleDataLinkGroupWithTableKeys = ({
9991
+ config,
9992
+ inputConfig,
9993
+ inputKey,
9994
+ value,
9995
+ level,
9996
+ t,
9997
+ rootForm,
9998
+ allData,
9999
+ user,
10000
+ getApiBaseUrl = () => {},
10001
+ getAppHeader = () => {},
10002
+ app,
10003
+ TreeNodeComponent
10004
+ }) => {
9999
10005
  if (!(config.type === 'dataLinkGroup' || config.type === 'dataLink')) {
10000
10006
  return null;
10001
10007
  }
10002
- 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)) {
10008
+ if (inputConfig?.type !== 'dataLink' || !inputConfig?.meta?.tableKeys) {
10003
10009
  const parentInputKeys = Object.keys(config.inputs || {});
10004
10010
  const isHandledBySiblingDataLink = parentInputKeys.some(otherInputKey => {
10005
10011
  const otherConfig = config.inputs[otherInputKey];
10006
- if ((otherConfig === null || otherConfig === void 0 ? void 0 : otherConfig.type) === 'dataLink') {
10007
- var _otherConfig$meta, _config$meta;
10008
- const siblingTableKeys = (otherConfig === null || otherConfig === void 0 || (_otherConfig$meta = otherConfig.meta) === null || _otherConfig$meta === void 0 ? void 0 : _otherConfig$meta.tableKeys) || [];
10009
- const additionalTableKeys = ((_config$meta = config.meta) === null || _config$meta === void 0 ? void 0 : _config$meta.additionalTableKeys) || [];
10012
+ if (otherConfig?.type === 'dataLink') {
10013
+ const siblingTableKeys = otherConfig?.meta?.tableKeys || [];
10014
+ const additionalTableKeys = config.meta?.additionalTableKeys || [];
10010
10015
  const allSiblingKeys = [...siblingTableKeys, ...additionalTableKeys];
10011
10016
  return allSiblingKeys.includes(inputKey) && otherInputKey !== inputKey;
10012
10017
  }
@@ -10020,26 +10025,23 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
10020
10025
  return null;
10021
10026
  }
10022
10027
  const tableKeys = inputConfig.meta.tableKeys;
10023
- const additionalTableKeys = ((_config$meta2 = config.meta) === null || _config$meta2 === void 0 ? void 0 : _config$meta2.additionalTableKeys) || [];
10028
+ const additionalTableKeys = config.meta?.additionalTableKeys || [];
10024
10029
  const parentInputKeys = Object.keys(config.inputs || {});
10025
10030
  const siblingInputsMatchingTableKeys = parentInputKeys.filter(siblingKey => siblingKey !== inputKey).filter(siblingKey => tableKeys.includes(siblingKey) || additionalTableKeys.includes(siblingKey));
10026
10031
  [...new Set([...tableKeys, ...siblingInputsMatchingTableKeys])];
10027
- const isAjaxModal = React.useMemo(() => {
10028
- var _inputConfig$meta2;
10029
- return !!(inputConfig !== null && inputConfig !== void 0 && (_inputConfig$meta2 = inputConfig.meta) !== null && _inputConfig$meta2 !== void 0 && _inputConfig$meta2.namespace);
10030
- }, [inputConfig]);
10032
+ const isAjaxModal = React.useMemo(() => !!inputConfig?.meta?.namespace, [inputConfig]);
10031
10033
  const ajaxModalValues = useAjaxModal$2({
10032
10034
  name: inputKey,
10033
10035
  user,
10034
- namespace: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta3 = inputConfig.meta) === null || _inputConfig$meta3 === void 0 ? void 0 : _inputConfig$meta3.namespace,
10035
- skipFetch: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta4 = inputConfig.meta) === null || _inputConfig$meta4 === void 0 ? void 0 : _inputConfig$meta4.skipFetch,
10036
+ namespace: inputConfig?.meta?.namespace,
10037
+ skipFetch: inputConfig?.meta?.skipFetch,
10036
10038
  isAjaxModal,
10037
- formScope: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta5 = inputConfig.meta) === null || _inputConfig$meta5 === void 0 ? void 0 : _inputConfig$meta5.formScope,
10039
+ formScope: inputConfig?.meta?.formScope,
10038
10040
  APP: app,
10039
10041
  apiBaseUrl: getApiBaseUrl(),
10040
10042
  _getAppHeader: getAppHeader
10041
10043
  });
10042
- const dataLinkForm = ajaxModalValues === null || ajaxModalValues === void 0 ? void 0 : ajaxModalValues.form;
10044
+ const dataLinkForm = ajaxModalValues?.form;
10043
10045
  const createInputsAndValues = item => {
10044
10046
  const inputs = {};
10045
10047
  const values = {};
@@ -10051,12 +10053,12 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
10051
10053
  'videos': 'Video'
10052
10054
  };
10053
10055
  tableKeys.filter(tableKey => tableKey !== 'datastakeId').forEach(tableKey => {
10054
- var _dataLinkForm$identif;
10055
- 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]);
10056
+ const formInputConfig = dataLinkForm?.[tableKey] || dataLinkForm?.['identification']?.[tableKey];
10056
10057
  if (formInputConfig) {
10057
- inputs[tableKey] = _objectSpread2(_objectSpread2({}, formInputConfig), {}, {
10058
+ inputs[tableKey] = {
10059
+ ...formInputConfig,
10058
10060
  label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : formInputConfig.label || formInputConfig.tableLabel || tableKey
10059
- });
10061
+ };
10060
10062
  if (formInputConfig.label && typeof formInputConfig.label === 'object') {
10061
10063
  const dynamicLabelKeys = Object.keys(formInputConfig.label);
10062
10064
  let resolvedLabel = null;
@@ -10064,7 +10066,7 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
10064
10066
  const parts = labelKey.split(' is ');
10065
10067
  if (parts.length === 2) {
10066
10068
  const [conditionKey, conditionValue] = parts;
10067
- if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
10069
+ if (item?.[conditionKey] === conditionValue) {
10068
10070
  resolvedLabel = formInputConfig.label[labelKey];
10069
10071
  break;
10070
10072
  }
@@ -10072,37 +10074,37 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
10072
10074
  }
10073
10075
  inputs[tableKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey);
10074
10076
  }
10075
- values[tableKey] = item === null || item === void 0 ? void 0 : item[tableKey];
10077
+ values[tableKey] = item?.[tableKey];
10076
10078
  } else {
10077
- var _item$linking;
10078
10079
  inputs[tableKey] = {
10079
10080
  label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey,
10080
- type: inputConfig === null || inputConfig === void 0 ? void 0 : inputConfig.type
10081
+ type: inputConfig?.type
10081
10082
  };
10082
- 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 === null || item === void 0 ? void 0 : item[tableKey]);
10083
+ values[tableKey] = item?.linking?.SCL?.[item?.[tableKey]]?.name || item?.[tableKey];
10083
10084
  }
10084
10085
  });
10085
10086
  siblingInputsMatchingTableKeys.forEach(siblingKey => {
10086
10087
  const siblingConfig = config.inputs[siblingKey];
10087
10088
  if (siblingConfig) {
10088
- inputs[siblingKey] = _objectSpread2(_objectSpread2({}, siblingConfig), {}, {
10089
+ inputs[siblingKey] = {
10090
+ ...siblingConfig,
10089
10091
  label: siblingConfig.label || siblingKey
10090
- });
10091
- values[siblingKey] = item === null || item === void 0 ? void 0 : item[siblingKey];
10092
+ };
10093
+ values[siblingKey] = item?.[siblingKey];
10092
10094
  }
10093
10095
  });
10094
- if (dataLinkForm !== null && dataLinkForm !== void 0 && dataLinkForm.identification && typeof dataLinkForm.identification === 'object') {
10096
+ if (dataLinkForm?.identification && typeof dataLinkForm.identification === 'object') {
10095
10097
  Object.keys(dataLinkForm.identification).filter(fieldKey => fieldKey !== 'datastakeId' && !tableKeys.includes(fieldKey)).filter(fieldKey => {
10096
10098
  const formInputConfig = dataLinkForm.identification[fieldKey];
10097
10099
  return formInputConfig && typeof formInputConfig === 'object' && !Array.isArray(formInputConfig);
10098
10100
  }).forEach(fieldKey => {
10099
- var _item$linking2;
10100
10101
  const formInputConfig = dataLinkForm.identification[fieldKey];
10101
- inputs[fieldKey] = _objectSpread2(_objectSpread2({}, formInputConfig), {}, {
10102
+ inputs[fieldKey] = {
10103
+ ...formInputConfig,
10102
10104
  label: uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : formInputConfig.label || formInputConfig.tableLabel || fieldKey
10103
- });
10104
- if (formInputConfig !== null && formInputConfig !== void 0 && formInputConfig.label && typeof (formInputConfig === null || formInputConfig === void 0 ? void 0 : formInputConfig.label) === 'object') {
10105
- const dynamicLabelKeys = Object.keys(formInputConfig === null || formInputConfig === void 0 ? void 0 : formInputConfig.label);
10105
+ };
10106
+ if (formInputConfig?.label && typeof formInputConfig?.label === 'object') {
10107
+ const dynamicLabelKeys = Object.keys(formInputConfig?.label);
10106
10108
  let resolvedLabel = null;
10107
10109
  for (const labelKey of dynamicLabelKeys) {
10108
10110
  const parts = labelKey.split(' is ');
@@ -10111,7 +10113,7 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
10111
10113
  const flattenedItem = Object.assign({}, item.location, {
10112
10114
  address: item.address
10113
10115
  });
10114
- if ((flattenedItem === null || flattenedItem === void 0 ? void 0 : flattenedItem[conditionKey]) === conditionValue) {
10116
+ if (flattenedItem?.[conditionKey] === conditionValue) {
10115
10117
  resolvedLabel = formInputConfig.label[labelKey];
10116
10118
  break;
10117
10119
  }
@@ -10119,7 +10121,7 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
10119
10121
  }
10120
10122
  inputs[fieldKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : fieldKey);
10121
10123
  }
10122
- values[fieldKey] = (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[fieldKey]]) === null || _item$linking2 === void 0 ? void 0 : _item$linking2.name) || (item === null || item === void 0 ? void 0 : item[fieldKey]);
10124
+ values[fieldKey] = item?.linking?.SCL?.[item?.[fieldKey]]?.name || item?.[fieldKey];
10123
10125
  });
10124
10126
  }
10125
10127
  return {
@@ -10129,17 +10131,16 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
10129
10131
  };
10130
10132
  if (Array.isArray(value)) {
10131
10133
  return value.map((item, itemIndex) => {
10132
- var _merged$inputKey;
10133
10134
  const merged = mergeObject(item);
10134
- const datastakeIdValue = (merged === null || merged === void 0 || (_merged$inputKey = merged[inputKey]) === null || _merged$inputKey === void 0 ? void 0 : _merged$inputKey.datastakeId) || (merged === null || merged === void 0 ? void 0 : merged.datastakeId);
10135
+ const datastakeIdValue = merged?.[inputKey]?.datastakeId || merged?.datastakeId;
10135
10136
  const {
10136
10137
  inputs,
10137
10138
  values
10138
10139
  } = createInputsAndValues(merged);
10139
10140
  return /*#__PURE__*/jsxRuntime.jsx(TreeNodeComponent, {
10140
- nodeKey: datastakeIdValue || t("No ID ".concat(itemIndex + 1)),
10141
+ nodeKey: datastakeIdValue || t(`No ID ${itemIndex + 1}`),
10141
10142
  config: {
10142
- label: datastakeIdValue || t("No ID ".concat(itemIndex + 1)),
10143
+ label: datastakeIdValue || t(`No ID ${itemIndex + 1}`),
10143
10144
  type: 'custom-datalink-group',
10144
10145
  inputs: inputs
10145
10146
  },
@@ -10153,12 +10154,11 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
10153
10154
  getApiBaseUrl: getApiBaseUrl,
10154
10155
  getAppHeader: getAppHeader,
10155
10156
  app: app
10156
- }, "".concat(inputKey, "-").concat(itemIndex));
10157
+ }, `${inputKey}-${itemIndex}`);
10157
10158
  });
10158
10159
  } else {
10159
- var _merged$inputKey2;
10160
10160
  const merged = mergeObject(value);
10161
- const datastakeIdValue = (merged === null || merged === void 0 || (_merged$inputKey2 = merged[inputKey]) === null || _merged$inputKey2 === void 0 ? void 0 : _merged$inputKey2.datastakeId) || (merged === null || merged === void 0 ? void 0 : merged.datastakeId);
10161
+ const datastakeIdValue = merged?.[inputKey]?.datastakeId || merged?.datastakeId;
10162
10162
  const {
10163
10163
  inputs,
10164
10164
  values
@@ -10180,7 +10180,7 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
10180
10180
  getApiBaseUrl: getApiBaseUrl,
10181
10181
  getAppHeader: getAppHeader,
10182
10182
  app: app
10183
- }, "".concat(inputKey, "-group"));
10183
+ }, `${inputKey}-group`);
10184
10184
  }
10185
10185
  };
10186
10186