@linzjs/step-ag-grid 15.1.3 → 17.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 (127) hide show
  1. package/dist/GridTheme.scss +138 -106
  2. package/dist/index.css +1 -8
  3. package/dist/node_modules/@linzjs/lui/dist/assets/svg-content.d.ts +7 -0
  4. package/dist/src/components/ComponentLoadingWrapper.d.ts +3 -4
  5. package/dist/src/components/Grid.d.ts +2 -2
  6. package/dist/src/components/GridCell.d.ts +6 -6
  7. package/dist/src/components/GridCellMultiEditor.d.ts +2 -2
  8. package/dist/src/components/GridIcon.d.ts +2 -2
  9. package/dist/src/components/GridLoadableCell.d.ts +1 -2
  10. package/dist/src/components/GridNoRowsOverlay.d.ts +5 -4
  11. package/dist/src/components/GridPopoverHook.d.ts +3 -3
  12. package/dist/src/components/GridWrapper.d.ts +2 -3
  13. package/dist/src/components/PostSortRowsHook.d.ts +1 -1
  14. package/dist/src/components/gridFilter/GridFilterButtons.d.ts +2 -2
  15. package/dist/src/components/gridFilter/GridFilterColumnsToggle.d.ts +2 -2
  16. package/dist/src/components/gridFilter/GridFilterDownloadCsvButton.d.ts +1 -2
  17. package/dist/src/components/gridFilter/GridFilterQuick.d.ts +1 -2
  18. package/dist/src/components/gridFilter/GridFilters.d.ts +2 -5
  19. package/dist/src/components/gridForm/GridFormDropDown.d.ts +3 -3
  20. package/dist/src/components/gridForm/GridFormEditBearing.d.ts +1 -2
  21. package/dist/src/components/gridForm/GridFormMessage.d.ts +3 -3
  22. package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +3 -3
  23. package/dist/src/components/gridForm/GridFormPopoverMenu.d.ts +4 -4
  24. package/dist/src/components/gridForm/GridFormSubComponentTextArea.d.ts +2 -2
  25. package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +2 -2
  26. package/dist/src/components/gridForm/GridFormTextArea.d.ts +2 -2
  27. package/dist/src/components/gridForm/GridFormTextInput.d.ts +1 -2
  28. package/dist/src/components/gridHeader/GridHeaderSelect.d.ts +1 -2
  29. package/dist/src/components/gridHook/useGridContextMenu.d.ts +1 -1
  30. package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +2 -2
  31. package/dist/src/components/gridRender/GridRenderPopoutMenuCell.d.ts +1 -2
  32. package/dist/src/contexts/GridContext.d.ts +5 -5
  33. package/dist/src/contexts/GridContextProvider.d.ts +2 -6
  34. package/dist/src/contexts/GridPopoverContextProvider.d.ts +2 -3
  35. package/dist/src/contexts/GridUpdatingContextProvider.d.ts +2 -6
  36. package/dist/src/lui/ActionButton.d.ts +3 -3
  37. package/dist/src/lui/FormError.d.ts +3 -3
  38. package/dist/src/lui/TextAreaInput.d.ts +4 -4
  39. package/dist/src/lui/TextInputFormatted.d.ts +3 -3
  40. package/dist/src/react-menu3/components/ControlledMenu.d.ts +3 -3
  41. package/dist/src/react-menu3/components/FocusableItem.d.ts +4 -4
  42. package/dist/src/react-menu3/components/Menu.d.ts +2 -2
  43. package/dist/src/react-menu3/components/MenuButton.d.ts +1 -1
  44. package/dist/src/react-menu3/components/MenuDivider.d.ts +1 -1
  45. package/dist/src/react-menu3/components/MenuGroup.d.ts +2 -2
  46. package/dist/src/react-menu3/components/MenuHeader.d.ts +2 -2
  47. package/dist/src/react-menu3/components/MenuItem.d.ts +1 -1
  48. package/dist/src/react-menu3/components/MenuList.d.ts +1 -2
  49. package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +2 -2
  50. package/dist/src/react-menu3/components/SubMenu.d.ts +2 -2
  51. package/dist/src/react-menu3/utils/utils.d.ts +1 -1
  52. package/dist/src/react-menu3/utils/withHovering.d.ts +2 -2
  53. package/dist/src/utils/textValidator.d.ts +3 -3
  54. package/dist/step-ag-grid.cjs.js +1007 -3909
  55. package/dist/step-ag-grid.cjs.js.map +1 -1
  56. package/dist/step-ag-grid.esm.js +1008 -3910
  57. package/dist/step-ag-grid.esm.js.map +1 -1
  58. package/package.json +63 -59
  59. package/src/components/ComponentLoadingWrapper.tsx +9 -6
  60. package/src/components/Grid.tsx +32 -27
  61. package/src/components/GridCell.tsx +5 -5
  62. package/src/components/GridCellMultiEditor.tsx +2 -2
  63. package/src/components/GridIcon.tsx +2 -1
  64. package/src/components/GridNoRowsOverlay.tsx +10 -11
  65. package/src/components/GridPopoverHook.tsx +4 -4
  66. package/src/components/GridWrapper.tsx +2 -3
  67. package/src/components/PostSortRowsHook.ts +4 -4
  68. package/src/components/gridFilter/GridFilterButtons.tsx +2 -2
  69. package/src/components/gridFilter/GridFilterColumnsToggle.tsx +2 -2
  70. package/src/components/gridFilter/GridFilters.tsx +4 -6
  71. package/src/components/gridForm/GridFormDropDown.tsx +4 -4
  72. package/src/components/gridForm/GridFormMessage.tsx +3 -3
  73. package/src/components/gridForm/GridFormMultiSelect.tsx +2 -1
  74. package/src/components/gridForm/GridFormPopoverMenu.tsx +4 -4
  75. package/src/components/gridForm/GridFormSubComponentTextArea.tsx +2 -2
  76. package/src/components/gridForm/GridFormSubComponentTextInput.tsx +2 -2
  77. package/src/components/gridForm/GridFormTextArea.tsx +2 -2
  78. package/src/components/gridPopoverEdit/GridPopoverMessage.ts +1 -1
  79. package/src/components/gridRender/GridRenderGenericCell.tsx +2 -1
  80. package/src/contexts/GridContext.tsx +5 -5
  81. package/src/contexts/GridContextProvider.tsx +57 -32
  82. package/src/contexts/GridPopoverContextProvider.tsx +2 -3
  83. package/src/contexts/GridUpdatingContextProvider.tsx +2 -6
  84. package/src/lui/ActionButton.tsx +4 -3
  85. package/src/lui/FormError.tsx +3 -1
  86. package/src/lui/TextAreaInput.tsx +3 -3
  87. package/src/lui/TextInputFormatted.tsx +5 -4
  88. package/src/lui/reactUtils.test.tsx +7 -6
  89. package/src/react-menu3/components/FocusableItem.tsx +2 -2
  90. package/src/react-menu3/utils/utils.ts +1 -1
  91. package/src/react-menu3/utils/withHovering.tsx +2 -2
  92. package/src/stories/components/ActionButton.stories.tsx +2 -1
  93. package/src/stories/grid/FormTest.tsx +4 -3
  94. package/src/stories/grid/GridFilterButtons.stories.tsx +13 -16
  95. package/src/stories/grid/GridNoRowsOverlay.stories.tsx +14 -11
  96. package/src/stories/grid/GridNonEditableRow.stories.tsx +13 -5
  97. package/src/stories/grid/GridPopoutContextMenu.stories.tsx +12 -4
  98. package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +12 -4
  99. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +13 -5
  100. package/src/stories/grid/GridPopoverEditBearing.stories.tsx +11 -3
  101. package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +11 -3
  102. package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +11 -3
  103. package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +12 -3
  104. package/src/stories/grid/GridReadOnly.stories.tsx +22 -5
  105. package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +15 -12
  106. package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +20 -12
  107. package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +20 -12
  108. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +13 -10
  109. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +19 -16
  110. package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +21 -17
  111. package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +13 -10
  112. package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +15 -12
  113. package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +5 -2
  114. package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +5 -2
  115. package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +5 -2
  116. package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +6 -3
  117. package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +4 -1
  118. package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +4 -1
  119. package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +5 -2
  120. package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +5 -2
  121. package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +25 -12
  122. package/src/stories/react-menu/ReactMenu.stories.tsx +6 -4
  123. package/src/styles/ComponentLoadingWrapper.scss +1 -4
  124. package/src/styles/Grid.scss +0 -4
  125. package/src/styles/GridTheme.scss +138 -106
  126. package/src/utils/testUtil.ts +3 -0
  127. package/src/utils/textValidator.ts +3 -1
