@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.
- package/lib/esm/Functional/CaseContactsSelectorExternal.d.ts.map +1 -1
- package/lib/esm/Functional/CaseContactsSelectorExternal.js +77 -68
- package/lib/esm/Table/TablePagination.d.ts +1 -0
- package/lib/esm/Table/TablePagination.d.ts.map +1 -1
- package/lib/esm/Table/TablePagination.js +1 -1
- package/package.json +5 -4
|
@@ -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;
|
|
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;AAcxD,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,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,GAAG,KAAA,KAAK,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAC/D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,6BAA6B,EAAE,CAAC;IAC/C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,+BAA+B,EAAE,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACnF,gBAAgB,CAAC,EAAE,CAAC,KAAK,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 {
|
|
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,
|
|
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
|
|
54
|
-
|
|
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
|
-
|
|
78
|
+
const { selectedAccountNumber, loggedInUserRights, isExportingPDF } = props;
|
|
79
|
+
const isNonOrgAdminSameAccount = loggedInUserRights.isExternal() && loggedInUserRights.isNonOrgAdminWithSameAccount(selectedAccountNumber);
|
|
80
|
+
if (isExportingPDF || !selectedAccountNumber || isNonOrgAdminSameAccount) {
|
|
57
81
|
return;
|
|
58
|
-
|
|
59
|
-
let
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
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 (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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
|
|
105
|
+
contactListTemp = yield fetchContactsViaGraphQL(accountNumberAtFetch);
|
|
95
106
|
}
|
|
96
|
-
if (
|
|
97
|
-
|
|
107
|
+
if (!cancelled) {
|
|
108
|
+
setContactList(getApiResourceObject(sortHydraContacts(contactListTemp)));
|
|
98
109
|
}
|
|
99
|
-
setContactList(getApiResourceObject(sortHydraContacts(contactListTemp)));
|
|
100
110
|
}
|
|
101
111
|
catch (e) {
|
|
102
|
-
|
|
112
|
+
if (!cancelled) {
|
|
113
|
+
setContactList(getApiResourceObject([], false, true, e.message));
|
|
114
|
+
}
|
|
103
115
|
}
|
|
104
116
|
});
|
|
105
|
-
|
|
106
|
-
if (isOldAccountNumber ||
|
|
107
|
-
(props.loggedInUserRights.isExternal() &&
|
|
108
|
-
props.loggedInUserRights.isNonOrgAdminWithSameAccount(props.selectedAccountNumber)))
|
|
109
|
-
return;
|
|
110
|
-
fetchStrataAccountUsers();
|
|
117
|
+
fetchAccountContacts();
|
|
111
118
|
return () => {
|
|
112
|
-
|
|
119
|
+
cancelled = true;
|
|
113
120
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
props.
|
|
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
|
|
138
|
-
props.loggedInUserRights.isNonOrgAdminWithSameAccount(props.selectedAccountNumber)
|
|
139
|
-
|
|
140
|
-
|
|
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(
|
|
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
|
-
}, [
|
|
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 ===
|
|
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
|
-
}, [
|
|
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:
|
|
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 };
|
|
@@ -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;
|
|
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.
|
|
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.
|
|
67
|
-
"@rh-support/utils": "2.5.
|
|
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": "
|
|
105
|
+
"gitHead": "d90bcae55659cc70cbdb3669350dece45850d568"
|
|
105
106
|
}
|