@linzjs/step-ag-grid 23.0.1 → 24.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 (274) hide show
  1. package/dist/src/components/ComponentLoadingWrapper.d.ts +1 -1
  2. package/dist/src/components/Grid.d.ts +17 -17
  3. package/dist/src/components/GridCell.d.ts +9 -9
  4. package/dist/src/components/GridCellFiller.d.ts +2 -2
  5. package/dist/src/components/GridCellMultiEditor.d.ts +6 -6
  6. package/dist/src/components/GridCellMultiSelectClassRules.d.ts +1 -1
  7. package/dist/src/components/GridIcon.d.ts +2 -2
  8. package/dist/src/components/GridNoRowsOverlay.d.ts +1 -1
  9. package/dist/src/components/GridPopoverHook.d.ts +2 -2
  10. package/dist/src/components/GridWrapper.d.ts +1 -1
  11. package/dist/src/components/PostSortRowsHook.d.ts +1 -1
  12. package/dist/src/components/clickInputWhenContainingCellClicked.d.ts +1 -1
  13. package/dist/src/components/gridFilter/GridFilterButtons.d.ts +5 -5
  14. package/dist/src/components/gridFilter/GridFilterColumnsToggle.d.ts +1 -1
  15. package/dist/src/components/gridFilter/GridFilterDownloadCsvButton.d.ts +1 -1
  16. package/dist/src/components/gridFilter/GridFilterHeaderIconButton.d.ts +2 -2
  17. package/dist/src/components/gridFilter/GridFilters.d.ts +1 -1
  18. package/dist/src/components/gridFilter/index.d.ts +7 -7
  19. package/dist/src/components/gridFilter/useGridFilter.d.ts +2 -2
  20. package/dist/src/components/gridForm/GridFormDropDown.d.ts +8 -8
  21. package/dist/src/components/gridForm/GridFormEditBearing.d.ts +2 -2
  22. package/dist/src/components/gridForm/GridFormMessage.d.ts +3 -3
  23. package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +4 -4
  24. package/dist/src/components/gridForm/GridFormMultiSelectGrid.d.ts +4 -4
  25. package/dist/src/components/gridForm/GridFormPopoverMenu.d.ts +5 -5
  26. package/dist/src/components/gridForm/GridFormSubComponentTextArea.d.ts +4 -4
  27. package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +4 -4
  28. package/dist/src/components/gridForm/GridFormTextArea.d.ts +4 -4
  29. package/dist/src/components/gridForm/GridFormTextInput.d.ts +3 -3
  30. package/dist/src/components/gridForm/index.d.ts +10 -10
  31. package/dist/src/components/gridHeader/GridHeaderSelect.d.ts +1 -1
  32. package/dist/src/components/gridHeader/index.d.ts +1 -1
  33. package/dist/src/components/gridHook/index.d.ts +1 -1
  34. package/dist/src/components/gridHook/useGridContextMenu.d.ts +4 -4
  35. package/dist/src/components/gridPopoverEdit/GridButton.d.ts +5 -5
  36. package/dist/src/components/gridPopoverEdit/GridEditBoolean.d.ts +4 -4
  37. package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.d.ts +4 -4
  38. package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.d.ts +4 -4
  39. package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +4 -4
  40. package/dist/src/components/gridPopoverEdit/GridPopoverEditDropDown.d.ts +4 -4
  41. package/dist/src/components/gridPopoverEdit/GridPopoverMenu.d.ts +4 -4
  42. package/dist/src/components/gridPopoverEdit/GridPopoverMessage.d.ts +4 -4
  43. package/dist/src/components/gridPopoverEdit/GridPopoverTextArea.d.ts +4 -4
  44. package/dist/src/components/gridPopoverEdit/GridPopoverTextInput.d.ts +4 -4
  45. package/dist/src/components/gridPopoverEdit/index.d.ts +11 -11
  46. package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +5 -5
  47. package/dist/src/components/gridRender/GridRenderPopoutMenuCell.d.ts +1 -1
  48. package/dist/src/components/gridRender/index.d.ts +2 -2
  49. package/dist/src/components/gridUtil.d.ts +1 -1
  50. package/dist/src/components/index.d.ts +19 -19
  51. package/dist/src/contexts/GridContext.d.ts +4 -4
  52. package/dist/src/contexts/GridContextProvider.d.ts +3 -3
  53. package/dist/src/contexts/GridPopoverContext.d.ts +3 -3
  54. package/dist/src/contexts/GridPopoverContextProvider.d.ts +4 -4
  55. package/dist/src/contexts/GridUpdatingContextProvider.d.ts +1 -1
  56. package/dist/src/index.d.ts +17 -17
  57. package/dist/src/lui/ActionButton.d.ts +9 -9
  58. package/dist/src/lui/FormError.d.ts +2 -2
  59. package/dist/src/lui/TextAreaInput.d.ts +1 -1
  60. package/dist/src/lui/TextInputFormatted.d.ts +2 -2
  61. package/dist/src/lui/reactUtils.d.ts +1 -1
  62. package/dist/src/lui/stateDeferredHook.d.ts +1 -1
  63. package/dist/src/react-menu3/components/ControlledMenu.d.ts +2 -2
  64. package/dist/src/react-menu3/components/FocusableItem.d.ts +3 -3
  65. package/dist/src/react-menu3/components/Menu.d.ts +3 -3
  66. package/dist/src/react-menu3/components/MenuButton.d.ts +2 -2
  67. package/dist/src/react-menu3/components/MenuDivider.d.ts +1 -1
  68. package/dist/src/react-menu3/components/MenuGroup.d.ts +2 -2
  69. package/dist/src/react-menu3/components/MenuHeader.d.ts +2 -2
  70. package/dist/src/react-menu3/components/MenuItem.d.ts +3 -3
  71. package/dist/src/react-menu3/components/MenuList.d.ts +1 -1
  72. package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +2 -2
  73. package/dist/src/react-menu3/components/SubMenu.d.ts +5 -5
  74. package/dist/src/react-menu3/contexts/EventHandlersContext.d.ts +1 -1
  75. package/dist/src/react-menu3/contexts/MenuListContext.d.ts +2 -2
  76. package/dist/src/react-menu3/contexts/MenuListItemContext.d.ts +1 -1
  77. package/dist/src/react-menu3/contexts/RadioGroupContext.d.ts +1 -1
  78. package/dist/src/react-menu3/contexts/SettingsContext.d.ts +2 -2
  79. package/dist/src/react-menu3/hooks/index.d.ts +9 -9
  80. package/dist/src/react-menu3/hooks/useBEM.d.ts +1 -1
  81. package/dist/src/react-menu3/hooks/useCombinedRef.d.ts +1 -1
  82. package/dist/src/react-menu3/hooks/useIsomorphicLayoutEffect.d.ts +1 -1
  83. package/dist/src/react-menu3/hooks/useItemEffect.d.ts +1 -1
  84. package/dist/src/react-menu3/hooks/useItemState.d.ts +1 -1
  85. package/dist/src/react-menu3/hooks/useItems.d.ts +2 -2
  86. package/dist/src/react-menu3/hooks/useMenuChange.d.ts +1 -1
  87. package/dist/src/react-menu3/hooks/useMenuState.d.ts +1 -1
  88. package/dist/src/react-menu3/hooks/useMenuStateAndFocus.d.ts +1 -1
  89. package/dist/src/react-menu3/index.d.ts +11 -11
  90. package/dist/src/react-menu3/positionUtils/getPositionHelpers.d.ts +1 -1
  91. package/dist/src/react-menu3/positionUtils/index.d.ts +3 -3
  92. package/dist/src/react-menu3/positionUtils/placeArrowHorizontal.d.ts +1 -1
  93. package/dist/src/react-menu3/positionUtils/placeArrowVertical.d.ts +1 -1
  94. package/dist/src/react-menu3/positionUtils/placeLeftorRight.d.ts +4 -4
  95. package/dist/src/react-menu3/positionUtils/placeToporBottom.d.ts +5 -5
  96. package/dist/src/react-menu3/positionUtils/positionContextMenu.d.ts +2 -2
  97. package/dist/src/react-menu3/positionUtils/positionMenu.d.ts +5 -5
  98. package/dist/src/react-menu3/style-utils/index.d.ts +1 -1
  99. package/dist/src/react-menu3/types.d.ts +15 -15
  100. package/dist/src/react-menu3/utils/constants.d.ts +1 -1
  101. package/dist/src/react-menu3/utils/index.d.ts +3 -3
  102. package/dist/src/react-menu3/utils/utils.d.ts +5 -5
  103. package/dist/src/react-menu3/utils/withHovering.d.ts +1 -1
  104. package/dist/src/utils/testQuick.d.ts +2 -2
  105. package/dist/src/utils/testUtil.d.ts +2 -2
  106. package/dist/src/utils/textValidator.d.ts +2 -2
  107. package/dist/step-ag-grid.cjs.js +966 -952
  108. package/dist/step-ag-grid.cjs.js.map +1 -1
  109. package/dist/step-ag-grid.esm.js +968 -954
  110. package/dist/step-ag-grid.esm.js.map +1 -1
  111. package/package.json +26 -41
  112. package/src/components/ComponentLoadingWrapper.tsx +5 -6
  113. package/src/components/Grid.tsx +85 -83
  114. package/src/components/GridCell.test.tsx +15 -15
  115. package/src/components/GridCell.tsx +46 -44
  116. package/src/components/GridCellFiller.tsx +5 -4
  117. package/src/components/GridCellMultiEditor.tsx +7 -7
  118. package/src/components/GridCellMultiSelectClassRules.tsx +3 -3
  119. package/src/components/GridIcon.tsx +6 -7
  120. package/src/components/GridLoadableCell.tsx +2 -2
  121. package/src/components/GridNoRowsOverlay.tsx +8 -8
  122. package/src/components/GridPopoverHook.tsx +16 -16
  123. package/src/components/GridWrapper.tsx +2 -2
  124. package/src/components/PostSortRowsHook.ts +11 -11
  125. package/src/components/clickInputWhenContainingCellClicked.tsx +5 -5
  126. package/src/components/gridFilter/GridFilterButtons.tsx +8 -9
  127. package/src/components/gridFilter/GridFilterColumnsToggle.tsx +25 -26
  128. package/src/components/gridFilter/GridFilterDownloadCsvButton.tsx +12 -13
  129. package/src/components/gridFilter/GridFilterHeaderIconButton.tsx +9 -10
  130. package/src/components/gridFilter/GridFilterQuick.tsx +6 -6
  131. package/src/components/gridFilter/GridFilters.tsx +1 -1
  132. package/src/components/gridFilter/index.ts +7 -7
  133. package/src/components/gridFilter/useGridFilter.ts +3 -3
  134. package/src/components/gridForm/GridFormDropDown.tsx +56 -52
  135. package/src/components/gridForm/GridFormEditBearing.tsx +12 -12
  136. package/src/components/gridForm/GridFormMessage.tsx +10 -10
  137. package/src/components/gridForm/GridFormMultiSelect.tsx +53 -51
  138. package/src/components/gridForm/GridFormMultiSelectGrid.tsx +25 -26
  139. package/src/components/gridForm/GridFormPopoverMenu.tsx +32 -29
  140. package/src/components/gridForm/GridFormSubComponentTextArea.tsx +10 -10
  141. package/src/components/gridForm/GridFormSubComponentTextInput.tsx +8 -8
  142. package/src/components/gridForm/GridFormTextArea.tsx +11 -11
  143. package/src/components/gridForm/GridFormTextInput.tsx +11 -11
  144. package/src/components/gridForm/index.ts +10 -10
  145. package/src/components/gridHeader/GridHeaderSelect.tsx +9 -9
  146. package/src/components/gridHeader/index.ts +1 -1
  147. package/src/components/gridHook/index.ts +1 -1
  148. package/src/components/gridHook/useGridContextMenu.tsx +7 -7
  149. package/src/components/gridPopoverEdit/GridButton.tsx +13 -12
  150. package/src/components/gridPopoverEdit/GridEditBoolean.tsx +19 -18
  151. package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +7 -6
  152. package/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.ts +7 -6
  153. package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +9 -9
  154. package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +8 -7
  155. package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +6 -6
  156. package/src/components/gridPopoverEdit/GridPopoverMessage.ts +4 -4
  157. package/src/components/gridPopoverEdit/GridPopoverTextArea.ts +4 -4
  158. package/src/components/gridPopoverEdit/GridPopoverTextInput.ts +4 -4
  159. package/src/components/gridPopoverEdit/index.ts +11 -11
  160. package/src/components/gridRender/GridRenderGenericCell.tsx +5 -5
  161. package/src/components/gridRender/GridRenderPopoutMenuCell.tsx +8 -9
  162. package/src/components/gridRender/index.ts +2 -2
  163. package/src/components/gridUtil.ts +3 -3
  164. package/src/components/index.ts +19 -19
  165. package/src/contexts/GridContext.tsx +52 -46
  166. package/src/contexts/GridContextProvider.test.tsx +14 -14
  167. package/src/contexts/GridContextProvider.tsx +42 -41
  168. package/src/contexts/GridPopoverContext.tsx +10 -7
  169. package/src/contexts/GridPopoverContextProvider.tsx +12 -10
  170. package/src/contexts/GridSubComponentContext.ts +6 -5
  171. package/src/contexts/GridUpdatingContext.tsx +5 -4
  172. package/src/contexts/GridUpdatingContextProvider.tsx +3 -3
  173. package/src/index.ts +17 -21
  174. package/src/lui/ActionButton.tsx +42 -41
  175. package/src/lui/FormError.tsx +4 -4
  176. package/src/lui/TextAreaInput.tsx +9 -9
  177. package/src/lui/TextInputFormatted.tsx +11 -11
  178. package/src/lui/reactUtils.test.tsx +8 -8
  179. package/src/lui/reactUtils.tsx +2 -2
  180. package/src/lui/stateDeferredHook.tsx +3 -5
  181. package/src/lui/timeoutHook.test.tsx +5 -5
  182. package/src/lui/timeoutHook.tsx +1 -1
  183. package/src/react-app-env.d.ts +1 -1
  184. package/src/react-menu3/components/ControlledMenu.tsx +48 -48
  185. package/src/react-menu3/components/FocusableItem.tsx +7 -7
  186. package/src/react-menu3/components/Menu.tsx +11 -11
  187. package/src/react-menu3/components/MenuButton.tsx +4 -4
  188. package/src/react-menu3/components/MenuDivider.tsx +4 -4
  189. package/src/react-menu3/components/MenuGroup.tsx +5 -5
  190. package/src/react-menu3/components/MenuHeader.tsx +4 -4
  191. package/src/react-menu3/components/MenuItem.tsx +14 -14
  192. package/src/react-menu3/components/MenuList.tsx +55 -55
  193. package/src/react-menu3/components/MenuRadioGroup.tsx +7 -7
  194. package/src/react-menu3/components/SubMenu.tsx +24 -24
  195. package/src/react-menu3/contexts/EventHandlersContext.ts +2 -2
  196. package/src/react-menu3/contexts/HoverItemContext.ts +1 -1
  197. package/src/react-menu3/contexts/ItemSettingsContext.ts +1 -1
  198. package/src/react-menu3/contexts/MenuListContext.ts +2 -2
  199. package/src/react-menu3/contexts/MenuListItemContext.ts +2 -2
  200. package/src/react-menu3/contexts/RadioGroupContext.ts +2 -2
  201. package/src/react-menu3/contexts/SettingsContext.ts +2 -2
  202. package/src/react-menu3/hooks/index.ts +9 -9
  203. package/src/react-menu3/hooks/useBEM.ts +4 -4
  204. package/src/react-menu3/hooks/useCombinedRef.ts +2 -2
  205. package/src/react-menu3/hooks/useIsomorphicLayoutEffect.ts +4 -4
  206. package/src/react-menu3/hooks/useItemEffect.ts +3 -3
  207. package/src/react-menu3/hooks/useItemState.ts +5 -5
  208. package/src/react-menu3/hooks/useItems.ts +8 -8
  209. package/src/react-menu3/hooks/useMenuChange.ts +3 -3
  210. package/src/react-menu3/hooks/useMenuState.ts +5 -5
  211. package/src/react-menu3/hooks/useMenuStateAndFocus.ts +4 -4
  212. package/src/react-menu3/index.ts +11 -11
  213. package/src/react-menu3/positionUtils/getPositionHelpers.ts +2 -2
  214. package/src/react-menu3/positionUtils/index.ts +3 -3
  215. package/src/react-menu3/positionUtils/placeArrowHorizontal.ts +1 -1
  216. package/src/react-menu3/positionUtils/placeArrowVertical.ts +1 -1
  217. package/src/react-menu3/positionUtils/placeLeftorRight.ts +13 -13
  218. package/src/react-menu3/positionUtils/placeToporBottom.ts +15 -15
  219. package/src/react-menu3/positionUtils/positionContextMenu.ts +4 -4
  220. package/src/react-menu3/positionUtils/positionMenu.ts +14 -14
  221. package/src/react-menu3/style-utils/index.ts +24 -24
  222. package/src/react-menu3/types.ts +15 -15
  223. package/src/react-menu3/utils/constants.ts +33 -33
  224. package/src/react-menu3/utils/index.ts +3 -4
  225. package/src/react-menu3/utils/propTypes2.ts +10 -10
  226. package/src/react-menu3/utils/utils.ts +14 -14
  227. package/src/react-menu3/utils/withHovering.tsx +3 -3
  228. package/src/stories/components/ActionButton.stories.tsx +23 -24
  229. package/src/stories/grid/FormTest.tsx +15 -16
  230. package/src/stories/grid/GridDragRow.stories.tsx +33 -34
  231. package/src/stories/grid/GridFilterButtons.stories.tsx +32 -33
  232. package/src/stories/grid/GridNoRowsOverlay.stories.tsx +9 -10
  233. package/src/stories/grid/GridNonEditableRow.stories.tsx +40 -41
  234. package/src/stories/grid/GridPinnedRow.stories.tsx +25 -26
  235. package/src/stories/grid/GridPopoutContextMenu.stories.tsx +33 -32
  236. package/src/stories/grid/GridPopoutEditBoolean.stories.tsx +21 -22
  237. package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +18 -19
  238. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +50 -49
  239. package/src/stories/grid/GridPopoverEditBearing.stories.tsx +25 -26
  240. package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +93 -94
  241. package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +62 -63
  242. package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +28 -28
  243. package/src/stories/grid/GridReadOnly.stories.tsx +66 -67
  244. package/src/stories/grid/GridViewList.stories.tsx +37 -38
  245. package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +37 -38
  246. package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +25 -26
  247. package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +25 -26
  248. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +31 -31
  249. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +47 -48
  250. package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +44 -45
  251. package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +19 -20
  252. package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +21 -22
  253. package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +40 -41
  254. package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +14 -15
  255. package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +14 -15
  256. package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +10 -11
  257. package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +20 -21
  258. package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +16 -17
  259. package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +13 -14
  260. package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +13 -14
  261. package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +68 -71
  262. package/src/stories/react-menu/ReactMenu.stories.tsx +26 -26
  263. package/src/utils/bearing.test.ts +44 -44
  264. package/src/utils/bearing.ts +20 -20
  265. package/src/utils/deferredPromise.ts +1 -1
  266. package/src/utils/storybookTestUtil.ts +2 -2
  267. package/src/utils/testQuick.ts +15 -14
  268. package/src/utils/testUtil.ts +31 -36
  269. package/src/utils/textMatcher.test.ts +9 -9
  270. package/src/utils/textMatcher.ts +8 -8
  271. package/src/utils/textValidator.test.ts +56 -56
  272. package/src/utils/textValidator.ts +11 -11
  273. package/src/utils/util.test.ts +20 -20
  274. package/src/utils/util.ts +7 -7
