@linzjs/step-ag-grid 1.5.4 → 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 (128) 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 +625 -332
  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 +21 -27
  9. package/dist/src/components/GridPopoverHook.d.ts +5 -2
  10. package/dist/src/components/gridForm/GridFormDropDown.d.ts +10 -4
  11. package/dist/src/components/gridForm/GridFormEditBearing.d.ts +5 -5
  12. package/dist/src/components/gridForm/GridFormMessage.d.ts +4 -5
  13. package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +5 -4
  14. package/dist/src/components/gridForm/GridFormPopoutMenu.d.ts +3 -3
  15. package/dist/src/components/gridForm/GridFormTextArea.d.ts +3 -3
  16. package/dist/src/components/gridForm/GridFormTextInput.d.ts +3 -3
  17. package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.d.ts +3 -2
  18. package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +5 -270
  19. package/dist/src/components/gridPopoverEdit/GridPopoverEditDropDown.d.ts +3 -2
  20. package/dist/src/components/gridPopoverEdit/GridPopoverMenu.d.ts +3 -4
  21. package/dist/src/components/gridPopoverEdit/GridPopoverMessage.d.ts +3 -2
  22. package/dist/src/components/gridPopoverEdit/GridPopoverTextArea.d.ts +3 -2
  23. package/dist/src/components/gridPopoverEdit/GridPopoverTextInput.d.ts +3 -2
  24. package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +4 -5
  25. package/dist/src/contexts/GridContext.d.ts +1 -1
  26. package/dist/src/contexts/GridPopoverContext.d.ts +17 -0
  27. package/dist/src/contexts/GridPopoverContextProvider.d.ts +6 -0
  28. package/dist/src/contexts/{UpdatingContext.d.ts → GridUpdatingContext.d.ts} +2 -2
  29. package/dist/src/contexts/GridUpdatingContextProvider.d.ts +7 -0
  30. package/dist/src/index.d.ts +31 -0
  31. package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +2 -21
  32. package/dist/src/react-menu3/contexts/EventHandlersContext.d.ts +7 -0
  33. package/dist/src/react-menu3/contexts/HoverItemContext.d.ts +2 -0
  34. package/dist/src/react-menu3/contexts/ItemSettingsContext.d.ts +5 -0
  35. package/dist/src/react-menu3/contexts/MenuListContext.d.ts +9 -0
  36. package/dist/src/react-menu3/contexts/MenuListItemContext.d.ts +11 -0
  37. package/dist/src/react-menu3/contexts/RadioGroupContext.d.ts +7 -0
  38. package/dist/src/react-menu3/contexts/SettingsContext.d.ts +20 -0
  39. package/dist/src/react-menu3/index.d.ts +0 -1
  40. package/dist/src/react-menu3/utils/constants.d.ts +1 -50
  41. package/dist/step-ag-grid.esm.js +622 -312
  42. package/dist/step-ag-grid.esm.js.map +1 -1
  43. package/package.json +39 -26
  44. package/src/components/ComponentLoadingWrapper.tsx +2 -1
  45. package/src/components/Grid.tsx +3 -8
  46. package/src/components/GridCell.tsx +62 -79
  47. package/src/components/GridLoadableCell.tsx +0 -1
  48. package/src/components/GridPopoverHook.tsx +18 -16
  49. package/src/components/gridForm/GridFormDropDown.tsx +47 -32
  50. package/src/components/gridForm/GridFormEditBearing.tsx +14 -14
  51. package/src/components/gridForm/GridFormMessage.tsx +11 -17
  52. package/src/components/gridForm/GridFormMultiSelect.tsx +89 -79
  53. package/src/components/gridForm/GridFormPopoutMenu.tsx +10 -11
  54. package/src/components/gridForm/GridFormTextArea.tsx +16 -17
  55. package/src/components/gridForm/GridFormTextInput.tsx +17 -17
  56. package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +20 -15
  57. package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +53 -45
  58. package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +21 -15
  59. package/src/components/gridPopoverEdit/GridPopoverMenu.scss +4 -4
  60. package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +21 -23
  61. package/src/components/gridPopoverEdit/GridPopoverMessage.ts +18 -16
  62. package/src/components/gridPopoverEdit/GridPopoverTextArea.ts +12 -16
  63. package/src/components/gridPopoverEdit/GridPopoverTextInput.ts +15 -15
  64. package/src/components/gridRender/GridRenderGenericCell.tsx +5 -6
  65. package/src/components/gridRender/GridRenderPopoutMenuCell.tsx +2 -2
  66. package/src/contexts/GridContext.tsx +1 -1
  67. package/src/contexts/GridContextProvider.tsx +3 -5
  68. package/src/contexts/GridPopoverContext.tsx +26 -0
  69. package/src/contexts/GridPopoverContextProvider.tsx +54 -0
  70. package/src/contexts/{UpdatingContext.tsx → GridUpdatingContext.tsx} +2 -2
  71. package/src/contexts/{UpdatingContextProvider.tsx → GridUpdatingContextProvider.tsx} +8 -6
  72. package/src/index.ts +38 -0
  73. package/src/lui/TextInputFormatted.scss +1 -1
  74. package/src/react-menu3/README.md +66 -0
  75. package/src/react-menu3/components/ControlledMenu.tsx +9 -17
  76. package/src/react-menu3/components/FocusableItem.tsx +2 -9
  77. package/src/react-menu3/components/MenuGroup.tsx +2 -1
  78. package/src/react-menu3/components/MenuItem.tsx +3 -12
  79. package/src/react-menu3/components/MenuList.tsx +4 -4
  80. package/src/react-menu3/components/MenuRadioGroup.tsx +3 -22
  81. package/src/react-menu3/components/SubMenu.tsx +4 -4
  82. package/src/react-menu3/contexts/EventHandlersContext.ts +11 -0
  83. package/src/react-menu3/contexts/HoverItemContext.ts +3 -0
  84. package/src/react-menu3/contexts/ItemSettingsContext.ts +6 -0
  85. package/src/react-menu3/contexts/MenuListContext.ts +10 -0
  86. package/src/react-menu3/contexts/MenuListItemContext.ts +16 -0
  87. package/src/react-menu3/contexts/RadioGroupContext.ts +8 -0
  88. package/src/react-menu3/contexts/SettingsContext.ts +20 -0
  89. package/src/react-menu3/hooks/useItemState.ts +3 -1
  90. package/src/react-menu3/index.ts +0 -1
  91. package/src/react-menu3/styles/_var.scss +4 -4
  92. package/src/react-menu3/styles/core.scss +6 -6
  93. package/src/react-menu3/styles/index.scss +10 -7
  94. package/src/react-menu3/styles/theme-dark.scss +4 -2
  95. package/src/react-menu3/styles/transitions/slide.scss +8 -8
  96. package/src/react-menu3/utils/constants.ts +1 -74
  97. package/src/react-menu3/utils/withHovering.tsx +1 -1
  98. package/src/stories/components/FormTest.scss +1 -2
  99. package/src/stories/components/FormTest.tsx +4 -3
  100. package/src/stories/components/GridPopoutBearing.stories.tsx +30 -26
  101. package/src/stories/components/GridPopoutEditDropDown.stories.tsx +94 -51
  102. package/src/stories/components/GridPopoutEditGeneric.stories.tsx +18 -14
  103. package/src/stories/components/GridPopoutEditGenericTextArea.stories.tsx +78 -62
  104. package/src/stories/components/GridPopoutEditMultiSelect.stories.tsx +60 -52
  105. package/src/stories/components/GridReadOnly.stories.tsx +77 -64
  106. package/src/stories/components/ReactMenu.stories.tsx +0 -4
  107. package/src/{components → styles}/Grid.scss +9 -6
  108. package/src/styles/GridFormDropDown.scss +18 -0
  109. package/src/{components/gridForm → styles}/GridFormEditBearing.scss +0 -0
  110. package/src/styles/GridFormMultiSelect.scss +18 -0
  111. package/src/styles/GridRenderGenericCell.scss +15 -0
  112. package/src/styles/GridTheme.scss +108 -0
  113. package/src/styles/index.scss +2 -0
  114. package/src/styles/lui-overrides.scss +49 -0
  115. package/src/styles/react-menu-customisations.scss +135 -0
  116. package/dist/index.d.ts +0 -38
  117. package/dist/src/contexts/UpdatingContextProvider.d.ts +0 -7
  118. package/dist/src/stories/components/FormTest.d.ts +0 -13
  119. package/dist/src/stories/components/GridPopoutBearing.stories.d.ts +0 -9
  120. package/dist/src/stories/components/GridPopoutEditDropDown.stories.d.ts +0 -9
  121. package/dist/src/stories/components/GridPopoutEditGeneric.stories.d.ts +0 -9
  122. package/dist/src/stories/components/GridPopoutEditGenericTextArea.stories.d.ts +0 -9
  123. package/dist/src/stories/components/GridPopoutEditMultiSelect.stories.d.ts +0 -9
  124. package/dist/src/stories/components/GridReadOnly.stories.d.ts +0 -9
  125. package/dist/src/stories/components/ReactMenu.stories.d.ts +0 -8
  126. package/src/components/gridRender/GridRenderGenericCell.scss +0 -15
  127. package/src/lui-overrides.scss +0 -163
  128. package/src/react-menu3/style-utils.d.ts +0 -110
