datastake-daf 0.6.786 → 0.6.788

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 (22) hide show
  1. package/dist/components/index.js +226 -91
  2. package/dist/pages/index.js +774 -33
  3. package/dist/style/datastake/mapbox-gl.css +330 -0
  4. package/package.json +1 -1
  5. package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/ActivityIndicators.stories.js +24 -0
  6. package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/index.jsx +1 -0
  7. package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/style.js +34 -0
  8. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/KeyIndicators.stories.js +39 -0
  9. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/LabelWithIcon.jsx +38 -0
  10. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/index.jsx +16 -3
  11. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/style.js +33 -0
  12. package/src/@daf/pages/Summary/Activities/Monitoring/components/ActivityImagery/index.jsx +29 -0
  13. package/src/@daf/pages/Summary/Activities/Monitoring/components/ActivityLocation/index.jsx +94 -0
  14. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/PlantedSpecies/index.jsx +56 -0
  15. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/SeedlingsHeight/index.jsx +121 -0
  16. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/SurvivalRate/index.jsx +94 -0
  17. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/index.jsx +54 -0
  18. package/src/@daf/pages/Summary/Activities/Monitoring/components/WorkersDistribution/index.jsx +49 -0
  19. package/src/@daf/pages/Summary/Activities/Monitoring/config.js +51 -0
  20. package/src/@daf/pages/Summary/Activities/Monitoring/helper.js +236 -0
  21. package/src/@daf/pages/Summary/Activities/Monitoring/index.jsx +66 -0
  22. package/src/pages.js +1 -0
@@ -9612,27 +9612,25 @@ const renderFieldData = (type, value, user, config, getApiBaseUrl = () => {}, ge
9612
9612
  }
9613
9613
  };
9614
9614
 