@@ -1,21 +1,20 @@
1
- import "../../styles/GridTheme.scss";
2
- import "../../styles/index.scss";
3
- import "@linzjs/lui/dist/scss/base.scss";
1
+ import '../../styles/GridTheme.scss';
2
+ import '../../styles/index.scss';
3
+ import '@linzjs/lui/dist/scss/base.scss';
4
+ import '@linzjs/lui/dist/fonts';
4
5
 
5
- import { Meta, StoryFn } from "@storybook/react";
6
- import { useMemo, useState } from "react";
6
+ import { Meta, StoryFn } from '@storybook/react';
7
+ import { useMemo, useState } from 'react';
7
8
 
8
- import "@linzjs/lui/dist/fonts";
9
-
10
- import { ColDefT, Grid, GridCell, GridContextProvider, GridProps, GridUpdatingContextProvider } from "../..";
11
- import { waitForGridReady } from "../../utils/storybookTestUtil";
12
- import { FormTest, IFormTestRow } from "./FormTest";
9
+ import { ColDefT, Grid, GridCell, GridContextProvider, GridProps, GridUpdatingContextProvider } from '../..';
10
+ import { waitForGridReady } from '../../utils/storybookTestUtil';
11
+ import { FormTest, IFormTestRow } from './FormTest';
13
12
 
