@linzjs/step-ag-grid 32.4.2 → 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.
- package/dist/src/components/gridForm/GridFormTextArea.d.ts +1 -0
- package/dist/src/components/gridForm/GridFormTextInput.d.ts +1 -0
- package/dist/step-ag-grid.cjs +15 -3
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +16 -4
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/gridForm/GridFormTextArea.tsx +10 -1
- package/src/components/gridForm/GridFormTextInput.tsx +10 -1
- package/src/lui/FormError.scss +1 -0
- package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +67 -13
- package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +69 -15
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -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';
|
|
@@ -62704,7 +62704,7 @@ const GridSubComponentContext = createContext({
|
|
|
62704
62704
|
context: null
|
|
62705
62705
|
});
|
|
62706
62706
|
|
|
62707
|
-
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}";
|
|
62708
62708
|
styleInject(css_248z$2);
|
|
62709
62709
|
|
|
62710
62710
|
const FormError = (props) => {
|
|
@@ -64185,6 +64185,7 @@ const GridFormTextArea = (props) => {
|
|
|
64185
64185
|
const { field, value: initialVale, data } = useGridPopoverContext();
|
|
64186
64186
|
const initValue = useMemo(() => initialVale == null ? "" : `${initialVale}`, [initialVale]);
|
|
64187
64187
|
const [value, setValue] = useState(initValue);
|
|
64188
|
+
const { filterInputEvent } = useFilterCharacters();
|
|
64188
64189
|
const helpText = props.helpText ?? "Press tab to save";
|
|
64189
64190
|
const invalid = useCallback(() => TextInputValidator(props, value, data, {}), [props, value, data]);
|
|
64190
64191
|
const save = useCallback(
|
|
@@ -64210,7 +64211,12 @@ const GridFormTextArea = (props) => {
|
|
|
64210
64211
|
TextAreaInput,
|
|
64211
64212
|
{
|
|
64212
64213
|
value,
|
|
64213
|
-
onChange: (e) =>
|
|
64214
|
+
onChange: (e) => {
|
|
64215
|
+
if (!props.disableUnicodeCharacterFilter) {
|
|
64216
|
+
filterInputEvent(e);
|
|
64217
|
+
}
|
|
64218
|
+
setValue(e.target.value);
|
|
64219
|
+
},
|
|
64214
64220
|
error: invalid(),
|
|
64215
64221
|
placeholder: props.placeholder ?? "Type here",
|
|
64216
64222
|
helpText
|
|
@@ -64224,6 +64230,7 @@ const GridFormTextInput = (props) => {
|
|
|
64224
64230
|
const helpText = props.helpText ?? "Press enter or tab to save";
|
|
64225
64231
|
const initValue = useMemo(() => initialVale == null ? "" : `${initialVale}`, [initialVale]);
|
|
64226
64232
|
const [value, setValue] = useState(initValue);
|
|
64233
|
+
const { filterInputEvent } = useFilterCharacters();
|
|
64227
64234
|
const invalid = useCallback(() => TextInputValidator(props, value, data, {}), [data, props, value]);
|
|
64228
64235
|
const save = useCallback(
|
|
64229
64236
|
async (selectedRows) => {
|
|
@@ -64252,7 +64259,12 @@ const GridFormTextInput = (props) => {
|
|
|
64252
64259
|
TextInputFormatted,
|
|
64253
64260
|
{
|
|
64254
64261
|
value,
|
|
64255
|
-
onChange: (e) =>
|
|
64262
|
+
onChange: (e) => {
|
|
64263
|
+
if (!props.disableUnicodeCharacterFilter) {
|
|
64264
|
+
filterInputEvent(e);
|
|
64265
|
+
}
|
|
64266
|
+
setValue(e.target.value);
|
|
64267
|
+
},
|
|
64256
64268
|
error: invalid(),
|
|
64257
64269
|
formatted: props.units,
|
|
64258
64270
|
style: { width: props.width ?? 240 },
|