@@ -1,10 +1,13 @@
1
+ import "../../../styles/GridTheme.scss";
2
+ import "../../../styles/index.scss";
3
+ import "@linzjs/lui/dist/scss/base.scss";
4
+
1
5
  import { expect, jest } from "@storybook/jest";
2
6
  import { ComponentMeta, ComponentStory } from "@storybook/react/dist/ts3.9/client/preview/types-6-3";
3
7
  import { userEvent, waitFor } from "@storybook/testing-library";
4
8
  import { useMemo, useState } from "react";
5
9
 
6
10
  import "@linzjs/lui/dist/fonts";
7
- import "@linzjs/lui/dist/scss/base.scss";
8
11
 
9
12
  import {
10
13
  ColDefT,
@@ -21,8 +24,6 @@ import {
21
24
  MenuOption,
22
25
  wait,
23
26
  } from "../../../";
24
- import "../../../styles/GridTheme.scss";
25
- import "../../../styles/index.scss";
26
27
 
27
28
  export default {
28
29
  title: "Components / Grids",
@@ -34,6 +35,14 @@ export default {
34
35
  selectable: false,
35
36
  rowSelection: "single",
36
37
  },
38
+ // Storybook hangs otherwise
39
+ parameters: {
40
+ docs: {
41
+ source: {
42
+ type: "code",
43
+ },
44
+ },
45
+ },
37
46
  decorators: [
38
47
  (Story) => (
39
48
  <div style={{ width: 1024, height: 400 }}>
@@ -216,6 +225,10 @@ GridKeyboardInteractions.play = async ({ canvasElement }) => {
216
225
  multiEditAction.mockReset();
217
226
  eAction.mockReset();
218
227
 
228
+ await waitFor(() => {
229
+ expect(canvasElement.querySelector(".Grid-ready")).toBeInTheDocument();
230
+ });
231
+
219
232
  // Ensure first row/cell is selected on render
220
233
  await waitFor(async () => {
221
234
  const activeCell = canvasElement.ownerDocument.activeElement;
@@ -223,14 +236,14 @@ GridKeyboardInteractions.play = async ({ canvasElement }) => {
223
236
  expect(activeCell).toHaveAttribute("aria-colindex", "1");
224
237
  expect(activeCell?.parentElement).toHaveAttribute("row-index", "0");
225
238
  });
226
- userEvent.keyboard("{arrowdown}{arrowdown}");
227
- userEvent.keyboard("{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}");
239
+ await userEvent.keyboard("{arrowdown}{arrowdown}");
240
+ await userEvent.keyboard("{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}{arrowright}");
228
241
 
229
242
  // Test enter post focus
230
243
  const test = async (fn: () => any, colId: string, rowId: string) => {
231
- userEvent.keyboard("{Enter}");
244
+ await userEvent.keyboard("{Enter}");
232
245
  await wait(1000);
233
- userEvent.keyboard("{arrowdown}{arrowdown}");
246
+ await userEvent.keyboard("{arrowdown}{arrowdown}");
234
247
  fn();
235
248
  await waitFor(async () => {
236
249
  expect(multiEditAction).toHaveBeenCalled();
@@ -247,16 +260,16 @@ GridKeyboardInteractions.play = async ({ canvasElement }) => {
247
260
 
248
261
  await test(() => userEvent.keyboard("{Enter}"), "8", "2");
249
262
  await test(() => userEvent.tab(), "9", "2");
250
- userEvent.tab({ shift: true });
263
+ await userEvent.tab({ shift: true });
251
264
  await test(() => userEvent.tab({ shift: true }), "6", "2");
252
- userEvent.keyboard("{Esc}");
253
- userEvent.tab();
265
+ await userEvent.keyboard("{Esc}");
266
+ await userEvent.tab();
254
267
 
255
- userEvent.keyboard("{Enter}");
268
+ await userEvent.keyboard("{Enter}");
256
269
  await wait(250);
257
270
  expect(eAction).not.toHaveBeenCalled();
258
271
 
259
- userEvent.keyboard("e");
272
+ await userEvent.keyboard("e");
260
273
  await waitFor(async () => {
261
274
  expect(eAction).toHaveBeenCalled();
262
275
  });
@@ -1,3 +1,5 @@
1
+ import "../../react-menu3/styles/index.scss";
2
+
1
3
  import { expect, jest } from "@storybook/jest";
2
4
  import { ComponentMeta, ComponentStory } from "@storybook/react/dist/ts3.9/client/preview/types-6-3";
3
5
  import { userEvent, within } from "@storybook/testing-library";
@@ -42,7 +44,7 @@ ReactMenuControlled.play = async ({ canvasElement }) => {
42
44
  const canvas = within(canvasElement);
43
45
 
44
46
  const keyboard = async (key: string) => {
45
- userEvent.keyboard(key);
47
+ await userEvent.keyboard(key);
46
48
  await wait(100); // Wait for debounce
47
49
  };
48
50
 
@@ -51,13 +53,13 @@ ReactMenuControlled.play = async ({ canvasElement }) => {
51
53
 
52
54
  const openMenu = async () => {
53
55
  await wait(500); // Wait for debounce
54
- userEvent.click(menuButton);
56
+ await userEvent.click(menuButton);
55
57
  expect(await canvas.findByRole("menuitem", { name: "New File" })).toBeInTheDocument();
56
58
  };
57
59
 
58
60
  // Check menu closes on click outside
59
61
  await openMenu();
60
- userEvent.click(menuButton.parentElement as Element);
62
+ await userEvent.click(menuButton.parentElement as Element);
61
63
  expect(canvas.queryByRole("menuitem", { name: "New File" })).not.toBeInTheDocument();
62
64
 
63
65
  // Test arrow down/up
@@ -73,7 +75,7 @@ ReactMenuControlled.play = async ({ canvasElement }) => {
73
75
  expect(document.activeElement?.innerHTML).toBe("Print...");
74
76
 
75
77
  // Escape close
76
- userEvent.type(menuButton.parentElement as Element, "{Escape}");
78
+ await userEvent.type(menuButton.parentElement as Element, "{Escape}");
77
79
  expect(canvas.queryByRole("menuitem", { name: "New File" })).not.toBeInTheDocument();
78
80
 
79
81
  // Test enter to select
@@ -1,9 +1,6 @@
1
1
  .ComponentLoadingWrapper-saveOverlay {
2
2
  position: absolute;
3
- left: 0;
4
- top: 0;
5
- bottom: 0;
6
- right: 0;
3
+ inset: 0;
7
4
  background-color: rgb(64 64 64 / 10%);
8
5
  z-index: 1000;
9
6
  }
@@ -94,10 +94,6 @@
94
94
  color: colors.$fuscous;
95
95
  }
96
96
 
97
- .Grid-container.ag-theme-alpine .ag-cell {
98
- font-weight: 400;
99
- }
100
-
101
97
  .Grid-container.ag-theme-alpine .ag-cell:not(.ag-cell-focus) .Grid-displayWhenCellFocused {
102
98
  visibility: hidden;
103
99
  }
@@ -1,106 +1,138 @@
1
- @use "@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as lui;
2
-
3
- // These break if we use urls so ignore stylelint
4
- /* stylelint-disable-next-line */
5
- @import "ag-grid-community/src/styles/ag-grid";
6
- /* stylelint-disable-next-line */
7
- @import "ag-grid-community/src/styles/ag-theme-alpine/sass/ag-theme-alpine-mixin";
8
-
9
- .ag-theme-alpine {
10
- // AG Grid themes can be customized using theme parameters, which are arguments that change its appearance. Refer to
11
- // https://www.ag-grid.com/javascript-data-grid/themes-customising/#full-list-of-theme-parameters for a full list of
12
- // the available theme parameters, which should be used whenever possible.
13
- @include ag-theme-alpine(
14
- (
15
- alpine-active-color: lui.$sea,
16
- foreground-color: lui.$charcoal,
17
- data-color: lui.$charcoal,
18
- // ag-grid-community >=28
19
- selected-row-background-color: lui.$polar,
20
- header-foreground-color: lui.$surfie,
21
- background-color: lui.$white,
22
- odd-row-background-color: lui.$white,
23
- header-background-color: lui.$white,
24
- border-color: lui.$lily,
25
- secondary-border-color: lui.$lily,
26
- cell-horizontal-border: solid ag-derived(secondary-border-color),
27
- cell-horizontal-padding: 12,
28
- row-hover-color: lui.$hint,
29
- font-family: (
30
- "Open Sans",
31
- system-ui,
32
- sans-serif,
33
- ),
34
- font-size: 1rem !important,
35
- borders: false,
36
- borders-critical: true,
37
- borders-secondary: false,
38
- )
39
- );
40
-
41
- // Fix that when you click below checkbox it doesn't process a click
42
- .ag-cell[col-id="selection"] {
43
- display: flex;
44
- }
45
-
46
- // Fix that when you click below checkbox it doesn't process a click
47
- .ag-cell-wrapper > *:not(.ag-cell-value, .ag-group-value) {
48
- height: auto;
49
- }
50
-
51
- .ag-row:last-of-type {
52
- border-bottom: 1px solid lui.$lily;
53
- }
54
-
55
- // ag-grid-community 27.x.x needs this vs 28 using the selected-row-background-color above
56
- // You can set a background _color_ with theme parameters, but for something like a gradient, you need to override CSS.
57
- .ag-row-selected {
58
- background-color: lui.$polar;
59
- }
60
-
61
- .ag-header-cell {
62
- font-weight: 600;
63
- padding: 7px 11px;
64
-
65
- .LuiIcon {
66
- fill: lui.$surfie;
67
- }
68
- }
69
-
70
- .ag-cell {
71
- padding-left: 11px;
72
- padding-right: 11px;
73
- display: flex;
74
- align-items: center;
75
- }
76
-
77
- .ag-cell-wrap-text {
78
- word-break: break-word;
79
- }
80
-
81
- .ag-cell.ag-cell-popup-editing,
82
- .ag-cell.ag-selected-for-edit,
83
- .ag-cell-inline-editing {
84
- padding-left: 9px;
85
- padding-right: 9px;
86
- background: rgb(72 160 244 / 20%);
87
- // These are important, it needs to override ag-grid to work
88
- border: 3px solid #48a0f4 !important;
89
- border-right: 3px solid #48a0f4 !important;
90
- }
91
-
92
- .ag-row .ag-cell-data-changed {
93
- // ag-grid natively has !important on this style so we have to use it here :(
94
- background-color: lightgoldenrodyellow !important;
95
- }
96
-
97
- .ag-center-cols-clipper {
98
- // when using domLayout={"autoHeight"}, ag grid has a default min-height set to 150px so the !important is necessary here
99
- min-height: 40px !important;
100
- }
101
-
102
- .ag-body-horizontal-scroll-viewport {
103
- // It's set to scroll by default, but this causes issues with selecting the last row
104
- overflow-x: auto;
105
- }
106
- }
1
+ @use "@linzjs/lui/dist/scss/Core" as lui;
2
+ @use "node_modules/ag-grid-community/styles" as ag;
3
+
4
+ // ag-grid likes to add 1px to this, so we subtract to compensate
5
+ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
6
+
7
+ // GridTheme that support ag-grid v29 new SASS API
8
+ @include ag.grid-styles(
9
+ (
10
+ themes: (
11
+ step-compact: (
12
+ extend-theme: alpine,
13
+ --ag-row-height: 36px,
14
+ --ag-header-height: 36px,
15
+ --ag-font-size: calc($grid-base-font-size - 2px),
16
+ ),
17
+ step-default: (
18
+ extend-theme: alpine,
19
+ --ag-row-height: 40px,
20
+ --ag-header-height: 40px,
21
+ --ag-font-size: calc($grid-base-font-size),
22
+ ),
23
+ ),
24
+
25
+ alpine-active-color: lui.$sea,
26
+ background-color: lui.$white,
27
+ border-color: lui.$dew,
28
+ borders: false,
29
+ borders-critical: true,
30
+ borders-secondary: false,
31
+ cell-horizontal-border: solid lui.$dew,
32
+ cell-horizontal-padding: lui.$unit-sm,
33
+ data-color: lui.$charcoal,
34
+ foreground-color: lui.$charcoal,
35
+ font-family: (
36
+ "Open Sans",
37
+ system-ui,
38
+ sans-serif,
39
+ ),
40
+ font-size: 1rem,
41
+ header-background-color: lui.$white,
42
+ header-foreground-color: lui.$surfie,
43
+ odd-row-background-color: lui.$white,
44
+ row-hover-color: lui.$hint,
45
+ secondary-border-color: lui.$dew,
46
+ selected-row-background-color: lui.$polar,
47
+ )
48
+ );
49
+
50
+ // Fix that when you click below checkbox it doesn't process a click
51
+ .ag-cell[col-id="selection"] {
52
+ display: flex;
53
+ }
54
+
55
+ // Fix that when you click below checkbox it doesn't process a click
56
+ .ag-cell-wrapper > *:not(.ag-cell-value, .ag-group-value) {
57
+ height: auto;
58
+ }
59
+
60
+ .ag-row:last-of-type {
61
+ border-bottom: 1px solid lui.$dew;
62
+ }
63
+
64
+ .ag-header-cell {
65
+ font-size: 14px;
66
+ font-weight: 600;
67
+
68
+ // fix: Display descender line
69
+ padding: 0 11px;
70
+
71
+ .LuiIcon {
72
+ fill: lui.$surfie;
73
+ }
74
+ }
75
+
76
+ .ag-cell-label-container {
77
+ padding: 8px 0;
78
+
79
+ // Help ag-grid to calculate column height in react portal
80
+ height: fit-content;
81
+ }
82
+
83
+ .ag-header .ag-header-cell[aria-colindex="1"] {
84
+ padding-left: lui.$unit-rg;
85
+ }
86
+
87
+ .ag-cell[role="gridcell"] {
88
+ border-right: none;
89
+ border-left: 1px var(--ag-cell-horizontal-border);
90
+ }
91
+
92
+ .ag-cell[aria-colindex="1"] {
93
+ border-left: none;
94
+ padding-left: lui.$unit-rg;
95
+ }
96
+
97
+ .ag-cell {
98
+ padding-left: 11px;
99
+ padding-right: 11px;
100
+ display: flex;
101
+ align-items: center;
102
+ }
103
+
104
+ .ag-cell-wrap-text {
105
+ word-break: break-word;
106
+ }
107
+
108
+ .ag-cell.ag-cell-popup-editing,
109
+ .ag-cell.ag-selected-for-edit,
110
+ .ag-cell-inline-editing {
111
+ padding-left: 9px;
112
+ padding-right: 9px;
113
+ background: rgb(72 160 244 / 20%);
114
+
115
+ // These are important, it needs to override ag-grid to work
116
+ border: 3px solid #48a0f4 !important;
117
+ border-right: 3px solid #48a0f4 !important;
118
+ }
119
+
120
+ .ag-row .ag-cell-data-changed {
121
+ // ag-grid natively has !important on this style so we have to use it here :(
122
+ background-color: lightgoldenrodyellow;
123
+ }
124
+
125
+ .ag-center-cols-clipper {
126
+ // when using domLayout={"autoHeight"}, ag grid has a default min-height
127
+ // set to 150px so the !important is necessary here
128
+ min-height: 40px !important;
129
+ }
130
+
131
+ .ag-body-horizontal-scroll-viewport {
132
+ // It's set to scroll by default, but this causes issues with selecting the last row
133
+ overflow-x: auto;
134
+ }
135
+
136
+ .Grid-container .ag-cell {
137
+ font-weight: 400;
138
+ }
@@ -18,6 +18,9 @@ export const countRows = async (within?: HTMLElement): Promise<number> => {
18
18
  };
19
19
 
20
20
  export const findRow = async (rowId: number | string, within?: HTMLElement): Promise<HTMLDivElement> => {
21
+ await waitFor(async () => {
22
+ expect(getAllQuick({ classes: ".ag-row" }).length > 0).toBe(true);
23
+ });
21
24
  return await findQuick<HTMLDivElement>({ tagName: `div[row-id='${rowId}']:not(:empty)` }, within);
22
25
  };
23
26
 
@@ -1,3 +1,5 @@
1
+ import { ReactElement } from "react";
2
+
1
3
  import { GridBaseRow } from "../components/Grid";
2
4
  import { isFloat, stringByteLengthIsInvalid } from "./util";
3
5
 
@@ -5,7 +7,7 @@ export interface TextInputValidatorProps<RowType extends GridBaseRow> {
5
7
  required?: boolean;
6
8
  maxLength?: number;
7
9
  maxBytes?: number;
8
- invalid?: (value: string, data: RowType, context: any) => JSX.Element | string | null;
10
+ invalid?: (value: string, data: RowType, context: any) => ReactElement | string | null;
9
11
  numberFormat?: {
10
12
  precision?: number;
11
13
  scale?: number;