@linzjs/step-ag-grid 2.2.0 → 2.2.1
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 +17 -6
- package/dist/index.js.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/react-menu3/components/ControlledMenu.d.ts +2 -2
- package/dist/src/react-menu3/types.d.ts +4 -0
- package/dist/step-ag-grid.esm.js +10 -7
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/GridPopoverHook.tsx +1 -0
- package/src/index.ts +3 -0
- package/src/react-menu3/components/ControlledMenu.tsx +7 -4
- package/src/react-menu3/types.ts +5 -0
package/dist/index.js
CHANGED
|
@@ -1278,7 +1278,7 @@ var EventHandlersContext = react.createContext({
|
|
|
1278
1278
|
});
|
|
1279
1279
|
|
|
1280
1280
|
var ControlledMenuFr = function (_a, externalRef) {
|
|
1281
|
-
var ariaLabel = _a["aria-label"], className = _a.className, containerProps = _a.containerProps, initialMounted = _a.initialMounted, unmountOnClose = _a.unmountOnClose, transition = _a.transition, transitionTimeout = _a.transitionTimeout, boundingBoxRef = _a.boundingBoxRef, boundingBoxPadding = _a.boundingBoxPadding, _b = _a.reposition, reposition = _b === void 0 ? "auto" : _b, _c = _a.submenuOpenDelay, submenuOpenDelay = _c === void 0 ? 300 : _c, _d = _a.submenuCloseDelay, submenuCloseDelay = _d === void 0 ? 150 : _d, skipOpen = _a.skipOpen, _e = _a.viewScroll, viewScroll = _e === void 0 ? "initial" : _e, portal = _a.portal, theming = _a.theming, onItemClick = _a.onItemClick, onClose = _a.onClose, saveButtonRef = _a.saveButtonRef, restProps = __rest(_a, ["aria-label", "className", "containerProps", "initialMounted", "unmountOnClose", "transition", "transitionTimeout", "boundingBoxRef", "boundingBoxPadding", "reposition", "submenuOpenDelay", "submenuCloseDelay", "skipOpen", "viewScroll", "portal", "theming", "onItemClick", "onClose", "saveButtonRef"]);
|
|
1281
|
+
var ariaLabel = _a["aria-label"], className = _a.className, containerProps = _a.containerProps, initialMounted = _a.initialMounted, unmountOnClose = _a.unmountOnClose, transition = _a.transition, transitionTimeout = _a.transitionTimeout, boundingBoxRef = _a.boundingBoxRef, boundingBoxPadding = _a.boundingBoxPadding, _b = _a.reposition, reposition = _b === void 0 ? "auto" : _b, _c = _a.submenuOpenDelay, submenuOpenDelay = _c === void 0 ? 300 : _c, _d = _a.submenuCloseDelay, submenuCloseDelay = _d === void 0 ? 150 : _d, skipOpen = _a.skipOpen, _e = _a.viewScroll, viewScroll = _e === void 0 ? "initial" : _e, portal = _a.portal, theming = _a.theming, onItemClick = _a.onItemClick, onClose = _a.onClose, saveButtonRef = _a.saveButtonRef, closeMenuExclusionClassName = _a.closeMenuExclusionClassName, restProps = __rest(_a, ["aria-label", "className", "containerProps", "initialMounted", "unmountOnClose", "transition", "transitionTimeout", "boundingBoxRef", "boundingBoxPadding", "reposition", "submenuOpenDelay", "submenuCloseDelay", "skipOpen", "viewScroll", "portal", "theming", "onItemClick", "onClose", "saveButtonRef", "closeMenuExclusionClassName"]);
|
|
1282
1282
|
var containerRef = react.useRef();
|
|
1283
1283
|
var scrollNodesRef = react.useRef({});
|
|
1284
1284
|
var anchorRef = restProps.anchorRef, state = restProps.state;
|
|
@@ -1306,11 +1306,11 @@ var ControlledMenuFr = function (_a, externalRef) {
|
|
|
1306
1306
|
viewScroll,
|
|
1307
1307
|
]);
|
|
1308
1308
|
var clickIsWithinMenu = react.useCallback(function (ev) {
|
|
1309
|
-
return hasParentClass("szh-menu--state-open", ev.target)
|
|
1310
|
-
|
|
1309
|
+
return hasParentClass("szh-menu--state-open", ev.target) ||
|
|
1310
|
+
(closeMenuExclusionClassName && hasParentClass(closeMenuExclusionClassName, ev.target));
|
|
1311
|
+
}, [closeMenuExclusionClassName]);
|
|
1311
1312
|
var handleScreenEventForSave = react.useCallback(function (ev) {
|
|
1312
1313
|
if (!clickIsWithinMenu(ev)) {
|
|
1313
|
-
//!ev.currentTarget.contains(ev.relatedTarget || document.activeElement)) {
|
|
1314
1314
|
ev.preventDefault();
|
|
1315
1315
|
ev.stopPropagation();
|
|
1316
1316
|
// FIXME There's an issue in React17
|
|
@@ -2710,7 +2710,7 @@ var useGridPopoverHook = function (props) {
|
|
|
2710
2710
|
});
|
|
2711
2711
|
}); }, [props, stopEditing, propsRef]);
|
|
2712
2712
|
var popoverWrapper = react.useCallback(function (children) {
|
|
2713
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: anchorRef.current && (jsxRuntime.jsxs(ControlledMenu, __assign({ state: isOpen ? "open" : "closed", portal: true, unmountOnClose: true, anchorRef: anchorRef, saveButtonRef: saveButtonRef, menuClassName: "step-ag-grid-react-menu", onClose: function (event) { return triggerSave(event.reason).then(); }, viewScroll: "auto", dontShrinkIfDirectionIsTop: true, className: props.className }, { children: [saving && ( // This is the overlay that prevents editing when the editor is saving
|
|
2713
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: anchorRef.current && (jsxRuntime.jsxs(ControlledMenu, __assign({ state: isOpen ? "open" : "closed", portal: true, unmountOnClose: true, anchorRef: anchorRef, saveButtonRef: saveButtonRef, menuClassName: "step-ag-grid-react-menu", onClose: function (event) { return triggerSave(event.reason).then(); }, viewScroll: "auto", dontShrinkIfDirectionIsTop: true, className: props.className, closeMenuExclusionClassName: "ReactModal__Content" }, { children: [saving && ( // This is the overlay that prevents editing when the editor is saving
|
|
2714
2714
|
jsxRuntime.jsx("div", { style: {
|
|
2715
2715
|
position: "absolute",
|
|
2716
2716
|
left: 0,
|
|
@@ -2824,8 +2824,11 @@ function defer() {
|
|
|
2824
2824
|
}
|
|
2825
2825
|
|
|
2826
2826
|
var MenuSeparatorString = "_____MENU_SEPARATOR_____";
|
|
2827
|
-
Object.freeze({ value: MenuSeparatorString });
|
|
2827
|
+
var MenuSeparator = Object.freeze({ value: MenuSeparatorString });
|
|
2828
2828
|
var MenuHeaderString = "_____MENU_HEADER_____";
|
|
2829
|
+
var MenuHeaderItem = function (title) {
|
|
2830
|
+
return { label: title, value: MenuHeaderString };
|
|
2831
|
+
};
|
|
2829
2832
|
var GridFormDropDown = function (_props) {
|
|
2830
2833
|
var props = _props;
|
|
2831
2834
|
var _a = react.useContext(GridContext), updatingCells = _a.updatingCells, stopEditing = _a.stopEditing;
|
|
@@ -3694,6 +3697,9 @@ exports.GridCell = GridCell;
|
|
|
3694
3697
|
exports.GridCellRenderer = GridCellRenderer;
|
|
3695
3698
|
exports.GridContext = GridContext;
|
|
3696
3699
|
exports.GridContextProvider = GridContextProvider;
|
|
3700
|
+
exports.GridFormDropDown = GridFormDropDown;
|
|
3701
|
+
exports.GridFormMultiSelect = GridFormMultiSelect;
|
|
3702
|
+
exports.GridFormPopoutMenu = GridFormPopoutMenu;
|
|
3697
3703
|
exports.GridHeaderSelect = GridHeaderSelect;
|
|
3698
3704
|
exports.GridIcon = GridIcon;
|
|
3699
3705
|
exports.GridLoadableCell = GridLoadableCell;
|
|
@@ -3715,8 +3721,13 @@ exports.MenuButton = MenuButton;
|
|
|
3715
3721
|
exports.MenuDivider = MenuDivider;
|
|
3716
3722
|
exports.MenuGroup = MenuGroup;
|
|
3717
3723
|
exports.MenuHeader = MenuHeader;
|
|
3724
|
+
exports.MenuHeaderItem = MenuHeaderItem;
|
|
3725
|
+
exports.MenuHeaderString = MenuHeaderString;
|
|
3718
3726
|
exports.MenuItem = MenuItem;
|
|
3719
3727
|
exports.MenuRadioGroup = MenuRadioGroup;
|
|
3728
|
+
exports.MenuSeparator = MenuSeparator;
|
|
3729
|
+
exports.MenuSeparatorString = MenuSeparatorString;
|
|
3730
|
+
exports.PopoutMenuSeparator = PopoutMenuSeparator;
|
|
3720
3731
|
exports.SubMenu = SubMenu;
|
|
3721
3732
|
exports.TextAreaInput = TextAreaInput;
|
|
3722
3733
|
exports.TextInputFormatted = TextInputFormatted;
|