@rh-support/react-context 2.5.325 → 2.5.328

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/lib/esm/GlobalContextWrapper.d.ts +3 -1
  2. package/lib/esm/GlobalContextWrapper.d.ts.map +1 -1
  3. package/lib/esm/GlobalContextWrapper.js +8 -26
  4. package/lib/esm/components/AccountSelector/AccountSelectorInternal.d.ts +2 -1
  5. package/lib/esm/components/AccountSelector/AccountSelectorInternal.d.ts.map +1 -1
  6. package/lib/esm/components/AccountSelector/AccountSelectorInternal.js +37 -93
  7. package/lib/esm/components/EmbeddedServiceChat/EmbeddedServiceChat.d.ts +0 -6
  8. package/lib/esm/components/EmbeddedServiceChat/EmbeddedServiceChat.d.ts.map +1 -1
  9. package/lib/esm/components/EmbeddedServiceChat/EmbeddedServiceChat.js +51 -17
  10. package/lib/esm/components/EmbeddedServiceChat/ExtraPreChatInfo.d.ts +12 -0
  11. package/lib/esm/components/EmbeddedServiceChat/ExtraPreChatInfo.d.ts.map +1 -0
  12. package/lib/esm/components/EmbeddedServiceChat/ExtraPreChatInfo.js +29 -0
  13. package/lib/esm/components/EmbeddedServiceChat/embeddedServiceChat.css +51 -1
  14. package/lib/esm/components/SharedModals/CSSUserModal.d.ts.map +1 -1
  15. package/lib/esm/components/SharedModals/CSSUserModal.js +1 -2
  16. package/lib/esm/components/SharedModals/CloseCaseModal.js +1 -1
  17. package/lib/esm/hooks/index.d.ts +1 -0
  18. package/lib/esm/hooks/index.d.ts.map +1 -1
  19. package/lib/esm/hooks/index.js +1 -0
  20. package/lib/esm/hooks/useCanEditCase.d.ts +1 -2
  21. package/lib/esm/hooks/useCanEditCase.d.ts.map +1 -1
  22. package/lib/esm/hooks/useCanEditCase.js +3 -20
  23. package/lib/esm/hooks/useChatConfig.d.ts +17 -9
  24. package/lib/esm/hooks/useChatConfig.d.ts.map +1 -1
  25. package/lib/esm/hooks/useChatConfig.js +43 -11
  26. package/lib/esm/hooks/useChatInit.d.ts +13 -9
  27. package/lib/esm/hooks/useChatInit.d.ts.map +1 -1
  28. package/lib/esm/hooks/useChatInit.js +119 -63
  29. package/lib/esm/hooks/usePreChatFormDetails.d.ts +12 -0
  30. package/lib/esm/hooks/usePreChatFormDetails.d.ts.map +1 -0
  31. package/lib/esm/hooks/usePreChatFormDetails.js +61 -0
  32. package/lib/esm/index.d.ts +0 -1
  33. package/lib/esm/index.d.ts.map +1 -1
  34. package/lib/esm/index.js +0 -2
  35. package/lib/esm/reducers/GlobalMetadataHelpers.d.ts.map +1 -1
  36. package/lib/esm/reducers/GlobalMetadataHelpers.js +6 -2
  37. package/lib/esm/reducers/GlobalMetadataReducer.d.ts +16 -51
  38. package/lib/esm/reducers/GlobalMetadataReducer.d.ts.map +1 -1
  39. package/lib/esm/reducers/GlobalMetadataReducer.js +89 -270
  40. package/package.json +7 -10
  41. package/lib/esm/context/CaseStatusContext.d.ts +0 -9
  42. package/lib/esm/context/CaseStatusContext.d.ts.map +0 -1
  43. package/lib/esm/context/CaseStatusContext.js +0 -5
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalMetadataReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/GlobalMetadataReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEpF,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,0BAA0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U,iCAAiC,EAAE,iBAAiB,gBAAgB,SAYhH,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,UAAU,iCAAiC,EAAE,WAAW,gBAAgB,CAAC,WAAW,CAAC,SAKjH,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,UAAU,iCAAiC,SAEnF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC7B,UAAU,iCAAiC,EAC3C,OAAO,OAAO,CAAC,eAAe,CAAC,kBAsBlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAC9B,UAAU,iCAAiC,EAC3C,aAAa,MAAM,EACnB,aAAa,WAAW,EAAE,EAC1B,YAAW,KAAK,GAAG,QAAgB,EACnC,gBAAc,EACd,uBAAuB,OAAO,kBAiCjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC1B,UAAU,iCAAiC,EAC3C,cAAc,OAAO,CAAC,aAAa,CAAC,SAMvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAU,UAAU,iCAAiC,EAAE,eAAe,MAAM,kBAiBhH,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAC/B,UAAU,iCAAiC,EAC3C,qBAAqB,6BAA6B,EAAE,SAMvD,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAU,UAAU,iCAAiC,kBAkBhG,CAAC;AAEF,eAAO,MAAM,sCAAsC,GAAI,UAAU,iCAAiC,EAAE,OAAO,OAAO,SAKjH,CAAC;AAEF,eAAO,MAAM,+BAA+B,GACxC,UAAU,iCAAiC,EAC3C,sBAAsB,OAAO,CAAC,QAAQ,CAAC,EACvC,sBAAsB,OAAO,SAMhC,CAAC"}
@@ -7,16 +7,14 @@ 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 { accounts, caseMetadata, customEmail, maintenance, publicApi, userPreferences } from '@cee-eng/hydrajs';
11
- import { getPhoneObj } from '@rh-support/components';
12
- import { beginCaseRecordTypesLoad, buildPicklistInput, CSS_ACCESS_RESTRICTION_ERROR_DETAIL, fetchCaseDetailsByCaseNumber, fetchLoggedInUserFromGraphQL, fetchPicklistValues, GET_ACCOUNT, GET_CASE_GROUP, GET_CASE_RECORD_TYPES, GET_PRODUCTS, getAccountQueryVariables, getApiResourceObject, getCaseRecordTypes, getTechnicalSupportRecordTypeId, handleGraphQLAccountResponse, handleGraphQLProductsResponse, isCssRestrictedAccess, mapGraphQLCaseContactToOwnerState, mapGraphQLCaseDetailsToCasePayload, mapGraphQLContactPhoneToCasePhoneFields, setCaseRecordTypes, severitySort, } from '@rh-support/utils';
10
+ import { accounts, caseMetadata, contacts, customEmail, maintenance, products, publicApi, userPreferences, } from '@cee-eng/hydrajs';
11
+ import { getApiResourceObject, handleEntitledProductResponse, handleProductSearchResponse, severitySort, } from '@rh-support/utils';
13
12
  import differenceBy from 'lodash/differenceBy';
