@rh-support/manage 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ManageGroupUsers.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/ManageGroupUsers/ManageGroupUsers.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,gBAAgB,mBAiN5B,CAAC"}
1
+ {"version":3,"file":"ManageGroupUsers.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/ManageGroupUsers/ManageGroupUsers.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,gBAAgB,mBAgN5B,CAAC"}
@@ -133,15 +133,15 @@ export const ManageGroupUsers = () => {
133
133
  React.createElement(AlertMessage, { variant: AlertType.INFO, show: loggedInUserRights.data.isOrgAdmin() && !loggedInUsersAccount.data.hasGroupACLs, isInline: true, className: "pf-u-mb-md", title: t("Case Group Access Control Lists (ACLs) haven't been activated on your account.") },
134
134
  React.createElement("p", null,
135
135
  React.createElement(Trans, { i18nKey: "i18nRequestControl" },
136
- "To request control over who can access cases under a specific group, please contact your Technical Account Manager or",
137
- ' ',
138
- React.createElement("a", { href: "/support/contact/technicalSupport/", rel: "noopener noreferrer", target: "_blank" }, "Red Hat Technical Support"),
139
- ". You can set permissions on groups but settings won't take effect until",
136
+ "You can set permissions on groups but settings won't take effect until",
140
137
  ' ',
141
138
  React.createElement("a", { href: "https://access.redhat.com/solutions/175763", rel: "noopener noreferrer", target: "_blank" }, "Case Group ACLs"),
142
139
  ' ',
143
- "is activated on your account.",
144
- ' '))),
140
+ "is activated on your account. Please contact your Technical Account Manager or",
141
+ ' ',
142
+ React.createElement("a", { href: "/support/contact/technicalSupport/", rel: "noopener noreferrer", target: "_blank" }, "Red Hat Technical Support"),
143
+ ' ',
144
+ "to request Case Group ACLs activation."))),
145
145
  React.createElement("header", null,
146
146
  React.createElement("h2", null, t('Groups')),
147
147
  React.createElement("p", null, t('Add or edit groups to easily filter while searching through cases.'))),
@@ -16,5 +16,5 @@ export const PerformanceMetricsSelect = ({ placeholderText, title, onSelectCallb
16
16
  " ",
17
17
  title,
18
18
  " ")),
19
- React.createElement(Select, { variant: SelectVariant.single, placeholderText: placeholderText, "aria-label": "Select Input with descriptions", onToggle: onToggle, onSelect: onSelect, selections: selected, isOpen: isOpen, disabled: isLoading }, options.map((option, index) => (React.createElement(SelectOption, { key: index, value: optionValue(option) }))))));
19
+ React.createElement(Select, { variant: SelectVariant.single, placeholderText: placeholderText, "aria-label": "Select Input with descriptions", onToggle: onToggle, onSelect: onSelect, selections: selected, isOpen: isOpen, isDisabled: isLoading }, options.map((option, index) => (React.createElement(SelectOption, { key: index, value: optionValue(option) }))))));
20
20
  };
@@ -1,9 +1,7 @@
1
1
  import { FC } from 'react';
2
- import { ITopContentEditState } from '../../../reducers/TopContentReducer';
3
2
  interface IProps {
4
3
  isModalOpen: boolean;
5
4
  onHideModal: () => void;
6
- filteredTC: ITopContentEditState[];
7
5
  selectedVersionProp: string;
8
6
  selectedProduct: string;
9
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"VersionPerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.tsx"],"names":[],"mappings":"AAWA,OAAc,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAMhE,OAAO,EAAE,oBAAoB,EAAwB,MAAM,qCAAqC,CAAC;AAIjG,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,MAAM,CAoFhD,CAAC"}
1
+ {"version":3,"file":"VersionPerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/VersionPerformanceMetrics.tsx"],"names":[],"mappings":"AAaA,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,CAmGhD,CAAC"}
@@ -1,4 +1,15 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { pcm } from '@cee-eng/hydrajs';
1
11
  import { Button, ButtonVariant, Flex, FlexItem, Modal, ModalVariant, Title, TitleSizes, } from '@patternfly/react-core';
12
+ import { useFetch } from '@rh-support/components';
2
13
  import React, { useEffect, useMemo, useState } from 'react';
3
14
  import { Trans, useTranslation } from 'react-i18next';
4
15
  import { useTopContentContext } from '../../../context/TopContentProvider';
@@ -6,14 +17,24 @@ import { useVersionsDiffer } from '../../../hooks/useVersionsDiffer';
6
17
  import { flagContentUsage, isMajorVersion } from '../../../reducers/TopContentHelpers';
7
18
  import { ContentAccordion } from './ContentAccordion';
8
19
  import { PerformanceMetricsSelect } from './PerformanceMetricsSelect';
