datastake-daf 0.6.771 → 0.6.773

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.
@@ -9725,19 +9725,18 @@ const resolveDynamicLabel = (labelConfig, item, defaultLabel) => {
9725
9725
  return labelConfig || defaultLabel;
9726
9726
  };
9727
9727
 
9728
- const handleSectionChildren = _ref => {
9729
- let {
9730
- config,
9731
- allData,
9732
- level,
9733
- t,
9734
- rootForm,
9735
- user,
9736
- getApiBaseUrl = () => {},
9737
- getAppHeader = () => {},
9738
- app,
9739
- TreeNodeComponent
9740
- } = _ref;
9728
+ const handleSectionChildren = ({
9729
+ config,
9730
+ allData,
9731
+ level,
9732
+ t,
9733
+ rootForm,
9734
+ user,
9735
+ getApiBaseUrl = () => {},
9736
+ getAppHeader = () => {},
9737
+ app,
9738
+ TreeNodeComponent
9739
+ }) => {
9741
9740
  if (!(level === 0 && config && typeof config === 'object')) {
9742
9741
  return null;
9743
9742
  }
@@ -9751,14 +9750,14 @@ const handleSectionChildren = _ref => {
9751
9750
  let fieldValue;
9752
9751
 
9753
9752
  // Determine field value based on type
9754
- if (fieldConfig.type === 'dataLinkGroup' && Array.isArray(allData === null || allData === void 0 ? void 0 : allData[fieldKey])) {
9753
+ if (fieldConfig.type === 'dataLinkGroup' && Array.isArray(allData?.[fieldKey])) {
9755
9754
  fieldValue = allData[fieldKey];
9756
- } else if (fieldConfig.type === 'dataLinkGroup' && allData !== null && allData !== void 0 && allData[fieldKey]) {
9755
+ } else if (fieldConfig.type === 'dataLinkGroup' && allData?.[fieldKey]) {
9757
9756
  fieldValue = allData[fieldKey];
9758
9757
  } else if (fieldConfig.type === 'group') {
9759
9758
  fieldValue = {};
9760
9759
  } else {
9761
- fieldValue = allData === null || allData === void 0 ? void 0 : allData[fieldKey];
9760
+ fieldValue = allData?.[fieldKey];
9762
9761
  }
9763
9762
  return /*#__PURE__*/jsxRuntime.jsx(TreeNodeComponent, {
9764
9763
  nodeKey: fieldKey,
@@ -14719,7 +14718,8 @@ const useMap$1 = ({
14719
14718
  const excludedType = ['village', 'town', 'area', 'territory'];
14720
14719
  const filteredData = data?.filter(obj => !excludedType.includes(obj?.type) && (obj?.stakeholders?.length > 0 || data.some(other => other.datastakeId !== obj.datastakeId && (other.stakeholders || []).some(stk => (stk.links || []).includes(obj.datastakeId)))));
14721
14720
  const maxTotal = Math.max(...(data || []).map(d => d.total));
14722
- filteredData.forEach((d, i) => {
14721
+ const dataToRender = type === "chain" ? filteredData : data;
14722
+ dataToRender.forEach((d, i) => {
14723
14723
  addIconToMapInitialy([d?.marker?.lat, d?.marker?.lng], "location", d.category || "mineSite", d, maxTotal, i);
14724
14724
  });
14725
14725
  polylinesRef.current.forEach(polyline => {