@rh-support/cases 2.1.56 → 2.1.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"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;AAwB3E,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAOxD,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,OAAO,EAAE,iBAAiB,EAAyB,MAAM,0BAA0B,CAAC;AAEpF,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;AAsBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,qBA0jB1C"}
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;AAuB3E,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAOxD,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,OAAO,EAAE,iBAAiB,EAAyB,MAAM,0BAA0B,CAAC;AAEpF,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;AAsBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,qBAmjB1C"}
@@ -2,7 +2,7 @@ import { Bullseye, Button, EmptyState, EmptyStateBody, EmptyStateFooter, EmptySt
2
2
  import SearchIcon from '@patternfly/react-icons/dist/js/icons/search-icon';
3
3
  import { Table, TableVariant, Tbody, Td, Th, Thead, Tr, Visibility } from '@patternfly/react-table';
4
4
  import { TableColumnSelector, TableComponent, TablePagination } from '@rh-support/components';
5
- import { GlobalMetadataDispatchContext, GlobalMetadataStateContext, updateUserPreferences, useGlobalStateContext, UserPreferencesKeys, } from '@rh-support/react-context';
5
+ import { GlobalMetadataDispatchContext, updateUserPreferences, useGlobalStateContext, UserPreferencesKeys, } from '@rh-support/react-context';
6
6
  import { formatDate, scrollIntoView, toNewCaseTypeSwitcher } from '@rh-support/utils';
7
7
  import find from 'lodash/find';
8
8
  import flatMap from 'lodash/flatMap';
@@ -47,16 +47,13 @@ export function CaseListTable(props) {
47
47
  const [activeSortIndex, setActiveSortIndex] = useState();
48
48
  const [activeSortDirection, setActiveSortDirection] = useState();
49
49
  const [sortedCaseListData, setSortedCaseListData] = useState(caseListData);
50
- const { globalMetadataState: { navBarRef, hydraUserPreferences }, } = useGlobalStateContext();
50
+ const { globalMetadataState: { navBarRef, hydraUserPreferences, loggedInUserRights }, } = useGlobalStateContext();
51
51
  const dispatch = useContext(CaseListFilterDispatchContext);
52
52
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
53
- const { filterInfo } = useContext(CaseListFilterStateContext);
53
+ const { filterInfo, filterQueryInfo } = useContext(CaseListFilterStateContext);
54
54
  const currentFilterLength = flatMap(filterInfo).length;
55
55
  const showingFilter = currentFilterLength > 0;
56
- const filterState = useContext(CaseListFilterStateContext);
57
- const { filterQueryInfo } = filterState;
58
56
  const hasSearchQuery = !((filterQueryInfo === null || filterQueryInfo === void 0 ? void 0 : filterQueryInfo.queryString) === '');
59
- const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
60
57
  const isInternal = loggedInUserRights.data.isInternal();
61
58
  const tableToolbarRef = useRef(null);
62
59
  const columns = [
@@ -392,6 +389,6 @@ export function CaseListTable(props) {
392
389
  React.createElement(Td, { className: !isColumnVisible('type') ? Visibility.hidden : '', "data-label": "Support type" }, row.case_type),
393
390
  React.createElement(Td, { className: !isColumnVisible('closedDate') ? Visibility.hidden : '', "data-label": "Closed date" }, row.case_closedDate ? formatDate(row.case_closedDate) : ''),
394
391
  React.createElement(Td, { className: !isColumnVisible('folderName') ? Visibility.hidden : '', "data-label": "Group" }, row.case_folderName ? row.case_folderName : ''))))))),
395
- caseListData.length > 9 && (React.createElement("footer", { className: "toolbar-pagination", "data-tracking-id": "case-list-table-pagination" },
396
- 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() }))))));
392
+ React.createElement("footer", { className: "toolbar-pagination", "data-tracking-id": "case-list-table-pagination" },
393
+ 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() })))));
397
394
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/cases",
3
- "version": "2.1.56",
3
+ "version": "2.1.58",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -26,7 +26,7 @@
26
26
  "lib/**/*"
27
27
  ],
28
28
  "peerDependencies": {
29
- "@cee-eng/hydrajs": "4.17.3",
29
+ "@cee-eng/hydrajs": "4.17.7",
30
30
  "@patternfly/patternfly": "5.1.0",
31
31
  "@patternfly/react-core": "5.1.1",
32
32
  "@patternfly/react-table": "5.1.1",
@@ -39,15 +39,15 @@
39
39
  "solr-query-builder": "1.0.1"
40
40
  },
41
41
  "dependencies": {
42
- "@cee-eng/hydrajs": "4.17.3",
42
+ "@cee-eng/hydrajs": "4.17.7",
43
43
  "@patternfly/patternfly": "5.1.0",
44
44
  "@patternfly/react-core": "5.1.1",
45
45
  "@patternfly/react-table": "5.1.1",
46
- "@rh-support/components": "2.1.44",
47
- "@rh-support/react-context": "2.1.49",
46
+ "@rh-support/components": "2.1.46",
47
+ "@rh-support/react-context": "2.1.51",
48
48
  "@rh-support/types": "2.0.3",
49
- "@rh-support/user-permissions": "2.1.32",
50
- "@rh-support/utils": "2.1.22",
49
+ "@rh-support/user-permissions": "2.1.33",
50
+ "@rh-support/utils": "2.1.23",
51
51
  "localforage": "^1.10.0",
52
52
  "lodash": "^4.17.21",
53
53
  "pegjs": "^0.10.0",
@@ -96,5 +96,5 @@
96
96
  "defaults and supports es6-module",
97
97
  "maintained node versions"
98
98
  ],
99
- "gitHead": "375373ea584917e9ab9880c21b1fac72b4fe992e"
99
+ "gitHead": "73340df833a3a85d6982412acfc7f1f9297f6736"
100
100
  }