@rh-support/cases 2.1.33 → 2.4.10-beta.6

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.
Files changed (43) hide show
  1. package/README.md +0 -2
  2. package/lib/esm/components/case-list/CaseList.d.ts.map +1 -1
  3. package/lib/esm/components/case-list/CaseList.js +2 -3
  4. package/lib/esm/components/case-list/case-list-filters/AccountsBookmarkedGroupFilter.d.ts.map +1 -1
  5. package/lib/esm/components/case-list/case-list-filters/AccountsBookmarkedGroupFilter.js +10 -14
  6. package/lib/esm/components/case-list/case-list-filters/AccountsFilter.d.ts.map +1 -1
  7. package/lib/esm/components/case-list/case-list-filters/AccountsFilter.js +5 -10
  8. package/lib/esm/components/case-list/case-list-filters/AdditionalFilters.js +1 -1
  9. package/lib/esm/components/case-list/case-list-filters/CaseListFilterChips.js +1 -1
  10. package/lib/esm/components/case-list/case-list-filters/CreatorSsoNameFilter.d.ts +0 -10
  11. package/lib/esm/components/case-list/case-list-filters/CreatorSsoNameFilter.d.ts.map +1 -1
  12. package/lib/esm/components/case-list/case-list-filters/CreatorSsoNameFilter.js +164 -134
  13. package/lib/esm/components/case-list/case-list-filters/CreatorSsoNameFilterChip.js +1 -1
  14. package/lib/esm/components/case-list/case-list-filters/GroupsFilter.js +2 -2
  15. package/lib/esm/components/case-list/case-list-filters/ProductFilterChip.js +1 -1
  16. package/lib/esm/components/case-list/case-list-filters/ProductsFilter.d.ts.map +1 -1
  17. package/lib/esm/components/case-list/case-list-filters/ProductsFilter.js +5 -7
  18. package/lib/esm/components/case-list/case-list-filters/SeverityFilter.js +4 -4
  19. package/lib/esm/components/case-list/case-list-filters/StatusFilter.js +4 -4
  20. package/lib/esm/components/case-list/case-list-filters/TypeFilter.js +3 -3
  21. package/lib/esm/components/case-list/case-list-filters/VersionsFilter.js +2 -2
  22. package/lib/esm/components/case-list/case-list-table/CaseListTable.d.ts +0 -1
  23. package/lib/esm/components/case-list/case-list-table/CaseListTable.d.ts.map +1 -1
  24. package/lib/esm/components/case-list/case-list-table/CaseListTable.js +12 -11
  25. package/lib/esm/components/case-list/case-list-table/ExportCaseListCSV.js +1 -1
  26. package/lib/esm/components/case-list/case-search/AdvanceSearch.d.ts.map +1 -1
  27. package/lib/esm/components/case-list/case-search/AdvanceSearch.js +13 -18
  28. package/lib/esm/components/case-list/case-search/BookmarkedSearchesSelector.d.ts.map +1 -1
  29. package/lib/esm/components/case-list/case-search/BookmarkedSearchesSelector.js +5 -6
  30. package/lib/esm/components/case-list/case-search/CaseSearch.js +1 -1
  31. package/lib/esm/components/case-list/case-search/SaveCaseSearchModal.d.ts.map +1 -1
  32. package/lib/esm/components/case-list/case-search/SaveCaseSearchModal.js +8 -10
  33. package/lib/esm/components/escalations/EscalationForm.d.ts.map +1 -1
  34. package/lib/esm/components/escalations/EscalationForm.js +9 -18
  35. package/lib/esm/css/caseList.css +42 -50
  36. package/lib/esm/css/caseSearch.css +1 -1
  37. package/lib/esm/css/escalation.css +4 -4
  38. package/lib/esm/scss/_main.scss +11 -11
  39. package/lib/esm/scss/_pf-overrides.scss +3 -8
  40. package/package.json +14 -14
  41. package/lib/esm/components/case-list/case-list-filters/InternalSsoNameFilter.d.ts +0 -2
  42. package/lib/esm/components/case-list/case-list-filters/InternalSsoNameFilter.d.ts.map +0 -1
  43. package/lib/esm/components/case-list/case-list-filters/InternalSsoNameFilter.js +0 -207
@@ -1,4 +1,4 @@
1
- import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
1
+ import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
2
2
  import { getDropdownBtnPlaceholder } from '@rh-support/utils';
3
3
  import React, { useContext, useState } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
