@rh-support/components 2.5.178 → 2.5.182
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 +68 -89
- package/lib/esm/Table/TablePagination.d.ts +0 -1
- package/lib/esm/Table/TablePagination.d.ts.map +1 -1
- package/lib/esm/Table/TablePagination.js +1 -1
- package/lib/esm/TagsSelector/TagsSelector.d.ts.map +1 -1
- package/lib/esm/TagsSelector/TagsSelector.js +1 -1
- package/lib/esm/TagsSelector/tagSelector.css +34 -0
- package/lib/esm/helperFunctions/errorMessage.d.ts.map +1 -1
- package/package.json +4 -5
|
@@ -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;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,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,qBAwNlD;AAED,OAAO,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -7,15 +7,16 @@ 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 {
|
|
10
|
+
import { accounts } from '@cee-eng/hydrajs';
|
|
11
|
+
import { 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, useState } from 'react';
|
|
18
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
19
|
+
import { usePrevious } from '../hooks/usePrevious';
|
|
19
20
|
import { OwnerTypeaheadDropdown } from '../OwnerTypeaheadDropdown';
|
|
20
21
|
export const CONTACTS_PAGE_SIZE = 10;
|
|
21
22
|
export const DEFAULT_CONTACTS_OFFSET = CONTACTS_PAGE_SIZE - 1;
|
|
@@ -41,105 +42,82 @@ const getHydraContactLabel = (user) => {
|
|
|
41
42
|
return label ? label : '';
|
|
42
43
|
};
|
|
43
44
|
function CaseContactsSelectorExternal(props) {
|
|
44
|
-
const apolloClient = useApolloClient();
|
|
45
45
|
const { customEmails, contactSsoUsername, isInvalid, groupContactsAndEmails, selected } = props;
|
|
46
|
+
const previousSelectedAccountNumber = usePrevious(props.selectedAccountNumber);
|
|
46
47
|
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 */
|
|
47
52
|
const [contactList, setContactList] = useState(getApiResourceObject([]));
|
|
48
|
-
const
|
|
49
|
-
|
|
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
|
-
});
|
|
53
|
+
const controllerRef1 = useRef(new AbortController());
|
|
54
|
+
const controllerRef2 = useRef(new AbortController());
|
|
77
55
|
useEffect(() => {
|
|
78
|
-
|
|
79
|
-
const isNonOrgAdminSameAccount = loggedInUserRights.isExternal() && loggedInUserRights.isNonOrgAdminWithSameAccount(selectedAccountNumber);
|
|
80
|
-
if (isExportingPDF || !selectedAccountNumber || isNonOrgAdminSameAccount) {
|
|
56
|
+
if (props.isExportingPDF)
|
|
81
57
|
return;
|
|
82
|
-
|
|
83
|
-
let
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
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();
|
|
87
69
|
try {
|
|
70
|
+
setContactList(getApiResourceObject([], true));
|
|
88
71
|
let contactListTemp = [];
|
|
89
|
-
if (loggedInUserRights.isPartner() &&
|
|
90
|
-
loggedInUserRights.isAccountDifferentFromLoggedInAccount(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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);
|
|
94
80
|
contactListTemp = contacts.concat(extraLoggedInContacts);
|
|
95
81
|
}
|
|
96
82
|
else {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
]
|
|
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];
|
|
101
90
|
contactListTemp = [...selectedAccountsContacts, ...currentAccountsContacts];
|
|
102
91
|
}
|
|
103
92
|
}
|
|
104
93
|
else {
|
|
105
|
-
contactListTemp = yield
|
|
94
|
+
contactListTemp = yield accounts.getAccountContacts(props.selectedAccountNumber, controllerRef1.current.signal);
|
|
106
95
|
}
|
|
107
|
-
if (
|
|
108
|
-
|
|
96
|
+
if (props.contactsToExclude && props.contactsToExclude.length > 0) {
|
|
97
|
+
contactListTemp = differenceBy(contactListTemp, props.contactsToExclude, 'ssoUsername');
|
|
109
98
|
}
|
|
99
|
+
setContactList(getApiResourceObject(sortHydraContacts(contactListTemp)));
|
|
110
100
|
}
|
|
111
101
|
catch (e) {
|
|
112
|
-
|
|
113
|
-
setContactList(getApiResourceObject([], false, true, e.message));
|
|
114
|
-
}
|
|
102
|
+
isSubscribed && setContactList(getApiResourceObject([], false, true, e.message));
|
|
115
103
|
}
|
|
116
104
|
});
|
|
117
|
-
|
|
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();
|
|
118
111
|
return () => {
|
|
119
|
-
|
|
112
|
+
isSubscribed = false;
|
|
120
113
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
return;
|
|
129
|
-
const matchedContact = contactList.data.find((c) => { var _a, _b; return ((_a = c.ssoUsername) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = currentOwner.ssoUsername) === null || _b === void 0 ? void 0 : _b.toLowerCase()); });
|
|
130
|
-
if (matchedContact === null || matchedContact === void 0 ? void 0 : matchedContact.id) {
|
|
131
|
-
props.onChange && props.onChange([matchedContact]);
|
|
132
|
-
}
|
|
133
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
134
|
-
}, [contactList.data, contactList.isFetching]);
|
|
135
|
-
const displayedContacts = useMemo(() => {
|
|
136
|
-
var _a;
|
|
137
|
-
let contacts = (_a = contactList.data) !== null && _a !== void 0 ? _a : [];
|
|
138
|
-
if (props.contactsToExclude && props.contactsToExclude.length > 0) {
|
|
139
|
-
contacts = differenceBy(contacts, props.contactsToExclude, 'ssoUsername');
|
|
140
|
-
}
|
|
141
|
-
return contacts;
|
|
142
|
-
}, [contactList.data, props.contactsToExclude]);
|
|
114
|
+
}, [
|
|
115
|
+
previousSelectedAccountNumber,
|
|
116
|
+
props.contactsToExclude,
|
|
117
|
+
props.loggedInUserRights,
|
|
118
|
+
props.selectedAccountNumber,
|
|
119
|
+
props.isExportingPDF,
|
|
120
|
+
]);
|
|
143
121
|
const onCustomerContactSelect = (contacts) => {
|
|
144
122
|
if (!isArray(contacts))
|
|
145
123
|
return;
|
|
@@ -156,10 +134,11 @@ function CaseContactsSelectorExternal(props) {
|
|
|
156
134
|
];
|
|
157
135
|
props.onChange && props.onChange(customerContacts);
|
|
158
136
|
};
|
|
159
|
-
const
|
|
160
|
-
props.loggedInUserRights.isNonOrgAdminWithSameAccount(props.selectedAccountNumber)
|
|
161
|
-
|
|
162
|
-
|
|
137
|
+
const isDisabled = (props.loggedInUserRights.isExternal() &&
|
|
138
|
+
props.loggedInUserRights.isNonOrgAdminWithSameAccount(props.selectedAccountNumber)) ||
|
|
139
|
+
props.isUpdating ||
|
|
140
|
+
contactList.isFetching ||
|
|
141
|
+
props.isDisabled;
|
|
163
142
|
const getCustomEmails = useCallback(() => {
|
|
164
143
|
return sortBy((customEmails || []).map((item) => (Object.assign(Object.assign({}, item), { ssoUsername: item.emailAddress, firstName: item.emailAddress, lastName: item.emailAddress }))), 'emailAddress');
|
|
165
144
|
}, [customEmails]);
|
|
@@ -168,13 +147,13 @@ function CaseContactsSelectorExternal(props) {
|
|
|
168
147
|
*/
|
|
169
148
|
const allOptions = useMemo(() => {
|
|
170
149
|
return [
|
|
171
|
-
...map(
|
|
150
|
+
...map(contactList.data, (contact) => ({ contact, isCustomEmail: false })),
|
|
172
151
|
...map(getCustomEmails(), (email) => ({
|
|
173
152
|
isCustomEmail: true,
|
|
174
153
|
contact: Object.assign(Object.assign({}, email), { ssoUsername: email.emailAddress, firstName: email.emailAddress, lastName: email.emailAddress }),
|
|
175
154
|
})),
|
|
176
155
|
];
|
|
177
|
-
}, [
|
|
156
|
+
}, [contactList.data, getCustomEmails]);
|
|
178
157
|
/**
|
|
179
158
|
* update the shown options in the dropdown and reset the amount of options show to the default.
|
|
180
159
|
* @param query The user search term
|
|
@@ -194,7 +173,7 @@ function CaseContactsSelectorExternal(props) {
|
|
|
194
173
|
const onClearQuery = () => {
|
|
195
174
|
var _a;
|
|
196
175
|
const numOfCustomEmails = (_a = customEmails === null || customEmails === void 0 ? void 0 : customEmails.length) !== null && _a !== void 0 ? _a : 0;
|
|
197
|
-
if (filteredContacts.length ===
|
|
176
|
+
if (filteredContacts.length === contactList.data.length + numOfCustomEmails)
|
|
198
177
|
return;
|
|
199
178
|
setFilteredContacts(allOptions);
|
|
200
179
|
};
|
|
@@ -216,7 +195,7 @@ function CaseContactsSelectorExternal(props) {
|
|
|
216
195
|
*/
|
|
217
196
|
useEffect(() => {
|
|
218
197
|
setFilteredContacts(allOptions);
|
|
219
|
-
}, [
|
|
220
|
-
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:
|
|
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 }));
|
|
221
200
|
}
|
|
222
201
|
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;CAC9B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAgC5C"}
|
|
@@ -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,
|
|
20
|
+
return (React.createElement(Pagination, { itemCount: props.itemCount || (data || []).length, widgetId: "pagination-options-menu-top", perPage: perPage, page: currentPage, variant: props.variant, titles: {
|
|
21
21
|
paginationAriaLabel: props.variant === PaginationVariant.top ? 'Upper pagination' : 'Lower pagination',
|
|
22
22
|
}, onSetPage: onSetPage, onPerPageSelect: onPerPageSelect }));
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsSelector.d.ts","sourceRoot":"","sources":["../../../src/TagsSelector/TagsSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAmB3B,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,UAAU,MAAM;IACZ,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EACzB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,EAAE,EACF,SAAS,EACT,YAAiB,EACjB,QAAgB,GACnB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TagsSelector.d.ts","sourceRoot":"","sources":["../../../src/TagsSelector/TagsSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAmB3B,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,UAAU,MAAM;IACZ,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EACzB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,EAAE,EACF,SAAS,EACT,YAAiB,EACjB,QAAgB,GACnB,EAAE,MAAM,qBAiKR"}
|
|
@@ -64,7 +64,7 @@ export function TagsSelector({ tagOptions, onChange, placeholder, id, typeahead,
|
|
|
64
64
|
React.createElement(TextInputGroupUtilities, null, selected.length > 0 && (React.createElement(Button, { icon: React.createElement(TimesCircleIcon, { "aria-hidden": true }), variant: "plain", onClick: handleClear, "aria-label": "clear-all-tags" }))))) : (React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' }, alignItems: { default: 'alignItemsCenter' } },
|
|
65
65
|
React.createElement(FlexItem, null,
|
|
66
66
|
selectedChipGroup,
|
|
67
|
-
React.createElement("span",
|
|
67
|
+
isEmpty(selected) && React.createElement("span", null, placeholder || React.createElement(Trans, null, "Select a tag"))),
|
|
68
68
|
!isEmpty(selected) && (React.createElement(FlexItem, null,
|
|
69
69
|
React.createElement(Button, { icon: React.createElement(TimesCircleIcon, { "aria-hidden": true }), variant: "plain", onClick: handleClear, "aria-label": "clear-all-tags" })))))));
|
|
70
70
|
return (React.createElement(Select, { isOpen: isOpen, selected: selected, toggle: toggle, onSelect: (_, selection) => onSelect(selection), isScrollable: true, onOpenChange: () => setIsOpen(false), popperProps: { direction: 'down', enableFlip: false }, id: "tag-selector", variant: typeahead ? 'typeahead' : 'default' },
|
|
@@ -2,10 +2,44 @@
|
|
|
2
2
|
z-index: 89;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
.tags-selector-menu-toggle {
|
|
6
|
+
--tags-selector-toggle-padding-block: calc(
|
|
7
|
+
var(--pf-t--global--spacer--control--vertical--default) - var(--pf-t--global--border--width--200)
|
|
8
|
+
);
|
|
9
|
+
--tags-selector-chip-block-size: calc(
|
|
10
|
+
var(--pf-t--global--spacer--lg) + var(--pf-t--global--border--width--200) * 2
|
|
11
|
+
);
|
|
12
|
+
--tags-selector-toggle-block-size: calc(
|
|
13
|
+
var(--tags-selector-chip-block-size) + var(--tags-selector-toggle-padding-block) * 2
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
--pf-v6-c-menu-toggle--PaddingBlockStart: var(--tags-selector-toggle-padding-block);
|
|
17
|
+
--pf-v6-c-menu-toggle--PaddingBlockEnd: var(--tags-selector-toggle-padding-block);
|
|
18
|
+
block-size: var(--tags-selector-toggle-block-size);
|
|
19
|
+
max-block-size: var(--tags-selector-toggle-block-size);
|
|
20
|
+
}
|
|
21
|
+
|
|
5
22
|
.tags-selector-menu-toggle .pf-v6-c-menu-toggle__text {
|
|
6
23
|
width: 100%;
|
|
7
24
|
}
|
|
8
25
|
|
|
26
|
+
.tags-selector-menu-toggle .pf-v6-c-label-group__list {
|
|
27
|
+
--pf-v6-c-label-group__list--RowGap: 0;
|
|
28
|
+
align-items: center;
|
|
29
|
+
block-size: var(--tags-selector-chip-block-size);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.tags-selector-menu-toggle .pf-v6-c-label {
|
|
33
|
+
--pf-v6-c-label--PaddingBlockStart: 0;
|
|
34
|
+
--pf-v6-c-label--PaddingBlockEnd: 0;
|
|
35
|
+
line-height: var(--tags-selector-chip-block-size);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.tags-selector-menu-toggle .pf-v6-c-label__actions .pf-v6-c-button {
|
|
39
|
+
margin-block-start: 0;
|
|
40
|
+
margin-block-end: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
9
43
|
.tags-selector-menu-toggle .pf-v6-c-menu-toggle__controls {
|
|
10
44
|
padding-left: 0;
|
|
11
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessage.d.ts","sourceRoot":"","sources":["../../../src/helperFunctions/errorMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAS7B,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,SAAS;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACxC;
|
|
1
|
+
{"version":3,"file":"errorMessage.d.ts","sourceRoot":"","sources":["../../../src/helperFunctions/errorMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAS7B,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,SAAS;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACxC;AA8DD,iBAAS,wBAAwB,CAAC,KAAK,KAAA,EAAE,aAAa,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,GAAG,CAAC,OAAO,CA2CjH;AAED,iBAAS,iBAAiB,CAAC,KAAK,KAAA,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAa1F;AAED,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/components",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.182",
|
|
4
4
|
"description": "Contains all reusabel components for support app",
|
|
5
5
|
"author": "Vikas Rathee <vrathee@redhat.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"prepublishOnly": "npm run build"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@apollo/client": "^4.1.6",
|
|
44
43
|
"@cee-eng/hydrajs": "4.18.111",
|
|
45
44
|
"@cee-eng/ui-toolkit": "1.1.9",
|
|
46
45
|
"@patternfly/patternfly": "6.2.1",
|
|
@@ -64,8 +63,8 @@
|
|
|
64
63
|
"@patternfly/react-table": "6.2.1",
|
|
65
64
|
"@patternfly/react-tokens": "6.2.1",
|
|
66
65
|
"@rh-support/types": "2.0.26",
|
|
67
|
-
"@rh-support/user-permissions": "2.5.
|
|
68
|
-
"@rh-support/utils": "2.5.
|
|
66
|
+
"@rh-support/user-permissions": "2.5.128",
|
|
67
|
+
"@rh-support/utils": "2.5.92",
|
|
69
68
|
"dompurify": "^2.2.6",
|
|
70
69
|
"js-worker-search": "^1.4.1",
|
|
71
70
|
"lazysizes": "^5.3.2",
|
|
@@ -102,5 +101,5 @@
|
|
|
102
101
|
"defaults and supports es6-module",
|
|
103
102
|
"maintained node versions"
|
|
104
103
|
],
|
|
105
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "5a3a62786c13896575f6db3805b3a0dc0bd1299f"
|
|
106
105
|
}
|