@rh-support/manage 2.5.36 → 2.5.38
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 +3 -2
- package/lib/esm/components/ManageExpiredContents/ExpiredContentManager.d.ts.map +1 -1
- package/lib/esm/components/ManageExpiredContents/ExpiredContentManager.js +1 -1
- package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.d.ts.map +1 -1
- package/lib/esm/components/ManageExpiredContents/ExpiredContentSingleItemView.js +3 -2
- package/lib/esm/components/ManagePartnerships/NonOrgCustomerInfoModal.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/NonOrgCustomerInfoModal.js +6 -3
- package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/PartnershipsTermsModal.js +5 -3
- package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.d.ts.map +1 -1
- package/lib/esm/components/ManagePartnerships/RequestCollaborationModal.js +6 -4
- package/lib/esm/components/ManagePartnerships/Requests.js +4 -3
- package/lib/esm/components/ManageTags/TagsManager.d.ts.map +1 -1
- package/lib/esm/components/ManageTags/TagsManager.js +9 -6
- package/lib/esm/components/NotificationEmails/NotificationEmailsModal.js +1 -1
- package/lib/esm/components/NotificationEmails/index.d.ts.map +1 -1
- package/lib/esm/components/NotificationEmails/index.js +7 -4
- package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.js +2 -4
- 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 +9 -7
- 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/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.js +3 -2
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.js +10 -3
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentEditor.js +1 -1
- package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentProductVersionSelector.js +18 -15
- 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 +16 -2
- package/lib/esm/scss/_pf-overrides.scss +9 -0
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigsTable.d.ts","sourceRoot":"","sources":["../../../../src/components/Configs/ConfigsTable.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"ConfigsTable.d.ts","sourceRoot":"","sources":["../../../../src/components/Configs/ConfigsTable.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,eAAO,MAAM,YAAY,yBA6JxB,CAAC"}
|
|
@@ -13,11 +13,12 @@ import { defaultTableSortMethod, ErrorBoundary, ToastNotification, useFetch } fr
|
|
|
13
13
|
import { formatDate } from '@rh-support/utils';
|
|
14
14
|
import isEmpty from 'lodash/isEmpty';
|
|
15
15
|
import React, { useEffect, useState } from 'react';
|
|
16
|
-
import { Trans } from 'react-i18next';
|
|
16
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
17
17
|
import { ManageTable } from '../ManageTable/ManageTable';
|
|
18
18
|
import { ConfigInLineEdit } from './ConfigInLineEdit';
|
|
19
19
|
import { ConfigSwitch } from './ConfigSwitch';
|
|
20
20
|
export const ConfigsTable = () => {
|
|
21
|
+
const { t } = useTranslation();
|
|
21
22
|
const [configValues, setConfigValues] = useState([]);
|
|
22
23
|
const [filteredValues, setFilteredValues] = useState([]);
|
|
23
24
|
const [searchString, setSearchString] = useState('');
|
|
@@ -122,5 +123,5 @@ export const ConfigsTable = () => {
|
|
|
122
123
|
React.createElement(Trans, null, "Filter by")),
|
|
123
124
|
React.createElement(SearchInput, { className: "pf-v6-u-flex-grow-1 pf-v6-c-search-input pf-v6-u-background-color-100", id: "search-config-filelds", placeholder: "Search for an existing config name", value: searchString, onChange: (_, value) => onSearchChange(value), onClear: () => onSearchChange(''), "aria-label": "Search for an existing config name" }))),
|
|
124
125
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: 'There was an error loading config page' } },
|
|
125
|
-
React.createElement(ManageTable, { sortInfo: { column: 'created-date', direction: 'desc' }, ariaLabel: 'Table to manage pcm config', columns: columns, data: filteredValues, isFetching: isFetching, isError: false, errorTitle: 'Config table error', errorComponent: React.createElement(Trans, null, "Could not get configs"), keepPageNumberOnDataChange: keepPageNumberOnDataChange }))));
|
|
126
|
+
React.createElement(ManageTable, { sortInfo: { column: 'created-date', direction: 'desc' }, ariaLabel: t('Table to manage pcm config'), columns: columns, data: filteredValues, isFetching: isFetching, isError: false, errorTitle: 'Config table error', errorComponent: React.createElement(Trans, null, "Could not get configs"), keepPageNumberOnDataChange: keepPageNumberOnDataChange }))));
|
|
126
127
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpiredContentManager.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageExpiredContents/ExpiredContentManager.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAUhF,MAAM,CAAC,OAAO,UAAU,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ExpiredContentManager.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageExpiredContents/ExpiredContentManager.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAUhF,MAAM,CAAC,OAAO,UAAU,qBAAqB,sBAsH5C"}
|
|
@@ -59,7 +59,7 @@ export default function ExipredContentManager() {
|
|
|
59
59
|
React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-row pf-v6-u-align-items-center pf-v6-u-justify-content-flex-end" },
|
|
60
60
|
React.createElement("label", { htmlFor: 'tag-selector' },
|
|
61
61
|
React.createElement(Trans, null, "All tags")),
|
|
62
|
-
React.createElement(TagsSelector, { tagOptions: availableTags, onChange: onTagFilterChange, selectedTags: filteredTags, disabled: expiredContentResponse.isFetching })))),
|
|
62
|
+
React.createElement(TagsSelector, { typeahead: true, tagOptions: availableTags, onChange: onTagFilterChange, selectedTags: filteredTags, disabled: expiredContentResponse.isFetching })))),
|
|
63
63
|
React.createElement("div", { className: "expired-content-manage-wrapper pf-v6-u-p-md", ref: expiredContentResultsRef }, expiredContentResponse.isFetching ? (React.createElement(Bullseye, null,
|
|
64
64
|
React.createElement(EmptyState, { variant: EmptyStateVariant.full },
|
|
65
65
|
React.createElement(Spinner, { size: "lg" })))) : isEmpty(filteredEC) ? (React.createElement(EmptyState, { icon: SearchIcon, titleText: React.createElement(Trans, null, "No contents found"), variant: EmptyStateVariant.full },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpiredContentSingleItemView.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageExpiredContents/ExpiredContentSingleItemView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpiredContentSingleItemView.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageExpiredContents/ExpiredContentSingleItemView.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAIrE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAIjG,UAAU,MAAM;IACZ,OAAO,EAAE,eAAe,CAAC;IACzB,QAAQ,EAAE,wBAAwB,CAAC;IACnC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,CAAC,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACjD,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,GACb,EAAE,MAAM,qBAgOR"}
|
|
@@ -24,6 +24,7 @@ export default function ExpiredContentSingleItemView({ category, content, onCanc
|
|
|
24
24
|
const tagManagementEditState = useContext(TagManagementStateContext);
|
|
25
25
|
const { tags: tagOptions } = tagManagementEditState;
|
|
26
26
|
const ref = useRef(null);
|
|
27
|
+
const datePickerMenuAppendRef = useRef(null);
|
|
27
28
|
const [isFetchingSolrSearch, setIsFetchingSolrSearch] = useState(false);
|
|
28
29
|
const [localContentUrl, setLocalContentUrl] = useState(content.contentUrl);
|
|
29
30
|
const [localContentTitle, setLocalContentTitle] = useState(content.contentTitle);
|
|
@@ -134,8 +135,8 @@ export default function ExpiredContentSingleItemView({ category, content, onCanc
|
|
|
134
135
|
React.createElement(FormGroup, { label: t('Tags') },
|
|
135
136
|
React.createElement(TagsSelector, { tagOptions: tagOptions, onChange: handleLocalTagChange, selectedTags: localSelectedTags, placeholder: t('Select tags to improve discoverability'), id: "expired-content-tag" }))),
|
|
136
137
|
React.createElement(FlexItem, null,
|
|
137
|
-
React.createElement(FormGroup, { label: t('Expiry date') },
|
|
138
|
-
React.createElement(DatePicker, { onBlur: onExpiryDateChange, onChange: onExpiryDateChange, value: !isEmpty(localExpiryDate) ? localExpiryDate.split('T')[0] : '', validators: [expiryDateValidator], id: "content-expiry-date", invalidFormatText: t('Invalid date format') })))),
|
|
138
|
+
React.createElement(FormGroup, { ref: datePickerMenuAppendRef, label: t('Expiry date') },
|
|
139
|
+
React.createElement(DatePicker, { onBlur: onExpiryDateChange, onChange: onExpiryDateChange, value: !isEmpty(localExpiryDate) ? localExpiryDate.split('T')[0] : '', validators: [expiryDateValidator], id: "content-expiry-date", invalidFormatText: t('Invalid date format'), popoverProps: { position: 'top' } })))),
|
|
139
140
|
React.createElement("span", { className: "top-content-single-item-footer" },
|
|
140
141
|
React.createElement("span", null,
|
|
141
142
|
React.createElement(Button, { variant: "primary", onClick: onContentSave, isDisabled: isSaveButtonDisabled || isSaving, isLoading: isSaving },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonOrgCustomerInfoModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/NonOrgCustomerInfoModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NonOrgCustomerInfoModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/NonOrgCustomerInfoModal.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,uBAAuB,yBA2BnC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, ButtonVariant, Modal, ModalFooter, ModalVariant } from '@patternfly/react-core';
|
|
1
|
+
import { Button, ButtonVariant, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Trans, useTranslation } from 'react-i18next';
|
|
4
4
|
export const NonOrgCustomerInfoModal = () => {
|
|
@@ -7,8 +7,11 @@ export const NonOrgCustomerInfoModal = () => {
|
|
|
7
7
|
const handleModalToggle = () => {
|
|
8
8
|
setIsModalOpen(!isModalOpen);
|
|
9
9
|
};
|
|
10
|
-
return (React.createElement(Modal, { variant: ModalVariant.small,
|
|
11
|
-
React.createElement(
|
|
10
|
+
return (React.createElement(Modal, { variant: ModalVariant.small, isOpen: isModalOpen, onClose: handleModalToggle },
|
|
11
|
+
React.createElement(ModalHeader, null,
|
|
12
|
+
React.createElement("h2", null, t('Confirm partnership collaboration'))),
|
|
13
|
+
React.createElement(ModalBody, null,
|
|
14
|
+
React.createElement(Trans, null, "Only org admin customers can confirm partnership collaboration.")),
|
|
12
15
|
React.createElement(ModalFooter, null,
|
|
13
16
|
React.createElement(Button, { key: "cancel", variant: ButtonVariant.primary, onClick: handleModalToggle, "data-tracking-id": "confirm-partnership-collaboration-no-org-admin" },
|
|
14
17
|
React.createElement(Trans, null, "Cancel")))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartnershipsTermsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsTermsModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PartnershipsTermsModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/PartnershipsTermsModal.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAUnD,wBAAgB,SAAS,WAMxB;AAID,eAAO,MAAM,sBAAsB,yBAsMlC,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, Content, ContentVariants, Modal, ModalFooter, ModalVariant, } from '@patternfly/react-core';
|
|
11
|
+
import { Button, ButtonVariant, Content, ContentVariants, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
|
|
12
12
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
13
13
|
import { LoadingDots, LoadingIndicator, ToastNotification } from '@rh-support/components';
|
|
14
14
|
import { baseTnCUrl, TncConstants } from '@rh-support/utils';
|
|
@@ -115,8 +115,10 @@ export const PartnershipsTermsModal = () => {
|
|
|
115
115
|
React.createElement(Trans, null, "A partner would like to collaborate with you for support when cases are shared. Please confirm the name below and continue to accept terms and conditions.")),
|
|
116
116
|
React.createElement(Content, { className: "pf-v6-u-mt-lg" },
|
|
117
117
|
React.createElement(Content, { component: ContentVariants.h3 }, linkAccountName))));
|
|
118
|
-
return (React.createElement(Modal, { id: "partnership-terms-and-conditions-modal", className: "pf-modal-overflow-visible",
|
|
119
|
-
React.createElement(
|
|
118
|
+
return (React.createElement(Modal, { id: "partnership-terms-and-conditions-modal", className: "pf-modal-overflow-visible", isOpen: isTermsModalOpen, onClose: onClose, onEscapePress: onClose, variant: ModalVariant.large },
|
|
119
|
+
React.createElement(ModalHeader, null,
|
|
120
|
+
React.createElement("h2", null, t('Confirm partnership collaboration'))),
|
|
121
|
+
React.createElement(ModalBody, null, isTermVisited ? modalContentWhenTermIsVisited() : modalContentBeforeTermVisited()),
|
|
120
122
|
React.createElement(ModalFooter, null, !isTermVisited && !verificationFailMessage ? (React.createElement(React.Fragment, null,
|
|
121
123
|
React.createElement(Button, { icon: React.createElement(ExternalLinkAltIcon, null), href: getTnCUrl(), component: "a", variant: ButtonVariant.primary, key: "go-to-agreement", "data-tracking-id": "go-to-agreement" },
|
|
122
124
|
' ',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestCollaborationModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/RequestCollaborationModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestCollaborationModal.d.ts","sourceRoot":"","sources":["../../../../src/components/ManagePartnerships/RequestCollaborationModal.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAK3D,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACrC;AAID,eAAO,MAAM,yBAAyB,UAAW,MAAM,sBAkOtD,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, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalFooter, ModalVariant, TextInput, Tooltip, TooltipPosition, } from '@patternfly/react-core';
|
|
11
|
+
import { Button, ButtonVariant, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, TextInput, Tooltip, TooltipPosition, } from '@patternfly/react-core';
|
|
12
12
|
import { ToastNotification, useCopyToClipboard } from '@rh-support/components';
|
|
13
13
|
import isEmpty from 'lodash/isEmpty';
|
|
14
14
|
import React, { useRef, useState } from 'react';
|
|
@@ -115,8 +115,10 @@ export const RequestCollaborationModal = (props) => {
|
|
|
115
115
|
setIsCopyClicked(true);
|
|
116
116
|
};
|
|
117
117
|
const partnershipLinkId = 'partnership-link-id';
|
|
118
|
-
return (React.createElement(Modal, { id: "request-collaboration-modal", className: "pf-modal-overflow-visible",
|
|
119
|
-
React.createElement(
|
|
118
|
+
return (React.createElement(Modal, { id: "request-collaboration-modal", className: "pf-modal-overflow-visible", isOpen: props.isOpen, onClose: onClose, onEscapePress: onClose, variant: ModalVariant.large },
|
|
119
|
+
React.createElement(ModalHeader, null,
|
|
120
|
+
React.createElement("h2", null, isRequestingAgain ? t('Request collaboration again') : t('Request collaboration'))),
|
|
121
|
+
React.createElement(ModalBody, null,
|
|
120
122
|
React.createElement("p", null, "Initiate a new collaboration by generating a unique link for your customer. Check the status under your requests to see if they accept or reject your collaboration."),
|
|
121
123
|
React.createElement(Form, { className: "pf-v6-u-my-md" },
|
|
122
124
|
React.createElement(Grid, { sm: 12, md: 6, lg: 6 },
|
|
@@ -137,7 +139,7 @@ export const RequestCollaborationModal = (props) => {
|
|
|
137
139
|
React.createElement("code", { ref: clipboardRef }, generatedUrl)),
|
|
138
140
|
React.createElement(Tooltip, { position: TooltipPosition.top, content: clipboardText, trigger: "click" },
|
|
139
141
|
React.createElement("button", { className: "nimbus-icon-clipboard clip-code-raw-btn xs-icon", "aria-hidden": "true", onClick: onClickOnCopyToClipboardButton, "data-tracking-id": "request-collaboration-link-copy-button", type: "button" }))),
|
|
140
|
-
React.createElement("p", { className:
|
|
142
|
+
React.createElement("p", { className: "pf-v6-u-text-color-status-danger" },
|
|
141
143
|
React.createElement(Trans, null,
|
|
142
144
|
' ',
|
|
143
145
|
"Please ",
|
|
@@ -110,12 +110,12 @@ export function Requests() {
|
|
|
110
110
|
setIsRequestAgainModalOpen(true);
|
|
111
111
|
};
|
|
112
112
|
const actionResolver = (rowData) => {
|
|
113
|
-
var _a, _b, _c
|
|
113
|
+
var _a, _b, _c;
|
|
114
114
|
if (!rowData)
|
|
115
115
|
return;
|
|
116
|
-
const friendlyName =
|
|
116
|
+
const friendlyName = rowData === null || rowData === void 0 ? void 0 : rowData.friendlyName;
|
|
117
117
|
//@ts-ignore
|
|
118
|
-
const status = ((
|
|
118
|
+
const status = ((_c = (_b = (_a = rowData.cells) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.props) === null || _c === void 0 ? void 0 : _c.status) || '';
|
|
119
119
|
return [
|
|
120
120
|
...(status === 'EXPIRED'
|
|
121
121
|
? [
|
|
@@ -196,6 +196,7 @@ export function Requests() {
|
|
|
196
196
|
catch (e) {
|
|
197
197
|
setIsFetchingStatuses(false);
|
|
198
198
|
ToastNotification.addDangerMessage(t('Failed to get partnership requests'));
|
|
199
|
+
console.error(e);
|
|
199
200
|
}
|
|
200
201
|
setIsUpdatingRequests(dispatch, false);
|
|
201
202
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsManager.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageTags/TagsManager.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAmD,MAAM,OAAO,CAAC;
|
|
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"}
|
|
@@ -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,
|
|
@@ -195,7 +196,9 @@ export default function TagsManager() {
|
|
|
195
196
|
React.createElement(ActionListItem, null,
|
|
196
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]) })))),
|
|
197
198
|
},
|
|
198
|
-
]
|
|
199
|
+
],
|
|
200
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
201
|
+
[tagsByIds]);
|
|
199
202
|
const CreateTagModel = (React.createElement(Modal, { onClose: onCancelCreateNewTag, isOpen: createTagModalOpen },
|
|
200
203
|
React.createElement(ModalHeader, null,
|
|
201
204
|
React.createElement("h2", null, t('Create a tag'))),
|
|
@@ -111,7 +111,7 @@ export const NotificationEmailsModal = (props) => {
|
|
|
111
111
|
React.createElement(ModalBody, null,
|
|
112
112
|
React.createElement(Form, null,
|
|
113
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:
|
|
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
115
|
!(isValidEmail && !isEmailDuplicate) && (React.createElement(FormHelperText, null,
|
|
116
116
|
React.createElement(HelperText, null,
|
|
117
117
|
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, !isValidEmail
|
|
@@ -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,sBAsOjC"}
|
|
@@ -129,19 +129,22 @@ export function NotificationEmails() {
|
|
|
129
129
|
},
|
|
130
130
|
];
|
|
131
131
|
const actionResolver = (rowData) => {
|
|
132
|
+
const email = rowData['emailAddress'] || '';
|
|
133
|
+
const firstName = rowData['firstName'] || '';
|
|
134
|
+
const lastName = rowData['lastName'] || '';
|
|
132
135
|
return [
|
|
133
136
|
{
|
|
134
137
|
title: 'Edit',
|
|
135
138
|
onClick: () => editEmail({
|
|
136
|
-
email
|
|
137
|
-
firstName
|
|
138
|
-
lastName
|
|
139
|
+
email,
|
|
140
|
+
firstName,
|
|
141
|
+
lastName,
|
|
139
142
|
}),
|
|
140
143
|
itemKey: 'edit-notification-emails',
|
|
141
144
|
},
|
|
142
145
|
{
|
|
143
146
|
title: 'Remove',
|
|
144
|
-
onClick: () => removeEmail(
|
|
147
|
+
onClick: () => removeEmail(email),
|
|
145
148
|
itemKey: 'remove-notification-emails',
|
|
146
149
|
},
|
|
147
150
|
];
|
|
@@ -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,7 +18,7 @@ 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,
|
|
@@ -30,8 +30,6 @@ export const ContentAccordion = ({ contentList, selectedVersion }) => {
|
|
|
30
30
|
contentTitle)),
|
|
31
31
|
React.createElement(AccordionContent, { id: contentTitle },
|
|
32
32
|
React.createElement("span", { className: "pf-v6-u-font-size-sm" }, lastModifiedBy),
|
|
33
|
-
React.createElement("
|
|
34
|
-
React.createElement("br", null),
|
|
35
|
-
React.createElement(PerformanceMetricClickCount, { needsAttention: isAttentionNeeded, contentId: topContentId, selectedVersion: selectedVersion }))));
|
|
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":"
|
|
1
|
+
{"version":3,"file":"PerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/PerformanceMetrics.tsx"],"names":[],"mappings":"AAUA,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, ModalFooter, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
|
|
1
|
+
import { Button, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, Title, TitleSizes, } from '@patternfly/react-core';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Trans } from 'react-i18next';
|
|
4
4
|
import { PerformanceMetricClickCount } from './PerformanceMetricClickCount';
|
|
5
5
|
export const PerformanceMetrics = ({ isModalOpen, onHideModal, needsAttention, contentId, title, lastModifiedBy, selectedVersion, }) => {
|
|
6
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(
|
|
8
|
-
React.createElement(
|
|
9
|
-
|
|
10
|
-
React.createElement(
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
React.createElement(ModalHeader, null,
|
|
8
|
+
React.createElement(Title, { headingLevel: "h1", size: TitleSizes['2xl'] },
|
|
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 })),
|
|
13
15
|
React.createElement(ModalFooter, null,
|
|
14
16
|
React.createElement(Button, { variant: "secondary", key: "close-button", onClick: onHideModal }, "Cancel"))));
|
|
15
17
|
};
|
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":"AAgBA,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,CAuGhD,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, ModalFooter, ModalVariant, Title, TitleSizes, } from '@patternfly/react-core';
|
|
11
|
+
import { Button, ButtonVariant, Flex, FlexItem, Modal, ModalBody, ModalFooter, ModalHeader, 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';
|
|
@@ -50,7 +50,7 @@ export const VersionPerformanceMetrics = ({ isModalOpen, onHideModal, selectedVe
|
|
|
50
50
|
};
|
|
51
51
|
const versionOptions = isMajorProjectVersion ? versionDifference : [selectedVersionProp];
|
|
52
52
|
return (React.createElement(Modal, { variant: ModalVariant.large, id: "top-content-major-version-performance-metric", "aria-label": "top-content-performance-metric", isOpen: isModalOpen, onClose: onModalClose, className: "performance-metrics-modal" },
|
|
53
|
-
React.createElement(
|
|
53
|
+
React.createElement(ModalHeader, { className: "sticky-header" },
|
|
54
54
|
React.createElement(Title, { headingLevel: "h1", size: TitleSizes['2xl'] },
|
|
55
55
|
React.createElement(Trans, null, " Performance metrics ")),
|
|
56
56
|
React.createElement("p", { className: "pf-v6-u-pt-sm" },
|
|
@@ -61,8 +61,8 @@ export const VersionPerformanceMetrics = ({ isModalOpen, onHideModal, selectedVe
|
|
|
61
61
|
React.createElement(PerformanceMetricsSelect, { placeholderText: t(!isEmpty(versionOptions) ? 'Select a version' : 'No versions available'), title: t(`Version using ${selectedVersionProp}`), onSelectCallback: onVersionSelect, options: versionOptions, optionValue: (option) => option, isLoading: isLoading, isDisabled: isEmpty(versionOptions) })),
|
|
62
62
|
React.createElement(FlexItem, { className: "pf-v6-u-w-50 pf-v6-u-pl-md" },
|
|
63
63
|
React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a category'), title: t('Categories'), options: flagContentEditState, optionValue: (option) => option.categoryName, onSelectCallback: (selectedOption) => setSelectedCategory(selectedOption), isLoading: !selectedVersion || isTopContentLoading })))),
|
|
64
|
-
React.createElement(
|
|
65
|
-
|
|
64
|
+
React.createElement(ModalBody, null,
|
|
65
|
+
React.createElement(ContentAccordion, { contentList: selectedContent, selectedVersion: selectedVersion })),
|
|
66
66
|
React.createElement(ModalFooter, null,
|
|
67
67
|
React.createElement(Button, { variant: ButtonVariant.secondary, key: "close-button", onClick: onModalClose },
|
|
68
68
|
React.createElement(Trans, null, "Cancel")))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddNewCategoryDropDown.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAGhG,OAAO,KAAuC,MAAM,OAAO,CAAC;AAM5D,UAAU,MAAM;IACZ,gBAAgB,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACxD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AddNewCategoryDropDown.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/AddNewCategoryDropDown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAGhG,OAAO,KAAuC,MAAM,OAAO,CAAC;AAM5D,UAAU,MAAM;IACZ,gBAAgB,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACxD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,qBA2EnD"}
|
|
@@ -37,9 +37,10 @@ export function AddNewCategoryDropDown(props) {
|
|
|
37
37
|
label: category.categoryName,
|
|
38
38
|
})), [availableCategories]);
|
|
39
39
|
const onSelect = (selection) => {
|
|
40
|
-
|
|
40
|
+
const selected = availableCategories.find((v) => v.id === selection.key);
|
|
41
|
+
if (selected) {
|
|
41
42
|
setSelected(selection);
|
|
42
|
-
props.onCategoryChange(
|
|
43
|
+
props.onCategoryChange(selected);
|
|
43
44
|
}
|
|
44
45
|
};
|
|
45
46
|
// Fetch categories only once when component mounts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAiB,aAAa,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAiB,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAiCtG,OAAO,KAAsE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAM7D,OAAO,EAIH,oBAAoB,EAOvB,MAAM,wCAAwC,CAAC;AAIhD,UAAU,MAAM;IACZ,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,CAAC,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,sBAAsB,CAAC,GAAG,KAAA,OASzC;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,6CA2B/C;AAED,eAAO,MAAM,oBAAoB,kDAAmD,MAAM,sBAihBzF,CAAC"}
|
|
@@ -78,12 +78,13 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
|
|
|
78
78
|
const tagManagementEditState = useContext(TagManagementStateContext);
|
|
79
79
|
const { tags: tagOptions } = tagManagementEditState;
|
|
80
80
|
const ref = useRef(null);
|
|
81
|
+
const datePickerRef = useRef(null);
|
|
81
82
|
const topContentDispatch = useTopContentDispatchContext();
|
|
82
83
|
const [localContentUrl, setLocalContentUrl] = useState(content.contentUrl);
|
|
83
84
|
const [localContentTitle, setLocalContentTitle] = useState(content.contentTitle);
|
|
84
85
|
const [localSelectedTags, setLocalSelectedTags] = useState(content.tags || []);
|
|
85
86
|
const [localExpiryDate, setLocalExpiryDate] = useState((content === null || content === void 0 ? void 0 : content.expiryDate) || '');
|
|
86
|
-
const [newCategory, setNewCategory] = useState(
|
|
87
|
+
const [newCategory, setNewCategory] = useState();
|
|
87
88
|
const [contentTitleIsValid, setContentTitleIsValid] = useState(true);
|
|
88
89
|
const [contentUrlIsValid, setContentUrlIsValid] = useState(true);
|
|
89
90
|
const [showDuplicateError, setShowDuplicateError] = useState(false);
|
|
@@ -363,8 +364,14 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
|
|
|
363
364
|
React.createElement("div", { className: `${isEmpty(tagOptions) ? 'menu-is-disabld' : ''}` },
|
|
364
365
|
React.createElement(TagsSelector, { tagOptions: tagOptions, onChange: handleLocalTagChange, selectedTags: localSelectedTags, placeholder: t('Select tags to improve discoverability'), id: "top-content-tag" })))),
|
|
365
366
|
React.createElement(FlexItem, null,
|
|
366
|
-
React.createElement(FormGroup, { label: t('Expiry date') },
|
|
367
|
-
React.createElement(DatePicker, { onBlur: onExpiryDateChange, onChange: onExpiryDateChange, value: !isEmpty(localExpiryDate) ? localExpiryDate.split('T')[0] : '', validators: [expiryDateValidator], id: "content-expiry-date", invalidFormatText: t('Invalid date format')
|
|
367
|
+
React.createElement(FormGroup, { ref: datePickerRef, label: t('Expiry date') },
|
|
368
|
+
React.createElement(DatePicker, { onBlur: onExpiryDateChange, onChange: onExpiryDateChange, value: !isEmpty(localExpiryDate) ? localExpiryDate.split('T')[0] : '', validators: [expiryDateValidator], id: "content-expiry-date", invalidFormatText: t('Invalid date format'), popoverProps: {
|
|
369
|
+
position: 'left',
|
|
370
|
+
hasAutoWidth: true,
|
|
371
|
+
maxWidth: '22rem',
|
|
372
|
+
minWidth: '22rem',
|
|
373
|
+
appendTo: () => document.body,
|
|
374
|
+
} })))),
|
|
368
375
|
React.createElement("span", { className: "top-content-single-item-footer" },
|
|
369
376
|
React.createElement("span", null,
|
|
370
377
|
React.createElement(Button, { className: "pf-v6-u-mr-sm", variant: "primary", onClick: onSave, isDisabled: isSaveButtonDisabled || isSaving, isLoading: isSaving },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/TopContentEditor/TopContentEditor.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAiChF,wBAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"TopContentEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/TopContentEditor/TopContentEditor.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAiChF,wBAAgB,gBAAgB,sBAuX/B"}
|
|
@@ -154,7 +154,7 @@ export function TopContentEditor() {
|
|
|
154
154
|
React.createElement("div", { className: "toolbar-content pf-v6-u-ml-md" },
|
|
155
155
|
React.createElement("label", { htmlFor: 'tag-selector' },
|
|
156
156
|
React.createElement(Trans, null, "All tags")),
|
|
157
|
-
React.createElement(TagsSelector, { tagOptions: tags, onChange: onTagFilterChange, selectedTags: filteredTags, disabled: isEmpty(flagContentEditState) })))),
|
|
157
|
+
React.createElement(TagsSelector, { typeahead: true, tagOptions: tags, onChange: onTagFilterChange, selectedTags: filteredTags, disabled: isEmpty(flagContentEditState) })))),
|
|
158
158
|
React.createElement("div", { className: "top-content-manage-wrapper pf-v6-u-p-md" },
|
|
159
159
|
!topContentResponse.isFetching && React.createElement(TopContentSuggestion, { searchQuery: searchQuery }),
|
|
160
160
|
topContentResponse.isFetching ? (React.createElement(Bullseye, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContentProductVersionSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,QAAQ,IAAI,aAAa,
|
|
1
|
+
{"version":3,"file":"TopContentProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/TopContentManagement/TopContentProductVersionSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAc,MAAM,wCAAwC,CAAC;AAY/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAAsC,MAAM,OAAO,CAAC;AAM3D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,eAAe,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAC3D,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC;CACrB;AAQD,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC,2BAG1E;AAqBD,iBAAS,gCAAgC,CAAC,KAAK,EAAE,MAAM,qBAiNtD;kBAjNQ,gCAAgC;;;AAoNzC,OAAO,EAAE,gCAAgC,EAAE,CAAC"}
|
|
@@ -72,9 +72,10 @@ function TopContentProductVersionSelector(props) {
|
|
|
72
72
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
73
73
|
}, [versions]);
|
|
74
74
|
const onProductChange = (option) => {
|
|
75
|
+
var _a;
|
|
75
76
|
setIsAddingCategory(topContentDispatch, false);
|
|
76
77
|
props.onProductChange(option);
|
|
77
|
-
getProductVersions(option.name);
|
|
78
|
+
getProductVersions((_a = option === null || option === void 0 ? void 0 : option.name) !== null && _a !== void 0 ? _a : '');
|
|
78
79
|
};
|
|
79
80
|
const onVersionChange = (option) => {
|
|
80
81
|
setIsAddingCategory(topContentDispatch, false);
|
|
@@ -92,24 +93,27 @@ function TopContentProductVersionSelector(props) {
|
|
|
92
93
|
if (filteredOptions.length === 0) {
|
|
93
94
|
return React.createElement(SelectOption, { key: "no-results" }, t('No results found'));
|
|
94
95
|
}
|
|
95
|
-
return filteredOptions.map((product,
|
|
96
|
-
React.createElement("span", null, product.name))));
|
|
96
|
+
return filteredOptions.map((product, index) => (React.createElement(SelectOption, { key: index, value: product.productId, className: "pf-v6-c-select__menu-wrapper", isSelected: (selected === null || selected === void 0 ? void 0 : selected.productId) === product.productId }, product.name)));
|
|
97
97
|
};
|
|
98
98
|
const onToggleClick = (e) => {
|
|
99
99
|
var _a;
|
|
100
|
-
e.stopPropagation();
|
|
101
100
|
setIsProductOpen((prev) => !prev);
|
|
102
101
|
(_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
103
102
|
};
|
|
104
103
|
const onProductSelect = (e, selection) => {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
const product = productOptions === null || productOptions === void 0 ? void 0 : productOptions.find((v) => v.productId === selection);
|
|
105
|
+
if (product) {
|
|
106
|
+
onProductChange(product);
|
|
107
|
+
setSelected(product);
|
|
108
|
+
setInput(product.name);
|
|
109
|
+
setIsProductOpen(false);
|
|
110
|
+
}
|
|
110
111
|
};
|
|
111
|
-
const onChange = (e) => {
|
|
112
|
-
setInput(
|
|
112
|
+
const onChange = (e, value) => {
|
|
113
|
+
setInput(value);
|
|
114
|
+
if (!isProductOpen) {
|
|
115
|
+
setIsProductOpen(true);
|
|
116
|
+
}
|
|
113
117
|
return [];
|
|
114
118
|
};
|
|
115
119
|
const onVersionSelect = (selection) => {
|
|
@@ -128,9 +132,8 @@ function TopContentProductVersionSelector(props) {
|
|
|
128
132
|
}));
|
|
129
133
|
};
|
|
130
134
|
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: onToggleClick, isExpanded: isProductOpen, isFullWidth: true, isDisabled: isLoadingProducts, onBlur: () => {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
setInput(selected || '');
|
|
135
|
+
if (selected) {
|
|
136
|
+
setInput(selected === null || selected === void 0 ? void 0 : selected.name);
|
|
134
137
|
}
|
|
135
138
|
} },
|
|
136
139
|
React.createElement(TextInputGroup, { isPlain: true },
|
|
@@ -143,7 +146,7 @@ function TopContentProductVersionSelector(props) {
|
|
|
143
146
|
React.createElement("div", { className: "toolbar-left" },
|
|
144
147
|
React.createElement("label", { htmlFor: 'tc-product-selector-dropdown-toggle' },
|
|
145
148
|
React.createElement(Trans, null, "Product")),
|
|
146
|
-
React.createElement(Select, Object.assign({ isScrollable: true, toggle: toggle, selected: selected, isOpen: isProductOpen, maxMenuHeight: "20rem", onSelect: onProductSelect }, (isLoadingProducts && { loadingVariant: 'spinner' }), { id: productLabelId, "data-tracking-id": productLabelId, "aria-label":
|
|
149
|
+
React.createElement(Select, Object.assign({ isScrollable: true, toggle: toggle, selected: selected, isOpen: isProductOpen, maxMenuHeight: "20rem", onSelect: onProductSelect, onOpenChange: (isOpen) => setIsProductOpen(isOpen) }, (isLoadingProducts && { loadingVariant: 'spinner' }), { id: productLabelId, "data-tracking-id": productLabelId, "aria-label": productLabelId }), getProductOptions(productOptions, input))),
|
|
147
150
|
React.createElement("div", { className: "toolbar-right" },
|
|
148
151
|
React.createElement("label", { htmlFor: "version-selector-dropdown-toggle" },
|
|
149
152
|
React.createElement(Trans, null, "Version")),
|
|
@@ -7,7 +7,7 @@ export declare enum TagManagementReducerConstants {
|
|
|
7
7
|
deleteTag = "deleteTag",
|
|
8
8
|
resetTags = "resetTags"
|
|
9
9
|
}
|
|
10
|
-
interface ITagItemState extends ITag {
|
|
10
|
+
export interface ITagItemState extends ITag {
|
|
11
11
|
numberOfLinkedContents?: number;
|
|
12
12
|
}
|
|
13
13
|
export interface ITagManagementState {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagManagmentReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/TagManagmentReducer.ts"],"names":[],"mappings":"AACA,OAAO,EACH,IAAI,EAEJ,YAAY,EACZ,WAAW,EACX,4BAA4B,EAC/B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGxE,oBAAY,6BAA6B;IACrC,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;CAC1B;AAED,
|
|
1
|
+
{"version":3,"file":"TagManagmentReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/TagManagmentReducer.ts"],"names":[],"mappings":"AACA,OAAO,EACH,IAAI,EAEJ,YAAY,EACZ,WAAW,EACX,4BAA4B,EAC/B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGxE,oBAAY,6BAA6B;IACrC,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;CAC1B;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI;IACvC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACnC;AACD,MAAM,WAAW,mBAAmB;IAChC,WAAW,EAAE,mBAAmB,CAAC,IAAI,EAAE,CAAC,CAAC;IACzC,IAAI,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,eAAO,MAAM,yBAAyB,EAAE,mBAGvC,CAAC;AAEF,KAAK,WAAW,GAAG,OAAO,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;AAC/E,MAAM,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAErE,eAAO,MAAM,oBAAoB,UAAW,mBAAmB,UAAU,WAAW,KAAG,mBAsBtF,CAAC;AAEF,eAAO,MAAM,mBAAmB,aAAoB,yBAAyB,qBAAoB,OAAO,mBAsDvG,CAAC;AAEF,eAAO,MAAM,aAAa,aAAoB,yBAAyB,QAAQ,YAAY,EAAE,kBAW5F,CAAC;AAEF,eAAO,MAAM,SAAS,aAAoB,yBAAyB,OAAO,WAAW,aAAa,aAAa,EAAE,kBAahH,CAAC;AAEF,eAAO,MAAM,SAAS,aACR,yBAAyB,cACvB,IAAI,sBACI,mBAAmB,kBAe1C,CAAC;AAEF,eAAO,MAAM,wBAAwB,aACvB,yBAAyB,WAC1B,4BAA4B,sBACjB,mBAAmB,kBAQ1C,CAAC"}
|
package/lib/esm/scss/_main.scss
CHANGED
|
@@ -410,14 +410,28 @@ svg.hostnameSpinner {
|
|
|
410
410
|
padding: var(--pf-t--global--spacer--md);
|
|
411
411
|
}
|
|
412
412
|
|
|
413
|
+
.pf-v6-c-calendar-month__header-year input {
|
|
414
|
+
font-size: var(--pf-t--global--font--size--body--default);
|
|
415
|
+
line-height: var(--pf-t--global--font--line-height--body);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.pf-v6-c-date-picker__input input[aria-label='Date picker'] {
|
|
419
|
+
min-width: 10rem;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.pf-v6-c-date-picker__input button {
|
|
423
|
+
flex: 0 0 auto;
|
|
424
|
+
height: 100%;
|
|
425
|
+
}
|
|
426
|
+
|
|
413
427
|
#manage-expired-content .toolbar {
|
|
414
428
|
display: flex;
|
|
415
429
|
flex-direction: row;
|
|
416
430
|
justify-content: space-between;
|
|
417
431
|
align-items: initial;
|
|
418
432
|
|
|
419
|
-
|
|
420
|
-
|
|
433
|
+
.top-content-search-input,
|
|
434
|
+
.tags-selector-menu-toggle {
|
|
421
435
|
min-width: 25rem;
|
|
422
436
|
}
|
|
423
437
|
|
|
@@ -179,3 +179,12 @@ div.pf-v6-c-pagination__nav-page-select {
|
|
|
179
179
|
margin: 0;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
+
|
|
183
|
+
.pf-v6-c-calendar-month__header-month,
|
|
184
|
+
.pf-v6-c-calendar-month__header-month button {
|
|
185
|
+
height: 100%;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.pf-v6-c-calendar-month__header-year {
|
|
189
|
+
min-width: 6rem;
|
|
190
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/manage",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.38",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"@patternfly/patternfly": "6.2.1",
|
|
80
80
|
"@patternfly/react-core": "6.2.1",
|
|
81
81
|
"@patternfly/react-table": "6.2.1",
|
|
82
|
-
"@rh-support/components": "2.5.
|
|
82
|
+
"@rh-support/components": "2.5.32",
|
|
83
83
|
"@rh-support/configs": "2.0.21",
|
|
84
|
-
"@rh-support/react-context": "2.5.
|
|
84
|
+
"@rh-support/react-context": "2.5.34",
|
|
85
85
|
"@rh-support/types": "2.0.5",
|
|
86
86
|
"@rh-support/user-permissions": "2.5.20",
|
|
87
87
|
"@rh-support/utils": "2.5.19",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"defaults and supports es6-module",
|
|
104
104
|
"maintained node versions"
|
|
105
105
|
],
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "0ecaec663e234789df10d8f8a98a46757388e573"
|
|
107
107
|
}
|