@rh-support/manage 2.5.31 → 2.5.32

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
@@ -8,8 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { accounts } from '@cee-eng/hydrajs';
11
- import { Card, CardBody, CardHeader, Popover, PopoverPosition, Spinner, TextArea, Tooltip, } from '@patternfly/react-core';
12
- import { SelectOption } from '@patternfly/react-core/deprecated';
11
+ import { Card, CardBody, CardHeader, Popover, PopoverPosition, SelectOption, Spinner, TextArea, Tooltip, } from '@patternfly/react-core';
13
12
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
14
13
  import { EditorMode, ToastNotification, useFetch } from '@rh-support/components';
15
14
  import { fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
@@ -130,7 +129,7 @@ export function PreferencesCaseView(props) {
130
129
  });
131
130
  const onPrefCaseViewSelect = (event, selection) => __awaiter(this, void 0, void 0, function* () {
132
131
  try {
133
- let selectedView = event.currentTarget.getAttribute('data-index');
132
+ let selectedView = caseViewTypes.findIndex((option) => option.value === selection);
134
133
  updateOriginalCaseView(selectedView);
135
134
  setOriginalCaseView(+selectedView);
136
135
  }
@@ -192,7 +191,7 @@ export function PreferencesCaseView(props) {
192
191
  React.createElement(Trans, null, "Default case view"),
193
192
  React.createElement(Popover, { "aria-label": "Preferred-default-case-view-popover", position: PopoverPosition.top, bodyContent: React.createElement("p", { className: 'pref-case-popover-text' },
194
193
  React.createElement(Trans, null, "Choose the default view you want to see when looking at a case")), showClose: false },
195
- React.createElement(InfoCircleIcon, { "aria-label": "Preferred-default-case-view-info-icon", className: "pf-v5-u-ml-sm" }))));
194
+ React.createElement(InfoCircleIcon, { "aria-label": "Preferred-default-case-view-info-icon", className: "pf-v6-u-ml-sm" }))));
196
195
  return (React.createElement(Card, { className: "preference-card" },
197
196
  React.createElement(CardHeader, null,
198
197
  React.createElement("h3", null,
@@ -200,7 +199,7 @@ export function PreferencesCaseView(props) {
200
199
  React.createElement(CardBody, null,
201
200
  React.createElement("form", null,
202
201
  isInternalUserPermission && (React.createElement("div", { className: "form-group" },
203
- React.createElement(PreferenceSelect, { onSelect: onPrefCaseViewSelect, selections: caseViewPrefSelection(), id: defaultCaseViewID, label: prefCasePopover }, caseViewTypes.map((option, index) => (React.createElement(SelectOption, Object.assign({ "data-index": index, key: index, value: option.value }, (option.description && { description: option.description })))))))),
202
+ React.createElement(PreferenceSelect, { onSelect: (event, selection) => onPrefCaseViewSelect(event, selection), selections: caseViewPrefSelection(), id: defaultCaseViewID, label: prefCasePopover }, caseViewTypes.map((option, index) => (React.createElement(SelectOption, Object.assign({ "data-index": index, key: index, value: option.value }, (option.description && { description: option.description })))))))),
204
203
  React.createElement("div", { className: "form-group" },
205
204
  React.createElement(PreferenceSelect, { onSelect: onCommentSelect, selections: setOptionCase(originalCommentType, false), id: defaultCommentTitleID, label: "Default comment type" }, commentTypes.map((option, index) => (React.createElement(SelectOption, { key: index, value: setOptionCase(option, false) }))))),
206
205
  React.createElement("div", { className: "form-group" },
@@ -217,6 +216,6 @@ export function PreferencesCaseView(props) {
217
216
  React.createElement(PreferenceSwitch, { id: "share-hostnames-switch", label: 'Share hostnames', isChecked: isSharingHostNames, onSwitchChange: onShareHostNamesSwitch }),
218
217
  React.createElement("div", { className: "prefhostnameTooltip" },
219
218
  React.createElement(Tooltip, { content: prefHostnameCopy, position: "right" },
220
- React.createElement(InfoCircleIcon, { className: "pf-v5-u-ml-sm" })),
221
- isHostnamesLoading && (React.createElement(Spinner, { size: "lg", className: "pf-v5-u-ml-sm hostnameSpinner", "aria-label": "Hostname loading" }))))))))));
219
+ React.createElement(InfoCircleIcon, { className: "pf-v6-u-ml-sm" })),
220
+ isHostnamesLoading && (React.createElement(Spinner, { size: "lg", className: "pf-v6-u-ml-sm hostnameSpinner", "aria-label": "Hostname loading" }))))))))));
222
221
  }
@@ -1,5 +1,4 @@
1
1
  import { AlertVariant } from '@patternfly/react-core';
2
- import { IActions, IActionsResolver, IAreActionsDisabled } from '@patternfly/react-table';
3
2
  import { IColumn, ISortInfo } from '@rh-support/components';
4
3
  import React from 'react';
