linkmore-design 1.1.17 → 1.1.18

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.
@@ -0,0 +1,2 @@
1
+ declare const App: () => JSX.Element;
2
+ export default App;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  interface IMenuData {
3
3
  menuId: string;
4
4
  title: string | React.ReactNode;
5
+ hidden?: boolean;
5
6
  }
6
7
  export interface IQuickMenuProps {
7
8
  className?: string;
package/dist/index.umd.js CHANGED
@@ -313514,7 +313514,11 @@
313514
313514
  relevanceCols = col.relevanceCols,
313515
313515
  componentProps = col.componentProps;
313516
313516
 
313517
- if ((col === null || col === void 0 ? void 0 : col.fixed) || hasDisableOptions && hasDisableOptions.includes(dataIndex) || ((_col$componentProps2 = col.componentProps) === null || _col$componentProps2 === void 0 ? void 0 : _col$componentProps2.options) || editable === 'render' || !!relevanceCols || !!shouldUpdate || !!record.children || componentProps && lodash.isFunction(componentProps)) {
313517
+ if (componentProps && lodash.isFunction(componentProps)) {
313518
+ return true;
313519
+ }
313520
+
313521
+ if ((col === null || col === void 0 ? void 0 : col.fixed) || hasDisableOptions && hasDisableOptions.includes(dataIndex) || ((_col$componentProps2 = col.componentProps) === null || _col$componentProps2 === void 0 ? void 0 : _col$componentProps2.options) || editable === 'render' || !!relevanceCols || !!shouldUpdate || !!record.children) {
313518
313522
  return true;
313519
313523
  }
313520
313524
 
@@ -313762,6 +313766,11 @@
313762
313766
  var scroll = useScroll(getTargetElement$1(warpElement || document), function () {
313763
313767
  return scrollOpenStatus;
313764
313768
  });
313769
+ var filterMenuData = React.useMemo(function () {
313770
+ return menuData === null || menuData === void 0 ? void 0 : menuData.filter(function (item) {
313771
+ return item.hidden !== true;
313772
+ });
313773
+ }, [menuData]);
313765
313774
 
313766
313775
  function clearActiveToc() {
313767
313776
  [].forEach.call(document.querySelectorAll('.lm_menu_list li a'), function (node) {
@@ -313787,7 +313796,7 @@
313787
313796
  (_menuTimeEventRef$cur = menuTimeEventRef.current) === null || _menuTimeEventRef$cur === void 0 ? void 0 : _menuTimeEventRef$cur.destroy();
313788
313797
  }
313789
313798
 
313790
- if (!menuData.length) {
313799
+ if (!filterMenuData.length) {
313791
313800
  return;
313792
313801
  } // eslint-disable-next-line global-require
313793
313802
 
@@ -313799,11 +313808,10 @@
313799
313808
 
313800
313809
  menuTimeEventRef.current = scrollama();
313801
313810
  (_menuTimeEventRef$cur2 = menuTimeEventRef.current) === null || _menuTimeEventRef$cur2 === void 0 ? void 0 : (_menuTimeEventRef$cur3 = _menuTimeEventRef$cur2.setup({
313802
- step: menuData.map(function (item) {
313811
+ step: filterMenuData.map(function (item) {
313803
313812
  return document.getElementById("".concat(item.menuId));
313804
- }).filter(Boolean) // required
313805
- // offset: '10px',
313806
-
313813
+ }).filter(Boolean),
313814
+ container: getTargetElement$1(warpElement || document)
313807
313815
  })) === null || _menuTimeEventRef$cur3 === void 0 ? void 0 : _menuTimeEventRef$cur3.onStepEnter(function (_ref) {
313808
313816
  var element = _ref.element;
313809
313817
  updateActiveToc(element.id);
@@ -313811,7 +313819,7 @@
313811
313819
  };
313812
313820
 
313813
313821
  function setKeysDom() {
313814
- menuData.forEach(function (item) {
313822
+ filterMenuData.forEach(function (item) {
313815
313823
  var _getTargetElement, _document$getElementB;
313816
313824
 
313817
313825
  var warpTop = ((_getTargetElement = getTargetElement$1(warpElement || document)) === null || _getTargetElement === void 0 ? void 0 : _getTargetElement.offsetTop) || 0;
@@ -313889,7 +313897,7 @@
313889
313897
  })
313890
313898
  }), /*#__PURE__*/React__default['default'].createElement("ul", {
313891
313899
  className: classnames('lm_menu_list', hovering && 'show', className)
313892
- }, menuData.map(function (item) {
313900
+ }, filterMenuData.map(function (item) {
313893
313901
  return /*#__PURE__*/React__default['default'].createElement("li", {
313894
313902
  key: item.menuId,
313895
313903
  onClick: function onClick() {