@rh-support/manage 2.6.1 → 2.32.2-prodBackup
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/lib/esm/components/Configs/ConfigsTable.d.ts.map +1 -1
- package/lib/esm/components/Configs/ConfigsTable.js +6 -4
- package/lib/esm/components/Groups/DefualtGroupSwitch/DefaultGroupSwitch.d.ts.map +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 +54 -23
- package/lib/esm/components/Groups/GroupUserPermissionsSelect/GroupUserPermissionsSelect.d.ts.map +1 -1
- package/lib/esm/components/Groups/GroupUserPermissionsSelect/GroupUserPermissionsSelect.js +19 -14
- package/lib/esm/components/Groups/ManageGroupUsers/ManageGroupUsers.js +5 -5
- package/lib/esm/components/ManageBookmarkedAccountsTab/AddEditBookmarkModal.d.ts.map +1 -1
- package/lib/esm/components/ManageBookmarkedAccountsTab/AddEditBookmarkModal.js +15 -12
- package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.d.ts.map +1 -1
- package/lib/esm/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.js +106 -67
- package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.d.ts.map +1 -1
- package/lib/esm/components/ManageBookmarkedAccountsTab/ManageGroupedBookmarkedAccountsTab.js +14 -21
- package/lib/esm/components/ManageExpiredContents/ExpiredContentCategory.js +4 -4
- package/lib/esm/components/ManageExpiredContents/ExpiredContentHeader.js +1 -1
- package/lib/esm/components/ManageExpiredContents/ExpiredContentManager.d.ts.map +1 -1
- package/lib/esm/components/ManageExpiredContents/ExpiredContentManager.js +12 -12
- package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItem.js +3 -3
- package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.d.ts.map +1 -1
- package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.js +37 -35
- package/lib/esm/components/ManagePartnerships/NonOrgCustomerInfoModal.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/NonOrgCustomerInfoModal.js +8 -5
- package/lib/esm/components/ManagePartnerships/PartnershipsList.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/PartnershipsList.js +8 -9
- package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.js +17 -20
- package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.js +21 -25
- package/lib/esm/components/ManagePartnerships/Requests.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/Requests.js +9 -9
- package/lib/esm/components/ManagePartnerships/index.js +1 -1
- package/lib/esm/components/ManagePreferences/PreferencesHeader.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/PreferencesHeader.js +1 -1
- package/lib/esm/components/ManagePreferences/components/PreferenceSelect.d.ts +1 -1
- package/lib/esm/components/ManagePreferences/components/PreferenceSelect.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/components/PreferenceSelect.js +26 -27
- package/lib/esm/components/ManagePreferences/sections/PreferencesACL.js +5 -5
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.js +4 -5
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseSearch.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseSearch.js +3 -4
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.js +7 -8
- package/lib/esm/components/ManageTable/ManageTable.d.ts +3 -4
- package/lib/esm/components/ManageTable/ManageTable.d.ts.map +1 -1
- package/lib/esm/components/ManageTable/ManageTable.js +12 -18
- package/lib/esm/components/ManageTags/TagsManager.d.ts.map +1 -1
- package/lib/esm/components/ManageTags/TagsManager.js +58 -50
- package/lib/esm/components/NotificationEmails/NotificationEmailsModal.d.ts.map +1 -1
- package/lib/esm/components/NotificationEmails/NotificationEmailsModal.js +30 -23
- package/lib/esm/components/NotificationEmails/index.d.ts.map +1 -1
- package/lib/esm/components/NotificationEmails/index.js +10 -7
- 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 +6 -6
- 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 +7 -9
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.d.ts +1 -0
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.js +2 -2
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.js +12 -10
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.d.ts +2 -3
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.js +16 -9
- package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.js +15 -16
- package/lib/esm/components/TopContentManagement/NoTopContentFound.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/NoTopContentFound.js +14 -15
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.js +47 -39
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategory.js +4 -4
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentCategoryNew.js +3 -3
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentComponent.js +4 -6
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.js +62 -53
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.js +2 -3
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.js +8 -9
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestion.js +2 -2
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHint.js +4 -5
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentSuggestion/TopContentSuggestionHintAccept.js +51 -25
- package/lib/esm/components/TopContentManagement/TopContentHeader.js +1 -1
- package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.js +64 -32
- package/lib/esm/reducers/TagManagmentReducer.d.ts +1 -1
- package/lib/esm/reducers/TagManagmentReducer.d.ts.map +1 -1
- package/lib/esm/scss/_main.scss +158 -25
- package/lib/esm/scss/_pf-overrides.scss +61 -53
- package/lib/esm/scss/index.scss +4 -4
- package/package.json +12 -12
|
@@ -9,34 +9,28 @@ 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, EmptyStateVariant, PaginationVariant, } from '@patternfly/react-core';
|
|
13
13
|
import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
|
|
14
|
+
// Removed direct imports from @patternfly/react-table to avoid version conflicts
|
|
14
15
|
import { PFTable, TableComponent, TablePagination } from '@rh-support/components';
|
|
15
16
|
import React from 'react';
|
|
16
17
|
import { Trans } from 'react-i18next';
|
|
17
|
-
const noResultFoundRow = (noResultString = '') =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
React.createElement(EmptyStateHeader, { titleText: React.createElement(React.Fragment, null,
|
|
26
|
-
React.createElement(Trans, null, "No results found")), icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }), headingLevel: "h3" }),
|
|
27
|
-
React.createElement(EmptyStateBody, null, noResultString ? noResultString : React.createElement(Trans, null, "There are no results to display."))))),
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
];
|
|
18
|
+
const noResultFoundRow = (noResultString = '') => ({
|
|
19
|
+
heightAuto: true,
|
|
20
|
+
colSpan: 10,
|
|
21
|
+
content: (React.createElement(Bullseye, null,
|
|
22
|
+
React.createElement(EmptyState, { headingLevel: "h3", icon: SearchIcon, titleText: React.createElement(React.Fragment, null,
|
|
23
|
+
React.createElement(Trans, null, "No results found")), variant: EmptyStateVariant.xs },
|
|
24
|
+
React.createElement(EmptyStateBody, null, noResultString ? noResultString : React.createElement(Trans, null, "There are no results to display."))))),
|
|
25
|
+
});
|
|
32
26
|
export function ManageTable(props) {
|
|
33
27
|
const { ariaLabel, errorComponent, errorTitle, errorVariant, isError, isFetching, sortInfo, actions, keepPageNumberOnDataChange, areActionsDisabled, actionResolver } = props, tableProps = __rest(props, ["ariaLabel", "errorComponent", "errorTitle", "errorVariant", "isError", "isFetching", "sortInfo", "actions", "keepPageNumberOnDataChange", "areActionsDisabled", "actionResolver"]);
|
|
34
28
|
const pagination = () => (props.pagination !== undefined ? props.pagination : true);
|
|
35
29
|
return (React.createElement("div", { className: "table-wrapper" },
|
|
36
30
|
isError && (React.createElement(React.Fragment, null,
|
|
37
|
-
React.createElement(Alert, { variant: errorVariant, isInline: true, title: errorTitle, actionClose: React.createElement(AlertActionCloseButton, null), className: "pf-
|
|
31
|
+
React.createElement(Alert, { variant: errorVariant, isInline: true, title: errorTitle, actionClose: React.createElement(AlertActionCloseButton, null), className: "pf-v6-u-my-sm" }, errorComponent))),
|
|
38
32
|
React.createElement(TableComponent, Object.assign({}, tableProps),
|
|
39
|
-
React.createElement(PFTable, { sortInfo: sortInfo, "aria-label": ariaLabel, pagination: pagination(), emptyStateRow: noResultFoundRow(props.noResultText), actions
|
|
33
|
+
React.createElement(PFTable, Object.assign({ sortInfo: sortInfo, "aria-label": ariaLabel, pagination: pagination(), emptyStateRow: noResultFoundRow(props.noResultText) }, (actions && { actions }), (areActionsDisabled && { areActionsDisabled }), (actionResolver && { actionResolver }), { isLoading: isFetching, keepPageNumberOnDataChange: keepPageNumberOnDataChange })),
|
|
40
34
|
tableProps.data.length > 0 && pagination() && (React.createElement("footer", null,
|
|
41
35
|
React.createElement(TablePagination, { variant: PaginationVariant.bottom, perPage: props.perPage || 10 }))))));
|
|
42
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsManager.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageTags/TagsManager.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TagsManager.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageTags/TagsManager.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAaxE,MAAM,CAAC,OAAO,UAAU,WAAW,sBAoZlC"}
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { ActionList, ActionListItem, Bullseye, Button, ButtonVariant, EmptyState, EmptyStateVariant,
|
|
10
|
+
import { ActionList, ActionListItem, Bullseye, Button, ButtonVariant, EmptyState, EmptyStateVariant, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, Spinner, TextInput, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
|
|
11
11
|
import PencilAltIcon from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon';
|
|
12
12
|
import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
|
|
13
13
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
@@ -18,7 +18,7 @@ import { isEmpty, isNull, isUndefined } from 'lodash';
|
|
|
18
18
|
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
19
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
20
20
|
import { TagManagementDispatchContext, TagManagementStateContext } from '../../context/TagManagementContextProvider';
|
|
21
|
-
import { createNewTags, deleteTag, fetchTopContentTags, updateTag } from '../../reducers/TagManagmentReducer';
|
|
21
|
+
import { createNewTags, deleteTag, fetchTopContentTags, updateTag, } from '../../reducers/TagManagmentReducer';
|
|
22
22
|
import { ManageTable } from '../ManageTable';
|
|
23
23
|
export default function TagsManager() {
|
|
24
24
|
const { t } = useTranslation();
|
|
@@ -49,16 +49,17 @@ export default function TagsManager() {
|
|
|
49
49
|
};
|
|
50
50
|
//filtering tags for user search
|
|
51
51
|
const filteredTagIds = useMemo(() => {
|
|
52
|
+
const tagStates = Object.values(tagsByIds);
|
|
52
53
|
if (isEmpty(tagSearchTerm))
|
|
53
|
-
return
|
|
54
|
+
return tagStates.map((t) => t.id);
|
|
54
55
|
const filteredIds = [];
|
|
55
|
-
|
|
56
|
+
tagStates.forEach((t) => {
|
|
56
57
|
if (t.tagName.toLowerCase().includes(tagSearchTerm.toLowerCase())) {
|
|
57
58
|
filteredIds.push(t.id);
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
61
|
return filteredIds;
|
|
61
|
-
}, [tagSearchTerm,
|
|
62
|
+
}, [tagSearchTerm, tagsByIds]);
|
|
62
63
|
const getTopContentTags = () => __awaiter(this, void 0, void 0, function* () {
|
|
63
64
|
try {
|
|
64
65
|
yield fetchTopContentTags(dispatch);
|
|
@@ -155,7 +156,7 @@ export default function TagsManager() {
|
|
|
155
156
|
const onSearchClear = () => {
|
|
156
157
|
setTagSearchTerm('');
|
|
157
158
|
};
|
|
158
|
-
const columns = [
|
|
159
|
+
const columns = useMemo(() => [
|
|
159
160
|
{
|
|
160
161
|
accessor: (id) => tagsByIds[id].tagName,
|
|
161
162
|
sortable: false,
|
|
@@ -191,69 +192,76 @@ export default function TagsManager() {
|
|
|
191
192
|
cellWidth: 10,
|
|
192
193
|
cell: (id) => (React.createElement(ActionList, { isIconList: true },
|
|
193
194
|
React.createElement(ActionListItem, null,
|
|
194
|
-
React.createElement(Button, { variant: "plain", "data-tracking-id": "edit-tag", "aria-label": `edit tag ${tagsByIds[id].tagName}`, onClick: () => onEditTagClick(tagsByIds[id]) },
|
|
195
|
-
React.createElement(PencilAltIcon, null))),
|
|
195
|
+
React.createElement(Button, { icon: React.createElement(PencilAltIcon, null), variant: "plain", "data-tracking-id": "edit-tag", "aria-label": `edit tag ${tagsByIds[id].tagName}`, onClick: () => onEditTagClick(tagsByIds[id]) })),
|
|
196
196
|
React.createElement(ActionListItem, null,
|
|
197
|
-
React.createElement(Button, { "aria-label": `delete tag ${tagsByIds[id].tagName}`, variant: "plain", "data-tracking-id": "delete-tag", onClick: () => onDeleteTagClick(tagsByIds[id]) },
|
|
198
|
-
React.createElement(TrashIcon, null))))),
|
|
197
|
+
React.createElement(Button, { icon: React.createElement(TrashIcon, null), "aria-label": `delete tag ${tagsByIds[id].tagName}`, variant: "plain", "data-tracking-id": "delete-tag", onClick: () => onDeleteTagClick(tagsByIds[id]) })))),
|
|
199
198
|
},
|
|
200
|
-
]
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
],
|
|
200
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
201
|
+
[tagsByIds]);
|
|
202
|
+
const CreateTagModel = (React.createElement(Modal, { onClose: onCancelCreateNewTag, isOpen: createTagModalOpen },
|
|
203
|
+
React.createElement(ModalHeader, null,
|
|
204
|
+
React.createElement("h2", null, t('Create a tag'))),
|
|
205
|
+
React.createElement(ModalBody, null,
|
|
206
|
+
React.createElement(FormGroup, { label: "Tag name", isRequired: true },
|
|
207
|
+
React.createElement(TextInput, { isRequired: true, type: "text", id: "create-new-tag-text-input", value: newTagName, onChange: (e, v) => {
|
|
208
|
+
setNewTagName(v);
|
|
209
|
+
setCreateTagError('');
|
|
210
|
+
}, placeholder: t('Enter a unique name to create a tag'), validated: isEmpty(createTagError) ? 'default' : 'error' }),
|
|
211
|
+
!isEmpty(createTagError) && (React.createElement(FormHelperText, null,
|
|
212
|
+
React.createElement(HelperText, null,
|
|
213
|
+
React.createElement(HelperTextItem, { variant: "error" }, createTagError)))))),
|
|
214
|
+
React.createElement(ModalFooter, null,
|
|
215
|
+
React.createElement(Button, { key: "create-tag", variant: ButtonVariant.primary, onClick: onCreateNewTag, isLoading: isCreatingNewTag, isDisabled: isEmpty(newTagName) || !isEmpty(createTagError) || isCreatingNewTag },
|
|
203
216
|
React.createElement(Trans, null, "Create")),
|
|
204
|
-
React.createElement(Button, { key: "cancel-create-tag", variant: ButtonVariant.link, onClick: onCancelCreateNewTag }, "Cancel")
|
|
205
|
-
|
|
206
|
-
React.createElement(
|
|
207
|
-
React.createElement(
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
217
|
+
React.createElement(Button, { key: "cancel-create-tag", variant: ButtonVariant.link, onClick: onCancelCreateNewTag }, "Cancel"))));
|
|
218
|
+
const EditTagModal = (React.createElement(Modal, { isOpen: editTagModalOpen, onClose: onEditCancel },
|
|
219
|
+
React.createElement(ModalHeader, null,
|
|
220
|
+
React.createElement("h2", null, t('Edit Tag'))),
|
|
221
|
+
React.createElement(ModalBody, null,
|
|
222
|
+
React.createElement(FormGroup, { label: "Tag name", isRequired: true },
|
|
223
|
+
React.createElement(TextInput, { isRequired: true, type: "text", id: "edit-tag-text-input", value: editTagName, onChange: (e, v) => {
|
|
224
|
+
setEditTagName(v);
|
|
225
|
+
setEditTagError('');
|
|
226
|
+
}, placeholder: t('Enter a unique name for this tag') }),
|
|
227
|
+
!isEmpty(editTagError) && (React.createElement(FormHelperText, null,
|
|
228
|
+
React.createElement(HelperText, null,
|
|
229
|
+
React.createElement(HelperTextItem, { variant: "error" }, editTagError)))))),
|
|
230
|
+
React.createElement(ModalFooter, null,
|
|
215
231
|
React.createElement(Button, { key: "edit-tag", variant: ButtonVariant.primary, onClick: onEditTagConfirm, isLoading: isEditingTagName, isDisabled: !isEmpty(editTagError) || isEditingTagName },
|
|
216
232
|
React.createElement(Trans, null, "Save")),
|
|
217
|
-
React.createElement(Button, { key: "cancel-edit-tag", variant: ButtonVariant.link, onClick: onEditCancel }, "Cancel")
|
|
218
|
-
|
|
219
|
-
React.createElement(
|
|
220
|
-
React.createElement(
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
!isEmpty(editTagError) && (React.createElement(FormHelperText, null,
|
|
225
|
-
React.createElement(HelperText, null,
|
|
226
|
-
React.createElement(HelperTextItem, { variant: "error" }, editTagError)))))));
|
|
227
|
-
const DeleteTagModel = () => (React.createElement(Modal, { title: t('Are you sure?'), isOpen: deleteTagModalOpen, onClose: () => setDeleteTagModalOpen(false), actions: [
|
|
233
|
+
React.createElement(Button, { key: "cancel-edit-tag", variant: ButtonVariant.link, onClick: onEditCancel }, "Cancel"))));
|
|
234
|
+
const DeleteTagModel = () => (React.createElement(Modal, { isOpen: deleteTagModalOpen, onClose: () => setDeleteTagModalOpen(false) },
|
|
235
|
+
React.createElement(ModalHeader, null,
|
|
236
|
+
React.createElement("h2", null, t('Are you sure?'))),
|
|
237
|
+
React.createElement(ModalBody, null,
|
|
238
|
+
React.createElement(Trans, null, "Deleting this tag will permanently untag all content associated with it. Are you sure you want to proceed?")),
|
|
239
|
+
React.createElement(ModalFooter, null,
|
|
228
240
|
React.createElement(Button, { key: "delete-tag", variant: ButtonVariant.danger, onClick: onDeleteTagConfirm, isLoading: isDeletingTag, isDisabled: isDeletingTag },
|
|
229
241
|
React.createElement(Trans, null, "Yes, I am sure")),
|
|
230
|
-
React.createElement(Button, { key: "cancel-delete-tag", variant: ButtonVariant.link, onClick: () => setDeleteTagModalOpen(false) }, "Cancel")
|
|
231
|
-
] },
|
|
232
|
-
React.createElement(Trans, null, "Deleting this tag will permanently untag all content associated with it. Are you sure you want to proceed?")));
|
|
242
|
+
React.createElement(Button, { key: "cancel-delete-tag", variant: ButtonVariant.link, onClick: () => setDeleteTagModalOpen(false) }, "Cancel"))));
|
|
233
243
|
return (React.createElement(React.Fragment, null,
|
|
234
244
|
CreateTagModel,
|
|
235
245
|
EditTagModal,
|
|
236
246
|
React.createElement(DeleteTagModel, null),
|
|
237
247
|
React.createElement("header", null,
|
|
238
248
|
React.createElement("h2", null, "Tags"),
|
|
239
|
-
React.createElement("p", { className: "pf-
|
|
249
|
+
React.createElement("p", { className: "pf-v6-u-my-sm" },
|
|
240
250
|
React.createElement(Trans, null, "Add, edit or remove tags and manage tagged top content."))),
|
|
241
|
-
React.createElement("div", { className: "toolbar" },
|
|
242
|
-
React.createElement(
|
|
251
|
+
React.createElement("div", { className: "toolbar pf-v6-u-display-flex pf-v6-u-flex-direction-row pf-v6-u-align-items-center pf-v6-u-justify-content-space-between" },
|
|
252
|
+
React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-row pf-v6-u-align-items-center" },
|
|
243
253
|
React.createElement("label", { htmlFor: "tag-search-input" },
|
|
244
254
|
React.createElement(Trans, null, "Search Tag")),
|
|
245
|
-
React.createElement("div",
|
|
255
|
+
React.createElement("div", null,
|
|
246
256
|
React.createElement(TextInputGroup, null,
|
|
247
257
|
React.createElement(TextInputGroupMain, { type: "text", id: "tag-search-input", placeholder: t('Search for a tag'), icon: React.createElement(SearchIcon, null), value: tagSearchTerm, onChange: (e, v) => setTagSearchTerm(v) }),
|
|
248
258
|
!isEmpty(tagSearchTerm) && (React.createElement(TextInputGroupUtilities, null,
|
|
249
|
-
React.createElement(Button, { variant: "plain", onClick: onSearchClear, "aria-label": "Clear button and input" },
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}, "data-tracking-id": "tag-create-button" },
|
|
256
|
-
React.createElement(Trans, null, "Create tag"))))),
|
|
259
|
+
React.createElement(Button, { icon: React.createElement(TimesIcon, null), variant: "plain", onClick: onSearchClear, "aria-label": "Clear button and input" })))))),
|
|
260
|
+
React.createElement(Button, { variant: ButtonVariant.primary, isInline: true, onClick: () => {
|
|
261
|
+
setCreateTagModalOpen(true);
|
|
262
|
+
setNewTagName(tagSearchTerm);
|
|
263
|
+
}, "data-tracking-id": "tag-create-button" },
|
|
264
|
+
React.createElement(Trans, null, "Create tag"))),
|
|
257
265
|
React.createElement("div", { className: "tags-manager-wrapper" },
|
|
258
266
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading tags list') } }, tagResponse.isFetching ? (React.createElement(Bullseye, null,
|
|
259
267
|
React.createElement(EmptyState, { variant: EmptyStateVariant.full },
|
|
@@ -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":"AAoBA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,yBAAyB,EAAE,GAAG,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB,EAAE,OAAO,CAAC;IACnC,UAAU,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,uBAAuB,UAAW,MAAM,sBAiOpD,CAAC"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { customEmail } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalVariant, TextInput, ValidatedOptions, } from '@patternfly/react-core';
|
|
11
|
+
import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, 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,7 +105,34 @@ export const NotificationEmailsModal = (props) => {
|
|
|
105
105
|
const specialCharRegex = /[^a-zA-Z0-9\s]/;
|
|
106
106
|
return specialCharRegex.test(s);
|
|
107
107
|
};
|
|
108
|
-
return (React.createElement(Modal, { id: "Add-edit-notification-email-modal", className: "pf-modal-overflow-visible",
|
|
108
|
+
return (React.createElement(Modal, { id: "Add-edit-notification-email-modal", className: "pf-modal-overflow-visible", "aria-describedby": "Add-edit-notification-email-modal", isOpen: props.isOpen, onClose: props.onClose, onEscapePress: props.onClose, variant: ModalVariant.medium },
|
|
109
|
+
React.createElement(ModalHeader, null,
|
|
110
|
+
React.createElement("h2", null, t('Edit notification email'))),
|
|
111
|
+
React.createElement(ModalBody, null,
|
|
112
|
+
React.createElement(Form, null,
|
|
113
|
+
React.createElement(FormGroup, { label: t('Email address'), isRequired: true, fieldId: "email-notification-first-emailaddress" },
|
|
114
|
+
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 }),
|
|
115
|
+
!(isValidEmail && !isEmailDuplicate) && (React.createElement(FormHelperText, null,
|
|
116
|
+
React.createElement(HelperText, null,
|
|
117
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, !isValidEmail
|
|
118
|
+
? t('Invalid email')
|
|
119
|
+
: isEmailDuplicate
|
|
120
|
+
? t('Duplicate Email')
|
|
121
|
+
: ''))))),
|
|
122
|
+
React.createElement(FormGroup, { label: t('First name'), isRequired: true, fieldId: "email-notification-first-name" },
|
|
123
|
+
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 }),
|
|
124
|
+
!isValidFirstName && (React.createElement(FormHelperText, null,
|
|
125
|
+
React.createElement(HelperText, null,
|
|
126
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, isSpecialCharFirstName
|
|
127
|
+
? t('First name cannot contain special characters')
|
|
128
|
+
: t('First name cannot be empty')))))),
|
|
129
|
+
React.createElement(FormGroup, { label: t('Last name'), fieldId: "email-notification-last-name" },
|
|
130
|
+
React.createElement(TextInput, { value: lastName, type: "text", validated: isValidLastName ? ValidatedOptions.default : ValidatedOptions.error, onChange: (_event, lastName) => onLastNameChange(lastName), "aria-label": t('Last name'), placeholder: t('Last name'), maxLength: 254 }),
|
|
131
|
+
!isValidLastName && (React.createElement(FormHelperText, null,
|
|
132
|
+
React.createElement(HelperText, null,
|
|
133
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error },
|
|
134
|
+
React.createElement(Trans, null, "Last name cannot contain special characters")))))))),
|
|
135
|
+
React.createElement(ModalFooter, null,
|
|
109
136
|
React.createElement(Button, { key: "save", variant: ButtonVariant.primary, onClick: save, isDisabled: !isFormDirty() ||
|
|
110
137
|
isUpdating ||
|
|
111
138
|
isAdding ||
|
|
@@ -115,25 +142,5 @@ export const NotificationEmailsModal = (props) => {
|
|
|
115
142
|
isEmailDuplicate, spinnerAriaValueText: isUpdating || isAdding ? t('Adding') : undefined, isLoading: isUpdating || isAdding },
|
|
116
143
|
React.createElement(Trans, null, "Save")),
|
|
117
144
|
React.createElement(Button, { key: "cancel", isDisabled: isLoading, variant: ButtonVariant.secondary, onClick: close },
|
|
118
|
-
React.createElement(Trans, null, "Cancel"))
|
|
119
|
-
] },
|
|
120
|
-
React.createElement(Form, null,
|
|
121
|
-
React.createElement(FormGroup, { label: t('Email address'), isRequired: true, fieldId: "email-notification-first-emailaddress" },
|
|
122
|
-
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 }),
|
|
123
|
-
!(isValidEmail && !isEmailDuplicate) && (React.createElement(FormHelperText, null,
|
|
124
|
-
React.createElement(HelperText, null,
|
|
125
|
-
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, !isValidEmail ? t('Invalid email') : isEmailDuplicate ? t('Duplicate Email') : ''))))),
|
|
126
|
-
React.createElement(FormGroup, { label: t('First name'), isRequired: true, fieldId: "email-notification-first-name" },
|
|
127
|
-
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 }),
|
|
128
|
-
!isValidFirstName && (React.createElement(FormHelperText, null,
|
|
129
|
-
React.createElement(HelperText, null,
|
|
130
|
-
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, isSpecialCharFirstName
|
|
131
|
-
? t('First name cannot contain special characters')
|
|
132
|
-
: t('First name cannot be empty')))))),
|
|
133
|
-
React.createElement(FormGroup, { label: t('Last name'), fieldId: "email-notification-last-name" },
|
|
134
|
-
React.createElement(TextInput, { value: lastName, type: "text", validated: isValidLastName ? ValidatedOptions.default : ValidatedOptions.error, onChange: (_event, lastName) => onLastNameChange(lastName), "aria-label": t('Last name'), placeholder: t('Last name'), maxLength: 254 }),
|
|
135
|
-
!isValidLastName && (React.createElement(FormHelperText, null,
|
|
136
|
-
React.createElement(HelperText, null,
|
|
137
|
-
React.createElement(HelperTextItem, { variant: ValidatedOptions.error },
|
|
138
|
-
React.createElement(Trans, null, "Last name cannot contain special characters")))))))));
|
|
145
|
+
React.createElement(Trans, null, "Cancel")))));
|
|
139
146
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NotificationEmails/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NotificationEmails/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,wBAAgB,kBAAkB,sBAuOjC"}
|
|
@@ -63,7 +63,6 @@ export function NotificationEmails() {
|
|
|
63
63
|
yield confirmation({
|
|
64
64
|
catchOnCancel: true,
|
|
65
65
|
confirmText: t('Yes, I am sure'),
|
|
66
|
-
confirmButtonVariant: ButtonVariant.danger,
|
|
67
66
|
description: (React.createElement("strong", null,
|
|
68
67
|
React.createElement(Trans, null, "Are you sure you want to remove this notification email?"))),
|
|
69
68
|
});
|
|
@@ -74,6 +73,7 @@ export function NotificationEmails() {
|
|
|
74
73
|
ToastNotification.addSuccessMessage(t('Notification email has been successfully removed'));
|
|
75
74
|
}
|
|
76
75
|
catch (e) {
|
|
76
|
+
console.error(e);
|
|
77
77
|
// we come here if error happens or user didn't confirm the delete action
|
|
78
78
|
!isEmpty(e) && ToastNotification.addDangerMessage(t('Notification email account failed to update'));
|
|
79
79
|
}
|
|
@@ -130,19 +130,22 @@ export function NotificationEmails() {
|
|
|
130
130
|
},
|
|
131
131
|
];
|
|
132
132
|
const actionResolver = (rowData) => {
|
|
133
|
+
const email = rowData['emailAddress'] || '';
|
|
134
|
+
const firstName = rowData['firstName'] || '';
|
|
135
|
+
const lastName = rowData['lastName'] || '';
|
|
133
136
|
return [
|
|
134
137
|
{
|
|
135
138
|
title: 'Edit',
|
|
136
139
|
onClick: () => editEmail({
|
|
137
|
-
email
|
|
138
|
-
firstName
|
|
139
|
-
lastName
|
|
140
|
+
email,
|
|
141
|
+
firstName,
|
|
142
|
+
lastName,
|
|
140
143
|
}),
|
|
141
144
|
itemKey: 'edit-notification-emails',
|
|
142
145
|
},
|
|
143
146
|
{
|
|
144
147
|
title: 'Remove',
|
|
145
|
-
onClick: () => removeEmail(
|
|
148
|
+
onClick: () => removeEmail(email),
|
|
146
149
|
itemKey: 'remove-notification-emails',
|
|
147
150
|
},
|
|
148
151
|
];
|
|
@@ -163,12 +166,12 @@ export function NotificationEmails() {
|
|
|
163
166
|
React.createElement("div", { className: "toolbar-left" },
|
|
164
167
|
React.createElement("label", { htmlFor: "notification-emails-input" }, t('Add an Email')),
|
|
165
168
|
React.createElement(TextInput, { id: "notification-email-input", placeholder: t('Enter a valid email address'), "aria-label": t('Enter a valid email address'), onChange: (_event, email) => onEmailInputBoxChange(email) }),
|
|
166
|
-
React.createElement("span", { className: "pf-
|
|
169
|
+
React.createElement("span", { className: "pf-v6-u-ml-sm" },
|
|
167
170
|
React.createElement(Button, { variant: ButtonVariant.primary, isInline: true, onClick: addEmail, "data-tracking-id": "email-address-add-button", isDisabled: isAddButtonDisabled },
|
|
168
171
|
React.createElement(Trans, null, "Add")))),
|
|
169
172
|
React.createElement("div", { className: "toolbar-right" },
|
|
170
173
|
React.createElement("label", { htmlFor: "search-notification-emails-selector" }, t('Filter by')),
|
|
171
|
-
React.createElement(SearchInput, { className: "pf-
|
|
174
|
+
React.createElement(SearchInput, { className: "pf-v6-u-flex-grow-1 pf-v6-c-search-input pf-v6-u-background-color-100", id: "search-notification-emails-selector", placeholder: t('Search for an existing email'), value: searchString, onChange: (_, value) => onSearchChange(value), onClear: () => onSearchChange(''), "aria-label": t('Search for an existing email') }))),
|
|
172
175
|
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
176
|
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
177
|
}
|
|
@@ -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,EAmCpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -13,9 +13,8 @@ const CategoryLimit = () => {
|
|
|
13
13
|
hide();
|
|
14
14
|
setModalOpen(true);
|
|
15
15
|
} }, "Review guidelines."))) },
|
|
16
|
-
React.createElement(Button, {
|
|
17
|
-
|
|
18
|
-
React.createElement(CircleInfo, null)))),
|
|
16
|
+
React.createElement(Button, { icon: React.createElement(Icon, { size: "md" },
|
|
17
|
+
React.createElement(CircleInfo, null)), variant: "plain" })),
|
|
19
18
|
React.createElement(CategoryLimitGuidelines, { isModalOpen: isModalOpen, onHideModal: onHideModal })));
|
|
20
19
|
};
|
|
21
20
|
export default CategoryLimit;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Button, ButtonVariant, Modal, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
|
|
1
|
+
import { Button, ButtonVariant, Modal, ModalFooter, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
4
|
import { CATEGORY_LIMIT, DIGIT_WORD_MAP } from '../../../constants/TopContent';
|
|
5
5
|
import QuestionAnswer from './QuestionAnswer';
|
|
6
6
|
export const CategoryLimitGuidelines = ({ isModalOpen, onHideModal }) => {
|
|
7
|
-
return (React.createElement(Modal, { variant: ModalVariant.medium, id: "top-content-category-limit-guidelines", "aria-label": "top-content-category-limit-guidelines", isOpen: isModalOpen, onClose: onHideModal,
|
|
8
|
-
React.createElement(Button, { variant: ButtonVariant.secondary, key: "close-button", onClick: onHideModal }, "Cancel"),
|
|
9
|
-
] },
|
|
7
|
+
return (React.createElement(Modal, { variant: ModalVariant.medium, id: "top-content-category-limit-guidelines", "aria-label": "top-content-category-limit-guidelines", isOpen: isModalOpen, onClose: onHideModal },
|
|
10
8
|
React.createElement(Title, { headingLevel: "h1", size: TitleSizes['2xl'] },
|
|
11
9
|
React.createElement(Trans, null, " Top content guideline ")),
|
|
12
10
|
React.createElement(Trans, null,
|
|
13
|
-
React.createElement("p", { className: "pf-
|
|
11
|
+
React.createElement("p", { className: "pf-v6-u-pt-sm" }, "Guidelines and limitations for top content resources.")),
|
|
14
12
|
React.createElement(QuestionAnswer, { question: "What is top content?", answer: "Top content is defined as the top resource for given product and version that will provide the most value for our customer and the highest likelihood for case deflection." }),
|
|
15
13
|
React.createElement(QuestionAnswer, { question: "What is not top content", answer: "Resource that are accessible in other parts of the customer journey throughout the Customer Portal. For example, labs are not a top content resource. " }),
|
|
16
|
-
React.createElement(QuestionAnswer, { question: "Category and link restrictions", answer: `we allow for a minimum of ${DIGIT_WORD_MAP[CATEGORY_LIMIT.MIN]} and max ${DIGIT_WORD_MAP[CATEGORY_LIMIT.MAX]} categories, and links within each category.` })
|
|
14
|
+
React.createElement(QuestionAnswer, { question: "Category and link restrictions", answer: `we allow for a minimum of ${DIGIT_WORD_MAP[CATEGORY_LIMIT.MIN]} and max ${DIGIT_WORD_MAP[CATEGORY_LIMIT.MAX]} categories, and links within each category.` }),
|
|
15
|
+
React.createElement(ModalFooter, null,
|
|
16
|
+
React.createElement(Button, { variant: ButtonVariant.secondary, key: "close-button", onClick: onHideModal }, "Cancel"))));
|
|
17
17
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Title } from '@patternfly/react-core';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
|
-
const QuestionAnswer = ({ question, answer }) => (React.createElement("div", { className: "pf-
|
|
4
|
+
const QuestionAnswer = ({ question, answer }) => (React.createElement("div", { className: "pf-v6-u-pt-lg" },
|
|
5
5
|
React.createElement(Title, { headingLevel: "h6", size: "md" },
|
|
6
6
|
React.createElement(Trans, null,
|
|
7
7
|
" ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/ContentAccordion.tsx"],"names":[],"mappings":"AAUA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,UAAU,MAAM;IACZ,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,MAAM,
|
|
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,CA8DvC,CAAC"}
|
|
@@ -18,20 +18,18 @@ export const ContentAccordion = ({ contentList, selectedVersion }) => {
|
|
|
18
18
|
React.createElement(Panel, { variant: "bordered" },
|
|
19
19
|
React.createElement(PanelMain, null,
|
|
20
20
|
React.createElement(PanelMainBody, null,
|
|
21
|
-
React.createElement(Accordion,
|
|
21
|
+
React.createElement(Accordion, null, contentList.map(({ contentTitle, topContentId, updatedOn, createdOn, updatedBy, createdBy, isAttentionNeeded, }) => {
|
|
22
22
|
const lastModifiedBy = t(`Last modified {{created}} by {{by}}`, {
|
|
23
23
|
created: formatDate(updatedOn || createdOn),
|
|
24
24
|
by: updatedBy || createdBy,
|
|
25
25
|
});
|
|
26
|
-
return (React.createElement(AccordionItem, { key: topContentId },
|
|
27
|
-
React.createElement(AccordionToggle, { onClick: onToggle(topContentId),
|
|
28
|
-
React.createElement("span", { className: isAttentionNeeded ? 'pf-
|
|
26
|
+
return (React.createElement(AccordionItem, { isExpanded: expanded === topContentId, key: topContentId },
|
|
27
|
+
React.createElement(AccordionToggle, { onClick: onToggle(topContentId), id: contentTitle },
|
|
28
|
+
React.createElement("span", { className: isAttentionNeeded ? 'pf-v6-u-danger-color-200' : '' },
|
|
29
29
|
' ',
|
|
30
30
|
contentTitle)),
|
|
31
|
-
React.createElement(AccordionContent, { id: contentTitle
|
|
32
|
-
React.createElement("span", { className: "pf-
|
|
33
|
-
React.createElement("
|
|
34
|
-
React.createElement("br", null),
|
|
35
|
-
React.createElement(PerformanceMetricClickCount, { needsAttention: isAttentionNeeded, contentId: topContentId, selectedVersion: selectedVersion }))));
|
|
31
|
+
React.createElement(AccordionContent, { id: contentTitle },
|
|
32
|
+
React.createElement("span", { className: "pf-v6-u-font-size-sm" }, lastModifiedBy),
|
|
33
|
+
React.createElement(PerformanceMetricClickCount, { className: "pf-v6-u-mb-sm pf-v6-u-mt-sm", needsAttention: isAttentionNeeded, contentId: topContentId, selectedVersion: selectedVersion }))));
|
|
36
34
|
}))))))));
|
|
37
35
|
};
|
package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PerformanceMetricClickCount.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.tsx"],"names":[],"mappings":"AASA,OAAc,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAC;AAKrD,UAAU,MAAM;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC,MAAM,CAmDlD,CAAC"}
|
|
1
|
+
{"version":3,"file":"PerformanceMetricClickCount.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.tsx"],"names":[],"mappings":"AASA,OAAc,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAC;AAKrD,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC,MAAM,CAmDlD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { HelperText, HelperTextItem, Panel, PanelMain, PanelMainBody, ToggleGrou
|
|
|
2
2
|
import React, { useMemo, useState } from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
4
|
import { useTopContentContext } from '../../../context/TopContentProvider';
|
|
5
|
-
export const PerformanceMetricClickCount = ({ contentId, needsAttention, selectedVersion }) => {
|
|
5
|
+
export const PerformanceMetricClickCount = ({ className, contentId, needsAttention, selectedVersion }) => {
|
|
6
6
|
const { categoryUsage } = useTopContentContext();
|
|
7
7
|
const [selectedOption, setSelectedOption] = useState(0);
|
|
8
8
|
const topContentUsageMetrics = useMemo(() => {
|
|
@@ -16,7 +16,7 @@ export const PerformanceMetricClickCount = ({ contentId, needsAttention, selecte
|
|
|
16
16
|
};
|
|
17
17
|
const count = (topContentUsageMetrics === null || topContentUsageMetrics === void 0 ? void 0 : topContentUsageMetrics[selectedOption]) || 0;
|
|
18
18
|
return (React.createElement(React.Fragment, null,
|
|
19
|
-
React.createElement(ToggleGroup, { "aria-label": "performance-usage-days-selector" },
|
|
19
|
+
React.createElement(ToggleGroup, { className: className, "aria-label": "performance-usage-days-selector" },
|
|
20
20
|
React.createElement(ToggleGroupItem, { buttonId: "last-30-days", text: "Last 30 days", isSelected: selectedOption === 0, onChange: onSelect(0) }),
|
|
21
21
|
React.createElement(ToggleGroupItem, { buttonId: "last-60-days", text: "Last 60 days", isSelected: selectedOption === 1, onChange: onSelect(1) }),
|
|
22
22
|
React.createElement(ToggleGroupItem, { buttonId: "last-90-days", text: "Last 90 days", isSelected: selectedOption === 2, onChange: onSelect(2) })),
|
|
@@ -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,CA4CzC,CAAC"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { Button, Modal,
|
|
1
|
+
import { Button, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
4
|
import { PerformanceMetricClickCount } from './PerformanceMetricClickCount';
|
|
5
5
|
export const PerformanceMetrics = ({ isModalOpen, onHideModal, needsAttention, contentId, title, lastModifiedBy, selectedVersion, }) => {
|
|
6
|
-
return (React.createElement(Modal, { variant: ModalVariant.small, id: "top-content-performance-metric", "aria-label": "top-content-performance-metric", isOpen: isModalOpen, onClose: onHideModal,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
return (React.createElement(Modal, { variant: ModalVariant.small, id: "top-content-performance-metric", "aria-label": "top-content-performance-metric", isOpen: isModalOpen, onClose: onHideModal },
|
|
7
|
+
React.createElement(ModalHeader, null,
|
|
8
|
+
React.createElement("h2", { className: "pf-v6-u-mb-0" },
|
|
9
|
+
React.createElement(Trans, null, "Performance metrics"))),
|
|
10
|
+
React.createElement(ModalBody, null,
|
|
11
|
+
React.createElement("p", { className: "pf-v6-u-pb-lg pf-v6-u-pt-sm" }, "Better understand the Performance for the top content resources."),
|
|
12
|
+
React.createElement("div", { className: "pf-v6-u-pb-xs top-content-tooltip-view-metric-label" }, title),
|
|
13
|
+
React.createElement("div", { className: "pf-v6-u-pb-lg" }, lastModifiedBy),
|
|
14
|
+
React.createElement(PerformanceMetricClickCount, { needsAttention: needsAttention, contentId: contentId, selectedVersion: selectedVersion })),
|
|
15
|
+
React.createElement(ModalFooter, null,
|
|
16
|
+
React.createElement(Button, { variant: "secondary", key: "close-button", onClick: onHideModal }, "Cancel"))));
|
|
15
17
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import React, { FC } from 'react';
|
|
1
|
+
import { FC } from 'react';
|
|
3
2
|
interface IProps {
|
|
4
3
|
placeholderText: string;
|
|
5
4
|
title: string;
|
|
6
|
-
onSelectCallback: (
|
|
5
|
+
onSelectCallback: (value: string, isPlaceholder?: boolean) => void;
|
|
7
6
|
options: Array<any>;
|
|
8
7
|
optionValue: (option: any) => string;
|
|
9
8
|
isLoading?: boolean;
|
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":"
|
|
1
|
+
{"version":3,"file":"PerformanceMetricsSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/PerformanceMetricsSelect.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAG5C,UAAU,MAAM;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnE,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACpB,WAAW,EAAE,CAAC,MAAM,KAAA,KAAK,MAAM,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,MAAM,CA2C/C,CAAC"}
|