datastake-daf 0.6.771 → 0.6.772
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.
package/dist/components/index.js
CHANGED
|
@@ -9725,19 +9725,18 @@ const resolveDynamicLabel = (labelConfig, item, defaultLabel) => {
|
|
|
9725
9725
|
return labelConfig || defaultLabel;
|
|
9726
9726
|
};
|
|
9727
9727
|
|
|
9728
|
-
const handleSectionChildren =
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
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
|
|
9753
|
+
if (fieldConfig.type === 'dataLinkGroup' && Array.isArray(allData?.[fieldKey])) {
|
|
9755
9754
|
fieldValue = allData[fieldKey];
|
|
9756
|
-
} else if (fieldConfig.type === 'dataLinkGroup' && allData
|
|
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
|
|
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
|
|
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 => {
|
package/dist/pages/index.js
CHANGED
|
@@ -9901,7 +9901,8 @@ const useMap = ({
|
|
|
9901
9901
|
const excludedType = ['village', 'town', 'area', 'territory'];
|
|
9902
9902
|
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)))));
|
|
9903
9903
|
const maxTotal = Math.max(...(data || []).map(d => d.total));
|
|
9904
|
-
filteredData
|
|
9904
|
+
const dataToRender = type === "chain" ? filteredData : data;
|
|
9905
|
+
dataToRender.forEach((d, i) => {
|
|
9905
9906
|
addIconToMapInitialy([d?.marker?.lat, d?.marker?.lng], "location", d.category || "mineSite", d, maxTotal, i);
|
|
9906
9907
|
});
|
|
9907
9908
|
polylinesRef.current.forEach(polyline => {
|
package/dist/services/index.js
CHANGED
|
@@ -1495,12 +1495,14 @@ class OperatorService extends BaseService {
|
|
|
1495
1495
|
}
|
|
1496
1496
|
});
|
|
1497
1497
|
}
|
|
1498
|
-
getData(id, sourceId) {
|
|
1498
|
+
getData(id, sourceId, source, version) {
|
|
1499
1499
|
return this.apiGet({
|
|
1500
1500
|
isApp: true,
|
|
1501
1501
|
url: `/stakeholder/${id}`,
|
|
1502
1502
|
params: {
|
|
1503
|
-
authorId: sourceId
|
|
1503
|
+
authorId: sourceId,
|
|
1504
|
+
source,
|
|
1505
|
+
version
|
|
1504
1506
|
}
|
|
1505
1507
|
});
|
|
1506
1508
|
}
|
package/package.json
CHANGED
|
@@ -205,7 +205,9 @@ export const useMap = ({
|
|
|
205
205
|
)
|
|
206
206
|
));
|
|
207
207
|
const maxTotal = Math.max(...(data || []).map((d) => d.total));
|
|
208
|
-
|
|
208
|
+
|
|
209
|
+
const dataToRender = type === "chain" ? filteredData : data;
|
|
210
|
+
dataToRender.forEach((d, i) => {
|
|
209
211
|
addIconToMapInitialy(
|
|
210
212
|
[d?.marker?.lat, d?.marker?.lng],
|
|
211
213
|
"location",
|
|
@@ -45,11 +45,11 @@ class OperatorService extends BaseService {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
getData(id, sourceId) {
|
|
48
|
+
getData(id, sourceId, source, version) {
|
|
49
49
|
return this.apiGet({
|
|
50
50
|
isApp: true,
|
|
51
51
|
url: `/stakeholder/${id}`,
|
|
52
|
-
params: { authorId: sourceId },
|
|
52
|
+
params: { authorId: sourceId, source, version },
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
|