@linzjs/step-ag-grid 17.4.9 → 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.
@@ -2323,7 +2323,7 @@ const useGridContextMenu = ({ contextMenuSelectRow, contextMenu: ContextMenu, })
2323
2323
  /**
2324
2324
  * Wrapper for AgGrid to add commonly used functionality.
2325
2325
  */
2326
- 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 }) => {
2326
+ 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 }) => {
2327
2327
  const { gridReady, setApis, ensureRowVisible, getFirstRowId, selectRowsById, focusByRowById, ensureSelectedRowIsVisible, autoSizeColumns, sizeColumnsToFit, externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync, isExternalFilterPresent, doesExternalFilterPass, setOnCellEditingComplete, getColDef, } = useContext(GridContext);
2328
2328
  const { checkUpdating, updatedDep, updatingCols } = useContext(GridUpdatingContext);
2329
2329
  const { prePopupOps } = useContext(GridContext);
@@ -2627,10 +2627,10 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2627
2627
  * Handle single click edits
2628
2628
  */
2629
2629
  const onCellClicked = useCallback((event) => {
2630
- if (event.colDef?.cellRendererParams?.singleClickEdit) {
2630
+ if (event.colDef?.cellRendererParams?.singleClickEdit ?? singleClickEdit) {
2631
2631
  startCellEditing(event);
2632
2632
  }
2633
- }, [startCellEditing]);
2633
+ }, [singleClickEdit, startCellEditing]);
2634
2634
  /**
2635
2635
  * If cell has an edit action invoke it (if editable)
2636
2636
  */
@@ -3247,11 +3247,11 @@ function styleInject(css, ref) {
3247
3247
  }
3248
3248
  }
3249
3249
 
3250
- var css_248z$2 = ".helpText{color:#6b6966;font-size:.75rem;font-weight:400}";
3250
+ var css_248z$2 = ".FormError-helpText{color:#6b6966;font-size:.75rem;font-weight:400}";
3251
3251
  styleInject(css_248z$2);
3252
3252
 
3253
3253
  const FormError = (props) => {
3254
- return (jsxs(Fragment$1, { children: [props.error && (jsx("span", { className: "LuiTextInput-error", style: { paddingLeft: 0 }, children: props.error })), props.helpText && !props.error && jsx("span", { className: "helpText", children: props.helpText })] }));
3254
+ return (jsxs(Fragment$1, { children: [props.error && (jsx("span", { className: "LuiTextInput-error", style: { paddingLeft: 0 }, children: props.error })), props.helpText && !props.error && jsx("span", { className: "FormError-helpText", children: props.helpText })] }));
3255
3255
  };
3256
3256
 
3257
3257
  function escapeStringRegexp(string) {
@@ -3627,11 +3627,11 @@ const GridFormDropDown = (props) => {
3627
3627
  })] }) })] }));
3628
3628
  };
3629
3629
 
3630
- var css_248z$1 = ".LuiTextInput{margin-bottom:0}.LuiTextInput-formatted{color:#beb9b4;line-height:48px;position:absolute;right:14px;top:0}";
3630
+ var css_248z$1 = ".LuiTextInput.GridLuiTextInput{margin-bottom:0}.LuiTextInput-formatted{color:#beb9b4;line-height:48px;position:absolute;right:14px;top:0}";
3631
3631
  styleInject(css_248z$1);
3632
3632
 
3633
3633
  const TextInputFormatted = (props) => {
3634
- return (jsxs("div", { className: clsx("LuiTextInput Grid-popoverContainer", props.error && "hasError", props.className), children: [jsxs("span", { className: "LuiTextInput-inputWrapper", children: [jsx("input", { type: "text", spellCheck: true, defaultValue: props.value, ...omit(props, ["error", "value", "helpText", "formatted", "className", "allowTabToSave"]), className: "LuiTextInput-input", onMouseEnter: (e) => {
3634
+ return (jsxs("div", { className: clsx("LuiTextInput GridLuiTextInput Grid-popoverContainer", props.error && "hasError", props.className), children: [jsxs("span", { className: "LuiTextInput-inputWrapper", children: [jsx("input", { type: "text", spellCheck: true, defaultValue: props.value, ...omit(props, ["error", "value", "helpText", "formatted", "className", "allowTabToSave"]), className: "LuiTextInput-input", onMouseEnter: (e) => {
3635
3635
  e.currentTarget.focus();
3636
3636
  props.onMouseEnter && props.onMouseEnter(e);
3637
3637
  }, "data-allowtabtosave": props.allowTabToSave }), jsx("span", { className: "LuiTextInput-formatted", children: props.formatted })] }), jsx(FormError, { error: props.error, helpText: props.helpText })] }));