datastake-daf 0.6.762 → 0.6.764
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 +205 -165
- package/dist/hooks/index.js +1 -5
- package/dist/layouts/index.js +36 -11
- package/dist/pages/index.js +1922 -1021
- package/dist/services/index.js +1 -21
- package/dist/utils/index.js +0 -6
- package/package.json +1 -1
- package/src/@daf/core/components/Graphs/StakeholderMappings/index.jsx +2 -0
- package/src/@daf/core/components/Graphs/components/BaseGraph.jsx +2 -1
- package/src/@daf/core/components/Screens/TableScreen/TablePageWithTabs/index.jsx +9 -4
- package/src/@daf/core/components/Screens/Users/config.js +0 -1
- package/src/@daf/core/components/Table/index.jsx +2 -2
- package/src/@daf/core/components/UI/KeyIndicatorNavigateLabel/index.jsx +29 -0
- package/src/@daf/hooks/useFilters.js +1 -3
- package/src/@daf/layouts/AppLayout/components/MobileDrawer/index.js +4 -2
- package/src/@daf/layouts/AppLayout/components/UserDropdown/index.js +23 -2
- package/src/@daf/layouts/AppLayout/index.jsx +2 -0
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/GenderDistribution/config.js +7 -6
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/GenderDistribution/index.js +2 -1
- package/src/@daf/pages/Dashboards/SupplyChain/components/KeyIndicators/config.js +29 -53
- package/src/@daf/pages/Dashboards/SupplyChain/index.jsx +2 -2
- package/src/@daf/pages/Dashboards/UserDashboard/components/DataCompilation/index.jsx +1 -0
- package/src/@daf/pages/Dashboards/UserDashboard/components/DataConsilidation/index.jsx +0 -1
- package/src/@daf/pages/Dashboards/UserDashboard/components/KeyIndicators/config.js +36 -70
- package/src/@daf/pages/Documents/index.jsx +9 -13
- package/src/@daf/pages/Events/Activities/index.jsx +8 -21
- package/src/@daf/pages/Events/Incidents/index.jsx +8 -21
- package/src/@daf/pages/Events/config.js +0 -1
- package/src/@daf/pages/Events/index.jsx +8 -20
- package/src/@daf/pages/Locations/MineSite/columns.js +3 -3
- package/src/@daf/pages/Locations/MineSite/config.js +0 -1
- package/src/@daf/pages/Locations/MineSite/index.jsx +8 -21
- package/src/@daf/pages/Locations/index.jsx +9 -12
- package/src/@daf/pages/Partners/columns.js +421 -0
- package/src/@daf/pages/Partners/config.js +32 -0
- package/src/@daf/pages/Partners/create.jsx +145 -0
- package/src/@daf/pages/Partners/edit.jsx +98 -0
- package/src/@daf/pages/Partners/hook.js +153 -0
- package/src/@daf/pages/Partners/index.jsx +233 -8
- package/src/@daf/pages/Stakeholders/Operators/index.jsx +8 -22
- package/src/@daf/pages/Stakeholders/Workers/index.jsx +8 -21
- package/src/@daf/pages/Stakeholders/index.jsx +9 -10
- package/src/@daf/pages/hook.js +34 -0
- package/src/@daf/services/PartnerService.js +1 -16
- package/src/helpers/breadCrumbs.js +0 -2
- package/src/index.js +1 -1
- package/src/pages.js +1 -0
package/dist/components/index.js
CHANGED
|
@@ -5901,10 +5901,10 @@ function DAFTable(_ref) {
|
|
|
5901
5901
|
}) : filtersConfig;
|
|
5902
5902
|
}, [sourcesKey, sources, filtersConfig, t]);
|
|
5903
5903
|
React.useEffect(() => {
|
|
5904
|
-
if (data) {
|
|
5904
|
+
if (data && Array.isArray(data)) {
|
|
5905
5905
|
setSource(data);
|
|
5906
5906
|
}
|
|
5907
|
-
}, [data]);
|
|
5907
|
+
}, [data, data.length]);
|
|
5908
5908
|
const paginationPageSize = pagination === null || pagination === void 0 ? void 0 : pagination.pageSize;
|
|
5909
5909
|
const dataSource = React.useMemo(() => {
|
|
5910
5910
|
const pageSize = paginationPageSize ? paginationPageSize : source.length > 10 ? source.length : 10;
|
|
@@ -9511,24 +9511,29 @@ const processConditionalTableKeys = (tableKeys, item) => {
|
|
|
9511
9511
|
});
|
|
9512
9512
|
return processedKeys;
|
|
9513
9513
|
};
|
|
9514
|
-
const renderFieldData = (type, value, user, config
|
|
9514
|
+
const renderFieldData = function (type, value, user, config) {
|
|
9515
|
+
let getApiBaseUrl = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : () => {};
|
|
9516
|
+
let getAppHeader = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : () => {};
|
|
9517
|
+
let app = arguments.length > 6 ? arguments[6] : undefined;
|
|
9518
|
+
let allValues = arguments.length > 7 ? arguments[7] : undefined;
|
|
9519
|
+
let formValues = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : {};
|
|
9515
9520
|
switch (type) {
|
|
9516
9521
|
case 'year':
|
|
9517
9522
|
return value !== '-' ? renderDateFormatted(value, 'YYYY', 'en') : '-';
|
|
9518
9523
|
case 'date':
|
|
9519
9524
|
{
|
|
9520
|
-
const language = user
|
|
9525
|
+
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;
|
|
9521
9526
|
return value !== '-' ? renderDateFormatted(value, 'DD MMM YYYY', language || 'en') : '-';
|
|
9522
9527
|
}
|
|
9523
9528
|
case 'select':
|
|
9524
9529
|
{
|
|
9525
|
-
const options = config
|
|
9530
|
+
const options = (config === null || config === void 0 ? void 0 : config.options) || [];
|
|
9526
9531
|
const option = findOptions(value, options);
|
|
9527
9532
|
return option;
|
|
9528
9533
|
}
|
|
9529
9534
|
case 'multiselect':
|
|
9530
9535
|
{
|
|
9531
|
-
const options = config
|
|
9536
|
+
const options = (config === null || config === void 0 ? void 0 : config.options) || [];
|
|
9532
9537
|
const _val = typeof value === 'string' ? value.split(',').map(v => v.trim()) : value;
|
|
9533
9538
|
const option = findOptions(_val, options);
|
|
9534
9539
|
return option.join(', ');
|
|
@@ -9543,7 +9548,7 @@ const renderFieldData = (type, value, user, config, getApiBaseUrl = () => {}, ge
|
|
|
9543
9548
|
formValues: formValues
|
|
9544
9549
|
});
|
|
9545
9550
|
case 'percentage':
|
|
9546
|
-
return value === '-' || value === null || value === undefined ? '-' :
|
|
9551
|
+
return value === '-' || value === null || value === undefined ? '-' : "".concat(value, " %");
|
|
9547
9552
|
case 'geolocation':
|
|
9548
9553
|
{
|
|
9549
9554
|
const val = JSON.parse(value) || {};
|
|
@@ -9557,7 +9562,7 @@ const renderFieldData = (type, value, user, config, getApiBaseUrl = () => {}, ge
|
|
|
9557
9562
|
case 'upload':
|
|
9558
9563
|
case 'videoUpload':
|
|
9559
9564
|
{
|
|
9560
|
-
const documentName = allValues
|
|
9565
|
+
const documentName = allValues === null || allValues === void 0 ? void 0 : allValues.map(item => item === null || item === void 0 ? void 0 : item.name).join(', ');
|
|
9561
9566
|
return documentName;
|
|
9562
9567
|
}
|
|
9563
9568
|
default:
|
|
@@ -9565,25 +9570,27 @@ const renderFieldData = (type, value, user, config, getApiBaseUrl = () => {}, ge
|
|
|
9565
9570
|
}
|
|
9566
9571
|
};
|
|
9567
9572
|
|
|
9568
|
-
const renderValue =
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9573
|
+
const renderValue = _ref => {
|
|
9574
|
+
let {
|
|
9575
|
+
value,
|
|
9576
|
+
hasChildren,
|
|
9577
|
+
config,
|
|
9578
|
+
user,
|
|
9579
|
+
getApiBaseUrl = () => {},
|
|
9580
|
+
getAppHeader = () => {},
|
|
9581
|
+
app,
|
|
9582
|
+
allData = {}
|
|
9583
|
+
} = _ref;
|
|
9584
|
+
if ((config === null || config === void 0 ? void 0 : config.type) === 'groupInputs') {
|
|
9585
|
+
if (!(config !== null && config !== void 0 && config.inputs)) return null;
|
|
9580
9586
|
const inputKeys = Object.keys(config.inputs).sort((a, b) => {
|
|
9581
|
-
|
|
9582
|
-
const
|
|
9587
|
+
var _config$inputs$a, _config$inputs$b;
|
|
9588
|
+
const positionA = ((_config$inputs$a = config.inputs[a]) === null || _config$inputs$a === void 0 ? void 0 : _config$inputs$a.position) || 0;
|
|
9589
|
+
const positionB = ((_config$inputs$b = config.inputs[b]) === null || _config$inputs$b === void 0 ? void 0 : _config$inputs$b.position) || 0;
|
|
9583
9590
|
return positionA - positionB;
|
|
9584
9591
|
});
|
|
9585
9592
|
const values = inputKeys.map(inputKey => {
|
|
9586
|
-
let inputValue = value
|
|
9593
|
+
let inputValue = value === null || value === void 0 ? void 0 : value[inputKey];
|
|
9587
9594
|
if (inputValue === null || inputValue === undefined || inputValue === '') {
|
|
9588
9595
|
return '';
|
|
9589
9596
|
} else if (typeof inputValue === 'object' && inputValue !== null) {
|
|
@@ -9624,8 +9631,8 @@ const renderValue = ({
|
|
|
9624
9631
|
} else {
|
|
9625
9632
|
displayValue = String(value);
|
|
9626
9633
|
}
|
|
9627
|
-
const fieldType = config
|
|
9628
|
-
let cssClass =
|
|
9634
|
+
const fieldType = (config === null || config === void 0 ? void 0 : config.type) || 'text';
|
|
9635
|
+
let cssClass = "tree-value ".concat(fieldType, "-type");
|
|
9629
9636
|
if (displayValue === '-') {
|
|
9630
9637
|
cssClass += ' empty';
|
|
9631
9638
|
}
|
|
@@ -9635,19 +9642,21 @@ const renderValue = ({
|
|
|
9635
9642
|
children: displayValue
|
|
9636
9643
|
});
|
|
9637
9644
|
};
|
|
9638
|
-
const determineHasChildren =
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9645
|
+
const determineHasChildren = _ref2 => {
|
|
9646
|
+
var _config$meta;
|
|
9647
|
+
let {
|
|
9648
|
+
config,
|
|
9649
|
+
level
|
|
9650
|
+
} = _ref2;
|
|
9651
|
+
if ((config === null || config === void 0 ? void 0 : config.type) === 'groupInputs') {
|
|
9643
9652
|
return false;
|
|
9644
9653
|
}
|
|
9645
|
-
if (config
|
|
9654
|
+
if ((config === null || config === void 0 ? void 0 : config.type) === 'header' && config !== null && config !== void 0 && config.inputs && Object.keys(config.inputs).length > 0) {
|
|
9646
9655
|
return true;
|
|
9647
9656
|
}
|
|
9648
|
-
return config
|
|
9657
|
+
return (config === null || config === void 0 ? void 0 : config.inputs) || (config === null || config === void 0 ? void 0 : config.type) === 'group' || (config === null || config === void 0 ? void 0 : config.type) === 'dataLinkGroup' || (config === null || config === void 0 ? void 0 : config.type) === 'section' || (config === null || config === void 0 ? void 0 : config.type) === 'ajaxSubGroup' ||
|
|
9649
9658
|
// Add this line
|
|
9650
|
-
config
|
|
9659
|
+
(config === null || config === void 0 ? void 0 : config.type) === 'dataLink' && (config === null || config === void 0 || (_config$meta = config.meta) === null || _config$meta === void 0 ? void 0 : _config$meta.tableKeys) || level === 0 && config && typeof config === 'object' && Object.keys(config).some(key => key !== 'id' && key !== 'label' && key !== 'position' && key !== 'subTitle' && typeof config[key] === 'object' && config[key] !== null);
|
|
9651
9660
|
};
|
|
9652
9661
|
|
|
9653
9662
|
const sortByPosition = (items, getConfig) => {
|
|
@@ -9921,44 +9930,44 @@ function useAjaxModal$2({
|
|
|
9921
9930
|
}
|
|
9922
9931
|
|
|
9923
9932
|
const mergeObject = obj => {
|
|
9924
|
-
return Object.entries(obj || {}).reduce((acc,
|
|
9925
|
-
let [key, value] = _ref;
|
|
9933
|
+
return Object.entries(obj || {}).reduce((acc, [key, value]) => {
|
|
9926
9934
|
if (typeof value === "object" && !Array.isArray(value) && value !== null) {
|
|
9927
|
-
return
|
|
9935
|
+
return {
|
|
9936
|
+
...acc,
|
|
9937
|
+
...value
|
|
9938
|
+
};
|
|
9928
9939
|
}
|
|
9929
|
-
return
|
|
9940
|
+
return {
|
|
9941
|
+
...acc,
|
|
9930
9942
|
[key]: value
|
|
9931
|
-
}
|
|
9943
|
+
};
|
|
9932
9944
|
}, {});
|
|
9933
9945
|
};
|
|
9934
|
-
const handleDataLinkGroupWithTableKeys =
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
TreeNodeComponent
|
|
9950
|
-
} = _ref2;
|
|
9946
|
+
const handleDataLinkGroupWithTableKeys = ({
|
|
9947
|
+
config,
|
|
9948
|
+
inputConfig,
|
|
9949
|
+
inputKey,
|
|
9950
|
+
value,
|
|
9951
|
+
level,
|
|
9952
|
+
t,
|
|
9953
|
+
rootForm,
|
|
9954
|
+
allData,
|
|
9955
|
+
user,
|
|
9956
|
+
getApiBaseUrl = () => {},
|
|
9957
|
+
getAppHeader = () => {},
|
|
9958
|
+
app,
|
|
9959
|
+
TreeNodeComponent
|
|
9960
|
+
}) => {
|
|
9951
9961
|
if (!(config.type === 'dataLinkGroup' || config.type === 'dataLink')) {
|
|
9952
9962
|
return null;
|
|
9953
9963
|
}
|
|
9954
|
-
if (
|
|
9964
|
+
if (inputConfig?.type !== 'dataLink' || !inputConfig?.meta?.tableKeys) {
|
|
9955
9965
|
const parentInputKeys = Object.keys(config.inputs || {});
|
|
9956
9966
|
const isHandledBySiblingDataLink = parentInputKeys.some(otherInputKey => {
|
|
9957
9967
|
const otherConfig = config.inputs[otherInputKey];
|
|
9958
|
-
if (
|
|
9959
|
-
|
|
9960
|
-
const
|
|
9961
|
-
const additionalTableKeys = ((_config$meta = config.meta) === null || _config$meta === void 0 ? void 0 : _config$meta.additionalTableKeys) || [];
|
|
9968
|
+
if (otherConfig?.type === 'dataLink') {
|
|
9969
|
+
const siblingTableKeys = otherConfig?.meta?.tableKeys || [];
|
|
9970
|
+
const additionalTableKeys = config.meta?.additionalTableKeys || [];
|
|
9962
9971
|
const allSiblingKeys = [...siblingTableKeys, ...additionalTableKeys];
|
|
9963
9972
|
return allSiblingKeys.includes(inputKey) && otherInputKey !== inputKey;
|
|
9964
9973
|
}
|
|
@@ -9972,26 +9981,23 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
|
|
|
9972
9981
|
return null;
|
|
9973
9982
|
}
|
|
9974
9983
|
const tableKeys = inputConfig.meta.tableKeys;
|
|
9975
|
-
const additionalTableKeys =
|
|
9984
|
+
const additionalTableKeys = config.meta?.additionalTableKeys || [];
|
|
9976
9985
|
const parentInputKeys = Object.keys(config.inputs || {});
|
|
9977
9986
|
const siblingInputsMatchingTableKeys = parentInputKeys.filter(siblingKey => siblingKey !== inputKey).filter(siblingKey => tableKeys.includes(siblingKey) || additionalTableKeys.includes(siblingKey));
|
|
9978
9987
|
[...new Set([...tableKeys, ...siblingInputsMatchingTableKeys])];
|
|
9979
|
-
const isAjaxModal = React.useMemo(() =>
|
|
9980
|
-
var _inputConfig$meta2;
|
|
9981
|
-
return !!(inputConfig !== null && inputConfig !== void 0 && (_inputConfig$meta2 = inputConfig.meta) !== null && _inputConfig$meta2 !== void 0 && _inputConfig$meta2.namespace);
|
|
9982
|
-
}, [inputConfig]);
|
|
9988
|
+
const isAjaxModal = React.useMemo(() => !!inputConfig?.meta?.namespace, [inputConfig]);
|
|
9983
9989
|
const ajaxModalValues = useAjaxModal$2({
|
|
9984
9990
|
name: inputKey,
|
|
9985
9991
|
user,
|
|
9986
|
-
namespace: inputConfig
|
|
9987
|
-
skipFetch: inputConfig
|
|
9992
|
+
namespace: inputConfig?.meta?.namespace,
|
|
9993
|
+
skipFetch: inputConfig?.meta?.skipFetch,
|
|
9988
9994
|
isAjaxModal,
|
|
9989
|
-
formScope: inputConfig
|
|
9995
|
+
formScope: inputConfig?.meta?.formScope,
|
|
9990
9996
|
APP: app,
|
|
9991
9997
|
apiBaseUrl: getApiBaseUrl(),
|
|
9992
9998
|
_getAppHeader: getAppHeader
|
|
9993
9999
|
});
|
|
9994
|
-
const dataLinkForm = ajaxModalValues
|
|
10000
|
+
const dataLinkForm = ajaxModalValues?.form;
|
|
9995
10001
|
const createInputsAndValues = item => {
|
|
9996
10002
|
const inputs = {};
|
|
9997
10003
|
const values = {};
|
|
@@ -10003,12 +10009,12 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
|
|
|
10003
10009
|
'videos': 'Video'
|
|
10004
10010
|
};
|
|
10005
10011
|
tableKeys.filter(tableKey => tableKey !== 'datastakeId').forEach(tableKey => {
|
|
10006
|
-
|
|
10007
|
-
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]);
|
|
10012
|
+
const formInputConfig = dataLinkForm?.[tableKey] || dataLinkForm?.['identification']?.[tableKey];
|
|
10008
10013
|
if (formInputConfig) {
|
|
10009
|
-
inputs[tableKey] =
|
|
10014
|
+
inputs[tableKey] = {
|
|
10015
|
+
...formInputConfig,
|
|
10010
10016
|
label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : formInputConfig.label || formInputConfig.tableLabel || tableKey
|
|
10011
|
-
}
|
|
10017
|
+
};
|
|
10012
10018
|
if (formInputConfig.label && typeof formInputConfig.label === 'object') {
|
|
10013
10019
|
const dynamicLabelKeys = Object.keys(formInputConfig.label);
|
|
10014
10020
|
let resolvedLabel = null;
|
|
@@ -10016,7 +10022,7 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
|
|
|
10016
10022
|
const parts = labelKey.split(' is ');
|
|
10017
10023
|
if (parts.length === 2) {
|
|
10018
10024
|
const [conditionKey, conditionValue] = parts;
|
|
10019
|
-
if (
|
|
10025
|
+
if (item?.[conditionKey] === conditionValue) {
|
|
10020
10026
|
resolvedLabel = formInputConfig.label[labelKey];
|
|
10021
10027
|
break;
|
|
10022
10028
|
}
|
|
@@ -10024,37 +10030,37 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
|
|
|
10024
10030
|
}
|
|
10025
10031
|
inputs[tableKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey);
|
|
10026
10032
|
}
|
|
10027
|
-
values[tableKey] = item
|
|
10033
|
+
values[tableKey] = item?.[tableKey];
|
|
10028
10034
|
} else {
|
|
10029
|
-
var _item$linking;
|
|
10030
10035
|
inputs[tableKey] = {
|
|
10031
10036
|
label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey,
|
|
10032
|
-
type: inputConfig
|
|
10037
|
+
type: inputConfig?.type
|
|
10033
10038
|
};
|
|
10034
|
-
values[tableKey] =
|
|
10039
|
+
values[tableKey] = item?.linking?.SCL?.[item?.[tableKey]]?.name || item?.[tableKey];
|
|
10035
10040
|
}
|
|
10036
10041
|
});
|
|
10037
10042
|
siblingInputsMatchingTableKeys.forEach(siblingKey => {
|
|
10038
10043
|
const siblingConfig = config.inputs[siblingKey];
|
|
10039
10044
|
if (siblingConfig) {
|
|
10040
|
-
inputs[siblingKey] =
|
|
10045
|
+
inputs[siblingKey] = {
|
|
10046
|
+
...siblingConfig,
|
|
10041
10047
|
label: siblingConfig.label || siblingKey
|
|
10042
|
-
}
|
|
10043
|
-
values[siblingKey] = item
|
|
10048
|
+
};
|
|
10049
|
+
values[siblingKey] = item?.[siblingKey];
|
|
10044
10050
|
}
|
|
10045
10051
|
});
|
|
10046
|
-
if (dataLinkForm
|
|
10052
|
+
if (dataLinkForm?.identification && typeof dataLinkForm.identification === 'object') {
|
|
10047
10053
|
Object.keys(dataLinkForm.identification).filter(fieldKey => fieldKey !== 'datastakeId' && !tableKeys.includes(fieldKey)).filter(fieldKey => {
|
|
10048
10054
|
const formInputConfig = dataLinkForm.identification[fieldKey];
|
|
10049
10055
|
return formInputConfig && typeof formInputConfig === 'object' && !Array.isArray(formInputConfig);
|
|
10050
10056
|
}).forEach(fieldKey => {
|
|
10051
|
-
var _item$linking2;
|
|
10052
10057
|
const formInputConfig = dataLinkForm.identification[fieldKey];
|
|
10053
|
-
inputs[fieldKey] =
|
|
10058
|
+
inputs[fieldKey] = {
|
|
10059
|
+
...formInputConfig,
|
|
10054
10060
|
label: uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : formInputConfig.label || formInputConfig.tableLabel || fieldKey
|
|
10055
|
-
}
|
|
10056
|
-
if (formInputConfig
|
|
10057
|
-
const dynamicLabelKeys = Object.keys(formInputConfig
|
|
10061
|
+
};
|
|
10062
|
+
if (formInputConfig?.label && typeof formInputConfig?.label === 'object') {
|
|
10063
|
+
const dynamicLabelKeys = Object.keys(formInputConfig?.label);
|
|
10058
10064
|
let resolvedLabel = null;
|
|
10059
10065
|
for (const labelKey of dynamicLabelKeys) {
|
|
10060
10066
|
const parts = labelKey.split(' is ');
|
|
@@ -10063,7 +10069,7 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
|
|
|
10063
10069
|
const flattenedItem = Object.assign({}, item.location, {
|
|
10064
10070
|
address: item.address
|
|
10065
10071
|
});
|
|
10066
|
-
if (
|
|
10072
|
+
if (flattenedItem?.[conditionKey] === conditionValue) {
|
|
10067
10073
|
resolvedLabel = formInputConfig.label[labelKey];
|
|
10068
10074
|
break;
|
|
10069
10075
|
}
|
|
@@ -10071,7 +10077,7 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
|
|
|
10071
10077
|
}
|
|
10072
10078
|
inputs[fieldKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : fieldKey);
|
|
10073
10079
|
}
|
|
10074
|
-
values[fieldKey] =
|
|
10080
|
+
values[fieldKey] = item?.linking?.SCL?.[item?.[fieldKey]]?.name || item?.[fieldKey];
|
|
10075
10081
|
});
|
|
10076
10082
|
}
|
|
10077
10083
|
return {
|
|
@@ -10081,17 +10087,16 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
|
|
|
10081
10087
|
};
|
|
10082
10088
|
if (Array.isArray(value)) {
|
|
10083
10089
|
return value.map((item, itemIndex) => {
|
|
10084
|
-
var _merged$inputKey;
|
|
10085
10090
|
const merged = mergeObject(item);
|
|
10086
|
-
const datastakeIdValue =
|
|
10091
|
+
const datastakeIdValue = merged?.[inputKey]?.datastakeId || merged?.datastakeId;
|
|
10087
10092
|
const {
|
|
10088
10093
|
inputs,
|
|
10089
10094
|
values
|
|
10090
10095
|
} = createInputsAndValues(merged);
|
|
10091
10096
|
return /*#__PURE__*/jsxRuntime.jsx(TreeNodeComponent, {
|
|
10092
|
-
nodeKey: datastakeIdValue || t(
|
|
10097
|
+
nodeKey: datastakeIdValue || t(`No ID ${itemIndex + 1}`),
|
|
10093
10098
|
config: {
|
|
10094
|
-
label: datastakeIdValue || t(
|
|
10099
|
+
label: datastakeIdValue || t(`No ID ${itemIndex + 1}`),
|
|
10095
10100
|
type: 'custom-datalink-group',
|
|
10096
10101
|
inputs: inputs
|
|
10097
10102
|
},
|
|
@@ -10105,12 +10110,11 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
|
|
|
10105
10110
|
getApiBaseUrl: getApiBaseUrl,
|
|
10106
10111
|
getAppHeader: getAppHeader,
|
|
10107
10112
|
app: app
|
|
10108
|
-
},
|
|
10113
|
+
}, `${inputKey}-${itemIndex}`);
|
|
10109
10114
|
});
|
|
10110
10115
|
} else {
|
|
10111
|
-
var _merged$inputKey2;
|
|
10112
10116
|
const merged = mergeObject(value);
|
|
10113
|
-
const datastakeIdValue =
|
|
10117
|
+
const datastakeIdValue = merged?.[inputKey]?.datastakeId || merged?.datastakeId;
|
|
10114
10118
|
const {
|
|
10115
10119
|
inputs,
|
|
10116
10120
|
values
|
|
@@ -10132,41 +10136,46 @@ const handleDataLinkGroupWithTableKeys = _ref2 => {
|
|
|
10132
10136
|
getApiBaseUrl: getApiBaseUrl,
|
|
10133
10137
|
getAppHeader: getAppHeader,
|
|
10134
10138
|
app: app
|
|
10135
|
-
},
|
|
10139
|
+
}, `${inputKey}-group`);
|
|
10136
10140
|
}
|
|
10137
10141
|
};
|
|
10138
10142
|
|
|
10139
|
-
const handleDataLinkWithTableKeys =
|
|
10140
|
-
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10143
|
+
const handleDataLinkWithTableKeys = _ref => {
|
|
10144
|
+
var _inputConfig$meta, _inputConfig$meta3, _inputConfig$meta4, _inputConfig$meta5;
|
|
10145
|
+
let {
|
|
10146
|
+
inputConfig,
|
|
10147
|
+
inputKey,
|
|
10148
|
+
value,
|
|
10149
|
+
level,
|
|
10150
|
+
t,
|
|
10151
|
+
rootForm,
|
|
10152
|
+
allData,
|
|
10153
|
+
user,
|
|
10154
|
+
getApiBaseUrl = () => {},
|
|
10155
|
+
getAppHeader = () => {},
|
|
10156
|
+
app,
|
|
10157
|
+
TreeNodeComponent
|
|
10158
|
+
} = _ref;
|
|
10159
|
+
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)) {
|
|
10154
10160
|
return null;
|
|
10155
10161
|
}
|
|
10156
10162
|
const tableKeys = inputConfig.meta.tableKeys;
|
|
10157
|
-
const isAjaxModal = React.useMemo(() =>
|
|
10163
|
+
const isAjaxModal = React.useMemo(() => {
|
|
10164
|
+
var _inputConfig$meta2;
|
|
10165
|
+
return !!(inputConfig !== null && inputConfig !== void 0 && (_inputConfig$meta2 = inputConfig.meta) !== null && _inputConfig$meta2 !== void 0 && _inputConfig$meta2.namespace);
|
|
10166
|
+
}, [inputConfig]);
|
|
10158
10167
|
const ajaxModalValues = useAjaxModal$2({
|
|
10159
10168
|
name: inputKey,
|
|
10160
10169
|
user,
|
|
10161
|
-
namespace: inputConfig
|
|
10162
|
-
skipFetch: inputConfig
|
|
10170
|
+
namespace: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta3 = inputConfig.meta) === null || _inputConfig$meta3 === void 0 ? void 0 : _inputConfig$meta3.namespace,
|
|
10171
|
+
skipFetch: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta4 = inputConfig.meta) === null || _inputConfig$meta4 === void 0 ? void 0 : _inputConfig$meta4.skipFetch,
|
|
10163
10172
|
isAjaxModal,
|
|
10164
|
-
formScope: inputConfig
|
|
10173
|
+
formScope: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta5 = inputConfig.meta) === null || _inputConfig$meta5 === void 0 ? void 0 : _inputConfig$meta5.formScope,
|
|
10165
10174
|
APP: app,
|
|
10166
10175
|
apiBaseUrl: getApiBaseUrl(),
|
|
10167
10176
|
_getAppHeader: getAppHeader
|
|
10168
10177
|
});
|
|
10169
|
-
const dataLinkForm = ajaxModalValues
|
|
10178
|
+
const dataLinkForm = ajaxModalValues === null || ajaxModalValues === void 0 ? void 0 : ajaxModalValues.form;
|
|
10170
10179
|
const createInputsAndValues = item => {
|
|
10171
10180
|
const inputs = {};
|
|
10172
10181
|
const values = {};
|
|
@@ -10179,19 +10188,20 @@ const handleDataLinkWithTableKeys = ({
|
|
|
10179
10188
|
};
|
|
10180
10189
|
const isUploadFieldEmpty = (fieldKey, itemToCheck) => {
|
|
10181
10190
|
if (uploadTypeFields.includes(fieldKey)) {
|
|
10182
|
-
const itemValue = itemToCheck
|
|
10191
|
+
const itemValue = itemToCheck === null || itemToCheck === void 0 ? void 0 : itemToCheck[fieldKey];
|
|
10183
10192
|
return itemValue === undefined || itemValue === null || Array.isArray(itemValue) && itemValue.length === 0;
|
|
10184
10193
|
}
|
|
10185
10194
|
return false;
|
|
10186
10195
|
};
|
|
10187
10196
|
const processedTableKeys = processConditionalTableKeys(tableKeys, item);
|
|
10188
10197
|
processedTableKeys.filter(tableKey => tableKey !== 'datastakeId').filter(tableKey => !isUploadFieldEmpty(tableKey, item)).forEach(tableKey => {
|
|
10189
|
-
|
|
10198
|
+
var _dataLinkForm$identif;
|
|
10199
|
+
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]);
|
|
10190
10200
|
if (formInputConfig) {
|
|
10191
|
-
|
|
10192
|
-
|
|
10201
|
+
var _item$linking, _formInputConfig$meta, _formInputConfig$tabl;
|
|
10202
|
+
inputs[tableKey] = _objectSpread2(_objectSpread2({}, formInputConfig), {}, {
|
|
10193
10203
|
label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : formInputConfig.label || formInputConfig.tableLabel || tableKey
|
|
10194
|
-
};
|
|
10204
|
+
});
|
|
10195
10205
|
if (formInputConfig.label && typeof formInputConfig.label === 'object') {
|
|
10196
10206
|
const dynamicLabelKeys = Object.keys(formInputConfig.label);
|
|
10197
10207
|
let resolvedLabel = null;
|
|
@@ -10199,7 +10209,7 @@ const handleDataLinkWithTableKeys = ({
|
|
|
10199
10209
|
const parts = labelKey.split(' is ');
|
|
10200
10210
|
if (parts.length === 2) {
|
|
10201
10211
|
const [conditionKey, conditionValue] = parts;
|
|
10202
|
-
if (item
|
|
10212
|
+
if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
|
|
10203
10213
|
resolvedLabel = formInputConfig.label[labelKey];
|
|
10204
10214
|
break;
|
|
10205
10215
|
}
|
|
@@ -10207,16 +10217,17 @@ const handleDataLinkWithTableKeys = ({
|
|
|
10207
10217
|
}
|
|
10208
10218
|
inputs[tableKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey);
|
|
10209
10219
|
}
|
|
10210
|
-
values[tableKey] = item
|
|
10220
|
+
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]);
|
|
10211
10221
|
} else {
|
|
10222
|
+
var _item$linking2;
|
|
10212
10223
|
inputs[tableKey] = {
|
|
10213
10224
|
label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey,
|
|
10214
|
-
type: inputConfig
|
|
10225
|
+
type: inputConfig === null || inputConfig === void 0 ? void 0 : inputConfig.type
|
|
10215
10226
|
};
|
|
10216
|
-
values[tableKey] = item
|
|
10227
|
+
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]);
|
|
10217
10228
|
}
|
|
10218
10229
|
});
|
|
10219
|
-
if (dataLinkForm
|
|
10230
|
+
if (dataLinkForm !== null && dataLinkForm !== void 0 && dataLinkForm.identification && typeof dataLinkForm.identification === 'object') {
|
|
10220
10231
|
Object.keys(dataLinkForm.identification).filter(fieldKey => {
|
|
10221
10232
|
if (uploadTypeFields.includes(fieldKey)) {
|
|
10222
10233
|
return !isUploadFieldEmpty(fieldKey, item);
|
|
@@ -10226,11 +10237,11 @@ const handleDataLinkWithTableKeys = ({
|
|
|
10226
10237
|
const formInputConfig = dataLinkForm.identification[fieldKey];
|
|
10227
10238
|
return formInputConfig && typeof formInputConfig === 'object' && !Array.isArray(formInputConfig);
|
|
10228
10239
|
}).forEach(fieldKey => {
|
|
10240
|
+
var _item$linking3, _formInputConfig$tabl2;
|
|
10229
10241
|
const formInputConfig = dataLinkForm.identification[fieldKey];
|
|
10230
|
-
inputs[fieldKey] = {
|
|
10231
|
-
...formInputConfig,
|
|
10242
|
+
inputs[fieldKey] = _objectSpread2(_objectSpread2({}, formInputConfig), {}, {
|
|
10232
10243
|
label: uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : formInputConfig.label || formInputConfig.tableLabel || fieldKey
|
|
10233
|
-
};
|
|
10244
|
+
});
|
|
10234
10245
|
if (formInputConfig.label && typeof formInputConfig.label === 'object') {
|
|
10235
10246
|
const dynamicLabelKeys = Object.keys(formInputConfig.label);
|
|
10236
10247
|
let resolvedLabel = null;
|
|
@@ -10238,7 +10249,7 @@ const handleDataLinkWithTableKeys = ({
|
|
|
10238
10249
|
const parts = labelKey.split(' is ');
|
|
10239
10250
|
if (parts.length === 2) {
|
|
10240
10251
|
const [conditionKey, conditionValue] = parts;
|
|
10241
|
-
if (item
|
|
10252
|
+
if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
|
|
10242
10253
|
resolvedLabel = formInputConfig.label[labelKey];
|
|
10243
10254
|
break;
|
|
10244
10255
|
}
|
|
@@ -10246,7 +10257,7 @@ const handleDataLinkWithTableKeys = ({
|
|
|
10246
10257
|
}
|
|
10247
10258
|
inputs[fieldKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : fieldKey);
|
|
10248
10259
|
}
|
|
10249
|
-
values[fieldKey] = item
|
|
10260
|
+
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]);
|
|
10250
10261
|
});
|
|
10251
10262
|
}
|
|
10252
10263
|
return {
|
|
@@ -10256,7 +10267,7 @@ const handleDataLinkWithTableKeys = ({
|
|
|
10256
10267
|
};
|
|
10257
10268
|
if (Array.isArray(value)) {
|
|
10258
10269
|
return value.map((item, itemIndex) => {
|
|
10259
|
-
const datastakeIdValue = item
|
|
10270
|
+
const datastakeIdValue = item === null || item === void 0 ? void 0 : item.datastakeId;
|
|
10260
10271
|
const {
|
|
10261
10272
|
inputs,
|
|
10262
10273
|
values
|
|
@@ -10265,9 +10276,9 @@ const handleDataLinkWithTableKeys = ({
|
|
|
10265
10276
|
return null;
|
|
10266
10277
|
}
|
|
10267
10278
|
return /*#__PURE__*/jsxRuntime.jsx(TreeNodeComponent, {
|
|
10268
|
-
nodeKey: datastakeIdValue || t(
|
|
10279
|
+
nodeKey: datastakeIdValue || t("No ID ".concat(itemIndex + 1)),
|
|
10269
10280
|
config: {
|
|
10270
|
-
label: datastakeIdValue || t(
|
|
10281
|
+
label: datastakeIdValue || t("No ID ".concat(itemIndex + 1)),
|
|
10271
10282
|
type: 'custom-datalink',
|
|
10272
10283
|
inputs: inputs
|
|
10273
10284
|
},
|
|
@@ -10281,10 +10292,10 @@ const handleDataLinkWithTableKeys = ({
|
|
|
10281
10292
|
getApiBaseUrl: getApiBaseUrl,
|
|
10282
10293
|
getAppHeader: getAppHeader,
|
|
10283
10294
|
app: app
|
|
10284
|
-
},
|
|
10295
|
+
}, "".concat(inputKey, "-").concat(itemIndex));
|
|
10285
10296
|
});
|
|
10286
10297
|
} else {
|
|
10287
|
-
const datastakeIdValue = value
|
|
10298
|
+
const datastakeIdValue = value === null || value === void 0 ? void 0 : value.datastakeId;
|
|
10288
10299
|
const {
|
|
10289
10300
|
inputs,
|
|
10290
10301
|
values
|
|
@@ -10309,25 +10320,24 @@ const handleDataLinkWithTableKeys = ({
|
|
|
10309
10320
|
getApiBaseUrl: getApiBaseUrl,
|
|
10310
10321
|
getAppHeader: getAppHeader,
|
|
10311
10322
|
app: app
|
|
10312
|
-
},
|
|
10323
|
+
}, "".concat(inputKey, "-single"));
|
|
10313
10324
|
}
|
|
10314
10325
|
};
|
|
10315
10326
|
|
|
10316
|
-
const handleGroupChildren =
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
if (!(config !== null && config !== void 0 && config.inputs)) {
|
|
10327
|
+
const handleGroupChildren = ({
|
|
10328
|
+
config,
|
|
10329
|
+
value,
|
|
10330
|
+
allData,
|
|
10331
|
+
level,
|
|
10332
|
+
t,
|
|
10333
|
+
rootForm,
|
|
10334
|
+
user,
|
|
10335
|
+
getApiBaseUrl = () => {},
|
|
10336
|
+
getAppHeader = () => {},
|
|
10337
|
+
app,
|
|
10338
|
+
TreeNodeComponent
|
|
10339
|
+
}) => {
|
|
10340
|
+
if (!config?.inputs) {
|
|
10331
10341
|
return null;
|
|
10332
10342
|
}
|
|
10333
10343
|
const inputKeys = Object.keys(config.inputs);
|
|
@@ -10340,7 +10350,7 @@ const handleGroupChildren = _ref => {
|
|
|
10340
10350
|
if (value && typeof value === 'object' && value[inputKey]) {
|
|
10341
10351
|
inputValue = value[inputKey];
|
|
10342
10352
|
} else {
|
|
10343
|
-
inputValue = allData
|
|
10353
|
+
inputValue = allData?.[inputKey];
|
|
10344
10354
|
}
|
|
10345
10355
|
return /*#__PURE__*/jsxRuntime.jsx(TreeNodeComponent, {
|
|
10346
10356
|
nodeKey: inputKey,
|
|
@@ -10490,11 +10500,12 @@ const AjaxSubGroup$2 = ({
|
|
|
10490
10500
|
};
|
|
10491
10501
|
|
|
10492
10502
|
const handleAjaxSubGroupChildren = props => {
|
|
10493
|
-
|
|
10494
|
-
if (((_props$config = props.config) === null || _props$config === void 0 ? void 0 : _props$config.type) !== 'ajaxSubGroup' || !Array.isArray(props.value)) {
|
|
10503
|
+
if (props.config?.type !== 'ajaxSubGroup' || !Array.isArray(props.value)) {
|
|
10495
10504
|
return null;
|
|
10496
10505
|
}
|
|
10497
|
-
return [/*#__PURE__*/jsxRuntime.jsx(AjaxSubGroup$2,
|
|
10506
|
+
return [/*#__PURE__*/jsxRuntime.jsx(AjaxSubGroup$2, {
|
|
10507
|
+
...props
|
|
10508
|
+
}, "ajax-subgroup")];
|
|
10498
10509
|
};
|
|
10499
10510
|
|
|
10500
10511
|
const TreeNode = _ref => {
|
|
@@ -44104,11 +44115,7 @@ const useFilters = ({
|
|
|
44104
44115
|
return Math.ceil(pagination.total / pagination.pageSize);
|
|
44105
44116
|
}, [pagination]);
|
|
44106
44117
|
const canGoPrev = React.useMemo(() => pagination.current !== 1, [pagination]);
|
|
44107
|
-
const canGoNext = React.useMemo(() => pagination.current !== totalPages && totalPages, [pagination, totalPages]);
|
|
44108
|
-
console.log({
|
|
44109
|
-
totalPages,
|
|
44110
|
-
pagination
|
|
44111
|
-
});
|
|
44118
|
+
const canGoNext = React.useMemo(() => pagination.current !== totalPages && totalPages > 0, [pagination, totalPages]);
|
|
44112
44119
|
const goPrev = () => {
|
|
44113
44120
|
if (!canGoPrev) {
|
|
44114
44121
|
return;
|
|
@@ -49148,6 +49155,7 @@ const BaseGraph = /*#__PURE__*/React.forwardRef(function BaseGraph({
|
|
|
49148
49155
|
withDuration = true,
|
|
49149
49156
|
onFilterChange,
|
|
49150
49157
|
isPdf,
|
|
49158
|
+
zoomOutTransition = false,
|
|
49151
49159
|
...props
|
|
49152
49160
|
}, ref) {
|
|
49153
49161
|
const {
|
|
@@ -49203,8 +49211,11 @@ const BaseGraph = /*#__PURE__*/React.forwardRef(function BaseGraph({
|
|
|
49203
49211
|
fitView: true // zoom out on default
|
|
49204
49212
|
,
|
|
49205
49213
|
fitViewOptions: {
|
|
49206
|
-
padding: 0.2
|
|
49207
|
-
//
|
|
49214
|
+
padding: 0.2,
|
|
49215
|
+
//zoom out on default
|
|
49216
|
+
...(zoomOutTransition ? {
|
|
49217
|
+
duration: withDuration ? 300 : undefined
|
|
49218
|
+
} : {})
|
|
49208
49219
|
},
|
|
49209
49220
|
...props,
|
|
49210
49221
|
children: !isPdf && /*#__PURE__*/jsxRuntime.jsxs(react.Controls, {
|
|
@@ -49801,7 +49812,8 @@ function StakeholderMappings(_ref3) {
|
|
|
49801
49812
|
iconOffsetY = 250,
|
|
49802
49813
|
t = s => s,
|
|
49803
49814
|
emptyString = undefined,
|
|
49804
|
-
isPdf = false
|
|
49815
|
+
isPdf = false,
|
|
49816
|
+
zoomOutTransition = false
|
|
49805
49817
|
} = _ref3;
|
|
49806
49818
|
const reactFlowWrapper = React.useRef(null);
|
|
49807
49819
|
const [nodes, setNodes] = react.useNodesState([]);
|
|
@@ -50066,6 +50078,7 @@ function StakeholderMappings(_ref3) {
|
|
|
50066
50078
|
});
|
|
50067
50079
|
}, [reactFlowWrapper.current, JSON.stringify(data), JSON.stringify(selectedIconNodes), isAllOpenDefault, isSelectable, isChanged, emptyString]);
|
|
50068
50080
|
return /*#__PURE__*/jsxRuntime.jsx(BaseGraph, {
|
|
50081
|
+
zoomOutTransition: zoomOutTransition,
|
|
50069
50082
|
nodes: nodes,
|
|
50070
50083
|
mandatoryNodesToFit: mandatoryNodesToFit,
|
|
50071
50084
|
edges: edges,
|
|
@@ -60262,6 +60275,32 @@ CountryFlag.propTypes = {
|
|
|
60262
60275
|
hasTooltip: PropTypes__default["default"].bool
|
|
60263
60276
|
};
|
|
60264
60277
|
|
|
60278
|
+
function KeyIndicatorNavigateLabel(_ref) {
|
|
60279
|
+
let {
|
|
60280
|
+
t,
|
|
60281
|
+
getRedirectLink,
|
|
60282
|
+
theme,
|
|
60283
|
+
label,
|
|
60284
|
+
link
|
|
60285
|
+
} = _ref;
|
|
60286
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
60287
|
+
className: "flex",
|
|
60288
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
60289
|
+
className: "flex-1",
|
|
60290
|
+
children: t(label)
|
|
60291
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
60292
|
+
className: "cursor-pointer",
|
|
60293
|
+
onClick: () => window.open(getRedirectLink(link), '_blank'),
|
|
60294
|
+
children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
|
|
60295
|
+
name: "LinkNewTab",
|
|
60296
|
+
width: 16,
|
|
60297
|
+
height: 16,
|
|
60298
|
+
color: theme.colorPrimary
|
|
60299
|
+
})
|
|
60300
|
+
})]
|
|
60301
|
+
});
|
|
60302
|
+
}
|
|
60303
|
+
|
|
60265
60304
|
var Style$5 = styled__default["default"].div`
|
|
60266
60305
|
display: flex;
|
|
60267
60306
|
flex-direction: column;
|
|
@@ -61603,6 +61642,7 @@ exports.InformationChannelsDataPoint = DataPoint;
|
|
|
61603
61642
|
exports.InformationChannelsSubject = Subject;
|
|
61604
61643
|
exports.InformationChannelsView = InformationChannel;
|
|
61605
61644
|
exports.InformationUnavailable = InformationUnavailable;
|
|
61645
|
+
exports.KeyIndicatorNavigateLabel = KeyIndicatorNavigateLabel;
|
|
61606
61646
|
exports.KeyIndicators = KeyIndicatorsWidget$1;
|
|
61607
61647
|
exports.KeyIndicatorsDetails = KeyIndicatorsDetails;
|
|
61608
61648
|
exports.LineChart = LineChart;
|