5
4
  interface IProps {
@@ -14,9 +13,9 @@ interface IProps {
14
13
  isError: boolean;
15
14
  pagination?: boolean;
16
15
  keepPageNumberOnDataChange?: boolean;
17
- actions?: IActions;
18
- areActionsDisabled?: IAreActionsDisabled;
19
- actionResolver?: IActionsResolver;
16
+ actions?: any;
17
+ areActionsDisabled?: any;
18
+ actionResolver?: any;
20
19
  noResultText?: string;
21
20
  perPage?: number;
22
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ManageTable.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageTable/ManageTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,EAQf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,SAAS,EAA4C,MAAM,wBAAwB,CAAC;AACtG,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAGrB,cAAc,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IAEjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,kBAAkB,CAAC,EAAE,mBAAmB,CAAC;IACzC,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AA+BD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBAoDxC"}
1
+ {"version":3,"file":"ManageTable.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageTable/ManageTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,EAMf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,SAAS,EAA4C,MAAM,wBAAwB,CAAC;AACtG,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAGrB,cAAc,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IAEjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,kBAAkB,CAAC,EAAE,GAAG,CAAC;IACzB,cAAc,CAAC,EAAE,GAAG,CAAC;IAErB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAwBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBAoDxC"}
@@ -9,34 +9,27 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import { Alert, AlertActionCloseButton, Bullseye, EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, PaginationVariant, } from '@patternfly/react-core';
13
- import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
12
+ import { Alert, AlertActionCloseButton, Bullseye, EmptyState, EmptyStateBody, EmptyStateVariant, PaginationVariant, } from '@patternfly/react-core';
13
+ // Removed direct imports from @patternfly/react-table to avoid version conflicts
14
14
  import { PFTable, TableComponent, TablePagination } from '@rh-support/components';
15
15
  import React from 'react';
16
16
  import { Trans } from 'react-i18next';
17
- const noResultFoundRow = (noResultString = '') => [
18
- {
19
- heightAuto: true,
20
- cells: [
21
- {
22
- props: { colSpan: 10 },
23
- title: (React.createElement(Bullseye, null,
24
- React.createElement(EmptyState, { variant: EmptyStateVariant.xs },
25
- React.createElement(EmptyStateHeader, { titleText: React.createElement(React.Fragment, null,
26
- React.createElement(Trans, null, "No results found")), icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }), headingLevel: "h3" }),
27
- React.createElement(EmptyStateBody, null, noResultString ? noResultString : React.createElement(Trans, null, "There are no results to display."))))),
28
- },
29
- ],
30
- },
31
- ];
17
+ const noResultFoundRow = (noResultString = '') => ({
18
+ heightAuto: true,
19
+ colSpan: 10,
20
+ content: (React.createElement(Bullseye, null,
21
+ React.createElement(EmptyState, { headingLevel: "h3", titleText: React.createElement(React.Fragment, null,
22
+ React.createElement(Trans, null, "No results found")), variant: EmptyStateVariant.xs },
23
+ React.createElement(EmptyStateBody, null, noResultString ? noResultString : React.createElement(Trans, null, "There are no results to display."))))),
24
+ });
32
25
  export function ManageTable(props) {
33
26
  const { ariaLabel, errorComponent, errorTitle, errorVariant, isError, isFetching, sortInfo, actions, keepPageNumberOnDataChange, areActionsDisabled, actionResolver } = props, tableProps = __rest(props, ["ariaLabel", "errorComponent", "errorTitle", "errorVariant", "isError", "isFetching", "sortInfo", "actions", "keepPageNumberOnDataChange", "areActionsDisabled", "actionResolver"]);
34
27
  const pagination = () => (props.pagination !== undefined ? props.pagination : true);
35
28
  return (React.createElement("div", { className: "table-wrapper" },
36
29
  isError && (React.createElement(React.Fragment, null,
37
- React.createElement(Alert, { variant: errorVariant, isInline: true, title: errorTitle, actionClose: React.createElement(AlertActionCloseButton, null), className: "pf-v5-u-my-sm" }, errorComponent))),
30
+ React.createElement(Alert, { variant: errorVariant, isInline: true, title: errorTitle, actionClose: React.createElement(AlertActionCloseButton, null), className: "pf-v6-u-my-sm" }, errorComponent))),
38
31
  React.createElement(TableComponent, Object.assign({}, tableProps),
39
- React.createElement(PFTable, { sortInfo: sortInfo, "aria-label": ariaLabel, pagination: pagination(), emptyStateRow: noResultFoundRow(props.noResultText), actions: actions, areActionsDisabled: areActionsDisabled, actionResolver: actionResolver, isLoading: isFetching, keepPageNumberOnDataChange: keepPageNumberOnDataChange }),
32
+ React.createElement(PFTable, Object.assign({ sortInfo: sortInfo, "aria-label": ariaLabel, pagination: pagination(), emptyStateRow: noResultFoundRow(props.noResultText) }, (actions && { actions }), (areActionsDisabled && { areActionsDisabled }), (actionResolver && { actionResolver }), { isLoading: isFetching, keepPageNumberOnDataChange: keepPageNumberOnDataChange })),
40
33
  tableProps.data.length > 0 && pagination() && (React.createElement("footer", null,
41
34
  React.createElement(TablePagination, { variant: PaginationVariant.bottom, perPage: props.perPage || 10 }))))));
42
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TagsManager.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageTags/TagsManager.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAOxE,MAAM,CAAC,OAAO,UAAU,WAAW,sBAyYlC"}
1
+ {"version":3,"file":"TagsManager.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageTags/TagsManager.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAOxE,MAAM,CAAC,OAAO,UAAU,WAAW,sBA8XlC"}
@@ -7,7 +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 { ActionList, ActionListItem, Bullseye, Button, ButtonVariant, EmptyState, EmptyStateVariant, Flex, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, Spinner, TextInput, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
10
+ import { ActionList, ActionListItem, Bullseye, Button, ButtonVariant, EmptyState, EmptyStateVariant, Flex, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalFooter, Spinner, TextInput, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
11
11
  import PencilAltIcon from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon';
12
12
  import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
13
13
  import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
@@ -191,18 +191,12 @@ export default function TagsManager() {
191
191
  cellWidth: 10,
192
192
  cell: (id) => (React.createElement(ActionList, { isIconList: true },
193
193
  React.createElement(ActionListItem, null,
194
- React.createElement(Button, { variant: "plain", "data-tracking-id": "edit-tag", "aria-label": `edit tag ${tagsByIds[id].tagName}`, onClick: () => onEditTagClick(tagsByIds[id]) },
195
- React.createElement(PencilAltIcon, null))),
194
+ React.createElement(Button, { icon: React.createElement(PencilAltIcon, null), variant: "plain", "data-tracking-id": "edit-tag", "aria-label": `edit tag ${tagsByIds[id].tagName}`, onClick: () => onEditTagClick(tagsByIds[id]) })),
196
195
  React.createElement(ActionListItem, null,
197
- React.createElement(Button, { "aria-label": `delete tag ${tagsByIds[id].tagName}`, variant: "plain", "data-tracking-id": "delete-tag", onClick: () => onDeleteTagClick(tagsByIds[id]) },
198
- React.createElement(TrashIcon, null))))),
196
+ React.createElement(Button, { icon: React.createElement(TrashIcon, null), "aria-label": `delete tag ${tagsByIds[id].tagName}`, variant: "plain", "data-tracking-id": "delete-tag", onClick: () => onDeleteTagClick(tagsByIds[id]) })))),
199
197
  },
