@linzjs/step-ag-grid 32.7.1 → 34.0.0

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 (66) hide show
  1. package/dist/src/components/PostSortRowsHook.test.d.ts +1 -0
  2. package/dist/src/components/gridFilter/GridFilterColumnsMultiSelect.d.ts +6 -25
  3. package/dist/src/components/gridForm/GridFormTextInput.d.ts +2 -1
  4. package/dist/src/utils/__tests__/storybookTestUtil.ts +1 -1
  5. package/dist/step-ag-grid.cjs +190 -206
  6. package/dist/step-ag-grid.cjs.map +1 -1
  7. package/dist/step-ag-grid.esm.js +190 -206
  8. package/dist/step-ag-grid.esm.js.map +1 -1
  9. package/package.json +17 -17
  10. package/src/components/Grid.tsx +8 -10
  11. package/src/components/PostSortRowsHook.test.ts +300 -0
  12. package/src/components/PostSortRowsHook.ts +127 -24
  13. package/src/components/gridFilter/GridFilterColumnsMultiSelect.tsx +110 -199
  14. package/src/components/gridForm/GridFormTextInput.tsx +2 -1
  15. package/src/components/gridHook/useGridRangeSelection.ts +8 -6
  16. package/src/contexts/GridContextProvider.tsx +5 -9
  17. package/src/react-menu3/components/ControlledMenu.tsx +5 -3
  18. package/src/react-menu3/components/MenuList.tsx +7 -3
  19. package/src/react-menu3/hooks/useItems.ts +1 -1
  20. package/src/stories/components/ActionButton.stories.tsx +12 -11
  21. package/src/stories/decorators/withOpenInPanelDecorator.tsx +35 -0
  22. package/src/stories/grid/GridCopy.stories.tsx +38 -35
  23. package/src/stories/grid/GridDragRow.stories.tsx +41 -36
  24. package/src/stories/grid/GridFilterButtons.stories.tsx +25 -19
  25. package/src/stories/grid/GridFilterColumnsMultiSelect.stories.tsx +42 -37
  26. package/src/stories/grid/GridInlineText.stories.tsx +62 -49
  27. package/src/stories/grid/GridNoRowsOverlay.stories.tsx +28 -23
  28. package/src/stories/grid/GridNonEditableRow.stories.tsx +30 -24
  29. package/src/stories/grid/GridPinnedRow.stories.tsx +37 -31
  30. package/src/stories/grid/GridPopoutContextMenu.stories.tsx +29 -24
  31. package/src/stories/grid/GridPopoutEditBoolean.stories.tsx +89 -82
  32. package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +27 -22
  33. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +29 -24
  34. package/src/stories/grid/GridPopoverEditBearing.stories.tsx +30 -25
  35. package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +29 -24
  36. package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +29 -24
  37. package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +28 -24
  38. package/src/stories/grid/GridReadOnly.stories.tsx +56 -52
  39. package/src/stories/grid/GridSorting.stories.tsx +498 -86
  40. package/src/stories/grid/GridViewList.stories.tsx +31 -26
  41. package/src/stories/grid/GridViewSelectableList.stories.tsx +31 -26
  42. package/src/stories/grid/gridAutosize/GridAutoSize.stories.tsx +41 -37
  43. package/src/stories/grid/gridAutosize/GridFitSize.stories.tsx +40 -36
  44. package/src/stories/grid/gridAutosize/GridFitSizeFlex.stories.tsx +40 -36
  45. package/src/stories/grid/gridAutosize/ShowPanelResizingAgGrid/ShowPanelResizingStepAgGrid.tsx +14 -6
  46. package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +74 -74
  47. package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +59 -59
  48. package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +58 -58
  49. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +62 -62
  50. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +118 -118
  51. package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +107 -105
  52. package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +72 -64
  53. package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +82 -73
  54. package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +12 -13
  55. package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +12 -13
  56. package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +11 -13
  57. package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +11 -13
  58. package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +11 -13
  59. package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +11 -13
  60. package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +11 -13
  61. package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +11 -13
  62. package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +110 -107
  63. package/src/stories/react-menu/ReactMenu.stories.tsx +70 -73
  64. package/src/styles/GridLoadableCell.scss +1 -1
  65. package/src/utils/__tests__/storybookTestUtil.ts +1 -1
  66. package/src/utils/useSharedInterval.ts +3 -3
