@rh-support/components 2.5.165 → 2.5.167

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":"CaseContactsSelectorExternal.d.ts","sourceRoot":"","sources":["../../../src/Functional/CaseContactsSelectorExternal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAuB,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAQxD,OAAO,KAA4D,MAAM,OAAO,CAAC;AAIjF,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AAEzF,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,0BAA0B,CAAC;AACzE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,GAAG,0BAA0B,CAAC,EAAE,CAAC;IACpD,QAAQ,EAAE,CAAC,gBAAgB,EAAE,CAAC,QAAQ,GAAG,0BAA0B,CAAC,EAAE,KAAK,IAAI,CAAC;IAChF,kBAAkB,EAAE,QAAQ,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,MAAM,KAAA,EAAE,KAAK,KAAA,EAAE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,EAAE,MAAM,KAAK,MAAM,CAAC;CAChD;AAED,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,eAAO,MAAM,uBAAuB,QAAyB,CAAC;AAE9D,eAAO,MAAM,oBAAoB,GAAI,MAAM,oBAAoB,KAAG,IAAI,IAAI,0BAEzE,CAAC;AAMF,QAAA,MAAM,oBAAoB,GAAI,MAAM,oBAAoB,KAAG,MAa1D,CAAC;AAEF,iBAAS,4BAA4B,CAAC,KAAK,EAAE,MAAM,qBA8NlD;AAED,OAAO,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,CAAC"}
@@ -7,16 +7,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { accounts } from '@cee-eng/hydrajs';
11
- import { getApiResourceObject, isEmailValid, sortHydraContacts } from '@rh-support/utils';
10
+ import { useApolloClient } from '@apollo/client/react';
11
+ import { GET_ACCOUNT_CONTACTS, getApiResourceObject, isEmailValid, sortHydraContacts, } from '@rh-support/utils';
12
12
  import differenceBy from 'lodash/differenceBy';
13
13
  import filter from 'lodash/filter';
14
14
  import isArray from 'lodash/isArray';
15
15
  import isEmpty from 'lodash/isEmpty';
16
16
  import map from 'lodash/map';
17
17
  import sortBy from 'lodash/sortBy';
18
- import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
19
- import { usePrevious } from '../hooks/usePrevious';
18
+ import React, { useCallback, useEffect, useMemo, useState } from 'react';
20
19
  import { OwnerTypeaheadDropdown } from '../OwnerTypeaheadDropdown';
21
20
  export const CONTACTS_PAGE_SIZE = 10;
22
21
  export const DEFAULT_CONTACTS_OFFSET = CONTACTS_PAGE_SIZE - 1;
@@ -42,82 +41,93 @@ const getHydraContactLabel = (user) => {
42
41
  return label ? label : '';
43
42
  };
