datastake-daf 0.6.750 → 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.
- package/dist/components/index.js +70 -70
- package/dist/pages/index.js +286 -211
- package/dist/utils/index.js +24 -0
- package/package.json +1 -1
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/GenderDistribution/index.js +2 -2
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/Identification/hook.js +1 -1
- package/src/@daf/pages/Dashboards/SupplyChain/components/SupplyChainMap/index.js +6 -1
- package/src/@daf/pages/Dashboards/UserDashboard/components/MineSites/helper.js +3 -3
- package/src/@daf/pages/Locations/MineSite/index.jsx +1 -1
- package/src/@daf/pages/Summary/Minesite/components/MineDetailsSection/index.js +51 -0
- package/src/@daf/pages/Summary/Minesite/components/MineSiteDetails/config.js +31 -37
- package/src/@daf/pages/Summary/Minesite/components/MineSiteDetails/index.js +4 -16
- package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/config.js +6 -6
- package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/helper.js +13 -16
- package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/index.js +3 -3
- package/src/@daf/pages/Summary/Minesite/index.jsx +15 -19
- package/src/@daf/pages/Summary/Operator/components/Governance/config.js +4 -4
- package/src/@daf/pages/Summary/Operator/components/Governance/helper.js +8 -11
- package/src/@daf/pages/Summary/Operator/components/Governance/index.js +9 -3
- package/src/@daf/pages/Summary/Operator/index.jsx +6 -4
- package/src/@daf/pages/Summary/components/InformationAvailability/components/Contributions/index.js +16 -5
- package/src/@daf/pages/Summary/components/InformationAvailability/components/InformationCompleteness/index.js +2 -3
- package/src/@daf/pages/Summary/components/InformationAvailability/index.js +7 -4
- package/src/@daf/pages/Summary/hook.js +3 -3
- package/src/constants/locales/en/translation.js +8 -0
- package/src/constants/locales/fr/translation.js +8 -0
- package/src/constants/locales/sp/translation.js +8 -0
- package/dist/style/datastake/mapbox-gl.css +0 -330
package/dist/components/index.js
CHANGED
|
@@ -8143,7 +8143,7 @@ const {
|
|
|
8143
8143
|
Paragraph: Paragraph$1
|
|
8144
8144
|
} = antd.Typography;
|
|
8145
8145
|
const checkHasActiveFilterValues = filtersConfig => {
|
|
8146
|
-
if (!filtersConfig
|
|
8146
|
+
if (!(filtersConfig !== null && filtersConfig !== void 0 && filtersConfig.filtersConfig) || !(filtersConfig !== null && filtersConfig !== void 0 && filtersConfig.selectedFilters)) return false;
|
|
8147
8147
|
const filterConfigKeys = Object.keys(filtersConfig.filtersConfig);
|
|
8148
8148
|
const selectedFilters = filtersConfig.selectedFilters;
|
|
8149
8149
|
return filterConfigKeys.some(key => {
|
|
@@ -8151,27 +8151,28 @@ const checkHasActiveFilterValues = filtersConfig => {
|
|
|
8151
8151
|
return value !== undefined && value !== null && value !== "";
|
|
8152
8152
|
});
|
|
8153
8153
|
};
|
|
8154
|
-
const useHeader =
|
|
8155
|
-
|
|
8156
|
-
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8154
|
+
const useHeader = _ref => {
|
|
8155
|
+
let {
|
|
8156
|
+
title = "",
|
|
8157
|
+
tooltip = "",
|
|
8158
|
+
supportText = "",
|
|
8159
|
+
tags = [],
|
|
8160
|
+
actionButtons: _actionButtons = [],
|
|
8161
|
+
titleTooltip,
|
|
8162
|
+
className,
|
|
8163
|
+
addedHeader = null,
|
|
8164
|
+
addedHeaderFirst,
|
|
8165
|
+
extraButtons: _extraButtons = [],
|
|
8166
|
+
onDownload,
|
|
8167
|
+
downloadDisabled,
|
|
8168
|
+
goBackTo,
|
|
8169
|
+
loading,
|
|
8170
|
+
renderExtraComponents,
|
|
8171
|
+
app = "",
|
|
8172
|
+
isViewMode = false,
|
|
8173
|
+
filtersConfig = {}
|
|
8174
|
+
} = _ref;
|
|
8175
|
+
const hasActiveFilterValues = React.useMemo(() => checkHasActiveFilterValues(filtersConfig), [filtersConfig === null || filtersConfig === void 0 ? void 0 : filtersConfig.filtersConfig, filtersConfig === null || filtersConfig === void 0 ? void 0 : filtersConfig.selectedFilters]);
|
|
8175
8176
|
const [showFilters, setShowFilters] = React.useState(() => checkHasActiveFilterValues(filtersConfig));
|
|
8176
8177
|
const hasFilters = filtersConfig && Object.keys(filtersConfig).length > 0;
|
|
8177
8178
|
React.useEffect(() => {
|
|
@@ -8213,9 +8214,9 @@ const useHeader = ({
|
|
|
8213
8214
|
const buttonCont = React.useRef();
|
|
8214
8215
|
const [mainContWidth, setMainContWidth] = React.useState(600);
|
|
8215
8216
|
const [buttonContWidth, setButtonContWidth] = React.useState(0);
|
|
8216
|
-
const hasSupportText = !!supportText
|
|
8217
|
-
const hasTags = !!tags
|
|
8218
|
-
const hasButtons = React.useMemo(() => !!(actionButtons
|
|
8217
|
+
const hasSupportText = !!(supportText !== null && supportText !== void 0 && supportText.length);
|
|
8218
|
+
const hasTags = !!(tags !== null && tags !== void 0 && tags.length);
|
|
8219
|
+
const hasButtons = React.useMemo(() => !!(actionButtons !== null && actionButtons !== void 0 && actionButtons.length || extraButtons !== null && extraButtons !== void 0 && extraButtons.length), [actionButtons, extraButtons]);
|
|
8219
8220
|
React.useEffect(() => {
|
|
8220
8221
|
const mainContObserver = new ResizeObserver(entries => {
|
|
8221
8222
|
const _mainEntry = entries[0];
|
|
@@ -8375,20 +8376,22 @@ const useHeader = ({
|
|
|
8375
8376
|
const {
|
|
8376
8377
|
useToken: useToken$m
|
|
8377
8378
|
} = antd.theme;
|
|
8378
|
-
function BreadCrumbs({
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8379
|
+
function BreadCrumbs(_ref) {
|
|
8380
|
+
let {
|
|
8381
|
+
breadcrumbs = [],
|
|
8382
|
+
mainContWidth = 0
|
|
8383
|
+
} = _ref;
|
|
8382
8384
|
const [splitIndex, setSplitIndex] = React.useState(0);
|
|
8383
8385
|
const {
|
|
8384
8386
|
token
|
|
8385
8387
|
} = useToken$m();
|
|
8386
|
-
const _renderBreadcrumb = (b, i, isLast
|
|
8388
|
+
const _renderBreadcrumb = function (b, i, isLast) {
|
|
8389
|
+
let noOnClickLast = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
8387
8390
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8388
8391
|
className: "flex breadcrumb-item",
|
|
8389
|
-
onClick: noOnClickLast && isLast ? undefined : b
|
|
8392
|
+
onClick: noOnClickLast && isLast ? undefined : b === null || b === void 0 ? void 0 : b.onClick,
|
|
8390
8393
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8391
|
-
children: b
|
|
8394
|
+
children: b === null || b === void 0 ? void 0 : b.label
|
|
8392
8395
|
}), !isLast && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8393
8396
|
className: "flex flex-column justify-content-center",
|
|
8394
8397
|
children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
|
|
@@ -8398,7 +8401,7 @@ function BreadCrumbs({
|
|
|
8398
8401
|
color: token.baseGray50
|
|
8399
8402
|
})
|
|
8400
8403
|
})]
|
|
8401
|
-
},
|
|
8404
|
+
}, "breadcrumb-item-".concat(i));
|
|
8402
8405
|
};
|
|
8403
8406
|
React.useEffect(() => {
|
|
8404
8407
|
const _placeholderCont = document.getElementById("header-breadcrumbs");
|
|
@@ -8441,7 +8444,7 @@ function BreadCrumbs({
|
|
|
8441
8444
|
placement: "bottomRight",
|
|
8442
8445
|
menu: {
|
|
8443
8446
|
items: groupedBreadCrumbs[2].map((it, i) => ({
|
|
8444
|
-
key:
|
|
8447
|
+
key: "items-".concat(i),
|
|
8445
8448
|
label: it.label,
|
|
8446
8449
|
onClick: it.onClick
|
|
8447
8450
|
}))
|
|
@@ -9664,30 +9667,28 @@ const handleSectionChildren = _ref => {
|
|
|
9664
9667
|
});
|
|
9665
9668
|
};
|
|
9666
9669
|
|
|
9667
|
-
const handleArrayChildren =
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
|
|
9672
|
-
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
} = _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
|
+
}) => {
|
|
9682
9684
|
if (!Array.isArray(value)) {
|
|
9683
9685
|
return null;
|
|
9684
9686
|
}
|
|
9685
9687
|
return value.map((item, itemIndex) => /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
9686
9688
|
className: "array-item",
|
|
9687
9689
|
children: Object.keys(config.inputs).sort((a, b) => {
|
|
9688
|
-
|
|
9689
|
-
const
|
|
9690
|
-
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;
|
|
9691
9692
|
return positionA - positionB;
|
|
9692
9693
|
}).map(subInputKey => {
|
|
9693
9694
|
const subInputConfig = config.inputs[subInputKey];
|
|
@@ -9705,9 +9706,9 @@ const handleArrayChildren = _ref => {
|
|
|
9705
9706
|
getApiBaseUrl: getApiBaseUrl,
|
|
9706
9707
|
getAppHeader: getAppHeader,
|
|
9707
9708
|
app: app
|
|
9708
|
-
},
|
|
9709
|
+
}, `${itemIndex}-${subInputKey}`);
|
|
9709
9710
|
})
|
|
9710
|
-
},
|
|
9711
|
+
}, `${itemIndex}`));
|
|
9711
9712
|
};
|
|
9712
9713
|
|
|
9713
9714
|
const noDafApps = ['tif', 'cukura']; //PACKAGE_CHANGE_LATER (remove sbg)
|
|
@@ -10251,21 +10252,20 @@ const handleDataLinkWithTableKeys = _ref => {
|
|
|
10251
10252
|
}
|
|
10252
10253
|
};
|
|
10253
10254
|
|
|
10254
|
-
const handleGroupChildren =
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
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) {
|
|
10269
10269
|
return null;
|
|
10270
10270
|
}
|
|
10271
10271
|
const inputKeys = Object.keys(config.inputs);
|
|
@@ -10278,7 +10278,7 @@ const handleGroupChildren = _ref => {
|
|
|
10278
10278
|
if (value && typeof value === 'object' && value[inputKey]) {
|
|
10279
10279
|
inputValue = value[inputKey];
|
|
10280
10280
|
} else {
|
|
10281
|
-
inputValue = allData
|
|
10281
|
+
inputValue = allData?.[inputKey];
|
|
10282
10282
|
}
|
|
10283
10283
|
return /*#__PURE__*/jsxRuntime.jsx(TreeNodeComponent, {
|
|
10284
10284
|
nodeKey: inputKey,
|