@@ -25,9 +25,9 @@ export function SeverityFilter(props) {
25
25
  const titleId = 'case-list-severity-filter';
26
26
  // solr is down and solr filter values are not available
27
27
  // we get filter values from hydra metadata api
28
- const singleSelectSolrIsDown = () => (React.createElement(Select, { id: titleId, variant: SelectVariant.single, "aria-label": "Select Input", onToggle: (_event, isExpanded) => toggleIsOpen(isExpanded), onSelect: onFilterChangeSingleSelect, selections: filterInfo[SolrKeys.severity][0], isOpen: isOpen, "aria-labelledby": titleId, placeholderText: t('Select a severity'), "data-tracking-id": "severity-filter", hasPlaceholderStyle: true }, props.allCaseSeverities.map((severity) => (React.createElement(SelectOption, { key: severity, value: severity })))));
29
- const multiSelect = () => (React.createElement(Select, { id: titleId, variant: SelectVariant.checkbox, "aria-label": t('Select a severity'), onToggle: (_event, isExpanded) => toggleIsOpen(isExpanded), onSelect: onFilterChangeMultipleSelect, selections: filterInfo[SolrKeys.severity], isOpen: isOpen, placeholderText: getDropdownBtnPlaceholder(t('Select a severity'), filterInfo[SolrKeys.severity], ' ', props.filterValues.length, t('All selected')), isCheckboxSelectionBadgeHidden: true, "aria-labelledby": titleId, "data-tracking-id": "severity-filter", hasPlaceholderStyle: true }, props.filterValues.map((filterValue) => (React.createElement(SelectOption, { key: filterValue.value, value: filterValue.value })))));
30
- return (React.createElement("div", { className: "pf-v5-c-select" },
28
+ const singleSelectSolrIsDown = () => (React.createElement(Select, { id: titleId, variant: SelectVariant.single, "aria-label": "Select Input", onToggle: toggleIsOpen, onSelect: onFilterChangeSingleSelect, selections: filterInfo[SolrKeys.severity][0], isOpen: isOpen, "aria-labelledby": titleId, placeholderText: t('Select a severity'), "data-tracking-id": "severity-filter", hasPlaceholderStyle: true }, props.allCaseSeverities.map((severity) => (React.createElement(SelectOption, { key: severity, value: severity })))));
29
+ const multiSelect = () => (React.createElement(Select, { id: titleId, variant: SelectVariant.checkbox, "aria-label": t('Select a severity'), onToggle: toggleIsOpen, onSelect: onFilterChangeMultipleSelect, selections: filterInfo[SolrKeys.severity], isOpen: isOpen, placeholderText: getDropdownBtnPlaceholder(t('Select a severity'), filterInfo[SolrKeys.severity], ' ', props.filterValues.length, t('All selected')), isCheckboxSelectionBadgeHidden: true, "aria-labelledby": titleId, "data-tracking-id": "severity-filter", hasPlaceholderStyle: true }, props.filterValues.map((filterValue) => (React.createElement(SelectOption, { key: filterValue.value, value: filterValue.value })))));
30
+ return (React.createElement("div", { className: "pf-c-select" },
31
31
  React.createElement("label", { htmlFor: titleId }, t(filterNamesMap[SolrKeys.severity])),
32
32
  props.isSolrSearchDown ? singleSelectSolrIsDown() : multiSelect()));
33
33
  }
@@ -1,4 +1,4 @@
1
- import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
1
+ import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
2
2
  import React, { useContext, useState } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { SolrKeys } from '../../../enums/filters';
@@ -48,9 +48,9 @@ export function StatusFilter(props) {
48
48
  const titleId = 'case-list-status-filter';
49
49
  // solr is down and solr filter values are not available
50
50
  // we get filter values from hydra metadata api
51
- const singleSelectSolrIsDown = () => (React.createElement(Select, { id: titleId, variant: SelectVariant.single, "aria-label": "Select Input", onToggle: (_event, isExpanded) => toggleIsOpen(isExpanded), onSelect: onFilterChangeSingleSelect, selections: filterInfo[SolrKeys.status][0], isOpen: isOpen, "aria-labelledby": titleId, placeholderText: t('Select a status'), "data-tracking-id": "status-filter", hasPlaceholderStyle: true }, props.allCaseStatuses.map((status) => (React.createElement(SelectOption, { key: status, value: status })))));
52
- const multiSelect = () => (React.createElement(Select, { id: titleId, variant: SelectVariant.checkbox, "aria-label": t('Select a status'), onToggle: (_event, isExpanded) => toggleIsOpen(isExpanded), onSelect: onFilterChange, selections: filterInfo[SolrKeys.status], isOpen: isOpen, placeholderText: getBtnPlaceholder(t('Select a status'), filterInfo[SolrKeys.status], ' ', props.filterValues.length, t('All selected')), isCheckboxSelectionBadgeHidden: true, "aria-labelledby": titleId, "data-tracking-id": "status-filter", hasPlaceholderStyle: true }, props.filterValues.map((filterValue) => (React.createElement(SelectOption, { key: filterValue.value, value: filterValue.value })))));
53
- return (React.createElement("div", { className: "pf-v5-c-select" },
51
+ const singleSelectSolrIsDown = () => (React.createElement(Select, { id: titleId, variant: SelectVariant.single, "aria-label": "Select Input", onToggle: toggleIsOpen, onSelect: onFilterChangeSingleSelect, selections: filterInfo[SolrKeys.status][0], isOpen: isOpen, "aria-labelledby": titleId, placeholderText: t('Select a status'), "data-tracking-id": "status-filter", hasPlaceholderStyle: true }, props.allCaseStatuses.map((status) => (React.createElement(SelectOption, { key: status, value: status })))));
52
+ const multiSelect = () => (React.createElement(Select, { id: titleId, variant: SelectVariant.checkbox, "aria-label": t('Select a status'), onToggle: toggleIsOpen, onSelect: onFilterChange, selections: filterInfo[SolrKeys.status], isOpen: isOpen, placeholderText: getBtnPlaceholder(t('Select a status'), filterInfo[SolrKeys.status], ' ', props.filterValues.length, t('All selected')), isCheckboxSelectionBadgeHidden: true, "aria-labelledby": titleId, "data-tracking-id": "status-filter", hasPlaceholderStyle: true }, props.filterValues.map((filterValue) => (React.createElement(SelectOption, { key: filterValue.value, value: filterValue.value })))));
53
+ return (React.createElement("div", { className: "pf-c-select" },
54
54
  React.createElement("label", { htmlFor: titleId }, t(filterNamesMap[SolrKeys.status])),
55
55
  props.isSolrSearchDown ? singleSelectSolrIsDown() : multiSelect()));
56
56
  }
@@ -1,4 +1,4 @@
1
- import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
1
+ import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
2
2
  import { getDropdownBtnPlaceholder, toNewCaseTypeMapper, toOldCaseTypeSwitcher } from '@rh-support/utils';
3
3
  import React, { useContext, useState } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
@@ -27,7 +27,7 @@ export function TypeFilter(props) {
27
27
  // To switch from old case type to new support type
28
28
  const newCaseTypesArray = toNewCaseTypeMapper(props.allCaseTypes).sort();
29
29
  const toNewCaseTypesFilter = toNewCaseTypeMapper(filterInfo[SolrKeys.type]);
30
- return (React.createElement("div", { className: "pf-v5-c-select" },
30
+ return (React.createElement("div", { className: "pf-c-select" },
31
31
  React.createElement("label", { htmlFor: titleId }, t(filterNamesMap[SolrKeys.type])),
32
- React.createElement(Select, { id: titleId, variant: SelectVariant.checkbox, "aria-label": t('Select a support type'), onToggle: (_event, isExpanded) => toggleIsOpen(isExpanded), onSelect: onFilterChangeMultipleSelect, selections: toNewCaseTypesFilter, isOpen: isOpen, placeholderText: getDropdownBtnPlaceholder(t('Select a support type'), toNewCaseTypesFilter, ' ', props.allCaseTypes.length, t('All selected')), isCheckboxSelectionBadgeHidden: true, "aria-labelledby": titleId, "data-tracking-id": "type-filter", hasPlaceholderStyle: true }, newCaseTypesArray.map((filterValue) => (React.createElement(SelectOption, { key: filterValue, value: filterValue }))))));
32
+ React.createElement(Select, { id: titleId, variant: SelectVariant.checkbox, "aria-label": t('Select a support type'), onToggle: toggleIsOpen, onSelect: onFilterChangeMultipleSelect, selections: toNewCaseTypesFilter, isOpen: isOpen, placeholderText: getDropdownBtnPlaceholder(t('Select a support type'), toNewCaseTypesFilter, ' ', props.allCaseTypes.length, t('All selected')), isCheckboxSelectionBadgeHidden: true, "aria-labelledby": titleId, "data-tracking-id": "type-filter", hasPlaceholderStyle: true }, newCaseTypesArray.map((filterValue) => (React.createElement(SelectOption, { key: filterValue, value: filterValue }))))));
33
33
  }
@@ -1,4 +1,4 @@
1
- import { Select, SelectOption, SelectVariant } from '@patternfly/react-core/deprecated';
1
+ import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
2
2
  import isEmpty from 'lodash/isEmpty';
3
3
  import React, { useContext, useState } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
@@ -33,5 +33,5 @@ export function VersionsFilter({ productInfo, productVersionPivot }) {
33
33
  const titleId = 'case-list-versions-filter';
34
34
  return (React.createElement(React.Fragment, null, !isEmpty(versions) && (React.createElement(React.Fragment, null,
35
35
  React.createElement("label", { hidden: true, htmlFor: titleId }, t('Open versions dropdown')),
36
- React.createElement(Select, { className: "version-filter-chip pf-v5-u-xs", variant: SelectVariant.checkbox, "aria-label": t('Version'), onToggle: (_event, isExpanded) => toggleIsOpen(isExpanded), onSelect: onFilterChange, selections: productInfo.case_version.map((ver) => ver.value), isOpen: isOpen, placeholderText: 'Version', isCheckboxSelectionBadgeHidden: true, "aria-labelledby": titleId, "data-tracking-id": "versions-filter", hasPlaceholderStyle: true }, (versions || []).map((filterValue) => (React.createElement(SelectOption, { key: filterValue.value, value: filterValue.value, component: "div" }))))))));
36
+ React.createElement(Select, { className: "version-filter-chip", variant: SelectVariant.checkbox, "aria-label": t('Version'), onToggle: toggleIsOpen, onSelect: onFilterChange, selections: productInfo.case_version.map((ver) => ver.value), isOpen: isOpen, placeholderText: 'Version', isCheckboxSelectionBadgeHidden: true, "aria-labelledby": titleId, "data-tracking-id": "versions-filter", hasPlaceholderStyle: true }, (versions || []).map((filterValue) => (React.createElement(SelectOption, { key: filterValue.value, value: filterValue.value, component: "div" }))))))));
37
37
  }
