datastake-daf 0.6.149 → 0.6.150

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 (122) hide show
  1. package/dist/components/index.js +115 -262
  2. package/package.json +1 -1
  3. package/src/@daf/core/components/Dashboard/PdfView/index.jsx +59 -44
  4. package/src/@daf/core/components/Dashboard/Widget/ExpandableMapWidget/ExpandableMapWidget.stories.js +1693 -0
  5. package/src/@daf/core/components/Dashboard/Widget/ExpandableMapWidget/hook.js +44 -0
  6. package/src/@daf/core/components/Dashboard/Widget/ExpandableMapWidget/index.js +55 -0
  7. package/src/@daf/core/components/Dashboard/Widget/index.jsx +2 -1
  8. package/.vscode/settings.json +0 -13
  9. package/public/assets/images/SVG/403.svg +0 -20
  10. package/public/assets/images/SVG/404.svg +0 -11
  11. package/public/assets/images/SVG/CADD.svg +0 -27
  12. package/public/assets/images/SVG/InDevelopment.svg +0 -24
  13. package/public/assets/images/SVG/PME.svg +0 -21
  14. package/public/assets/images/SVG/comment-alt.svg +0 -3
  15. package/public/assets/images/SVG/comment.svg +0 -3
  16. package/public/assets/images/SVG/coordinator.svg +0 -3
  17. package/public/assets/images/SVG/implementer.svg +0 -3
  18. package/public/assets/images/SVG/logo-horizontal.svg +0 -1
  19. package/public/assets/images/SVG/partner-building.svg +0 -3
  20. package/public/assets/images/SVG/partner.svg +0 -5
  21. package/public/assets/images/SVG/unavailable-info.svg +0 -16
  22. package/public/assets/images/SVG/vault.svg +0 -6
  23. package/public/assets/images/app-navigation/mmt-logo.svg +0 -32
  24. package/public/assets/images/app-navigation/tazama-logo.svg +0 -31
  25. package/public/assets/images/app-navigation/tif-logo.svg +0 -33
  26. package/public/assets/images/applications/arm-prev.png +0 -0
  27. package/public/assets/images/applications/asm-icon.svg +0 -29
  28. package/public/assets/images/applications/kota-logo.svg +0 -4
  29. package/public/assets/images/applications/mmt-logo-2.svg +0 -5
  30. package/public/assets/images/applications/mmt-logo.svg +0 -6
  31. package/public/assets/images/applications/mmt-prev.png +0 -0
  32. package/public/assets/images/applications/sbgi_logo.png +0 -0
  33. package/public/assets/images/applications/tazama-home-img.jpeg +0 -0
  34. package/public/assets/images/applications/tazama-logo.svg +0 -9
  35. package/public/assets/images/applications/tif-app.png +0 -0
  36. package/public/assets/images/applications/tif-logo.svg +0 -9
  37. package/public/assets/images/auth-bg-2.svg +0 -296
  38. package/public/assets/images/auth-bg.svg +0 -303
  39. package/public/assets/images/countries/fr.png +0 -0
  40. package/public/assets/images/countries/gb.png +0 -0
  41. package/public/assets/images/countries/sp.png +0 -0
  42. package/public/assets/images/dashboard/amp-dashboard/empty.png +0 -0
  43. package/public/assets/images/dashboard/map-icons/amp.svg +0 -28
  44. package/public/assets/images/dashboard/map-icons/amp_focused.svg +0 -28
  45. package/public/assets/images/dashboard/map-icons/amp_location_pin.svg +0 -4
  46. package/public/assets/images/dashboard/map-icons/datachain-icon.svg +0 -21
  47. package/public/assets/images/dashboard/map-icons/ellipse.svg +0 -3
  48. package/public/assets/images/dashboard/map-icons/lir-icon.svg +0 -3
  49. package/public/assets/images/dashboard/map-icons/major-incident-events-icon.svg +0 -3
  50. package/public/assets/images/dashboard/map-icons/minesites-location-icon.svg +0 -21
  51. package/public/assets/images/dashboard/map-icons/minor-incident-events-icon.svg +0 -3
  52. package/public/assets/images/dashboard/map-icons/moderate-incident-events-icon.svg +0 -3
  53. package/public/assets/images/dashboard/map-icons/other-events-icon.svg +0 -3
  54. package/public/assets/images/dashboard/map-icons/other-location-icon.svg +0 -21
  55. package/public/assets/images/dashboard/map-icons/risk-mitigation-events-icon.svg +0 -3
  56. package/public/assets/images/dashboard/map-icons/sca_location_pin.svg +0 -4
  57. package/public/assets/images/dashboard/map-icons/villages-location-icon.svg +0 -21
  58. package/public/assets/images/dashboard/mine-site.svg +0 -7
  59. package/public/assets/images/dashboard/programs/key-data.svg +0 -12
  60. package/public/assets/images/dashboard/programs/key-projects.svg +0 -12
  61. package/public/assets/images/dashboard/scl-icons/close-icon.svg +0 -4
  62. package/public/assets/images/dashboard/scl-icons/dot.svg +0 -3
  63. package/public/assets/images/dashboard/scl-icons/empty-gallery.svg +0 -5
  64. package/public/assets/images/dashboard/scl-icons/location-icon.svg +0 -14
  65. package/public/assets/images/dashboard/scl-icons/town-dot.svg +0 -3
  66. package/public/assets/images/dashboard/scl-icons/town-icon.svg +0 -4
  67. package/public/assets/images/dashboard/scl-icons/village-icon.svg +0 -6
  68. package/public/assets/images/dashboard/tif-products/cobalt-bg.png +0 -0
  69. package/public/assets/images/dashboard/tif-products/cobalt-logo.png +0 -0
  70. package/public/assets/images/dashboard/tif-products/gold-bg.png +0 -0
  71. package/public/assets/images/dashboard/tif-products/gold-logo.png +0 -0
  72. package/public/assets/images/datastake-logo.svg +0 -20
  73. package/public/assets/images/datastake-white.svg +0 -20
  74. package/public/assets/images/empty-box.svg +0 -5
  75. package/public/assets/images/find-information/business-entity.svg +0 -4
  76. package/public/assets/images/find-information/civil-society.svg +0 -4
  77. package/public/assets/images/find-information/government.svg +0 -4
  78. package/public/assets/images/find-information/graphs.png +0 -0
  79. package/public/assets/images/find-information/individual.svg +0 -11
  80. package/public/assets/images/find-information/non-stated-arm-group.svg +0 -4
  81. package/public/assets/images/find-information/other-organisation.svg +0 -4
  82. package/public/assets/images/find-information/state-security.svg +0 -4
  83. package/public/assets/images/info-channels/investor.svg +0 -4
  84. package/public/assets/images/info-channels/mine.svg +0 -4
  85. package/public/assets/images/info-channels/source.png +0 -0
  86. package/public/assets/images/kota-bg.jpg +0 -0
  87. package/public/assets/images/kota-logo-small.svg +0 -2
  88. package/public/assets/images/kota-logo.svg +0 -2
  89. package/public/assets/images/logo-new-white-icon.svg +0 -5
  90. package/public/assets/images/logo-new-white.svg +0 -8
  91. package/public/assets/images/logo-white.svg +0 -67
  92. package/public/assets/images/map/assessed.png +0 -0
  93. package/public/assets/images/map/connected.png +0 -0
  94. package/public/assets/images/map/disabled.png +0 -0
  95. package/public/assets/images/map/identified.png +0 -0
  96. package/public/assets/images/map/position.png +0 -0
  97. package/public/assets/images/map/treasure-map.png +0 -0
  98. package/public/assets/images/project-share-info/due-dilligence.svg +0 -3
  99. package/public/assets/images/project-share-info/event.svg +0 -3
  100. package/public/assets/images/project-share-info/location.svg +0 -3
  101. package/public/assets/images/project-share-info/network.svg +0 -3
  102. package/public/assets/images/project-share-info/stakeholder.svg +0 -10
  103. package/public/assets/images/tif/antelope-mine-people.png +0 -0
  104. package/public/assets/images/tif/gesagu-people.png +0 -0
  105. package/public/assets/images/tif/ironstep-people.png +0 -0
  106. package/public/assets/images/tif-bg.png +0 -0
  107. package/public/assets/images/tif-logo-small.svg +0 -3
  108. package/public/assets/images/tif-logo.svg +0 -9
  109. package/public/assets/images/verified-user-tif.png +0 -0
  110. package/public/assets/images/verified-user.svg +0 -100
  111. package/public/favicons/android-chrome-192x192.png +0 -0
  112. package/public/favicons/android-chrome-512x512.png +0 -0
  113. package/public/favicons/apple-touch-icon.png +0 -0
  114. package/public/favicons/favicon-16x16.png +0 -0
  115. package/public/favicons/favicon-32x32.png +0 -0
  116. package/public/favicons/favicon.ico +0 -0
  117. package/public/favicons/tazama/android-chrome-192x192.png +0 -0
  118. package/public/favicons/tazama/android-chrome-512x512.png +0 -0
  119. package/public/favicons/tazama/apple-touch-icon.png +0 -0
  120. package/public/favicons/tazama/favicon-16x16.png +0 -0
  121. package/public/favicons/tazama/favicon-32x32.png +0 -0
  122. package/public/favicons/tazama/favicon.ico +0 -0
