@linzjs/step-ag-grid 2.4.7 → 2.4.8
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 +51 -37
- package/dist/index.js.map +1 -1
- package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +3 -1
- package/dist/step-ag-grid.esm.js +51 -37
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/gridForm/GridFormDropDown.tsx +16 -10
- package/src/components/gridForm/GridFormSubComponentTextInput.tsx +20 -3
- package/src/styles/GridFormSubComponentTextInput.scss +4 -0
package/dist/index.js
CHANGED
|
@@ -2587,11 +2587,11 @@ function styleInject(css, ref) {
|
|
|
2587
2587
|
}
|
|
2588
2588
|
}
|
|
2589
2589
|
|
|
2590
|
-
var css_248z$
|
|
2591
|
-
styleInject(css_248z$
|
|
2590
|
+
var css_248z$8 = ".AgGridGenericCellRenderer-icon{margin-right:4px}.AgGridGenericCellRenderer-ic_infoIcon{fill:#3a7cdf;margin-right:4px}.AgGridGenericCellRenderer-ic_warningIcon{fill:#ea6a2e;margin-right:4px}";
|
|
2591
|
+
styleInject(css_248z$8);
|
|
2592
2592
|
|
|
2593
|
-
var css_248z$
|
|
2594
|
-
styleInject(css_248z$
|
|
2593
|
+
var css_248z$7 = ".GridLoadableCell-container{align-items:center;display:flex}";
|
|
2594
|
+
styleInject(css_248z$7);
|
|
2595
2595
|
|
|
2596
2596
|
var GridLoadableCell = function (props) {
|
|
2597
2597
|
if (props.isLoading) {
|
|
@@ -2815,11 +2815,11 @@ var GridRenderPopoutMenuCell = function (props) {
|
|
|
2815
2815
|
return (jsxRuntime.jsx(GridLoadableCell, __assign({ isLoading: isLoading, className: disabled ? "GridPopoutMenu-burgerDisabled" : "GridPopoutMenu-burger" }, { children: jsxRuntime.jsx(lui.LuiIcon, { name: "ic_more_vert", alt: "More actions", size: "md" }) })));
|
|
2816
2816
|
};
|
|
2817
2817
|
|
|
2818
|
-
var css_248z$
|
|
2819
|
-
styleInject(css_248z$
|
|
2818
|
+
var css_248z$6 = ".GridMultiSelect-containerSmall .GridFormMultiSelect-options{max-height:130px;overflow-y:auto}.GridMultiSelect-containerMedium .GridFormMultiSelect-options{max-height:190px;overflow-y:auto}.GridMultiSelect-containerLarge .GridFormMultiSelect-options{max-height:320px;overflow-y:auto}.GridMultiSelect-containerUnlimited .GridFormMultiSelect-options{overflow-y:auto}";
|
|
2819
|
+
styleInject(css_248z$6);
|
|
2820
2820
|
|
|
2821
|
-
var css_248z$
|
|
2822
|
-
styleInject(css_248z$
|
|
2821
|
+
var css_248z$5 = ".GridPopoverEditDropDown-containerSmall .GridFormDropDown-options{max-height:120px;overflow-y:auto}.GridPopoverEditDropDown-containerMedium .GridFormDropDown-options{max-height:200px;overflow-y:auto}.GridPopoverEditDropDown-containerLarge .GridFormDropDown-options{max-height:400px;overflow-y:auto}.GridPopoverEditDropDown-containerUnlimited .GridFormDropDown-options{overflow-y:auto}";
|
|
2822
|
+
styleInject(css_248z$5);
|
|
2823
2823
|
|
|
2824
2824
|
/* global setTimeout, clearTimeout */
|
|
2825
2825
|
|
|
@@ -2978,7 +2978,11 @@ var GridFormDropDown = function (_props) {
|
|
|
2978
2978
|
case 2:
|
|
2979
2979
|
optionsList = optionsConf === null || optionsConf === void 0 ? void 0 : optionsConf.map(function (item) {
|
|
2980
2980
|
if (item == null || typeof item == "string" || typeof item == "number") {
|
|
2981
|
-
item = {
|
|
2981
|
+
item = {
|
|
2982
|
+
value: item,
|
|
2983
|
+
label: item,
|
|
2984
|
+
disabled: false
|
|
2985
|
+
};
|
|
2982
2986
|
}
|
|
2983
2987
|
return item;
|
|
2984
2988
|
});
|
|
@@ -3060,9 +3064,9 @@ var GridFormDropDown = function (_props) {
|
|
|
3060
3064
|
var _b;
|
|
3061
3065
|
var ref = _a.ref;
|
|
3062
3066
|
return (jsxRuntime.jsx("div", __assign({ style: { display: "flex", width: "100%" } }, { children: jsxRuntime.jsx("input", { autoFocus: true, className: "free-text-input", style: { border: "0px" }, ref: ref, type: "text", placeholder: (_b = props.filterPlaceholder) !== null && _b !== void 0 ? _b : "Placeholder", "data-testid": "filteredMenu-free-text-input", defaultValue: filter, onChange: function (e) { return setFilter(e.target.value.toLowerCase()); }, onKeyDown: function (e) { return onFilterKeyDown(e); } }) })));
|
|
3063
|
-
} })), jsxRuntime.jsx(MenuDivider, {}, "$$divider_filter")] }))), jsxRuntime.jsx(ComponentLoadingWrapper, __assign({ loading: !options, className: "GridFormDropDown-options" }, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [options && options.length == (filteredValues === null || filteredValues === void 0 ? void 0 : filteredValues.length) && jsxRuntime.jsx(MenuItem, { children: "[Empty]" }), options === null || options === void 0 ? void 0 : options.map(function (item, index) {
|
|
3067
|
+
} })), jsxRuntime.jsx(MenuDivider, {}, "$$divider_filter")] }))), jsxRuntime.jsx(ComponentLoadingWrapper, __assign({ loading: !options, className: "GridFormDropDown-options" }, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [options && options.length == (filteredValues === null || filteredValues === void 0 ? void 0 : filteredValues.length) && (jsxRuntime.jsx(MenuItem, { children: "[Empty]" }, "".concat(props.field, "-empty"))), options === null || options === void 0 ? void 0 : options.map(function (item, index) {
|
|
3064
3068
|
var _a;
|
|
3065
|
-
return item.value === MenuSeparatorString ? (jsxRuntime.jsx(MenuDivider, {}, "$$divider_".concat(index))) : item.value === MenuHeaderString ? (jsxRuntime.jsx(MenuHeader, { children: item.label })) : filteredValues.includes(item.value) ? null : (jsxRuntime.jsx(
|
|
3069
|
+
return item.value === MenuSeparatorString ? (jsxRuntime.jsx(MenuDivider, {}, "$$divider_".concat(index))) : item.value === MenuHeaderString ? (jsxRuntime.jsx(MenuHeader, { children: item.label }, "$$header_".concat(index))) : filteredValues.includes(item.value) ? null : (jsxRuntime.jsx("div", { children: !item.subComponent ? (jsxRuntime.jsx(MenuItem, __assign({ disabled: !!item.disabled, title: item.disabled && typeof item.disabled !== "boolean" ? item.disabled : "", value: item.value, onClick: function () {
|
|
3066
3070
|
selectItemHandler(item.value);
|
|
3067
3071
|
} }, { children: (_a = item.label) !== null && _a !== void 0 ? _a : (item.value == null ? "<".concat(item.value, ">") : "".concat(item.value)) }), "".concat(props.field, "-").concat(index))) : (jsxRuntime.jsx(FocusableItem, __assign({ className: "LuiDeprecatedForms" }, { children: function (ref) {
|
|
3068
3072
|
return item.subComponent &&
|
|
@@ -3089,13 +3093,14 @@ var GridFormDropDown = function (_props) {
|
|
|
3089
3093
|
var optionValue = _a.optionValue;
|
|
3090
3094
|
return optionValue === item.value;
|
|
3091
3095
|
});
|
|
3092
|
-
if (key === "Enter" && subComponentItem) {
|
|
3096
|
+
if ((key === "Enter" || key === "Tab") && subComponentItem) {
|
|
3093
3097
|
selectItemHandler(item.value, subComponentItem.subComponentValue);
|
|
3094
3098
|
ref.closeMenu();
|
|
3095
3099
|
}
|
|
3096
|
-
}
|
|
3100
|
+
},
|
|
3101
|
+
key: "".concat(props.field, "-").concat(index, "_subcomponent_inner")
|
|
3097
3102
|
}, ref);
|
|
3098
|
-
} }), "".concat(props.field, "-").concat(index, "_subcomponent"))) }));
|
|
3103
|
+
} }), "".concat(props.field, "-").concat(index, "_subcomponent"))) }, "menu-wrapper-".concat(index)));
|
|
3099
3104
|
})] }) }))] }));
|
|
3100
3105
|
};
|
|
3101
3106
|
|
|
@@ -3261,8 +3266,8 @@ var GridPopoutEditMultiSelect = function (colDef, props) {
|
|
|
3261
3266
|
return GridCell(colDef, __assign(__assign({ editor: GridFormMultiSelect }, props), { editorParams: __assign({ className: "GridMultiSelect-containerMedium" }, props.editorParams) }));
|
|
3262
3267
|
};
|
|
3263
3268
|
|
|
3264
|
-
var css_248z$
|
|
3265
|
-
styleInject(css_248z$
|
|
3269
|
+
var css_248z$4 = ".GridPopoutMenu-burger{cursor:pointer}.GridPopoutMenu-burger svg{fill:#007198}.GridPopoutMenu-burgerDisabled svg{fill:#989189}";
|
|
3270
|
+
styleInject(css_248z$4);
|
|
3266
3271
|
|
|
3267
3272
|
/** Menu configuration types **/
|
|
3268
3273
|
var PopoutMenuSeparator = Object.freeze({ __isMenuSeparator__: true });
|
|
@@ -3424,11 +3429,11 @@ var convertDDToDMS = function (dd, showPositiveSymbol, addTrailingZeros) {
|
|
|
3424
3429
|
return dmsString;
|
|
3425
3430
|
};
|
|
3426
3431
|
|
|
3427
|
-
var css_248z$
|
|
3428
|
-
styleInject(css_248z$
|
|
3432
|
+
var css_248z$3 = ".GridFormEditBearing-input{width:320px}";
|
|
3433
|
+
styleInject(css_248z$3);
|
|
3429
3434
|
|
|
3430
|
-
var css_248z$
|
|
3431
|
-
styleInject(css_248z$
|
|
3435
|
+
var css_248z$2 = ".LuiTextInput{margin-bottom:0}.LuiTextInput-formatted{color:#beb9b4;line-height:48px;position:absolute;right:14px;top:0}";
|
|
3436
|
+
styleInject(css_248z$2);
|
|
3432
3437
|
|
|
3433
3438
|
var TextInputFormatted = function (props) {
|
|
3434
3439
|
return (jsxRuntime.jsxs("div", __assign({ className: clsx("LuiTextInput Grid-popoverContainer", props.error && "hasError", props.warning && "hasWarning", props.className) }, { children: [jsxRuntime.jsxs("span", __assign({ className: "LuiTextInput-inputWrapper" }, { children: [jsxRuntime.jsx("input", __assign({ type: "text", className: "LuiTextInput-input", min: "0", spellCheck: true, defaultValue: props.value, onChange: props.onChange }, props.inputProps)), jsxRuntime.jsx("span", __assign({ className: "LuiTextInput-formatted" }, { children: props.formatted }))] })), props.error && (jsxRuntime.jsxs("span", __assign({ className: "LuiTextInput-error" }, { children: [jsxRuntime.jsx(lui.LuiIcon, { alt: "error", name: "ic_error", className: "LuiTextInput-error-icon", size: "sm", status: "error" }), props.error] }))), props.warning && (jsxRuntime.jsxs("span", __assign({ className: "LuiTextInput-warning" }, { children: [jsxRuntime.jsx(lui.LuiIcon, { alt: "warning", name: "ic_warning", className: "LuiTextInput-warning-icon", size: "sm", status: "warning" }), props.warning] })))] })));
|
|
@@ -3725,27 +3730,36 @@ var GridPopoverTextInput = function (colDef, params) {
|
|
|
3725
3730
|
return GridCell(colDef, __assign({ editor: GridFormTextInput }, params));
|
|
3726
3731
|
};
|
|
3727
3732
|
|
|
3733
|
+
var css_248z$1 = ".GridFormSubComponentTextInput-full-width-input{padding:0;width:100%}";
|
|
3734
|
+
styleInject(css_248z$1);
|
|
3735
|
+
|
|
3728
3736
|
var GridFormSubComponentTextInput = function (_a) {
|
|
3729
|
-
var keyDown = _a.keyDown, placeholder = _a.placeholder, setValue = _a.setValue, className = _a.className;
|
|
3737
|
+
var keyDown = _a.keyDown, placeholder = _a.placeholder, setValue = _a.setValue, className = _a.className, customHelpText = _a.customHelpText;
|
|
3730
3738
|
var placeholderText = placeholder || "Other...";
|
|
3731
|
-
var
|
|
3739
|
+
var helpText = customHelpText || "Press enter or tab to save";
|
|
3740
|
+
var inputClass = className || "GridFormSubComponentTextInput-full-width-input";
|
|
3732
3741
|
var _b = react.useState(""), inputValue = _b[0], setInputValue = _b[1];
|
|
3733
|
-
return (jsxRuntime.
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3742
|
+
return (jsxRuntime.jsxs("div", __assign({ style: {
|
|
3743
|
+
display: "flex",
|
|
3744
|
+
flexDirection: "column"
|
|
3745
|
+
} }, { children: [jsxRuntime.jsx(TextInputFormatted, { className: inputClass, value: inputValue, onChange: function (e) {
|
|
3746
|
+
var value = e.target.value;
|
|
3747
|
+
setValue(value);
|
|
3748
|
+
setInputValue(value);
|
|
3749
|
+
}, inputProps: {
|
|
3750
|
+
onKeyDown: function (k) { return keyDown(k.key); },
|
|
3751
|
+
placeholder: placeholderText,
|
|
3752
|
+
onMouseEnter: function (e) {
|
|
3753
|
+
if (document.activeElement != e.currentTarget) {
|
|
3754
|
+
e.currentTarget.focus();
|
|
3755
|
+
}
|
|
3756
|
+
},
|
|
3757
|
+
style: {
|
|
3758
|
+
width: "100%"
|
|
3743
3759
|
}
|
|
3744
|
-
},
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
}
|
|
3748
|
-
} }) }));
|
|
3760
|
+
} }), jsxRuntime.jsx("span", __assign({ style: {
|
|
3761
|
+
fontSize: "0.75rem"
|
|
3762
|
+
} }, { children: helpText }))] })));
|
|
3749
3763
|
};
|
|
3750
3764
|
|
|
3751
3765
|
var GridSubComponentTextArea = function (props) {
|