datastake-daf 0.6.184 → 0.6.185

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.
@@ -18715,18 +18715,8 @@ const Style$A = dt.div`
18715
18715
  flex-direction: row;
18716
18716
  position: relative;
18717
18717
  width: 100%;
18718
- height: 472px;
18719
- min-height: 300px;
18720
-
18721
- @media (max-width: 768px) {
18722
- height: 350px;
18723
- min-height: 250px;
18724
- }
18725
-
18726
- @media (max-width: 480px) {
18727
- height: 300px;
18728
- min-height: 200px;
18729
- }
18718
+ height: 100%;
18719
+ min-height: 400px;
18730
18720
 
18731
18721
  .filter-cont {
18732
18722
  position: absolute;
@@ -18817,6 +18807,8 @@ const Style$A = dt.div`
18817
18807
  flex: 1;
18818
18808
  background: rgb(0, 0, 0);
18819
18809
  z-index: 1;
18810
+ width: 100%;
18811
+ height: 100%;
18820
18812
 
18821
18813
  /* Mapbox GL JS specific styles */
18822
18814
  .mapboxgl-ctrl-top-right {
@@ -20014,6 +20006,22 @@ const useGlobe = ({
20014
20006
  };
20015
20007
  };
20016
20008
 
20009
+ typeof localStorage.getItem('is_collapsed') === 'string' ? localStorage.getItem('is_collapsed') === 'true' ? true : false : true;
20010
+ typeof localStorage.getItem('is_nested_sidebar_collapsed') === 'string' ? localStorage.getItem('is_nested_sidebar_collapsed') === 'true' : true;
20011
+ const ResizeContext = /*#__PURE__*/React.createContext({
20012
+ resizeLoading: false,
20013
+ windowWidth: 0,
20014
+ resizeDif: 0,
20015
+ isCollapsed: false,
20016
+ setIsCollapsed: () => {},
20017
+ isNestedSidebarCollapsed: false,
20018
+ setIsNestedSidebarCollapsed: () => {}
20019
+ });
20020
+ const useResizeContext = () => {
20021
+ const values = React.useContext(ResizeContext);
20022
+ return values;
20023
+ };
20024
+
20017
20025
  function Globe(_ref) {
20018
20026
  var _activeMarker$data, _activeMarker$data2;
20019
20027
  let {
@@ -20054,6 +20062,11 @@ function Globe(_ref) {
20054
20062
  });
20055
20063
  }), [data]);
20056
20064
 
20065
+ // Get resize context for sidebar state changes
20066
+ const {
20067
+ isCollapsed
20068
+ } = useResizeContext();
20069
+
20057
20070
  // Use custom hook to configure globe functionality
20058
20071
  const {
20059
20072
  container,
@@ -20097,6 +20110,33 @@ function Globe(_ref) {
20097
20110
  return () => clearTimeout(timer);
20098
20111
  }
20099
20112
  }, [forceResize]);