@@ -12,7 +12,6 @@ interface IProps {
12
12
  isCaseListPageLoading: boolean;
13
13
  hasError: boolean;
14
14
  isSolrDown?: boolean;
15
- isXXLScreen?: boolean;
16
15
  }
17
16
  export declare function CaseListTable(props: IProps): JSX.Element;
18
17
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"CaseListTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/CaseListTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AA8B3E,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAWxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAEH,eAAe,EACf,SAAS,EAIZ,MAAM,0BAA0B,CAAC;AA2BlC,UAAU,MAAM;IACZ,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC3C,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,kBAAkB,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,eA0X1C"}
1
+ {"version":3,"file":"CaseListTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/CaseListTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AA6B3E,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAWxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAEH,eAAe,EACf,SAAS,EAIZ,MAAM,0BAA0B,CAAC;AA2BlC,UAAU,MAAM;IACZ,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC3C,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,kBAAkB,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,eAmX1C"}
@@ -1,4 +1,4 @@
1
- import { Bullseye, Button, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateHeader, EmptyStateIcon, EmptyStateVariant, PaginationVariant, } from '@patternfly/react-core';
1
+ import { Bullseye, Button, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateVariant, PaginationVariant, Title, } from '@patternfly/react-core';
2
2
  import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
3
3
  import { PFTable, Table, TableColumnSelector, TablePagination, } from '@rh-support/components';
4
4
  import { GlobalMetadataDispatchContext, GlobalMetadataStateContext, updateUserPreferences, useGlobalStateContext, UserPreferencesKeys, } from '@rh-support/react-context';
@@ -75,7 +75,7 @@ export function CaseListTable(props) {
75
75
  },
76
76
  {
77
77
  id: CaseListColumnIds.summary,
78
- cellWidth: props.isXXLScreen ? 30 : 10,
78
+ cellWidth: 10,
79
79
  title: t('Issue summary'),
80
80
  sortable: true,
81
81
  accessor: (data) => data.case_summary,
@@ -259,14 +259,15 @@ export function CaseListTable(props) {
259
259
  props: { colSpan: 9 },
260
260
  title: (React.createElement(Bullseye, null,
261
261
  React.createElement(EmptyState, { variant: EmptyStateVariant.full },
262
- React.createElement(EmptyStateHeader, { titleText: React.createElement(React.Fragment, null,
263
- React.createElement(Trans, null, isInternal && (!showingFilter || !hasSearchQuery)
264
- ? 'No results found'
265
- : 'No information to display')), icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }), headingLevel: "h2" }),
262
+ React.createElement(EmptyStateIcon, { icon: SearchIcon }),
263
+ React.createElement(Title, { headingLevel: "h2", size: "lg" },
264
+ React.createElement(Trans, null, isInternal && (!showingFilter || !hasSearchQuery)
265
+ ? 'No results found'
266
+ : 'No information to display')),
266
267
  React.createElement(EmptyStateBody, null,
267
268
  React.createElement(Trans, null, getEmptyStateErrMessage())),
268
- React.createElement(EmptyStateFooter, null, (showingFilter || hasSearchQuery) && (React.createElement(Button, { variant: "link", onClick: clearAllFilters },
269
- React.createElement(Trans, null, "Clear all"))))))),
269
+ (showingFilter || hasSearchQuery) && (React.createElement(Button, { variant: "link", onClick: clearAllFilters },
270
+ React.createElement(Trans, null, "Clear all")))))),
270
271
  },
