datastake-daf 0.6.755 → 0.6.756

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 (32) 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 +623 -581
  7. package/dist/hooks/index.js +11 -8
  8. package/dist/layouts/index.js +470 -448
  9. package/dist/pages/index.js +574 -510
  10. package/dist/utils/index.js +470 -448
  11. package/package.json +1 -1
  12. package/src/@daf/core/components/Graphs/components/BaseGraph.jsx +4 -2
  13. package/src/@daf/core/components/Icon/configs/ClockPlus.js +14 -0
  14. package/src/@daf/core/components/Icon/configs/WaziDarkIcon.js +15 -0
  15. package/src/@daf/core/components/Icon/configs/index.js +4 -0
  16. package/src/@daf/core/components/Screens/BaseScreen/index.jsx +3 -3
  17. package/src/@daf/hooks/useFilters.js +10 -8
  18. package/src/@daf/hooks/useWidgetFetch.js +3 -3
  19. package/src/@daf/pages/Dashboards/helper.js +3 -3
  20. package/src/@daf/pages/Documents/columns.js +2 -4
  21. package/src/@daf/pages/Events/Activities/index.jsx +1 -1
  22. package/src/@daf/pages/Events/columns.js +12 -14
  23. package/src/@daf/pages/Locations/MineSite/columns.js +16 -19
  24. package/src/@daf/pages/Locations/columns.js +2 -2
  25. package/src/@daf/pages/Stakeholders/Workers/columns.js +14 -4
  26. package/src/@daf/pages/Summary/Minesite/components/MineDetailsSection/index.js +1 -1
  27. package/src/@daf/pages/Summary/Minesite/index.jsx +1 -0
  28. package/src/@daf/pages/Summary/Operator/components/KeyInformation/config.js +7 -1
  29. package/src/@daf/pages/Summary/Operator/index.jsx +1 -0
  30. package/src/@daf/pages/Summary/components/InformationAvailability/index.js +1 -1
  31. package/src/@daf/pages/Summary/hook.js +5 -2
  32. package/src/styles/components/_dataLink.scss +1 -0
@@ -225,7 +225,7 @@ const useFilters = ({
225
225
  doPagination = true,
226
226
  getRedirectLink
227
227
  }) => {
228
- const params = React.useMemo(() => new URLSearchParams(location.search), [location.search]);
228
+ const params = React.useMemo(() => new URLSearchParams(location?.search), [location?.search]);
229
229
  const [activeFilters, setActiveFilters] = React.useState(defaultActiveFilters || getDefaultActiveFilters(params, selectFiltersConfig, defaultPageSize, defaultUrlParams, doPagination));
230
230
  const [pagination, setPagination] = React.useState(defaultActiveFilters ? {
231
231
  current: defaultActiveFilters.page || 1,
@@ -267,16 +267,16 @@ const useFilters = ({
267
267
  }).join('&');
268
268
  if (view) {
269
269
  if (typeof getRedirectLink === 'function') {
270
- goTo(getRedirectLink(view === 'mine-monitoring' ? qs !== '' ? `${location.pathname}?${qs}` : doPagination ? `${location.pathname}?page=${page}` : location.pathname : qs !== '' ? `${`/app/${view}`}?${qs}` : doPagination ? `${`/app/${view}`}?page=${page}` : `${`/app/${view}`}`));
270
+ goTo(getRedirectLink(view === 'mine-monitoring' ? qs !== '' ? `${location?.pathname}?${qs}` : doPagination ? `${location?.pathname}?page=${page}` : location?.pathname : qs !== '' ? `${`/app/${view}`}?${qs}` : doPagination ? `${`/app/${view}`}?page=${page}` : `${`/app/${view}`}`));
271
271
  return;
272
272
  }
273
273
  if (view === 'mine-monitoring') {
274
- goTo(qs !== '' ? `${location.pathname}?${qs}` : doPagination ? `${location.pathname}?page=${page}` : location.pathname);
274
+ goTo(qs !== '' ? `${location?.pathname}?${qs}` : doPagination ? `${location?.pathname}?page=${page}` : location?.pathname);
275
275
  } else {
276
276
  goTo(qs !== '' ? `${`/app/${module}/${view}`}?${qs}` : doPagination ? `${`/app/${module}/${view}`}?page=${page}` : `${`/app/${module}/${view}`}`);
277
277
  }
278
278
  }
279
- }, [module, view, location.pathname, goTo, getRedirectLink, doPagination]);
279
+ }, [module, view, location?.pathname, goTo, getRedirectLink, doPagination]);
280
280
  const defaultFilters = React.useMemo(() => {
281
281
  const def = {};
282
282
  Object.keys(selectFiltersConfig).forEach(key => {
@@ -419,6 +419,10 @@ const useFilters = ({
419
419
  }, [pagination]);
420
420
  const canGoPrev = React.useMemo(() => pagination.current !== 1, [pagination]);
421
421
  const canGoNext = React.useMemo(() => pagination.current !== totalPages && totalPages, [pagination, totalPages]);
422
+ console.log({
423
+ totalPages,
424
+ pagination
425
+ });
422
426
  const goPrev = () => {
423
427
  if (!canGoPrev) {
424
428
  return;
@@ -2268,10 +2272,9 @@ const useWidgetFetch = ({
2268
2272
  const [data, setData] = React.useState(defaultData || {});
2269
2273
  const [loading, setLoading] = React.useState(false);
2270
2274
  const fetchData = async () => {
2271
- // if (stop) {
2272
- // return;
2273
- // }
2274
-
2275
+ if (stop) {
2276
+ return;
2277
+ }
2275
2278
  setLoading(true);
2276
2279
  try {
2277
2280
  const {