@linzjs/step-ag-grid 2.0.0 → 2.0.1

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 (119) hide show
  1. package/README.md +117 -2
  2. package/{src/components → dist}/GridTheme.scss +37 -23
  3. package/dist/index.css +351 -0
  4. package/dist/index.js +462 -210
  5. package/dist/index.js.map +1 -1
  6. package/dist/src/components/ComponentLoadingWrapper.d.ts +1 -0
  7. package/dist/src/components/Grid.d.ts +0 -2
  8. package/dist/src/components/GridCell.d.ts +3 -0
  9. package/dist/src/components/GridPopoverHook.d.ts +2 -1
  10. package/dist/src/components/gridForm/GridFormDropDown.d.ts +4 -3
  11. package/dist/src/components/gridForm/GridFormEditBearing.d.ts +3 -2
  12. package/dist/src/components/gridForm/GridFormMessage.d.ts +2 -2
  13. package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +4 -2
  14. package/dist/src/components/gridForm/GridFormPopoutMenu.d.ts +2 -1
  15. package/dist/src/components/gridForm/GridFormTextArea.d.ts +2 -1
  16. package/dist/src/components/gridForm/GridFormTextInput.d.ts +2 -1
  17. package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +4 -4
  18. package/dist/src/components/gridPopoverEdit/GridPopoverEditDropDown.d.ts +2 -2
  19. package/dist/src/components/gridPopoverEdit/GridPopoverMenu.d.ts +2 -3
  20. package/dist/src/components/gridPopoverEdit/GridPopoverMessage.d.ts +2 -2
  21. package/dist/src/components/gridPopoverEdit/GridPopoverTextArea.d.ts +2 -2
  22. package/dist/src/components/gridPopoverEdit/GridPopoverTextInput.d.ts +2 -2
  23. package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +4 -3
  24. package/dist/src/contexts/GridContext.d.ts +1 -1
  25. package/dist/src/contexts/GridPopoverContext.d.ts +1 -1
  26. package/dist/src/index.d.ts +31 -0
  27. package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +2 -21
  28. package/dist/src/react-menu3/contexts/EventHandlersContext.d.ts +7 -0
  29. package/dist/src/react-menu3/contexts/HoverItemContext.d.ts +2 -0
  30. package/dist/src/react-menu3/contexts/ItemSettingsContext.d.ts +5 -0
  31. package/dist/src/react-menu3/contexts/MenuListContext.d.ts +9 -0
  32. package/dist/src/react-menu3/contexts/MenuListItemContext.d.ts +11 -0
  33. package/dist/src/react-menu3/contexts/RadioGroupContext.d.ts +7 -0
  34. package/dist/src/react-menu3/contexts/SettingsContext.d.ts +20 -0
  35. package/dist/src/react-menu3/index.d.ts +0 -1
  36. package/dist/src/react-menu3/utils/constants.d.ts +1 -50
  37. package/dist/step-ag-grid.esm.js +461 -191
  38. package/dist/step-ag-grid.esm.js.map +1 -1
  39. package/package.json +39 -26
  40. package/src/components/ComponentLoadingWrapper.tsx +2 -1
  41. package/src/components/Grid.tsx +1 -6
  42. package/src/components/GridCell.tsx +5 -0
  43. package/src/components/GridLoadableCell.tsx +0 -4
  44. package/src/components/GridPopoverHook.tsx +13 -7
  45. package/src/components/gridForm/GridFormDropDown.tsx +17 -13
  46. package/src/components/gridForm/GridFormEditBearing.tsx +4 -4
  47. package/src/components/gridForm/GridFormMessage.tsx +6 -7
  48. package/src/components/gridForm/GridFormMultiSelect.tsx +73 -63
  49. package/src/components/gridForm/GridFormPopoutMenu.tsx +6 -6
  50. package/src/components/gridForm/GridFormTextArea.tsx +4 -4
  51. package/src/components/gridForm/GridFormTextInput.tsx +3 -3
  52. package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +4 -0
  53. package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +4 -4
  54. package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +7 -2
  55. package/src/components/gridPopoverEdit/GridPopoverMenu.scss +4 -4
  56. package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +2 -3
  57. package/src/components/gridPopoverEdit/GridPopoverMessage.ts +2 -2
  58. package/src/components/gridPopoverEdit/GridPopoverTextArea.ts +2 -2
  59. package/src/components/gridPopoverEdit/GridPopoverTextInput.ts +2 -2
  60. package/src/components/gridRender/GridRenderGenericCell.tsx +3 -2
  61. package/src/contexts/GridContext.tsx +1 -1
  62. package/src/contexts/GridPopoverContext.tsx +1 -7
  63. package/src/contexts/GridPopoverContextProvider.tsx +23 -22
  64. package/src/index.ts +38 -0
  65. package/src/lui/TextInputFormatted.scss +1 -1
  66. package/src/react-menu3/README.md +66 -0
  67. package/src/react-menu3/components/ControlledMenu.tsx +9 -17
  68. package/src/react-menu3/components/FocusableItem.tsx +2 -9
  69. package/src/react-menu3/components/MenuGroup.tsx +2 -1
  70. package/src/react-menu3/components/MenuItem.tsx +3 -12
  71. package/src/react-menu3/components/MenuList.tsx +4 -4
  72. package/src/react-menu3/components/MenuRadioGroup.tsx +3 -22
  73. package/src/react-menu3/components/SubMenu.tsx +4 -4
  74. package/src/react-menu3/contexts/EventHandlersContext.ts +11 -0
  75. package/src/react-menu3/contexts/HoverItemContext.ts +3 -0
  76. package/src/react-menu3/contexts/ItemSettingsContext.ts +6 -0
  77. package/src/react-menu3/contexts/MenuListContext.ts +10 -0
  78. package/src/react-menu3/contexts/MenuListItemContext.ts +16 -0
  79. package/src/react-menu3/contexts/RadioGroupContext.ts +8 -0
  80. package/src/react-menu3/contexts/SettingsContext.ts +20 -0
  81. package/src/react-menu3/hooks/useItemState.ts +3 -1
  82. package/src/react-menu3/index.ts +0 -1
  83. package/src/react-menu3/styles/_var.scss +4 -4
  84. package/src/react-menu3/styles/core.scss +6 -6
  85. package/src/react-menu3/styles/index.scss +10 -7
  86. package/src/react-menu3/styles/theme-dark.scss +4 -2
  87. package/src/react-menu3/styles/transitions/slide.scss +8 -8
  88. package/src/react-menu3/utils/constants.ts +1 -74
  89. package/src/react-menu3/utils/withHovering.tsx +1 -1
  90. package/src/stories/components/FormTest.scss +1 -2
  91. package/src/stories/components/FormTest.tsx +3 -3
  92. package/src/stories/components/GridPopoutBearing.stories.tsx +2 -1
  93. package/src/stories/components/GridPopoutEditDropDown.stories.tsx +4 -2
  94. package/src/stories/components/GridPopoutEditGeneric.stories.tsx +3 -4
  95. package/src/stories/components/GridPopoutEditGenericTextArea.stories.tsx +2 -1
  96. package/src/stories/components/GridPopoutEditMultiSelect.stories.tsx +2 -1
  97. package/src/stories/components/GridReadOnly.stories.tsx +10 -13
  98. package/src/stories/components/ReactMenu.stories.tsx +0 -4
  99. package/src/{components → styles}/Grid.scss +9 -6
  100. package/src/styles/GridFormDropDown.scss +18 -0
  101. package/src/{components/gridForm → styles}/GridFormEditBearing.scss +0 -0
  102. package/src/styles/GridFormMultiSelect.scss +18 -0
  103. package/src/styles/GridRenderGenericCell.scss +15 -0
  104. package/src/styles/GridTheme.scss +108 -0
  105. package/src/styles/index.scss +2 -0
  106. package/src/styles/lui-overrides.scss +49 -0
  107. package/src/styles/react-menu-customisations.scss +135 -0
  108. package/dist/index.d.ts +0 -38
  109. package/dist/src/stories/components/FormTest.d.ts +0 -12
  110. package/dist/src/stories/components/GridPopoutBearing.stories.d.ts +0 -9
  111. package/dist/src/stories/components/GridPopoutEditDropDown.stories.d.ts +0 -9
  112. package/dist/src/stories/components/GridPopoutEditGeneric.stories.d.ts +0 -9
  113. package/dist/src/stories/components/GridPopoutEditGenericTextArea.stories.d.ts +0 -9
  114. package/dist/src/stories/components/GridPopoutEditMultiSelect.stories.d.ts +0 -9
  115. package/dist/src/stories/components/GridReadOnly.stories.d.ts +0 -9
  116. package/dist/src/stories/components/ReactMenu.stories.d.ts +0 -8
  117. package/src/components/gridRender/GridRenderGenericCell.scss +0 -15
  118. package/src/lui-overrides.scss +0 -163
  119. package/src/react-menu3/style-utils.d.ts +0 -110