271
272
  ],
272
273
  },
@@ -290,14 +291,14 @@ export function CaseListTable(props) {
290
291
  };
291
292
  return (React.createElement(React.Fragment, null,
292
293
  React.createElement(Table, { columns: columns, data: caseListData, selectedColumns: selectedColumns },
293
- React.createElement("div", { className: "case-list-table-toolbar pf-v5-l-flex", ref: tableToolbarRef },
294
- React.createElement("div", { className: "toolbar-actions pf-v5-l-flex pf-m-space-items-sm" },
294
+ React.createElement("div", { className: "case-list-table-toolbar pf-l-flex", ref: tableToolbarRef },
295
+ React.createElement("div", { className: "toolbar-actions pf-l-flex pf-m-space-items-sm" },
295
296
  React.createElement(TableColumnSelector, { onColumnSelectorChange: onColumnSelectorChange }),
296
297
  React.createElement(ExportCaseListCSV, { currentFilteredCaseList: props.caseList, isExportCsvDisabled: props.isSolrDown }),
297
298
  React.createElement(CloseCaseBtn, { selectedCases: selectedCases, caseList: caseListData, onCasesCloseSuccess: onCasesCloseSuccess })),
298
299
  React.createElement("span", { className: "toolbar-pagination" },
299
300
  React.createElement(TablePagination, { perPage: (_c = props.paginationInfo) === null || _c === void 0 ? void 0 : _c.pageSize, currentPage: (_d = props.paginationInfo) === null || _d === void 0 ? void 0 : _d.currentPage, onPerPageSelect: onPerPageSelect, onSetPage: onSetPage, variant: PaginationVariant.top, itemCount: getItemCount() }))),
300
- React.createElement("div", { className: "pf-v5-c-scroll-inner-wrapper" },
301
+ React.createElement("div", { className: "pf-c-scroll-inner-wrapper" },
301
302
  React.createElement(PFTable, { "aria-label": "case-list", className: "case-list-table", pagination: false, onRowClick: onRowClick, onSortChange: onSortChange, onSelect: onRowSelect, emptyStateRow: noResultFoundRow, sortInfo: props.sortInfo, isLoading: props.isCaseListPageLoading })),
302
303
  caseListData.length > 9 && (React.createElement("footer", { className: "toolbar-pagination" },
303
304
  React.createElement(TablePagination, { perPage: (_e = props === null || props === void 0 ? void 0 : props.paginationInfo) === null || _e === void 0 ? void 0 : _e.pageSize, currentPage: (_f = props === null || props === void 0 ? void 0 : props.paginationInfo) === null || _f === void 0 ? void 0 : _f.currentPage, onPerPageSelect: onPerPageSelect, onSetPage: onBottomPaginationSetPage, variant: PaginationVariant.bottom, itemCount: getItemCount() }))))));
@@ -115,5 +115,5 @@ export function ExportCaseListCSV(props) {
115
115
  return (React.createElement("span", { title: (props.isExportCsvDisabled && getTooltipContent()) || '' },
116
116
  React.createElement(Button, { variant: "tertiary", isDisabled: isBtnDisabled || props.isExportCsvDisabled, onClick: loggedInUsersAccount.data.secureSupport ? onExportCSVClickSecureSupport : onExportCSVClick, title: btnTitle, "data-tracking-id": "case-list-toolbar-export-csv" }, isFetchingCSVData ? (React.createElement(React.Fragment, null,
117
117
  React.createElement(Trans, null, "Exporting CSV"),
118
- React.createElement(Spinner, { size: "md", "aria-label": "loading", className: "export-csv-loader pf-v5-u-ml-xs" }))) : (React.createElement(Trans, null, "Export CSV")))));
118
+ React.createElement(Spinner, { isSVG: true, size: "md", "aria-label": "loading", className: "export-csv-loader pf-u-ml-xs" }))) : (React.createElement(Trans, null, "Export CSV")))));
119
119
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AdvanceSearch.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-search/AdvanceSearch.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC5D,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,EAAE,CAAC,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,0BAA0B,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,eA4T1C"}
1
+ {"version":3,"file":"AdvanceSearch.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-search/AdvanceSearch.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE,UAAU,MAAM;IACZ,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC5D,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,EAAE,CAAC,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,0BAA0B,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,eA8S1C"}
@@ -1,5 +1,4 @@
1
- import { Button, Flex, FlexItem, Icon, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
2
- import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
1
+ import { Button } from '@patternfly/react-core';
3
2
  import InfoIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
4
3
  import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
5
4
  import isEmpty from 'lodash/isEmpty';
@@ -84,8 +83,8 @@ export function AdvanceSearch(props) {
84
83
  document.removeEventListener('mousedown', handleClickOutside);
85
84
  };
86
85
  }, [isAutoCompleteListVisible]);