@@ -3065,7 +3065,7 @@ const config$3 = {
3065
3065
  Integration: config$4
3066
3066
  };
3067
3067
 
3068
- const _excluded$q = ["width", "height", "size", "name", "fill"];
3068
+ const _excluded$r = ["width", "height", "size", "name", "fill"];
3069
3069
  const CustomIcon = _ref => {
3070
3070
  let {
3071
3071
  width = 14,
@@ -3074,7 +3074,7 @@ const CustomIcon = _ref => {
3074
3074
  name = "",
3075
3075
  fill = "none"
3076
3076
  } = _ref,
3077
- props = _objectWithoutProperties(_ref, _excluded$q);
3077
+ props = _objectWithoutProperties(_ref, _excluded$r);
3078
3078
  const conf = config$3[name];
3079
3079
  if (conf) {
3080
3080
  return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -9276,7 +9276,7 @@ createCommonjsModule(function (module, exports) {
9276
9276
  !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])+"]"}}}));
9277
9277
  });
9278
9278
 
9279
- const _excluded$p = ["view", "module", "scope", "form", "meta"];
9279
+ const _excluded$q = ["view", "module", "scope", "form", "meta"];
9280
9280
  dayjs__default["default"].extend(customParseFormat);
9281
9281
  dayjs__default["default"].extend(utc);
