@rh-support/manage 2.5.31 → 2.5.33

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.
Files changed (82) hide show
  1. package/lib/esm/components/Configs/ConfigsTable.js +1 -1
  2. package/lib/esm/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.d.ts.map +1 -1
  3. package/lib/esm/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.js +1 -1
  4. package/lib/esm/components/Groups/GroupSelect/GroupSelect.d.ts.map +1 -1
  5. package/lib/esm/components/Groups/GroupSelect/GroupSelect.js +54 -22
  6. package/lib/esm/components/Groups/GroupUserPermissionsSelect/GroupUserPermissionsSelect.d.ts.map +1 -1
  7. package/lib/esm/components/Groups/GroupUserPermissionsSelect/GroupUserPermissionsSelect.js +19 -14
  8. package/lib/esm/components/Groups/ManageGroupUsers/ManageGroupUsers.js +3 -3
  9. package/lib/esm/components/ManageBookmarkedAccountsTab/AddEditBookmarkModal.d.ts.map +1 -1
  10. package/lib/esm/components/ManageBookmarkedAccountsTab/AddEditBookmarkModal.js +9 -9
  11. package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.d.ts.map +1 -1
  12. package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.js +106 -67
  13. package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.d.ts.map +1 -1
  14. package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.js +7 -12
  15. package/lib/esm/components/ManageExpiredContents/ExpiredContentCategory.js +3 -3
  16. package/lib/esm/components/ManageExpiredContents/ExpiredContentHeader.js +1 -1
  17. package/lib/esm/components/ManageExpiredContents/ExpiredContentManager.d.ts.map +1 -1
  18. package/lib/esm/components/ManageExpiredContents/ExpiredContentManager.js +5 -6
  19. package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItem.js +2 -2
  20. package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.js +2 -2
  21. package/lib/esm/components/ManagePartnerships/NonOrgCustomerInfoModal.js +5 -5
  22. package/lib/esm/components/ManagePartnerships/PartnershipsList.d.ts.map +1 -1
  23. package/lib/esm/components/ManagePartnerships/PartnershipsList.js +5 -6
  24. package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.d.ts.map +1 -1
  25. package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.js +15 -20
  26. package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.d.ts.map +1 -1
  27. package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.js +9 -16
  28. package/lib/esm/components/ManagePartnerships/Requests.d.ts.map +1 -1
  29. package/lib/esm/components/ManagePartnerships/Requests.js +5 -6
  30. package/lib/esm/components/ManagePartnerships/index.js +1 -1
  31. package/lib/esm/components/ManagePreferences/PreferencesHeader.js +1 -1
  32. package/lib/esm/components/ManagePreferences/components/PreferenceSelect.d.ts +1 -1
  33. package/lib/esm/components/ManagePreferences/components/PreferenceSelect.d.ts.map +1 -1
  34. package/lib/esm/components/ManagePreferences/components/PreferenceSelect.js +26 -27
  35. package/lib/esm/components/ManagePreferences/sections/PreferencesACL.js +3 -3
  36. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.d.ts.map +1 -1
  37. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.js +3 -4
  38. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseSearch.d.ts.map +1 -1
  39. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseSearch.js +2 -3
  40. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.js +6 -7
  41. package/lib/esm/components/ManageTable/ManageTable.d.ts +3 -4
  42. package/lib/esm/components/ManageTable/ManageTable.d.ts.map +1 -1
  43. package/lib/esm/components/ManageTable/ManageTable.js +12 -19
  44. package/lib/esm/components/ManageTags/TagsManager.d.ts.map +1 -1
  45. package/lib/esm/components/ManageTags/TagsManager.js +24 -27
  46. package/lib/esm/components/NotificationEmails/NotificationEmailsModal.d.ts.map +1 -1
  47. package/lib/esm/components/NotificationEmails/NotificationEmailsModal.js +14 -14
  48. package/lib/esm/components/NotificationEmails/index.js +2 -3
  49. package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimit.d.ts.map +1 -1
  50. package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimit.js +2 -3
  51. package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimitGuidelines.js +6 -6
  52. package/lib/esm/components/TopContentManagement/CategoryLimit/QuestionAnswer.js +1 -1
  53. package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.d.ts.map +1 -1
  54. package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.js +5 -5
  55. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.js +8 -8
  56. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.d.ts +2 -3
  57. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.d.ts.map +1 -1
  58. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.js +16 -9
  59. package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.d.ts.map +1 -1
  60. package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.js +11 -11
  61. package/lib/esm/components/TopContentManagement/NoTopContentFound.d.ts.map +1 -1
  62. package/lib/esm/components/TopContentManagement/NoTopContentFound.js +13 -14
  63. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.d.ts.map +1 -1
  64. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.js +46 -39
  65. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategory.js +4 -4
  66. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategoryNew.js +3 -3
  67. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.js +1 -1
  68. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.js +5 -5
  69. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.d.ts.map +1 -1
  70. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.js +2 -3
  71. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.js +4 -4
  72. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestion.js +2 -2
  73. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHint.js +4 -5
  74. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.d.ts.map +1 -1
  75. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.js +51 -25
  76. package/lib/esm/components/TopContentManagement/TopContentHeader.js +1 -1
  77. package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.d.ts.map +1 -1
  78. package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.js +58 -29
  79. package/lib/esm/scss/_main.scss +23 -19
  80. package/lib/esm/scss/_pf-overrides.scss +50 -46
  81. package/lib/esm/scss/index.scss +4 -4
  82. package/package.json +12 -12
