@linzjs/step-ag-grid 16.0.0 → 17.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 (102) hide show
  1. package/dist/GridTheme.scss +138 -106
  2. package/dist/index.css +1 -8
  3. package/dist/node_modules/@linzjs/lui/dist/assets/svg-content.d.ts +7 -0
  4. package/dist/src/components/ComponentLoadingWrapper.d.ts +3 -4
  5. package/dist/src/components/Grid.d.ts +2 -2
  6. package/dist/src/components/GridCell.d.ts +5 -5
  7. package/dist/src/components/GridCellMultiEditor.d.ts +2 -2
  8. package/dist/src/components/GridNoRowsOverlay.d.ts +3 -2
  9. package/dist/src/components/GridPopoverHook.d.ts +3 -3
  10. package/dist/src/components/GridWrapper.d.ts +2 -3
  11. package/dist/src/components/PostSortRowsHook.d.ts +1 -1
  12. package/dist/src/components/gridFilter/GridFilterButtons.d.ts +2 -2
  13. package/dist/src/components/gridFilter/GridFilterColumnsToggle.d.ts +2 -2
  14. package/dist/src/components/gridFilter/GridFilters.d.ts +2 -5
  15. package/dist/src/components/gridForm/GridFormDropDown.d.ts +2 -2
  16. package/dist/src/components/gridForm/GridFormMessage.d.ts +2 -2
  17. package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +2 -2
  18. package/dist/src/components/gridForm/GridFormPopoverMenu.d.ts +3 -3
  19. package/dist/src/components/gridForm/GridFormSubComponentTextArea.d.ts +2 -2
  20. package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +2 -2
  21. package/dist/src/components/gridForm/GridFormTextArea.d.ts +2 -2
  22. package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +2 -2
  23. package/dist/src/contexts/GridContext.d.ts +4 -4
  24. package/dist/src/contexts/GridContextProvider.d.ts +2 -6
  25. package/dist/src/contexts/GridPopoverContextProvider.d.ts +2 -3
  26. package/dist/src/contexts/GridUpdatingContextProvider.d.ts +2 -6
  27. package/dist/src/lui/ActionButton.d.ts +2 -2
  28. package/dist/src/lui/FormError.d.ts +2 -2
  29. package/dist/src/lui/TextAreaInput.d.ts +3 -3
  30. package/dist/src/lui/TextInputFormatted.d.ts +3 -3
  31. package/dist/src/react-menu3/components/FocusableItem.d.ts +2 -2
  32. package/dist/src/react-menu3/utils/withHovering.d.ts +2 -2
  33. package/dist/src/utils/textValidator.d.ts +3 -3
  34. package/dist/step-ag-grid.cjs.js +39 -17
  35. package/dist/step-ag-grid.cjs.js.map +1 -1
  36. package/dist/step-ag-grid.esm.js +39 -17
  37. package/dist/step-ag-grid.esm.js.map +1 -1
  38. package/package.json +45 -45
  39. package/src/components/ComponentLoadingWrapper.tsx +9 -6
  40. package/src/components/Grid.tsx +19 -10
  41. package/src/components/GridCell.tsx +5 -5
  42. package/src/components/GridCellMultiEditor.tsx +2 -2
  43. package/src/components/GridNoRowsOverlay.tsx +4 -2
  44. package/src/components/GridPopoverHook.tsx +4 -4
  45. package/src/components/GridWrapper.tsx +2 -3
  46. package/src/components/PostSortRowsHook.ts +4 -4
  47. package/src/components/gridFilter/GridFilterButtons.tsx +2 -2
  48. package/src/components/gridFilter/GridFilterColumnsToggle.tsx +2 -2
  49. package/src/components/gridFilter/GridFilters.tsx +4 -6
  50. package/src/components/gridForm/GridFormDropDown.tsx +4 -4
  51. package/src/components/gridForm/GridFormMessage.tsx +3 -3
  52. package/src/components/gridForm/GridFormMultiSelect.tsx +2 -1
  53. package/src/components/gridForm/GridFormPopoverMenu.tsx +4 -4
  54. package/src/components/gridForm/GridFormSubComponentTextArea.tsx +2 -2
  55. package/src/components/gridForm/GridFormSubComponentTextInput.tsx +2 -2
  56. package/src/components/gridForm/GridFormTextArea.tsx +2 -2
  57. package/src/components/gridPopoverEdit/GridPopoverMessage.ts +1 -1
  58. package/src/components/gridRender/GridRenderGenericCell.tsx +2 -1
  59. package/src/contexts/GridContext.tsx +4 -4
  60. package/src/contexts/GridContextProvider.tsx +33 -22
  61. package/src/contexts/GridPopoverContextProvider.tsx +2 -3
  62. package/src/contexts/GridUpdatingContextProvider.tsx +2 -6
  63. package/src/lui/ActionButton.tsx +2 -2
  64. package/src/lui/FormError.tsx +3 -1
  65. package/src/lui/TextAreaInput.tsx +3 -3
  66. package/src/lui/TextInputFormatted.tsx +3 -3
  67. package/src/lui/reactUtils.test.tsx +3 -3
  68. package/src/react-menu3/components/FocusableItem.tsx +2 -2
  69. package/src/react-menu3/utils/utils.ts +1 -1
  70. package/src/react-menu3/utils/withHovering.tsx +2 -2
  71. package/src/stories/grid/FormTest.tsx +2 -2
  72. package/src/stories/grid/GridFilterButtons.stories.tsx +8 -1
  73. package/src/stories/grid/GridNoRowsOverlay.stories.tsx +8 -8
  74. package/src/stories/grid/GridNonEditableRow.stories.tsx +9 -2
  75. package/src/stories/grid/GridPopoutContextMenu.stories.tsx +8 -1
  76. package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +8 -1
  77. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +8 -1
  78. package/src/stories/grid/GridPopoverEditBearing.stories.tsx +7 -0
  79. package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +7 -0
  80. package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +7 -0
  81. package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +8 -0
  82. package/src/stories/grid/GridReadOnly.stories.tsx +10 -2
  83. package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +2 -2
  84. package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +7 -2
  85. package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +7 -2
  86. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +1 -1
  87. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +2 -2
  88. package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +4 -3
  89. package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +3 -3
  90. package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +3 -3
  91. package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +1 -1
  92. package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +1 -1
  93. package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +1 -1
  94. package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +2 -2
  95. package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +1 -1
  96. package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +1 -1
  97. package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +4 -0
  98. package/src/styles/ComponentLoadingWrapper.scss +1 -4
  99. package/src/styles/Grid.scss +0 -4
  100. package/src/styles/GridTheme.scss +138 -106
  101. package/src/utils/testUtil.ts +3 -0
  102. package/src/utils/textValidator.ts +3 -1
