@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
|
@@ -10,5 +10,6 @@ export interface GridFormTextAreaProps<TData extends GridBaseRow> extends TextIn
|
|
|
10
10
|
value: string;
|
|
11
11
|
}) => Promise<boolean>;
|
|
12
12
|
helpText?: string;
|
|
13
|
+
disableUnicodeCharacterFilter?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export declare const GridFormTextArea: <TData extends GridBaseRow>(props: GridFormTextAreaProps<TData>) => ReactElement;
|
|
@@ -10,5 +10,6 @@ export interface GridFormTextInputProps<TData extends GridBaseRow> extends TextI
|
|
|
10
10
|
value: string;
|
|
11
11
|
}) => Promise<boolean>;
|
|
12
12
|
helpText?: string;
|
|
13
|
+
disableUnicodeCharacterFilter?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export declare const GridFormTextInput: <TData extends GridBaseRow>(props: GridFormTextInputProps<TData>) => import("react").JSX.Element;
|
package/dist/step-ag-grid.cjs
CHANGED
|
@@ -62706,7 +62706,7 @@ const GridSubComponentContext = React13.createContext({
|
|
|
62706
62706
|
context: null
|
|
62707
62707
|
});
|
|
62708
62708
|
|
|
62709
|
-
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}";
|
|
62709
|
+
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}";
|
|
62710
62710
|
styleInject(css_248z$2);
|
|
62711
62711
|
|
|
62712
62712
|
const FormError = (props) => {
|
|
@@ -64187,6 +64187,7 @@ const GridFormTextArea = (props) => {
|
|
|
64187
64187
|
const { field, value: initialVale, data } = useGridPopoverContext();
|
|
64188
64188
|
const initValue = React13.useMemo(() => initialVale == null ? "" : `${initialVale}`, [initialVale]);
|
|
64189
64189
|
const [value, setValue] = React13.useState(initValue);
|
|
64190
|
+
const { filterInputEvent } = lui.useFilterCharacters();
|
|
64190
64191
|
const helpText = props.helpText ?? "Press tab to save";
|
|
64191
64192
|
const invalid = React13.useCallback(() => TextInputValidator(props, value, data, {}), [props, value, data]);
|
|
64192
64193
|
const save = React13.useCallback(
|
|
@@ -64212,7 +64213,12 @@ const GridFormTextArea = (props) => {
|
|
|
64212
64213
|
TextAreaInput,
|
|
64213
64214
|
{
|
|
64214
64215
|
value,
|
|
64215
|
-
onChange: (e) =>
|
|
64216
|
+
onChange: (e) => {
|
|
64217
|
+
if (!props.disableUnicodeCharacterFilter) {
|
|
64218
|
+
filterInputEvent(e);
|
|
64219
|
+
}
|
|
64220
|
+
setValue(e.target.value);
|
|
64221
|
+
},
|
|
64216
64222
|
error: invalid(),
|
|
64217
64223
|
placeholder: props.placeholder ?? "Type here",
|
|
64218
64224
|
helpText
|
|
@@ -64226,6 +64232,7 @@ const GridFormTextInput = (props) => {
|
|
|
64226
64232
|
const helpText = props.helpText ?? "Press enter or tab to save";
|
|
64227
64233
|
const initValue = React13.useMemo(() => initialVale == null ? "" : `${initialVale}`, [initialVale]);
|
|
64228
64234
|
const [value, setValue] = React13.useState(initValue);
|
|
64235
|
+
const { filterInputEvent } = lui.useFilterCharacters();
|
|
64229
64236
|
const invalid = React13.useCallback(() => TextInputValidator(props, value, data, {}), [data, props, value]);
|
|
64230
64237
|
const save = React13.useCallback(
|
|
64231
64238
|
async (selectedRows) => {
|
|
@@ -64254,7 +64261,12 @@ const GridFormTextInput = (props) => {
|
|
|
64254
64261
|
TextInputFormatted,
|
|
64255
64262
|
{
|
|
64256
64263
|
value,
|
|
64257
|
-
onChange: (e) =>
|
|
64264
|
+
onChange: (e) => {
|
|
64265
|
+
if (!props.disableUnicodeCharacterFilter) {
|
|
64266
|
+
filterInputEvent(e);
|
|
64267
|
+
}
|
|
64268
|
+
setValue(e.target.value);
|
|
64269
|
+
},
|
|
64258
64270
|
error: invalid(),
|
|
64259
64271
|
formatted: props.units,
|
|
64260
64272
|
style: { width: props.width ?? 240 },
|