@linzjs/step-ag-grid 7.19.6 → 8.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 (29) hide show
  1. package/dist/src/components/Grid.d.ts +2 -1
  2. package/dist/src/components/gridForm/GridFormEditBearing.d.ts +5 -1
  3. package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +8 -2
  4. package/dist/src/components/gridForm/GridFormPopoverMenu.d.ts +8 -2
  5. package/dist/src/components/gridForm/GridFormTextArea.d.ts +4 -1
  6. package/dist/src/components/gridForm/GridFormTextInput.d.ts +4 -1
  7. package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +10 -1
  8. package/dist/src/utils/bearing.d.ts +2 -3
  9. package/dist/step-ag-grid.esm.js +66 -46
  10. package/dist/step-ag-grid.esm.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/components/Grid.tsx +3 -3
  13. package/src/components/gridForm/GridFormEditBearing.tsx +9 -4
  14. package/src/components/gridForm/GridFormMultiSelect.tsx +7 -7
  15. package/src/components/gridForm/GridFormPopoverMenu.tsx +9 -7
  16. package/src/components/gridForm/GridFormTextArea.tsx +2 -2
  17. package/src/components/gridForm/GridFormTextInput.tsx +2 -2
  18. package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +40 -32
  19. package/src/react-menu3/components/ControlledMenu.tsx +5 -1
  20. package/src/stories/grid/GridNonEditableRow.stories.tsx +6 -6
  21. package/src/stories/grid/GridPopoutBearing.stories.tsx +1 -1
  22. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +5 -5
  23. package/src/stories/grid/GridPopoutEditMultiSelect.stories.tsx +3 -3
  24. package/src/stories/grid/GridReadOnly.stories.tsx +6 -6
  25. package/src/stories/grid/gridForm/GridFormDropDown.stories.tsx +60 -0
  26. package/src/stories/grid/gridForm/GridFormEditBearing.stories.tsx +56 -0
  27. package/src/stories/grid/gridForm/GridFormEditBearingCorrection.stories.tsx +56 -0
  28. package/src/stories/grid/gridForm/reactMenuTest.scss +3 -0
  29. package/src/utils/bearing.ts +10 -12
@@ -1,22 +1,20 @@
1
- import { ValueFormatterParams } from "ag-grid-community/dist/lib/entities/colDef";
2
-
3
- export const bearingValueFormatter = (params: ValueFormatterParams): string => {
4
- const value = typeof params.value == "string" ? parseFloat(params.value) : params.value;
5
- if (value == null) {
1
+ export const bearingValueFormatter = (value: any): string => {
2
+ const safeValue = typeof value == "string" ? parseFloat(value) : value;
3
+ if (safeValue == null) {
6
4
  return "–";
7
5
  }
8
- return convertDDToDMS(value, false, false);
6
+ return convertDDToDMS(safeValue, false, false);
9
7
  };
10
8
 
11
- export const bearingCorrectionValueFormatter = (params: ValueFormatterParams): string => {
12
- const value = params.value;
13
- if (value == null) {
9
+ export const bearingCorrectionValueFormatter = (value: any): string => {
10
+ const safeValue = value;
11
+ if (safeValue == null) {
14
12
  return "–";
15
13
  }
16
- if (typeof value === "string") {
17
- return convertDDToDMS(bearingNumberParser(value), true, true);
14
+ if (typeof safeValue === "string") {
15
+ return convertDDToDMS(bearingNumberParser(safeValue), true, true);
18
16
  }
19
- return convertDDToDMS(value, true, true);
17
+ return convertDDToDMS(safeValue, true, true);
20
18
  };
21
19
 
22
20
  export const bearingNumberParser = (value: string): number | null => {