200
198
  ];
201
- const CreateTagModel = (React.createElement(Modal, { title: t('Create a tag'), onClose: onCancelCreateNewTag, isOpen: createTagModalOpen, actions: [
202
- React.createElement(Button, { key: "create-tag", variant: ButtonVariant.primary, onClick: onCreateNewTag, isLoading: isCreatingNewTag, isDisabled: !isEmpty(createTagError) || isCreatingNewTag },
203
- React.createElement(Trans, null, "Create")),
204
- React.createElement(Button, { key: "cancel-create-tag", variant: ButtonVariant.link, onClick: onCancelCreateNewTag }, "Cancel"),
205
- ] },
199
+ const CreateTagModel = (React.createElement(Modal, { title: t('Create a tag'), onClose: onCancelCreateNewTag, isOpen: createTagModalOpen },
206
200
  React.createElement(FormGroup, { label: "Tag name", isRequired: true },
207
201
  React.createElement(TextInput, { isRequired: true, type: "text", id: "create-new-tag-text-input", value: newTagName, onChange: (e, v) => {
208
202
  setNewTagName(v);
@@ -210,12 +204,12 @@ export default function TagsManager() {
210
204
  }, placeholder: t('Enter a unique name to create a tag'), validated: isEmpty(createTagError) ? 'default' : 'error' }),
211
205
  !isEmpty(createTagError) && (React.createElement(FormHelperText, null,
212
206
  React.createElement(HelperText, null,
213
- React.createElement(HelperTextItem, { variant: "error" }, createTagError)))))));
214
- const EditTagModal = (React.createElement(Modal, { title: t('Edit Tag'), isOpen: editTagModalOpen, onClose: onEditCancel, actions: [
215
- React.createElement(Button, { key: "edit-tag", variant: ButtonVariant.primary, onClick: onEditTagConfirm, isLoading: isEditingTagName, isDisabled: !isEmpty(editTagError) || isEditingTagName },
216
- React.createElement(Trans, null, "Save")),
217
- React.createElement(Button, { key: "cancel-edit-tag", variant: ButtonVariant.link, onClick: onEditCancel }, "Cancel"),
218
- ] },
207
+ React.createElement(HelperTextItem, { variant: "error" }, createTagError))))),
208
+ React.createElement(ModalFooter, null,
209
+ React.createElement(Button, { key: "create-tag", variant: ButtonVariant.primary, onClick: onCreateNewTag, isLoading: isCreatingNewTag, isDisabled: !isEmpty(createTagError) || isCreatingNewTag },
210
+ React.createElement(Trans, null, "Create")),
211
+ React.createElement(Button, { key: "cancel-create-tag", variant: ButtonVariant.link, onClick: onCancelCreateNewTag }, "Cancel"))));
212
+ const EditTagModal = (React.createElement(Modal, { title: t('Edit Tag'), isOpen: editTagModalOpen, onClose: onEditCancel },
219
213
  React.createElement(FormGroup, { label: "Tag name", isRequired: true },
220
214
  React.createElement(TextInput, { isRequired: true, type: "text", id: "edit-tag-text-input", value: editTagName, onChange: (e, v) => {
221
215
  setEditTagName(v);
@@ -223,32 +217,35 @@ export default function TagsManager() {
223
217
  }, placeholder: t('Enter a unique name for this tag') }),
224
218
  !isEmpty(editTagError) && (React.createElement(FormHelperText, null,
225
219
  React.createElement(HelperText, null,
226
- React.createElement(HelperTextItem, { variant: "error" }, editTagError)))))));
227
- const DeleteTagModel = () => (React.createElement(Modal, { title: t('Are you sure?'), isOpen: deleteTagModalOpen, onClose: () => setDeleteTagModalOpen(false), actions: [
220
+ React.createElement(HelperTextItem, { variant: "error" }, editTagError))))),
221
+ React.createElement(ModalFooter, null,
222
+ React.createElement(Button, { key: "edit-tag", variant: ButtonVariant.primary, onClick: onEditTagConfirm, isLoading: isEditingTagName, isDisabled: !isEmpty(editTagError) || isEditingTagName },
223
+ React.createElement(Trans, null, "Save")),
224
+ React.createElement(Button, { key: "cancel-edit-tag", variant: ButtonVariant.link, onClick: onEditCancel }, "Cancel"))));
225
+ const DeleteTagModel = () => (React.createElement(Modal, { title: t('Are you sure?'), isOpen: deleteTagModalOpen, onClose: () => setDeleteTagModalOpen(false) },
226
+ React.createElement(Trans, null, "Deleting this tag will permanently untag all content associated with it. Are you sure you want to proceed?"),
227
+ React.createElement(ModalFooter, null,
228
228
  React.createElement(Button, { key: "delete-tag", variant: ButtonVariant.danger, onClick: onDeleteTagConfirm, isLoading: isDeletingTag, isDisabled: isDeletingTag },
229
229
  React.createElement(Trans, null, "Yes, I am sure")),
230
- React.createElement(Button, { key: "cancel-delete-tag", variant: ButtonVariant.link, onClick: () => setDeleteTagModalOpen(false) }, "Cancel"),
231
- ] },
232
- React.createElement(Trans, null, "Deleting this tag will permanently untag all content associated with it. Are you sure you want to proceed?")));
230
+ React.createElement(Button, { key: "cancel-delete-tag", variant: ButtonVariant.link, onClick: () => setDeleteTagModalOpen(false) }, "Cancel"))));
233
231
  return (React.createElement(React.Fragment, null,
234
232
  CreateTagModel,
235
233
  EditTagModal,
236
234
  React.createElement(DeleteTagModel, null),
237
235
  React.createElement("header", null,
238
236
  React.createElement("h2", null, "Tags"),
239
- React.createElement("p", { className: "pf-v5-u-my-sm" },
237
+ React.createElement("p", { className: "pf-v6-u-my-sm" },
240
238
  React.createElement(Trans, null, "Add, edit or remove tags and manage tagged top content."))),
241
239
  React.createElement("div", { className: "toolbar" },
242
- React.createElement(Flex, { alignItems: { default: 'alignItemsCenter' }, className: "pf-v5-u-w-100" },
240
+ React.createElement(Flex, { alignItems: { default: 'alignItemsCenter' }, className: "pf-v6-u-w-100" },
243
241
  React.createElement("label", { htmlFor: "tag-search-input" },
244
242
  React.createElement(Trans, null, "Search Tag")),
245
- React.createElement("div", { className: "pf-v5-u-flex-grow-1" },
243
+ React.createElement("div", { className: "pf-v6-u-flex-grow-1" },
246
244
  React.createElement(TextInputGroup, null,
247
245
  React.createElement(TextInputGroupMain, { type: "text", id: "tag-search-input", placeholder: t('Search for a tag'), icon: React.createElement(SearchIcon, null), value: tagSearchTerm, onChange: (e, v) => setTagSearchTerm(v) }),
248
246
  !isEmpty(tagSearchTerm) && (React.createElement(TextInputGroupUtilities, null,
249
- React.createElement(Button, { variant: "plain", onClick: onSearchClear, "aria-label": "Clear button and input" },
250
- React.createElement(TimesIcon, null)))))),
251
- React.createElement("span", { className: "pf-v5-u-ml-sm" },
247
+ React.createElement(Button, { icon: React.createElement(TimesIcon, null), variant: "plain", onClick: onSearchClear, "aria-label": "Clear button and input" }))))),
248
+ React.createElement("span", { className: "pf-v6-u-ml-sm" },
252
249
  React.createElement(Button, { variant: ButtonVariant.primary, isInline: true, onClick: () => {
253
250
  setCreateTagModalOpen(true);
254
251
  setNewTagName(tagSearchTerm);
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationEmailsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/NotificationEmails/NotificationEmailsModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,yBAAyB,EAAE,GAAG,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB,EAAE,OAAO,CAAC;IACnC,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,uBAAuB,UAAW,MAAM,sBA0NpD,CAAC"}
1
+ {"version":3,"file":"NotificationEmailsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/NotificationEmails/NotificationEmailsModal.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,yBAAyB,EAAE,GAAG,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB,EAAE,OAAO,CAAC;IACnC,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,uBAAuB,UAAW,MAAM,sBAyNpD,CAAC"}
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { customEmail } from '@cee-eng/hydrajs';
11
- import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalVariant, TextInput, ValidatedOptions, } from '@patternfly/react-core';
11
+ import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalFooter, ModalVariant, TextInput, ValidatedOptions, } from '@patternfly/react-core';
12
12
  import { ToastNotification, useFetch } from '@rh-support/components';
13
13
  import { isEmailValid } from '@rh-support/utils';
14
14
  import isEmpty from 'lodash/isEmpty';
@@ -105,18 +105,7 @@ export const NotificationEmailsModal = (props) => {
105
105
  const specialCharRegex = /[^a-zA-Z0-9\s]/;
106
106
  return specialCharRegex.test(s);
107
107
  };
108
- return (React.createElement(Modal, { id: "Add-edit-notification-email-modal", className: "pf-modal-overflow-visible", title: t('Edit notification email'), "aria-describedby": "Add-edit-notification-email-modal", isOpen: props.isOpen, onClose: props.onClose, showClose: true, onEscapePress: props.onClose, variant: ModalVariant.medium, actions: [
109
- React.createElement(Button, { key: "save", variant: ButtonVariant.primary, onClick: save, isDisabled: !isFormDirty() ||
110
- isUpdating ||
111
- isAdding ||
112
- !isValidFirstName ||
113
- !isValidLastName ||
114
- !isValidEmail ||
115
- isEmailDuplicate, spinnerAriaValueText: isUpdating || isAdding ? t('Adding') : undefined, isLoading: isUpdating || isAdding },
116
- React.createElement(Trans, null, "Save")),
117
- React.createElement(Button, { key: "cancel", isDisabled: isLoading, variant: ButtonVariant.secondary, onClick: close },
118
- React.createElement(Trans, null, "Cancel")),
119
- ] },
108
+ return (React.createElement(Modal, { id: "Add-edit-notification-email-modal", className: "pf-modal-overflow-visible", title: t('Edit notification email'), "aria-describedby": "Add-edit-notification-email-modal", isOpen: props.isOpen, onClose: props.onClose, onEscapePress: props.onClose, variant: ModalVariant.medium },
120
109
  React.createElement(Form, null,
121
110
  React.createElement(FormGroup, { label: t('Email address'), isRequired: true, fieldId: "email-notification-first-emailaddress" },
122
111
  React.createElement(TextInput, { value: email, isRequired: true, type: "text", onChange: (_event, localemail) => onEmailChange(localemail), "aria-label": t('Email address'), placeholder: t('Email address'), maxLength: 254, validated: isValidEmail && !isEmailDuplicate ? ValidatedOptions.default : ValidatedOptions.error, isDisabled: !props.isAddingNotificationEmail }),
@@ -135,5 +124,16 @@ export const NotificationEmailsModal = (props) => {
135
124
  !isValidLastName && (React.createElement(FormHelperText, null,
136
125
  React.createElement(HelperText, null,
137
126
  React.createElement(HelperTextItem, { variant: ValidatedOptions.error },
138
- React.createElement(Trans, null, "Last name cannot contain special characters")))))))));
127
+ React.createElement(Trans, null, "Last name cannot contain special characters"))))))),
128
+ React.createElement(ModalFooter, null,
129
+ React.createElement(Button, { key: "save", variant: ButtonVariant.primary, onClick: save, isDisabled: !isFormDirty() ||
130
+ isUpdating ||
131
+ isAdding ||
132
+ !isValidFirstName ||
133
+ !isValidLastName ||
134
+ !isValidEmail ||
135
+ isEmailDuplicate, spinnerAriaValueText: isUpdating || isAdding ? t('Adding') : undefined, isLoading: isUpdating || isAdding },
136
+ React.createElement(Trans, null, "Save")),
137
+ React.createElement(Button, { key: "cancel", isDisabled: isLoading, variant: ButtonVariant.secondary, onClick: close },
138
+ React.createElement(Trans, null, "Cancel")))));
139
139
  };