@@ -1,106 +1,138 @@
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.$charcoal,
17
- data-color: lui.$charcoal,
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
- cell-horizontal-border: solid ag-derived(secondary-border-color),
27
- cell-horizontal-padding: 12,
28
- row-hover-color: lui.$hint,
29
- font-family: (
30
- "Open Sans",
31
- system-ui,
32
- sans-serif,
33
- ),
34
- font-size: 1rem !important,
35
- borders: false,
36
- borders-critical: true,
37
- borders-secondary: false,
38
- )
39
- );
40
-
41
- // Fix that when you click below checkbox it doesn't process a click
42
- .ag-cell[col-id="selection"] {
43
- display: flex;
44
- }
45
-
46
- // Fix that when you click below checkbox it doesn't process a click
47
- .ag-cell-wrapper > *:not(.ag-cell-value, .ag-group-value) {
48
- height: auto;
49
- }
50
-
51
- .ag-row:last-of-type {
52
- border-bottom: 1px solid lui.$lily;
53
- }
54
-
55
- // ag-grid-community 27.x.x needs this vs 28 using the selected-row-background-color above
56
- // You can set a background _color_ with theme parameters, but for something like a gradient, you need to override CSS.
57
- .ag-row-selected {
58
- background-color: lui.$polar;
59
- }
60
-
61
- .ag-header-cell {
62
- font-weight: 600;
63
- padding: 7px 11px;
64
-
65
- .LuiIcon {
66
- fill: lui.$surfie;
67
- }
68
- }
69
-
70
- .ag-cell {
71
- padding-left: 11px;
72
- padding-right: 11px;
73
- display: flex;
74
- align-items: center;
75
- }
76
-
77
- .ag-cell-wrap-text {
78
- word-break: break-word;
79
- }
80
-
81
- .ag-cell.ag-cell-popup-editing,
82
- .ag-cell.ag-selected-for-edit,
83
- .ag-cell-inline-editing {
84
- padding-left: 9px;
85
- padding-right: 9px;
86
- background: rgb(72 160 244 / 20%);
87
- // These are important, it needs to override ag-grid to work
88
- border: 3px solid #48a0f4 !important;
89
- border-right: 3px solid #48a0f4 !important;
90
- }
91
-
92
- .ag-row .ag-cell-data-changed {
93
- // ag-grid natively has !important on this style so we have to use it here :(
94
- background-color: lightgoldenrodyellow !important;
95
- }
96
-
97
- .ag-center-cols-clipper {
98
- // when using domLayout={"autoHeight"}, ag grid has a default min-height set to 150px so the !important is necessary here
99
- min-height: 40px !important;
100
- }
101
-
102
- .ag-body-horizontal-scroll-viewport {
103
- // It's set to scroll by default, but this causes issues with selecting the last row
104
- overflow-x: auto;
105
- }
106
- }
1
+ @use "@linzjs/lui/dist/scss/Core" as lui;
2
+ @use "node_modules/ag-grid-community/styles" as ag;
3
+
4
+ // ag-grid likes to add 1px to this, so we subtract to compensate
5
+ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
6
+
7
+ // GridTheme that support ag-grid v29 new SASS API
8
+ @include ag.grid-styles(
9
+ (
10
+ themes: (
11
+ step-compact: (
12
+ extend-theme: alpine,
13
+ --ag-row-height: 36px,
14
+ --ag-header-height: 36px,
15
+ --ag-font-size: calc($grid-base-font-size - 2px),
16
+ ),
17
+ step-default: (
18
+ extend-theme: alpine,
19
+ --ag-row-height: 40px,
20
+ --ag-header-height: 40px,
21
+ --ag-font-size: calc($grid-base-font-size),
22
+ ),
23
+ ),
24
+
25
+ alpine-active-color: lui.$sea,
26
+ background-color: lui.$white,
27
+ border-color: lui.$dew,
28
+ borders: false,
29
+ borders-critical: true,
30
+ borders-secondary: false,
31
+ cell-horizontal-border: solid lui.$dew,
32
+ cell-horizontal-padding: lui.$unit-sm,
33
+ data-color: lui.$charcoal,
34
+ foreground-color: lui.$charcoal,
35
+ font-family: (
36
+ "Open Sans",
37
+ system-ui,
38
+ sans-serif,
39
+ ),
40
+ font-size: 1rem,
41
+ header-background-color: lui.$white,
42
+ header-foreground-color: lui.$surfie,
43
+ odd-row-background-color: lui.$white,
44
+ row-hover-color: lui.$hint,
45
+ secondary-border-color: lui.$dew,
46
+ selected-row-background-color: lui.$polar,
47
+ )
48
+ );
49
+
50
+ // Fix that when you click below checkbox it doesn't process a click
51
+ .ag-cell[col-id="selection"] {
52
+ display: flex;
53
+ }
54
+
55
+ // Fix that when you click below checkbox it doesn't process a click
56
+ .ag-cell-wrapper > *:not(.ag-cell-value, .ag-group-value) {
57
+ height: auto;
58
+ }
59
+
60
+ .ag-row:last-of-type {
61
+ border-bottom: 1px solid lui.$dew;
62
+ }
63
+
64
+ .ag-header-cell {
65
+ font-size: 14px;
66
+ font-weight: 600;
67
+
68
+ // fix: Display descender line
69
+ padding: 0 11px;
70
+
71
+ .LuiIcon {
72
+ fill: lui.$surfie;
73
+ }
74
+ }
75
+
76
+ .ag-cell-label-container {
77
+ padding: 8px 0;
78
+
79
+ // Help ag-grid to calculate column height in react portal
80
+ height: fit-content;
81
+ }
82
+
83
+ .ag-header .ag-header-cell[aria-colindex="1"] {
84
+ padding-left: lui.$unit-rg;
85
+ }
86
+
87
+ .ag-cell[role="gridcell"] {
88
+ border-right: none;
89
+ border-left: 1px var(--ag-cell-horizontal-border);
90
+ }
91
+
92
+ .ag-cell[aria-colindex="1"] {
93
+ border-left: none;
94
+ padding-left: lui.$unit-rg;
95
+ }
96
+
97
+ .ag-cell {
98
+ padding-left: 11px;
99
+ padding-right: 11px;
100
+ display: flex;
101
+ align-items: center;
102
+ }
103
+
104
+ .ag-cell-wrap-text {
105
+ word-break: break-word;
106
+ }
107
+
108
+ .ag-cell.ag-cell-popup-editing,
109
+ .ag-cell.ag-selected-for-edit,
110
+ .ag-cell-inline-editing {
111
+ padding-left: 9px;
112
+ padding-right: 9px;
113
+ background: rgb(72 160 244 / 20%);
114
+
115
+ // These are important, it needs to override ag-grid to work
116
+ border: 3px solid #48a0f4 !important;
117
+ border-right: 3px solid #48a0f4 !important;
118
+ }
119
+
120
+ .ag-row .ag-cell-data-changed {
121
+ // ag-grid natively has !important on this style so we have to use it here :(
122
+ background-color: lightgoldenrodyellow;
123
+ }
124
+
125
+ .ag-center-cols-clipper {
126
+ // when using domLayout={"autoHeight"}, ag grid has a default min-height
127
+ // set to 150px so the !important is necessary here
128
+ min-height: 40px !important;
129
+ }
130
+
131
+ .ag-body-horizontal-scroll-viewport {
132
+ // It's set to scroll by default, but this causes issues with selecting the last row
133
+ overflow-x: auto;
134
+ }
135
+
136
+ .Grid-container .ag-cell {
137
+ font-weight: 400;
138
+ }
package/dist/index.css CHANGED
@@ -183,10 +183,7 @@
183
183
 
