@linzjs/step-ag-grid 7.8.0 → 7.8.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.
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- [ag-grid-community](https://www.npmjs.com/package/ag-grid-community) based grid with custom popover components
|
|
8
|
-
implemented using a modified [react-menu](https://www.npmjs.com/package/@szhsin/react-menu).
|
|
8
|
+
implemented using a modified [react-menu](https://www.npmjs.com/package/@szhsin/react-menu).
|
|
9
9
|
- Default components
|
|
10
10
|
- Text input
|
|
11
11
|
- Text area
|
|
@@ -15,7 +15,7 @@ implemented using a modified [react-menu](https://www.npmjs.com/package/@szhsin/
|
|
|
15
15
|
- Popover message
|
|
16
16
|
- Custom form
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
_Please note this requires React >=17, ag-grid-community >=27, and sass._
|
|
19
19
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
@@ -44,7 +44,7 @@ Storybook demo deployed at: https://linz.github.io/step-ag-grid/
|
|
|
44
44
|
```tsx
|
|
45
45
|
import "@linzjs/lui/dist/scss/base.scss";
|
|
46
46
|
import "@linzjs/lui/dist/fonts";
|
|
47
|
-
import "@linzjs/step-ag-grid/dist/index.css"
|
|
47
|
+
import "@linzjs/step-ag-grid/dist/index.css";
|
|
48
48
|
// Only required for LINZ themes otherwise import the default theme from ag-grid
|
|
49
49
|
import "@linzjs/step-ag-grid/dist/GridTheme.scss";
|
|
50
50
|
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
ColDefT,
|
|
56
56
|
GridCell,
|
|
57
57
|
GridPopoverMessage,
|
|
58
|
-
GridPopoverEditDropDown
|
|
58
|
+
GridPopoverEditDropDown,
|
|
59
59
|
} from "@linzjs/step-ag-grid";
|
|
60
60
|
|
|
61
61
|
const GridDemo = () => {
|
|
@@ -63,9 +63,10 @@ const GridDemo = () => {
|
|
|
63
63
|
id: number;
|
|
64
64
|
name: number;
|
|
65
65
|
position: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const columnDefs: ColDefT<ITestRow>[] = useMemo(
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const columnDefs: ColDefT<ITestRow>[] = useMemo(
|
|
69
|
+
() => [
|
|
69
70
|
GridCell({
|
|
70
71
|
field: "id",
|
|
71
72
|
headerName: "Id",
|
|
@@ -116,8 +117,8 @@ const GridDemo = () => {
|
|
|
116
117
|
|
|
117
118
|
const rowData: ITestRow[] = useMemo(
|
|
118
119
|
() => [
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
{ id: 1000, name: "Tom", position: "Tester" },
|
|
121
|
+
{ id: 1001, name: "Sue", position: "Developer" },
|
|
121
122
|
],
|
|
122
123
|
[],
|
|
123
124
|
);
|
|
@@ -125,13 +126,11 @@ const GridDemo = () => {
|
|
|
125
126
|
return (
|
|
126
127
|
<GridUpdatingContextProvider>
|
|
127
128
|
<GridContextProvider>
|
|
128
|
-
<Grid
|
|
129
|
-
selectable={true}
|
|
130
|
-
columnDefs={columnDefs}
|
|
131
|
-
rowData={rowData}
|
|
132
|
-
/>
|
|
129
|
+
<Grid selectable={true} columnDefs={columnDefs} rowData={rowData} />
|
|
133
130
|
</GridContextProvider>
|
|
134
131
|
</GridUpdatingContextProvider>
|
|
135
132
|
);
|
|
136
133
|
};
|
|
137
134
|
```
|
|
135
|
+
|
|
136
|
+
Check `src\stories` for more usage examples
|
package/dist/index.js
CHANGED
|
@@ -3931,7 +3931,7 @@ var bearingCorrectionValueFormatter = function (params) {
|
|
|
3931
3931
|
if (typeof value === "string") {
|
|
3932
3932
|
return convertDDToDMS(bearingNumberParser(value), true, true);
|
|
3933
3933
|
}
|
|
3934
|
-
return convertDDToDMS(value, true,
|
|
3934
|
+
return convertDDToDMS(value, true, false);
|
|
3935
3935
|
};
|
|
3936
3936
|
var bearingNumberParser = function (value) {
|
|
3937
3937
|
if (value === "")
|