@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
@@ -1,4 +1,4 @@
1
- import { Button, ButtonVariant, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateVariant, Title, } from '@patternfly/react-core';
1
+ import { Button, ButtonVariant, EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, } from '@patternfly/react-core';
2
2
  import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
3
3
  import { isNumber, isRegularVersion } from '@rh-support/utils';
4
4
  import isEmpty from 'lodash/isEmpty';
@@ -10,14 +10,14 @@ export function NoTopContentFound({ version, product, dataLength, onAddCategory,
10
10
  // 1.1, 1.x are normal semver versions but we have versions line online or dedicated that don't follw semver
11
11
  const iSemverVersion = isRegularVersion(version) && isNumber(version.split('.')[1]);
12
12
  const getCreateSetMessage = () => (React.createElement(React.Fragment, null,
13
- iSemverVersion && (React.createElement("p", { className: "pf-u-mb-md" },
13
+ iSemverVersion && (React.createElement("p", { className: "pf-v5-u-mb-md" },
14
14
  React.createElement(Trans, null, "Customers can't view any content while troubleshooting this version."))),
15
- isXVersion && (React.createElement("p", { className: "pf-u-mb-md" },
15
+ isXVersion && (React.createElement("p", { className: "pf-v5-u-mb-md" },
16
16
  React.createElement(Trans, null,
17
17
  "Customers will see content for ",
18
18
  xVersion,
19
19
  " when minor version content is unavailable."))),
20
- React.createElement("p", { className: "pf-u-mb-md" },
20
+ React.createElement("p", { className: "pf-v5-u-mb-md" },
21
21
  React.createElement(Button, { variant: isXVersion ? ButtonVariant.secondary : ButtonVariant.primary, isInline: true, onClick: () => onAddCategory(false, true, version) },
22
22
  React.createElement(Trans, null,
23
23
  ' ',
@@ -38,22 +38,21 @@ export function NoTopContentFound({ version, product, dataLength, onAddCategory,
38
38
  xVersion),
39
39
  ' ',
40
40
  "troubleshooting this version"),
41
- React.createElement("div", { className: "pf-u-mt-lg" },
42
- React.createElement(Button, { isInline: true, className: "pf-c-alert__action", variant: ButtonVariant.primary, onClick: () => onAddCategory(false, true, version, true) },
41
+ React.createElement("div", { className: "pf-v5-u-mt-lg" },
42
+ React.createElement(Button, { isInline: true, className: "pf-v5-c-alert__action", variant: ButtonVariant.primary, onClick: () => onAddCategory(false, true, version, true) },
43
43
  React.createElement(Trans, null,
44
44
  "Create new set for ",
45
45
  version)))));
46
46
  const noContent = dataLength === 0 && !isContentOnlyForMajorVersion;
47
47
  const noMinorButHaveMajorContent = dataLength !== 0 && isContentOnlyForMajorVersion;
48
- return (React.createElement(EmptyState, { variant: EmptyStateVariant.full },
49
- React.createElement(EmptyStateIcon, { icon: SearchIcon }),
50
- React.createElement(Title, { headingLevel: "h2", size: "lg", className: "pf-u-mb-md" }, isEmpty(product) || isEmpty(version) ? (React.createElement(Trans, null, "No top content found")) : isRegularVersion(version) && isNumber(version.split('.')[1]) && dataLength === 0 ? (React.createElement(Trans, null,
51
- "No content available for ",
52
- version,
53
- " or ",
54
- xVersion)) : (React.createElement(Trans, null,
55
- "No content available for ",
56
- version))),
48
+ return (React.createElement(EmptyState, { variant: EmptyStateVariant.xs },
49
+ React.createElement(EmptyStateHeader, { titleText: React.createElement(React.Fragment, null, isEmpty(product) || isEmpty(version) ? (React.createElement(Trans, null, "No top content found")) : isRegularVersion(version) && isNumber(version.split('.')[1]) && dataLength === 0 ? (React.createElement(Trans, null,
50
+ "No content available for ",
51
+ version,
52
+ " or ",
53
+ xVersion)) : (React.createElement(Trans, null,
54
+ "No content available for ",
55
+ version))), icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }), headingLevel: "h2" }),
57
56
  React.createElement(EmptyStateBody, null,
58
57
  isEmpty(product) && React.createElement(Trans, null, "Please select a product and version to edit"),
59
58
  !isEmpty(product) && isEmpty(version) && React.createElement(Trans, null, "Please select a version to edit"),
@@ -1,2 +1,3 @@
1
- export declare function TopContent(): JSX.Element;
1
+ import React from 'react';
2
+ export declare function TopContent(): React.JSX.Element;
2
3
  //# sourceMappingURL=TopContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContent.tsx"],"names":[],"mappings":"AAKA,wBAAgB,UAAU,gBAMzB"}
1
+ {"version":3,"file":"TopContent.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,wBAAgB,UAAU,sBAMzB"}
@@ -1,7 +1,8 @@
1
1
  import { ITopContentCategory } from '@cee-eng/hydrajs/@types/models/topContent/topContentModel';
2
+ import React from 'react';
2
3
  interface IProps {
3
4
  onCategoryChange: (val: ITopContentCategory) => void;
4
5
  }
5
- export declare function AddNewCategoryDropDown(props: IProps): JSX.Element;
6
+ export declare function AddNewCategoryDropDown(props: IProps): React.JSX.Element;
6
7
  export {};
7
8
  //# sourceMappingURL=AddNewCategoryDropDown.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddNewCategoryDropDown.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAShG,UAAU,MAAM;IACZ,gBAAgB,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACxD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,eA4EnD"}
1
+ {"version":3,"file":"AddNewCategoryDropDown.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAIhG,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,UAAU,MAAM;IACZ,gBAAgB,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACxD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,qBAiFnD"}
@@ -1,5 +1,6 @@
1
- import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
1
+ import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
2
2
  import { ToastNotification } from '@rh-support/components';
3
+ import sortBy from 'lodash/sortBy';
3
4
  import React, { useEffect, useState } from 'react';
4
5
  import { Trans, useTranslation } from 'react-i18next';
5
6
  import { useTopContentContext, useTopContentDispatchContext } from '../../../../context/TopContentProvider';
@@ -9,7 +10,11 @@ export function AddNewCategoryDropDown(props) {
9
10
  const { topContentEditState, categories } = useTopContentContext();
10
11
  const topContentDispatch = useTopContentDispatchContext();
11
12
  const allAddedCategories = topContentEditState.map((cat) => cat.categoryName);
12
- const availableCategories = categories.data.filter((category) => !(allAddedCategories || []).includes(category.categoryName));
13
+ const availableCategories = sortBy(categories.data.filter((category) => !(allAddedCategories || []).includes(category.categoryName)), [
14
+ function (obj) {
15
+ return obj.categoryName.toLowerCase();
16
+ },
17
+ ]);
13
18
  const [isOpen, setIsOpen] = useState(false);
14
19
  const [selected, setSelected] = useState();
15
20
  const getCategoryOptions = (options) => {
@@ -47,5 +52,5 @@ export function AddNewCategoryDropDown(props) {
47
52
  React.createElement(Trans, null, "Category"),
48
53
  ' ',
49
54
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
50
- React.createElement(Select, Object.assign({ variant: SelectVariant.typeahead, onToggle: onToggle, isOpen: isOpen, onClear: onClearCategory, onSelect: onSelect, onFilter: onFilter, selections: selected === null || selected === void 0 ? void 0 : selected.categoryName, placeholderText: t('Select an option or enter a new category') }, (categories.isFetching && { loadingVariant: 'spinner' }), { id: "new-category", "data-tracking-id": "new-category" }), getCategoryOptions(availableCategories))));
55
+ React.createElement(Select, Object.assign({ variant: SelectVariant.typeahead, onToggle: (_event, isExpanded) => onToggle(isExpanded), isOpen: isOpen, onClear: onClearCategory, onSelect: onSelect, onFilter: onFilter, selections: selected === null || selected === void 0 ? void 0 : selected.categoryName, placeholderText: t('Select an option or enter a new category') }, (categories.isFetching && { loadingVariant: 'spinner' }), { id: "new-category", "data-tracking-id": "new-category" }), getCategoryOptions(availableCategories))));
51
56
  }
@@ -11,6 +11,6 @@ interface IProps {
11
11
  onCancelArrangement?: () => void;
12
12
  onSaveArrangement?: () => void;
13
13
  }
14
- export declare function TopContentCategory(props: IProps): JSX.Element;
14
+ export declare function TopContentCategory(props: IProps): React.JSX.Element;
15
15
  export {};
16
16
  //# sourceMappingURL=TopContentCategory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentCategory.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategory.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGhF,OAAO,EAAgB,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAI5F,UAAU,MAAM;IACZ,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,sBAAsB,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,eAgE/C"}
1
+ {"version":3,"file":"TopContentCategory.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategory.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGhF,OAAO,EAAgB,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAI5F,UAAU,MAAM;IACZ,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,sBAAsB,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBA6D/C"}
@@ -1,4 +1,4 @@
1
- import { AccordionContent, AccordionItem, AccordionToggle } from '@patternfly/react-core';
1
+ import { AccordionContent, AccordionItem, AccordionToggle, Icon } from '@patternfly/react-core';
2
2
  import GripVerticalIcon from '@patternfly/react-icons/dist/js/icons/grip-vertical-icon';
3
3
  import { useGlobalStateContext } from '@rh-support/react-context';
4
4
  import { scrollIntoView } from '@rh-support/utils';
@@ -36,7 +36,8 @@ export function TopContentCategory(props) {
36
36
  return (React.createElement("div", Object.assign({ ref: props.innerRef }, props.provided.draggableProps, props.provided.dragHandleProps), props.category.content.length > 0 && (React.createElement(AccordionItem, null,
37
37
  React.createElement(AccordionToggle, { id: props.category.categoryName, onClick: toggleExpanded, isExpanded: isExpanded },
38
38
  React.createElement("h3", { ref: headerRef },
39
- props.isArrangingCats && (React.createElement(GripVerticalIcon, { style: { cursor: 'move' }, title: t('Drag'), size: "sm", className: "pf-u-mr-sm" })),
39
+ props.isArrangingCats && (React.createElement(Icon, { size: "md", className: "pf-v5-u-mr-sm" },
40
+ React.createElement(GripVerticalIcon, { style: { cursor: 'move' }, title: t('Drag') }))),
40
41
  props.category.categoryName,
41
42
  " ",
42
43
  props.category.isAttentionNeeded && React.createElement(NeedsAttention, null))),
@@ -1,8 +1,9 @@
1
+ import React from 'react';
1
2
  import { ITopContentEditState } from '../../../../reducers/TopContentReducer';
2
3
  interface IProps {
3
4
  category: ITopContentEditState;
4
5
  version: string;
5
6
  }
6
- export declare function TopContentCategoryNew({ category, version }: IProps): JSX.Element;
7
+ export declare function TopContentCategoryNew({ category, version }: IProps): React.JSX.Element;
7
8
  export {};
8
9
  //# sourceMappingURL=TopContentCategoryNew.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentCategoryNew.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategoryNew.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAgB,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAG5F,UAAU,MAAM;IACZ,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,MAAM,eA2ClE"}
1
+ {"version":3,"file":"TopContentCategoryNew.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategoryNew.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAG9E,OAAO,EAAgB,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAG5F,UAAU,MAAM;IACZ,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,MAAM,qBA2ClE"}
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAGH,oBAAoB,EAGvB,MAAM,wCAAwC,CAAC;AAGhD,MAAM,WAAW,yBAAyB;IACtC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,iBAAiB,CAAC,yBAAyB,CAyGlF,CAAC"}
1
+ {"version":3,"file":"TopContentComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAGH,oBAAoB,EAGvB,MAAM,wCAAwC,CAAC;AAGhD,MAAM,WAAW,yBAAyB;IACtC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,iBAAiB,CAAC,yBAAyB,CA0GlF,CAAC"}
@@ -40,7 +40,7 @@ export const TopContentComponent = (props) => {
40
40
  resetChangeInCategoryContent(topContentDispatch, topContentEditState, topContentResponse, props.category.id);
41
41
  setIsArrangingContent(false);
42
42
  };
43
- const buttons = (React.createElement("div", { className: "pf-c-accordion__expanded-content-footer" },
43
+ const buttons = (React.createElement("div", { className: "pf-v5-c-accordion__expanded-content-footer" },
44
44
  !isArrangingContent && props.categoryMode !== CategoryMode.NEW_SECTION && (React.createElement("span", null,
45
45
  React.createElement(Button, { variant: "secondary", onClick: addContent, "data-tracking-id": "add-content-top-content" },
46
46
  React.createElement(Trans, null, "Add content")),
@@ -57,7 +57,7 @@ export const TopContentComponent = (props) => {
57
57
  React.createElement(Droppable, { droppableId: `${props.category.id}`, type: `drop-inner-${props.category.id}`, isDropDisabled: !isArrangingContent, key: `drop-inner-${props.category.id}` }, (provided) => (React.createElement("div", { ref: provided.innerRef },
58
58
  React.createElement("ul", { "aria-label": t('Content list'), className: "list-flat list-flushleft" },
59
59
  props.category.content.map((content, i) => (React.createElement(Draggable, { key: `drag-inner-${i}${props.category.id}`, draggableId: `drag-inner-${i}${props.category.id}`, index: i, isDragDisabled: !isArrangingContent }, (provided, snapshot) => (React.createElement("div", Object.assign({ key: `${i}-c`, "aria-label": t('Content'), ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps),
60
- React.createElement(TopContentSingleItem, { isArrangingContent: isArrangingContent, category: props.category, snapshot: snapshot, i: i })))))),
60
+ React.createElement(TopContentSingleItem, { isArrangingContent: isArrangingContent, category: props.category, snapshot: snapshot, i: i, key: content.topContentId })))))),
61
61
  provided.placeholder),
62
62
  !isSearchModeEnabled && buttons)))));
63
63
  };
@@ -1,11 +1,15 @@
1
+ import { ISolrArticle, ISolrSolution } from '@cee-eng/hydrajs/@types/models/solr/solr';
2
+ import React from 'react';
1
3
  import { DraggableStateSnapshot } from 'react-beautiful-dnd';
2
4
  import { ITopContentEditState } from '../../../../reducers/TopContentReducer';
3
5
  interface IProps {
4
6
  isArrangingContent: boolean;
5
7
  category: ITopContentEditState;
6
- snapshot: DraggableStateSnapshot;
8
+ snapshot?: DraggableStateSnapshot;
7
9
  i: number;
8
10
  }
9
- export declare const TopContentSingleItem: ({ isArrangingContent, category, snapshot, i }: IProps) => JSX.Element;
11
+ export declare function formatDuplicateWarning(arr: any): any;
12
+ export declare function getDocsFromUrl(url: string): Promise<(ISolrSolution | ISolrArticle)[]>;
13
+ export declare const TopContentSingleItem: ({ isArrangingContent, category, snapshot, i }: IProps) => React.JSX.Element;
10
14
  export {};
11
15
  //# sourceMappingURL=TopContentSingleItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAK7D,OAAO,EAIH,oBAAoB,EAOvB,MAAM,wCAAwC,CAAC;AAIhD,UAAU,MAAM;IACZ,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,CAAC,EAAE,MAAM,CAAC;CACb;AAaD,eAAO,MAAM,oBAAoB,kDAAmD,MAAM,gBAqYzF,CAAC"}
1
+ {"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAiB,aAAa,EAAE,MAAM,0CAA0C,CAAC;AA8BtG,OAAO,KAA2D,MAAM,OAAO,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAM7D,OAAO,EAIH,oBAAoB,EAOvB,MAAM,wCAAwC,CAAC;AAIhD,UAAU,MAAM;IACZ,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,CAAC,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,sBAAsB,CAAC,GAAG,KAAA,OASzC;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,6CA2B/C;AAED,eAAO,MAAM,oBAAoB,kDAAmD,MAAM,sBAkiBzF,CAAC"}
@@ -8,22 +8,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { search } from '@cee-eng/hydrajs';
11
- import { Button, ValidatedOptions } from '@patternfly/react-core';
11
+ import { Button, DatePicker, Flex, FlexItem, FormGroup, Icon, Label, TextInput, ValidatedOptions, } from '@patternfly/react-core';
12
12
  import EditAltIcon from '@patternfly/react-icons/dist/js/icons/edit-alt-icon';
13
13
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
14
14
  import GripVerticalIcon from '@patternfly/react-icons/dist/js/icons/grip-vertical-icon';
15
- import { CustomTextInput, ToastNotification } from '@rh-support/components';
16
- import { formatDate, getDrupalResIdIfTypeFromUrl, getText } from '@rh-support/utils';
15
+ import { TagsSelector, ToastNotification, useDebounce } from '@rh-support/components';
16
+ import { formatDate, getDrupalResIdIfTypeFromUrl, getText, isFutureDate, isValidDate, isValidUrl, } from '@rh-support/utils';
17
+ import { differenceBy, isEqual } from 'lodash';
17
18
  import cloneDeep from 'lodash/cloneDeep';
19
+ import findIndex from 'lodash/findIndex';
18
20
  import isEmpty from 'lodash/isEmpty';
19
- import React, { useEffect, useState } from 'react';
21
+ import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
20
22
  import { Trans, useTranslation } from 'react-i18next';
23
+ import { TagManagementStateContext } from '../../../../context/TagManagementContextProvider';
21
24
  import { useTopContentContext, useTopContentDispatchContext } from '../../../../context/TopContentProvider';
22
25
  import { getTopContentUrl } from '../../../../reducers/TopContentHelpers';
23
26
  import { ContentMode, deleteTopContent, fetchTopContent, removeTopContent, saveAddedNewSectionContents, saveAddToTopContent, saveChangeInCategoryContent, setIsAddingCategory, } from '../../../../reducers/TopContentReducer';
24
27
  import { AddNewCategoryDropDown } from './AddNewCategoryDropDown';
25
28
  import { TopContentSingleItemLink } from './TopContentSingleItemLink';
26
- function formatDuplicateWarning(arr) {
29
+ export function formatDuplicateWarning(arr) {
27
30
  if (arr.length === 0 || arr.length === 1)
28
31
  return arr;
29
32
  if (arr.length === 2) {
@@ -34,7 +37,36 @@ function formatDuplicateWarning(arr) {
34
37
  return [...str, ' and ', arr.slice(-1)];
35
38
  }
36
39
  }
40
+ export function getDocsFromUrl(url) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ var _a;
43
+ try {
44
+ const nodeId = getDrupalResIdIfTypeFromUrl(url);
45
+ if (!nodeId)
46
+ return [];
47
+ const queryParam = {
48
+ q: '*:*',
49
+ start: 0,
50
+ rows: 1,
51
+ };
52
+ const expression = {
53
+ fq: ['documentKind:("Solution" OR "Article")', `id:${nodeId}`],
54
+ fl: 'id, allTitle, publishedTitle',
55
+ };
56
+ const response = yield search.solrSearchV2(queryParam, 'kcs', expression);
57
+ const docs = ((_a = response === null || response === void 0 ? void 0 : response.response) === null || _a === void 0 ? void 0 : _a.docs) || [];
58
+ if (docs.length == 0) {
59
+ throw new Error('');
60
+ }
61
+ return docs;
62
+ }
63
+ catch (err) {
64
+ throw err;
65
+ }
66
+ });
67
+ }
37
68
  export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i }) => {
69
+ var _a, _b, _c;
38
70
  const [isPreview, setIsPreview] = useState(true);
39
71
  const [isFetchingSolrSearch, setIsFetchingSolrSearch] = useState(false);
40
72
  const editToggle = () => {
@@ -42,44 +74,49 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
42
74
  };
43
75
  const content = category.content && category.content[i];
44
76
  const { t } = useTranslation();
45
- const { topContentEditState, isCatOnlyForMajorVersion, selectedProduct, selectedVersion, contentUrls } = useTopContentContext();
77
+ const { topContentEditState, isCatOnlyForMajorVersion, selectedProduct, selectedVersion, contentUrls, filteredTags, } = useTopContentContext();
78
+ const tagManagementEditState = useContext(TagManagementStateContext);
79
+ const { tags: tagOptions } = tagManagementEditState;
80
+ const ref = useRef(null);
46
81
  const topContentDispatch = useTopContentDispatchContext();
47
82
  const [localContentUrl, setLocalContentUrl] = useState(content.contentUrl);
48
83
  const [localContentTitle, setLocalContentTitle] = useState(content.contentTitle);
84
+ const [localSelectedTags, setLocalSelectedTags] = useState(content.tags || []);
85
+ const [localExpiryDate, setLocalExpiryDate] = useState((content === null || content === void 0 ? void 0 : content.expiryDate) || '');
49
86
  const [newCategory, setNewCategory] = useState(undefined);
50
87
  const [contentTitleIsValid, setContentTitleIsValid] = useState(true);
51
88
  const [contentUrlIsValid, setContentUrlIsValid] = useState(true);
52
89
  const [showDuplicateError, setShowDuplicateError] = useState(false);
53
90
  const [duplicatUrlErrorArray, setDuplicatUrlErrorArray] = useState([]);
54
91
  const [isSaving, setIsSaving] = useState(false);
92
+ const [shouldShowExpDateErr, setShouldShowExpDateErr] = useState(false);
93
+ const [datePickerFocused, setDatePickerFocused] = useState(false);
94
+ const duplicateTitleCategoryIndex = findIndex(category.content, (c) => c.contentTitle === localContentTitle.trim());
95
+ const isDuplicateTitle = duplicateTitleCategoryIndex !== -1 && duplicateTitleCategoryIndex !== i && !isEmpty(localContentTitle.trim());
96
+ const oldTagsIds = useMemo(() => { var _a; return ((_a = content === null || content === void 0 ? void 0 : content.tags) === null || _a === void 0 ? void 0 : _a.map((t) => t.id)) || []; }, [content === null || content === void 0 ? void 0 : content.tags]);
97
+ const localTagsIds = useMemo(() => localSelectedTags === null || localSelectedTags === void 0 ? void 0 : localSelectedTags.map((t) => t.id), [localSelectedTags]);
98
+ const expiryDateErrMsg = isEmpty(localExpiryDate) || isFutureDate(localExpiryDate) ? '' : t('Invalid expiry date');
55
99
  const onContentTitleChange = (contentTitle, event) => {
56
100
  const contentTitleIsValid = event.target.validity.valid;
57
101
  setContentTitleIsValid(contentTitleIsValid);
58
102
  setLocalContentTitle(contentTitle);
59
103
  };
104
+ const handleLocalTagChange = (tags) => {
105
+ setLocalSelectedTags(tags);
106
+ };
60
107
  const updateContentTitleFromUrl = (contentUrl) => __awaiter(void 0, void 0, void 0, function* () {
61
- var _a, _b, _c;
108
+ var _a, _b;
62
109
  // throws toast warning and clears it after 4 seconds
63
110
  const throwWarningMessage = () => {
64
111
  const message = getText('Unable to automatically fetch title. Please enter manually');
65
- ToastNotification.addWarningMessage(message, { autoClose: 4000 });
112
+ ToastNotification.addWarningMessage(message, '', { autoClose: 4000 });
66
113
  };
67
114
  try {
68
115
  const nodeId = getDrupalResIdIfTypeFromUrl(contentUrl);
69
116
  if (!nodeId)
70
117
  return;
71
- const queryParam = {
72
- q: '*:*',
73
- start: 0,
74
- rows: 1,
75
- };
76
- const expression = {
77
- fq: ['documentKind:("Solution" OR "Article")', `id:${nodeId}`],
78
- fl: 'id, allTitle, publishedTitle',
79
- };
80
- const response = yield search.solrSearchV2(queryParam, 'kcs', expression);
81
- const docs = ((_a = response === null || response === void 0 ? void 0 : response.response) === null || _a === void 0 ? void 0 : _a.docs) || [];
82
- const contentTitle = ((_b = docs[0]) === null || _b === void 0 ? void 0 : _b.publishedTitle) || ((_c = docs[0]) === null || _c === void 0 ? void 0 : _c.allTitle);
118
+ const docs = yield getDocsFromUrl(contentUrl);
119
+ const contentTitle = ((_a = docs[0]) === null || _a === void 0 ? void 0 : _a.publishedTitle) || ((_b = docs[0]) === null || _b === void 0 ? void 0 : _b.allTitle);
83
120
  if (docs.length > 0 && docs[0].id === nodeId + '' && contentTitle) {
84
121
  setLocalContentTitle(contentTitle);
85
122
  setContentTitleIsValid(true);
@@ -95,34 +132,17 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
95
132
  const checkDuplicateUrls = (contentUrl) => {
96
133
  const dupObjCopy = cloneDeep(contentUrls);
97
134
  const selectedCategory = category.categoryName;
98
- // remove old url that is edited from obj
135
+ //we are storing encoded urls in contentUrls
136
+ const contentUrlEncoded = encodeURI(contentUrl);
99
137
  if (dupObjCopy[content.contentUrl] && dupObjCopy[content.contentUrl][selectedCategory] > 1) {
100
138
  dupObjCopy[content.contentUrl][selectedCategory]--;
101
139
  }
102
140
  else {
103
141
  delete dupObjCopy[content.contentUrl];
104
142
  }
105
- //remove prev url from dup obj
106
- if (dupObjCopy[localContentUrl]) {
107
- if (dupObjCopy[localContentUrl][selectedCategory]) {
108
- dupObjCopy[localContentUrl][selectedCategory]--;
109
- }
110
- }
111
- //add new typed url to dup
112
- if (dupObjCopy[contentUrl]) {
113
- if (dupObjCopy[contentUrl][selectedCategory]) {
114
- dupObjCopy[contentUrl][selectedCategory]++;
115
- }
116
- else {
117
- dupObjCopy[contentUrl][selectedCategory] = 1;
118
- }
119
- }
120
- else {
121
- dupObjCopy[contentUrl] = { [selectedCategory]: 1 };
122
- }
123
- if (dupObjCopy[contentUrl][selectedCategory] > 1 || Object.keys(dupObjCopy[contentUrl]).length > 1) {
143
+ if (!isEmpty(dupObjCopy[contentUrlEncoded])) {
124
144
  const dupArrays = [];
125
- for (const cat in dupObjCopy[contentUrl]) {
145
+ for (const cat in dupObjCopy[contentUrlEncoded]) {
126
146
  if (cat !== 'undefined') {
127
147
  cat === category.categoryName
128
148
  ? dupArrays.unshift(React.createElement("strong", { key: `${cat}` }, "this section"))
@@ -138,11 +158,15 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
138
158
  }
139
159
  };
140
160
  const onContentUrlChange = (contentUrl, event) => __awaiter(void 0, void 0, void 0, function* () {
141
- setContentUrlIsValid(event.target.validity.valid);
161
+ setContentUrlIsValid(isValidUrl(contentUrl));
142
162
  checkDuplicateUrls(contentUrl);
143
163
  setLocalContentUrl(contentUrl);
164
+ });
165
+ const onLocalContentUrlChange = () => __awaiter(void 0, void 0, void 0, function* () {
166
+ if (localContentUrl === content.contentUrl)
167
+ return;
144
168
  setIsFetchingSolrSearch(true);
145
- yield updateContentTitleFromUrl(contentUrl);
169
+ yield updateContentTitleFromUrl(localContentUrl);
146
170
  setIsFetchingSolrSearch(false);
147
171
  });
148
172
  const onDelete = () => __awaiter(void 0, void 0, void 0, function* () {
@@ -157,7 +181,10 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
157
181
  });
158
182
  const onSaveAddContentToCategory = () => __awaiter(void 0, void 0, void 0, function* () {
159
183
  try {
160
- const newContent = Object.assign(Object.assign({}, content), { contentTitle: localContentTitle, contentUrl: localContentUrl });
184
+ const newContent = Object.assign(Object.assign({}, content), { contentTitle: localContentTitle, contentUrl: localContentUrl, tagList: localSelectedTags.map((t) => t.id), tags: localSelectedTags.map((t) => ({ id: t.id, tagName: t.tagName })) });
185
+ if (!isEmpty(localExpiryDate)) {
186
+ newContent.expiryDate = localExpiryDate;
187
+ }
161
188
  setIsSaving(true);
162
189
  yield saveAddToTopContent(topContentDispatch, topContentEditState, category.id, category.categoryId, newContent, i);
163
190
  ToastNotification.addSuccessMessage(t('Content added successfully'));
@@ -171,10 +198,15 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
171
198
  return;
172
199
  });
173
200
  const onSaveUpdateContent = () => __awaiter(void 0, void 0, void 0, function* () {
201
+ const newTags = differenceBy(localTagsIds, oldTagsIds);
202
+ const deletedTags = differenceBy(oldTagsIds, localTagsIds);
174
203
  try {
175
- const updatedContent = Object.assign(Object.assign({}, content), { contentTitle: localContentTitle, contentUrl: localContentUrl });
204
+ const updatedContent = Object.assign(Object.assign({}, content), { contentTitle: localContentTitle, contentUrl: localContentUrl, tagList: newTags, tags: localSelectedTags.map((t) => ({ id: t.id, tagName: t.tagName })) });
205
+ if (!isEmpty(localExpiryDate)) {
206
+ updatedContent.expiryDate = localExpiryDate;
207
+ }
176
208
  setIsSaving(true);
177
- yield saveChangeInCategoryContent(topContentDispatch, topContentEditState, category.categoryId, updatedContent, i);
209
+ yield saveChangeInCategoryContent(topContentDispatch, topContentEditState, category.categoryId, updatedContent, deletedTags);
178
210
  editToggle();
179
211
  ToastNotification.addSuccessMessage(t('Content updated successfully'));
180
212
  }
@@ -187,7 +219,10 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
187
219
  });
188
220
  const onSaveCreateNewCategory = () => __awaiter(void 0, void 0, void 0, function* () {
189
221
  try {
190
- const newContent = Object.assign(Object.assign({}, content), { contentTitle: localContentTitle, contentUrl: localContentUrl });
222
+ const newContent = Object.assign(Object.assign({}, content), { contentTitle: localContentTitle, contentUrl: localContentUrl, tagList: localSelectedTags.map((t) => t.id), tags: localSelectedTags.map((t) => ({ id: t.id, tagName: t.tagName })) });
223
+ if (!isEmpty(localExpiryDate)) {
224
+ newContent.expiryDate = localExpiryDate;
225
+ }
191
226
  setIsSaving(true);
192
227
  yield saveAddedNewSectionContents(topContentDispatch, topContentEditState, newCategory, selectedProduct, selectedVersion, isCatOnlyForMajorVersion, newContent);
193
228
  ToastNotification.addSuccessMessage(t('Category created successfully'));
@@ -219,6 +254,7 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
219
254
  setNewCategory(category);
220
255
  };
221
256
  const onCancel = () => {
257
+ var _a;
222
258
  if (content.mode === ContentMode.NEW_SECTION_CONTENT) {
223
259
  fetchTopContent(topContentDispatch, selectedProduct, selectedVersion);
224
260
  }
@@ -234,51 +270,134 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
234
270
  setShowDuplicateError(false);
235
271
  setContentUrlIsValid(true);
236
272
  setIsAddingCategory(topContentDispatch, false);
273
+ setLocalSelectedTags(content.tags);
274
+ setLocalExpiryDate((_a = content.expiryDate) !== null && _a !== void 0 ? _a : '');
275
+ };
276
+ const expiryDateValidator = (date) => {
277
+ const today = new Date();
278
+ if (date < today)
279
+ return t('Invalid expiry date');
280
+ return '';
281
+ };
282
+ const onExpiryDateChange = (event, str, date) => {
283
+ setLocalExpiryDate(str);
237
284
  };
285
+ useDebounce(() => {
286
+ onLocalContentUrlChange();
287
+ }, [localContentUrl], 1000);
238
288
  useEffect(() => {
239
289
  if (isArrangingContent)
240
290
  setIsPreview(true);
241
291
  }, [isArrangingContent]);
292
+ useEffect(() => {
293
+ var _a;
294
+ setLocalContentTitle(content.contentTitle);
295
+ setLocalContentUrl(content.contentUrl);
296
+ setLocalSelectedTags(content.tags || []);
297
+ setLocalExpiryDate((_a = content.expiryDate) !== null && _a !== void 0 ? _a : '');
298
+ }, [content]);
299
+ useEffect(() => {
300
+ var _a, _b;
301
+ const datePickerElement = (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.querySelector('#content-expiry-date input');
302
+ const tagsSelectorElement = (_b = ref === null || ref === void 0 ? void 0 : ref.current) === null || _b === void 0 ? void 0 : _b.querySelector('#top-content-tag');
303
+ const handleFocusOnDatePicker = () => {
304
+ setDatePickerFocused(true);
305
+ };
306
+ const handleTagSelectorClick = () => {
307
+ !shouldShowExpDateErr && setShouldShowExpDateErr(true);
308
+ };
309
+ if (datePickerElement) {
310
+ datePickerElement.addEventListener('focusin', handleFocusOnDatePicker);
311
+ }
312
+ if (tagsSelectorElement) {
313
+ tagsSelectorElement.addEventListener('click', handleTagSelectorClick);
314
+ }
315
+ return () => {
316
+ if (datePickerElement) {
317
+ datePickerElement.removeEventListener('focusin', handleFocusOnDatePicker);
318
+ }
319
+ if (tagsSelectorElement) {
320
+ tagsSelectorElement.removeEventListener('click', handleTagSelectorClick);
321
+ }
322
+ setDatePickerFocused(false);
323
+ setShouldShowExpDateErr(false);
324
+ };
325
+ // eslint-disable-next-line react-hooks/exhaustive-deps
326
+ }, [isPreview]);
242
327
  // To check if input has spaces
243
328
  const doesInputHasSpaces = isEmpty(localContentTitle.trim());
244
329
  // To disable save button if empty depending on spaces
245
330
  const isSaveButtonDisabled = doesInputHasSpaces ||
246
- !(contentTitleIsValid && contentUrlIsValid && localContentTitle && localContentUrl) ||
331
+ isDuplicateTitle ||
332
+ !(contentTitleIsValid &&
333
+ contentUrlIsValid &&
334
+ localContentTitle &&
335
+ localContentUrl &&
336
+ ((isValidDate(localExpiryDate) && isEmpty(expiryDateValidator(new Date(localExpiryDate)))) ||
337
+ (isEmpty(localExpiryDate) && isEmpty((_a = content.expiryDate) !== null && _a !== void 0 ? _a : '')))) ||
247
338
  (!newCategory && content.mode === ContentMode.NEW_SECTION_CONTENT) ||
248
- (localContentUrl === content.contentUrl && localContentTitle === content.contentTitle);
339
+ (localContentUrl === content.contentUrl &&
340
+ localContentTitle === content.contentTitle &&
341
+ isEqual(localTagsIds, oldTagsIds) &&
342
+ isEqual(localExpiryDate.split('T')[0], ((_b = content.expiryDate) === null || _b === void 0 ? void 0 : _b.split('T')[0]) || ''));
249
343
  const lastModifiedBy = t(`Last modified {{created}} by {{by}}`, {
250
344
  created: formatDate(content.updatedOn || content.createdOn),
251
345
  by: content.updatedBy || content.createdBy,
252
346
  });
253
347
  return (React.createElement(React.Fragment, null,
254
- isPreview && content.mode !== ContentMode.ADD && content.mode !== ContentMode.NEW_SECTION_CONTENT && (React.createElement("li", { className: `push-bottom-narrow ${snapshot.isDragging ? 'list-flat tc-drag' : ''}` },
255
- isArrangingContent && (React.createElement(GripVerticalIcon, { style: { cursor: 'move' }, title: t('Drag'), color: "#06c", size: "sm", className: "pf-u-mr-sm" })),
348
+ isPreview && content.mode !== ContentMode.ADD && content.mode !== ContentMode.NEW_SECTION_CONTENT && (React.createElement("li", { className: `push-bottom-narrow ${(snapshot === null || snapshot === void 0 ? void 0 : snapshot.isDragging) ? 'list-flat tc-drag' : ''}` },
349
+ isArrangingContent && (React.createElement(Icon, { size: "sm" },
350
+ React.createElement(GripVerticalIcon, { style: { cursor: 'move' }, title: t('Drag'), color: "#06c", className: "pf-v5-u-mr-sm" }))),
256
351
  !isArrangingContent ? (React.createElement(React.Fragment, null,
257
352
  React.createElement(TopContentSingleItemLink, { url: getTopContentUrl(content.contentUrl), title: content.contentTitle, contentId: content.topContentId, needsAttention: content.isAttentionNeeded, lastModifiedBy: lastModifiedBy, selectedVersion: selectedVersion }),
258
353
  ' ',
259
354
  React.createElement(Button, { variant: "link", isInline: true, icon: React.createElement(EditAltIcon, null), onClick: editToggle, title: 'Edit' }))) : (content.contentTitle),
260
- React.createElement("div", null, lastModifiedBy))),
261
- (!isPreview || content.mode === ContentMode.ADD || content.mode === ContentMode.NEW_SECTION_CONTENT) && (React.createElement("form", { noValidate: true, onSubmit: onSubmit, className: "card card-light push-bottom" },
355
+ React.createElement("div", null, lastModifiedBy),
356
+ React.createElement("div", null,
357
+ (content.tags || []).map((tag) => (React.createElement(Label, { isCompact: true, className: "pf-v5-u-mr-xs pf-v5-u-mt-sm", key: tag.id, color: filteredTags.some((t) => t.id === tag.id) ? 'gold' : 'grey' }, tag.tagName))),
358
+ !isEmpty((_c = content.expiryDate) !== null && _c !== void 0 ? _c : '') && !isFutureDate(content.expiryDate) && (React.createElement(Label, { isCompact: true, className: "pf-v5-u-mr-xs pf-v5-u-mt-sm", color: "red" },
359
+ React.createElement(Trans, null, "Outdated Content")))))),
360
+ (!isPreview || content.mode === ContentMode.ADD || content.mode === ContentMode.NEW_SECTION_CONTENT) && (React.createElement("form", { noValidate: true, onSubmit: onSubmit, className: "card card-light push-bottom", ref: ref },
262
361
  content.mode === ContentMode.NEW_SECTION_CONTENT && (React.createElement(AddNewCategoryDropDown, { onCategoryChange: onAddedNewCategoryChange })),
263
362
  React.createElement("div", { className: "form-group" },
264
363
  React.createElement("label", { htmlFor: localContentTitle },
265
364
  "Heading",
266
365
  ' ',
267
366
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
268
- React.createElement("div", { className: "input-wrapper" },
269
- React.createElement(CustomTextInput, { isRequired: true, isSpaceAllowed: false, className: `form-control${!contentTitleIsValid ? ' form-invalid' : ''}`, type: "text", maxLength: 254, required: true, value: localContentTitle, isDisabled: isFetchingSolrSearch, "aria-label": t('Copy and paste the heading for consistency'), placeholder: t('Copy and paste the heading for consistency'), onChange: onContentTitleChange, validated: contentTitleIsValid ? ValidatedOptions.default : ValidatedOptions.error }))),
367
+ React.createElement(TextInput, { isRequired: true, type: "text", maxLength: 254, required: true, value: localContentTitle, isDisabled: isFetchingSolrSearch, "aria-label": t('Copy and paste the heading for consistency'), placeholder: t('Copy and paste the heading for consistency'), onFocus: () => setShouldShowExpDateErr(true), onChange: (e, v) => {
368
+ onContentTitleChange(v, e);
369
+ !shouldShowExpDateErr && setShouldShowExpDateErr(true);
370
+ }, validated: contentTitleIsValid && !isDuplicateTitle
371
+ ? ValidatedOptions.default
372
+ : ValidatedOptions.error }),
373
+ isDuplicateTitle && (React.createElement("p", { className: "form-instructions form-invalid " },
374
+ React.createElement(ExclamationCircleIcon, { color: "#c9190b", className: "pf-u-mr-sm" }),
375
+ ' ',
376
+ React.createElement(Trans, null, "Duplicate heading. Content with this heading is already present.")))),
270
377
  React.createElement("div", { className: "form-group" },
271
378
  React.createElement("label", { htmlFor: localContentUrl },
272
379
  "Link to content",
273
380
  ' ',
274
381
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
275
- React.createElement(CustomTextInput, { type: "url", maxLength: 254, isRequired: true, pattern: "^(http(s)?:\\/\\/)+[\\w\\-\\._~:\\/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$", isSpaceAllowed: false, className: `form-control${!contentUrlIsValid ? ' form-invalid' : ''}`, value: getTopContentUrl(localContentUrl), "aria-label": t('Entering a solution or article link first will automatically generate the heading for you'), placeholder: t('Entering a solution or article link first will automatically generate the heading for you'), onChange: onContentUrlChange, validated: contentUrlIsValid ? ValidatedOptions.default : ValidatedOptions.error }),
276
- showDuplicateError && (React.createElement("p", { className: "form-instructions" },
277
- React.createElement(ExclamationCircleIcon, { color: "#c9190b", className: "pf-u-mr-sm" }),
382
+ React.createElement(TextInput, { type: "url", maxLength: 254, isRequired: true, pattern: "^(http(s)?:\\/\\/)+[\\w\\-\\._~:\\/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$", value: getTopContentUrl(localContentUrl), "aria-label": t('Entering a solution or article link first will automatically generate the heading for you'), placeholder: t('Entering a solution or article link first will automatically generate the heading for you'), onFocus: () => setShouldShowExpDateErr(true), onChange: (evt, val) => {
383
+ onContentUrlChange(val, evt);
384
+ !shouldShowExpDateErr && setShouldShowExpDateErr(true);
385
+ }, validated: contentUrlIsValid ? ValidatedOptions.default : ValidatedOptions.error }),
386
+ showDuplicateError && (React.createElement("p", { className: "form-instructions form-invalid" },
387
+ React.createElement(ExclamationCircleIcon, { color: "#c9190b", className: "pf-v5-u-mr-sm" }),
278
388
  " Duplicate url. This url is already added in ",
279
389
  formatDuplicateWarning(duplicatUrlErrorArray),
280
390
  "."))),
281
- React.createElement("span", { className: "pf-c-accordion__expanded-content-footer" },
391
+ React.createElement(Flex, { className: "pf-v5-u-my-lg" },
392
+ React.createElement(FlexItem, { flex: { default: 'flex_1' } },
393
+ React.createElement(FormGroup, { label: t('Tags') },
394
+ React.createElement("div", { className: "pf-v5-c-form-control" },
395
+ React.createElement(TagsSelector, { tagOptions: tagOptions, onChange: handleLocalTagChange, selectedTags: localSelectedTags, placeholder: t('Select tags to improve discoverability'), id: "top-content-tag" })))),
396
+ React.createElement(FlexItem, null,
397
+ React.createElement(FormGroup, { label: t('Expiry date') },
398
+ React.createElement(DatePicker, { onBlur: onExpiryDateChange, onChange: onExpiryDateChange, value: !isEmpty(localExpiryDate) ? localExpiryDate.split('T')[0] : '', validators: [expiryDateValidator], id: "content-expiry-date", invalidFormatText: t('Invalid date format') }),
399
+ shouldShowExpDateErr && !datePickerFocused && (React.createElement("p", { className: "form-instructions form-invalid pf-v5-u-font-size-sm pf-v5-u-danger-color-200 pf-v5-u-my-0" }, expiryDateErrMsg))))),
400
+ React.createElement("span", { className: "top-content-single-item-footer" },
282
401
  React.createElement("span", null,
283
402
  React.createElement(Button, { variant: "primary", onClick: onSave, isDisabled: isSaveButtonDisabled || isSaving, isLoading: isSaving },
284
403
  React.createElement(Trans, null, "Save")),