@spteck/fluentui-react-charts 1.0.6 → 1.0.7

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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.6",
2
+ "version": "1.0.7",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -54,9 +54,9 @@
54
54
  "@fluentui/react-components": "^9.66.2",
55
55
  "@iconify/react": "^6.0.0",
56
56
  "@juggle/resize-observer": "^3.4.0",
57
- "@spteck/m365-hooks": "^1.2.0",
58
57
  "chart.js": "^4.5.0",
59
58
  "chartjs-plugin-datalabels": "^2.2.0",
59
+ "idb": "^8.0.3",
60
60
  "react": "^18.3.1",
61
61
  "react-chartjs-2": "^5.3.0",
62
62
  "react-charts": "^3.0.0-beta.57",
@@ -13,7 +13,7 @@ import { NoDashboards } from './NoDashboards';
13
13
  import { SelectZoom } from './selectZoom/SelectZoom';
14
14
  import { useChartFactory } from '../../hooks/useChartFactory';
15
15
  import { useDashboardStyles } from './useDashboardStyles';
16
- import { useIndexedDBCache } from '@spteck/m365-hooks';
16
+ import { useIndexedDBCache } from '../../hooks/useIndexedDBCache';
17
17
 
18
18
  const MINIMUM_DASHBOARD_WIDTH = 600;
19
19
  const MAX_ROWS = 4;
@@ -115,7 +115,7 @@ export const Dashboard: React.FC<IDashboardProps> = ({
115
115
  };
116
116
 
117
117
  initializeData();
118
- }, [cardCharts, getData, getOrderData]);
118
+ }, [cardCharts]); // Only depend on cardCharts - getData/getOrderData are stable
119
119
 
120
120
  // Save sizes to cache whenever they change
121
121
  useEffect(() => {
@@ -131,7 +131,7 @@ export const Dashboard: React.FC<IDashboardProps> = ({
131
131
  if (Object.keys(sizes).length > 0) {
132
132
  saveSizesToCache();
133
133
  }
134
- }, [sizes, setData]);
134
+ }, [sizes]); // Only depend on sizes - setData is stable
135
135
 
136
136
  // Save card order to cache whenever it changes
137
137
  useEffect(() => {
@@ -148,7 +148,7 @@ export const Dashboard: React.FC<IDashboardProps> = ({
148
148
  if (CardChartContainer.length > 0) {
149
149
  saveOrderToCache();
150
150
  }
151
- }, [CardChartContainer, setOrderData]);
151
+ }, [CardChartContainer]); // Only depend on CardChartContainer - setOrderData is stable
152
152
 
153
153
  useEffect(() => {
154
154
  if (containerWidth <= MINIMUM_DASHBOARD_WIDTH) {
@@ -16,7 +16,6 @@ import {
16
16
  bundleIcon,
17
17
  } from "@fluentui/react-icons";
18
18
 
19
- import { Icon } from "@iconify/react";
20
19
  import { RenderLabel } from "../../RenderLabel";
21
20
  import { css } from "@emotion/css";
22
21
 
@@ -35,6 +34,7 @@ const useStyles = (): {
35
34
  selectedCell: string;
36
35
  menuPopover: string;
37
36
  bottomText: string;
37
+ zoomContainer: string;
38
38
  } => ({
39
39
  gridContainer: css`
40
40
  display: grid;
@@ -65,8 +65,17 @@ const useStyles = (): {
65
65
  padding-left: 8px;
66
66
  padding-right: 8px;
67
67
  `,
68
-
69
-
68
+ zoomContainer: css({
69
+ display: 'flex',
70
+ flexDirection: 'row',
71
+ alignItems: 'center',
72
+ gap: '6px',
73
+ width: '100%',
74
+ boxSizing: 'border-box',
75
+
76
+ padding: '8px 0px',
77
+
78
+ }),
70
79
  });
71
80
 
72
81
  export const SelectZoom: React.FunctionComponent<ISelectZoomProps> = (
@@ -148,25 +157,11 @@ export const SelectZoom: React.FunctionComponent<ISelectZoomProps> = (
148
157
  style={{ width: `${popoverWidth}px`, minWidth: "120px", padding: 8 }}
149
158
  >
150
159
  <div
151
- style={{
152
- display: "flex",
153
- flexDirection: "row",
154
- alignItems: "center",
155
- gap: "6px",
156
- width: "100%",
157
- boxSizing: "border-box",
158
- padding: "8px",
159
- }}
160
+ className={styles.zoomContainer}
160
161
  >
161
162
  <RenderLabel
162
- label={`Selected Span (${values.spanCols} × ${values.spanRows})`}
163
- icon={
164
- <Icon
165
- icon="fluent:number-row-20-regular"
166
- width="32"
167
- height="32"
168
- />
169
- }
163
+ label={`Span (${values.spanCols} × ${values.spanRows})`}
164
+
170
165
  />
171
166
  </div>
172
167
 
@@ -1,6 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-floating-promises */
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
- /* eslint-disable @typescript-eslint/explicit-function-return-type */
4
1
  import {
5
2
  DBSchema,
6
3
  openDB,