@linzjs/step-ag-grid 17.0.1 → 17.0.3

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.
@@ -2512,8 +2512,8 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2512
2512
  {
2513
2513
  colId: "selection",
2514
2514
  editable: false,
2515
- minWidth: 42,
2516
- maxWidth: 42,
2515
+ minWidth: 48,
2516
+ maxWidth: 48,
2517
2517
  pinned: selectColumnPinned,
2518
2518
  headerComponentParams: {
2519
2519
  exportable: false,
@@ -4368,6 +4368,7 @@ const GridPopoverMenu = (colDef, custom) => GridCell({
4368
4368
  minWidth: 48,
4369
4369
  maxWidth: 48,
4370
4370
  width: 40,
4371
+ sortable: false,
4371
4372
  editable: colDef.editable != null ? colDef.editable : true,
4372
4373
  exportable: false,
4373
4374
  cellStyle: { flex: 1, justifyContent: "center" },
@@ -4593,7 +4594,7 @@ const GridContextProvider = (props) => {
4593
4594
  /**
4594
4595
  * Get ColDefs, with flattened ColGroupDefs
4595
4596
  */
4596
- const getColumns = useCallback((filterDef = () => true) => filter(columnApi?.getAllColumns()?.map((col) => col.getColDef()) ?? [], filterDef), [columnApi]);
4597
+ const getColumns = useCallback((filterDef = () => true) => filter(columnApi?.getColumns()?.map((col) => col.getColDef()) ?? [], filterDef), [columnApi]);
4597
4598
  const getColumnIds = useCallback((filterDef = () => true) => compact(getColumns(filterDef).map(getColId)), [getColumns]);
4598
4599
  /**
4599
4600
  * Internal method for selecting and flashing rows.
@@ -4865,15 +4866,16 @@ const GridContextProvider = (props) => {
4865
4866
  return ok;
4866
4867
  });
4867
4868
  }, [gridApiOp, modifyUpdating, selectNextEditableCell]);
4868
- const redrawRows = useCallback((rowNodes) => {
4869
- // redraw rows can throw exceptions in jest, so we ignore them
4869
+ const redrawRows = useMemo(() => debounce((rowNodes) => {
4870
4870
  try {
4871
4871
  gridApi && gridApi.redrawRows(rowNodes ? { rowNodes } : undefined);
4872
4872
  }
4873
4873
  catch (ex) {
4874
- console.error(ex);
4874
+ // Hide errors in jest, but log them in browser
4875
+ if (typeof jest === "undefined")
4876
+ console.error(ex);
4875
4877
  }
4876
- }, [gridApi]);
4878
+ }, 50), [gridApi]);
4877
4879
  // waitForExternallySelectedItemsToBeInSync can't use the state as it won't be updated during function execution
4878
4880
  const externallySelectedItemsAreInSyncRef = useRef(false);
4879
4881
  useEffect(() => {
@@ -25640,7 +25642,13 @@ const findActionButton = (text, container) => findQuick({ tagName: "button", chi
25640
25642
  const clickActionButton = async (text, container) => {
25641
25643
  const button = await findActionButton(text, container);
25642
25644
  await user.click(button);
25643
- };
25645
+ };
25646
+ const waitForGridReady = async ({ grid, timeout = 5000 }) => waitForWrapper(() => expect(getAllQuick({ classes: ".Grid-ready" }, grid)).toBeInTheDocument(), {
25647
+ timeout,
25648
+ });
25649
+ const waitForGridRows = async ({ grid, timeout = 5000 }) => waitForWrapper(async () => expect(getAllQuick({ classes: ".ag-row" }, grid).length > 0).toBe(true), {
25650
+ timeout,
25651
+ });
25644
25652
 
25645
- export { ActionButton, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, FormError, GenericCellEditorComponentWrapper, Grid, GridCell, GridCellFiller, GridCellFillerColId, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridFilterButtons, GridFilterColumnsToggle, GridFilterDownloadCsvButton, GridFilterHeaderIconButton, GridFilterQuick, GridFilters, GridFormDropDown, GridFormEditBearing, GridFormMessage, GridFormMultiSelect, GridFormMultiSelectGrid, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridNoRowsOverlay, GridPopoutEditMultiSelect, GridPopoutEditMultiSelectGrid, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditBearingCorrectionEditorParams, GridPopoverEditBearingEditorParams, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, GridWrapper, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionRangeValidator, bearingCorrectionValueFormatter, bearingNumberParser, bearingRangeValidator, bearingStringValidator, bearingValueFormatter, clickActionButton, clickMenuOption, clickMultiSelectOption, closeMenu, closePopover, convertDDToDMS, countRows, deselectRow, downloadCsvUseValueFormattersProcessCellCallback, editCell, findActionButton, findCell, findCellContains, findMenuOption, findMultiSelectOption, findOpenPopover, findParentWithClass, findRow, fnOrVar, generateFilterGetter, getMultiSelectOptions, hasParentClass, isCellReadOnly, isFloat, isGridCellFiller, isNotEmpty, openAndClickMenuOption, openAndFindMenuOption, queryMenuOption, queryRow, sanitiseFileName, selectCell, selectRow, setUpUserEvent, stringByteLengthIsInvalid, suppressCellKeyboardEvents, typeInputByLabel, typeInputByPlaceholder, typeOnlyInput, typeOtherInput, typeOtherTextArea, useDeferredPromise, useGenerateOrDefaultId, useGridContext, useGridContextMenu, useGridFilter, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, validateMenuOptions, wait$1 as wait };
25653
+ export { ActionButton, ComponentLoadingWrapper, ControlledMenu, Editor, FocusableItem, FormError, GenericCellEditorComponentWrapper, Grid, GridCell, GridCellFiller, GridCellFillerColId, GridCellMultiEditor, GridCellMultiSelectClassRules, GridCellRenderer, GridContext, GridContextProvider, GridFilterButtons, GridFilterColumnsToggle, GridFilterDownloadCsvButton, GridFilterHeaderIconButton, GridFilterQuick, GridFilters, GridFormDropDown, GridFormEditBearing, GridFormMessage, GridFormMultiSelect, GridFormMultiSelectGrid, GridFormPopoverMenu, GridFormSubComponentTextArea, GridFormSubComponentTextInput, GridFormTextArea, GridFormTextInput, GridHeaderSelect, GridIcon, GridLoadableCell, GridNoRowsOverlay, GridPopoutEditMultiSelect, GridPopoutEditMultiSelectGrid, GridPopoverContext, GridPopoverContextProvider, GridPopoverEditBearing, GridPopoverEditBearingCorrection, GridPopoverEditBearingCorrectionEditorParams, GridPopoverEditBearingEditorParams, GridPopoverEditDropDown, GridPopoverMenu, GridPopoverMessage, GridPopoverTextArea, GridPopoverTextInput, GridRenderPopoutMenuCell, GridSubComponentContext, GridUpdatingContext, GridUpdatingContextProvider, GridWrapper, Menu, MenuButton, MenuDivider, MenuGroup, MenuHeader, MenuHeaderItem, MenuHeaderString, MenuItem, MenuRadioGroup, MenuSeparator, MenuSeparatorString, PopoutMenuSeparator, SubMenu, TextAreaInput, TextInputFormatted, bearingCorrectionRangeValidator, bearingCorrectionValueFormatter, bearingNumberParser, bearingRangeValidator, bearingStringValidator, bearingValueFormatter, clickActionButton, clickMenuOption, clickMultiSelectOption, closeMenu, closePopover, convertDDToDMS, countRows, deselectRow, downloadCsvUseValueFormattersProcessCellCallback, editCell, findActionButton, findCell, findCellContains, findMenuOption, findMultiSelectOption, findOpenPopover, findParentWithClass, findRow, fnOrVar, generateFilterGetter, getMultiSelectOptions, hasParentClass, isCellReadOnly, isFloat, isGridCellFiller, isNotEmpty, openAndClickMenuOption, openAndFindMenuOption, queryMenuOption, queryRow, sanitiseFileName, selectCell, selectRow, setUpUserEvent, stringByteLengthIsInvalid, suppressCellKeyboardEvents, typeInputByLabel, typeInputByPlaceholder, typeOnlyInput, typeOtherInput, typeOtherTextArea, useDeferredPromise, useGenerateOrDefaultId, useGridContext, useGridContextMenu, useGridFilter, useGridPopoverContext, useGridPopoverHook, useMenuState, usePostSortRowsHook, validateMenuOptions, wait$1 as wait, waitForGridReady, waitForGridRows };
25646
25654
  //# sourceMappingURL=step-ag-grid.esm.js.map