@rh-support/cases 2.6.13 → 2.6.15
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/components/case-list/case-list-filters/AccountsBookmarkedGroupFilter.js +1 -1
- package/lib/esm/components/case-list/case-list-filters/CreatorSsoNameFilter.js +1 -1
- package/lib/esm/components/case-list/case-list-filters/InternalSsoNameFilter.js +1 -1
- package/lib/esm/components/case-list/case-list-filters/ProductsFilter.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/ProductsFilter.js +3 -11
- package/lib/esm/utils/constants.d.ts +18 -18
- package/lib/esm/utils/constants.d.ts.map +1 -1
- package/lib/esm/utils/constants.js +54 -18
- package/package.json +4 -4
|
@@ -109,6 +109,6 @@ export function AccountsBookmarkedGroupFilter(props) {
|
|
|
109
109
|
setIsOpen(true);
|
|
110
110
|
}, autoComplete: "off", placeholder: getDropdownBtnPlaceholder(t(canAccessManagedAccounts ? 'Select an account' : 'Search for a bookmark'), canAccessManagedAccounts ? selectedAccounts : selectedBookmarks, '', dropdownOptions.length, canAccessManagedAccounts ? t('All accounts selected') : t('All bookmarks selected')), role: "combobox", isExpanded: isOpen, "aria-controls": "bookmark-account-select-listbox" }))));
|
|
111
111
|
return (React.createElement("div", { className: "pf-v6-c-select" },
|
|
112
|
-
React.createElement("label", { htmlFor: "case-list-account-filter", className: "case-list-account-filter-label" }, canAccessManagedAccounts ? t('Accounts') :
|
|
112
|
+
React.createElement("label", { htmlFor: "case-list-account-filter", className: "case-list-account-filter-label" }, canAccessManagedAccounts ? t('Accounts') : filterNamesMap[SolrKeys.accountNumber]),
|
|
113
113
|
React.createElement(Select, { shouldFocusToggleOnSelect: true, shouldPreventScrollOnItemFocus: true, toggle: toggle, onSelect: onBookmarksSelect, isOpen: isOpen, onOpenChange: (nextOpen) => setIsOpen(nextOpen), "data-tracking-id": "accounts-filter", id: "case-list-account-filter", isScrollable: true, popperProps: { direction: 'down', enableFlip: false } }, bookmarkedAccountsOptions)));
|
|
114
114
|
}
|
|
@@ -214,6 +214,6 @@ export function CreatorSsoNameFilter() {
|
|
|
214
214
|
return (React.createElement("div", null,
|
|
215
215
|
React.createElement("label", { htmlFor: "case-list-username-filter", className: "case-list-username-filter-label" },
|
|
216
216
|
React.createElement(Trans, null, filterNamesMap['usernameFilterTitle'])),
|
|
217
|
-
!loggedInUserRights.data.isInternal() ? (React.createElement(Select, { shouldFocusToggleOnSelect: true, shouldPreventScrollOnItemFocus: true, id: "external-ssousername-filter", "data-tracking-id": "external-ssousername-filter", isOpen: isExternalOpen, onOpenChange: () => setIsExternalOpen(false), toggle: isExternalNonOrgAdmin ? customToggle : externalToggle, popperProps: { direction: 'down', enableFlip: false, maxWidth: '
|
|
217
|
+
!loggedInUserRights.data.isInternal() ? (React.createElement(Select, { shouldFocusToggleOnSelect: true, shouldPreventScrollOnItemFocus: true, id: "external-ssousername-filter", "data-tracking-id": "external-ssousername-filter", isOpen: isExternalOpen, onOpenChange: () => setIsExternalOpen(false), toggle: isExternalNonOrgAdmin ? customToggle : externalToggle, popperProps: { direction: 'down', enableFlip: false, maxWidth: '30rem' }, isScrollable: true, onSelect: (_e, v) => onSelectExternal(v) },
|
|
218
218
|
React.createElement(SelectList, null, filteredExternalList))) : (React.createElement(InternalSsoNameFilter, null))));
|
|
219
219
|
}
|
|
@@ -201,6 +201,6 @@ export default function InternalSsoNameFilter() {
|
|
|
201
201
|
React.createElement(TextInputGroup, { isPlain: true },
|
|
202
202
|
React.createElement(TextInputGroupMain, { value: internalQuery, onClick: onInternalToggle, onKeyDown: onInputKeyDown, placeholder: getDropdownBtnPlaceholder(t('Search for a name'), selectedInternalContacts.map((i) => i.label), ' ', filteredInternalList.length, t('All selected')), onChange: onInternalQueryChange, isExpanded: isInternalOpen, innerRef: internalInputRef, "aria-controls": "internal-ssousername-filter", role: "combobox" }),
|
|
203
203
|
React.createElement(TextInputGroupUtilities, null, !isEmpty(internalQuery) && (React.createElement(Button, { icon: isFetchingInternalContacts ? (React.createElement(LoadingIndicator, { show: true, size: "sm" })) : (React.createElement(TimesCircleIcon, { "aria-hidden": true })), variant: "plain", onClick: () => setInternalQuery(''), isDisabled: isFetchingInternalContacts, "aria-label": t('Clear') }))))));
|
|
204
|
-
return (React.createElement(Select, { shouldFocusToggleOnSelect: true, shouldPreventScrollOnItemFocus: true, id: "internal-ssousername-filter", "data-tracking-id": "internal-ssousername-filter", isOpen: isInternalOpen, onOpenChange: () => setIsInternalOpen(false), toggle: internalToggle, popperProps: { direction: 'down', enableFlip: false, maxWidth: '
|
|
204
|
+
return (React.createElement(Select, { shouldFocusToggleOnSelect: true, shouldPreventScrollOnItemFocus: true, id: "internal-ssousername-filter", "data-tracking-id": "internal-ssousername-filter", isOpen: isInternalOpen, onOpenChange: () => setIsInternalOpen(false), toggle: internalToggle, popperProps: { direction: 'down', enableFlip: false, maxWidth: '30rem' }, isScrollable: true, onSelect: (_e, v) => onSelectInternal(v) },
|
|
205
205
|
React.createElement(SelectList, null, filteredInternalList)));
|
|
206
206
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/ProductsFilter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductsFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/ProductsFilter.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAI1D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,UAAU,MAAM;IACZ,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBA+O3C"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
1
|
+
import { MenuToggle, Select, SelectList, SelectOption, TextInputGroup, TextInputGroupMain, } from '@patternfly/react-core';
|
|
3
2
|
import { SingleSelectDropdown, useSelectKeyboardNavigator } from '@rh-support/components';
|
|
4
3
|
import { getDropdownBtnPlaceholder } from '@rh-support/utils';
|
|
5
4
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -80,11 +79,6 @@ export function ProductsFilter(props) {
|
|
|
80
79
|
const onToggleClick = (e) => {
|
|
81
80
|
setIsOpen(!isOpen);
|
|
82
81
|
};
|
|
83
|
-
const onClick = () => {
|
|
84
|
-
var _a;
|
|
85
|
-
setInputValue('');
|
|
86
|
-
(_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
87
|
-
};
|
|
88
82
|
const getFilteredOptions = () => {
|
|
89
83
|
if (!inputValue)
|
|
90
84
|
return productOptions;
|
|
@@ -116,9 +110,7 @@ export function ProductsFilter(props) {
|
|
|
116
110
|
: getDropdownBtnPlaceholder(t('Select a product'), ((_f = filterInfo === null || filterInfo === void 0 ? void 0 : filterInfo[SolrPivotKeys.product_version]) === null || _f === void 0 ? void 0 : _f.map((i) => i.value)) || [], '', props.filterValues.length, t('All selected'));
|
|
117
111
|
const toggleForMultiSelect = (toggleRef) => (React.createElement(MenuToggle, { variant: "typeahead", onClick: onToggleClick, innerRef: toggleRef, isExpanded: isOpen, isFullWidth: true },
|
|
118
112
|
React.createElement(TextInputGroup, { isPlain: true },
|
|
119
|
-
React.createElement(TextInputGroupMain, Object.assign({ value: inputValue, onClick: onToggleClick, onChange: onTextInputChange, onKeyDown: onInputKeyDown, id: "multi-typeahead-product-filter-input", autoComplete: "off", innerRef: textInputRef, placeholder: placeholder }, (activeItem && { 'aria-activedescendant': activeItem }), { role: "combobox", isExpanded: isOpen, "aria-controls": "select-multi-typeahead-product-listbox" }))
|
|
120
|
-
Object.keys(selectedItems).filter((key) => selectedItems[key] === true).length > 0 && (React.createElement(TextInputGroupUtilities, null,
|
|
121
|
-
React.createElement(Button, { icon: React.createElement(TimesIcon, { "aria-hidden": true }), variant: "plain", onClick: onClick, "aria-label": "Clear input value" }))))));
|
|
113
|
+
React.createElement(TextInputGroupMain, Object.assign({ value: inputValue, onClick: onToggleClick, onChange: onTextInputChange, onKeyDown: onInputKeyDown, id: "multi-typeahead-product-filter-input", autoComplete: "off", innerRef: textInputRef, placeholder: placeholder }, (activeItem && { 'aria-activedescendant': activeItem }), { role: "combobox", isExpanded: isOpen, "aria-controls": "select-multi-typeahead-product-listbox" })))));
|
|
122
114
|
useEffect(() => {
|
|
123
115
|
let newSelectOptions = productOptions;
|
|
124
116
|
if (inputValue) {
|
|
@@ -157,6 +149,6 @@ export function ProductsFilter(props) {
|
|
|
157
149
|
};
|
|
158
150
|
return (React.createElement("div", { className: "product-filter" },
|
|
159
151
|
React.createElement("label", { htmlFor: "case-list-products-filter", className: "pf-v6-u-mb-sm products-filter-label" }, t(filterNamesMap[SolrKeys.product])),
|
|
160
|
-
isSolrSearchDown ? (React.createElement(SingleSelectDropdown, { id: "case-list-products-filter", selected: selectedOption, options: singleSelectOptions, placeholder: allProducts.length > 0 ? t('Select a product') : t('No products available'), onSelect: (options) => onSingleSelectChange(options[0]), dataTrackingId: "products-filter", isScrollable: true, isDisabled: allProducts.length === 0 })) : (React.createElement(Select, { shouldFocusToggleOnSelect: true, shouldPreventScrollOnItemFocus: true, id: "case-list-products-filter", "data-tracking-id": "products-filter", isOpen: isOpen, selected: selectedItems, onSelect: (_e, v) => onSelect(v), onOpenChange: (nextOpen) => setIsOpen(nextOpen), toggle: toggleForMultiSelect, isScrollable: true, popperProps: { direction: 'down', enableFlip: false } },
|
|
152
|
+
isSolrSearchDown ? (React.createElement(SingleSelectDropdown, { id: "case-list-products-filter", selected: selectedOption, options: singleSelectOptions, placeholder: allProducts.length > 0 ? t('Select a product') : t('No products available'), onSelect: (options) => onSingleSelectChange(options[0]), dataTrackingId: "products-filter", isScrollable: true, isDisabled: allProducts.length === 0 })) : (React.createElement(Select, { shouldFocusToggleOnSelect: true, shouldPreventScrollOnItemFocus: true, id: "case-list-products-filter", "data-tracking-id": "products-filter", isOpen: isOpen, selected: selectedItems, onSelect: (_e, v) => onSelect(v), onOpenChange: (nextOpen) => setIsOpen(nextOpen), toggle: toggleForMultiSelect, isScrollable: true, popperProps: { direction: 'down', enableFlip: false, maxWidth: '30rem' } },
|
|
161
153
|
React.createElement(SelectList, null, renderOptions())))));
|
|
162
154
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
export declare const filterNamesMap: {
|
|
2
|
-
case_status: string;
|
|
3
|
-
case_severity: string;
|
|
4
|
-
case_folderNumber: string;
|
|
5
|
-
case_accountNumber: string;
|
|
6
|
-
case_summary: string;
|
|
7
|
-
case_customer_escalation: string;
|
|
8
|
-
case_contactName: string;
|
|
9
|
-
case_product: string;
|
|
10
|
-
case_version: string;
|
|
11
|
-
case_createdByName: string;
|
|
12
|
-
case_createdDate: string;
|
|
13
|
-
case_lastModifiedByName: string;
|
|
14
|
-
uri: string;
|
|
15
|
-
case_number: string;
|
|
16
|
-
case_createdby_sso_username: string;
|
|
17
|
-
case_contact_sso_username: string;
|
|
18
|
-
case_type: string;
|
|
19
|
-
usernameFilterTitle: string;
|
|
2
|
+
readonly case_status: string;
|
|
3
|
+
readonly case_severity: string;
|
|
4
|
+
readonly case_folderNumber: string;
|
|
5
|
+
readonly case_accountNumber: string;
|
|
6
|
+
readonly case_summary: string;
|
|
7
|
+
readonly case_customer_escalation: string;
|
|
8
|
+
readonly case_contactName: string;
|
|
9
|
+
readonly case_product: string;
|
|
10
|
+
readonly case_version: string;
|
|
11
|
+
readonly case_createdByName: string;
|
|
12
|
+
readonly case_createdDate: string;
|
|
13
|
+
readonly case_lastModifiedByName: string;
|
|
14
|
+
readonly uri: string;
|
|
15
|
+
readonly case_number: string;
|
|
16
|
+
readonly case_createdby_sso_username: string;
|
|
17
|
+
readonly case_contact_sso_username: string;
|
|
18
|
+
readonly case_type: string;
|
|
19
|
+
readonly usernameFilterTitle: string;
|
|
20
20
|
};
|
|
21
21
|
export declare const UpdatedCaseDataEvent = "PCM-Next > case-list-data-background-refresh";
|
|
22
22
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;CAuD1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,iDAAiD,CAAC"}
|
|
@@ -2,23 +2,59 @@ import i18n from 'i18next';
|
|
|
2
2
|
import { SolrKeys } from '../enums/filters';
|
|
3
3
|
// used for adding title text for different solr fields
|
|
4
4
|
export const filterNamesMap = {
|
|
5
|
-
[SolrKeys.status]
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[SolrKeys.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
[SolrKeys.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
[SolrKeys.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
[SolrKeys.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
[SolrKeys.
|
|
21
|
-
|
|
22
|
-
|
|
5
|
+
get [SolrKeys.status]() {
|
|
6
|
+
return i18n.t('Status');
|
|
7
|
+
},
|
|
8
|
+
get [SolrKeys.severity]() {
|
|
9
|
+
return i18n.t('Severity');
|
|
10
|
+
},
|
|
11
|
+
get [SolrKeys.group]() {
|
|
12
|
+
return i18n.t('Groups');
|
|
13
|
+
},
|
|
14
|
+
get [SolrKeys.accountNumber]() {
|
|
15
|
+
return i18n.t('Bookmarks');
|
|
16
|
+
},
|
|
17
|
+
get [SolrKeys.caseSummary]() {
|
|
18
|
+
return i18n.t('Title');
|
|
19
|
+
},
|
|
20
|
+
get [SolrKeys.escalation]() {
|
|
21
|
+
return i18n.t('Escalated');
|
|
22
|
+
},
|
|
23
|
+
get [SolrKeys.contactName]() {
|
|
24
|
+
return i18n.t('Owner');
|
|
25
|
+
},
|
|
26
|
+
get [SolrKeys.product]() {
|
|
27
|
+
return i18n.t('Products');
|
|
28
|
+
},
|
|
29
|
+
get [SolrKeys.version]() {
|
|
30
|
+
return i18n.t('Version');
|
|
31
|
+
},
|
|
32
|
+
get [SolrKeys.createdBy]() {
|
|
33
|
+
return i18n.t('Created by');
|
|
34
|
+
},
|
|
35
|
+
get [SolrKeys.createdDate]() {
|
|
36
|
+
return i18n.t('Created date');
|
|
37
|
+
},
|
|
38
|
+
get [SolrKeys.modifiedBy]() {
|
|
39
|
+
return i18n.t('Modified by');
|
|
40
|
+
},
|
|
41
|
+
get [SolrKeys.uri]() {
|
|
42
|
+
return i18n.t('Uri');
|
|
43
|
+
},
|
|
44
|
+
get [SolrKeys.caseNumber]() {
|
|
45
|
+
return i18n.t('Case number');
|
|
46
|
+
},
|
|
47
|
+
get [SolrKeys.createdBySsoUsername]() {
|
|
48
|
+
return i18n.t('Created by me');
|
|
49
|
+
},
|
|
50
|
+
get [SolrKeys.caseContactSSO]() {
|
|
51
|
+
return i18n.t('Owned by me');
|
|
52
|
+
},
|
|
53
|
+
get [SolrKeys.type]() {
|
|
54
|
+
return i18n.t('Support type');
|
|
55
|
+
},
|
|
56
|
+
get usernameFilterTitle() {
|
|
57
|
+
return i18n.t('Username');
|
|
58
|
+
},
|
|
23
59
|
};
|
|
24
60
|
export const UpdatedCaseDataEvent = 'PCM-Next > case-list-data-background-refresh';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/cases",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@patternfly/patternfly": "6.2.1",
|
|
44
44
|
"@patternfly/react-core": "6.2.1",
|
|
45
45
|
"@patternfly/react-table": "6.2.1",
|
|
46
|
-
"@rh-support/components": "2.5.
|
|
47
|
-
"@rh-support/react-context": "2.5.
|
|
46
|
+
"@rh-support/components": "2.5.33",
|
|
47
|
+
"@rh-support/react-context": "2.5.35",
|
|
48
48
|
"@rh-support/types": "2.0.5",
|
|
49
49
|
"@rh-support/user-permissions": "2.5.20",
|
|
50
50
|
"@rh-support/utils": "2.5.19",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"defaults and supports es6-module",
|
|
97
97
|
"maintained node versions"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "a00e0bcab839947c8f3bfaf882e453408960abf7"
|
|
100
100
|
}
|