9615
- const renderValue = _ref => {
9616
- let {
9617
- value,
9618
- hasChildren,
9619
- config,
9620
- user,
9621
- getApiBaseUrl = () => {},
9622
- getAppHeader = () => {},
9623
- app,
9624
- allData = {}
9625
- } = _ref;
9626
- if ((config === null || config === void 0 ? void 0 : config.type) === 'groupInputs') {
9627
- if (!(config !== null && config !== void 0 && config.inputs)) return null;
9615
+ const renderValue = ({
9616
+ value,
9617
+ hasChildren,
9618
+ config,
9619
+ user,
9620
+ getApiBaseUrl = () => {},
9621
+ getAppHeader = () => {},
9622
+ app,
9623
+ allData = {}
9624
+ }) => {
9625
+ if (config?.type === 'groupInputs') {
9626
+ if (!config?.inputs) return null;
9628
9627
  const inputKeys = Object.keys(config.inputs).sort((a, b) => {
9629
- var _config$inputs$a, _config$inputs$b;
9630
- const positionA = ((_config$inputs$a = config.inputs[a]) === null || _config$inputs$a === void 0 ? void 0 : _config$inputs$a.position) || 0;
9631
- const positionB = ((_config$inputs$b = config.inputs[b]) === null || _config$inputs$b === void 0 ? void 0 : _config$inputs$b.position) || 0;
9628
+ const positionA = config.inputs[a]?.position || 0;
9629
+ const positionB = config.inputs[b]?.position || 0;
9632
9630
  return positionA - positionB;
9633
9631
  });
9634
9632
  const values = inputKeys.map(inputKey => {
9635
- let inputValue = value === null || value === void 0 ? void 0 : value[inputKey];
9633
+ let inputValue = value?.[inputKey];
9636
9634
  if (inputValue === null || inputValue === undefined || inputValue === '') {
9637
9635
  return '';
9638
9636
  } else if (typeof inputValue === 'object' && inputValue !== null) {
@@ -9673,8 +9671,8 @@ const renderValue = _ref => {
9673
9671
  } else {
9674
9672
  displayValue = String(value);
9675
9673
  }
9676
- const fieldType = (config === null || config === void 0 ? void 0 : config.type) || 'text';
9677
- let cssClass = "tree-value ".concat(fieldType, "-type");
9674
+ const fieldType = config?.type || 'text';
9675
+ let cssClass = `tree-value ${fieldType}-type`;
9678
9676
  if (displayValue === '-') {
9679
9677
  cssClass += ' empty';
9680
9678
  }
@@ -9684,21 +9682,19 @@ const renderValue = _ref => {
9684
9682
  children: displayValue
9685
9683
  });
9686
9684
  };
9687
- const determineHasChildren = _ref2 => {
9688
- var _config$meta;
9689
- let {
9690
- config,
9691
- level
9692
- } = _ref2;
9693
- if ((config === null || config === void 0 ? void 0 : config.type) === 'groupInputs') {
9685
+ const determineHasChildren = ({
9686
+ config,
9687
+ level
9688
+ }) => {
9689
+ if (config?.type === 'groupInputs') {
9694
9690
  return false;
9695
9691
  }
9696
- if ((config === null || config === void 0 ? void 0 : config.type) === 'header' && config !== null && config !== void 0 && config.inputs && Object.keys(config.inputs).length > 0) {
9692
+ if (config?.type === 'header' && config?.inputs && Object.keys(config.inputs).length > 0) {
9697
9693
  return true;
9698
9694
  }
9699
- 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' ||
9695
+ return config?.inputs || config?.type === 'group' || config?.type === 'dataLinkGroup' || config?.type === 'section' || config?.type === 'ajaxSubGroup' ||
9700
9696
  // Add this line
9701
- (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);
9697
+ config?.type === 'dataLink' && 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);
9702
9698
  };
9703
9699
 
9704
9700
  const sortByPosition = (items, getConfig) => {
@@ -9971,44 +9967,44 @@ function useAjaxModal$2({
9971
9967
  }
9972
9968
 
9973
9969
  const mergeObject = obj => {
9974
- return Object.entries(obj || {}).reduce((acc, [key, value]) => {
9970
+ return Object.entries(obj || {}).reduce((acc, _ref) => {
9971
+ let [key, value] = _ref;
9975
9972
  if (typeof value === "object" && !Array.isArray(value) && value !== null) {
9976
- return {
9977
- ...acc,
9978
- ...value
9979
- };
9973
+ return _objectSpread2(_objectSpread2({}, acc), value);
9980
9974
  }
9981
- return {
9982
- ...acc,
9975
+ return _objectSpread2(_objectSpread2({}, acc), {}, {
9983
9976
  [key]: value
9984
- };
9977
+ });
9985
9978
  }, {});
9986
9979
  };
9987
- const handleDataLinkGroupWithTableKeys = ({
9988
- config,
9989
- inputConfig,
9990
- inputKey,
9991
- value,
9992
- level,
9993
- t,
9994
- rootForm,
9995
- allData,
9996
- user,
9997
- getApiBaseUrl = () => {},
9998
- getAppHeader = () => {},
9999
- app,
10000
- TreeNodeComponent
10001
- }) => {
9980
+ const handleDataLinkGroupWithTableKeys = _ref2 => {
9981
+ var _inputConfig$meta, _config$meta2, _inputConfig$meta3, _inputConfig$meta4, _inputConfig$meta5;
9982
+ let {
9983
+ config,
9984
+ inputConfig,
9985
+ inputKey,
9986
+ value,
9987
+ level,
9988
+ t,
9989
+ rootForm,
9990
+ allData,
9991
+ user,
9992
+ getApiBaseUrl = () => {},
9993
+ getAppHeader = () => {},
9994
+ app,
9995
+ TreeNodeComponent
9996
+ } = _ref2;
10002
9997
  if (!(config.type === 'dataLinkGroup' || config.type === 'dataLink')) {
10003
9998
  return null;
10004
9999
  }
10005
- if (inputConfig?.type !== 'dataLink' || !inputConfig?.meta?.tableKeys) {
10000
+ 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)) {
10006
10001
  const parentInputKeys = Object.keys(config.inputs || {});
10007
10002
  const isHandledBySiblingDataLink = parentInputKeys.some(otherInputKey => {
10008
10003
  const otherConfig = config.inputs[otherInputKey];
10009
- if (otherConfig?.type === 'dataLink') {
10010
- const siblingTableKeys = otherConfig?.meta?.tableKeys || [];
10011
- const additionalTableKeys = config.meta?.additionalTableKeys || [];
10004
+ if ((otherConfig === null || otherConfig === void 0 ? void 0 : otherConfig.type) === 'dataLink') {
10005
+ var _otherConfig$meta, _config$meta;
10006
+ const siblingTableKeys = (otherConfig === null || otherConfig === void 0 || (_otherConfig$meta = otherConfig.meta) === null || _otherConfig$meta === void 0 ? void 0 : _otherConfig$meta.tableKeys) || [];
10007
+ const additionalTableKeys = ((_config$meta = config.meta) === null || _config$meta === void 0 ? void 0 : _config$meta.additionalTableKeys) || [];
10012
10008
  const allSiblingKeys = [...siblingTableKeys, ...additionalTableKeys];
10013
10009
  return allSiblingKeys.includes(inputKey) && otherInputKey !== inputKey;
10014
10010
  }
@@ -10022,23 +10018,26 @@ const handleDataLinkGroupWithTableKeys = ({
10022
10018
  return null;
10023
10019
  }
10024
10020
  const tableKeys = inputConfig.meta.tableKeys;
10025
- const additionalTableKeys = config.meta?.additionalTableKeys || [];
10021
+ const additionalTableKeys = ((_config$meta2 = config.meta) === null || _config$meta2 === void 0 ? void 0 : _config$meta2.additionalTableKeys) || [];
10026
10022
  const parentInputKeys = Object.keys(config.inputs || {});
10027
10023
  const siblingInputsMatchingTableKeys = parentInputKeys.filter(siblingKey => siblingKey !== inputKey).filter(siblingKey => tableKeys.includes(siblingKey) || additionalTableKeys.includes(siblingKey));
10028
10024
  [...new Set([...tableKeys, ...siblingInputsMatchingTableKeys])];
10029
- const isAjaxModal = React.useMemo(() => !!inputConfig?.meta?.namespace, [inputConfig]);
10025
+ const isAjaxModal = React.useMemo(() => {
10026
+ var _inputConfig$meta2;
10027
+ return !!(inputConfig !== null && inputConfig !== void 0 && (_inputConfig$meta2 = inputConfig.meta) !== null && _inputConfig$meta2 !== void 0 && _inputConfig$meta2.namespace);
10028
+ }, [inputConfig]);
10030
10029
  const ajaxModalValues = useAjaxModal$2({
10031
10030
  name: inputKey,
10032
10031
  user,
10033
- namespace: inputConfig?.meta?.namespace,
10034
- skipFetch: inputConfig?.meta?.skipFetch,
10032
+ namespace: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta3 = inputConfig.meta) === null || _inputConfig$meta3 === void 0 ? void 0 : _inputConfig$meta3.namespace,
10033
+ skipFetch: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta4 = inputConfig.meta) === null || _inputConfig$meta4 === void 0 ? void 0 : _inputConfig$meta4.skipFetch,
10035
10034
  isAjaxModal,
10036
- formScope: inputConfig?.meta?.formScope,
10035
+ formScope: inputConfig === null || inputConfig === void 0 || (_inputConfig$meta5 = inputConfig.meta) === null || _inputConfig$meta5 === void 0 ? void 0 : _inputConfig$meta5.formScope,
10037
10036
  APP: app,
10038
10037
  apiBaseUrl: getApiBaseUrl(),
10039
10038
  _getAppHeader: getAppHeader
10040
10039
  });
10041
- const dataLinkForm = ajaxModalValues?.form;
10040
+ const dataLinkForm = ajaxModalValues === null || ajaxModalValues === void 0 ? void 0 : ajaxModalValues.form;
10042
10041
  const createInputsAndValues = item => {
10043
10042
  const inputs = {};
10044
10043
  const values = {};
@@ -10050,12 +10049,12 @@ const handleDataLinkGroupWithTableKeys = ({
10050
10049
  'videos': 'Video'
10051
10050
  };
10052
10051
  tableKeys.filter(tableKey => tableKey !== 'datastakeId').forEach(tableKey => {
10053
- const formInputConfig = dataLinkForm?.[tableKey] || dataLinkForm?.['identification']?.[tableKey];
10052
+ var _dataLinkForm$identif;
10053
+ 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]);
10054
10054
  if (formInputConfig) {
10055
- inputs[tableKey] = {
10056
- ...formInputConfig,
10055
+ inputs[tableKey] = _objectSpread2(_objectSpread2({}, formInputConfig), {}, {
10057
10056
  label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : formInputConfig.label || formInputConfig.tableLabel || tableKey
10058
- };
10057
+ });
10059
10058
  if (formInputConfig.label && typeof formInputConfig.label === 'object') {
10060
10059
  const dynamicLabelKeys = Object.keys(formInputConfig.label);
10061
10060
  let resolvedLabel = null;
@@ -10063,7 +10062,7 @@ const handleDataLinkGroupWithTableKeys = ({
10063
10062
  const parts = labelKey.split(' is ');
10064
10063
  if (parts.length === 2) {
10065
10064
  const [conditionKey, conditionValue] = parts;
10066
- if (item?.[conditionKey] === conditionValue) {
10065
+ if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
10067
10066
  resolvedLabel = formInputConfig.label[labelKey];
10068
10067
  break;
10069
10068
  }
@@ -10071,37 +10070,37 @@ const handleDataLinkGroupWithTableKeys = ({
10071
10070
  }
10072
10071
  inputs[tableKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey);
10073
10072
  }
10074
- values[tableKey] = item?.[tableKey];
10073
+ values[tableKey] = item === null || item === void 0 ? void 0 : item[tableKey];
10075
10074
  } else {
10075
+ var _item$linking;
10076
10076
  inputs[tableKey] = {
10077
10077
  label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey,
10078
- type: inputConfig?.type
10078
+ type: inputConfig === null || inputConfig === void 0 ? void 0 : inputConfig.type
10079
10079
  };
10080
- values[tableKey] = item?.linking?.SCL?.[item?.[tableKey]]?.name || item?.[tableKey];
10080
+ 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]);
10081
10081
  }
10082
10082
  });
10083
10083
  siblingInputsMatchingTableKeys.forEach(siblingKey => {
10084
10084
  const siblingConfig = config.inputs[siblingKey];
10085
10085
  if (siblingConfig) {
10086
- inputs[siblingKey] = {
10087
- ...siblingConfig,
10086
+ inputs[siblingKey] = _objectSpread2(_objectSpread2({}, siblingConfig), {}, {
10088
10087
  label: siblingConfig.label || siblingKey
10089
- };
10090
- values[siblingKey] = item?.[siblingKey];
10088
+ });
10089
+ values[siblingKey] = item === null || item === void 0 ? void 0 : item[siblingKey];
10091
10090
  }
10092
10091
  });
10093
- if (dataLinkForm?.identification && typeof dataLinkForm.identification === 'object') {
10092
+ if (dataLinkForm !== null && dataLinkForm !== void 0 && dataLinkForm.identification && typeof dataLinkForm.identification === 'object') {
10094
10093
  Object.keys(dataLinkForm.identification).filter(fieldKey => fieldKey !== 'datastakeId' && !tableKeys.includes(fieldKey)).filter(fieldKey => {
10095
10094
  const formInputConfig = dataLinkForm.identification[fieldKey];
10096
10095
  return formInputConfig && typeof formInputConfig === 'object' && !Array.isArray(formInputConfig);
10097
10096
  }).forEach(fieldKey => {
10097
+ var _item$linking2;
10098
10098
  const formInputConfig = dataLinkForm.identification[fieldKey];
10099
- inputs[fieldKey] = {
10100
- ...formInputConfig,
10099
+ inputs[fieldKey] = _objectSpread2(_objectSpread2({}, formInputConfig), {}, {
10101
10100
  label: uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : formInputConfig.label || formInputConfig.tableLabel || fieldKey
10102
- };
10103
- if (formInputConfig?.label && typeof formInputConfig?.label === 'object') {
10104
- const dynamicLabelKeys = Object.keys(formInputConfig?.label);
10101
+ });
10102
+ if (formInputConfig !== null && formInputConfig !== void 0 && formInputConfig.label && typeof (formInputConfig === null || formInputConfig === void 0 ? void 0 : formInputConfig.label) === 'object') {
10103
+ const dynamicLabelKeys = Object.keys(formInputConfig === null || formInputConfig === void 0 ? void 0 : formInputConfig.label);
10105
10104
  let resolvedLabel = null;
10106
10105
  for (const labelKey of dynamicLabelKeys) {
10107
10106
  const parts = labelKey.split(' is ');
@@ -10110,7 +10109,7 @@ const handleDataLinkGroupWithTableKeys = ({
10110
10109
  const flattenedItem = Object.assign({}, item.location, {
10111
10110
  address: item.address
10112
10111
  });
10113
- if (flattenedItem?.[conditionKey] === conditionValue) {
10112
+ if ((flattenedItem === null || flattenedItem === void 0 ? void 0 : flattenedItem[conditionKey]) === conditionValue) {
10114
10113
  resolvedLabel = formInputConfig.label[labelKey];
10115
10114
  break;
10116
10115
  }
@@ -10118,7 +10117,7 @@ const handleDataLinkGroupWithTableKeys = ({
10118
10117
  }
10119
10118
  inputs[fieldKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : fieldKey);
10120
10119
  }
10121
- values[fieldKey] = item?.linking?.SCL?.[item?.[fieldKey]]?.name || item?.[fieldKey];
10120
+ 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]);
10122
10121
  });
10123
10122
  }
10124
10123
  return {
@@ -10128,16 +10127,17 @@ const handleDataLinkGroupWithTableKeys = ({
10128
10127
  };
10129
10128
  if (Array.isArray(value)) {
10130
10129
  return value.map((item, itemIndex) => {
10130
+ var _merged$inputKey;
10131
10131
  const merged = mergeObject(item);
10132
- const datastakeIdValue = merged?.[inputKey]?.datastakeId || merged?.datastakeId;
10132
+ 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);
10133
10133
  const {
10134
10134
  inputs,
10135
10135
  values
10136
10136
  } = createInputsAndValues(merged);
10137
10137
  return /*#__PURE__*/jsxRuntime.jsx(TreeNodeComponent, {
10138
- nodeKey: datastakeIdValue || t(`No ID ${itemIndex + 1}`),
10138
+ nodeKey: datastakeIdValue || t("No ID ".concat(itemIndex + 1)),
10139
10139
  config: {
10140
- label: datastakeIdValue || t(`No ID ${itemIndex + 1}`),
10140
+ label: datastakeIdValue || t("No ID ".concat(itemIndex + 1)),
10141
10141
  type: 'custom-datalink-group',
10142
10142
  inputs: inputs
10143
10143
  },
@@ -10151,11 +10151,12 @@ const handleDataLinkGroupWithTableKeys = ({
10151
10151
  getApiBaseUrl: getApiBaseUrl,
10152
10152
  getAppHeader: getAppHeader,
10153
10153
  app: app
10154
- }, `${inputKey}-${itemIndex}`);
10154
+ }, "".concat(inputKey, "-").concat(itemIndex));
10155
10155
  });
10156
10156
  } else {
10157
+ var _merged$inputKey2;
10157
10158
  const merged = mergeObject(value);
10158
- const datastakeIdValue = merged?.[inputKey]?.datastakeId || merged?.datastakeId;
10159
+ 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);
10159
10160
  const {
10160
10161
  inputs,
10161
10162
  values
@@ -10177,7 +10178,7 @@ const handleDataLinkGroupWithTableKeys = ({
10177
10178
  getApiBaseUrl: getApiBaseUrl,
10178
10179
  getAppHeader: getAppHeader,
10179
10180
  app: app
10180
- }, `${inputKey}-group`);
10181
+ }, "".concat(inputKey, "-group"));
10181
10182
  }
10182
10183
  };
10183
10184
 
@@ -12028,12 +12029,45 @@ const Style$O = styled__default["default"].div`
12028
12029
  margin-top: 14px;
12029
12030
  }
12030
12031
  }
12032
+
12033
+ &.row-item-with-icon {
12034
+ display: flex;
12035
+ align-items: center;
12036
+ justify-content: space-between;
12037
+ gap: 8px;
12038
+
12039
+ h4 {
12040
+ margin-bottom: 0;
12041
+ flex: 0 0 auto;
12042
+ }
12043
+
12044
+ .flex {
12045
+ flex: 0 0 auto;
12046
+ display: flex;
12047
+ align-items: center;
12048
+ font-size: 16px;
12049
+ font-weight: 500;
12050
+ line-height: 38px;
12051
+ letter-spacing: 0;
12052
+ color: var(--base-gray-90);
12053
+ font-family: 'SF UI Display', -apple-system, BlinkMacSystemFont, sans-serif;
12054
+ }
12055
+ }
12031
12056
  }
12032
12057
 
12033
12058
  &.small-content {
12034
12059
  span {
12035
12060
  font-size: 16px;
12036
12061
  }
12062
+
12063
+ .row-item-with-icon {
12064
+ .flex {
12065
+ font-size: 16px;
12066
+ line-height: 38px;
12067
+ font-weight: 500;
12068
+ color: var(--base-gray-90);
12069
+ }
12070
+ }
12037
12071
  }
12038
12072
 
12039
12073
  .ant-tag {
@@ -12143,6 +12177,50 @@ const NoMinWidth$1 = styled__default["default"].div`
12143
12177
  }
12144
12178
  `;
12145
12179
 
12180
+ const LabelWithIcon = ({
12181
+ t,
12182
+ name,
12183
+ icon,
12184
+ iconColor = "#028788",
12185
+ iconWidth = 16,
12186
+ iconHeight = 16
12187
+ }) => {
12188
+ // name is expected to be already translated (string) or a translation key
12189
+ // If it's a string that looks like a translation key (contains '::'), translate it
12190
+ // Otherwise, use it as-is (already translated)
12191
+ const displayText = typeof name === 'string' && name.includes('::') && t && typeof t === 'function' ? t(name) : name;
12192
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
12193
+ className: "flex items-center",
12194
+ style: {
12195
+ gap: 8
12196
+ },
12197
+ children: [icon && /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
12198
+ name: icon,
12199
+ color: iconColor,
12200
+ width: iconWidth,
12201
+ height: iconHeight
12202
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
12203
+ style: {
12204
+ fontSize: '14px',
12205
+ fontWeight: 500,
12206
+ lineHeight: '26px',
12207
+ letterSpacing: '0%',
12208
+ color: 'var(--base-gray-70)',
12209
+ fontFamily: 'SF UI Display, -apple-system, BlinkMacSystemFont, sans-serif'
12210
+ },
12211
+ children: displayText
12212
+ })]
12213
+ });
12214
+ };
12215
+ LabelWithIcon.propTypes = {
12216
+ t: PropTypes__default["default"].func,
12217
+ name: PropTypes__default["default"].string.isRequired,
12218
+ icon: PropTypes__default["default"].string,
12219
+ iconColor: PropTypes__default["default"].string,
12220
+ iconWidth: PropTypes__default["default"].number,
12221
+ iconHeight: PropTypes__default["default"].number
12222
+ };
12223
+
12146
12224
  function KeyIndicatorsWidget$1(_ref) {
12147
12225
  let {
12148
12226
  t = s => s,
@@ -12164,10 +12242,12 @@ function KeyIndicatorsWidget$1(_ref) {
12164
12242
  children: [children, /*#__PURE__*/jsxRuntime.jsx(Style$O, {
12165
12243
  className: formatClassname(["flex", className]),
12166
12244
  children: config.map((c, i) => /*#__PURE__*/jsxRuntime.jsxs("div", {
12167
- className: "row-item",
12245
+ className: "row-item ".concat(c.icon ? 'row-item-with-icon' : ''),
12168
12246
  children: [/*#__PURE__*/jsxRuntime.jsx(Label$2, {
12169
12247
  label: c.label,
12170
- withTooltip: withTooltip
12248
+ icon: c.icon,
12249
+ withTooltip: withTooltip,
12250
+ t: t
12171
12251
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
12172
12252
  className: "flex",
12173
12253
  children: c.render()
@@ -12185,8 +12265,29 @@ function KeyIndicatorsWidget$1(_ref) {
12185
12265
  function Label$2(_ref2) {
12186
12266
  let {
12187
12267
  label,
12188
- withTooltip
12268
+ icon,
12269
+ withTooltip,
12270
+ t
12189
12271
  } = _ref2;
12272
+ if (icon) {
12273
+ const labelContent = /*#__PURE__*/jsxRuntime.jsx(LabelWithIcon, {
12274
+ t: t,
12275
+ name: label,
12276
+ icon: icon
12277
+ });
12278
+ if (withTooltip) {
12279
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
12280
+ title: label,
12281
+ placement: "topLeft",
12282
+ children: /*#__PURE__*/jsxRuntime.jsx("h4", {
12283
+ children: labelContent
12284
+ })
12285
+ });
12286
+ }
12287
+ return /*#__PURE__*/jsxRuntime.jsx("h4", {
12288
+ children: labelContent
12289
+ });
12290
+ }
12190
12291
  if (withTooltip) {
12191
12292
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
12192
12293
  title: label,
@@ -12300,6 +12401,40 @@ const Style$N = styled__default["default"].div`
12300
12401
  }
12301
12402
  }
12302
12403
  }
12404
+
12405
+ &.single-column {
12406
+ grid-template-columns: 1fr;
12407
+
12408
+ .indicator-item {
12409
+ /* Remove the 2-column specific separators first */
12410
+ &:nth-child(1),
12411
+ &:nth-child(2),
12412
+ &:nth-child(3),
12413
+ &:nth-child(4) {
12414
+ &::after {
12415
+ display: none !important;
12416
+ }
12417
+ }
12418
+
12419
+ /* On single column, all items except last get separator */
12420
+ &:not(:last-child) {
12421
+ &::after {
12422
+ content: '' !important;
12423
+ position: absolute;
12424
+ bottom: 0;
12425
+ left: var(--size-lg);
12426
+ right: var(--size-lg);
12427
+ height: 1px;
12428
+ background-color: var(--border-color, #E5E7EB);
12429
+ display: block !important;
12430
+ }
12431
+ }
12432
+
12433
+ &:last-child::after {
12434
+ display: none !important;
12435
+ }
12436
+ }
12437
+ }
12303
12438
  `;
12304
12439
  const NoMinWidth = styled__default["default"].div`
12305
12440
  .indicator-item {