14
13
  export default {
15
- title: "Components / Grids",
14
+ title: 'Components / Grids',
16
15
  component: Grid,
17
16
  args: {
18
- quickFilterValue: "",
17
+ quickFilterValue: '',
19
18
  selectable: true,
20
19
  },
21
20
  decorators: [
@@ -36,13 +35,13 @@ const GridPopoutEditGenericTemplate: StoryFn<typeof Grid> = (props: GridProps) =
36
35
  const columnDefs: ColDefT<IFormTestRow>[] = useMemo(
37
36
  () => [
38
37
  GridCell({
39
- field: "id",
40
- headerName: "Id",
38
+ field: 'id',
39
+ headerName: 'Id',
41
40
  }),
42
41
  GridCell(
43
42
  {
44
- field: "name",
45
- headerName: "Popout Generic Edit",
43
+ field: 'name',
44
+ headerName: 'Popout Generic Edit',
46
45
  },
47
46
  {
48
47
  multiEdit: true,
@@ -55,8 +54,8 @@ const GridPopoutEditGenericTemplate: StoryFn<typeof Grid> = (props: GridProps) =
55
54
  );
56
55
 
57
56
  const [rowData] = useState([
58
- { id: 1000, name: "IS IS DP12345", nameType: "IS", numba: "IX", plan: "DP 12345" },
59
- { id: 1001, name: "PEG V SD523", nameType: "PEG", numba: "V", plan: "SD 523" },
57
+ { id: 1000, name: 'IS IS DP12345', nameType: 'IS', numba: 'IX', plan: 'DP 12345' },
58
+ { id: 1001, name: 'PEG V SD523', nameType: 'PEG', numba: 'V', plan: 'SD 523' },
60
59
  ] as IFormTestRow[]);
61
60
 
62
61
  return (
@@ -66,7 +65,7 @@ const GridPopoutEditGenericTemplate: StoryFn<typeof Grid> = (props: GridProps) =
66
65
  setExternalSelectedItems={setExternalSelectedItems}
67
66
  columnDefs={columnDefs}
68
67
  rowData={rowData}
69
- domLayout={"autoHeight"}
68
+ domLayout={'autoHeight'}
70
69
  />
71
70
  );
72
71
  };
@@ -1,11 +1,10 @@
1
- import "../../styles/GridTheme.scss";
2
- import "../../styles/index.scss";
3
- import "@linzjs/lui/dist/scss/base.scss";
1
+ import '../../styles/GridTheme.scss';
2
+ import '../../styles/index.scss';
3
+ import '@linzjs/lui/dist/scss/base.scss';
4
+ import '@linzjs/lui/dist/fonts';
4
5
 
5
- import { Meta, StoryFn } from "@storybook/react";
6
- import { useCallback, useContext, useMemo, useState } from "react";
7
-
8
- import "@linzjs/lui/dist/fonts";
6
+ import { Meta, StoryFn } from '@storybook/react';
7
+ import { useCallback, useContext, useMemo, useState } from 'react';
9
8
 
10
9
  import {
11
10
  ActionButton,
@@ -25,15 +24,15 @@ import {
25
24
  GridUpdatingContextProvider,
26
25
  isFloat,
27
26
  wait,
28
- } from "../..";
29
- import { waitForGridReady } from "../../utils/storybookTestUtil";
30
- import { IFormTestRow } from "./FormTest";
27
+ } from '../..';
28
+ import { waitForGridReady } from '../../utils/storybookTestUtil';
29
+ import { IFormTestRow } from './FormTest';
31
30
 
32
31
  export default {
33
- title: "Components / Grids",
32
+ title: 'Components / Grids',
34
33
  component: Grid,
35
34
  args: {
36
- quickFilterValue: "",
35
+ quickFilterValue: '',
37
36
  selectable: true,
38
37
  },
39
38
  decorators: [
@@ -53,34 +52,34 @@ const GridPopoutEditGenericTemplate: StoryFn<typeof Grid> = (props: GridProps) =
53
52
  const { selectRowsWithFlashDiff } = useContext(GridContext);
54
53
  const [externalSelectedItems, setExternalSelectedItems] = useState<any[]>([]);
55
54
  const [rowData, setRowData] = useState([
56
- { id: 1000, name: "IS IS DP12345", nameType: "IS", numba: "IX", plan: "DP 12345", distance: 10 },
57
- { id: 1001, name: "PEG V SD523", nameType: "PEG", numba: "V", plan: "SD 523", distance: null },
55
+ { id: 1000, name: 'IS IS DP12345', nameType: 'IS', numba: 'IX', plan: 'DP 12345', distance: 10 },
56
+ { id: 1001, name: 'PEG V SD523', nameType: 'PEG', numba: 'V', plan: 'SD 523', distance: null },
58
57
  ] as IFormTestRow[]);
59
58
 
60
59
  const columnDefs: ColDefT<IFormTestRow>[] = useMemo(
61
60
  () => [
62
61
  GridCell({
63
- field: "id",
64
- headerName: "Id",
62
+ field: 'id',
63
+ headerName: 'Id',
65
64
  }),
66
65
  GridPopoverTextInput(
67
66
  {
68
- field: "name",
69
- headerName: "Text input",
67
+ field: 'name',
68
+ headerName: 'Text input',
70
69
  },
71
70
  {
72
71
  multiEdit: true,
73
72
  editorParams: {
74
73
  required: true,
75
74
  maxLength: 12,
76
- placeholder: "Enter some text...",
75
+ placeholder: 'Enter some text...',
77
76
  invalid: (value: string) => {
78
- if (value === "never") return "The value 'never' is not allowed";
77
+ if (value === 'never') return "The value 'never' is not allowed";
79
78
  return null;
80
79
  },
81
80
  onSave: async ({ selectedRows, value }) => {
82
81
  await wait(1000);
83
- selectedRows.forEach((selectedRow) => (selectedRow["name"] = value));
82
+ selectedRows.forEach((selectedRow) => (selectedRow['name'] = value));
84
83
  return true;
85
84
  },
86
85
  },
@@ -88,27 +87,27 @@ const GridPopoutEditGenericTemplate: StoryFn<typeof Grid> = (props: GridProps) =
88
87
  ),
89
88
  GridPopoverTextInput(
90
89
  {
91
- field: "distance",
92
- headerName: "Number input",
90
+ field: 'distance',
91
+ headerName: 'Number input',
93
92
  valueFormatter: (params) => {
94
93
  const v = params.data?.distance;
95
- return v != null ? `${v}${params.colDef.cellEditorParams.units}` : "";
94
+ return v != null ? `${v}${params.colDef.cellEditorParams.units}` : '';
96
95
  },
97
96
  },
98
97
  {
99
98
  multiEdit: false,
100
99
  editorParams: {
101
100
  maxLength: 12,
102
- placeholder: "Enter distance...",
103
- units: "m",
101
+ placeholder: 'Enter distance...',
102
+ units: 'm',
104
103
  invalid: (value: string) => {
105
- if (value.length && !isFloat(value)) return "Value must be a number";
104
+ if (value.length && !isFloat(value)) return 'Value must be a number';
106
105
  return null;
107
106
  },
108
107
  onSave: async ({ selectedRows, value }) => {
109
108
  await wait(1000);
110
109
  selectedRows.forEach(
111
- (selectedRow) => (selectedRow["distance"] = value.length ? parseFloat(value) : null),
110
+ (selectedRow) => (selectedRow['distance'] = value.length ? parseFloat(value) : null),
112
111
  );
113
112
  return true;
114
113
  },
@@ -117,22 +116,22 @@ const GridPopoutEditGenericTemplate: StoryFn<typeof Grid> = (props: GridProps) =
117
116
  ),
118
117
  GridPopoverTextArea(
119
118
  {
120
- field: "plan",
121
- headerName: "Text area",
119
+ field: 'plan',
120
+ headerName: 'Text area',
122
121
  },
123
122
  {
124
123
  multiEdit: true,
125
124
  editorParams: {
126
125
  required: true,
127
126
  maxLength: 32,
128
- placeholder: "Enter some text...",
127
+ placeholder: 'Enter some text...',
129
128
  invalid: (value: string) => {
130
- if (value === "never") return "The value 'never' is not allowed";
129
+ if (value === 'never') return "The value 'never' is not allowed";
131
130
  return null;
132
131
  },
133
132
  onSave: async ({ selectedRows, value }) => {
134
133
  await wait(1000);
135
- selectedRows.forEach((selectedRow) => (selectedRow["plan"] = value));
134
+ selectedRows.forEach((selectedRow) => (selectedRow['plan'] = value));
136
135
  return true;
137
136
  },
138
137
  },
@@ -140,9 +139,9 @@ const GridPopoutEditGenericTemplate: StoryFn<typeof Grid> = (props: GridProps) =
140
139
  ),
141
140
  GridCellMultiEditor(
142
141
  {
143
- colId: "plan2",
144
- field: "plan",
145
- headerName: "Multi-editor",
142
+ colId: 'plan2',
143
+ field: 'plan',
144
+ headerName: 'Multi-editor',
146
145
  },
147
146
  (_params) =>
148
147
  _params.rowIndex == 0
@@ -152,27 +151,27 @@ const GridPopoutEditGenericTemplate: StoryFn<typeof Grid> = (props: GridProps) =
152
151
  editorParams: {
153
152
  required: true,
154
153
  maxLength: 32,
155
- placeholder: "Enter some text...",
154
+ placeholder: 'Enter some text...',
156
155
  },
157
156
  })
158
157
  : Editor({
159
158
  multiEdit: false,
160
159
  editor: GridFormDropDown,
161
160
  editorParams: {
162
- options: [{ label: "One", value: 1 }],
161
+ options: [{ label: 'One', value: 1 }],
163
162
  },
164
163
  }),
165
164
  ),
166
165
  GridPopoverMenu(
167
166
  {
168
- headerName: "",
167
+ headerName: '',
169
168
  },
170
169
  {
171
170
  multiEdit: true,
172
171
  editorParams: {
173
- options: async (_) => [
172
+ options: () => [
174
173
  {
175
- label: "Delete",
174
+ label: 'Delete',
176
175
  action: async ({ selectedRows }) => {
177
176
  await wait(1000);
178
177
  setRowData(rowData.filter((data) => !selectedRows.some((row) => row.id == data.id)));
@@ -190,16 +189,18 @@ const GridPopoutEditGenericTemplate: StoryFn<typeof Grid> = (props: GridProps) =
190
189
  await wait(1000);
191
190
 
192
191
  const lastRow = rowData[rowData.length - 1];
192
+ // eslint-disable-next-line @typescript-eslint/require-await
193
193
  await selectRowsWithFlashDiff(async () => {
194
194
  setRowData([
195
195
  ...rowData,
196
196
  {
197
197
  id: (lastRow?.id ?? 0) + 1,
198
- name: "?",
199
- nameType: "?",
200
- numba: "?",
201
- plan: "",
198
+ name: '?',
199
+ nameType: '?',
200
+ numba: '?',
201
+ plan: '',
202
202
  distance: null,
203
+ bold: false,
203
204
  },
204
205
  ]);
205
206
  });
@@ -213,15 +214,15 @@ const GridPopoutEditGenericTemplate: StoryFn<typeof Grid> = (props: GridProps) =
213
214
  setExternalSelectedItems={setExternalSelectedItems}
214
215
  columnDefs={columnDefs}
215
216
  rowData={rowData}
216
- domLayout={"autoHeight"}
217
+ domLayout={'autoHeight'}
217
218
  defaultColDef={{ minWidth: 70 }}
218
- sizeColumns={"auto"}
219
+ sizeColumns={'auto'}
219
220
  onCellEditingComplete={() => {
220
221
  /* eslint-disable-next-line no-console */
221
- console.log("Cell editing complete");
222
+ console.log('Cell editing complete');
222
223
  }}
223
224
  />
224
- <ActionButton icon={"ic_add"} name={"Add new row"} inProgressName={"Adding..."} onClick={addRowAction} />
225
+ <ActionButton icon={'ic_add'} name={'Add new row'} inProgressName={'Adding...'} onClick={addRowAction} />
225
226
  </>
226
227
  );
227
228
  };
@@ -1,11 +1,10 @@
1
- import "../../styles/GridTheme.scss";
2
- import "../../styles/index.scss";
3
- import "@linzjs/lui/dist/scss/base.scss";
1
+ import '../../styles/GridTheme.scss';
2
+ import '../../styles/index.scss';
3
+ import '@linzjs/lui/dist/scss/base.scss';
4
+ import '@linzjs/lui/dist/fonts';
4
5
 
5
- import { Meta, StoryFn } from "@storybook/react";
6
- import { useMemo, useState } from "react";
7
-
8
- import "@linzjs/lui/dist/fonts";
6
+ import { Meta, StoryFn } from '@storybook/react';
7
+ import { useMemo, useState } from 'react';
9
8
 
10
9
  import {
11
10
  ColDefT,
@@ -22,14 +21,14 @@ import {
22
21
  GridUpdatingContextProvider,
23
22
  GridWrapper,
24
23
  wait,
25
- } from "../..";
26
- import { waitForGridReady } from "../../utils/storybookTestUtil";
24
+ } from '../..';
25
+ import { waitForGridReady } from '../../utils/storybookTestUtil';
27
26
 
28
27
  export default {
29
- title: "Components / Grids",
28
+ title: 'Components / Grids',
30
29
  component: Grid,
31
30
  args: {
32
- quickFilterValue: "",
31
+ quickFilterValue: '',
33
32
  selectable: true,
34
33
  alwaysShowVerticalScroll: false,
35
34
  },
@@ -57,16 +56,16 @@ const GridPopoverEditBearingTemplate: StoryFn<typeof Grid> = (props: GridProps)
57
56
  const columnDefs: ColDefT<ITestRow>[] = useMemo(
58
57
  () => [
59
58
  GridCell({
60
- field: "id",
61
- headerName: "Id",
59
+ field: 'id',
60
+ headerName: 'Id',
62
61
  }),
63
62
  GridPopoverEditBearingCorrection(
64
63
  {
65
- field: "bearingCorrection",
66
- headerName: "Bearing correction",
64
+ field: 'bearingCorrection',
65
+ headerName: 'Bearing correction',
67
66
  cellRendererParams: {
68
- warning: ({ data }) => data?.id == 1002 && "Testers are testing",
69
- info: ({ data }) => data?.id == 1001 && "Developers are developing",
67
+ warning: ({ data }) => data?.id == 1002 && 'Testers are testing',
68
+ info: ({ data }) => data?.id == 1001 && 'Developers are developing',
70
69
  },
71
70
  },
72
71
  {
@@ -75,14 +74,14 @@ const GridPopoverEditBearingTemplate: StoryFn<typeof Grid> = (props: GridProps)
75
74
  ),
76
75
  GridPopoverEditBearing(
77
76
  {
78
- field: "bearing",
79
- headerName: "Bearing",
77
+ field: 'bearing',
78
+ headerName: 'Bearing',
80
79
  },
81
80
  {
82
81
  editorParams: {
83
82
  onSave: async ({ selectedRows, value }) => {
84
83
  await wait(1000);
85
- selectedRows.forEach((row) => (row["bearing"] = value));
84
+ selectedRows.forEach((row) => (row['bearing'] = value));
86
85
  return true;
87
86
  },
88
87
  },
@@ -94,11 +93,11 @@ const GridPopoverEditBearingTemplate: StoryFn<typeof Grid> = (props: GridProps)
94
93
 
95
94
  const [rowData] = useState([
96
95
  { id: 1000, bearing: 1.234, bearingCorrection: null },
97
- { id: 1001, bearing: "0E-12", bearingCorrection: 240 },
96
+ { id: 1001, bearing: '0E-12', bearingCorrection: 240 },
98
97
  { id: 1002, bearing: null, bearingCorrection: 355.1 },
99
98
  { id: 1003, bearing: null, bearingCorrection: 0 },
100
- { id: 1004, bearing: 5.0, bearingCorrection: "1.00500" },
101
- { id: 1005, bearing: null, bearingCorrection: "0E-12" },
99
+ { id: 1004, bearing: 5.0, bearingCorrection: '1.00500' },
100
+ { id: 1005, bearing: null, bearingCorrection: '0E-12' },
102
101
  ] as ITestRow[]);
103
102
 
104
103
  return (
@@ -106,17 +105,17 @@ const GridPopoverEditBearingTemplate: StoryFn<typeof Grid> = (props: GridProps)
106
105
  <GridFilters>
107
106
  <GridFilterQuick />
108
107
  <GridFilterColumnsToggle />
109
- <GridFilterDownloadCsvButton fileName={"customFilename"} />
108
+ <GridFilterDownloadCsvButton fileName={'customFilename'} />
110
109
  </GridFilters>
111
110
  <Grid
112
- data-testid={"bearingsTestTable"}
111
+ data-testid={'bearingsTestTable'}
113
112
  {...props}
114
113
  readOnly={false}
115
114
  externalSelectedItems={externalSelectedItems}
116
115
  setExternalSelectedItems={setExternalSelectedItems}
117
116
  columnDefs={columnDefs}
118
117
  rowData={rowData}
119
- domLayout={"autoHeight"}
118
+ domLayout={'autoHeight'}
120
119
  />
121
120
  </GridWrapper>
122
121
  );