@rh-support/manage 2.1.38 → 2.4.10-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/lib/esm/components/Configs/ConfigSwitch.js +1 -1
- package/lib/esm/components/Configs/ConfigsTable.js +1 -1
- package/lib/esm/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.js +1 -1
- package/lib/esm/components/Groups/GroupSelect/GroupSelect.d.ts.map +1 -1
- package/lib/esm/components/Groups/GroupSelect/GroupSelect.js +3 -3
- package/lib/esm/components/Groups/GroupUserPermissionsSelect/GroupUserPermissionsSelect.js +1 -1
- package/lib/esm/components/Groups/ManageGroupUsers/ManageGroupUsers.js +2 -2
- package/lib/esm/components/ManageBookmarkedAccountsTab/AddEditBookmarkModal.js +1 -1
- package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.d.ts.map +1 -1
- package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.js +6 -9
- package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkGroupSelector.d.ts.map +1 -1
- package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkGroupSelector.js +5 -8
- package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.d.ts.map +1 -1
- package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.js +4 -5
- package/lib/esm/components/ManagePartnerships/PartnershipsList.js +2 -2
- package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.js +2 -4
- package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.js +9 -11
- package/lib/esm/components/ManagePartnerships/Requests.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/Requests.js +4 -24
- package/lib/esm/components/ManagePartnerships/index.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/index.js +2 -2
- package/lib/esm/components/ManagePreferences/PreferencesHeader.js +1 -1
- package/lib/esm/components/ManagePreferences/components/PreferenceSelect.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/components/PreferenceSelect.js +2 -3
- package/lib/esm/components/ManagePreferences/components/PreferenceSwitch.js +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.js +1 -2
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseSearch.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseSearch.js +1 -2
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.js +6 -7
- package/lib/esm/components/ManageTable/ManageTable.d.ts.map +1 -1
- package/lib/esm/components/ManageTable/ManageTable.js +6 -5
- package/lib/esm/components/NotificationEmails/NotificationEmailsModal.d.ts.map +1 -1
- package/lib/esm/components/NotificationEmails/NotificationEmailsModal.js +6 -13
- package/lib/esm/components/NotificationEmails/index.js +3 -3
- package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimit.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimit.js +2 -3
- package/lib/esm/components/TopContentManagement/CategoryLimit/CategoryLimitGuidelines.js +1 -1
- package/lib/esm/components/TopContentManagement/CategoryLimit/QuestionAnswer.js +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.js +2 -2
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.js +3 -3
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.d.ts +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.js +3 -3
- package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.js +4 -4
- package/lib/esm/components/TopContentManagement/NoTopContentFound.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/NoTopContentFound.js +15 -14
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.js +2 -2
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategory.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategory.js +2 -3
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.js +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.js +32 -25
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.js +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.js +3 -3
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestion.js +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHint.js +3 -3
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.js +6 -7
- package/lib/esm/components/TopContentManagement/TopContentHeader.js +1 -1
- package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.js +6 -6
- package/lib/esm/reducers/TopContentHelpers.js +4 -4
- package/lib/esm/reducers/TopContentReducer.d.ts.map +1 -1
- package/lib/esm/reducers/TopContentReducer.js +3 -4
- package/lib/esm/scss/_main.scss +43 -25
- package/lib/esm/scss/_pf4-overrides.scss +132 -0
- package/lib/esm/scss/index.scss +5 -5
- package/package.json +15 -15
- package/lib/esm/scss/_pf-overrides.scss +0 -134
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { Alert, AlertActionCloseButton, Bullseye, EmptyState, EmptyStateBody,
|
|
12
|
+
import { Alert, AlertActionCloseButton, Bullseye, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateVariant, PaginationVariant, Title, } from '@patternfly/react-core';
|
|
13
13
|
import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
|
|
14
14
|
import { PFTable, Table, TablePagination } from '@rh-support/components';
|
|
15
15
|
import React from 'react';
|
|
@@ -21,9 +21,10 @@ const noResultFoundRow = (noResultString = '') => [
|
|
|
21
21
|
{
|
|
22
22
|
props: { colSpan: 10 },
|
|
23
23
|
title: (React.createElement(Bullseye, null,
|
|
24
|
-
React.createElement(EmptyState, { variant: EmptyStateVariant.
|
|
25
|
-
React.createElement(
|
|
26
|
-
|
|
24
|
+
React.createElement(EmptyState, { variant: EmptyStateVariant.small },
|
|
25
|
+
React.createElement(EmptyStateIcon, { icon: SearchIcon }),
|
|
26
|
+
React.createElement(Title, { headingLevel: "h3", size: "md" },
|
|
27
|
+
React.createElement(Trans, null, "No results found")),
|
|
27
28
|
React.createElement(EmptyStateBody, null, noResultString ? noResultString : React.createElement(Trans, null, "There are no results to display."))))),
|
|
28
29
|
},
|
|
29
30
|
],
|
|
@@ -34,7 +35,7 @@ export function ManageTable(props) {
|
|
|
34
35
|
const pagination = () => (props.pagination !== undefined ? props.pagination : true);
|
|
35
36
|
return (React.createElement("div", { className: "table-wrapper" },
|
|
36
37
|
isError && (React.createElement(React.Fragment, null,
|
|
37
|
-
React.createElement(Alert, { variant: errorVariant, isInline: true, title: errorTitle, actionClose: React.createElement(AlertActionCloseButton, null), className: "pf-
|
|
38
|
+
React.createElement(Alert, { variant: errorVariant, isInline: true, title: errorTitle, actionClose: React.createElement(AlertActionCloseButton, null), className: "pf-u-my-sm" }, errorComponent))),
|
|
38
39
|
React.createElement(Table, Object.assign({}, tableProps),
|
|
39
40
|
React.createElement(PFTable, { sortInfo: sortInfo, "aria-label": ariaLabel, pagination: pagination(), emptyStateRow: noResultFoundRow(props.noResultText), actions: actions, areActionsDisabled: areActionsDisabled, actionResolver: actionResolver, isLoading: isFetching, keepPageNumberOnDataChange: keepPageNumberOnDataChange }),
|
|
40
41
|
tableProps.data.length > 0 && pagination() && (React.createElement("footer", null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationEmailsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/NotificationEmails/NotificationEmailsModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NotificationEmailsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/NotificationEmails/NotificationEmailsModal.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,yBAAyB,EAAE,GAAG,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB,EAAE,OAAO,CAAC;IACnC,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,uBAAuB,UAAW,MAAM,gBA8LpD,CAAC"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { customEmail } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, ButtonVariant, Form, FormGroup,
|
|
11
|
+
import { Button, ButtonVariant, Form, FormGroup, Modal, ModalVariant, TextInput, ValidatedOptions, } from '@patternfly/react-core';
|
|
12
12
|
import { ToastNotification, useFetch } from '@rh-support/components';
|
|
13
13
|
import { isEmailValid } from '@rh-support/utils';
|
|
14
14
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -105,17 +105,10 @@ export const NotificationEmailsModal = (props) => {
|
|
|
105
105
|
React.createElement(Trans, null, "Cancel")),
|
|
106
106
|
] },
|
|
107
107
|
React.createElement(Form, null,
|
|
108
|
-
React.createElement(FormGroup, { label: t('Email address'), isRequired: true, fieldId: "email-notification-first-emailaddress" },
|
|
109
|
-
!
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
React.createElement(TextInput, { value: email, isRequired: true, type: "text", onChange: (_event, localemail) => onEmailChange(localemail), "aria-label": t('Email address'), placeholder: t('Email address'), maxLength: 254, validated: isValidEmail && !isEmailDuplicate ? ValidatedOptions.default : ValidatedOptions.error, isDisabled: !props.isAddingNotificationEmail })),
|
|
113
|
-
React.createElement(FormGroup, { label: t('First name'), isRequired: true, fieldId: "email-notification-first-name" },
|
|
114
|
-
!(isValidEmail && !isEmailDuplicate) && (React.createElement(FormHelperText, null,
|
|
115
|
-
React.createElement(HelperText, null,
|
|
116
|
-
React.createElement(HelperTextItem, { variant: ValidatedOptions.error },
|
|
117
|
-
React.createElement(Trans, null, "First name cannot be empty"))))),
|
|
118
|
-
React.createElement(TextInput, { value: firstName, isRequired: true, validated: isValidFirstName ? ValidatedOptions.default : ValidatedOptions.error, type: "text", onChange: (_event, firstName) => onFirstNameChange(firstName), "aria-label": t('First name'), placeholder: t('First name'), maxLength: 254 })),
|
|
108
|
+
React.createElement(FormGroup, { label: t('Email address'), isRequired: true, fieldId: "email-notification-first-emailaddress", validated: isValidEmail && !isEmailDuplicate ? ValidatedOptions.default : ValidatedOptions.error, helperTextInvalid: !isValidEmail ? t('Invalid email') : isEmailDuplicate ? t('Duplicate Email') : '' },
|
|
109
|
+
React.createElement(TextInput, { value: email, className: `form-control${!isValidEmail && isEmailDuplicate ? ' form-invalid' : ''}`, isRequired: true, type: "text", onChange: onEmailChange, "aria-label": t('Email address'), placeholder: t('Email address'), maxLength: 254, validated: isValidEmail && !isEmailDuplicate ? ValidatedOptions.default : ValidatedOptions.error, isDisabled: !props.isAddingNotificationEmail })),
|
|
110
|
+
React.createElement(FormGroup, { label: t('First name'), isRequired: true, fieldId: "email-notification-first-name", validated: isValidFirstName ? ValidatedOptions.default : ValidatedOptions.error, helperTextInvalid: t('First name cannot be empty') },
|
|
111
|
+
React.createElement(TextInput, { value: firstName, className: "form-control", isRequired: true, type: "text", onChange: onFirstNameChange, "aria-label": t('First name'), placeholder: t('First name'), maxLength: 254, validated: isValidFirstName ? ValidatedOptions.default : ValidatedOptions.error })),
|
|
119
112
|
React.createElement(FormGroup, { label: t('Last name'), fieldId: "email-notification-last-name" },
|
|
120
|
-
React.createElement(TextInput, { value: lastName, type: "text", onChange:
|
|
113
|
+
React.createElement(TextInput, { value: lastName, className: "form-control", type: "text", onChange: onLastNameChange, "aria-label": t('Last name'), placeholder: t('Last name'), maxLength: 254 })))));
|
|
121
114
|
};
|
|
@@ -162,13 +162,13 @@ export function NotificationEmails() {
|
|
|
162
162
|
React.createElement("div", { className: "toolbar" },
|
|
163
163
|
React.createElement("div", { className: "toolbar-left" },
|
|
164
164
|
React.createElement("label", { htmlFor: "notification-emails-input" }, t('Add an Email')),
|
|
165
|
-
React.createElement(TextInput, { id: "notification-email-input", placeholder: t('Enter a valid email address'), "aria-label": t('Enter a valid email address'), onChange:
|
|
166
|
-
React.createElement("span", { className: "pf-
|
|
165
|
+
React.createElement(TextInput, { id: "notification-email-input", placeholder: t('Enter a valid email address'), "aria-label": t('Enter a valid email address'), onChange: onEmailInputBoxChange }),
|
|
166
|
+
React.createElement("span", { className: "pf-u-ml-sm" },
|
|
167
167
|
React.createElement(Button, { variant: ButtonVariant.primary, isInline: true, onClick: addEmail, "data-tracking-id": "email-address-add-button", isDisabled: isAddButtonDisabled },
|
|
168
168
|
React.createElement(Trans, null, "Add")))),
|
|
169
169
|
React.createElement("div", { className: "toolbar-right" },
|
|
170
170
|
React.createElement("label", { htmlFor: "search-notification-emails-selector" }, t('Filter by')),
|
|
171
|
-
React.createElement(SearchInput, { className: "pf-
|
|
171
|
+
React.createElement(SearchInput, { className: "pf-u-flex-grow-1 pf-c-search-input pf-u-background-color-100", id: "search-notification-emails-selector", placeholder: t('Search for an existing email'), value: searchString, onChange: onSearchChange, onClear: () => onSearchChange(''), "aria-label": t('Search for an existing email') }))),
|
|
172
172
|
React.createElement(ManageTable, { ariaLabel: t('Table to manage Notification emails'), columns: columns, data: emailLists || [], sortInfo: { column: 'first-name', direction: 'asc' }, errorVariant: AlertVariant.warning, isFetching: accountCustomEmails.isFetching, isError: accountCustomEmails.isError, errorTitle: t('Notification emails error'), errorComponent: React.createElement(Trans, null, "Could not get notification emails"), actionResolver: emailLists && emailLists.length !== 0 ? actionResolver : null, keepPageNumberOnDataChange: keepPageNumberOnDataChange }),
|
|
173
173
|
React.createElement(NotificationEmailsModal, { isOpen: isEditModalOpen, onClose: onModalClose, selectedEmailNotification: selectedEmailNotification, onUpdate: onUpdate, onAdd: onAdd, accountNumber: loggedInUserJwtToken.account_number, isAddingNotificationEmail: isAddingNotificationEmail, emailsList: (accountCustomEmails.data || []).map((e) => e.emailAddress) })));
|
|
174
174
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryLimit.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/CategoryLimit/CategoryLimit.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAK5C,QAAA,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"CategoryLimit.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/CategoryLimit/CategoryLimit.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAK5C,QAAA,MAAM,aAAa,EAAE,EA8BpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button,
|
|
1
|
+
import { Button, Popover } from '@patternfly/react-core';
|
|
2
2
|
import CircleInfo from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import { Trans } from 'react-i18next';
|
|
@@ -14,8 +14,7 @@ const CategoryLimit = () => {
|
|
|
14
14
|
setModalOpen(true);
|
|
15
15
|
} }, "Review guidelines."))) },
|
|
16
16
|
React.createElement(Button, { variant: "plain" },
|
|
17
|
-
React.createElement(
|
|
18
|
-
React.createElement(CircleInfo, null)))),
|
|
17
|
+
React.createElement(CircleInfo, { size: "md" }))),
|
|
19
18
|
React.createElement(CategoryLimitGuidelines, { isModalOpen: isModalOpen, onHideModal: onHideModal })));
|
|
20
19
|
};
|
|
21
20
|
export default CategoryLimit;
|
|
@@ -10,7 +10,7 @@ export const CategoryLimitGuidelines = ({ isModalOpen, onHideModal }) => {
|
|
|
10
10
|
React.createElement(Title, { headingLevel: "h1", size: TitleSizes['2xl'] },
|
|
11
11
|
React.createElement(Trans, null, " Top content guideline ")),
|
|
12
12
|
React.createElement(Trans, null,
|
|
13
|
-
React.createElement("p", { className: "pf-
|
|
13
|
+
React.createElement("p", { className: "pf-u-pt-sm" }, "Guidelines and limitations for top content resources.")),
|
|
14
14
|
React.createElement(QuestionAnswer, { question: "What is top content?", answer: "Top content is defined as the top resource for given product and version that will provide the most value for our customer and the highest likelihood for case deflection." }),
|
|
15
15
|
React.createElement(QuestionAnswer, { question: "What is not top content", answer: "Resource that are accessible in other parts of the customer journey throughout the Customer Portal. For example, labs are not a top content resource. " }),
|
|
16
16
|
React.createElement(QuestionAnswer, { question: "Category and link restrictions", answer: `we allow for a minimum of ${DIGIT_WORD_MAP[CATEGORY_LIMIT.MIN]} and max ${DIGIT_WORD_MAP[CATEGORY_LIMIT.MAX]} categories, and links within each category.` })));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Title } from '@patternfly/react-core';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
|
-
const QuestionAnswer = ({ question, answer }) => (React.createElement("div", { className: "pf-
|
|
4
|
+
const QuestionAnswer = ({ question, answer }) => (React.createElement("div", { className: "pf-u-pt-lg" },
|
|
5
5
|
React.createElement(Title, { headingLevel: "h6", size: "md" },
|
|
6
6
|
React.createElement(Trans, null,
|
|
7
7
|
" ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/ContentAccordion.tsx"],"names":[],"mappings":"AAUA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,UAAU,MAAM;IACZ,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ContentAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/ContentAccordion.tsx"],"names":[],"mappings":"AAUA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,UAAU,MAAM;IACZ,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAoEvC,CAAC"}
|
|
@@ -25,11 +25,11 @@ export const ContentAccordion = ({ contentList, selectedVersion }) => {
|
|
|
25
25
|
});
|
|
26
26
|
return (React.createElement(AccordionItem, { key: topContentId },
|
|
27
27
|
React.createElement(AccordionToggle, { onClick: onToggle(topContentId), isExpanded: expanded === topContentId, id: contentTitle },
|
|
28
|
-
React.createElement("span", { className: isAttentionNeeded ? 'pf-
|
|
28
|
+
React.createElement("span", { className: isAttentionNeeded ? 'pf-u-danger-color-200' : '' },
|
|
29
29
|
' ',
|
|
30
30
|
contentTitle)),
|
|
31
31
|
React.createElement(AccordionContent, { id: contentTitle, isHidden: expanded !== topContentId },
|
|
32
|
-
React.createElement("span", { className: "pf-
|
|
32
|
+
React.createElement("span", { className: "pf-u-font-size-sm" }, lastModifiedBy),
|
|
33
33
|
React.createElement("br", null),
|
|
34
34
|
React.createElement("br", null),
|
|
35
35
|
React.createElement(PerformanceMetricClickCount, { needsAttention: isAttentionNeeded, contentId: topContentId, selectedVersion: selectedVersion }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/PerformanceMetrics.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"PerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/PerformanceMetrics.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,MAAM,CAsCzC,CAAC"}
|
|
@@ -8,8 +8,8 @@ export const PerformanceMetrics = ({ isModalOpen, onHideModal, needsAttention, c
|
|
|
8
8
|
] },
|
|
9
9
|
React.createElement(Title, { headingLevel: "h1", size: TitleSizes['2xl'] },
|
|
10
10
|
React.createElement(Trans, null, " Performance metrics ")),
|
|
11
|
-
React.createElement("p", { className: "pf-
|
|
12
|
-
React.createElement("div", { className: "pf-
|
|
13
|
-
React.createElement("div", { className: "pf-
|
|
11
|
+
React.createElement("p", { className: "pf-u-pb-lg pf-u-pt-sm" }, "Better understand the Performance for the top content resources."),
|
|
12
|
+
React.createElement("div", { className: "pf-u-pb-xs top-content-tooltip-view-metric-label" }, title),
|
|
13
|
+
React.createElement("div", { className: "pf-u-pb-lg" }, lastModifiedBy),
|
|
14
14
|
React.createElement(PerformanceMetricClickCount, { needsAttention: needsAttention, contentId: contentId, selectedVersion: selectedVersion })));
|
|
15
15
|
};
|
package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PerformanceMetricsSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,kBAAkB,EAAiB,MAAM,
|
|
1
|
+
{"version":3,"file":"PerformanceMetricsSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,kBAAkB,EAAiB,MAAM,wBAAwB,CAAC;AACjG,OAAO,KAAK,EAAE,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAG5C,UAAU,MAAM;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,CACd,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,WAAW,EAC3C,KAAK,EAAE,MAAM,GAAG,kBAAkB,EAClC,aAAa,CAAC,EAAE,OAAO,KACtB,IAAI,CAAC;IACV,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACpB,WAAW,EAAE,CAAC,MAAM,KAAA,KAAK,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,MAAM,CAuC/C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Select, SelectOption, SelectVariant } from '@patternfly/react-core
|
|
1
|
+
import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
4
|
export const PerformanceMetricsSelect = ({ placeholderText, title, onSelectCallback, options, optionValue, isLoading = false, isDisabled, }) => {
|
|
@@ -11,10 +11,10 @@ export const PerformanceMetricsSelect = ({ placeholderText, title, onSelectCallb
|
|
|
11
11
|
setOpen(false);
|
|
12
12
|
};
|
|
13
13
|
return (React.createElement(React.Fragment, null,
|
|
14
|
-
React.createElement("div", { className: "pf-
|
|
14
|
+
React.createElement("div", { className: "pf-u-font-weight-bold" },
|
|
15
15
|
React.createElement(Trans, null,
|
|
16
16
|
" ",
|
|
17
17
|
title,
|
|
18
18
|
" ")),
|
|
19
|
-
React.createElement(Select, { variant: SelectVariant.single, placeholderText: placeholderText, "aria-label": "Select Input with descriptions", onToggle:
|
|
19
|
+
React.createElement(Select, { variant: SelectVariant.single, placeholderText: placeholderText, "aria-label": "Select Input with descriptions", onToggle: onToggle, onSelect: onSelect, selections: selected, isOpen: isOpen, isDisabled: isDisabled || isLoading }, options.map((option, index) => (React.createElement(SelectOption, { key: index, value: optionValue(option) }))))));
|
|
20
20
|
};
|
package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionPerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VersionPerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.tsx"],"names":[],"mappings":"AAcA,OAAc,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAUhE,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,MAAM,CAsGhD,CAAC"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { pcm } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, ButtonVariant, Flex, FlexItem, Modal, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
|
|
11
|
+
import { Button, ButtonVariant, Flex, FlexItem, Modal, ModalVariant, Title, TitleSizes, } from '@patternfly/react-core';
|
|
12
12
|
import { useFetch } from '@rh-support/components';
|
|
13
13
|
import isEmpty from 'lodash/isEmpty';
|
|
14
14
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
@@ -56,13 +56,13 @@ export const VersionPerformanceMetrics = ({ isModalOpen, onHideModal, selectedVe
|
|
|
56
56
|
React.createElement("div", { className: "sticky-header" },
|
|
57
57
|
React.createElement(Title, { headingLevel: "h1", size: TitleSizes['2xl'] },
|
|
58
58
|
React.createElement(Trans, null, " Performance metrics ")),
|
|
59
|
-
React.createElement("p", { className: "pf-
|
|
59
|
+
React.createElement("p", { className: "pf-u-pt-sm" },
|
|
60
60
|
React.createElement(Trans, null, "Better understand the Performance for the top content resources.")),
|
|
61
61
|
React.createElement("br", null),
|
|
62
62
|
React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
|
|
63
|
-
React.createElement(FlexItem, { className: "pf-
|
|
63
|
+
React.createElement(FlexItem, { className: "pf-u-w-50 pf-u-pr-md", style: { marginRight: 'unset' } },
|
|
64
64
|
React.createElement(PerformanceMetricsSelect, { placeholderText: t(!isEmpty(versionOptions) ? 'Select a version' : 'No versions available'), title: t(`Version using ${selectedVersionProp}`), onSelectCallback: onVersionSelect, options: versionOptions, optionValue: (option) => option, isLoading: isLoading, isDisabled: isEmpty(versionOptions) })),
|
|
65
|
-
React.createElement(FlexItem, { className: "pf-
|
|
65
|
+
React.createElement(FlexItem, { className: "pf-u-w-50 pf-u-pl-md" },
|
|
66
66
|
React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a category'), title: t('Categories'), options: flagContentEditState, optionValue: (option) => option.categoryName, onSelectCallback: (e, selectedOption) => setSelectedCategory(selectedOption), isLoading: !selectedVersion || isTopContentLoading })))),
|
|
67
67
|
React.createElement("br", null),
|
|
68
68
|
React.createElement(ContentAccordion, { contentList: selectedContent, selectedVersion: selectedVersion })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoTopContentFound.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/NoTopContentFound.tsx"],"names":[],"mappings":"AAeA,UAAU,MAAM;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CACX,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,EACf,mCAAmC,CAAC,EAAE,OAAO,KAC5C,IAAI,CAAC;IACV,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,4BAA4B,EAAE,OAAO,CAAC;CACzC;AAED,wBAAgB,iBAAiB,CAAC,EAC9B,OAAO,EACP,OAAO,EACP,UAAU,EACV,aAAa,EACb,eAAe,EACf,4BAA4B,GAC/B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NoTopContentFound.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/NoTopContentFound.tsx"],"names":[],"mappings":"AAeA,UAAU,MAAM;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CACX,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,EACf,mCAAmC,CAAC,EAAE,OAAO,KAC5C,IAAI,CAAC;IACV,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,4BAA4B,EAAE,OAAO,CAAC;CACzC;AAED,wBAAgB,iBAAiB,CAAC,EAC9B,OAAO,EACP,OAAO,EACP,UAAU,EACV,aAAa,EACb,eAAe,EACf,4BAA4B,GAC/B,EAAE,MAAM,eAyFR"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, ButtonVariant, EmptyState, EmptyStateBody,
|
|
1
|
+
import { Button, ButtonVariant, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateVariant, Title, } 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-
|
|
13
|
+
iSemverVersion && (React.createElement("p", { className: "pf-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-
|
|
15
|
+
isXVersion && (React.createElement("p", { className: "pf-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-
|
|
20
|
+
React.createElement("p", { className: "pf-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,21 +38,22 @@ export function NoTopContentFound({ version, product, dataLength, onAddCategory,
|
|
|
38
38
|
xVersion),
|
|
39
39
|
' ',
|
|
40
40
|
"troubleshooting this version"),
|
|
41
|
-
React.createElement("div", { className: "pf-
|
|
42
|
-
React.createElement(Button, { isInline: true, className: "pf-
|
|
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) },
|
|
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.
|
|
49
|
-
React.createElement(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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))),
|
|
56
57
|
React.createElement(EmptyStateBody, null,
|
|
57
58
|
isEmpty(product) && React.createElement(Trans, null, "Please select a product and version to edit"),
|
|
58
59
|
!isEmpty(product) && isEmpty(version) && React.createElement(Trans, null, "Please select a version to edit"),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Select, SelectOption, SelectVariant } from '@patternfly/react-core
|
|
1
|
+
import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
2
2
|
import { ToastNotification } from '@rh-support/components';
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
4
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -47,5 +47,5 @@ export function AddNewCategoryDropDown(props) {
|
|
|
47
47
|
React.createElement(Trans, null, "Category"),
|
|
48
48
|
' ',
|
|
49
49
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
50
|
-
React.createElement(Select, Object.assign({ variant: SelectVariant.typeahead, onToggle:
|
|
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))));
|
|
51
51
|
}
|
|
@@ -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,
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { AccordionContent, AccordionItem, AccordionToggle
|
|
1
|
+
import { AccordionContent, AccordionItem, AccordionToggle } 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,8 +36,7 @@ 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(
|
|
40
|
-
React.createElement(GripVerticalIcon, { style: { cursor: 'move' }, title: t('Drag') }))),
|
|
39
|
+
props.isArrangingCats && (React.createElement(GripVerticalIcon, { style: { cursor: 'move' }, title: t('Drag'), size: "sm", className: "pf-u-mr-sm" })),
|
|
41
40
|
props.category.categoryName,
|
|
42
41
|
" ",
|
|
43
42
|
props.category.isAttentionNeeded && React.createElement(NeedsAttention, null))),
|
|
@@ -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-
|
|
43
|
+
const buttons = (React.createElement("div", { className: "pf-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")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -8,14 +8,13 @@ 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,
|
|
11
|
+
import { Button, 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 { ToastNotification } from '@rh-support/components';
|
|
16
|
-
import { formatDate, getDrupalResIdIfTypeFromUrl, getText
|
|
15
|
+
import { CustomTextInput, ToastNotification } from '@rh-support/components';
|
|
16
|
+
import { formatDate, getDrupalResIdIfTypeFromUrl, getText } from '@rh-support/utils';
|
|
17
17
|
import cloneDeep from 'lodash/cloneDeep';
|
|
18
|
-
import findIndex from 'lodash/findIndex';
|
|
19
18
|
import isEmpty from 'lodash/isEmpty';
|
|
20
19
|
import React, { useEffect, useState } from 'react';
|
|
21
20
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -53,8 +52,6 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
|
|
|
53
52
|
const [showDuplicateError, setShowDuplicateError] = useState(false);
|
|
54
53
|
const [duplicatUrlErrorArray, setDuplicatUrlErrorArray] = useState([]);
|
|
55
54
|
const [isSaving, setIsSaving] = useState(false);
|
|
56
|
-
const duplicateTitleCategoryIndex = findIndex(category.content, (c) => c.contentTitle === localContentTitle.trim());
|
|
57
|
-
const isDuplicateTitle = duplicateTitleCategoryIndex !== -1 && duplicateTitleCategoryIndex !== i && !isEmpty(localContentTitle.trim());
|
|
58
55
|
const onContentTitleChange = (contentTitle, event) => {
|
|
59
56
|
const contentTitleIsValid = event.target.validity.valid;
|
|
60
57
|
setContentTitleIsValid(contentTitleIsValid);
|
|
@@ -98,17 +95,34 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
|
|
|
98
95
|
const checkDuplicateUrls = (contentUrl) => {
|
|
99
96
|
const dupObjCopy = cloneDeep(contentUrls);
|
|
100
97
|
const selectedCategory = category.categoryName;
|
|
101
|
-
//
|
|
102
|
-
const contentUrlEncoded = encodeURI(contentUrl);
|
|
98
|
+
// remove old url that is edited from obj
|
|
103
99
|
if (dupObjCopy[content.contentUrl] && dupObjCopy[content.contentUrl][selectedCategory] > 1) {
|
|
104
100
|
dupObjCopy[content.contentUrl][selectedCategory]--;
|
|
105
101
|
}
|
|
106
102
|
else {
|
|
107
103
|
delete dupObjCopy[content.contentUrl];
|
|
108
104
|
}
|
|
109
|
-
|
|
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) {
|
|
110
124
|
const dupArrays = [];
|
|
111
|
-
for (const cat in dupObjCopy[
|
|
125
|
+
for (const cat in dupObjCopy[contentUrl]) {
|
|
112
126
|
if (cat !== 'undefined') {
|
|
113
127
|
cat === category.categoryName
|
|
114
128
|
? dupArrays.unshift(React.createElement("strong", { key: `${cat}` }, "this section"))
|
|
@@ -124,7 +138,7 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
|
|
|
124
138
|
}
|
|
125
139
|
};
|
|
126
140
|
const onContentUrlChange = (contentUrl, event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
127
|
-
setContentUrlIsValid(
|
|
141
|
+
setContentUrlIsValid(event.target.validity.valid);
|
|
128
142
|
checkDuplicateUrls(contentUrl);
|
|
129
143
|
setLocalContentUrl(contentUrl);
|
|
130
144
|
setIsFetchingSolrSearch(true);
|
|
@@ -229,7 +243,6 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
|
|
|
229
243
|
const doesInputHasSpaces = isEmpty(localContentTitle.trim());
|
|
230
244
|
// To disable save button if empty depending on spaces
|
|
231
245
|
const isSaveButtonDisabled = doesInputHasSpaces ||
|
|
232
|
-
isDuplicateTitle ||
|
|
233
246
|
!(contentTitleIsValid && contentUrlIsValid && localContentTitle && localContentUrl) ||
|
|
234
247
|
(!newCategory && content.mode === ContentMode.NEW_SECTION_CONTENT) ||
|
|
235
248
|
(localContentUrl === content.contentUrl && localContentTitle === content.contentTitle);
|
|
@@ -239,8 +252,7 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
|
|
|
239
252
|
});
|
|
240
253
|
return (React.createElement(React.Fragment, null,
|
|
241
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' : ''}` },
|
|
242
|
-
isArrangingContent && (React.createElement(
|
|
243
|
-
React.createElement(GripVerticalIcon, { style: { cursor: 'move' }, title: t('Drag'), color: "#06c", className: "pf-v5-u-mr-sm" }))),
|
|
255
|
+
isArrangingContent && (React.createElement(GripVerticalIcon, { style: { cursor: 'move' }, title: t('Drag'), color: "#06c", size: "sm", className: "pf-u-mr-sm" })),
|
|
244
256
|
!isArrangingContent ? (React.createElement(React.Fragment, null,
|
|
245
257
|
React.createElement(TopContentSingleItemLink, { url: getTopContentUrl(content.contentUrl), title: content.contentTitle, contentId: content.topContentId, needsAttention: content.isAttentionNeeded, lastModifiedBy: lastModifiedBy, selectedVersion: selectedVersion }),
|
|
246
258
|
' ',
|
|
@@ -253,25 +265,20 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
|
|
|
253
265
|
"Heading",
|
|
254
266
|
' ',
|
|
255
267
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
256
|
-
React.createElement(
|
|
257
|
-
|
|
258
|
-
: ValidatedOptions.error }),
|
|
259
|
-
isDuplicateTitle && (React.createElement("p", { className: "form-instructions form-invalid " },
|
|
260
|
-
React.createElement(ExclamationCircleIcon, { color: "#c9190b", className: "pf-u-mr-sm" }),
|
|
261
|
-
' ',
|
|
262
|
-
React.createElement(Trans, null, "Duplicate heading. Content with this heading is already present.")))),
|
|
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 }))),
|
|
263
270
|
React.createElement("div", { className: "form-group" },
|
|
264
271
|
React.createElement("label", { htmlFor: localContentUrl },
|
|
265
272
|
"Link to content",
|
|
266
273
|
' ',
|
|
267
274
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
268
|
-
React.createElement(
|
|
269
|
-
showDuplicateError && (React.createElement("p", { className: "form-instructions
|
|
270
|
-
React.createElement(ExclamationCircleIcon, { color: "#c9190b", className: "pf-
|
|
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" }),
|
|
271
278
|
" Duplicate url. This url is already added in ",
|
|
272
279
|
formatDuplicateWarning(duplicatUrlErrorArray),
|
|
273
280
|
"."))),
|
|
274
|
-
React.createElement("span", { className: "
|
|
281
|
+
React.createElement("span", { className: "pf-c-accordion__expanded-content-footer" },
|
|
275
282
|
React.createElement("span", null,
|
|
276
283
|
React.createElement(Button, { variant: "primary", onClick: onSave, isDisabled: isSaveButtonDisabled || isSaving, isLoading: isSaving },
|
|
277
284
|
React.createElement(Trans, null, "Save")),
|
|
@@ -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-
|
|
12
|
+
React.createElement("span", { onClick: onOpenModal, style: { color: 'var(--pf-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 },
|
|
@@ -113,7 +113,7 @@ export function TopContentEditor() {
|
|
|
113
113
|
!topContentResponse.isFetching && topContentResponse.isError && (React.createElement(Alert, { isInline: true, variant: AlertVariant.danger, title: React.createElement(Trans, null, "Error loading Top Content") })),
|
|
114
114
|
React.createElement(TopContentProductVersionSelector, { selectedProduct: selectedProduct, selectedVersion: selectedVersion, onProductChange: onProductChange, onVersionChange: onVersionChange }),
|
|
115
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-
|
|
116
|
+
React.createElement("div", { className: "top-content-manage-wrapper pf-u-pt-md" },
|
|
117
117
|
!topContentResponse.isFetching && !!filteredTC.length && React.createElement(TopContentSuggestion, null),
|
|
118
118
|
topContentResponse.isFetching ? (React.createElement(Bullseye, null,
|
|
119
119
|
React.createElement(EmptyState, { variant: EmptyStateVariant.full },
|
|
@@ -135,7 +135,7 @@ export function TopContentEditor() {
|
|
|
135
135
|
: category.id === categoryToOpen, category: category, provided: provided, innerRef: provided.innerRef, isArrangingCats: isArrangingCats, snapshot: snapshot })))),
|
|
136
136
|
category.catMode === CategoryMode.NEW_SECTION && (React.createElement(TopContentCategoryNew, { category: category, key: 'new-section', version: newCategoryVersion }))))),
|
|
137
137
|
provided.placeholder),
|
|
138
|
-
React.createElement("div", { className: "pf-
|
|
138
|
+
React.createElement("div", { className: "pf-u-p-md" },
|
|
139
139
|
showSectionFooter && (React.createElement(React.Fragment, null,
|
|
140
140
|
isCategoryLimitReached && React.createElement(CategoryLimit, null),
|
|
141
141
|
React.createElement(Button, { variant: "primary", onClick: () => onAddCategory(isContentOnlyForMajorVersion, false, selectedVersion), isDisabled: isCategoryLimitReached, "data-tracking-id": "add-new-section-topcontent" },
|
|
@@ -143,7 +143,7 @@ export function TopContentEditor() {
|
|
|
143
143
|
' ',
|
|
144
144
|
React.createElement(Button, { variant: "secondary", onClick: arrangeSection, isDisabled: flagContentEditState.length < 2 },
|
|
145
145
|
React.createElement(Trans, null, "Arrange section")),
|
|
146
|
-
isMajorOrNamedVersion(selectedVersion) && (React.createElement(Button, { variant: "link", className: "pf-
|
|
146
|
+
isMajorOrNamedVersion(selectedVersion) && (React.createElement(Button, { variant: "link", className: "pf-u-float-right", isInline: true, onClick: onOpenModal },
|
|
147
147
|
React.createElement(Trans, null, "View performance"))))),
|
|
148
148
|
isArrangingCats && (React.createElement(React.Fragment, null,
|
|
149
149
|
React.createElement(Button, { variant: "primary", onClick: onSaveArrangement },
|
|
@@ -22,7 +22,7 @@ export const TopContentSuggestion = () => {
|
|
|
22
22
|
}, [topContentDispatch, selectedProduct, selectedVersion]);
|
|
23
23
|
if (isEmpty(filteredSuggestion))
|
|
24
24
|
return React.createElement(React.Fragment, null);
|
|
25
|
-
return (React.createElement(Panel, { variant: "raised", className: "pf-
|
|
25
|
+
return (React.createElement(Panel, { variant: "raised", className: "pf-u-mx-md pf-u-p-md top-content-panel" },
|
|
26
26
|
React.createElement(PanelMain, null,
|
|
27
27
|
React.createElement(PanelMainBody, null,
|
|
28
28
|
React.createElement(ExpandableSection, { onToggle: onToggle, isExpanded: isExpanded, toggleContent: React.createElement(Title, { headingLevel: "h6", className: "accordion_title" },
|
|
@@ -50,12 +50,12 @@ export const TopContentSuggestionHint = ({ resources }) => {
|
|
|
50
50
|
setIsRemoving(false);
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
return !isAccepted ? (React.createElement(Card, { className: "pf-
|
|
53
|
+
return !isAccepted ? (React.createElement(Card, { className: "pf-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-
|
|
58
|
-
React.createElement(Button, { variant: "link", isInline: true, className: "pf-
|
|
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" },
|
|
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;
|
|
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"}
|