14
13
  import filter from 'lodash/filter';
15
14
  import find from 'lodash/find';
16
15
  import isEmpty from 'lodash/isEmpty';
17
16
  import reduce from 'lodash/reduce';
18
17
  import sortBy from 'lodash/sortBy';
19
- import unescape from 'lodash/unescape';
20
18
  import unionBy from 'lodash/unionBy';
21
19
  import { getProcessedCaseTypes } from './GlobalMetadataHelpers';
22
20
  export var UserPreferencesKeys;
@@ -81,8 +79,7 @@ export var GlobalMetadataReducerConstants;
81
79
  GlobalMetadataReducerConstants["setReferrerUrl"] = "setReferrerUrl";
82
80
  GlobalMetadataReducerConstants["getNoclusteridreasons"] = "getNoclusteridreasons";
83
81
  GlobalMetadataReducerConstants["setIsSharingHostnameswithRHt"] = "setIsSharingHostnameswithRHt";
84
- GlobalMetadataReducerConstants["setTraditionalSupportSessionAgreed"] = "setTraditionalSupportSessionAgreed";
85
- GlobalMetadataReducerConstants["setCaseRecordTypes"] = "setCaseRecordTypes";
82
+ GlobalMetadataReducerConstants["setCaseListTraditionalSupportAgreed"] = "setCaseListTraditionalSupportAgreed";
86
83
  })(GlobalMetadataReducerConstants || (GlobalMetadataReducerConstants = {}));
87
84
  const initialProductResponse = {
88
85
  topProducts: [],
@@ -121,13 +118,11 @@ export const initialGlobalMetadataState = {
121
118
  },
122
119
  referrerUrl: null,
123
120
  caseNoClusterIdReasons: getApiResourceObject([]),
124
- caseRecordTypes: getApiResourceObject({}),
125
121
  caseListTraditionalSupportAgreed: false,
126
- troubleshootTraditionalSupportAgreed: false,
127
122
  };
128
123
  // Resucers
