@rh-support/manage 2.4.10-beta.6 → 2.5.0

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 (212) hide show
  1. package/README.md +2 -0
  2. package/lib/esm/Manage.d.ts +2 -3
  3. package/lib/esm/Manage.d.ts.map +1 -1
  4. package/lib/esm/Manage.js +4 -10
  5. package/lib/esm/ManageTabs.d.ts +3 -1
  6. package/lib/esm/ManageTabs.d.ts.map +1 -1
  7. package/lib/esm/ManageTabs.js +54 -51
  8. package/lib/esm/Routes.d.ts +2 -0
  9. package/lib/esm/Routes.d.ts.map +1 -1
  10. package/lib/esm/Routes.js +21 -9
  11. package/lib/esm/components/Configs/ConfigInLineEdit.d.ts +2 -1
  12. package/lib/esm/components/Configs/ConfigInLineEdit.d.ts.map +1 -1
  13. package/lib/esm/components/Configs/ConfigSwitch.d.ts +2 -1
  14. package/lib/esm/components/Configs/ConfigSwitch.d.ts.map +1 -1
  15. package/lib/esm/components/Configs/ConfigSwitch.js +1 -1
  16. package/lib/esm/components/Configs/ConfigsTable.d.ts +2 -1
  17. package/lib/esm/components/Configs/ConfigsTable.d.ts.map +1 -1
  18. package/lib/esm/components/Configs/ConfigsTable.js +4 -3
  19. package/lib/esm/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.d.ts +2 -1
  20. package/lib/esm/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.d.ts.map +1 -1
  21. package/lib/esm/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.js +2 -1
  22. package/lib/esm/components/Groups/GroupSelect/GroupSelect.d.ts +2 -1
  23. package/lib/esm/components/Groups/GroupSelect/GroupSelect.d.ts.map +1 -1
  24. package/lib/esm/components/Groups/GroupSelect/GroupSelect.js +23 -11
  25. package/lib/esm/components/Groups/GroupUserPermissionsSelect/GroupUserPermissionsSelect.d.ts +2 -1
  26. package/lib/esm/components/Groups/GroupUserPermissionsSelect/GroupUserPermissionsSelect.d.ts.map +1 -1
  27. package/lib/esm/components/Groups/GroupUserPermissionsSelect/GroupUserPermissionsSelect.js +1 -1
  28. package/lib/esm/components/Groups/ManageGroupUsers/ManageGroupUsers.d.ts +2 -1
  29. package/lib/esm/components/Groups/ManageGroupUsers/ManageGroupUsers.d.ts.map +1 -1
  30. package/lib/esm/components/Groups/ManageGroupUsers/ManageGroupUsers.js +3 -3
  31. package/lib/esm/components/ManageBookmarkedAccountsTab/AddEditBookmarkModal.d.ts +2 -1
  32. package/lib/esm/components/ManageBookmarkedAccountsTab/AddEditBookmarkModal.d.ts.map +1 -1
  33. package/lib/esm/components/ManageBookmarkedAccountsTab/AddEditBookmarkModal.js +1 -1
  34. package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.d.ts +2 -1
  35. package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.d.ts.map +1 -1
  36. package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.js +15 -7
  37. package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkGroupSelector.d.ts +1 -1
  38. package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkGroupSelector.d.ts.map +1 -1
  39. package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkGroupSelector.js +8 -5
  40. package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.d.ts +2 -1
  41. package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.d.ts.map +1 -1
  42. package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.js +14 -11
  43. package/lib/esm/components/ManageExpiredContents/ExpiredContentCategory.d.ts +9 -0
  44. package/lib/esm/components/ManageExpiredContents/ExpiredContentCategory.d.ts.map +1 -0
  45. package/lib/esm/components/ManageExpiredContents/ExpiredContentCategory.js +31 -0
  46. package/lib/esm/components/ManageExpiredContents/ExpiredContentHeader.d.ts +3 -0
  47. package/lib/esm/components/ManageExpiredContents/ExpiredContentHeader.d.ts.map +1 -0
  48. package/lib/esm/components/ManageExpiredContents/ExpiredContentHeader.js +9 -0
  49. package/lib/esm/components/ManageExpiredContents/ExpiredContentManagement.d.ts +3 -0
  50. package/lib/esm/components/ManageExpiredContents/ExpiredContentManagement.d.ts.map +1 -0
  51. package/lib/esm/components/ManageExpiredContents/ExpiredContentManagement.js +13 -0
  52. package/lib/esm/components/ManageExpiredContents/ExpiredContentManager.d.ts +3 -0
  53. package/lib/esm/components/ManageExpiredContents/ExpiredContentManager.d.ts.map +1 -0
  54. package/lib/esm/components/ManageExpiredContents/ExpiredContentManager.js +68 -0
  55. package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItem.d.ts +9 -0
  56. package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItem.d.ts.map +1 -0
  57. package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItem.js +77 -0
  58. package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.d.ts +14 -0
  59. package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.d.ts.map +1 -0
  60. package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.js +179 -0
  61. package/lib/esm/components/ManageExpiredContents/index.d.ts +2 -0
  62. package/lib/esm/components/ManageExpiredContents/index.d.ts.map +1 -0
  63. package/lib/esm/components/ManageExpiredContents/index.js +1 -0
  64. package/lib/esm/components/ManagePartnerships/NonOrgCustomerInfoModal.d.ts +2 -1
  65. package/lib/esm/components/ManagePartnerships/NonOrgCustomerInfoModal.d.ts.map +1 -1
  66. package/lib/esm/components/ManagePartnerships/PartnershipsList.d.ts +2 -1
  67. package/lib/esm/components/ManagePartnerships/PartnershipsList.d.ts.map +1 -1
  68. package/lib/esm/components/ManagePartnerships/PartnershipsList.js +3 -3
  69. package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.d.ts +2 -1
  70. package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.d.ts.map +1 -1
  71. package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.js +42 -21
  72. package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.d.ts +2 -1
  73. package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.d.ts.map +1 -1
  74. package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.js +15 -13
  75. package/lib/esm/components/ManagePartnerships/Requests.d.ts +2 -1
  76. package/lib/esm/components/ManagePartnerships/Requests.d.ts.map +1 -1
  77. package/lib/esm/components/ManagePartnerships/Requests.js +25 -5
  78. package/lib/esm/components/ManagePartnerships/index.d.ts +2 -1
  79. package/lib/esm/components/ManagePartnerships/index.d.ts.map +1 -1
  80. package/lib/esm/components/ManagePartnerships/index.js +4 -3
  81. package/lib/esm/components/ManagePreferences/ManagePreferences.d.ts +2 -1
  82. package/lib/esm/components/ManagePreferences/ManagePreferences.d.ts.map +1 -1
  83. package/lib/esm/components/ManagePreferences/ManagePreferences.js +1 -2
  84. package/lib/esm/components/ManagePreferences/Preferences.d.ts +2 -1
  85. package/lib/esm/components/ManagePreferences/Preferences.d.ts.map +1 -1
  86. package/lib/esm/components/ManagePreferences/PreferencesBody.d.ts +2 -1
  87. package/lib/esm/components/ManagePreferences/PreferencesBody.d.ts.map +1 -1
  88. package/lib/esm/components/ManagePreferences/PreferencesBody.js +1 -1
  89. package/lib/esm/components/ManagePreferences/PreferencesHeader.d.ts +2 -1
  90. package/lib/esm/components/ManagePreferences/PreferencesHeader.d.ts.map +1 -1
  91. package/lib/esm/components/ManagePreferences/PreferencesHeader.js +1 -1
  92. package/lib/esm/components/ManagePreferences/components/PreferenceSelect.d.ts +1 -1
  93. package/lib/esm/components/ManagePreferences/components/PreferenceSelect.d.ts.map +1 -1
  94. package/lib/esm/components/ManagePreferences/components/PreferenceSelect.js +5 -3
  95. package/lib/esm/components/ManagePreferences/components/PreferenceSwitch.d.ts +2 -1
  96. package/lib/esm/components/ManagePreferences/components/PreferenceSwitch.d.ts.map +1 -1
  97. package/lib/esm/components/ManagePreferences/components/PreferenceSwitch.js +1 -1
  98. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.d.ts +2 -1
  99. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.d.ts.map +1 -1
  100. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.js +13 -2
  101. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseSearch.d.ts +2 -1
  102. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseSearch.d.ts.map +1 -1
  103. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseSearch.js +6 -4
  104. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.d.ts +2 -1
  105. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.d.ts.map +1 -1
  106. package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.js +12 -11
  107. package/lib/esm/components/ManageTable/ManageTable.d.ts +1 -1
  108. package/lib/esm/components/ManageTable/ManageTable.d.ts.map +1 -1
  109. package/lib/esm/components/ManageTable/ManageTable.js +7 -8
  110. package/lib/esm/components/ManageTags/TagsManagement.d.ts +3 -0
  111. package/lib/esm/components/ManageTags/TagsManagement.d.ts.map +1 -0
  112. package/lib/esm/components/ManageTags/TagsManagement.js +11 -0
  113. package/lib/esm/components/ManageTags/TagsManager.d.ts +3 -0
  114. package/lib/esm/components/ManageTags/TagsManager.d.ts.map +1 -0
  115. package/lib/esm/components/ManageTags/TagsManager.js +261 -0
  116. package/lib/esm/components/ManageTags/index.d.ts +2 -0
  117. package/lib/esm/components/ManageTags/index.d.ts.map +1 -0
  118. package/lib/esm/components/ManageTags/index.js +1 -0
  119. package/lib/esm/components/NotificationEmails/NotificationEmailsModal.d.ts +2 -1
  120. package/lib/esm/components/NotificationEmails/NotificationEmailsModal.d.ts.map +1 -1
  121. package/lib/esm/components/NotificationEmails/NotificationEmailsModal.js +32 -7
  122. package/lib/esm/components/NotificationEmails/index.d.ts +2 -1
  123. package/lib/esm/components/NotificationEmails/index.d.ts.map +1 -1
  124. package/lib/esm/components/NotificationEmails/index.js +4 -4
  125. package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimit.d.ts.map +1 -1
  126. package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimit.js +3 -2
  127. package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimitGuidelines.js +1 -1
  128. package/lib/esm/components/TopContentManagement/CategoryLimit/QuestionAnswer.js +1 -1
  129. package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.d.ts.map +1 -1
  130. package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.js +2 -2
  131. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.d.ts.map +1 -1
  132. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.js +3 -3
  133. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.d.ts +1 -1
  134. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.d.ts.map +1 -1
  135. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.js +3 -3
  136. package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.d.ts.map +1 -1
  137. package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.js +4 -4
  138. package/lib/esm/components/TopContentManagement/NoTopContentFound.d.ts +2 -1
  139. package/lib/esm/components/TopContentManagement/NoTopContentFound.d.ts.map +1 -1
  140. package/lib/esm/components/TopContentManagement/NoTopContentFound.js +14 -15
  141. package/lib/esm/components/TopContentManagement/TopContent.d.ts +2 -1
  142. package/lib/esm/components/TopContentManagement/TopContent.d.ts.map +1 -1
  143. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.d.ts +2 -1
  144. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.d.ts.map +1 -1
  145. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.js +8 -3
  146. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategory.d.ts +1 -1
  147. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategory.d.ts.map +1 -1
  148. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategory.js +3 -2
  149. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategoryNew.d.ts +2 -1
  150. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategoryNew.d.ts.map +1 -1
  151. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.d.ts.map +1 -1
  152. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.js +2 -2
  153. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.d.ts +6 -2
  154. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.d.ts.map +1 -1
  155. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.js +178 -59
  156. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.js +1 -1
  157. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.d.ts +2 -1
  158. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.d.ts.map +1 -1
  159. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.js +59 -15
  160. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestion.d.ts +1 -0
  161. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestion.d.ts.map +1 -1
  162. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestion.js +35 -10
  163. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHint.js +3 -3
  164. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.d.ts.map +1 -1
  165. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.js +26 -20
  166. package/lib/esm/components/TopContentManagement/TopContentHeader.d.ts +2 -1
  167. package/lib/esm/components/TopContentManagement/TopContentHeader.d.ts.map +1 -1
  168. package/lib/esm/components/TopContentManagement/TopContentHeader.js +1 -1
  169. package/lib/esm/components/TopContentManagement/TopContentManagement.d.ts +2 -1
  170. package/lib/esm/components/TopContentManagement/TopContentManagement.d.ts.map +1 -1
  171. package/lib/esm/components/TopContentManagement/TopContentManagement.js +4 -3
  172. package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.d.ts +2 -1
  173. package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.d.ts.map +1 -1
  174. package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.js +6 -6
  175. package/lib/esm/context/ExpiredContentContextProvider.d.ts +8 -0
  176. package/lib/esm/context/ExpiredContentContextProvider.d.ts.map +1 -0
  177. package/lib/esm/context/ExpiredContentContextProvider.js +10 -0
  178. package/lib/esm/context/ManagePartnershipsProvider.d.ts +1 -1
  179. package/lib/esm/context/ManagePartnershipsProvider.d.ts.map +1 -1
  180. package/lib/esm/context/TagManagementContextProvider.d.ts +8 -0
  181. package/lib/esm/context/TagManagementContextProvider.d.ts.map +1 -0
  182. package/lib/esm/context/TagManagementContextProvider.js +10 -0
  183. package/lib/esm/context/TopContentProvider.d.ts +1 -1
  184. package/lib/esm/context/TopContentProvider.d.ts.map +1 -1
  185. package/lib/esm/context/TopContentProvider.js +1 -0
  186. package/lib/esm/hooks/useUserPreferences.d.ts +13 -12
  187. package/lib/esm/hooks/useUserPreferences.d.ts.map +1 -1
  188. package/lib/esm/hooks/useUserPreferences.js +0 -1
  189. package/lib/esm/index.d.ts +1 -0
  190. package/lib/esm/index.d.ts.map +1 -1
  191. package/lib/esm/index.js +1 -0
  192. package/lib/esm/reducers/ExpiredContentReducer.d.ts +36 -0
  193. package/lib/esm/reducers/ExpiredContentReducer.d.ts.map +1 -0
  194. package/lib/esm/reducers/ExpiredContentReducer.js +207 -0
  195. package/lib/esm/reducers/ManagePartnershipsReducer.d.ts +2 -2
  196. package/lib/esm/reducers/ManagePartnershipsReducer.d.ts.map +1 -1
  197. package/lib/esm/reducers/TagManagmentReducer.d.ts +27 -0
  198. package/lib/esm/reducers/TagManagmentReducer.d.ts.map +1 -0
  199. package/lib/esm/reducers/TagManagmentReducer.js +144 -0
  200. package/lib/esm/reducers/TopContentHelpers.d.ts.map +1 -1
  201. package/lib/esm/reducers/TopContentHelpers.js +4 -4
  202. package/lib/esm/reducers/TopContentReducer.d.ts +12 -7
  203. package/lib/esm/reducers/TopContentReducer.d.ts.map +1 -1
  204. package/lib/esm/reducers/TopContentReducer.js +61 -23
  205. package/lib/esm/scss/_main.scss +87 -55
  206. package/lib/esm/scss/_pf-overrides.scss +181 -0
  207. package/lib/esm/scss/index.scss +7 -7
  208. package/package.json +42 -42
  209. package/lib/esm/ManageTab.d.ts +0 -8
  210. package/lib/esm/ManageTab.d.ts.map +0 -1
  211. package/lib/esm/ManageTab.js +0 -12
  212. package/lib/esm/scss/_pf4-overrides.scss +0 -132
