@bigbinary/neetoui 5.2.37 → 5.2.39
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/index.cjs.js +17 -7
- package/index.cjs.js.map +1 -1
- package/index.d.ts +8 -6
- package/index.js +18 -8
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -250,6 +250,13 @@ export interface DropdownProps {
|
|
|
250
250
|
[key: string]: any;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
+
export interface MenuItemProps extends React.DetailedHTMLProps<
|
|
254
|
+
React.LiHTMLAttributes<HTMLLIElement>,
|
|
255
|
+
HTMLLIElement
|
|
256
|
+
> {
|
|
257
|
+
tooltipProps?: TooltipProps;
|
|
258
|
+
}
|
|
259
|
+
|
|
253
260
|
export interface MultiEmailInputProps {
|
|
254
261
|
label?: string;
|
|
255
262
|
placeholder?: string;
|
|
@@ -755,12 +762,7 @@ export const Dropdown: React.FC<DropdownProps> & {
|
|
|
755
762
|
HTMLUListElement
|
|
756
763
|
>
|
|
757
764
|
>;
|
|
758
|
-
MenuItem: React.FC<
|
|
759
|
-
React.DetailedHTMLProps<
|
|
760
|
-
React.LiHTMLAttributes<HTMLLIElement>,
|
|
761
|
-
HTMLLIElement
|
|
762
|
-
>
|
|
763
|
-
> & { Button: ButtonProps };
|
|
765
|
+
MenuItem: React.FC<MenuItemProps> & { Button: ButtonProps };
|
|
764
766
|
Divider: React.FC<
|
|
765
767
|
React.DetailedHTMLProps<
|
|
766
768
|
React.LiHTMLAttributes<HTMLLIElement>,
|
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as React$3 from 'react';
|
|
|
2
2
|
import React__default, { createContext, useLayoutEffect, useEffect, useContext, useRef, useInsertionEffect as useInsertionEffect$1, useCallback, useMemo, forwardRef as forwardRef$1, createElement, useId as useId$1, useState, cloneElement as cloneElement$1, Children, isValidElement, useSyncExternalStore, Fragment, Component, memo as memo$1 } from 'react';
|
|
3
3
|
import { isEmpty, equals, complement, toPairs, pipe as pipe$1, omit, isNil, replace as replace$2, assoc, pluck, mergeLeft, prop, flatten, move } from 'ramda';
|
|
4
4
|
import { Right, Down, Close, Info, Focus, Left, Calendar, Check, MenuHorizontal, Clock as Clock$1, CheckCircle, Warning, CloseCircle } from '@bigbinary/neeto-icons';
|
|
5
|
-
import { preprocessForSerialization, _existsBy, camelToSnakeCase, modifyBy, snakeToCamelCase, dynamicArray } from '@bigbinary/neeto-cist';
|
|
5
|
+
import { preprocessForSerialization, isPresent, _existsBy, camelToSnakeCase, modifyBy, snakeToCamelCase, dynamicArray } from '@bigbinary/neeto-cist';
|
|
6
6
|
import require$$0 from 'util';
|
|
7
7
|
import { Link, useLocation, useHistory, NavLink } from 'react-router-dom';
|
|
8
8
|
import ReactDOM, { createPortal, findDOMNode as findDOMNode$1 } from 'react-dom';
|
|
@@ -15915,17 +15915,24 @@ var Menu$2 = function Menu(_ref) {
|
|
|
15915
15915
|
}, otherProps), children);
|
|
15916
15916
|
};
|
|
15917
15917
|
|
|
15918
|
-
var _excluded$D = ["children", "className"];
|
|
15918
|
+
var _excluded$D = ["children", "className", "tooltipProps"];
|
|
15919
15919
|
var MenuItem = function MenuItem(_ref) {
|
|
15920
15920
|
var children = _ref.children,
|
|
15921
15921
|
className = _ref.className,
|
|
15922
|
+
tooltipProps = _ref.tooltipProps,
|
|
15922
15923
|
otherProps = _objectWithoutProperties$1(_ref, _excluded$D);
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15924
|
+
var renderMenuItem = function renderMenuItem() {
|
|
15925
|
+
return /*#__PURE__*/React__default.createElement("li", _extends$4({
|
|
15926
|
+
className: classnames$1("neeto-ui-dropdown__popup-menu-item", className)
|
|
15927
|
+
}, otherProps), children);
|
|
15928
|
+
};
|
|
15929
|
+
if (isPresent(tooltipProps)) {
|
|
15930
|
+
return /*#__PURE__*/React__default.createElement(Tooltip, tooltipProps, renderMenuItem());
|
|
15931
|
+
}
|
|
15932
|
+
return renderMenuItem();
|
|
15926
15933
|
};
|
|
15927
15934
|
|
|
15928
|
-
var _excluded$C = ["children", "className", "isActive", "isDisabled", "style", "prefix", "suffix", "type", "to", "href"];
|
|
15935
|
+
var _excluded$C = ["children", "className", "isActive", "isDisabled", "style", "prefix", "suffix", "type", "to", "href", "tooltipProps"];
|
|
15929
15936
|
var ITEM_BTN_STYLES = {
|
|
15930
15937
|
"default": "default",
|
|
15931
15938
|
danger: "danger"
|
|
@@ -15950,6 +15957,7 @@ var MenuItemButton = function MenuItemButton(_ref) {
|
|
|
15950
15957
|
to = _ref$to === void 0 ? "" : _ref$to,
|
|
15951
15958
|
_ref$href = _ref.href,
|
|
15952
15959
|
href = _ref$href === void 0 ? "" : _ref$href,
|
|
15960
|
+
tooltipProps = _ref.tooltipProps,
|
|
15953
15961
|
otherProps = _objectWithoutProperties$1(_ref, _excluded$C);
|
|
15954
15962
|
var Parent, elementSpecificProps;
|
|
15955
15963
|
if (to) {
|
|
@@ -15968,7 +15976,9 @@ var MenuItemButton = function MenuItemButton(_ref) {
|
|
|
15968
15976
|
type: type
|
|
15969
15977
|
};
|
|
15970
15978
|
}
|
|
15971
|
-
return /*#__PURE__*/React__default.createElement(MenuItem,
|
|
15979
|
+
return /*#__PURE__*/React__default.createElement(MenuItem, {
|
|
15980
|
+
tooltipProps: tooltipProps
|
|
15981
|
+
}, /*#__PURE__*/React__default.createElement(Parent, _extends$4({
|
|
15972
15982
|
disabled: isDisabled,
|
|
15973
15983
|
className: classnames$1("neeto-ui-dropdown__popup-menu-item-btn", className, {
|
|
15974
15984
|
"neeto-ui-dropdown__popup-menu-item-btn--active": isActive,
|
|
@@ -33754,7 +33764,7 @@ var Table = function Table(_ref) {
|
|
|
33754
33764
|
}
|
|
33755
33765
|
});
|
|
33756
33766
|
});
|
|
33757
|
-
var isPaginationVisible = rowData.length > defaultPageSize;
|
|
33767
|
+
var isPaginationVisible = otherProps.pagination !== false && rowData.length > defaultPageSize;
|
|
33758
33768
|
var rowSelectionProps = false;
|
|
33759
33769
|
if (rowSelection) {
|
|
33760
33770
|
rowSelectionProps = _objectSpread$6(_objectSpread$6({
|