@rh-support/manage 2.1.62 → 2.1.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.
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  interface IProps {
4
4
  tab: ITabToRender<string>;
5
5
  loadComponent: boolean;
6
+ tabIndex: number;
6
7
  }
7
8
  export declare function ManageTab(props: IProps): React.JSX.Element;
8
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ManageTab.d.ts","sourceRoot":"","sources":["../../src/ManageTab.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,MAAM;IACZ,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,qBAuBtC"}
1
+ {"version":3,"file":"ManageTab.d.ts","sourceRoot":"","sources":["../../src/ManageTab.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,UAAU,MAAM;IACZ,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,qBA+BtC"}
@@ -1,9 +1,16 @@
1
1
  import { ErrorBoundary } from '@rh-support/components';
2
- import React from 'react';
2
+ import React, { useEffect } from 'react';
3
3
  import { Trans, useTranslation } from 'react-i18next';
4
4
  export function ManageTab(props) {
5
5
  const tab = props.tab;
6
6
  const { t } = useTranslation();
7
+ useEffect(() => {
8
+ if (!props.loadComponent)
9
+ return;
10
+ const tabPaneles = document.getElementsByTagName('pfe-tab-panel');
11
+ if (tabPaneles.length > 0 && tabPaneles[props.tabIndex])
12
+ tabPaneles[props.tabIndex].removeAttribute('hidden');
13
+ }, [props.loadComponent, props.tabIndex]);
7
14
  return (React.createElement(React.Fragment, null,
8
15
  React.createElement("pfe-tab", { role: "tab", slot: "tab", "data-tracking-id": tab['data-tracking-id'], onClick: tab.onClick },
9
16
  React.createElement(Trans, null,
@@ -1 +1 @@
1
- {"version":3,"file":"ManageTabs.d.ts","sourceRoot":"","sources":["../../src/ManageTabs.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAavD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;CACvC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,qBAuJvC"}
1
+ {"version":3,"file":"ManageTabs.d.ts","sourceRoot":"","sources":["../../src/ManageTabs.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAavD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;CACvC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,qBA4JvC"}
@@ -126,5 +126,5 @@ export function ManageTabs(props) {
126
126
  * Render array with tabs
127
127
  */
128
128
  return (React.createElement("div", { className: "grid-main manage" },
129
- React.createElement("pfe-tabs", { "pfe-variant": "earth", "selected-index": getSelectedIndex(), vertical: true }, map(tabsToRender, (tab, index) => (React.createElement(ManageTab, { tab: tab, key: tab.key, loadComponent: index === getSelectedIndex() }))))));
129
+ React.createElement("pfe-tabs", { "pfe-variant": "earth", "selected-index": getSelectedIndex(), vertical: true }, map(tabsToRender, (tab, index) => (React.createElement(ManageTab, { tabIndex: getSelectedIndex(), tab: tab, key: tab.key, loadComponent: index === getSelectedIndex() }))))));
130
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/manage",
3
- "version": "2.1.62",
3
+ "version": "2.1.64",
4
4
  "description": "Customer Support Manage App",
5
5
  "author": "Jordan Eudy <jeudy100@gmail.com>",
6
6
  "homepage": "",
@@ -79,12 +79,12 @@
79
79
  "@patternfly/patternfly": "5.1.0",
80
80
  "@patternfly/react-core": "5.1.1",
81
81
  "@patternfly/react-table": "5.1.1",
82
- "@rh-support/components": "2.1.46",
83
- "@rh-support/configs": "2.0.16",
84
- "@rh-support/react-context": "2.1.51",
82
+ "@rh-support/components": "2.1.47",
83
+ "@rh-support/configs": "2.0.17",
84
+ "@rh-support/react-context": "2.1.52",
85
85
  "@rh-support/types": "2.0.3",
86
- "@rh-support/user-permissions": "2.1.33",
87
- "@rh-support/utils": "2.1.23",
86
+ "@rh-support/user-permissions": "2.1.34",
87
+ "@rh-support/utils": "2.1.24",
88
88
  "@types/react-beautiful-dnd": "^13.0.0",
89
89
  "lodash": ">=4.17.15",
90
90
  "react": "18.2.0",
@@ -101,5 +101,5 @@
101
101
  "defaults and supports es6-module",
102
102
  "maintained node versions"
103
103
  ],
104
- "gitHead": "73340df833a3a85d6982412acfc7f1f9297f6736"
104
+ "gitHead": "b3b0fd899e604b6693213eefc4f1d3ca54655040"
105
105
  }