@@ -0,0 +1,8 @@
1
+ import { createContext } from "react";
2
+ import { EventHandler, RadioChangeEvent } from "../types";
3
+
4
+ export const RadioGroupContext = createContext<{
5
+ value?: any;
6
+ name?: string;
7
+ onRadioChange?: EventHandler<RadioChangeEvent>;
8
+ }>({});
@@ -0,0 +1,20 @@
1
+ // FIXME hacking a default context in here is probably bad
2
+ import { createContext, MutableRefObject, RefObject } from "react";
3
+ import { ControlledMenuProps, MenuReposition, MenuViewScroll, RectElement, TransitionFieldType } from "../types";
4
+
5
+ interface SettingsContextType extends ControlledMenuProps {
6
+ rootMenuRef?: MutableRefObject<any>;
7
+ rootAnchorRef?: MutableRefObject<any>;
8
+ scrollNodesRef: MutableRefObject<{ anchors?: Element[]; menu?: any }>;
9
+
10
+ initialMounted?: boolean;
11
+ unmountOnClose?: boolean;
12
+ transition?: TransitionFieldType;
13
+ transitionTimeout?: number;
14
+ boundingBoxRef?: RefObject<Element | RectElement>;
15
+ boundingBoxPadding?: string;
16
+ reposition?: MenuReposition;
17
+ viewScroll?: MenuViewScroll;
18
+ }
19
+
20
+ export const SettingsContext = createContext<SettingsContextType>({} as SettingsContextType);
@@ -1,6 +1,8 @@
1
1
  import { useRef, useContext, useEffect, FocusEvent, MutableRefObject } from "react";