20113
+
20114
+ // Force resize when sidebar state changes (handles width changes)
20115
+ React.useEffect(() => {
20116
+ if (forceResize) {
20117
+ // Trigger resize when sidebar collapses/expands
20118
+ const timer = setTimeout(() => {
20119
+ forceResize();
20120
+ }, 100);
20121
+ return () => clearTimeout(timer);
20122
+ }
20123
+ }, [isCollapsed, forceResize]);
20124
+
20125
+ // Add window resize listener as backup
20126
+ React.useEffect(() => {
20127
+ const handleWindowResize = () => {
20128
+ if (forceResize) {
20129
+ // Small delay to ensure DOM has updated
20130
+ setTimeout(() => {
20131
+ forceResize();
20132
+ }, 100);
20133
+ }
20134
+ };
20135
+ window.addEventListener('resize', handleWindowResize);
20136
+ return () => {
20137
+ window.removeEventListener('resize', handleWindowResize);
20138
+ };
20139
+ }, [forceResize]);
20100
20140
  return /*#__PURE__*/jsxRuntime.jsx(ComponentWithFocus, {
20101
20141
  children: /*#__PURE__*/jsxRuntime.jsxs(Style$A, {
20102
20142
  className: formatClassname([showSider && activeMarker && "with-sider"]),
@@ -51495,22 +51535,6 @@ function useConfig(data) {
51495
51535
  return config;
51496
51536
  }
51497
51537
 
51498
- typeof localStorage.getItem('is_collapsed') === 'string' ? localStorage.getItem('is_collapsed') === 'true' ? true : false : true;
51499
- typeof localStorage.getItem('is_nested_sidebar_collapsed') === 'string' ? localStorage.getItem('is_nested_sidebar_collapsed') === 'true' : true;
51500
- const ResizeContext = /*#__PURE__*/React.createContext({
51501
- resizeLoading: false,
51502
- windowWidth: 0,
51503
- resizeDif: 0,
51504
- isCollapsed: false,
51505
- setIsCollapsed: () => {},
51506
- isNestedSidebarCollapsed: false,
51507
- setIsNestedSidebarCollapsed: () => {}
51508
- });
51509
- const useResizeContext = () => {
51510
- const values = React.useContext(ResizeContext);
51511
- return values;
51512
- };
51513
-
51514
51538
  const DAYS = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"];
51515
51539
  function UserActivity({
51516
51540
  loading,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.184",
3
+ "version": "0.6.185",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -15,7 +15,7 @@
15
15
  "buffer": "^6.0.3",
16
16
  "countries-list": "^2.6.1",
17
17
  "country-city-location": "^1.0.13",
18
- "datastake-daf": "^0.5.780",
18
+ "datastake-daf": "0.6.184",
19
19
  "dayjs": "^1.11.12",
20
20
  "deepmerge": "^4.3.1",
21
21
  "dot-object": "^2.1.5",
@@ -8,6 +8,7 @@ import CustomIcon from "../../Icon/CustomIcon.jsx";
8
8
  import ComponentWithFocus from "../ComponentWithFocus/index.jsx";
9
9
  import { formatClassname } from "../../../../../helpers/ClassesHelper";
10
10
  import Filters from "../../Filters/FloatingFilters/index.js";
11
+ import { useResizeContext } from "../../../context/Resize/index.js";
11
12
 
12
13
  /**
13
14
  * Globe Component
@@ -129,6 +130,9 @@ function Globe({
129
130
  [data],
130
131
  );
131
132
 
133
+ // Get resize context for sidebar state changes
134
+ const { isCollapsed } = useResizeContext();
135
+
132
136
  // Use custom hook to configure globe functionality
133
137
  const { container, activeMarker, mapOptionsButtonsConfig, forceResize } = useGlobe({
134
138
  data: mappedData,
@@ -171,6 +175,36 @@ function Globe({
171
175
  }
172
176
  }, [forceResize]);
173
177
 
178
+ // Force resize when sidebar state changes (handles width changes)
179
+ useEffect(() => {
180
+ if (forceResize) {
181
+ // Trigger resize when sidebar collapses/expands
182
+ const timer = setTimeout(() => {
183
+ forceResize();
184
+ }, 100);
185
+
186
+ return () => clearTimeout(timer);
187
+ }
188
+ }, [isCollapsed, forceResize]);
189
+
190
+ // Add window resize listener as backup
191
+ useEffect(() => {
192
+ const handleWindowResize = () => {
193
+ if (forceResize) {
194
+ // Small delay to ensure DOM has updated
195
+ setTimeout(() => {
196
+ forceResize();
197
+ }, 100);
198
+ }
199
+ };
200
+
201
+ window.addEventListener('resize', handleWindowResize);
202
+
203
+ return () => {
204
+ window.removeEventListener('resize', handleWindowResize);
205
+ };
206
+ }, [forceResize]);
207
+
174
208
  return (
175
209
  <ComponentWithFocus>
176
210
  <Style className={formatClassname([showSider && activeMarker && "with-sider"])}>
@@ -5,18 +5,8 @@ const Style = styled.div`
5
5
  flex-direction: row;
6
6
  position: relative;
7
7
  width: 100%;
8
- height: 472px;
9
- min-height: 300px;
10
-
11
- @media (max-width: 768px) {
12
- height: 350px;
13
- min-height: 250px;
14
- }
15
-
16
- @media (max-width: 480px) {
17
- height: 300px;
18
- min-height: 200px;
19
- }
8
+ height: 100%;
9
+ min-height: 400px;
20
10
 
21
11
  .filter-cont {
22
12
  position: absolute;
@@ -107,6 +97,8 @@ const Style = styled.div`
107
97
  flex: 1;
108
98
  background: rgb(0, 0, 0);
109
99
  z-index: 1;
100
+ width: 100%;
101
+ height: 100%;
110
102
 
111
103
  /* Mapbox GL JS specific styles */
112
104
  .mapboxgl-ctrl-top-right {