@linzjs/step-ag-grid 2.4.5 → 2.4.7

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 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
- // FIXME There's an issue in React17
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
- // FIXME erk! button seems to be many types
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
- // FIXME handle click seems to be a combination of multiple event types
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.stopPropagation();
1640
- e.preventDefault();
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;
@@ -1755,12 +1759,12 @@ var MenuRadioGroup = react.forwardRef(MenuRadioGroupFr);
1755
1759
 
1756
1760
  var GridUpdatingContext = react.createContext({
1757
1761
  checkUpdating: function () {
1758
- console.error("Missing UpdatingContext");
1762
+ console.error("Missing GridUpdatingContext");
1759
1763
  return false;
1760
1764
  },
1761
1765
  modifyUpdating: function () { return __awaiter(void 0, void 0, void 0, function () {
1762
1766
  return __generator(this, function (_a) {
1763
- console.error("Missing UpdatingContext");
1767
+ console.error("Missing GridUpdatingContext");
1764
1768
  return [2 /*return*/];
1765
1769
  });
1766
1770
  }); }
@@ -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 GridFormPopoutMenu = function (_props) {
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);
@@ -3336,10 +3340,10 @@ var GridFormPopoutMenu = function (_props) {
3336
3340
  * Popout burger menu
3337
3341
  */
3338
3342
  var GridPopoverMenu = function (colDef, custom) {
3339
- 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: {
3343
+ return GridCell(__assign(__assign({ maxWidth: 40, editable: colDef.editable != null ? colDef.editable : true, cellStyle: { justifyContent: "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: GridFormPopoutMenu }, custom));
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.GridFormPopoutMenu = GridFormPopoutMenu;
3918
+ exports.GridFormPopoverMenu = GridFormPopoverMenu;
3915
3919
  exports.GridFormSubComponentTextInput = GridFormSubComponentTextInput;
3916
3920
  exports.GridHeaderSelect = GridHeaderSelect;
3917
3921
  exports.GridIcon = GridIcon;