@@ -1,4 +1,4 @@
1
- import { Meta, StoryFn } from '@storybook/react-vite';
1
+ import { Meta, StoryFn, StoryObj } from '@storybook/react-vite';
2
2
  import { useMemo, useState } from 'react';
3
3
  import { expect, within } from 'storybook/test';
4
4
  import { fn } from 'storybook/test';
@@ -21,37 +21,7 @@ import {
21
21
  wait,
22
22
  } from '../../../';
23
23
  import { waitForGridReady } from '../../../utils/__tests__/storybookTestUtil';
24
-
25
- export default {
26
- title: 'Components / Grids',
27
- component: Grid,
28
- args: {
29
- quickFilter: true,
30
- quickFilterValue: '',
31
- quickFilterPlaceholder: 'Quick filter...',
32
- selectable: false,
33
- rowSelection: 'single',
34
- },
35
- // Storybook hangs otherwise
36
- parameters: {
37
- docs: {
38
- source: {
39
- type: 'code',
40
- },
41
- },
42
- },
43
- decorators: [
44
- (Story) => (
45
- <div style={{ width: 1024, height: 400 }}>
46
- <GridUpdatingContextProvider>
47
- <GridContextProvider>
48
- <Story />
49
- </GridContextProvider>
50
- </GridUpdatingContextProvider>
51
- </div>
52
- ),
53
- ],
54
- } as Meta<typeof Grid>;
24
+ import { withOpenInPanelDecorator } from '../../decorators/withOpenInPanelDecorator';
55
25
 
56
26
  interface ITestRow {
57
27
  id: number;
@@ -229,94 +199,127 @@ const GridKeyboardInteractionsTemplate: StoryFn<typeof Grid<ITestRow>> = (props:
229
199
  );
230
200
  };
231
201
 