@@ -63,7 +63,6 @@ export function NotificationEmails() {
63
63
  yield confirmation({
64
64
  catchOnCancel: true,
65
65
  confirmText: t('Yes, I am sure'),
66
- confirmButtonVariant: ButtonVariant.danger,
67
66
  description: (React.createElement("strong", null,
68
67
  React.createElement(Trans, null, "Are you sure you want to remove this notification email?"))),
69
68
  });
@@ -163,12 +162,12 @@ export function NotificationEmails() {
163
162
  React.createElement("div", { className: "toolbar-left" },
164
163
  React.createElement("label", { htmlFor: "notification-emails-input" }, t('Add an Email')),
165
164
  React.createElement(TextInput, { id: "notification-email-input", placeholder: t('Enter a valid email address'), "aria-label": t('Enter a valid email address'), onChange: (_event, email) => onEmailInputBoxChange(email) }),
166
- React.createElement("span", { className: "pf-v5-u-ml-sm" },
165
+ React.createElement("span", { className: "pf-v6-u-ml-sm" },
167
166
  React.createElement(Button, { variant: ButtonVariant.primary, isInline: true, onClick: addEmail, "data-tracking-id": "email-address-add-button", isDisabled: isAddButtonDisabled },
168
167
  React.createElement(Trans, null, "Add")))),
169
168
  React.createElement("div", { className: "toolbar-right" },
170
169
  React.createElement("label", { htmlFor: "search-notification-emails-selector" }, t('Filter by')),
171
- React.createElement(SearchInput, { className: "pf-v5-u-flex-grow-1 pf-v5-c-search-input pf-v5-u-background-color-100", id: "search-notification-emails-selector", placeholder: t('Search for an existing email'), value: searchString, onChange: (_, value) => onSearchChange(value), onClear: () => onSearchChange(''), "aria-label": t('Search for an existing email') }))),
170
+ React.createElement(SearchInput, { className: "pf-v6-u-flex-grow-1 pf-v6-c-search-input pf-v6-u-background-color-100", id: "search-notification-emails-selector", placeholder: t('Search for an existing email'), value: searchString, onChange: (_, value) => onSearchChange(value), onClear: () => onSearchChange(''), "aria-label": t('Search for an existing email') }))),
172
171
  React.createElement(ManageTable, { ariaLabel: t('Table to manage Notification emails'), columns: columns, data: emailLists || [], sortInfo: { column: 'first-name', direction: 'asc' }, errorVariant: AlertVariant.warning, isFetching: accountCustomEmails.isFetching, isError: accountCustomEmails.isError, errorTitle: t('Notification emails error'), errorComponent: React.createElement(Trans, null, "Could not get notification emails"), actionResolver: emailLists && emailLists.length !== 0 ? actionResolver : null, keepPageNumberOnDataChange: keepPageNumberOnDataChange }),