129
124
  export const globalMetadataReducer = (pState, action) => {
130
- var _a, _b;
125
+ var _a;
131
126
  switch (action.type) {
132
127
  case GlobalMetadataReducerConstants.setCaseTypes: {
133
128
  return Object.assign(Object.assign({}, pState), { allCaseTypes: action.payload.allCaseTypes });
@@ -220,11 +215,8 @@ export const globalMetadataReducer = (pState, action) => {
220
215
  case GlobalMetadataReducerConstants.getNoclusteridreasons: {
221
216
  return Object.assign(Object.assign({}, pState), { caseNoClusterIdReasons: action.payload.caseNoClusterIdReasons });
222
217
  }
223
- case GlobalMetadataReducerConstants.setTraditionalSupportSessionAgreed: {
224
- return Object.assign(Object.assign({}, pState), { caseListTraditionalSupportAgreed: (_a = action.payload) === null || _a === void 0 ? void 0 : _a.caseListTraditionalSupportAgreed, troubleshootTraditionalSupportAgreed: (_b = action.payload) === null || _b === void 0 ? void 0 : _b.troubleshootTraditionalSupportAgreed });
225
- }
226
- case GlobalMetadataReducerConstants.setCaseRecordTypes: {
227
- return Object.assign(Object.assign({}, pState), { caseRecordTypes: action.payload.caseRecordTypes });
218
+ case GlobalMetadataReducerConstants.setCaseListTraditionalSupportAgreed: {
219
+ return Object.assign(Object.assign({}, pState), { caseListTraditionalSupportAgreed: (_a = action.payload) === null || _a === void 0 ? void 0 : _a.caseListTraditionalSupportAgreed });
228
220
  }
229
221
  default: {
230
222
  return pState;
@@ -286,35 +278,7 @@ export const addEditbookmarks = (dispatch, allBookmarks, updatedAccounts, select
286
278
  payload: { bookmarkedGroupAccounts: getApiResourceObject(allBookmarksCopy, false) },
287
279
  });
288
280
  };
289
- export const fetchCaseTypes = (dispatch, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
290
- var _a;
291
- dispatch({
292
- type: GlobalMetadataReducerConstants.setCaseTypes,
293
- payload: { allCaseTypes: getApiResourceObject([], true) },
294
- });
295
- try {
296
- // Picklists require Technical Support record type ID - await it to avoid race on first load
297
- yield fetchCaseRecordTypes(dispatch, apolloClient);
298
- const picklists = yield fetchPicklistValues(apolloClient, buildPicklistInput(['Type']));
299
- const allCaseTypes = getProcessedCaseTypes((_a = picklists.Type) !== null && _a !== void 0 ? _a : []);
300
- dispatch({
301
- type: GlobalMetadataReducerConstants.setCaseTypes,
302
- payload: { allCaseTypes: getApiResourceObject(allCaseTypes) },
303
- });
304
- }
305
- catch (e) {
306
- dispatch({
307
- type: GlobalMetadataReducerConstants.setCaseTypes,
308
- payload: { allCaseTypes: getApiResourceObject([], false, true, e.message) },
309
- });
310
- }
311
- // const caseTypes = await caseMetadata.getTypes(isSecureSupport);
312
- // dispatch({
313
- // type: GlobalMetadataReducerConstants.setCaseTypes,
314
- // payload: { allCaseTypes: getApiResourceObject(getProcessedCaseTypes(caseTypes.items)) },
315
- // });
316
- });
317
- export const fetchCaseTypesHydra = (dispatch, isSecureSupport) => __awaiter(void 0, void 0, void 0, function* () {
281
+ export const fetchCaseTypes = (dispatch, isSecureSupport) => __awaiter(void 0, void 0, void 0, function* () {
318
282
  dispatch({
319
283
  type: GlobalMetadataReducerConstants.setCaseTypes,
320
284
  payload: { allCaseTypes: getApiResourceObject([], true) },
@@ -333,29 +297,7 @@ export const fetchCaseTypesHydra = (dispatch, isSecureSupport) => __awaiter(void
333
297
  });
334
298
  }
335
299
  });
336
- export const fetchCaseSeverities = (dispatch, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
337
- var _a;
338
- dispatch({
339
- type: GlobalMetadataReducerConstants.setCaseSeverities,
340
- payload: { allCaseSeverities: getApiResourceObject([], true) },
341
- });
342
- try {
343
- yield fetchCaseRecordTypes(dispatch, apolloClient);
344
- const picklists = yield fetchPicklistValues(apolloClient, buildPicklistInput(['Priority']));
345
- const allCaseSeverities = [...((_a = picklists.Priority) !== null && _a !== void 0 ? _a : [])].sort((sevA, sevB) => severitySort(sevA, sevB));
346
- dispatch({
347
- type: GlobalMetadataReducerConstants.setCaseSeverities,
348
- payload: { allCaseSeverities: getApiResourceObject(allCaseSeverities) },
349
- });
350
- }
351
- catch (e) {
352
- dispatch({
353
- type: GlobalMetadataReducerConstants.setCaseSeverities,
354
- payload: { allCaseSeverities: getApiResourceObject([], false, true, e.message) },
355
- });
356
- }
357
- });
358
- export const fetchCaseSeveritiesHydra = (dispatch, isSecureSupport) => __awaiter(void 0, void 0, void 0, function* () {
300
+ export const fetchCaseSeverities = (dispatch, isSecureSupport) => __awaiter(void 0, void 0, void 0, function* () {
359
301
  dispatch({
360
302
  type: GlobalMetadataReducerConstants.setCaseSeverities,
361
303
  payload: { allCaseSeverities: getApiResourceObject([], true) },
@@ -375,76 +317,16 @@ export const fetchCaseSeveritiesHydra = (dispatch, isSecureSupport) => __awaiter
375
317
  });
376
318
  }
377
319
  });
378
- /** Case reducer action types kept in sync with CaseReducerConstants in troubleshoot */
379
- const CaseDetailsFetchActions = {
380
- requestCaseDetails: 'requestCaseDetails',
381
- receivedCaseDetails: 'receivedCaseDetails',
382
- receivedCaseDetailsError: 'receivedCaseDetailsError',
383
- };
384
- export const fetchCaseDetails = (caseDispatch_1, apolloClient_1, caseNumber_1, setCaseAccountNumber_1, ...args_1) => __awaiter(void 0, [caseDispatch_1, apolloClient_1, caseNumber_1, setCaseAccountNumber_1, ...args_1], void 0, function* (caseDispatch, apolloClient, caseNumber, setCaseAccountNumber, includeSecureSupport = false) {
385
- var _a, _b;
386
- caseDispatch({
387
- type: CaseDetailsFetchActions.requestCaseDetails,
388
- payload: { caseDetails: { caseNumber } },
389
- });
390
- try {
391
- const graphqlCaseDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, includeSecureSupport);
392
- if (!graphqlCaseDetails) {
393
- const noAccessError = {
394
- status: 403,
395
- message: 'You do not have permission to view this case. Please contact your organization administrator if you believe you should have access.',
396
- detailMessage: 'You do not have permission to view this case. Please contact your organization administrator if you believe you should have access.',
397
- };
398
- throw noAccessError;
399
- }
400
- if (isCssRestrictedAccess(graphqlCaseDetails.accessRestriction)) {
401
- caseDispatch({
402
- type: CaseDetailsFetchActions.receivedCaseDetailsError,
403
- payload: {
404
- caseDetailsError: {
405
- status: 403,
406
- detailMessage: CSS_ACCESS_RESTRICTION_ERROR_DETAIL,
407
- message: CSS_ACCESS_RESTRICTION_ERROR_DETAIL,
408
- },
409
- },
410
- });
411
- return undefined;
412
- }
413
- const phoneToUse = graphqlCaseDetails.suppliedPhone || graphqlCaseDetails.contactPhone;
414
- const caseDetails = Object.assign(Object.assign({}, mapGraphQLCaseDetailsToCasePayload(graphqlCaseDetails)), mapGraphQLContactPhoneToCasePhoneFields(phoneToUse, (phone) => {
415
- const { countryCode, phoneLine } = getPhoneObj(phone);
416
- return { countryCode, phoneLine: phoneLine || '' };
417
- }));
418
- const ownerFromGraphQL = mapGraphQLCaseContactToOwnerState(graphqlCaseDetails);
419
- caseDispatch({
420
- type: CaseDetailsFetchActions.receivedCaseDetails,
421
- payload: Object.assign(Object.assign({ caseDetails }, (ownerFromGraphQL ? { selectedOwner: getApiResourceObject(ownerFromGraphQL) } : {})), { isClosed: (_a = graphqlCaseDetails.isClosed) !== null && _a !== void 0 ? _a : ((_b = graphqlCaseDetails.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'closed', caseNoOfCreatedCase: caseNumber }),
422
- });
423
- if (setCaseAccountNumber) {
424
- yield setCaseAccountNumber(caseDispatch, graphqlCaseDetails.accountNumberRef, false, {}, apolloClient);
425
- }
426
- return caseDetails;
427
- }
428
- catch (error) {
429
- caseDispatch({
430
- type: CaseDetailsFetchActions.receivedCaseDetailsError,
431
- payload: { caseDetailsError: error },
432
- });
433
- return undefined;
434
- }
435
- });
436
- export const fetchAllStatuses = (dispatch, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
437
- var _a;
320
+ export const fetchAllStatuses = (dispatch, isSecureSupport) => __awaiter(void 0, void 0, void 0, function* () {
438
321
  dispatch({
439
322
  type: GlobalMetadataReducerConstants.setCaseStatuses,
440
323
  payload: { allCaseStatuses: getApiResourceObject([], true) },
441
324
  });
442
325
  try {
443
- const picklists = yield fetchPicklistValues(apolloClient, buildPicklistInput(['Status']));
444
- const allCaseStatuses = (_a = picklists.Status) !== null && _a !== void 0 ? _a : [];
326
+ const caseStatusesResponse = yield caseMetadata.getStatuses(isSecureSupport);
445
327
  dispatch({
446
328
  type: GlobalMetadataReducerConstants.setCaseStatuses,
447
- payload: { allCaseStatuses: getApiResourceObject(allCaseStatuses) },
329
+ payload: { allCaseStatuses: getApiResourceObject(caseStatusesResponse.items) },
448
330
  });
449
331
  }
450
332
  catch (e) {
@@ -454,26 +336,25 @@ export const fetchAllStatuses = (dispatch, apolloClient) => __awaiter(void 0, vo
454
336
  });
455
337
  }
456
338
  });
457
- export const fetchProducts = (dispatch, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
458
- var _a, _b, _c, _d;
339
+ export const fetchProducts = (dispatch_1, ownerSSOUsername_1, ...args_1) => __awaiter(void 0, [dispatch_1, ownerSSOUsername_1, ...args_1], void 0, function* (dispatch, ownerSSOUsername, params = {}) {
459
340
  try {
460
341
  dispatch({
461
342
  type: GlobalMetadataReducerConstants.setAllProducts,
462
343
  payload: { allProducts: getApiResourceObject(initialProductResponse, true) },
463
344
  });
464
- const { data } = yield apolloClient.query({
465
- query: GET_PRODUCTS,
466
- variables: {
467
- where: {
468
- ParentProduct__c: { eq: null },
469
- IsActive: { eq: true },
470
- },
471
- first: 200,
472
- orderBy: { Name: { order: 'ASC' } },
473
- },
474
- });
475
- const edges = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportProduct2) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
476
- const allProducts = handleGraphQLProductsResponse(edges);
345
+ /**
346
+ * Here we are trying to fetch products from two sources (getSEProductsList and getProducts) and if even first source (getSEProductsList) fail to deliver product information
347
+ * we still need to use second source (getProducts) to parse and list product
348
+ */
349
+ const response = yield Promise.allSettled([
350
+ products.getSEProductsList(params),
351
+ products.getProducts(ownerSSOUsername),
352
+ ]);
353
+ const productsResultAll = response[0].status === 'fulfilled' ? response[0].value : [];
354
+ const productsResultEntitled = response[1].status === 'fulfilled' ? response[1].value : [];
355
+ const allProducts = productsResultAll.length
356
+ ? handleProductSearchResponse(productsResultAll, productsResultEntitled)
357
+ : handleEntitledProductResponse(productsResultEntitled);
477
358
  dispatch({
478
359
  type: GlobalMetadataReducerConstants.setAllProducts,
479
360
  payload: { allProducts: getApiResourceObject(allProducts) },
@@ -486,63 +367,18 @@ export const fetchProducts = (dispatch, apolloClient) => __awaiter(void 0, void
486
367
  });
487
368
  }
488
369
  });
489
- export const fetchCaseRecordTypes = (dispatch, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
490
- if (getTechnicalSupportRecordTypeId()) {
491
- const cached = getCaseRecordTypes();
492
- dispatch({
493
- type: GlobalMetadataReducerConstants.setCaseRecordTypes,
494
- payload: { caseRecordTypes: getApiResourceObject(cached) },
495
- });
496
- return cached;
497
- }
498
- return beginCaseRecordTypesLoad(() => __awaiter(void 0, void 0, void 0, function* () {
499
- var _a, _b, _c, _d;
500
- dispatch({
501
- type: GlobalMetadataReducerConstants.setCaseRecordTypes,
502
- payload: { caseRecordTypes: getApiResourceObject({}, true) },
503
- });
504
- try {
505
- const { data } = yield apolloClient.query({
506
- query: GET_CASE_RECORD_TYPES,
507
- });
508
- const recordTypeInfos = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.objectInfos) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.recordTypeInfos) !== null && _d !== void 0 ? _d : [];
509
- const caseRecordTypes = {};
510
- recordTypeInfos.forEach((info) => {
511
- caseRecordTypes[info.name] = info.recordTypeId;
512
- });
513
- setCaseRecordTypes(caseRecordTypes);
514
- dispatch({
515
- type: GlobalMetadataReducerConstants.setCaseRecordTypes,
516
- payload: { caseRecordTypes: getApiResourceObject(caseRecordTypes) },
517
- });
518
- return caseRecordTypes;
519
- }
520
- catch (e) {
521
- dispatch({
522
- type: GlobalMetadataReducerConstants.setCaseRecordTypes,
523
- payload: { caseRecordTypes: getApiResourceObject({}, false, true, e.message) },
524
- });
525
- throw e;
526
- }
527
- }));
528
- });
529
370
  export const setAllProducts = (dispatch, allProducts) => {
530
371
  dispatch({
531
372
  type: GlobalMetadataReducerConstants.setAllProducts,
532
373
  payload: { allProducts: getApiResourceObject(allProducts) },
533
374
  });
534
375
  };
535
- export const fetchLoggedInUsersAccount = (dispatch_1, token_1, ...args_1) => __awaiter(void 0, [dispatch_1, token_1, ...args_1], void 0, function* (dispatch, token, silent = false, apolloClient) {
536
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
376
+ export const fetchLoggedInUsersAccount = (dispatch_1, token_1, ...args_1) => __awaiter(void 0, [dispatch_1, token_1, ...args_1], void 0, function* (dispatch, token, silent = false) {
377
+ var _a;
537
378
  let accountNumber = token.account_number;
538
379
  if (silent) {
539
380
  try {
540
- const { data } = yield apolloClient.query({
541
- query: GET_ACCOUNT,
542
- variables: getAccountQueryVariables(accountNumber),
543
- });
544
- const edges = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportAccount) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
545
- const loggedInUsersAccount = handleGraphQLAccountResponse(edges);
381
+ const loggedInUsersAccount = yield accounts.getAccount(accountNumber);
546
382
  dispatch({
547
383
  type: GlobalMetadataReducerConstants.setLoggedInUsersAccount,
548
384
  payload: { loggedInUsersAccount: getApiResourceObject(loggedInUsersAccount) },
@@ -558,13 +394,7 @@ export const fetchLoggedInUsersAccount = (dispatch_1, token_1, ...args_1) => __a
558
394
  type: GlobalMetadataReducerConstants.setLoggedInUsersAccount,
559
395
  payload: { loggedInUsersAccount: getApiResourceObject({}, true) },
560
396
  });
561
- const { data } = yield apolloClient.query({
562
- query: GET_ACCOUNT,
563
- variables: getAccountQueryVariables(accountNumber),
564
- fetchPolicy: 'network-only',
565
- });
566
- const edges = (_h = (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _e === void 0 ? void 0 : _e.query) === null || _f === void 0 ? void 0 : _f.RedHatSupportAccount) === null || _g === void 0 ? void 0 : _g.edges) !== null && _h !== void 0 ? _h : [];
567
- const loggedInUsersAccount = handleGraphQLAccountResponse(edges);
397
+ const loggedInUsersAccount = yield accounts.getAccount(accountNumber);
568
398
  dispatch({
569
399
  type: GlobalMetadataReducerConstants.setLoggedInUsersAccount,
570
400
  payload: { loggedInUsersAccount: getApiResourceObject(loggedInUsersAccount) },
@@ -572,7 +402,7 @@ export const fetchLoggedInUsersAccount = (dispatch_1, token_1, ...args_1) => __a
572
402
  return loggedInUsersAccount;
573
403
  }
574
404
  catch (e) {
575
- (_j = window.sessionjs) === null || _j === void 0 ? void 0 : _j.reportProblem(e, {
405
+ (_a = window.sessionjs) === null || _a === void 0 ? void 0 : _a.reportProblem(e, {
576
406
  tags: {
577
407
  portal_app: window.app || 'Portal Case Management',
578
408
  error_effect: 'PCM - App wide error',
@@ -582,30 +412,27 @@ export const fetchLoggedInUsersAccount = (dispatch_1, token_1, ...args_1) => __a
582
412
  });
583
413
  dispatch({
584
414
  type: GlobalMetadataReducerConstants.setLoggedInUsersAccount,
585
- payload: {
586
- loggedInUsersAccount: getApiResourceObject({}, false, true, e === null || e === void 0 ? void 0 : e.message, e),
587
- },
415
+ payload: { loggedInUsersAccount: getApiResourceObject({}, false, true, e === null || e === void 0 ? void 0 : e.message, e) },
588
416
  });
589
417
  }
590
418
  }
591
419
  });
592
- export const fetchLoggedInUser = (dispatch, token, pcmConfig, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
420
+ export const fetchLoggedInUser = (dispatch, token, pcmConfig) => __awaiter(void 0, void 0, void 0, function* () {
593
421
  var _a;
594
422
  try {
595
423
  dispatch({
596
424
  type: GlobalMetadataReducerConstants.setLoggedInUser,
597
425
  payload: { loggedInUser: getApiResourceObject({}, true) },
598
426
  });
599
- if (!apolloClient) {
600
- throw new Error('Apollo client is required to fetch logged-in user via GraphQL');
601
- }
602
- const ssoUsername = (token === null || token === void 0 ? void 0 : token.preferred_username) || (token === null || token === void 0 ? void 0 : token.username) || (token === null || token === void 0 ? void 0 : token.RHAT_LOGIN) || (token === null || token === void 0 ? void 0 : token.REDHAT_LOGIN) || '';
603
- const loggedInUser = yield fetchLoggedInUserFromGraphQL(apolloClient, ssoUsername);
427
+ let loggedInUser = yield contacts.getCurrentContact({
428
+ userId: token.sub,
429
+ assumeEntitledIfSubscriptionServiceUnavailable: true,
430
+ });
604
431
  dispatch({
605
432
  type: GlobalMetadataReducerConstants.setLoggedInUser,
606
433
  payload: { loggedInUser: getApiResourceObject(loggedInUser) },
607
434
  });
608
- // TODO: migrate to GraphQL - bookmark accounts skipped for now
435
+ // Saving bookmarked accounts separately.
609
436
  const canViewBookmarkAccounts = loggedInUser.isInternal;
610
437
  if (canViewBookmarkAccounts) {
611
438
  fetchBookmarkedGroupAccounts(dispatch, loggedInUser.ssoUsername);
@@ -628,19 +455,16 @@ export const fetchLoggedInUser = (dispatch, token, pcmConfig, apolloClient) => _
628
455
  });
629
456
  }
630
457
  });
631
- export const fetchLanguageMetadata = (dispatch, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
632
- var _a;
633
- dispatch({
634
- type: GlobalMetadataReducerConstants.setCaseLanguages,
635
- payload: { caseLanguages: getApiResourceObject([], true) },
636
- });
458
+ export const fetchLanguageMetadata = (dispatch) => __awaiter(void 0, void 0, void 0, function* () {
637
459
  try {
638
- yield fetchCaseRecordTypes(dispatch, apolloClient);
639
- const picklists = yield fetchPicklistValues(apolloClient, buildPicklistInput(['Language']));
640
- const caseLanguages = (_a = picklists.Language) !== null && _a !== void 0 ? _a : [];
641
460
  dispatch({
642
461
  type: GlobalMetadataReducerConstants.setCaseLanguages,
643
- payload: { caseLanguages: getApiResourceObject(caseLanguages) },
462
+ payload: { caseLanguages: getApiResourceObject([], true) },
463
+ });
464
+ const response = yield caseMetadata.getLanguagesMetadata();
465
+ dispatch({
466
+ type: GlobalMetadataReducerConstants.setCaseLanguages,
467
+ payload: { caseLanguages: getApiResourceObject(response.items) },
644
468
  });
645
469
  }
646
470
  catch (e) {
@@ -688,59 +512,58 @@ export const fetchCaseSbrsMetadata = (dispatch) => __awaiter(void 0, void 0, voi
688
512
  });
689
513
  }
690
514
  });
691
- export const fetchCaseGroupsForSSO = (dispatch, apolloClient, accountId, defaultCaseGroupId, contactId, isOrgAdmin) => __awaiter(void 0, void 0, void 0, function* () {
692
- return fetchCaseGroupsByAccountId(dispatch, apolloClient, accountId, defaultCaseGroupId, contactId, isOrgAdmin);
693
- });
694
- export const fetchCaseGroupsForAccount = (dispatch, apolloClient, accountId, defaultCaseGroupId, contactId, isOrgAdmin) => __awaiter(void 0, void 0, void 0, function* () {
695
- return fetchCaseGroupsByAccountId(dispatch, apolloClient, accountId, defaultCaseGroupId, contactId, isOrgAdmin);
515
+ export const fetchCaseGroupsForSSO = (dispatch, ssoUserName) => __awaiter(void 0, void 0, void 0, function* () {
516
+ try {
517
+ dispatch({
518
+ type: GlobalMetadataReducerConstants.setCaseGroups,
519
+ payload: { caseGroups: getApiResourceObject([], true) },
520
+ });
521
+ const response = yield publicApi.caseGroups.getCaseGroupsForSSO(ssoUserName);
522
+ (response || []).sort((a, b) => a.name.localeCompare(b.name));
523
+ dispatch({
524
+ type: GlobalMetadataReducerConstants.setCaseGroups,
525
+ payload: { caseGroups: getApiResourceObject(response, false) },
526
+ });
527
+ return response;
528
+ }
529
+ catch (e) {
530
+ dispatch({
531
+ type: GlobalMetadataReducerConstants.setCaseGroups,
532
+ payload: { caseGroups: getApiResourceObject([], false, true, e.message) },
533
+ });
534
+ }
696
535
  });
697
- /** Shared implementation that fetches case groups via GraphQL by Salesforce Account ID. */
698
- const fetchCaseGroupsByAccountId = (dispatch, apolloClient, accountId, defaultCaseGroupId, contactId, isOrgAdmin) => __awaiter(void 0, void 0, void 0, function* () {
699
- var _a, _b, _c, _d, _e, _f;
536
+ export const fetchCaseGroupsForAccount = (dispatch, accountNumber) => __awaiter(void 0, void 0, void 0, function* () {
700
537
  try {
701
538
  dispatch({
702
539
  type: GlobalMetadataReducerConstants.setCaseGroups,
703
540
  payload: { caseGroups: getApiResourceObject([], true) },
704
541
  });
705
- const PAGE_SIZE = 200;
706
- let allEdges = [];
707
- let hasNextPage = true;
708
- let afterCursor;
709
- while (hasNextPage) {
710
- const { data } = yield apolloClient.query({
711
- query: GET_CASE_GROUP,
712
- variables: Object.assign({ where: { Account__c: { eq: accountId } }, first: PAGE_SIZE }, (afterCursor ? { after: afterCursor } : {})),
713
- fetchPolicy: 'network-only',
714
- });
715
- const connection = (_b = (_a = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportCaseGroup__c;
716
- const edges = (connection === null || connection === void 0 ? void 0 : connection.edges) || [];
717
- allEdges = allEdges.concat(edges);
718
- hasNextPage = (_d = (_c = connection === null || connection === void 0 ? void 0 : connection.pageInfo) === null || _c === void 0 ? void 0 : _c.hasNextPage) !== null && _d !== void 0 ? _d : false;
719
- afterCursor = (_f = (_e = connection === null || connection === void 0 ? void 0 : connection.pageInfo) === null || _e === void 0 ? void 0 : _e.endCursor) !== null && _f !== void 0 ? _f : undefined;
720
- }
721
- const filteredEdges = contactId && isOrgAdmin === false
722
- ? allEdges.filter(({ node }) => {
723
- var _a, _b;
724
- return (_b = (_a = node.CaseGroupMembers__r) === null || _a === void 0 ? void 0 : _a.edges) === null || _b === void 0 ? void 0 : _b.some(({ node: member }) => { var _a; return ((_a = member.Contact__c) === null || _a === void 0 ? void 0 : _a.value) === contactId; });
725
- })
726
- : allEdges;
727
- const groups = filteredEdges.map(({ node }) => {
728
- var _a;
729
- return ({
730
- groupNum: node.Id,
731
- name: unescape((_a = node.Name.displayValue) !== null && _a !== void 0 ? _a : node.Name.value),
732
- isPrivate: false,
733
- isDefault: defaultCaseGroupId ? node.Id === defaultCaseGroupId : false,
734
- defaultMembers: [],
735
- members: [],
736
- });
542
+ const response = yield publicApi.caseGroups.getCaseGroupsForInternalUser(accountNumber);
543
+ dispatch({
544
+ type: GlobalMetadataReducerConstants.setCaseGroups,
545
+ payload: { caseGroups: getApiResourceObject(response, false) },
737
546
  });
738
- groups.sort((a, b) => a.name.localeCompare(b.name));
547
+ return response;
548
+ }
549
+ catch (e) {
739
550
  dispatch({
740
551
  type: GlobalMetadataReducerConstants.setCaseGroups,
741
- payload: { caseGroups: getApiResourceObject(groups, false) },
552
+ payload: { caseGroups: getApiResourceObject([], false, true, e.message) },
553
+ });
554
+ }
555
+ });
556
+ export const fetchCaseGroups = (dispatch) => __awaiter(void 0, void 0, void 0, function* () {
557
+ try {
558
+ dispatch({
559
+ type: GlobalMetadataReducerConstants.setCaseGroups,
560
+ payload: { caseGroups: getApiResourceObject([], true) },
561
+ });
562
+ const response = yield publicApi.caseGroups.getCaseGroups();
563
+ dispatch({
564
+ type: GlobalMetadataReducerConstants.setCaseGroups,
565
+ payload: { caseGroups: getApiResourceObject(response, false) },
742
566
  });
743
- return groups;
744
567
  }
745
568
  catch (e) {
746
569
  dispatch({
@@ -1070,14 +893,10 @@ export const fetchNoClusterIdReasonsMetadata = (dispatch) => __awaiter(void 0, v
1070
893
  });
1071
894
  }
1072
895
  });
1073
- /** Sets both case-list and troubleshoot agreement flags together (agree once per session). */
1074
- export const setTraditionalSupportSessionAgreed = (dispatch, value) => {
896
+ export const updateCaseListTraditionalSupportAgreed = (dispatch, value) => {
1075
897
  dispatch({
1076
- type: GlobalMetadataReducerConstants.setTraditionalSupportSessionAgreed,
1077
- payload: {
1078
- caseListTraditionalSupportAgreed: value,
1079
- troubleshootTraditionalSupportAgreed: value,
1080
- },
898
+ type: GlobalMetadataReducerConstants.setCaseListTraditionalSupportAgreed,
899
+ payload: { caseListTraditionalSupportAgreed: value },
1081
900
  });
1082
901
  };
1083
902
  export const updateShareHostnameWithRHTState = (dispatch, loggedInUsersAccount, shareHostnameWithRHT) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/react-context",
3
- "version": "2.5.325",
3
+ "version": "2.5.328",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -22,8 +22,7 @@
22
22
  "lib/**/*"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@apollo/client": "^4.1.6",
26
- "@cee-eng/hydrajs": "^4.18.114",
25
+ "@cee-eng/hydrajs": "4.18.111",
27
26
  "@patternfly/react-core": "6.2.1",
28
27
  "@patternfly/react-icons": "6.2.1",
29
28
  "i18next": "^23.15.0",
@@ -34,13 +33,13 @@
34
33
  "react-test-renderer": "18.2.0"
35
34
  },
36
35
  "dependencies": {
37
- "@cee-eng/hydrajs": "^4.18.114",
36
+ "@cee-eng/hydrajs": "4.18.111",
38
37
  "@patternfly/react-core": "6.2.1",
39
38
  "@patternfly/react-icons": "6.2.1",
40
- "@rh-support/components": "2.5.230",
39
+ "@rh-support/components": "2.5.232",
41
40
  "@rh-support/types": "2.0.26",
42
- "@rh-support/user-permissions": "2.5.178",
43
- "@rh-support/utils": "2.5.157",
41
+ "@rh-support/user-permissions": "2.5.171",
42
+ "@rh-support/utils": "2.5.151",
44
43
  "i18next": "^23.15.0",
45
44
  "localforage": "^1.10.0",
46
45
  "lodash": "^4.17.21",
@@ -51,8 +50,6 @@
51
50
  "react-test-renderer": "18.2.0"
52
51
  },
53
52
  "devDependencies": {
54
- "@patternfly/react-styles": "^6.2.1",
55
- "@patternfly/react-tokens": "^6.2.1",
56
53
  "@testing-library/jest-dom": "^6.2.0",
57
54
  "@testing-library/react": "^14.1.2",
58
55
  "@testing-library/react-hooks": "^5.1.2",
@@ -92,5 +89,5 @@
92
89
  "defaults and supports es6-module",
93
90
  "maintained node versions"
94
91
  ],
95
- "gitHead": "78790ed8b35b8acbc7a3a4a182d212499a0cd181"
92
+ "gitHead": "326a322d647909215fa3f5b8758d70b70eb8641e"
96
93
  }
@@ -1,9 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- export declare const CaseStatusContext: React.Context<string>;
3
- interface CaseStatusProviderProps {
4
- caseStatus?: string;
5
- children: ReactNode;
6
- }
7
- export declare function CaseStatusProvider({ caseStatus, children }: CaseStatusProviderProps): React.JSX.Element;
8
- export {};
9
- //# sourceMappingURL=CaseStatusContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CaseStatusContext.d.ts","sourceRoot":"","sources":["../../../src/context/CaseStatusContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AAExD,eAAO,MAAM,iBAAiB,uBAA+C,CAAC;AAE9E,UAAU,uBAAuB;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,uBAAuB,qBAEnF"}
@@ -1,5 +0,0 @@
1
- import React, { createContext } from 'react';
2
- export const CaseStatusContext = createContext(undefined);
3
- export function CaseStatusProvider({ caseStatus, children }) {
4
- return React.createElement(CaseStatusContext.Provider, { value: caseStatus }, children);
5
- }