datastake-daf 0.6.787 → 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 (62) hide show
  1. package/build/favicon.ico +0 -0
  2. package/build/logo192.png +0 -0
  3. package/build/logo512.png +0 -0
  4. package/build/manifest.json +25 -0
  5. package/build/robots.txt +3 -0
  6. package/dist/components/index.js +579 -722
  7. package/dist/pages/index.js +774 -33
  8. package/dist/services/index.js +1 -10
  9. package/dist/style/datastake/mapbox-gl.css +330 -0
  10. package/dist/utils/index.js +12 -28
  11. package/package.json +1 -1
  12. package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/ActivityIndicators.stories.js +24 -0
  13. package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/index.jsx +1 -0
  14. package/src/@daf/core/components/Dashboard/Widget/ActivityIndicators/style.js +34 -0
  15. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/KeyIndicators.stories.js +39 -0
  16. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/LabelWithIcon.jsx +38 -0
  17. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/index.jsx +16 -3
  18. package/src/@daf/core/components/Dashboard/Widget/KeyIndicators/style.js +33 -0
  19. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/hook.js +1 -0
  20. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/TopContributors/index.jsx +1 -1
  21. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/hook.js +1 -1
  22. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/index.jsx +1 -1
  23. package/src/@daf/core/components/Screens/Admin/AdminModals/AddUser/index.jsx +1 -0
  24. package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/index.jsx +1 -1
  25. package/src/@daf/core/components/Screens/Admin/AdminModals/NewAccount/index.jsx +1 -1
  26. package/src/@daf/core/components/Screens/Admin/AdminScreens/Dashboard.jsx +2 -2
  27. package/src/@daf/core/components/Screens/Admin/AdminScreens/Location.jsx +5 -5
  28. package/src/@daf/core/components/Screens/Admin/AdminScreens/Subjects.jsx +2 -2
  29. package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/index.jsx +5 -23
  30. package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/columns.js +36 -36
  31. package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/index.jsx +21 -12
  32. package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/helper.js +8 -13
  33. package/src/@daf/core/components/Screens/Admin/AdminViews/components/Users/index.jsx +2 -2
  34. package/src/@daf/core/components/Screens/Admin/adminRoutes.js +2 -2
  35. package/src/@daf/pages/Summary/Activities/Monitoring/components/ActivityImagery/index.jsx +29 -0
  36. package/src/@daf/pages/Summary/Activities/Monitoring/components/ActivityLocation/index.jsx +94 -0
  37. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/PlantedSpecies/index.jsx +56 -0
  38. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/SeedlingsHeight/index.jsx +121 -0
  39. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/components/SurvivalRate/index.jsx +94 -0
  40. package/src/@daf/pages/Summary/Activities/Monitoring/components/MangroveGrowthAndSurvival/index.jsx +54 -0
  41. package/src/@daf/pages/Summary/Activities/Monitoring/components/WorkersDistribution/index.jsx +49 -0
  42. package/src/@daf/pages/Summary/Activities/Monitoring/config.js +51 -0
  43. package/src/@daf/pages/Summary/Activities/Monitoring/helper.js +236 -0
  44. package/src/@daf/pages/Summary/Activities/Monitoring/index.jsx +66 -0
  45. package/src/@daf/services/AdminService.js +3 -12
  46. package/src/@daf/services/DashboardService.js +1 -2
  47. package/src/@daf/utils/filters.js +89 -89
  48. package/src/constants/locales/en/translation.js +0 -3
  49. package/src/constants/locales/fr/translation.js +1 -1
  50. package/src/constants/locales/sp/translation.js +1 -1
  51. package/src/pages.js +1 -0
  52. package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/column.js +0 -224
  53. package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/helper.js +0 -65
  54. package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/columns.js +0 -180
  55. package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/config.js +0 -0
  56. package/src/@daf/pages/SelfAssesment/components/AssociatedInformationTable/index.jsx +0 -27
  57. package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/columns.js +0 -157
  58. package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/config.js +0 -31
  59. package/src/@daf/pages/SelfAssesment/components/OrgInformationTable/index.js +0 -77
  60. package/src/@daf/pages/SelfAssesment/components/ProductionSiteTable/columns.js +0 -117
  61. package/src/@daf/pages/SelfAssesment/components/ProductionSiteTable/index.jsx +0 -54
  62. package/src/@daf/pages/SelfAssesment/index.jsx +0 -0
@@ -4778,7 +4778,7 @@ const config$2 = {
4778
4778
  Down: config$3
4779
4779
  };
4780
4780
 
