@rh-support/manage 0.2.63 → 0.2.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (16) hide show
  1. package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.d.ts +1 -0
  2. package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.d.ts.map +1 -1
  3. package/lib/esm/components/TopContentManagement/ContentUsage/ContentAccordion.js +2 -2
  4. package/lib/esm/components/TopContentManagement/ContentUsage/MajorVersionPerformanceMetrics.js +1 -1
  5. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.d.ts +1 -0
  6. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.d.ts.map +1 -1
  7. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetricClickCount.js +2 -2
  8. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.d.ts +1 -0
  9. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.d.ts.map +1 -1
  10. package/lib/esm/components/TopContentManagement/ContentUsage/PerformanceMetrics.js +2 -2
  11. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.d.ts.map +1 -1
  12. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.js +1 -1
  13. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.d.ts +1 -0
  14. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.d.ts.map +1 -1
  15. package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.js +2 -2
  16. package/package.json +2 -2
@@ -2,6 +2,7 @@ import { FC } from 'react';
2
2
  import { ITopContentItemState } from '../../../reducers/TopContentReducer';
3
3
  interface IProps {
4
4
  contentList: ITopContentItemState[];
5
+ selectedVersion: string;
5
6
  }
6
7
  export declare const ContentAccordion: FC<IProps>;
7
8
  export {};
@@ -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;CACvC;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAmEvC,CAAC"}
1
+ {"version":3,"file":"ContentAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/ContentAccordion.tsx"],"names":[],"mappings":"AAUA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAG3E,UAAU,MAAM;IACZ,WAAW,EAAE,oBAAoB,EAAE,CAAC;IACpC,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAoEvC,CAAC"}
@@ -3,7 +3,7 @@ import { formatDate } from '@rh-support/utils';
3
3
  import React, { useState } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { PerformanceMetricClickCount } from './PerformanceMetricClickCount';
6
- export const ContentAccordion = ({ contentList }) => {
6
+ export const ContentAccordion = ({ contentList, selectedVersion }) => {
7
7
  const [expanded, setExpanded] = useState(0);
8
8
  const { t } = useTranslation();
9
9
  const onToggle = (id) => () => {
@@ -32,6 +32,6 @@ export const ContentAccordion = ({ contentList }) => {
32
32
  React.createElement("span", { className: "pf-u-font-size-sm" }, lastModifiedBy),
33
33
  React.createElement("br", null),
34
34
  React.createElement("br", null),
35
- React.createElement(PerformanceMetricClickCount, { needsAttention: isAttentionNeeded, contentId: topContentId }))));
35
+ React.createElement(PerformanceMetricClickCount, { needsAttention: isAttentionNeeded, contentId: topContentId, selectedVersion: selectedVersion }))));
36
36
  }))))))));
37
37
  };
@@ -38,5 +38,5 @@ export const MajorVersionPerformanceMetrics = ({ isModalOpen, onHideModal, filte
38
38
  React.createElement(FlexItem, { className: "pf-u-w-50 pf-u-pl-md" },
39
39
  React.createElement(PerformanceMetricsSelect, { placeholderText: "select a category", title: "Categories", options: flagContentEditState, optionValue: (option) => option.categoryName, onSelectCallback: (e, selectedOption) => setSelectedCategory(selectedOption) })))),
40
40
  React.createElement("br", null),
41
- React.createElement(ContentAccordion, { contentList: selectedContent })));
41
+ React.createElement(ContentAccordion, { contentList: selectedContent, selectedVersion: selectedVersion })));
42
42
  };
@@ -2,6 +2,7 @@ import { FC } from 'react';
2
2
  interface IProps {
3
3
  contentId: number;
4
4
  needsAttention: boolean;
5
+ selectedVersion: string;
5
6
  }
6
7
  export declare const PerformanceMetricClickCount: FC<IProps>;
7
8
  export {};
