@linzjs/step-ag-grid 2.4.5 → 2.4.6
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 +14 -10
- package/dist/index.js.map +1 -1
- package/dist/src/components/gridForm/{GridFormPopoutMenu.d.ts → GridFormPopoverMenu.d.ts} +1 -1
- package/dist/src/components/gridPopoverEdit/GridPopoverMenu.d.ts +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/react-menu3/components/Menu.d.ts +2 -2
- package/dist/step-ag-grid.esm.js +14 -10
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/gridForm/{GridFormPopoutMenu.tsx → GridFormPopoverMenu.tsx} +1 -1
- package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +2 -2
- package/src/contexts/GridContextProvider.tsx +1 -6
- package/src/index.ts +1 -1
- package/src/react-menu3/components/ControlledMenu.tsx +1 -1
- package/src/react-menu3/components/Menu.tsx +2 -2
- package/src/react-menu3/components/MenuButton.tsx +1 -1
- package/src/react-menu3/components/MenuGroup.tsx +1 -2
- package/src/react-menu3/components/MenuItem.tsx +8 -3
- package/src/react-menu3/components/SubMenu.tsx +0 -1
- package/src/react-menu3/hooks/useBEM.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1313,7 +1313,7 @@ var ControlledMenuFr = function (_a, externalRef) {
|
|
|
1313
1313
|
if (!isWithinMenu(ev.target)) {
|
|
1314
1314
|
ev.preventDefault();
|
|
1315
1315
|
ev.stopPropagation();
|
|
1316
|
-
//
|
|
1316
|
+
// Note: There's an issue in React17
|
|
1317
1317
|
// the cell doesn't refresh during update if save is invoked from a native event
|
|
1318
1318
|
// This doesn't happen in React18
|
|
1319
1319
|
// To work around it, I invoke the save by clicking on a passed in invisible button ref
|
|
@@ -1461,7 +1461,7 @@ function MenuFr(_a, externalRef) {
|
|
|
1461
1461
|
}
|
|
1462
1462
|
e.preventDefault();
|
|
1463
1463
|
};
|
|
1464
|
-
//
|
|
1464
|
+
// Too many mixed types here to figure out what to pick for button. Bad code.
|
|
1465
1465
|
var button = safeCall(menuButton, { open: isOpen });
|
|
1466
1466
|
if (!button || !button.type)
|
|
1467
1467
|
throw new Error("Menu requires a menuButton prop.");
|
|
@@ -1487,7 +1487,6 @@ var SubMenuFr = function (_a) {
|
|
|
1487
1487
|
var _d = react.useContext(MenuListContext), parentMenuRef = _d.parentMenuRef, parentDir = _d.parentDir, parentOverflow = _d.overflow;
|
|
1488
1488
|
var _e = react.useContext(MenuListItemContext), isParentOpen = _e.isParentOpen, isSubmenuOpen = _e.isSubmenuOpen, setOpenSubmenuCount = _e.setOpenSubmenuCount, dispatch = _e.dispatch, updateItems = _e.updateItems;
|
|
1489
1489
|
var isPortal = parentOverflow !== "visible";
|
|
1490
|
-
// FIXME Matt no idea what's going on here
|
|
1491
1490
|
var _f = useMenuStateAndFocus(settings), stateProps = _f[0], toggleMenu = _f[1], _openMenu = _f[2];
|
|
1492
1491
|
var state = stateProps.state;
|
|
1493
1492
|
var isDisabled = !!disabled;
|
|
@@ -1633,11 +1632,17 @@ var MenuItemFr = function (_a) {
|
|
|
1633
1632
|
var isCheckBox = type === "checkbox";
|
|
1634
1633
|
var isAnchor = !!href && !isDisabled && !isRadio && !isCheckBox;
|
|
1635
1634
|
var isChecked = isRadio ? radioGroup.value === value : isCheckBox ? !!checked : false;
|
|
1636
|
-
//
|
|
1635
|
+
// handle click seems to be a combination of multiple event types, bad code.
|
|
1637
1636
|
var handleClick = function (e) {
|
|
1638
1637
|
if (isDisabled) {
|
|
1639
|
-
e.
|
|
1640
|
-
|
|
1638
|
+
if (e.syntheticEvent) {
|
|
1639
|
+
e.syntheticEvent.stopPropagation();
|
|
1640
|
+
e.syntheticEvent.preventDefault();
|
|
1641
|
+
}
|
|
1642
|
+
else {
|
|
1643
|
+
e.stopPropagation();
|
|
1644
|
+
e.preventDefault();
|
|
1645
|
+
}
|
|
1641
1646
|
return;
|
|
1642
1647
|
}
|
|
1643
1648
|
var event = {
|
|
@@ -1731,7 +1736,6 @@ var MenuGroupFr = function (_a, externalRef) {
|
|
|
1731
1736
|
useIsomorphicLayoutEffect(function () {
|
|
1732
1737
|
var maxHeight;
|
|
1733
1738
|
if (takeOverflow && overflowAmt != null && overflowAmt >= 0 && ref.current) {
|
|
1734
|
-
// FIXME Matt added && ref.current
|
|
1735
1739
|
maxHeight = ref.current.getBoundingClientRect().height - overflowAmt;
|
|
1736
1740
|
if (maxHeight < 0)
|
|
1737
1741
|
maxHeight = 0;
|
|
@@ -3266,7 +3270,7 @@ var PopoutMenuSeparator = Object.freeze({ __isMenuSeparator__: true });
|
|
|
3266
3270
|
* NOTE: If the popout menu doesn't appear on single click when also selecting row it's because
|
|
3267
3271
|
* you need a useMemo around your columnDefs
|
|
3268
3272
|
*/
|
|
3269
|
-
var
|
|
3273
|
+
var GridFormPopoverMenu = function (_props) {
|
|
3270
3274
|
var props = _props;
|
|
3271
3275
|
var updatingCells = react.useContext(GridContext).updatingCells;
|
|
3272
3276
|
var optionsInitialising = react.useRef(false);
|
|
@@ -3339,7 +3343,7 @@ var GridPopoverMenu = function (colDef, custom) {
|
|
|
3339
3343
|
return GridCell(__assign(__assign({ maxWidth: 40, editable: colDef.editable != null ? colDef.editable : true, cellStyle: { "justify-content": "flex-end" }, cellRenderer: GridRenderPopoutMenuCell, cellClass: (custom === null || custom === void 0 ? void 0 : custom.multiEdit) ? GenericMultiEditCellClass : undefined }, colDef), { cellRendererParams: {
|
|
3340
3344
|
// Menus open on single click, this parameter is picked up in Grid.tsx
|
|
3341
3345
|
singleClickEdit: true
|
|
3342
|
-
} }), __assign({ editor:
|
|
3346
|
+
} }), __assign({ editor: GridFormPopoverMenu }, custom));
|
|
3343
3347
|
};
|
|
3344
3348
|
|
|
3345
3349
|
var bearingValueFormatter = function (params) {
|
|
@@ -3911,7 +3915,7 @@ exports.GridContext = GridContext;
|
|
|
3911
3915
|
exports.GridContextProvider = GridContextProvider;
|
|
3912
3916
|
exports.GridFormDropDown = GridFormDropDown;
|
|
3913
3917
|
exports.GridFormMultiSelect = GridFormMultiSelect;
|
|
3914
|
-
exports.
|
|
3918
|
+
exports.GridFormPopoverMenu = GridFormPopoverMenu;
|
|
3915
3919
|
exports.GridFormSubComponentTextInput = GridFormSubComponentTextInput;
|
|
3916
3920
|
exports.GridHeaderSelect = GridHeaderSelect;
|
|
3917
3921
|
exports.GridIcon = GridIcon;
|