@linzjs/step-ag-grid 32.4.1 → 32.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.
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { LuiMiniSpinner, LuiIcon, useShowLUIMessage, LuiStatusSpinner, LuiButtonGroup, LuiButton, LuiCheckboxInput } from '@linzjs/lui';
2
+ import { LuiMiniSpinner, LuiIcon, useShowLUIMessage, LuiStatusSpinner, LuiButtonGroup, LuiButton, LuiCheckboxInput, useFilterCharacters } from '@linzjs/lui';
3
3
  import React13, { forwardRef, useContext, useRef, useState, useImperativeHandle, useLayoutEffect, useCallback, useMemo, createContext, memo, useEffect, createElement, Suspense, Component as Component$1, useReducer, cloneElement, Fragment as Fragment$1, useId } from 'react';
4
4
  import ReactDOM, { createPortal, unstable_batchedUpdates, flushSync } from 'react-dom';
5
5
  import { negate, isEmpty, findIndex, defer, debounce as debounce$1, compact, xorBy, last, difference, omit, delay, sortBy, partition, pick, groupBy, fromPairs, toPairs, isEqual, pull, filter, sumBy, remove, flatten, castArray } from 'lodash-es';
@@ -61329,7 +61329,9 @@ const Grid = ({
61329
61329
  ...colDef.cellClassRules,
61330
61330
  "GridCell-readonly": (ccp) => !suppressReadOnlyStyle && !editable(ccp)
61331
61331
  },
61332
- width: colDef.minWidth || 120
61332
+ // If chromatic we fix the size to minWidth if set otherwise 120px
61333
+ // else whatever user has configured which will probably be undefined
61334
+ width: isChromatic() ? colDef.minWidth || 120 : colDef.width
61333
61335
  };
61334
61336
  }
61335
61337
  },
@@ -62702,7 +62704,7 @@ const GridSubComponentContext = createContext({
62702
62704
  context: null
62703
62705
  });
62704
62706
 
62705
- var css_248z$2 = ".FormError{display:flex}.FormError-helpText{color:#6b6966;font-size:.75rem;font-weight:400}.FormError-text-icon{margin-right:4px;margin-top:4px}.FormError-error{align-items:center;color:#2a292c;font-size:14px;font-weight:600;padding-left:0}";
62707
+ var css_248z$2 = ".FormError{display:flex;line-height:24px}.FormError-helpText{color:#6b6966;font-size:.75rem;font-weight:400}.FormError-text-icon{margin-right:4px;margin-top:4px}.FormError-error{align-items:center;color:#2a292c;font-size:14px;font-weight:600;padding-left:0}";
62706
62708
  styleInject(css_248z$2);
62707
62709
 
62708
62710
  const FormError = (props) => {
@@ -64183,6 +64185,7 @@ const GridFormTextArea = (props) => {
64183
64185
  const { field, value: initialVale, data } = useGridPopoverContext();
64184
64186
  const initValue = useMemo(() => initialVale == null ? "" : `${initialVale}`, [initialVale]);
64185
64187
  const [value, setValue] = useState(initValue);
64188
+ const { filterInputEvent } = useFilterCharacters();
64186
64189
  const helpText = props.helpText ?? "Press tab to save";
64187
64190
  const invalid = useCallback(() => TextInputValidator(props, value, data, {}), [props, value, data]);
64188
64191
  const save = useCallback(
@@ -64208,7 +64211,12 @@ const GridFormTextArea = (props) => {
64208
64211
  TextAreaInput,
64209
64212
  {
64210
64213
  value,
64211
- onChange: (e) => setValue(e.target.value),
64214
+ onChange: (e) => {
64215
+ if (!props.disableUnicodeCharacterFilter) {
64216
+ filterInputEvent(e);
64217
+ }
64218
+ setValue(e.target.value);
64219
+ },
64212
64220
  error: invalid(),
64213
64221
  placeholder: props.placeholder ?? "Type here",
64214
64222
  helpText
@@ -64222,6 +64230,7 @@ const GridFormTextInput = (props) => {
64222
64230
  const helpText = props.helpText ?? "Press enter or tab to save";
64223
64231
  const initValue = useMemo(() => initialVale == null ? "" : `${initialVale}`, [initialVale]);
64224
64232
  const [value, setValue] = useState(initValue);
64233
+ const { filterInputEvent } = useFilterCharacters();
64225
64234
  const invalid = useCallback(() => TextInputValidator(props, value, data, {}), [data, props, value]);
64226
64235
  const save = useCallback(
64227
64236
  async (selectedRows) => {
@@ -64250,7 +64259,12 @@ const GridFormTextInput = (props) => {
64250
64259
  TextInputFormatted,
64251
64260
  {
64252
64261
  value,
64253
- onChange: (e) => setValue(e.target.value),
64262
+ onChange: (e) => {
64263
+ if (!props.disableUnicodeCharacterFilter) {
64264
+ filterInputEvent(e);
64265
+ }
64266
+ setValue(e.target.value);
64267
+ },
64254
64268
  error: invalid(),
64255
64269
  formatted: props.units,
64256
64270
  style: { width: props.width ?? 240 },