184
184
  .ComponentLoadingWrapper-saveOverlay {
185
185
  position: absolute;
186
- left: 0;
187
- top: 0;
188
- bottom: 0;
189
- right: 0;
186
+ inset: 0;
190
187
  background-color: rgba(64, 64, 64, 0.1);
191
188
  z-index: 1000;
192
189
  }
@@ -409,10 +406,6 @@
409
406
  color: #6b6966;
410
407
  }
411
408
 
412
- .Grid-container.ag-theme-alpine .ag-cell {
413
- font-weight: 400;
414
- }
415
-
416
409
  .Grid-container.ag-theme-alpine .ag-cell:not(.ag-cell-focus) .Grid-displayWhenCellFocused {
417
410
  visibility: hidden;
418
411
  }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export type LuiIconName = string | 'ic_account_circle' | 'ic_add' | 'ic_add_adopt' | 'ic_add_area_interest' | 'ic_add_circle' | 'ic_add_circle_outline' | 'ic_add_irregular_image' | 'ic_add_multiple' | 'ic_add_to_list' | 'ic_added_to_list' | 'ic_alias' | 'ic_alias_unselected' | 'ic_annotations' | 'ic_apps' | 'ic_arrow_back' | 'ic_arrow_back_ios' | 'ic_arrow_back_left' | 'ic_arrow_drop_down' | 'ic_arrow_drop_right' | 'ic_arrow_drop_up' | 'ic_arrow_forward_ios' | 'ic_arrow_forward_right' | 'ic_attach_file' | 'ic_attachment' | 'ic_auth_and_instruct' | 'ic_balance_parcel' | 'ic_basemap_off' | 'ic_blackwhite_greyscale' | 'ic_blocked' | 'ic_border_color' | 'ic_cancel_clear' | 'ic_cancel_outline' | 'ic_cart_view' | 'ic_certify_and_sign' | 'ic_change_password' | 'ic_check' | 'ic_check_circle' | 'ic_check_circle_outline' | 'ic_checklist' | 'ic_clear' | 'ic_close_list' | 'ic_columns' | 'ic_control_point' | 'ic_copy' | 'ic_corporate_fare' | 'ic_create' | 'ic_create_new_list' | 'ic_csv_file' | 'ic_data_display_threshold' | 'ic_data_display_threshold_high_urban' | 'ic_data_display_threshold_low_large_rural' | 'ic_data_display_threshold_medium_rural' | 'ic_dealings' | 'ic_delete_forever' | 'ic_delete_outline' | 'ic_delete_solid' | 'ic_dollar_round' | 'ic_double_arrow_left' | 'ic_double_arrow_right' | 'ic_double_tick' | 'ic_drag_handle' | 'ic_drag_indicator' | 'ic_draw_irregular_line' | 'ic_email' | 'ic_enabled_users' | 'ic_error' | 'ic_error_outline' | 'ic_expand_less' | 'ic_expand_more' | 'ic_feedback_lightbulb' | 'ic_feedback_lightbulb_alt' | 'ic_file_attached' | 'ic_file_attached_outline' | 'ic_filter_list' | 'ic_flag' | 'ic_forward' | 'ic_fullscreen_frame' | 'ic_grid_view' | 'ic_help_outline' | 'ic_history' | 'ic_hourglass' | 'ic_info' | 'ic_info_outline' | 'ic_insert_invitation' | 'ic_insert_photo' | 'ic_instruments_roles' | 'ic_keyboard_arrow_down' | 'ic_keyboard_arrow_left' | 'ic_keyboard_arrow_right' | 'ic_keyboard_arrow_up' | 'ic_labels_off' | 'ic_labels_on' | 'ic_launch_modal' | 'ic_launch_new window_open' | 'ic_layers' | 'ic_layers_user_defined' | 'ic_left' | 'ic_left_col' | 'ic_line_arc' | 'ic_line_irregular' | 'ic_line_vector' | 'ic_link' | 'ic_list_add' | 'ic_list_clear' | 'ic_list_notepad' | 'ic_list_view' | 'ic_lists_folder' | 'ic_locate' | 'ic_lock' | 'ic_lock_alt' | 'ic_log_out' | 'ic_manage_adjust' | 'ic_maori_land' | 'ic_mark_linking' | 'ic_marks' | 'ic_memorials' | 'ic_menu' | 'ic_message_received' | 'ic_minimise' | 'ic_misclose_error' | 'ic_more_vert' | 'ic_multi_factor_authentication_mfa' | 'ic_navigate_before' | 'ic_navigate_next' | 'ic_note_add' | 'ic_notice_of_change' | 'ic_numbered_list' | 'ic_office_building_corporate' | 'ic_order_history' | 'ic_package' | 'ic_parcels_existing' | 'ic_parcels_new' | 'ic_pdf' | 'ic_pen_and_paper_sign' | 'ic_people_outline' | 'ic_person' | 'ic_person_add' | 'ic_picker' | 'ic_placeholder' | 'ic_plus_one' | 'ic_polygon_selection' | 'ic_pop_back' | 'ic_pre_validation' | 'ic_print' | 'ic_product_list' | 'ic_publish' | 'ic_refresh' | 'ic_regenerate' | 'ic_release' | 'ic_remove_circle' | 'ic_remove_circle_outline' | 'ic_request' | 'ic_requisitions' | 'ic_restore' | 'ic_round_selection' | 'ic_save' | 'ic_save_as' | 'ic_save_download' | 'ic_saved_area_interest' | 'ic_search' | 'ic_send' | 'ic_send_email_dart' | 'ic_separator' | 'ic_settings' | 'ic_sorting_down_arrow_up' | 'ic_sorting_up_arrow_up' | 'ic_square_selection' | 'ic_subdirectory_arrow_right' | 'ic_submit' | 'ic_summary_open' | 'ic_survey' | 'ic_survey_report' | 'ic_ta_request_sent' | 'ic_table_columns' | 'ic_tax_statement' | 'ic_tick' | 'ic_tick_and_cross' | 'ic_timeline' | 'ic_title_allocation_swap' | 'ic_tune_setting_configure' | 'ic_unlink' | 'ic_unlock' | 'ic_upload' | 'ic_vector' | 'ic_vector_sequence' | 'ic_view' | 'ic_view_list' | 'ic_view_quilt' | 'ic_view_sidebar' | 'ic_view_week' | 'ic_visiblity_off' | 'ic_warning' | 'ic_warning_outline' | 'ic_waves' | 'ic_whats_new_updates' | 'ic_xml_file' | 'ic_zoom_centre' | 'ic_zoom_out' | 'ic_zoom_previous';