@@ -151,7 +151,6 @@ export function ManageGroupedBookmarkedAccountsTab({ canManageBookmarkAccounts }
151
151
  yield confirmation({
152
152
  catchOnCancel: true,
153
153
  confirmText: t('Yes, I am sure'),
154
- confirmButtonVariant: ButtonVariant.danger,
155
154
  description: (React.createElement(React.Fragment, null,
156
155
  React.createElement("h2", null,
157
156
  React.createElement(Trans, null, "Are you sure?")),
@@ -178,7 +177,6 @@ export function ManageGroupedBookmarkedAccountsTab({ canManageBookmarkAccounts }
178
177
  try {
179
178
  yield confirmation({
180
179
  catchOnCancel: true,
181
- confirmButtonVariant: ButtonVariant.danger,
182
180
  confirmText: t('Yes, I am sure'),
183
181
  description: (React.createElement(React.Fragment, null,
184
182
  React.createElement("h2", null,
@@ -221,7 +219,7 @@ export function ManageGroupedBookmarkedAccountsTab({ canManageBookmarkAccounts }
221
219
  title: t('Accounts'),
222
220
  sortable: false,
223
221
  cellWidth: 70,
224
- cell: (group) => (React.createElement(LabelGroup, null, allGroups[group].map((account) => (React.createElement(Label, { color: "cyan", onClose: removeBookmarkedAccount(account), key: account.bookmarkId + account.bookmarkGroupName },
222
+ cell: (group) => (React.createElement(LabelGroup, null, allGroups[group].map((account) => (React.createElement(Label, { color: "teal", onClose: removeBookmarkedAccount(account), key: account.bookmarkId + account.bookmarkGroupName },
225
223
  account.name,
226
224
  "(",
227
225
  account.accountNumber,
@@ -234,11 +232,9 @@ export function ManageGroupedBookmarkedAccountsTab({ canManageBookmarkAccounts }
234
232
  cellWidth: 10,
235
233
  cell: (group) => (React.createElement(ActionList, { isIconList: true },
236
234
  React.createElement(ActionListItem, null,
237
- React.createElement(Button, { "aria-label": "edit", variant: "plain", onClick: () => onOpenEditGroupOpenModal(group) },
238
- React.createElement(PencilAltIcon, null))),
235
+ React.createElement(Button, { icon: React.createElement(PencilAltIcon, null), "aria-label": "edit", variant: "plain", onClick: () => onOpenEditGroupOpenModal(group) })),
239
236
  React.createElement(ActionListItem, null,
240
- React.createElement(Button, { "aria-label": "delete", variant: "plain", onClick: () => removeGroup(group) },
241
- React.createElement(TrashIcon, null))))),
237
+ React.createElement(Button, { icon: React.createElement(TrashIcon, null), "aria-label": "delete", variant: "plain", onClick: () => removeGroup(group) })))),
242
238
  },
243
239
  ];
244
240
  const isValid = () => {
@@ -258,22 +254,21 @@ export function ManageGroupedBookmarkedAccountsTab({ canManageBookmarkAccounts }
258
254
  React.createElement("a", { href: "https://source.redhat.com/communitiesatredhat/applications/integration-community-of-practice/misplaced/lostnfound/bookmarking", target: "_blank", rel: "noopener noreferrer" },
259
255
  ' ',
260
256
  "bookmarks in the customer support tool"))), closeBtnAriaLabel: "Close" },
261
- React.createElement(Button, { variant: "plain", className: "manage-bookmark-info-icon-button", "aria-label": "Cluster Id Info" },
262
- React.createElement(Icon, { size: "md" },
263
- React.createElement(InfoCircleIcon, null))))))),
257
+ React.createElement(Button, { icon: React.createElement(Icon, { size: "md" },
258
+ React.createElement(InfoCircleIcon, null)), variant: "plain", className: "manage-bookmark-info-icon-button", "aria-label": "Cluster Id Info" }))))),
264
259
  React.createElement("div", { className: "toolbar" },
265
260
  React.createElement("form", { onSubmit: (event) => event.preventDefault(), className: "toolbar-left" },
266
261
  React.createElement("label", { htmlFor: "bookmark-account-selector" },
267
262
  React.createElement(Trans, null, "Search accounts")),
268
263
  React.createElement("span", { className: "bookmark-account" },
269
264
  React.createElement(BookmarkAccountSelector, { clearRef: clearRef, labelId: "bookmark-account-selector", isDisabled: !loggedInUserRights.data.isInternal() || !canBookmarkAccounts, bookmarkedGroupAccounts: bookmarkedGroupAccounts.data, onBookMarkAccountSelected: onBookMarkAccountSelected, addMode: true, isInValid: false })),
270
- React.createElement("span", { className: "pf-v5-u-ml-sm" },
265
+ React.createElement("span", { className: "pf-v6-u-ml-sm" },
271
266
  React.createElement(Button, { variant: ButtonVariant.primary, isInline: true, onClick: onOpenAddBookmarkModal, "data-tracking-id": "bookmark-add-button", isDisabled: isValid() || apiCalls.isAddingBookmark },
272
267
  React.createElement(Trans, null, "Add bookmark")))),
273
268
  React.createElement("div", { className: "toolbar-right" },
274
269
  React.createElement("label", { htmlFor: "search-bookmark-account-selector" },
275
270
  React.createElement(Trans, null, "Filter by")),
276
- React.createElement(SearchInput, { className: "pf-v5-u-flex-grow-1 pf-v5-c-search-input pf-v5-u-background-color-100", value: searchString, id: "search-bookmark-account-selector", placeholder: t('Search for a bookmark'), "aria-label": t('Filter by searching for a bookmark'), onChange: (_, val) => setSearchString(val), onClear: () => setSearchString('') }))),
271
+ React.createElement(SearchInput, { className: "pf-v6-u-flex-grow-1 pf-v6-c-search-input pf-v6-u-background-color-100", value: searchString, id: "search-bookmark-account-selector", placeholder: t('Search for a bookmark'), "aria-label": t('Filter by searching for a bookmark'), onChange: (_, val) => setSearchString(val), onClear: () => setSearchString('') }))),
277
272
  React.createElement(AddEditBookmarkModal, { selectedAccounts: isInAddMode ? localSelectedAccounts : editGroupSelectedAccounts, groups: groups, isOpen: isUpdateBookmarkModalOpen, onSave: onAddEditBookmarksSave, onClose: closeAddEditBookmarkModal, onRemove: removeGroup, bookmarkedGroupAccounts: bookmarkedGroupAccounts.data, addMode: isInAddMode, title: isInAddMode ? t('Add a bookmark') : t('Edit bookmark') }),
278
273
  React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading bookmarked accounts list') } },
279
274
  React.createElement(ManageTable, { ariaLabel: t('Table to manage bookmarks'), columns: columns, data: groupNames, sortInfo: { column: 'bookmark-group-name', direction: 'asc' }, errorVariant: AlertVariant.warning, isFetching: bookmarkedGroupAccounts.isFetching ||
@@ -23,9 +23,9 @@ export default function ExpiredContentCategory({ category, isCategoryExpanded =
23
23
  ? category.content.filter((item) => !hasDateExpired(item.expiryDate))
24
24
  : category.content;
25
25
  const sortedExpiredContents = orderBy(expiredContents, ['expiryDate'], ['desc']);
26
- return !isEmpty(sortedExpiredContents) ? (React.createElement(AccordionItem, null,
27
- React.createElement(AccordionToggle, { id: category.categoryName, onClick: toggleExpanded, isExpanded: isExpanded },
26
+ return !isEmpty(sortedExpiredContents) ? (React.createElement(AccordionItem, { isExpanded: isExpanded },
27
+ React.createElement(AccordionToggle, { id: category.categoryName, onClick: toggleExpanded },
28
28
  React.createElement("h3", null, category.categoryName)),
29
- React.createElement(AccordionContent, { isHidden: !isExpanded },
29
+ React.createElement(AccordionContent, null,
30
30
  React.createElement("ul", { className: "list-flat list-flushleft" }, sortedExpiredContents.map((content, i) => (React.createElement(ExpiredContentSingleItem, { key: content.topContentId, content: content, category: category }))))))) : (React.createElement(React.Fragment, null));
31
31
  }
@@ -4,6 +4,6 @@ export default function ExpiredContentHeader() {
4
4
  return (React.createElement("header", null,
5
5
  React.createElement("h2", null,
6
6
  React.createElement(Trans, null, "Expired Content")),
7
- React.createElement("p", { className: "pf-v5-u-mt-md pf-v5-u-mb-sm" },
7
+ React.createElement("p", { className: "pf-v6-u-mt-md pf-v6-u-mb-sm" },
8
8
  React.createElement(Trans, null))));
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ExpiredContentManager.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageExpiredContents/ExpiredContentManager.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAUhF,MAAM,CAAC,OAAO,UAAU,qBAAqB,sBAmH5C"}
1
+ {"version":3,"file":"ExpiredContentManager.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageExpiredContents/ExpiredContentManager.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAUhF,MAAM,CAAC,OAAO,UAAU,qBAAqB,sBAmH5C"}
@@ -1,4 +1,4 @@
1
- import { Accordion, Bullseye, EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, Spinner, Switch, } from '@patternfly/react-core';
1
+ import { Accordion, Bullseye, EmptyState, EmptyStateBody, EmptyStateVariant, Spinner, Switch, } from '@patternfly/react-core';
2
2
  import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
3
3
  import { TagsSelector, TopContentSearch } from '@rh-support/components';
4
4
  import isEmpty from 'lodash/isEmpty';
@@ -53,16 +53,15 @@ export default function ExipredContentManager() {
53
53
  React.createElement(ExpiredContentHeader, null),
54
54
  React.createElement("div", { className: "toolbar" },
55
55
  React.createElement(TopContentSearch, { dataTrackingId: "expired-content-filter-manage", topContentData: expiredContentEditState, onSearch: onSearch, topContentResultsWrapperRef: expiredContentResultsRef, className: "toolbar-content", isDisabled: expiredContentResponse.isFetching, searchQuery: searchQuery, setSearchQuery: setSearchQuery }),
56
- React.createElement("div", { className: "toolbar-content pf-v5-u-ml-md" },
56
+ React.createElement("div", { className: "toolbar-content pf-v6-u-ml-md" },
57
57
  React.createElement("label", { htmlFor: 'tag-selector' },
58
58
  React.createElement(Trans, null, "All tags")),
59
59
  React.createElement(TagsSelector, { tagOptions: availableTags, onChange: onTagFilterChange, selectedTags: filteredTags, disabled: expiredContentResponse.isFetching })),
60
- React.createElement("div", { className: "toolbar-content pf-v5-u-mt-md" },
60
+ React.createElement("div", { className: "toolbar-content pf-v6-u-mt-md" },
61
61
  React.createElement(Switch, { id: "content-approaching-expiry", label: t('Show approaching expiry'), isChecked: showApprochingExpiry, onChange: handleChange }))),
62
- React.createElement("div", { className: "expired-content-manage-wrapper pf-v5-u-pt-md", ref: expiredContentResultsRef }, expiredContentResponse.isFetching ? (React.createElement(Bullseye, null,
62
+ React.createElement("div", { className: "expired-content-manage-wrapper pf-v6-u-pt-md", ref: expiredContentResultsRef }, expiredContentResponse.isFetching ? (React.createElement(Bullseye, null,
63
63
  React.createElement(EmptyState, { variant: EmptyStateVariant.full },
64
- React.createElement(Spinner, { size: "lg" })))) : isEmpty(filteredEC) ? (React.createElement(EmptyState, { variant: EmptyStateVariant.xs },
65
- React.createElement(EmptyStateHeader, { titleText: React.createElement(Trans, null, "No contents found"), icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }) }),
64
+ React.createElement(Spinner, { size: "lg" })))) : isEmpty(filteredEC) ? (React.createElement(EmptyState, { icon: SearchIcon, titleText: React.createElement(Trans, null, "No contents found"), variant: EmptyStateVariant.xs },
66
65
  React.createElement(EmptyStateBody, null,
67
66
  React.createElement(Trans, null, "There are no contents to display")))) : (React.createElement(Accordion, null, filteredEC.map((category, i) => (React.createElement(ExpiredContentCategory, { key: category.id, category: category, isCategoryExpanded: !isEmpty(searchQuery) || !isEmpty(filteredTags) }))))))));
68
67
  }
@@ -68,11 +68,11 @@ export default function ExpiredContentSingleItem({ content, category }) {
68
68
  React.createElement("div", null,
69
69
  lastModifiedBy,
70
70
  " | ",
71
- React.createElement("span", { className: "pf-v5-u-danger-color-200" }, expiredText),
71
+ React.createElement("span", { className: "pf-v6-u-danger-color-200" }, expiredText),
72
72
  " |",
73
73
  ' ',
74
74
  content.product,
75
75
  " ", (_a = content.majorVersion) !== null && _a !== void 0 ? _a : '',
76
76
  content.minorVersion ? `.${content.minorVersion}` : ''),
77
- React.createElement("div", null, (_b = content.tags) === null || _b === void 0 ? void 0 : _b.map((tag) => (React.createElement(Label, { isCompact: true, className: "pf-v5-u-mr-xs pf-v5-u-mt-sm", key: tag.id, color: filteredTags.some((t) => t.id === tag.id) ? 'gold' : 'grey' }, tag.tagName)))))) : (React.createElement(ExpiredContentSingleItemView, { category: category, content: content, onCancel: editToggle, onSave: onSave, onDelete: onDelete, isDeleting: isDeleting, isSaving: isSaving }))));
77
+ React.createElement("div", null, (_b = content.tags) === null || _b === void 0 ? void 0 : _b.map((tag) => (React.createElement(Label, { isCompact: true, className: "pf-v6-u-mr-xs pf-v6-u-mt-sm", key: tag.id, color: filteredTags.some((t) => t.id === tag.id) ? 'yellow' : 'grey' }, tag.tagName)))))) : (React.createElement(ExpiredContentSingleItemView, { category: category, content: content, onCancel: editToggle, onSave: onSave, onDelete: onDelete, isDeleting: isDeleting, isSaving: isSaving }))));
78
78
  }
@@ -127,10 +127,10 @@ export default function ExpiredContentSingleItemView({ category, content, onCanc
127
127
  React.createElement(TextInput, { type: "url", maxLength: 254, isRequired: true, pattern: "^(http(s)?:\\/\\/)+[\\w\\-\\._~:\\/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$", value: getTopContentUrl(localContentUrl), "aria-label": t('Entering a solution or article link first will automatically generate the heading for you'), placeholder: t('Entering a solution or article link first will automatically generate the heading for you'), onChange: (evt, val) => {
128
128
  onContentUrlChange(val, evt);
129
129
  }, validated: contentUrlIsValid ? ValidatedOptions.default : ValidatedOptions.error })),
130
- React.createElement(Flex, { className: "pf-v5-u-my-lg" },
130
+ React.createElement(Flex, { className: "pf-v6-u-my-lg" },
131
131
  React.createElement(FlexItem, { flex: { default: 'flex_1' } },
132
132
  React.createElement(FormGroup, { label: t('Tags') },
133
- React.createElement("div", { className: "pf-v5-c-form-control" },
133
+ React.createElement("div", { className: "pf-v6-c-form-control" },
134
134
  React.createElement(TagsSelector, { tagOptions: tagOptions, onChange: handleLocalTagChange, selectedTags: localSelectedTags, placeholder: t('Select tags to improve discoverability'), id: "expired-content-tag" })))),
135
135
  React.createElement(FlexItem, null,
136
136
  React.createElement(FormGroup, { label: t('Expiry date') },
@@ -1,4 +1,4 @@
1
- import { Button, ButtonVariant, Modal, ModalVariant } from '@patternfly/react-core';
1
+ import { Button, ButtonVariant, Modal, ModalFooter, ModalVariant } from '@patternfly/react-core';
2
2
  import React from 'react';
3
3
  import { Trans, useTranslation } from 'react-i18next';
4
4
  export const NonOrgCustomerInfoModal = () => {
@@ -7,9 +7,9 @@ export const NonOrgCustomerInfoModal = () => {
7
7
  const handleModalToggle = () => {
8
8
  setIsModalOpen(!isModalOpen);
9
9
  };
10
- return (React.createElement(Modal, { variant: ModalVariant.small, title: t('Confirm partnership collaboration'), isOpen: isModalOpen, onClose: handleModalToggle, actions: [
10
+ return (React.createElement(Modal, { variant: ModalVariant.small, title: t('Confirm partnership collaboration'), isOpen: isModalOpen, onClose: handleModalToggle },
11
+ React.createElement(Trans, null, "Only org admin customers can confirm partnership collaboration."),
12
+ React.createElement(ModalFooter, null,
11
13
  React.createElement(Button, { key: "cancel", variant: ButtonVariant.primary, onClick: handleModalToggle, "data-tracking-id": "confirm-partnership-collaboration-no-org-admin" },
12
- React.createElement(Trans, null, "Cancel")),
13
- ] },
14
- React.createElement(Trans, null, "Only org admin customers can confirm partnership collaboration.")));
14
+ React.createElement(Trans, null, "Cancel")))));
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PartnershipsList.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsList.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,wBAAgB,gBAAgB,sBAmO/B"}
1
+ {"version":3,"file":"PartnershipsList.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsList.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,wBAAgB,gBAAgB,sBAqO/B"}
@@ -43,7 +43,6 @@ export function PartnershipsList() {
43
43
  title: t('Are you sure?'),
44
44
  description: React.createElement(Trans, null, "You will not be able to undo this action after verifying."),
45
45
  confirmText: t('Delete'),
46
- confirmButtonVariant: ButtonVariant.danger,
47
46
  });
48
47
  try {
49
48
  setIsdeleting(true);
@@ -110,12 +109,12 @@ export function PartnershipsList() {
110
109
  title: ' ',
111
110
  sortable: false,
112
111
  cellWidth: 10,
113
- cell: (data) => (React.createElement(Button, { variant: ButtonVariant.plain, "aria-label": t('Remove partnership'), "data-tracking-id": "remove-partnership", onClick: () => removePartnership(data) },
114
- React.createElement(TrashIcon, null),
115
- React.createElement(LoadingIndicator, { isInline: true, show: isDeleting && data.accountNum === isDeletingAccountNum, size: "xs" }))),
112
+ cell: (data) => (React.createElement(Button, { icon: React.createElement(React.Fragment, null,
113
+ React.createElement(TrashIcon, null),
114
+ React.createElement(LoadingIndicator, { isInline: true, show: isDeleting && data.accountNum === isDeletingAccountNum, size: "xs" })), variant: ButtonVariant.plain, "aria-label": t('Remove partnership'), "data-tracking-id": "remove-partnership", onClick: () => removePartnership(data) })),
116
115
  },
117
116
  ];
118
- const requestCollaborationButton = () => (React.createElement("div", { className: "toolbar-right pf-v5-u-mt-xs" },
117
+ const requestCollaborationButton = () => (React.createElement("div", { className: "toolbar-right pf-v6-u-mt-xs" },
119
118
  React.createElement(Button, { variant: ButtonVariant.primary, isInline: true, onClick: () => setIsRequestCollabModalOpen(true), "data-tracking-id": "request-collaboration-button", isDisabled: false },
120
119
  React.createElement(Trans, null, "Request Collaboration"))));
121
120
  // Get Customer Accounts For A Partner
@@ -174,7 +173,7 @@ export function PartnershipsList() {
174
173
  React.createElement("div", { className: "toolbar" },
175
174
  React.createElement("div", { className: "toolbar-left" },
176
175
  React.createElement("label", { htmlFor: "search-partnerships" }, "Filter by"),
177
- React.createElement(SearchInput, { className: "pf-v5-u-flex-grow-1 pf-v5-c-search-input pf-v5-u-background-color-100 pf-v5-u-mr-lg", id: "search-partnerships", placeholder: t('Search for an existing partnership'), value: searchString, onChange: (_event, value) => setSearchString(value), onClear: () => setSearchString(''), "aria-label": t('Search for an existing partnership') })),
176
+ React.createElement(SearchInput, { className: "pf-v6-u-flex-grow-1 pf-v6-c-search-input pf-v6-u-background-color-100 pf-v6-u-mr-lg", id: "search-partnerships", placeholder: t('Search for an existing partnership'), value: searchString, onChange: (_event, value) => setSearchString(value), onClear: () => setSearchString(''), "aria-label": t('Search for an existing partnership') })),
178
177
  requestCollaborationButton()),
179
178
  React.createElement(ManageTable, { ariaLabel: t('Partnerships list'), columns: columns, data: accountList.filter((account) => account.name.toLowerCase().includes(searchString.toLowerCase())), sortInfo: { column: 'customer-account-name', direction: 'asc' }, errorVariant: AlertVariant.warning, isFetching: isFetching, isError: hasError, errorTitle: t('Partnerships error'), errorComponent: React.createElement(Trans, null, "Could not get partnerships list"), noResultText: t('There are no results to display.') }),
180
179
  React.createElement(RequestCollaborationModal, { isOpen: isRequestCollabModalOpen, onClose: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"PartnershipsTermsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsTermsModal.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAUnD,wBAAgB,SAAS,WAMxB;AAID,eAAO,MAAM,sBAAsB,yBAqMlC,CAAC"}
1
+ {"version":3,"file":"PartnershipsTermsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsTermsModal.tsx"],"names":[],"mappings":"AAcA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAUnD,wBAAgB,SAAS,WAMxB;AAID,eAAO,MAAM,sBAAsB,yBAoMlC,CAAC"}
@@ -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, ButtonVariant, Modal, ModalVariant, Text, TextContent, TextVariants } from '@patternfly/react-core';
11
+ import { Button, ButtonVariant, Content, ContentVariants, Modal, ModalFooter, ModalVariant, } from '@patternfly/react-core';
12
12
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
13
13
  import { LoadingDots, LoadingIndicator, ToastNotification } from '@rh-support/components';
14
14
  import { baseTnCUrl, TncConstants } from '@rh-support/utils';
@@ -109,25 +109,20 @@ export const PartnershipsTermsModal = () => {
109
109
  // eslint-disable-next-line react-hooks/exhaustive-deps
110
110
  }, [linkHash]);
111
111
  const modalContentWhenTermIsVisited = () => isUpdating ? (React.createElement(LoadingIndicator, { show: true, size: "lg" })) : ackChoice === 'accept' ? (React.createElement(Trans, null, "Your partnership link is created successfully")) : ackChoice === 'decline' ? (React.createElement(Trans, null, "You have not accepted terms and conditions")) : (React.createElement(React.Fragment, null));
112
- const modalContentBeforeTermVisited = () => isVerifyingLink ? (React.createElement("p", { className: "pf-v5-u-mt-xs" },
113
- React.createElement(LoadingDots, { show: true, message: t('Verifying partner link') }))) : verificationFailMessage ? (React.createElement("p", { className: "pf-v5-u-mt-xs pf-v5-u-danger-color-100" }, verificationFailMessage)) : (React.createElement(React.Fragment, null,
112
+ const modalContentBeforeTermVisited = () => isVerifyingLink ? (React.createElement("p", { className: "pf-v6-u-mt-xs" },
113
+ React.createElement(LoadingDots, { show: true, message: t('Verifying partner link') }))) : verificationFailMessage ? (React.createElement("p", { className: "pf-v6-u-mt-xs pf-v6-u-danger-color-100" }, verificationFailMessage)) : (React.createElement(React.Fragment, null,
114
114
  React.createElement("p", null,
115
115
  React.createElement(Trans, null, "A partner would like to collaborate with you for support when cases are shared. Please confirm the name below and continue to accept terms and conditions.")),
116
- React.createElement(TextContent, { className: "pf-v5-u-mt-lg" },
117
- React.createElement(Text, { component: TextVariants.h3 }, linkAccountName))));
118
- return (React.createElement(Modal, { id: "partnership-terms-and-conditions-modal", className: "pf-modal-overflow-visible", title: t('Confirm partnership collaboration'), isOpen: isTermsModalOpen, onClose: onClose, showClose: true, onEscapePress: onClose, variant: ModalVariant.large, actions: !isTermVisited && !verificationFailMessage
119
- ? [
120
- React.createElement(Button, { href: getTnCUrl(), component: "a", variant: ButtonVariant.primary, key: "go-to-agreement", "data-tracking-id": "go-to-agreement" },
121
- React.createElement(ExternalLinkAltIcon, null),
122
- ' ',
123
- " ",
124
- React.createElement(Trans, null, "Go to Agreement")),
125
- React.createElement(Button, { key: "close-new-partnership-modal", "data-tracking-id": "close-new-partnership-modal", variant: ButtonVariant.secondary, onClick: () => onClose() },
126
- React.createElement(Trans, null, "Close")),
127
- ]
128
- : [
129
- React.createElement(Button, { key: "close-after-link-created", "data-tracking-id": "close-after-link-created", variant: ButtonVariant.primary, onClick: () => onClose(), isDisabled: isUpdating },
130
- React.createElement(Trans, null, "Close")),
131
- ] },
132
- React.createElement(React.Fragment, null, isTermVisited ? modalContentWhenTermIsVisited() : modalContentBeforeTermVisited())));
116
+ React.createElement(Content, { className: "pf-v6-u-mt-lg" },
117
+ React.createElement(Content, { component: ContentVariants.h3 }, linkAccountName))));
118
+ return (React.createElement(Modal, { id: "partnership-terms-and-conditions-modal", className: "pf-modal-overflow-visible", title: t('Confirm partnership collaboration'), isOpen: isTermsModalOpen, onClose: onClose, onEscapePress: onClose, variant: ModalVariant.large },
119
+ React.createElement(React.Fragment, null, isTermVisited ? modalContentWhenTermIsVisited() : modalContentBeforeTermVisited()),
120
+ React.createElement(ModalFooter, null, !isTermVisited && !verificationFailMessage ? (React.createElement(React.Fragment, null,
121
+ React.createElement(Button, { icon: React.createElement(ExternalLinkAltIcon, null), href: getTnCUrl(), component: "a", variant: ButtonVariant.primary, key: "go-to-agreement", "data-tracking-id": "go-to-agreement" },
122
+ ' ',
123
+ " ",
124
+ React.createElement(Trans, null, "Go to Agreement")),
125
+ React.createElement(Button, { key: "close-new-partnership-modal", "data-tracking-id": "close-new-partnership-modal", variant: ButtonVariant.secondary, onClick: () => onClose() },
126
+ React.createElement(Trans, null, "Close")))) : (React.createElement(Button, { key: "close-after-link-created", "data-tracking-id": "close-after-link-created", variant: ButtonVariant.primary, onClick: () => onClose(), isDisabled: isUpdating },
127
+ React.createElement(Trans, null, "Close"))))));
133
128
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RequestCollaborationModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/RequestCollaborationModal.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAK3D,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACrC;AAID,eAAO,MAAM,yBAAyB,UAAW,MAAM,sBAqOtD,CAAC"}
1
+ {"version":3,"file":"RequestCollaborationModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/RequestCollaborationModal.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAK3D,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACrC;AAID,eAAO,MAAM,yBAAyB,UAAW,MAAM,sBAgOtD,CAAC"}
@@ -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, ButtonVariant, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalVariant, TextInput, Tooltip, TooltipPosition, } from '@patternfly/react-core';
11
+ import { Button, ButtonVariant, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalFooter, ModalVariant, TextInput, Tooltip, TooltipPosition, } from '@patternfly/react-core';
12
12
  import { ToastNotification, useCopyToClipboard } from '@rh-support/components';
13
13
  import isEmpty from 'lodash/isEmpty';
14
14
  import React, { useRef, useState } from 'react';
@@ -115,26 +115,16 @@ export const RequestCollaborationModal = (props) => {
115
115
  setIsCopyClicked(true);
116
116
  };
117
117
  const partnershipLinkId = 'partnership-link-id';
118
- return (React.createElement(Modal, { id: "request-collaboration-modal", className: "pf-modal-overflow-visible", title: isRequestingAgain ? 'Request collaboration again' : 'Request collaboration', isOpen: props.isOpen, onClose: onClose, showClose: true, onEscapePress: onClose, variant: ModalVariant.large, actions: [
119
- ...(showDone
120
- ? [
121
- React.createElement(Button, { key: "done", variant: ButtonVariant.primary, onClick: onDone, isDisabled: validated === 'error' || (!isRequestingAgain && !isCopyClicked && isDoneClicked), "data-tracking-id": "request-collaboration-done-button" },
122
- React.createElement(Trans, null, "Done")),
123
- ]
124
- : [
125
- React.createElement(Button, { key: "next", variant: ButtonVariant.primary, onClick: onNext, isDisabled: validated === 'error' || isFetching, isLoading: isFetching },
126
- React.createElement(Trans, null, "Next")),
127
- ]),
128
- ] },
118
+ return (React.createElement(Modal, { id: "request-collaboration-modal", className: "pf-modal-overflow-visible", title: isRequestingAgain ? 'Request collaboration again' : 'Request collaboration', isOpen: props.isOpen, onClose: onClose, onEscapePress: onClose, variant: ModalVariant.large },
129
119
  React.createElement(React.Fragment, null,
130
120
  React.createElement("p", null, "Initiate a new collaboration by generating a unique link for your customer. Check the status under your requests to see if they accept or reject your collaboration."),
131
- React.createElement(Form, { className: "pf-v5-u-my-md" },
121
+ React.createElement(Form, { className: "pf-v6-u-my-md" },
132
122
  React.createElement(Grid, { sm: 12, md: 6, lg: 6 },
133
123
  React.createElement(GridItem, null,
134
124
  React.createElement(FormGroup, { label: t('Name your link'), type: "string", fieldId: partnershipLinkId, isRequired: true },
135
125
  React.createElement(FormHelperText, null,
136
126
  React.createElement(HelperText, null, validated !== 'error' ? (React.createElement(HelperTextItem, null,
137
- React.createElement(Trans, null, "Please enter a name for your request"))) : (React.createElement(HelperTextItem, { variant: "error", hasIcon: true },
127
+ React.createElement(Trans, null, "Please enter a name for your request"))) : (React.createElement(HelperTextItem, { variant: "error" },
138
128
  React.createElement(Trans, null, isDuplicateLinkName
139
129
  ? t('Link name already used. Please enter a unique name')
140
130
  : t('Please enter a name for your request')))))),
@@ -147,10 +137,13 @@ export const RequestCollaborationModal = (props) => {
147
137
  React.createElement("code", { ref: clipboardRef }, generatedUrl)),
148
138
  React.createElement(Tooltip, { position: TooltipPosition.top, content: clipboardText, trigger: "click" },
149
139
  React.createElement("button", { className: "nimbus-icon-clipboard clip-code-raw-btn xs-icon", "aria-hidden": "true", onClick: onClickOnCopyToClipboardButton, "data-tracking-id": "request-collaboration-link-copy-button", type: "button" }))),
150
- React.createElement("p", { className: !isCopyClicked && isDoneClicked ? 'pf-v5-u-danger-color-100' : '' },
140
+ React.createElement("p", { className: !isCopyClicked && isDoneClicked ? 'pf-v6-u-danger-color-100' : '' },
151
141
  React.createElement(Trans, null,
152
142
  ' ',
153
143
  "Please ",
154
144
  React.createElement("strong", null, "copy and send"),
155
- " this unique link to your customer for approval.")))) : (React.createElement(Trans, null, "Partnership request expiration date is extended.")))))));
145
+ " this unique link to your customer for approval.")))) : (React.createElement(Trans, null, "Partnership request expiration date is extended."))))),
146
+ React.createElement(ModalFooter, null, showDone ? (React.createElement(Button, { key: "done", variant: ButtonVariant.primary, onClick: onDone, isDisabled: validated === 'error' || (!isRequestingAgain && !isCopyClicked && isDoneClicked), "data-tracking-id": "request-collaboration-done-button" },
147
+ React.createElement(Trans, null, "Done"))) : (React.createElement(Button, { key: "next", variant: ButtonVariant.primary, onClick: onNext, isDisabled: validated === 'error' || isFetching, isLoading: isFetching },
148
+ React.createElement(Trans, null, "Next"))))));
156
149
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Requests.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/Requests.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,eAAO,MAAM,WAAW,SAAU,MAAM,WAMvC,CAAC;AACF,wBAAgB,QAAQ,sBAgRvB"}
1
+ {"version":3,"file":"Requests.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/Requests.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,eAAO,MAAM,WAAW,SAAU,MAAM,WAMvC,CAAC;AACF,wBAAgB,QAAQ,sBA+QvB"}
@@ -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 { AlertVariant, Badge, ButtonVariant, ExpandableSection, ExpandableSectionToggle, Label, Stack, StackItem, } from '@patternfly/react-core';
11
+ import { AlertVariant, Badge, ExpandableSection, ExpandableSectionToggle, Label, Stack, StackItem, } from '@patternfly/react-core';
12
12
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
13
13
  import { LoadingIndicator, ToastNotification, useConfirmation } from '@rh-support/components';
14
14
  import { UserPreferencesKeys, useUserPreferences } from '@rh-support/react-context';
@@ -50,7 +50,6 @@ export function Requests() {
50
50
  title: t('Are you sure?'),
51
51
  description: React.createElement(Trans, null, "You will not be able to undo this action after verifying."),
52
52
  confirmText: t('Delete'),
53
- confirmButtonVariant: ButtonVariant.danger,
54
53
  });
55
54
  try {
56
55
  yield pcm.partnerships.removePendingPartnerLink(friendlyName);
@@ -129,7 +128,7 @@ export function Requests() {
129
128
  ]
130
129
  : []),
131
130
  {
132
- title: (React.createElement("div", { className: "pf-v5-u-danger-color-200" },
131
+ title: (React.createElement("div", { className: "pf-v6-u-danger-color-200" },
133
132
  React.createElement(Trans, null, "Delete"))),
134
133
  onClick: () => deleteRequest(friendlyName),
135
134
  itemKey: 'delete-request',
@@ -210,14 +209,14 @@ export function Requests() {
210
209
  React.createElement(StackItem, { className: "toolbar" },
211
210
  React.createElement(ExpandableSectionToggle, { isExpanded: isExpanded, onToggle: onToggle, contentId: contentId },
212
211
  React.createElement("div", null,
213
- React.createElement("label", { className: "pf-v5-u-color-100" },
212
+ React.createElement("label", { className: "pf-v6-u-color-100" },
214
213
  ' ',
215
214
  React.createElement(Trans, null, "Requests"),
216
- isFetchingStatuses ? (React.createElement(LoadingIndicator, { isInline: true, size: "sm", className: "pf-v5-u-mx-sm" })) : (React.createElement(Badge, { className: "pf-v5-u-mx-sm" }, statusList.length)))))),
215
+ isFetchingStatuses ? (React.createElement(LoadingIndicator, { isInline: true, size: "sm", className: "pf-v6-u-mx-sm" })) : (React.createElement(Badge, { className: "pf-v6-u-mx-sm" }, statusList.length)))))),
217
216
  React.createElement(StackItem, null,
218
217
  React.createElement(ExpandableSection, { isIndented: false, isExpanded: isExpanded, isDetached: true, contentId: contentId }, !isEmpty(statusList) ? (React.createElement(ManageTable, { ariaLabel: t('Requests'), columns: columns, data: statusList, errorVariant: AlertVariant.warning, isFetching: isFetchingStatuses, isError: false, errorTitle: t('Request error'), errorComponent: React.createElement(Trans, null, "Could not get requests"), pagination: true, actionResolver: statusList && !isFetchingStatuses && !isEmpty(statusList)
219
218
  ? actionResolver
220
- : null, perPage: 5 })) : (React.createElement("p", { className: "pf-v5-u-p-md" },
219
+ : null, perPage: 5 })) : (React.createElement("p", { className: "pf-v6-u-p-md" },
221
220
  React.createElement(Trans, null, "No request"))))))),
222
221
  isRequestAgainModalOpen && (React.createElement(RequestCollaborationModal, { isOpen: isRequestAgainModalOpen, onClose: onRequestAgainModalClose, sendReqAgainFriendlyName: selectedRowFriendlyName }))));
223
222
  }
@@ -12,7 +12,7 @@ export function ManagePartnerships() {
12
12
  const { t } = useTranslation();
13
13
  const { globalMetadataState: { loggedInUserRights }, } = useGlobalStateContext();
14
14
  return (React.createElement(React.Fragment, null,
15
- React.createElement("header", { className: "pf-v5-u-mb-xs" },
15
+ React.createElement("header", { className: "pf-v6-u-mb-xs" },
16
16
  React.createElement("h2", null,
17
17
  React.createElement(Trans, null, "Partnerships")),
18
18
  React.createElement("p", null,
@@ -5,5 +5,5 @@ export function PreferencesHeader() {
5
5
  return (React.createElement("header", null,
6
6
  React.createElement("h2", null,
7
7
  React.createElement(Trans, null, "Preferences")),
8
- React.createElement("p", { className: "pf-v5-u-mt-md pf-v5-u-mb-sm" }, t('Setting preferences will personalize your support case experience to best suit your needs.'))));
8
+ React.createElement("p", { className: "pf-v6-u-mt-md pf-v6-u-mb-sm" }, t('Setting preferences will personalize your support case experience to best suit your needs.'))));
9
9
  }
@@ -3,7 +3,7 @@ interface IProps {
3
3
  id: string;
4
4
  label: any;
5
5
  selections: any;
6
- onSelect: (event: any, selection: any, isPlaceholder: any) => Promise<any>;
6
+ onSelect: (event: any, selection: any) => Promise<any>;
7
7
  children: React.ReactElement[];
8
8
  }
9
9
  export declare function PreferenceSelect({ id, label, selections, children, onSelect }: IProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"PreferenceSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/components/PreferenceSelect.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,GAAG,CAAC;IAChB,QAAQ,EAAE,CAAC,KAAK,KAAA,EAAE,SAAS,KAAA,EAAE,aAAa,KAAA,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5D,QAAQ,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;CAClC;AACD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,MAAM,qBA8CrF"}
1
+ {"version":3,"file":"PreferenceSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/components/PreferenceSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,GAAG,CAAC;IAChB,QAAQ,EAAE,CAAC,KAAK,KAAA,EAAE,SAAS,KAAA,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7C,QAAQ,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;CAClC;AACD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,MAAM,qBA+CrF"}
@@ -7,43 +7,42 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { Spinner } from '@patternfly/react-core';
11
- import { Select, SelectVariant } from '@patternfly/react-core/deprecated';
12
- import { ToastNotification } from '@rh-support/components';
10
+ import { SingleSelectDropdown, ToastNotification } from '@rh-support/components';
13
11
  import isEqual from 'lodash/isEqual';
14
12
  import React, { useState } from 'react';
15
13
  import { Trans, useTranslation } from 'react-i18next';
16
14
  export function PreferenceSelect({ id, label, selections, children, onSelect }) {
17
15
  const { t } = useTranslation();
18
- const [isOpen, setIsOpen] = useState(false);
19
16
  const [isLoading, setIsLoading] = useState(false);
20
- const onSelectToggle = (isOpen) => {
21
- setIsOpen(isOpen);
22
- };
23
- // To handle select
24
- const onSelectLocal = (event, selection, isPlaceholder) => __awaiter(this, void 0, void 0, function* () {
25
- if (isPlaceholder || isEqual(selection, selections))
26
- defaultClearSelection();
27
- else {
28
- setIsLoading(true);
29
- try {
30
- yield onSelect(event, selection, isPlaceholder);
31
- ToastNotification.addSuccessMessage(t('Successfully updated preference'));
32
- }
33
- catch (e) {
34
- ToastNotification.addDangerMessage(t('Failed to update preference'));
35
- }
36
- finally {
37
- defaultClearSelection();
38
- setIsLoading(false);
39
- }
17
+ const onSelectLocal = (option) => __awaiter(this, void 0, void 0, function* () {
18
+ if (isEqual(option.value, selections)) {
19
+ return;
20
+ }
21
+ setIsLoading(true);
22
+ try {
23
+ yield onSelect(option, option.value);
24
+ ToastNotification.addSuccessMessage(t('Successfully updated preference'));
25
+ }
26
+ catch (e) {
27
+ ToastNotification.addDangerMessage(t('Failed to update preference'));
40
28
  }
29
+ finally {
30
+ setIsLoading(false);
31
+ }
32
+ });
33
+ const getDropdownOptions = (children) => children.map((child) => {
34
+ return {
35
+ label: child.props.value,
36
+ value: child.props.value,
37
+ description: child.props.description,
38
+ };
41
39
  });
42
- const defaultClearSelection = () => {
43
- setIsOpen(false);
40
+ const getSelectedDropdownOption = {
41
+ label: selections,
42
+ value: selections,
44
43
  };
45
44
  return (React.createElement(React.Fragment, null,
46
45
  React.createElement("label", { id: id },
47
46
  React.createElement(Trans, null, label)),
48
- React.createElement(Select, { variant: SelectVariant.single, onToggle: (_event, isOpen) => onSelectToggle(isOpen), onSelect: onSelectLocal, selections: selections, isOpen: isOpen, "aria-labelledby": id, toggleIcon: isLoading && React.createElement(Spinner, { size: "sm" }) }, children)));
47
+ React.createElement(SingleSelectDropdown, { selected: getSelectedDropdownOption, options: getDropdownOptions(children), onSelect: onSelectLocal, isLoading: isLoading, ariaLabel: id })));
49
48
  }
@@ -48,9 +48,9 @@ export function PreferencesACL() {
48
48
  React.createElement(PreferenceSwitch, { id: "ACL-switch", label: isAclActivated ? t('ACL Enabled') : t('ACL Disabled'), isChecked: isAclActivated, onSwitchChange: onAclSwitch }),
49
49
  React.createElement("div", { className: "prefhostnameTooltip" },
50
50
  React.createElement(Tooltip, { content: t('This determines if the account is utilizing case group access controls'), position: "right" },
51
- React.createElement(InfoCircleIcon, { className: "pf-v5-u-ml-sm" })),
52
- isAclLoading && (React.createElement(Spinner, { size: "lg", className: "pf-v5-u-ml-sm hostnameSpinner", "aria-label": "Hostname loading" })))),
53
- React.createElement("div", { className: "pf-v5-u-mt-lg" },
51
+ React.createElement(InfoCircleIcon, { className: "pf-v6-u-ml-sm" })),
52
+ isAclLoading && (React.createElement(Spinner, { size: "lg", className: "pf-v6-u-ml-sm hostnameSpinner", "aria-label": "Hostname loading" })))),
53
+ React.createElement("div", { className: "pf-v6-u-mt-lg" },
54
54
  React.createElement("label", null,
55
55
  React.createElement(Trans, null, "Related links")),
56
56
  React.createElement("p", null,
@@ -1 +1 @@
1
- {"version":3,"file":"PreferencesCaseCreate.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseCreate.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,UAAU,MAAM;CAAG;AACnB,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBA0MlD"}
1
+ {"version":3,"file":"PreferencesCaseCreate.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseCreate.tsx"],"names":[],"mappings":"AAcA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,UAAU,MAAM;CAAG;AACnB,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBA0MlD"}
@@ -8,8 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { publicApi } from '@cee-eng/hydrajs';
11
- import { Card, CardBody, CardHeader } from '@patternfly/react-core';
12
- import { SelectOption } from '@patternfly/react-core/deprecated';
11
+ import { Card, CardBody, CardHeader, SelectOption } from '@patternfly/react-core';
13
12
  import { ToastNotification, useFetch } from '@rh-support/components';
14
13
  import { fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataReducerConstants, GlobalMetadataStateContext, } from '@rh-support/react-context';
15
14
  import { haventLoadedMetadata, PreferredLanguages } from '@rh-support/utils';
@@ -85,7 +84,7 @@ export function PreferencesCaseCreate(props) {
85
84
  return foundLang === null || foundLang === void 0 ? void 0 : foundLang.label;
86
85
  }
87
86
  };
88
- const onPreferredLanguageSelect = (event, selection, isPlaceholder) => __awaiter(this, void 0, void 0, function* () {
87
+ const onPreferredLanguageSelect = (event, selection) => __awaiter(this, void 0, void 0, function* () {
89
88
  const selectedLanguageCode = getLanguageKey(selection);
90
89
  try {
91
90
  yield updatePreferredLanguage(selectedLanguageCode.value);
@@ -95,7 +94,7 @@ export function PreferencesCaseCreate(props) {
95
94
  console.log(error);
96
95
  }
97
96
  });
98
- const onDefaultGroupSelect = (event, selection, isPlaceholder) => __awaiter(this, void 0, void 0, function* () {
97
+ const onDefaultGroupSelect = (event, selection) => __awaiter(this, void 0, void 0, function* () {
99
98
  try {
100
99
  if (selection === 'Ungrouped Case') {
101
100
  updateDefaultGroupPref('-1');
@@ -1 +1 @@
1
- {"version":3,"file":"PreferencesCaseSearch.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseSearch.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;CAAG;AAEnB,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBA6GlD"}
1
+ {"version":3,"file":"PreferencesCaseSearch.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseSearch.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;CAAG;AAEnB,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBA6GlD"}
@@ -7,8 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { Card, CardBody, CardHeader } from '@patternfly/react-core';
11
- import { SelectOption } from '@patternfly/react-core/deprecated';
10
+ import { Card, CardBody, CardHeader, SelectOption } from '@patternfly/react-core';
12
11
  import { ToastNotification } from '@rh-support/components';
13
12
  import { GlobalMetadataStateContext, UserPreferencesKeys } from '@rh-support/react-context';
14
13
  import find from 'lodash/find';
@@ -56,7 +55,7 @@ export function PreferencesCaseSearch(props) {
56
55
  useEffect(() => {
57
56
  userOriginalSavedSearch();
58
57
  });
59
- const onSelect = (event, selection, isPlaceholder) => __awaiter(this, void 0, void 0, function* () {
58
+ const onSelect = (event, selection) => __awaiter(this, void 0, void 0, function* () {
60
59
  if (selection !== restoreLatestText) {
61
60
  try {
62
61
  yield updateAutoRestoreSavedSearchPreference(selection);