@rh-support/components 2.1.29 → 2.4.10-beta.6
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 +0 -2
- package/lib/cjs/CustomTextInput/CustomTextInput.d.ts +0 -2
- package/lib/cjs/CustomTextInput/CustomTextInput.d.ts.map +1 -1
- package/lib/cjs/CustomTextInput/CustomTextInput.js +2 -4
- 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 +5 -10
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.js +3 -2
- 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 +10 -11
- package/lib/cjs/MarkdownEditor/markdownEditor.css +1 -3
- 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 +7 -10
- package/lib/cjs/PhoneInput/PhoneInput.scss +1 -1
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.js +12 -12
- package/lib/cjs/Table/PFTable.d.ts +1 -2
- package/lib/cjs/Table/PFTable.d.ts.map +1 -1
- package/lib/cjs/Table/PFTable.js +7 -7
- package/lib/cjs/Table/TablePagination.d.ts.map +1 -1
- package/lib/cjs/Table/TablePagination.js +1 -3
- package/lib/cjs/Table/columnSelector.css +1 -1
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.js +5 -6
- 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.d.ts.map +1 -1
- package/lib/cjs/TopContentSearch/TopContentSearch.js +5 -6
- package/lib/cjs/helperFunctions/errorMessage.js +2 -2
- package/lib/cjs/helperFunctions/errorMessage.scss +1 -1
- package/lib/cjs/hooks/index.d.ts +0 -1
- package/lib/cjs/hooks/index.d.ts.map +1 -1
- package/lib/cjs/hooks/index.js +0 -1
- package/lib/cjs/hooks/useBreakpoint.d.ts.map +1 -1
- package/lib/cjs/hooks/useBreakpoint.js +0 -1
- package/lib/esm/CustomTextInput/CustomTextInput.d.ts +0 -2
- package/lib/esm/CustomTextInput/CustomTextInput.d.ts.map +1 -1
- package/lib/esm/CustomTextInput/CustomTextInput.js +2 -4
- 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 +5 -10
- package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
- package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.js +4 -3
- 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 +8 -9
- package/lib/esm/MarkdownEditor/markdownEditor.css +1 -3
- 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 +7 -10
- package/lib/esm/PhoneInput/PhoneInput.scss +1 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.js +13 -13
- package/lib/esm/Table/PFTable.d.ts +1 -2
- package/lib/esm/Table/PFTable.d.ts.map +1 -1
- package/lib/esm/Table/PFTable.js +6 -6
- package/lib/esm/Table/TablePagination.d.ts.map +1 -1
- package/lib/esm/Table/TablePagination.js +2 -4
- package/lib/esm/Table/columnSelector.css +1 -1
- package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
- package/lib/esm/TermsAndConditions/AcceptTermsModal.js +6 -7
- 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.d.ts.map +1 -1
- package/lib/esm/TopContentSearch/TopContentSearch.js +5 -6
- package/lib/esm/helperFunctions/errorMessage.js +2 -2
- package/lib/esm/helperFunctions/errorMessage.scss +1 -1
- package/lib/esm/hooks/index.d.ts +0 -1
- package/lib/esm/hooks/index.d.ts.map +1 -1
- package/lib/esm/hooks/index.js +0 -1
- package/lib/esm/hooks/useBreakpoint.d.ts.map +1 -1
- package/lib/esm/hooks/useBreakpoint.js +0 -1
- package/package.json +14 -12
- package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts +0 -13
- package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts.map +0 -1
- package/lib/cjs/hooks/useSelectKeyboardNavigator.js +0 -58
- package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts +0 -13
- package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts.map +0 -1
- package/lib/esm/hooks/useSelectKeyboardNavigator.js +0 -54
package/lib/cjs/Table/PFTable.js
CHANGED
|
@@ -37,7 +37,6 @@ exports.PFTable = exports.defaultTableSortMethod = void 0;
|
|
|
37
37
|
const react_core_1 = require("@patternfly/react-core");
|
|
38
38
|
const search_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/search-icon"));
|
|
39
39
|
const react_table_1 = require("@patternfly/react-table");
|
|
40
|
-
const deprecated_1 = require("@patternfly/react-table/deprecated");
|
|
41
40
|
const react_1 = __importStar(require("react"));
|
|
42
41
|
const TableProvider_1 = require("./TableProvider");
|
|
43
42
|
const noop = () => { };
|
|
@@ -48,8 +47,9 @@ const emptyStateRowDefault = [
|
|
|
48
47
|
{
|
|
49
48
|
props: { colSpan: 8 },
|
|
50
49
|
title: (react_1.default.createElement(react_core_1.Bullseye, null,
|
|
51
|
-
react_1.default.createElement(react_core_1.EmptyState, { variant: react_core_1.EmptyStateVariant.
|
|
52
|
-
react_1.default.createElement(react_core_1.
|
|
50
|
+
react_1.default.createElement(react_core_1.EmptyState, { variant: react_core_1.EmptyStateVariant.small },
|
|
51
|
+
react_1.default.createElement(react_core_1.EmptyStateIcon, { icon: search_icon_1.default }),
|
|
52
|
+
react_1.default.createElement(react_core_1.Title, { headingLevel: "h2", size: "lg" }, "No results found")))),
|
|
53
53
|
},
|
|
54
54
|
],
|
|
55
55
|
},
|
|
@@ -61,7 +61,7 @@ const loadingRowDefault = [
|
|
|
61
61
|
{
|
|
62
62
|
props: { colSpan: 9 },
|
|
63
63
|
title: (react_1.default.createElement(react_core_1.Bullseye, { style: { minHeight: '350px' } },
|
|
64
|
-
react_1.default.createElement(react_core_1.EmptyState, { variant: react_core_1.EmptyStateVariant.
|
|
64
|
+
react_1.default.createElement(react_core_1.EmptyState, { variant: react_core_1.EmptyStateVariant.small },
|
|
65
65
|
react_1.default.createElement(react_core_1.Spinner, { size: "xl" })))),
|
|
66
66
|
},
|
|
67
67
|
],
|
|
@@ -197,8 +197,8 @@ function PFTable(props) {
|
|
|
197
197
|
}
|
|
198
198
|
};
|
|
199
199
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
200
|
-
react_1.default.createElement(
|
|
201
|
-
react_1.default.createElement(
|
|
202
|
-
react_1.default.createElement(
|
|
200
|
+
react_1.default.createElement(react_table_1.Table, Object.assign({}, restProps, conditionalProps, { variant: react_table_1.TableVariant.compact, cells: pfColumns, sortBy: getSortBy(), onSort: onSort, rows: getTableRows(), className: props.className ? props.className : '', actionResolver: props.actionResolver, actions: props.actions || null, areActionsDisabled: props.areActionsDisabled || null }),
|
|
201
|
+
react_1.default.createElement(react_table_1.TableHeader, null),
|
|
202
|
+
react_1.default.createElement(react_table_1.TableBody, { onRowClick: onRowClick ? onRowClick : noop }))));
|
|
203
203
|
}
|
|
204
204
|
exports.PFTable = PFTable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../../src/Table/TablePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAKvE,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;KAAA,KAAK,IAAI,CAAC;IAChD,eAAe,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;KAAA,KAAK,IAAI,CAAC;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,iBAAiB,CAAC;CAC9B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../../src/Table/TablePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAKvE,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;KAAA,KAAK,IAAI,CAAC;IAChD,eAAe,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;KAAA,KAAK,IAAI,CAAC;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,iBAAiB,CAAC;CAC9B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,eA6B5C"}
|
|
@@ -39,8 +39,6 @@ function TablePagination(props) {
|
|
|
39
39
|
props.currentPage && props.currentPage !== currentPage && setSelectedPage(props.currentPage);
|
|
40
40
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41
41
|
}, [props.perPage, props.currentPage]);
|
|
42
|
-
return (react_1.default.createElement(react_core_1.Pagination, { itemCount: props.itemCount || (data || []).length, widgetId: "pagination-options-menu-top", perPage: perPage, page: currentPage, variant: props.variant,
|
|
43
|
-
paginationAriaLabel: props.variant === react_core_1.PaginationVariant.top ? 'Upper pagination' : 'Lower pagination',
|
|
44
|
-
}, onSetPage: onSetPage, onPerPageSelect: onPerPageSelect }));
|
|
42
|
+
return (react_1.default.createElement(react_core_1.Pagination, { itemCount: props.itemCount || (data || []).length, widgetId: "pagination-options-menu-top", perPage: perPage, page: currentPage, variant: props.variant, onSetPage: onSetPage, onPerPageSelect: onPerPageSelect }));
|
|
45
43
|
}
|
|
46
44
|
exports.TablePagination = TablePagination;
|
|
@@ -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":"AAmBA,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"}
|
|
@@ -31,7 +31,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
31
31
|
exports.AcceptTermsModal = void 0;
|
|
32
32
|
const hydrajs_1 = require("@cee-eng/hydrajs");
|
|
33
33
|
const react_core_1 = require("@patternfly/react-core");
|
|
34
|
-
const deprecated_1 = require("@patternfly/react-core/deprecated");
|
|
35
34
|
const react_1 = __importStar(require("react"));
|
|
36
35
|
const react_i18next_1 = require("react-i18next");
|
|
37
36
|
const hooks_1 = require("../hooks");
|
|
@@ -93,24 +92,24 @@ function AcceptTermsModal(props) {
|
|
|
93
92
|
props.onConfirm(selectedTranslation.termsPdfId);
|
|
94
93
|
};
|
|
95
94
|
const onDropdownToggle = (toggle) => setisLangSelectorDropdownOpen(toggle);
|
|
96
|
-
return (react_1.default.createElement(react_core_1.Modal, { variant: react_core_1.ModalVariant.medium, className: "pf-
|
|
95
|
+
return (react_1.default.createElement(react_core_1.Modal, { variant: react_core_1.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: [
|
|
97
96
|
react_1.default.createElement(react_core_1.Button, { key: "confirm", variant: react_core_1.ButtonVariant.primary, isDisabled: !termsAcked || props.isSubmitting || props.isDisabled, isLoading: props.isDisabled || props.isSubmitting, "data-tracking-id": `${props.dataTrackingId || props.eventCode}-terms-accept`, onClick: onSubmitClick },
|
|
98
97
|
react_1.default.createElement(react_i18next_1.Trans, null, "Submit")),
|
|
99
98
|
react_1.default.createElement(react_core_1.Button, { key: "cancel", isDisabled: props.isSubmitting || props.isDisabled, "data-tracking-id": `${props.dataTrackingId || props.eventCode}-terms-cancel`, variant: react_core_1.ButtonVariant.link, onClick: props.onModalClose },
|
|
100
99
|
react_1.default.createElement(react_i18next_1.Trans, null, "Cancel")),
|
|
101
100
|
] }, isFetching || !selectedTranslation ? (react_1.default.createElement("div", { style: { height: '100px' } },
|
|
102
101
|
react_1.default.createElement(LoadingIndicator_1.LoadingIndicator, null))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
103
|
-
react_1.default.createElement("p", { className: "pf-
|
|
102
|
+
react_1.default.createElement("p", { className: "pf-u-mb-md" }, selectedTranslation.translatedDescription),
|
|
104
103
|
react_1.default.createElement("strong", null,
|
|
105
104
|
react_1.default.createElement(react_i18next_1.Trans, null, "Download the agreement")),
|
|
106
|
-
react_1.default.createElement("p", { className: "pf-
|
|
105
|
+
react_1.default.createElement("p", { className: "pf-u-mb-md pf-u-mt-sm" }, selectedTranslation.translatedInstructions),
|
|
107
106
|
react_1.default.createElement(react_core_1.Flex, null,
|
|
108
107
|
react_1.default.createElement(react_core_1.FlexItem, null,
|
|
109
|
-
react_1.default.createElement(
|
|
108
|
+
react_1.default.createElement(react_core_1.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_1.default.createElement(react_core_1.SelectOption, { key: index, value: option }, getLocaleNameFromLocalCode(option)))))),
|
|
110
109
|
react_1.default.createElement(react_core_1.FlexItem, null,
|
|
111
110
|
react_1.default.createElement("a", { href: selectedTranslation.pdfDownloadUrl, "data-tracking-id": `${props.eventCode}-terms-download`, target: "_blank", rel: "noopener noreferrer" },
|
|
112
111
|
react_1.default.createElement(react_i18next_1.Trans, null, "Download")))),
|
|
113
|
-
react_1.default.createElement(react_core_1.Checkbox, { label: t('I have read and agree to the terms'), isChecked: termsAcked, onChange: (
|
|
112
|
+
react_1.default.createElement(react_core_1.Checkbox, { label: t('I have read and agree to the terms'), isChecked: termsAcked, onChange: (checked) => {
|
|
114
113
|
setTermsAcked(checked);
|
|
115
114
|
}, "aria-label": t('I have read and agree to the terms'), id: "agree-terms", name: "agree-terms" })))));
|
|
116
115
|
}
|
|
@@ -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,gBAoD9C,CAAC"}
|
|
@@ -51,6 +51,6 @@ const TextAreaResizable = (props) => {
|
|
|
51
51
|
else
|
|
52
52
|
return 'default';
|
|
53
53
|
};
|
|
54
|
-
return (react_1.default.createElement(react_core_1.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:
|
|
54
|
+
return (react_1.default.createElement(react_core_1.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 }));
|
|
55
55
|
};
|
|
56
56
|
exports.TextAreaResizable = TextAreaResizable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentSearch.d.ts","sourceRoot":"","sources":["../../../src/TopContentSearch/TopContentSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAQ5F,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,UAAU,MAAM;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,2BAA2B,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzD,cAAc,EAAE,eAAe,EAAE,CAAC;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;CAC3E;AAED,eAAO,MAAM,gBAAgB,eAAgB,MAAM,WASlD,CAAC;AAOF,wBAAgB,gBAAgB,CAAC,EAC7B,cAAmB,EACnB,2BAA6C,EAC7C,QAAQ,EACR,cAAc,EACd,mBAA2B,GAC9B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TopContentSearch.d.ts","sourceRoot":"","sources":["../../../src/TopContentSearch/TopContentSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAQ5F,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,UAAU,MAAM;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,2BAA2B,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzD,cAAc,EAAE,eAAe,EAAE,CAAC;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;CAC3E;AAED,eAAO,MAAM,gBAAgB,eAAgB,MAAM,WASlD,CAAC;AAOF,wBAAgB,gBAAgB,CAAC,EAC7B,cAAmB,EACnB,2BAA6C,EAC7C,QAAQ,EACR,cAAc,EACd,mBAA2B,GAC9B,EAAE,MAAM,eA2GR"}
|
|
@@ -82,9 +82,8 @@ function TopContentSearch({ topContentData = [], topContentResultsWrapperRef = {
|
|
|
82
82
|
utils_1.dtmTrackEvent(searchWrapperRef, eventName, event);
|
|
83
83
|
};
|
|
84
84
|
const highlightSearchResults = react_1.useCallback((searchTerm) => {
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
const markInstance = new mark_js_1.default(contentElements);
|
|
85
|
+
const d = topContentResultsWrapperRef.current;
|
|
86
|
+
const markInstance = new mark_js_1.default(d);
|
|
88
87
|
markInstance.unmark({
|
|
89
88
|
done: () => {
|
|
90
89
|
if (isEmpty_1.default(searchTerm))
|
|
@@ -131,9 +130,9 @@ function TopContentSearch({ topContentData = [], topContentResultsWrapperRef = {
|
|
|
131
130
|
setSearchText(value);
|
|
132
131
|
debounceSearch(value);
|
|
133
132
|
};
|
|
134
|
-
return (react_1.default.createElement("div", { className: "top-content-search-wrapper pf-
|
|
135
|
-
react_1.default.createElement("label", { htmlFor: "top-content-search-input", className: "pf-
|
|
133
|
+
return (react_1.default.createElement("div", { className: "top-content-search-wrapper pf-u-p-md", ref: searchWrapperRef },
|
|
134
|
+
react_1.default.createElement("label", { htmlFor: "top-content-search-input", className: "pf-u-mr-md top-content-search-label" },
|
|
136
135
|
react_1.default.createElement(react_i18next_1.Trans, null, "Filter results:")),
|
|
137
|
-
react_1.default.createElement(react_core_1.SearchInput, { id: "top-content-search-input", className: "top-content-search-input pf-
|
|
136
|
+
react_1.default.createElement(react_core_1.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 })));
|
|
138
137
|
}
|
|
139
138
|
exports.TopContentSearch = TopContentSearch;
|
|
@@ -12,12 +12,12 @@ const react_1 = __importDefault(require("react"));
|
|
|
12
12
|
const SupportFeedbackForm_1 = require("../SupportFeedbackForm");
|
|
13
13
|
const defaultTitle = "Sorry, we're experiencing an error";
|
|
14
14
|
const errorMessageButtonLabel = 'contact us';
|
|
15
|
-
const defaultErrorMessage = (react_1.default.createElement("p", { className: "pf-
|
|
15
|
+
const defaultErrorMessage = (react_1.default.createElement("p", { className: "pf-u-mb-0" },
|
|
16
16
|
"Try refreshing the page. Please ",
|
|
17
17
|
react_1.default.createElement(SupportFeedbackForm_1.SupportFeedbackForm, { isInline: true, buttonLabel: errorMessageButtonLabel }),
|
|
18
18
|
" if the problem persists.",
|
|
19
19
|
react_1.default.createElement("br", null),
|
|
20
|
-
react_1.default.createElement(react_core_1.Button, { variant: "link", component: "a", href: "https://status.redhat.com/", "data-tracking-id": "redirect-status-portal-button", target: "_blank", icon: react_1.default.createElement(external_link_alt_icon_1.default, { className: "status-portal-button-icon" }), iconPosition: "right", className: "pf-
|
|
20
|
+
react_1.default.createElement(react_core_1.Button, { variant: "link", component: "a", href: "https://status.redhat.com/", "data-tracking-id": "redirect-status-portal-button", target: "_blank", icon: react_1.default.createElement(external_link_alt_icon_1.default, { className: "status-portal-button-icon" }), iconPosition: "right", className: "pf-u-pl-0", isInline: true, "aria-label": "View status page" }, "View status page"),
|
|
21
21
|
' '));
|
|
22
22
|
const defaultErrorObj = {
|
|
23
23
|
500: {
|
package/lib/cjs/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"}
|
package/lib/cjs/hooks/index.js
CHANGED
|
@@ -23,4 +23,3 @@ __exportStar(require("./useForceUpdate"), exports);
|
|
|
23
23
|
__exportStar(require("./useLRUCache"), exports);
|
|
24
24
|
__exportStar(require("./useBreakpoint"), exports);
|
|
25
25
|
__exportStar(require("./useOnScreen"), exports);
|
|
26
|
-
__exportStar(require("./useSelectKeyboardNavigator"), exports);
|
|
@@ -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;AAYF,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"}
|
|
@@ -30,7 +30,6 @@ const defaultQueries = {
|
|
|
30
30
|
md: `(min-width: 768px)`,
|
|
31
31
|
lg: `(min-width: 992px)`,
|
|
32
32
|
xl: `(min-width: 1300px)`,
|
|
33
|
-
xxl: `(min-width: 1800px)`,
|
|
34
33
|
};
|
|
35
34
|
function BreakpointProvider({ children, queries = defaultQueries }) {
|
|
36
35
|
const [queryMatch, setQueryMatch] = react_1.useState({});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TextInputProps } from '@patternfly/react-core';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
interface IProps extends TextInputProps {
|
|
4
3
|
className?: string;
|
|
5
4
|
maxLength?: number;
|
|
@@ -7,7 +6,6 @@ interface IProps extends TextInputProps {
|
|
|
7
6
|
isSpaceAllowed?: boolean;
|
|
8
7
|
name?: string;
|
|
9
8
|
isDisabled?: boolean;
|
|
10
|
-
onChange?: ((event: React.FormEvent<HTMLInputElement>, value: string) => void) | undefined;
|
|
11
9
|
}
|
|
12
10
|
export declare const CustomTextInput: (props: IProps) => JSX.Element;
|
|
13
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomTextInput.d.ts","sourceRoot":"","sources":["../../../src/CustomTextInput/CustomTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAoB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomTextInput.d.ts","sourceRoot":"","sources":["../../../src/CustomTextInput/CustomTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAoB,MAAM,wBAAwB,CAAC;AAIrF,UAAU,MAAO,SAAQ,cAAc;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,UAAW,MAAM,gBAqD5C,CAAC"}
|
|
@@ -17,7 +17,7 @@ export const CustomTextInput = (props) => {
|
|
|
17
17
|
const { onChange, isSpaceAllowed = false, isRequired, className, type, maxLength, value, isDisabled, placeholder, validated, name } = props, rest = __rest(props, ["onChange", "isSpaceAllowed", "isRequired", "className", "type", "maxLength", "value", "isDisabled", "placeholder", "validated", "name"]);
|
|
18
18
|
// To handle on input change
|
|
19
19
|
const onTextInputChange = (value, event) => {
|
|
20
|
-
onChange
|
|
20
|
+
onChange(value, event);
|
|
21
21
|
event.preventDefault();
|
|
22
22
|
return [];
|
|
23
23
|
};
|
|
@@ -36,8 +36,6 @@ export const CustomTextInput = (props) => {
|
|
|
36
36
|
else
|
|
37
37
|
return validated;
|
|
38
38
|
}
|
|
39
|
-
if (isRequired && isEmpty(value))
|
|
40
|
-
return 'error';
|
|
41
39
|
};
|
|
42
|
-
return (React.createElement(TextInput, Object.assign({}, rest, { isRequired: isRequired, className: className, type: type, maxLength: maxLength, value: value, isDisabled: isDisabled, "aria-label": props['aria-label'], placeholder: placeholder, onChange:
|
|
40
|
+
return (React.createElement(TextInput, Object.assign({}, rest, { isRequired: isRequired, className: className, type: type, maxLength: maxLength, value: value, isDisabled: isDisabled, "aria-label": props['aria-label'], placeholder: placeholder, onChange: onTextInputChange, validated: validatedCheck(), name: name })));
|
|
43
41
|
};
|
|
@@ -48,7 +48,7 @@ function Dropdown(props) {
|
|
|
48
48
|
};
|
|
49
49
|
const isSelectedItem = props.isSelectedItem || isSelectedItemLocal;
|
|
50
50
|
const getListItemClassNames = (downshift, item, itemIndex) => {
|
|
51
|
-
let toReturn = 'downshift-item pf-
|
|
51
|
+
let toReturn = 'downshift-item pf-c-select__menu-item';
|
|
52
52
|
toReturn += item.additionalInfo ? ' pf-m-description' : '';
|
|
53
53
|
toReturn += isSelectedItem(item) ? ' pf-m-selected' : '';
|
|
54
54
|
toReturn += item.disabled ? ' pf-m-disabled' : '';
|
|
@@ -70,7 +70,7 @@ function Dropdown(props) {
|
|
|
70
70
|
optionsToRender = props.paginate ? optionsToRender.slice(0, resultsShown) : optionsToRender;
|
|
71
71
|
optionsToRender.filter((item) => !item.isNotSearchable).length === 0 &&
|
|
72
72
|
props.emptyListLabel &&
|
|
73
|
-
listToRender.push(React.createElement("li", { key: "empty-label", className: "pf-
|
|
73
|
+
listToRender.push(React.createElement("li", { key: "empty-label", className: "pf-u-p-sm" },
|
|
74
74
|
React.createElement(Trans, null, props.emptyListLabel)));
|
|
75
75
|
listToRender.push(...map(optionsToRender, (item, index) => {
|
|
76
76
|
const itemProps = item.isNonActionable
|
|
@@ -81,26 +81,26 @@ function Dropdown(props) {
|
|
|
81
81
|
disabled: item.disabled,
|
|
82
82
|
className: getListItemClassNames(downshift, item, index),
|
|
83
83
|
});
|
|
84
|
-
return (React.createElement("li", { className: item.actionItem ? 'pf-
|
|
84
|
+
return (React.createElement("li", { className: item.actionItem ? 'pf-c-select__menu-wrapper' : '', role: "presentation", key: `${index}-${props.id}-${itemToString(item)}` },
|
|
85
85
|
item.isNonActionable ? (isEmpty(item.children) ? itemToString(item) : item.children) : null,
|
|
86
86
|
props.multiSelect && !item.isNotSelectable && !item.isNonActionable && (React.createElement("div", Object.assign({}, itemProps),
|
|
87
|
-
React.createElement("div", { className: item.additionalInfo ? 'pf-
|
|
88
|
-
React.createElement("input", { disabled: item.disabled === true, className: "pf-
|
|
87
|
+
React.createElement("div", { className: item.additionalInfo ? 'pf-c-select__menu-item-main' : '' },
|
|
88
|
+
React.createElement("input", { disabled: item.disabled === true, className: "pf-c-check__input pf-u-mr-sm", checked: isSelectedItem(item), onChange: noop, type: "checkbox" }),
|
|
89
89
|
isEmpty(item.children) ? itemToString(item) : item.children),
|
|
90
|
-
item.additionalInfo && (React.createElement("div", { className: "pf-
|
|
90
|
+
item.additionalInfo && (React.createElement("div", { className: "pf-c-select__menu-item-description" }, item.additionalInfo)))),
|
|
91
91
|
!props.multiSelect && !item.isNonActionable && (React.createElement("button", Object.assign({}, itemProps, { type: "button", title: itemToString(item) }),
|
|
92
|
-
React.createElement("div", { className: item.additionalInfo ? 'pf-
|
|
92
|
+
React.createElement("div", { className: item.additionalInfo ? 'pf-c-select__menu-item-main' : '' },
|
|
93
93
|
isEmpty(item.children) ? itemToString(item) : item.children,
|
|
94
|
-
isSelectedItem(item) && (React.createElement("span", { className: "pf-
|
|
94
|
+
isSelectedItem(item) && (React.createElement("span", { className: "pf-c-select__menu-item-icon" },
|
|
95
95
|
React.createElement(CheckIcon, { "aria-hidden": true })))),
|
|
96
|
-
item.additionalInfo && (React.createElement("div", { className: "pf-
|
|
96
|
+
item.additionalInfo && (React.createElement("div", { className: "pf-c-select__menu-item-description" }, item.additionalInfo)))),
|
|
97
97
|
item.actionItem ? React.cloneElement(item.actionItem, { disabled: item.disabled }) : null));
|
|
98
98
|
}));
|
|
99
99
|
shouldPaginate &&
|
|
100
100
|
listToRender.push(...[
|
|
101
101
|
React.createElement("li", { key: "separator", className: "dropdown-divider", role: "separator" }),
|
|
102
102
|
React.createElement("li", { key: "pagination-item", className: "downshift-pagination-item" },
|
|
103
|
-
React.createElement("button", { type: "button", onClick: (e) => onPaginatonButtonClick(e, downshift), className: "pf-
|
|
103
|
+
React.createElement("button", { type: "button", onClick: (e) => onPaginatonButtonClick(e, downshift), className: "pf-c-button pf-m-link pf-m-block", disabled: props.isLoadingList },
|
|
104
104
|
React.createElement(Trans, null, props.paginationBtnText))),
|
|
105
105
|
]);
|
|
106
106
|
return listToRender;
|
|
@@ -9,11 +9,11 @@ export default function DropdownWrapper(props) {
|
|
|
9
9
|
event.nativeEvent.preventDownshiftDefault = true;
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
-
return (React.createElement("div", { id: `${props.id}`, className: `downshift ${props.className} pf-
|
|
12
|
+
return (React.createElement("div", { id: `${props.id}`, className: `downshift ${props.className} pf-c-select ${props.isOpen ? 'pf-m-expanded' : ''} `, "data-tracking-id": props['data-tracking-id'] ? props['data-tracking-id'] : null },
|
|
13
13
|
props.label && React.createElement("label", Object.assign({}, props.getLabelProps()), props.label),
|
|
14
14
|
props.toggleMenuComponent,
|
|
15
15
|
React.createElement("ul", Object.assign({}, props.getMenuProps({
|
|
16
16
|
onBlur: onBlur,
|
|
17
|
-
className: `downshift-menu pf-
|
|
17
|
+
className: `downshift-menu pf-c-select__menu ${props.hasTwoColumns ? 'column-selector-menu' : ''} ${props.isOpen ? 'open' : ''}`,
|
|
18
18
|
})), props.children)));
|
|
19
19
|
}
|
|
@@ -68,12 +68,12 @@ export default function SearchableList(props) {
|
|
|
68
68
|
props.onInputBlur && props.onInputBlur(e);
|
|
69
69
|
};
|
|
70
70
|
const renderSearchableToggleButton = () => {
|
|
71
|
-
return (React.createElement("div", Object.assign({}, downshift.getComboboxProps({ className: 'pf-
|
|
72
|
-
React.createElement("div", { className: "pf-
|
|
71
|
+
return (React.createElement("div", Object.assign({}, downshift.getComboboxProps({ className: 'pf-c-select__toggle pf-m-typeahead' })),
|
|
72
|
+
React.createElement("div", { className: "pf-c-select__toggle-wrapper" },
|
|
73
73
|
props.chipGroupComponent,
|
|
74
74
|
React.createElement("input", Object.assign({}, getInputProps({
|
|
75
75
|
placeholder: props.placeholder,
|
|
76
|
-
className: `pf-
|
|
76
|
+
className: `pf-c-form-control pf-c-select__toggle-typeahead`,
|
|
77
77
|
id: `${props.id}-downshift-search`,
|
|
78
78
|
'aria-invalid': props.isInValid,
|
|
79
79
|
'aria-required': props.required,
|
|
@@ -85,11 +85,11 @@ export default function SearchableList(props) {
|
|
|
85
85
|
React.createElement(LoadingIndicator, { isInline: true, show: props.isLoadingList }),
|
|
86
86
|
!isEmpty(downshift.inputValue) &&
|
|
87
87
|
!props.isLoadingList &&
|
|
88
|
-
(!props.isExportingPDF ? (React.createElement("button", { className: "pf-
|
|
88
|
+
(!props.isExportingPDF ? (React.createElement("button", { className: "pf-c-button pf-m-plain pf-c-select__toggle-clear", onClick: clearSelection(), "aria-label": "clear selection", type: "button", title: "Clear selection", disabled: props.disabled, "data-tracking-id": `${props['data-tracking-id']}-clear` },
|
|
89
89
|
React.createElement(TimesCircleIcon, null))) : null),
|
|
90
90
|
!props.hideToggleButton && (React.createElement("button", Object.assign({ type: "button" }, getToggleButtonProps({
|
|
91
91
|
disabled: props.disabled || props.isLoadingList,
|
|
92
|
-
className: 'pf-
|
|
92
|
+
className: 'pf-c-button pf-c-select__toggle-button pf-m-plain',
|
|
93
93
|
onClick: props.onMenuToggle ? () => props.onMenuToggle() : noop,
|
|
94
94
|
})),
|
|
95
95
|
React.createElement(CaretDownIcon, null)))));
|
|
@@ -16,7 +16,7 @@ export default function SelectList(props) {
|
|
|
16
16
|
var _a;
|
|
17
17
|
return (React.createElement("button", Object.assign({ type: "button" }, getToggleButtonProps({
|
|
18
18
|
id: `${props.id}-toggle`,
|
|
19
|
-
className: `pf-
|
|
19
|
+
className: `pf-c-select__toggle ${props.isInValid ? 'form-invalid' : ''}`,
|
|
20
20
|
disabled: props.disabled || props.isLoadingList,
|
|
21
21
|
'aria-label': `${isOpen ? 'Close ' + props.title : 'Open ' + props.title}`,
|
|
22
22
|
'aria-invalid': props.isInValid,
|
|
@@ -25,10 +25,10 @@ export default function SelectList(props) {
|
|
|
25
25
|
'data-tracking-id': (_a = props['data-tracking-id']) !== null && _a !== void 0 ? _a : '',
|
|
26
26
|
onClick: props.onMenuToggle ? () => props.onMenuToggle() : noop,
|
|
27
27
|
})),
|
|
28
|
-
React.createElement("div", { className: "pf-
|
|
29
|
-
React.createElement("span", { className: "pf-
|
|
28
|
+
React.createElement("div", { className: "pf-c-select__toggle-wrapper" },
|
|
29
|
+
React.createElement("span", { className: "pf-c-select__toggle-text" }, itemToString(props.selectedItem) || (React.createElement("span", { className: "pf-c-select__placeholder-text" }, props.placeholder)))),
|
|
30
30
|
React.createElement(LoadingIndicator, { isInline: true, show: props.isLoadingList }),
|
|
31
|
-
!props.isLoadingList && (React.createElement("span", { className: "pf-
|
|
31
|
+
!props.isLoadingList && (React.createElement("span", { className: "pf-c-select__toggle-arrow" },
|
|
32
32
|
React.createElement(CaretDownIcon, null)))));
|
|
33
33
|
};
|
|
34
34
|
return (React.createElement(DropdownWrapper, { id: props.id, className: props.className, label: props.label, isOpen: isOpen, getMenuProps: getMenuProps, getLabelProps: getLabelProps, toggleMenuComponent: renderToggleButton(), "data-tracking-id": props['data-tracking-id'], hasTwoColumns: props.hasTwoColumns }, isOpen && props.renderListItems(downshift)));
|
|
@@ -2,16 +2,11 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.downshift
|
|
6
|
-
border: none;
|
|
7
|
-
padding: 6px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.downshift > .pf-v5-c-select__toggle.form-invalid {
|
|
5
|
+
.downshift > .pf-c-select__toggle.form-invalid {
|
|
11
6
|
border-bottom: 2px solid #c9190b;
|
|
12
7
|
}
|
|
13
8
|
|
|
14
|
-
.downshift > .pf-
|
|
9
|
+
.downshift > .pf-c-select__toggle.form-invalid[disabled] {
|
|
15
10
|
background-color: #ededed;
|
|
16
11
|
border-color: #ededed;
|
|
17
12
|
}
|
|
@@ -33,15 +28,15 @@
|
|
|
33
28
|
border-top: 1px solid #e9ecef;
|
|
34
29
|
}
|
|
35
30
|
|
|
36
|
-
.downshift .pf-
|
|
31
|
+
.downshift .pf-c-select__placeholder-text {
|
|
37
32
|
color: #6a6e73;
|
|
38
33
|
}
|
|
39
34
|
|
|
40
|
-
.downshift .pf-
|
|
35
|
+
.downshift .pf-c-select__menu-wrapper {
|
|
41
36
|
display: flex;
|
|
42
37
|
}
|
|
43
38
|
|
|
44
|
-
.downshift .pf-
|
|
39
|
+
.downshift .pf-c-select__menu-wrapper:hover {
|
|
45
40
|
background-color: rgb(240, 240, 240);
|
|
46
41
|
}
|
|
47
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundaryFallbackComponent.d.ts","sourceRoot":"","sources":["../../../src/ErrorBoundary/ErrorBoundaryFallbackComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorBoundaryFallbackComponent.d.ts","sourceRoot":"","sources":["../../../src/ErrorBoundary/ErrorBoundaryFallbackComponent.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,aAAa;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,MAAO,SAAQ,aAAa;IAClC,gBAAgB,EAAE,OAAO,CAAC;CAC7B;AASD,iBAAS,8BAA8B,CAAC,KAAK,EAAE,MAAM,eA4BpD;kBA5BQ,8BAA8B;;;AA+BvC,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bullseye, EmptyState, EmptyStateBody,
|
|
1
|
+
import { Bullseye, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateVariant, Title } from '@patternfly/react-core';
|
|
2
2
|
import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
3
3
|
import dangerColor from '@patternfly/react-tokens/dist/js/global_danger_color_200';
|
|
4
4
|
import infoColor from '@patternfly/react-tokens/dist/js/global_info_color_200';
|
|
@@ -25,8 +25,9 @@ function ErrorBoundaryFallbackComponent(props) {
|
|
|
25
25
|
};
|
|
26
26
|
return (React.createElement("div", { className: props.isPageLevelError ? 'container' : '' },
|
|
27
27
|
React.createElement(Bullseye, null,
|
|
28
|
-
React.createElement(EmptyState, { variant: EmptyStateVariant.
|
|
29
|
-
React.createElement(
|
|
28
|
+
React.createElement(EmptyState, { variant: EmptyStateVariant.small },
|
|
29
|
+
React.createElement(EmptyStateIcon, { icon: ExclamationCircleIcon, color: props.isPageLevelError ? getIconColor() : warningColor.value }),
|
|
30
|
+
React.createElement(Title, { headingLevel: "h2", size: "lg" }, t(props.title)),
|
|
30
31
|
React.createElement(EmptyStateBody, null, t(props.message))))));
|
|
31
32
|
}
|
|
32
33
|
ErrorBoundaryFallbackComponent.defaultProps = defaultProps;
|
|
@@ -116,7 +116,7 @@ function NewInlineEdit(props) {
|
|
|
116
116
|
!props.content && !isEditing ? renderEditButton() : null))),
|
|
117
117
|
renderSaveCancel(),
|
|
118
118
|
props.hideSaveCancel && isEditing && (React.createElement("span", { className: `
|
|
119
|
-
${props.charCount > props.charTotal ? 'char-count pf-
|
|
119
|
+
${props.charCount > props.charTotal ? 'char-count pf-u-danger-color-100' : 'char-count'}` }, props.charCount ? showCount : null)),
|
|
120
120
|
canShowContent && !props.usePreformattedTag && (React.createElement(React.Fragment, null,
|
|
121
121
|
React.createElement("p", { id: props.inputId, style: { display: props.hideLabel ? 'inline' : 'block' } },
|
|
122
122
|
props.content,
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
.char-count {
|
|
33
33
|
float: right;
|
|
34
34
|
position: relative;
|
|
35
|
-
padding-right: var(--pf-
|
|
36
|
-
margin-right: var(--pf-
|
|
35
|
+
padding-right: var(--pf-global--spacer--4xl);
|
|
36
|
+
margin-right: var(--pf-global--spacer--lg);
|
|
37
37
|
font-size: 12px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
@media (max-width: 415px) {
|
|
41
41
|
.char-count {
|
|
42
|
-
padding-right: var(--pf-
|
|
42
|
+
padding-right: var(--pf-global--spacer--2xl);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -13,7 +13,7 @@ function LoadingDots(props) {
|
|
|
13
13
|
React.createElement("span", null, ".")),
|
|
14
14
|
React.createElement("p", { className: "sr-only" },
|
|
15
15
|
React.createElement(Trans, null, "Loading...")))),
|
|
16
|
-
props.message && props.show && React.createElement("p", { className: "pf-
|
|
16
|
+
props.message && props.show && React.createElement("p", { className: "pf-u-text-align-center pf-u-my-md" }, props.message)));
|
|
17
17
|
}
|
|
18
18
|
LoadingDots.defaultProps = defaultProps;
|
|
19
19
|
export { LoadingDots };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../../src/MarkdownEditor/MarkdownEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAwB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../../src/MarkdownEditor/MarkdownEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAwB,MAAM,qBAAqB,CAAC;AA2B7E,OAAO,KAAK,EAAE,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAKtE,oBAAY,UAAU;IAClB,KAAK,cAAc;IACnB,QAAQ,aAAa;CACxB;AAED,UAAU,kBAAkB;IACxB,yBAAyB,EAAE,OAAO,CAAC;IACnC,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;IAClC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnD,gBAAgB,EAAE,CAAC,IAAI,KAAA,KAAK,IAAI,CAAC;IACjC,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IAChD,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,KAAK,CAAC;IACtG,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAClD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yBAAyB,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,iBAAiB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACnD;AAuBD,iBAAS,cAAc,CAAC,KAAK,EAAE,cAAc,eAsmB5C;kBAtmBQ,cAAc;;;AA0mBvB,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -11,8 +11,7 @@ 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, Flex, FlexItem, Spinner, Text, TextVariants, Toolbar, ToolbarGroup, ToolbarItem, } from '@patternfly/react-core';
|
|
15
|
-
import { Dropdown, DropdownItem, DropdownSeparator, DropdownToggle } from '@patternfly/react-core/deprecated';
|
|
14
|
+
import { Button, ButtonVariant, Dropdown, DropdownItem, DropdownSeparator, DropdownToggle, Flex, FlexItem, Spinner, Text, TextVariants, Toolbar, ToolbarGroup, ToolbarItem, } from '@patternfly/react-core';
|
|
16
15
|
import CodeIcon from '@patternfly/react-icons/dist/js/icons/code-icon';
|
|
17
16
|
import ImageIcon from '@patternfly/react-icons/dist/js/icons/image-icon';
|
|
18
17
|
import LinkIcon from '@patternfly/react-icons/dist/js/icons/link-icon';
|
|
@@ -123,7 +122,7 @@ function MarkdownEditor(props) {
|
|
|
123
122
|
React.createElement(Flex, { flexWrap: { default: 'nowrap' } },
|
|
124
123
|
React.createElement(FlexItem, null,
|
|
125
124
|
React.createElement(Text, { component: TextVariants.small }, file.fileName)),
|
|
126
|
-
onFileDelete && (React.createElement(FlexItem, { className: "pf-
|
|
125
|
+
onFileDelete && (React.createElement(FlexItem, { className: "pf-u-ml-auto" },
|
|
127
126
|
React.createElement(Button, { variant: ButtonVariant.plain, onClick: (event) => {
|
|
128
127
|
onFileSelectToggle(false);
|
|
129
128
|
onFileDelete(file);
|
|
@@ -361,7 +360,7 @@ function MarkdownEditor(props) {
|
|
|
361
360
|
props.disabled && isPreview && setIsPreview(false);
|
|
362
361
|
const disablePreviewButton = mdValue === '';
|
|
363
362
|
return (React.createElement("div", { className: `markdown-editor-container ${props.className}`, id: props.id, "data-tracking-id": "md-editor-container", onDrop: onDrop, onPaste: onPaste },
|
|
364
|
-
React.createElement("div", { className: "toolbar-container border-bottom" }, !isPlainModeEnabled && (React.createElement(Toolbar, { className: "pf-
|
|
363
|
+
React.createElement("div", { className: "toolbar-container border-bottom" }, !isPlainModeEnabled && (React.createElement(Toolbar, { className: "pf-l-flex" },
|
|
365
364
|
React.createElement(ToolbarGroup, { "data-tracking-id": "md-editor-toolbar", className: "markdown-toolbar-left-section pf-m-wrap" },
|
|
366
365
|
React.createElement(Button, { variant: ButtonVariant.plain, tabIndex: -1, isDisabled: props.disabled || isPreview, onClick: bold, "data-tracking-id": "md-editor-toolbar-b", title: "Bold" }, "B"),
|
|
367
366
|
React.createElement(Button, { variant: ButtonVariant.plain, tabIndex: -1, isDisabled: props.disabled || isPreview, onClick: italic, "data-tracking-id": "md-editor-toolbar-i", title: "Italic" }, "I"),
|
|
@@ -380,17 +379,17 @@ function MarkdownEditor(props) {
|
|
|
380
379
|
React.createElement(QuoteRightIcon, null)),
|
|
381
380
|
React.createElement(Button, { tabIndex: -1, variant: ButtonVariant.plain, isDisabled: props.disabled || isPreview, onClick: code, title: "Code", "data-tracking-id": "md-editor-toolbar-code" },
|
|
382
381
|
React.createElement(CodeIcon, null)),
|
|
383
|
-
showFileSelectorInToolbar && (React.createElement(Dropdown, { onSelect: onFileSelectLocal, id: "md-editor-toolbar-file-selector", toggle: React.createElement(DropdownToggle, { onToggle:
|
|
382
|
+
showFileSelectorInToolbar && (React.createElement(Dropdown, { onSelect: onFileSelectLocal, id: "md-editor-toolbar-file-selector", toggle: React.createElement(DropdownToggle, { onToggle: onFileSelectToggle, isDisabled: props.disabled || isPreview },
|
|
384
383
|
React.createElement(ImageIcon, null)), dropdownItems: getFileSelectorList(), tabIndex: -1, isPlain: true, menuAppendTo: document.body, isOpen: isFileSelectorOpen, "data-tracking-id": "md-editor-toolbar-file-selector" }))),
|
|
385
384
|
React.createElement(ToolbarItem, null,
|
|
386
|
-
React.createElement("a", { className: "pf-
|
|
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" },
|
|
387
386
|
React.createElement(Trans, null, "Markdown guidance")))))),
|
|
388
387
|
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' } },
|
|
389
388
|
React.createElement("div", { className: "markdown-preview", style: { maxHeight: '313px' } },
|
|
390
389
|
React.createElement("div", { dangerouslySetInnerHTML: {
|
|
391
390
|
__html: DOMPurify.sanitize(previewMDText(mdValue)),
|
|
392
391
|
} }))))),
|
|
393
|
-
React.createElement("div", null, props.showMarkdownPlainTextToggle && (React.createElement("div", { className: `markdown-toggle-toolbar pf-
|
|
392
|
+
React.createElement("div", null, props.showMarkdownPlainTextToggle && (React.createElement("div", { className: `markdown-toggle-toolbar pf-l-flex` },
|
|
394
393
|
React.createElement("span", { className: "markdown-toolbar-left-section" },
|
|
395
394
|
!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,
|
|
396
395
|
" ",
|
|
@@ -399,9 +398,9 @@ function MarkdownEditor(props) {
|
|
|
399
398
|
t(showPreviewText))))),
|
|
400
399
|
isUploadingFile && (React.createElement(React.Fragment, null,
|
|
401
400
|
React.createElement(Trans, null,
|
|
402
|
-
React.createElement("small", { className: "pf-
|
|
401
|
+
React.createElement("small", { className: "pf-u-pl-md" },
|
|
403
402
|
React.createElement(Trans, null, "Uploading File"))),
|
|
404
|
-
React.createElement(Spinner, { className: "pf-
|
|
403
|
+
React.createElement(Spinner, { className: "pf-u-ml-sm", size: "md" }))),
|
|
405
404
|
mdValue.length > props.minCharsForCounter && getCharCountText(mdValue)),
|
|
406
405
|
React.createElement("span", null,
|
|
407
406
|
React.createElement(Button, { variant: "plain", className: isPlainModeEnabled ? 'markdown-active-mode' : '', onClick: () => onModeChange(true), isDisabled: isPlainModeEnabled || isUploadingFile, "data-tracking-id": "md-editor-plaintext" },
|