232
- export const KeyboardInteractions: StoryFn<typeof Grid<ITestRow>> = GridKeyboardInteractionsTemplate.bind({});
233
- KeyboardInteractions.play = async ({ canvasElement }) => {
234
- const canvas = within(document.body);
202
+ const meta: Meta<typeof GridKeyboardInteractionsTemplate> = {
203
+ title: 'Components / Grids',
204
+ component: GridKeyboardInteractionsTemplate,
205
+ args: {
206
+ selectable: false,
207
+ rowSelection: 'single',
208
+ },
209
+ // Storybook hangs otherwise
210
+ parameters: {
211
+ docs: {
212
+ source: {
213
+ type: 'code',
214
+ },
215
+ },
216
+ },
217
+ decorators: [
218
+ (Story) => (
219
+ <div style={{ width: 1024, height: 400 }}>
220
+ <GridUpdatingContextProvider>
221
+ <GridContextProvider>
222
+ <Story />
223
+ </GridContextProvider>
224
+ </GridUpdatingContextProvider>
225
+ </div>
226
+ ),
227
+ withOpenInPanelDecorator,
228
+ ],
229
+ };
230
+ export default meta;
231
+
232
+ type Story = StoryObj<typeof meta>;
235
233
 
236
- multiEditAction.mockClear();
237
- eAction.mockClear();
238
- bulkEditingCallback.mockClear();
239
- await waitForGridReady({ canvasElement });
234
+ export const KeyboardInteractions: Story = {
235
+ play: async ({ canvasElement }) => {
236
+ const canvas = within(document.body);
240
237
 
241
- // Ensure first row/cell is selected on render
242
- await waitFor(() => {
243
- const activeCell = canvasElement.ownerDocument.activeElement;
244
- expect(activeCell).toHaveClass('ag-cell-focus');
245
- expect(activeCell).toHaveAttribute('aria-colindex', '1');
246
- expect(activeCell?.parentElement).toHaveAttribute('row-index', '0');
247
- });
248
- console.log('arrow down to 3rd row');
249
- await userEvent.keyboard('{arrowdown}{arrowdown}');
250
- console.log('arrow right to first popup menu');
251
- await userEvent.keyboard('{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}');
238
+ multiEditAction.mockClear();
239
+ eAction.mockClear();
240
+ bulkEditingCallback.mockClear();
241
+ await waitForGridReady({ canvasElement });
252
242
 
253
- // Test enter post focus
254
- const test = async (fn: () => Promise<any>, coldIndex: string, rowIndex: string) => {
255
- await userEvent.keyboard('{Enter}');
243
+ // Ensure first row/cell is selected on render
256
244
  await waitFor(() => {
257
- expect(canvasElement.ownerDocument.querySelector('.szh-menu')).toBeInTheDocument();
245
+ const activeCell = canvasElement.ownerDocument.activeElement;
246
+ expect(activeCell).toHaveClass('ag-cell-focus');
247
+ expect(activeCell).toHaveAttribute('aria-colindex', '1');
248
+ expect(activeCell?.parentElement).toHaveAttribute('row-index', '0');
258
249
  });
259
- await wait(1000);
260
- for (let i = 0; i < 2; i++) {
261
- await userEvent.keyboard('{arrowdown}');
250
+ console.log('arrow down to 3rd row');
251
+ await userEvent.keyboard('{arrowdown}{arrowdown}');
252
+ console.log('arrow right to first popup menu');
253
+ await userEvent.keyboard('{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}');
254
+
255
+ // Test enter post focus
256
+ const test = async (fn: () => Promise<any>, coldIndex: string, rowIndex: string) => {
257
+ await userEvent.keyboard('{Enter}');
262
258
  await waitFor(() => {
263
- const menuItems = canvasElement.ownerDocument.querySelectorAll('[role="menuitem"]');
264
- expect(menuItems[i]).toHaveClass('szh-menu__item--hover');
259
+ expect(canvasElement.ownerDocument.querySelector('.szh-menu')).toBeInTheDocument();
265
260
  });
266
- }
267
- await fn();
261
+ await wait(1000);
262
+ for (let i = 0; i < 2; i++) {
263
+ await userEvent.keyboard('{arrowdown}');
264
+ await waitFor(() => {
265
+ const menuItems = canvasElement.ownerDocument.querySelectorAll('[role="menuitem"]');
266
+ expect(menuItems[i]).toHaveClass('szh-menu__item--hover');
267
+ });
268
+ }
269
+ await fn();
268
270
 
269
- await waitFor(() => {
270
- const activeCell = canvasElement.ownerDocument.activeElement;
271
- expect(activeCell).toHaveClass('ag-cell-focus');
272
- expect(activeCell).toHaveAttribute('aria-colindex', coldIndex);
273
- expect(activeCell?.parentElement).toHaveAttribute('row-index', rowIndex);
274
- });
275
- await wait(200);
276
- };
271
+ await waitFor(() => {
272
+ const activeCell = canvasElement.ownerDocument.activeElement;
273
+ expect(activeCell).toHaveClass('ag-cell-focus');
274
+ expect(activeCell).toHaveAttribute('aria-colindex', coldIndex);
275
+ expect(activeCell?.parentElement).toHaveAttribute('row-index', rowIndex);
276
+ });
277
+ await wait(200);
278
+ };
277
279
 
278
- console.log('At 2nd to last cell open the popup menu and select 2nd option');
279
- await test(() => userEvent.keyboard('{Enter}'), '8', '2');
280
- expect(multiEditAction).toHaveBeenCalled();
280
+ console.log('At 2nd to last cell open the popup menu and select 2nd option');
281
+ await test(() => userEvent.keyboard('{Enter}'), '8', '2');
282
+ await expect(multiEditAction).toHaveBeenCalled();
281
283
 
282
- console.log('Open 2nd to last popup menu, tab to next disabled popup should fail');
283
- await test(() => userEvent.tab(), '8', '2');
284
- expect(bulkEditingCallback).toHaveBeenCalled();
285
- bulkEditingCallback.mockClear();
284
+ console.log('Open 2nd to last popup menu, tab to next disabled popup should fail');
285
+ await test(() => userEvent.tab(), '8', '2');
286
+ await expect(bulkEditingCallback).toHaveBeenCalled();
287
+ bulkEditingCallback.mockClear();
286
288
 
287
- console.log('Open 2nd to last popup menu, tab to desc cell');
288
- await test(() => userEvent.tab({ shift: true }), '5', '2');
289
- console.log('Cancel edit');
290
- await wait(500);
291
- await userEvent.keyboard('{Esc}');
292
- expect(bulkEditingCallback).toHaveBeenCalled();
293
- bulkEditingCallback.mockClear();
294
- await wait(500);
289
+ console.log('Open 2nd to last popup menu, tab to desc cell');
290
+ await test(() => userEvent.tab({ shift: true }), '5', '2');
291
+ console.log('Cancel edit');
292
+ await wait(500);
293
+ await userEvent.keyboard('{Esc}');
294
+ await expect(bulkEditingCallback).toHaveBeenCalled();
295
+ bulkEditingCallback.mockClear();
296
+ await wait(500);
295
297
 
296
- console.log('Open desc cell');
297
- await userEvent.keyboard('{Enter}');
298
- const textInput = await canvas.findByRole('textbox');
299
- expect(textInput).toBeInTheDocument();
300
- await userEvent.clear(textInput);
301
- await userEvent.type(textInput, 'foo');
298
+ console.log('Open desc cell');
299
+ await userEvent.keyboard('{Enter}');
300
+ const textInput = await canvas.findByRole('textbox');
301
+ await expect(textInput).toBeInTheDocument();
302
+ await userEvent.clear(textInput);
303
+ await userEvent.type(textInput, 'foo');
302
304
 
303
- await userEvent.tab();
304
- await userEvent.keyboard('{arrowleft}{arrowleft}{arrowleft}');
305
+ await userEvent.tab();
306
+ await userEvent.keyboard('{arrowleft}{arrowleft}{arrowleft}');
305
307
 
306
- await userEvent.keyboard('{Enter}');
307
- await waitFor(
308
- async () => {
309
- await canvas.findByText(/There are 1 row/);
310
- },
311
- { timeout: 5000 },
312
- );
313
- await userEvent.keyboard('{Esc}');
314
- await userEvent.tab();
308
+ await userEvent.keyboard('{Enter}');
309
+ await waitFor(
310
+ async () => {
311
+ await canvas.findByText(/There are 1 row/);
312
+ },
313
+ { timeout: 5000 },
314
+ );
315
+ await userEvent.keyboard('{Esc}');
316
+ await userEvent.tab();
315
317
 
316
- expect(eAction).not.toHaveBeenCalled();
317
- await userEvent.keyboard('{Enter}');
318
- await userEvent.keyboard('e');
319
- await waitFor(() => {
320
- expect(eAction).toHaveBeenCalled();
321
- });
318
+ await expect(eAction).not.toHaveBeenCalled();
319
+ await userEvent.keyboard('{Enter}');
320
+ await userEvent.keyboard('e');
321
+ await waitFor(() => {
322
+ expect(eAction).toHaveBeenCalled();
323
+ });
324
+ },
322
325
  };
@@ -1,27 +1,15 @@
1
- import '../../react-menu3/styles/index.scss';
2
-
3
- import { Meta, StoryFn } from '@storybook/react-vite';
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
4
2
  import { expect } from 'storybook/test';
5
3
  import * as test from 'storybook/test';
6
4
  import { userEvent, within } from 'storybook/test';
7
5
 
8
- import { Grid } from '../../components/Grid';
9
6
  import { Menu, MenuButton, MenuDivider, MenuItem, SubMenu } from '../../react-menu3';
10
7
  import { wait } from '../../utils/util';
11
8
 
12
- export default {
13
- title: 'Components / React-menu',
14
- component: Grid,
15
- args: {
16
- externalSelectedItems: [],
17
- setExternalSelectedItems: () => {},
18
- },
19
- } as Meta<typeof Grid>;
20
-
21
9
  const menuItemClickAction = test.fn();
22
10
  const newFileAction = test.fn();
23
11
 
24
- const ReactMenuTemplate: StoryFn<typeof Grid> = () => {
12
+ const ReactMenuTemplate = () => {
25
13
  return (
26
14
  <>
27
15
  <Menu menuButton={<MenuButton>Open menu</MenuButton>} onItemClick={menuItemClickAction}>
@@ -40,63 +28,72 @@ const ReactMenuTemplate: StoryFn<typeof Grid> = () => {
40
28
  );
41
29
  };
42
30
 
43
- export const ReactMenuControlled = ReactMenuTemplate.bind({});
44
- ReactMenuControlled.play = async ({ canvasElement }) => {
45
- const canvas = within(canvasElement);
46
-
47
- const keyboard = async (key: string) => {
48
- await userEvent.keyboard(key);
49
- await wait(100); // Wait for debounce
50
- };
51
-
52
- const menuButton = await canvas.findByRole('button');
53
- expect(menuButton).toBeInTheDocument();
54
-
55
- const openMenu = async () => {
56
- await wait(500); // Wait for debounce
57
- await userEvent.click(menuButton);
58
- expect(await canvas.findByRole('menuitem', { name: 'New File' })).toBeInTheDocument();
59
- };
60
-
61
- // Check menu closes on click outside
62
- await openMenu();
63
- await userEvent.click(menuButton.parentElement as Element);
64
- expect(canvas.queryByRole('menuitem', { name: 'New File' })).not.toBeInTheDocument();
65
-
66
- // Test arrow down/up
67
- await openMenu();
68
- await keyboard('{arrowdown}');
69
- await keyboard('{arrowdown}');
70
- await keyboard('{arrowdown}');
71
- await keyboard('{arrowdown}');
72
- await keyboard('{arrowdown}');
73
- expect(document.activeElement?.innerHTML).toBe('Exit');
74
-
75
- await keyboard('{arrowup}');
76
- expect(document.activeElement?.innerHTML).toBe('Print...');
77
-
78
- // Escape close
79
- await userEvent.type(menuButton.parentElement as Element, '{Escape}');
80
- expect(canvas.queryByRole('menuitem', { name: 'New File' })).not.toBeInTheDocument();
81
-
82
- // Test enter to select
83
- await openMenu();
84
- await keyboard('{arrowdown}');
85
- await keyboard('{enter}');
86
- expect(menuItemClickAction).toHaveBeenCalled();
87
- expect(newFileAction).toHaveBeenCalled();
88
-
89
- menuItemClickAction.mockClear();
90
- newFileAction.mockClear();
91
-
92
- // Test tab to select
93
- await openMenu();
94
- await keyboard('{arrowdown}');
95
- // For some reason arrow down takes a little time to activate
96
- await wait(10);
97
- await keyboard('{Tab}');
98
- expect(menuItemClickAction).toHaveBeenCalled();
99
- expect(newFileAction).toHaveBeenCalled();
100
-
101
- newFileAction.mockClear();
31
+ const meta: Meta<typeof ReactMenuTemplate> = {
32
+ title: 'Components / React-menu',
33
+ component: ReactMenuTemplate,
34
+ };
35
+ export default meta;
36
+
37
+ type Story = StoryObj<typeof meta>;
38
+
39
+ export const ReactMenuControlled: Story = {
40
+ play: async ({ canvasElement }) => {
41
+ const canvas = within(canvasElement);
42
+
43
+ const keyboard = async (key: string) => {
44
+ await userEvent.keyboard(key);
45
+ await wait(100); // Wait for debounce
46
+ };
47
+
48
+ const menuButton = await canvas.findByRole('button');
49
+ await expect(menuButton).toBeInTheDocument();
50
+
51
+ const openMenu = async () => {
52
+ await wait(500); // Wait for debounce
53
+ await userEvent.click(menuButton);
54
+ await expect(await canvas.findByRole('menuitem', { name: 'New File' })).toBeInTheDocument();
55
+ };
56
+
57
+ // Check menu closes on click outside
58
+ await openMenu();
59
+ await userEvent.click(menuButton.parentElement as Element);
60
+ await expect(canvas.queryByRole('menuitem', { name: 'New File' })).not.toBeInTheDocument();
61
+
62
+ // Test arrow down/up
63
+ await openMenu();
64
+ await keyboard('{arrowdown}');
65
+ await keyboard('{arrowdown}');
66
+ await keyboard('{arrowdown}');
67
+ await keyboard('{arrowdown}');
68
+ await keyboard('{arrowdown}');
69
+ await expect(document.activeElement?.innerHTML).toBe('Exit');
70
+
71
+ await keyboard('{arrowup}');
72
+ await expect(document.activeElement?.innerHTML).toBe('Print...');
73
+
74
+ // Escape close
75
+ await userEvent.type(menuButton.parentElement as Element, '{Escape}');
76
+ await expect(canvas.queryByRole('menuitem', { name: 'New File' })).not.toBeInTheDocument();
77
+
78
+ // Test enter to select
79
+ await openMenu();
80
+ await keyboard('{arrowdown}');
81
+ await keyboard('{enter}');
82
+ await expect(menuItemClickAction).toHaveBeenCalled();
83
+ await expect(newFileAction).toHaveBeenCalled();
84
+
85
+ menuItemClickAction.mockClear();
86
+ newFileAction.mockClear();
87
+
88
+ // Test tab to select
89
+ await openMenu();
90
+ await keyboard('{arrowdown}');
91
+ // For some reason arrow down takes a little time to activate
92
+ await wait(10);
93
+ await keyboard('{Tab}');
94
+ await expect(menuItemClickAction).toHaveBeenCalled();
95
+ await expect(newFileAction).toHaveBeenCalled();
96
+
97
+ newFileAction.mockClear();
98
+ },
102
99
  };
@@ -7,4 +7,4 @@
7
7
 
8
8
  .GridCellAlignCenter .GridLoadableCell-container {
9
9
  justify-content: center;
10
- }
10
+ }
@@ -23,7 +23,7 @@ export const clickColumnHeaderToSort = async (colId: string, within: HTMLElement
23
23
  };
24
24
 
25
25
  export const getNumberOfGridRows = (props?: { grid?: HTMLElement }): number => {
26
- return queryAllQuick({ classes: '.ag-row' }, props?.grid).length;
26
+ return queryAllQuick({ classes: '.ag-center-cols-viewport .ag-row' }, props?.grid).length;
27
27
  };
28
28
 
29
29
  export const gridColumnValues = (colId: string, within: HTMLElement): string[] => {
@@ -21,7 +21,7 @@ const startSharedInterval = () => {
21
21
  }
22
22
  });
23
23
  }, 100);
24
- }
24
+ };
25
25
 
26
26
  const stopSharedInterval = () => {
27
27
  if (sharedIntervalId === null) {
@@ -29,7 +29,7 @@ const stopSharedInterval = () => {
29
29
  }
30
30
  clearInterval(sharedIntervalId);
31
31
  sharedIntervalId = null;
32
- }
32
+ };
33
33
 
34
34
  /**
35
35
  * Like useInterval, but all callers share a single 100ms interval.
@@ -54,4 +54,4 @@ export const useSharedInterval = (callback: () => void) => {
54
54
  }
55
55
  };
56
56
  }, []);
57
- }
57
+ };