@@ -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;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,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,8 +2,8 @@ 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 }) => {
6
- const { categoryUsage, selectedVersion } = useTopContentContext();
5
+ export const PerformanceMetricClickCount = ({ contentId, needsAttention, selectedVersion }) => {
6
+ const { categoryUsage } = useTopContentContext();
7
7
  const [selectedOption, setSelectedOption] = useState(0);
8
8
  const topContentUsageMetrics = useMemo(() => {
9
9
  var _a;
@@ -6,6 +6,7 @@ interface IProps {
6
6
  contentId: number;
7
7
  title: string;
8
8
  lastModifiedBy: string;
9
+ selectedVersion: string;
9
10
  }
10
11
  export declare const PerformanceMetrics: FC<IProps>;
11
12
  export {};
@@ -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;CAC1B;AACD,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,MAAM,CAiCzC,CAAC"}
1
+ {"version":3,"file":"PerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/PerformanceMetrics.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,MAAM,CAsCzC,CAAC"}
@@ -2,7 +2,7 @@ import { Button, Modal, ModalVariant, Title, TitleSizes } from '@patternfly/reac
2
2
  import React from 'react';
3
3
  import { Trans } from 'react-i18next';
4
4
  import { PerformanceMetricClickCount } from './PerformanceMetricClickCount';
5
- export const PerformanceMetrics = ({ isModalOpen, onHideModal, needsAttention, contentId, title, lastModifiedBy, }) => {
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, actions: [
7
7
  React.createElement(Button, { variant: "secondary", key: "close-button", onClick: onHideModal }, "Cancel"),
8
8
  ] },
@@ -11,5 +11,5 @@ export const PerformanceMetrics = ({ isModalOpen, onHideModal, needsAttention, c
11
11
  React.createElement("p", { className: "pf-u-pb-lg pf-u-pt-sm" }, "Better understand the Performance for the top content resources."),
12
12
  React.createElement("div", { className: "pf-u-pb-xs top-content-tooltip-view-metric-label" }, title),
13
13
  React.createElement("div", { className: "pf-u-pb-lg" }, lastModifiedBy),
14
- React.createElement(PerformanceMetricClickCount, { needsAttention: needsAttention, contentId: contentId })));
14
+ React.createElement(PerformanceMetricClickCount, { needsAttention: needsAttention, contentId: contentId, selectedVersion: selectedVersion })));
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAK7D,OAAO,EAIH,oBAAoB,EAOvB,MAAM,wCAAwC,CAAC;AAIhD,UAAU,MAAM;IACZ,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,CAAC,EAAE,MAAM,CAAC;CACb;AAaD,eAAO,MAAM,oBAAoB,kDAAmD,MAAM,gBA4XzF,CAAC"}
1
+ {"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAK7D,OAAO,EAIH,oBAAoB,EAOvB,MAAM,wCAAwC,CAAC;AAIhD,UAAU,MAAM;IACZ,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,CAAC,EAAE,MAAM,CAAC;CACb;AAaD,eAAO,MAAM,oBAAoB,kDAAmD,MAAM,gBA6XzF,CAAC"}
@@ -249,7 +249,7 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
249
249
  isPreview && content.mode !== ContentMode.ADD && content.mode !== ContentMode.NEW_SECTION_CONTENT && (React.createElement("li", { className: `push-bottom-narrow ${snapshot.isDragging ? 'list-flat tc-drag' : ''}` },
250
250
  isArrangingContent && (React.createElement(GripVerticalIcon, { style: { cursor: 'move' }, title: t('Drag'), color: "#06c", size: "sm", className: "pf-u-mr-sm" })),
251
251
  !isArrangingContent ? (React.createElement(React.Fragment, null,
252
- React.createElement(TopContentSingleItemLink, { url: getTopContentUrl(content.contentUrl), title: content.contentTitle, contentId: content.topContentId, needsAttention: content.isAttentionNeeded, lastModifiedBy: lastModifiedBy }),
252
+ React.createElement(TopContentSingleItemLink, { url: getTopContentUrl(content.contentUrl), title: content.contentTitle, contentId: content.topContentId, needsAttention: content.isAttentionNeeded, lastModifiedBy: lastModifiedBy, selectedVersion: selectedVersion }),
253
253
  ' ',
254
254
  React.createElement(Button, { variant: "link", isInline: true, icon: React.createElement(EditAltIcon, null), onClick: editToggle, title: 'Edit' }))) : (content.contentTitle),
255
255
  React.createElement("div", null, lastModifiedBy))),
@@ -5,6 +5,7 @@ interface IProps {
5
5
  needsAttention?: boolean;
6
6
  contentId?: number;
7
7
  lastModifiedBy: string;
8
+ selectedVersion: string;
8
9
  }
9
10
  export declare const TopContentSingleItemLink: FC<IProps>;
10
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentSingleItemLink.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAK5C,UAAU,MAAM;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,MAAM,CAgD/C,CAAC"}
1
+ {"version":3,"file":"TopContentSingleItemLink.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItemLink.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AAK5C,UAAU,MAAM;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,wBAAwB,EAAE,EAAE,CAAC,MAAM,CAkD/C,CAAC"}
@@ -3,7 +3,7 @@ import ExclamationTriangle from '@patternfly/react-icons/dist/js/icons/exclamati
3
3
  import React, { useState } from 'react';
4
4
  import { Trans } from 'react-i18next';
5
5
  import { PerformanceMetrics } from '../../ContentUsage/PerformanceMetrics';
6
- export const TopContentSingleItemLink = ({ title, url, needsAttention = false, contentId, lastModifiedBy, }) => {
6
+ export const TopContentSingleItemLink = ({ title, url, needsAttention = false, contentId, lastModifiedBy, selectedVersion, }) => {
7
7
  const [isModalOpen, setModalOpen] = useState(false);
8
8
  const onHideModal = () => setModalOpen(false);
9
9
  const onOpenModal = () => setModalOpen(true);
@@ -16,5 +16,5 @@ export const TopContentSingleItemLink = ({ title, url, needsAttention = false, c
16
16
  React.createElement(Button, { variant: "plain", className: "top-content-tooltip" },
17
17
  React.createElement(ExclamationTriangle, null)))),
18
18
  React.createElement("a", { className: needsAttention ? 'top-content-needs-attention' : 'pcm-manage-top-content', "data-tracking-id": "pcm-manage-top-content", href: url, target: "_blank", rel: "noopener noreferrer" }, title),
19
- React.createElement(PerformanceMetrics, { isModalOpen: isModalOpen, onHideModal: onHideModal, needsAttention: needsAttention, contentId: contentId, title: title, lastModifiedBy: lastModifiedBy })));
19
+ React.createElement(PerformanceMetrics, { isModalOpen: isModalOpen, onHideModal: onHideModal, needsAttention: needsAttention, contentId: contentId, title: title, lastModifiedBy: lastModifiedBy, selectedVersion: selectedVersion })));
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/manage",
3
- "version": "0.2.63",
3
+ "version": "0.2.64",
4
4
  "description": "Customer Support Manage App",
5
5
  "author": "Jordan Eudy <jeudy100@gmail.com>",
6
6
  "homepage": "",
@@ -113,5 +113,5 @@
113
113
  "react-i18next": ">=10.11.0",
114
114
  "react-router-dom": ">=5.1.2"
115
115
  },
116
- "gitHead": "4fce3da5901527ba41788f587ab1852eff161cee"
116
+ "gitHead": "1de6c9240e3b6ee20e698385182d64e4501c6fe5"
117
117
  }