@carbon/ibm-products 2.43.2-canary.300 → 2.43.2-canary.302
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 +12 -12
- 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 +6 -6
- 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 +12 -12
- 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 +6 -6
- 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/APIKeyModal/APIKeyModal.js +1 -1
- package/es/components/AboutModal/AboutModal.js +1 -1
- package/es/components/Coachmark/Coachmark.js +2 -2
- package/es/components/Coachmark/utils/hooks.js +1 -1
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +2 -2
- package/es/components/CoachmarkStack/CoachmarkStack.js +1 -1
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +4 -4
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +5 -5
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +5 -5
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -1
- package/es/components/Datagrid/useNestedRowExpander.js +2 -2
- package/es/components/Datagrid/useParentDimensions.js +5 -5
- package/es/components/Datagrid/useRowExpander.js +2 -2
- package/es/components/Datagrid/useStickyColumn.js +3 -3
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
- package/es/components/InterstitialScreen/InterstitialScreen.js +4 -4
- package/es/components/ScrollGradient/ScrollGradient.js +2 -2
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +1 -1
- package/es/components/Tearsheet/TearsheetShell.d.ts +13 -4
- package/es/components/Tearsheet/TearsheetShell.js +18 -11
- package/es/components/Toolbar/Toolbar.js +1 -1
- package/es/components/TruncatedList/TruncatedList.js +1 -1
- package/es/global/js/hooks/usePreviousValue.js +1 -1
- package/lib/components/APIKeyModal/APIKeyModal.js +1 -1
- package/lib/components/AboutModal/AboutModal.js +1 -1
- package/lib/components/Coachmark/Coachmark.js +2 -2
- package/lib/components/Coachmark/utils/hooks.js +1 -1
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +2 -2
- package/lib/components/CoachmarkStack/CoachmarkStack.js +1 -1
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +4 -4
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +5 -5
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +5 -5
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +1 -1
- package/lib/components/Datagrid/useNestedRowExpander.js +2 -2
- package/lib/components/Datagrid/useParentDimensions.js +5 -5
- package/lib/components/Datagrid/useRowExpander.js +2 -2
- package/lib/components/Datagrid/useStickyColumn.js +3 -3
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
- package/lib/components/InterstitialScreen/InterstitialScreen.js +4 -4
- package/lib/components/ScrollGradient/ScrollGradient.js +2 -2
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +1 -1
- package/lib/components/Tearsheet/TearsheetShell.d.ts +13 -4
- package/lib/components/Tearsheet/TearsheetShell.js +18 -11
- package/lib/components/Toolbar/Toolbar.js +1 -1
- package/lib/components/TruncatedList/TruncatedList.js +1 -1
- package/lib/global/js/hooks/usePreviousValue.js +1 -1
- package/package.json +3 -3
- package/scss/components/Tearsheet/_tearsheet.scss +13 -3
@@ -89,7 +89,7 @@ var CoachmarkStack = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
89
89
|
setParentHeight = _useState6[1];
|
90
90
|
// parent height = child height when stacked behind a child that is shorter
|
91
91
|
var childArray = Children.toArray(children);
|
92
|
-
var mountedRef = useRef();
|
92
|
+
var mountedRef = useRef(undefined);
|
93
93
|
// same value as CSS animation speed
|
94
94
|
var delayMs = 240;
|
95
95
|
|
@@ -84,7 +84,7 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
|
|
84
84
|
totalVisibleColumns = _ref.totalVisibleColumns,
|
85
85
|
rest = _objectWithoutProperties(_ref, _excluded);
|
86
86
|
var multiKeyTrackingRef = useRef(null);
|
87
|
-
var localRef = useRef();
|
87
|
+
var localRef = useRef(undefined);
|
88
88
|
var spreadsheetRef = ref || localRef;
|
89
89
|
var focusedElement = useActiveElement();
|
90
90
|
var _useState = useState(columns),
|
@@ -151,13 +151,13 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
|
|
151
151
|
selectedHeaderReorderActive: selectedHeaderReorderActive
|
152
152
|
}) || {};
|
153
153
|
var cellSizeValue = getCellSize(cellSize);
|
154
|
-
var cellEditorRef = useRef();
|
154
|
+
var cellEditorRef = useRef(undefined);
|
155
155
|
var _useState29 = useState(),
|
156
156
|
_useState30 = _slicedToArray(_useState29, 2),
|
157
157
|
activeCellContent = _useState30[0],
|
158
158
|
setActiveCellContent = _useState30[1];
|
159
|
-
var activeCellRef = useRef();
|
160
|
-
var cellEditorRulerRef = useRef();
|
159
|
+
var activeCellRef = useRef(undefined);
|
160
|
+
var cellEditorRulerRef = useRef(undefined);
|
161
161
|
var hasCustomRowHeader = typeof renderRowHeader === 'function';
|
162
162
|
var maxNumRowsCount = data.length.toString().length;
|
163
163
|
var defaultColumn = useMemo(function () {
|
@@ -65,7 +65,7 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
65
65
|
_useState2 = _slicedToArray(_useState, 2),
|
66
66
|
validStartingPoint = _useState2[0],
|
67
67
|
setValidStartingPoint = _useState2[1];
|
68
|
-
var contentScrollRef = useRef();
|
68
|
+
var contentScrollRef = useRef(undefined);
|
69
69
|
var previousState = usePreviousValue({
|
70
70
|
selectionAreaData: selectionAreaData,
|
71
71
|
clickAndHoldActive: clickAndHoldActive,
|
@@ -377,7 +377,7 @@ var DataSpreadsheetBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
377
377
|
}));
|
378
378
|
}
|
379
379
|
}, [prepareRow, renderRowHeader, renderRowHeaderDirection, rows, hasCustomRowHeader, activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row, selectionAreas, handleRowHeaderClickEvent, handleBodyCellClickEvent, handleBodyCellHoverEvent, defaultColumn, columns]);
|
380
|
-
var spreadsheetBodyRef = useRef();
|
380
|
+
var spreadsheetBodyRef = useRef(undefined);
|
381
381
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
382
382
|
ref: spreadsheetBodyRef,
|
383
383
|
className: cx("".concat(blockClass, "__body--container"))
|
package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js
CHANGED
@@ -59,7 +59,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
|
|
59
59
|
_useState10 = _slicedToArray(_useState9, 2),
|
60
60
|
isDirty = _useState10[0],
|
61
61
|
setIsDirty = _useState10[1];
|
62
|
-
var prevColumnDefinitions = useRef();
|
62
|
+
var prevColumnDefinitions = useRef(undefined);
|
63
63
|
var onRequestClose = function onRequestClose() {
|
64
64
|
setColumnObjects(columnDefinitions);
|
65
65
|
setIsTearsheetOpen(false);
|
@@ -103,11 +103,11 @@ var FilterPanel = function FilterPanel(_ref) {
|
|
103
103
|
lastAppliedFilters = _useFilters.lastAppliedFilters;
|
104
104
|
|
105
105
|
/** Refs */
|
106
|
-
var filterPanelRef = useRef();
|
107
|
-
var filterHeadingRef = useRef();
|
108
|
-
var filterSearchRef = useRef();
|
109
|
-
var actionSetRef = useRef();
|
110
|
-
var innerContainerRef = useRef();
|
106
|
+
var filterPanelRef = useRef(undefined);
|
107
|
+
var filterHeadingRef = useRef(undefined);
|
108
|
+
var filterSearchRef = useRef(undefined);
|
109
|
+
var actionSetRef = useRef(undefined);
|
110
|
+
var innerContainerRef = useRef(undefined);
|
111
111
|
/** State from hooks */
|
112
112
|
var _useShouldDisableButt = useShouldDisableButtons({
|
113
113
|
initialValue: true,
|
@@ -49,13 +49,13 @@ var useFilters = function useFilters(_ref) {
|
|
49
49
|
var previousState = usePreviousValue({
|
50
50
|
panelOpen: panelOpen
|
51
51
|
});
|
52
|
-
var filteredItemsRef = useRef();
|
52
|
+
var filteredItemsRef = useRef(undefined);
|
53
53
|
|
54
54
|
// When using batch actions we have to store the filters to then apply them later
|
55
55
|
var prevFiltersRef = useRef(JSON.stringify(filtersState));
|
56
56
|
var lastAppliedFilters = useRef(JSON.stringify(reactTableFiltersState));
|
57
57
|
var prevFiltersObjectArrayRef = useRef(JSON.stringify(filtersObjectArray));
|
58
|
-
var holdingPrevFiltersRef = useRef();
|
58
|
+
var holdingPrevFiltersRef = useRef(undefined);
|
59
59
|
var holdingLastAppliedFiltersRef = useRef([]);
|
60
60
|
var holdingPrevFiltersObjectArrayRef = useRef([]);
|
61
61
|
|
@@ -66,11 +66,11 @@ var InlineEditCell = function InlineEditCell(_ref) {
|
|
66
66
|
});
|
67
67
|
var _ref2 = config || {},
|
68
68
|
inputProps = _ref2.inputProps;
|
69
|
-
var textInputRef = useRef();
|
70
|
-
var checkboxRef = useRef();
|
71
|
-
var numberInputRef = useRef();
|
72
|
-
var dropdownRef = useRef();
|
73
|
-
var outerButtonElement = useRef();
|
69
|
+
var textInputRef = useRef(undefined);
|
70
|
+
var checkboxRef = useRef(undefined);
|
71
|
+
var numberInputRef = useRef(undefined);
|
72
|
+
var dropdownRef = useRef(undefined);
|
73
|
+
var outerButtonElement = useRef(undefined);
|
74
74
|
var rowSize = instance.rowSize,
|
75
75
|
onDataUpdate = instance.onDataUpdate;
|
76
76
|
var saveCellData;
|
@@ -23,7 +23,7 @@ var RowSizeDropdown = function RowSizeDropdown(_ref) {
|
|
23
23
|
_ref$legendText = _ref.legendText,
|
24
24
|
legendText = _ref$legendText === void 0 ? 'Row settings' : _ref$legendText,
|
25
25
|
props = _objectWithoutProperties(_ref, _excluded);
|
26
|
-
var radioGroupRef = useRef();
|
26
|
+
var radioGroupRef = useRef(undefined);
|
27
27
|
var _React$useState = React__default.useState(false),
|
28
28
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
29
29
|
isOpen = _React$useState2[0],
|
@@ -15,8 +15,8 @@ import { handleDynamicRowCheck } from './Datagrid/addons/stateReducer.js';
|
|
15
15
|
|
16
16
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
17
17
|
var useNestedRowExpander = function useNestedRowExpander(hooks) {
|
18
|
-
var tempState = useRef();
|
19
|
-
var lastExpandedRowIndex = useRef();
|
18
|
+
var tempState = useRef(undefined);
|
19
|
+
var lastExpandedRowIndex = useRef(undefined);
|
20
20
|
var useInstance = function useInstance(instance) {
|
21
21
|
tempState.current = instance;
|
22
22
|
};
|
@@ -9,11 +9,11 @@ import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBab
|
|
9
9
|
import { useRef, useState } from 'react';
|
10
10
|
|
11
11
|
var useParentDimensions = function useParentDimensions(hooks) {
|
12
|
-
var rootRef = useRef();
|
13
|
-
var headRef = useRef();
|
14
|
-
var innerListRef = useRef();
|
15
|
-
var listRef = useRef();
|
16
|
-
var gridRef = useRef();
|
12
|
+
var rootRef = useRef(undefined);
|
13
|
+
var headRef = useRef(undefined);
|
14
|
+
var innerListRef = useRef(undefined);
|
15
|
+
var listRef = useRef(undefined);
|
16
|
+
var gridRef = useRef(undefined);
|
17
17
|
var _useState = useState(),
|
18
18
|
_useState2 = _slicedToArray(_useState, 2),
|
19
19
|
tableHeight = _useState2[0],
|
@@ -14,8 +14,8 @@ import { useFocusRowExpander } from './useFocusRowExpander.js';
|
|
14
14
|
|
15
15
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
16
16
|
var useRowExpander = function useRowExpander(hooks) {
|
17
|
-
var tempState = useRef();
|
18
|
-
var lastExpandedRowIndex = useRef();
|
17
|
+
var tempState = useRef(undefined);
|
18
|
+
var lastExpandedRowIndex = useRef(undefined);
|
19
19
|
var useInstance = function useInstance(instance) {
|
20
20
|
tempState.current = instance;
|
21
21
|
};
|
@@ -16,9 +16,9 @@ var styleClassPrefix = "".concat(blockClass, "__right-sticky-column");
|
|
16
16
|
var leftStickyStyleClassPrefix = "".concat(blockClass, "__left-sticky-column");
|
17
17
|
var OFFSET_SCROLL_CLASS = "".concat(styleClassPrefix, "-offset-scroll");
|
18
18
|
var useStickyColumn = function useStickyColumn(hooks) {
|
19
|
-
var tableBodyRef = useRef();
|
20
|
-
var stickyHeaderCellRef = useRef();
|
21
|
-
var _useState = useState(),
|
19
|
+
var tableBodyRef = useRef(undefined);
|
20
|
+
var stickyHeaderCellRef = useRef(undefined);
|
21
|
+
var _useState = useState(undefined),
|
22
22
|
_useState2 = _slicedToArray(_useState, 2),
|
23
23
|
windowSize = _useState2[0],
|
24
24
|
setWindowSize = _useState2[1];
|
package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js
CHANGED
@@ -51,7 +51,7 @@ var FilterPanelCheckboxWithOverflow = /*#__PURE__*/React__default.forwardRef(fun
|
|
51
51
|
setShowMenuButton = _useState4[1];
|
52
52
|
// Destructure overflow menu properties.
|
53
53
|
var other = _extends({}, (_objectDestructuringEmpty(overflowMenuProps), overflowMenuProps));
|
54
|
-
var backupRef = useRef();
|
54
|
+
var backupRef = useRef(undefined);
|
55
55
|
var localRef = ref || backupRef;
|
56
56
|
var setHideButton = function setHideButton(activeElement) {
|
57
57
|
if (!menuIsOpen && !localRef.current.contains(activeElement)) {
|
@@ -90,11 +90,11 @@ var InterstitialScreen = /*#__PURE__*/React__default.forwardRef(function (_ref,
|
|
90
90
|
_ref$skipButtonLabel = _ref.skipButtonLabel,
|
91
91
|
skipButtonLabel = _ref$skipButtonLabel === void 0 ? defaults.skipButtonLabel : _ref$skipButtonLabel,
|
92
92
|
rest = _objectWithoutProperties(_ref, _excluded);
|
93
|
-
var backupRef = useRef();
|
93
|
+
var backupRef = useRef(undefined);
|
94
94
|
var _forwardedRef = ref || backupRef;
|
95
|
-
var scrollRef = useRef();
|
96
|
-
var startButtonRef = useRef();
|
97
|
-
var nextButtonRef = useRef();
|
95
|
+
var scrollRef = useRef(undefined);
|
96
|
+
var startButtonRef = useRef(undefined);
|
97
|
+
var nextButtonRef = useRef(undefined);
|
98
98
|
var _useState = useState(null),
|
99
99
|
_useState2 = _slicedToArray(_useState, 2),
|
100
100
|
isVisibleClass = _useState2[0],
|
@@ -50,8 +50,8 @@ var ScrollGradient = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
50
50
|
_useState4 = _slicedToArray(_useState3, 2),
|
51
51
|
horizontalPosition = _useState4[0],
|
52
52
|
setHorizontalPosition = _useState4[1];
|
53
|
-
var scrollContainer = useRef();
|
54
|
-
var contentChildrenContainer = useRef();
|
53
|
+
var scrollContainer = useRef(undefined);
|
54
|
+
var contentChildrenContainer = useRef(undefined);
|
55
55
|
var updateScrollState = throttle(function () {
|
56
56
|
var updatedVerticalVal = getScrollState(scrollContainer.current, ScrollDirection.Y);
|
57
57
|
var updatedHorizontalVal = getScrollState(scrollContainer.current, ScrollDirection.X);
|
@@ -39,7 +39,7 @@ var SteppedAnimatedMedia = /*#__PURE__*/React__default.forwardRef(function (_ref
|
|
39
39
|
_useState2 = _slicedToArray(_useState, 2),
|
40
40
|
jsonData = _useState2[0],
|
41
41
|
setJsonData = _useState2[1];
|
42
|
-
var animRef = useRef();
|
42
|
+
var animRef = useRef(undefined);
|
43
43
|
var backupRef = useRef(null);
|
44
44
|
var localRef = ref !== null && ref !== void 0 ? ref : backupRef;
|
45
45
|
var localRefValue = localRef.current;
|
@@ -10,6 +10,11 @@ import PropTypes from 'prop-types';
|
|
10
10
|
import { type ButtonProps } from '@carbon/react';
|
11
11
|
interface TearsheetShellProps extends PropsWithChildren {
|
12
12
|
actions?: ButtonProps<'button'>[];
|
13
|
+
/**
|
14
|
+
* Optional prop that is intended for any scenario where something is being generated by AI to reinforce AI transparency,
|
15
|
+
* accountability, and explainability at the UI level.
|
16
|
+
*/
|
17
|
+
aiLabel?: ReactNode;
|
13
18
|
ariaLabel?: string;
|
14
19
|
/**
|
15
20
|
* An optional class or classes to be added to the outermost element.
|
@@ -96,15 +101,15 @@ interface TearsheetShellProps extends PropsWithChildren {
|
|
96
101
|
* Specifies the width of the tearsheet, 'narrow' or 'wide'.
|
97
102
|
*/
|
98
103
|
size: 'narrow' | 'wide';
|
99
|
-
/**
|
100
|
-
* **Experimental:** Provide a `Slug` component to be rendered inside the `Tearsheet` component
|
101
|
-
*/
|
102
|
-
slug?: ReactNode;
|
103
104
|
/**
|
104
105
|
* The main title of the tearsheet, displayed in the header area.
|
105
106
|
*/
|
106
107
|
title?: ReactNode;
|
107
108
|
verticalPosition?: 'normal' | 'lower';
|
109
|
+
/**
|
110
|
+
* @deprecated Property replaced by `aiLabel`
|
111
|
+
*/
|
112
|
+
slug?: ReactNode;
|
108
113
|
}
|
109
114
|
export type CloseIconDescriptionTypes = {
|
110
115
|
hasCloseIcon?: false;
|
@@ -126,6 +131,10 @@ export declare const tearsheetHasCloseIcon: (actions: any, hasCloseIcon: any) =>
|
|
126
131
|
export declare const TearsheetShell: React.ForwardRefExoticComponent<(TearsheetShellProps & CloseIconDescriptionTypes) & React.RefAttributes<HTMLDivElement>>;
|
127
132
|
export declare const portalType: PropTypes.Requireable<object>;
|
128
133
|
export declare const deprecatedProps: {
|
134
|
+
/**
|
135
|
+
* @deprecated Property replaced by `aiLabel`
|
136
|
+
*/
|
137
|
+
slug: (props: any, propName: any, comp: any, loc: any, propFullName: any, secret: any) => any;
|
129
138
|
/**
|
130
139
|
* **Deprecated**
|
131
140
|
*
|
@@ -13,6 +13,7 @@ import cx from 'classnames';
|
|
13
13
|
import { pkg } from '../../settings.js';
|
14
14
|
import pconsole from '../../global/js/utils/pconsole.js';
|
15
15
|
import { getNodeTextContent } from '../../global/js/utils/getNodeTextContent.js';
|
16
|
+
import { deprecateProp } from '../../global/js/utils/props-helper.js';
|
16
17
|
import { Button, usePrefix, unstable_FeatureFlags, ComposedModal, ModalHeader, Layer } from '@carbon/react';
|
17
18
|
import { ActionSet } from '../ActionSet/ActionSet.js';
|
18
19
|
import { Wrap } from '../../global/js/utils/Wrap.js';
|
@@ -20,7 +21,7 @@ import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
|
|
20
21
|
import { useFocus, getSpecificElement } from '../../global/js/hooks/useFocus.js';
|
21
22
|
import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
|
22
23
|
|
23
|
-
var _excluded = ["actions", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "selectorsFloatingMenus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
|
24
|
+
var _excluded = ["actions", "aiLabel", "ariaLabel", "children", "className", "closeIconDescription", "description", "hasCloseIcon", "headerActions", "influencer", "influencerPosition", "influencerWidth", "label", "navigation", "onClose", "open", "portalTarget", "selectorPrimaryFocus", "selectorsFloatingMenus", "size", "slug", "title", "verticalPosition", "launcherButtonRef"];
|
24
25
|
|
25
26
|
// The block part of our conventional BEM class names (bc__E--M).
|
26
27
|
var bc = "".concat(pkg.prefix, "--tearsheet");
|
@@ -63,6 +64,7 @@ var tearsheetHasCloseIcon = function tearsheetHasCloseIcon(actions, hasCloseIcon
|
|
63
64
|
* */
|
64
65
|
var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
65
66
|
var actions = _ref.actions,
|
67
|
+
aiLabel = _ref.aiLabel,
|
66
68
|
ariaLabel = _ref.ariaLabel,
|
67
69
|
children = _ref.children,
|
68
70
|
className = _ref.className,
|
@@ -82,7 +84,7 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
82
84
|
_ref$selectorsFloatin = _ref.selectorsFloatingMenus,
|
83
85
|
selectorsFloatingMenus = _ref$selectorsFloatin === void 0 ? [] : _ref$selectorsFloatin,
|
84
86
|
size = _ref.size,
|
85
|
-
|
87
|
+
deprecated_slug = _ref.slug,
|
86
88
|
title = _ref.title,
|
87
89
|
verticalPosition = _ref.verticalPosition,
|
88
90
|
launcherButtonRef = _ref.launcherButtonRef,
|
@@ -90,7 +92,7 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
90
92
|
var carbonPrefix = usePrefix();
|
91
93
|
var bcModalHeader = "".concat(carbonPrefix, "--modal-header");
|
92
94
|
var renderPortalUse = usePortalTarget(portalTargetIn);
|
93
|
-
var localRef = useRef();
|
95
|
+
var localRef = useRef(undefined);
|
94
96
|
var resizer = useRef(null);
|
95
97
|
var modalBodyRef = useRef(null);
|
96
98
|
var modalRef = ref || localRef;
|
@@ -121,7 +123,7 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
121
123
|
setPosition = _useState4[1];
|
122
124
|
|
123
125
|
// Keep a record of the previous value of depth.
|
124
|
-
var prevDepth = useRef();
|
126
|
+
var prevDepth = useRef(undefined);
|
125
127
|
useEffect(function () {
|
126
128
|
prevDepth.current = depth;
|
127
129
|
});
|
@@ -263,10 +265,10 @@ var TearsheetShell = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
263
265
|
}
|
264
266
|
}, /*#__PURE__*/React__default.createElement(ComposedModal, _extends({}, rest, {
|
265
267
|
"aria-label": ariaLabel || getNodeTextContent(title),
|
266
|
-
className: cx(bc, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(bc, "--stacked-").concat(position, "-of-").concat(depth),
|
268
|
+
className: cx(bc, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(bc, "--stacked-").concat(position, "-of-").concat(depth),
|
267
269
|
// Don't apply this on the initial open of a single tearsheet.
|
268
|
-
depth > 1 || depth === 1 && ((_prevDepth$current = prevDepth === null || prevDepth === void 0 ? void 0 : prevDepth.current) !== null && _prevDepth$current !== void 0 ? _prevDepth$current : 0) > 1), "".concat(bc, "--wide"), wide), "".concat(bc, "--narrow"), !wide), "".concat(bc, "--has-slug"),
|
269
|
-
slug:
|
270
|
+
depth > 1 || depth === 1 && ((_prevDepth$current = prevDepth === null || prevDepth === void 0 ? void 0 : prevDepth.current) !== null && _prevDepth$current !== void 0 ? _prevDepth$current : 0) > 1), "".concat(bc, "--wide"), wide), "".concat(bc, "--narrow"), !wide), "".concat(bc, "--has-slug"), deprecated_slug), "".concat(bc, "--has-ai-label"), aiLabel), "".concat(bc, "--has-close"), effectiveHasCloseIcon)),
|
271
|
+
slug: aiLabel || deprecated_slug,
|
270
272
|
style: setScaleValues(),
|
271
273
|
containerClassName: cx("".concat(bc, "__container"), _defineProperty(_defineProperty({}, "".concat(bc, "__container--lower"), verticalPosition === 'lower'), "".concat(bc, "__container--mixed-size-stacking"), !areAllSameSizeVariant())),
|
272
274
|
onClose: onClose,
|
@@ -344,6 +346,10 @@ var portalType = typeof Element === 'undefined' ? PropTypes.object :
|
|
344
346
|
// eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
|
345
347
|
PropTypes.instanceOf(Element);
|
346
348
|
var deprecatedProps = {
|
349
|
+
/**
|
350
|
+
* @deprecated Property replaced by `aiLabel`
|
351
|
+
*/
|
352
|
+
slug: deprecateProp(PropTypes.node, 'Property replaced by `aiLabel`'),
|
347
353
|
/**
|
348
354
|
* **Deprecated**
|
349
355
|
*
|
@@ -388,6 +394,11 @@ TearsheetShell.propTypes = _objectSpread2({
|
|
388
394
|
/**@ts-ignore*/
|
389
395
|
onClick: Button.propTypes.onClick
|
390
396
|
}))),
|
397
|
+
/**
|
398
|
+
* Optional prop that is intended for any scenario where something is being generated by AI to reinforce AI transparency,
|
399
|
+
* accountability, and explainability at the UI level.
|
400
|
+
*/
|
401
|
+
aiLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.bool]),
|
391
402
|
/**
|
392
403
|
* The main content of the tearsheet.
|
393
404
|
*/
|
@@ -494,10 +505,6 @@ TearsheetShell.propTypes = _objectSpread2({
|
|
494
505
|
*/
|
495
506
|
/**@ts-ignore*/
|
496
507
|
size: PropTypes.oneOf(['narrow', 'wide']).isRequired,
|
497
|
-
/**
|
498
|
-
* **Experimental:** Provide a `Slug` component to be rendered inside the `Tearsheet` component
|
499
|
-
*/
|
500
|
-
slug: PropTypes.node,
|
501
508
|
/**
|
502
509
|
* The main title of the tearsheet, displayed in the header area.
|
503
510
|
*/
|
@@ -25,7 +25,7 @@ var Toolbar = /*#__PURE__*/forwardRef(function (_ref, r) {
|
|
25
25
|
className = _ref.className,
|
26
26
|
vertical = _ref.vertical,
|
27
27
|
rest = _objectWithoutProperties(_ref, _excluded);
|
28
|
-
var focusableElements = useRef();
|
28
|
+
var focusableElements = useRef(undefined);
|
29
29
|
var getFocusableElements$1 = useCallback(function () {
|
30
30
|
return focusableElements.current;
|
31
31
|
}, [focusableElements]);
|
@@ -67,7 +67,7 @@ var TruncatedList = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
67
67
|
_useState4 = _slicedToArray(_useState3, 2),
|
68
68
|
listHeight = _useState4[0],
|
69
69
|
setListHeight = _useState4[1];
|
70
|
-
var listRef = useRef();
|
70
|
+
var listRef = useRef(undefined);
|
71
71
|
var handleToggle = function handleToggle() {
|
72
72
|
setIsCollapsed(function (prev) {
|
73
73
|
return !prev;
|
@@ -13,7 +13,7 @@ import { useRef, useEffect } from 'react';
|
|
13
13
|
* @returns {T | undefined} - The previous value of the same type, or undefined if there is none
|
14
14
|
*/
|
15
15
|
var usePreviousValue = function usePreviousValue(value) {
|
16
|
-
var ref = useRef();
|
16
|
+
var ref = useRef(undefined);
|
17
17
|
useEffect(function () {
|
18
18
|
ref.current = value;
|
19
19
|
});
|
@@ -93,7 +93,7 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
93
93
|
_useState8 = _rollupPluginBabelHelpers.slicedToArray(_useState7, 2),
|
94
94
|
currentStep = _useState8[0],
|
95
95
|
setCurrentStep = _useState8[1];
|
96
|
-
var copyRef = React.useRef();
|
96
|
+
var copyRef = React.useRef(undefined);
|
97
97
|
var apiKeyInputId = React.useRef(uuidv4.default());
|
98
98
|
var nameInputId = React.useRef(uuidv4.default());
|
99
99
|
var renderPortalUse = usePortalTarget.usePortalTarget(portalTargetIn);
|
@@ -48,7 +48,7 @@ exports.AboutModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
48
48
|
version = _ref.version,
|
49
49
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
50
50
|
var bodyRef = React.useRef(null);
|
51
|
-
var localRef = React.useRef();
|
51
|
+
var localRef = React.useRef(undefined);
|
52
52
|
var modalRef = ref || localRef;
|
53
53
|
var contentRef = React.useRef(null);
|
54
54
|
var contentId = uuidv4.default();
|
@@ -80,8 +80,8 @@ exports.Coachmark = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
80
80
|
_useState8 = _rollupPluginBabelHelpers.slicedToArray(_useState7, 2),
|
81
81
|
targetOffset = _useState8[0],
|
82
82
|
setTargetOffset = _useState8[1];
|
83
|
-
var overlayBackupRef = React.useRef();
|
84
|
-
var backupRef = React.useRef();
|
83
|
+
var overlayBackupRef = React.useRef(undefined);
|
84
|
+
var backupRef = React.useRef(undefined);
|
85
85
|
var _coachmarkRef = ref || backupRef;
|
86
86
|
var _overlayRef = overlayRef || overlayBackupRef;
|
87
87
|
var portalNode = React.useRef(null);
|
@@ -19,7 +19,7 @@ var enums = require('./enums.js');
|
|
19
19
|
*/
|
20
20
|
|
21
21
|
function useClickOutsideElement(coachmarkRef, overlayRef, overlayKind, callback) {
|
22
|
-
var cb = React.useRef();
|
22
|
+
var cb = React.useRef(undefined);
|
23
23
|
var isTooltip = overlayKind === enums.COACHMARK_OVERLAY_KIND.TOOLTIP;
|
24
24
|
React.useLayoutEffect(function () {
|
25
25
|
cb.current = callback;
|
@@ -62,8 +62,8 @@ exports.CoachmarkOverlayElements = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
62
62
|
_ref$closeButtonLabel = _ref.closeButtonLabel,
|
63
63
|
closeButtonLabel = _ref$closeButtonLabel === void 0 ? defaults.closeButtonLabel : _ref$closeButtonLabel,
|
64
64
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
65
|
-
var buttonFocusRef = React.useRef();
|
66
|
-
var scrollRef = React.useRef();
|
65
|
+
var buttonFocusRef = React.useRef(undefined);
|
66
|
+
var scrollRef = React.useRef(undefined);
|
67
67
|
var _useState = React.useState(0),
|
68
68
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
69
69
|
scrollPosition = _useState2[0],
|
@@ -91,7 +91,7 @@ exports.CoachmarkStack = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
91
91
|
setParentHeight = _useState6[1];
|
92
92
|
// parent height = child height when stacked behind a child that is shorter
|
93
93
|
var childArray = React.Children.toArray(children);
|
94
|
-
var mountedRef = React.useRef();
|
94
|
+
var mountedRef = React.useRef(undefined);
|
95
95
|
// same value as CSS animation speed
|
96
96
|
var delayMs = 240;
|
97
97
|
|
@@ -86,7 +86,7 @@ exports.DataSpreadsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
86
86
|
totalVisibleColumns = _ref.totalVisibleColumns,
|
87
87
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
88
88
|
var multiKeyTrackingRef = React.useRef(null);
|
89
|
-
var localRef = React.useRef();
|
89
|
+
var localRef = React.useRef(undefined);
|
90
90
|
var spreadsheetRef = ref || localRef;
|
91
91
|
var focusedElement = useActiveElement.useActiveElement();
|
92
92
|
var _useState = React.useState(columns),
|
@@ -153,13 +153,13 @@ exports.DataSpreadsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
153
153
|
selectedHeaderReorderActive: selectedHeaderReorderActive
|
154
154
|
}) || {};
|
155
155
|
var cellSizeValue = getCellSize.getCellSize(cellSize);
|
156
|
-
var cellEditorRef = React.useRef();
|
156
|
+
var cellEditorRef = React.useRef(undefined);
|
157
157
|
var _useState29 = React.useState(),
|
158
158
|
_useState30 = _rollupPluginBabelHelpers.slicedToArray(_useState29, 2),
|
159
159
|
activeCellContent = _useState30[0],
|
160
160
|
setActiveCellContent = _useState30[1];
|
161
|
-
var activeCellRef = React.useRef();
|
162
|
-
var cellEditorRulerRef = React.useRef();
|
161
|
+
var activeCellRef = React.useRef(undefined);
|
162
|
+
var cellEditorRulerRef = React.useRef(undefined);
|
163
163
|
var hasCustomRowHeader = typeof renderRowHeader === 'function';
|
164
164
|
var maxNumRowsCount = data.length.toString().length;
|
165
165
|
var defaultColumn = React.useMemo(function () {
|
@@ -67,7 +67,7 @@ var DataSpreadsheetBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
67
67
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
68
68
|
validStartingPoint = _useState2[0],
|
69
69
|
setValidStartingPoint = _useState2[1];
|
70
|
-
var contentScrollRef = React.useRef();
|
70
|
+
var contentScrollRef = React.useRef(undefined);
|
71
71
|
var previousState = usePreviousValue.usePreviousValue({
|
72
72
|
selectionAreaData: selectionAreaData,
|
73
73
|
clickAndHoldActive: clickAndHoldActive,
|
@@ -379,7 +379,7 @@ var DataSpreadsheetBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
379
379
|
}));
|
380
380
|
}
|
381
381
|
}, [prepareRow, renderRowHeader, renderRowHeaderDirection, rows, hasCustomRowHeader, activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row, selectionAreas, handleRowHeaderClickEvent, handleBodyCellClickEvent, handleBodyCellHoverEvent, defaultColumn, columns]);
|
382
|
-
var spreadsheetBodyRef = React.useRef();
|
382
|
+
var spreadsheetBodyRef = React.useRef(undefined);
|
383
383
|
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
384
384
|
ref: spreadsheetBodyRef,
|
385
385
|
className: cx("".concat(blockClass, "__body--container"))
|
package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js
CHANGED
@@ -63,7 +63,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
|
|
63
63
|
_useState10 = _rollupPluginBabelHelpers.slicedToArray(_useState9, 2),
|
64
64
|
isDirty = _useState10[0],
|
65
65
|
setIsDirty = _useState10[1];
|
66
|
-
var prevColumnDefinitions = React.useRef();
|
66
|
+
var prevColumnDefinitions = React.useRef(undefined);
|
67
67
|
var onRequestClose = function onRequestClose() {
|
68
68
|
setColumnObjects(columnDefinitions);
|
69
69
|
setIsTearsheetOpen(false);
|
@@ -107,11 +107,11 @@ var FilterPanel = function FilterPanel(_ref) {
|
|
107
107
|
lastAppliedFilters = _useFilters.lastAppliedFilters;
|
108
108
|
|
109
109
|
/** Refs */
|
110
|
-
var filterPanelRef = React.useRef();
|
111
|
-
var filterHeadingRef = React.useRef();
|
112
|
-
var filterSearchRef = React.useRef();
|
113
|
-
var actionSetRef = React.useRef();
|
114
|
-
var innerContainerRef = React.useRef();
|
110
|
+
var filterPanelRef = React.useRef(undefined);
|
111
|
+
var filterHeadingRef = React.useRef(undefined);
|
112
|
+
var filterSearchRef = React.useRef(undefined);
|
113
|
+
var actionSetRef = React.useRef(undefined);
|
114
|
+
var innerContainerRef = React.useRef(undefined);
|
115
115
|
/** State from hooks */
|
116
116
|
var _useShouldDisableButt = useShouldDisableButtons.default({
|
117
117
|
initialValue: true,
|
@@ -53,13 +53,13 @@ var useFilters = function useFilters(_ref) {
|
|
53
53
|
var previousState = usePreviousValue.usePreviousValue({
|
54
54
|
panelOpen: panelOpen
|
55
55
|
});
|
56
|
-
var filteredItemsRef = React.useRef();
|
56
|
+
var filteredItemsRef = React.useRef(undefined);
|
57
57
|
|
58
58
|
// When using batch actions we have to store the filters to then apply them later
|
59
59
|
var prevFiltersRef = React.useRef(JSON.stringify(filtersState));
|
60
60
|
var lastAppliedFilters = React.useRef(JSON.stringify(reactTableFiltersState));
|
61
61
|
var prevFiltersObjectArrayRef = React.useRef(JSON.stringify(filtersObjectArray));
|
62
|
-
var holdingPrevFiltersRef = React.useRef();
|
62
|
+
var holdingPrevFiltersRef = React.useRef(undefined);
|
63
63
|
var holdingLastAppliedFiltersRef = React.useRef([]);
|
64
64
|
var holdingPrevFiltersObjectArrayRef = React.useRef([]);
|
65
65
|
|
@@ -68,11 +68,11 @@ var InlineEditCell = function InlineEditCell(_ref) {
|
|
68
68
|
});
|
69
69
|
var _ref2 = config || {},
|
70
70
|
inputProps = _ref2.inputProps;
|
71
|
-
var textInputRef = React.useRef();
|
72
|
-
var checkboxRef = React.useRef();
|
73
|
-
var numberInputRef = React.useRef();
|
74
|
-
var dropdownRef = React.useRef();
|
75
|
-
var outerButtonElement = React.useRef();
|
71
|
+
var textInputRef = React.useRef(undefined);
|
72
|
+
var checkboxRef = React.useRef(undefined);
|
73
|
+
var numberInputRef = React.useRef(undefined);
|
74
|
+
var dropdownRef = React.useRef(undefined);
|
75
|
+
var outerButtonElement = React.useRef(undefined);
|
76
76
|
var rowSize = instance.rowSize,
|
77
77
|
onDataUpdate = instance.onDataUpdate;
|
78
78
|
var saveCellData;
|
@@ -27,7 +27,7 @@ var RowSizeDropdown = function RowSizeDropdown(_ref) {
|
|
27
27
|
_ref$legendText = _ref.legendText,
|
28
28
|
legendText = _ref$legendText === void 0 ? 'Row settings' : _ref$legendText,
|
29
29
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
30
|
-
var radioGroupRef = React.useRef();
|
30
|
+
var radioGroupRef = React.useRef(undefined);
|
31
31
|
var _React$useState = React.useState(false),
|
32
32
|
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
33
33
|
isOpen = _React$useState2[0],
|
@@ -19,8 +19,8 @@ var stateReducer = require('./Datagrid/addons/stateReducer.js');
|
|
19
19
|
|
20
20
|
var blockClass = "".concat(settings.pkg.prefix, "--datagrid");
|
21
21
|
var useNestedRowExpander = function useNestedRowExpander(hooks) {
|
22
|
-
var tempState = React.useRef();
|
23
|
-
var lastExpandedRowIndex = React.useRef();
|
22
|
+
var tempState = React.useRef(undefined);
|
23
|
+
var lastExpandedRowIndex = React.useRef(undefined);
|
24
24
|
var useInstance = function useInstance(instance) {
|
25
25
|
tempState.current = instance;
|
26
26
|
};
|
@@ -13,11 +13,11 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
|
|
13
13
|
var React = require('react');
|
14
14
|
|
15
15
|
var useParentDimensions = function useParentDimensions(hooks) {
|
16
|
-
var rootRef = React.useRef();
|
17
|
-
var headRef = React.useRef();
|
18
|
-
var innerListRef = React.useRef();
|
19
|
-
var listRef = React.useRef();
|
20
|
-
var gridRef = React.useRef();
|
16
|
+
var rootRef = React.useRef(undefined);
|
17
|
+
var headRef = React.useRef(undefined);
|
18
|
+
var innerListRef = React.useRef(undefined);
|
19
|
+
var listRef = React.useRef(undefined);
|
20
|
+
var gridRef = React.useRef(undefined);
|
21
21
|
var _useState = React.useState(),
|
22
22
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
23
23
|
tableHeight = _useState2[0],
|