3
+ type IconNameElementMap = {
4
+ [key in LuiIconName]?: JSX.Element;
5
+ };
6
+ export declare const ICONS: IconNameElementMap;
7
+ export {};
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
1
+ import { PropsWithChildren, ReactElement } from "react";
2
2
  /**
3
3
  * If loading is true this returns a loading spinner, otherwise it returns its children.
4
4
  */
5
- export declare const ComponentLoadingWrapper: (props: {
5
+ export declare const ComponentLoadingWrapper: (props: PropsWithChildren<{
6
6
  loading?: boolean;
7
7
  saving?: boolean;
8
- children: JSX.Element | undefined;
9
8
  className: string | undefined;
10
- }) => JSX.Element;
9
+ }>) => ReactElement;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { ColDef } from "ag-grid-community";
3
2
  import { GridOptions } from "ag-grid-community/dist/lib/entities/gridOptions";
3
+ import { ReactElement } from "react";
4
4
  import { GridContextMenuComponent } from "./gridHook";
5
5
  export interface GridBaseRow {
6
6
  id: string | number;
@@ -67,4 +67,4 @@ export interface GridProps {
67
67
  /**
68
68
  * Wrapper for AgGrid to add commonly used functionality.
69
69
  */
70
- export declare const Grid: ({ "data-testid": dataTestId, rowSelection, suppressColumnVirtualization, theme, sizeColumns, selectColumnPinned, contextMenuSelectRow, ...params }: GridProps) => JSX.Element;
70
+ export declare const Grid: ({ "data-testid": dataTestId, rowSelection, suppressColumnVirtualization, theme, sizeColumns, selectColumnPinned, contextMenuSelectRow, ...params }: GridProps) => ReactElement;
@@ -1,27 +1,27 @@
1
- /// <reference types="react" />
2
1
  import { ColDef, ICellEditorParams, ICellRendererParams } from "ag-grid-community";
3
2
  import { SuppressKeyboardEventParams } from "ag-grid-community/dist/lib/entities/colDef";
3
+ import { ReactElement } from "react";
4
4
  import { GridBaseRow } from "./Grid";
5
5
  import { GenericCellColDef, RowValueFormatterParams, RowValueGetterParams } from "./gridRender";
6
6
  export interface GenericCellEditorProps<E> {
7
7
  multiEdit?: boolean;
8
- editor?: (editorProps: E) => JSX.Element;
8
+ editor?: (editorProps: E) => ReactElement;
9
9
  editorParams?: E;
10
10
  }
11
11
  export declare const GridCellRenderer: (props: ICellRendererParams) => import("react/jsx-runtime").JSX.Element;
12
12
  export interface ColDefT<RowType extends GridBaseRow> extends ColDef {
13
13
  _?: RowType;
14
- editor?: (editorProps: any) => JSX.Element;
14
+ editor?: (editorProps: any) => ReactElement;
15
15
  }
16
16
  export declare const suppressCellKeyboardEvents: (e: SuppressKeyboardEventParams) => any;
17
17
  export declare const generateFilterGetter: <RowType extends GridBaseRow>(field: string | undefined, filterValueGetter: string | ((params: RowValueGetterParams<RowType>) => string) | undefined, valueFormatter: string | ((params: RowValueFormatterParams<RowType>) => string) | undefined) => string | ((params: RowValueGetterParams<RowType>) => string) | undefined;
18
18
  export declare const GridCell: <RowType extends GridBaseRow, Props extends CellEditorCommon>(props: GenericCellColDef<RowType>, custom?: {
19
19
  multiEdit?: boolean | undefined;
20
20
  preventAutoEdit?: boolean | undefined;
21
- editor?: ((editorProps: Props) => JSX.Element) | undefined;
21
+ editor?: ((editorProps: Props) => ReactElement) | undefined;
22
22
  editorParams?: Props | undefined;
23
23
  } | undefined) => ColDefT<RowType>;
24
24
  export interface CellEditorCommon {
25
25
  className?: string | undefined;
26
26
  }
27
- export declare const GenericCellEditorComponentWrapper: (editor?: ((props: any) => JSX.Element) | undefined) => import("react").ForwardRefExoticComponent<ICellEditorParams & import("react").RefAttributes<unknown>>;
27
+ export declare const GenericCellEditorComponentWrapper: (editor?: ((props: any) => ReactElement) | undefined) => import("react").ForwardRefExoticComponent<ICellEditorParams<any, any, any> & import("react").RefAttributes<unknown>>;
@@ -1,10 +1,10 @@
1
1
  import { CellEditorSelectorResult } from "ag-grid-community/dist/lib/entities/colDef";
2
2
  import { ICellEditorParams } from "ag-grid-community/dist/lib/interfaces/iCellEditor";
3
- import { ComponentProps } from "react";
3
+ import { ComponentProps, ReactElement } from "react";
4
4
  import { GridBaseRow } from "./Grid";
5
5
  import { ColDefT } from "./GridCell";
6
6
  import { GenericCellColDef } from "./gridRender";
7
- export declare const Editor: <FN extends (param: any) => JSX.Element>(props: {
7
+ export declare const Editor: <FN extends (param: any) => ReactElement>(props: {
8
8
  multiEdit: boolean;
9
9
  editor: FN;
10
10
  editorParams: ComponentProps<FN>;
@@ -1,5 +1,6 @@
1
- export declare const GridNoRowsOverlay: (params: {
1
+ export interface GridNoRowsOverlayProps {
2
2
  rowCount: number | undefined | null;
3
3
  filteredRowCount: number;
4
4
  noRowsOverlayText: string | undefined;
5
- }) => import("react/jsx-runtime").JSX.Element;
5
+ }
6
+ export declare const GridNoRowsOverlay: (params: GridNoRowsOverlayProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from "react";
2
2
  import { GridBaseRow } from "./Grid";
3
3
  export interface GridPopoverHookProps<RowType> {
4
4
  className: string | undefined;
5
- invalid?: () => Promise<JSX.Element | boolean | string | null | undefined> | JSX.Element | boolean | string | null | undefined;
5
+ invalid?: () => Promise<ReactElement | boolean | string | null | undefined> | ReactElement | boolean | string | null | undefined;
6
6
  save?: (selectedRows: RowType[]) => Promise<boolean>;
7
7
  dontSaveOnExternalClick?: boolean;
8
8
  }
9
9
  export declare const useGridPopoverHook: <RowType extends GridBaseRow>(props: GridPopoverHookProps<RowType>) => {
10
- popoverWrapper: (children: JSX.Element) => import("react/jsx-runtime").JSX.Element;
10
+ popoverWrapper: (children: ReactElement) => import("react/jsx-runtime").JSX.Element;
11
11
  triggerSave: (reason?: string) => Promise<void>;
12
12
  };
@@ -1,6 +1,5 @@
1
- import { ReactNode } from "react";
1
+ import { PropsWithChildren } from "react";
2
2
  export interface GridWrapperProps {
3
- children: ReactNode;
4
3
  maxHeight?: number | string;
5
4
  }
6
- export declare const GridWrapper: ({ children, maxHeight }: GridWrapperProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const GridWrapper: ({ children, maxHeight }: PropsWithChildren<GridWrapperProps>) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { PostSortRowsParams } from "ag-grid-community/dist/lib/entities/iCallbackParams";
1
+ import { PostSortRowsParams } from "ag-grid-community/dist/lib/interfaces/iCallbackParams";
2
2
  interface PostSortRowsHookProps {
3
3
  setStaleGrid: (stale: boolean) => void;
4
4
  }
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { ClassValue } from "clsx";
2
+ import { ReactElement } from "react";
3
3
  import { LuiButtonProps } from "@linzjs/lui/dist/components/LuiButton/LuiButton";
4
4
  import { GridFilterExternal } from "../../contexts/GridContext";
5
5
  import { GridBaseRow } from "../Grid";
@@ -13,4 +13,4 @@ export type GridFilterButtonsProps<RowType extends GridBaseRow> = {
13
13
  luiButtonProps?: Partial<LuiButtonProps>;
14
14
  options: GridFilterButtonsOption<RowType>[];
15
15
  };
16
- export declare const GridFilterButtons: <RowType extends GridBaseRow>({ className, luiButtonProps, options, }: GridFilterButtonsProps<RowType>) => JSX.Element;
16
+ export declare const GridFilterButtons: <RowType extends GridBaseRow>({ className, luiButtonProps, options, }: GridFilterButtonsProps<RowType>) => ReactElement;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from "react";
2
2
  export interface GridFilterColumnsToggleProps {
3
3
  saveState?: boolean;
4
4
  }
5
- export declare const GridFilterColumnsToggle: ({ saveState }: GridFilterColumnsToggleProps) => JSX.Element;
5
+ export declare const GridFilterColumnsToggle: ({ saveState }: GridFilterColumnsToggleProps) => ReactElement;
@@ -1,5 +1,2 @@
1
- import { ReactNode } from "react";
2
- export interface GridFiltersProps {
3
- children: ReactNode;
4
- }
5
- export declare const GridFilters: ({ children }: GridFiltersProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { PropsWithChildren } from "react";
2
+ export declare const GridFilters: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from "react";
2
2
  import { GridBaseRow } from "../Grid";
3
3
  import { CellEditorCommon } from "../GridCell";
4
4
  export interface GridPopoutEditDropDownSelectedItem<RowType> {
@@ -8,7 +8,7 @@ export interface GridPopoutEditDropDownSelectedItem<RowType> {
8
8
  }
9
9
  interface FinalSelectOption {
10
10
  value: any;
11
- label?: JSX.Element | string;
11
+ label?: ReactElement | string;
12
12
  disabled?: boolean | string;
13
13
  subComponent?: (props: any, ref: any) => any;
14
14
  }
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from "react";
2
2
  import { GridBaseRow } from "../Grid";
3
3
  import { CellEditorCommon } from "../GridCell";
4
4
  export interface GridFormMessageProps<RowType extends GridBaseRow> extends CellEditorCommon {
5
- message: (selectedRows: RowType[]) => Promise<string | JSX.Element> | string | JSX.Element;
5
+ message: (selectedRows: RowType[]) => Promise<string | ReactElement> | string | ReactElement;
6
6
  }
7
7
  export declare const GridFormMessage: <RowType extends GridBaseRow>(props: GridFormMessageProps<RowType>) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from "react";
2
2
  import { GridBaseRow } from "../Grid";
3
3
  import { CellEditorCommon } from "../GridCell";
4
4
  export interface MultiSelectOption {
5
5
  value: any;
6
6
  label?: string;
7
- subComponent?: (props: any) => JSX.Element;
7
+ subComponent?: (props: any) => ReactElement;
8
8
  subValue?: any;
9
9
  filter?: string;
10
10
  checked?: boolean;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from "react";
2
2
  import { GridBaseRow } from "../Grid";
3
3
  import { CellEditorCommon } from "../GridCell";
4
4
  export interface GridFormPopoverMenuProps<RowType extends GridBaseRow> extends CellEditorCommon {
@@ -18,14 +18,14 @@ export interface SelectedMenuOptionResult<RowType extends GridBaseRow> extends M
18
18
  subValue: any;
19
19
  }
20
20
  export interface MenuOption<RowType extends GridBaseRow> {
21
- label: JSX.Element | string | MenuSeparatorType;
21
+ label: ReactElement | string | MenuSeparatorType;
22
22
  action?: (props: {
23
23
  selectedRows: RowType[];
24
24
  menuOption: SelectedMenuOptionResult<RowType>;
25
25
  }) => Promise<void>;
26
26
  disabled?: string | boolean;
27
27
  hidden?: boolean;
28
- subComponent?: (props: any) => JSX.Element;
28
+ subComponent?: (props: any) => ReactElement;
29
29
  }
30
30
  /**
31
31
  * NOTE: If the popout menu doesn't appear on single click when also selecting row it's because
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from "react";
2
2
  import { TextInputValidatorProps } from "../../utils/textValidator";
3
3
  import { GridBaseRow } from "../Grid";
4
4
  import { CellEditorCommon } from "../GridCell";
@@ -9,4 +9,4 @@ export interface GridSubComponentTextAreaProps<RowType extends GridBaseRow> exte
9
9
  className?: string;
10
10
  helpText?: string;
11
11
  }
12
- export declare const GridFormSubComponentTextArea: <RowType extends GridBaseRow>(props: GridSubComponentTextAreaProps<RowType>) => JSX.Element;
12
+ export declare const GridFormSubComponentTextArea: <RowType extends GridBaseRow>(props: GridSubComponentTextAreaProps<RowType>) => ReactElement;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from "react";
2
2
  import { TextInputValidatorProps } from "../../utils/textValidator";
3
3
  import { GridBaseRow } from "../Grid";
4
4
  import { CellEditorCommon } from "../GridCell";
@@ -8,4 +8,4 @@ export interface GridFormSubComponentTextInputProps<RowType extends GridBaseRow>
8
8
  defaultValue: string;
9
9
  helpText?: string;
10
10
  }
11
- export declare const GridFormSubComponentTextInput: <RowType extends GridBaseRow>(props: GridFormSubComponentTextInputProps<RowType>) => JSX.Element;
11
+ export declare const GridFormSubComponentTextInput: <RowType extends GridBaseRow>(props: GridFormSubComponentTextInputProps<RowType>) => ReactElement;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { ReactElement } from "react";
2
2
  import { TextInputValidatorProps } from "../../utils/textValidator";
3
3
  import { GridBaseRow } from "../Grid";
4
4
  import { CellEditorCommon } from "../GridCell";
@@ -11,4 +11,4 @@ export interface GridFormTextAreaProps<RowType extends GridBaseRow> extends Text
11
11
  }) => Promise<boolean>;
12
12
  helpText?: string;
13
13
  }
14
- export declare const GridFormTextArea: <RowType extends GridBaseRow>(props: GridFormTextAreaProps<RowType>) => JSX.Element;
14
+ export declare const GridFormTextArea: <RowType extends GridBaseRow>(props: GridFormTextAreaProps<RowType>) => ReactElement;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { ICellRendererParams } from "ag-grid-community";
3
2
  import { EditableCallbackParams, SuppressKeyboardEventParams, ValueFormatterParams, ValueGetterParams } from "ag-grid-community/dist/lib/entities/colDef";
3
+ import { ReactElement } from "react";
4
4
  import { GridBaseRow } from "../Grid";
5
5
  import { ColDefT } from "../GridCell";
6
6
  export interface RowICellRendererParams<RowType extends GridBaseRow> extends ICellRendererParams {
@@ -29,7 +29,7 @@ export interface GenericCellColDef<RowType extends GridBaseRow> extends ColDefT<
29
29
  }
30
30
  export interface GenericCellRendererParams<RowType extends GridBaseRow> {
31
31
  singleClickEdit?: boolean;
32
- rightHoverElement?: JSX.Element | undefined;
32
+ rightHoverElement?: ReactElement | undefined;
33
33
  editAction?: (selectedRows: RowType[]) => void;
34
34
  shortcutKeys?: Record<string, ((params: SuppressKeyboardEventParams) => boolean | void) | undefined>;
35
35
  warning?: (props: RowICellRendererParams<RowType>) => string | string[] | boolean | null | undefined;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { ColDef, ColumnApi, GridApi, RowNode } from "ag-grid-community";
2
+ import { ColDef, ColumnApi, GridApi, IRowNode } from "ag-grid-community";
3
3
  import { CsvExportParams } from "ag-grid-community/dist/lib/interfaces/exportParams";
4
4
  import { ColDefT, GridBaseRow } from "../components";
5
- export type GridFilterExternal<RowType extends GridBaseRow> = (data: RowType, rowNode: RowNode) => boolean;
5
+ export type GridFilterExternal<RowType extends GridBaseRow> = (data: RowType, rowNode: IRowNode) => boolean;
6
6
  export interface AutoSizeColumnsProps {
7
7
  skipHeader?: boolean;
8
8
  colIds?: Set<string> | string[];
@@ -47,14 +47,14 @@ export interface GridContextType<RowType extends GridBaseRow> {
47
47
  selectedRows: GridBaseRow[];
48
48
  field?: string;
49
49
  }, fnUpdate: (selectedRows: any[]) => Promise<boolean>, setSaving?: (saving: boolean) => void, tabDirection?: 1 | 0 | -1) => Promise<boolean>;
50
- redrawRows: (rowNodes?: RowNode[]) => void;
50
+ redrawRows: (rowNodes?: IRowNode[]) => void;
51
51
  externallySelectedItemsAreInSync: boolean;
52
52
  setExternallySelectedItemsAreInSync: (inSync: boolean) => void;
53
53
  waitForExternallySelectedItemsToBeInSync: () => Promise<void>;
54
54
  addExternalFilter: (filter: GridFilterExternal<RowType>) => void;
55
55
  removeExternalFilter: (filter: GridFilterExternal<RowType>) => void;
56
56
  isExternalFilterPresent: () => boolean;
57
- doesExternalFilterPass: (node: RowNode) => boolean;
57
+ doesExternalFilterPass: (node: IRowNode) => boolean;
58
58
  invisibleColumnIds: string[] | undefined;
59
59
  setInvisibleColumnIds: (colIds: string[]) => void;
60
60
  downloadCsv: (csvExportParams?: CsvExportParams) => void;
@@ -1,19 +1,15 @@
1
1
  import { ProcessCellForExportParams } from "ag-grid-community/dist/lib/interfaces/exportParams";
2
- import { ReactElement, ReactNode } from "react";
2
+ import { PropsWithChildren, ReactElement } from "react";
3
3
  import { GridBaseRow } from "../components";
4
- interface GridContextProps {
5
- children: ReactNode;
6
- }
7
4
  /**
8
5
  * Context for AgGrid operations.
9
6
  * Make sure you wrap AgGrid in this.
10
7
  * Also, make sure the provider is created in a separate component, otherwise it won't be found.
11
8
  */
12
- export declare const GridContextProvider: <RowType extends GridBaseRow>(props: GridContextProps) => ReactElement;
9
+ export declare const GridContextProvider: <RowType extends GridBaseRow>(props: PropsWithChildren) => ReactElement;
13
10
  /**
14
11
  * Aggrid defaults to using getters and ignores formatters.
15
12
  * step-ag-grid by default has a valueFormatter for every column that defaults to the getter if no valueFormatter
16
13
  * This function uses valueFormatter by default
17
14
  */
18
15
  export declare const downloadCsvUseValueFormattersProcessCellCallback: (params: ProcessCellForExportParams) => string;
19
- export {};
@@ -1,8 +1,7 @@
1
1
  import { ICellEditorParams } from "ag-grid-community";
2
- import { ReactNode } from "react";
2
+ import { PropsWithChildren } from "react";
3
3
  interface GridPopoverContextProps {
4
4
  props: ICellEditorParams;
5
- children: ReactNode;
6
5
  }
7
- export declare const GridPopoverContextProvider: ({ props, children }: GridPopoverContextProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const GridPopoverContextProvider: ({ props, children }: PropsWithChildren<GridPopoverContextProps>) => import("react/jsx-runtime").JSX.Element;
8
7
  export {};