@linzjs/step-ag-grid 16.0.0 → 17.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.
- package/dist/GridTheme.scss +138 -106
- package/dist/index.css +1 -8
- package/dist/node_modules/@linzjs/lui/dist/assets/svg-content.d.ts +7 -0
- package/dist/src/components/ComponentLoadingWrapper.d.ts +3 -4
- package/dist/src/components/Grid.d.ts +2 -2
- package/dist/src/components/GridCell.d.ts +5 -5
- package/dist/src/components/GridCellMultiEditor.d.ts +2 -2
- package/dist/src/components/GridNoRowsOverlay.d.ts +3 -2
- package/dist/src/components/GridPopoverHook.d.ts +3 -3
- package/dist/src/components/GridWrapper.d.ts +2 -3
- package/dist/src/components/PostSortRowsHook.d.ts +1 -1
- package/dist/src/components/gridFilter/GridFilterButtons.d.ts +2 -2
- package/dist/src/components/gridFilter/GridFilterColumnsToggle.d.ts +2 -2
- package/dist/src/components/gridFilter/GridFilters.d.ts +2 -5
- package/dist/src/components/gridForm/GridFormDropDown.d.ts +2 -2
- package/dist/src/components/gridForm/GridFormMessage.d.ts +2 -2
- package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +2 -2
- package/dist/src/components/gridForm/GridFormPopoverMenu.d.ts +3 -3
- package/dist/src/components/gridForm/GridFormSubComponentTextArea.d.ts +2 -2
- package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +2 -2
- package/dist/src/components/gridForm/GridFormTextArea.d.ts +2 -2
- package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +2 -2
- package/dist/src/contexts/GridContext.d.ts +4 -4
- package/dist/src/contexts/GridContextProvider.d.ts +2 -6
- package/dist/src/contexts/GridPopoverContextProvider.d.ts +2 -3
- package/dist/src/contexts/GridUpdatingContextProvider.d.ts +2 -6
- package/dist/src/lui/ActionButton.d.ts +2 -2
- package/dist/src/lui/FormError.d.ts +2 -2
- package/dist/src/lui/TextAreaInput.d.ts +3 -3
- package/dist/src/lui/TextInputFormatted.d.ts +3 -3
- package/dist/src/react-menu3/components/FocusableItem.d.ts +2 -2
- package/dist/src/react-menu3/utils/withHovering.d.ts +2 -2
- package/dist/src/utils/textValidator.d.ts +3 -3
- package/dist/step-ag-grid.cjs.js +31 -15
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +31 -15
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +45 -45
- package/src/components/ComponentLoadingWrapper.tsx +9 -6
- package/src/components/Grid.tsx +19 -10
- package/src/components/GridCell.tsx +5 -5
- package/src/components/GridCellMultiEditor.tsx +2 -2
- package/src/components/GridNoRowsOverlay.tsx +4 -2
- package/src/components/GridPopoverHook.tsx +4 -4
- package/src/components/GridWrapper.tsx +2 -3
- package/src/components/PostSortRowsHook.ts +4 -4
- package/src/components/gridFilter/GridFilterButtons.tsx +2 -2
- package/src/components/gridFilter/GridFilterColumnsToggle.tsx +2 -2
- package/src/components/gridFilter/GridFilters.tsx +4 -6
- package/src/components/gridForm/GridFormDropDown.tsx +4 -4
- package/src/components/gridForm/GridFormMessage.tsx +3 -3
- package/src/components/gridForm/GridFormMultiSelect.tsx +2 -1
- package/src/components/gridForm/GridFormPopoverMenu.tsx +4 -4
- package/src/components/gridForm/GridFormSubComponentTextArea.tsx +2 -2
- package/src/components/gridForm/GridFormSubComponentTextInput.tsx +2 -2
- package/src/components/gridForm/GridFormTextArea.tsx +2 -2
- package/src/components/gridPopoverEdit/GridPopoverMessage.ts +1 -1
- package/src/components/gridRender/GridRenderGenericCell.tsx +2 -1
- package/src/contexts/GridContext.tsx +4 -4
- package/src/contexts/GridContextProvider.tsx +26 -20
- package/src/contexts/GridPopoverContextProvider.tsx +2 -3
- package/src/contexts/GridUpdatingContextProvider.tsx +2 -6
- package/src/lui/ActionButton.tsx +2 -2
- package/src/lui/FormError.tsx +3 -1
- package/src/lui/TextAreaInput.tsx +3 -3
- package/src/lui/TextInputFormatted.tsx +3 -3
- package/src/lui/reactUtils.test.tsx +3 -3
- package/src/react-menu3/components/FocusableItem.tsx +2 -2
- package/src/react-menu3/utils/utils.ts +1 -1
- package/src/react-menu3/utils/withHovering.tsx +2 -2
- package/src/stories/grid/FormTest.tsx +2 -2
- package/src/stories/grid/GridFilterButtons.stories.tsx +8 -1
- package/src/stories/grid/GridNoRowsOverlay.stories.tsx +8 -8
- package/src/stories/grid/GridNonEditableRow.stories.tsx +9 -2
- package/src/stories/grid/GridPopoutContextMenu.stories.tsx +8 -1
- package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +8 -1
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +8 -1
- package/src/stories/grid/GridPopoverEditBearing.stories.tsx +7 -0
- package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +7 -0
- package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +7 -0
- package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +8 -0
- package/src/stories/grid/GridReadOnly.stories.tsx +10 -2
- package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +2 -2
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +7 -2
- package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +7 -2
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +1 -1
- package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +2 -2
- package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +4 -3
- package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +3 -3
- package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +3 -3
- package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +1 -1
- package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +1 -1
- package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +1 -1
- package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +2 -2
- package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +1 -1
- package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +1 -1
- package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +4 -0
- package/src/styles/ComponentLoadingWrapper.scss +1 -4
- package/src/styles/Grid.scss +0 -4
- package/src/styles/GridTheme.scss +138 -106
- package/src/utils/testUtil.ts +3 -0
- package/src/utils/textValidator.ts +3 -1
package/dist/GridTheme.scss
CHANGED
|
@@ -1,106 +1,138 @@
|
|
|
1
|
-
@use "@linzjs/lui/dist/scss/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
}) =>
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
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
|
|
1
|
+
export interface GridNoRowsOverlayProps {
|
|
2
2
|
rowCount: number | undefined | null;
|
|
3
3
|
filteredRowCount: number;
|
|
4
4
|
noRowsOverlayText: string | undefined;
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
|
+
export declare const GridNoRowsOverlay: (params: GridNoRowsOverlayProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
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<
|
|
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:
|
|
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 {
|
|
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,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>) =>
|
|
16
|
+
export declare const GridFilterButtons: <RowType extends GridBaseRow>({ className, luiButtonProps, options, }: GridFilterButtonsProps<RowType>) => ReactElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
2
|
export interface GridFilterColumnsToggleProps {
|
|
3
3
|
saveState?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const GridFilterColumnsToggle: ({ saveState }: GridFilterColumnsToggleProps) =>
|
|
5
|
+
export declare const GridFilterColumnsToggle: ({ saveState }: GridFilterColumnsToggleProps) => ReactElement;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
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
|
-
|
|
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?:
|
|
11
|
+
label?: ReactElement | string;
|
|
12
12
|
disabled?: boolean | string;
|
|
13
13
|
subComponent?: (props: any, ref: any) => any;
|
|
14
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
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 |
|
|
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
|
-
|
|
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) =>
|
|
7
|
+
subComponent?: (props: any) => ReactElement;
|
|
8
8
|
subValue?: any;
|
|
9
9
|
filter?: string;
|
|
10
10
|
checked?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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:
|
|
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) =>
|
|
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
|
-
|
|
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>) =>
|
|
12
|
+
export declare const GridFormSubComponentTextArea: <RowType extends GridBaseRow>(props: GridSubComponentTextAreaProps<RowType>) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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>) =>
|
|
11
|
+
export declare const GridFormSubComponentTextInput: <RowType extends GridBaseRow>(props: GridFormSubComponentTextInputProps<RowType>) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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>) =>
|
|
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?:
|
|
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,
|
|
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:
|
|
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?:
|
|
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:
|
|
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 {
|
|
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:
|
|
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 {
|
|
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 {};
|