@linzjs/step-ag-grid 2.4.7 → 2.4.9
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 +53 -38
- package/dist/index.js.map +1 -1
- package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +3 -1
- package/dist/step-ag-grid.esm.js +53 -38
- 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/contexts/GridContextProvider.tsx +2 -1
- package/src/styles/GridFormSubComponentTextInput.scss +4 -0
package/dist/index.js
CHANGED
|
@@ -2075,7 +2075,8 @@ var GridContextProvider = function (props) {
|
|
|
2075
2075
|
*/
|
|
2076
2076
|
var sizeColumnsToFit = function () {
|
|
2077
2077
|
gridApiOp(function (gridApi) {
|
|
2078
|
-
|
|
2078
|
+
// Hide size columns to fit errors in tests
|
|
2079
|
+
document.body.clientWidth && gridApi.sizeColumnsToFit();
|
|
2079
2080
|
});
|
|
2080
2081
|
};
|
|
2081
2082
|
var stopEditing = function () { return gridApiOp(function (gridApi) { return gridApi.stopEditing(); }); };
|
|
@@ -2587,11 +2588,11 @@ function styleInject(css, ref) {
|
|
|
2587
2588
|
}
|
|
2588
2589
|
}
|
|
2589
2590
|
|
|
2590
|
-
var css_248z$
|
|
2591
|
-
styleInject(css_248z$
|
|
2591
|
+
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}";
|
|
2592
|
+
styleInject(css_248z$8);
|
|
2592
2593
|
|
|
2593
|
-
var css_248z$
|
|
2594
|
-
styleInject(css_248z$
|
|
2594
|
+
var css_248z$7 = ".GridLoadableCell-container{align-items:center;display:flex}";
|
|
2595
|
+
styleInject(css_248z$7);
|
|
2595
2596
|
|
|
2596
2597
|
var GridLoadableCell = function (props) {
|
|
2597
2598
|
if (props.isLoading) {
|
|
@@ -2815,11 +2816,11 @@ var GridRenderPopoutMenuCell = function (props) {
|
|
|
2815
2816
|
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
2817
|
};
|
|
2817
2818
|
|
|
2818
|
-
var css_248z$
|
|
2819
|
-
styleInject(css_248z$
|
|
2819
|
+
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}";
|
|
2820
|
+
styleInject(css_248z$6);
|
|
2820
2821
|
|
|
2821
|
-
var css_248z$
|
|
2822
|
-
styleInject(css_248z$
|
|
2822
|
+
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}";
|
|
2823
|
+
styleInject(css_248z$5);
|
|
2823
2824
|
|
|
2824
2825
|
/* global setTimeout, clearTimeout */
|
|
2825
2826
|
|
|
@@ -2978,7 +2979,11 @@ var GridFormDropDown = function (_props) {
|
|
|
2978
2979
|
case 2:
|
|
2979
2980
|
optionsList = optionsConf === null || optionsConf === void 0 ? void 0 : optionsConf.map(function (item) {
|
|
2980
2981
|
if (item == null || typeof item == "string" || typeof item == "number") {
|
|
2981
|
-
item = {
|
|
2982
|
+
item = {
|
|
2983
|
+
value: item,
|
|
2984
|
+
label: item,
|
|
2985
|
+
disabled: false
|
|
2986
|
+
};
|
|
2982
2987
|
}
|
|
2983
2988
|
return item;
|
|
2984
2989
|
});
|
|
@@ -3060,9 +3065,9 @@ var GridFormDropDown = function (_props) {
|
|
|
3060
3065
|
var _b;
|
|
3061
3066
|
var ref = _a.ref;
|
|
3062
3067
|
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) {
|
|
3068
|
+
} })), 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
3069
|
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(
|
|
3070
|
+
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
3071
|
selectItemHandler(item.value);
|
|
3067
3072
|
} }, { 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
3073
|
return item.subComponent &&
|
|
@@ -3089,13 +3094,14 @@ var GridFormDropDown = function (_props) {
|
|
|
3089
3094
|
var optionValue = _a.optionValue;
|
|
3090
3095
|
return optionValue === item.value;
|
|
3091
3096
|
});
|
|
3092
|
-
if (key === "Enter" && subComponentItem) {
|
|
3097
|
+
if ((key === "Enter" || key === "Tab") && subComponentItem) {
|
|
3093
3098
|
selectItemHandler(item.value, subComponentItem.subComponentValue);
|
|
3094
3099
|
ref.closeMenu();
|
|
3095
3100
|
}
|
|
3096
|
-
}
|
|
3101
|
+
},
|
|
3102
|
+
key: "".concat(props.field, "-").concat(index, "_subcomponent_inner")
|
|
3097
3103
|
}, ref);
|
|
3098
|
-
} }), "".concat(props.field, "-").concat(index, "_subcomponent"))) }));
|
|
3104
|
+
} }), "".concat(props.field, "-").concat(index, "_subcomponent"))) }, "menu-wrapper-".concat(index)));
|
|
3099
3105
|
})] }) }))] }));
|
|
3100
3106
|
};
|
|
3101
3107
|
|
|
@@ -3261,8 +3267,8 @@ var GridPopoutEditMultiSelect = function (colDef, props) {
|
|
|
3261
3267
|
return GridCell(colDef, __assign(__assign({ editor: GridFormMultiSelect }, props), { editorParams: __assign({ className: "GridMultiSelect-containerMedium" }, props.editorParams) }));
|
|
3262
3268
|
};
|
|
3263
3269
|
|
|
3264
|
-
var css_248z$
|
|
3265
|
-
styleInject(css_248z$
|
|
3270
|
+
var css_248z$4 = ".GridPopoutMenu-burger{cursor:pointer}.GridPopoutMenu-burger svg{fill:#007198}.GridPopoutMenu-burgerDisabled svg{fill:#989189}";
|
|
3271
|
+
styleInject(css_248z$4);
|
|
3266
3272
|
|
|
3267
3273
|
/** Menu configuration types **/
|
|
3268
3274
|
var PopoutMenuSeparator = Object.freeze({ __isMenuSeparator__: true });
|
|
@@ -3424,11 +3430,11 @@ var convertDDToDMS = function (dd, showPositiveSymbol, addTrailingZeros) {
|
|
|
3424
3430
|
return dmsString;
|
|
3425
3431
|
};
|
|
3426
3432
|
|
|
3427
|
-
var css_248z$
|
|
3428
|
-
styleInject(css_248z$
|
|
3433
|
+
var css_248z$3 = ".GridFormEditBearing-input{width:320px}";
|
|
3434
|
+
styleInject(css_248z$3);
|
|
3429
3435
|
|
|
3430
|
-
var css_248z$
|
|
3431
|
-
styleInject(css_248z$
|
|
3436
|
+
var css_248z$2 = ".LuiTextInput{margin-bottom:0}.LuiTextInput-formatted{color:#beb9b4;line-height:48px;position:absolute;right:14px;top:0}";
|
|
3437
|
+
styleInject(css_248z$2);
|
|
3432
3438
|
|
|
3433
3439
|
var TextInputFormatted = function (props) {
|
|
3434
3440
|
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 +3731,36 @@ var GridPopoverTextInput = function (colDef, params) {
|
|
|
3725
3731
|
return GridCell(colDef, __assign({ editor: GridFormTextInput }, params));
|
|
3726
3732
|
};
|
|
3727
3733
|
|
|
3734
|
+
var css_248z$1 = ".GridFormSubComponentTextInput-full-width-input{padding:0;width:100%}";
|
|
3735
|
+
styleInject(css_248z$1);
|
|
3736
|
+
|
|
3728
3737
|
var GridFormSubComponentTextInput = function (_a) {
|
|
3729
|
-
var keyDown = _a.keyDown, placeholder = _a.placeholder, setValue = _a.setValue, className = _a.className;
|
|
3738
|
+
var keyDown = _a.keyDown, placeholder = _a.placeholder, setValue = _a.setValue, className = _a.className, customHelpText = _a.customHelpText;
|
|
3730
3739
|
var placeholderText = placeholder || "Other...";
|
|
3731
|
-
var
|
|
3740
|
+
var helpText = customHelpText || "Press enter or tab to save";
|
|
3741
|
+
var inputClass = className || "GridFormSubComponentTextInput-full-width-input";
|
|
3732
3742
|
var _b = react.useState(""), inputValue = _b[0], setInputValue = _b[1];
|
|
3733
|
-
return (jsxRuntime.
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
+
return (jsxRuntime.jsxs("div", __assign({ style: {
|
|
3744
|
+
display: "flex",
|
|
3745
|
+
flexDirection: "column"
|
|
3746
|
+
} }, { children: [jsxRuntime.jsx(TextInputFormatted, { className: inputClass, value: inputValue, onChange: function (e) {
|
|
3747
|
+
var value = e.target.value;
|
|
3748
|
+
setValue(value);
|
|
3749
|
+
setInputValue(value);
|
|
3750
|
+
}, inputProps: {
|
|
3751
|
+
onKeyDown: function (k) { return keyDown(k.key); },
|
|
3752
|
+
placeholder: placeholderText,
|
|
3753
|
+
onMouseEnter: function (e) {
|
|
3754
|
+
if (document.activeElement != e.currentTarget) {
|
|
3755
|
+
e.currentTarget.focus();
|
|
3756
|
+
}
|
|
3757
|
+
},
|
|
3758
|
+
style: {
|
|
3759
|
+
width: "100%"
|
|
3743
3760
|
}
|
|
3744
|
-
},
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
}
|
|
3748
|
-
} }) }));
|
|
3761
|
+
} }), jsxRuntime.jsx("span", __assign({ style: {
|
|
3762
|
+
fontSize: "0.75rem"
|
|
3763
|
+
} }, { children: helpText }))] })));
|
|
3749
3764
|
};
|
|
3750
3765
|
|
|
3751
3766
|
var GridSubComponentTextArea = function (props) {
|