@linzjs/step-ag-grid 17.4.10 → 17.5.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.
@@ -10,18 +10,21 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
10
10
  themes: (
11
11
  'step-compact.theme-specific': (
12
12
  extend-theme: alpine,
13
- --ag-row-height: 36px,
14
- --ag-header-height: 36px,
15
- --ag-font-size: calc($grid-base-font-size - 2px),
13
+ row-height: 36px,
14
+ header-height: 36px,
15
+ font-size: calc($grid-base-font-size - 2px),
16
16
  ),
17
17
  'step-default.theme-specific': (
18
18
  extend-theme: alpine,
19
- --ag-row-height: 40px,
20
- --ag-header-height: 40px,
21
- --ag-font-size: calc($grid-base-font-size),
19
+ row-height: 40px,
20
+ header-height: 40px,
21
+ font-size: calc($grid-base-font-size),
22
22
  ),
23
23
  ),
24
24
 
25
+ input-focus-border-color: lui.$sea,
26
+ borders-input: 1px solid,
27
+ input-border-color: lui.$silver,
25
28
  alpine-active-color: lui.$sea,
26
29
  background-color: lui.$white,
27
30
  border-color: lui.$dew,
@@ -49,6 +52,10 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
49
52
 
50
53
  .ag-theme-step-default.theme-specific,
51
54
  .ag-theme-step-compact.theme-specific {
55
+ .ag-text-area-input:focus {
56
+ border-color: lui.$sea;
57
+ }
58
+
52
59
  .ag-cell[col-id="selection"] {
53
60
  display: flex; // Fix that when you click below checkbox it doesn't process a click
54
61
  }
@@ -64,8 +64,12 @@ export interface GridProps {
64
64
  * Whether to select row on context menu.
65
65
  */
66
66
  contextMenuSelectRow?: boolean;
67
+ /**
68
+ * Defaults to false.
69
+ */
70
+ singleClickEdit?: boolean;
67
71
  }
68
72
  /**
69
73
  * Wrapper for AgGrid to add commonly used functionality.
70
74
  */
71
- export declare const Grid: ({ "data-testid": dataTestId, rowSelection, suppressColumnVirtualization, theme, sizeColumns, selectColumnPinned, contextMenuSelectRow, rowHeight, ...params }: GridProps) => ReactElement;
75
+ export declare const Grid: ({ "data-testid": dataTestId, rowSelection, suppressColumnVirtualization, theme, sizeColumns, selectColumnPinned, contextMenuSelectRow, singleClickEdit, rowHeight, ...params }: GridProps) => ReactElement;
@@ -2344,7 +2344,7 @@ const useGridContextMenu = ({ contextMenuSelectRow, contextMenu: ContextMenu, })
2344
2344
  /**
2345
2345
  * Wrapper for AgGrid to add commonly used functionality.
2346
2346
  */
2347
- const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressColumnVirtualization = true, theme = "ag-theme-step-default", sizeColumns = "auto", selectColumnPinned = null, contextMenuSelectRow = false, rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : undefined, ...params }) => {
2347
+ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressColumnVirtualization = true, theme = "ag-theme-step-default", sizeColumns = "auto", selectColumnPinned = null, contextMenuSelectRow = false, singleClickEdit = false, rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : undefined, ...params }) => {
2348
2348
  const { gridReady, setApis, ensureRowVisible, getFirstRowId, selectRowsById, focusByRowById, ensureSelectedRowIsVisible, autoSizeColumns, sizeColumnsToFit, externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync, isExternalFilterPresent, doesExternalFilterPass, setOnCellEditingComplete, getColDef, } = React.useContext(GridContext);
2349
2349
  const { checkUpdating, updatedDep, updatingCols } = React.useContext(GridUpdatingContext);
2350
2350
  const { prePopupOps } = React.useContext(GridContext);
@@ -2648,10 +2648,10 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2648
2648
  * Handle single click edits
2649
2649
  */
2650
2650
  const onCellClicked = React.useCallback((event) => {
2651
- if (event.colDef?.cellRendererParams?.singleClickEdit) {
2651
+ if (event.colDef?.cellRendererParams?.singleClickEdit ?? singleClickEdit) {
2652
2652
  startCellEditing(event);
2653
2653
  }
2654
- }, [startCellEditing]);
2654
+ }, [singleClickEdit, startCellEditing]);
2655
2655
  /**
2656
2656
  * If cell has an edit action invoke it (if editable)
2657
2657
  */