44
43
  function CaseContactsSelectorExternal(props) {
44
+ const apolloClient = useApolloClient();
45
45
  const { customEmails, contactSsoUsername, isInvalid, groupContactsAndEmails, selected } = props;
46
- const previousSelectedAccountNumber = usePrevious(props.selectedAccountNumber);
47
46
  const [filteredContacts, setFilteredContacts] = useState([]);
48
- /**
49
- * External owner selector related
50
- */
51
- /** Getting user list for selected account when logged in user is a external */
52
47
  const [contactList, setContactList] = useState(getApiResourceObject([]));
53
- const controllerRef1 = useRef(new AbortController());
54
- const controllerRef2 = useRef(new AbortController());
48
+ const fetchContactsViaGraphQL = (accountNumber) => __awaiter(this, void 0, void 0, function* () {
49
+ var _a, _b, _c, _d, _e, _f, _g, _h;
50
+ const { data } = yield apolloClient.query({
51
+ query: GET_ACCOUNT_CONTACTS,
52
+ variables: {
53
+ accountNumber: { eq: accountNumber },
54
+ first: 200,
55
+ orderBy: { Name: { order: 'ASC' } },
56
+ },
57
+ });
58
+ const response = data;
59
+ const contactEdges = (_h = (_g = (_f = (_e = (_d = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.salesforce_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.SalesforceSupportAccount) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.node) === null || _f === void 0 ? void 0 : _f.Contacts) === null || _g === void 0 ? void 0 : _g.edges) !== null && _h !== void 0 ? _h : [];
60
+ return contactEdges
61
+ .filter(({ node }) => { var _a, _b, _c; return ((_a = node.SSOUserName__c) === null || _a === void 0 ? void 0 : _a.value) && ((_c = (_b = node.IsActive__c) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : true); })
62
+ .map(({ node }) => {
63
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
64
+ return ({
65
+ id: node.Id,
66
+ ssoUsername: node.SSOUserName__c.value,
67
+ firstName: (_b = (_a = node.FirstName) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '',
68
+ lastName: (_d = (_c = node.LastName) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : '',
69
+ fullNameCustom: (_f = (_e = node.Name) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : '',
70
+ manageSupportCases: (_h = (_g = node.ManageSupportCases__c) === null || _g === void 0 ? void 0 : _g.value) !== null && _h !== void 0 ? _h : true,
71
+ isInternal: (_k = (_j = node.IsInternal__c) === null || _j === void 0 ? void 0 : _j.value) !== null && _k !== void 0 ? _k : false,
72
+ isOrgAdmin: (_m = (_l = node.IsOrgAdmin__c) === null || _l === void 0 ? void 0 : _l.value) !== null && _m !== void 0 ? _m : false,
73
+ accountNumber,
74
+ });
75
+ });
76
+ });
55
77
  useEffect(() => {
56
- if (props.isExportingPDF)
78
+ const { selectedAccountNumber, loggedInUserRights, isExportingPDF } = props;
79
+ const isNonOrgAdminSameAccount = loggedInUserRights.isExternal() && loggedInUserRights.isNonOrgAdminWithSameAccount(selectedAccountNumber);
80
+ if (isExportingPDF || !selectedAccountNumber || isNonOrgAdminSameAccount) {
57
81
  return;
58
- // when component is unmonted and error happens after apis responses are ready, we use this variable to prevent state update.
59
- let isSubscribed = true;
60
- const fetchStrataAccountUsers = () => __awaiter(this, void 0, void 0, function* () {
61
- if (controllerRef1.current) {
62
- controllerRef1.current.abort();
63
- }
64
- controllerRef1.current = new AbortController();
65
- if (controllerRef2.current) {
66
- controllerRef2.current.abort();
67
- }
68
- controllerRef2.current = new AbortController();
82
+ }
83
+ let cancelled = false;
84
+ const accountNumberAtFetch = selectedAccountNumber;
85
+ const fetchAccountContacts = () => __awaiter(this, void 0, void 0, function* () {
86
+ setContactList(getApiResourceObject([], true));
69
87
  try {
70
- setContactList(getApiResourceObject([], true));
71
88
  let contactListTemp = [];
72
- if (props.loggedInUserRights.isPartner() &&
73
- props.loggedInUserRights.isAccountDifferentFromLoggedInAccount(props.selectedAccountNumber)) {
74
- /** Show Partner contacts even when customer account is selected
75
- - Non Org-Admin partners => Only logged in contact + All Customer contacts
76
- - Org-Admin partners => All partner contacts + All Customer contacts */
77
- if (props.loggedInUserRights.isNonOrgAdmin()) {
78
- const extraLoggedInContacts = props.loggedInUserRights.getHydraContactFromLoggedInUser();
79
- const contacts = yield accounts.getAccountContacts(props.selectedAccountNumber, controllerRef1.current.signal);
89
+ if (loggedInUserRights.isPartner() &&
90
+ loggedInUserRights.isAccountDifferentFromLoggedInAccount(accountNumberAtFetch)) {
91
+ if (loggedInUserRights.isNonOrgAdmin()) {
92
+ const extraLoggedInContacts = loggedInUserRights.getHydraContactFromLoggedInUser();
93
+ const contacts = yield fetchContactsViaGraphQL(accountNumberAtFetch);
80
94
  contactListTemp = contacts.concat(extraLoggedInContacts);
81
95
  }
82
96
  else {
83
- let promiseArray = [
84
- accounts.getAccountContacts(props.selectedAccountNumber, controllerRef1.current.signal),
85
- accounts.getAccountContacts(props.loggedInUserRights.getAccountNumber(), controllerRef2.current.signal),
86
- ];
87
- const loggedInContactsResponse = yield Promise.all(promiseArray);
88
- const selectedAccountsContacts = loggedInContactsResponse[0];
89
- const currentAccountsContacts = loggedInContactsResponse[1];
97
+ const [selectedAccountsContacts, currentAccountsContacts] = yield Promise.all([
98
+ fetchContactsViaGraphQL(accountNumberAtFetch),
99
+ fetchContactsViaGraphQL(loggedInUserRights.getAccountNumber()),
100
+ ]);
90
101
  contactListTemp = [...selectedAccountsContacts, ...currentAccountsContacts];
91
102
  }
92
103
  }
93
104
  else {
94
- contactListTemp = yield accounts.getAccountContacts(props.selectedAccountNumber, controllerRef1.current.signal);
105
+ contactListTemp = yield fetchContactsViaGraphQL(accountNumberAtFetch);
95
106
  }
96
- if (props.contactsToExclude && props.contactsToExclude.length > 0) {
97
- contactListTemp = differenceBy(contactListTemp, props.contactsToExclude, 'ssoUsername');
107
+ if (!cancelled) {
108
+ setContactList(getApiResourceObject(sortHydraContacts(contactListTemp)));
98
109
  }
99
- setContactList(getApiResourceObject(sortHydraContacts(contactListTemp)));
100
110
  }
101
111
  catch (e) {
102
- isSubscribed && setContactList(getApiResourceObject([], false, true, e.message));
112
+ if (!cancelled) {
113
+ setContactList(getApiResourceObject([], false, true, e.message));
114
+ }
103
115
  }
104
116
  });
105
- const isOldAccountNumber = props.selectedAccountNumber && props.selectedAccountNumber === previousSelectedAccountNumber;
106
- if (isOldAccountNumber ||
107
- (props.loggedInUserRights.isExternal() &&
108
- props.loggedInUserRights.isNonOrgAdminWithSameAccount(props.selectedAccountNumber)))
109
- return;
110
- fetchStrataAccountUsers();
117
+ fetchAccountContacts();
111
118
  return () => {
112
- isSubscribed = false;
119
+ cancelled = true;
113
120
  };
114
- }, [
115
- previousSelectedAccountNumber,
116
- props.contactsToExclude,
117
- props.loggedInUserRights,
118
- props.selectedAccountNumber,
119
- props.isExportingPDF,
120
- ]);
121
+ // eslint-disable-next-line react-hooks/exhaustive-deps
122
+ }, [apolloClient, props.selectedAccountNumber, props.isExportingPDF]);
123
+ const displayedContacts = useMemo(() => {
124
+ var _a;
125
+ let contacts = (_a = contactList.data) !== null && _a !== void 0 ? _a : [];
126
+ if (props.contactsToExclude && props.contactsToExclude.length > 0) {
127
+ contacts = differenceBy(contacts, props.contactsToExclude, 'ssoUsername');
128
+ }
129
+ return contacts;
130
+ }, [contactList.data, props.contactsToExclude]);
121
131
  const onCustomerContactSelect = (contacts) => {
122
132
  if (!isArray(contacts))
123
133
  return;
@@ -134,11 +144,10 @@ function CaseContactsSelectorExternal(props) {
134
144
  ];
135
145
  props.onChange && props.onChange(customerContacts);
136
146
  };
137
- const isDisabled = (props.loggedInUserRights.isExternal() &&
138
- props.loggedInUserRights.isNonOrgAdminWithSameAccount(props.selectedAccountNumber)) ||
139
- props.isUpdating ||
140
- contactList.isFetching ||
141
- props.isDisabled;
147
+ const isNonOrgAdminSameAccountDisabled = props.loggedInUserRights.isExternal() &&
148
+ props.loggedInUserRights.isNonOrgAdminWithSameAccount(props.selectedAccountNumber);
149
+ const isDisabled = isNonOrgAdminSameAccountDisabled || props.isUpdating || contactList.isFetching || props.isDisabled;
150
+ const isLoading = props.isUpdating || contactList.isFetching;
142
151
  const getCustomEmails = useCallback(() => {
143
152
  return sortBy((customEmails || []).map((item) => (Object.assign(Object.assign({}, item), { ssoUsername: item.emailAddress, firstName: item.emailAddress, lastName: item.emailAddress }))), 'emailAddress');
144
153
  }, [customEmails]);
@@ -147,13 +156,13 @@ function CaseContactsSelectorExternal(props) {
147
156
  */
148
157
  const allOptions = useMemo(() => {
149
158
  return [
150
- ...map(contactList.data, (contact) => ({ contact, isCustomEmail: false })),
159
+ ...map(displayedContacts, (contact) => ({ contact, isCustomEmail: false })),
151
160
  ...map(getCustomEmails(), (email) => ({
152
161
  isCustomEmail: true,
153
162
  contact: Object.assign(Object.assign({}, email), { ssoUsername: email.emailAddress, firstName: email.emailAddress, lastName: email.emailAddress }),
154
163
  })),
155
164
  ];
156
- }, [contactList.data, getCustomEmails]);
165
+ }, [displayedContacts, getCustomEmails]);
157
166
  /**
158
167
  * update the shown options in the dropdown and reset the amount of options show to the default.
159
168
  * @param query The user search term
@@ -173,7 +182,7 @@ function CaseContactsSelectorExternal(props) {
173
182
  const onClearQuery = () => {
174
183
  var _a;
175
184
  const numOfCustomEmails = (_a = customEmails === null || customEmails === void 0 ? void 0 : customEmails.length) !== null && _a !== void 0 ? _a : 0;
176
- if (filteredContacts.length === contactList.data.length + numOfCustomEmails)
185
+ if (filteredContacts.length === displayedContacts.length + numOfCustomEmails)
177
186
  return;
178
187
  setFilteredContacts(allOptions);
179
188
  };
@@ -195,7 +204,7 @@ function CaseContactsSelectorExternal(props) {
195
204
  */
196
205
  useEffect(() => {
197
206
  setFilteredContacts(allOptions);
198
- }, [contactList.data, customEmails, allOptions, selected]);
199
- return (React.createElement(OwnerTypeaheadDropdown, { id: props.id || '', hasClearButton: true, multiple: !!props.multiple, contactSsoUsername: contactSsoUsername, groupContactsAndEmails: groupContactsAndEmails, selected: !isEmpty(props.selected) ? props.selected : [], options: filteredContacts, placeholder: props.placeholder || 'Search by name or username', "data-tracking-id": "external-case-contact-selector", isDisabled: isDisabled, status: isInvalid ? 'danger' : undefined, onChipRemoved: onChipRemoved, onClearQuery: onClearQuery, onQueryUpdated: onQueryUpdated, onSelect: onCustomerContactSelect, canAddNew: canAddNew, getCreateNewText: props === null || props === void 0 ? void 0 : props.getCreateNewText, isLoading: props.isUpdating || contactList.isFetching }));
207
+ }, [displayedContacts, customEmails, allOptions, selected]);
208
+ return (React.createElement(OwnerTypeaheadDropdown, { id: props.id || '', hasClearButton: true, multiple: !!props.multiple, contactSsoUsername: contactSsoUsername, groupContactsAndEmails: groupContactsAndEmails, selected: !isEmpty(props.selected) ? props.selected : [], options: filteredContacts, placeholder: props.placeholder || 'Search by name or username', "data-tracking-id": "external-case-contact-selector", isDisabled: isDisabled, status: isInvalid ? 'danger' : undefined, onChipRemoved: onChipRemoved, onClearQuery: onClearQuery, onQueryUpdated: onQueryUpdated, onSelect: onCustomerContactSelect, canAddNew: canAddNew, getCreateNewText: props === null || props === void 0 ? void 0 : props.getCreateNewText, isLoading: isLoading }));
200
209
  }
201
210
  export { CaseContactsSelectorExternal, getHydraContactLabel };
@@ -13,6 +13,7 @@ interface IProps {
13
13
  perPage?: number;
14
14
  currentPage?: number;
15
15
  variant: PaginationVariant;
16
+ isCompact?: boolean;
16
17
  }
17
18
  export declare function TablePagination(props: IProps): React.JSX.Element;
18
19
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../../src/Table/TablePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;KAAA,KAAK,IAAI,CAAC;IAChD,eAAe,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;KAAA,KAAK,IAAI,CAAC;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,iBAAiB,CAAC;CAC9B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAgC5C"}
1
+ {"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../../src/Table/TablePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;KAAA,KAAK,IAAI,CAAC;IAChD,eAAe,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;KAAA,KAAK,IAAI,CAAC;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAiC5C"}
@@ -17,7 +17,7 @@ export function TablePagination(props) {
17
17
  props.currentPage && props.currentPage !== currentPage && setSelectedPage(props.currentPage);
18
18
  // eslint-disable-next-line react-hooks/exhaustive-deps
19
19
  }, [props.perPage, props.currentPage]);
20
- return (React.createElement(Pagination, { itemCount: props.itemCount || (data || []).length, widgetId: "pagination-options-menu-top", perPage: perPage, page: currentPage, variant: props.variant, titles: {
20
+ return (React.createElement(Pagination, { itemCount: props.itemCount || (data || []).length, widgetId: "pagination-options-menu-top", perPage: perPage, page: currentPage, variant: props.variant, isCompact: props.isCompact, titles: {
21
21
  paginationAriaLabel: props.variant === PaginationVariant.top ? 'Upper pagination' : 'Lower pagination',
22
22
  }, onSetPage: onSetPage, onPerPageSelect: onPerPageSelect }));
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/components",
3
- "version": "2.5.165",
3
+ "version": "2.5.167",
4
4
  "description": "Contains all reusabel components for support app",
5
5
  "author": "Vikas Rathee <vrathee@redhat.com>",
6
6
  "license": "ISC",
@@ -40,6 +40,7 @@
40
40
  "prepublishOnly": "npm run build"
41
41
  },
42
42
  "peerDependencies": {
43
+ "@apollo/client": "^4.1.6",
43
44
  "@cee-eng/hydrajs": "4.18.111",
44
45
  "@cee-eng/ui-toolkit": "1.1.9",
45
46
  "@patternfly/patternfly": "6.2.1",
@@ -63,8 +64,8 @@
63
64
  "@patternfly/react-table": "6.2.1",
64
65
  "@patternfly/react-tokens": "6.2.1",
65
66
  "@rh-support/types": "2.0.26",
66
- "@rh-support/user-permissions": "2.5.111",
67
- "@rh-support/utils": "2.5.92",
67
+ "@rh-support/user-permissions": "2.5.113",
68
+ "@rh-support/utils": "2.5.94",
68
69
  "dompurify": "^2.2.6",
69
70
  "js-worker-search": "^1.4.1",
70
71
  "lazysizes": "^5.3.2",
@@ -101,5 +102,5 @@
101
102
  "defaults and supports es6-module",
102
103
  "maintained node versions"
103
104
  ],
104
- "gitHead": "cc12fc4b7c5430b59628fc97568ca31af1e3c6bc"
105
+ "gitHead": "d90bcae55659cc70cbdb3669350dece45850d568"
105
106
  }