@patternfly/react-table 4.61.5 → 4.61.9
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/CHANGELOG.md +38 -0
- package/dist/esm/components/Table/base/provider.d.ts +1 -1
- package/dist/esm/components/Table/base/types.d.ts +1 -1
- package/dist/esm/components/Table/utils/decorators/cellActions.js +1 -1
- package/dist/esm/components/Table/utils/decorators/cellActions.js.map +1 -1
- package/dist/esm/components/TableComposable/Td.d.ts +3 -1
- package/dist/esm/components/TableComposable/Td.d.ts.map +1 -1
- package/dist/esm/components/TableComposable/Td.js +2 -2
- package/dist/esm/components/TableComposable/Td.js.map +1 -1
- package/dist/js/components/Table/base/provider.d.ts +1 -1
- package/dist/js/components/Table/base/types.d.ts +1 -1
- package/dist/js/components/Table/utils/decorators/cellActions.js +1 -1
- package/dist/js/components/Table/utils/decorators/cellActions.js.map +1 -1
- package/dist/js/components/TableComposable/Td.d.ts +3 -1
- package/dist/js/components/TableComposable/Td.d.ts.map +1 -1
- package/dist/js/components/TableComposable/Td.js +2 -2
- package/dist/js/components/TableComposable/Td.js.map +1 -1
- package/dist/umd/react-table.js +249 -61
- package/dist/umd/react-table.min.js +3 -3
- package/package.json +6 -6
- package/src/components/Table/__snapshots__/Table.test.tsx.snap +0 -76
- package/src/components/Table/examples/LegacyTableActions.tsx +32 -43
- package/src/components/Table/utils/decorators/cellActions.tsx +1 -1
- package/src/components/TableComposable/Td.tsx +4 -0
- package/src/components/TableComposable/examples/ComposableTableActions.tsx +25 -20
|
@@ -23,6 +23,8 @@ export interface TdProps extends BaseCellProps, Omit<React.HTMLProps<HTMLTableDa
|
|
|
23
23
|
draggableRow?: TdDraggableType;
|
|
24
24
|
/** True to remove padding */
|
|
25
25
|
noPadding?: boolean;
|
|
26
|
+
/** Applies pf-c-table__action to td */
|
|
27
|
+
isActionCell?: boolean;
|
|
26
28
|
}
|
|
27
|
-
export declare const Td: React.ForwardRefExoticComponent<Pick<TdProps, "span" | "wrap" | "content" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "select" | "component" | "innerRef" | "noPadding" | "dataLabel" | "textCenter" | "modifier" | "visibility" | "actions" | "expand" | "treeRow" | "compoundExpand" | "favorites" | "draggableRow"> & React.RefAttributes<HTMLTableDataCellElement>>;
|
|
29
|
+
export declare const Td: React.ForwardRefExoticComponent<Pick<TdProps, "span" | "wrap" | "content" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "select" | "component" | "innerRef" | "noPadding" | "dataLabel" | "textCenter" | "modifier" | "visibility" | "isActionCell" | "actions" | "expand" | "treeRow" | "compoundExpand" | "favorites" | "draggableRow"> & React.RefAttributes<HTMLTableDataCellElement>>;
|
|
28
30
|
//# sourceMappingURL=Td.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Td.d.ts","sourceRoot":"","sources":["../../../../src/components/TableComposable/Td.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAalD,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,MAAM,WAAW,OAAQ,SAAQ,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,wBAAwB,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACnH;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,wGAAwG;IACxG,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,sDAAsD;IACtD,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Td.d.ts","sourceRoot":"","sources":["../../../../src/components/TableComposable/Td.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAalD,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,MAAM,WAAW,OAAQ,SAAQ,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,wBAAwB,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACnH;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,wGAAwG;IACxG,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,sDAAsD;IACtD,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAiLD,eAAO,MAAM,EAAE,ogMAEb,CAAC"}
|
|
@@ -16,7 +16,7 @@ const draggable_1 = require("../Table/utils/decorators/draggable");
|
|
|
16
16
|
const treeRow_1 = require("../Table/utils/decorators/treeRow");
|
|
17
17
|
const merge_props_1 = require("../Table/base/merge-props");
|
|
18
18
|
const TdBase = (_a) => {
|
|
19
|
-
var { children, className, component = 'td', dataLabel, textCenter = false, modifier, select = null, actions = null, expand = null, treeRow: treeRowProp = null, compoundExpand: compoundExpandProp = null, noPadding, width, visibility, innerRef, favorites = null, draggableRow: draggableRowProp = null } = _a, props = tslib_1.__rest(_a, ["children", "className", "component", "dataLabel", "textCenter", "modifier", "select", "actions", "expand", "treeRow", "compoundExpand", "noPadding", "width", "visibility", "innerRef", "favorites", "draggableRow"]);
|
|
19
|
+
var { children, className, isActionCell = false, component = 'td', dataLabel, textCenter = false, modifier, select = null, actions = null, expand = null, treeRow: treeRowProp = null, compoundExpand: compoundExpandProp = null, noPadding, width, visibility, innerRef, favorites = null, draggableRow: draggableRowProp = null } = _a, props = tslib_1.__rest(_a, ["children", "className", "isActionCell", "component", "dataLabel", "textCenter", "modifier", "select", "actions", "expand", "treeRow", "compoundExpand", "noPadding", "width", "visibility", "innerRef", "favorites", "draggableRow"]);
|
|
20
20
|
const selectParams = select
|
|
21
21
|
? selectable_1.selectable(children, {
|
|
22
22
|
rowIndex: select.rowIndex,
|
|
@@ -118,7 +118,7 @@ const TdBase = (_a) => {
|
|
|
118
118
|
isVisible = null, children: mergedChildren = null, className: mergedClassName = '', component: MergedComponent = component } = merged, mergedProps = tslib_1.__rest(merged, ["isVisible", "children", "className", "component"]);
|
|
119
119
|
const treeTableTitleCell = (className && className.includes('pf-c-table__tree-view-title-cell')) ||
|
|
120
120
|
(mergedClassName && mergedClassName.includes('pf-c-table__tree-view-title-cell'));
|
|
121
|
-
return (React.createElement(MergedComponent, Object.assign({}, (!treeTableTitleCell && { 'data-label': dataLabel }), { className: react_styles_1.css(className, textCenter && table_1.default.modifiers.center, noPadding && table_1.default.modifiers.noPadding, table_1.default.modifiers[modifier], draggableParams && table_1.default.tableDraggable, mergedClassName), ref: innerRef }, mergedProps, props), mergedChildren || children));
|
|
121
|
+
return (React.createElement(MergedComponent, Object.assign({}, (!treeTableTitleCell && { 'data-label': dataLabel }), { className: react_styles_1.css(className, isActionCell && table_1.default.tableAction, textCenter && table_1.default.modifiers.center, noPadding && table_1.default.modifiers.noPadding, table_1.default.modifiers[modifier], draggableParams && table_1.default.tableDraggable, mergedClassName), ref: innerRef }, mergedProps, props), mergedChildren || children));
|
|
122
122
|
};
|
|
123
123
|
exports.Td = React.forwardRef((props, ref) => (React.createElement(TdBase, Object.assign({}, props, { innerRef: ref }))));
|
|
124
124
|
exports.Td.displayName = 'Td';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Td.js","sourceRoot":"","sources":["../../../../src/components/TableComposable/Td.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2DAA+C;AAC/C,wGAAyE;AAEzE,uEAAoE;AACpE,qEAAkE;AAClE,uEAAoE;AACpE,6EAA0E;AAC1E,mEAAgE;AAChE,uEAAgF;AAChF,uEAAoE;AACpE,mEAAgE;AAChE,+DAA4D;AAC5D,2DAAuD;
|
|
1
|
+
{"version":3,"file":"Td.js","sourceRoot":"","sources":["../../../../src/components/TableComposable/Td.tsx"],"names":[],"mappings":"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"}
|
package/dist/umd/react-table.js
CHANGED
|
@@ -1076,6 +1076,18 @@
|
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
|
+
/** This function returns a list of tabbable items in a container
|
|
1080
|
+
*
|
|
1081
|
+
* @param {any} containerRef to the container
|
|
1082
|
+
* @param {string} tababbleSelectors CSS selector string of tabbable items
|
|
1083
|
+
*/
|
|
1084
|
+
function findTabbableElements(containerRef, tababbleSelectors) {
|
|
1085
|
+
const tabbable = containerRef.current.querySelectorAll(tababbleSelectors);
|
|
1086
|
+
const list = Array.prototype.filter.call(tabbable, function (item) {
|
|
1087
|
+
return item.tabIndex >= '0';
|
|
1088
|
+
});
|
|
1089
|
+
return list;
|
|
1090
|
+
}
|
|
1079
1091
|
/** This function is a helper for keyboard navigation through dropdowns.
|
|
1080
1092
|
*
|
|
1081
1093
|
* @param {number} index The index of the element you're on
|
|
@@ -1113,13 +1125,32 @@
|
|
|
1113
1125
|
* @param {object} mods The modifiers object
|
|
1114
1126
|
* @param {any} styles The appropriate styles object for the component
|
|
1115
1127
|
*/
|
|
1116
|
-
const formatBreakpointMods = (mods, styles, stylePrefix = '') =>
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1128
|
+
const formatBreakpointMods = (mods, styles, stylePrefix = '', breakpoint) => {
|
|
1129
|
+
if (!mods) {
|
|
1130
|
+
return '';
|
|
1131
|
+
}
|
|
1132
|
+
if (breakpoint) {
|
|
1133
|
+
if (breakpoint in mods) {
|
|
1134
|
+
return styles.modifiers[toCamel$1(`${stylePrefix}${mods[breakpoint]}`)];
|
|
1135
|
+
}
|
|
1136
|
+
// the current breakpoint is not specified in mods, so we try to find the next nearest
|
|
1137
|
+
const breakpointsOrder = ['2xl', 'xl', 'lg', 'md', 'sm', 'default'];
|
|
1138
|
+
const breakpointsIndex = breakpointsOrder.indexOf(breakpoint);
|
|
1139
|
+
for (let i = breakpointsIndex; i < breakpointsOrder.length; i++) {
|
|
1140
|
+
if (breakpointsOrder[i] in mods) {
|
|
1141
|
+
return styles.modifiers[toCamel$1(`${stylePrefix}${mods[breakpointsOrder[i]]}`)];
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
return '';
|
|
1145
|
+
}
|
|
1146
|
+
return Object.entries(mods || {})
|
|
1147
|
+
.map(([breakpoint, mod]) => `${stylePrefix}${mod}${breakpoint !== 'default' ? `-on-${breakpoint}` : ''}`)
|
|
1148
|
+
.map(toCamel$1)
|
|
1149
|
+
.map(mod => mod.replace(/-?(\dxl)/gi, (_res, group) => `_${group}`))
|
|
1150
|
+
.map(modifierKey => styles.modifiers[modifierKey])
|
|
1151
|
+
.filter(Boolean)
|
|
1152
|
+
.join(' ');
|
|
1153
|
+
};
|
|
1123
1154
|
const camelize$1 = (s) => s
|
|
1124
1155
|
.toUpperCase()
|
|
1125
1156
|
.replace('-', '')
|
|
@@ -4841,6 +4872,7 @@
|
|
|
4841
4872
|
ArrowLeft: 'ArrowLeft',
|
|
4842
4873
|
ArrowRight: 'ArrowRight'
|
|
4843
4874
|
};
|
|
4875
|
+
const SelectFooterTabbableItems = 'input, button, select, textarea, a[href]';
|
|
4844
4876
|
|
|
4845
4877
|
class SelectOption extends React__namespace.Component {
|
|
4846
4878
|
constructor() {
|
|
@@ -4866,7 +4898,12 @@
|
|
|
4866
4898
|
event.stopPropagation();
|
|
4867
4899
|
}
|
|
4868
4900
|
else {
|
|
4869
|
-
|
|
4901
|
+
if (event.shiftKey) {
|
|
4902
|
+
keyHandler(index, innerIndex, 'up');
|
|
4903
|
+
}
|
|
4904
|
+
else {
|
|
4905
|
+
keyHandler(index, innerIndex, 'tab');
|
|
4906
|
+
}
|
|
4870
4907
|
}
|
|
4871
4908
|
}
|
|
4872
4909
|
event.preventDefault();
|
|
@@ -5103,7 +5140,8 @@
|
|
|
5103
5140
|
isChecked: this.checkForValue(option.props.value, checked),
|
|
5104
5141
|
sendRef,
|
|
5105
5142
|
keyHandler,
|
|
5106
|
-
index: index
|
|
5143
|
+
index: index++,
|
|
5144
|
+
isLastOptionBeforeFooter
|
|
5107
5145
|
})))) : null
|
|
5108
5146
|
});
|
|
5109
5147
|
});
|
|
@@ -5186,26 +5224,19 @@
|
|
|
5186
5224
|
onClose();
|
|
5187
5225
|
}
|
|
5188
5226
|
};
|
|
5189
|
-
this.findTabbableFooterElements = () => {
|
|
5190
|
-
const tabbable = this.props.footerRef.current.querySelectorAll('input, button, select, textarea, a[href]');
|
|
5191
|
-
const list = Array.prototype.filter.call(tabbable, function (item) {
|
|
5192
|
-
return item.tabIndex >= '0';
|
|
5193
|
-
});
|
|
5194
|
-
return list;
|
|
5195
|
-
};
|
|
5196
5227
|
this.handleGlobalKeys = (event) => {
|
|
5197
|
-
const { parentRef, menuRef, hasFooter, isOpen, variant, onToggle, onClose } = this.props;
|
|
5228
|
+
const { parentRef, menuRef, hasFooter, footerRef, isOpen, variant, onToggle, onClose, moveFocusToLastMenuItem } = this.props;
|
|
5198
5229
|
const escFromToggle = parentRef && parentRef.current && parentRef.current.contains(event.target);
|
|
5199
5230
|
const escFromWithinMenu = menuRef && menuRef.current && menuRef.current.contains && menuRef.current.contains(event.target);
|
|
5200
5231
|
if (isOpen &&
|
|
5201
5232
|
event.key === KeyTypes.Tab &&
|
|
5202
5233
|
(variant === SelectVariant.typeahead || variant === SelectVariant.typeaheadMulti)) {
|
|
5203
|
-
this.props.handleTypeaheadKeys('tab');
|
|
5234
|
+
this.props.handleTypeaheadKeys('tab', event.shiftKey);
|
|
5204
5235
|
event.preventDefault();
|
|
5205
5236
|
return;
|
|
5206
5237
|
}
|
|
5207
5238
|
if (isOpen && event.key === KeyTypes.Tab && hasFooter) {
|
|
5208
|
-
const tabbableItems =
|
|
5239
|
+
const tabbableItems = findTabbableElements(footerRef, SelectFooterTabbableItems);
|
|
5209
5240
|
// If no tabbable item in footer close select
|
|
5210
5241
|
if (tabbableItems.length <= 0) {
|
|
5211
5242
|
onToggle(false);
|
|
@@ -5214,14 +5245,30 @@
|
|
|
5214
5245
|
return;
|
|
5215
5246
|
}
|
|
5216
5247
|
else {
|
|
5217
|
-
// if current element is not in footer, tab to first tabbable element in footer
|
|
5218
|
-
const currentElementIndex = tabbableItems.findIndex(item => item === document.activeElement);
|
|
5248
|
+
// if current element is not in footer, tab to first tabbable element in footer, or close if shift clicked
|
|
5249
|
+
const currentElementIndex = tabbableItems.findIndex((item) => item === document.activeElement);
|
|
5219
5250
|
if (currentElementIndex === -1) {
|
|
5220
|
-
|
|
5221
|
-
|
|
5251
|
+
if (event.shiftKey) {
|
|
5252
|
+
if (variant !== 'checkbox') {
|
|
5253
|
+
// only close non checkbox variation on shift clicked
|
|
5254
|
+
onToggle(false);
|
|
5255
|
+
onClose();
|
|
5256
|
+
this.toggle.current.focus();
|
|
5257
|
+
}
|
|
5258
|
+
}
|
|
5259
|
+
else {
|
|
5260
|
+
// tab to footer
|
|
5261
|
+
tabbableItems[0].focus();
|
|
5262
|
+
return;
|
|
5263
|
+
}
|
|
5222
5264
|
}
|
|
5223
5265
|
// Current element is in footer.
|
|
5224
5266
|
if (event.shiftKey) {
|
|
5267
|
+
// Move focus back to menuif current tab index is 0
|
|
5268
|
+
if (currentElementIndex === 0) {
|
|
5269
|
+
moveFocusToLastMenuItem();
|
|
5270
|
+
event.preventDefault();
|
|
5271
|
+
}
|
|
5225
5272
|
return;
|
|
5226
5273
|
}
|
|
5227
5274
|
// Tab to next element in footer or close if there are none
|
|
@@ -5295,7 +5342,7 @@
|
|
|
5295
5342
|
}
|
|
5296
5343
|
render() {
|
|
5297
5344
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5298
|
-
const _a = this.props, { className, children, isOpen, isActive, isPlain, isDisabled, hasPlaceholderStyle, variant, onToggle, onEnter, onClose, onClickTypeaheadToggleButton, handleTypeaheadKeys, parentRef, menuRef, id, type, hasClearButton, 'aria-labelledby': ariaLabelledBy, 'aria-label': ariaLabel, hasFooter, footerRef } = _a, props = __rest$1(_a, ["className", "children", "isOpen", "isActive", "isPlain", "isDisabled", "hasPlaceholderStyle", "variant", "onToggle", "onEnter", "onClose", "onClickTypeaheadToggleButton", "handleTypeaheadKeys", "parentRef", "menuRef", "id", "type", "hasClearButton", 'aria-labelledby', 'aria-label', "hasFooter", "footerRef"]);
|
|
5345
|
+
const _a = this.props, { className, children, isOpen, isActive, isPlain, isDisabled, hasPlaceholderStyle, variant, onToggle, onEnter, onClose, onClickTypeaheadToggleButton, handleTypeaheadKeys, moveFocusToLastMenuItem, parentRef, menuRef, id, type, hasClearButton, 'aria-labelledby': ariaLabelledBy, 'aria-label': ariaLabel, hasFooter, footerRef } = _a, props = __rest$1(_a, ["className", "children", "isOpen", "isActive", "isPlain", "isDisabled", "hasPlaceholderStyle", "variant", "onToggle", "onEnter", "onClose", "onClickTypeaheadToggleButton", "handleTypeaheadKeys", "moveFocusToLastMenuItem", "parentRef", "menuRef", "id", "type", "hasClearButton", 'aria-labelledby', 'aria-label', "hasFooter", "footerRef"]);
|
|
5299
5346
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
5300
5347
|
const isTypeahead = variant === SelectVariant.typeahead || variant === SelectVariant.typeaheadMulti || hasClearButton;
|
|
5301
5348
|
const toggleProps = {
|
|
@@ -5758,9 +5805,37 @@
|
|
|
5758
5805
|
typeaheadInputValue
|
|
5759
5806
|
}));
|
|
5760
5807
|
};
|
|
5761
|
-
this.
|
|
5808
|
+
this.switchFocusToFavoriteMenu = () => {
|
|
5809
|
+
const { typeaheadCurrIndex, typeaheadStoredIndex } = this.state;
|
|
5810
|
+
let indexForFocus = 0;
|
|
5811
|
+
if (typeaheadCurrIndex !== -1) {
|
|
5812
|
+
indexForFocus = typeaheadCurrIndex;
|
|
5813
|
+
}
|
|
5814
|
+
else if (typeaheadStoredIndex !== -1) {
|
|
5815
|
+
indexForFocus = typeaheadStoredIndex;
|
|
5816
|
+
}
|
|
5817
|
+
if (this.refCollection[indexForFocus] !== null && this.refCollection[indexForFocus][0] !== null) {
|
|
5818
|
+
this.refCollection[indexForFocus][0].focus();
|
|
5819
|
+
}
|
|
5820
|
+
else {
|
|
5821
|
+
this.clearRef.current.focus();
|
|
5822
|
+
}
|
|
5823
|
+
this.setState({
|
|
5824
|
+
tabbedIntoFavoritesMenu: true,
|
|
5825
|
+
typeaheadCurrIndex: -1
|
|
5826
|
+
});
|
|
5827
|
+
};
|
|
5828
|
+
this.moveFocusToLastMenuItem = () => {
|
|
5829
|
+
const refCollectionLen = this.refCollection.length;
|
|
5830
|
+
if (refCollectionLen > 0 &&
|
|
5831
|
+
this.refCollection[refCollectionLen - 1] !== null &&
|
|
5832
|
+
this.refCollection[refCollectionLen - 1][0] !== null) {
|
|
5833
|
+
this.refCollection[refCollectionLen - 1][0].focus();
|
|
5834
|
+
}
|
|
5835
|
+
};
|
|
5836
|
+
this.handleTypeaheadKeys = (position, shiftKey = false) => {
|
|
5762
5837
|
const { isOpen, onFavorite } = this.props;
|
|
5763
|
-
const { typeaheadCurrIndex, tabbedIntoFavoritesMenu
|
|
5838
|
+
const { typeaheadCurrIndex, tabbedIntoFavoritesMenu } = this.state;
|
|
5764
5839
|
const typeaheadActiveChild = this.getTypeaheadActiveChild(typeaheadCurrIndex);
|
|
5765
5840
|
if (isOpen) {
|
|
5766
5841
|
if (position === 'enter') {
|
|
@@ -5778,32 +5853,127 @@
|
|
|
5778
5853
|
}
|
|
5779
5854
|
else if (position === 'tab') {
|
|
5780
5855
|
if (onFavorite) {
|
|
5856
|
+
// if the input has focus, tab to the first item or the last item that was previously focused.
|
|
5781
5857
|
if (this.inputRef.current === document.activeElement) {
|
|
5782
|
-
|
|
5783
|
-
if (
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
this.refCollection[indexForFocus][0].focus();
|
|
5858
|
+
// If shift is also clicked and there is a footer, tab to the last item in tabbable footer
|
|
5859
|
+
if (this.props.footer && shiftKey) {
|
|
5860
|
+
const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
|
|
5861
|
+
if (tabbableItems.length > 0) {
|
|
5862
|
+
if (tabbableItems[tabbableItems.length - 1]) {
|
|
5863
|
+
tabbableItems[tabbableItems.length - 1].focus();
|
|
5864
|
+
}
|
|
5865
|
+
}
|
|
5791
5866
|
}
|
|
5792
5867
|
else {
|
|
5793
|
-
this.
|
|
5868
|
+
this.switchFocusToFavoriteMenu();
|
|
5794
5869
|
}
|
|
5795
|
-
this.setState({
|
|
5796
|
-
tabbedIntoFavoritesMenu: true,
|
|
5797
|
-
typeaheadCurrIndex: -1
|
|
5798
|
-
});
|
|
5799
5870
|
}
|
|
5800
5871
|
else {
|
|
5801
|
-
|
|
5802
|
-
this.
|
|
5872
|
+
// focus is on menu or footer
|
|
5873
|
+
if (this.props.footer) {
|
|
5874
|
+
let tabbedIntoMenu = false;
|
|
5875
|
+
const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
|
|
5876
|
+
if (tabbableItems.length > 0) {
|
|
5877
|
+
// if current element is not in footer, tab to first tabbable element in footer,
|
|
5878
|
+
// if shift was clicked, tab to input since focus is on menu
|
|
5879
|
+
const currentElementIndex = tabbableItems.findIndex((item) => item === document.activeElement);
|
|
5880
|
+
if (currentElementIndex === -1) {
|
|
5881
|
+
if (shiftKey) {
|
|
5882
|
+
// currently in menu, shift back to input
|
|
5883
|
+
this.inputRef.current.focus();
|
|
5884
|
+
}
|
|
5885
|
+
else {
|
|
5886
|
+
// currently in menu, tab to first tabbable item in footer
|
|
5887
|
+
tabbableItems[0].focus();
|
|
5888
|
+
}
|
|
5889
|
+
}
|
|
5890
|
+
else {
|
|
5891
|
+
// already in footer
|
|
5892
|
+
if (shiftKey) {
|
|
5893
|
+
// shift to previous item
|
|
5894
|
+
if (currentElementIndex === 0) {
|
|
5895
|
+
// on first footer item, shift back to menu
|
|
5896
|
+
this.switchFocusToFavoriteMenu();
|
|
5897
|
+
tabbedIntoMenu = true;
|
|
5898
|
+
}
|
|
5899
|
+
else {
|
|
5900
|
+
// shift to previous footer item
|
|
5901
|
+
tabbableItems[currentElementIndex - 1].focus();
|
|
5902
|
+
}
|
|
5903
|
+
}
|
|
5904
|
+
else {
|
|
5905
|
+
// tab to next tabbable item in footer or to input.
|
|
5906
|
+
if (tabbableItems[currentElementIndex + 1]) {
|
|
5907
|
+
tabbableItems[currentElementIndex + 1].focus();
|
|
5908
|
+
}
|
|
5909
|
+
else {
|
|
5910
|
+
this.inputRef.current.focus();
|
|
5911
|
+
}
|
|
5912
|
+
}
|
|
5913
|
+
}
|
|
5914
|
+
}
|
|
5915
|
+
else {
|
|
5916
|
+
// no tabbable items in footer, tab to input
|
|
5917
|
+
this.inputRef.current.focus();
|
|
5918
|
+
tabbedIntoMenu = false;
|
|
5919
|
+
}
|
|
5920
|
+
this.setState({ tabbedIntoFavoritesMenu: tabbedIntoMenu });
|
|
5921
|
+
}
|
|
5922
|
+
else {
|
|
5923
|
+
this.inputRef.current.focus();
|
|
5924
|
+
this.setState({ tabbedIntoFavoritesMenu: false });
|
|
5925
|
+
}
|
|
5803
5926
|
}
|
|
5804
5927
|
}
|
|
5805
5928
|
else {
|
|
5806
|
-
|
|
5929
|
+
// Close if there is no footer
|
|
5930
|
+
if (!this.props.footer) {
|
|
5931
|
+
this.onToggle(false);
|
|
5932
|
+
}
|
|
5933
|
+
else {
|
|
5934
|
+
// has footer
|
|
5935
|
+
const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
|
|
5936
|
+
const currentElementIndex = tabbableItems.findIndex((item) => item === document.activeElement);
|
|
5937
|
+
if (this.inputRef.current === document.activeElement) {
|
|
5938
|
+
if (shiftKey) {
|
|
5939
|
+
// close toggle if shift key and tab on input
|
|
5940
|
+
this.onToggle(false);
|
|
5941
|
+
}
|
|
5942
|
+
else {
|
|
5943
|
+
// tab to first tabbable item in footer
|
|
5944
|
+
if (tabbableItems[0]) {
|
|
5945
|
+
tabbableItems[0].focus();
|
|
5946
|
+
}
|
|
5947
|
+
else {
|
|
5948
|
+
this.onToggle(false);
|
|
5949
|
+
}
|
|
5950
|
+
}
|
|
5951
|
+
}
|
|
5952
|
+
else {
|
|
5953
|
+
// focus is in footer
|
|
5954
|
+
if (shiftKey) {
|
|
5955
|
+
if (currentElementIndex === 0) {
|
|
5956
|
+
// shift tab back to input
|
|
5957
|
+
this.inputRef.current.focus();
|
|
5958
|
+
}
|
|
5959
|
+
else {
|
|
5960
|
+
// shift to previous footer item
|
|
5961
|
+
tabbableItems[currentElementIndex - 1].focus();
|
|
5962
|
+
}
|
|
5963
|
+
}
|
|
5964
|
+
else {
|
|
5965
|
+
// tab to next footer item or close tab if last item
|
|
5966
|
+
if (tabbableItems[currentElementIndex + 1]) {
|
|
5967
|
+
tabbableItems[currentElementIndex + 1].focus();
|
|
5968
|
+
}
|
|
5969
|
+
else {
|
|
5970
|
+
// no next item, close toggle
|
|
5971
|
+
this.onToggle(false);
|
|
5972
|
+
this.inputRef.current.focus();
|
|
5973
|
+
}
|
|
5974
|
+
}
|
|
5975
|
+
}
|
|
5976
|
+
}
|
|
5807
5977
|
}
|
|
5808
5978
|
}
|
|
5809
5979
|
else if (!tabbedIntoFavoritesMenu) {
|
|
@@ -5960,13 +6130,13 @@
|
|
|
5960
6130
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5961
6131
|
onFilter,
|
|
5962
6132
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5963
|
-
onTypeaheadInputChanged, onCreateOption, isCreatable, onToggle, createText, noResultsFoundText, customBadgeText, inputIdPrefix,
|
|
6133
|
+
onTypeaheadInputChanged, onCreateOption, isCreatable, onToggle, createText, noResultsFoundText, customBadgeText, inputIdPrefix, inputAutoComplete,
|
|
5964
6134
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5965
6135
|
isInputValuePersisted, isInputFilterPersisted,
|
|
5966
6136
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
5967
6137
|
menuAppendTo, favorites, onFavorite,
|
|
5968
6138
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5969
|
-
favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject"]);
|
|
6139
|
+
favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "inputAutoComplete", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject"]);
|
|
5970
6140
|
const { focusFirstOption: openedOnEnter, typeaheadCurrIndex, typeaheadInputValue, typeaheadFilteredChildren, favoritesGroup } = this.state;
|
|
5971
6141
|
const selectToggleId = toggleId || `pf-select-toggle-id-${currentId++}`;
|
|
5972
6142
|
const selections = Array.isArray(selectionsProp) ? selectionsProp : [selectionsProp];
|
|
@@ -6004,11 +6174,11 @@
|
|
|
6004
6174
|
if (isOpen) {
|
|
6005
6175
|
if (renderableItems.find(item => { var _a; return ((_a = item) === null || _a === void 0 ? void 0 : _a.key) === 'loading'; }) === undefined) {
|
|
6006
6176
|
if (loadingVariant === 'spinner') {
|
|
6007
|
-
renderableItems.push(React__namespace.createElement(SelectOption, { isLoading: true, key: "loading", value: "loading"
|
|
6177
|
+
renderableItems.push(React__namespace.createElement(SelectOption, { isLoading: true, key: "loading", value: "loading" },
|
|
6008
6178
|
React__namespace.createElement(Spinner, { size: "lg" })));
|
|
6009
6179
|
}
|
|
6010
6180
|
else if (loadingVariant === null || loadingVariant === void 0 ? void 0 : loadingVariant.text) {
|
|
6011
|
-
renderableItems.push(React__namespace.createElement(SelectOption, { isLoad: true, key: "loading", value: loadingVariant.text,
|
|
6181
|
+
renderableItems.push(React__namespace.createElement(SelectOption, { isLoad: true, key: "loading", value: loadingVariant.text, setViewMoreNextIndex: this.setVieMoreNextIndex, onClick: loadingVariant === null || loadingVariant === void 0 ? void 0 : loadingVariant.onClick }));
|
|
6012
6182
|
}
|
|
6013
6183
|
}
|
|
6014
6184
|
}
|
|
@@ -6047,6 +6217,23 @@
|
|
|
6047
6217
|
this.handleMenuKeys(0, 0, 'right');
|
|
6048
6218
|
event.preventDefault();
|
|
6049
6219
|
}
|
|
6220
|
+
else if (event.key === KeyTypes.Tab && variant !== SelectVariant.checkbox && this.props.footer) {
|
|
6221
|
+
// tab to footer or close menu if shift key
|
|
6222
|
+
if (event.shiftKey) {
|
|
6223
|
+
this.onToggle(false);
|
|
6224
|
+
}
|
|
6225
|
+
else {
|
|
6226
|
+
const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
|
|
6227
|
+
if (tabbableItems.length > 0) {
|
|
6228
|
+
tabbableItems[0].focus();
|
|
6229
|
+
event.stopPropagation();
|
|
6230
|
+
event.preventDefault();
|
|
6231
|
+
}
|
|
6232
|
+
else {
|
|
6233
|
+
this.onToggle(false);
|
|
6234
|
+
}
|
|
6235
|
+
}
|
|
6236
|
+
}
|
|
6050
6237
|
else if (event.key === KeyTypes.Tab && variant === SelectVariant.checkbox) {
|
|
6051
6238
|
// More modal-like experience for checkboxes
|
|
6052
6239
|
// Let SelectOption handle this
|
|
@@ -6059,7 +6246,7 @@
|
|
|
6059
6246
|
event.stopPropagation();
|
|
6060
6247
|
event.preventDefault();
|
|
6061
6248
|
}
|
|
6062
|
-
}, ref: this.filterRef, autoComplete:
|
|
6249
|
+
}, ref: this.filterRef, autoComplete: inputAutoComplete })),
|
|
6063
6250
|
React__namespace.createElement(Divider, { key: "inline-filter-divider" })));
|
|
6064
6251
|
renderableItems = [filterBox, ...typeaheadFilteredChildren].map((option, index) => React__namespace.cloneElement(option, { key: index }));
|
|
6065
6252
|
}
|
|
@@ -6121,7 +6308,7 @@
|
|
|
6121
6308
|
" ") : innerMenu;
|
|
6122
6309
|
const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$b.select, isOpen && _default$b.modifiers.expanded, validated === ValidatedOptions.success && _default$b.modifiers.success, validated === ValidatedOptions.warning && _default$b.modifiers.warning, validated === ValidatedOptions.error && _default$b.modifiers.invalid, direction === SelectDirection.up && _default$b.modifiers.top, className) }, (width && { style: { width } }), (validated !== ValidatedOptions.default && { 'aria-describedby': ariaDescribedby }), (validated !== ValidatedOptions.default && { 'aria-invalid': ariaInvalid })), isOpen && menuContainer));
|
|
6123
6310
|
const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$b.select, isOpen && _default$b.modifiers.expanded, validated === ValidatedOptions.success && _default$b.modifiers.success, validated === ValidatedOptions.warning && _default$b.modifiers.warning, validated === ValidatedOptions.error && _default$b.modifiers.invalid, direction === SelectDirection.up && _default$b.modifiers.top, className), ref: this.parentRef }, getOUIAProps(Select.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), (width && { style: { width } }), (validated !== ValidatedOptions.default && { 'aria-describedby': ariaDescribedby }), (validated !== ValidatedOptions.default && { 'aria-invalid': ariaInvalid })),
|
|
6124
|
-
React__namespace.createElement(SelectToggle, Object.assign({ id: selectToggleId, parentRef: this.parentRef, menuRef: this.menuComponentRef }, (footer && { footerRef: this.footerRef }), { isOpen: isOpen, isPlain: isPlain, hasPlaceholderStyle: hasPlaceholderStyle && (!selections.length || selections[0] === null || isSelectedPlaceholder), onToggle: this.onToggle, onEnter: this.onEnter, onClose: this.onClose, variant: variant, "aria-labelledby": `${ariaLabelledBy || ''} ${selectToggleId}`, "aria-label": toggleAriaLabel, handleTypeaheadKeys: this.handleTypeaheadKeys, isDisabled: isDisabled, hasClearButton: hasOnClear, hasFooter: footer !== undefined, onClickTypeaheadToggleButton: this.onClickTypeaheadToggleButton }),
|
|
6311
|
+
React__namespace.createElement(SelectToggle, Object.assign({ id: selectToggleId, parentRef: this.parentRef, menuRef: this.menuComponentRef }, (footer && { footerRef: this.footerRef }), { isOpen: isOpen, isPlain: isPlain, hasPlaceholderStyle: hasPlaceholderStyle && (!selections.length || selections[0] === null || isSelectedPlaceholder), onToggle: this.onToggle, onEnter: this.onEnter, onClose: this.onClose, variant: variant, "aria-labelledby": `${ariaLabelledBy || ''} ${selectToggleId}`, "aria-label": toggleAriaLabel, handleTypeaheadKeys: this.handleTypeaheadKeys, moveFocusToLastMenuItem: this.moveFocusToLastMenuItem, isDisabled: isDisabled, hasClearButton: hasOnClear, hasFooter: footer !== undefined, onClickTypeaheadToggleButton: this.onClickTypeaheadToggleButton }),
|
|
6125
6312
|
customContent && (React__namespace.createElement("div", { className: css(_default$b.selectToggleWrapper) },
|
|
6126
6313
|
toggleIcon && React__namespace.createElement("span", { className: css(_default$b.selectToggleIcon) }, toggleIcon),
|
|
6127
6314
|
React__namespace.createElement("span", { className: css(_default$b.selectToggleText) }, placeholderText))),
|
|
@@ -6142,13 +6329,13 @@
|
|
|
6142
6329
|
toggleIcon && React__namespace.createElement("span", { className: css(_default$b.selectToggleIcon) }, toggleIcon),
|
|
6143
6330
|
React__namespace.createElement("input", { className: css(_default$f.formControl, _default$b.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-typeahead`, "aria-label": typeAheadAriaLabel, placeholder: placeholderText, value: typeaheadInputValue !== null
|
|
6144
6331
|
? typeaheadInputValue
|
|
6145
|
-
: this.getDisplay(selections[0], 'text') || '', type: "text", onClick: this.onClick, onChange: this.onChange, autoComplete:
|
|
6332
|
+
: this.getDisplay(selections[0], 'text') || '', type: "text", onClick: this.onClick, onChange: this.onChange, autoComplete: inputAutoComplete, disabled: isDisabled, ref: this.inputRef })),
|
|
6146
6333
|
hasOnClear && (selections[0] || typeaheadInputValue) && clearBtn)),
|
|
6147
6334
|
variant === SelectVariant.typeaheadMulti && !customContent && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
6148
6335
|
React__namespace.createElement("div", { className: css(_default$b.selectToggleWrapper) },
|
|
6149
6336
|
toggleIcon && React__namespace.createElement("span", { className: css(_default$b.selectToggleIcon) }, toggleIcon),
|
|
6150
6337
|
selections && Array.isArray(selections) && selections.length > 0 && selectedChips,
|
|
6151
|
-
React__namespace.createElement("input", { className: css(_default$f.formControl, _default$b.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-multi-typeahead-typeahead`, "aria-label": typeAheadAriaLabel, "aria-invalid": validated === ValidatedOptions.error, placeholder: placeholderText, value: typeaheadInputValue !== null ? typeaheadInputValue : '', type: "text", onChange: this.onChange, onClick: this.onClick, autoComplete:
|
|
6338
|
+
React__namespace.createElement("input", { className: css(_default$f.formControl, _default$b.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-multi-typeahead-typeahead`, "aria-label": typeAheadAriaLabel, "aria-invalid": validated === ValidatedOptions.error, placeholder: placeholderText, value: typeaheadInputValue !== null ? typeaheadInputValue : '', type: "text", onChange: this.onChange, onClick: this.onClick, autoComplete: inputAutoComplete, disabled: isDisabled, ref: this.inputRef })),
|
|
6152
6339
|
hasOnClear && ((selections && selections.length > 0) || typeaheadInputValue) && clearBtn)),
|
|
6153
6340
|
validated === ValidatedOptions.success && (React__namespace.createElement("span", { className: css(_default$b.selectToggleStatusIcon) },
|
|
6154
6341
|
React__namespace.createElement(CheckCircleIcon$1, { "aria-hidden": "true" }))),
|
|
@@ -6204,6 +6391,7 @@
|
|
|
6204
6391
|
inlineFilterPlaceholderText: null,
|
|
6205
6392
|
customBadgeText: null,
|
|
6206
6393
|
inputIdPrefix: '',
|
|
6394
|
+
inputAutoComplete: navigator.userAgent.match('Chrome') ? getUniqueId('pf-no-autocomplete') : 'off',
|
|
6207
6395
|
menuAppendTo: 'inline',
|
|
6208
6396
|
favorites: [],
|
|
6209
6397
|
favoritesLabel: 'Favorites',
|
|
@@ -6623,6 +6811,13 @@
|
|
|
6623
6811
|
};
|
|
6624
6812
|
EmptyState.displayName = 'EmptyState';
|
|
6625
6813
|
|
|
6814
|
+
const Bullseye = (_a) => {
|
|
6815
|
+
var { children = null, className = '', component = 'div' } = _a, props = __rest$1(_a, ["children", "className", "component"]);
|
|
6816
|
+
const Component = component;
|
|
6817
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$k.bullseye, className) }, props), children));
|
|
6818
|
+
};
|
|
6819
|
+
Bullseye.displayName = 'Bullseye';
|
|
6820
|
+
|
|
6626
6821
|
var _default$4 = {
|
|
6627
6822
|
"button": "pf-c-button",
|
|
6628
6823
|
"inlineEdit": "pf-c-inline-edit",
|
|
@@ -6646,13 +6841,6 @@
|
|
|
6646
6841
|
}
|
|
6647
6842
|
};
|
|
6648
6843
|
|
|
6649
|
-
const Bullseye = (_a) => {
|
|
6650
|
-
var { children = null, className = '', component = 'div' } = _a, props = __rest$1(_a, ["children", "className", "component"]);
|
|
6651
|
-
const Component = component;
|
|
6652
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$k.bullseye, className) }, props), children));
|
|
6653
|
-
};
|
|
6654
|
-
Bullseye.displayName = 'Bullseye';
|
|
6655
|
-
|
|
6656
6844
|
var _default$3 = {
|
|
6657
6845
|
"button": "pf-c-button",
|
|
6658
6846
|
"modifiers": {
|
|
@@ -10001,7 +10189,7 @@
|
|
|
10001
10189
|
children: (React__namespace.createElement(ActionsColumn, { items: resolvedActions, dropdownPosition: dropdownPosition, dropdownDirection: dropdownDirection, isDisabled: resolvedIsDisabled, rowData: rowData, extraData: extraData, actionsToggle: actionsToggle }, label))
|
|
10002
10190
|
}
|
|
10003
10191
|
: {};
|
|
10004
|
-
return Object.assign({ className: css(_default$3.tableAction), style: {
|
|
10192
|
+
return Object.assign({ className: css(_default$3.tableAction), style: { paddingRight: 0 }, isVisible: true }, renderProps);
|
|
10005
10193
|
};
|
|
10006
10194
|
|
|
10007
10195
|
const CollapseColumn = (_a) => {
|
|
@@ -10178,7 +10366,7 @@
|
|
|
10178
10366
|
};
|
|
10179
10367
|
|
|
10180
10368
|
const TdBase = (_a) => {
|
|
10181
|
-
var { children, className, component = 'td', dataLabel, textCenter = false, modifier, select = null, actions = null, expand = null, treeRow: treeRowProp = null, compoundExpand: compoundExpandProp = null, noPadding, width, visibility, innerRef, favorites = null, draggableRow: draggableRowProp = null } = _a, props = __rest$2(_a, ["children", "className", "component", "dataLabel", "textCenter", "modifier", "select", "actions", "expand", "treeRow", "compoundExpand", "noPadding", "width", "visibility", "innerRef", "favorites", "draggableRow"]);
|
|
10369
|
+
var { children, className, isActionCell = false, component = 'td', dataLabel, textCenter = false, modifier, select = null, actions = null, expand = null, treeRow: treeRowProp = null, compoundExpand: compoundExpandProp = null, noPadding, width, visibility, innerRef, favorites = null, draggableRow: draggableRowProp = null } = _a, props = __rest$2(_a, ["children", "className", "isActionCell", "component", "dataLabel", "textCenter", "modifier", "select", "actions", "expand", "treeRow", "compoundExpand", "noPadding", "width", "visibility", "innerRef", "favorites", "draggableRow"]);
|
|
10182
10370
|
const selectParams = select
|
|
10183
10371
|
? selectable(children, {
|
|
10184
10372
|
rowIndex: select.rowIndex,
|
|
@@ -10280,7 +10468,7 @@
|
|
|
10280
10468
|
isVisible = null, children: mergedChildren = null, className: mergedClassName = '', component: MergedComponent = component } = merged, mergedProps = __rest$2(merged, ["isVisible", "children", "className", "component"]);
|
|
10281
10469
|
const treeTableTitleCell = (className && className.includes('pf-c-table__tree-view-title-cell')) ||
|
|
10282
10470
|
(mergedClassName && mergedClassName.includes('pf-c-table__tree-view-title-cell'));
|
|
10283
|
-
return (React__namespace.createElement(MergedComponent, Object.assign({}, (!treeTableTitleCell && { 'data-label': dataLabel }), { className: css(className, textCenter && _default$3.modifiers.center, noPadding && _default$3.modifiers.noPadding, _default$3.modifiers[modifier], draggableParams && _default$3.tableDraggable, mergedClassName), ref: innerRef }, mergedProps, props), mergedChildren || children));
|
|
10471
|
+
return (React__namespace.createElement(MergedComponent, Object.assign({}, (!treeTableTitleCell && { 'data-label': dataLabel }), { className: css(className, isActionCell && _default$3.tableAction, textCenter && _default$3.modifiers.center, noPadding && _default$3.modifiers.noPadding, _default$3.modifiers[modifier], draggableParams && _default$3.tableDraggable, mergedClassName), ref: innerRef }, mergedProps, props), mergedChildren || children));
|
|
10284
10472
|
};
|
|
10285
10473
|
const Td = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(TdBase, Object.assign({}, props, { innerRef: ref }))));
|
|
10286
10474
|
Td.displayName = 'Td';
|