@rh-support/cases 1.0.34 → 1.0.35-beta.31

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":"NewCaseButton.d.ts","sourceRoot":"","sources":["../../../../src/components/case/NewCaseButton.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;CACzD;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,eAmB1C"}
1
+ {"version":3,"file":"NewCaseButton.d.ts","sourceRoot":"","sources":["../../../../src/components/case/NewCaseButton.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;CACzD;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,eAyB1C"}
@@ -2,8 +2,9 @@ import { Button, ButtonVariant } from '@patternfly/react-core';
2
2
  import { useCanCreateCase } from '@rh-support/react-context';
3
3
  import { getStringifiedParams } from '@rh-support/utils';
4
4
  import React from 'react';
5
- import { Trans } from 'react-i18next';
5
+ import { Trans, useTranslation } from 'react-i18next';
6
6
  export function NewCaseButton(props) {
7
+ const { t } = useTranslation();
7
8
  const canCreateCase = useCanCreateCase();
8
9
  const onNew = () => {
9
10
  if (canCreateCase.alert()) {
@@ -15,6 +16,6 @@ export function NewCaseButton(props) {
15
16
  }
16
17
  };
17
18
  return (React.createElement(React.Fragment, null,
18
- React.createElement(Button, { variant: ButtonVariant.tertiary, onClick: onNew, "data-tracking-id": "open-new-case" },
19
- React.createElement(Trans, null, "Open a case"))));
19
+ React.createElement(Button, { variant: ButtonVariant.tertiary, onClick: onNew, "data-tracking-id": "get-support-new-case", "aria-label": t('Get support') },
20
+ React.createElement(Trans, null, "Get support"))));
20
21
  }
@@ -37,7 +37,7 @@ const isStatusFilterWithSFDCSupportedValues = ({ case_status = [] }) => {
37
37
  return statusLength !== 2 || (statusLength === 2 && !case_status.includes(CaseStatus.Closed));
38
38
  };
39
39
  // SFDC on most fields including case_status only accept one value
40
- // on case type field if 'closed' is selected then, we can have 2 filters selected
40
+ // on support type field if 'closed' is selected then, we can have 2 filters selected
41
41
  // because closed in SFDC passes as a seperate param
42
42
  // if closed not selected then only one filter can be selected
43
43
  const isStatusFilterWithSFDCSupported = (filterKey, filterValue) => {
@@ -24,5 +24,5 @@ export function TypeFilter(props) {
24
24
  const titleId = 'case-list-type-filter';
25
25
  return (React.createElement("div", { className: "pf-c-select" },
26
26
  React.createElement("label", { htmlFor: titleId }, t(filterNamesMap[SolrKeys.type])),
27
- React.createElement(Select, { id: titleId, variant: SelectVariant.checkbox, "aria-label": t('Select a case type'), onToggle: toggleIsOpen, onSelect: onFilterChangeMultipleSelect, selections: filterInfo[SolrKeys.type], isOpen: isOpen, placeholderText: getDropdownBtnPlaceholder(t('Select a case type'), filterInfo[SolrKeys.type], ' ', props.allCaseTypes.length, t('All selected')), isCheckboxSelectionBadgeHidden: true, "aria-labelledby": titleId, "data-tracking-id": "type-filter", hasPlaceholderStyle: true }, props.allCaseTypes.map((filterValue) => (React.createElement(SelectOption, { key: filterValue, value: filterValue }))))));
27
+ React.createElement(Select, { id: titleId, variant: SelectVariant.checkbox, "aria-label": t('Select a support type'), onToggle: toggleIsOpen, onSelect: onFilterChangeMultipleSelect, selections: filterInfo[SolrKeys.type], isOpen: isOpen, placeholderText: getDropdownBtnPlaceholder(t('Select a support type'), filterInfo[SolrKeys.type], ' ', props.allCaseTypes.length, t('All selected')), isCheckboxSelectionBadgeHidden: true, "aria-labelledby": titleId, "data-tracking-id": "type-filter", hasPlaceholderStyle: true }, props.allCaseTypes.map((filterValue) => (React.createElement(SelectOption, { key: filterValue, value: filterValue }))))));
28
28
  }
@@ -155,7 +155,7 @@ export function CaseListTable(props) {
155
155
  {
156
156
  id: CaseListColumnIds.type,
157
157
  cellWidth: 10,
158
- title: t('Case type'),
158
+ title: t('Support type'),
159
159
  sortable: true,
160
160
  accessor: (data) => data.case_type,
161
161
  show: isColumnVisible(CaseListColumnIds.type),
@@ -53,7 +53,7 @@ const csvHeadersSFDC = [
53
53
  { label: 'Modified date', key: SFDCKeys.lastPublicUpdateDate, transform: formatDateTime },
54
54
  { label: 'Uri', key: SFDCKeys.uri },
55
55
  { label: 'Alternate case ID', key: SFDCKeys.alternateId },
56
- { label: 'Case type', key: SFDCKeys.caseType },
56
+ { label: 'Support type', key: SFDCKeys.caseType },
57
57
  { label: 'Closed date', key: SFDCKeys.caseClosedDate, transform: formatDateTime },
58
58
  ];
59
59
  const groupHeaderSOLR = { label: 'Group', key: SolrKeys.groupName };
@@ -70,6 +70,6 @@ export const caseTableColumSortNamesMap = {
70
70
  [CaseListColumnIds.accountNumber]: 'Account number',
71
71
  [CaseListColumnIds.group]: 'Groups',
72
72
  [CaseListColumnIds.alternateCaseId]: 'Alternate case Id',
73
- [CaseListColumnIds.type]: 'Case type',
73
+ [CaseListColumnIds.type]: 'Support type',
74
74
  [CaseListColumnIds.caseClosedDate]: 'Close date',
75
75
  };
@@ -17,7 +17,7 @@ export const filterNamesMap = {
17
17
  [SolrKeys.caseNumber]: 'Case number',
18
18
  [SolrKeys.createdBySsoUsername]: 'Created by me',
19
19
  [SolrKeys.caseContactSSO]: 'Owned by me',
20
- [SolrKeys.type]: 'Case type',
20
+ [SolrKeys.type]: 'Support type',
21
21
  usernameFilterTitle: 'Username',
22
22
  };
23
23
  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": "1.0.34",
3
+ "version": "1.0.35-beta.31",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -51,11 +51,11 @@
51
51
  "@patternfly/pfe-collapse": "1.12.3",
52
52
  "@patternfly/react-core": "4.264.0",
53
53
  "@patternfly/react-table": "4.111.33",
54
- "@rh-support/components": "1.2.17",
55
- "@rh-support/react-context": "1.0.24",
54
+ "@rh-support/components": "1.2.18-beta.31",
55
+ "@rh-support/react-context": "1.0.25-beta.31",
56
56
  "@rh-support/types": "0.2.0",
57
- "@rh-support/user-permissions": "1.0.11",
58
- "@rh-support/utils": "1.0.9",
57
+ "@rh-support/user-permissions": "1.0.11-beta.31",
58
+ "@rh-support/utils": "1.0.9-beta.31",
59
59
  "i18next": "^19.0.1",
60
60
  "localforage": "^1.7.3",
61
61
  "lodash": "^4.17.21",
@@ -99,5 +99,5 @@
99
99
  "not ie <= 11",
100
100
  "not op_mini all"
101
101
  ],
102
- "gitHead": "74b949fdce9ed569a0c7143e5272feb240aad73c"
102
+ "gitHead": "146329bae87bc1b15be8fc467f60a8fbbd6f2529"
103
103
  }