173
172
  React.createElement(NotificationEmailsModal, { isOpen: isEditModalOpen, onClose: onModalClose, selectedEmailNotification: selectedEmailNotification, onUpdate: onUpdate, onAdd: onAdd, accountNumber: loggedInUserJwtToken.account_number, isAddingNotificationEmail: isAddingNotificationEmail, emailsList: (accountCustomEmails.data || []).map((e) => e.emailAddress) })));
174
173
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CategoryLimit.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/CategoryLimit/CategoryLimit.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAK5C,QAAA,MAAM,aAAa,EAAE,EAgCpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"CategoryLimit.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/CategoryLimit/CategoryLimit.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAK5C,QAAA,MAAM,aAAa,EAAE,EAmCpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -13,9 +13,8 @@ const CategoryLimit = () => {
13
13
  hide();
14
14
  setModalOpen(true);
15
15
  } }, "Review guidelines."))) },
16
- React.createElement(Button, { variant: "plain" },
17
- React.createElement(Icon, { size: "md" },
18
- React.createElement(CircleInfo, null)))),
16
+ React.createElement(Button, { icon: React.createElement(Icon, { size: "md" },
17
+ React.createElement(CircleInfo, null)), variant: "plain" })),
19
18
  React.createElement(CategoryLimitGuidelines, { isModalOpen: isModalOpen, onHideModal: onHideModal })));
20
19
  };
21
20
  export default CategoryLimit;