@@ -1,18 +1,18 @@
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
- import { UpdatingContextProvider } from "@contexts/UpdatingContextProvider";
7
+ import { GridUpdatingContextProvider } from "@contexts/GridUpdatingContextProvider";
7
8
  import { GridContextProvider } from "@contexts/GridContextProvider";
8
9
  import { Grid, GridProps } from "@components/Grid";
9
10
  import { useMemo, useState } from "react";
10
11
  import { MenuSeparator } from "@components/gridForm/GridFormDropDown";
11
- import { ColDef } from "ag-grid-community";
12
12
  import { wait } from "@utils/util";
13
13
  import { MultiSelectResult } from "@components/gridForm/GridFormMultiSelect";
14
14
  import { GridSubComponentTextArea } from "@components/GridSubComponentTextArea";
15
- import { GridCell } from "@components/GridCell";
15
+ import { ColDefT, GridCell } from "@components/GridCell";
16
16
  import { GridPopoutEditMultiSelect } from "@components/gridPopoverEdit/GridPopoutEditMultiSelect";
17
17
 
18
18
  export default {
@@ -25,11 +25,11 @@ export default {
25
25
  decorators: [
26
26
  (Story) => (
27
27
  <div style={{ width: 1200, height: 400, display: "flex" }}>
28
- <UpdatingContextProvider>
28
+ <GridUpdatingContextProvider>
29
29
  <GridContextProvider>
30
30
  <Story />
31
31
  </GridContextProvider>
32
- </UpdatingContextProvider>
32
+ </GridUpdatingContextProvider>
33
33
  </div>
34
34
  ),
35
35
  ],
@@ -45,7 +45,7 @@ interface ITestRow {
45
45
  const GridEditMultiSelectTemplate: ComponentStory<typeof Grid> = (props: GridProps) => {
46
46
  const [externalSelectedItems, setExternalSelectedItems] = useState<any[]>([]);
47
47
 
48
- const columnDefs = useMemo(() => {
48
+ const columnDefs: ColDefT<ITestRow>[] = useMemo(() => {
49
49
  const positionTwoMap: Record<string, string> = {
50
50
  "1": "One",
51
51
  "2": "Two",
@@ -58,57 +58,65 @@ const GridEditMultiSelectTemplate: ComponentStory<typeof Grid> = (props: GridPro
58
58
  initialWidth: 65,
59
59
  maxWidth: 85,
60
60
  }),
61
- GridPopoutEditMultiSelect<ITestRow, ITestRow["position"]>({
62
- field: "position",
63
- initialWidth: 65,
64
- maxWidth: 150,
65
- headerName: "Position",
66
- cellEditorParams: {
67
- multiEdit: false,
68
- filtered: true,
69
- filterPlaceholder: "Filter position",
70
- options: [
71
- { value: "a", label: "Architect" },
72
- { value: "b", label: "Developer" },
73
- { value: "c", label: "Product Owner" },
74
- { value: "d", label: "Scrum Master" },
75
- { value: "e", label: "Tester" },
76
- MenuSeparator,
77
- {
78
- value: "f",
79
- label: "Other",
80
- subComponent: (props) => <GridSubComponentTextArea {...props} />,
61
+ GridPopoutEditMultiSelect(
62
+ {
63
+ field: "position",
64
+ initialWidth: 65,
65
+ maxWidth: 150,
66
+ headerName: "Position",
67
+ },
68
+ {
69
+ multiEdit: true,
70
+ editorParams: {
71
+ filtered: true,
72
+ filterPlaceholder: "Filter position",
73
+ options: [
74
+ { value: "a", label: "Architect" },
75
+ { value: "b", label: "Developer" },
76
+ { value: "c", label: "Product Owner" },
77
+ { value: "d", label: "Scrum Master" },
78
+ { value: "e", label: "Tester" },
79
+ MenuSeparator,
80
+ {
81
+ value: "f",
82
+ label: "Other",
83
+ subComponent: (props) => <GridSubComponentTextArea {...props} />,
84
+ },
85
+ ],
86
+ onSave: async (result: MultiSelectResult<ITestRow>) => {
87
+ // eslint-disable-next-line no-console
88
+ console.log(result);
89
+ await wait(1000);
90
+ return true;
81
91
  },
82
- ],
83
- onSave: async (result: MultiSelectResult<ITestRow>) => {
84
- // eslint-disable-next-line no-console
85
- console.log(result);
86
- await wait(1000);
87
- return true;
88
92
  },
89
93
  },
90
- }),
91
- GridPopoutEditMultiSelect<ITestRow, ITestRow["position2"]>({
92
- field: "position2",
93
- initialWidth: 65,
94
- maxWidth: 150,
95
- headerName: "Inital editor values ",
96
- valueGetter: (props) => positionTwoMap[props.data.position2],
97
- cellEditorParams: {
94
+ ),
95
+ GridPopoutEditMultiSelect(
96
+ {
97
+ field: "position2",
98
+ initialWidth: 65,
99
+ maxWidth: 150,
100
+ headerName: "Inital editor values ",
101
+ valueGetter: (props) => positionTwoMap[props.data.position2],
102
+ },
103
+ {
98
104
  multiEdit: false,
99
- filtered: true,
100
- filterPlaceholder: "Filter position",
101
- initialSelectedValues: (selectedRows) => [selectedRows[0].position2],
102
- options: Object.entries(positionTwoMap).map(([k, v]) => ({ value: k, label: v })),
103
- onSave: async (result: MultiSelectResult<ITestRow>) => {
104
- // eslint-disable-next-line no-console
105
- console.log(result);
106
- await wait(1000);
107
- return true;
105
+ editorParams: {
106
+ filtered: true,
107
+ filterPlaceholder: "Filter position",
108
+ initialSelectedValues: (selectedRows) => [selectedRows[0].position2],
109
+ options: Object.entries(positionTwoMap).map(([k, v]) => ({ value: k, label: v })),
110
+ onSave: async (result: MultiSelectResult<ITestRow>) => {
111
+ // eslint-disable-next-line no-console
112
+ console.log(result);
113
+ await wait(1000);
114
+ return true;
115
+ },
108
116
  },
109
117
  },
110
- }),
111
- ] as ColDef[];
118
+ ),
119
+ ];
112
120
  }, []);
113
121
 
114
122
  const rowData = useMemo(
@@ -1,16 +1,17 @@
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
- import { UpdatingContextProvider } from "@contexts/UpdatingContextProvider";
7
+ import { GridUpdatingContextProvider } from "@contexts/GridUpdatingContextProvider";
7
8
  import { GridContextProvider } from "@contexts/GridContextProvider";
8
9
  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";
13
+ import { ColDefT, GridCell } from "@components/GridCell";
12
14
  import { GridPopoverMessage } from "@components/gridPopoverEdit/GridPopoverMessage";
13
- import { GridCell } from "@components/GridCell";
14
15
 
15
16
  export default {
16
17
  title: "Components / Grids",
@@ -22,11 +23,11 @@ export default {
22
23
  decorators: [
23
24
  (Story) => (
24
25
  <div style={{ width: 1200, height: 400, display: "flex" }}>
25
- <UpdatingContextProvider>
26
+ <GridUpdatingContextProvider>
26
27
  <GridContextProvider>
27
28
  <Story />
28
29
  </GridContextProvider>
29
- </UpdatingContextProvider>
30
+ </GridUpdatingContextProvider>
30
31
  </div>
31
32
  ),
32
33
  ],
@@ -42,7 +43,7 @@ interface ITestRow {
42
43
 
43
44
  const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) => {
44
45
  const [externalSelectedItems, setExternalSelectedItems] = useState<any[]>([]);
45
- const columnDefs = useMemo(
46
+ const columnDefs: ColDefT<ITestRow>[] = useMemo(
46
47
  () => [
47
48
  GridCell({
48
49
  field: "id",
@@ -50,7 +51,7 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
50
51
  initialWidth: 65,
51
52
  maxWidth: 85,
52
53
  }),
53
- GridCell<ITestRow, any>({
54
+ GridCell({
54
55
  field: "position",
55
56
  headerName: "Position",
56
57
  initialWidth: 65,
@@ -72,75 +73,87 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
72
73
  initialWidth: 150,
73
74
  maxWidth: 200,
74
75
  }),
75
- GridPopoverMessage<ITestRow>({
76
- headerName: "Popout message",
77
- cellRenderer: () => <>Click me!</>,
78
- cellEditorParams: {
79
- message: async (selectedRows: ITestRow[]) => {
80
- await wait(1000);
81
- return `There are ${selectedRows.length} row(s) selected`;
82
- },
76
+ GridPopoverMessage(
77
+ {
78
+ headerName: "Popout message",
79
+ cellRenderer: () => <>Click me!</>,
80
+ },
81
+ {
83
82
  multiEdit: true,
83
+ editorParams: {
84
+ message: async (formParams): Promise<string> => {
85
+ await wait(1000);
86
+ return `There are ${formParams.selectedRows.length} row(s) selected`;
87
+ },
88
+ },
84
89
  },
85
- }),
86
- GridPopoverMenu<ITestRow>({
87
- headerName: "Menu",
88
- cellEditorParams: {
89
- options: async (selectedItems) => {
90
- // Just doing a timeout here to demonstrate deferred loading
91
- await wait(500);
92
- return [
93
- {
94
- label: "Single edit only",
95
- action: async (selectedRows) => {
96
- alert(`Single-edit: ${selectedRows.length} rows`);
97
- await wait(1500);
98
- return true;
90
+ ),
91
+ GridPopoverMenu(
92
+ {
93
+ headerName: "Menu",
94
+ },
95
+ {
96
+ multiEdit: true,
97
+ editorParams: {
98
+ options: async (selectedItems) => {
99
+ // Just doing a timeout here to demonstrate deferred loading
100
+ await wait(500);
101
+ return [
102
+ {
103
+ label: "Single edit only",
104
+ action: async (selectedRows) => {
105
+ alert(`Single-edit: ${selectedRows.length} rows`);
106
+ await wait(1500);
107
+ return true;
108
+ },
109
+ supportsMultiEdit: false,
99
110
  },
100
- supportsMultiEdit: false,
101
- },
102
- {
103
- label: "Multi-edit",
104
- action: async (selectedRows) => {
105
- alert(`Multi-edit: ${selectedRows.length} rows`);
106
- await wait(1500);
107
- return true;
111
+ {
112
+ label: "Multi-edit",
113
+ action: async (selectedRows) => {
114
+ alert(`Multi-edit: ${selectedRows.length} rows`);
115
+ await wait(1500);
116
+ return true;
117
+ },
118
+ supportsMultiEdit: true,
108
119
  },
109
- supportsMultiEdit: true,
110
- },
111
- {
112
- label: "Disabled item",
113
- disabled: "Disabled for test",
114
- supportsMultiEdit: true,
115
- },
116
- {
117
- label: "Developer Only",
118
- hidden: selectedItems.some((x) => x.position != "Developer"),
119
- supportsMultiEdit: true,
120
- },
121
- ];
120
+ {
121
+ label: "Disabled item",
122
+ disabled: "Disabled for test",
123
+ supportsMultiEdit: true,
124
+ },
125
+ {
126
+ label: "Developer Only",
127
+ hidden: selectedItems.some((x) => x.position != "Developer"),
128
+ supportsMultiEdit: true,
129
+ },
130
+ ];
131
+ },
122
132
  },
123
133
  },
124
- }),
125
- GridPopoverMenu<ITestRow>({
126
- headerName: "Menu disabled",
127
- editable: false,
128
- cellEditorParams: {
129
- options: async () => {
130
- return [];
134
+ ),
135
+ GridPopoverMenu(
136
+ {
137
+ headerName: "Menu disabled",
138
+ editable: false,
139
+ },
140
+ {
141
+ editorParams: {
142
+ options: async () => {
143
+ return [];
144
+ },
131
145
  },
132
146
  },
133
- }),
147
+ ),
134
148
  ],
135
149
  [],
136
150
  );
137
151
 
138
- const rowData = useMemo(
139
- () =>
140
- [
141
- { id: 1000, position: "Tester", age: 30, desc: "Tests application", dd: "1" },
142
- { id: 1001, position: "Developer", age: 12, desc: "Develops application", dd: "2" },
143
- ] 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
+ ],
144
157
  [],
145
158
  );
146
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
+ }
@@ -0,0 +1,108 @@
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.$grey-80,
17
+ data-color: lui.$grey-80,
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
+ row-hover-color: lui.$lily,
27
+ font-family: (
28
+ "Open Sans",
29
+ system-ui,
30
+ sans-serif,
31
+ ),
32
+ font-size: 0.875rem !important,
33
+ borders: false,
34
+ borders-critical: true,
35
+ borders-secondary: false,
36
+ )
37
+ );
38
+
39
+ // Fix that when you click below checkbox it doesn't process a click
40
+ .ag-cell[col-id="selection"] {
41
+ display: flex;
42
+ }
43
+
44
+ // Fix that when you click below checkbox it doesn't process a click
45
+ .ag-cell-wrapper > *:not(.ag-cell-value, .ag-group-value) {
46
+ height: auto;
47
+ }
48
+
49
+ .ag-row:last-of-type {
50
+ border-bottom: none;
51
+ }
52
+
53
+ // ag-grid-community 27.x.x needs this vs 28 using the selected-row-background-color above
54
+ // You can set a background _color_ with theme parameters, but for something like a gradient, you need to override CSS.
55
+ .ag-row-selected {
56
+ background-color: lui.$polar;
57
+ }
58
+
59
+ .ag-header-cell {
60
+ font-weight: 600;
61
+ padding: 7px 0 7px 8px;
62
+
63
+ .LuiIcon {
64
+ fill: lui.$surfie;
65
+ }
66
+ }
67
+
68
+ .ag-cell {
69
+ padding-left: 7px;
70
+ padding-right: 4px;
71
+ display: flex;
72
+ align-items: center;
73
+ }
74
+
75
+ .ag-cell-more {
76
+ padding: 0;
77
+ display: flex;
78
+ justify-content: center;
79
+ }
80
+
81
+ .ag-cell-wrap-text {
82
+ word-break: break-word;
83
+ }
84
+
85
+ .ag-cell-popup-editing,
86
+ .ag-selected-for-edit,
87
+ .ag-cell-inline-editing {
88
+ background: rgb(72 160 244 / 20%);
89
+ // These are important, it needs to override ag-grid to work
90
+ border: 3px solid #48a0f4 !important;
91
+ border-right: 3px solid #48a0f4 !important;
92
+ }
93
+
94
+ .ag-row .ag-cell-data-changed {
95
+ // ag-grid natively has !important on this style so we have to use it here :(
96
+ background-color: lightgoldenrodyellow !important;
97
+ }
98
+
99
+ .ag-center-cols-clipper {
100
+ // when using domLayout={"autoHeight"}, ag grid has a default min-height set to 150px so the !important is necessary here
101
+ min-height: 40px !important;
102
+ }
103
+
104
+ .ag-body-horizontal-scroll-viewport {
105
+ // It's set to scroll by default, but this causes issues with selecting the last row
106
+ overflow-x: auto;
107
+ }
108
+ }
@@ -0,0 +1,2 @@
1
+ @use "./lui-overrides";
2
+ @use "./Grid";
@@ -0,0 +1,49 @@
1
+ .step-ag-grid-react-menu {
2
+ /**
3
+ * Scrollbar (Only Chrome)
4
+ */
5
+ ::-webkit-scrollbar {
6
+ width: 20px;
7
+ }
8
+
9
+ ::-webkit-scrollbar-track {
10
+ background-color: transparent;
11
+ }
12
+
13
+ ::-webkit-scrollbar-thumb {
14
+ background-color: #d6dee1;
15
+ border-radius: 20px;
16
+ border: 6px solid transparent;
17
+ background-clip: content-box;
18
+ }
19
+
20
+ ::-webkit-scrollbar-thumb:hover {
21
+ background-color: #a8bbbf;
22
+ }
23
+
24
+ .szh-menu__item,
25
+ .szh-menu__header {
26
+ padding: 0.375rem 1.5rem;
27
+ }
28
+
29
+ .LuiCheckboxInput {
30
+ margin-bottom: 0;
31
+ }
32
+
33
+ /** Free text input */
34
+ .free-text-input {
35
+ border: transparent;
36
+ outline: transparent;
37
+ line-height: 33px;
38
+ padding-left: 4px;
39
+ }
40
+
41
+ textarea.free-text-input {
42
+ font-weight: 400;
43
+ line-height: 1.5;
44
+ width: 300px;
45
+ height: 150px;
46
+ resize: none;
47
+ border: 0.06rem solid #beb9b4;
48
+ }
49
+ }