2
- import { ItemSettingsContext, MenuListItemContext, HoverActionTypes } from "../utils";
2
+ import { HoverActionTypes } from "../utils";
3
3
  import { useItemEffect } from "./useItemEffect";
4
+ import { MenuListItemContext } from "../contexts/MenuListItemContext";
5
+ import { ItemSettingsContext } from "../contexts/ItemSettingsContext";
4
6
 
5
7
  // This hook includes some common stateful logic in MenuItem and FocusableItem
6
8
  export const useItemState = (
@@ -9,4 +9,3 @@ export { MenuDivider } from "./components/MenuDivider";
9
9
  export { MenuHeader } from "./components/MenuHeader";
10
10
  export { MenuGroup } from "./components/MenuGroup";
11
11
  export { MenuRadioGroup } from "./components/MenuRadioGroup";
12
- export { ClickEvent } from "./types";
@@ -1,4 +1,4 @@
1
- @use 'sass:math';
1
+ @use "sass:math";
2
2
 
3
3
  $color: #212529;
4
4
  $color-dark: #cad1d8;
@@ -6,9 +6,9 @@ $color-disabled: #aaa;
6
6
  $color-disabled-dark: #666;
7
7
 
8
8
  $header-color: #888;
9
- $divider-color: rgba(0, 0, 0, 0.12);
9
+ $divider-color: rgb(0 0 0 / 12%);
10
10
  $divider-color-dark: #3a3a3a;
11
- $border-color: rgba(0, 0, 0, 0.1);
11
+ $border-color: rgb(0 0 0 / 10%);
12
12
  $border-color-dark: #333;
13
13
 
14
14
  $background-color: #fff;
@@ -17,4 +17,4 @@ $background-color-hover: #ebebeb;
17
17
  $background-color-hover-dark: #31363c;
18
18
 
19
19
  $arrow-size: 0.75rem;
20
- $arrow-pos: -(math.div($arrow-size, 2));
20
+ $arrow-pos: (math.div($arrow-size, 2));
@@ -1,9 +1,9 @@
1
- @use 'var';
2
- @use 'mixins';
1
+ @use "var";
2
+ @use "mixins";
3
3
 
4
4
  .szh-menu {
5
- @include mixins.reset-list;
6
- @include mixins.remove-focus;
5
+ @include mixins.reset-list ();
6
+ @include mixins.remove-focus ();
7
7
  box-sizing: border-box;
8
8
  width: max-content;
9
9
  z-index: 100;
@@ -42,7 +42,7 @@
42
42
  }
43
43
 
44
44
  &__item {
45
- @include mixins.remove-focus;
45
+ @include mixins.remove-focus ();
46
46
  cursor: pointer;
47
47
 
48
48
  &--hover {
@@ -65,7 +65,7 @@
65
65
  }
66
66
 
67
67
  &__radio-group {
68
- @include mixins.reset-list;
68
+ @include mixins.reset-list ();
69
69
  }
70
70
 
71
71
  &__divider {
@@ -1,12 +1,12 @@
1
- @use 'var';
2
- @use 'core';
1
+ @use "var";
2
+ @use "core";
3
3
 
4
4
  .szh-menu {
5
5
  user-select: none;
6
6
  color: var.$color;
7
7
  border: none;
8
8
  border-radius: 0.25rem;
9
- box-shadow: 0 3px 7px rgba(0, 0, 0, 0.133), 0 0.6px 2px rgba(0, 0, 0, 0.1);
9
+ box-shadow: 0 3px 7px rgb(0 0 0 / 13.3%), 0 0.6px 2px rgb(0 0 0 / 10%);
10
10
  min-width: 10rem;
11
11
  padding: 0.5rem 0;
12
12
 
@@ -26,8 +26,9 @@
26
26
 
27
27
  &--type-radio {
28
28
  padding-left: 2.2rem;
29
+
29
30
  &::before {
30
- content: '\25cb';
31
+ content: "\25cb";
31
32
  position: absolute;
32
33
  left: 0.8rem;
33
34
  top: 0.55rem;
@@ -36,11 +37,12 @@
36
37
  }
37
38
 
38
39
  &--type-radio#{&}--checked::before {
39
- content: '\25cf';
40
+ content: "\25cf";
40
41
  }
41
42
 
42
43
  &--type-checkbox {
43
44
  padding-left: 2.2rem;
45
+
44
46
  &::before {
45
47
  position: absolute;
46
48
  left: 0.8rem;
@@ -48,14 +50,15 @@
48
50
  }
49
51
 
50
52
  &--type-checkbox#{&}--checked::before {
51
- content: '\2714';
53
+ content: "\2714";
52
54
  }
53
55
  }
54
56
 
55
57
  &__submenu > .szh-menu__item {
56
58
  padding-right: 2.5rem;
59
+
57
60
  &::after {
58
- content: '\276f';
61
+ content: "\276f";
59
62
  position: absolute;
60
63
  right: 1rem;
61
64
  }
@@ -1,10 +1,10 @@
1
- @use 'var';
1
+ @use "var";
2
2
 
3
3
  .szh-menu-container--theme-dark .szh-menu {
4
4
  color: var.$color-dark;
5
5
  background-color: var.$background-color-dark;
6
6
  border: 1px solid var.$border-color-dark;
7
- box-shadow: 0 2px 9px 3px rgba(0, 0, 0, 0.25);
7
+ box-shadow: 0 2px 9px 3px rgb(0 0 0 / 25%);
8
8
 
9
9
  &__arrow {
10
10
  background-color: var.$background-color-dark;
@@ -16,9 +16,11 @@
16
16
  &--hover {
17
17
  background-color: var.$background-color-hover-dark;
18
18
  }
19
+
19
20
  &--focusable {
20
21
  background-color: inherit;
21
22
  }
23
+
22
24
  &--disabled {
23
25
  color: var.$color-disabled-dark;
24
26
  }
@@ -1,13 +1,13 @@
1
- @use 'sass:list';
2
- @use 'sass:map';
1
+ @use "sass:list";
2
+ @use "sass:map";
3
3
 
4
- $menu: 'szh-menu';
4
+ $menu: "szh-menu";
5
5
  $duration: 0.15s;
6
6
  $directions: (
7
- 'left': 'X' 1,
8
- 'right': 'X' -1,
9
- 'top': 'Y' 1,
10
- 'bottom': 'Y' -1
7
+ "left": "X" 1,
8
+ "right": "X" -1,
9
+ "top": "Y" 1,
10
+ "bottom": "Y" -1,
11
11
  );
12
12
 
13
13
  @mixin animation($name, $dir) {
@@ -43,5 +43,5 @@ $directions: (
43
43
  }
44
44
 
45
45
  @each $dir in map.keys($directions) {
46
- @include animation('slide', $dir);
46
+ @include animation("slide", $dir);
47
47
  }
@@ -1,17 +1,4 @@
1
- import { createContext, MutableRefObject, RefObject } from "react";
2
- import {
3
- ControlledMenuProps,
4
- EventHandler,
5
- FocusPosition,
6
- MenuDirection,
7
- MenuOverflow,
8
- MenuReposition,
9
- MenuState,
10
- MenuViewScroll,
11
- RectElement,
12
- TransitionFieldType,
13
- } from "../types";
14
- import { RadioChangeEvent } from "../components/MenuRadioGroup";
1
+ import { MenuState } from "../types";
15
2
 
16
3
  export const menuContainerClass = "szh-menu-container";
17
4
  export const menuClass = "szh-menu";
@@ -24,30 +11,6 @@ export const menuGroupClass = "group";
24
11
  export const subMenuClass = "submenu";
25
12
  export const radioGroupClass = "radio-group";
26
13
 
27
- export const HoverItemContext = createContext(undefined);
28
-
29
- interface MenuListItemContextType {
30
- isParentOpen?: boolean;
31
- isSubmenuOpen?: boolean;
32
- dispatch: (actionType: number, item: any, nextIndex: FocusPosition) => void;
33
- updateItems: (item: any, isMounted?: boolean) => void;
34
- setOpenSubmenuCount: (fn: (count: number) => number) => void;
35
- }
36
-
37
- export const MenuListItemContext = createContext<MenuListItemContextType>({
38
- dispatch: () => {},
39
- updateItems: () => {},
40
- setOpenSubmenuCount: () => 0,
41
- });
42
-
43
- export const MenuListContext = createContext<{
44
- overflow?: MenuOverflow;
45
- overflowAmt?: number;
46
- parentMenuRef?: MutableRefObject<any>;
47
- parentDir?: MenuDirection;
48
- reposSubmenu?: boolean;
49
- }>({});
50
-
51
14
  export interface RMEvent {
52
15
  value: any;
53
16
  syntheticEvent: any;
@@ -56,42 +19,6 @@ export interface RMEvent {
56
19
  key?: string;
57
20
  }
58
21
 
59
- export const EventHandlersContext = createContext<{
60
- handleClose?: () => void;
61
- handleClick: (event: RMEvent, checked: boolean) => void;
62
- }>({
63
- handleClick: () => {},
64
- });
65
-
66
- export const RadioGroupContext = createContext<{
67
- value?: any;
68
- name?: string;
69
- onRadioChange?: EventHandler<RadioChangeEvent>;
70
- }>({});
71
-
72
- interface SettingsContextType extends ControlledMenuProps {
73
- rootMenuRef?: MutableRefObject<any>;
74
- rootAnchorRef?: MutableRefObject<any>;
75
- scrollNodesRef: MutableRefObject<{ anchors?: Element[]; menu?: any }>;
76
-
77
- initialMounted?: boolean;
78
- unmountOnClose?: boolean;
79
- transition?: TransitionFieldType;
80
- transitionTimeout?: number;
81
- boundingBoxRef?: RefObject<Element | RectElement>;
82
- boundingBoxPadding?: string;
83
- reposition?: MenuReposition;
84
- viewScroll?: MenuViewScroll;
85
- }
86
-
87
- // FIXME hacking a default context in here is probably bad
88
- export const SettingsContext = createContext<SettingsContextType>({} as SettingsContextType);
89
-
90
- export const ItemSettingsContext = createContext<{ submenuCloseDelay: number; submenuOpenDelay: number }>({
91
- submenuOpenDelay: 0,
92
- submenuCloseDelay: 0,
93
- });
94
-
95
22
  export const Keys = Object.freeze({
96
23
  ENTER: "Enter",
97
24
  ESC: "Escape",
@@ -1,5 +1,5 @@
1
1
  import { memo, forwardRef, useContext, useRef, MutableRefObject } from "react";
2
- import { HoverItemContext } from "./constants";
2
+ import { HoverItemContext } from "../contexts/HoverItemContext";
3
3
 
4
4
  export interface withHoveringResultProps {
5
5
  isHovering?: boolean;
@@ -1,4 +1,3 @@
1
-
2
1
  .FormTest {
3
2
  display: inline-flex;
4
3
  flex-wrap: nowrap;
@@ -7,4 +6,4 @@
7
6
 
8
7
  .FormTest-textInput {
9
8
  width: 100px;
10
- }
9
+ }
@@ -3,7 +3,7 @@ import "./FormTest.scss";
3
3
  import { useCallback, useState } from "react";
4
4
  import { LuiTextInput } from "@linzjs/lui";
5
5
  import { wait } from "@utils/util";
6
- import { CellParams } from "@components/GridCell";
6
+ import { CellEditorCommon, CellParams } from "@components/GridCell";
7
7
  import { useGridPopoverHook } from "@components/GridPopoverHook";
8
8
  import { GridBaseRow } from "@components/Grid";
9
9
 
@@ -16,7 +16,7 @@ export interface IFormTestRow {
16
16
  distance: number | null;
17
17
  }
18
18
 
19
- export const FormTest = <RowType extends GridBaseRow>(_props: any): JSX.Element => {
19
+ export const FormTest = <RowType extends GridBaseRow>(_props: CellEditorCommon): JSX.Element => {
20
20
  const props = _props as CellParams<RowType>;
21
21
  const [v1, v2, ...v3] = props.value.split(" ");
22
22
 
@@ -35,7 +35,7 @@ export const FormTest = <RowType extends GridBaseRow>(_props: any): JSX.Element
35
35
  // Close form
36
36
  return true;
37
37
  }, [nameType, numba, plan, props.selectedRows]);
38
- const { popoverWrapper } = useGridPopoverHook({ save });
38
+ const { popoverWrapper } = useGridPopoverHook({ className: _props.className, save });
39
39
 
40
40
  return popoverWrapper(
41
41
  <div style={{ display: "flex", flexDirection: "row" }} className={"FormTest Grid-popoverContainer"}>
@@ -1,6 +1,7 @@
1
1
  import "@linzjs/lui/dist/scss/base.scss";
2
2
  import "@linzjs/lui/dist/fonts";
3
- import "../../lui-overrides.scss";
3
+ import "../../styles/index.scss";
4
+ import "../../styles/GridTheme.scss";
4
5
 
5
6
  import { ComponentMeta, ComponentStory } from "@storybook/react/dist/ts3.9/client/preview/types-6-3";
6
7
  import { useMemo, useState } from "react";
@@ -1,6 +1,7 @@
1
1
  import "@linzjs/lui/dist/scss/base.scss";
2
2
  import "@linzjs/lui/dist/fonts";
3
- import "../../lui-overrides.scss";
3
+ import "../../styles/index.scss";
4
+ import "../../styles/GridTheme.scss";
4
5
 
5
6
  import { ComponentMeta, ComponentStory } from "@storybook/react/dist/ts3.9/client/preview/types-6-3";
6
7
  import { GridUpdatingContextProvider } from "@contexts/GridUpdatingContextProvider";
@@ -92,6 +93,7 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
92
93
  {
93
94
  multiEdit: false,
94
95
  editorParams: {
96
+ className: "Xxx",
95
97
  options: ["Architect", "Developer", "Product Owner", "Scrum Master", "Tester", MenuSeparator, "(other)"],
96
98
  },
97
99
  },
@@ -206,7 +208,7 @@ const GridEditDropDownTemplate: ComponentStory<typeof Grid> = (props: GridProps)
206
208
  {
207
209
  multiEdit: true,
208
210
  editorParams: {
209
- maxRows: 2,
211
+ className: "GridPopoverEditDropDown-containerSmall",
210
212
  filtered: "local",
211
213
  filterPlaceholder: "Filter this",
212
214
  options: Array.from(Array(30).keys()).map((o) => {
@@ -1,6 +1,7 @@
1
1
  import "@linzjs/lui/dist/scss/base.scss";
2
2
  import "@linzjs/lui/dist/fonts";
3
- import "../../lui-overrides.scss";
3
+ import "../../styles/index.scss";
4
+ import "../../styles/GridTheme.scss";
4
5
 
5
6
  import { ComponentMeta, ComponentStory } from "@storybook/react/dist/ts3.9/client/preview/types-6-3";
6
7
  import { GridUpdatingContextProvider } from "@contexts/GridUpdatingContextProvider";
@@ -49,9 +50,7 @@ const GridPopoutEditGenericTemplate: ComponentStory<typeof Grid> = (props: GridP
49
50
  {
50
51
  multiEdit: true,
51
52
  editor: FormTest,
52
- editorParams: {
53
- a: 4,
54
- },
53
+ editorParams: {},
55
54
  },
56
55
  ),
57
56
  ],
@@ -1,6 +1,7 @@
1
1
  import "@linzjs/lui/dist/scss/base.scss";
2
2
  import "@linzjs/lui/dist/fonts";
3
- import "../../lui-overrides.scss";
3
+ import "../../styles/index.scss";
4
+ import "../../styles/GridTheme.scss";
4
5
 
5
6
  import { ComponentMeta, ComponentStory } from "@storybook/react/dist/ts3.9/client/preview/types-6-3";
6
7
  import { GridUpdatingContextProvider } from "@contexts/GridUpdatingContextProvider";
@@ -1,6 +1,7 @@
1
1
  import "@linzjs/lui/dist/scss/base.scss";
2
2
  import "@linzjs/lui/dist/fonts";
3
- import "../../lui-overrides.scss";
3
+ import "../../styles/index.scss";
4
+ import "../../styles/GridTheme.scss";
4
5
 
5
6
  import { ComponentMeta, ComponentStory } from "@storybook/react/dist/ts3.9/client/preview/types-6-3";
6
7
  import { GridUpdatingContextProvider } from "@contexts/GridUpdatingContextProvider";
@@ -1,6 +1,7 @@
1
1
  import "@linzjs/lui/dist/scss/base.scss";
2
2
  import "@linzjs/lui/dist/fonts";
3
- import "../../lui-overrides.scss";
3
+ import "../../styles/index.scss";
4
+ import "../../styles/GridTheme.scss";
4
5
 
5
6
  import { ComponentMeta, ComponentStory } from "@storybook/react/dist/ts3.9/client/preview/types-6-3";
6
7
  import { GridUpdatingContextProvider } from "@contexts/GridUpdatingContextProvider";
@@ -9,7 +10,7 @@ import { Grid, GridProps } from "@components/Grid";
9
10
  import { useMemo, useState } from "react";
10
11
  import { wait } from "@utils/util";
11
12
  import { GridPopoverMenu } from "@components/gridPopoverEdit/GridPopoverMenu";
12
- import { CellParams, ColDefT, GridCell } from "@components/GridCell";
13
+ import { ColDefT, GridCell } from "@components/GridCell";
13
14
  import { GridPopoverMessage } from "@components/gridPopoverEdit/GridPopoverMessage";
14
15
 
15
16
  export default {
@@ -76,17 +77,14 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
76
77
  {
77
78
  headerName: "Popout message",
78
79
  cellRenderer: () => <>Click me!</>,
79
- cellRendererParams: {
80
- warning: () => "x",
81
- },
82
80
  },
83
81
  {
82
+ multiEdit: true,
84
83
  editorParams: {
85
- message: async (formParams: CellParams<ITestRow>): Promise<string> => {
84
+ message: async (formParams): Promise<string> => {
86
85
  await wait(1000);
87
86
  return `There are ${formParams.selectedRows.length} row(s) selected`;
88
87
  },
89
- multiEdit: true,
90
88
  },
91
89
  },
92
90
  ),
@@ -151,12 +149,11 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
151
149
  [],
152
150
  );
153
151
 
154
- const rowData = useMemo(
155
- () =>
156
- [
157
- { id: 1000, position: "Tester", age: 30, desc: "Tests application", dd: "1" },
158
- { id: 1001, position: "Developer", age: 12, desc: "Develops application", dd: "2" },
159
- ] as ITestRow[],
152
+ const rowData: ITestRow[] = useMemo(
153
+ () => [
154
+ { id: 1000, position: "Tester", age: 30, desc: "Tests application", dd: "1" },
155
+ { id: 1001, position: "Developer", age: 12, desc: "Develops application", dd: "2" },
156
+ ],
160
157
  [],
161
158
  );
162
159
 
@@ -1,7 +1,3 @@
1
- import "@linzjs/lui/dist/scss/base.scss";
2
- import "@linzjs/lui/dist/fonts";
3
- import "../../lui-overrides.scss";
4
-
5
1
  import { ComponentMeta, ComponentStory } from "@storybook/react/dist/ts3.9/client/preview/types-6-3";
6
2
  import { Grid } from "@components/Grid";
7
3
  import { Menu, MenuItem, MenuButton, MenuDivider, SubMenu } from "@react-menu3";
@@ -1,4 +1,6 @@
1
- @use '~@linzjs/lui/dist/scss/Core' as lui;
1
+ @use "../react-menu3/styles/index";
2
+ @use "./react-menu-customisations";
3
+ @use "../../node_modules/@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as colors;
2
4
 
3
5
  .Grid-container {
4
6
  flex: 1;
@@ -6,11 +8,11 @@
6
8
  }
7
9
 
8
10
  .Grid-sortIsStale {
9
- span.ag-icon.ag-icon-desc:after {
11
+ span.ag-icon.ag-icon-desc::after {
10
12
  content: "*";
11
13
  }
12
14
 
13
- span.ag-icon.ag-icon-asc:after {
15
+ span.ag-icon.ag-icon-asc::after {
14
16
  content: "*";
15
17
  }
16
18
  }
@@ -23,7 +25,7 @@
23
25
  .Grid-quickFilterBox {
24
26
  width: 100%;
25
27
  height: 48px;
26
- border: 0.06rem solid lui.$silver;
28
+ border: 0.06rem solid colors.$silver;
27
29
  border-radius: 3px;
28
30
  padding-left: 0.75rem;
29
31
  padding-right: 0.75rem;
@@ -33,6 +35,7 @@
33
35
  padding: 4px 8px;
34
36
  }
35
37
 
36
- .Grid-popoverContainerList {
37
- padding: 4px 4px;
38
+ .GridFormMessage-container {
39
+ padding: 4px 8px;
40
+ max-width: 400px;
38
41
  }
@@ -0,0 +1,18 @@
1
+ .GridPopoverEditDropDown-containerSmall .GridFormDropDown-options {
2
+ max-height: 120px;
3
+ overflow-y: auto;
4
+ }
5
+
6
+ .GridPopoverEditDropDown-containerMedium .GridFormDropDown-options {
7
+ max-height: 200px;
8
+ overflow-y: auto;
9
+ }
10
+
11
+ .GridPopoverEditDropDown-containerLarge .GridFormDropDown-options {
12
+ max-height: 400px;
13
+ overflow-y: auto;
14
+ }
15
+
16
+ .GridPopoverEditDropDown-containerUnlimited .GridFormDropDown-options {
17
+ overflow-y: auto;
18
+ }
@@ -0,0 +1,18 @@
1
+ .GridMultiSelect-containerSmall .GridFormMultiSelect-options {
2
+ max-height: 130px;
3
+ overflow-y: auto;
4
+ }
5
+
6
+ .GridMultiSelect-containerMedium .GridFormMultiSelect-options {
7
+ max-height: 190px;
8
+ overflow-y: auto;
9
+ }
10
+
11
+ .GridMultiSelect-containerLarge .GridFormMultiSelect-options {
12
+ max-height: 320px;
13
+ overflow-y: auto;
14
+ }
15
+
16
+ .GridMultiSelect-containerUnlimited .GridFormMultiSelect-options {
17
+ overflow-y: auto;
18
+ }
@@ -0,0 +1,15 @@
1
+ @use "../../node_modules/@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as colors;
2
+
3
+ .AgGridGenericCellRenderer-icon {
4
+ margin-right: 4px;
5
+ }
6
+
7
+ .AgGridGenericCellRenderer-ic_infoIcon {
8
+ margin-right: 4px;
9
+ fill: colors.$info;
10
+ }
11
+
12
+ .AgGridGenericCellRenderer-ic_warningIcon {
13
+ margin-right: 4px;
14
+ fill: colors.$warning;
15
+ }