@rh-support/manage 2.1.40 → 2.1.42

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.
@@ -11,10 +11,8 @@ declare global {
11
11
  interface Window {
12
12
  sessionjs: any;
13
13
  MSInputMethodContext: any;
14
- chrometwo_require: (component: string[], callback: (...params: any[]) => any) => any;
15
14
  portal: any;
16
15
  Raven: any;
17
- chrometwo_ready: any;
18
16
  seVersionInfo: {
19
17
  packageVersion: string;
20
18
  hydrajs: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Manage.d.ts","sourceRoot":"","sources":["../../src/Manage.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAI3B,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAKvD,MAAM,WAAW,qBAAqB;CAAG;AACzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;IACvD,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,MAAM,OAAA,KAAK,GAAG,KAAK,GAAG,CAAC;QAC9E,MAAM,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,eAAe,EAAE,GAAG,CAAC;QACrB,aAAa,EAAE;YACX,cAAc,EAAE,MAAM,CAAC;YACvB,OAAO,EAAE,MAAM,CAAC;SACnB,CAAC;KACL;IAED,UAAU,QAAQ;QACd,YAAY,EAAE,GAAG,CAAC;KACrB;IAED,UAAU,GAAG,CAAC;QACV,UAAU,iBAAkB,SAAQ,QAAQ;SAAG;KAClD;CACJ;AASD,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,eAUnC"}
1
+ {"version":3,"file":"Manage.d.ts","sourceRoot":"","sources":["../../src/Manage.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAI3B,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAKvD,MAAM,WAAW,qBAAqB;CAAG;AACzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;IACvD,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,MAAM,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,aAAa,EAAE;YACX,cAAc,EAAE,MAAM,CAAC;YACvB,OAAO,EAAE,MAAM,CAAC;SACnB,CAAC;KACL;IAED,UAAU,QAAQ;QACd,YAAY,EAAE,GAAG,CAAC;KACrB;IAED,UAAU,GAAG,CAAC;QACV,UAAU,iBAAkB,SAAQ,QAAQ;SAAG;KAClD;CACJ;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,eAUnC"}
package/lib/esm/Manage.js CHANGED
@@ -1,15 +1,8 @@
1
1
  import './scss/index.scss';
2
2
  import { ConfirmationServiceProvider } from '@rh-support/components';
3
- import { CustomElements, requireCustomElement } from '@rh-support/utils';
4
3
  import React from 'react';
5
4
  import { ManageTabs } from './ManageTabs';
6
5
  import { Routes } from './Routes';
7
- requireCustomElement([
8
- {
9
- element: CustomElements.pfeTabs,
10
- requireCb: () => require('@patternfly/pfe-tabs'),
11
- },
12
- ]);
13
6
  export function Manage(props) {
14
7
  Routes.basePath = props.basePath;
15
8
  return (React.createElement("div", { id: "rh-support-manage" },
@@ -1 +1 @@
1
- {"version":3,"file":"ManageTabs.d.ts","sourceRoot":"","sources":["../../src/ManageTabs.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAoBvD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;CACvC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,eAkKvC"}
1
+ {"version":3,"file":"ManageTabs.d.ts","sourceRoot":"","sources":["../../src/ManageTabs.tsx"],"names":[],"mappings":"AAKA,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,eAuJvC"}
@@ -1,9 +1,7 @@
1
1
  import { ErrorBoundary, useDocumentTitle } from '@rh-support/components';
2
- import { GlobalMetadataStateContext } from '@rh-support/react-context';
3
2
  import { ability, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
4
- import { CustomElements, getConfigField, PCM_CONFIG_FIELD_TYPE, requireCustomElement } from '@rh-support/utils';
5
3
  import map from 'lodash/map';
6
- import React, { useContext } from 'react';
4
+ import React from 'react';
7
5
  import { ConfigsTable } from './components/Configs/ConfigsTable';
8
6
  import { ManageGroupUsers } from './components/Groups/ManageGroupUsers';
9
7
  import { ManageGroupedBookmarkedAccountsTab } from './components/ManageBookmarkedAccountsTab';
@@ -14,18 +12,10 @@ import { TopContentManagement } from './components/TopContentManagement';
14
12
  import { PageTitle } from './constants/pageTitle';
15
13
  import { ManageTab } from './ManageTab';
16
14
  import { Routes } from './Routes';
17
- requireCustomElement([
18
- {
19
- element: CustomElements.pfeTabs,
20
- requireCb: () => require('@patternfly/pfe-tabs'),
21
- },
22
- ]);
23
15
  export function ManageTabs(props) {
24
16
  var _a, _b;
25
17
  const history = props.routeProps.history;
26
18
  const { groupsRoute, bookmarkedAccountsRoute, topContentRoute, notificationEmailsRoute, preferencesRoute, configsRoute, partnershipsRoute, } = Routes.getPaths();
27
- const { globalMetadataState: { pcmConfig }, } = useContext(GlobalMetadataStateContext);
28
- const isPartnershipsEnabled = getConfigField(pcmConfig.data, 'isPartnershipEnabled', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
29
19
  // Changes route and saves the current path to the url query params
30
20
  const isOnlyBasePath = history.location.pathname === Routes.basePath;
31
21
  useDocumentTitle(PageTitle.MANAGE);
@@ -77,7 +67,6 @@ export function ManageTabs(props) {
77
67
  component: React.createElement(NotificationEmails, null),
78
68
  });
79
69
  canViewPartnershipsTab &&
80
- isPartnershipsEnabled &&
81
70
  tabsToRender.push({
82
71
  title: 'Partnerships',
83
72
  key: 'partnerships-tab',
@@ -1 +1 @@
1
- {"version":3,"file":"ManageTable.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageTable/ManageTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,EAQf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,SAAS,EAAmC,MAAM,wBAAwB,CAAC;AAC7F,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAGrB,cAAc,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IAEjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC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AW,CAAC,KAAK,EAAE,MAAM,eAoDxC"}
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { Alert, AlertActionCloseButton, Bullseye, EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, PaginationVariant, } from '@patternfly/react-core';
13
13
  import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
14
- import { PFTable, Table, TablePagination } from '@rh-support/components';
14
+ import { PFTable, TableComponent, TablePagination } from '@rh-support/components';
15
15
  import React from 'react';
16
16
  import { Trans } from 'react-i18next';
17
17
  const noResultFoundRow = (noResultString = '') => [
@@ -35,7 +35,7 @@ export function ManageTable(props) {
35
35
  return (React.createElement("div", { className: "table-wrapper" },
36
36
  isError && (React.createElement(React.Fragment, null,
37
37
  React.createElement(Alert, { variant: errorVariant, isInline: true, title: errorTitle, actionClose: React.createElement(AlertActionCloseButton, null), className: "pf-v5-u-my-sm" }, errorComponent))),
38
- React.createElement(Table, Object.assign({}, tableProps),
38
+ React.createElement(TableComponent, Object.assign({}, tableProps),
39
39
  React.createElement(PFTable, { sortInfo: sortInfo, "aria-label": ariaLabel, pagination: pagination(), emptyStateRow: noResultFoundRow(props.noResultText), actions: actions, areActionsDisabled: areActionsDisabled, actionResolver: actionResolver, isLoading: isFetching, keepPageNumberOnDataChange: keepPageNumberOnDataChange }),
40
40
  tableProps.data.length > 0 && pagination() && (React.createElement("footer", null,
41
41
  React.createElement(TablePagination, { variant: PaginationVariant.bottom, perPage: props.perPage || 10 }))))));
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"AAaA,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,gBA+XzF,CAAC"}
1
+ {"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"AAaA,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,gBA2YzF,CAAC"}
@@ -12,7 +12,7 @@ import { Button, Icon, TextInput, ValidatedOptions } from '@patternfly/react-cor
12
12
  import EditAltIcon from '@patternfly/react-icons/dist/js/icons/edit-alt-icon';
13
13
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
14
14
  import GripVerticalIcon from '@patternfly/react-icons/dist/js/icons/grip-vertical-icon';
15
- import { ToastNotification } from '@rh-support/components';
15
+ import { ToastNotification, useDebounce } from '@rh-support/components';
16
16
  import { formatDate, getDrupalResIdIfTypeFromUrl, getText, isValidUrl } from '@rh-support/utils';
17
17
  import cloneDeep from 'lodash/cloneDeep';
18
18
  import findIndex from 'lodash/findIndex';
@@ -127,8 +127,12 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
127
127
  setContentUrlIsValid(isValidUrl(contentUrl));
128
128
  checkDuplicateUrls(contentUrl);
129
129
  setLocalContentUrl(contentUrl);
130
+ });
131
+ const onLocalContentUrlChange = () => __awaiter(void 0, void 0, void 0, function* () {
132
+ if (localContentUrl === content.contentUrl)
133
+ return;
130
134
  setIsFetchingSolrSearch(true);
131
- yield updateContentTitleFromUrl(contentUrl);
135
+ yield updateContentTitleFromUrl(localContentUrl);
132
136
  setIsFetchingSolrSearch(false);
133
137
  });
134
138
  const onDelete = () => __awaiter(void 0, void 0, void 0, function* () {
@@ -221,6 +225,9 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
221
225
  setContentUrlIsValid(true);
222
226
  setIsAddingCategory(topContentDispatch, false);
223
227
  };
228
+ useDebounce(() => {
229
+ onLocalContentUrlChange();
230
+ }, [localContentUrl], 1000);
224
231
  useEffect(() => {
225
232
  if (isArrangingContent)
226
233
  setIsPreview(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/manage",
3
- "version": "2.1.40",
3
+ "version": "2.1.42",
4
4
  "description": "Customer Support Manage App",
5
5
  "author": "Jordan Eudy <jeudy100@gmail.com>",
6
6
  "homepage": "",
@@ -48,9 +48,6 @@
48
48
  "peerDependencies": {
49
49
  "@cee-eng/hydrajs": "4.16.43",
50
50
  "@patternfly/patternfly": "5.1.0",
51
- "@patternfly/pfe-accordion": "1.12.3",
52
- "@patternfly/pfe-collapse": "1.12.3",
53
- "@patternfly/pfe-tabs": "1.12.3",
54
51
  "@patternfly/react-core": "5.1.1",
55
52
  "@patternfly/react-table": "5.1.1",
56
53
  "i18next": ">=17.0.1",
@@ -68,7 +65,6 @@
68
65
  "@types/lodash": "^4.14.136",
69
66
  "@types/react": "^17.0.14",
70
67
  "@types/react-dom": "^17.0.9",
71
- "@types/react-i18next": "^8.1.0",
72
68
  "@types/react-router-dom": "^5.1.2",
73
69
  "i18next": "^19.0.1",
74
70
  "identity-obj-proxy": "^3.0.0",
@@ -79,17 +75,14 @@
79
75
  "dependencies": {
80
76
  "@cee-eng/hydrajs": "4.16.43",
81
77
  "@patternfly/patternfly": "5.1.0",
82
- "@patternfly/pfe-accordion": "1.12.3",
83
- "@patternfly/pfe-collapse": "1.12.3",
84
- "@patternfly/pfe-tabs": "1.12.3",
85
78
  "@patternfly/react-core": "5.1.1",
86
79
  "@patternfly/react-table": "5.1.1",
87
- "@rh-support/components": "2.1.30",
88
- "@rh-support/configs": "2.0.12",
89
- "@rh-support/react-context": "2.1.33",
80
+ "@rh-support/components": "2.1.31",
81
+ "@rh-support/configs": "2.0.14",
82
+ "@rh-support/react-context": "2.1.34",
90
83
  "@rh-support/types": "2.0.2",
91
- "@rh-support/user-permissions": "2.1.21",
92
- "@rh-support/utils": "2.1.14",
84
+ "@rh-support/user-permissions": "2.1.22",
85
+ "@rh-support/utils": "2.1.15",
93
86
  "@types/react-beautiful-dnd": "^13.0.0",
94
87
  "i18next": ">=17.0.1",
95
88
  "lodash": ">=4.17.15",
@@ -103,5 +96,5 @@
103
96
  "defaults and supports es6-module",
104
97
  "maintained node versions"
105
98
  ],
106
- "gitHead": "efb2ab1d301c4298a7011da7007a16b4ed025edd"
99
+ "gitHead": "0be2733af553431eb0064993df8c0f097e12a47f"
107
100
  }