@rh-support/troubleshoot 0.2.118 → 0.2.119

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":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,eA0XtD"}
1
+ {"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,eA6YtD"}
@@ -30,6 +30,7 @@ import { fetchEdmundAbbottRules } from '../../reducers/RulesReducer';
30
30
  import { fetchTopContent } from '../../reducers/TopContentReducer';
31
31
  import { isClusterIdEnabledForProduct } from '../../utils/caseOpenshiftClusterIdUtils';
32
32
  import RouteUtils from '../../utils/routeUtils';
33
+ import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
33
34
  export function GlobalTroubleshootEffects(props) {
34
35
  const [initDefaultSection, setInitDefaultSection] = useState(false);
35
36
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
@@ -64,6 +65,7 @@ export function GlobalTroubleshootEffects(props) {
64
65
  // top content state
65
66
  const { topContentState: { topContentPayload }, } = useContext(TCStateContext);
66
67
  const tcDispatch = useContext(TCDispatchContext);
68
+ const { attachmentState: { caseFiles: { selectedLocalFiles }, }, } = useContext(AttachmentStateContext);
67
69
  const { resetCaseCreateState } = useResetCaseCreate();
68
70
  const prevSectionsToHide = usePrevious(sectionsToHide);
69
71
  const hasSummaryInUrl = !isEmpty(urlQueryParams.summary);
@@ -238,8 +240,7 @@ export function GlobalTroubleshootEffects(props) {
238
240
  return;
239
241
  }
240
242
  const getEARules = () => __awaiter(this, void 0, void 0, function* () {
241
- const rulesBody = {
242
- caseType: {
243
+ const rulesBody = Object.assign({ caseType: {
243
244
  product,
244
245
  version,
245
246
  summary,
@@ -247,11 +248,15 @@ export function GlobalTroubleshootEffects(props) {
247
248
  type: caseType,
248
249
  language,
249
250
  accountNumber,
250
- },
251
- accountType: { isSecure: selectedAccountDetails.data.securedEnvironment || false },
252
- userType: { canAddAttachments },
253
- fields: ['title', 'cta', 'description', 'rule_type', 'rule_sub_type', 'rule_id'],
254
- };
251
+ session_id: activeSessionId,
252
+ }, accountType: { isSecure: selectedAccountDetails.data.securedEnvironment || false }, userType: { canAddAttachments }, fields: ['title', 'cta', 'description', 'rule_type', 'rule_sub_type', 'rule_id'] }, ((selectedLocalFiles === null || selectedLocalFiles === void 0 ? void 0 : selectedLocalFiles.length) && {
253
+ attachment: selectedLocalFiles.map((file) => ({
254
+ uuid: file.attachmentId,
255
+ fileName: file.name,
256
+ size: file.size,
257
+ fileType: file.type,
258
+ })),
259
+ }));
255
260
  yield fetchEdmundAbbottRules(rulesDispatch, rulesBody);
256
261
  });
257
262
  getEARules();
@@ -269,6 +274,9 @@ export function GlobalTroubleshootEffects(props) {
269
274
  loggedInUserRights.data,
270
275
  rulesDispatch,
271
276
  selectedAccountDetails.data.securedEnvironment,
277
+ selectedLocalFiles,
278
+ selectedLocalFiles === null || selectedLocalFiles === void 0 ? void 0 : selectedLocalFiles.length,
279
+ activeSessionId,
272
280
  ], 2000);
273
281
  /**
274
282
  * If a component refetches the global account details , we want to make sure that the same changes are reflected in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "0.2.118",
3
+ "version": "0.2.119",
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.12.5",
29
+ "@cee-eng/hydrajs": "4.12.6",
30
30
  "@cee-eng/ui-toolkit": "1.1.6",
31
31
  "@patternfly/patternfly": "4.185.1",
32
32
  "@patternfly/pfe-accordion": "1.12.3",
@@ -63,7 +63,7 @@
63
63
  "react-virtualized": "^9.21.2"
64
64
  },
65
65
  "dependencies": {
66
- "@cee-eng/hydrajs": "4.12.5",
66
+ "@cee-eng/hydrajs": "4.12.6",
67
67
  "@cee-eng/ui-toolkit": "1.1.6",
68
68
  "@patternfly/patternfly": "4.185.1",
69
69
  "@patternfly/pfe-accordion": "1.12.3",
@@ -73,12 +73,12 @@
73
73
  "@patternfly/react-core": "4.202.16",
74
74
  "@progress/kendo-drawing": "^1.6.0",
75
75
  "@progress/kendo-react-pdf": "^3.12.0",
76
- "@rh-support/api": "0.3.23",
77
- "@rh-support/components": "1.1.71",
78
- "@rh-support/react-context": "0.2.76",
76
+ "@rh-support/api": "0.3.24",
77
+ "@rh-support/components": "1.1.72",
78
+ "@rh-support/react-context": "0.2.77",
79
79
  "@rh-support/types": "0.2.0",
80
- "@rh-support/user-permissions": "0.2.60",
81
- "@rh-support/utils": "0.2.45",
80
+ "@rh-support/user-permissions": "0.2.61",
81
+ "@rh-support/utils": "0.2.46",
82
82
  "@types/react-redux": "^7.1.12",
83
83
  "@types/redux": "^3.6.0",
84
84
  "@webcomponents/webcomponentsjs": "^2.2.10",
@@ -143,5 +143,5 @@
143
143
  "not ie <= 11",
144
144
  "not op_mini all"
145
145
  ],
146
- "gitHead": "ac2b3cfea14d51c3c89d3c4c86e343ea742e269f"
146
+ "gitHead": "1d8c25adcf1bc30eb2560bf210f96994b63237e3"
147
147
  }