@carbon/ibm-products 2.43.2-canary.9 → 2.44.0-rc.1
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 +51 -3
- 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 +12 -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 +51 -3
- 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 +51 -3
- 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/ConditionBuilder/ConditionBlock/ConditionBlock.js +23 -21
- package/es/components/ConditionBuilder/ConditionBuilder.js +67 -20
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +129 -0
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +6 -4
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +5 -1
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +16 -4
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -11
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +36 -32
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +0 -1
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +7 -2
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +6 -1
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +18 -10
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +39 -36
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +12 -10
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +24 -16
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +19 -4
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +109 -0
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +58 -33
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +4 -6
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +14 -5
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +1 -2
- package/es/components/ConditionBuilder/utils/util.d.ts +1 -0
- package/es/components/ConditionBuilder/utils/util.js +16 -1
- package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +12 -0
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +29 -7
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +12 -0
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +22 -6
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +3 -0
- package/es/components/Datagrid/Datagrid/Datagrid.js +2 -1
- package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +11 -1
- package/es/components/Datagrid/Datagrid/DatagridRow.js +13 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +6 -3
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +21 -16
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +74 -11
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
- package/es/components/Datagrid/types/index.d.ts +18 -4
- package/es/components/Datagrid/useActionsColumn.d.ts +8 -1
- package/es/components/Datagrid/useActionsColumn.js +7 -6
- package/es/components/Datagrid/useColumnRightAlign.d.ts +8 -1
- package/es/components/Datagrid/useColumnRightAlign.js +4 -3
- package/es/components/Datagrid/useInlineEdit.js +12 -2
- package/es/components/Datagrid/useNestedRows.js +32 -13
- package/es/components/Decorator/Decorator.js +2 -1
- package/es/components/DecoratorBase/DecoratorBase.js +3 -5
- package/es/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
- package/es/components/DecoratorLink/DecoratorLink.js +2 -1
- package/es/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
- package/es/components/EditTearsheet/EditTearsheet.d.ts +5 -1
- package/es/components/EditTearsheet/EditTearsheet.js +0 -1
- package/es/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
- package/es/components/EditTearsheet/EditTearsheetForm.js +3 -0
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
- package/es/components/RemoveModal/RemoveModal.d.ts +4 -0
- package/es/components/RemoveModal/RemoveModal.js +7 -1
- package/es/components/StatusIndicator/StatusIndicatorStep.js +87 -0
- package/es/components/Tearsheet/Tearsheet.d.ts +8 -1
- package/es/components/Tearsheet/Tearsheet.js +9 -1
- package/es/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
- package/es/components/Tearsheet/TearsheetNarrow.js +12 -0
- package/es/components/Tearsheet/TearsheetShell.d.ts +10 -0
- package/es/components/Tearsheet/TearsheetShell.js +17 -3
- package/es/components/Toolbar/ToolbarButton.js +1 -1
- package/es/components/index.d.ts +1 -1
- package/es/index.js +1 -0
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +23 -21
- package/lib/components/ConditionBuilder/ConditionBuilder.js +67 -20
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.d.ts +15 -0
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +137 -0
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +6 -3
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +5 -1
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +16 -4
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -11
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +36 -32
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +0 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +7 -2
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +6 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +18 -10
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +39 -36
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +12 -10
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +23 -15
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +20 -5
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.d.ts +13 -0
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +117 -0
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.d.ts → ItemOptionForValueField.d.ts} +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/{ConditionBuilderItemOption.js → ItemOptionForValueField.js} +56 -31
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +4 -6
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +14 -4
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +1 -2
- package/lib/components/ConditionBuilder/utils/util.d.ts +1 -0
- package/lib/components/ConditionBuilder/utils/util.js +17 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +12 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +29 -7
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +12 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +22 -6
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +3 -0
- package/lib/components/Datagrid/Datagrid/Datagrid.js +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +11 -1
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +13 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.d.ts +3 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +6 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +21 -16
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditButton/InlineEditButton.js +1 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +73 -10
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +10 -2
- package/lib/components/Datagrid/types/index.d.ts +18 -4
- package/lib/components/Datagrid/useActionsColumn.d.ts +8 -1
- package/lib/components/Datagrid/useActionsColumn.js +7 -6
- package/lib/components/Datagrid/useColumnRightAlign.d.ts +8 -1
- package/lib/components/Datagrid/useColumnRightAlign.js +4 -3
- package/lib/components/Datagrid/useInlineEdit.js +12 -2
- package/lib/components/Datagrid/useNestedRows.js +32 -13
- package/lib/components/Decorator/Decorator.js +2 -1
- package/lib/components/DecoratorBase/DecoratorBase.js +3 -5
- package/lib/components/DecoratorDualButton/DecoratorDualButton.js +2 -1
- package/lib/components/DecoratorLink/DecoratorLink.js +2 -1
- package/lib/components/DecoratorSingleButton/DecoratorSingleButton.js +2 -1
- package/lib/components/EditTearsheet/EditTearsheet.d.ts +5 -1
- package/lib/components/EditTearsheet/EditTearsheet.js +0 -1
- package/lib/components/EditTearsheet/EditTearsheetForm.d.ts +45 -2
- package/lib/components/EditTearsheet/EditTearsheetForm.js +3 -0
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +6 -0
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +6 -0
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +6 -0
- package/lib/components/RemoveModal/RemoveModal.d.ts +4 -0
- package/lib/components/RemoveModal/RemoveModal.js +7 -1
- package/lib/components/StatusIndicator/StatusIndicatorStep.js +94 -0
- package/lib/components/Tearsheet/Tearsheet.d.ts +8 -1
- package/lib/components/Tearsheet/Tearsheet.js +9 -1
- package/lib/components/Tearsheet/TearsheetNarrow.d.ts +11 -0
- package/lib/components/Tearsheet/TearsheetNarrow.js +12 -0
- package/lib/components/Tearsheet/TearsheetShell.d.ts +10 -0
- package/lib/components/Tearsheet/TearsheetShell.js +16 -2
- package/lib/components/Toolbar/ToolbarButton.js +1 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/index.js +5 -0
- package/package.json +7 -6
- package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +9 -1
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +26 -1
- package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +7 -0
- package/scss/components/Datagrid/styles/_useInlineEdit.scss +13 -0
- package/scss/components/StatusIcon/_status-icon.scss +4 -4
- package/scss/components/StringFormatter/_string-formatter.scss +2 -2
- package/scss/components/UserProfileImage/_user-profile-image.scss +6 -2
- package/telemetry.yml +15 -3
- package/es/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
- package/es/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -16
- package/lib/components/ConditionBuilder/utils/checkForHoldingKey.d.ts +0 -1
- package/lib/components/ConditionBuilder/utils/checkForHoldingKey.js +0 -20
@@ -17,9 +17,10 @@ var _excluded = ["align", "id", "itemText", "onClick", "icon", "shouldHideMenuIt
|
|
17
17
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
18
18
|
var useActionsColumn = function useActionsColumn(hooks) {
|
19
19
|
var useAttachActionsOnInstance = function useAttachActionsOnInstance(instance) {
|
20
|
-
var
|
21
|
-
|
22
|
-
|
20
|
+
var _ref = instance,
|
21
|
+
rowActions = _ref.rowActions,
|
22
|
+
isFetching = _ref.isFetching,
|
23
|
+
selectedRowIds = _ref.state.selectedRowIds;
|
23
24
|
var getDisabledState = function getDisabledState(rowIndex) {
|
24
25
|
var selectedRowIndexes = Object.keys(selectedRowIds).map(function (n) {
|
25
26
|
return Number(n);
|
@@ -79,10 +80,10 @@ var useActionsColumn = function useActionsColumn(hooks) {
|
|
79
80
|
return;
|
80
81
|
}
|
81
82
|
e.stopPropagation();
|
82
|
-
_onClick(id, row, e);
|
83
|
+
_onClick === null || _onClick === void 0 || _onClick(id, row, e);
|
83
84
|
},
|
84
85
|
disabled: isDisabledByRow
|
85
|
-
}), /*#__PURE__*/React__default.createElement(Icon, null)));
|
86
|
+
}), Icon && /*#__PURE__*/React__default.createElement(Icon, null)));
|
86
87
|
})), !isFetching && (rowActions.length > 2 || isColumnSticky) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(OverflowMenu, {
|
87
88
|
align: "left",
|
88
89
|
size: "sm",
|
@@ -108,7 +109,7 @@ var useActionsColumn = function useActionsColumn(hooks) {
|
|
108
109
|
disabled: isDisabledByRow,
|
109
110
|
onClick: function onClick(e) {
|
110
111
|
e.stopPropagation();
|
111
|
-
_onClick2(id, row, e);
|
112
|
+
_onClick2 === null || _onClick2 === void 0 || _onClick2(id, row, e);
|
112
113
|
},
|
113
114
|
key: id
|
114
115
|
}));
|
@@ -1,2 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 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 { Hooks } from 'react-table';
|
8
|
+
declare const useColumnRightAlign: (hooks: Hooks) => void;
|
1
9
|
export default useColumnRightAlign;
|
2
|
-
declare function useColumnRightAlign(hooks: any): void;
|
@@ -13,16 +13,17 @@ import { pkg } from '../../settings.js';
|
|
13
13
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
14
14
|
var useColumnRightAlign = function useColumnRightAlign(hooks) {
|
15
15
|
var RightAlignRenderer = function RightAlignRenderer(tableProps, column) {
|
16
|
+
var _tableProps$column, _column$Cell;
|
16
17
|
return /*#__PURE__*/React__default.createElement("div", {
|
17
18
|
className: cx("".concat(blockClass, "__right-align-cell-renderer"), {
|
18
|
-
sortDisabled: !tableProps.isTableSortable || tableProps.column.disableSortBy === true
|
19
|
+
sortDisabled: !tableProps.isTableSortable || (tableProps === null || tableProps === void 0 || (_tableProps$column = tableProps.column) === null || _tableProps$column === void 0 ? void 0 : _tableProps$column.disableSortBy) === true
|
19
20
|
})
|
20
|
-
}, column.Cell(tableProps));
|
21
|
+
}, column === null || column === void 0 || (_column$Cell = column.Cell) === null || _column$Cell === void 0 ? void 0 : _column$Cell.call(column, tableProps));
|
21
22
|
};
|
22
23
|
var RightAlignHeader = function RightAlignHeader(headerProp, column) {
|
23
24
|
return /*#__PURE__*/React__default.createElement("div", {
|
24
25
|
className: "".concat(blockClass, "__right-align-header")
|
25
|
-
}, typeof column.Header === 'function' ? column.Header(headerProp) : column.Header);
|
26
|
+
}, typeof column.Header === 'function' ? (column === null || column === void 0 ? void 0 : column.Header.bind(column))(headerProp) : column.Header);
|
26
27
|
};
|
27
28
|
var rightAlignedColumns = function rightAlignedColumns(columns) {
|
28
29
|
var columnsWithDefaultCells = columns.map(function (column) {
|
@@ -5,6 +5,7 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
+
import { typeof as _typeof } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
8
9
|
import React__default from 'react';
|
9
10
|
import { pkg } from '../../settings.js';
|
10
11
|
import cx from 'classnames';
|
@@ -13,12 +14,13 @@ import { InlineEditCell } from './Datagrid/addons/InlineEdit/InlineEditCell/Inli
|
|
13
14
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
14
15
|
var useInlineEdit = function useInlineEdit(hooks) {
|
15
16
|
var addInlineEdit = function addInlineEdit(props, _ref) {
|
16
|
-
var _cell$column, _cell$column2;
|
17
|
+
var _cell$column, _cell$column2, _cell$value, _cell$value2, _cell$value3;
|
17
18
|
var cell = _ref.cell,
|
18
19
|
instance = _ref.instance;
|
19
20
|
var columnInlineEditConfig = cell.column.inlineEdit;
|
20
21
|
var inlineEditType = (_cell$column = cell.column) === null || _cell$column === void 0 || (_cell$column = _cell$column.inlineEdit) === null || _cell$column === void 0 ? void 0 : _cell$column.type;
|
21
22
|
var isDisabled = (_cell$column2 = cell.column) === null || _cell$column2 === void 0 ? void 0 : _cell$column2.isDisabled;
|
23
|
+
var staticCell = _typeof(cell.value) === 'object' && cell.column.id === ((_cell$value = cell.value) === null || _cell$value === void 0 ? void 0 : _cell$value.columnId) && ((_cell$value2 = cell.value) === null || _cell$value2 === void 0 ? void 0 : _cell$value2.isStaticCell);
|
22
24
|
var renderInlineEditComponent = function renderInlineEditComponent(type) {
|
23
25
|
return /*#__PURE__*/React__default.createElement(InlineEditCell, {
|
24
26
|
config: columnInlineEditConfig,
|
@@ -38,7 +40,15 @@ var useInlineEdit = function useInlineEdit(hooks) {
|
|
38
40
|
return [props, {
|
39
41
|
className: cx("".concat(blockClass, "__cell"), "".concat(blockClass, "__cell-inline-edit")),
|
40
42
|
role: 'gridcell',
|
41
|
-
children: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, inlineEditType === 'text' && renderInlineEditComponent(inlineEditType), inlineEditType === 'number' && renderInlineEditComponent(inlineEditType), inlineEditType === 'selection' && renderInlineEditComponent(inlineEditType), inlineEditType === '
|
43
|
+
children: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !staticCell && inlineEditType === 'text' && renderInlineEditComponent(inlineEditType), !staticCell && inlineEditType === 'number' && renderInlineEditComponent(inlineEditType), !staticCell && inlineEditType === 'selection' && renderInlineEditComponent(inlineEditType), inlineEditType === 'checkbox' && renderInlineEditComponent(inlineEditType), !staticCell && inlineEditType === 'date' && renderInlineEditComponent(inlineEditType), staticCell && /*#__PURE__*/React__default.createElement(InlineEditCell, {
|
44
|
+
config: columnInlineEditConfig,
|
45
|
+
tabIndex: -1,
|
46
|
+
value: (_cell$value3 = cell.value) === null || _cell$value3 === void 0 ? void 0 : _cell$value3.value,
|
47
|
+
cell: cell,
|
48
|
+
instance: instance,
|
49
|
+
nonEditCell: true,
|
50
|
+
type: "text"
|
51
|
+
}), !inlineEditType && /*#__PURE__*/React__default.createElement(InlineEditCell, {
|
42
52
|
config: columnInlineEditConfig,
|
43
53
|
tabIndex: -1,
|
44
54
|
value: cell.value,
|
@@ -15,33 +15,52 @@ var blockClass = "".concat(pkg.prefix, "--datagrid");
|
|
15
15
|
var useNestedRows = function useNestedRows(hooks) {
|
16
16
|
useNestedRowExpander(hooks);
|
17
17
|
var useInstance = function useInstance(instance) {
|
18
|
+
useEffect(function () {
|
19
|
+
var _ref = instance,
|
20
|
+
rows = _ref.rows;
|
21
|
+
var defaultExpandedRows = rows.filter(function (row) {
|
22
|
+
var _row$original;
|
23
|
+
return row === null || row === void 0 || (_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.defaultExpanded;
|
24
|
+
});
|
25
|
+
if (defaultExpandedRows !== null && defaultExpandedRows !== void 0 && defaultExpandedRows.length) {
|
26
|
+
defaultExpandedRows.map(function (defaultExpandedRow) {
|
27
|
+
if (!(defaultExpandedRow !== null && defaultExpandedRow !== void 0 && defaultExpandedRow.isExpanded) && !(defaultExpandedRow !== null && defaultExpandedRow !== void 0 && defaultExpandedRow.hasExpanded)) {
|
28
|
+
var _defaultExpandedRow$t;
|
29
|
+
defaultExpandedRow === null || defaultExpandedRow === void 0 || (_defaultExpandedRow$t = defaultExpandedRow.toggleRowExpanded) === null || _defaultExpandedRow$t === void 0 || _defaultExpandedRow$t.call(defaultExpandedRow);
|
30
|
+
defaultExpandedRow.hasExpanded = true;
|
31
|
+
return;
|
32
|
+
}
|
33
|
+
});
|
34
|
+
}
|
35
|
+
}, [instance, instance.rows]);
|
18
36
|
// This useEffect will expand rows if they exist in the initialState obj
|
19
37
|
useEffect(function () {
|
20
38
|
var rows = instance.rows,
|
21
39
|
initialState = instance.initialState;
|
22
|
-
var
|
23
|
-
expandedRowIds =
|
40
|
+
var _ref2 = initialState,
|
41
|
+
expandedRowIds = _ref2.expandedRowIds;
|
24
42
|
if (expandedRowIds) {
|
25
43
|
Object.keys(expandedRowIds).forEach(function (key) {
|
44
|
+
var _row$0$original;
|
26
45
|
var row = rows.filter(function (r) {
|
27
|
-
|
46
|
+
var _r$original;
|
47
|
+
return r.id.toString() === key.toString() || ((_r$original = r.original) === null || _r$original === void 0 || (_r$original = _r$original.id) === null || _r$original === void 0 ? void 0 : _r$original.toString()) === key.toString();
|
28
48
|
});
|
29
|
-
if (row
|
30
|
-
|
31
|
-
(_row$ = row[0]) === null || _row$ === void 0 || _row$.toggleRowExpanded();
|
49
|
+
if (row.length && key.toString() === row[0].id.toString() || row.length && key.toString() === ((_row$0$original = row[0].original) === null || _row$0$original === void 0 || (_row$0$original = _row$0$original.id) === null || _row$0$original === void 0 ? void 0 : _row$0$original.toString())) {
|
50
|
+
row[0].toggleRowExpanded();
|
32
51
|
}
|
33
52
|
});
|
34
53
|
}
|
35
54
|
}, [instance]);
|
36
55
|
var marginLeft = 24;
|
37
|
-
var getRowProps = function getRowProps(props,
|
38
|
-
var row =
|
56
|
+
var getRowProps = function getRowProps(props, _ref3) {
|
57
|
+
var row = _ref3.row;
|
39
58
|
return [props, {
|
40
59
|
className: cx(_defineProperty(_defineProperty({}, "".concat(blockClass, "__carbon-nested-row"), row.depth > 0), "".concat(blockClass, "__carbon-row-expanded"), row.isExpanded))
|
41
60
|
}];
|
42
61
|
};
|
43
|
-
var getRowStyles = function getRowStyles(props,
|
44
|
-
var row =
|
62
|
+
var getRowStyles = function getRowStyles(props, _ref4) {
|
63
|
+
var row = _ref4.row;
|
45
64
|
return [props, {
|
46
65
|
style: {
|
47
66
|
paddingLeft: "".concat(row.depth > 1 ? marginLeft * 2 + (row.depth - 1) * (marginLeft + marginLeft / 3) : row.depth === 1 ? marginLeft * 2 : 0, "px")
|
@@ -51,9 +70,9 @@ var useNestedRows = function useNestedRows(hooks) {
|
|
51
70
|
var getIndentation = function getIndentation(depth) {
|
52
71
|
return 32 * depth + 16;
|
53
72
|
}; // row indentation padding
|
54
|
-
var getCellProps = function getCellProps(props,
|
55
|
-
var cell =
|
56
|
-
instance =
|
73
|
+
var getCellProps = function getCellProps(props, _ref5) {
|
74
|
+
var cell = _ref5.cell,
|
75
|
+
instance = _ref5.instance;
|
57
76
|
// we add a dynamic -ve margin right only if the cell is resized below minimum width i.e 50px, else we set the width based on indentation at different levels
|
58
77
|
var isFirstCell = instance.columns.findIndex(function (c) {
|
59
78
|
return c.id === cell.column.id;
|
@@ -87,7 +87,8 @@ Decorator.propTypes = {
|
|
87
87
|
*/
|
88
88
|
small: PropTypes.bool,
|
89
89
|
/**
|
90
|
-
*
|
90
|
+
* Override the default theme of the component.
|
91
|
+
* Useful if you want "invert" the component's theme.
|
91
92
|
*/
|
92
93
|
theme: PropTypes.oneOf(['light', 'dark']),
|
93
94
|
/**
|
@@ -23,8 +23,7 @@ var defaults = {
|
|
23
23
|
onContextMenu: function onContextMenu() {},
|
24
24
|
onContextMenuLabel: function onContextMenuLabel() {},
|
25
25
|
onContextMenuValue: function onContextMenuValue() {},
|
26
|
-
scoreThresholds: [0, 4, 7, 10]
|
27
|
-
theme: 'light'
|
26
|
+
scoreThresholds: [0, 4, 7, 10]
|
28
27
|
};
|
29
28
|
|
30
29
|
/**
|
@@ -56,8 +55,7 @@ var DecoratorBase = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
56
55
|
_ref$scoreThresholds = _ref.scoreThresholds,
|
57
56
|
scoreThresholds = _ref$scoreThresholds === void 0 ? defaults.scoreThresholds : _ref$scoreThresholds,
|
58
57
|
small = _ref.small,
|
59
|
-
|
60
|
-
theme = _ref$theme === void 0 ? defaults.theme : _ref$theme,
|
58
|
+
theme = _ref.theme,
|
61
59
|
truncateValue = _ref.truncateValue,
|
62
60
|
value = _ref.value,
|
63
61
|
valueTitle = _ref.valueTitle,
|
@@ -67,7 +65,7 @@ var DecoratorBase = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
67
65
|
var _value = truncate(value, truncateValue);
|
68
66
|
|
69
67
|
// These class names apply to all types of DecoratorBase.
|
70
|
-
var classNames = cx(blockClass, className, "".concat(blockClass, "--").concat(theme),
|
68
|
+
var classNames = cx(blockClass, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(blockClass, "--").concat(theme), theme), "".concat(blockClass, "--sm"), small), "".concat(blockClass, "--truncate-end"), truncateValue === 'end'), "".concat(blockClass, "--truncate-start"), truncateValue === 'start'), "".concat(blockClass, "--truncate-midline"), truncateValue === null || truncateValue === void 0 ? void 0 : truncateValue.maxLength));
|
71
69
|
|
72
70
|
// These properties apply to all <DecoratorIcons>.
|
73
71
|
var decoratorIconsProps = {
|
@@ -111,7 +111,8 @@ DecoratorDualButton.propTypes = {
|
|
111
111
|
*/
|
112
112
|
small: PropTypes.bool,
|
113
113
|
/**
|
114
|
-
*
|
114
|
+
* Override the default theme of the component.
|
115
|
+
* Useful if you want "invert" the component's theme.
|
115
116
|
*/
|
116
117
|
theme: PropTypes.oneOf(['light', 'dark']),
|
117
118
|
/**
|
@@ -101,7 +101,8 @@ DecoratorLink.propTypes = {
|
|
101
101
|
*/
|
102
102
|
small: PropTypes.bool,
|
103
103
|
/**
|
104
|
-
*
|
104
|
+
* Override the default theme of the component.
|
105
|
+
* Useful if you want "invert" the component's theme.
|
105
106
|
*/
|
106
107
|
theme: PropTypes.oneOf(['light', 'dark']),
|
107
108
|
/**
|
@@ -101,7 +101,8 @@ DecoratorSingleButton.propTypes = {
|
|
101
101
|
*/
|
102
102
|
small: PropTypes.bool,
|
103
103
|
/**
|
104
|
-
*
|
104
|
+
* Override the default theme of the component.
|
105
|
+
* Useful if you want "invert" the component's theme.
|
105
106
|
*/
|
106
107
|
theme: PropTypes.oneOf(['light', 'dark']),
|
107
108
|
/**
|
@@ -5,7 +5,11 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
import React, { ReactNode, PropsWithChildren } from 'react';
|
8
|
-
export
|
8
|
+
export type FormContextType = {
|
9
|
+
currentForm: number;
|
10
|
+
setFormTitle: () => void;
|
11
|
+
};
|
12
|
+
export declare const FormContext: React.Context<FormContextType | null>;
|
9
13
|
export declare const FormNumberContext: React.Context<number>;
|
10
14
|
interface EditTearsheetProps extends PropsWithChildren {
|
11
15
|
/**
|
@@ -18,7 +18,6 @@ import { prepareProps } from '../../global/js/utils/props-helper.js';
|
|
18
18
|
var _excluded = ["cancelButtonText", "children", "className", "description", "influencerWidth", "label", "onClose", "open", "submitButtonText", "title", "verticalPosition", "onRequestSubmit", "onFormChange", "sideNavAriaLabel"];
|
19
19
|
var componentName = 'EditTearsheet';
|
20
20
|
var blockClass = "".concat(pkg.prefix, "--tearsheet-edit");
|
21
|
-
|
22
21
|
// This is a general context for the forms container
|
23
22
|
// containing information about the state of the container
|
24
23
|
// and providing some callback methods for forms to use
|
@@ -1,2 +1,45 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2022, 2022
|
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 EditTearsheetFormBaseProps {
|
9
|
+
/**
|
10
|
+
* Content that shows in the tearsheet form
|
11
|
+
*/
|
12
|
+
children?: ReactNode;
|
13
|
+
/**
|
14
|
+
* Sets an optional className to be added to the tearsheet form
|
15
|
+
*/
|
16
|
+
className?: string;
|
17
|
+
/**
|
18
|
+
* Sets an optional description on the form component
|
19
|
+
*/
|
20
|
+
description?: string;
|
21
|
+
/**
|
22
|
+
* This optional prop will render your form content inside of a fieldset html element
|
23
|
+
* and is defaulted to true.
|
24
|
+
* You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's form content.
|
25
|
+
*/
|
26
|
+
hasFieldset?: boolean;
|
27
|
+
/**
|
28
|
+
* Sets an optional subtitle on the form component
|
29
|
+
*/
|
30
|
+
subtitle?: string;
|
31
|
+
/**
|
32
|
+
* Sets the title text for a tearsheet form
|
33
|
+
*/
|
34
|
+
title: ReactNode;
|
35
|
+
}
|
36
|
+
type EditTearsheetFormFieldsetTypes = {
|
37
|
+
hasFieldset?: false;
|
38
|
+
fieldsetLegendText: string;
|
39
|
+
} | {
|
40
|
+
hasFieldset: true;
|
41
|
+
fieldsetLegendText: string;
|
42
|
+
};
|
43
|
+
type EditTearsheetFormProps = EditTearsheetFormBaseProps & EditTearsheetFormFieldsetTypes;
|
44
|
+
export declare let EditTearsheetForm: React.ForwardRefExoticComponent<EditTearsheetFormProps & React.RefAttributes<HTMLDivElement>>;
|
45
|
+
export {};
|
@@ -82,6 +82,7 @@ EditTearsheetForm.propTypes = {
|
|
82
82
|
* 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 form content.
|
83
83
|
* Otherwise, use CSS to hide/remove this label text.
|
84
84
|
*/
|
85
|
+
/**@ts-ignore */
|
85
86
|
fieldsetLegendText: PropTypes.string.isRequired.if(function (_ref2) {
|
86
87
|
var hasFieldset = _ref2.hasFieldset;
|
87
88
|
return !!hasFieldset;
|
@@ -91,10 +92,12 @@ EditTearsheetForm.propTypes = {
|
|
91
92
|
* and is defaulted to true.
|
92
93
|
* You can set this prop to `false` if you have multiple fieldset elements or want to control the children of your Full Page's form content.
|
93
94
|
*/
|
95
|
+
/**@ts-ignore*/
|
94
96
|
hasFieldset: PropTypes.bool,
|
95
97
|
/**
|
96
98
|
* Sets an optional subtitle on the form component
|
97
99
|
*/
|
100
|
+
/**@ts-ignore*/
|
98
101
|
subtitle: PropTypes.string,
|
99
102
|
/**
|
100
103
|
* Sets the title text for a tearsheet form
|
@@ -44,6 +44,12 @@ var HTTPError403 = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
44
44
|
}));
|
45
45
|
});
|
46
46
|
|
47
|
+
/**@ts-ignore*/
|
48
|
+
HTTPError403.deprecated = {
|
49
|
+
level: 'warn',
|
50
|
+
details: "Please replace ".concat(componentName, " with FullPageError")
|
51
|
+
};
|
52
|
+
|
47
53
|
// Return a placeholder if not released and not enabled by feature flag
|
48
54
|
HTTPError403 = pkg.checkComponentEnabled(HTTPError403, componentName);
|
49
55
|
|
@@ -44,6 +44,12 @@ var HTTPError404 = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
44
44
|
}));
|
45
45
|
});
|
46
46
|
|
47
|
+
/**@ts-ignore*/
|
48
|
+
HTTPError404.deprecated = {
|
49
|
+
level: 'warn',
|
50
|
+
details: "Please replace ".concat(componentName, " with FullPageError")
|
51
|
+
};
|
52
|
+
|
47
53
|
// Return a placeholder if not released and not enabled by feature flag
|
48
54
|
HTTPError404 = pkg.checkComponentEnabled(HTTPError404, componentName);
|
49
55
|
|
@@ -44,6 +44,12 @@ var HTTPErrorOther = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
44
44
|
}));
|
45
45
|
});
|
46
46
|
|
47
|
+
/**@ts-ignore*/
|
48
|
+
HTTPErrorOther.deprecated = {
|
49
|
+
level: 'warn',
|
50
|
+
details: "Please replace ".concat(componentName, " with FullPageError")
|
51
|
+
};
|
52
|
+
|
47
53
|
// Return a placeholder if not released and not enabled by feature flag
|
48
54
|
HTTPErrorOther = pkg.checkComponentEnabled(HTTPErrorOther, componentName);
|
49
55
|
|
@@ -58,6 +58,10 @@ interface RemoveModalProps extends React.ComponentProps<typeof ComposedModal> {
|
|
58
58
|
* Specify the text for the primary button
|
59
59
|
*/
|
60
60
|
primaryButtonText?: string;
|
61
|
+
/**
|
62
|
+
* Specify the danger description on the primary button
|
63
|
+
*/
|
64
|
+
primaryDangerDescription?: string;
|
61
65
|
/**
|
62
66
|
* The name of the resource being acted upon
|
63
67
|
*/
|
@@ -16,7 +16,7 @@ import { pkg } from '../../settings.js';
|
|
16
16
|
import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
|
17
17
|
import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
|
18
18
|
|
19
|
-
var _excluded = ["body", "className", "iconDescription", "inputInvalidText", "inputLabelText", "inputPlaceholderText", "label", "onClose", "onRequestSubmit", "open", "portalTarget", "preventCloseOnClickOutside", "primaryButtonDisabled", "primaryButtonText", "resourceName", "secondaryButtonText", "textConfirmation", "title"];
|
19
|
+
var _excluded = ["body", "className", "iconDescription", "inputInvalidText", "inputLabelText", "inputPlaceholderText", "label", "onClose", "onRequestSubmit", "open", "portalTarget", "preventCloseOnClickOutside", "primaryButtonDisabled", "primaryButtonText", "primaryDangerDescription", "resourceName", "secondaryButtonText", "textConfirmation", "title"];
|
20
20
|
var componentName = 'RemoveModal';
|
21
21
|
|
22
22
|
/**
|
@@ -40,6 +40,7 @@ var RemoveModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
40
40
|
preventCloseOnClickOutside = _ref.preventCloseOnClickOutside,
|
41
41
|
primaryButtonDisabled = _ref.primaryButtonDisabled,
|
42
42
|
primaryButtonText = _ref.primaryButtonText,
|
43
|
+
primaryDangerDescription = _ref.primaryDangerDescription,
|
43
44
|
resourceName = _ref.resourceName,
|
44
45
|
secondaryButtonText = _ref.secondaryButtonText,
|
45
46
|
textConfirmation = _ref.textConfirmation,
|
@@ -109,6 +110,7 @@ var RemoveModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
109
110
|
}, secondaryButtonText), /*#__PURE__*/React__default.createElement(Button, {
|
110
111
|
type: "submit",
|
111
112
|
kind: "danger",
|
113
|
+
dangerDescription: primaryDangerDescription,
|
112
114
|
onClick: onRequestSubmit,
|
113
115
|
disabled: primaryButtonStatus
|
114
116
|
}, primaryButtonText))));
|
@@ -173,6 +175,10 @@ RemoveModal.propTypes = {
|
|
173
175
|
* Specify the text for the primary button
|
174
176
|
*/
|
175
177
|
primaryButtonText: PropTypes.string,
|
178
|
+
/**
|
179
|
+
* Specify the danger description on the primary button
|
180
|
+
*/
|
181
|
+
primaryDangerDescription: PropTypes.string,
|
176
182
|
/**
|
177
183
|
* The name of the resource being acted upon
|
178
184
|
*/
|
@@ -0,0 +1,87 @@
|
|
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 { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
|
+
import React__default from 'react';
|
10
|
+
import PropTypes from '../../node_modules/prop-types/index.js';
|
11
|
+
import cx from 'classnames';
|
12
|
+
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
13
|
+
import { pkg } from '../../settings.js';
|
14
|
+
import { InlineLoading } from '@carbon/react';
|
15
|
+
import { CircleStroke, ErrorOutline, CheckmarkOutline } from '@carbon/react/icons';
|
16
|
+
|
17
|
+
var _CircleStroke, _InlineLoading, _ErrorOutline, _CheckmarkOutline;
|
18
|
+
var _excluded = ["className", "description", "errorMessage", "status"];
|
19
|
+
|
20
|
+
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
|
+
var blockClass = "".concat(pkg.prefix, "--status-indicator-step");
|
22
|
+
var componentName = 'StatusIndicatorStep';
|
23
|
+
var defaults = {
|
24
|
+
status: 'inactive'
|
25
|
+
};
|
26
|
+
|
27
|
+
/**
|
28
|
+
* An icon/description pair that describes one step of the `StatusIndicator`.
|
29
|
+
*/
|
30
|
+
var StatusIndicatorStep = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
31
|
+
var className = _ref.className,
|
32
|
+
description = _ref.description,
|
33
|
+
errorMessage = _ref.errorMessage,
|
34
|
+
_ref$status = _ref.status,
|
35
|
+
status = _ref$status === void 0 ? defaults.status : _ref$status,
|
36
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
37
|
+
return /*#__PURE__*/React__default.createElement("li", _extends({}, rest, {
|
38
|
+
className: cx(blockClass, className, "".concat(blockClass, "--").concat(status)),
|
39
|
+
ref: ref
|
40
|
+
}, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement("div", {
|
41
|
+
className: "".concat(blockClass, "__details")
|
42
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
43
|
+
className: "".concat(blockClass, "__icon")
|
44
|
+
}, status === 'inactive' && (_CircleStroke || (_CircleStroke = /*#__PURE__*/React__default.createElement(CircleStroke, {
|
45
|
+
size: 16,
|
46
|
+
viewBox: "1 1 14 14"
|
47
|
+
}))), status === 'active' && (_InlineLoading || (_InlineLoading = /*#__PURE__*/React__default.createElement(InlineLoading, null))), status === 'error' && (_ErrorOutline || (_ErrorOutline = /*#__PURE__*/React__default.createElement(ErrorOutline, {
|
48
|
+
size: 16
|
49
|
+
}))), status === 'finished' && (_CheckmarkOutline || (_CheckmarkOutline = /*#__PURE__*/React__default.createElement(CheckmarkOutline, {
|
50
|
+
size: 16
|
51
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
52
|
+
className: "".concat(blockClass, "__text")
|
53
|
+
}, description)), status === 'error' && errorMessage && /*#__PURE__*/React__default.createElement("div", {
|
54
|
+
className: "".concat(blockClass, "__error-message")
|
55
|
+
}, errorMessage));
|
56
|
+
});
|
57
|
+
|
58
|
+
// Return a placeholder if not released and not enabled by feature flag
|
59
|
+
StatusIndicatorStep = pkg.checkComponentEnabled(StatusIndicatorStep, componentName);
|
60
|
+
|
61
|
+
// The display name of the component, used by React. Note that displayName
|
62
|
+
// is used in preference to relying on function.name.
|
63
|
+
StatusIndicatorStep.displayName = componentName;
|
64
|
+
|
65
|
+
// The types and DocGen commentary for the component props,
|
66
|
+
// in alphabetical order (for consistency).
|
67
|
+
// See https://www.npmjs.com/package/prop-types#usage.
|
68
|
+
StatusIndicatorStep.propTypes = {
|
69
|
+
/**
|
70
|
+
* Provide an optional class to be applied to the containing node.
|
71
|
+
*/
|
72
|
+
className: PropTypes.string,
|
73
|
+
/**
|
74
|
+
* The text associated with the icon.
|
75
|
+
*/
|
76
|
+
description: PropTypes.string.isRequired,
|
77
|
+
/**
|
78
|
+
* This message will appear below the description if the `status` is "error".
|
79
|
+
*/
|
80
|
+
errorMessage: PropTypes.string,
|
81
|
+
/**
|
82
|
+
* Each `status` represents a different icon..
|
83
|
+
*/
|
84
|
+
status: PropTypes.oneOf(['inactive', 'active', 'error', 'finished']).isRequired
|
85
|
+
};
|
86
|
+
|
87
|
+
export { StatusIndicatorStep };
|
@@ -99,9 +99,16 @@ interface TearsheetProps extends PropsWithChildren {
|
|
99
99
|
*/
|
100
100
|
portalTarget: ReactNode;
|
101
101
|
/**
|
102
|
-
* Specify a CSS selector that matches the DOM element that should be
|
102
|
+
* Specify a CSS selector that matches the DOM element that should be
|
103
|
+
* focused when the Modal opens.
|
103
104
|
*/
|
104
105
|
selectorPrimaryFocus?: string;
|
106
|
+
/**
|
107
|
+
* Specify the CSS selectors that match the floating menus.
|
108
|
+
*
|
109
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
|
110
|
+
*/
|
111
|
+
selectorsFloatingMenus?: string[];
|
105
112
|
/**
|
106
113
|
* The main title of the tearsheet, displayed in the header area.
|
107
114
|
*/
|
@@ -190,9 +190,17 @@ Tearsheet.propTypes = _objectSpread2({
|
|
190
190
|
/**@ts-ignore */
|
191
191
|
portalTarget: portalType,
|
192
192
|
/**
|
193
|
-
* Specify a CSS selector that matches the DOM element that should be
|
193
|
+
* Specify a CSS selector that matches the DOM element that should be
|
194
|
+
* focused when the Modal opens.
|
194
195
|
*/
|
195
196
|
selectorPrimaryFocus: PropTypes.string,
|
197
|
+
/**
|
198
|
+
* Specify the CSS selectors that match the floating menus.
|
199
|
+
*
|
200
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
|
201
|
+
*/
|
202
|
+
/**@ts-ignore*/
|
203
|
+
selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string),
|
196
204
|
/**
|
197
205
|
* The main title of the tearsheet, displayed in the header area.
|
198
206
|
*/
|
@@ -64,6 +64,17 @@ interface TearsheetNarrowBaseProps extends PropsWithChildren {
|
|
64
64
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
65
65
|
*/
|
66
66
|
portalTarget?: ReactNode;
|
67
|
+
/**
|
68
|
+
* Specify a CSS selector that matches the DOM element that should be
|
69
|
+
* focused when the Modal opens.
|
70
|
+
*/
|
71
|
+
selectorPrimaryFocus?: string;
|
72
|
+
/**
|
73
|
+
* Specify the CSS selectors that match the floating menus.
|
74
|
+
*
|
75
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
|
76
|
+
*/
|
77
|
+
selectorsFloatingMenus?: string[];
|
67
78
|
/**
|
68
79
|
* The main title of the tearsheet, displayed in the header area.
|
69
80
|
*/
|
@@ -148,6 +148,18 @@ TearsheetNarrow.propTypes = _objectSpread2({
|
|
148
148
|
*/
|
149
149
|
/**@ts-ignore */
|
150
150
|
portalTarget: portalType,
|
151
|
+
/**
|
152
|
+
* Specify a CSS selector that matches the DOM element that should be
|
153
|
+
* focused when the Modal opens.
|
154
|
+
*/
|
155
|
+
selectorPrimaryFocus: PropTypes.string,
|
156
|
+
/**
|
157
|
+
* Specify the CSS selectors that match the floating menus.
|
158
|
+
*
|
159
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
|
160
|
+
*/
|
161
|
+
/**@ts-ignore*/
|
162
|
+
selectorsFloatingMenus: PropTypes.arrayOf(PropTypes.string),
|
151
163
|
/**
|
152
164
|
* The main title of the tearsheet, displayed in the header area.
|
153
165
|
*/
|
@@ -81,7 +81,17 @@ interface TearsheetShellProps extends PropsWithChildren {
|
|
81
81
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
82
82
|
*/
|
83
83
|
portalTarget?: ReactNode;
|
84
|
+
/**
|
85
|
+
* Specify a CSS selector that matches the DOM element that should be
|
86
|
+
* focused when the Modal opens.
|
87
|
+
*/
|
84
88
|
selectorPrimaryFocus?: string;
|
89
|
+
/**
|
90
|
+
* Specify the CSS selectors that match the floating menus.
|
91
|
+
*
|
92
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-composedmodal--overview#focus-management
|
93
|
+
*/
|
94
|
+
selectorsFloatingMenus?: string[];
|
85
95
|
/**
|
86
96
|
* Specifies the width of the tearsheet, 'narrow' or 'wide'.
|
87
97
|
*/
|