87
- const onQueryStringChange = (value) => {
88
- const query = value;
86
+ const onQueryStringChange = (ev) => {
87
+ const query = ev.target.value;
89
88
  setInputString(query);
90
89
  };
91
90
  const autoCompleteSetup = (expectedArray = null, phrase = '') => {
@@ -212,22 +211,18 @@ export function AdvanceSearch(props) {
212
211
  };
213
212
  const isQueryInValid = inputString && !isParsingSuccessful;
214
213
  return (React.createElement(React.Fragment, null,
215
- React.createElement("div", { className: "pf-v5-c-select pf-m-expanded", ref: dropdownWrapperRef },
216
- React.createElement(TextInputGroup, null,
217
- React.createElement(TextInputGroupMain, { value: inputString, onChange: (event, value) => onQueryStringChange(value), onFocus: onInputFocus, ref: searchInputRef, onKeyDown: onKeyDown, placeholder: t('i18nEnterSolrQuery', 'Enter SOLR query, for example: severity:"1 (Urgent)" and status:"Waiting on Customer"'), className: "pf-v5-u-pr-2xl", type: "text", "aria-invalid": isQueryInValid ? true : false, autoComplete: "off", id: "advance-search-typeahead", "aria-label": t('Enter search query'), "aria-describedby": "advance-query-error-helper" }),
218
- inputString && (React.createElement(TextInputGroupUtilities, null,
219
- React.createElement(Button, { onClick: onClear, variant: "plain", "data-tracking-id": "clear-search", "aria-label": t('Clear this search') }, inputString && isParsingSuccessful ? (React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
220
- React.createElement(FlexItem, null,
221
- React.createElement(Icon, { size: "md" },
222
- React.createElement(CheckCircleIcon, { color: "#3E8635" }))),
223
- React.createElement(FlexItem, null,
224
- React.createElement(TimesCircleIcon, null)))) : (React.createElement(TimesCircleIcon, null)))))),
225
- isAutoCompleteListVisible && (React.createElement("ul", { className: "pf-v5-c-select__menu", "aria-labelledby": "advance-search-typeahead-label", role: "listbox" }, autoCompleteList.map((item, index) => (React.createElement("li", { key: index, role: "presentation", className: `pf-v5-c-select__menu-wrapper ${selectedItemIndex === index ? 'pf-m-focus' : ''}` },
226
- React.createElement("button", { type: "button", onClick: (e) => onItemClick(item.value), className: "pf-v5-c-select__menu-item", "aria-selected": selectedItemIndex === index ? true : false, role: "option" }, item.display))))))),
227
- React.createElement(Button, { type: "button", variant: "primary", "data-tracking-id": "case-list-adv-search-button", className: "pf-v5-u-ml-sm", onClick: onSearchSubmit, isDisabled: isAdvancedSearchButtonDisabled },
214
+ React.createElement("div", { className: "pf-c-select pf-m-expanded", ref: dropdownWrapperRef },
215
+ React.createElement("div", { className: "pf-c-select__toggle pf-m-typeahead" },
216
+ React.createElement("div", { className: "pf-c-select__toggle-wrapper" },
217
+ React.createElement("input", { value: inputString, onChange: onQueryStringChange, onFocus: onInputFocus, ref: searchInputRef, onKeyDown: onKeyDown, placeholder: t('i18nEnterSolrQuery', 'Enter SOLR query, for example: severity:"1 (Urgent)" and status:"Waiting on Customer"'), className: `pf-c-form-control pf-c-select__toggle-typeahead ${inputString && isParsingSuccessful ? 'pf-m-success' : ''}`, type: "text", "aria-invalid": isQueryInValid ? true : false, autoComplete: "off", id: "advance-search-typeahead", "aria-label": t('Enter search query'), "aria-describedby": "advance-query-error-helper" })),
218
+ inputString && (React.createElement(Button, { onClick: onClear, className: "pf-c-button pf-m-plain pf-c-select__toggle-clear", variant: "plain", "data-tracking-id": "clear-search", "aria-label": t('Clear this search') },
219
+ React.createElement(TimesCircleIcon, null)))),
220
+ isAutoCompleteListVisible && (React.createElement("ul", { className: "pf-c-select__menu", "aria-labelledby": "advance-search-typeahead-label", role: "listbox" }, autoCompleteList.map((item, index) => (React.createElement("li", { key: index, role: "presentation", className: `pf-c-select__menu-wrapper ${selectedItemIndex === index ? 'pf-m-focus' : ''}` },
221
+ React.createElement("button", { type: "button", onClick: (e) => onItemClick(item.value), className: "pf-c-select__menu-item", "aria-selected": selectedItemIndex === index ? true : false, role: "option" }, item.display))))))),
222
+ React.createElement(Button, { type: "button", variant: "primary", "data-tracking-id": "case-list-adv-search-button", className: "pf-u-ml-sm", onClick: onSearchSubmit, isDisabled: isAdvancedSearchButtonDisabled },
228
223
  React.createElement(Trans, null, "Search")),
229
224
  React.createElement(Button, { variant: "link", onClick: onBasicClick, "data-tracking-id": "case-list-basic-toggle-button" },
230
225
  React.createElement(Trans, null, "Basic")),
231
- React.createElement(Button, { variant: "link", className: "pf-v5-u-px-0", component: "a", rel: "noopener noreferrer", target: "_blank", href: "https://source.redhat.com/communitiesatredhat/applications/integration-community-of-practice/all/testallin/all_in_blog/advanced_search_in_the_customer_support_tool", "data-tracking-id": "advance-search-guide" },
226
+ React.createElement(Button, { variant: "link", className: "pf-u-px-0", component: "a", rel: "noopener noreferrer", target: "_blank", href: "https://source.redhat.com/communitiesatredhat/applications/integration-community-of-practice/all/testallin/all_in_blog/advanced_search_in_the_customer_support_tool", "data-tracking-id": "advance-search-guide" },
232
227
  React.createElement(InfoIcon, null))));
233
228
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BookmarkedSearchesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-search/BookmarkedSearchesSelector.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAahE,UAAU,MAAM;IACZ,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,mBAAmB,CAAC;IACvC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,MAAM,CAAC;CAClC;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,eAgTvD"}
1
+ {"version":3,"file":"BookmarkedSearchesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-search/BookmarkedSearchesSelector.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAahE,UAAU,MAAM;IACZ,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,mBAAmB,CAAC;IACvC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,MAAM,CAAC;CAClC;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,eAgTvD"}
@@ -7,8 +7,7 @@ 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 { Button, ButtonVariant, Split, SplitItem } from '@patternfly/react-core';
11
- import { Dropdown, DropdownItem, DropdownSeparator, DropdownToggle, DropdownToggleAction, } from '@patternfly/react-core/deprecated';
10
+ import { Button, ButtonVariant, Dropdown, DropdownItem, DropdownSeparator, DropdownToggle, DropdownToggleAction, Split, SplitItem, } from '@patternfly/react-core';
12
11
  import PencilAltIcon from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon';
13
12
  import StarIcon from '@patternfly/react-icons/dist/js/icons/star-icon';
14
13
  import { ConfirmationServiceProvider } from '@rh-support/components';
@@ -167,16 +166,16 @@ export function BookmarkedSearchesSelector(props) {
167
166
  .sort()
168
167
  .map((bookmarkedSearch) => {
169
168
  var _a;
170
- return (React.createElement("li", { className: "pf-v5-c-dropdown__menu-item pf-v5-u-p-xs", key: bookmarkedSearch },
169
+ return (React.createElement("li", { className: "pf-c-dropdown__menu-item pf-u-p-xs", key: bookmarkedSearch },
171
170
  React.createElement(Split, { key: `split-parent-${bookmarkedSearch}` },
172
171
  React.createElement(SplitItem, { isFilled: true, key: `split-left-${bookmarkedSearch}` },
173
- React.createElement(Button, { variant: ButtonVariant.plain, isBlock: true, className: "pf-v5-u-text-align-left", onClick: onBookmarkSelectorChange(bookmarkedSearch, bookmarkedSearches[bookmarkedSearch], true) },
174
- ((_a = bookmarkedSearches[bookmarkedSearch]) === null || _a === void 0 ? void 0 : _a.defaultChecked) && (React.createElement(StarIcon, { title: "{t('Default search')}", color: "#F0AB00", className: "pf-v5-u-mr-sm", "aria-label": t('Default search') })),
172
+ React.createElement(Button, { variant: ButtonVariant.plain, isBlock: true, className: "pf-u-text-align-left", onClick: onBookmarkSelectorChange(bookmarkedSearch, bookmarkedSearches[bookmarkedSearch], true) },
173
+ ((_a = bookmarkedSearches[bookmarkedSearch]) === null || _a === void 0 ? void 0 : _a.defaultChecked) && (React.createElement(StarIcon, { title: "{t('Default search')}", color: "#F0AB00", className: "pf-u-mr-sm", "aria-label": t('Default search') })),
175
174
  ' ',
176
175
  bookmarkedSearch)),
177
176
  React.createElement(SplitItem, { key: `split-right-${bookmarkedSearch}` },
178
177
  ' ',
179
- React.createElement(Button, { "aria-label": t('Edit or delete saved search'), className: "pf-v5-u-pr-sm", onClick: onEditSavedSearchClick(bookmarkedSearch), variant: ButtonVariant.link, icon: React.createElement(PencilAltIcon, null) })))));
178
+ React.createElement(Button, { "aria-label": t('Edit or delete saved search'), className: "pf-u-pr-sm", onClick: onEditSavedSearchClick(bookmarkedSearch), variant: ButtonVariant.link, icon: React.createElement(PencilAltIcon, null) })))));
180
179
  });
181
180
  const renderMostRecentSearch = [
182
181
  React.createElement(DropdownItem, { key: "most-recent-search", component: "button", onClick: onBookmarkSelectorChange('', mostRecentSearch, true) },
@@ -94,7 +94,7 @@ export function CaseSearch(props) {
94
94
  const renderBasicSearch = () => {
95
95
  return (React.createElement(React.Fragment, null,
96
96
  React.createElement("div", { className: "case-search-input-container" },
97
- React.createElement(SearchInput, { className: "pf-v5-u-w-100", placeholder: t('Search by keyword or case ID'), value: searchVal === null || searchVal === void 0 ? void 0 : searchVal.trim(), "data-tracking-id": "search-cases-text-input", id: "case-search-basic", "aria-label": t('Search by keyword or case ID'), onChange: (_event, val) => onSearchValChange(val), onClear: clearSearchVal }),
97
+ React.createElement(SearchInput, { className: "pf-u-w-100", placeholder: t('Search by keyword or case ID'), value: searchVal === null || searchVal === void 0 ? void 0 : searchVal.trim(), "data-tracking-id": "search-cases-text-input", id: "case-search-basic", "aria-label": t('Search by keyword or case ID'), onChange: onSearchValChange, onClear: clearSearchVal }),
98
98
  React.createElement(Button, { variant: "primary", type: "submit", className: "search-btn", "data-tracking-id": "case-list-search-button", isDisabled: isSearchButtonDisabled },
99
99
  React.createElement(Trans, null, "Search")),
100
100
  canUseAdvancedSearch && (React.createElement(Button, { variant: "link", onClick: () => onSearchTypeChange(CaseSearchQueryType.ADVANCED), isDisabled: isFetching, "data-tracking-id": "case-list-adv-toggle-button" },
@@ -1 +1 @@
1
- {"version":3,"file":"SaveCaseSearchModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-search/SaveCaseSearchModal.tsx"],"names":[],"mappings":"AAgCA,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,wBAAwB,EAAE,MAAM,CAAC;IACjC,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC/B;AAOD,wBAAgB,mBAAmB,CAAC,EAChC,WAAW,EACX,WAAW,EACX,QAAQ,EACR,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,GAClB,EAAE,MAAM,eAmSR"}
1
+ {"version":3,"file":"SaveCaseSearchModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-search/SaveCaseSearchModal.tsx"],"names":[],"mappings":"AA6BA,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,wBAAwB,EAAE,MAAM,CAAC;IACjC,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC/B;AAOD,wBAAgB,mBAAmB,CAAC,EAChC,WAAW,EACX,WAAW,EACX,QAAQ,EACR,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,GAClB,EAAE,MAAM,eAiSR"}
@@ -7,7 +7,7 @@ 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 { Button, ButtonVariant, Checkbox, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalVariant, TextArea, TextInput, } from '@patternfly/react-core';
10
+ import { Button, ButtonVariant, Checkbox, Form, FormGroup, Modal, ModalVariant, TextArea, TextInput, } from '@patternfly/react-core';
11
11
  import { ToastNotification, useConfirmation } from '@rh-support/components';
12
12
  import { GlobalMetadataDispatchContext, GlobalMetadataStateContext, updateUserPreferences, UserPreferencesKeys, } from '@rh-support/react-context';
13
13
  import find from 'lodash/find';
@@ -183,7 +183,7 @@ export function SaveCaseSearchModal({ isModalOpen, modalToggle, isAdding, select
183
183
  React.createElement(Button, { key: "cancel", variant: ButtonVariant.secondary, "data-tracking-id": "case-list-bookmark-search-canceled", onClick: closeModal },
184
184
  React.createElement(Trans, null, "Cancel")),
185
185
  React.createElement(React.Fragment, null,
186
- React.createElement(Checkbox, { className: "pf-v5-u-ml-md save-search-set-default", key: "set-as-default", "aria-label": t('Set as default'), id: "case-list-bookmark-search-set-as-default", "data-tracking-id": "case-list-bookmark-search-set-as-default", isChecked: localDefaultChecked, onChange: (e, checkbox) => {
186
+ React.createElement(Checkbox, { className: "pf-u-ml-md save-search-set-default", key: "set-as-default", "aria-label": t('Set as default'), id: "case-list-bookmark-search-set-as-default", "data-tracking-id": "case-list-bookmark-search-set-as-default", isChecked: localDefaultChecked, onChange: (checkbox, e) => {
187
187
  e.stopPropagation();
188
188
  setLocalDefaultChecked(!localDefaultChecked);
189
189
  } }),
@@ -193,14 +193,12 @@ export function SaveCaseSearchModal({ isModalOpen, modalToggle, isAdding, select
193
193
  React.createElement(Trans, null, "Remove")))),
194
194
  ] },
195
195
  React.createElement(Form, { className: "save-search-form" },
196
- React.createElement(FormGroup, { label: React.createElement("span", { className: "save-for-later-label-name" }, t('Name')), isRequired: true, fieldId: "save-search-name", className: "form-group pull-bottom-narrow save-for-later-name" },
197
- saveButtonIsClicked && isDuplicateNameError && (React.createElement(FormHelperText, null,
198
- React.createElement(HelperText, null,
199
- React.createElement(HelperTextItem, null,
200
- React.createElement(Trans, null, "Filter with same name already exists. Please enter a unique name."))))),
201
- React.createElement(TextInput, { isRequired: true, type: "text", placeholder: t('Enter a unique name to reference in the future'), id: "save-search-name", name: "save-search-name", "aria-describedby": "save-search-name-helper", value: localSavedSearchName, onChange: (_event, value) => handleSaveSearchNameChange(value), validated: saveButtonIsClicked && (isDuplicateNameError || isEmpty(localSavedSearchName.trim()))
196
+ React.createElement(FormGroup, { label: React.createElement("span", { className: "save-for-later-label-name" }, t('Name')), isRequired: true, fieldId: "save-search-name", validated: saveButtonIsClicked && isDuplicateNameError ? 'error' : 'default', helperTextInvalid: t('Filter with same name already exists. Please enter a unique name.'), className: "form-group pull-bottom-narrow save-for-later-name" },
197
+ React.createElement(TextInput, { isRequired: true, type: "text", placeholder: t('Enter a unique name to reference in the future'), id: "save-search-name", name: "save-search-name", "aria-describedby": "save-search-name-helper", value: localSavedSearchName, onChange: handleSaveSearchNameChange, className: `form-control${saveButtonIsClicked && (isDuplicateNameError || isEmpty(localSavedSearchName.trim()))
198
+ ? ' form-invalid'
199
+ : ''}`, validated: saveButtonIsClicked && (isDuplicateNameError || isEmpty(localSavedSearchName.trim()))
202
200
  ? 'error'
203
201
  : 'default' })),
204
- React.createElement(FormGroup, { label: React.createElement("span", { className: "save-for-later-label-query" }, t('Search and filter query')), isRequired: true, fieldId: "filter-query", className: "form-group pf-v5-u-mt-lg save-for-later-query" },
205
- React.createElement(TextArea, { isRequired: true, validated: saveButtonIsClicked ? 'error' : 'default', type: "text", id: "filter-query", name: "filter-query", "aria-describedby": "filter-query-helper", value: getQueryStr(), isDisabled: true, resizeOrientation: "vertical" })))));
202
+ React.createElement(FormGroup, { label: React.createElement("span", { className: "save-for-later-label-query" }, t('Search and filter query')), isRequired: true, fieldId: "filter-query", className: "form-group pf-u-mt-lg save-for-later-query", validated: saveButtonIsClicked ? 'error' : 'default' },
203
+ React.createElement(TextArea, { isRequired: true, type: "text", id: "filter-query", name: "filter-query", "aria-describedby": "filter-query-helper", value: getQueryStr(), className: "form-control", isDisabled: true })))));
206
204
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EscalationForm.d.ts","sourceRoot":"","sources":["../../../../src/components/escalations/EscalationForm.tsx"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAoBlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIzE,OAAO,KAA2B,MAAM,OAAO,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAKxD,MAAM,WAAW,UAAW,SAAQ,gBAAgB;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,SAAS,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;IACxD,IAAI,CAAC,EACC,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,KAAK,GACL,MAAM,GACN,KAAK,CAAC;IACZ,OAAO,CAAC,EAAE,WAAW,EAAE,GAAG,MAAM,EAAE,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,UAAU,EAAE,CAAC;CAC/B;AAED,UAAU,MAAM;IACZ,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,gBAAgB,EAAE,GAAG,CAAC;IACtB,IAAI,EAAE,cAAc,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAKD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eAwP3C"}
1
+ {"version":3,"file":"EscalationForm.d.ts","sourceRoot":"","sources":["../../../../src/components/escalations/EscalationForm.tsx"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAiBlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIzE,OAAO,KAA2B,MAAM,OAAO,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAKxD,MAAM,WAAW,UAAW,SAAQ,gBAAgB;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,SAAS,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;IACxD,IAAI,CAAC,EACC,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,KAAK,GACL,MAAM,GACN,KAAK,CAAC;IACZ,OAAO,CAAC,EAAE,WAAW,EAAE,GAAG,MAAM,EAAE,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,UAAU,EAAE,CAAC;CAC/B;AAED,UAAU,MAAM;IACZ,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,gBAAgB,EAAE,GAAG,CAAC;IACtB,IAAI,EAAE,cAAc,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAKD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eA8O3C"}
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  };
21
21
  import '../../css/escalation.css';
22
22
  import { escalations } from '@cee-eng/hydrajs';
23
- import { ActionGroup, Button, Checkbox, Form, FormGroup, FormHelperText, FormSelect, FormSelectOption, HelperText, HelperTextItem, TextArea, TextInput, } from '@patternfly/react-core';
23
+ import { ActionGroup, Button, Checkbox, Form, FormGroup, FormSelect, FormSelectOption, TextArea, TextInput, } from '@patternfly/react-core';
24
24
  import { AlertMessage, AlertType, useFetch } from '@rh-support/components';
25
25
  import { useGlobalStateContext } from '@rh-support/react-context';
26
26
  import { scrollIntoView } from '@rh-support/utils';
@@ -70,17 +70,17 @@ export function EscalationForm(props) {
70
70
  ? mapToValueLabel(field.options)
71
71
  : field.options;
72
72
  return (React.createElement(React.Fragment, null,
73
- React.createElement(FormSelect, { isRequired: field.isRequired || false, id: field.id, onChange: (ev, value) => onFormValueChange(value, ev), value: formState[field.id], name: field.id }, options.map((option, index) => (React.createElement(FormSelectOption, { key: index, value: option.value, label: option.label })))),
74
- field.showTextAreaForOtherOption && formState[field.id] === 'Other' && (React.createElement(TextArea, { id: `${field.id}Text`, value: formState[`${field.id}Text`], onChange: (ev, value) => onFormValueChange(value, ev), "aria-describedby": `${field.id}-helper`, name: `${field.id}Text`, resizeOrientation: "vertical" }))));
73
+ React.createElement(FormSelect, { isRequired: field.isRequired || false, id: field.id, onChange: onFormValueChange, value: formState[field.id], name: field.id }, options.map((option, index) => (React.createElement(FormSelectOption, { key: index, value: option.value, label: option.label })))),
74
+ field.showTextAreaForOtherOption && formState[field.id] === 'Other' && (React.createElement(TextArea, { id: `${field.id}Text`, value: formState[`${field.id}Text`], onChange: onFormValueChange, "aria-describedby": `${field.id}-helper`, name: `${field.id}Text` }))));
75
75
  };
76
76
  const renderTextInput = (field) => {
77
- return (React.createElement(TextInput, { validated: checkIfValid(field) ? 'default' : 'error', isRequired: field.isRequired || false, id: field.id, type: field.type || 'text', value: formState[field.id], onChange: (ev, value) => onFormValueChange(value, ev), "aria-describedby": `${field.id}-helper`, name: field.id }));
77
+ return (React.createElement(TextInput, { validated: checkIfValid(field) ? 'default' : 'error', isRequired: field.isRequired || false, id: field.id, type: field.type || 'text', value: formState[field.id], onChange: onFormValueChange, "aria-describedby": `${field.id}-helper`, name: field.id }));
78
78
  };
79
79
  const renderTextArea = (field) => {
80
- return (React.createElement(TextArea, { isRequired: field.isRequired || false, id: field.id, value: formState[field.id], onChange: (ev, value) => onFormValueChange(value, ev), "aria-describedby": `${field.id}-helper`, name: field.id, resizeOrientation: "vertical" }));
80
+ return (React.createElement(TextArea, { isRequired: field.isRequired || false, id: field.id, value: formState[field.id], onChange: onFormValueChange, "aria-describedby": `${field.id}-helper`, name: field.id }));
81
81
  };
82
82
  const renderCheckbox = (field) => {
83
- return (React.createElement(Checkbox, { id: field.id, isChecked: formState[field.id], onChange: (ev, value) => onFormValueChange(value, ev), "aria-describedby": `${field.id}-helper`, name: field.id }));
83
+ return (React.createElement(Checkbox, { id: field.id, isChecked: formState[field.id], onChange: onFormValueChange, "aria-describedby": `${field.id}-helper`, name: field.id }));
84
84
  };
85
85
  const onFormValueChange = (value, ev) => {
86
86
  const newValue = { [ev.target.name]: value };
@@ -127,13 +127,6 @@ export function EscalationForm(props) {
127
127
  const isSendBtnDisabled = () => {
128
128
  return (requiredFields.some((item) => isFieldValueEmpty(formState[item])) || invalidfields.length > 0 || isFetching);
129
129
  };
130
- const getHelperText = (field) => {
131
- return checkIfValid(field)
132
- ? typeof field.helperText === 'string'
133
- ? t(field.helperText)
134
- : ''
135
- : t(field.helperTextInvalid || '');
136
- };
137
130
  return (React.createElement(React.Fragment, null,
138
131
  React.createElement("div", { className: "escalation-alert-messages", ref: alertMessageSectionRef },
139
132
  React.createElement(AlertMessage, { show: isFetching, variant: AlertType.INFO, title: t('Creating your escalation request') }),
@@ -149,11 +142,9 @@ export function EscalationForm(props) {
149
142
  React.createElement("span", { className: "cp-step-icon-custom" }, index + 1)),
150
143
  React.createElement("div", { className: "cp-step-content" }, section.sectionName)),
151
144
  React.createElement("div", { className: "escalation-form-fields" }, section.sectionFields.map((field) => {
152
- return (React.createElement(FormGroup, { key: field.id, label: t(field.label), isRequired: field.isRequired || false, fieldId: field.id },
153
- React.createElement(FormHelperText, null,
154
- React.createElement(HelperText, null,
155
- React.createElement(HelperTextItem, { variant: checkIfValid(field) ? 'default' : 'error' }, getHelperText(field)))),
156
- renderFormField(field)));
145
+ return (React.createElement(FormGroup, { key: field.id, label: t(field.label), isRequired: field.isRequired || false, fieldId: field.id, validated: checkIfValid(field) ? 'default' : 'error', helperText: typeof field.helperText === 'string'
146
+ ? t(field.helperText || '')
147
+ : field.helperText, helperTextInvalid: t(field.helperTextInvalid || '') }, renderFormField(field)));
157
148
  }))));
158
149
  }),
159
150
  React.createElement(ActionGroup, null,