@carbon/ibm-products 2.60.0-rc.0 → 2.61.0-rc.0
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/css/index-full-carbon.css +113 -497
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +64 -492
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +93 -492
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +93 -510
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/ActionBar/ActionBar.d.ts +3 -3
- package/es/components/ActionBar/ActionBar.js +47 -150
- package/es/components/ActionBar/ActionBarOverflowItems.js +1 -1
- package/es/components/Checklist/ChecklistChart.js +1 -1
- package/es/components/Coachmark/Coachmark.js +1 -1
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +3 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +4 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +7 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +7 -2
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +15 -15
- package/es/components/ConditionBuilder/utils/util.d.ts +1 -0
- package/es/components/ConditionBuilder/utils/util.js +7 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/common.js +1 -3
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -2
- package/es/components/Datagrid/useDatagrid.js +2 -2
- package/es/components/Datagrid/useInfiniteScroll.js +2 -5
- package/es/components/Datagrid/useRowIsMouseOver.d.ts +1 -1
- package/es/components/Datagrid/useRowIsMouseOver.js +2 -1
- package/es/components/Datagrid/useStickyColumn.d.ts +1 -1
- package/es/components/Datagrid/useStickyColumn.js +1 -1
- package/es/components/FilterSummary/FilterSummary.js +1 -1
- package/es/components/InterstitialScreen/InterstitialScreen.js +1 -1
- package/es/components/Nav/NavItem.js +1 -1
- package/es/components/NotificationsPanel/NotificationsPanel.d.ts +5 -0
- package/es/components/NotificationsPanel/NotificationsPanel.js +11 -17
- package/es/components/OptionsTile/OptionsTile.d.ts +2 -3
- package/es/components/OptionsTile/OptionsTile.js +49 -97
- package/es/components/PageHeader/PageHeader.js +16 -14
- package/es/components/PageHeader/PageHeaderTitle.js +2 -2
- package/es/components/ScrollGradient/ScrollGradient.js +74 -25
- package/es/components/ScrollGradient/constants.d.ts +0 -5
- package/es/components/ScrollGradient/constants.js +2 -47
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +1 -1
- package/es/components/TagOverflow/TagOverflow.d.ts +5 -1
- package/es/components/Tearsheet/Tearsheet.d.ts +5 -1
- package/es/components/Tearsheet/TearsheetNarrow.d.ts +5 -1
- package/es/components/WebTerminal/WebTerminal.js +0 -13
- package/es/global/js/hooks/useControllableState.d.ts +12 -24
- package/es/global/js/hooks/useControllableState.js +18 -60
- package/es/global/js/hooks/useOverflowItems.d.ts +7 -2
- package/es/global/js/hooks/useOverflowItems.js +50 -17
- package/es/global/js/hooks/useOverflowString.d.ts +9 -0
- package/es/global/js/hooks/useOverflowString.js +52 -0
- package/es/global/js/hooks/usePresence.d.ts +1 -1
- package/es/global/js/hooks/usePresence.js +2 -2
- package/es/global/js/utils/checkForOverflow.js +1 -11
- package/es/global/js/utils/clamp.d.ts +7 -0
- package/es/global/js/utils/clamp.js +25 -0
- package/es/global/js/utils/debounce.d.ts +7 -0
- package/es/global/js/utils/debounce.js +30 -0
- package/es/global/js/utils/deepCompareObject.d.ts +7 -0
- package/es/global/js/utils/deepCompareObject.js +47 -0
- package/es/global/js/utils/throttle.d.ts +7 -0
- package/es/global/js/utils/throttle.js +19 -0
- package/es/global/js/utils/uuidv4.d.ts +2 -2
- package/es/global/js/utils/uuidv4.js +3 -2
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-10.js +2787 -0
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +1013 -943
- package/lib/components/ActionBar/ActionBar.d.ts +3 -3
- package/lib/components/ActionBar/ActionBar.js +45 -148
- package/lib/components/ActionBar/ActionBarOverflowItems.js +1 -1
- package/lib/components/Checklist/ChecklistChart.js +2 -2
- package/lib/components/Coachmark/Coachmark.js +2 -2
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +4 -4
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +3 -0
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +6 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +6 -1
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +15 -15
- package/lib/components/ConditionBuilder/utils/util.d.ts +1 -0
- package/lib/components/ConditionBuilder/utils/util.js +7 -0
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/common.js +1 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useShouldDisableButtons.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -2
- package/lib/components/Datagrid/useDatagrid.js +2 -2
- package/lib/components/Datagrid/useInfiniteScroll.js +2 -5
- package/lib/components/Datagrid/useRowIsMouseOver.d.ts +1 -1
- package/lib/components/Datagrid/useRowIsMouseOver.js +3 -2
- package/lib/components/Datagrid/useStickyColumn.d.ts +1 -1
- package/lib/components/Datagrid/useStickyColumn.js +2 -2
- package/lib/components/FilterSummary/FilterSummary.js +2 -2
- package/lib/components/InterstitialScreen/InterstitialScreen.js +3 -3
- package/lib/components/Nav/NavItem.js +2 -2
- package/lib/components/NotificationsPanel/NotificationsPanel.d.ts +5 -0
- package/lib/components/NotificationsPanel/NotificationsPanel.js +11 -17
- package/lib/components/OptionsTile/OptionsTile.d.ts +2 -3
- package/lib/components/OptionsTile/OptionsTile.js +49 -97
- package/lib/components/PageHeader/PageHeader.js +16 -14
- package/lib/components/PageHeader/PageHeaderTitle.js +2 -2
- package/lib/components/ScrollGradient/ScrollGradient.js +72 -23
- package/lib/components/ScrollGradient/constants.d.ts +0 -5
- package/lib/components/ScrollGradient/constants.js +1 -48
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +2 -2
- package/lib/components/TagOverflow/TagOverflow.d.ts +5 -1
- package/lib/components/Tearsheet/Tearsheet.d.ts +5 -1
- package/lib/components/Tearsheet/TearsheetNarrow.d.ts +5 -1
- package/lib/components/WebTerminal/WebTerminal.js +0 -13
- package/lib/global/js/hooks/useControllableState.d.ts +12 -24
- package/lib/global/js/hooks/useControllableState.js +17 -59
- package/lib/global/js/hooks/useOverflowItems.d.ts +7 -2
- package/lib/global/js/hooks/useOverflowItems.js +49 -16
- package/lib/global/js/hooks/useOverflowString.d.ts +9 -0
- package/lib/global/js/hooks/useOverflowString.js +55 -0
- package/lib/global/js/hooks/usePresence.d.ts +1 -1
- package/lib/global/js/hooks/usePresence.js +2 -2
- package/lib/global/js/utils/checkForOverflow.js +0 -11
- package/lib/global/js/utils/clamp.d.ts +7 -0
- package/lib/global/js/utils/clamp.js +27 -0
- package/lib/global/js/utils/debounce.d.ts +7 -0
- package/lib/global/js/utils/debounce.js +32 -0
- package/lib/global/js/utils/deepCompareObject.d.ts +7 -0
- package/lib/global/js/utils/deepCompareObject.js +49 -0
- package/lib/global/js/utils/throttle.d.ts +7 -0
- package/lib/global/js/utils/throttle.js +21 -0
- package/lib/global/js/utils/uuidv4.d.ts +2 -2
- package/lib/global/js/utils/uuidv4.js +3 -2
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-10.js +2913 -0
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-3.js +1018 -948
- package/package.json +6 -7
- package/scss/components/NotificationsPanel/_notifications-panel.scss +33 -20
- package/scss/components/ScrollGradient/_scroll-gradient.scss +30 -0
- package/scss/components/UserAvatar/_user-avatar.scss +2 -6
- package/scss/components/WebTerminal/_web-terminal.scss +13 -1
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-9.js +0 -2959
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +0 -3085
@@ -41,9 +41,9 @@ interface ActionBarProps extends PropsWithChildren {
|
|
41
41
|
/**
|
42
42
|
* onItemCountChange - event reporting maxWidth
|
43
43
|
*/
|
44
|
-
onWidthChange?: (sizes
|
45
|
-
minWidth
|
46
|
-
maxWidth
|
44
|
+
onWidthChange?: (sizes?: {
|
45
|
+
minWidth?: number;
|
46
|
+
maxWidth?: number;
|
47
47
|
}) => void;
|
48
48
|
/**
|
49
49
|
* overflowAriaLabel label for open close button overflow used for action bar items that do nto fit.
|
@@ -12,16 +12,17 @@ var React = require('react');
|
|
12
12
|
var index = require('../../_virtual/index.js');
|
13
13
|
var cx = require('classnames');
|
14
14
|
var settings = require('../../settings.js');
|
15
|
-
var useResizeObserver = require('../../global/js/hooks/useResizeObserver.js');
|
16
15
|
var react = require('@carbon/react');
|
17
16
|
var uuidv4 = require('../../global/js/utils/uuidv4.js');
|
18
17
|
var propsHelper = require('../../global/js/utils/props-helper.js');
|
19
18
|
var ActionBarItem = require('./ActionBarItem.js');
|
20
19
|
var ActionBarOverflowItems = require('./ActionBarOverflowItems.js');
|
20
|
+
var useOverflowItems = require('../../global/js/hooks/useOverflowItems.js');
|
21
21
|
|
22
22
|
var _excluded = ["actions", "className", "maxVisible", "menuOptionsClass", "onWidthChange", "overflowAriaLabel", "overflowMenuRef", "rightAlign"],
|
23
|
-
_excluded2 = ["
|
24
|
-
_excluded3 = ["key"];
|
23
|
+
_excluded2 = ["id"],
|
24
|
+
_excluded3 = ["key", "id"];
|
25
|
+
|
25
26
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
26
27
|
var blockClass = "".concat(settings.pkg.prefix, "--action-bar");
|
27
28
|
var componentName = 'ActionBar';
|
@@ -46,160 +47,56 @@ exports.ActionBar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
46
47
|
overflowMenuRef = _ref.overflowMenuRef,
|
47
48
|
rightAlign = _ref.rightAlign,
|
48
49
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
49
|
-
var _useState = React.useState(0),
|
50
|
-
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
51
|
-
displayCount = _useState2[0],
|
52
|
-
setDisplayCount = _useState2[1];
|
53
|
-
var _useState3 = React.useState([]),
|
54
|
-
_useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
|
55
|
-
displayedItems = _useState4[0],
|
56
|
-
setDisplayedItems = _useState4[1];
|
57
|
-
var _useState5 = React.useState(null),
|
58
|
-
_useState6 = _rollupPluginBabelHelpers.slicedToArray(_useState5, 2),
|
59
|
-
hiddenSizingItems = _useState6[0],
|
60
|
-
setHiddenSizingItems = _useState6[1];
|
61
50
|
var internalId = React.useRef(uuidv4.default());
|
62
51
|
var refDisplayedItems = React.useRef(null);
|
63
|
-
var sizingRef = React.useRef(null);
|
64
|
-
var sizes = React.useRef({});
|
65
52
|
var backupRef = React.useRef(null);
|
66
53
|
var localRef = ref || backupRef;
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
return /*#__PURE__*/React.createElement(ActionBarItem.ActionBarItem, _rollupPluginBabelHelpers.extends({}, rest, {
|
87
|
-
// ensure id is not duplicated
|
88
|
-
"data-original-id": id,
|
89
|
-
key: "hidden-item-".concat(key),
|
90
|
-
className: "".concat(blockClass, "__hidden-sizing-item"),
|
91
|
-
tabIndex: -1
|
92
|
-
}));
|
93
|
-
}))));
|
94
|
-
}, [actions, overflowMenuRef]);
|
95
|
-
|
96
|
-
// creates displayed items based on actions, displayCount and alignment
|
97
|
-
React.useEffect(function () {
|
98
|
-
// Calculate the displayed items
|
99
|
-
var newDisplayedItems = actions.map(function (_ref3) {
|
100
|
-
var key = _ref3.key,
|
101
|
-
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref3, _excluded3);
|
102
|
-
return /*#__PURE__*/React.createElement(ActionBarItem.ActionBarItem, _rollupPluginBabelHelpers.extends({}, rest, {
|
103
|
-
key: key
|
104
|
-
}));
|
105
|
-
});
|
106
|
-
|
107
|
-
// extract any there is not enough room for into newOverflowItems
|
108
|
-
var newOverflowItems = newDisplayedItems.splice(displayCount);
|
109
|
-
|
110
|
-
// add overflow menu if needed
|
111
|
-
if (newOverflowItems.length) {
|
112
|
-
newDisplayedItems.push(/*#__PURE__*/React.createElement(ActionBarOverflowItems.ActionBarOverflowItems, {
|
113
|
-
menuOptionsClass: menuOptionsClass,
|
114
|
-
overflowAriaLabel: overflowAriaLabel,
|
115
|
-
overflowMenuRef: overflowMenuRef,
|
116
|
-
overflowItems: newOverflowItems,
|
117
|
-
key: "overflow-menu-".concat(internalId.current)
|
118
|
-
}));
|
119
|
-
}
|
120
|
-
setDisplayedItems(newDisplayedItems);
|
121
|
-
}, [actions, displayCount, overflowAriaLabel, menuOptionsClass, overflowMenuRef]);
|
122
|
-
|
123
|
-
// determine display count based on space available and width of pageActions
|
124
|
-
var checkFullyVisibleItems = function checkFullyVisibleItems() {
|
125
|
-
/* istanbul ignore if */
|
126
|
-
if (sizingRef.current) {
|
127
|
-
var _refDisplayedItems$cu;
|
128
|
-
var sizingItems = Array.from(sizingRef.current.querySelectorAll(".".concat(blockClass, "__hidden-sizing-item")));
|
129
|
-
|
130
|
-
// first item is always the overflow even if nothing else is rendered
|
131
|
-
var overflowItem = sizingItems.shift();
|
132
|
-
|
133
|
-
// determine how many will fit
|
134
|
-
var spaceAvailable = (_refDisplayedItems$cu = refDisplayedItems.current) === null || _refDisplayedItems$cu === undefined ? undefined : _refDisplayedItems$cu.offsetWidth;
|
135
|
-
var willFit = 0;
|
136
|
-
var maxVisibleWidth = 0;
|
137
|
-
var fitLimit = maxVisible ? Math.min(maxVisible, sizingItems.length) : sizingItems.length;
|
138
|
-
|
139
|
-
// loop checking the space available
|
140
|
-
for (var i = 0; i < fitLimit; i++) {
|
141
|
-
var newSpaceAvailable = spaceAvailable && spaceAvailable - sizingItems[i].offsetWidth;
|
142
|
-
|
143
|
-
// update maxVisibleWidth for later use by onWidthChange
|
144
|
-
maxVisibleWidth += sizingItems[i].offsetWidth;
|
145
|
-
if (newSpaceAvailable && newSpaceAvailable >= 0) {
|
146
|
-
spaceAvailable = newSpaceAvailable;
|
147
|
-
willFit += 1;
|
148
|
-
}
|
149
|
-
}
|
150
|
-
|
151
|
-
// if not enough space for all items then make room for the overflow
|
152
|
-
var overflowWidth = overflowItem.offsetWidth;
|
153
|
-
if (willFit < sizingItems.length) {
|
154
|
-
// Check space for overflow
|
155
|
-
while (willFit > 0 && spaceAvailable && spaceAvailable < overflowWidth) {
|
156
|
-
willFit -= 1;
|
157
|
-
|
158
|
-
// Highly unlikely that any action bar item is narrower than the overflow item
|
159
|
-
|
160
|
-
// Make sure by removing items in reverse order
|
161
|
-
spaceAvailable += sizingItems[willFit].offsetWidth;
|
162
|
-
}
|
163
|
-
}
|
164
|
-
if (onWidthChange && (sizes.current.minWidth !== overflowWidth || sizes.current.maxWidth !== maxVisibleWidth)) {
|
165
|
-
sizes.current.minWidth = overflowWidth;
|
166
|
-
sizes.current.maxWidth = maxVisibleWidth;
|
167
|
-
// emit onWidthChange
|
168
|
-
onWidthChange({
|
169
|
-
minWidth: overflowWidth,
|
170
|
-
maxWidth: maxVisibleWidth
|
171
|
-
});
|
172
|
-
}
|
173
|
-
if (willFit < 1) {
|
174
|
-
setDisplayCount(0);
|
175
|
-
} else {
|
176
|
-
setDisplayCount(willFit);
|
177
|
-
}
|
178
|
-
}
|
179
|
-
};
|
180
|
-
React.useEffect(function () {
|
181
|
-
checkFullyVisibleItems();
|
182
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
183
|
-
}, [maxVisible, hiddenSizingItems]);
|
184
|
-
|
185
|
-
// /* istanbul ignore next */ // not sure how to fake window resize
|
186
|
-
var handleResize = function handleResize() {
|
187
|
-
// when the hidden sizing items change size
|
188
|
-
/* istanbul ignore next */
|
189
|
-
// not sure how to fake window resize
|
190
|
-
checkFullyVisibleItems();
|
191
|
-
};
|
192
|
-
|
193
|
-
// // resize of the items
|
194
|
-
useResizeObserver.useResizeObserver(sizingRef, handleResize);
|
195
|
-
useResizeObserver.useResizeObserver(localRef, handleResize);
|
54
|
+
var _offsetRef = React.useRef(null);
|
55
|
+
var offsetRef = overflowMenuRef || _offsetRef;
|
56
|
+
var _items = actions.map(function (action) {
|
57
|
+
return _rollupPluginBabelHelpers.objectSpread2({
|
58
|
+
id: action === null || action === undefined ? undefined : action.key
|
59
|
+
}, action);
|
60
|
+
});
|
61
|
+
var _useOverflowItems = useOverflowItems.useOverflowItems(_items, localRef, offsetRef, maxVisible, onWidthChange),
|
62
|
+
visibleItems = _useOverflowItems.visibleItems,
|
63
|
+
hiddenItems = _useOverflowItems.hiddenItems,
|
64
|
+
itemRefHandler = _useOverflowItems.itemRefHandler,
|
65
|
+
offsetRefHandler = _useOverflowItems.offsetRefHandler;
|
66
|
+
var overflowMenuItems = hiddenItems === null || hiddenItems === undefined ? undefined : hiddenItems.map(function (_ref2) {
|
67
|
+
var key = _ref2.id,
|
68
|
+
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref2, _excluded2);
|
69
|
+
return /*#__PURE__*/React.createElement(ActionBarItem.ActionBarItem, _rollupPluginBabelHelpers.extends({}, rest, {
|
70
|
+
key: key
|
71
|
+
}));
|
72
|
+
});
|
196
73
|
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({}, rest, {
|
197
74
|
className: cx([blockClass, className]),
|
198
75
|
ref: localRef
|
199
|
-
}),
|
76
|
+
}), /*#__PURE__*/React.createElement("div", {
|
200
77
|
ref: refDisplayedItems,
|
201
78
|
className: cx(["".concat(blockClass, "__displayed-items"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__displayed-items--right"), rightAlign)])
|
202
|
-
},
|
79
|
+
}, visibleItems.map(function (_ref4) {
|
80
|
+
var key = _ref4.key,
|
81
|
+
id = _ref4.id,
|
82
|
+
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref4, _excluded3);
|
83
|
+
return /*#__PURE__*/React.createElement(ActionBarItem.ActionBarItem, _rollupPluginBabelHelpers.extends({}, _rollupPluginBabelHelpers.objectSpread2({
|
84
|
+
id: id
|
85
|
+
}, rest), {
|
86
|
+
key: key,
|
87
|
+
ref: function ref(node) {
|
88
|
+
itemRefHandler(id, node);
|
89
|
+
}
|
90
|
+
}));
|
91
|
+
}), (overflowMenuItems === null || overflowMenuItems === undefined ? undefined : overflowMenuItems.length) > 0 && /*#__PURE__*/React.createElement(ActionBarOverflowItems.ActionBarOverflowItems, {
|
92
|
+
menuOptionsClass: menuOptionsClass,
|
93
|
+
overflowAriaLabel: overflowAriaLabel,
|
94
|
+
overflowMenuRef: function overflowMenuRef(node) {
|
95
|
+
return offsetRef.current = offsetRefHandler(node);
|
96
|
+
},
|
97
|
+
overflowItems: overflowMenuItems,
|
98
|
+
key: "overflow-menu-".concat(internalId.current)
|
99
|
+
})));
|
203
100
|
});
|
204
101
|
exports.ActionBar = settings.pkg.checkComponentEnabled(exports.ActionBar, componentName);
|
205
102
|
exports.ActionBar.displayName = componentName;
|
@@ -82,7 +82,7 @@ ActionBarOverflowItems.propTypes = {
|
|
82
82
|
/**@ts-ignore */
|
83
83
|
overflowMenuRef: index.default.oneOfType([index.default.shape({
|
84
84
|
current: index.default.elementType
|
85
|
-
}), index.default.object]),
|
85
|
+
}), index.default.object, index.default.func]),
|
86
86
|
/**
|
87
87
|
* Optional tab index
|
88
88
|
*/
|
@@ -11,11 +11,11 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
|
|
11
11
|
var React = require('react');
|
12
12
|
var index$1 = require('../../_virtual/index.js');
|
13
13
|
var cx = require('classnames');
|
14
|
-
var clamp = require('lodash/clamp');
|
15
14
|
var index = require('../../node_modules/@carbon/colors/es/index.js');
|
16
15
|
var devtools = require('../../global/js/utils/devtools.js');
|
17
16
|
var settings = require('../../settings.js');
|
18
17
|
var Checklist_types = require('./Checklist.types.js');
|
18
|
+
var clamp = require('../../global/js/utils/clamp.js');
|
19
19
|
|
20
20
|
var _excluded = ["className", "value", "theme"];
|
21
21
|
var blockClass = "".concat(settings.pkg.prefix, "--checklist__chart");
|
@@ -37,7 +37,7 @@ function (_ref, ref) {
|
|
37
37
|
_ref$theme = _ref.theme,
|
38
38
|
theme = _ref$theme === undefined ? defaults.theme : _ref$theme,
|
39
39
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
40
|
-
var numDegrees = clamp(value * 360, 0, 360);
|
40
|
+
var numDegrees = clamp.clamp(value * 360, 0, 360);
|
41
41
|
var circleColor = theme === Checklist_types.Themes.light ? index.gray20 : index.gray70; // $ui-03 (-ish)
|
42
42
|
var progressColor = index.purple50;
|
43
43
|
React.useEffect(function () {
|
@@ -18,7 +18,7 @@ var reactDom = require('react-dom');
|
|
18
18
|
var cx = require('classnames');
|
19
19
|
var devtools = require('../../global/js/utils/devtools.js');
|
20
20
|
var settings = require('../../settings.js');
|
21
|
-
var
|
21
|
+
var throttle = require('../../global/js/utils/throttle.js');
|
22
22
|
var react = require('@carbon/react');
|
23
23
|
var useIsomorphicEffect = require('../../global/js/hooks/useIsomorphicEffect.js');
|
24
24
|
|
@@ -151,7 +151,7 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
151
151
|
positionTune: positionTune,
|
152
152
|
isOpen: isOpen
|
153
153
|
};
|
154
|
-
var handleResize =
|
154
|
+
var handleResize = throttle.throttle(function () {
|
155
155
|
closeOverlay();
|
156
156
|
}, 2000);
|
157
157
|
|
@@ -14,7 +14,7 @@ var Carousel = require('../Carousel/Carousel.js');
|
|
14
14
|
require('../Carousel/CarouselItem.js');
|
15
15
|
var index = require('../../_virtual/index.js');
|
16
16
|
var SteppedAnimatedMedia = require('../SteppedAnimatedMedia/SteppedAnimatedMedia.js');
|
17
|
-
var
|
17
|
+
var clamp = require('../../global/js/utils/clamp.js');
|
18
18
|
var cx = require('classnames');
|
19
19
|
var devtools = require('../../global/js/utils/devtools.js');
|
20
20
|
var pconsole = require('../../global/js/utils/pconsole.js');
|
@@ -105,7 +105,7 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
105
105
|
var _scrollRef$current, _scrollRef$current$sc;
|
106
106
|
// When current step is set by props
|
107
107
|
// scroll to the appropriate view on the carrousel
|
108
|
-
var targetStep =
|
108
|
+
var targetStep = clamp.clamp(currentStep, progStepFloor, progStepCeil);
|
109
109
|
scrollRef === null || scrollRef === undefined || (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === undefined || (_scrollRef$current$sc = _scrollRef$current.scrollToView) === null || _scrollRef$current$sc === undefined || _scrollRef$current$sc.call(_scrollRef$current, targetStep);
|
110
110
|
// Avoid circular call to this hook
|
111
111
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
@@ -166,7 +166,7 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
166
166
|
disabled: scrollPosition === 0,
|
167
167
|
onClick: function onClick() {
|
168
168
|
var _scrollRef$current2, _scrollRef$current2$s;
|
169
|
-
var targetStep =
|
169
|
+
var targetStep = clamp.clamp(currentProgStep - 1, progStepFloor, progStepCeil);
|
170
170
|
scrollRef === null || scrollRef === undefined || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === undefined || (_scrollRef$current2$s = _scrollRef$current2.scrollToView) === null || _scrollRef$current2$s === undefined || _scrollRef$current2$s.call(_scrollRef$current2, targetStep);
|
171
171
|
setCurrentProgStep(targetStep);
|
172
172
|
onBack === null || onBack === undefined || onBack();
|
@@ -178,7 +178,7 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
178
178
|
disabled: scrollPosition === 1,
|
179
179
|
onClick: function onClick() {
|
180
180
|
var _scrollRef$current3, _scrollRef$current3$s;
|
181
|
-
var targetStep =
|
181
|
+
var targetStep = clamp.clamp(currentProgStep + 1, progStepFloor, progStepCeil);
|
182
182
|
scrollRef === null || scrollRef === undefined || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === undefined || (_scrollRef$current3$s = _scrollRef$current3.scrollToView) === null || _scrollRef$current3$s === undefined || _scrollRef$current3$s.call(_scrollRef$current3, targetStep);
|
183
183
|
setCurrentProgStep(targetStep);
|
184
184
|
onNext === null || onNext === undefined || onNext();
|
@@ -191,11 +191,11 @@ var ConditionBuilderItem = function ConditionBuilderItem(_ref) {
|
|
191
191
|
role: "dialog",
|
192
192
|
"aria-label": title,
|
193
193
|
onKeyDown: handleKeyDownHandler
|
194
|
-
}, /*#__PURE__*/React.createElement(react.Layer, null, /*#__PURE__*/React.createElement(
|
194
|
+
}, /*#__PURE__*/React.createElement(react.Layer, null, /*#__PURE__*/React.createElement(react.Section, null, /*#__PURE__*/React.createElement(react.Heading, {
|
195
195
|
className: "".concat(util.blockClass, "__item__title")
|
196
196
|
}, title), /*#__PURE__*/React.createElement("div", {
|
197
197
|
className: "".concat(util.blockClass, "__popover-content")
|
198
|
-
}, renderChildren ? renderChildren(popoverRef) : children))));
|
198
|
+
}, renderChildren ? renderChildren(popoverRef) : children)))));
|
199
199
|
};
|
200
200
|
ConditionBuilderItem.propTypes = {
|
201
201
|
/**
|
@@ -13,6 +13,7 @@ var react = require('@carbon/react');
|
|
13
13
|
var index = require('../../../../_virtual/index.js');
|
14
14
|
var useTranslations = require('../../utils/useTranslations.js');
|
15
15
|
var util = require('../../utils/util.js');
|
16
|
+
var ConditionBuilderProvider = require('../../ConditionBuilderContext/ConditionBuilderProvider.js');
|
16
17
|
|
17
18
|
var ConditionBuilderItemDate = function ConditionBuilderItemDate(_ref) {
|
18
19
|
var conditionState = _ref.conditionState,
|
@@ -23,6 +24,8 @@ var ConditionBuilderItemDate = function ConditionBuilderItemDate(_ref) {
|
|
23
24
|
_useTranslations2 = _rollupPluginBabelHelpers.slicedToArray(_useTranslations, 2),
|
24
25
|
startText = _useTranslations2[0],
|
25
26
|
endText = _useTranslations2[1];
|
27
|
+
var _useContext = React.useContext(ConditionBuilderProvider.ConditionBuilderContext);
|
28
|
+
_useContext.conditionBuilderRef;
|
26
29
|
var datePickerType = conditionState.operator == 'between' ? 'range' : 'single';
|
27
30
|
var onCloseHandler = function onCloseHandler(selectedDate) {
|
28
31
|
onChange(selectedDate && selectedDate.length > 0 ? selectedDate : 'INVALID');
|
@@ -29,6 +29,8 @@ var ItemOption = function ItemOption(_ref) {
|
|
29
29
|
_useTranslations2 = _rollupPluginBabelHelpers.slicedToArray(_useTranslations, 2),
|
30
30
|
propertyText = _useTranslations2[0],
|
31
31
|
clearSearchText = _useTranslations2[1];
|
32
|
+
var _useContext2 = React.useContext(ConditionBuilderProvider.ConditionBuilderContext),
|
33
|
+
conditionBuilderRef = _useContext2.conditionBuilderRef;
|
32
34
|
var allOptions = config.options;
|
33
35
|
var _useState = React.useState(''),
|
34
36
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
@@ -77,7 +79,10 @@ var ItemOption = function ItemOption(_ref) {
|
|
77
79
|
size: "sm",
|
78
80
|
labelText: clearSearchText,
|
79
81
|
closeButtonLabelText: clearSearchText,
|
80
|
-
onChange: onSearchChangeHandler
|
82
|
+
onChange: onSearchChangeHandler,
|
83
|
+
onKeyDown: function onKeyDown(evt) {
|
84
|
+
return util.onKeyDownHandlerForSearch(evt, conditionBuilderRef);
|
85
|
+
}
|
81
86
|
})), /*#__PURE__*/React.createElement("ul", {
|
82
87
|
"aria-label": getAriaLabel(),
|
83
88
|
role: "listbox"
|
@@ -32,6 +32,8 @@ var ItemOptionForValueField = function ItemOptionForValueField(_ref) {
|
|
32
32
|
_useTranslations2 = _rollupPluginBabelHelpers.slicedToArray(_useTranslations, 2),
|
33
33
|
propertyText = _useTranslations2[0],
|
34
34
|
clearSearchText = _useTranslations2[1];
|
35
|
+
var _useContext2 = React.useContext(ConditionBuilderProvider.ConditionBuilderContext),
|
36
|
+
conditionBuilderRef = _useContext2.conditionBuilderRef;
|
35
37
|
var contentRef = React.useRef(null);
|
36
38
|
var _useState = React.useState(config.options),
|
37
39
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
@@ -151,7 +153,10 @@ var ItemOptionForValueField = function ItemOptionForValueField(_ref) {
|
|
151
153
|
size: "sm",
|
152
154
|
labelText: clearSearchText,
|
153
155
|
closeButtonLabelText: clearSearchText,
|
154
|
-
onChange: onSearchChangeHandler
|
156
|
+
onChange: onSearchChangeHandler,
|
157
|
+
onKeyDown: function onKeyDown(evt) {
|
158
|
+
return util.onKeyDownHandlerForSearch(evt, conditionBuilderRef);
|
159
|
+
}
|
155
160
|
})), multiSelectable && /*#__PURE__*/React.createElement("div", {
|
156
161
|
className: "".concat(util.blockClass, "__multiselectSelectionStatusContainer")
|
157
162
|
}, /*#__PURE__*/React.createElement("label", null, selection.length, "/", allOptions.length, " Selected"), /*#__PURE__*/React.createElement(react.Button, {
|
@@ -26,7 +26,7 @@ var handleKeyDownForPopover = function handleKeyDownForPopover(evt, conditionBui
|
|
26
26
|
|
27
27
|
//skipping keyboard handling for date and time fields to get take carbon's
|
28
28
|
var excludeKeyPress = function excludeKeyPress(evt) {
|
29
|
-
return !['Escape'].includes(evt.key) &&
|
29
|
+
return !['Escape'].includes(evt.key) && evt.target.closest(".".concat(util.blockClass, "__item-date"));
|
30
30
|
};
|
31
31
|
var handleKeyPressForPopover = function handleKeyPressForPopover(evt, parentContainer, conditionBuilderRef) {
|
32
32
|
var _parentContainer$quer, _parentContainer$quer2, _evt$target$closest$q, _evt$target$closest;
|
@@ -82,23 +82,23 @@ var handleKeyPressForPopover = function handleKeyPressForPopover(evt, parentCont
|
|
82
82
|
}
|
83
83
|
break;
|
84
84
|
case 'Enter':
|
85
|
-
if (
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
(_document$activeEleme2 = document.activeElement) === null || _document$activeEleme2 === undefined || _document$activeEleme2.click();
|
91
|
-
}
|
92
|
-
} else {
|
93
|
-
if (document.activeElement.type !== 'button') {
|
94
|
-
var _document$activeEleme3;
|
95
|
-
//for button , enter key is click which already handled by framework, else trigger click
|
96
|
-
util.focusThisField(evt, conditionBuilderRef);
|
97
|
-
(_document$activeEleme3 = document.activeElement) === null || _document$activeEleme3 === undefined || _document$activeEleme3.click();
|
98
|
-
}
|
85
|
+
if (document.activeElement.type !== 'button') {
|
86
|
+
var _document$activeEleme2;
|
87
|
+
//for button , enter key is click which already handled by framework, else trigger click
|
88
|
+
util.focusThisField(evt, conditionBuilderRef);
|
89
|
+
(_document$activeEleme2 = document.activeElement) === null || _document$activeEleme2 === undefined || _document$activeEleme2.click();
|
99
90
|
}
|
100
91
|
break;
|
101
92
|
}
|
93
|
+
} else {
|
94
|
+
if (key === 'Enter' && !isHoldingShiftKey) {
|
95
|
+
if (document.activeElement.type !== 'button') {
|
96
|
+
var _document$activeEleme3;
|
97
|
+
//for button , enter key is click which already handled by framework, else trigger click
|
98
|
+
util.focusThisField(evt, conditionBuilderRef);
|
99
|
+
(_document$activeEleme3 = document.activeElement) === null || _document$activeEleme3 === undefined || _document$activeEleme3.click();
|
100
|
+
}
|
101
|
+
}
|
102
102
|
}
|
103
103
|
};
|
104
104
|
var handleKeyPressForMainContent = function handleKeyPressForMainContent(evt, conditionBuilderRef, variant) {
|
@@ -10,3 +10,4 @@ export function checkIsValid(item: any): any;
|
|
10
10
|
export function manageTabIndexAndFocus(currentElement: any, conditionBuilderRef: any): void;
|
11
11
|
export function getValue(type: any, value: any, config: any): any;
|
12
12
|
export function checkForMultiSelectOperator(condition: any, config: any): any;
|
13
|
+
export function onKeyDownHandlerForSearch(evt: any, conditionBuilderRef: any): void;
|
@@ -123,6 +123,12 @@ var checkForMultiSelectOperator = function checkForMultiSelectOperator(condition
|
|
123
123
|
return (condition === null || condition === undefined ? undefined : condition.operator) === operator.id && operator.isMultiSelect;
|
124
124
|
}));
|
125
125
|
};
|
126
|
+
//this will close the popover on escape key on search box
|
127
|
+
var onKeyDownHandlerForSearch = function onKeyDownHandlerForSearch(evt, conditionBuilderRef) {
|
128
|
+
if (!evt.currentTarget.value && evt.key === 'Escape') {
|
129
|
+
focusThisField(evt, conditionBuilderRef);
|
130
|
+
}
|
131
|
+
};
|
126
132
|
|
127
133
|
exports.HIERARCHICAL_VARIANT = HIERARCHICAL_VARIANT;
|
128
134
|
exports.NON_HIERARCHICAL_VARIANT = NON_HIERARCHICAL_VARIANT;
|
@@ -134,5 +140,6 @@ exports.focusThisField = focusThisField;
|
|
134
140
|
exports.focusThisItem = focusThisItem;
|
135
141
|
exports.getValue = getValue;
|
136
142
|
exports.manageTabIndexAndFocus = manageTabIndexAndFocus;
|
143
|
+
exports.onKeyDownHandlerForSearch = onKeyDownHandlerForSearch;
|
137
144
|
exports.traverseClockVise = traverseClockVise;
|
138
145
|
exports.traverseReverse = traverseReverse;
|
@@ -7,10 +7,8 @@
|
|
7
7
|
|
8
8
|
'use strict';
|
9
9
|
|
10
|
-
var isBoolean = require('lodash/isBoolean');
|
11
|
-
|
12
10
|
var isColumnVisible = function isColumnVisible(colDef) {
|
13
|
-
return
|
11
|
+
return typeof colDef.isVisible === 'boolean' ? colDef.isVisible : true;
|
14
12
|
};
|
15
13
|
|
16
14
|
exports.isColumnVisible = isColumnVisible;
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../../../../../_virtual/_rollupPluginBabelHelpers.js');
|
13
13
|
var React = require('react');
|
14
|
-
var
|
14
|
+
var deepCompareObject = require('../../../../../../global/js/utils/deepCompareObject.js');
|
15
15
|
|
16
16
|
/**
|
17
17
|
* Keeps track of the button disabled state
|
@@ -29,7 +29,7 @@ var useShouldDisableButtons = function useShouldDisableButtons(_ref) {
|
|
29
29
|
shouldDisableButtons = _useState2[0],
|
30
30
|
setShouldDisableButtons = _useState2[1];
|
31
31
|
React.useEffect(function updateDisabledButtonsState() {
|
32
|
-
setShouldDisableButtons(
|
32
|
+
setShouldDisableButtons(deepCompareObject.deepCompareObject(filtersState, JSON.parse(prevFiltersRef.current)));
|
33
33
|
}, [filtersState, prevFiltersRef]);
|
34
34
|
return [shouldDisableButtons, setShouldDisableButtons];
|
35
35
|
};
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
12
12
|
var React = require('react');
|
13
13
|
var index = require('../../../../../_virtual/index.js');
|
14
14
|
var react = require('@carbon/react');
|
15
|
-
var isArray = require('lodash/isArray');
|
16
15
|
var settings = require('../../../../../settings.js');
|
17
16
|
|
18
17
|
var blockClass = "".concat(settings.pkg.prefix, "--datagrid__row-size");
|
@@ -40,7 +39,7 @@ var RowSizeRadioGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
40
39
|
orientation: "vertical",
|
41
40
|
defaultSelected: getBackwardCompatibleRowSize(selectedOption),
|
42
41
|
onChange: onChange
|
43
|
-
}, rowSizes && isArray(rowSizes) && rowSizes.map(function (option) {
|
42
|
+
}, rowSizes && Array.isArray(rowSizes) && rowSizes.map(function (option) {
|
44
43
|
var labelText;
|
45
44
|
try {
|
46
45
|
labelText = option.labelText || rowSizeLabels[option.value];
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
13
13
|
var React = require('react');
|
14
14
|
var reactTable = require('react-table');
|
15
|
-
var uniqueId = require('lodash/uniqueId');
|
16
15
|
var useSkeletonRows = require('./useSkeletonRows.js');
|
17
16
|
var useDefaultStringRenderer = require('./useDefaultStringRenderer.js');
|
18
17
|
var useRowRenderer = require('./useRowRenderer.js');
|
@@ -21,6 +20,7 @@ var DatagridHeaderRow = require('./Datagrid/DatagridHeaderRow.js');
|
|
21
20
|
var useFlexResize = require('./useFlexResize.js');
|
22
21
|
var useFloatingScroll = require('./useFloatingScroll.js');
|
23
22
|
var stateReducer = require('./Datagrid/addons/stateReducer.js');
|
23
|
+
var uuidv4 = require('../../global/js/utils/uuidv4.js');
|
24
24
|
|
25
25
|
var useDatagrid = function useDatagrid(params) {
|
26
26
|
var defaultPlugins = [reactTable.useFlexLayout, DatagridHeaderRow.default, useSkeletonRows.default, reactTable.useResizeColumns, useRowRenderer.default, useDefaultStringRenderer.default, useRowSize.default, reactTable.useFilters, reactTable.useGlobalFilter, reactTable.useSortBy, reactTable.useExpanded];
|
@@ -38,7 +38,7 @@ var useDatagrid = function useDatagrid(params) {
|
|
38
38
|
minWidth: 50
|
39
39
|
};
|
40
40
|
var tableId = React.useMemo(function () {
|
41
|
-
return
|
41
|
+
return uuidv4.default('datagrid-table-id');
|
42
42
|
}, []);
|
43
43
|
for (var _len = arguments.length, plugins = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
44
44
|
plugins[_key - 1] = arguments[_key];
|
@@ -10,7 +10,7 @@
|
|
10
10
|
Object.defineProperty(exports, '__esModule', { value: true });
|
11
11
|
|
12
12
|
var React = require('react');
|
13
|
-
var debounce = require('
|
13
|
+
var debounce = require('../../global/js/utils/debounce.js');
|
14
14
|
var useParentDimensions = require('./useParentDimensions.js');
|
15
15
|
var useResizeTable = require('./useResizeTable.js');
|
16
16
|
|
@@ -34,10 +34,7 @@ var useInfiniteScroll = function useInfiniteScroll(hooks) {
|
|
34
34
|
var loadMoreThresholdValue = typeof loadMoreThreshold === 'number' ? loadMoreThreshold : 200;
|
35
35
|
var emptyFetchData = function emptyFetchData() {};
|
36
36
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
37
|
-
var fetchMore = React.useCallback(debounce(fetchMoreData || emptyFetchData, 3000,
|
38
|
-
leading: true,
|
39
|
-
trailing: false
|
40
|
-
}), [fetchMoreData]);
|
37
|
+
var fetchMore = React.useCallback(debounce.debounce(fetchMoreData || emptyFetchData, 3000), [fetchMoreData]);
|
41
38
|
var onScroll = function onScroll(_ref2) {
|
42
39
|
var scrollDirection = _ref2.scrollDirection,
|
43
40
|
scrollOffset = _ref2.scrollOffset;
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
13
13
|
var React = require('react');
|
14
|
-
var debounce = require('
|
14
|
+
var debounce = require('../../global/js/utils/debounce.js');
|
15
15
|
|
16
16
|
var useRowIsMouseOver = function useRowIsMouseOver(hooks) {
|
17
17
|
var useInstance = function useInstance(instance) {
|
@@ -24,6 +24,7 @@ var useRowIsMouseOver = function useRowIsMouseOver(hooks) {
|
|
24
24
|
setMouseOverRowIndex(row === null || row === undefined ? undefined : row.index);
|
25
25
|
}, 100);
|
26
26
|
var getRowProps = function getRowProps(props, datagridState) {
|
27
|
+
// @ts-expect-error
|
27
28
|
var onMouseOver = function onMouseOver() {
|
28
29
|
return onMouseChange(datagridState);
|
29
30
|
};
|
@@ -49,7 +50,7 @@ var useRowIsMouseOver = function useRowIsMouseOver(hooks) {
|
|
49
50
|
var useDebounce = function useDebounce(fn, wait) {
|
50
51
|
return (
|
51
52
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
52
|
-
React.useCallback(debounce(fn, wait), [])
|
53
|
+
React.useCallback(debounce.debounce(fn, wait), [])
|
53
54
|
);
|
54
55
|
};
|
55
56
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
13
13
|
var React = require('react');
|
14
|
-
var debounce = require('
|
14
|
+
var debounce = require('../../global/js/utils/debounce.js');
|
15
15
|
var cx = require('classnames');
|
16
16
|
var settings = require('../../settings.js');
|
17
17
|
|
@@ -60,7 +60,7 @@ var useStickyColumn = function useStickyColumn(hooks) {
|
|
60
60
|
var _headerCellElement$cl;
|
61
61
|
headerCellElement === null || headerCellElement === undefined || (_headerCellElement$cl = headerCellElement.classList) === null || _headerCellElement$cl === undefined || _headerCellElement$cl.add(OFFSET_SCROLL_CLASS);
|
62
62
|
}
|
63
|
-
var boundListener = debounce(onBodyResize.bind(null, tableBodyElement, headerCellElement), 250);
|
63
|
+
var boundListener = debounce.debounce(onBodyResize.bind(null, tableBodyElement, headerCellElement), 250);
|
64
64
|
/* istanbul ignore next */
|
65
65
|
if (typeof window !== 'undefined') {
|
66
66
|
window.addEventListener('resize', boundListener);
|