@@ -1,17 +1,17 @@
1
- import { Button, ButtonVariant, Modal, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
1
+ import { Button, ButtonVariant, Modal, ModalFooter, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
2
2
  import React from 'react';
3
3
  import { Trans } from 'react-i18next';
4
4
  import { CATEGORY_LIMIT, DIGIT_WORD_MAP } from '../../../constants/TopContent';
5
5
  import QuestionAnswer from './QuestionAnswer';
6
6
  export const CategoryLimitGuidelines = ({ isModalOpen, onHideModal }) => {
7
- return (React.createElement(Modal, { variant: ModalVariant.medium, id: "top-content-category-limit-guidelines", "aria-label": "top-content-category-limit-guidelines", isOpen: isModalOpen, onClose: onHideModal, actions: [
8
- React.createElement(Button, { variant: ButtonVariant.secondary, key: "close-button", onClick: onHideModal }, "Cancel"),
9
- ] },
7
+ return (React.createElement(Modal, { variant: ModalVariant.medium, id: "top-content-category-limit-guidelines", "aria-label": "top-content-category-limit-guidelines", isOpen: isModalOpen, onClose: onHideModal },
10
8
  React.createElement(Title, { headingLevel: "h1", size: TitleSizes['2xl'] },
11
9
  React.createElement(Trans, null, " Top content guideline ")),
12
10
  React.createElement(Trans, null,
13
- React.createElement("p", { className: "pf-v5-u-pt-sm" }, "Guidelines and limitations for top content resources.")),
11
+ React.createElement("p", { className: "pf-v6-u-pt-sm" }, "Guidelines and limitations for top content resources.")),
14
12
  React.createElement(QuestionAnswer, { question: "What is top content?", answer: "Top content is defined as the top resource for given product and version that will provide the most value for our customer and the highest likelihood for case deflection." }),
15
13
  React.createElement(QuestionAnswer, { question: "What is not top content", answer: "Resource that are accessible in other parts of the customer journey throughout the Customer Portal. For example, labs are not a top content resource. " }),
16
- React.createElement(QuestionAnswer, { question: "Category and link restrictions", answer: `we allow for a minimum of ${DIGIT_WORD_MAP[CATEGORY_LIMIT.MIN]} and max ${DIGIT_WORD_MAP[CATEGORY_LIMIT.MAX]} categories, and links within each category.` })));
14
+ React.createElement(QuestionAnswer, { question: "Category and link restrictions", answer: `we allow for a minimum of ${DIGIT_WORD_MAP[CATEGORY_LIMIT.MIN]} and max ${DIGIT_WORD_MAP[CATEGORY_LIMIT.MAX]} categories, and links within each category.` }),
15
+ React.createElement(ModalFooter, null,
16
+ React.createElement(Button, { variant: ButtonVariant.secondary, key: "close-button", onClick: onHideModal }, "Cancel"))));
17
17
  };
@@ -1,7 +1,7 @@
1
1
  import { Title } from '@patternfly/react-core';
2
2
  import React from 'react';
3
3
  import { Trans } from 'react-i18next';
4
- const QuestionAnswer = ({ question, answer }) => (React.createElement("div", { className: "pf-v5-u-pt-lg" },
4
+ const QuestionAnswer = ({ question, answer }) => (React.createElement("div", { className: "pf-v6-u-pt-lg" },
5
5
  React.createElement(Title, { headingLevel: "h6", size: "md" },
6
6
  React.createElement(Trans, null,
7
7
  " ",
@@ -1 +1 @@
1
- {"version":3,"file":"ContentAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/ContentAccordion.tsx"],"names":[],"mappings":"AAUA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,UAAU,MAAM;IACZ,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAsEvC,CAAC"}
1
+ {"version":3,"file":"ContentAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/ContentAccordion.tsx"],"names":[],"mappings":"AAUA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,UAAU,MAAM;IACZ,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,MAAM,CA+DvC,CAAC"}
@@ -23,13 +23,13 @@ export const ContentAccordion = ({ contentList, selectedVersion }) => {
23
23
  created: formatDate(updatedOn || createdOn),
24
24
  by: updatedBy || createdBy,
25
25
  });
26
- return (React.createElement(AccordionItem, { key: topContentId },
27
- React.createElement(AccordionToggle, { onClick: onToggle(topContentId), isExpanded: expanded === topContentId, id: contentTitle },
28
- React.createElement("span", { className: isAttentionNeeded ? 'pf-v5-u-danger-color-200' : '' },
26
+ return (React.createElement(AccordionItem, { isExpanded: expanded === topContentId, key: topContentId },
27
+ React.createElement(AccordionToggle, { onClick: onToggle(topContentId), id: contentTitle },
28
+ React.createElement("span", { className: isAttentionNeeded ? 'pf-v6-u-danger-color-200' : '' },
29
29
  ' ',
30
30
  contentTitle)),
31
- React.createElement(AccordionContent, { id: contentTitle, isHidden: expanded !== topContentId },
32
- React.createElement("span", { className: "pf-v5-u-font-size-sm" }, lastModifiedBy),
31
+ React.createElement(AccordionContent, { id: contentTitle },
32
+ React.createElement("span", { className: "pf-v6-u-font-size-sm" }, lastModifiedBy),
33
33
  React.createElement("br", null),
34
34
  React.createElement("br", null),
35
35
  React.createElement(PerformanceMetricClickCount, { needsAttention: isAttentionNeeded, contentId: topContentId, selectedVersion: selectedVersion }))));
@@ -1,15 +1,15 @@
1
- import { Button, Modal, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
1
+ import { Button, Modal, ModalFooter, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
2
2
  import React from 'react';
3
3
  import { Trans } from 'react-i18next';
4
4
  import { PerformanceMetricClickCount } from './PerformanceMetricClickCount';
5
5
  export const PerformanceMetrics = ({ isModalOpen, onHideModal, needsAttention, contentId, title, lastModifiedBy, selectedVersion, }) => {
6
- return (React.createElement(Modal, { variant: ModalVariant.small, id: "top-content-performance-metric", "aria-label": "top-content-performance-metric", isOpen: isModalOpen, onClose: onHideModal, actions: [
7
- React.createElement(Button, { variant: "secondary", key: "close-button", onClick: onHideModal }, "Cancel"),
8
- ] },
6
+ return (React.createElement(Modal, { variant: ModalVariant.small, id: "top-content-performance-metric", "aria-label": "top-content-performance-metric", isOpen: isModalOpen, onClose: onHideModal },
9
7
  React.createElement(Title, { headingLevel: "h1", size: TitleSizes['2xl'] },
10
8
  React.createElement(Trans, null, " Performance metrics ")),
11
- React.createElement("p", { className: "pf-v5-u-pb-lg pf-v5-u-pt-sm" }, "Better understand the Performance for the top content resources."),
12
- React.createElement("div", { className: "pf-v5-u-pb-xs top-content-tooltip-view-metric-label" }, title),
13
- React.createElement("div", { className: "pf-v5-u-pb-lg" }, lastModifiedBy),
14
- React.createElement(PerformanceMetricClickCount, { needsAttention: needsAttention, contentId: contentId, selectedVersion: selectedVersion })));
9
+ React.createElement("p", { className: "pf-v6-u-pb-lg pf-v6-u-pt-sm" }, "Better understand the Performance for the top content resources."),
10
+ React.createElement("div", { className: "pf-v6-u-pb-xs top-content-tooltip-view-metric-label" }, title),
11
+ React.createElement("div", { className: "pf-v6-u-pb-lg" }, lastModifiedBy),
12
+ React.createElement(PerformanceMetricClickCount, { needsAttention: needsAttention, contentId: contentId, selectedVersion: selectedVersion }),
13
+ React.createElement(ModalFooter, null,
14
+ React.createElement(Button, { variant: "secondary", key: "close-button", onClick: onHideModal }, "Cancel"))));
15
15
  };
@@ -1,9 +1,8 @@
1
- import { SelectOptionObject } from '@patternfly/react-core/deprecated';
2
- import React, { FC } from 'react';
1
+ import { FC } from 'react';
3
2
  interface IProps {
4
3
  placeholderText: string;
5
4
  title: string;
6
- onSelectCallback: (event: React.MouseEvent | React.ChangeEvent, value: string | SelectOptionObject, isPlaceholder?: boolean) => void;
5
+ onSelectCallback: (value: string, isPlaceholder?: boolean) => void;
7
6
  options: Array<any>;
8
7
  optionValue: (option: any) => string;
9
8
  isLoading?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"PerformanceMetricsSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,kBAAkB,EAAiB,MAAM,mCAAmC,CAAC;AAC5G,OAAO,KAAK,EAAE,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAG5C,UAAU,MAAM;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,CACd,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,WAAW,EAC3C,KAAK,EAAE,MAAM,GAAG,kBAAkB,EAClC,aAAa,CAAC,EAAE,OAAO,KACtB,IAAI,CAAC;IACV,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACpB,WAAW,EAAE,CAAC,MAAM,KAAA,KAAK,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,MAAM,CAuC/C,CAAC"}
1
+ {"version":3,"file":"PerformanceMetricsSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAG5C,UAAU,MAAM;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnE,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACpB,WAAW,EAAE,CAAC,MAAM,KAAA,KAAK,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,MAAM,CA2C/C,CAAC"}
@@ -1,20 +1,27 @@
1
- import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
1
+ import { SingleSelectDropdown } from '@rh-support/components';
2
2
  import React, { useState } from 'react';
3
3
  import { Trans } from 'react-i18next';
4
4
  export const PerformanceMetricsSelect = ({ placeholderText, title, onSelectCallback, options, optionValue, isLoading = false, isDisabled, }) => {
5
- const [isOpen, setOpen] = useState(false);
6
5
  const [selected, setSelected] = useState(null);
7
- const onToggle = (isOpen) => setOpen(isOpen);
8
- const onSelect = (e, selected) => {
9
- setSelected(selected);
10
- onSelectCallback(e, selected);
11
- setOpen(false);
6
+ const onSelect = (selected) => {
7
+ setSelected(selected.value);
8
+ onSelectCallback(selected.value);
9
+ };
10
+ const getSelectedDropdownOption = {
11
+ label: selected,
12
+ value: selected,
13
+ };
14
+ const getDropdownOptions = (options) => {
15
+ return options.map((option) => ({
16
+ label: optionValue(option),
17
+ value: optionValue(option),
18
+ }));
12
19
  };
13
20
  return (React.createElement(React.Fragment, null,
14
- React.createElement("div", { className: "pf-v5-u-font-weight-bold" },
21
+ React.createElement("div", { className: "pf-v6-u-font-weight-bold" },
15
22
  React.createElement(Trans, null,
16
23
  " ",
17
24
  title,
18
25
  " ")),
19
- React.createElement(Select, { variant: SelectVariant.single, placeholderText: placeholderText, "aria-label": "Select Input with descriptions", onToggle: (_event, isOpen) => onToggle(isOpen), onSelect: onSelect, selections: selected, isOpen: isOpen, isDisabled: isDisabled || isLoading }, options.map((option, index) => (React.createElement(SelectOption, { key: index, value: optionValue(option) }))))));
26
+ React.createElement(SingleSelectDropdown, { placeholder: placeholderText, ariaLabel: "Select Input with descriptions", options: getDropdownOptions(options), onSelect: onSelect, isDisabled: isDisabled || isLoading, selected: getSelectedDropdownOption })));
20
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"VersionPerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.tsx"],"names":[],"mappings":"AAKA,OAAc,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAUhE,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,MAAM,CAsGhD,CAAC"}
1
+ {"version":3,"file":"VersionPerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.tsx"],"names":[],"mappings":"AAcA,OAAc,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAUhE,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,MAAM,CAsGhD,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, Flex, FlexItem, Modal, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
11
+ import { Button, ButtonVariant, Flex, FlexItem, Modal, ModalFooter, ModalVariant, Title, TitleSizes, } from '@patternfly/react-core';
12
12
  import { useFetch } from '@rh-support/components';
13
13
  import isEmpty from 'lodash/isEmpty';
14
14
  import React, { useEffect, useMemo, useState } from 'react';
@@ -27,7 +27,7 @@ export const VersionPerformanceMetrics = ({ isModalOpen, onHideModal, selectedVe
27
27
  const { categoryUsage } = useTopContentContext();
28
28
  const { request: getTopContent, isFetching: isTopContentLoading, data: topContent, } = useFetch(pcm.topContent.getTopContent, { initialData: [] });
29
29
  const flagContentEditState = useMemo(() => flagContentUsage(topContent, categoryUsage, selectedVersion), [topContent, categoryUsage, selectedVersion]);
30
- const onVersionSelect = (e, selectedOption) => __awaiter(void 0, void 0, void 0, function* () {
30
+ const onVersionSelect = (selectedOption) => __awaiter(void 0, void 0, void 0, function* () {
31
31
  setVersion(selectedOption);
32
32
  getTopContent &&
33
33
  (yield getTopContent({
@@ -49,21 +49,21 @@ export const VersionPerformanceMetrics = ({ isModalOpen, onHideModal, selectedVe
49
49
  onHideModal();
50
50
  };
51
51
  const versionOptions = isMajorProjectVersion ? versionDifference : [selectedVersionProp];
52
- return (React.createElement(Modal, { variant: ModalVariant.large, id: "top-content-major-version-performance-metric", "aria-label": "top-content-performance-metric", isOpen: isModalOpen, onClose: onModalClose, actions: [
53
- React.createElement(Button, { variant: ButtonVariant.secondary, key: "close-button", onClick: onModalClose },
54
- React.createElement(Trans, null, "Cancel")),
55
- ], className: "performance-metrics-modal" },
52
+ return (React.createElement(Modal, { variant: ModalVariant.large, id: "top-content-major-version-performance-metric", "aria-label": "top-content-performance-metric", isOpen: isModalOpen, onClose: onModalClose, className: "performance-metrics-modal" },
56
53
  React.createElement("div", { className: "sticky-header" },
57
54
  React.createElement(Title, { headingLevel: "h1", size: TitleSizes['2xl'] },
58
55
  React.createElement(Trans, null, " Performance metrics ")),
59
- React.createElement("p", { className: "pf-v5-u-pt-sm" },
56
+ React.createElement("p", { className: "pf-v6-u-pt-sm" },
60
57
  React.createElement(Trans, null, "Better understand the Performance for the top content resources.")),
61
58
  React.createElement("br", null),
62
59
  React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
63
- React.createElement(FlexItem, { className: "pf-v5-u-w-50 pf-v5-u-pr-md", style: { marginRight: 'unset' } },
60
+ React.createElement(FlexItem, { className: "pf-v6-u-w-50 pf-v6-u-pr-md", style: { marginRight: 'unset' } },
64
61
  React.createElement(PerformanceMetricsSelect, { placeholderText: t(!isEmpty(versionOptions) ? 'Select a version' : 'No versions available'), title: t(`Version using ${selectedVersionProp}`), onSelectCallback: onVersionSelect, options: versionOptions, optionValue: (option) => option, isLoading: isLoading, isDisabled: isEmpty(versionOptions) })),
65
- React.createElement(FlexItem, { className: "pf-v5-u-w-50 pf-v5-u-pl-md" },
66
- React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a category'), title: t('Categories'), options: flagContentEditState, optionValue: (option) => option.categoryName, onSelectCallback: (e, selectedOption) => setSelectedCategory(selectedOption), isLoading: !selectedVersion || isTopContentLoading })))),
62
+ React.createElement(FlexItem, { className: "pf-v6-u-w-50 pf-v6-u-pl-md" },
63
+ React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a category'), title: t('Categories'), options: flagContentEditState, optionValue: (option) => option.categoryName, onSelectCallback: (selectedOption) => setSelectedCategory(selectedOption), isLoading: !selectedVersion || isTopContentLoading })))),
67
64
  React.createElement("br", null),
68
- React.createElement(ContentAccordion, { contentList: selectedContent, selectedVersion: selectedVersion })));
65
+ React.createElement(ContentAccordion, { contentList: selectedContent, selectedVersion: selectedVersion }),
66
+ React.createElement(ModalFooter, null,
67
+ React.createElement(Button, { variant: ButtonVariant.secondary, key: "close-button", onClick: onModalClose },
68
+ React.createElement(Trans, null, "Cancel")))));
69
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NoTopContentFound.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/NoTopContentFound.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CACX,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,EACf,mCAAmC,CAAC,EAAE,OAAO,KAC5C,IAAI,CAAC;IACV,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,4BAA4B,EAAE,OAAO,CAAC;CACzC;AAED,wBAAgB,iBAAiB,CAAC,EAC9B,OAAO,EACP,OAAO,EACP,UAAU,EACV,aAAa,EACb,eAAe,EACf,4BAA4B,GAC/B,EAAE,MAAM,qBA8FR"}
1
+ {"version":3,"file":"NoTopContentFound.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/NoTopContentFound.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CACX,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,EACf,mCAAmC,CAAC,EAAE,OAAO,KAC5C,IAAI,CAAC;IACV,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,4BAA4B,EAAE,OAAO,CAAC;CACzC;AAED,wBAAgB,iBAAiB,CAAC,EAC9B,OAAO,EACP,OAAO,EACP,UAAU,EACV,aAAa,EACb,eAAe,EACf,4BAA4B,GAC/B,EAAE,MAAM,qBA+FR"}