4781
- const _excluded$D = ["width", "height", "size", "name", "fill"];
4781
+ const _excluded$C = ["width", "height", "size", "name", "fill"];
4782
4782
  const CustomIcon = _ref => {
4783
4783
  let {
4784
4784
  width = 14,
@@ -4787,7 +4787,7 @@ const CustomIcon = _ref => {
4787
4787
  name = "",
4788
4788
  fill = "none"
4789
4789
  } = _ref,
4790
- props = _objectWithoutProperties(_ref, _excluded$D);
4790
+ props = _objectWithoutProperties(_ref, _excluded$C);
4791
4791
  const conf = config$2[name];
4792
4792
  if (conf) {
4793
4793
  return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -5076,7 +5076,7 @@ createCommonjsModule(function (module, exports) {
5076
5076
  !function(e,n){module.exports=n();}(commonjsGlobal,(function(){return {name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return "["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}}}));
5077
5077
  });
5078
5078
 
5079
- const _excluded$C = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
5079
+ const _excluded$B = ["view", "module", "scope", "form", "meta", "createdAt", "updatedAt"];
5080
5080
  dayjs__default["default"].extend(customParseFormat);
5081
5081
  dayjs__default["default"].extend(utc);
5082
5082
  dayjs__default["default"].extend(utc);
@@ -5452,7 +5452,7 @@ const filterCreateData = data => {
5452
5452
  createdAt,
5453
5453
  updatedAt
5454
5454
  } = data,
5455
- rest = _objectWithoutProperties(data, _excluded$C);
5455
+ rest = _objectWithoutProperties(data, _excluded$B);
5456
5456
  const _meta = isObjectEmpty(meta) ? undefined : meta;
5457
5457
  return _objectSpread2(_objectSpread2({}, rest), {}, {
5458
5458
  meta: _meta
@@ -5848,7 +5848,7 @@ SelectFilters.propTypes = {
5848
5848
  apiUrl: PropTypes__default["default"].string
5849
5849
  };
5850
5850
 
5851
- const _excluded$B = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
5851
+ const _excluded$A = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
5852
5852
  function DAFTable(_ref) {
5853
5853
  let {
5854
5854
  columns = [],
@@ -5879,7 +5879,7 @@ function DAFTable(_ref) {
5879
5879
  app,
5880
5880
  doEmptyRows
5881
5881
  } = _ref,
5882
- rest = _objectWithoutProperties(_ref, _excluded$B);
5882
+ rest = _objectWithoutProperties(_ref, _excluded$A);
5883
5883
  const [source, setSource] = React.useState([]);
5884
5884
  const projectData = (projects || []).find(p => p.id === selectedProject);
5885
5885
  const [filtersInit, setFiltersInit] = React.useState(!loading);
@@ -6697,7 +6697,7 @@ function ComponentWithFocus(_ref) {
6697
6697
  }
6698
6698
 
6699
6699
  var _templateObject$f;
6700
- const _excluded$A = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
6700
+ const _excluded$z = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
6701
6701
  function StickyTable(_ref) {
6702
6702
  let {
6703
6703
  size = "small",
@@ -6708,7 +6708,7 @@ function StickyTable(_ref) {
6708
6708
  pagination = false,
6709
6709
  doEmptyRows = true
6710
6710
  } = _ref,
6711
- props = _objectWithoutProperties(_ref, _excluded$A);
6711
+ props = _objectWithoutProperties(_ref, _excluded$z);
6712
6712
  const data = React__default["default"].useMemo(() => {
6713
6713
  if (!doEmptyRows) {
6714
6714
  return dataSource;
@@ -7233,7 +7233,7 @@ const BTN_SIZE = {
7233
7233
  LG: 'large'
7234
7234
  };
7235
7235
 
7236
- const _excluded$z = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
7236
+ const _excluded$y = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
7237
7237
  function DafButton(_ref) {
7238
7238
  let {
7239
7239
  content = '',
@@ -7247,7 +7247,7 @@ function DafButton(_ref) {
7247
7247
  style = {},
7248
7248
  className = ''
7249
7249
  } = _ref,
7250
- restProps = _objectWithoutProperties(_ref, _excluded$z);
7250
+ restProps = _objectWithoutProperties(_ref, _excluded$y);
7251
7251
  return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
7252
7252
  icon: icon,
7253
7253
  type: type,
@@ -7366,12 +7366,12 @@ const Style$R = styled__default["default"].div`
7366
7366
  }
7367
7367
  `;
7368
7368
 
7369
- const _excluded$y = ["children"];
7369
+ const _excluded$x = ["children"];
7370
7370
  const BorderedButton = _ref => {
7371
7371
  let {
7372
7372
  children
7373
7373
  } = _ref,
7374
- props = _objectWithoutProperties(_ref, _excluded$y);
7374
+ props = _objectWithoutProperties(_ref, _excluded$x);
7375
7375
  return /*#__PURE__*/jsxRuntime.jsx(Style$R, {
7376
7376
  className: "d-btn-cont",
7377
7377
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -7511,12 +7511,12 @@ Badge.propTypes = {
7511
7511
  props: PropTypes__default["default"].object
7512
7512
  };
7513
7513
 
7514
- const _excluded$x = ["icon"];
7514
+ const _excluded$w = ["icon"];
7515
7515
  function GetIcon(_ref) {
7516
7516
  let {
7517
7517
  icon
7518
7518
  } = _ref,
7519
- props = _objectWithoutProperties(_ref, _excluded$x);
7519
+ props = _objectWithoutProperties(_ref, _excluded$w);
7520
7520
  let Icon = Icons__namespace.CloseOutlined;
7521
7521
  if (Icons__namespace[icon]) {
7522
7522
  Icon = Icons__namespace[icon];
@@ -7846,7 +7846,7 @@ const MultiSelectStyled = styled__default["default"](antd.Select)`
7846
7846
  }
7847
7847
  `;
7848
7848
 
7849
- const _excluded$w = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
7849
+ const _excluded$v = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
7850
7850
  const {
7851
7851
  useToken: useToken$n
7852
7852
  } = antd.theme;
@@ -7939,7 +7939,7 @@ function Multiselect(_ref) {
7939
7939
  isSingle = false,
7940
7940
  selectionType = SELECTION_TYPES.DEFAULT
7941
7941
  } = _ref,
7942
- restProps = _objectWithoutProperties(_ref, _excluded$w);
7942
+ restProps = _objectWithoutProperties(_ref, _excluded$v);
7943
7943
  const {
7944
7944
  token
7945
7945
  } = useToken$n();
@@ -8661,7 +8661,7 @@ DAFHeader.propTypes = {
8661
8661
  filtersConfig: PropTypes__default["default"].any
8662
8662
  };
8663
8663
 
8664
- const _excluded$v = ["tabs", "onChange", "value", "className"];
8664
+ const _excluded$u = ["tabs", "onChange", "value", "className"];
8665
8665
  function TabsHeader(_ref) {
8666
8666
  let {
8667
8667
  tabs = [],
@@ -8669,7 +8669,7 @@ function TabsHeader(_ref) {
8669
8669
  value = '',
8670
8670
  className = 'mt-2'
8671
8671
  } = _ref,
8672
- rest = _objectWithoutProperties(_ref, _excluded$v);
8672
+ rest = _objectWithoutProperties(_ref, _excluded$u);
8673
8673
  return /*#__PURE__*/jsxRuntime.jsx("div", {
8674
8674
  className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
8675
8675
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
@@ -8766,7 +8766,7 @@ DrawerHeader.propTypes = {
8766
8766
  tabsConfig: PropTypes__default["default"].any
8767
8767
  };
8768
8768
 
8769
- const _excluded$u = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
8769
+ const _excluded$t = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
8770
8770
  const useFooter = _ref => {
8771
8771
  let {
8772
8772
  leftContent,
@@ -8801,7 +8801,7 @@ const useFooter = _ref => {
8801
8801
  style = {},
8802
8802
  className = ""
8803
8803
  } = button,
8804
- restProps = _objectWithoutProperties(button, _excluded$u);
8804
+ restProps = _objectWithoutProperties(button, _excluded$t);
8805
8805
  return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
8806
8806
  content: label,
8807
8807
  type: type,
@@ -9779,28 +9779,30 @@ const handleSectionChildren = ({
9779
9779
  });
9780
9780
  };
9781
9781
 
9782
- const handleArrayChildren = ({
9783
- value,
9784
- config,
9785
- label,
9786
- level,
9787
- t,
9788
- rootForm,
9789
- allData,
9790
- user,
9791
- getApiBaseUrl = () => {},
9792
- getAppHeader = () => {},
9793
- app,
9794
- TreeNodeComponent
9795
- }) => {
9782
+ const handleArrayChildren = _ref => {
9783
+ let {
9784
+ value,
9785
+ config,
9786
+ label,
9787
+ level,
9788
+ t,
9789
+ rootForm,
9790
+ allData,
9791
+ user,
9792
+ getApiBaseUrl = () => {},
9793
+ getAppHeader = () => {},
9794
+ app,
9795
+ TreeNodeComponent
9796
+ } = _ref;
9796
9797
  if (!Array.isArray(value)) {
9797
9798
  return null;
9798
9799
  }
9799
9800
  return value.map((item, itemIndex) => /*#__PURE__*/jsxRuntime.jsx("div", {
9800
9801
  className: "array-item",
9801
9802
  children: Object.keys(config.inputs).sort((a, b) => {
9802
- const positionA = config.inputs[a]?.position || 0;
9803
- const positionB = config.inputs[b]?.position || 0;
9803
+ var _config$inputs$a, _config$inputs$b;
9804
+ const positionA = ((_config$inputs$a = config.inputs[a]) === null || _config$inputs$a === void 0 ? void 0 : _config$inputs$a.position) || 0;
9805
+ const positionB = ((_config$inputs$b = config.inputs[b]) === null || _config$inputs$b === void 0 ? void 0 : _config$inputs$b.position) || 0;
9804
9806
  return positionA - positionB;
9805
9807
  }).map(subInputKey => {
9806
9808
  const subInputConfig = config.inputs[subInputKey];
@@ -9818,9 +9820,9 @@ const handleArrayChildren = ({
9818
9820
  getApiBaseUrl: getApiBaseUrl,
9819
9821
  getAppHeader: getAppHeader,
9820
9822
  app: app
9821
- }, `${itemIndex}-${subInputKey}`);
9823
+ }, "".concat(itemIndex, "-").concat(subInputKey));
9822
9824
  })
9823
- }, `${itemIndex}`));
9825
+ }, "".concat(itemIndex)));
9824
9826
  };
9825
9827
 
9826
9828
  const noDafApps = ['tif', 'cukura']; //PACKAGE_CHANGE_LATER (remove sbg)
@@ -9965,44 +9967,44 @@ function useAjaxModal$2({
9965
9967
  }
9966
9968
 
9967
9969
  const mergeObject = obj => {
9968
- return Object.entries(obj || {}).reduce((acc, [key, value]) => {
9970
+ return Object.entries(obj || {}).reduce((acc, _ref) => {
9971
+ let [key, value] = _ref;
9969
9972
  if (typeof value === "object" && !Array.isArray(value) && value !== null) {
9970
- return {
9971
- ...acc,
9972
- ...value
9973
- };
9973
+ return _objectSpread2(_objectSpread2({}, acc), value);
9974
9974
  }
9975
- return {
9976
- ...acc,
9975
+ return _objectSpread2(_objectSpread2({}, acc), {}, {
9977
9976
  [key]: value
9978
- };
9977
+ });
9979
9978
  }, {});
9980
9979
  };
9981
- const handleDataLinkGroupWithTableKeys = ({
9982
- config,
9983
- inputConfig,
9984
- inputKey,
9985
- value,
9986
- level,
9987
- t,
9988
- rootForm,
9989
- allData,
9990
- user,
9991
- getApiBaseUrl = () => {},
9992
- getAppHeader = () => {},
9993
- app,
9994
- TreeNodeComponent
9995
- }) => {
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;
9996
9997
  if (!(config.type === 'dataLinkGroup' || config.type === 'dataLink')) {
9997
9998
  return null;
9998
9999
  }
9999
- 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)) {
10000
10001
  const parentInputKeys = Object.keys(config.inputs || {});
10001
10002
  const isHandledBySiblingDataLink = parentInputKeys.some(otherInputKey => {
10002
10003
  const otherConfig = config.inputs[otherInputKey];
10003
- if (otherConfig?.type === 'dataLink') {
10004
- const siblingTableKeys = otherConfig?.meta?.tableKeys || [];
10005
- 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) || [];
10006
10008
  const allSiblingKeys = [...siblingTableKeys, ...additionalTableKeys];
10007
10009
  return allSiblingKeys.includes(inputKey) && otherInputKey !== inputKey;
10008
10010
  }
@@ -10016,23 +10018,26 @@ const handleDataLinkGroupWithTableKeys = ({
10016
10018
  return null;
10017
10019
  }
10018
10020
  const tableKeys = inputConfig.meta.tableKeys;
10019
- const additionalTableKeys = config.meta?.additionalTableKeys || [];
10021
+ const additionalTableKeys = ((_config$meta2 = config.meta) === null || _config$meta2 === void 0 ? void 0 : _config$meta2.additionalTableKeys) || [];
10020
10022
  const parentInputKeys = Object.keys(config.inputs || {});
10021
10023
  const siblingInputsMatchingTableKeys = parentInputKeys.filter(siblingKey => siblingKey !== inputKey).filter(siblingKey => tableKeys.includes(siblingKey) || additionalTableKeys.includes(siblingKey));
10022
10024
  [...new Set([...tableKeys, ...siblingInputsMatchingTableKeys])];
10023
- 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]);
10024
10029
  const ajaxModalValues = useAjaxModal$2({
10025
10030
  name: inputKey,
10026
10031
  user,
10027
- namespace: inputConfig?.meta?.namespace,
10028
- 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,
10029
10034
  isAjaxModal,
10030
- 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,
10031
10036
  APP: app,
10032
10037
  apiBaseUrl: getApiBaseUrl(),
10033
10038
  _getAppHeader: getAppHeader
10034
10039
  });
10035
- const dataLinkForm = ajaxModalValues?.form;
10040
+ const dataLinkForm = ajaxModalValues === null || ajaxModalValues === void 0 ? void 0 : ajaxModalValues.form;
10036
10041
  const createInputsAndValues = item => {
10037
10042
  const inputs = {};
10038
10043
  const values = {};
@@ -10044,12 +10049,12 @@ const handleDataLinkGroupWithTableKeys = ({
10044
10049
  'videos': 'Video'
10045
10050
  };
10046
10051
  tableKeys.filter(tableKey => tableKey !== 'datastakeId').forEach(tableKey => {
10047
- 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]);
10048
10054
  if (formInputConfig) {
10049
- inputs[tableKey] = {
10050
- ...formInputConfig,
10055
+ inputs[tableKey] = _objectSpread2(_objectSpread2({}, formInputConfig), {}, {
10051
10056
  label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : formInputConfig.label || formInputConfig.tableLabel || tableKey
10052
- };
10057
+ });
10053
10058
  if (formInputConfig.label && typeof formInputConfig.label === 'object') {
10054
10059
  const dynamicLabelKeys = Object.keys(formInputConfig.label);
10055
10060
  let resolvedLabel = null;
@@ -10057,7 +10062,7 @@ const handleDataLinkGroupWithTableKeys = ({
10057
10062
  const parts = labelKey.split(' is ');
10058
10063
  if (parts.length === 2) {
10059
10064
  const [conditionKey, conditionValue] = parts;
10060
- if (item?.[conditionKey] === conditionValue) {
10065
+ if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
10061
10066
  resolvedLabel = formInputConfig.label[labelKey];
10062
10067
  break;
10063
10068
  }
@@ -10065,37 +10070,37 @@ const handleDataLinkGroupWithTableKeys = ({
10065
10070
  }
10066
10071
  inputs[tableKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey);
10067
10072
  }
10068
- values[tableKey] = item?.[tableKey];
10073
+ values[tableKey] = item === null || item === void 0 ? void 0 : item[tableKey];
10069
10074
  } else {
10075
+ var _item$linking;
10070
10076
  inputs[tableKey] = {
10071
10077
  label: uploadTypeFields.includes(tableKey) ? uploadTypeLabels[tableKey] : tableKey,
10072
- type: inputConfig?.type
10078
+ type: inputConfig === null || inputConfig === void 0 ? void 0 : inputConfig.type
10073
10079
  };
10074
- 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]);
10075
10081
  }
10076
10082
  });
10077
10083
  siblingInputsMatchingTableKeys.forEach(siblingKey => {
10078
10084
  const siblingConfig = config.inputs[siblingKey];
10079
10085
  if (siblingConfig) {
10080
- inputs[siblingKey] = {
10081
- ...siblingConfig,
10086
+ inputs[siblingKey] = _objectSpread2(_objectSpread2({}, siblingConfig), {}, {
10082
10087
  label: siblingConfig.label || siblingKey
10083
- };
10084
- values[siblingKey] = item?.[siblingKey];
10088
+ });
10089
+ values[siblingKey] = item === null || item === void 0 ? void 0 : item[siblingKey];
10085
10090
  }
10086
10091
  });
10087
- if (dataLinkForm?.identification && typeof dataLinkForm.identification === 'object') {
10092
+ if (dataLinkForm !== null && dataLinkForm !== void 0 && dataLinkForm.identification && typeof dataLinkForm.identification === 'object') {
10088
10093
  Object.keys(dataLinkForm.identification).filter(fieldKey => fieldKey !== 'datastakeId' && !tableKeys.includes(fieldKey)).filter(fieldKey => {
10089
10094
  const formInputConfig = dataLinkForm.identification[fieldKey];
10090
10095
  return formInputConfig && typeof formInputConfig === 'object' && !Array.isArray(formInputConfig);
10091
10096
  }).forEach(fieldKey => {
10097
+ var _item$linking2;
10092
10098
  const formInputConfig = dataLinkForm.identification[fieldKey];
10093
- inputs[fieldKey] = {
10094
- ...formInputConfig,
10099
+ inputs[fieldKey] = _objectSpread2(_objectSpread2({}, formInputConfig), {}, {
10095
10100
  label: uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : formInputConfig.label || formInputConfig.tableLabel || fieldKey
10096
- };
10097
- if (formInputConfig?.label && typeof formInputConfig?.label === 'object') {
10098
- 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);
10099
10104
  let resolvedLabel = null;
10100
10105
  for (const labelKey of dynamicLabelKeys) {
10101
10106
  const parts = labelKey.split(' is ');
@@ -10104,7 +10109,7 @@ const handleDataLinkGroupWithTableKeys = ({
10104
10109
  const flattenedItem = Object.assign({}, item.location, {
10105
10110
  address: item.address
10106
10111
  });
10107
- if (flattenedItem?.[conditionKey] === conditionValue) {
10112
+ if ((flattenedItem === null || flattenedItem === void 0 ? void 0 : flattenedItem[conditionKey]) === conditionValue) {
10108
10113
  resolvedLabel = formInputConfig.label[labelKey];
10109
10114
  break;
10110
10115
  }
@@ -10112,7 +10117,7 @@ const handleDataLinkGroupWithTableKeys = ({
10112
10117
  }
10113
10118
  inputs[fieldKey].label = resolvedLabel || Object.values(formInputConfig.label)[0] || (uploadTypeFields.includes(fieldKey) ? uploadTypeLabels[fieldKey] : fieldKey);
10114
10119
  }
10115
- 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]);
10116
10121
  });
10117
10122
  }
10118
10123
  return {
@@ -10122,16 +10127,17 @@ const handleDataLinkGroupWithTableKeys = ({
10122
10127
  };
10123
10128
  if (Array.isArray(value)) {
10124
10129
  return value.map((item, itemIndex) => {
10130
+ var _merged$inputKey;
10125
10131
  const merged = mergeObject(item);
10126
- 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);
10127
10133
  const {
10128
10134
  inputs,
10129
10135
  values
10130
10136
  } = createInputsAndValues(merged);
10131
10137
  return /*#__PURE__*/jsxRuntime.jsx(TreeNodeComponent, {
10132
- nodeKey: datastakeIdValue || t(`No ID ${itemIndex + 1}`),
10138
+ nodeKey: datastakeIdValue || t("No ID ".concat(itemIndex + 1)),
10133
10139
  config: {
10134
- label: datastakeIdValue || t(`No ID ${itemIndex + 1}`),
10140
+ label: datastakeIdValue || t("No ID ".concat(itemIndex + 1)),
10135
10141
  type: 'custom-datalink-group',
10136
10142
  inputs: inputs
10137
10143
  },
@@ -10145,11 +10151,12 @@ const handleDataLinkGroupWithTableKeys = ({
10145
10151
  getApiBaseUrl: getApiBaseUrl,
10146
10152
  getAppHeader: getAppHeader,
10147
10153
  app: app
10148
- }, `${inputKey}-${itemIndex}`);
10154
+ }, "".concat(inputKey, "-").concat(itemIndex));
10149
10155
  });
10150
10156
  } else {
10157
+ var _merged$inputKey2;
10151
10158
  const merged = mergeObject(value);
10152
- 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);
10153
10160
  const {
10154
10161
  inputs,
10155
10162
  values
@@ -10171,7 +10178,7 @@ const handleDataLinkGroupWithTableKeys = ({
10171
10178
  getApiBaseUrl: getApiBaseUrl,
10172
10179
  getAppHeader: getAppHeader,
10173
10180
  app: app
10174
- }, `${inputKey}-group`);
10181
+ }, "".concat(inputKey, "-group"));
10175
10182
  }
10176
10183
  };
10177
10184
 
@@ -11682,7 +11689,7 @@ Widget.propTypes = {
11682
11689
  };
11683
11690
  Widget.displayName = 'Widget';
11684
11691
 
11685
- const _excluded$t = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
11692
+ const _excluded$s = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
11686
11693
  function ImageWidget(_ref) {
11687
11694
  let {
11688
11695
  loading = false,
@@ -11693,7 +11700,7 @@ function ImageWidget(_ref) {
11693
11700
  noDescriptionText,
11694
11701
  isPdf = false
11695
11702
  } = _ref,
11696
- props = _objectWithoutProperties(_ref, _excluded$t);
11703
+ props = _objectWithoutProperties(_ref, _excluded$s);
11697
11704
  const expandable = isPdf ? false : props.expandable;
11698
11705
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
11699
11706
  loading: loading,
@@ -11753,7 +11760,7 @@ function ImageWidget(_ref) {
11753
11760
  ImageWidget.displayName = 'ImageWidget';
11754
11761
 
11755
11762
  var _templateObject$c;
11756
- const _excluded$s = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
11763
+ const _excluded$r = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
11757
11764
  function FlowWidget(_ref) {
11758
11765
  let {
11759
11766
  title,
@@ -11765,7 +11772,7 @@ function FlowWidget(_ref) {
11765
11772
  className,
11766
11773
  direction = "horizontal"
11767
11774
  } = _ref,
11768
- rest = _objectWithoutProperties(_ref, _excluded$s);
11775
+ rest = _objectWithoutProperties(_ref, _excluded$r);
11769
11776
  const [activeTab, setActiveTab] = React.useState();
11770
11777
  React.useEffect(() => {
11771
11778
  if (defaultActiveTab) {
@@ -12022,12 +12029,45 @@ const Style$O = styled__default["default"].div`
12022
12029
  margin-top: 14px;
12023
12030
  }
12024
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
+ }
12025
12056
  }
12026
12057
 
12027
12058
  &.small-content {
12028
12059
  span {
12029
12060
  font-size: 16px;
12030
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
+ }
12031
12071
  }
12032
12072
 
12033
12073
  .ant-tag {
@@ -12137,6 +12177,50 @@ const NoMinWidth$1 = styled__default["default"].div`
12137
12177
  }
12138
12178
  `;
12139
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
+
12140
12224
  function KeyIndicatorsWidget$1(_ref) {
12141
12225
  let {
12142
12226
  t = s => s,
@@ -12158,10 +12242,12 @@ function KeyIndicatorsWidget$1(_ref) {
12158
12242
  children: [children, /*#__PURE__*/jsxRuntime.jsx(Style$O, {
12159
12243
  className: formatClassname(["flex", className]),
12160
12244
  children: config.map((c, i) => /*#__PURE__*/jsxRuntime.jsxs("div", {
12161
- className: "row-item",
12245
+ className: "row-item ".concat(c.icon ? 'row-item-with-icon' : ''),
12162
12246
  children: [/*#__PURE__*/jsxRuntime.jsx(Label$2, {
12163
12247
  label: c.label,
12164
- withTooltip: withTooltip
12248
+ icon: c.icon,
12249
+ withTooltip: withTooltip,
12250
+ t: t
12165
12251
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
12166
12252
  className: "flex",
12167
12253
  children: c.render()
@@ -12179,8 +12265,29 @@ function KeyIndicatorsWidget$1(_ref) {
12179
12265
  function Label$2(_ref2) {
12180
12266
  let {
12181
12267
  label,
12182
- withTooltip
12268
+ icon,
12269
+ withTooltip,
12270
+ t
12183
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
+ }
12184
12291
  if (withTooltip) {
12185
12292
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
12186
12293
  title: label,
@@ -12294,6 +12401,40 @@ const Style$N = styled__default["default"].div`
12294
12401
  }
12295
12402
  }
12296
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
+ }
12297
12438
  `;
12298
12439
  const NoMinWidth = styled__default["default"].div`
12299
12440
  .indicator-item {
@@ -15318,7 +15459,7 @@ Map$3.propTypes = {
15318
15459
  link: PropTypes__default["default"].any
15319
15460
  };
15320
15461
 
15321
- const _excluded$r = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
15462
+ const _excluded$q = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
15322
15463
  function InExpandableWidgetMap(_ref) {
15323
15464
  let {
15324
15465
  isExpanded,
@@ -15332,7 +15473,7 @@ function InExpandableWidgetMap(_ref) {
15332
15473
  height,
15333
15474
  widgetConfig
15334
15475
  } = _ref,
15335
- rest = _objectWithoutProperties(_ref, _excluded$r);
15476
+ rest = _objectWithoutProperties(_ref, _excluded$q);
15336
15477
  const [mapKey, setMapKey] = React.useState(0);
15337
15478
  const [isMapReady, setIsMapReady] = React.useState(false);
15338
15479
  React.useEffect(() => {
@@ -17532,14 +17673,14 @@ const MapConfig = ({
17532
17673
  });
17533
17674
  };
17534
17675
 
17535
- const _excluded$q = ["config", "title", "loading"];
17676
+ const _excluded$p = ["config", "title", "loading"];
17536
17677
  const Details = _ref => {
17537
17678
  let {
17538
17679
  config = [],
17539
17680
  title,
17540
17681
  loading = false
17541
17682
  } = _ref,
17542
- rest = _objectWithoutProperties(_ref, _excluded$q);
17683
+ rest = _objectWithoutProperties(_ref, _excluded$p);
17543
17684
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17544
17685
  className: "with-border-header h-w-btn-header card",
17545
17686
  loading: loading,
@@ -17555,14 +17696,14 @@ const Details = _ref => {
17555
17696
  }));
17556
17697
  };
17557
17698
 
17558
- const _excluded$p = ["config", "title", "loading"];
17699
+ const _excluded$o = ["config", "title", "loading"];
17559
17700
  const KeyIndicatorsDetails = _ref => {
17560
17701
  let {
17561
17702
  config,
17562
17703
  title,
17563
17704
  loading = false
17564
17705
  } = _ref,
17565
- rest = _objectWithoutProperties(_ref, _excluded$p);
17706
+ rest = _objectWithoutProperties(_ref, _excluded$o);
17566
17707
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17567
17708
  className: "with-border-header h-w-btn-header",
17568
17709
  title: title,
@@ -17592,7 +17733,7 @@ const Style$G = styled__default["default"].div`
17592
17733
  }
17593
17734
  `;
17594
17735
 
17595
- const _excluded$o = ["children", "config", "detailsTitle", "firstColumnWidth"];
17736
+ const _excluded$n = ["children", "config", "detailsTitle", "firstColumnWidth"];
17596
17737
  const DetailsSection = _ref => {
17597
17738
  let {
17598
17739
  children,
@@ -17600,7 +17741,7 @@ const DetailsSection = _ref => {
17600
17741
  detailsTitle,
17601
17742
  firstColumnWidth = "250px"
17602
17743
  } = _ref,
17603
- rest = _objectWithoutProperties(_ref, _excluded$o);
17744
+ rest = _objectWithoutProperties(_ref, _excluded$n);
17604
17745
  return /*#__PURE__*/jsxRuntime.jsx(Style$G, {
17605
17746
  firstColumnWidth: firstColumnWidth,
17606
17747
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -17776,14 +17917,14 @@ const getGoalConfig = () => {
17776
17917
  };
17777
17918
 
17778
17919
  var _templateObject$a;
17779
- const _excluded$n = ["title", "activeSdgGoals", "t"];
17920
+ const _excluded$m = ["title", "activeSdgGoals", "t"];
17780
17921
  function SDGWidget(_ref) {
17781
17922
  let {
17782
17923
  title = "Sustainable Development Goals",
17783
17924
  activeSdgGoals = [],
17784
17925
  t = key => key
17785
17926
  } = _ref,
17786
- props = _objectWithoutProperties(_ref, _excluded$n);
17927
+ props = _objectWithoutProperties(_ref, _excluded$m);
17787
17928
  const sdgConfig = getGoalConfig();
17788
17929
  return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
17789
17930
  title: title,
@@ -18081,7 +18222,7 @@ function SdgList({
18081
18222
  });
18082
18223
  }
18083
18224
 
18084
- const _excluded$m = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
18225
+ const _excluded$l = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
18085
18226
  const {
18086
18227
  Meta
18087
18228
  } = antd.Card;
@@ -18101,7 +18242,7 @@ function ProjectWidget(_ref) {
18101
18242
  hideSDGList = false,
18102
18243
  t = x => x
18103
18244
  } = _ref,
18104
- props = _objectWithoutProperties(_ref, _excluded$m);
18245
+ props = _objectWithoutProperties(_ref, _excluded$l);
18105
18246
  const [isHovered, setIsHovered] = React__default["default"].useState(false);
18106
18247
  const {
18107
18248
  token
@@ -18373,13 +18514,13 @@ const WidgetCard = _ref => {
18373
18514
  });
18374
18515
  };
18375
18516
 
18376
- const _excluded$l = ["title", "children"];
18517
+ const _excluded$k = ["title", "children"];
18377
18518
  const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
18378
18519
  let {
18379
18520
  title,
18380
18521
  children
18381
18522
  } = _ref,
18382
- rest = _objectWithoutProperties(_ref, _excluded$l);
18523
+ rest = _objectWithoutProperties(_ref, _excluded$k);
18383
18524
  /**
18384
18525
  * Handles carousel slide change events
18385
18526
  * @param {number} currentSlide - The index of the current slide after change
@@ -18543,7 +18684,7 @@ const EmptyStateContainer = styled__default["default"].div`
18543
18684
  }
18544
18685
  `;
18545
18686
 
18546
- const _excluded$k = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
18687
+ const _excluded$j = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows", "emptyLogo", "emptyText"];
18547
18688
  function ImageCarousel(_ref) {
18548
18689
  let {
18549
18690
  title,
@@ -18558,7 +18699,7 @@ function ImageCarousel(_ref) {
18558
18699
  emptyLogo = antd.Empty.PRESENTED_IMAGE_SIMPLE,
18559
18700
  emptyText = "No Image"
18560
18701
  } = _ref,
18561
- rest = _objectWithoutProperties(_ref, _excluded$k);
18702
+ rest = _objectWithoutProperties(_ref, _excluded$j);
18562
18703
  const [previewVisible, setPreviewVisible] = React.useState(false);
18563
18704
  const [current, setCurrent] = React.useState(0);
18564
18705
  const carouselRef = React.useRef(null);
@@ -24114,7 +24255,7 @@ const RepeatableModals = ({
24114
24255
  }) : null;
24115
24256
  };
24116
24257
 
24117
- const _excluded$j = ["viewGroup"],
24258
+ const _excluded$i = ["viewGroup"],
24118
24259
  _excluded2$1 = ["label", "icon", "position"];
24119
24260
  const Content$1 = _ref => {
24120
24261
  let {
@@ -24183,7 +24324,7 @@ const Content$1 = _ref => {
24183
24324
  if (groups[gKey].viewGroup === key) {
24184
24325
  // eslint-disable-next-line no-unused-vars
24185
24326
  const _groups$gKey = groups[gKey],
24186
- gCfg = _objectWithoutProperties(_groups$gKey, _excluded$j);
24327
+ gCfg = _objectWithoutProperties(_groups$gKey, _excluded$i);
24187
24328
  items[gKey] = gCfg;
24188
24329
  }
24189
24330
  return items;
@@ -24441,7 +24582,7 @@ const Content$1 = _ref => {
24441
24582
  });
24442
24583
  };
24443
24584
 
24444
- const _excluded$i = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
24585
+ const _excluded$h = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
24445
24586
  function Modal(_ref) {
24446
24587
  let {
24447
24588
  t = text => text,
@@ -24457,7 +24598,7 @@ function Modal(_ref) {
24457
24598
  disabled = false,
24458
24599
  withModalFormWrapper = true
24459
24600
  } = _ref,
24460
- props = _objectWithoutProperties(_ref, _excluded$i);
24601
+ props = _objectWithoutProperties(_ref, _excluded$h);
24461
24602
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Modal, _objectSpread2(_objectSpread2({
24462
24603
  width: 650,
24463
24604
  footer: null,
@@ -34993,7 +35134,7 @@ const beforeUpload = allowedExtensions => file => {
34993
35134
  };
34994
35135
  const allowedImageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.avif', '.bmp', '.tiff', '.tif', '.heif', '.heic', '.svg', '.ico'];
34995
35136
 
34996
- const _excluded$h = ["placeholder"],
35137
+ const _excluded$g = ["placeholder"],
34997
35138
  _excluded2 = ["label", "description", "excludeFromEdit", "showFormIf", "icon", "position", "template", "formClass"];
34998
35139
  dayjs__default["default"].extend(utc);
34999
35140
  dayjs__default["default"].extend(timezone);
@@ -35942,7 +36083,7 @@ const inputTypeComponent$1 = {
35942
36083
  },
35943
36084
  commentHint
35944
36085
  } = _ref19,
35945
- props = _objectWithoutProperties(_ref19.props, _excluded$h);
36086
+ props = _objectWithoutProperties(_ref19.props, _excluded$g);
35946
36087
  let {
35947
36088
  onChange,
35948
36089
  value,
@@ -38624,7 +38765,7 @@ function AjaxSelect(props) {
38624
38765
  }, props));
38625
38766
  }
38626
38767
 
38627
- const _excluded$g = ["placeholder"];
38768
+ const _excluded$f = ["placeholder"];
38628
38769
  const propHasValue = val => {
38629
38770
  if (Array.isArray(val)) {
38630
38771
  return val.length > 0 ? true : false;
@@ -39379,7 +39520,7 @@ const inputTypeComponent = {
39379
39520
  },
39380
39521
  commentHint
39381
39522
  } = _ref15,
39382
- props = _objectWithoutProperties(_ref15.props, _excluded$g);
39523
+ props = _objectWithoutProperties(_ref15.props, _excluded$f);
39383
39524
  let {
39384
39525
  onChange,
39385
39526
  value
@@ -41017,7 +41158,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
41017
41158
  });
41018
41159
  };
41019
41160
 
41020
- const _excluded$f = ["icon"];
41161
+ const _excluded$e = ["icon"];
41021
41162
  function DynamicForm(_ref) {
41022
41163
  var _data$meta;
41023
41164
  let {
@@ -41632,7 +41773,7 @@ function DynamicForm(_ref) {
41632
41773
  let {
41633
41774
  icon: Icon
41634
41775
  } = _ref3,
41635
- form = _objectWithoutProperties(_ref3, _excluded$f);
41776
+ form = _objectWithoutProperties(_ref3, _excluded$e);
41636
41777
  return /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
41637
41778
  type: "link",
41638
41779
  size: "large",
@@ -41850,7 +41991,7 @@ const Navigation = _ref => {
41850
41991
  var _templateObject$7;
41851
41992
  const StyledSelect = styled__default["default"](antd.Select)(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteral(["\n width: 100%;\n \n .ant-select-arrow {\n margin-top: 1px !important;\n }\n"])));
41852
41993
 
41853
- const _excluded$e = ["onChange", "value"];
41994
+ const _excluded$d = ["onChange", "value"];
41854
41995
  function AuthForm(_ref) {
41855
41996
  var _steps$currentStep;
41856
41997
  let {
@@ -41980,7 +42121,7 @@ function AuthForm(_ref) {
41980
42121
  {
41981
42122
  var _field$options;
41982
42123
  const _ref3 = field.props || {},
41983
- restSelectProps = _objectWithoutProperties(_ref3, _excluded$e);
42124
+ restSelectProps = _objectWithoutProperties(_ref3, _excluded$d);
41984
42125
  inputNode = /*#__PURE__*/jsxRuntime.jsx(StyledSelect, _objectSpread2(_objectSpread2({
41985
42126
  placeholder: field.placeholder
41986
42127
  }, restSelectProps), {}, {
@@ -42144,7 +42285,7 @@ function MultiBarProgress(_ref) {
42144
42285
  }
42145
42286
  const Style$x = styled__default["default"].div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n\theight: 6px;\n\twidth: 100%;\n\tbackground: var(--base-gray-40);\n\tborder-radius: 8px;\n\tdisplay: flex;\n\toverflow: hidden;\n\tdiv {\n\t\theight: 100%;\n\t}\n"])));
42146
42287
 
42147
- const _excluded$d = ["tooltipTitle", "percentage", "strokeColor", "showInfo"];
42288
+ const _excluded$c = ["tooltipTitle", "percentage", "strokeColor", "showInfo"];
42148
42289
  function MultiColorProgressBar(_ref) {
42149
42290
  let {
42150
42291
  tooltipTitle,
@@ -42156,7 +42297,7 @@ function MultiColorProgressBar(_ref) {
42156
42297
  },
42157
42298
  showInfo = false
42158
42299
  } = _ref,
42159
- rest = _objectWithoutProperties(_ref, _excluded$d);
42300
+ rest = _objectWithoutProperties(_ref, _excluded$c);
42160
42301
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
42161
42302
  title: tooltipTitle,
42162
42303
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Progress, _objectSpread2({
@@ -42203,7 +42344,7 @@ const SideIcon = _ref3 => {
42203
42344
  });
42204
42345
  };
42205
42346
 
42206
- const _excluded$c = ["value", "options", "onChange", "className", "width"];
42347
+ const _excluded$b = ["value", "options", "onChange", "className", "width"];
42207
42348
  const ProgressTabs = _ref => {
42208
42349
  let {
42209
42350
  value = 'setup',
@@ -42224,7 +42365,7 @@ const ProgressTabs = _ref => {
42224
42365
  className = '',
42225
42366
  width = '100%'
42226
42367
  } = _ref,
42227
- rest = _objectWithoutProperties(_ref, _excluded$c);
42368
+ rest = _objectWithoutProperties(_ref, _excluded$b);
42228
42369
  // Transform options to include icons and handle disabled state
42229
42370
  const transformedOptions = options.map(option => _objectSpread2(_objectSpread2({}, option), {}, {
42230
42371
  label: /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -44439,6 +44580,7 @@ const getDefaultActiveFilters = (params, selectFiltersConfig, defaultPageSize, d
44439
44580
  });
44440
44581
  return o;
44441
44582
  };
44583
+ const NEW_PAGINATION_APPS = ["nashiriki"];
44442
44584
  const filterParams = (value, module) => {
44443
44585
  const {
44444
44586
  activeFilters,
@@ -44454,12 +44596,10 @@ const filterParams = (value, module) => {
44454
44596
  ...filters
44455
44597
  } = activeFilters || {};
44456
44598
  const params = {};
44457
- // Use skip and take inside pagination object
44458
- // Calculate skip from page number (page 1 = skip 1, page 2 = skip 21, etc.)
44459
- params.pagination = {
44460
- skip: page ? (page - 1) * (pageSize || 20) + 1 : 1,
44461
- take: pageSize || 20
44462
- };
44599
+ params.pagination = JSON.stringify({
44600
+ [NEW_PAGINATION_APPS.includes(module) ? "skip" : "page"]: page,
44601
+ [NEW_PAGINATION_APPS.includes(module) ? "take" : "pageSize"]: pageSize
44602
+ });
44463
44603
  if (search && searchParams) {
44464
44604
  params.search = JSON.stringify({
44465
44605
  qs: search,
@@ -44474,24 +44614,12 @@ const filterParams = (value, module) => {
44474
44614
  }
44475
44615
  if (Object.keys(filters).length) {
44476
44616
  if (value.sourceId && value.sourceId === "overview") {
44477
- const {
44478
- activeTab,
44479
- ...restFilters
44480
- } = filters;
44481
- Object.assign(params, restFilters);
44482
- if (activeTab !== undefined) {
44483
- params.tab = activeTab;
44484
- }
44617
+ params.filters = JSON.stringify(filters);
44485
44618
  } else {
44486
- const {
44487
- authorId,
44488
- activeTab,
44489
- ...restFilters
44490
- } = filters;
44491
- Object.assign(params, restFilters);
44492
- if (activeTab !== undefined) {
44493
- params.tab = activeTab;
44494
- }
44619
+ params.filters = JSON.stringify({
44620
+ ...filters,
44621
+ authorId: undefined
44622
+ });
44495
44623
  }
44496
44624
  }
44497
44625
  return {
@@ -44789,7 +44917,7 @@ const renderRows = ({
44789
44917
  });
44790
44918
  };
44791
44919
 
44792
- const _excluded$b = ["page", "pageSize"];
44920
+ const _excluded$a = ["page", "pageSize"];
44793
44921
  function DataStoreTable$1(_ref) {
44794
44922
  let {
44795
44923
  mod,
@@ -44887,7 +45015,7 @@ function DataStoreTable$1(_ref) {
44887
45015
  page,
44888
45016
  pageSize
44889
45017
  } = activeFilters,
44890
- rest = _objectWithoutProperties(activeFilters, _excluded$b);
45018
+ rest = _objectWithoutProperties(activeFilters, _excluded$a);
44891
45019
  const params = _objectSpread2({
44892
45020
  pagination: {
44893
45021
  page,
@@ -45207,7 +45335,7 @@ const getLinkedColumns = ({
45207
45335
  ellipsis: true
45208
45336
  }];
45209
45337
 
45210
- const _excluded$a = ["administrativeLevel1", "administrativeLevel2"];
45338
+ const _excluded$9 = ["administrativeLevel1", "administrativeLevel2"];
45211
45339
  function DataStoreView(_ref) {
45212
45340
  let {
45213
45341
  mod,
@@ -45270,7 +45398,7 @@ function DataStoreView(_ref) {
45270
45398
  administrativeLevel1,
45271
45399
  administrativeLevel2
45272
45400
  } = _ref2,
45273
- rest = _objectWithoutProperties(_ref2, _excluded$a);
45401
+ rest = _objectWithoutProperties(_ref2, _excluded$9);
45274
45402
  const levels = [administrativeLevel1, administrativeLevel2].filter(p => !!p);
45275
45403
  let levelsRes = {
45276
45404
  data: []
@@ -46768,14 +46896,14 @@ const TabsStyled = styled__default["default"](antd.Tabs)`
46768
46896
 
46769
46897
  `;
46770
46898
 
46771
- const _excluded$9 = ["defaultActiveKey", "items", "onChange"];
46899
+ const _excluded$8 = ["defaultActiveKey", "items", "onChange"];
46772
46900
  const StyledTabs = _ref => {
46773
46901
  let {
46774
46902
  defaultActiveKey,
46775
46903
  items,
46776
46904
  onChange
46777
46905
  } = _ref,
46778
- rest = _objectWithoutProperties(_ref, _excluded$9);
46906
+ rest = _objectWithoutProperties(_ref, _excluded$8);
46779
46907
  return /*#__PURE__*/jsxRuntime.jsx(TabsStyled, _objectSpread2({
46780
46908
  defaultActiveKey: defaultActiveKey,
46781
46909
  items: items,
@@ -46846,7 +46974,7 @@ const Container$1 = styled__default["default"].div`
46846
46974
  width: ${props => props.isPdf ? props.width ? props.width : '1000px' : 'calc(100% - 48px)'};
46847
46975
  `;
46848
46976
 
46849
- const _excluded$8 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isStack", "isGroup", "isPercentage", "seriesField", "formattedYAxis", "formattedXAxis", "color", "height", "t", "isPdf", "legendConfig", "width", "xAxisConfig"];
46977
+ const _excluded$7 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isStack", "isGroup", "isPercentage", "seriesField", "formattedYAxis", "formattedXAxis", "color", "height", "t", "isPdf", "legendConfig", "width", "xAxisConfig"];
46850
46978
  const {
46851
46979
  useToken: useToken$g
46852
46980
  } = antd.theme;
@@ -46936,7 +47064,7 @@ function BarChart(_ref) {
46936
47064
  width,
46937
47065
  xAxisConfig = {}
46938
47066
  } = _ref;
46939
- _objectWithoutProperties(_ref, _excluded$8);
47067
+ _objectWithoutProperties(_ref, _excluded$7);
46940
47068
  const containerRef = React__default["default"].useRef(null);
46941
47069
  const chartRef = React__default["default"].useRef(null);
46942
47070
  const {
@@ -47020,7 +47148,7 @@ function BarChart(_ref) {
47020
47148
  });
47021
47149
  }
47022
47150
 
47023
- const _excluded$7 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isSmooth", "seriesField", "isArea", "formattedYAxis", "formattedXAxis", "color", "isPercentage", "height", "autoHideXLabel", "t", "isPdf", "legendConfig", "width", "yAxis", "xAxis"];
47151
+ const _excluded$6 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isSmooth", "seriesField", "isArea", "formattedYAxis", "formattedXAxis", "color", "isPercentage", "height", "autoHideXLabel", "t", "isPdf", "legendConfig", "width", "yAxis", "xAxis"];
47024
47152
  const {
47025
47153
  useToken: useToken$f
47026
47154
  } = antd.theme;
@@ -47109,7 +47237,7 @@ function LineChart(_ref) {
47109
47237
  yAxis: customYAxis,
47110
47238
  xAxis: customXAxis
47111
47239
  } = _ref;
47112
- _objectWithoutProperties(_ref, _excluded$7);
47240
+ _objectWithoutProperties(_ref, _excluded$6);
47113
47241
  const containerRef = React__default["default"].useRef(null);
47114
47242
  const chartRef = React__default["default"].useRef(null);
47115
47243
  const {
@@ -47211,7 +47339,7 @@ function LineChart(_ref) {
47211
47339
  });
47212
47340
  }
47213
47341
 
47214
- const _excluded$6 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isStack", "isGroup", "seriesField", "isPercentage", "showBackground", "formattedYAxis", "formattedXAxis", "color", "height", "groupField", "width", "legendConfig", "isPdf", "yAxis", "xAxis"];
47342
+ const _excluded$5 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isStack", "isGroup", "seriesField", "isPercentage", "showBackground", "formattedYAxis", "formattedXAxis", "color", "height", "groupField", "width", "legendConfig", "isPdf", "yAxis", "xAxis"];
47215
47343
  const {
47216
47344
  useToken: useToken$e
47217
47345
  } = antd.theme;
@@ -47316,7 +47444,7 @@ function ColumnChart(_ref) {
47316
47444
  yAxis: customYAxis,
47317
47445
  xAxis: customXAxis
47318
47446
  } = _ref;
47319
- _objectWithoutProperties(_ref, _excluded$6);
47447
+ _objectWithoutProperties(_ref, _excluded$5);
47320
47448
  const containerRef = React__default["default"].useRef(null);
47321
47449
  const chartRef = React__default["default"].useRef(null);
47322
47450
  const {
@@ -47584,7 +47712,7 @@ function RadialBarChart(_ref) {
47584
47712
  });
47585
47713
  }
47586
47714
 
47587
- const _excluded$5 = ["data", "angleField", "colorField", "color", "height", "innerRadius", "radius", "legend", "label", "statistic", "tooltip", "renderTooltipContent", "tooltipConfig", "meta", "animation", "t", "isPdf", "legendConfig"];
47715
+ const _excluded$4 = ["data", "angleField", "colorField", "color", "height", "innerRadius", "radius", "legend", "label", "statistic", "tooltip", "renderTooltipContent", "tooltipConfig", "meta", "animation", "t", "isPdf", "legendConfig"];
47588
47716
  const {
47589
47717
  useToken: useToken$c
47590
47718
  } = antd.theme;
@@ -47659,7 +47787,7 @@ function DonutPie(_ref) {
47659
47787
  isPdf = false,
47660
47788
  legendConfig = {}
47661
47789
  } = _ref,
47662
- rest = _objectWithoutProperties(_ref, _excluded$5);
47790
+ rest = _objectWithoutProperties(_ref, _excluded$4);
47663
47791
  const containerRef = React.useRef(null);
47664
47792
  const chartRef = React.useRef(null);
47665
47793
  const {
@@ -48179,7 +48307,7 @@ function StackChart(_ref) {
48179
48307
  });
48180
48308
  }
48181
48309
 
48182
- const _excluded$4 = ["data", "xFieldKey", "yFieldKey", "seriesField", "renderTooltipContent", "tooltipConfig", "animated", "color", "formattedYAxis", "formattedXAxis", "fillOpacity", "height", "t", "isPdf", "legendConfig", "width"];
48310
+ const _excluded$3 = ["data", "xFieldKey", "yFieldKey", "seriesField", "renderTooltipContent", "tooltipConfig", "animated", "color", "formattedYAxis", "formattedXAxis", "fillOpacity", "height", "t", "isPdf", "legendConfig", "width"];
48183
48311
  const {
48184
48312
  useToken: useToken$a
48185
48313
  } = antd.theme;
@@ -48256,7 +48384,7 @@ const AreaChart = _ref => {
48256
48384
  legendConfig = {},
48257
48385
  width
48258
48386
  } = _ref,
48259
- rest = _objectWithoutProperties(_ref, _excluded$4);
48387
+ rest = _objectWithoutProperties(_ref, _excluded$3);
48260
48388
  const containerRef = React.useRef(null);
48261
48389
  const chartRef = React.useRef(null);
48262
48390
  const {
@@ -48344,7 +48472,7 @@ const AreaChart = _ref => {
48344
48472
  });
48345
48473
  };
48346
48474
 
48347
- const _excluded$3 = ["data", "xFieldKey", "yFieldKey", "seriesField", "renderTooltipContent", "tooltipConfig", "animated", "color", "formattedYAxis", "formattedXAxis", "score", "height", "isPdf", "legendConfig"];
48475
+ const _excluded$2 = ["data", "xFieldKey", "yFieldKey", "seriesField", "renderTooltipContent", "tooltipConfig", "animated", "color", "formattedYAxis", "formattedXAxis", "score", "height", "isPdf", "legendConfig"];
48348
48476
  const {
48349
48477
  useToken: useToken$9
48350
48478
  } = antd.theme;
@@ -48369,7 +48497,7 @@ const RadarChart = _ref => {
48369
48497
  isPdf = false,
48370
48498
  legendConfig = {}
48371
48499
  } = _ref,
48372
- rest = _objectWithoutProperties(_ref, _excluded$3);
48500
+ rest = _objectWithoutProperties(_ref, _excluded$2);
48373
48501
  const containerRef = React.useRef(null);
48374
48502
  const chartRef = React.useRef(null);
48375
48503
  const {
@@ -50701,7 +50829,7 @@ function StakeholderMappings(_ref3) {
50701
50829
  }
50702
50830
  var index = withProvider(StakeholderMappings);
50703
50831
 
50704
- const _excluded$2 = ["t", "checkboxConfig", "defaultTableFilters", "columns", "children", "data", "loading", "APP", "getApiBaseUrl", "selectOptions", "selectFilters", "showCreate", "location", "goTo", "getRedirectLink", "defaultUrlParams", "view", "module", "filtersConfig", "isMobile"];
50832
+ const _excluded$1 = ["t", "checkboxConfig", "defaultTableFilters", "columns", "children", "data", "loading", "APP", "getApiBaseUrl", "selectOptions", "selectFilters", "showCreate", "location", "goTo", "getRedirectLink", "defaultUrlParams", "view", "module", "filtersConfig", "isMobile"];
50705
50833
  const BaseScreen = _ref => {
50706
50834
  var _data$data;
50707
50835
  let {
@@ -50739,7 +50867,7 @@ const BaseScreen = _ref => {
50739
50867
  filtersConfig,
50740
50868
  isMobile
50741
50869
  } = _ref,
50742
- rest = _objectWithoutProperties(_ref, _excluded$2);
50870
+ rest = _objectWithoutProperties(_ref, _excluded$1);
50743
50871
  const [showFilters, setShowFilters] = React.useState(false);
50744
50872
  const [hasError, setHasError] = React.useState(false);
50745
50873
  const {
@@ -51172,7 +51300,6 @@ function useUserGrowth({
51172
51300
  const {
51173
51301
  token
51174
51302
  } = useToken$6();
51175
- console.log("mainData", mainData);
51176
51303
  const fetchData = () => {
51177
51304
  const {
51178
51305
  dates = []
@@ -51308,7 +51435,6 @@ function UserGrowth({
51308
51435
  t,
51309
51436
  translationKeys
51310
51437
  });
51311
- console.log("usergrowthhhhh", data);
51312
51438
  React.useEffect(() => {
51313
51439
  if (typeof fetchUserGrowth === "function") {
51314
51440
  fetchUserGrowth(selectValue);
@@ -51436,7 +51562,6 @@ function TopContributors({
51436
51562
  data,
51437
51563
  t
51438
51564
  });
51439
- console.log("topcontributorshhhh", data);
51440
51565
  return /*#__PURE__*/jsxRuntime.jsx(Widget, {
51441
51566
  title: t(`admin::top-contributors`),
51442
51567
  className: "with-border-header overflow-hidden h-w-btn-header",
@@ -51707,6 +51832,7 @@ function AddUserModal({
51707
51832
  setAccountUsed(true);
51708
51833
  }).catch(() => {});
51709
51834
  };
51835
+ console.log("hellooooooooooooooooooooooooo");
51710
51836
  return /*#__PURE__*/jsxRuntime.jsx(Modal, {
51711
51837
  open: isOpen,
51712
51838
  title: "admin::edit-user",
@@ -51832,7 +51958,7 @@ const renderTypeTag = ({
51832
51958
  });
51833
51959
  };
51834
51960
 
51835
- const getColumns$7 = ({
51961
+ const getColumns$6 = ({
51836
51962
  t,
51837
51963
  show = "show",
51838
51964
  selectOptions,
@@ -52316,7 +52442,7 @@ function UserTable(_ref) {
52316
52442
  role: config.userRoles.filter(c => !c.isForAppAdmin)
52317
52443
  };
52318
52444
  }, [config.userRoles, config.accountTypes, accounts]);
52319
- const columns = React.useMemo(() => getColumns$7({
52445
+ const columns = React.useMemo(() => getColumns$6({
52320
52446
  t,
52321
52447
  show: activeTab,
52322
52448
  selectOptions,
@@ -52412,7 +52538,7 @@ function UserTable(_ref) {
52412
52538
  });
52413
52539
  }
52414
52540
 
52415
- const getColumns$6 = ({
52541
+ const getColumns$5 = ({
52416
52542
  t,
52417
52543
  goTo,
52418
52544
  show = "show",
@@ -52765,7 +52891,7 @@ const getTabs$1 = ({
52765
52891
  label: t("Suspended")
52766
52892
  }];
52767
52893
 
52768
- const getColumns$5 = ({
52894
+ const getColumns$4 = ({
52769
52895
  t,
52770
52896
  selectOptions,
52771
52897
  module
@@ -52888,7 +53014,7 @@ function CombineAccountModal({
52888
53014
  } = useToken$4();
52889
53015
  const [MainForm] = antd.Form.useForm();
52890
53016
  const columns = React.useMemo(() => {
52891
- return getColumns$5({
53017
+ return getColumns$4({
52892
53018
  t,
52893
53019
  selectOptions,
52894
53020
  module
@@ -53057,7 +53183,7 @@ function NewAccount({
53057
53183
  };
53058
53184
  return /*#__PURE__*/jsxRuntime.jsx(Modal, {
53059
53185
  t: t,
53060
- title: t(isEdit ? "edit-account" : "add-account"),
53186
+ title: t(isEdit ? "admin::edit-account" : "admin::add-account"),
53061
53187
  open: isOpen,
53062
53188
  onClose: onClose,
53063
53189
  onSuccess: onSubmit,
@@ -53191,7 +53317,7 @@ function AccountTable(_ref) {
53191
53317
  onCancel: () => {}
53192
53318
  });
53193
53319
  }, [t, fetchData, fetchPendingAccounts]);
53194
- const columns = React.useMemo(() => getColumns$6({
53320
+ const columns = React.useMemo(() => getColumns$5({
53195
53321
  t,
53196
53322
  show: activeTab,
53197
53323
  selectOptions,
@@ -53362,12 +53488,233 @@ const checkboxConfig$8 = {
53362
53488
  name: "Name",
53363
53489
  datastakeId: "ID"
53364
53490
  };
53365
- const getNameByLevel$1 = (data, level) => {
53491
+ const getNameByLevel = (data, level) => {
53366
53492
  const entry = Object.values(data || {}).find(item => item.level === level);
53367
53493
  return entry;
53368
53494
  };
53369
53495
 
53370
- const getColumns$4 = ({
53496
+ const getColumns$3 = ({
53497
+ t,
53498
+ goTo = () => {},
53499
+ show = "show",
53500
+ getRedirectLink = () => {},
53501
+ token,
53502
+ selectedSubjects,
53503
+ setSelectedSubjects,
53504
+ selectOptions,
53505
+ entity
53506
+ }) => {
53507
+ const cols = [{
53508
+ title: "",
53509
+ dataIndex: "select",
53510
+ key: "select",
53511
+ width: 50,
53512
+ show: true,
53513
+ render: (v, all) => {
53514
+ if (all.empty) {
53515
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53516
+ className: "daf-default-cell"
53517
+ });
53518
+ }
53519
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox, {
53520
+ onChange: () => setSelectedSubjects(prev => {
53521
+ const isSelected = prev.some(p => p.id === all.id);
53522
+ if (isSelected) {
53523
+ return prev.filter(p => p.id !== all.id);
53524
+ }
53525
+ return [...prev, all];
53526
+ }),
53527
+ checked: selectedSubjects.some(p => p.id === all.id),
53528
+ disabled: selectedSubjects?.length >= 3 && !selectedSubjects.some(p => p.id === all.id)
53529
+ });
53530
+ }
53531
+ }, {
53532
+ title: t("ID"),
53533
+ dataIndex: "datastakeId",
53534
+ key: "datastakeId",
53535
+ ellipsis: true,
53536
+ show: true,
53537
+ render: (value, all) => {
53538
+ if (all.empty) {
53539
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53540
+ className: "daf-default-cell"
53541
+ });
53542
+ }
53543
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53544
+ title: value,
53545
+ children: value
53546
+ });
53547
+ }
53548
+ }, {
53549
+ title: t("Name"),
53550
+ dataIndex: "name",
53551
+ key: "name",
53552
+ ellipsis: true,
53553
+ show: true,
53554
+ render: (value, all) => {
53555
+ if (all.empty) {
53556
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53557
+ className: "daf-default-cell"
53558
+ });
53559
+ }
53560
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53561
+ title: value,
53562
+ children: value
53563
+ });
53564
+ }
53565
+ }, {
53566
+ title: t("Category"),
53567
+ dataIndex: "category",
53568
+ key: "category",
53569
+ ellipsis: true,
53570
+ show: true,
53571
+ render: (value, all) => {
53572
+ if (all.empty) {
53573
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53574
+ className: "daf-default-cell"
53575
+ });
53576
+ }
53577
+ const category = findOptions(value, selectOptions?.category || []) || "--";
53578
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53579
+ title: category,
53580
+ children: category
53581
+ });
53582
+ }
53583
+ }, {
53584
+ title: t("Country"),
53585
+ dataIndex: "country",
53586
+ key: "country",
53587
+ ellipsis: true,
53588
+ show: true,
53589
+ render: (value, all) => {
53590
+ if (all.empty) {
53591
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53592
+ className: "daf-default-cell"
53593
+ });
53594
+ }
53595
+ const country = findOptions(value, selectOptions?.country || []) || "--";
53596
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53597
+ title: country,
53598
+ children: country
53599
+ });
53600
+ }
53601
+ }, {
53602
+ title: t("Province"),
53603
+ dataIndex: "administrativeLevel1",
53604
+ key: "administrativeLevel1",
53605
+ ellipsis: true,
53606
+ show: entity.includes("locations"),
53607
+ render: (value, all) => {
53608
+ if (all.empty) {
53609
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53610
+ className: "daf-default-cell"
53611
+ });
53612
+ }
53613
+ let label;
53614
+ if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
53615
+ label = all?.linking?.SCL?.[value]?.name;
53616
+ } else {
53617
+ label = getNameByLevel(all?.linking?.SCL, "level_1")?.name;
53618
+ }
53619
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53620
+ title: label || '-',
53621
+ children: label || '-'
53622
+ });
53623
+ }
53624
+ }, {
53625
+ title: t("Territory"),
53626
+ dataIndex: "administrativeLevel2",
53627
+ key: "administrativeLevel2",
53628
+ show: entity.includes("locations"),
53629
+ ellipsis: true,
53630
+ render: (value, all) => {
53631
+ if (all.empty) {
53632
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53633
+ className: "daf-default-cell"
53634
+ });
53635
+ }
53636
+ let label;
53637
+ if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
53638
+ label = all?.linking?.SCL?.[value]?.name;
53639
+ } else {
53640
+ label = getNameByLevel(all?.linking?.SCL, "level_2")?.name;
53641
+ }
53642
+ return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53643
+ title: label || '-',
53644
+ children: label || '-'
53645
+ });
53646
+ }
53647
+ }, {
53648
+ title: t("Sources"),
53649
+ dataIndex: "sources",
53650
+ key: "sources",
53651
+ show: true,
53652
+ render: (value, all) => {
53653
+ if (all.empty) {
53654
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53655
+ className: "daf-default-cell"
53656
+ });
53657
+ }
53658
+ const MAX_SOURCES = 3;
53659
+ const count = value?.length === MAX_SOURCES + 1 ? value?.length : MAX_SOURCES;
53660
+ return Array.isArray(value) && value?.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(antd.Avatar.Group, {
53661
+ max: {
53662
+ count: count,
53663
+ style: {
53664
+ color: token.baseGray90,
53665
+ backgroundColor: token.baseGray20,
53666
+ border: `1px solid ${token.baseGray40}`
53667
+ }
53668
+ },
53669
+ size: "small",
53670
+ children: value.map((v, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Avatar, {
53671
+ size: "small",
53672
+ style: {
53673
+ backgroundColor: token.baseGray20,
53674
+ color: token.baseGray90,
53675
+ border: `1px solid ${token.baseGray40}`,
53676
+ display: "flex",
53677
+ alignItems: "center",
53678
+ justifyContent: "center"
53679
+ },
53680
+ children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
53681
+ name: "Organisation02",
53682
+ width: 18,
53683
+ height: 18,
53684
+ color: token.baseGray90
53685
+ })
53686
+ }, i))
53687
+ }) : '-';
53688
+ }
53689
+ }, {
53690
+ title: "",
53691
+ dataIndex: "actions",
53692
+ key: "actions",
53693
+ width: 60,
53694
+ show: true,
53695
+ render: (value, all) => {
53696
+ if (all.empty) {
53697
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53698
+ className: "daf-default-cell"
53699
+ });
53700
+ }
53701
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
53702
+ className: "cursor-pointer",
53703
+ onClick: () => {
53704
+ goTo(getRedirectLink(`/app/accounts/view/${all.id}/details`));
53705
+ },
53706
+ children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
53707
+ name: "Link",
53708
+ width: 18,
53709
+ height: 18
53710
+ })
53711
+ });
53712
+ }
53713
+ }];
53714
+ return cols.filter(c => c[show]);
53715
+ };
53716
+
53717
+ const getColumns$2 = ({
53371
53718
  t,
53372
53719
  selectOptions,
53373
53720
  module,
@@ -53430,7 +53777,7 @@ const getColumns$4 = ({
53430
53777
  if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
53431
53778
  label = all?.linking?.SCL?.[value]?.name;
53432
53779
  } else {
53433
- label = getNameByLevel$1(all?.linking?.SCL, "level_1")?.name;
53780
+ label = getNameByLevel(all?.linking?.SCL, "level_1")?.name;
53434
53781
  }
53435
53782
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53436
53783
  title: label || '-',
@@ -53447,7 +53794,7 @@ const getColumns$4 = ({
53447
53794
  if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
53448
53795
  label = all?.linking?.SCL?.[value]?.name;
53449
53796
  } else {
53450
- label = getNameByLevel$1(all?.linking?.SCL, "level_2")?.name;
53797
+ label = getNameByLevel(all?.linking?.SCL, "level_2")?.name;
53451
53798
  }
53452
53799
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53453
53800
  title: label || '-',
@@ -53476,7 +53823,7 @@ function CombineLocationModal({
53476
53823
  const [MainForm] = antd.Form.useForm();
53477
53824
  const [isDisabled, setIsDisabled] = React.useState(true);
53478
53825
  const columns = React.useMemo(() => {
53479
- return getColumns$4({
53826
+ return getColumns$2({
53480
53827
  t,
53481
53828
  selectOptions,
53482
53829
  module,
@@ -53594,7 +53941,7 @@ function CombineLocationModal({
53594
53941
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
53595
53942
  placeholder: t("Province"),
53596
53943
  options: selectedLocations.map(location => {
53597
- const _data = getNameByLevel$1(location?.linking?.SCL, "level_1");
53944
+ const _data = getNameByLevel(location?.linking?.SCL, "level_1");
53598
53945
  return {
53599
53946
  label: _data?.name || "-",
53600
53947
  value: _data?.id || "-"
@@ -53607,7 +53954,7 @@ function CombineLocationModal({
53607
53954
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
53608
53955
  placeholder: t("Territory"),
53609
53956
  options: selectedLocations.map(location => {
53610
- const _data = getNameByLevel$1(location?.linking?.SCL, "level_2");
53957
+ const _data = getNameByLevel(location?.linking?.SCL, "level_2");
53611
53958
  return {
53612
53959
  label: _data?.name || "-",
53613
53960
  value: _data?.id || "-"
@@ -53625,233 +53972,6 @@ function CombineLocationModal({
53625
53972
  });
53626
53973
  }
53627
53974
 
53628
- const getNameByLevel = (data, level) => {
53629
- const entry = Object.values(data || {}).find(item => item.level === level);
53630
- return entry;
53631
- };
53632
-
53633
- const getColumns$3 = ({
53634
- t,
53635
- goTo = () => {},
53636
- show = "show",
53637
- getRedirectLink = () => {},
53638
- token,
53639
- selectedLocations,
53640
- setSelectedLocations,
53641
- selectOptions,
53642
- entity
53643
- }) => {
53644
- const cols = [{
53645
- title: "",
53646
- dataIndex: "select",
53647
- key: "select",
53648
- width: 50,
53649
- show: true,
53650
- render: (v, all) => {
53651
- if (all.empty) {
53652
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53653
- className: "daf-default-cell"
53654
- });
53655
- }
53656
- return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox, {
53657
- onChange: () => setSelectedLocations(prev => {
53658
- const isSelected = prev.some(p => p.id === all.id);
53659
- if (isSelected) {
53660
- return prev.filter(p => p.id !== all.id);
53661
- }
53662
- return [...prev, all];
53663
- }),
53664
- checked: selectedLocations.some(p => p.id === all.id),
53665
- disabled: selectedLocations?.length >= 3 && !selectedLocations.some(p => p.id === all.id)
53666
- });
53667
- }
53668
- }, {
53669
- title: t("ID"),
53670
- dataIndex: "datastakeId",
53671
- key: "datastakeId",
53672
- ellipsis: true,
53673
- show: true,
53674
- render: (value, all) => {
53675
- if (all.empty) {
53676
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53677
- className: "daf-default-cell"
53678
- });
53679
- }
53680
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53681
- title: value,
53682
- children: value
53683
- });
53684
- }
53685
- }, {
53686
- title: t("Name"),
53687
- dataIndex: "name",
53688
- key: "name",
53689
- ellipsis: true,
53690
- show: true,
53691
- render: (value, all) => {
53692
- if (all.empty) {
53693
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53694
- className: "daf-default-cell"
53695
- });
53696
- }
53697
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53698
- title: value,
53699
- children: value
53700
- });
53701
- }
53702
- }, {
53703
- title: t("Category"),
53704
- dataIndex: "category",
53705
- key: "category",
53706
- ellipsis: true,
53707
- show: true,
53708
- render: (value, all) => {
53709
- if (all.empty) {
53710
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53711
- className: "daf-default-cell"
53712
- });
53713
- }
53714
- const category = findOptions(value, selectOptions?.category || []) || "--";
53715
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53716
- title: category,
53717
- children: category
53718
- });
53719
- }
53720
- }, {
53721
- title: t("Country"),
53722
- dataIndex: "country",
53723
- key: "country",
53724
- ellipsis: true,
53725
- show: true,
53726
- render: (value, all) => {
53727
- if (all.empty) {
53728
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53729
- className: "daf-default-cell"
53730
- });
53731
- }
53732
- const country = findOptions(value, selectOptions?.country || []) || "--";
53733
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53734
- title: country,
53735
- children: country
53736
- });
53737
- }
53738
- }, {
53739
- title: t("Admin Level 1"),
53740
- dataIndex: "administrativeLevel1",
53741
- key: "administrativeLevel1",
53742
- ellipsis: true,
53743
- show: entity.includes("location"),
53744
- render: (value, all) => {
53745
- if (all.empty) {
53746
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53747
- className: "daf-default-cell"
53748
- });
53749
- }
53750
- let label;
53751
- if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
53752
- label = all?.linking?.SCL?.[value]?.name;
53753
- } else {
53754
- label = getNameByLevel(all?.linking?.SCL, "level_1")?.name;
53755
- }
53756
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53757
- title: label || '-',
53758
- children: label || '-'
53759
- });
53760
- }
53761
- }, {
53762
- title: t("Admin Level 2"),
53763
- dataIndex: "administrativeLevel2",
53764
- key: "administrativeLevel2",
53765
- show: entity.includes("location"),
53766
- ellipsis: true,
53767
- render: (value, all) => {
53768
- if (all.empty) {
53769
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53770
- className: "daf-default-cell"
53771
- });
53772
- }
53773
- let label;
53774
- if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
53775
- label = all?.linking?.SCL?.[value]?.name;
53776
- } else {
53777
- label = getNameByLevel(all?.linking?.SCL, "level_2")?.name;
53778
- }
53779
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
53780
- title: label || '-',
53781
- children: label || '-'
53782
- });
53783
- }
53784
- }, {
53785
- title: t("Sources"),
53786
- dataIndex: "sources",
53787
- key: "sources",
53788
- show: true,
53789
- render: (value, all) => {
53790
- if (all.empty) {
53791
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53792
- className: "daf-default-cell"
53793
- });
53794
- }
53795
- const MAX_SOURCES = 3;
53796
- const count = value?.length === MAX_SOURCES + 1 ? value?.length : MAX_SOURCES;
53797
- return Array.isArray(value) && value?.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(antd.Avatar.Group, {
53798
- max: {
53799
- count: count,
53800
- style: {
53801
- color: token.baseGray90,
53802
- backgroundColor: token.baseGray20,
53803
- border: `1px solid ${token.baseGray40}`
53804
- }
53805
- },
53806
- size: "small",
53807
- children: value.map((v, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Avatar, {
53808
- size: "small",
53809
- style: {
53810
- backgroundColor: token.baseGray20,
53811
- color: token.baseGray90,
53812
- border: `1px solid ${token.baseGray40}`,
53813
- display: "flex",
53814
- alignItems: "center",
53815
- justifyContent: "center"
53816
- },
53817
- children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
53818
- name: "Organisation02",
53819
- width: 18,
53820
- height: 18,
53821
- color: token.baseGray90
53822
- })
53823
- }, i))
53824
- }) : '-';
53825
- }
53826
- }, {
53827
- title: "",
53828
- dataIndex: "actions",
53829
- key: "actions",
53830
- width: 60,
53831
- show: true,
53832
- render: (value, all) => {
53833
- if (all.empty) {
53834
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53835
- className: "daf-default-cell"
53836
- });
53837
- }
53838
- return /*#__PURE__*/jsxRuntime.jsx("div", {
53839
- className: "cursor-pointer",
53840
- onClick: () => {
53841
- goTo(getRedirectLink(`/app/accounts/view/${all.id}/details`));
53842
- },
53843
- children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
53844
- name: "Link",
53845
- width: 18,
53846
- height: 18
53847
- })
53848
- });
53849
- }
53850
- }];
53851
- return cols.filter(c => c[show]);
53852
- };
53853
-
53854
- const _excluded$1 = ["pagination", "tab"];
53855
53975
  const {
53856
53976
  useToken: useToken$2
53857
53977
  } = antd.theme;
@@ -53879,29 +53999,6 @@ function LocationTable(_ref) {
53879
53999
  token
53880
54000
  } = useToken$2();
53881
54001
  const [combineLocationVisible, setCombineLocationVisible] = React.useState(false);
53882
-
53883
- // Wrapper to transform pagination params to strings and ensure tab is at root level
53884
- const getDataWithStringPagination = async _ref2 => {
53885
- let {
53886
- params
53887
- } = _ref2;
53888
- // Extract tab from the params (it should already be there from filterParams)
53889
- const {
53890
- pagination,
53891
- tab
53892
- } = params,
53893
- otherParams = _objectWithoutProperties(params, _excluded$1);
53894
- const transformedParams = _objectSpread2(_objectSpread2({}, otherParams), {}, {
53895
- pagination: {
53896
- skip: String((pagination === null || pagination === void 0 ? void 0 : pagination.skip) || 1),
53897
- take: String((pagination === null || pagination === void 0 ? void 0 : pagination.take) || 20)
53898
- },
53899
- tab: tab || "active" // Ensure tab is at root level with default value
53900
- });
53901
- return getData({
53902
- params: transformedParams
53903
- });
53904
- };
53905
54002
  const {
53906
54003
  filter,
53907
54004
  activeTab,
@@ -53923,7 +54020,7 @@ function LocationTable(_ref) {
53923
54020
  defaultPageSize,
53924
54021
  filtersConfig: filtersConfig$8,
53925
54022
  getRedirectLink,
53926
- getData: getDataWithStringPagination,
54023
+ getData,
53927
54024
  refetchTrigger
53928
54025
  });
53929
54026
  const selectOptions = React.useMemo(() => {
@@ -53951,7 +54048,7 @@ function LocationTable(_ref) {
53951
54048
  children: [/*#__PURE__*/jsxRuntime.jsxs(AdminTable, {
53952
54049
  filters: filter,
53953
54050
  t: t,
53954
- headerTitle: "test",
54051
+ headerTitle: headerTitle,
53955
54052
  actionButton: [{
53956
54053
  icon: "Merge",
53957
54054
  onClick: () => setCombineLocationVisible(true),
@@ -54019,7 +54116,6 @@ function LocationTable(_ref) {
54019
54116
  if (typeof mergeSubjectsFunction === 'function') {
54020
54117
  mergeSubjectsFunction(data);
54021
54118
  setSelectedLocations([]);
54022
- antd.message.success(t("Locations successfully merged."));
54023
54119
  }
54024
54120
  },
54025
54121
  selectedLocations: selectedLocations,
@@ -54030,227 +54126,6 @@ function LocationTable(_ref) {
54030
54126
  });
54031
54127
  }
54032
54128
 
54033
- const getColumns$2 = ({
54034
- t,
54035
- goTo = () => {},
54036
- show = "show",
54037
- getRedirectLink = () => {},
54038
- token,
54039
- selectedSubjects,
54040
- setSelectedSubjects,
54041
- selectOptions,
54042
- entity
54043
- }) => {
54044
- const cols = [{
54045
- title: "",
54046
- dataIndex: "select",
54047
- key: "select",
54048
- width: 50,
54049
- show: true,
54050
- render: (v, all) => {
54051
- if (all.empty) {
54052
- return /*#__PURE__*/jsxRuntime.jsx("div", {
54053
- className: "daf-default-cell"
54054
- });
54055
- }
54056
- return /*#__PURE__*/jsxRuntime.jsx(antd.Checkbox, {
54057
- onChange: () => setSelectedSubjects(prev => {
54058
- const isSelected = prev.some(p => p.id === all.id);
54059
- if (isSelected) {
54060
- return prev.filter(p => p.id !== all.id);
54061
- }
54062
- return [...prev, all];
54063
- }),
54064
- checked: selectedSubjects.some(p => p.id === all.id),
54065
- disabled: selectedSubjects?.length >= 3 && !selectedSubjects.some(p => p.id === all.id)
54066
- });
54067
- }
54068
- }, {
54069
- title: t("ID"),
54070
- dataIndex: "datastakeId",
54071
- key: "datastakeId",
54072
- ellipsis: true,
54073
- show: true,
54074
- render: (value, all) => {
54075
- if (all.empty) {
54076
- return /*#__PURE__*/jsxRuntime.jsx("div", {
54077
- className: "daf-default-cell"
54078
- });
54079
- }
54080
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54081
- title: value,
54082
- children: value
54083
- });
54084
- }
54085
- }, {
54086
- title: t("Name"),
54087
- dataIndex: "name",
54088
- key: "name",
54089
- ellipsis: true,
54090
- show: true,
54091
- render: (value, all) => {
54092
- if (all.empty) {
54093
- return /*#__PURE__*/jsxRuntime.jsx("div", {
54094
- className: "daf-default-cell"
54095
- });
54096
- }
54097
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54098
- title: value,
54099
- children: value
54100
- });
54101
- }
54102
- }, {
54103
- title: t("Category"),
54104
- dataIndex: "category",
54105
- key: "category",
54106
- ellipsis: true,
54107
- show: true,
54108
- render: (value, all) => {
54109
- if (all.empty) {
54110
- return /*#__PURE__*/jsxRuntime.jsx("div", {
54111
- className: "daf-default-cell"
54112
- });
54113
- }
54114
- const category = findOptions(value, selectOptions?.category || []) || "--";
54115
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54116
- title: category,
54117
- children: category
54118
- });
54119
- }
54120
- }, {
54121
- title: t("Country"),
54122
- dataIndex: "country",
54123
- key: "country",
54124
- ellipsis: true,
54125
- show: true,
54126
- render: (value, all) => {
54127
- if (all.empty) {
54128
- return /*#__PURE__*/jsxRuntime.jsx("div", {
54129
- className: "daf-default-cell"
54130
- });
54131
- }
54132
- const country = findOptions(value, selectOptions?.country || []) || "--";
54133
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54134
- title: country,
54135
- children: country
54136
- });
54137
- }
54138
- }, {
54139
- title: t("Admin Level 1"),
54140
- dataIndex: "administrativeLevel1",
54141
- key: "administrativeLevel1",
54142
- ellipsis: true,
54143
- show: entity.includes("location"),
54144
- render: (value, all) => {
54145
- if (all.empty) {
54146
- return /*#__PURE__*/jsxRuntime.jsx("div", {
54147
- className: "daf-default-cell"
54148
- });
54149
- }
54150
- let label;
54151
- if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
54152
- label = all?.linking?.SCL?.[value]?.name;
54153
- } else {
54154
- label = getNameByLevel$1(all?.linking?.SCL, "level_1")?.name;
54155
- }
54156
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54157
- title: label || '-',
54158
- children: label || '-'
54159
- });
54160
- }
54161
- }, {
54162
- title: t("Admin Level 2"),
54163
- dataIndex: "administrativeLevel2",
54164
- key: "administrativeLevel2",
54165
- show: entity.includes("location"),
54166
- ellipsis: true,
54167
- render: (value, all) => {
54168
- if (all.empty) {
54169
- return /*#__PURE__*/jsxRuntime.jsx("div", {
54170
- className: "daf-default-cell"
54171
- });
54172
- }
54173
- let label;
54174
- if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
54175
- label = all?.linking?.SCL?.[value]?.name;
54176
- } else {
54177
- label = getNameByLevel$1(all?.linking?.SCL, "level_2")?.name;
54178
- }
54179
- return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54180
- title: label || '-',
54181
- children: label || '-'
54182
- });
54183
- }
54184
- }, {
54185
- title: t("Sources"),
54186
- dataIndex: "sources",
54187
- key: "sources",
54188
- show: true,
54189
- render: (value, all) => {
54190
- if (all.empty) {
54191
- return /*#__PURE__*/jsxRuntime.jsx("div", {
54192
- className: "daf-default-cell"
54193
- });
54194
- }
54195
- const MAX_SOURCES = 3;
54196
- const count = value?.length === MAX_SOURCES + 1 ? value?.length : MAX_SOURCES;
54197
- return Array.isArray(value) && value?.length > 0 ? /*#__PURE__*/jsxRuntime.jsx(antd.Avatar.Group, {
54198
- max: {
54199
- count: count,
54200
- style: {
54201
- color: token.baseGray90,
54202
- backgroundColor: token.baseGray20,
54203
- border: `1px solid ${token.baseGray40}`
54204
- }
54205
- },
54206
- size: "small",
54207
- children: value.map((v, i) => /*#__PURE__*/jsxRuntime.jsx(antd.Avatar, {
54208
- size: "small",
54209
- style: {
54210
- backgroundColor: token.baseGray20,
54211
- color: token.baseGray90,
54212
- border: `1px solid ${token.baseGray40}`,
54213
- display: "flex",
54214
- alignItems: "center",
54215
- justifyContent: "center"
54216
- },
54217
- children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
54218
- name: "Organisation02",
54219
- width: 18,
54220
- height: 18,
54221
- color: token.baseGray90
54222
- })
54223
- }, i))
54224
- }) : '-';
54225
- }
54226
- }, {
54227
- title: "",
54228
- dataIndex: "actions",
54229
- key: "actions",
54230
- width: 60,
54231
- show: true,
54232
- render: (value, all) => {
54233
- if (all.empty) {
54234
- return /*#__PURE__*/jsxRuntime.jsx("div", {
54235
- className: "daf-default-cell"
54236
- });
54237
- }
54238
- return /*#__PURE__*/jsxRuntime.jsx("div", {
54239
- className: "cursor-pointer",
54240
- onClick: () => {
54241
- goTo(getRedirectLink(`/app/accounts/view/${all.id}/details`));
54242
- },
54243
- children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
54244
- name: "Link",
54245
- width: 18,
54246
- height: 18
54247
- })
54248
- });
54249
- }
54250
- }];
54251
- return cols.filter(c => c[show]);
54252
- };
54253
-
54254
54129
  const mapToSelectOptions = (items, valueKey, selectOptions, optionKey, customMapper = null) => {
54255
54130
  return items.map(item => {
54256
54131
  if (customMapper) {
@@ -54329,7 +54204,7 @@ const getColumns$1 = ({
54329
54204
  if (all?.administrativeLevel1 && value === all?.administrativeLevel1) {
54330
54205
  label = all?.linking?.SCL?.[value]?.name;
54331
54206
  } else {
54332
- label = getNameByLevel$1(all?.linking?.SCL, "level_1")?.name;
54207
+ label = getNameByLevel(all?.linking?.SCL, "level_1")?.name;
54333
54208
  }
54334
54209
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54335
54210
  title: label || '-',
@@ -54346,7 +54221,7 @@ const getColumns$1 = ({
54346
54221
  if (all?.administrativeLevel2 && value === all?.administrativeLevel2) {
54347
54222
  label = all?.linking?.SCL?.[value]?.name;
54348
54223
  } else {
54349
- label = getNameByLevel$1(all?.linking?.SCL, "level_2")?.name;
54224
+ label = getNameByLevel(all?.linking?.SCL, "level_2")?.name;
54350
54225
  }
54351
54226
  return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
54352
54227
  title: label || '-',
@@ -54478,7 +54353,7 @@ function CombineSubjectsModal({
54478
54353
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
54479
54354
  placeholder: t("Province"),
54480
54355
  options: mapToSelectOptions(selectedSubjects, null, selectOptions, null, subject => {
54481
- const _data = getNameByLevel$1(subject?.linking?.SCL, "level_1");
54356
+ const _data = getNameByLevel(subject?.linking?.SCL, "level_1");
54482
54357
  return {
54483
54358
  label: _data?.name || "-",
54484
54359
  value: _data?.id || "-"
@@ -54491,7 +54366,7 @@ function CombineSubjectsModal({
54491
54366
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
54492
54367
  placeholder: t("Territory"),
54493
54368
  options: mapToSelectOptions(selectedSubjects, null, selectOptions, null, subject => {
54494
- const _data = getNameByLevel$1(subject?.linking?.SCL, "level_2");
54369
+ const _data = getNameByLevel(subject?.linking?.SCL, "level_2");
54495
54370
  return {
54496
54371
  label: _data?.name || "-",
54497
54372
  value: _data?.id || "-"
@@ -54565,11 +54440,11 @@ function SubjectsTable(_ref) {
54565
54440
  return {
54566
54441
  category: (_config$options = config.options) === null || _config$options === void 0 ? void 0 : _config$options.category,
54567
54442
  country: (_config$options2 = config.options) === null || _config$options2 === void 0 ? void 0 : _config$options2.countries,
54568
- sources: []
54443
+ sources: [] //TODO: add sources logic and make sure you only show unique sources only once
54569
54444
  };
54570
54445
  }, [config.options]);
54571
54446
  const columns = React.useMemo(() => {
54572
- return getColumns$2({
54447
+ return getColumns$3({
54573
54448
  t,
54574
54449
  goTo,
54575
54450
  token,
@@ -54644,20 +54519,19 @@ function SubjectsTable(_ref) {
54644
54519
  }), /*#__PURE__*/jsxRuntime.jsx(CombineSubjectsModal, {
54645
54520
  isOpen: isCombineModalOpen,
54646
54521
  t: t,
54647
- onClose: () => setIsModalOpen(false),
54522
+ onClose: () => {
54523
+ setIsModalOpen(false);
54524
+ },
54648
54525
  onSuccess: data => {
54649
54526
  setIsModalOpen(false);
54650
54527
  setLoading(true);
54651
- antd.message.success(t("Subjects successfully merged."));
54652
54528
  if (typeof mergeSubjectsFunction === 'function') {
54653
- mergeSubjectsFunction(data).finally(() => {
54654
- setSelectedSubjects([]);
54655
- fetchData();
54656
- });
54529
+ mergeSubjectsFunction(data);
54530
+ setSelectedSubjects([]);
54657
54531
  }
54658
54532
  },
54659
54533
  selectedSubjects: selectedSubjects,
54660
- selectOptions: selectOptions,
54534
+ selectOptions: selectOptions || {},
54661
54535
  module: module,
54662
54536
  entity: headerTitle
54663
54537
  })]
@@ -55110,7 +54984,10 @@ const getColumns = ({
55110
54984
  }];
55111
54985
  return cols.filter(v => v.show);
55112
54986
  };
55113
- const checkboxConfig$7 = {};
54987
+ const checkboxConfig$7 = {
54988
+ name: "Name",
54989
+ datastakeId: "ID"
54990
+ };
55114
54991
  const selectFiltersConfig$7 = {
55115
54992
  userRole: {
55116
54993
  type: "select",
@@ -55140,18 +55017,11 @@ const selectFiltersConfig$7 = {
55140
55017
  }
55141
55018
  };
55142
55019
  const filtersConfig$7 = {
55143
- search: ""
55144
- };
55145
- const defaultUrlParams = {
55146
- search: "",
55147
- userRole: null,
55148
- status: null
55149
- };
55150
- const defaultTableFilters = {
55151
- search: "",
55152
- userRole: null,
55153
- status: null
55020
+ name: "",
55021
+ datastakeId: ""
55154
55022
  };
55023
+ const defaultUrlParams = {};
55024
+ const defaultTableFilters = {};
55155
55025
 
55156
55026
  function Users({
55157
55027
  t,
@@ -55195,9 +55065,9 @@ function Users({
55195
55065
  userRole: userRoles.filter(u => !u.isForAppAdmin),
55196
55066
  status: accountStatuses
55197
55067
  };
55198
- }, [userRoles, accountStatuses]);
55068
+ }, [userRoles]);
55199
55069
  const canClearSearch = React.useMemo(() => {
55200
- return !!activeFilters.search || !!activeFilters.userRole || !!activeFilters.status;
55070
+ return !!activeFilters.search;
55201
55071
  }, [activeFilters]);
55202
55072
  const onDeleteUserClick = React.useCallback(id => {
55203
55073
  antd.Modal.confirm({
@@ -55916,9 +55786,9 @@ function AdminDashboardScreen({
55916
55786
  fetchUserGrowth,
55917
55787
  userGrowthDataLoading
55918
55788
  } = useWidgetFetch();
55919
-
55920
- // console.log({userGrowthData});
55921
-
55789
+ console.log({
55790
+ userGrowthData
55791
+ });
55922
55792
  const actionsWidgetsConfig = React.useMemo(() => getActionWidgetsConfig({
55923
55793
  getRedirectLink
55924
55794
  }), [getRedirectLink, getActionWidgetsConfig]);
@@ -55929,7 +55799,6 @@ function AdminDashboardScreen({
55929
55799
  const safeUserActivity = Array.isArray(data?.data?.userActivity) ? data.data.userActivity : [];
55930
55800
  const safeTopContributors = Array.isArray(data?.topContributors) ? data.topContributors : [];
55931
55801
  const safeUserGrowth = Array.isArray(data?.userGrowthData) ? data.userGrowthData : [];
55932
- console.log("safeUserGrowth", safeUserGrowth);
55933
55802
  return /*#__PURE__*/jsxRuntime.jsx(AdminDashboard, {
55934
55803
  t: t,
55935
55804
  goTo: goTo,
@@ -56185,10 +56054,7 @@ function AdminSubjectsScreen({
56185
56054
  const handleMergeSubjects = React.useCallback(async mergeData => {
56186
56055
  try {
56187
56056
  if (AdminService.mergeSubjects) {
56188
- await AdminService.mergeSubjects({
56189
- subject: 'stakeholder',
56190
- ...mergeData
56191
- });
56057
+ await AdminService.mergeSubjects(mergeData);
56192
56058
  antd.message.success(t("Subjects merged successfully"));
56193
56059
  } else {
56194
56060
  console.warn("AdminService.mergeSubjects is not implemented");
@@ -56204,10 +56070,7 @@ function AdminSubjectsScreen({
56204
56070
  if (getData) {
56205
56071
  return getData(params);
56206
56072
  }
56207
- return AdminService.getSubjects({
56208
- subject: 'stakeholder',
56209
- params
56210
- });
56073
+ return AdminService.getSubjects(params);
56211
56074
  }, [getData, AdminService]);
56212
56075
  return /*#__PURE__*/jsxRuntime.jsx(SubjectsTable, {
56213
56076
  t: t,
@@ -56255,14 +56118,11 @@ function AdminLocationScreen({
56255
56118
  } = config;
56256
56119
  const handleMergeLocations = React.useCallback(async mergeData => {
56257
56120
  try {
56258
- if (AdminService.mergeSubjects) {
56259
- await AdminService.mergeSubjects({
56260
- subject: 'location',
56261
- ...mergeData
56262
- });
56121
+ if (AdminService.mergeLocations) {
56122
+ await AdminService.mergeLocations(mergeData);
56263
56123
  antd.message.success(t("Locations merged successfully"));
56264
56124
  } else {
56265
- console.warn("AdminService.mergeSubjects is not implemented");
56125
+ console.warn("AdminService.mergeLocations is not implemented");
56266
56126
  antd.message.success(t("Locations merged successfully"));
56267
56127
  }
56268
56128
  } catch (err) {
@@ -56270,15 +56130,12 @@ function AdminLocationScreen({
56270
56130
  }
56271
56131
  }, [AdminService, t, handleError]);
56272
56132
 
56273
- // Use custom getData if provided, otherwise use default AdminService.getSubjects
56133
+ // Use custom getData if provided, otherwise use default AdminService.getLocations
56274
56134
  const getLocations = React.useCallback(params => {
56275
56135
  if (getData) {
56276
56136
  return getData(params);
56277
56137
  }
56278
- return AdminService.getSubjects({
56279
- subject: 'location',
56280
- params
56281
- });
56138
+ return AdminService.getLocations(params);
56282
56139
  }, [getData, AdminService]);
56283
56140
  return /*#__PURE__*/jsxRuntime.jsx(LocationTable, {
56284
56141
  t: t,
@@ -56383,13 +56240,13 @@ function getAdminRoutes(config) {
56383
56240
  visible: user => userIsAdmin(user),
56384
56241
  component: subjectsIndexComponent
56385
56242
  }, ...(typeof useAdminLocationConfig === "function" ? [{
56386
- path: "management/subjects/location",
56243
+ path: "subjects/location",
56387
56244
  key: "".concat(APP_PREFIX, "_ADMIN_SUBJECTS_LOCATIONS"),
56388
56245
  exact: true,
56389
56246
  visible: user => userIsAdmin(user),
56390
56247
  component: /*#__PURE__*/jsxRuntime.jsx(LocationWrapper, {})
56391
56248
  }] : []), ...(typeof useAdminSubjectsConfig === "function" ? [{
56392
- path: "management/subjects/stakeholder",
56249
+ path: "subjects/stakeholder",
56393
56250
  key: "".concat(APP_PREFIX, "_ADMIN_SUBJECTS_STAKEHOLDERS"),
56394
56251
  exact: true,
56395
56252
  visible: user => userIsAdmin(user),