@linzjs/step-ag-grid 2.4.10 → 2.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/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +2 -2
- package/dist/src/lui/TextInputFormatted.d.ts +3 -1
- package/dist/step-ag-grid.esm.js +7 -3
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/gridForm/GridFormDropDown.tsx +3 -1
- package/src/components/gridForm/GridFormSubComponentTextInput.tsx +5 -3
- package/src/lui/TextInputFormatted.tsx +11 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { KeyboardEvent } from "react";
|
|
2
2
|
import "../../styles/GridFormSubComponentTextInput.scss";
|
|
3
3
|
export interface GridFormSubComponentTextInput {
|
|
4
4
|
setValue: (value: string) => void;
|
|
5
|
-
keyDown: (key: string) => void;
|
|
5
|
+
keyDown: (key: string, event: KeyboardEvent<HTMLInputElement>) => void;
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
className?: string;
|
|
8
8
|
customHelpText?: string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import "./TextInputFormatted.scss";
|
|
2
|
-
import { ChangeEventHandler, DetailedHTMLProps, InputHTMLAttributes } from "react";
|
|
2
|
+
import { ChangeEventHandler, DetailedHTMLProps, FocusEventHandler, InputHTMLAttributes, MouseEventHandler } from "react";
|
|
3
3
|
export interface LuiTextInputProps {
|
|
4
4
|
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
5
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
6
|
+
onClick?: MouseEventHandler<HTMLInputElement>;
|
|
5
7
|
inputProps?: DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
6
8
|
error?: string | boolean | null;
|
|
7
9
|
warning?: string | boolean | null;
|
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -3087,12 +3087,14 @@ var GridFormDropDown = function (_props) {
|
|
|
3087
3087
|
}
|
|
3088
3088
|
setSubComponentValues(localSubComponentValues);
|
|
3089
3089
|
},
|
|
3090
|
-
keyDown: function (key) {
|
|
3090
|
+
keyDown: function (key, event) {
|
|
3091
3091
|
var subComponentItem = subComponentValues.find(function (_a) {
|
|
3092
3092
|
var optionValue = _a.optionValue;
|
|
3093
3093
|
return optionValue === item.value;
|
|
3094
3094
|
});
|
|
3095
3095
|
if ((key === "Enter" || key === "Tab") && subComponentItem) {
|
|
3096
|
+
event.preventDefault();
|
|
3097
|
+
event.stopPropagation();
|
|
3096
3098
|
return selectItemHandler(item.value, subComponentItem.subComponentValue).then(function () {
|
|
3097
3099
|
ref.closeMenu();
|
|
3098
3100
|
return true;
|
|
@@ -3438,7 +3440,7 @@ var css_248z$2 = ".LuiTextInput{margin-bottom:0}.LuiTextInput-formatted{color:#b
|
|
|
3438
3440
|
styleInject(css_248z$2);
|
|
3439
3441
|
|
|
3440
3442
|
var TextInputFormatted = function (props) {
|
|
3441
|
-
return (jsxs("div", __assign({ className: clsx("LuiTextInput Grid-popoverContainer", props.error && "hasError", props.warning && "hasWarning", props.className) }, { children: [jsxs("span", __assign({ className: "LuiTextInput-inputWrapper" }, { children: [jsx("input", __assign({ type: "text", className: "LuiTextInput-input", min: "0", spellCheck: true, defaultValue: props.value, onChange: props.onChange }, props.inputProps)), jsx("span", __assign({ className: "LuiTextInput-formatted" }, { children: props.formatted }))] })), props.error && (jsxs("span", __assign({ className: "LuiTextInput-error" }, { children: [jsx(LuiIcon, { alt: "error", name: "ic_error", className: "LuiTextInput-error-icon", size: "sm", status: "error" }), props.error] }))), props.warning && (jsxs("span", __assign({ className: "LuiTextInput-warning" }, { children: [jsx(LuiIcon, { alt: "warning", name: "ic_warning", className: "LuiTextInput-warning-icon", size: "sm", status: "warning" }), props.warning] })))] })));
|
|
3443
|
+
return (jsxs("div", __assign({ className: clsx("LuiTextInput Grid-popoverContainer", props.error && "hasError", props.warning && "hasWarning", props.className) }, { children: [jsxs("span", __assign({ className: "LuiTextInput-inputWrapper" }, { children: [jsx("input", __assign({ type: "text", className: "LuiTextInput-input", min: "0", spellCheck: true, defaultValue: props.value, onChange: props.onChange, onFocus: props.onFocus, onClick: props.onClick }, props.inputProps)), jsx("span", __assign({ className: "LuiTextInput-formatted" }, { children: props.formatted }))] })), props.error && (jsxs("span", __assign({ className: "LuiTextInput-error" }, { children: [jsx(LuiIcon, { alt: "error", name: "ic_error", className: "LuiTextInput-error-icon", size: "sm", status: "error" }), props.error] }))), props.warning && (jsxs("span", __assign({ className: "LuiTextInput-warning" }, { children: [jsx(LuiIcon, { alt: "warning", name: "ic_warning", className: "LuiTextInput-warning-icon", size: "sm", status: "warning" }), props.warning] })))] })));
|
|
3442
3444
|
};
|
|
3443
3445
|
|
|
3444
3446
|
var GridFormEditBearing = function (_props) {
|
|
@@ -3751,7 +3753,9 @@ var GridFormSubComponentTextInput = function (_a) {
|
|
|
3751
3753
|
setValue(value);
|
|
3752
3754
|
setInputValue(value);
|
|
3753
3755
|
}, inputProps: {
|
|
3754
|
-
onKeyDown: function (
|
|
3756
|
+
onKeyDown: function (e) {
|
|
3757
|
+
return keyDown(e.key, e);
|
|
3758
|
+
},
|
|
3755
3759
|
placeholder: placeholderText,
|
|
3756
3760
|
onMouseEnter: function (e) {
|
|
3757
3761
|
if (document.activeElement != e.currentTarget) {
|