@@ -9,7 +9,7 @@ export const TopContentSingleItemLink = ({ title, url, needsAttention = false, c
9
9
  const onOpenModal = () => setModalOpen(true);
10
10
  const content = (React.createElement(React.Fragment, null,
11
11
  React.createElement(Trans, null, " Performance is low. This link will be removed in 7 days."),
12
- React.createElement("span", { onClick: onOpenModal, style: { color: 'var(--pf-global--primary-color--100)' } },
12
+ React.createElement("span", { onClick: onOpenModal, style: { color: 'var(--pf-v5-global--primary-color--100)' } },
13
13
  React.createElement(Trans, null, "View performance metrics"))));
14
14
  return (React.createElement(React.Fragment, null,
15
15
  needsAttention && (React.createElement(Tooltip, { content: content, exitDelay: 500 },
@@ -1,2 +1,3 @@
1
- export declare function TopContentEditor(): JSX.Element;
1
+ import React from 'react';
2
+ export declare function TopContentEditor(): React.JSX.Element;
2
3
  //# sourceMappingURL=TopContentEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/TopContentEditor/TopContentEditor.tsx"],"names":[],"mappings":"AA4CA,wBAAgB,gBAAgB,gBAsT/B"}
1
+ {"version":3,"file":"TopContentEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/TopContentEditor/TopContentEditor.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAiChF,wBAAgB,gBAAgB,sBAoX/B"}
@@ -8,16 +8,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { Accordion, Alert, AlertVariant, Bullseye, Button, EmptyState, EmptyStateVariant, Spinner, Tooltip, } from '@patternfly/react-core';
11
- import { ToastNotification, TopContentSearch } from '@rh-support/components';
11
+ import { TagsSelector, ToastNotification, TopContentSearch } from '@rh-support/components';
12
12
  import { getVersion, isRegularVersion } from '@rh-support/utils';
13
13
  import isEmpty from 'lodash/isEmpty';
14
- import React, { useEffect, useMemo, useRef, useState } from 'react';
14
+ import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
15
15
  import { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
16
16
  import { Trans, useTranslation } from 'react-i18next';
17
17
  import { CATEGORY_LIMIT } from '../../../constants/TopContent';
18
+ import { TagManagementDispatchContext, TagManagementStateContext } from '../../../context/TagManagementContextProvider';
18
19
  import { useTopContentContext, useTopContentDispatchContext } from '../../../context/TopContentProvider';
20
+ import { fetchTopContentTags } from '../../../reducers/TagManagmentReducer';
19
21
  import { flagContentUsage, isMajorOrNamedVersion } from '../../../reducers/TopContentHelpers';
20
- import { CategoryMode, fetchTopContent, reArrangeCategory, resetChangeInCategory, resetContentWithSelectedProduct, resetDuplicatUrls, setAddNewSection, setIsAddingCategory, setIsSearchModeEnabled, setTopContentArrangingCategory, setTopContentArrangingContent, } from '../../../reducers/TopContentReducer';
22
+ import { CategoryMode, ContentMode, fetchTopContent, reArrangeCategory, resetChangeInCategory, resetContentWithSelectedProduct, resetDuplicatUrls, setAddNewSection, setFilteredTags, setIsAddingCategory, setIsSearchModeEnabled, setTopContentArrangingCategory, setTopContentArrangingContent, } from '../../../reducers/TopContentReducer';
21
23
  import CategoryLimit from '../CategoryLimit/CategoryLimit';
22
24
  import { VersionPerformanceMetrics } from '../ContentUsage/VersionPerformanceMetrics';
23
25
  import { NoTopContentFound } from '../NoTopContentFound';
@@ -31,11 +33,14 @@ export function TopContentEditor() {
31
33
  const [categoryToOpen, setCategoryToOpen] = useState(null);
32
34
  const [isArrangingCats, setIsArrangingCats] = useState(false);
33
35
  const [newCategoryVersion, setNewCategoryVersion] = useState(undefined);
36
+ const [searchQuery, setSearchQuery] = useState('');
34
37
  const topContentResultsRef = useRef(null);
35
- const { topContentResponse, topContentEditState, isAddingCategory, isCatOnlyForMajorVersion, isSearchModeEnabled, selectedProduct, selectedVersion, categoryUsage, } = useTopContentContext();
38
+ const { topContentResponse, topContentEditState, isAddingCategory, isCatOnlyForMajorVersion, isSearchModeEnabled, selectedProduct, selectedVersion, categoryUsage, filteredTags, } = useTopContentContext();
39
+ const { tags } = useContext(TagManagementStateContext);
36
40
  const topContentDispatch = useTopContentDispatchContext();
41
+ const tagManagerDispatch = useContext(TagManagementDispatchContext);
37
42
  const flagContentEditState = useMemo(() => flagContentUsage(topContentEditState, categoryUsage, selectedVersion), [topContentEditState, categoryUsage, selectedVersion]);
38
- const [filteredTC, setFilteredTC] = useState(flagContentEditState);
43
+ const [filteredByQueryTC, setFilteredByQueryTC] = useState(flagContentEditState);
39
44
  const onProductChange = (selectedProduct) => {
40
45
  resetContentWithSelectedProduct(topContentDispatch, selectedProduct);
41
46
  };
@@ -47,10 +52,38 @@ export function TopContentEditor() {
47
52
  return;
48
53
  fetchTopContent(topContentDispatch, selectedProduct, selectedVersion);
49
54
  };
55
+ const filteredTC = useMemo(() => {
56
+ if (isEmpty(filteredTags))
57
+ return filteredByQueryTC;
58
+ const filteredTagsIds = filteredTags.map((tag) => tag.id);
59
+ //filter top contents on basis of tags
60
+ const filteredData = filteredByQueryTC.flatMap((item) => {
61
+ const filteredContents = item.content.filter((content) => (content.tags || []).some((tag) => filteredTagsIds.includes(tag.id)));
62
+ // if there is any new addition of content we will find and add that to contents
63
+ const newContent = item.content.find((item) => item.mode === ContentMode.ADD);
64
+ const contents = !isEmpty(newContent) ? [...filteredContents, newContent] : [...filteredContents];
65
+ if (!isEmpty(contents))
66
+ return [Object.assign(Object.assign({}, item), { content: contents })];
67
+ return [];
68
+ });
69
+ return filteredData;
70
+ }, [filteredByQueryTC, filteredTags]);
50
71
  useEffect(() => {
51
- !isSearchModeEnabled && setFilteredTC(flagContentEditState);
72
+ !isSearchModeEnabled && setFilteredByQueryTC(flagContentEditState);
52
73
  // eslint-disable-next-line react-hooks/exhaustive-deps
53
74
  }, [flagContentEditState]);
75
+ const getTopContentTags = () => __awaiter(this, void 0, void 0, function* () {
76
+ try {
77
+ yield fetchTopContentTags(tagManagerDispatch, false);
78
+ }
79
+ catch (err) {
80
+ ToastNotification.addDangerMessage(t('Error loading tag details'));
81
+ }
82
+ });
83
+ useEffect(() => {
84
+ getTopContentTags();
85
+ // eslint-disable-next-line react-hooks/exhaustive-deps
86
+ }, []);
54
87
  const onAddCategory = (isMajorVersionOnly, isCreatingNewSet = false, version, hasMajorContentCreatingMinorContent) => {
55
88
  hasMajorContentCreatingMinorContent && resetDuplicatUrls(topContentDispatch);
56
89
  setCategoryToOpen(null);
@@ -96,7 +129,8 @@ export function TopContentEditor() {
96
129
  !isAddingCategory &&
97
130
  selectedVersion &&
98
131
  flagContentEditState.length !== 0 &&
99
- !isSearchModeEnabled;
132
+ !isSearchModeEnabled &&
133
+ isEmpty(filteredTags);
100
134
  const isContentOnlyForMajorVersion = !topContentResponse.isFetching &&
101
135
  flagContentEditState.length !== 0 &&
102
136
  isRegularVersion(selectedVersion) &&
@@ -104,7 +138,10 @@ export function TopContentEditor() {
104
138
  !isAddingCategory;
105
139
  const onSearch = (searchTerm, searchResults) => {
106
140
  setIsSearchModeEnabled(topContentDispatch, searchTerm ? true : false);
107
- setFilteredTC(searchResults);
141
+ setFilteredByQueryTC(searchResults);
142
+ };
143
+ const onTagFilterChange = (tags) => {
144
+ setFilteredTags(topContentDispatch, tags);
108
145
  };
109
146
  const minorSelectedNoMinorContentButAvailableMajorContent = isContentOnlyForMajorVersion && getVersion(selectedVersion).minor && flagContentEditState.length !== 0;
110
147
  const isCategoryLimitReached = filteredTC.length >= CATEGORY_LIMIT.MAX;
@@ -112,9 +149,14 @@ export function TopContentEditor() {
112
149
  React.createElement(TopContentHeader, null),
113
150
  !topContentResponse.isFetching && topContentResponse.isError && (React.createElement(Alert, { isInline: true, variant: AlertVariant.danger, title: React.createElement(Trans, null, "Error loading Top Content") })),
114
151
  React.createElement(TopContentProductVersionSelector, { selectedProduct: selectedProduct, selectedVersion: selectedVersion, onProductChange: onProductChange, onVersionChange: onVersionChange }),
115
- !topContentResponse.isFetching && (React.createElement(TopContentSearch, { dataTrackingId: "top-content-filter-manage", topContentData: flagContentEditState, onSearch: onSearch, topContentResultsWrapperRef: topContentResultsRef })),
116
- React.createElement("div", { className: "top-content-manage-wrapper pf-u-pt-md" },
117
- !topContentResponse.isFetching && !!filteredTC.length && React.createElement(TopContentSuggestion, null),
152
+ !topContentResponse.isFetching && (React.createElement("div", { className: "toolbar" },
153
+ React.createElement(TopContentSearch, { dataTrackingId: "top-content-filter-manage", topContentData: flagContentEditState, onSearch: onSearch, topContentResultsWrapperRef: topContentResultsRef, searchQuery: searchQuery, setSearchQuery: setSearchQuery, className: "toolbar-content", isDisabled: isEmpty(flagContentEditState) }),
154
+ React.createElement("div", { className: "toolbar-content pf-v5-u-ml-md" },
155
+ React.createElement("label", { htmlFor: 'tag-selector' },
156
+ React.createElement(Trans, null, "All tags")),
157
+ React.createElement(TagsSelector, { tagOptions: tags, onChange: onTagFilterChange, selectedTags: filteredTags, disabled: isEmpty(flagContentEditState) })))),
158
+ React.createElement("div", { className: "top-content-manage-wrapper pf-v5-u-pt-md" },
159
+ !topContentResponse.isFetching && React.createElement(TopContentSuggestion, { searchQuery: searchQuery }),
118
160
  topContentResponse.isFetching ? (React.createElement(Bullseye, null,
119
161
  React.createElement(EmptyState, { variant: EmptyStateVariant.full },
120
162
  React.createElement(Spinner, { size: "lg" })))) : (!topContentResponse.isFetching &&
@@ -128,14 +170,16 @@ export function TopContentEditor() {
128
170
  !topContentResponse.isFetching &&
129
171
  filteredTC.map((category, i) => (React.createElement("div", { key: `div-${i}-${category.id}` },
130
172
  category.catMode === CategoryMode.EXISTING_SECTION && (React.createElement(Draggable, { draggableId: `c${category.id}`, index: i, isDragDisabled: !isArrangingCats, key: `c-${i}-${category.id}` }, (provided, snapshot) => category.helperText ? (React.createElement(Tooltip, { content: React.createElement("div", null, category.helperText) },
131
- React.createElement(TopContentCategory, { isExpanded: isSearchModeEnabled
173
+ React.createElement(TopContentCategory, { isExpanded: isSearchModeEnabled ||
174
+ !isEmpty(filteredTags)
132
175
  ? true
133
- : category.id === categoryToOpen, category: category, provided: provided, innerRef: provided.innerRef, isArrangingCats: isArrangingCats, snapshot: snapshot }))) : (React.createElement(TopContentCategory, { isExpanded: isSearchModeEnabled
176
+ : category.id === categoryToOpen, category: category, provided: provided, innerRef: provided.innerRef, isArrangingCats: isArrangingCats, snapshot: snapshot }))) : (React.createElement(TopContentCategory, { isExpanded: isSearchModeEnabled ||
177
+ !isEmpty(filteredTags)
134
178
  ? true
135
179
  : category.id === categoryToOpen, category: category, provided: provided, innerRef: provided.innerRef, isArrangingCats: isArrangingCats, snapshot: snapshot })))),
136
180
  category.catMode === CategoryMode.NEW_SECTION && (React.createElement(TopContentCategoryNew, { category: category, key: 'new-section', version: newCategoryVersion }))))),
137
181
  provided.placeholder),
138
- React.createElement("div", { className: "pf-u-p-md" },
182
+ React.createElement("div", { className: "pf-v5-u-p-md" },
139
183
  showSectionFooter && (React.createElement(React.Fragment, null,
140
184
  isCategoryLimitReached && React.createElement(CategoryLimit, null),
141
185
  React.createElement(Button, { variant: "primary", onClick: () => onAddCategory(isContentOnlyForMajorVersion, false, selectedVersion), isDisabled: isCategoryLimitReached, "data-tracking-id": "add-new-section-topcontent" },
@@ -143,7 +187,7 @@ export function TopContentEditor() {
143
187
  ' ',
144
188
  React.createElement(Button, { variant: "secondary", onClick: arrangeSection, isDisabled: flagContentEditState.length < 2 },
145
189
  React.createElement(Trans, null, "Arrange section")),
146
- isMajorOrNamedVersion(selectedVersion) && (React.createElement(Button, { variant: "link", className: "pf-u-float-right", isInline: true, onClick: onOpenModal },
190
+ isMajorOrNamedVersion(selectedVersion) && (React.createElement(Button, { variant: "link", className: "pf-v5-u-float-right", isInline: true, onClick: onOpenModal },
147
191
  React.createElement(Trans, null, "View performance"))))),
148
192
  isArrangingCats && (React.createElement(React.Fragment, null,
149
193
  React.createElement(Button, { variant: "primary", onClick: onSaveArrangement },
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  interface IProps {
3
+ searchQuery?: string;
3
4
  }
4
5
  export declare const TopContentSuggestion: FC<IProps>;
5
6
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentSuggestion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestion.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAuB,MAAM,OAAO,CAAC;AAOvD,UAAU,MAAM;CAAG;AAEnB,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,MAAM,CA6C3C,CAAC"}
1
+ {"version":3,"file":"TopContentSuggestion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestion.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,EAAE,EAAwC,MAAM,OAAO,CAAC;AAWxE,UAAU,MAAM;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,MAAM,CA8E3C,CAAC"}
@@ -1,30 +1,55 @@
1
1
  import { ExpandableSection, Panel, PanelMain, PanelMainBody, Title } from '@patternfly/react-core';
2
+ import { useSearchDocument } from '@rh-support/components';
2
3
  import isEmpty from 'lodash/isEmpty';
3
- import React, { useEffect, useState } from 'react';
4
+ import Mark from 'mark.js';
5
+ import React, { useEffect, useMemo, useRef, useState } from 'react';
4
6
  import { Trans } from 'react-i18next';
5
7
  import { useTopContentContext, useTopContentDispatchContext } from '../../../../context/TopContentProvider';
6
- import { fetchTopContentSuggestions } from '../../../../reducers/TopContentReducer';
8
+ import { fetchTopContentSuggestions, } from '../../../../reducers/TopContentReducer';
7
9
  import { TopContentSuggestionHint } from './TopContentSuggestionHint';
8
- export const TopContentSuggestion = () => {
9
- var _a;
10
+ export const TopContentSuggestion = ({ searchQuery = '' }) => {
10
11
  const [isExpanded, setExpanded] = useState(false);
12
+ const ref = useRef(null);
11
13
  const onToggle = () => setExpanded((previousExpandedState) => !previousExpandedState);
12
14
  const { selectedProduct, selectedVersion, suggestion, topContentResponse } = useTopContentContext();
13
15
  const topContentDispatch = useTopContentDispatchContext();
14
- const topContent = topContentResponse.data.reduce((ret, category) => {
16
+ const topContent = useMemo(() => topContentResponse.data.reduce((ret, category) => {
15
17
  return [...ret, ...category.content];
16
- }, []);
17
- const filteredSuggestion = (_a = suggestion.linkedResources) === null || _a === void 0 ? void 0 : _a.filter((resource) => !topContent.some((content) => content.contentUrl === resource.resourceViewUri));
18
+ }, []), [topContentResponse.data]);
19
+ const filteredSuggestion = useMemo(() => {
20
+ var _a;
21
+ return (_a = suggestion.linkedResources) === null || _a === void 0 ? void 0 : _a.filter((resource) => !topContent.some((content) => content.contentUrl === resource.resourceViewUri));
22
+ }, [suggestion.linkedResources, topContent]);
18
23
  useEffect(() => {
19
24
  if ((selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.name) && selectedVersion) {
20
25
  fetchTopContentSuggestions(topContentDispatch, selectedProduct.name, selectedVersion);
21
26
  }
22
27
  }, [topContentDispatch, selectedProduct, selectedVersion]);
23
- if (isEmpty(filteredSuggestion))
28
+ const searchedContent = useSearchDocument(filteredSuggestion || [], searchQuery, {
29
+ indexKey: 'id',
30
+ strategy: (doc) => doc.resourceTitle,
31
+ });
32
+ useEffect(() => {
33
+ var _a;
34
+ if (ref.current == null)
35
+ return;
36
+ setExpanded(!isEmpty(searchQuery));
37
+ const containers = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('div.pf-v5-c-card');
38
+ const markInstance = new Mark(containers);
39
+ markInstance.unmark({
40
+ done: () => {
41
+ if (isEmpty(searchQuery))
42
+ return;
43
+ markInstance.mark(searchQuery, { separateWordSearch: true });
44
+ },
45
+ });
46
+ }, [searchedContent, searchQuery]);
47
+ if (isEmpty(searchedContent))
24
48
  return React.createElement(React.Fragment, null);
25
- return (React.createElement(Panel, { variant: "raised", className: "pf-u-mx-md pf-u-p-md top-content-panel" },
49
+ return (React.createElement(Panel, { variant: "raised", className: "pf-v5-u-mx-md pf-v5-u-p-md top-content-panel", ref: ref },
26
50
  React.createElement(PanelMain, null,
27
51
  React.createElement(PanelMainBody, null,
28
52
  React.createElement(ExpandableSection, { onToggle: onToggle, isExpanded: isExpanded, toggleContent: React.createElement(Title, { headingLevel: "h6", className: "accordion_title" },
29
- React.createElement(Trans, null, " Suggested top content resources")), id: "top-content-suggestion" }, filteredSuggestion === null || filteredSuggestion === void 0 ? void 0 : filteredSuggestion.map((resources) => (React.createElement(TopContentSuggestionHint, { key: resources.id, resources: resources }))))))));
53
+ React.createElement(Trans, null, " Suggested top content resources")), id: "top-content-suggestion" }, !isEmpty(searchedContent) &&
54
+ (searchedContent === null || searchedContent === void 0 ? void 0 : searchedContent.map((resources) => (React.createElement(TopContentSuggestionHint, { key: resources.id, resources: resources })))))))));
30
55
  };
@@ -50,12 +50,12 @@ export const TopContentSuggestionHint = ({ resources }) => {
50
50
  setIsRemoving(false);
51
51
  }
52
52
  });
53
- return !isAccepted ? (React.createElement(Card, { className: "pf-u-m-sm card-hint" },
53
+ return !isAccepted ? (React.createElement(Card, { className: "pf-v5-u-m-sm card-hint" },
54
54
  React.createElement(CardBody, { className: "card-body" },
55
55
  React.createElement("span", { className: "hint-title", "data-testid": "suggestion-content-title" },
56
56
  React.createElement(Truncate, { content: resources === null || resources === void 0 ? void 0 : resources.resourceTitle })),
57
- React.createElement("span", { className: "pf-u-float-right" },
58
- React.createElement(Button, { variant: "link", isInline: true, className: "pf-u-mr-xl", onClick: () => setAccepted(true), title: "Accept" },
57
+ React.createElement("span", { className: "pf-v5-u-float-right" },
58
+ React.createElement(Button, { variant: "link", isInline: true, className: "pf-v5-u-mr-xl", onClick: () => setAccepted(true), title: "Accept" },
59
59
  React.createElement("b", null,
60
60
  React.createElement(Trans, null, "Accept"))),
61
61
  React.createElement(Button, { variant: "link", isInline: true, onClick: onIgnore, isDisabled: isRemoving },
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentSuggestionHintAccept.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAoBrH,OAAc,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAgBhE,UAAU,MAAM;IACZ,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,SAAS,EAAE,mBAAmB,CAAC;CAClC;AAED,eAAO,MAAM,8BAA8B,EAAE,EAAE,CAAC,MAAM,CAoPrD,CAAC"}
1
+ {"version":3,"file":"TopContentSuggestionHintAccept.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AASrH,OAAc,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAgBhE,UAAU,MAAM;IACZ,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,SAAS,EAAE,mBAAmB,CAAC;CAClC;AAED,eAAO,MAAM,8BAA8B,EAAE,EAAE,CAAC,MAAM,CA2PrD,CAAC"}
@@ -7,7 +7,8 @@ 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 { Button, Card, CardBody, Form, FormGroup, Select, SelectOption, SelectVariant, TextInput, Tooltip, ValidatedOptions, } from '@patternfly/react-core';
10
+ import { Button, Card, CardBody, Form, FormGroup, TextInput, Tooltip, ValidatedOptions } from '@patternfly/react-core';
11
+ import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
11
12
  import PencilAltIcon from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon';
12
13
  import { ToastNotification } from '@rh-support/components';
13
14
  import { getVersion, isRegularVersion, isValidUrl } from '@rh-support/utils';
@@ -29,11 +30,11 @@ export const TopContentSuggestionHintAccept = ({ onCancel, resources }) => {
29
30
  const [selected, setSelected] = useState();
30
31
  const [isSaving, setIsSaving] = useState(false);
31
32
  const [resourceTitle, setResourceTitle] = useState('');
32
- const [linkToContent, setLinkToContent] = useState('');
33
33
  const [isEditClicked, setIsEditClicked] = useState(false);
34
34
  const categoryToSave = useMemo(() => topContentEditState.find((category) => category.categoryId === (selected === null || selected === void 0 ? void 0 : selected.id)), [topContentEditState, selected]);
35
35
  const flagContentEditState = useMemo(() => flagContentUsage(topContentEditState, categoryUsage, selectedVersion), [topContentEditState, categoryUsage, selectedVersion]);
36
36
  const isMajorVersionOnly = isUndefined(getVersion(selectedVersion).minor);
37
+ const linkToContent = resources.resourceViewUri;
37
38
  const minorSelectedNoMinorContentButAvailableMajorContent = !topContentResponse.isFetching &&
38
39
  !isEmpty(topContentResponse.data) &&
39
40
  getVersion(selectedVersion).minor &&
@@ -42,12 +43,12 @@ export const TopContentSuggestionHintAccept = ({ onCancel, resources }) => {
42
43
  !isAddingCategory;
43
44
  const isCategoryLimitReached = (minorSelectedNoMinorContentButAvailableMajorContent ? [] : flagContentEditState).length >= CATEGORY_LIMIT.MAX;
44
45
  const isCategoryInList = flagContentEditState.some((c) => c.categoryId === (selected === null || selected === void 0 ? void 0 : selected.id));
45
- const onToggle = () => {
46
- setSelectOpen((previousToggleState) => !previousToggleState);
46
+ const onToggle = (isExpanded) => {
47
+ setSelectOpen(isExpanded);
47
48
  };
48
49
  const onSelect = (event, selection, isPlaceholder) => {
49
50
  setSelected(selection);
50
- onToggle();
51
+ onToggle(false);
51
52
  };
52
53
  const isDisabled = isEmpty(linkToContent) ||
53
54
  isEmpty(trim(resourceTitle)) ||
@@ -105,10 +106,19 @@ export const TopContentSuggestionHintAccept = ({ onCancel, resources }) => {
105
106
  addContentToCategory();
106
107
  }
107
108
  });
109
+ const getCategoryOptions = (options) => {
110
+ return options.map((category, id) => (React.createElement(SelectOption, { key: id, value: category }, category.categoryName)));
111
+ };
112
+ const onFilter = (_, value) => {
113
+ if (!value)
114
+ return getCategoryOptions(categories.data);
115
+ const input = new RegExp(value, 'i');
116
+ const newOptions = categories.data.filter((c) => input.test(c.categoryName));
117
+ return getCategoryOptions(newOptions);
118
+ };
108
119
  useEffect(() => {
109
120
  setResourceTitle(resources.resourceTitle);
110
- setLinkToContent(resources.resourceViewUri);
111
- }, [resources.resourceTitle, resources.resourceViewUri]);
121
+ }, [resources.resourceTitle]);
112
122
  useEffect(() => {
113
123
  try {
114
124
  fetchCategories(topContentDispatch);
@@ -117,25 +127,21 @@ export const TopContentSuggestionHintAccept = ({ onCancel, resources }) => {
117
127
  ToastNotification.addDangerMessage(t('There was an error loading top content categories'));
118
128
  }
119
129
  }, [topContentDispatch, t]);
120
- return (React.createElement(Card, { className: "pf-u-m-sm" },
130
+ return (React.createElement(Card, { className: "pf-v5-u-m-sm" },
121
131
  React.createElement(CardBody, { className: "card-hint" },
122
132
  React.createElement(Form, null,
123
- isEditClicked ? (React.createElement(React.Fragment, null,
124
- React.createElement(FormGroup, { label: t('Link to content'), isRequired: true, fieldId: "top-content-link" },
125
- React.createElement(TextInput, { isRequired: true, type: "text", id: "top-content-resource-link", name: "top-content-resource-link", "data-tracking-id": "top-content-resource-link", value: linkToContent, onChange: setLinkToContent, placeholder: t('Enter link to content'), validated: isEmpty(linkToContent) || !isValidUrl(linkToContent)
126
- ? ValidatedOptions.error
127
- : ValidatedOptions.default })),
128
- React.createElement(FormGroup, { label: t('Headline'), isRequired: true, fieldId: "simple-form-email-01" },
129
- React.createElement(TextInput, { isRequired: true, type: "text", id: "top-content-headline-category", name: "top-content-headline-category", "data-tracking-id": "top-content-headline-category", value: resourceTitle, onChange: setResourceTitle, placeholder: t('Copy and paste the heading for consistency'), validated: isEmpty(trim(resourceTitle)) ? ValidatedOptions.error : ValidatedOptions.default })))) : (React.createElement("span", null,
133
+ isEditClicked ? (React.createElement(FormGroup, { label: t('Heading'), isRequired: true, fieldId: "simple-form-email-01" },
134
+ React.createElement(TextInput, { isRequired: true, type: "text", id: "top-content-headline-category", name: "top-content-headline-category", "data-tracking-id": "top-content-headline-category", value: resourceTitle, onChange: (_event, val) => setResourceTitle(val), placeholder: t('Copy and paste the heading for consistency'), validated: isEmpty(trim(resourceTitle)) ? ValidatedOptions.error : ValidatedOptions.default }))) : (React.createElement("span", null,
130
135
  React.createElement(Button, { variant: "link", isInline: true },
131
136
  React.createElement("u", null,
132
- React.createElement("a", { className: "hint-title pf-u-font-size-md", target: "_blank", href: linkToContent, rel: "noreferrer" }, resources.resourceTitle))),
133
- React.createElement(Tooltip, { content: t('Edit Link to content and Headline'), position: "top" },
137
+ React.createElement("a", { className: "hint-title pf-v5-u-font-size-md", target: "_blank", href: linkToContent, rel: "noreferrer" }, resources.resourceTitle))),
138
+ React.createElement(Tooltip, { content: t('Edit heading'), position: "top" },
134
139
  React.createElement(Button, { variant: "link", icon: React.createElement(PencilAltIcon, null), onClick: () => setIsEditClicked((pre) => !pre) })))),
135
140
  React.createElement(FormGroup, { label: t('Category'), isRequired: true, fieldId: "simple-form-email-01" },
136
- React.createElement(Select, Object.assign({ variant: SelectVariant.single, id: "category-selection", name: "category-selection", "data-testid": "category-selection", placeholderText: "Select a category", onToggle: onToggle, isOpen: isSelectOpen, onSelect: onSelect, selections: selected === null || selected === void 0 ? void 0 : selected.categoryName, isDisabled: categories.isError, loadingVariant: 'spinner' }, (categories.isFetching && { loadingVariant: 'spinner' })), categories.data.map((category, id) => (React.createElement(SelectOption, { key: id, value: category },
137
- React.createElement("div", null, category.categoryName)))))),
138
- React.createElement("div", { className: "pf-u-mt-sm" },
141
+ React.createElement(Select, Object.assign({ variant: SelectVariant.typeahead, id: "category-selection", name: "category-selection", "data-testid": "category-selection", placeholderText: t('Select an option or enter a new category'), onFilter: onFilter, onToggle: (_event, isExpanded) => onToggle(isExpanded), isOpen: isSelectOpen, onSelect: onSelect, selections: selected === null || selected === void 0 ? void 0 : selected.categoryName, isDisabled: categories.isError, loadingVariant: 'spinner' }, (categories.isFetching && { loadingVariant: 'spinner' })), getCategoryOptions(categories.data))),
142
+ isEditClicked && (React.createElement(FormGroup, { label: t('Link to content'), isRequired: true, fieldId: "top-content-link" },
143
+ React.createElement(TextInput, { type: "text", id: "top-content-resource-link", name: "top-content-resource-link", "data-tracking-id": "top-content-resource-link", value: linkToContent, isDisabled: true }))),
144
+ React.createElement("div", { className: "pf-v5-u-mt-sm" },
139
145
  isCategoryLimitReached && !isCategoryInList && !isUndefined(selected) && React.createElement(CategoryLimit, null),
140
146
  React.createElement(Button, { variant: "primary", onClick: onSaveContent, isDisabled: isSaving || isDisabled, isLoading: isSaving, "data-tracking-id": "suggested-content-save-button" },
141
147
  React.createElement(Trans, null, "Save")),
@@ -1,2 +1,3 @@
1
- export declare function TopContentHeader(): JSX.Element;
1
+ import React from 'react';
2
+ export declare function TopContentHeader(): React.JSX.Element;
2
3
  //# sourceMappingURL=TopContentHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContentHeader.tsx"],"names":[],"mappings":"AAGA,wBAAgB,gBAAgB,gBA2B/B"}
1
+ {"version":3,"file":"TopContentHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContentHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,wBAAgB,gBAAgB,sBA2B/B"}
@@ -4,7 +4,7 @@ export function TopContentHeader() {
4
4
  return (React.createElement("header", null,
5
5
  React.createElement("h2", null,
6
6
  React.createElement(Trans, null, "Top content")),
7
- React.createElement("p", { className: "pf-u-mt-md pf-u-mb-sm" },
7
+ React.createElement("p", { className: "pf-v5-u-mt-md pf-v5-u-mb-sm" },
8
8
  React.createElement(Trans, null, "Add, edit, or remove top content solutions and categories. You can also create a new set of top content recommendations for specific versions.")),
9
9
  React.createElement("p", null,
10
10
  React.createElement(Trans, { i18nKey: "i18IRDashboard" },
@@ -1,5 +1,6 @@
1
+ import React from 'react';
1
2
  interface IProps {
2
3
  }
3
- export declare function TopContentManagement(props: IProps): JSX.Element;
4
+ export declare function TopContentManagement(props: IProps): React.JSX.Element;
4
5
  export {};
5
6
  //# sourceMappingURL=TopContentManagement.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContentManagement.tsx"],"names":[],"mappings":"AAOA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,eAYjD"}
1
+ {"version":3,"file":"TopContentManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContentManagement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,MAAM;CAAG;AAEnB,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBAYjD"}
@@ -1,12 +1,13 @@
1
1
  import { ErrorBoundary } from '@rh-support/components';
2
2
  import React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
+ import { TagManagementContextProvider } from '../../context/TagManagementContextProvider';
4
5
  import { TopContentContextProvider } from '../../context/TopContentProvider';
5
6
  import { TopContentEditor } from './TopContentEditor/TopContentEditor';
6
7
  export function TopContentManagement(props) {
7
8
  const { t } = useTranslation();
8
- return (React.createElement("section", { id: "manage-top-content" },
9
- React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading suggestions') } },
10
- React.createElement(TopContentContextProvider, null,
9
+ return (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading suggestions') } },
10
+ React.createElement(TopContentContextProvider, null,
11
+ React.createElement(TagManagementContextProvider, null,
11
12
  React.createElement(TopContentEditor, null)))));
12
13
  }
@@ -1,6 +1,7 @@
1
1
  import { IItemResponse } from '@cee-eng/hydrajs/@types/models/general';
2
2
  import { IProduct as IHydraProduct } from '@cee-eng/hydrajs/@types/models/product';
3
3
  import { IDClassNameProps } from '@rh-support/types/shared';
4
+ import React from 'react';
4
5
  interface IProps extends IDClassNameProps {
5
6
  selectedProduct: Partial<IHydraProduct>;
6
7
  selectedVersion: string;
@@ -9,7 +10,7 @@ interface IProps extends IDClassNameProps {
9
10
  htmlForId: string;
10
11
  }
11
12
  export declare function postVersionsProcessor(versionItems: IItemResponse<string[]>): IItemResponse<string[]>;
12
- declare function TopContentProductVersionSelector(props: IProps): JSX.Element;
13
+ declare function TopContentProductVersionSelector(props: IProps): React.JSX.Element;
13
14
  declare namespace TopContentProductVersionSelector {
14
15
  var defaultProps: Partial<IProps>;
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContentProductVersionSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAInF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAS5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,eAAe,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC3D,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;CACrB;AAQD,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC,2BAG1E;AAqBD,iBAAS,gCAAgC,CAAC,KAAK,EAAE,MAAM,eA0JtD;kBA1JQ,gCAAgC;;;AA6JzC,OAAO,EAAE,gCAAgC,EAAE,CAAC"}
1
+ {"version":3,"file":"TopContentProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContentProductVersionSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAInF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,eAAe,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC3D,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;CACrB;AAQD,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC,2BAG1E;AAqBD,iBAAS,gCAAgC,CAAC,KAAK,EAAE,MAAM,qBA0JtD;kBA1JQ,gCAAgC;;;AA6JzC,OAAO,EAAE,gCAAgC,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { products as productsApi } from '@cee-eng/hydrajs';
2
- import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
2
+ import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
3
3
  import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
4
4
  import { useFetch } from '@rh-support/components';
5
5
  import { getUniqueSortedVersions, getVersion } from '@rh-support/utils';
@@ -81,9 +81,9 @@ function TopContentProductVersionSelector(props) {
81
81
  setSelected(undefined);
82
82
  };
83
83
  const getProductOptions = (options) => {
84
- return options.map((product, id) => (React.createElement(SelectOption, { key: id, value: product, className: "pf-c-select__menu-wrapper" },
85
- React.createElement("div", { className: "pf-c-select__menu-item-main" }, product.name),
86
- selected && product.name === selected.name && (React.createElement("span", { className: "pf-c-select__menu-item-icon" },
84
+ return options.map((product, id) => (React.createElement(SelectOption, { key: id, value: product, className: "pf-v5-c-select__menu-wrapper" },
85
+ React.createElement("div", { className: "pf-v5-c-select__menu-item-main" }, product.name),
86
+ selected && product.name === selected.name && (React.createElement("span", { className: "pf-v5-c-select__menu-item-icon" },
87
87
  React.createElement(CheckIcon, { "aria-hidden": true }))))));
88
88
  };
89
89
  const onProductFilter = (_, value) => {
@@ -114,11 +114,11 @@ function TopContentProductVersionSelector(props) {
114
114
  React.createElement("div", { className: "toolbar-left" },
115
115
  React.createElement("label", { htmlFor: 'tc-product-selector-dropdown-toggle' },
116
116
  React.createElement(Trans, null, "Product")),
117
- React.createElement(Select, Object.assign({ variant: SelectVariant.typeahead, onToggle: onProductToggle, selections: selected, isOpen: isProductOpen, onSelect: onProductSelect, onClear: onProductClear, placeholderText: t('Select a product') }, (isLoadingProducts && { loadingVariant: 'spinner' }), { onFilter: onProductFilter, isDisabled: isLoadingProducts, id: productLabelId, "data-tracking-id": productLabelId, "aria-label": t(productLabelId) }), getProductOptions(productOptions))),
117
+ React.createElement(Select, Object.assign({ variant: SelectVariant.typeahead, onToggle: (_event, isExpanded) => onProductToggle(isExpanded), selections: selected, isOpen: isProductOpen, onSelect: onProductSelect, onClear: onProductClear, placeholderText: t('Select a product') }, (isLoadingProducts && { loadingVariant: 'spinner' }), { onFilter: onProductFilter, isDisabled: isLoadingProducts, id: productLabelId, "data-tracking-id": productLabelId, "aria-label": t(productLabelId) }), getProductOptions(productOptions))),
118
118
  React.createElement("div", { className: "toolbar-right" },
119
119
  React.createElement("label", { htmlFor: "version-selector-dropdown-toggle" },
120
120
  React.createElement(Trans, null, "Version")),
121
- React.createElement(Select, Object.assign({ variant: SelectVariant.single, onToggle: onVersionToggle, onSelect: onVersionSelect, selections: selectedVersion, isOpen: isVersionOpen, placeholderText: t('Select a version'), isDisabled: isEmpty(versions === null || versions === void 0 ? void 0 : versions.items) }, (isLoadingVersions && { loadingVariant: 'spinner' }), { id: versionLabelId, "data-tracking-id": versionLabelId, "aria-label": t(versionLabelId) }), ((versions === null || versions === void 0 ? void 0 : versions.items) || []).map((version, id) => (React.createElement(SelectOption, { key: id, value: version }, version)))))));
121
+ React.createElement(Select, Object.assign({ variant: SelectVariant.single, onToggle: (_event, isExpanded) => onVersionToggle(isExpanded), onSelect: onVersionSelect, selections: selectedVersion, isOpen: isVersionOpen, placeholderText: t('Select a version'), isDisabled: isEmpty(versions === null || versions === void 0 ? void 0 : versions.items) }, (isLoadingVersions && { loadingVariant: 'spinner' }), { id: versionLabelId, "data-tracking-id": versionLabelId, "aria-label": t(versionLabelId) }), ((versions === null || versions === void 0 ? void 0 : versions.items) || []).map((version, id) => (React.createElement(SelectOption, { key: id, value: version }, version)))))));
122
122
  }
123
123
  TopContentProductVersionSelector.defaultProps = defaultProps;
124
124
  export { TopContentProductVersionSelector };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ExpiredContentDispatchType, IExpiredContentState } from '../reducers/ExpiredContentReducer';
3
+ export declare const ExpiredContentStateContext: React.Context<IExpiredContentState>;
4
+ export declare const ExpiredContentDispatchContext: React.Context<ExpiredContentDispatchType>;
5
+ export declare function ExpiredContentContextProvider({ children }: {
6
+ children: any;
7
+ }): React.JSX.Element;
8
+ //# sourceMappingURL=ExpiredContentContextProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpiredContentContextProvider.d.ts","sourceRoot":"","sources":["../../../src/context/ExpiredContentContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EACH,0BAA0B,EAE1B,oBAAoB,EAEvB,MAAM,mCAAmC,CAAC;AAG3C,eAAO,MAAM,0BAA0B,qCAAmE,CAAC;AAC3G,eAAO,MAAM,6BAA6B,2CAA8C,CAAC;AAEzF,wBAAgB,6BAA6B,CAAC,EAAE,QAAQ,EAAE;;CAAA,qBAOzD"}
@@ -0,0 +1,10 @@
1
+ import React, { useReducer } from 'react';
2
+ import { ExpiredContentReducer, initialExpiredContent, } from '../reducers/ExpiredContentReducer';
3
+ const initialDispatchContext = null;
4
+ export const ExpiredContentStateContext = React.createContext(initialExpiredContent);
5
+ export const ExpiredContentDispatchContext = React.createContext(initialDispatchContext);
6
+ export function ExpiredContentContextProvider({ children }) {
7
+ const [expiredContentState, dispatch] = useReducer(ExpiredContentReducer, initialExpiredContent);
8
+ return (React.createElement(ExpiredContentStateContext.Provider, { value: Object.assign({}, expiredContentState) },
9
+ React.createElement(ExpiredContentDispatchContext.Provider, { value: dispatch }, children)));
10
+ }
@@ -7,5 +7,5 @@ export declare function useManagePartnershipsContext(): IManagePartnershipsState
7
7
  export declare function useManagePartnershipsDispatchContext(): ManagePartnershipsReducerDispatchType;
8
8
  export declare function ManagePartnershipsProvider({ children }: {
9
9
  children: any;
10
- }): JSX.Element;
10
+ }): React.JSX.Element;
11
11
  //# sourceMappingURL=ManagePartnershipsProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ManagePartnershipsProvider.d.ts","sourceRoot":"","sources":["../../../src/context/ManagePartnershipsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAEtD,OAAO,EACH,wBAAwB,EAExB,qCAAqC,EACxC,MAAM,uCAAuC,CAAC;AAE/C,eAAO,MAAM,+BAA+B,EAAE,wBAG7C,CAAC;AAGF,eAAO,MAAM,8BAA8B,yCAE1C,CAAC;AACF,eAAO,MAAM,iCAAiC,sDAA6C,CAAC;AAE5F,wBAAgB,4BAA4B,6BAM3C;AAED,wBAAgB,oCAAoC,0CAMnD;AAED,wBAAgB,0BAA0B,CAAC,EAAE,QAAQ,EAAE;;CAAA,eAStD"}
1
+ {"version":3,"file":"ManagePartnershipsProvider.d.ts","sourceRoot":"","sources":["../../../src/context/ManagePartnershipsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAEtD,OAAO,EACH,wBAAwB,EAExB,qCAAqC,EACxC,MAAM,uCAAuC,CAAC;AAE/C,eAAO,MAAM,+BAA+B,EAAE,wBAG7C,CAAC;AAGF,eAAO,MAAM,8BAA8B,yCAE1C,CAAC;AACF,eAAO,MAAM,iCAAiC,sDAA6C,CAAC;AAE5F,wBAAgB,4BAA4B,6BAM3C;AAED,wBAAgB,oCAAoC,0CAMnD;AAED,wBAAgB,0BAA0B,CAAC,EAAE,QAAQ,EAAE;;CAAA,qBAStD"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ITagManagementState, TagManagementDisptachType } from '../reducers/TagManagmentReducer';
3
+ export declare const TagManagementStateContext: React.Context<ITagManagementState>;
4
+ export declare const TagManagementDispatchContext: React.Context<TagManagementDisptachType>;
5
+ export declare function TagManagementContextProvider({ children }: {
6
+ children: any;
7
+ }): React.JSX.Element;
8
+ //# sourceMappingURL=TagManagementContextProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TagManagementContextProvider.d.ts","sourceRoot":"","sources":["../../../src/context/TagManagementContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAEH,mBAAmB,EACnB,yBAAyB,EAE5B,MAAM,iCAAiC,CAAC;AAGzC,eAAO,MAAM,yBAAyB,oCAAsE,CAAC;AAC7G,eAAO,MAAM,4BAA4B,0CAA8C,CAAC;AAExF,wBAAgB,4BAA4B,CAAC,EAAE,QAAQ,EAAE;;CAAA,qBAOxD"}
@@ -0,0 +1,10 @@
1
+ import React, { useReducer } from 'react';
2
+ import { initialTagManagementState, TagManagementReducer, } from '../reducers/TagManagmentReducer';
3
+ const initialDispatchContext = null;
4
+ export const TagManagementStateContext = React.createContext(initialTagManagementState);
5
+ export const TagManagementDispatchContext = React.createContext(initialDispatchContext);
6
+ export function TagManagementContextProvider({ children }) {
7
+ const [tagManagementState, dispatch] = useReducer(TagManagementReducer, initialTagManagementState);
8
+ return (React.createElement(TagManagementStateContext.Provider, { value: Object.assign({}, tagManagementState) },
9
+ React.createElement(TagManagementDispatchContext.Provider, { value: dispatch }, children)));
10
+ }
@@ -7,5 +7,5 @@ export declare function useTopContentContext(): ITopContentState;
7
7
  export declare function useTopContentDispatchContext(): TopContentReducerDispatchType;
8
8
  export declare function TopContentContextProvider({ children }: {
9
9
  children: any;
10
- }): JSX.Element;
10
+ }): React.JSX.Element;
11
11
  //# sourceMappingURL=TopContentProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentProvider.d.ts","sourceRoot":"","sources":["../../../src/context/TopContentProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAqB,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAEnH,eAAO,MAAM,uBAAuB,EAAE,gBAcrC,CAAC;AAGF,eAAO,MAAM,sBAAsB,iCAAiE,CAAC;AACrG,eAAO,MAAM,yBAAyB,8CAA6C,CAAC;AAEpF,wBAAgB,oBAAoB,qBAMnC;AAED,wBAAgB,4BAA4B,kCAM3C;AAED,wBAAgB,yBAAyB,CAAC,EAAE,QAAQ,EAAE;;CAAA,eAOrD"}
1
+ {"version":3,"file":"TopContentProvider.d.ts","sourceRoot":"","sources":["../../../src/context/TopContentProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAqB,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAEnH,eAAO,MAAM,uBAAuB,EAAE,gBAerC,CAAC;AAGF,eAAO,MAAM,sBAAsB,iCAAiE,CAAC;AACrG,eAAO,MAAM,yBAAyB,8CAA6C,CAAC;AAEpF,wBAAgB,oBAAoB,qBAMnC;AAED,wBAAgB,4BAA4B,kCAM3C;AAED,wBAAgB,yBAAyB,CAAC,EAAE,QAAQ,EAAE;;CAAA,qBAOrD"}
@@ -15,6 +15,7 @@ export const intialTopContentContext = {
15
15
  isSearchModeEnabled: false,
16
16
  categoryUsage: {},
17
17
  suggestion: {},
18
+ filteredTags: [],
18
19
  };
19
20
  const initalDispatchContext = null;
20
21
  export const TopContentStateContext = React.createContext(intialTopContentContext);