@rh-support/components 2.1.23 → 2.1.25
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/README.md +2 -0
- package/lib/cjs/CustomTextInput/CustomTextInput.d.ts +2 -0
- package/lib/cjs/CustomTextInput/CustomTextInput.d.ts.map +1 -1
- package/lib/cjs/CustomTextInput/CustomTextInput.js +4 -2
- package/lib/cjs/DropDownList/DropDownList.js +10 -10
- package/lib/cjs/DropDownList/DropdownWrapper.js +2 -2
- package/lib/cjs/DropDownList/SearchableList.js +5 -5
- package/lib/cjs/DropDownList/SelectList.js +4 -4
- package/lib/cjs/DropDownList/dropdownList.css +10 -5
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.js +2 -3
- package/lib/cjs/InlineEdit/NewInlineEdit.js +1 -1
- package/lib/cjs/InlineEdit/newInlineEdit.css +3 -3
- package/lib/cjs/LoadingDots/LoadingDots.js +1 -1
- package/lib/cjs/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
- package/lib/cjs/MarkdownEditor/MarkdownEditor.js +11 -10
- package/lib/cjs/MarkdownEditor/markdownEditor.css +1 -1
- package/lib/cjs/PaginationCompact/PaginationCompact.js +4 -4
- package/lib/cjs/PaginationCompact/paginationCompact.css +1 -1
- package/lib/cjs/PhoneInput/PhoneInput.d.ts.map +1 -1
- package/lib/cjs/PhoneInput/PhoneInput.js +10 -7
- package/lib/cjs/PhoneInput/PhoneInput.scss +1 -1
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.js +12 -12
- package/lib/cjs/Table/PFTable.d.ts +2 -1
- package/lib/cjs/Table/PFTable.d.ts.map +1 -1
- package/lib/cjs/Table/PFTable.js +7 -7
- package/lib/cjs/Table/columnSelector.css +1 -1
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.js +6 -5
- package/lib/cjs/TextAreaResizable/TextAreaResizable.d.ts.map +1 -1
- package/lib/cjs/TextAreaResizable/TextAreaResizable.js +1 -1
- package/lib/cjs/ToastNotification/toastNotification.css +1 -1
- package/lib/cjs/TopContentSearch/TopContentSearch.js +3 -3
- package/lib/cjs/helperFunctions/errorMessage.js +2 -2
- package/lib/cjs/helperFunctions/errorMessage.scss +1 -1
- package/lib/cjs/hooks/index.d.ts +1 -0
- package/lib/cjs/hooks/index.d.ts.map +1 -1
- package/lib/cjs/hooks/index.js +1 -0
- package/lib/cjs/hooks/useBreakpoint.d.ts.map +1 -1
- package/lib/cjs/hooks/useBreakpoint.js +1 -0
- package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts +13 -0
- package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts.map +1 -0
- package/lib/cjs/hooks/useSelectKeyboardNavigator.js +55 -0
- package/lib/esm/CustomTextInput/CustomTextInput.d.ts +2 -0
- package/lib/esm/CustomTextInput/CustomTextInput.d.ts.map +1 -1
- package/lib/esm/CustomTextInput/CustomTextInput.js +4 -2
- package/lib/esm/DropDownList/DropDownList.js +10 -10
- package/lib/esm/DropDownList/DropdownWrapper.js +2 -2
- package/lib/esm/DropDownList/SearchableList.js +5 -5
- package/lib/esm/DropDownList/SelectList.js +4 -4
- package/lib/esm/DropDownList/dropdownList.css +10 -5
- package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
- package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.js +3 -4
- package/lib/esm/InlineEdit/NewInlineEdit.js +1 -1
- package/lib/esm/InlineEdit/newInlineEdit.css +3 -3
- package/lib/esm/LoadingDots/LoadingDots.js +1 -1
- package/lib/esm/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
- package/lib/esm/MarkdownEditor/MarkdownEditor.js +9 -8
- package/lib/esm/MarkdownEditor/markdownEditor.css +1 -1
- package/lib/esm/PaginationCompact/PaginationCompact.js +4 -4
- package/lib/esm/PaginationCompact/paginationCompact.css +1 -1
- package/lib/esm/PhoneInput/PhoneInput.d.ts.map +1 -1
- package/lib/esm/PhoneInput/PhoneInput.js +10 -7
- package/lib/esm/PhoneInput/PhoneInput.scss +1 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.js +13 -13
- package/lib/esm/Table/PFTable.d.ts +2 -1
- package/lib/esm/Table/PFTable.d.ts.map +1 -1
- package/lib/esm/Table/PFTable.js +6 -6
- package/lib/esm/Table/columnSelector.css +1 -1
- package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
- package/lib/esm/TermsAndConditions/AcceptTermsModal.js +7 -6
- package/lib/esm/TextAreaResizable/TextAreaResizable.d.ts.map +1 -1
- package/lib/esm/TextAreaResizable/TextAreaResizable.js +1 -1
- package/lib/esm/ToastNotification/toastNotification.css +1 -1
- package/lib/esm/TopContentSearch/TopContentSearch.js +3 -3
- package/lib/esm/helperFunctions/errorMessage.js +2 -2
- package/lib/esm/helperFunctions/errorMessage.scss +1 -1
- package/lib/esm/hooks/index.d.ts +1 -0
- package/lib/esm/hooks/index.d.ts.map +1 -1
- package/lib/esm/hooks/index.js +1 -0
- package/lib/esm/hooks/useBreakpoint.d.ts.map +1 -1
- package/lib/esm/hooks/useBreakpoint.js +1 -0
- package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts +13 -0
- package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts.map +1 -0
- package/lib/esm/hooks/useSelectKeyboardNavigator.js +51 -0
- package/package.json +9 -11
|
@@ -11,7 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import './markdownEditor.css';
|
|
13
13
|
import { parseCommentMarkdown } from '@cee-eng/ui-toolkit';
|
|
14
|
-
import { Button, ButtonVariant,
|
|
14
|
+
import { Button, ButtonVariant, Flex, FlexItem, Spinner, Text, TextVariants, Toolbar, ToolbarGroup, ToolbarItem, } from '@patternfly/react-core';
|
|
15
|
+
import { Dropdown, DropdownItem, DropdownSeparator, DropdownToggle } from '@patternfly/react-core/deprecated';
|
|
15
16
|
import CodeIcon from '@patternfly/react-icons/dist/js/icons/code-icon';
|
|
16
17
|
import ImageIcon from '@patternfly/react-icons/dist/js/icons/image-icon';
|
|
17
18
|
import LinkIcon from '@patternfly/react-icons/dist/js/icons/link-icon';
|
|
@@ -122,7 +123,7 @@ function MarkdownEditor(props) {
|
|
|
122
123
|
React.createElement(Flex, { flexWrap: { default: 'nowrap' } },
|
|
123
124
|
React.createElement(FlexItem, null,
|
|
124
125
|
React.createElement(Text, { component: TextVariants.small }, file.fileName)),
|
|
125
|
-
onFileDelete && (React.createElement(FlexItem, { className: "pf-u-ml-auto" },
|
|
126
|
+
onFileDelete && (React.createElement(FlexItem, { className: "pf-v5-u-ml-auto" },
|
|
126
127
|
React.createElement(Button, { variant: ButtonVariant.plain, onClick: (event) => {
|
|
127
128
|
onFileSelectToggle(false);
|
|
128
129
|
onFileDelete(file);
|
|
@@ -360,7 +361,7 @@ function MarkdownEditor(props) {
|
|
|
360
361
|
props.disabled && isPreview && setIsPreview(false);
|
|
361
362
|
const disablePreviewButton = mdValue === '';
|
|
362
363
|
return (React.createElement("div", { className: `markdown-editor-container ${props.className}`, id: props.id, "data-tracking-id": "md-editor-container", onDrop: onDrop, onPaste: onPaste },
|
|
363
|
-
React.createElement("div", { className: "toolbar-container border-bottom" }, !isPlainModeEnabled && (React.createElement(Toolbar, { className: "pf-l-flex" },
|
|
364
|
+
React.createElement("div", { className: "toolbar-container border-bottom" }, !isPlainModeEnabled && (React.createElement(Toolbar, { className: "pf-v5-l-flex" },
|
|
364
365
|
React.createElement(ToolbarGroup, { "data-tracking-id": "md-editor-toolbar", className: "markdown-toolbar-left-section pf-m-wrap" },
|
|
365
366
|
React.createElement(Button, { variant: ButtonVariant.plain, tabIndex: -1, isDisabled: props.disabled || isPreview, onClick: bold, "data-tracking-id": "md-editor-toolbar-b", title: "Bold" }, "B"),
|
|
366
367
|
React.createElement(Button, { variant: ButtonVariant.plain, tabIndex: -1, isDisabled: props.disabled || isPreview, onClick: italic, "data-tracking-id": "md-editor-toolbar-i", title: "Italic" }, "I"),
|
|
@@ -379,17 +380,17 @@ function MarkdownEditor(props) {
|
|
|
379
380
|
React.createElement(QuoteRightIcon, null)),
|
|
380
381
|
React.createElement(Button, { tabIndex: -1, variant: ButtonVariant.plain, isDisabled: props.disabled || isPreview, onClick: code, title: "Code", "data-tracking-id": "md-editor-toolbar-code" },
|
|
381
382
|
React.createElement(CodeIcon, null)),
|
|
382
|
-
showFileSelectorInToolbar && (React.createElement(Dropdown, { onSelect: onFileSelectLocal, id: "md-editor-toolbar-file-selector", toggle: React.createElement(DropdownToggle, { onToggle: onFileSelectToggle, isDisabled: props.disabled || isPreview },
|
|
383
|
+
showFileSelectorInToolbar && (React.createElement(Dropdown, { onSelect: onFileSelectLocal, id: "md-editor-toolbar-file-selector", toggle: React.createElement(DropdownToggle, { onToggle: (_event, isOpen) => onFileSelectToggle(isOpen), isDisabled: props.disabled || isPreview },
|
|
383
384
|
React.createElement(ImageIcon, null)), dropdownItems: getFileSelectorList(), tabIndex: -1, isPlain: true, menuAppendTo: document.body, isOpen: isFileSelectorOpen, "data-tracking-id": "md-editor-toolbar-file-selector" }))),
|
|
384
385
|
React.createElement(ToolbarItem, null,
|
|
385
|
-
React.createElement("a", { className: "pf-c-button pf-m-link pf-m-inline markdown-guidance", rel: "noopener noreferrer", target: "_blank", href: "/articles/4729621", "data-tracking-id": "md-guidance" },
|
|
386
|
+
React.createElement("a", { className: "pf-v5-c-button pf-m-link pf-m-inline markdown-guidance", rel: "noopener noreferrer", target: "_blank", href: "/articles/4729621", "data-tracking-id": "md-guidance" },
|
|
386
387
|
React.createElement(Trans, null, "Markdown guidance")))))),
|
|
387
388
|
React.createElement("div", { className: "markdown-content" }, !isPreview ? (React.createElement("textarea", Object.assign({}, textAreaProps, { onKeyDown: keydown, placeholder: isPlainModeEnabled ? t(props.plainTextPlaceholder) : t(props.mdPlaceholder), ref: bindTextAreaRef, className: cx('form-control', 'markdown-text-area', props.textAreaClassName, 'textArea'), value: mdValue, onChange: textChanged, rows: props.rows || contentRows, style: { height: '313px' } }))) : (React.createElement("div", { className: "markdown-preview-placeholder", style: { height: '313px' } },
|
|
388
389
|
React.createElement("div", { className: "markdown-preview", style: { maxHeight: '313px' } },
|
|
389
390
|
React.createElement("div", { dangerouslySetInnerHTML: {
|
|
390
391
|
__html: DOMPurify.sanitize(previewMDText(mdValue)),
|
|
391
392
|
} }))))),
|
|
392
|
-
React.createElement("div", null, props.showMarkdownPlainTextToggle && (React.createElement("div", { className: `markdown-toggle-toolbar pf-l-flex` },
|
|
393
|
+
React.createElement("div", null, props.showMarkdownPlainTextToggle && (React.createElement("div", { className: `markdown-toggle-toolbar pf-v5-l-flex` },
|
|
393
394
|
React.createElement("span", { className: "markdown-toolbar-left-section" },
|
|
394
395
|
!isPlainModeEnabled && (React.createElement(Button, { className: "markdown-preview-btn", tabIndex: -1, variant: ButtonVariant.link, onClick: preview, title: "Show preview", "data-tracking-id": `md-preview-${isPreview ? 'hide' : 'show'}`, isDisabled: disablePreviewButton }, isPreview ? (React.createElement("span", null,
|
|
395
396
|
" ",
|
|
@@ -398,9 +399,9 @@ function MarkdownEditor(props) {
|
|
|
398
399
|
t(showPreviewText))))),
|
|
399
400
|
isUploadingFile && (React.createElement(React.Fragment, null,
|
|
400
401
|
React.createElement(Trans, null,
|
|
401
|
-
React.createElement("small", { className: "pf-u-pl-md" },
|
|
402
|
+
React.createElement("small", { className: "pf-v5-u-pl-md" },
|
|
402
403
|
React.createElement(Trans, null, "Uploading File"))),
|
|
403
|
-
React.createElement(Spinner, { className: "pf-u-ml-sm", size: "md" }))),
|
|
404
|
+
React.createElement(Spinner, { className: "pf-v5-u-ml-sm", size: "md" }))),
|
|
404
405
|
mdValue.length > props.minCharsForCounter && getCharCountText(mdValue)),
|
|
405
406
|
React.createElement("span", null,
|
|
406
407
|
React.createElement(Button, { variant: "plain", className: isPlainModeEnabled ? 'markdown-active-mode' : '', onClick: () => onModeChange(true), isDisabled: isPlainModeEnabled || isUploadingFile, "data-tracking-id": "md-editor-plaintext" },
|
|
@@ -20,9 +20,9 @@ export function PaginationCompact({ maxPage, dataTrackingId, onPageChange }) {
|
|
|
20
20
|
onPageChange(currentPage);
|
|
21
21
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
22
22
|
}, [currentPage]);
|
|
23
|
-
return (React.createElement("div", { className: "pagination-compact pf-c-pagination pf-m-compact pf-m-bottom pf-u-ml-auto" },
|
|
24
|
-
React.createElement("nav", { className: "pf-c-pagination__nav" },
|
|
25
|
-
React.createElement("div", { className: "pf-c-pagination__nav-control pf-m-prev" },
|
|
23
|
+
return (React.createElement("div", { className: "pagination-compact pf-v5-c-pagination pf-m-compact pf-m-bottom pf-v5-u-ml-auto" },
|
|
24
|
+
React.createElement("nav", { className: "pf-v5-c-pagination__nav" },
|
|
25
|
+
React.createElement("div", { className: "pf-v5-c-pagination__nav-control pf-m-prev" },
|
|
26
26
|
React.createElement(Button, { variant: ButtonVariant.plain, type: "button", "data-tracking-id": `${dataTrackingId}-previous`, onClick: onPreviousClick, isDisabled: currentPage === 1, "aria-label": "Go to previous page" },
|
|
27
27
|
React.createElement(AngleLeftIcon, null))),
|
|
28
28
|
React.createElement("div", { style: {
|
|
@@ -31,7 +31,7 @@ export function PaginationCompact({ maxPage, dataTrackingId, onPageChange }) {
|
|
|
31
31
|
currentPage,
|
|
32
32
|
" of ",
|
|
33
33
|
maxPage),
|
|
34
|
-
React.createElement("div", { className: "pf-c-pagination__nav-control pf-m-next" },
|
|
34
|
+
React.createElement("div", { className: "pf-v5-c-pagination__nav-control pf-m-next" },
|
|
35
35
|
React.createElement(Button, { variant: ButtonVariant.plain, onClick: onNextClick, "data-tracking-id": `${dataTrackingId}-next`, isDisabled: currentPage === maxPage, type: "button", "aria-label": "Go to next page" },
|
|
36
36
|
React.createElement(AngleRightIcon, null))))));
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../src/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../src/PhoneInput/PhoneInput.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAW3B,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACtE,mBAAmB,CAAC,EAAE,CAAC,MAAM,KAAA,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,OAAO,KAAA,KAAK,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AA4DD,eAAO,MAAM,WAAW,gBAAiB,MAAM;;;CAqB9C,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,eAqPvC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import './PhoneInput.scss';
|
|
2
|
-
import { InputGroup,
|
|
2
|
+
import { InputGroup, InputGroupItem, Spinner, TextInput } from '@patternfly/react-core';
|
|
3
|
+
import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
|
|
3
4
|
import isEmpty from 'lodash/isEmpty';
|
|
4
5
|
import isEqual from 'lodash/isEqual';
|
|
5
6
|
import React, { useEffect, useState } from 'react';
|
|
@@ -177,7 +178,7 @@ export function PhoneInput(props) {
|
|
|
177
178
|
};
|
|
178
179
|
const getOptions = (options) => {
|
|
179
180
|
return options.map((country) => (React.createElement(SelectOption, { key: country.iso2, value: country },
|
|
180
|
-
React.createElement("div", { className: "pf-u-display-inline-flex" },
|
|
181
|
+
React.createElement("div", { className: "pf-v5-u-display-inline-flex" },
|
|
181
182
|
React.createElement("div", { className: `flag ${country.iso2}`, style: { marginRight: '8px' } }),
|
|
182
183
|
country.name,
|
|
183
184
|
" (+",
|
|
@@ -194,7 +195,7 @@ export function PhoneInput(props) {
|
|
|
194
195
|
return getOptions(newOptions);
|
|
195
196
|
};
|
|
196
197
|
const placeholder = (React.createElement("div", { className: "phone-number-select-placeholder" },
|
|
197
|
-
React.createElement("div", { className: "pf-u-display-inline-flex" },
|
|
198
|
+
React.createElement("div", { className: "pf-v5-u-display-inline-flex" },
|
|
198
199
|
React.createElement("div", { className: `flag ${iso2}`, style: { marginRight: '5px' } }),
|
|
199
200
|
iso2.toUpperCase())));
|
|
200
201
|
useEffect(() => {
|
|
@@ -252,8 +253,10 @@ export function PhoneInput(props) {
|
|
|
252
253
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
253
254
|
}, [phoneValue]);
|
|
254
255
|
return (React.createElement(InputGroup, { className: "phone-number-input" },
|
|
255
|
-
React.createElement(
|
|
256
|
-
React.createElement(
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
React.createElement(InputGroupItem, null,
|
|
257
|
+
React.createElement("div", null,
|
|
258
|
+
React.createElement(Select, { variant: SelectVariant.single, "data-tracking-id": "case-phone-number-country-code", className: "phone-number-select", onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onCountrySelect, isOpen: isOpen, placeholderText: iso2 && phoneValue !== '' ? placeholder : 'Country Code', onFilter: onFilter, hasInlineFilter: true, inlineFilterPlaceholderText: t('Search'), isDisabled: props.isDisabled }, getOptions(initializedCountries)))),
|
|
259
|
+
React.createElement(InputGroupItem, { style: { width: '100%' } },
|
|
260
|
+
React.createElement(TextInput, { id: "case-phone-number", "data-tracking-id": "case-phone-number", placeholder: "55-555-5555", value: formattedNumber ? formattedNumber : phoneValue, onChange: (_event, phone) => onPhoneChange(phone), validated: validations, isDisabled: props.isDisabled })),
|
|
261
|
+
props.isLoading && React.createElement(Spinner, { size: "lg", className: "pf-v5-u-ml-2xl pf-v5-u-mr-xl phone-spinner" })));
|
|
259
262
|
}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { pcm } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, Modal, ModalVariant } from '@patternfly/react-core';
|
|
11
|
+
import { Button, Icon, Modal, ModalVariant } from '@patternfly/react-core';
|
|
12
12
|
import OutlinedFrownIcon from '@patternfly/react-icons/dist/js/icons/outlined-frown-icon';
|
|
13
13
|
import OutlinedFrownOpenIcon from '@patternfly/react-icons/dist/js/icons/outlined-frown-open-icon';
|
|
14
14
|
import OutlinedGrinIcon from '@patternfly/react-icons/dist/js/icons/outlined-grin-icon';
|
|
@@ -88,27 +88,27 @@ function SupportFeedbackModal(props) {
|
|
|
88
88
|
const sentiments = [
|
|
89
89
|
{
|
|
90
90
|
id: 'very_unsatisfied',
|
|
91
|
-
icon: React.createElement(OutlinedFrownOpenIcon,
|
|
91
|
+
icon: React.createElement(OutlinedFrownOpenIcon, null),
|
|
92
92
|
label: 'Very Unsatisfied',
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
id: 'unsatisfied',
|
|
96
|
-
icon: React.createElement(OutlinedFrownIcon,
|
|
96
|
+
icon: React.createElement(OutlinedFrownIcon, null),
|
|
97
97
|
label: 'Unsatisfied',
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
id: 'neutral',
|
|
101
|
-
icon: React.createElement(OutlinedMehIcon,
|
|
101
|
+
icon: React.createElement(OutlinedMehIcon, null),
|
|
102
102
|
label: 'Neutral',
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
id: 'satisfied',
|
|
106
|
-
icon: React.createElement(OutlinedSmileIcon,
|
|
106
|
+
icon: React.createElement(OutlinedSmileIcon, null),
|
|
107
107
|
label: 'Satisfied',
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
id: 'very_satisfied',
|
|
111
|
-
icon: React.createElement(OutlinedGrinIcon,
|
|
111
|
+
icon: React.createElement(OutlinedGrinIcon, null),
|
|
112
112
|
label: 'Very Satisfied',
|
|
113
113
|
},
|
|
114
114
|
];
|
|
@@ -116,22 +116,22 @@ function SupportFeedbackModal(props) {
|
|
|
116
116
|
function renderModalBody() {
|
|
117
117
|
return (React.createElement(React.Fragment, null,
|
|
118
118
|
React.createElement("form", { className: "support-feedback-form", action: "", onSubmit: handleSubmit },
|
|
119
|
-
React.createElement("fieldset", { className: "form-group radios feedback-satisfaction pf-u-mb-sm", role: "radiogroup", "aria-labelledby": "feedback-satisfaction-label" },
|
|
120
|
-
React.createElement("legend", { id: "feedback-satisfaction-label", className: "pf-u-mb-md" },
|
|
119
|
+
React.createElement("fieldset", { className: "form-group radios feedback-satisfaction pf-v5-u-mb-sm", role: "radiogroup", "aria-labelledby": "feedback-satisfaction-label" },
|
|
120
|
+
React.createElement("legend", { id: "feedback-satisfaction-label", className: "pf-v5-u-mb-md" },
|
|
121
121
|
React.createElement(Trans, null, "How satisfied are you with customer support\u2019s web experience?"),
|
|
122
122
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*"),
|
|
123
123
|
' '),
|
|
124
124
|
React.createElement("div", { className: "satisfaction-values-wrapper" }, sentiments.map((sentiment) => {
|
|
125
|
-
return (React.createElement("label", { className: `${sentiment.id} sentiment-label pf-u-ml-md pf-u-mr-md ${values.levelOfSatisfied === sentiment.label ? 'sentiment-selected' : ''}`, htmlFor: sentiment.id, key: sentiment.id },
|
|
126
|
-
React.createElement("input", { type: "radio", id: sentiment.id, "aria-label": t(sentiment.label), disabled: isFetching, name: "levelOfSatisfied", value: sentiment.label, checked: values.levelOfSatisfied === sentiment.label, "aria-checked": values.levelOfSatisfied === sentiment.label, required: true, className: "feedback_button_values pf-u-mb-sm pf-screen-reader", onChange: handleSentimentChange }),
|
|
125
|
+
return (React.createElement("label", { className: `${sentiment.id} sentiment-label pf-v5-u-ml-md pf-v5-u-mr-md ${values.levelOfSatisfied === sentiment.label ? 'sentiment-selected' : ''}`, htmlFor: sentiment.id, key: sentiment.id },
|
|
126
|
+
React.createElement("input", { type: "radio", id: sentiment.id, "aria-label": t(sentiment.label), disabled: isFetching, name: "levelOfSatisfied", value: sentiment.label, checked: values.levelOfSatisfied === sentiment.label, "aria-checked": values.levelOfSatisfied === sentiment.label, required: true, className: "feedback_button_values pf-v5-u-mb-sm pf-screen-reader", onChange: handleSentimentChange }),
|
|
127
127
|
' ',
|
|
128
|
-
sentiment.icon,
|
|
128
|
+
React.createElement(Icon, { size: "lg" }, sentiment.icon),
|
|
129
129
|
React.createElement(Trans, null, sentiment.label)));
|
|
130
130
|
})),
|
|
131
131
|
isSubmitDisabled && (React.createElement("div", null,
|
|
132
132
|
React.createElement("p", { className: "form-instructions form-invalid" },
|
|
133
133
|
React.createElement(Trans, null, "Please select a value"))))),
|
|
134
|
-
React.createElement("div", { className: "form-group pf-u-mb-md" },
|
|
134
|
+
React.createElement("div", { className: "form-group pf-v5-u-mb-md" },
|
|
135
135
|
React.createElement("label", { htmlFor: "moreFeedback" },
|
|
136
136
|
React.createElement(Trans, null, "How can we improve?")),
|
|
137
137
|
React.createElement(TextAreaAutosize, { name: "moreInfo", id: "moreFeedback", placeholder: t('i18nDescribeSuggestionDetail', 'Describe your suggestion in detail'), disabled: isFetching, value: values.moreInfo, className: "form-control", onChange: handleFeedbackTextChange, rowsMin: 3 })),
|
|
@@ -140,7 +140,7 @@ function SupportFeedbackModal(props) {
|
|
|
140
140
|
}
|
|
141
141
|
function returnModalAction() {
|
|
142
142
|
return [
|
|
143
|
-
React.createElement(Button, { key: "confirm", onClick: handleSubmit, variant: "primary", isDisabled: isSubmitDisabled || isFetching, className: "pf-u-ml-xs", spinnerAriaValueText: isFetching ? 'Loading' : undefined, isLoading: isFetching, "data-tracking-id": "app-feedback-submit", "aria-label": t('Send feedback') },
|
|
143
|
+
React.createElement(Button, { key: "confirm", onClick: handleSubmit, variant: "primary", isDisabled: isSubmitDisabled || isFetching, className: "pf-v5-u-ml-xs", spinnerAriaValueText: isFetching ? 'Loading' : undefined, isLoading: isFetching, "data-tracking-id": "app-feedback-submit", "aria-label": t('Send feedback') },
|
|
144
144
|
React.createElement(Trans, null, isFetching ? 'Sending feedback' : 'Send feedback')),
|
|
145
145
|
React.createElement("button", { key: "cancel", onClick: handleModalToggle, className: "btn btn-app btn-link", "data-tracking-id": "app-feedback-cancel", "aria-label": "Cancel", disabled: isFetching },
|
|
146
146
|
React.createElement(Trans, null, "Cancel")),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { IExtraData, IRow, IRowData
|
|
1
|
+
import { IExtraData, IRow, IRowData } from '@patternfly/react-table';
|
|
2
|
+
import { TableProps } from '@patternfly/react-table/deprecated';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
3
4
|
interface IColumn {
|
|
4
5
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PFTable.d.ts","sourceRoot":"","sources":["../../../src/Table/PFTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PFTable.d.ts","sourceRoot":"","sources":["../../../src/Table/PFTable.tsx"],"names":[],"mappings":"AASA,OAAO,EAGH,UAAU,EACV,IAAI,EACJ,QAAQ,EAKX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAiC,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAC/F,OAAc,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AA8C3E,UAAU,OAAO;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,GAAG,CAAC;IACzB,UAAU,CAAC,EAAE,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,EAAE,aAAa,CAAC,KAAA,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAElD;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,IAAI,KAAA,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAC1C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,GAAG,CAAC;IACzB,SAAS,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;CACpF;AAED,UAAU,SAAS;IACf,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,OAAO;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC7B;AAED,UAAU,MAAO,SAAQ,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC7E,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,KAAK,KAAA,EAAE,GAAG,KAAA,EAAE,KAAK,KAAA,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM,KAAK,GAAG,CAAC;IACnE,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC;AAGD,eAAO,MAAM,sBAAsB,gCAAoB,CAAC;AAExD,iBAAS,OAAO,CAAC,KAAK,EAAE,MAAM,eAyK7B;AAED,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC"}
|
package/lib/esm/Table/PFTable.js
CHANGED
|
@@ -9,9 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { Bullseye, EmptyState, EmptyStateIcon, EmptyStateVariant, Spinner,
|
|
12
|
+
import { Bullseye, EmptyState, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, Spinner, } from '@patternfly/react-core';
|
|
13
13
|
import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
|
|
14
|
-
import { cellWidth, classNames, sortable, SortByDirection,
|
|
14
|
+
import { cellWidth, classNames, sortable, SortByDirection, TableVariant, Visibility, } from '@patternfly/react-table';
|
|
15
|
+
import { Table, TableBody, TableHeader } from '@patternfly/react-table/deprecated';
|
|
15
16
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
16
17
|
import { useTableContext } from './TableProvider';
|
|
17
18
|
const noop = () => { };
|
|
@@ -22,9 +23,8 @@ const emptyStateRowDefault = [
|
|
|
22
23
|
{
|
|
23
24
|
props: { colSpan: 8 },
|
|
24
25
|
title: (React.createElement(Bullseye, null,
|
|
25
|
-
React.createElement(EmptyState, { variant: EmptyStateVariant.
|
|
26
|
-
React.createElement(EmptyStateIcon, { icon: SearchIcon }),
|
|
27
|
-
React.createElement(Title, { headingLevel: "h2", size: "lg" }, "No results found")))),
|
|
26
|
+
React.createElement(EmptyState, { variant: EmptyStateVariant.sm },
|
|
27
|
+
React.createElement(EmptyStateHeader, { titleText: "No results found", icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }), headingLevel: "h2" })))),
|
|
28
28
|
},
|
|
29
29
|
],
|
|
30
30
|
},
|
|
@@ -36,7 +36,7 @@ const loadingRowDefault = [
|
|
|
36
36
|
{
|
|
37
37
|
props: { colSpan: 9 },
|
|
38
38
|
title: (React.createElement(Bullseye, { style: { minHeight: '350px' } },
|
|
39
|
-
React.createElement(EmptyState, { variant: EmptyStateVariant.
|
|
39
|
+
React.createElement(EmptyState, { variant: EmptyStateVariant.sm },
|
|
40
40
|
React.createElement(Spinner, { size: "xl" })))),
|
|
41
41
|
},
|
|
42
42
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcceptTermsModal.d.ts","sourceRoot":"","sources":["../../../src/TermsAndConditions/AcceptTermsModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcceptTermsModal.d.ts","sourceRoot":"","sources":["../../../src/TermsAndConditions/AcceptTermsModal.tsx"],"names":[],"mappings":"AAUA,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAiBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,eAyI7C"}
|
|
@@ -8,7 +8,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, ButtonVariant, Checkbox, Flex, FlexItem, Modal, ModalVariant
|
|
11
|
+
import { Button, ButtonVariant, Checkbox, Flex, FlexItem, Modal, ModalVariant } from '@patternfly/react-core';
|
|
12
|
+
import { Select, SelectOption } from '@patternfly/react-core/deprecated';
|
|
12
13
|
import React, { useEffect, useState } from 'react';
|
|
13
14
|
import { Trans, useTranslation } from 'react-i18next';
|
|
14
15
|
import { useFetch } from '../hooks';
|
|
@@ -70,24 +71,24 @@ export function AcceptTermsModal(props) {
|
|
|
70
71
|
props.onConfirm(selectedTranslation.termsPdfId);
|
|
71
72
|
};
|
|
72
73
|
const onDropdownToggle = (toggle) => setisLangSelectorDropdownOpen(toggle);
|
|
73
|
-
return (React.createElement(Modal, { variant: ModalVariant.medium, className: "pf-u-font-size-sm", title: isFetching || !selectedTranslation ? 'Remote Access Rider' : selectedTranslation.translatedTermsName, isOpen: props.isModalOpen, showClose: props.isSubmitting ? false : true, onClose: handleModalToggle, actions: [
|
|
74
|
+
return (React.createElement(Modal, { variant: ModalVariant.medium, className: "pf-v5-u-font-size-sm", title: isFetching || !selectedTranslation ? 'Remote Access Rider' : selectedTranslation.translatedTermsName, isOpen: props.isModalOpen, showClose: props.isSubmitting ? false : true, onClose: handleModalToggle, actions: [
|
|
74
75
|
React.createElement(Button, { key: "confirm", variant: ButtonVariant.primary, isDisabled: !termsAcked || props.isSubmitting || props.isDisabled, isLoading: props.isDisabled || props.isSubmitting, "data-tracking-id": `${props.dataTrackingId || props.eventCode}-terms-accept`, onClick: onSubmitClick },
|
|
75
76
|
React.createElement(Trans, null, "Submit")),
|
|
76
77
|
React.createElement(Button, { key: "cancel", isDisabled: props.isSubmitting || props.isDisabled, "data-tracking-id": `${props.dataTrackingId || props.eventCode}-terms-cancel`, variant: ButtonVariant.link, onClick: props.onModalClose },
|
|
77
78
|
React.createElement(Trans, null, "Cancel")),
|
|
78
79
|
] }, isFetching || !selectedTranslation ? (React.createElement("div", { style: { height: '100px' } },
|
|
79
80
|
React.createElement(LoadingIndicator, null))) : (React.createElement(React.Fragment, null,
|
|
80
|
-
React.createElement("p", { className: "pf-u-mb-md" }, selectedTranslation.translatedDescription),
|
|
81
|
+
React.createElement("p", { className: "pf-v5-u-mb-md" }, selectedTranslation.translatedDescription),
|
|
81
82
|
React.createElement("strong", null,
|
|
82
83
|
React.createElement(Trans, null, "Download the agreement")),
|
|
83
|
-
React.createElement("p", { className: "pf-u-mb-md pf-u-mt-sm" }, selectedTranslation.translatedInstructions),
|
|
84
|
+
React.createElement("p", { className: "pf-v5-u-mb-md pf-v5-u-mt-sm" }, selectedTranslation.translatedInstructions),
|
|
84
85
|
React.createElement(Flex, null,
|
|
85
86
|
React.createElement(FlexItem, null,
|
|
86
|
-
React.createElement(Select, { "aria-label": t('Select language'), id: "terms-language-selector", className: "pf-u-mb-md", selections: selectedTranslation.localeCode, onSelect: onLangChange, isOpen: isLangSelectorDropdownOpen, isDisabled: props.isSubmitting, menuAppendTo: document.body, placeholderText: t('Select an option that best fits'), onToggle: onDropdownToggle }, Object.keys(allTranslations).map((option, index) => (React.createElement(SelectOption, { key: index, value: option }, getLocaleNameFromLocalCode(option)))))),
|
|
87
|
+
React.createElement(Select, { "aria-label": t('Select language'), id: "terms-language-selector", className: "pf-v5-u-mb-md", selections: selectedTranslation.localeCode, onSelect: onLangChange, isOpen: isLangSelectorDropdownOpen, isDisabled: props.isSubmitting, menuAppendTo: document.body, placeholderText: t('Select an option that best fits'), onToggle: (_event, toggle) => onDropdownToggle(toggle) }, Object.keys(allTranslations).map((option, index) => (React.createElement(SelectOption, { key: index, value: option }, getLocaleNameFromLocalCode(option)))))),
|
|
87
88
|
React.createElement(FlexItem, null,
|
|
88
89
|
React.createElement("a", { href: selectedTranslation.pdfDownloadUrl, "data-tracking-id": `${props.eventCode}-terms-download`, target: "_blank", rel: "noopener noreferrer" },
|
|
89
90
|
React.createElement(Trans, null, "Download")))),
|
|
90
|
-
React.createElement(Checkbox, { label: t('I have read and agree to the terms'), isChecked: termsAcked, onChange: (checked) => {
|
|
91
|
+
React.createElement(Checkbox, { label: t('I have read and agree to the terms'), isChecked: termsAcked, onChange: (_event, checked) => {
|
|
91
92
|
setTermsAcked(checked);
|
|
92
93
|
}, "aria-label": t('I have read and agree to the terms'), id: "agree-terms", name: "agree-terms" })))));
|
|
93
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAreaResizable.d.ts","sourceRoot":"","sources":["../../../src/TextAreaResizable/TextAreaResizable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAEnD,UAAU,MAAO,SAAQ,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;IACpG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CACpF;AACD,eAAO,MAAM,iBAAiB,UAAW,MAAM,
|
|
1
|
+
{"version":3,"file":"TextAreaResizable.d.ts","sourceRoot":"","sources":["../../../src/TextAreaResizable/TextAreaResizable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAEnD,UAAU,MAAO,SAAQ,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;IACpG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CACpF;AACD,eAAO,MAAM,iBAAiB,UAAW,MAAM,gBAqD9C,CAAC"}
|
|
@@ -26,5 +26,5 @@ export const TextAreaResizable = (props) => {
|
|
|
26
26
|
else
|
|
27
27
|
return 'default';
|
|
28
28
|
};
|
|
29
|
-
return (React.createElement(TextArea, { id: id, rows: rows || rowsMin, className: className, "aria-required": props['aria-required'], isRequired: isRequired, maxLength: maxLength, name: name, value: value, autoResize: autoResize, validated: validatedCheck(), onChange: onTextAreaChange, disabled: isDisabled }));
|
|
29
|
+
return (React.createElement(TextArea, { id: id, rows: rows || rowsMin, className: className, "aria-required": props['aria-required'], isRequired: isRequired, maxLength: maxLength, name: name, value: value, autoResize: autoResize, validated: validatedCheck(), onChange: (event, value) => onTextAreaChange(value, event), disabled: isDisabled, resizeOrientation: "vertical" }));
|
|
30
30
|
};
|
|
@@ -104,8 +104,8 @@ export function TopContentSearch({ topContentData = [], topContentResultsWrapper
|
|
|
104
104
|
setSearchText(value);
|
|
105
105
|
debounceSearch(value);
|
|
106
106
|
};
|
|
107
|
-
return (React.createElement("div", { className: "top-content-search-wrapper pf-u-p-md", ref: searchWrapperRef },
|
|
108
|
-
React.createElement("label", { htmlFor: "top-content-search-input", className: "pf-u-mr-md top-content-search-label" },
|
|
107
|
+
return (React.createElement("div", { className: "top-content-search-wrapper pf-v5-u-p-md", ref: searchWrapperRef },
|
|
108
|
+
React.createElement("label", { htmlFor: "top-content-search-input", className: "pf-v5-u-mr-md top-content-search-label" },
|
|
109
109
|
React.createElement(Trans, null, "Filter results:")),
|
|
110
|
-
React.createElement(SearchInput, { id: "top-content-search-input", className: "top-content-search-input pf-u-flex-grow-1", "aria-label": t('search top content'), placeholder: t('Enter relevant keywords'), value: searchText, "data-tracking-id": dataTrackingId, onChange: onSearchInputChange, onClear: onSearchInputClear })));
|
|
110
|
+
React.createElement(SearchInput, { id: "top-content-search-input", className: "top-content-search-input pf-v5-u-flex-grow-1", "aria-label": t('search top content'), placeholder: t('Enter relevant keywords'), value: searchText, "data-tracking-id": dataTrackingId, onChange: (e, val) => onSearchInputChange(val), onClear: onSearchInputClear })));
|
|
111
111
|
}
|
|
@@ -6,12 +6,12 @@ import React from 'react';
|
|
|
6
6
|
import { SupportFeedbackForm } from '../SupportFeedbackForm';
|
|
7
7
|
const defaultTitle = "Sorry, we're experiencing an error";
|
|
8
8
|
const errorMessageButtonLabel = 'contact us';
|
|
9
|
-
const defaultErrorMessage = (React.createElement("p", { className: "pf-u-mb-0" },
|
|
9
|
+
const defaultErrorMessage = (React.createElement("p", { className: "pf-v5-u-mb-0" },
|
|
10
10
|
"Try refreshing the page. Please ",
|
|
11
11
|
React.createElement(SupportFeedbackForm, { isInline: true, buttonLabel: errorMessageButtonLabel }),
|
|
12
12
|
" if the problem persists.",
|
|
13
13
|
React.createElement("br", null),
|
|
14
|
-
React.createElement(Button, { variant: "link", component: "a", href: "https://status.redhat.com/", "data-tracking-id": "redirect-status-portal-button", target: "_blank", icon: React.createElement(ExternalLinkAltIcon, { className: "status-portal-button-icon" }), iconPosition: "right", className: "pf-u-pl-0", isInline: true, "aria-label": "View status page" }, "View status page"),
|
|
14
|
+
React.createElement(Button, { variant: "link", component: "a", href: "https://status.redhat.com/", "data-tracking-id": "redirect-status-portal-button", target: "_blank", icon: React.createElement(ExternalLinkAltIcon, { className: "status-portal-button-icon" }), iconPosition: "right", className: "pf-v5-u-pl-0", isInline: true, "aria-label": "View status page" }, "View status page"),
|
|
15
15
|
' '));
|
|
16
16
|
const defaultErrorObj = {
|
|
17
17
|
500: {
|
package/lib/esm/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC"}
|
package/lib/esm/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBreakpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,oBAAY,MAAM,GAAG;IACjB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;
|
|
1
|
+
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBreakpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,oBAAY,MAAM,GAAG;IACjB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;AAaF,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,OAAwB,EAAE,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,eA+ChH;AAED,iBAAS,aAAa;;EAMrB;AACD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -8,6 +8,7 @@ const defaultQueries = {
|
|
|
8
8
|
md: `(min-width: 768px)`,
|
|
9
9
|
lg: `(min-width: 992px)`,
|
|
10
10
|
xl: `(min-width: 1300px)`,
|
|
11
|
+
xxl: `(min-width: 1800px)`,
|
|
11
12
|
};
|
|
12
13
|
function BreakpointProvider({ children, queries = defaultQueries }) {
|
|
13
14
|
const [queryMatch, setQueryMatch] = useState({});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
list: any[];
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
setIsOpen: (value: React.SetStateAction<boolean>) => void;
|
|
6
|
+
onSelect: (value: any) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useSelectKeyboardNavigator({ list, isOpen, setIsOpen, onSelect }: IProps): {
|
|
9
|
+
onInputKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
10
|
+
focusedItemIndex: number;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=useSelectKeyboardNavigator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSelectKeyboardNavigator.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSelectKeyboardNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,UAAU,MAAM;IACZ,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAClC;AAED,wBAAgB,0BAA0B,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,MAAM;4BA6BrD,mBAAmB,CAAC,gBAAgB,CAAC;;EAuBvE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
export function useSelectKeyboardNavigator({ list, isOpen, setIsOpen, onSelect }) {
|
|
3
|
+
const [focusedItemIndex, setFocusedItemIndex] = useState(null);
|
|
4
|
+
const handleMenuArrowKeys = (key) => {
|
|
5
|
+
let indexToFocus;
|
|
6
|
+
if (isOpen) {
|
|
7
|
+
if (key === 'ArrowUp') {
|
|
8
|
+
// When no index is set or at the first index, focus to the last, otherwise decrement focus index
|
|
9
|
+
if (focusedItemIndex === null || focusedItemIndex === 0) {
|
|
10
|
+
indexToFocus = list.length - 1;
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
indexToFocus = focusedItemIndex - 1;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
if (key === 'ArrowDown') {
|
|
17
|
+
// When no index is set or at the last index, focus to the first, otherwise increment focus index
|
|
18
|
+
if (focusedItemIndex === null || focusedItemIndex === list.length - 1) {
|
|
19
|
+
indexToFocus = 0;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
indexToFocus = focusedItemIndex + 1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
setFocusedItemIndex(indexToFocus);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const onInputKeyDown = (event) => {
|
|
29
|
+
const focusedItem = focusedItemIndex ? list[focusedItemIndex] : list[0];
|
|
30
|
+
switch (event.key) {
|
|
31
|
+
// Select the first available option
|
|
32
|
+
case 'Enter':
|
|
33
|
+
if (!isOpen) {
|
|
34
|
+
setIsOpen((pre) => !pre);
|
|
35
|
+
}
|
|
36
|
+
else if (isOpen) {
|
|
37
|
+
onSelect(focusedItem);
|
|
38
|
+
}
|
|
39
|
+
break;
|
|
40
|
+
case 'Escape':
|
|
41
|
+
setIsOpen(false);
|
|
42
|
+
break;
|
|
43
|
+
case 'ArrowUp':
|
|
44
|
+
case 'ArrowDown':
|
|
45
|
+
event.preventDefault();
|
|
46
|
+
handleMenuArrowKeys(event.key);
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return { onInputKeyDown, focusedItemIndex };
|
|
51
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.25",
|
|
4
4
|
"description": "Contains all reusabel components for support app",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@cee-eng/hydrajs": "4.16.33",
|
|
59
59
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
60
|
-
"@patternfly/patternfly": "
|
|
61
|
-
"@patternfly/react-core": "
|
|
62
|
-
"@patternfly/react-table": "
|
|
60
|
+
"@patternfly/patternfly": "5.1.0",
|
|
61
|
+
"@patternfly/react-core": "5.1.1",
|
|
62
|
+
"@patternfly/react-table": "5.1.1",
|
|
63
63
|
"dompurify": "^2.2.6",
|
|
64
64
|
"downshift": "^6.0.5",
|
|
65
65
|
"js-worker-search": "^1.4.1",
|
|
@@ -68,7 +68,6 @@
|
|
|
68
68
|
"mark.js": "^8.11.1",
|
|
69
69
|
"react": "17.0.2",
|
|
70
70
|
"react-bootstrap-typeahead": "^5.1.4",
|
|
71
|
-
"react-content-loader": "^5.1.0",
|
|
72
71
|
"react-router-dom": "^5.1.2",
|
|
73
72
|
"react-toastify": "^5.4.1",
|
|
74
73
|
"use-deep-compare-effect": "^1.6.1"
|
|
@@ -76,11 +75,11 @@
|
|
|
76
75
|
"dependencies": {
|
|
77
76
|
"@cee-eng/hydrajs": "4.16.33",
|
|
78
77
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
79
|
-
"@patternfly/patternfly": "
|
|
80
|
-
"@patternfly/react-core": "
|
|
81
|
-
"@patternfly/react-table": "
|
|
78
|
+
"@patternfly/patternfly": "5.1.0",
|
|
79
|
+
"@patternfly/react-core": "5.1.1",
|
|
80
|
+
"@patternfly/react-table": "5.1.1",
|
|
82
81
|
"@rh-support/types": "2.0.2",
|
|
83
|
-
"@rh-support/user-permissions": "2.1.
|
|
82
|
+
"@rh-support/user-permissions": "2.1.18",
|
|
84
83
|
"@rh-support/utils": "2.1.11",
|
|
85
84
|
"dompurify": "^2.2.6",
|
|
86
85
|
"downshift": "^6.0.5",
|
|
@@ -90,7 +89,6 @@
|
|
|
90
89
|
"mark.js": "^8.11.1",
|
|
91
90
|
"react": "17.0.2",
|
|
92
91
|
"react-bootstrap-typeahead": "^5.1.4",
|
|
93
|
-
"react-content-loader": "^5.1.0",
|
|
94
92
|
"react-dom": "17.0.2",
|
|
95
93
|
"react-router-dom": "^5.1.2",
|
|
96
94
|
"react-toastify": "^5.4.1",
|
|
@@ -117,5 +115,5 @@
|
|
|
117
115
|
"defaults and supports es6-module",
|
|
118
116
|
"maintained node versions"
|
|
119
117
|
],
|
|
120
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "e67736e7b8a06c4617cc8e49a905ba7819e5ae63"
|
|
121
119
|
}
|