@carbon/ibm-products 2.39.0 → 2.40.1-canary.6
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +45 -37
- 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 +5 -0
- 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 +45 -37
- 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 +708 -37
- 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/AddSelect/AddSelect.d.ts +44 -2
- package/es/components/AddSelect/AddSelect.js +8 -4
- package/es/components/AddSelect/AddSelectBody.d.ts +44 -2
- package/es/components/AddSelect/AddSelectBody.js +10 -12
- package/es/components/AddSelect/AddSelectSort.d.ts +16 -17
- package/es/components/AddSelect/AddSelectSort.js +5 -5
- package/es/components/AddSelect/types/index.d.ts +44 -0
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
- package/es/components/Card/Card.js +1 -1
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +3 -3
- package/es/components/ConditionBuilder/ConditionBuilder.js +6 -1
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +3 -3
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +3 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js +30 -18
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +3 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +7 -7
- package/es/components/ConditionBuilder/ConditionConnector/ConditionConnector.js +6 -6
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +11 -11
- package/es/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +1 -0
- package/es/components/ConditionBuilder/utils/checkForHoldingKey.js +16 -0
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -0
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +125 -0
- package/es/components/ConditionBuilder/utils/util.d.ts +1 -1
- package/es/components/ConditionBuilder/utils/util.js +34 -5
- package/es/components/CreateInfluencer/CreateInfluencer.js +1 -1
- package/es/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +4 -3
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +5 -0
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -4
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
- package/es/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
- package/es/components/Guidebanner/Guidebanner.d.ts +62 -2
- package/es/components/Guidebanner/Guidebanner.js +8 -7
- package/es/components/Guidebanner/GuidebannerElement.d.ts +30 -17
- package/es/components/Guidebanner/GuidebannerElement.js +4 -4
- package/es/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
- package/es/components/Guidebanner/GuidebannerElementButton.js +10 -4
- package/es/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
- package/es/components/Guidebanner/GuidebannerElementLink.js +3 -3
- package/es/components/InterstitialScreen/InterstitialScreen.js +3 -1
- package/es/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
- package/es/components/MultiAddSelect/MultiAddSelect.js +2 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +0 -1
- package/es/components/PageHeader/PageHeader.d.ts +298 -5
- package/es/components/PageHeader/PageHeader.js +98 -47
- package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/es/components/PageHeader/PageHeaderUtils.js +4 -1
- package/es/components/SidePanel/SidePanel.d.ts +6 -2
- package/es/components/SidePanel/SidePanel.js +17 -2
- package/es/components/SidePanel/constants.d.ts +1 -0
- package/es/components/SidePanel/constants.js +1 -0
- package/es/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
- package/es/components/SingleAddSelect/SingleAddSelect.js +2 -1
- package/es/components/TagOverflow/TagOverflow.js +35 -20
- package/es/components/TagOverflow/TagOverflowModal.d.ts +3 -1
- package/es/components/TagOverflow/TagOverflowModal.js +14 -20
- package/es/components/TagOverflow/TagOverflowPopover.js +19 -4
- package/es/components/Tearsheet/Tearsheet.d.ts +132 -6
- package/es/components/Tearsheet/Tearsheet.js +25 -13
- package/es/components/Tearsheet/TearsheetShell.d.ts +5 -1
- package/es/components/Tearsheet/TearsheetShell.js +26 -4
- package/es/components/WebTerminal/WebTerminal.d.ts +4 -0
- package/es/components/WebTerminal/WebTerminal.js +11 -3
- package/es/global/js/hooks/useFocus.d.ts +3 -1
- package/es/global/js/hooks/useFocus.js +6 -3
- package/es/global/js/hooks/useRetrieveStepData.d.ts +1 -1
- package/es/global/js/hooks/useRetrieveStepData.js +1 -1
- package/lib/components/AddSelect/AddSelect.d.ts +44 -2
- package/lib/components/AddSelect/AddSelect.js +7 -3
- package/lib/components/AddSelect/AddSelectBody.d.ts +44 -2
- package/lib/components/AddSelect/AddSelectBody.js +10 -12
- package/lib/components/AddSelect/AddSelectSort.d.ts +16 -17
- package/lib/components/AddSelect/AddSelectSort.js +5 -5
- package/lib/components/AddSelect/types/index.d.ts +44 -0
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +5 -1
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +12 -6
- package/lib/components/Card/Card.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +3 -3
- package/lib/components/ConditionBuilder/ConditionBuilder.js +6 -1
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +3 -3
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +3 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js +29 -17
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +3 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +7 -7
- package/lib/components/ConditionBuilder/ConditionConnector/ConditionConnector.js +6 -6
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +11 -11
- package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +1 -0
- package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +20 -0
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -0
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +129 -0
- package/lib/components/ConditionBuilder/utils/util.d.ts +1 -1
- package/lib/components/ConditionBuilder/utils/util.js +36 -4
- package/lib/components/CreateInfluencer/CreateInfluencer.js +1 -1
- package/lib/components/CreateTearsheet/CreateTearsheetStep.d.ts +95 -2
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +7 -5
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +4 -3
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +5 -0
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +3 -4
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
- package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +2 -1
- package/lib/components/Guidebanner/Guidebanner.d.ts +62 -2
- package/lib/components/Guidebanner/Guidebanner.js +8 -7
- package/lib/components/Guidebanner/GuidebannerElement.d.ts +30 -17
- package/lib/components/Guidebanner/GuidebannerElement.js +4 -4
- package/lib/components/Guidebanner/GuidebannerElementButton.d.ts +29 -15
- package/lib/components/Guidebanner/GuidebannerElementButton.js +10 -4
- package/lib/components/Guidebanner/GuidebannerElementLink.d.ts +20 -13
- package/lib/components/Guidebanner/GuidebannerElementLink.js +3 -3
- package/lib/components/InterstitialScreen/InterstitialScreen.js +3 -1
- package/lib/components/MultiAddSelect/MultiAddSelect.d.ts +134 -2
- package/lib/components/MultiAddSelect/MultiAddSelect.js +2 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.js +0 -1
- package/lib/components/PageHeader/PageHeader.d.ts +298 -5
- package/lib/components/PageHeader/PageHeader.js +98 -47
- package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/lib/components/PageHeader/PageHeaderUtils.js +4 -1
- package/lib/components/SidePanel/SidePanel.d.ts +6 -2
- package/lib/components/SidePanel/SidePanel.js +17 -2
- package/lib/components/SidePanel/constants.d.ts +1 -0
- package/lib/components/SidePanel/constants.js +1 -0
- package/lib/components/SingleAddSelect/SingleAddSelect.d.ts +69 -2
- package/lib/components/SingleAddSelect/SingleAddSelect.js +2 -1
- package/lib/components/TagOverflow/TagOverflow.js +34 -19
- package/lib/components/TagOverflow/TagOverflowModal.d.ts +3 -1
- package/lib/components/TagOverflow/TagOverflowModal.js +14 -20
- package/lib/components/TagOverflow/TagOverflowPopover.js +19 -4
- package/lib/components/Tearsheet/Tearsheet.d.ts +132 -6
- package/lib/components/Tearsheet/Tearsheet.js +25 -13
- package/lib/components/Tearsheet/TearsheetShell.d.ts +5 -1
- package/lib/components/Tearsheet/TearsheetShell.js +26 -4
- package/lib/components/WebTerminal/WebTerminal.d.ts +4 -0
- package/lib/components/WebTerminal/WebTerminal.js +11 -3
- package/lib/global/js/hooks/useFocus.d.ts +3 -1
- package/lib/global/js/hooks/useFocus.js +6 -3
- package/lib/global/js/hooks/useRetrieveStepData.d.ts +1 -1
- package/lib/global/js/hooks/useRetrieveStepData.js +1 -1
- package/package.json +3 -3
- package/scss/components/CoachmarkStack/_coachmark-stack.scss +4 -2
- package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +4 -4
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +34 -34
- package/scss/components/SidePanel/_side-panel-variables.scss +1 -0
- package/scss/components/StringFormatter/_string-formatter.scss +1 -1
- package/scss/components/TagOverflow/_tag-overflow.scss +5 -2
- package/scss/components/_index-with-carbon.scss +1 -0
- package/telemetry.yml +2 -0
@@ -33,17 +33,17 @@ var ConditionBuilderItemTime = function ConditionBuilderItemTime(_ref) {
|
|
33
33
|
onChange(timeValue ? timeToUpdate : undefined);
|
34
34
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
35
35
|
}, [timeValue, dayZoneValue, timeZoneValue]);
|
36
|
-
var setTimeZone = function setTimeZone(
|
37
|
-
setTimeZoneValue(
|
36
|
+
var setTimeZone = function setTimeZone(evt) {
|
37
|
+
setTimeZoneValue(evt.target.value);
|
38
38
|
};
|
39
|
-
var setDayZone = function setDayZone(
|
40
|
-
setDayZoneValue(
|
39
|
+
var setDayZone = function setDayZone(evt) {
|
40
|
+
setDayZoneValue(evt.target.value);
|
41
41
|
};
|
42
|
-
var setTime = function setTime(
|
43
|
-
setTimeValue(
|
42
|
+
var setTime = function setTime(evt) {
|
43
|
+
setTimeValue(evt.target.value);
|
44
44
|
};
|
45
45
|
return /*#__PURE__*/React__default.createElement("div", {
|
46
|
-
className: "".concat(blockClass, "
|
46
|
+
className: "".concat(blockClass, "__item-time")
|
47
47
|
}, /*#__PURE__*/React__default.createElement(TimePicker, {
|
48
48
|
id: "time-picker",
|
49
49
|
labelText: "Select a time",
|
@@ -28,17 +28,17 @@ function ConditionConnector(_ref) {
|
|
28
28
|
parentGroup.classList.remove('hoveredConnector');
|
29
29
|
}
|
30
30
|
}, []);
|
31
|
-
var activeConnectorHandler = function activeConnectorHandler(
|
32
|
-
var parentGroup =
|
31
|
+
var activeConnectorHandler = function activeConnectorHandler(evt) {
|
32
|
+
var parentGroup = evt.currentTarget.closest('.eachGroup');
|
33
33
|
handleConnectorHover(parentGroup, true);
|
34
34
|
};
|
35
|
-
var inActiveConnectorHandler = function inActiveConnectorHandler(
|
36
|
-
var parentGroup =
|
35
|
+
var inActiveConnectorHandler = function inActiveConnectorHandler(evt) {
|
36
|
+
var parentGroup = evt.currentTarget.closest('.eachGroup');
|
37
37
|
handleConnectorHover(parentGroup, false);
|
38
38
|
};
|
39
|
-
var onChangeHandler = function onChangeHandler(op,
|
39
|
+
var onChangeHandler = function onChangeHandler(op, evt) {
|
40
40
|
onChange(op);
|
41
|
-
focusThisField(
|
41
|
+
focusThisField(evt);
|
42
42
|
};
|
43
43
|
return (
|
44
44
|
/*#__PURE__*/
|
@@ -26,16 +26,16 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
|
|
26
26
|
onChange = _ref.onChange,
|
27
27
|
conditionBuilderRef = _ref.conditionBuilderRef,
|
28
28
|
className = _ref.className;
|
29
|
-
var onRemoveHandler = function onRemoveHandler(conditionId,
|
29
|
+
var onRemoveHandler = function onRemoveHandler(conditionId, evt) {
|
30
30
|
if (group.conditions.length > 1) {
|
31
31
|
onChange(_objectSpread2(_objectSpread2({}, group), {}, {
|
32
32
|
conditions: group.conditions.filter(function (condition) {
|
33
33
|
return conditionId !== condition.id;
|
34
34
|
})
|
35
35
|
}));
|
36
|
-
handleFocusOnClose(
|
36
|
+
handleFocusOnClose(evt);
|
37
37
|
} else {
|
38
|
-
onRemove();
|
38
|
+
onRemove(evt);
|
39
39
|
}
|
40
40
|
};
|
41
41
|
var onChangeHandler = function onChangeHandler(updatedCondition, conditionIndex) {
|
@@ -59,9 +59,9 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
|
|
59
59
|
var isLastCondition = function isLastCondition(conditionIndex, conditionArr) {
|
60
60
|
return conditionIndex + 1 >= conditionArr.length || conditionArr.length - 1 != conditionIndex && conditionArr[conditionIndex + 1].conditions;
|
61
61
|
};
|
62
|
-
var handleFocusOnClose = function handleFocusOnClose(
|
63
|
-
var
|
64
|
-
var previousClose = (
|
62
|
+
var handleFocusOnClose = function handleFocusOnClose(evt) {
|
63
|
+
var _evt$currentTarget;
|
64
|
+
var previousClose = (_evt$currentTarget = evt.currentTarget) === null || _evt$currentTarget === void 0 || (_evt$currentTarget = _evt$currentTarget.closest('[role="row"]')) === null || _evt$currentTarget === void 0 || (_evt$currentTarget = _evt$currentTarget.parentElement) === null || _evt$currentTarget === void 0 || (_evt$currentTarget = _evt$currentTarget.previousSibling) === null || _evt$currentTarget === void 0 ? void 0 : _evt$currentTarget.querySelector('[data-name="closeCondition"]');
|
65
65
|
if (previousClose) {
|
66
66
|
previousClose.focus();
|
67
67
|
}
|
@@ -76,7 +76,7 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
|
|
76
76
|
return /*#__PURE__*/React__default.createElement("div", {
|
77
77
|
key: eachCondition.id
|
78
78
|
}, eachCondition.conditions && /*#__PURE__*/React__default.createElement(ConditionGroupBuilder, {
|
79
|
-
className: "".concat(blockClass, "
|
79
|
+
className: "".concat(blockClass, "__group"),
|
80
80
|
aria: {
|
81
81
|
level: aria.level + 1,
|
82
82
|
posinset: conditionIndex + 1,
|
@@ -86,8 +86,8 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
|
|
86
86
|
onChange: function onChange(updatedCondition) {
|
87
87
|
onChangeHandler(updatedCondition, conditionIndex);
|
88
88
|
},
|
89
|
-
onRemove: function onRemove(
|
90
|
-
onRemoveHandler(eachCondition.id,
|
89
|
+
onRemove: function onRemove(evt) {
|
90
|
+
onRemoveHandler(eachCondition.id, evt);
|
91
91
|
},
|
92
92
|
conditionBuilderRef: conditionBuilderRef
|
93
93
|
}), !eachCondition.conditions && /*#__PURE__*/React__default.createElement(ConditionBlock, {
|
@@ -106,8 +106,8 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
|
|
106
106
|
onChangeHandler(updatedConditions, conditionIndex);
|
107
107
|
},
|
108
108
|
addConditionHandler: addConditionHandler,
|
109
|
-
onRemove: function onRemove(
|
110
|
-
onRemoveHandler(eachCondition.id,
|
109
|
+
onRemove: function onRemove(evt) {
|
110
|
+
onRemoveHandler(eachCondition.id, evt);
|
111
111
|
},
|
112
112
|
onConnectorOperatorChange: function onConnectorOperatorChange(op) {
|
113
113
|
onChange(_objectSpread2(_objectSpread2({}, group), {}, {
|
@@ -0,0 +1 @@
|
|
1
|
+
export function checkForHoldingKey(evt: any, key: any): any;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
var checkForHoldingKey = function checkForHoldingKey(evt, key) {
|
9
|
+
// possible key inputs: altKey,ctrlKey,metaKey,shiftKey
|
10
|
+
if (key === 'cmd') {
|
11
|
+
return evt.metaKey || evt.ctrlKey;
|
12
|
+
}
|
13
|
+
return evt[key];
|
14
|
+
};
|
15
|
+
|
16
|
+
export { checkForHoldingKey };
|
@@ -0,0 +1 @@
|
|
1
|
+
export function handleKeyDown(evt: any, conditionBuilderRef: any): void;
|
@@ -0,0 +1,125 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { toConsumableArray as _toConsumableArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
9
|
+
import { blockClass } from '../ConditionBuilderContext/DataConfigs.js';
|
10
|
+
import { checkForHoldingKey } from './checkForHoldingKey.js';
|
11
|
+
import { focusThisField, traverseReverse, traverseClockVise } from './util.js';
|
12
|
+
|
13
|
+
var handleKeyDown = function handleKeyDown(evt, conditionBuilderRef) {
|
14
|
+
var activeElement = document.activeElement;
|
15
|
+
if (activeElement.closest("[role=\"dialog\"]")) {
|
16
|
+
handleKeyPressForPopover(evt, activeElement.closest("[role=\"dialog\"]"));
|
17
|
+
} else {
|
18
|
+
handleKeyPressForMainContent(evt, conditionBuilderRef);
|
19
|
+
}
|
20
|
+
};
|
21
|
+
var handleKeyPressForPopover = function handleKeyPressForPopover(evt, parentContainer) {
|
22
|
+
var _parentContainer$quer;
|
23
|
+
var key = evt.key;
|
24
|
+
var isHoldingShiftKey = checkForHoldingKey(evt, 'shiftKey');
|
25
|
+
var isMultiSelect = (_parentContainer$quer = parentContainer.querySelector('ul')) === null || _parentContainer$quer === void 0 ? void 0 : _parentContainer$quer.dataset.multiSelect;
|
26
|
+
var allItems = [];
|
27
|
+
switch (key) {
|
28
|
+
case 'ArrowUp':
|
29
|
+
//traverse through the popover options, search box, selectAll button
|
30
|
+
parentContainer.querySelectorAll("[role=\"option\"]").forEach(function (eachElem, index, allElements) {
|
31
|
+
traverseReverse(eachElem, index, allElements);
|
32
|
+
});
|
33
|
+
break;
|
34
|
+
case 'ArrowDown':
|
35
|
+
//traverse through the popover options, search box, selectAll button
|
36
|
+
parentContainer.querySelectorAll("[role=\"option\"]").forEach(function (eachElem, index, allElements) {
|
37
|
+
traverseClockVise(eachElem, index, allElements);
|
38
|
+
});
|
39
|
+
break;
|
40
|
+
case 'Tab':
|
41
|
+
allItems = [].concat(_toConsumableArray(Array.from(parentContainer.querySelectorAll(".".concat(blockClass, "__selectAll-button,[role=\"searchbox\"]")))), [parentContainer.querySelector("[role=\"option\"]")]);
|
42
|
+
allItems.forEach(function (eachElem, index, allElements) {
|
43
|
+
if (isHoldingShiftKey) {
|
44
|
+
traverseReverse(eachElem, index, allElements, true, true);
|
45
|
+
} else {
|
46
|
+
traverseClockVise(eachElem, index, allElements, true, true);
|
47
|
+
}
|
48
|
+
});
|
49
|
+
evt.preventDefault();
|
50
|
+
break;
|
51
|
+
case ' ':
|
52
|
+
if (isMultiSelect === 'true') {
|
53
|
+
if (document.activeElement.type !== 'button') {
|
54
|
+
var _document$activeEleme;
|
55
|
+
//for button , enter key is click which already handled by framework, for other elements trigger click
|
56
|
+
(_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 || _document$activeEleme.click();
|
57
|
+
}
|
58
|
+
evt.preventDefault();
|
59
|
+
}
|
60
|
+
break;
|
61
|
+
case 'Enter':
|
62
|
+
if (isMultiSelect !== 'true') {
|
63
|
+
if (document.activeElement.type !== 'button') {
|
64
|
+
var _document$activeEleme2;
|
65
|
+
//for button , enter key is click which already handled by framework, else trigger click
|
66
|
+
(_document$activeEleme2 = document.activeElement) === null || _document$activeEleme2 === void 0 || _document$activeEleme2.click();
|
67
|
+
focusThisField(evt);
|
68
|
+
}
|
69
|
+
}
|
70
|
+
break;
|
71
|
+
case 'Escape':
|
72
|
+
//focus the corresponding field in which the popover is triggered
|
73
|
+
focusThisField(evt);
|
74
|
+
break;
|
75
|
+
}
|
76
|
+
};
|
77
|
+
var getRows = function getRows(conditionBuilderRef) {
|
78
|
+
return Array.from(conditionBuilderRef.current.querySelectorAll('[role="row"]'));
|
79
|
+
};
|
80
|
+
var getRowIndex = function getRowIndex(element, conditionBuilderRef) {
|
81
|
+
var rows = getRows(conditionBuilderRef);
|
82
|
+
return rows.findIndex(function (row) {
|
83
|
+
return row.contains(element);
|
84
|
+
});
|
85
|
+
};
|
86
|
+
var handleRowNavigation = function handleRowNavigation(evt, conditionBuilderRef) {
|
87
|
+
var rows = getRows(conditionBuilderRef);
|
88
|
+
var currentRowIndex = getRowIndex(evt.target, conditionBuilderRef);
|
89
|
+
navigateToNextRowCell(evt, currentRowIndex, rows);
|
90
|
+
};
|
91
|
+
var navigateToNextRowCell = function navigateToNextRowCell(evt, currentRowIndex, rows) {
|
92
|
+
var _nextRow$querySelecto;
|
93
|
+
//when the focussed element is a cell of the row which has only 1 cell (connector or statement) , focus the next row
|
94
|
+
|
95
|
+
var nextRowIndex = currentRowIndex;
|
96
|
+
if (evt.key === 'ArrowUp') {
|
97
|
+
nextRowIndex = currentRowIndex == 0 ? currentRowIndex : currentRowIndex - 1;
|
98
|
+
}
|
99
|
+
if (evt.key === 'ArrowDown') {
|
100
|
+
nextRowIndex = currentRowIndex === rows.length - 1 ? rows.length - 1 : currentRowIndex + 1;
|
101
|
+
}
|
102
|
+
var nextRow = rows[nextRowIndex];
|
103
|
+
var itemName = evt.target.dataset.name;
|
104
|
+
nextRow === null || nextRow === void 0 || (_nextRow$querySelecto = nextRow.querySelector("[data-name=\"".concat(itemName, "\"]"))) === null || _nextRow$querySelecto === void 0 || _nextRow$querySelecto.focus();
|
105
|
+
};
|
106
|
+
var handleKeyPressForMainContent = function handleKeyPressForMainContent(evt, conditionBuilderRef) {
|
107
|
+
switch (evt.key) {
|
108
|
+
case 'ArrowRight':
|
109
|
+
case 'ArrowLeft':
|
110
|
+
conditionBuilderRef.current.querySelectorAll("[role=\"gridcell\"] button").forEach(function (eachElem, index, allElements) {
|
111
|
+
if (evt.key === 'ArrowRight') {
|
112
|
+
traverseClockVise(eachElem, index, allElements);
|
113
|
+
} else {
|
114
|
+
traverseReverse(eachElem, index, allElements);
|
115
|
+
}
|
116
|
+
});
|
117
|
+
break;
|
118
|
+
case 'ArrowUp':
|
119
|
+
case 'ArrowDown':
|
120
|
+
handleRowNavigation(evt, conditionBuilderRef);
|
121
|
+
break;
|
122
|
+
}
|
123
|
+
};
|
124
|
+
|
125
|
+
export { handleKeyDown };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export function focusThisField(
|
1
|
+
export function focusThisField(evt: any): void;
|
2
2
|
export function focusThisItem(currentElement: any): void;
|
3
3
|
export function traverseClockVise(eachElem: any, index: any, allElements: any, rotate: any, trapFocus: any): void;
|
4
4
|
export function traverseReverse(eachElem: any, index: any, allElements: any, rotate: any, trapFocus: any): void;
|
@@ -5,12 +5,41 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
var focusThisField = function focusThisField(
|
8
|
+
var focusThisField = function focusThisField(evt) {
|
9
9
|
setTimeout(function () {
|
10
|
-
var
|
11
|
-
(
|
12
|
-
(
|
10
|
+
var _evt$target$closest, _evt$target$closest2;
|
11
|
+
(_evt$target$closest = evt.target.closest('[role="gridcell"]')) === null || _evt$target$closest === void 0 || (_evt$target$closest = _evt$target$closest.querySelector('button')) === null || _evt$target$closest === void 0 || _evt$target$closest.click();
|
12
|
+
(_evt$target$closest2 = evt.target.closest('[role="gridcell"]')) === null || _evt$target$closest2 === void 0 || (_evt$target$closest2 = _evt$target$closest2.querySelector('button')) === null || _evt$target$closest2 === void 0 || _evt$target$closest2.focus();
|
13
13
|
}, 0);
|
14
14
|
};
|
15
|
+
var focusThisItem = function focusThisItem(currentElement) {
|
16
|
+
setTimeout(function () {
|
17
|
+
//document.activeElement.setAttribute('tabindex', '-1');
|
18
|
+
// currentElement.setAttribute('tabindex', '0');
|
19
|
+
currentElement === null || currentElement === void 0 || currentElement.focus();
|
20
|
+
}, 0);
|
21
|
+
};
|
22
|
+
var traverseClockVise = function traverseClockVise(eachElem, index, allElements, rotate, trapFocus) {
|
23
|
+
if (eachElem == document.activeElement) {
|
24
|
+
if (index !== allElements.length - 1) {
|
25
|
+
focusThisItem(allElements[index + 1]);
|
26
|
+
} else {
|
27
|
+
focusThisItem(allElements[rotate ? 0 : allElements.length - 1]);
|
28
|
+
}
|
29
|
+
} else if (Array.from(allElements).indexOf(document.activeElement) == -1 && trapFocus) {
|
30
|
+
focusThisItem(allElements[0]);
|
31
|
+
}
|
32
|
+
};
|
33
|
+
var traverseReverse = function traverseReverse(eachElem, index, allElements, rotate, trapFocus) {
|
34
|
+
if (eachElem == document.activeElement) {
|
35
|
+
if (index !== 0) {
|
36
|
+
focusThisItem(allElements[index - 1]);
|
37
|
+
} else {
|
38
|
+
focusThisItem(allElements[rotate ? allElements.length - 1 : 0]);
|
39
|
+
}
|
40
|
+
} else if (Array.from(allElements).indexOf(document.activeElement) == -1 && trapFocus) {
|
41
|
+
focusThisItem(allElements[allElements.length - 1]);
|
42
|
+
}
|
43
|
+
};
|
15
44
|
|
16
|
-
export { focusThisField };
|
45
|
+
export { focusThisField, focusThisItem, traverseClockVise, traverseReverse };
|
@@ -62,7 +62,7 @@ var CreateInfluencer = function CreateInfluencer(_ref) {
|
|
62
62
|
return /*#__PURE__*/React__default.createElement(ProgressStep, {
|
63
63
|
label: step.title,
|
64
64
|
key: stepIndex,
|
65
|
-
secondaryLabel: step.secondaryLabel,
|
65
|
+
secondaryLabel: step.secondaryLabel || undefined,
|
66
66
|
invalid: step.invalid
|
67
67
|
});
|
68
68
|
})));
|
@@ -1,2 +1,95 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2021, 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import React, { PropsWithChildren } from 'react';
|
8
|
+
type fieldsetLegendTextProps = {
|
9
|
+
/**
|
10
|
+
* This optional prop will render your form content inside of a fieldset html element
|
11
|
+
* and is defaulted to true.
|
12
|
+
* You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
13
|
+
*/
|
14
|
+
hasFieldset: false;
|
15
|
+
/**
|
16
|
+
* This is the required legend text that appears above a fieldset html element for accessibility purposes.
|
17
|
+
* You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
18
|
+
* Otherwise, use CSS to hide/remove this label text.
|
19
|
+
*/
|
20
|
+
fieldsetLegendText?: string;
|
21
|
+
} | {
|
22
|
+
/**
|
23
|
+
* This optional prop will render your form content inside of a fieldset html element
|
24
|
+
* and is defaulted to true.
|
25
|
+
* You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
26
|
+
*/
|
27
|
+
hasFieldset?: true;
|
28
|
+
/**
|
29
|
+
* This is the required legend text that appears above a fieldset html element for accessibility purposes.
|
30
|
+
* You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
31
|
+
* Otherwise, use CSS to hide/remove this label text.
|
32
|
+
*/
|
33
|
+
fieldsetLegendText: string;
|
34
|
+
};
|
35
|
+
interface CreateTearsheetStepBaseProps extends PropsWithChildren {
|
36
|
+
/**
|
37
|
+
* Content that shows in the tearsheet step
|
38
|
+
*/
|
39
|
+
children?: React.ReactNode;
|
40
|
+
/**
|
41
|
+
* Sets an optional className to be added to the tearsheet step
|
42
|
+
*/
|
43
|
+
className?: string;
|
44
|
+
/**
|
45
|
+
* Sets an optional description on the step component
|
46
|
+
*/
|
47
|
+
description?: React.ReactNode;
|
48
|
+
/**
|
49
|
+
* This will conditionally disable the submit button in the multi step Tearsheet
|
50
|
+
*/
|
51
|
+
disableSubmit?: boolean;
|
52
|
+
/**
|
53
|
+
* This prop is used to help track dynamic steps. If this value is `false` then the step is not included in the visible steps or the ProgressIndicator
|
54
|
+
* steps. If this value is `true` then the step will be included in the list of visible steps, as well as being included in the ProgressIndicator step list
|
55
|
+
*/
|
56
|
+
includeStep?: boolean;
|
57
|
+
/**
|
58
|
+
* This prop can be used on the first step to mark it as an intro step, which will not render the progress indicator steps
|
59
|
+
*/
|
60
|
+
introStep?: boolean;
|
61
|
+
/**
|
62
|
+
* This optional prop will indicate an error icon on the progress indicator step item
|
63
|
+
*/
|
64
|
+
invalid?: boolean;
|
65
|
+
/**
|
66
|
+
* Optional function to be called on initial mount of a step.
|
67
|
+
* For example, this can be used to fetch data that is required on a particular step.
|
68
|
+
*/
|
69
|
+
onMount?: () => void;
|
70
|
+
/**
|
71
|
+
* Optional function to be called when you move to the next step.
|
72
|
+
* For example, this can be used to validate input fields before proceeding to the next step.
|
73
|
+
* This function can _optionally_ return a promise that is either resolved or rejected and the CreateTearsheet will handle the submitting state of the next button.
|
74
|
+
*/
|
75
|
+
onNext?: () => Promise<void>;
|
76
|
+
/**
|
77
|
+
* Optional function to be called when you move to the previous step.
|
78
|
+
*/
|
79
|
+
onPrevious?: () => void;
|
80
|
+
/**
|
81
|
+
* Sets the optional secondary label on the progress step component
|
82
|
+
*/
|
83
|
+
secondaryLabel?: string;
|
84
|
+
/**
|
85
|
+
* Sets an optional subtitle on the step component
|
86
|
+
*/
|
87
|
+
subtitle?: string;
|
88
|
+
/**
|
89
|
+
* Sets the title text for a tearsheet step
|
90
|
+
*/
|
91
|
+
title: React.ReactNode;
|
92
|
+
}
|
93
|
+
type CreateTearsheetStepProps = CreateTearsheetStepBaseProps & fieldsetLegendTextProps;
|
94
|
+
export declare let CreateTearsheetStep: React.ForwardRefExoticComponent<CreateTearsheetStepProps & React.RefAttributes<unknown>>;
|
95
|
+
export {};
|
@@ -46,7 +46,7 @@ var CreateTearsheetStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
46
46
|
rest = _objectWithoutProperties(_ref, _excluded);
|
47
47
|
var stepsContext = useContext(StepsContext);
|
48
48
|
var stepNumber = useContext(StepNumberContext);
|
49
|
-
var _useState = useState(),
|
49
|
+
var _useState = useState(includeStep),
|
50
50
|
_useState2 = _slicedToArray(_useState, 2),
|
51
51
|
shouldIncludeStep = _useState2[0],
|
52
52
|
setShouldIncludeStep = _useState2[1];
|
@@ -56,11 +56,11 @@ var CreateTearsheetStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
56
56
|
useRetrieveStepData({
|
57
57
|
stepsContext: stepsContext,
|
58
58
|
stepNumber: stepNumber,
|
59
|
-
introStep: introStep,
|
59
|
+
introStep: !!introStep,
|
60
60
|
shouldIncludeStep: shouldIncludeStep,
|
61
|
-
secondaryLabel: secondaryLabel,
|
61
|
+
secondaryLabel: secondaryLabel || '',
|
62
62
|
title: title,
|
63
|
-
invalid: invalid
|
63
|
+
invalid: !!invalid
|
64
64
|
});
|
65
65
|
|
66
66
|
// This useEffect reports back the onMount value so that they can be used
|
@@ -80,7 +80,7 @@ var CreateTearsheetStep = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
80
80
|
// steps container context so that it can manage the 'Next' button appropriately.
|
81
81
|
useEffect(function () {
|
82
82
|
if (stepNumber === (stepsContext === null || stepsContext === void 0 ? void 0 : stepsContext.currentStep)) {
|
83
|
-
stepsContext.setIsDisabled(disableSubmit);
|
83
|
+
stepsContext.setIsDisabled(!!disableSubmit);
|
84
84
|
stepsContext === null || stepsContext === void 0 || stepsContext.setOnNext(onNext); // needs to be updated here otherwise there could be stale state values from only initially setting onNext
|
85
85
|
stepsContext === null || stepsContext === void 0 || stepsContext.setOnPrevious(onPrevious);
|
86
86
|
}
|
@@ -144,6 +144,7 @@ CreateTearsheetStep.propTypes = {
|
|
144
144
|
* You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
145
145
|
* Otherwise, use CSS to hide/remove this label text.
|
146
146
|
*/
|
147
|
+
/**@ts-ignore*/
|
147
148
|
fieldsetLegendText: PropTypes.string.isRequired.if(function (_ref2) {
|
148
149
|
var hasFieldset = _ref2.hasFieldset;
|
149
150
|
return !!hasFieldset;
|
@@ -153,6 +154,7 @@ CreateTearsheetStep.propTypes = {
|
|
153
154
|
* and is defaulted to true.
|
154
155
|
* You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's step content.
|
155
156
|
*/
|
157
|
+
/**@ts-ignore*/
|
156
158
|
hasFieldset: PropTypes.bool,
|
157
159
|
/**
|
158
160
|
* This prop is used to help track dynamic steps. If this value is `false` then the step is not included in the visible steps or the ProgressIndicator
|
@@ -205,8 +205,9 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
|
|
205
205
|
}
|
206
206
|
if ((prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.row) !== (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) || (prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.column) !== (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column)) {
|
207
207
|
if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) !== 'header' && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) !== 'header') {
|
208
|
+
var _activeCellFullData$r;
|
208
209
|
var activeCellFullData = typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'number' && typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'number' ? rows[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row].cells[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column] : null;
|
209
|
-
setActiveCellContent(activeCellFullData.render('Cell'));
|
210
|
+
setActiveCellContent((_activeCellFullData$r = activeCellFullData === null || activeCellFullData === void 0 ? void 0 : activeCellFullData.render('Cell')) !== null && _activeCellFullData$r !== void 0 ? _activeCellFullData$r : null);
|
210
211
|
}
|
211
212
|
if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'header' || (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'header') {
|
212
213
|
setActiveCellContent(null);
|
@@ -414,8 +415,8 @@ var DataSpreadsheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
|
|
414
415
|
var activeCellFullData = typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'number' && typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'number' ? rows[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row].cells[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column] : null;
|
415
416
|
var activeCellValue;
|
416
417
|
if (activeCellFullData && activeCellCoordinates !== null && activeCellCoordinates !== void 0 && activeCellCoordinates.column) {
|
417
|
-
var _activeCellFullData$
|
418
|
-
activeCellValue = activeCellFullData ? (_activeCellFullData$
|
418
|
+
var _activeCellFullData$r2;
|
419
|
+
activeCellValue = activeCellFullData ? (_activeCellFullData$r2 = activeCellFullData.row.cells) === null || _activeCellFullData$r2 === void 0 || (_activeCellFullData$r2 = _activeCellFullData$r2[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column]) === null || _activeCellFullData$r2 === void 0 ? void 0 : _activeCellFullData$r2.value : null;
|
419
420
|
}
|
420
421
|
setCellEditorValue(activeCellValue || '');
|
421
422
|
if (cellEditorRulerRef !== null && cellEditorRulerRef !== void 0 && cellEditorRulerRef.current) {
|
@@ -59,6 +59,11 @@ var DataSpreadsheetHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
59
59
|
var scrollContainer = ref === null || ref === void 0 || (_current = ref.current) === null || _current === void 0 ? void 0 : _current.querySelector(".".concat(blockClass, "__list--container"));
|
60
60
|
var hasScrollBar = (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.scrollHeight) && (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.clientHeight) && (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.scrollHeight) > (scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.clientHeight);
|
61
61
|
var scrollBarValue = hasScrollBar ? 0 : scrollBarSize;
|
62
|
+
|
63
|
+
// fix for a11y violation element_scrollable_tabbable
|
64
|
+
if (!(scrollContainer !== null && scrollContainer !== void 0 && scrollContainer.getAttribute('tabIndex'))) {
|
65
|
+
scrollContainer === null || scrollContainer === void 0 || scrollContainer.setAttribute('tabIndex', '0');
|
66
|
+
}
|
62
67
|
setScrollBarSizeValue(scrollBarValue);
|
63
68
|
}
|
64
69
|
}, [cellSize, ref, scrollBarSize, previousState === null || previousState === void 0 ? void 0 : previousState.cellSize]);
|
@@ -20,7 +20,7 @@ import { useInitialColumnSort } from '../useInitialColumnSort.js';
|
|
20
20
|
var _th;
|
21
21
|
var _excluded = ["role"],
|
22
22
|
_excluded2 = ["className", "role"],
|
23
|
-
_excluded3 = ["role"
|
23
|
+
_excluded3 = ["role"];
|
24
24
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
25
25
|
var getAccessibilityProps = function getAccessibilityProps(header) {
|
26
26
|
var props = {};
|
@@ -176,11 +176,10 @@ var HeaderRow = function HeaderRow(datagridState, headRef, headerGroup) {
|
|
176
176
|
var originalCol = visibleColumns[index];
|
177
177
|
var _header$getHeaderProp = header.getHeaderProps();
|
178
178
|
_header$getHeaderProp.role;
|
179
|
-
var
|
180
|
-
headerProps = _objectWithoutProperties(_header$getHeaderProp, _excluded3);
|
179
|
+
var headerProps = _objectWithoutProperties(_header$getHeaderProp, _excluded3);
|
181
180
|
var resizerProps = header === null || header === void 0 || (_header$getResizerPro = header.getResizerProps) === null || _header$getResizerPro === void 0 ? void 0 : _header$getResizerPro.call(header);
|
182
181
|
return /*#__PURE__*/React__default.createElement(TableHeader, _extends({}, headerProps, {
|
183
|
-
className: cx(
|
182
|
+
className: cx(header.className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "__resizableColumn"), resizerProps), "".concat(blockClass, "__isResizing"), header.isResizing), "".concat(blockClass, "__sortableColumn"), datagridState.isTableSortable && header.id !== 'spacer'), "".concat(blockClass, "__isSorted"), header.isSorted), "".concat(blockClass, "__header-actions-column"), header.isAction), "".concat(blockClass, "__with-slug"), header.slug && /*#__PURE__*/React__default.isValidElement(header.slug))),
|
184
183
|
key: header.id,
|
185
184
|
"aria-hidden": header.id === 'spacer' && 'true'
|
186
185
|
}, getAccessibilityProps(header)), header.render('Header'), renderSlug(header.slug), resizerProps && !header.isAction && /*#__PURE__*/React__default.createElement(ResizeHeader, {
|
@@ -39,7 +39,8 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
|
|
39
39
|
page = datagridState.page,
|
40
40
|
handleResize = datagridState.handleResize,
|
41
41
|
gridRef = datagridState.gridRef,
|
42
|
-
tableId = datagridState.tableId
|
42
|
+
tableId = datagridState.tableId,
|
43
|
+
onVirtualScroll = datagridState.onVirtualScroll;
|
43
44
|
|
44
45
|
/* istanbul ignore next */
|
45
46
|
var handleVirtualGridResize = function handleVirtualGridResize() {
|
@@ -89,6 +90,9 @@ var DatagridVirtualBody = function DatagridVirtualBody(datagridState) {
|
|
89
90
|
},
|
90
91
|
estimatedItemSize: rowHeight,
|
91
92
|
onScroll: onScroll,
|
93
|
+
onItemsRendered: function onItemsRendered(e) {
|
94
|
+
return onVirtualScroll === null || onVirtualScroll === void 0 ? void 0 : onVirtualScroll(e);
|
95
|
+
},
|
92
96
|
innerRef: innerListRef,
|
93
97
|
outerRef: testRef,
|
94
98
|
ref: listRef,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import React, { PropsWithChildren, ReactNode } from 'react';
|
2
|
+
import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
|
2
3
|
type ActionIcon = {
|
3
4
|
id?: string;
|
4
5
|
icon?: () => void | object;
|
@@ -50,7 +51,7 @@ interface ExpressiveCardProps extends PropsWithChildren {
|
|
50
51
|
/**
|
51
52
|
* Provides the icon that's displayed at the top of the card
|
52
53
|
*/
|
53
|
-
pictogram?:
|
54
|
+
pictogram?: CarbonIconType;
|
54
55
|
/**
|
55
56
|
* Optionally specify an href for your Button to become an <a> element
|
56
57
|
*/
|
@@ -1,6 +1,66 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2023, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import React, { ReactNode } from 'react';
|
8
|
+
interface GuidebannerProps {
|
9
|
+
/**
|
10
|
+
* Provide the contents of the Guidebanner.
|
11
|
+
* One or more GuidebannerElement components are required.
|
12
|
+
*/
|
13
|
+
children: ReactNode;
|
14
|
+
/**
|
15
|
+
* Provide an optional class to be applied to the containing node.
|
16
|
+
*/
|
17
|
+
className?: string;
|
18
|
+
/**
|
19
|
+
* Tooltip text and aria label for the Close button icon.
|
20
|
+
*/
|
21
|
+
closeIconDescription?: string;
|
22
|
+
/**
|
23
|
+
* Text label for the Collapse button.
|
24
|
+
*/
|
25
|
+
collapseButtonLabel?: string;
|
26
|
+
/**
|
27
|
+
* When true, the Guidebanner will initialize in a collapsed state,
|
28
|
+
* showing the title and the Expand button.
|
29
|
+
*
|
30
|
+
* When expanded, it will show the GuidebannerElement child components and the Collapse button.
|
31
|
+
*/
|
32
|
+
collapsible?: boolean;
|
33
|
+
/**
|
34
|
+
* Text label for the Expand button.
|
35
|
+
*/
|
36
|
+
expandButtonLabel?: string;
|
37
|
+
/**
|
38
|
+
* Tooltip text and aria label for the Next button icon.
|
39
|
+
*/
|
40
|
+
nextIconDescription?: string;
|
41
|
+
/**
|
42
|
+
* If defined, a Close button will render in the top-right corner and a
|
43
|
+
* callback function will be triggered when button is clicked.
|
44
|
+
*/
|
45
|
+
onClose?: () => void;
|
46
|
+
/**
|
47
|
+
* Tooltip text and aria label for the Back button icon.
|
48
|
+
*/
|
49
|
+
previousIconDescription?: string;
|
50
|
+
/**
|
51
|
+
* Title text.
|
52
|
+
*/
|
53
|
+
title: string;
|
54
|
+
/**
|
55
|
+
* If true, insert 1 rem of "space" on the left of the component.
|
56
|
+
* This will allow the component's content to line up with other
|
57
|
+
* content on the page under special circumstances.
|
58
|
+
*/
|
59
|
+
withLeftGutter?: boolean;
|
60
|
+
}
|
1
61
|
/**
|
2
62
|
* The guide banner sits at the top of a page, or page-level tab,
|
3
63
|
* to introduce foundational concepts related to the page's content.
|
4
64
|
*/
|
5
|
-
export let Guidebanner: React.ForwardRefExoticComponent<React.RefAttributes<
|
6
|
-
|
65
|
+
export declare let Guidebanner: React.ForwardRefExoticComponent<GuidebannerProps & React.RefAttributes<HTMLDivElement>>;
|
66
|
+
export {};
|