9282
9282
  dayjs__default["default"].extend(utc);
@@ -9650,7 +9650,7 @@ const filterCreateData = data => {
9650
9650
  form,
9651
9651
  meta
9652
9652
  } = data,
9653
- rest = _objectWithoutProperties(data, _excluded$p);
9653
+ rest = _objectWithoutProperties(data, _excluded$q);
9654
9654
  const _meta = isObjectEmpty(meta) ? undefined : meta;
9655
9655
  return _objectSpread2(_objectSpread2({}, rest), {}, {
9656
9656
  meta: _meta
@@ -10035,7 +10035,7 @@ SelectFilters.propTypes = {
10035
10035
  apiUrl: PropTypes__default["default"].string
10036
10036
  };
10037
10037
 
10038
- const _excluded$o = ["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"];
10038
+ const _excluded$p = ["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"];
10039
10039
  function DAFTable(_ref) {
10040
10040
  let {
10041
10041
  columns = [],
@@ -10066,7 +10066,7 @@ function DAFTable(_ref) {
10066
10066
  app,
10067
10067
  doEmptyRows
10068
10068
  } = _ref,
10069
- rest = _objectWithoutProperties(_ref, _excluded$o);
10069
+ rest = _objectWithoutProperties(_ref, _excluded$p);
10070
10070
  const [source, setSource] = React.useState([]);
10071
10071
  const projectData = (projects || []).find(p => p.id === selectedProject);
10072
10072
  const [filtersInit, setFiltersInit] = React.useState(!loading);
@@ -10788,7 +10788,7 @@ Pagination.propTypes = {
10788
10788
  isMobile: PropTypes__default["default"].bool
10789
10789
  };
10790
10790
 
10791
- const _excluded$n = ["size", "maxHeight", "dataSource", "columns", "pagination"];
10791
+ const _excluded$o = ["size", "maxHeight", "dataSource", "columns", "pagination"];
10792
10792
  function StickyTable(_ref) {
10793
10793
  let {
10794
10794
  size = null,
@@ -10797,7 +10797,7 @@ function StickyTable(_ref) {
10797
10797
  columns = {},
10798
10798
  pagination = false
10799
10799
  } = _ref,
10800
- props = _objectWithoutProperties(_ref, _excluded$n);
10800
+ props = _objectWithoutProperties(_ref, _excluded$o);
10801
10801
  return /*#__PURE__*/jsxRuntime.jsx("div", {
10802
10802
  className: "daf-sticky-table",
10803
10803
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Table, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -11262,7 +11262,7 @@ const BTN_SIZE = {
11262
11262
  LG: 'large'
11263
11263
  };
11264
11264
 
11265
- const _excluded$m = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
11265
+ const _excluded$n = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
11266
11266
  function DafButton(_ref) {
11267
11267
  let {
11268
11268
  content = '',
@@ -11276,7 +11276,7 @@ function DafButton(_ref) {
11276
11276
  style = {},
11277
11277
  className = ''
11278
11278
  } = _ref,
11279
- restProps = _objectWithoutProperties(_ref, _excluded$m);
11279
+ restProps = _objectWithoutProperties(_ref, _excluded$n);
11280
11280
  return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
11281
11281
  icon: icon,
11282
11282
  type: type,
@@ -11510,12 +11510,12 @@ const Style$H = dt.div`
11510
11510
  }
11511
11511
  `;
11512
11512
 
11513
- const _excluded$l = ["children"];
11513
+ const _excluded$m = ["children"];
11514
11514
  const BorderedButton = _ref => {
11515
11515
  let {
11516
11516
  children
11517
11517
  } = _ref,
11518
- props = _objectWithoutProperties(_ref, _excluded$l);
11518
+ props = _objectWithoutProperties(_ref, _excluded$m);
11519
11519
  return /*#__PURE__*/jsxRuntime.jsx(Style$H, {
11520
11520
  className: "d-btn-cont",
11521
11521
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -11524,7 +11524,7 @@ const BorderedButton = _ref => {
11524
11524
  });
11525
11525
  };
11526
11526
 
11527
- var _templateObject$b;
11527
+ var _templateObject$c;
11528
11528
  const variantConfig = {
11529
11529
  default: {
11530
11530
  className: "default-badge",
@@ -11642,7 +11642,7 @@ function Badge(_ref) {
11642
11642
  })
11643
11643
  });
11644
11644
  }
11645
- const Style$G = dt.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 4px;\n\tpadding: 4px;\n\tmax-width: 100%;\n\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\n\t> svg {\n\t\tflex-shrink: 0;\n\t}\n\n\t> span {\n\t\tall: unset;\n\t\tmargin-left: 4px;\n\t\tfont-weight: 600;\n\t\tfont-size: 12px;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tdisplay: block;\n\t\tmax-width: 100%;\n\t}\n"])));
11645
+ const Style$G = dt.div(_templateObject$c || (_templateObject$c = _taggedTemplateLiteral(["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 4px;\n\tpadding: 4px;\n\tmax-width: 100%;\n\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\n\t> svg {\n\t\tflex-shrink: 0;\n\t}\n\n\t> span {\n\t\tall: unset;\n\t\tmargin-left: 4px;\n\t\tfont-weight: 600;\n\t\tfont-size: 12px;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tdisplay: block;\n\t\tmax-width: 100%;\n\t}\n"])));
11646
11646
  Badge.propTypes = {
11647
11647
  children: PropTypes__default["default"].node,
11648
11648
  className: PropTypes__default["default"].string,
@@ -11655,12 +11655,12 @@ Badge.propTypes = {
11655
11655
  props: PropTypes__default["default"].object
11656
11656
  };
11657
11657
 
11658
- const _excluded$k = ["icon"];
11658
+ const _excluded$l = ["icon"];
11659
11659
  function GetIcon(_ref) {
11660
11660
  let {
11661
11661
  icon
11662
11662
  } = _ref,
11663
- props = _objectWithoutProperties(_ref, _excluded$k);
11663
+ props = _objectWithoutProperties(_ref, _excluded$l);
11664
11664
  let Icon = Icons__namespace.CloseOutlined;
11665
11665
  if (Icons__namespace[icon]) {
11666
11666
  Icon = Icons__namespace[icon];
@@ -11982,7 +11982,7 @@ GoToSelect.propTypes = {
11982
11982
  t: PropTypes__default["default"].func
11983
11983
  };
11984
11984
 
11985
- const _excluded$j = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
11985
+ const _excluded$k = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
11986
11986
  const {
11987
11987
  useToken: useToken$j
11988
11988
  } = antd.theme;
@@ -12075,7 +12075,7 @@ function Multiselect(_ref) {
12075
12075
  isSingle = false,
12076
12076
  selectionType = SELECTION_TYPES.DEFAULT
12077
12077
  } = _ref,
12078
- restProps = _objectWithoutProperties(_ref, _excluded$j);
12078
+ restProps = _objectWithoutProperties(_ref, _excluded$k);
12079
12079
  const {
12080
12080
  token
12081
12081
  } = useToken$j();
@@ -12742,7 +12742,7 @@ DAFHeader.propTypes = {
12742
12742
  downloadDisabled: PropTypes__default["default"].any
12743
12743
  };
12744
12744
 
12745
- const _excluded$i = ["tabs", "onChange", "value", "className"];
12745
+ const _excluded$j = ["tabs", "onChange", "value", "className"];
12746
12746
  function TabsHeader(_ref) {
12747
12747
  let {
12748
12748
  tabs = [],
@@ -12750,7 +12750,7 @@ function TabsHeader(_ref) {
12750
12750
  value = '',
12751
12751
  className = 'mt-2'
12752
12752
  } = _ref,
12753
- rest = _objectWithoutProperties(_ref, _excluded$i);
12753
+ rest = _objectWithoutProperties(_ref, _excluded$j);
12754
12754
  return /*#__PURE__*/jsxRuntime.jsx("div", {
12755
12755
  className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
12756
12756
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
@@ -12847,14 +12847,16 @@ DrawerHeader.propTypes = {
12847
12847
  tabsConfig: PropTypes__default["default"].any
12848
12848
  };
12849
12849
 
12850
- const useFooter = ({
12851
- leftContent,
12852
- centerContent,
12853
- rightContent,
12854
- actionButtons,
12855
- app,
12856
- isViewMode
12857
- }) => {
12850
+ const _excluded$i = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
12851
+ const useFooter = _ref => {
12852
+ let {
12853
+ leftContent,
12854
+ centerContent,
12855
+ rightContent,
12856
+ actionButtons,
12857
+ app,
12858
+ isViewMode
12859
+ } = _ref;
12858
12860
  const renderFooterContent = React.useMemo(() => {
12859
12861
  const FooterContent = () => /*#__PURE__*/jsxRuntime.jsxs("div", {
12860
12862
  className: "daf-footer-content",
@@ -12870,18 +12872,18 @@ const useFooter = ({
12870
12872
  className: "daf-footer-actions",
12871
12873
  children: actionButtons.map((button, index) => {
12872
12874
  const {
12873
- label,
12874
- onClick,
12875
- icon,
12876
- type = BTN_TYPES.PRIMARY,
12877
- tooltip,
12878
- disabled = false,
12879
- loading = false,
12880
- style = {},
12881
- className = "",
12882
- ...restProps
12883
- } = button;
12884
- return /*#__PURE__*/jsxRuntime.jsx(DafButton, {
12875
+ label,
12876
+ onClick,
12877
+ icon,
12878
+ type = BTN_TYPES.PRIMARY,
12879
+ tooltip,
12880
+ disabled = false,
12881
+ loading = false,
12882
+ style = {},
12883
+ className = ""
12884
+ } = button,
12885
+ restProps = _objectWithoutProperties(button, _excluded$i);
12886
+ return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
12885
12887
  content: label,
12886
12888
  type: type,
12887
12889
  size: BTN_SIZE.MD,
@@ -12893,9 +12895,8 @@ const useFooter = ({
12893
12895
  loading: loading,
12894
12896
  title: tooltip,
12895
12897
  style: style,
12896
- className: className,
12897
- ...restProps
12898
- }, index);
12898
+ className: className
12899
+ }, restProps), index);
12899
12900
  })
12900
12901
  })]
12901
12902
  })]
@@ -12908,180 +12909,8 @@ const useFooter = ({
12908
12909
  };
12909
12910
  };
12910
12911
 
12911
- const FooterContainer = dt.div`
12912
- .daf-footer {
12913
- background: #ffffff;
12914
- border-top: 1px solid #e8e8e8;
12915
- border-left: none;
12916
- border-right: none;
12917
- border-bottom: none;
12918
- border-radius: 0;
12919
- padding: 24px;
12920
- margin: 0;
12921
- box-shadow: none;
12922
- z-index: 100;
12923
- position: relative;
12924
- min-height: 80px;
12925
-
12926
- &.daf-footer-fixed {
12927
- position: fixed;
12928
- bottom: 0;
12929
- left: 0;
12930
- right: 0;
12931
- z-index: 1000;
12932
- }
12933
-
12934
- .daf-footer-content {
12935
- display: flex;
12936
- align-items: center;
12937
- justify-content: space-between;
12938
- width: 100%;
12939
- min-height: 32px;
12940
-
12941
- .daf-footer-left {
12942
- flex: 1;
12943
- display: flex;
12944
- align-items: center;
12945
- justify-content: flex-start;
12946
- }
12947
-
12948
- .daf-footer-center {
12949
- flex: 1;
12950
- display: flex;
12951
- align-items: center;
12952
- justify-content: center;
12953
- }
12954
-
12955
- .daf-footer-right {
12956
- flex: 1;
12957
- display: flex;
12958
- align-items: center;
12959
- justify-content: flex-end;
12960
- gap: 12px;
12961
-
12962
- .daf-footer-actions {
12963
- .ant-btn {
12964
- height: 40px;
12965
- padding: 0 24px;
12966
- border-radius: 6px;
12967
- font-weight: 500;
12968
- font-size: 14px;
12969
- transition: all 0.3s ease;
12970
- border: 1px solid transparent;
12971
-
12972
- &.ant-btn-primary {
12973
- background-color: var(--color-primary-70);
12974
- color: #ffffff;
12975
- border-color: var(--color-primary-70);
12976
-
12977
- &:hover {
12978
- background-color: var(--color-primary-60);
12979
- border-color: var(--color-primary-60);
12980
- }
12981
-
12982
- &:active {
12983
- background-color: var(--color-primary-80);
12984
- border-color: var(--color-primary-80);
12985
- }
12986
-
12987
- &:disabled {
12988
- background-color: #f5f5f5;
12989
- color: #bfbfbf;
12990
- border-color: #d9d9d9;
12991
- }
12992
- }
12993
-
12994
- &.ant-btn-default {
12995
- background: #ffffff;
12996
- color: #666666;
12997
- border-color: #d9d9d9;
12998
-
12999
- &:hover {
13000
- border-color: var(--color-primary-70);
13001
- color: var(--color-primary-70);
13002
- }
13003
-
13004
- &:active {
13005
- border-color: var(--color-primary-80);
13006
- color: var(--color-primary-80);
13007
- }
13008
-
13009
- &:disabled {
13010
- background-color: #f5f5f5;
13011
- color: #bfbfbf;
13012
- border-color: #d9d9d9;
13013
- }
13014
- }
13015
-
13016
- &.ant-btn-ghost {
13017
- background: transparent;
13018
- color: #666666;
13019
- border-color: #d9d9d9;
13020
-
13021
- &:hover {
13022
- border-color: var(--color-primary-70);
13023
- color: var(--color-primary-70);
13024
- background: rgba(0, 0, 0, 0.02);
13025
- }
13026
-
13027
- &:active {
13028
- border-color: var(--color-primary-80);
13029
- color: var(--color-primary-80);
13030
- }
13031
-
13032
- &:disabled {
13033
- color: #bfbfbf;
13034
- border-color: #d9d9d9;
13035
- }
13036
- }
13037
- }
13038
- }
13039
- }
13040
- }
13041
- }
13042
-
13043
- /* Responsive design */
13044
- @media (max-width: 768px) {
13045
- .daf-footer {
13046
- margin: 0;
13047
- padding: 16px;
13048
-
13049
- .daf-footer-content {
13050
- flex-direction: column;
13051
- gap: 16px;
13052
- align-items: stretch;
13053
-
13054
- .daf-footer-left,
13055
- .daf-footer-center,
13056
- .daf-footer-right {
13057
- flex: none;
13058
- justify-content: center;
13059
- }
13060
-
13061
- .daf-footer-right {
13062
- .daf-footer-actions {
13063
- justify-content: center;
13064
- }
13065
- }
13066
- }
13067
- }
13068
- }
13069
-
13070
- /* App-specific styling */
13071
- &.sbg-app {
13072
- .daf-footer {
13073
- background: #f8f9fa;
13074
- border-color: #e9ecef;
13075
- }
13076
- }
13077
-
13078
- &.nashiriki-app {
13079
- .daf-footer {
13080
- background: #fff;
13081
- border-color: #d9d9d9;
13082
- }
13083
- }
13084
- `;
12912
+ var _templateObject$b;
12913
+ const FooterContainer = dt.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n\t.daf-footer {\n\t\tbackground: #ffffff;\n\t\tborder-top: 1px solid #e8e8e8;\n\t\tborder-left: none;\n\t\tborder-right: none;\n\t\tborder-bottom: none;\n\t\tborder-radius: 0;\n\t\tpadding: 24px;\n\t\tmargin: 0;\n\t\tbox-shadow: none;\n\t\tz-index: 100;\n\t\tposition: relative;\n\t\tmin-height: 80px;\n\n\t\t&.daf-footer-fixed {\n\t\t\tposition: fixed;\n\t\t\tbottom: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tz-index: 1000;\n\t\t}\n\n\t\t.daf-footer-content {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\twidth: 100%;\n\t\t\tmin-height: 32px;\n\n\t\t\t.daf-footer-left {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: flex-start;\n\t\t\t}\n\n\t\t\t.daf-footer-center {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t}\n\n\t\t\t.daf-footer-right {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: flex-end;\n\t\t\t\tgap: 12px;\n\n\t\t\t\t.daf-footer-actions {\n\t\t\t\t\t.ant-btn {\n\t\t\t\t\t\theight: 40px;\n\t\t\t\t\t\tpadding: 0 24px;\n\t\t\t\t\t\tborder-radius: 6px;\n\t\t\t\t\t\tfont-weight: 500;\n\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\ttransition: all 0.3s ease;\n\t\t\t\t\t\tborder: 1px solid transparent;\n\n\t\t\t\t\t\t&.ant-btn-primary {\n\t\t\t\t\t\t\tbackground-color: var(--color-primary-70);\n\t\t\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tbackground-color: var(--color-primary-60);\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-60);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tbackground-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tbackground-color: #f5f5f5;\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.ant-btn-default {\n\t\t\t\t\t\t\tbackground: #ffffff;\n\t\t\t\t\t\t\tcolor: #666666;\n\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-70);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tbackground-color: #f5f5f5;\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.ant-btn-ghost {\n\t\t\t\t\t\t\tbackground: transparent;\n\t\t\t\t\t\t\tcolor: #666666;\n\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-70);\n\t\t\t\t\t\t\t\tbackground: rgba(0, 0, 0, 0.02);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Responsive design */\n\t@media (max-width: 768px) {\n\t\t.daf-footer {\n\t\t\tmargin: 0;\n\t\t\tpadding: 16px;\n\n\t\t\t.daf-footer-content {\n\t\t\t\tflex-direction: column;\n\t\t\t\tgap: 16px;\n\t\t\t\talign-items: stretch;\n\n\t\t\t\t.daf-footer-left,\n\t\t\t\t.daf-footer-center,\n\t\t\t\t.daf-footer-right {\n\t\t\t\t\tflex: none;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.daf-footer-right {\n\t\t\t\t\t.daf-footer-actions {\n\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/* App-specific styling */\n\t&.sbg-app {\n\t\t.daf-footer {\n\t\t\tbackground: #f8f9fa;\n\t\t\tborder-color: #e9ecef;\n\t\t}\n\t}\n\n\t&.nashiriki-app {\n\t\t.daf-footer {\n\t\t\tbackground: #fff;\n\t\t\tborder-color: #d9d9d9;\n\t\t}\n\t}\n"])));
13085
12914
 
13086
12915
  function DAFFooter(_ref) {
13087
12916
  let {
@@ -13127,9 +12956,11 @@ DAFFooter.propTypes = {
13127
12956
  };
13128
12957
 
13129
12958
  const PAGE_HEIGHT = 1587;
13130
- // margin-top: 20, bottom: 20;
13131
12959
  const FOOTER_HEIGHT = 70;
13132
12960
  const HEADER_HEIGHT = 100;
12961
+ const ROW_SPACING = 24; // Spacing between content rows
12962
+ const CONTENT_BOTTOM_PADDING = 30; // Extra padding at the very bottom of the last section of the document
12963
+
13133
12964
  const Row = _ref => {
13134
12965
  let {
13135
12966
  widgets,
@@ -13178,49 +13009,84 @@ function PdfView(_ref2) {
13178
13009
  const keys = Object.keys(sectionsConfig);
13179
13010
  let _pages = [1];
13180
13011
  let _page = 1;
13012
+
13013
+ // The total vertical space available for flowing content on each page,
13014
+ // considering that HEADER_HEIGHT and FOOTER_HEIGHT are for absolutely positioned elements
13015
+ // and content should flow between them.
13016
+ const usableContentHeightPerPage = PAGE_HEIGHT - HEADER_HEIGHT - FOOTER_HEIGHT;
13181
13017
  if (keys.length === config.length) {
13182
- let incrHeight = 0;
13018
+ let currentFlowHeight = 0; // Tracks height accumulated within the `usableContentHeightPerPage` for the current page
13019
+
13020
+ // Reset all margins/paddings first for a clean slate
13183
13021
  keys.forEach(k => {
13184
13022
  const {
13185
13023
  ref
13186
13024
  } = sectionsConfig[k];
13187
- ref.current.style.marginBottom = '0px';
13188
- // ref.current.style.marginTop = '15px';
13025
+ if (ref.current) {
13026
+ ref.current.style.marginBottom = '0px';
13027
+ ref.current.style.marginTop = '0px';
13028
+ ref.current.style.paddingBottom = '0px';
13029
+ }
13189
13030
  });
13190
13031
  keys.forEach((k, i) => {
13191
13032
  const {
13192
13033
  height,
13193
13034
  ref
13194
13035
  } = sectionsConfig[k];
13195
- if (i === 0) {
13196
- ref.current.style.marginTop = "".concat(HEADER_HEIGHT, "px");
13197
- incrHeight += HEADER_HEIGHT;
13036
+ if (!ref.current) return; // Skip if ref is not available yet
13037
+
13038
+ let sectionTopMargin = ROW_SPACING; // Default margin for sections that follow another on the same page
13039
+
13040
+ // The first section on *any* page (either global first or first on a new page)
13041
+ // needs to be offset by HEADER_HEIGHT from the top of the page.
13042
+ if (i === 0 || currentFlowHeight === 0) {
13043
+ sectionTopMargin = HEADER_HEIGHT;
13198
13044
  }
13199
- const newHeight = incrHeight + height;
13200
- if (i === keys.length - 1) {
13201
- ref.current.style.paddingBottom = '30px';
13045
+
13046
+ // Calculate the total height this section would occupy *including its immediate top margin and its own height*.
13047
+ let totalHeightForThisSection = sectionTopMargin + height;
13048
+
13049
+ // If it's not the very last section of the document, add the standard row spacing.
13050
+ if (i < keys.length - 1) {
13051
+ totalHeightForThisSection += ROW_SPACING;
13052
+ } else {
13053
+ // For the very last section, add the document-level bottom padding.
13054
+ totalHeightForThisSection += CONTENT_BOTTOM_PADDING;
13202
13055
  }
13203
- if (newHeight > PAGE_HEIGHT - 30 - FOOTER_HEIGHT - HEADER_HEIGHT) {
13204
- const dif = Math.abs(PAGE_HEIGHT - incrHeight);
13205
- ref.current.style.marginTop = '30px';
13056
+
13057
+ // Check if placing this section (with its calculated space) on the current page
13058
+ // would exceed the usable content area for a theoretical page.
13059
+ if (currentFlowHeight + totalHeightForThisSection > usableContentHeightPerPage) {
13060
+ // This section overflows, so it starts on a new page.
13206
13061
  _page += 1;
13207
13062
  _pages.push(_page);
13208
- if (sectionsConfig[keys[i - 1]]) {
13209
- const {
13210
- ref: topRef
13211
- } = sectionsConfig[keys[i - 1]];
13212
- topRef.current.style.marginBottom = "".concat(dif + HEADER_HEIGHT - 24, "px");
13213
- incrHeight = height + 24 + HEADER_HEIGHT;
13214
- // console.log('margin', dif);
13063
+
13064
+ // Reset flow height for the new page.
13065
+ // This section is now the first on a new page, so its top margin is HEADER_HEIGHT.
13066
+ ref.current.style.marginTop = "".concat(HEADER_HEIGHT, "px");
13067
+ currentFlowHeight = HEADER_HEIGHT + height; // Start accumulated height for new page
13068
+
13069
+ // Add row spacing or bottom padding for this section on its new page
13070
+ if (i < keys.length - 1) {
13071
+ currentFlowHeight += ROW_SPACING;
13072
+ } else {
13073
+ ref.current.style.paddingBottom = "".concat(CONTENT_BOTTOM_PADDING, "px");
13074
+ currentFlowHeight += CONTENT_BOTTOM_PADDING;
13215
13075
  }
13216
13076
  } else {
13217
- incrHeight = newHeight + 24;
13077
+ // This section fits on the current page.
13078
+ ref.current.style.marginTop = "".concat(sectionTopMargin, "px");
13079
+ currentFlowHeight += totalHeightForThisSection; // Accumulate the height this section takes
13080
+
13081
+ // Apply special padding for the very last section of the document if it fits on current page
13082
+ if (i === keys.length - 1) {
13083
+ ref.current.style.paddingBottom = "".concat(CONTENT_BOTTOM_PADDING, "px");
13084
+ }
13218
13085
  }
13219
- // console.groupEnd();
13220
13086
  });
13221
13087
  setPages(_pages);
13222
13088
  }
13223
- }, [sectionsConfig]);
13089
+ }, [sectionsConfig, config.length]);
13224
13090
  React.useEffect(() => {
13225
13091
  doSizing();
13226
13092
  }, [doSizing]);
@@ -13246,16 +13112,6 @@ function PdfView(_ref2) {
13246
13112
  })
13247
13113
  });
13248
13114
  }, [config, onChangeHeight]);
13249
-
13250
- // <div className="daf-analysis">
13251
- // <Header title={t('Dashboard Title')} />
13252
-
13253
- // <div className="content">
13254
- // <div className="view-content">
13255
- // <div className="daf-analysis-layout">
13256
- // <div className='sections-cont w-pt'>
13257
- // <section>
13258
-
13259
13115
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
13260
13116
  className: contClassName,
13261
13117
  style: {
@@ -13266,11 +13122,13 @@ function PdfView(_ref2) {
13266
13122
  style: {
13267
13123
  top: (page - 1) * PAGE_HEIGHT,
13268
13124
  width: '100%',
13269
- height: HEADER_HEIGHT - 24,
13125
+ height: HEADER_HEIGHT,
13270
13126
  position: 'absolute',
13271
13127
  left: 0,
13272
13128
  zIndex: 1000000
13273
- },
13129
+ } // Changed height from HEADER_HEIGHT - 24 to HEADER_HEIGHT for consistency
13130
+ ,
13131
+
13274
13132
  className: "flex-row dashboard-header",
13275
13133
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
13276
13134
  className: "flex flex-column justify-center flex-1",
@@ -13331,15 +13189,6 @@ function PdfView(_ref2) {
13331
13189
  }))]
13332
13190
  });
13333
13191
  }
13334
- PdfView.propTypes = {
13335
- config: PropTypes__default["default"].array,
13336
- customClassName: PropTypes__default["default"].any,
13337
- title: PropTypes__default["default"].string,
13338
- imgSrc: PropTypes__default["default"].string,
13339
- userId: PropTypes__default["default"].string,
13340
- accountId: PropTypes__default["default"].string,
13341
- documentId: PropTypes__default["default"].string
13342
- };
13343
13192
 
13344
13193
  const ajaxSelectFieldData = async (value, config, getApiBaseUrl = () => {}, getAppHeader = () => {}, app, formValues = {}) => {
13345
13194
  const url = getApiBaseUrl();
@@ -15440,7 +15289,11 @@ function Widget(_ref) {
15440
15289
  className: "flex justify-content-end",
15441
15290
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
15442
15291
  size: "small",
15443
- className: "flex-1 no-min-width",
15292
+ className: "squareIconButton no-min-width",
15293
+ style: {
15294
+ height: '25px',
15295
+ width: '25px'
15296
+ },
15444
15297
  onClick: handleCollapseToggle,
15445
15298
  icon: isCollapsed ? /*#__PURE__*/jsxRuntime.jsx(Icons.RightOutlined, {
15446
15299
  style: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.149",
3
+ "version": "0.6.150",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",