@rh-support/components 2.5.26 → 2.5.28
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/lib/esm/ConfirmationModal/ConfirmationDialog.d.ts.map +1 -1
- package/lib/esm/ConfirmationModal/ConfirmationDialog.js +7 -3
- package/lib/esm/LanguageSelector/LanguageSelector.d.ts.map +1 -1
- package/lib/esm/SingleSelectDropdown/SingleSelectDropdown.d.ts +2 -1
- package/lib/esm/SingleSelectDropdown/SingleSelectDropdown.d.ts.map +1 -1
- package/lib/esm/SingleSelectDropdown/SingleSelectDropdown.js +13 -2
- package/lib/esm/Table/PFTable.js +1 -1
- package/lib/esm/TagsSelector/TagsSelector.js +3 -3
- package/lib/esm/ToastNotification/toastNotification.css +4 -0
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,aAAa,EAKb,YAAY,EACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,mBAAmB;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,aAAa,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,aAAa,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAED,UAAU,MAAO,SAAQ,mBAAmB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAUD,iBAAS,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBA4BxC;kBA5BQ,kBAAkB;;;;;;;;;AA8B3B,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Button, ButtonVariant, Modal, ModalFooter, ModalVariant } from '@patternfly/react-core';
|
|
1
|
+
import { Button, ButtonVariant, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
|
|
2
|
+
import isEmpty from 'lodash/isEmpty';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { Trans, useTranslation } from 'react-i18next';
|
|
4
5
|
const defaultProps = {
|
|
@@ -10,8 +11,11 @@ const defaultProps = {
|
|
|
10
11
|
};
|
|
11
12
|
function ConfirmationDialog(props) {
|
|
12
13
|
const { t } = useTranslation();
|
|
13
|
-
return (React.createElement(Modal, { variant: props.modalVariant, "aria-describedby": "se-confirm-dialog", "aria-label": t('confirmation modal'),
|
|
14
|
-
React.createElement(
|
|
14
|
+
return (React.createElement(Modal, { variant: props.modalVariant, "aria-describedby": "se-confirm-dialog", "aria-label": t('confirmation modal'), isOpen: props.open, onClose: props.onClose },
|
|
15
|
+
!isEmpty(props.title) && (React.createElement(ModalHeader, null,
|
|
16
|
+
React.createElement("h2", null, props.title))),
|
|
17
|
+
React.createElement(ModalBody, null,
|
|
18
|
+
React.createElement("p", { id: "se-confirm-dialog" }, props.description)),
|
|
15
19
|
React.createElement(ModalFooter, null,
|
|
16
20
|
React.createElement(Button, { key: "confirm", onClick: props.onConfirm, variant: props.confirmButtonVariant },
|
|
17
21
|
React.createElement(Trans, null, props.confirmText)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSelector.d.ts","sourceRoot":"","sources":["../../../src/LanguageSelector/LanguageSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAGhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAO,SAAQ,gBAAgB;IACrC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;CAWzB,CAAC;AAOF,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA4CtC;kBA5CQ,gBAAgB;;;
|
|
1
|
+
{"version":3,"file":"LanguageSelector.d.ts","sourceRoot":"","sources":["../../../src/LanguageSelector/LanguageSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAGhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAO,SAAQ,gBAAgB;IACrC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;CAWzB,CAAC;AAOF,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA4CtC;kBA5CQ,gBAAgB;;;AAgDzB,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SelectProps } from '@patternfly/react-core';
|
|
1
2
|
import React, { ReactNode } from 'react';
|
|
2
3
|
export interface ISingleSelectDropdownOption {
|
|
3
4
|
value: any;
|
|
@@ -7,7 +8,7 @@ export interface ISingleSelectDropdownOption {
|
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
title?: string;
|
|
9
10
|
}
|
|
10
|
-
export interface SingleSelectDropdownProps {
|
|
11
|
+
export interface SingleSelectDropdownProps extends Omit<SelectProps, 'toggle'> {
|
|
11
12
|
selected: ISingleSelectDropdownOption;
|
|
12
13
|
options: ISingleSelectDropdownOption[];
|
|
13
14
|
isDisabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleSelectDropdown.d.ts","sourceRoot":"","sources":["../../../src/SingleSelectDropdown/SingleSelectDropdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SingleSelectDropdown.d.ts","sourceRoot":"","sources":["../../../src/SingleSelectDropdown/SingleSelectDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQH,WAAW,EAEd,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAC;AAInE,MAAM,WAAW,2BAA2B;IACxC,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC;IAC1E,QAAQ,EAAE,2BAA2B,CAAC;IACtC,OAAO,EAAE,2BAA2B,EAAE,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IACnC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,CAAC,OAAO,KAAA,KAAK,IAAI,CAAC;CAChC;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qBAsIpE"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import { Flex, FlexItem, MenuToggle, Select, SelectList, SelectOption, Spinner, } from '@patternfly/react-core';
|
|
2
13
|
import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
|
|
3
14
|
import isEqual from 'lodash/isEqual';
|
|
4
15
|
import React, { useEffect, useState } from 'react';
|
|
5
16
|
import { useSelectKeyboardNavigator } from '../hooks/useSelectKeyboardNavigator';
|
|
6
17
|
export function SingleSelectDropdown(props) {
|
|
7
|
-
const { badge, selected, options, isDisabled, isLoading, id, placeholder, isInvalid, className, toggleClassName, dataTrackingId, toggleDataTrackingId, isScrollable, ariaLabel, zIndex, ariaLabelledBy, isModalOpen, hideToggleIcons, onClear, onBlur, onSelect
|
|
18
|
+
const { badge, selected, options, isDisabled, isLoading, id, placeholder, isInvalid, className, toggleClassName, dataTrackingId, toggleDataTrackingId, isScrollable, ariaLabel, zIndex, ariaLabelledBy, isModalOpen, hideToggleIcons, onClear, onBlur, onSelect } = props, restProps = __rest(props, ["badge", "selected", "options", "isDisabled", "isLoading", "id", "placeholder", "isInvalid", "className", "toggleClassName", "dataTrackingId", "toggleDataTrackingId", "isScrollable", "ariaLabel", "zIndex", "ariaLabelledBy", "isModalOpen", "hideToggleIcons", "onClear", "onBlur", "onSelect"]);
|
|
8
19
|
const [isOpen, setIsOpen] = useState(false);
|
|
9
20
|
const onToggleClick = () => {
|
|
10
21
|
setIsOpen(!isOpen);
|
|
@@ -44,7 +55,7 @@ export function SingleSelectDropdown(props) {
|
|
|
44
55
|
const onLocalBlur = (event) => {
|
|
45
56
|
!!onBlur && onBlur(event);
|
|
46
57
|
};
|
|
47
|
-
return (React.createElement(Select, { id: id || '', className: className || '', "data-tracking-id": dataTrackingId, isOpen: isOpen, selected: selected, onSelect: onLocalSelect, onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: toggle, shouldFocusToggleOnSelect: true, popperProps: { direction: 'down', enableFlip: false }, isScrollable: isScrollable, shouldFocusFirstItemOnOpen: false, onBlur: onLocalBlur, "aria-label": ariaLabel, zIndex: zIndex, "aria-labelledby": ariaLabelledBy },
|
|
58
|
+
return (React.createElement(Select, Object.assign({ id: id || '', className: className || '', "data-tracking-id": dataTrackingId, isOpen: isOpen, selected: selected, onSelect: onLocalSelect, onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: toggle, shouldFocusToggleOnSelect: true, popperProps: { direction: 'down', enableFlip: false }, isScrollable: isScrollable, shouldFocusFirstItemOnOpen: false, onBlur: onLocalBlur, "aria-label": ariaLabel, zIndex: zIndex, "aria-labelledby": ariaLabelledBy, maxMenuHeight: "20rem" }, restProps),
|
|
48
59
|
React.createElement(SelectList, null, options.map((option, index) => {
|
|
49
60
|
var _a;
|
|
50
61
|
return (React.createElement(SelectOption, { key: option.value, value: option, description: option.description || '',
|
package/lib/esm/Table/PFTable.js
CHANGED
|
@@ -117,7 +117,7 @@ function PFTable(props) {
|
|
|
117
117
|
const renderTableHeader = () => {
|
|
118
118
|
const visibleColumns = columns.filter((column) => column.show !== false);
|
|
119
119
|
return (React.createElement(Thead, null,
|
|
120
|
-
React.createElement(Tr,
|
|
120
|
+
React.createElement(Tr, { isBorderRow: true },
|
|
121
121
|
isSelectColumnVisible && (React.createElement(Th, { select: {
|
|
122
122
|
onSelect: (event, isSelected) => onRowSelect(event, isSelected, -1),
|
|
123
123
|
isSelected: allRowsSelected,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './tagSelector.css';
|
|
2
2
|
import { Button, Flex, FlexItem, Label, LabelGroup, MenuToggle, Select, SelectList, SelectOption, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
|
|
3
|
-
import
|
|
3
|
+
import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
|
|
4
4
|
import { isEmpty } from 'lodash';
|
|
5
5
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
6
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -61,12 +61,12 @@ export function TagsSelector({ tagOptions, onChange, placeholder, id, typeahead,
|
|
|
61
61
|
} }, label.tagName)))));
|
|
62
62
|
const toggle = (toggleRef) => (React.createElement(MenuToggle, Object.assign({ ref: toggleRef, onClick: onToggleClick, className: `pf-v6-u-flex-grow-1 tags-selector-menu-toggle ${isEmpty(tagOptions) || disabled ? 'menu-is-disabld' : ''}`, isExpanded: isOpen, onKeyDown: onInputKeyDown, isDisabled: isEmpty(tagOptions) || disabled }, (typeahead && { variant: 'typeahead' }), { id: id, isFullWidth: true }), typeahead ? (React.createElement(TextInputGroup, { isPlain: true },
|
|
63
63
|
React.createElement(TextInputGroupMain, { id: "tags-selector-search-input", value: query, onClick: onToggleClick, onChange: (e, v) => setQuery(v), onKeyDown: onInputKeyDown, innerRef: textInputRef, isExpanded: isOpen, placeholder: placeholder || t('Search for a tag') }, selectedChipGroup),
|
|
64
|
-
React.createElement(TextInputGroupUtilities, null, selected.length > 0 && (React.createElement(Button, { icon: React.createElement(
|
|
64
|
+
React.createElement(TextInputGroupUtilities, null, selected.length > 0 && (React.createElement(Button, { icon: React.createElement(TimesCircleIcon, { "aria-hidden": true }), variant: "plain", onClick: handleClear, "aria-label": "clear-all-tags" }))))) : (React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' }, alignItems: { default: 'alignItemsCenter' } },
|
|
65
65
|
React.createElement(FlexItem, null,
|
|
66
66
|
selectedChipGroup,
|
|
67
67
|
React.createElement("span", { className: `${!isEmpty(selected) && 'pf-v6-u-ml-md'}` }, placeholder || React.createElement(Trans, null, "Select a tag"))),
|
|
68
68
|
!isEmpty(selected) && (React.createElement(FlexItem, null,
|
|
69
|
-
React.createElement(Button, { icon: React.createElement(
|
|
69
|
+
React.createElement(Button, { icon: React.createElement(TimesCircleIcon, { "aria-hidden": true }), variant: "plain", onClick: handleClear, "aria-label": "clear-all-tags" })))))));
|
|
70
70
|
return (React.createElement(Select, { isOpen: isOpen, selected: selected, toggle: toggle, onSelect: (_, selection) => onSelect(selection), isScrollable: true, onOpenChange: () => setIsOpen(false), popperProps: { direction: 'down', enableFlip: false }, id: "tag-selector" },
|
|
71
71
|
React.createElement(SelectList, { isAriaMultiselectable: true }, selectOptions.map((tag, index) => (React.createElement(SelectOption, { key: tag.id, value: tag, isFocused: index === focusedItemIndex, isSelected: selected.some((t) => t.id === tag.id) }, tag.tagName))))));
|
|
72
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/components",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.28",
|
|
4
4
|
"description": "Contains all reusabel components for support app",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"@patternfly/react-table": "6.2.1",
|
|
69
69
|
"@patternfly/react-tokens": "6.2.1",
|
|
70
70
|
"@rh-support/types": "2.0.5",
|
|
71
|
-
"@rh-support/user-permissions": "2.5.
|
|
72
|
-
"@rh-support/utils": "2.5.
|
|
71
|
+
"@rh-support/user-permissions": "2.5.19",
|
|
72
|
+
"@rh-support/utils": "2.5.18",
|
|
73
73
|
"dompurify": "^2.2.6",
|
|
74
74
|
"js-worker-search": "^1.4.1",
|
|
75
75
|
"lazysizes": "^5.3.2",
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"defaults and supports es6-module",
|
|
107
107
|
"maintained node versions"
|
|
108
108
|
],
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "dc194981196fd9b18c9d82ed3f39b7c66d65f5f3"
|
|
110
110
|
}
|