9
- export const VersionPerformanceMetrics = ({ isModalOpen, onHideModal, filteredTC, selectedVersionProp, selectedProduct, }) => {
20
+ export const VersionPerformanceMetrics = ({ isModalOpen, onHideModal, selectedVersionProp, selectedProduct, }) => {
10
21
  const { t } = useTranslation();
11
22
  const isMajorProjectVersion = isMajorVersion(selectedVersionProp);
12
- const [selectedVersion, setVersion] = useState(isMajorProjectVersion ? selectedVersionProp.split('.x')[0] : selectedVersionProp);
23
+ const [selectedVersion, setVersion] = useState(undefined);
13
24
  const [selectedCategory, setSelectedCategory] = useState('');
14
25
  const [selectedContent, setSelectedContent] = useState([]);
15
26
  const { categoryUsage } = useTopContentContext();
16
- const flagContentEditState = useMemo(() => flagContentUsage(filteredTC, categoryUsage, selectedVersion), [filteredTC, categoryUsage, selectedVersion]);
27
+ const { request: getTopContent, isFetching: isTopContentLoading, data: topContent, } = useFetch(pcm.topContent.getTopContent, { initialData: [] });
28
+ const flagContentEditState = useMemo(() => flagContentUsage(topContent, categoryUsage, selectedVersion), [topContent, categoryUsage, selectedVersion]);
29
+ const onVersionSelect = (e, selectedOption) => __awaiter(void 0, void 0, void 0, function* () {
30
+ setVersion(selectedOption);
31
+ getTopContent &&
32
+ (yield getTopContent({
33
+ product: selectedProduct,
34
+ version: selectedOption,
35
+ sortby: 'rank',
36
+ }));
37
+ });
17
38
  const [isLoading, versionDifference] = useVersionsDiffer(selectedProduct, selectedVersionProp);
18
39
  useEffect(() => {
19
40
  var _a;
@@ -38,9 +59,9 @@ export const VersionPerformanceMetrics = ({ isModalOpen, onHideModal, filteredTC
38
59
  React.createElement("br", null),
39
60
  React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
40
61
  React.createElement(FlexItem, { className: "pf-u-w-50 pf-u-pr-md", style: { marginRight: 'unset' } },
41
- React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a version'), title: t(`Version using ${selectedVersionProp}`), onSelectCallback: (e, selectedOption) => setVersion(selectedOption), options: isMajorProjectVersion ? versionDifference : [selectedVersionProp], optionValue: (option) => option, isLoading: isLoading })),
62
+ React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a version'), title: t(`Version using ${selectedVersionProp}`), onSelectCallback: onVersionSelect, options: isMajorProjectVersion ? versionDifference : [selectedVersionProp], optionValue: (option) => option, isLoading: isLoading })),
42
63
  React.createElement(FlexItem, { className: "pf-u-w-50 pf-u-pl-md" },
43
- React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a category'), title: t('Categories'), options: flagContentEditState, optionValue: (option) => option.categoryName, onSelectCallback: (e, selectedOption) => setSelectedCategory(selectedOption) })))),
64
+ React.createElement(PerformanceMetricsSelect, { placeholderText: t('select a category'), title: t('Categories'), options: flagContentEditState, optionValue: (option) => option.categoryName, onSelectCallback: (e, selectedOption) => setSelectedCategory(selectedOption), isLoading: !selectedVersion || isTopContentLoading })))),
44
65
  React.createElement("br", null),
45
66
  React.createElement(ContentAccordion, { contentList: selectedContent, selectedVersion: selectedVersion })));
46
67
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/TopContentEditor/TopContentEditor.tsx"],"names":[],"mappings":"AA4CA,wBAAgB,gBAAgB,gBAuT/B"}
1
+ {"version":3,"file":"TopContentEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/TopContentEditor/TopContentEditor.tsx"],"names":[],"mappings":"AA4CA,wBAAgB,gBAAgB,gBAsT/B"}
@@ -151,5 +151,5 @@ export function TopContentEditor() {
151
151
  ' ',
152
152
  React.createElement(Button, { variant: "link", onClick: onCancelArrangement },
153
153
  React.createElement(Trans, null, "Cancel")))))))))),
154
- isMajorOrNamedVersion(selectedVersion) && (React.createElement(VersionPerformanceMetrics, { isModalOpen: isModalOpen, onHideModal: onHideModal, filteredTC: filteredTC, selectedVersionProp: selectedVersion, selectedProduct: selectedProduct.name })))));
154
+ isMajorOrNamedVersion(selectedVersion) && (React.createElement(VersionPerformanceMetrics, { isModalOpen: isModalOpen, onHideModal: onHideModal, selectedVersionProp: selectedVersion, selectedProduct: selectedProduct.name })))));
155
155
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/manage",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Customer Support Manage App",
5
5
  "author": "Jordan Eudy <jeudy100@gmail.com>",
6
6
  "homepage": "",
@@ -109,5 +109,5 @@
109
109
  "react-i18next": ">=10.11.0",
110
110
  "react-router-dom": ">=5.1.2"
111
111
  },
112
- "gitHead": "8c85bdb8941ddb7070c5356a3c89c1c676c147fb"
112
+ "gitHead": "27979c9c86fcd819eb3cd3f3d4ef229df9ff58dc"
113
113
  }