@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
@@ -8,7 +8,9 @@ declare global {
8
8
  MSInputMethodContext: any;
9
9
  portal: any;
10
10
  Raven: any;
11
- embeddedservice_bootstrap: any;
11
+ embedded_svc: any;
12
+ $Lightning: any;
13
+ liveAgentDeployment: any;
12
14
  }
13
15
  interface Document {
14
16
  documentMode: any;
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalContextWrapper.d.ts","sourceRoot":"","sources":["../../src/GlobalContextWrapper.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAenD,UAAU,MAAM;IACZ,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACzC;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,MAAM,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,yBAAyB,EAAE,GAAG,CAAC;KAClC;IAED,UAAU,QAAQ;QACd,YAAY,EAAE,GAAG,CAAC;KACrB;CACJ;AA0HD,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,sBAKjD,CAAC"}
1
+ {"version":3,"file":"GlobalContextWrapper.d.ts","sourceRoot":"","sources":["../../src/GlobalContextWrapper.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAcnD,UAAU,MAAM;IACZ,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACzC;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,MAAM,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,YAAY,EAAE,GAAG,CAAC;QAClB,UAAU,EAAE,GAAG,CAAC;QAChB,mBAAmB,EAAE,GAAG,CAAC;KAC5B;IAED,UAAU,QAAQ;QACd,YAAY,EAAE,GAAG,CAAC;KACrB;CACJ;AAmGD,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,sBAKjD,CAAC"}
@@ -7,19 +7,17 @@ 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 { useApolloClient } from '@apollo/client/react';
11
10
  import { accounts, Config } from '@cee-eng/hydrajs';
12
11
  import { LoginModal } from '@rh-support/components';
13
- import { fetchAndSetSalesforceToken, getApiResourceObject, SALESFORCE_SESSION_EXPIRED_EVENT, setSecuredSupport, setStrataHeaders, } from '@rh-support/utils';
12
+ import { getApiResourceObject, setSecuredSupport, setStrataHeaders } from '@rh-support/utils';
14
13
  import isEmpty from 'lodash/isEmpty';
15
14
  import React, { useEffect, useState } from 'react';
16
15
  import { GlobalMetadataContextProvider, GlobalMetadataDispatchContext } from './context/GlobalMetadataContext';
17
- import { fetchAccountManagers, fetchCaseRecordTypes, fetchLoggedInUser, fetchLoggedInUsersAccount, fetchManagedAccounts, fetchUserPreferences, GlobalMetadataReducerConstants, loadPCMConfig, setLoggedInUserJwtToken, } from './reducers/GlobalMetadataReducer';
16
+ import { fetchAccountManagers, fetchLoggedInUser, fetchLoggedInUsersAccount, fetchManagedAccounts, fetchUserPreferences, GlobalMetadataReducerConstants, loadPCMConfig, setLoggedInUserJwtToken, } from './reducers/GlobalMetadataReducer';
18
17
  function GlobalContextMetadataWrapper() {
19
18
  const [showReLoginModal, setShowReLoginModal] = useState(false);
20
19
  const [showSessionExpiredModal, setShowSessionExpiredModal] = useState(false);
21
20
  const dispatchToGlobalMetadataReducer = React.useContext(GlobalMetadataDispatchContext);
22
- const apolloClient = useApolloClient();
23
21
  // Configuring callbacks to show modals in case of auth logout or session expiry
24
22
  useEffect(() => {
25
23
  const init = () => __awaiter(this, void 0, void 0, function* () {
@@ -31,37 +29,21 @@ function GlobalContextMetadataWrapper() {
31
29
  setShowSessionExpiredModal(true);
32
30
  }
33
31
  }));
34
- session.on('AuthRefreshSuccess', () => {
35
- fetchAndSetSalesforceToken(window.sessionjs.getEncodedToken());
36
- });
37
32
  });
38
33
  init();
39
34
  }, []);
40
- // Show session-expired modal when Salesforce token refresh fails
41
- useEffect(() => {
42
- const handleSalesforceSessionExpired = () => {
43
- setShowSessionExpiredModal(true);
44
- };
45
- window.addEventListener(SALESFORCE_SESSION_EXPIRED_EVENT, handleSalesforceSessionExpired);
46
- return () => window.removeEventListener(SALESFORCE_SESSION_EXPIRED_EVENT, handleSalesforceSessionExpired);
47
- }, []);
48
- const loadGlobalMetadata = (loggedInUserJwtToken) => __awaiter(this, void 0, void 0, function* () {
49
- var _a, _b;
35
+ const loadGlobalMetadata = (loggedInUserJwtToken) => {
50
36
  setLoggedInUserJwtToken(dispatchToGlobalMetadataReducer, loggedInUserJwtToken);
51
- fetchCaseRecordTypes(dispatchToGlobalMetadataReducer, apolloClient);
52
37
  /**
53
38
  * Even GS4 users can use strata's normal user and account endpoints and thus fetching them before hand. This improves the load time by 4 seconds
54
39
  */
55
- loadPCMConfig(dispatchToGlobalMetadataReducer);
56
- const encodedJwt = (_b = (_a = window.sessionjs) === null || _a === void 0 ? void 0 : _a.getEncodedToken) === null || _b === void 0 ? void 0 : _b.call(_a);
57
- if (encodedJwt) {
58
- yield fetchAndSetSalesforceToken(encodedJwt);
59
- }
60
- fetchLoggedInUser(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, null, apolloClient);
40
+ loadPCMConfig(dispatchToGlobalMetadataReducer).then((pcmConfig) => {
41
+ fetchLoggedInUser(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, pcmConfig);
42
+ });
61
43
  fetchUserPreferences(dispatchToGlobalMetadataReducer, loggedInUserJwtToken);
62
44
  fetchManagedAccounts(dispatchToGlobalMetadataReducer, loggedInUserJwtToken);
63
45
  fetchAccountManagers(dispatchToGlobalMetadataReducer, loggedInUserJwtToken);
64
- fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, false, apolloClient).then((loggedInUserAccount) => {
46
+ fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken).then((loggedInUserAccount) => {
65
47
  setSecuredSupport(loggedInUserAccount === null || loggedInUserAccount === void 0 ? void 0 : loggedInUserAccount.secureSupport);
66
48
  if (loggedInUserAccount === null || loggedInUserAccount === void 0 ? void 0 : loggedInUserAccount.secureSupport) {
67
49
  Config.setUserConfig({ isLoggedInAccountGS4: true });
@@ -69,7 +51,7 @@ function GlobalContextMetadataWrapper() {
69
51
  element && element.classList.add('support-secured');
70
52
  }
71
53
  });
72
- });
54
+ };
73
55
  useEffect(() => {
74
56
  const loggedInUserJwtToken = window.sessionjs.getToken();
75
57
  const getAccountNumber = () => __awaiter(this, void 0, void 0, function* () {
@@ -1,4 +1,5 @@
1
1
  import { IAccount } from '@cee-eng/hydrajs/@types/models/account';
2
+ import { IAccountListParams } from '@cee-eng/hydrajs/@types/models/csp/account';
2
3
  import React from 'react';
3
4
  interface IProps {
4
5
  selectedAccounts?: IAccount[];
@@ -7,6 +8,7 @@ interface IProps {
7
8
  canBookmarkAccount?: boolean;
8
9
  suggestBookmarkAccounts?: boolean;
9
10
  onSelect?: (accounts: IAccount[]) => any;
11
+ accountListParams?: IAccountListParams;
10
12
  multiple?: boolean;
11
13
  isInValid?: boolean;
12
14
  restrictedOnSubscriptionAbuse?: boolean;
@@ -22,7 +24,6 @@ interface IProps {
22
24
  disabled?: boolean;
23
25
  maxResults?: number;
24
26
  delay?: number;
25
- showSelectionCountBadge?: boolean;
26
27
  }
27
28
  declare function AccountSelectorInternal(props: IProps): React.JSX.Element;
28
29
  declare namespace AccountSelectorInternal {
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSelectorInternal.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountSelector/AccountSelectorInternal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AA4BlE,OAAO,KAA4D,MAAM,OAAO,CAAC;AAKjF,UAAU,MAAM;IACZ,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC7B,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACrC;AAkCD,iBAAS,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBA8W7C;kBA9WQ,uBAAuB;;;AAiXhC,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"AccountSelectorInternal.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountSelector/AccountSelectorInternal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAqBhF,OAAO,KAA+C,MAAM,OAAO,CAAC;AAKpE,UAAU,MAAM;IACZ,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC7B,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC;IACzC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAkCD,iBAAS,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBA+S7C;kBA/SQ,uBAAuB;;;AAkThC,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -7,19 +7,18 @@ 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 { useApolloClient } from '@apollo/client/react';
11
- import { Badge, Button, Flex, FlexItem, MenuToggle, Select, SelectList, SelectOption, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
10
+ import { accounts } from '@cee-eng/hydrajs';
11
+ import { Button, Flex, FlexItem, MenuToggle, Select, SelectList, SelectOption, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
12
+ import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
12
13
  import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
13
- import { LoadingIndicator } from '@rh-support/components';
14
- import { buildSearchAccountsWhere, handleGraphQLSearchAccountsResponse, SEARCH_ACCOUNTS, } from '@rh-support/utils';
15
- import debounce from 'lodash/debounce';
14
+ import { LoadingIndicator, useFetch } from '@rh-support/components';
16
15
  import isEmpty from 'lodash/isEmpty';
17
16
  import isNull from 'lodash/isNull';
18
17
  import isUndefined from 'lodash/isUndefined';
19
18
  import uniqBy from 'lodash/uniqBy';
20
- import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
19
+ import React, { useEffect, useMemo, useRef, useState } from 'react';
21
20
  import { Trans, useTranslation } from 'react-i18next';
22
- import { sortAccountsByQuery } from '../../utils';
21
+ import { parseAccountSearchQuery, sortAccountsByQuery } from '../../utils';
23
22
  const defaultProps = {
24
23
  id: '',
25
24
  className: '',
@@ -51,28 +50,24 @@ const getDisplayName = (account) => {
51
50
  : '';
52
51
  };
53
52
  function AccountSelectorInternal(props) {
54
- const apolloClient = useApolloClient();
53
+ const { request, isFetching } = useFetch(accounts.getAccounts, { isAbortable: true });
55
54
  const [items, setItems] = useState([]);
56
55
  const [selectedItems, setSelectedItems] = useState([]);
57
56
  const [isOpen, setIsOpen] = useState(false);
58
57
  const [isQueryChanged, setIsQueryChanged] = useState(false);
59
- const [isFetching, setIsFetching] = useState(false);
60
58
  const [query, setQuery] = useState('');
61
59
  const [focusedItemIndex, setFocusedItemIndex] = useState(null);
62
- const [hasNextPage, setHasNextPage] = useState(false);
63
- const [endCursor, setEndCursor] = useState('');
64
- const [currentSearchQuery, setCurrentSearchQuery] = useState('');
65
60
  const textInputRef = useRef();
66
61
  const inputGroupRef = useRef();
67
- const abortControllerRef = useRef();
68
62
  const { t } = useTranslation();
69
63
  const bookmarkedAccountsDeduped = uniqBy(props.bookmarkedAccounts, (b) => b.accountNumber);
70
64
  const pageSize = 20;
65
+ const [resultSize, setResultSize] = useState(pageSize);
71
66
  const setQueryLabel = (selectedItems) => {
72
67
  const item = !isEmpty(selectedItems) && !props.multiple ? selectedItems[0] : {};
73
68
  setQuery(getDisplayName(item));
74
69
  };
75
- const itemsToRender = useMemo(() => (isEmpty(items) ? bookmarkedAccountsDeduped : items), [items, bookmarkedAccountsDeduped]);
70
+ const itemsToRender = useMemo(() => (isEmpty(items) ? bookmarkedAccountsDeduped : items.slice(0, props.paginate ? resultSize : items.length)), [items, bookmarkedAccountsDeduped, props.paginate, resultSize]);
76
71
  useEffect(() => {
77
72
  if (!props.multiple) {
78
73
  const selectedItem = (props.selectedAccounts || [])[0];
@@ -86,13 +81,11 @@ function AccountSelectorInternal(props) {
86
81
  setQueryLabel(selectedItems);
87
82
  // eslint-disable-next-line react-hooks/exhaustive-deps
88
83
  }, [selectedItems, props.multiple]);
89
- const onDisplayMoreClick = (e) => __awaiter(this, void 0, void 0, function* () {
84
+ const onDisplayMoreClick = (e) => {
90
85
  e.stopPropagation();
86
+ setResultSize((pre) => Math.min(pre + pageSize, items.length));
91
87
  setIsOpen(true);
92
- if (!hasNextPage || !endCursor || !currentSearchQuery)
93
- return;
94
- yield fetchAccounts(currentSearchQuery, endCursor);
95
- });
88
+ };
96
89
  const dropdownOptions = useMemo(() => {
97
90
  if (isFetching) {
98
91
  return (React.createElement("div", { key: "searching", className: "pf-v6-u-px-md pf-v6-u-py-sm" },
@@ -103,9 +96,13 @@ function AccountSelectorInternal(props) {
103
96
  React.createElement(Trans, null, "No results found")));
104
97
  }
105
98
  return [
106
- ...itemsToRender.map((item, index) => (React.createElement(SelectOption, { isFocused: focusedItemIndex === index, key: index, value: item, hasCheckbox: props.multiple, isSelected: selectedItems.some((account) => item.accountNumber === account.accountNumber) },
107
- React.createElement("span", null, getDisplayName(item))))),
108
- ...(hasNextPage
99
+ ...itemsToRender.map((item, index) => (React.createElement(SelectOption, { isFocused: focusedItemIndex === index, key: index, value: item, hasCheckbox: props.multiple, isSelected: selectedItems.some((account) => item.accountNumber === account.accountNumber) }, props.restrictedOnSubscriptionAbuse && item.subscriptionAbuse ? (React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
100
+ React.createElement(FlexItem, { className: "form-instructions form-invalid" }, getDisplayName(item)),
101
+ React.createElement(FlexItem, { className: "form-instructions form-invalid pf-v6-u-text-nowrap pf-v6-u-pr-sm" },
102
+ React.createElement(InfoCircleIcon, null),
103
+ " ",
104
+ React.createElement(Trans, null, "Subscription abuse")))) : (React.createElement("span", null, getDisplayName(item)))))),
105
+ ...(resultSize < items.length
109
106
  ? [
110
107
  React.createElement("div", { className: "pf-v6-c-divider", role: "separator", key: "separator" }),
111
108
  React.createElement(SelectOption, { key: 'diplay-more-option', onClick: onDisplayMoreClick, value: 'display-more' },
@@ -118,62 +115,18 @@ function AccountSelectorInternal(props) {
118
115
  },
119
116
  // eslint-disable-next-line react-hooks/exhaustive-deps
120
117
  [items, bookmarkedAccountsDeduped, isFetching, itemsToRender, isQueryChanged]);
121
- const fetchAccounts = useCallback((searchQuery, afterCursor) => __awaiter(this, void 0, void 0, function* () {
122
- if (isEmpty(searchQuery)) {
118
+ const fetchAccounts = (rawQuery) => __awaiter(this, void 0, void 0, function* () {
119
+ if (isEmpty(rawQuery === null || rawQuery === void 0 ? void 0 : rawQuery.trim())) {
123
120
  return;
124
121
  }
125
- if (abortControllerRef.current) {
126
- abortControllerRef.current.abort();
127
- }
128
- abortControllerRef.current = new AbortController();
129
- const isAppending = !!afterCursor;
130
- if (!isAppending) {
131
- setIsFetching(true);
132
- }
133
- try {
134
- const where = buildSearchAccountsWhere(searchQuery);
135
- const queryKey = isNaN(searchQuery) ? 'name' : 'accountNumber';
136
- const { data } = yield apolloClient.query({
137
- query: SEARCH_ACCOUNTS,
138
- variables: Object.assign(Object.assign({ where, first: pageSize }, (afterCursor ? { after: afterCursor } : {})), { orderBy: { Name: { order: 'ASC' } } }),
139
- context: { fetchOptions: { signal: abortControllerRef.current.signal } },
140
- });
141
- const result = handleGraphQLSearchAccountsResponse(data);
142
- const newItems = result.items.map((item) => ({
143
- accountNumber: item.accountNumber,
144
- name: item.name,
145
- }));
146
- const sortedItems = sortAccountsByQuery(newItems, searchQuery, queryKey);
147
- if (isAppending) {
148
- setItems((prev) => [...prev, ...sortedItems]);
149
- }
150
- else {
151
- setItems(sortedItems);
152
- }
153
- setHasNextPage(result.hasNextPage);
154
- setEndCursor(result.endCursor);
155
- setCurrentSearchQuery(searchQuery);
156
- }
157
- catch (err) {
158
- if ((err === null || err === void 0 ? void 0 : err.name) !== 'AbortError') {
159
- console.error('Failed to search accounts via GraphQL', err);
160
- setItems([]);
161
- setHasNextPage(false);
162
- setEndCursor('');
163
- }
164
- }
165
- finally {
166
- setIsFetching(false);
167
- }
168
- }), [apolloClient]);
169
- const fetchAccountsRef = useRef(fetchAccounts);
170
- fetchAccountsRef.current = fetchAccounts;
171
- const debouncedFetchAccounts = useMemo(() => { var _a; return debounce((value) => fetchAccountsRef.current(value), (_a = props.delay) !== null && _a !== void 0 ? _a : 300); }, [props.delay]);
172
- useEffect(() => {
173
- return () => {
174
- debouncedFetchAccounts.cancel();
175
- };
176
- }, [debouncedFetchAccounts]);
122
+ const { query: searchQuery, queryKey } = parseAccountSearchQuery(rawQuery);
123
+ const fields = ['accountNumber', 'accountId', 'name', 'subscriptionAbuse'].join(',');
124
+ const params = Object.assign({ fields, limit: 60, accountNumberNotNull: true }, (queryKey === 'accountNumber' ? { accountNumberLike: searchQuery } : { nameLike: searchQuery }));
125
+ const response = request && (yield request(params));
126
+ const options = response && response.items && response.items.length ? response.items : [];
127
+ const sortedOptions = sortAccountsByQuery(options, searchQuery, queryKey);
128
+ setItems(sortedOptions);
129
+ });
177
130
  const onOuterClick = () => {
178
131
  setQueryLabel(props.selectedAccounts || []);
179
132
  setSelectedItems(props.selectedAccounts || []);
@@ -209,19 +162,15 @@ function AccountSelectorInternal(props) {
209
162
  (_a = textInputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
210
163
  };
211
164
  const onFilter = (_event, value) => {
165
+ const trimmed = value.trim();
212
166
  setQuery(value);
213
- setIsQueryChanged(!isEmpty(value));
214
- setFocusedItemIndex(null);
215
- if (isEmpty(value)) {
216
- debouncedFetchAccounts.cancel();
217
- setItems([]);
218
- setIsFetching(false);
219
- setHasNextPage(false);
220
- setEndCursor('');
221
- return;
167
+ setIsQueryChanged(!isEmpty(trimmed));
168
+ if (!isEmpty(trimmed)) {
169
+ setIsOpen(true);
222
170
  }
223
- setIsFetching(true);
224
- debouncedFetchAccounts(value);
171
+ fetchAccounts(value);
172
+ setResultSize(pageSize);
173
+ setFocusedItemIndex(null);
225
174
  };
226
175
  const onToggleClick = () => {
227
176
  setIsOpen((pre) => !pre);
@@ -237,9 +186,6 @@ function AccountSelectorInternal(props) {
237
186
  setSelectedItems([]);
238
187
  setItems([]);
239
188
  setIsQueryChanged(false);
240
- setHasNextPage(false);
241
- setEndCursor('');
242
- setCurrentSearchQuery('');
243
189
  (_a = textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
244
190
  };
245
191
  const onSelect = (selection) => {
@@ -296,9 +242,7 @@ function AccountSelectorInternal(props) {
296
242
  const toggle = (toggleRef) => (React.createElement(MenuToggle, { innerRef: toggleRef, variant: "typeahead", onClick: onToggleClick, isExpanded: isOpen, isFullWidth: true, isDisabled: props.disabled },
297
243
  React.createElement(TextInputGroup, { isPlain: true, innerRef: inputGroupRef },
298
244
  React.createElement(TextInputGroupMain, { value: query, role: "combobox", onClick: onInputClick, onKeyDown: onInputKeyDown, onChange: onFilter, placeholder: t(props.placeholder || ''), isExpanded: isOpen, innerRef: textInputRef, "aria-label": `select${props.multiple ? ' multi' : ''} typeahead listbox`, "aria-controls": "account-selector-dropdown" }),
299
- React.createElement(TextInputGroupUtilities, null,
300
- props.showSelectionCountBadge && props.multiple && selectedItems.length > 0 && (React.createElement(Badge, { className: "advance-search-dropdown-toggle-badge pf-v6-u-mr-sm" }, t('{{count}} selected', { count: selectedItems.length }))),
301
- !isEmpty(query) && (React.createElement(Button, { icon: isFetching ? (React.createElement(LoadingIndicator, { show: true, size: "sm" })) : (React.createElement(TimesCircleIcon, { "aria-hidden": true })), variant: "plain", onClick: onClearSelection, isDisabled: isFetching, "aria-label": t('Clear') }))))));
245
+ React.createElement(TextInputGroupUtilities, null, !isEmpty(query) && (React.createElement(Button, { icon: isFetching ? (React.createElement(LoadingIndicator, { show: true, size: "sm" })) : (React.createElement(TimesCircleIcon, { "aria-hidden": true })), variant: "plain", onClick: onClearSelection, isDisabled: isFetching, "aria-label": t('Clear') }))))));
302
246
  return (React.createElement(Select, { "data-tracking-id": "account-selector-dropdown", isOpen: isOpen, onOpenChange: () => setIsOpen(false), id: props.id, toggle: toggle, popperProps: { direction: 'down', enableFlip: false }, onSelect: (_e, v) => onSelect(v), selected: selectedItems, isScrollable: true },
303
247
  React.createElement(SelectList, null, dropdownOptions)));
304
248
  }
@@ -1,10 +1,4 @@
1
1
  import './embeddedServiceChat.css';
2
2
  import { FC } from 'react';
3
- /**
4
- * Bootstraps Salesforce Enhanced Messaging.
5
- * The messaging widget (button + chat window) is rendered by the Salesforce
6
- * bootstrap script; this component only triggers initialisation and shows a
7
- * spinner while the script loads.
8
- */
9
3
  export declare const EmbeddedServiceChat: FC;
10
4
  //# sourceMappingURL=EmbeddedServiceChat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmbeddedServiceChat.d.ts","sourceRoot":"","sources":["../../../../src/components/EmbeddedServiceChat/EmbeddedServiceChat.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAGnC,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAcjC,CAAC"}
1
+ {"version":3,"file":"EmbeddedServiceChat.d.ts","sourceRoot":"","sources":["../../../../src/components/EmbeddedServiceChat/EmbeddedServiceChat.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAInC,OAAc,EAAE,EAAE,EAAoB,MAAM,OAAO,CAAC;AAMpD,eAAO,MAAM,mBAAmB,EAAE,EA6HjC,CAAC"}
@@ -1,21 +1,55 @@
1
1
  import './embeddedServiceChat.css';
2
- import { Spinner } from '@patternfly/react-core';
3
- import React from 'react';
4
- import { createPortal } from 'react-dom';
5
- import { useChatInit } from '../../hooks/useChatInit';
6
- /**
7
- * Bootstraps Salesforce Enhanced Messaging.
8
- * The messaging widget (button + chat window) is rendered by the Salesforce
9
- * bootstrap script; this component only triggers initialisation and shows a
10
- * spinner while the script loads.
11
- */
2
+ import { Button, ButtonVariant, Popover, PopoverPosition, Spinner } from '@patternfly/react-core';
3
+ import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
4
+ import React, { useRef, useState } from 'react';
5
+ import { Trans, useTranslation } from 'react-i18next';
6
+ import { FeatureAnnouncementKeys, NewFeaturePopoverAnnouncement, useChatInit } from '../..';
7
+ import { ChatSVGIcon } from './ChatSVGIcon';
12
8
  export const EmbeddedServiceChat = () => {
13
- const { loadingChat, chatServiceNotAvailable, hasBlockedByCookie } = useChatInit();
14
- if (chatServiceNotAvailable || hasBlockedByCookie)
9
+ var _a;
10
+ const componentRef = useRef(null);
11
+ const { loadingChat, isChatStarted, onStartChat, hasChatDomainsBlocked, hasBlockedByBrowser, chatServiceNotAvailable, hasBlockedByCookie, getChatFormDetails, } = useChatInit();
12
+ const [isBlockedErrorBoxVisible, setIsBlockedErrorBoxVisible] = useState(true);
13
+ const [chatClicked, setChatClicked] = useState(false);
14
+ const { t } = useTranslation();
15
+ const sessionId = (_a = getChatFormDetails().find((item) => item.label === 'SessionId')) === null || _a === void 0 ? void 0 : _a.value;
16
+ const shouldClose = () => {
17
+ setIsBlockedErrorBoxVisible(false);
18
+ };
19
+ const shouldOpen = () => {
20
+ setIsBlockedErrorBoxVisible(true);
21
+ };
22
+ const chatErrorMessagePopover = (param) => (React.createElement("div", { className: "chatButton chatError", id: "chat-blocked-popover-selector" },
23
+ React.createElement(Popover, { "aria-label": t('Cannot connect to chat support'), alertSeverityVariant: 'danger', position: PopoverPosition.top, hasAutoWidth: true, maxWidth: '420px', headerIcon: React.createElement(ExclamationCircleIcon, { className: "pf-v6-u-danger-color-100" }), headerComponent: "h1", headerContent: React.createElement(Trans, null, "Cannot connect to chat support"), bodyContent: param === 'cookie' ? (React.createElement("p", { className: "pf-v6-u-px-md" },
24
+ React.createElement(Trans, null,
25
+ "Accept functional cookies in your",
26
+ ' ',
27
+ React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: (e) => {
28
+ e.preventDefault();
29
+ document.querySelector('#teconsent a[role="link"]').click();
30
+ } }, "cookie preferences"),
31
+ ' ',
32
+ "to enable the Red Hat Chat Support, then refresh page."))) : (React.createElement("p", { className: "pf-v6-u-px-md" },
33
+ React.createElement(Trans, null, "There are multiple problems that can cause this error."),
34
+ React.createElement("br", null),
35
+ React.createElement("a", { href: `https://access.redhat.com/articles/313583#${hasBlockedByBrowser
36
+ ? 'troubleshoot_browser'
37
+ : hasChatDomainsBlocked
38
+ ? 'troubleshoot_network'
39
+ : ''}`, target: "_blank", rel: "noreferrer noopener" },
40
+ React.createElement(Trans, null, "See a list of possible causes.")))), isVisible: isBlockedErrorBoxVisible, shouldClose: shouldClose, shouldOpen: shouldOpen },
41
+ React.createElement(Button, { variant: ButtonVariant.link, className: "pf-v6-u-m-0 pf-v6-u-p-0" },
42
+ React.createElement(ChatSVGIcon, null)))));
43
+ if (chatServiceNotAvailable)
15
44
  return React.createElement(React.Fragment, null);
16
- if (loadingChat) {
17
- return createPortal(React.createElement("div", { className: "chatButton" },
18
- React.createElement(Spinner, { diameter: "28px", className: "pf-v6-u-m-xs" })), document.body);
19
- }
20
- return React.createElement(React.Fragment, null);
45
+ return loadingChat ? (React.createElement("div", { className: "chatButton" },
46
+ React.createElement(Spinner, { diameter: "28px", className: "pf-v6-u-m-xs" }))) : hasBlockedByCookie && chatClicked && document.querySelector('#teconsent a[role="link"]') !== null ? (chatErrorMessagePopover('cookie')) : (hasBlockedByBrowser || hasChatDomainsBlocked || !sessionId) && chatClicked ? (chatErrorMessagePopover()) : !isChatStarted ? (React.createElement("div", { className: "chatButton", onClick: () => {
47
+ setChatClicked(true);
48
+ if (sessionId) {
49
+ onStartChat();
50
+ }
51
+ }, "data-tracking-id": "embedded-service-chat", ref: componentRef, id: "chat-bot-wrapper" },
52
+ React.createElement(ChatSVGIcon, null),
53
+ React.createElement(NewFeaturePopoverAnnouncement, { "aria-label": t('Support now has a chatbot (beta). Try it if you need help with a case.'), featureName: FeatureAnnouncementKeys.CHAT_BOT, sectionRef: componentRef, bodyContent: React.createElement("div", null,
54
+ React.createElement(Trans, null, "Support now has a chatbot (beta). Try it if you need help with a case.")), triggerRef: () => document.getElementById('chat-bot-wrapper') }))) : (React.createElement(React.Fragment, null));
21
55
  };
@@ -0,0 +1,12 @@
1
+ export declare const extraPreChatInfo: {
2
+ entityFieldMaps: {
3
+ doCreate: boolean;
4
+ doFind: boolean;
5
+ fieldName: string;
6
+ isExactMatch: boolean;
7
+ label: string;
8
+ }[];
9
+ entityName: string;
10
+ saveToTranscript: string;
11
+ }[];
12
+ //# sourceMappingURL=ExtraPreChatInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExtraPreChatInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/EmbeddedServiceChat/ExtraPreChatInfo.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;GA6B5B,CAAC"}
@@ -0,0 +1,29 @@
1
+ export const extraPreChatInfo = [
2
+ {
3
+ entityFieldMaps: [
4
+ {
5
+ doCreate: false,
6
+ doFind: true,
7
+ fieldName: 'SSO_Username__c',
8
+ isExactMatch: true,
9
+ label: 'SSO Name',
10
+ },
11
+ {
12
+ doCreate: false,
13
+ doFind: true,
14
+ fieldName: 'ContactSessionId__c',
15
+ isExactMatch: false,
16
+ label: 'SessionId',
17
+ },
18
+ {
19
+ doCreate: false,
20
+ doFind: true,
21
+ fieldName: 'Account',
22
+ isExactMatch: true,
23
+ label: 'account',
24
+ },
25
+ ],
26
+ entityName: '',
27
+ saveToTranscript: 'SSO_Username__c',
28
+ },
29
+ ];
@@ -3,7 +3,6 @@
3
3
  position: fixed;
4
4
  right: 4rem;
5
5
  bottom: 1rem;
6
- z-index: var(--pf-t--global--z-index--2xl, 200);
7
6
  width: 48px;
8
7
  height: 48px;
9
8
  padding: var(--global-spacer-sm, 8px);
@@ -19,3 +18,54 @@
19
18
  body:has(.pf-chatbot) .chatButton {
20
19
  display: none !important;
21
20
  }
21
+
22
+ .chatError {
23
+ opacity: 0.7;
24
+ }
25
+
26
+ /* Requested by CCM team */
27
+ .agent .chat-content[CLWCP-lwcchatpack_lwcchatpack] {
28
+ text-align: left;
29
+ }
30
+
31
+ /* Adding fowling CSS as requested by CCM team (Sudhir Panda) */
32
+ .embeddedServiceLiveAgentStateChat .chatSessionStartTime {
33
+ font-family: 'Red Hat Text', 'RedHatText', 'Overpass', Overpass, Arial, sans-serif;
34
+ }
35
+ .embeddedServiceLiveAgentStateChatItem.chatMessage {
36
+ font-family: 'Red Hat Text', 'RedHatText', 'Overpass', Overpass, Arial, sans-serif;
37
+ }
38
+ .embeddedServiceLiveAgentStateChatItem.chatMessage button {
39
+ font-family: 'Red Hat Text', 'RedHatText', 'Overpass', Overpass, Arial, sans-serif;
40
+ }
41
+ .embeddedServiceHelpButton .helpButton .uiButton {
42
+ background-color: #005290;
43
+ font-family: 'Arial', sans-serif;
44
+ }
45
+ .embeddedServiceHelpButton .helpButton .uiButton:focus {
46
+ outline: 1px solid #005290;
47
+ }
48
+ .agent .chat-content[CLWCP-lwcchatpack_lwcchatpack] {
49
+ text-align: left;
50
+ font-family: 'Red Hat Text', 'RedHatText', 'Overpass', Overpass, Arial, sans-serif;
51
+ }
52
+ /* red hat chat icon */
53
+ .embeddedServiceLiveAgentStateChatAvatar.isLightningOutContext .agentIconColor0 {
54
+ background-image: url('https://access.redhat.com/chrome_themes/nimbus/img/red-hat-customer-portal.svg');
55
+ background-repeat: no-repeat;
56
+ background-size: 420% !important;
57
+ font-size: 0 !important;
58
+ background-color: #fff !important;
59
+ }
60
+
61
+ /* user chat bubble */
62
+ .chasitor.chat-content[CLWCP-lwcchatpack_lwcchatpack] {
63
+ background: #fff !important;
64
+ color: #0066cc !important;
65
+ border: #0066cc 1px solid !important;
66
+ }
67
+
68
+ /* timeout text background color */
69
+ .embeddedServiceSidebar .headerAnnouncement p {
70
+ background-color: #151515;
71
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"CSSUserModal.d.ts","sourceRoot":"","sources":["../../../../src/components/SharedModals/CSSUserModal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD,UAAU,MAAM;IACZ,oCAAoC,EAAE,MAAM,IAAI,CAAC;IACjD,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,oCAAoC,EAAE,OAAO,EAAE,EAAE,MAAM,qBAiGrF"}
1
+ {"version":3,"file":"CSSUserModal.d.ts","sourceRoot":"","sources":["../../../../src/components/SharedModals/CSSUserModal.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD,UAAU,MAAM;IACZ,oCAAoC,EAAE,MAAM,IAAI,CAAC;IACjD,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,oCAAoC,EAAE,OAAO,EAAE,EAAE,MAAM,qBAiGrF"}
@@ -1,5 +1,4 @@
1
1
  import { Button, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
2
- import { getCssPortalUrl } from '@rh-support/utils';
3
2
  import React, { useContext, useState } from 'react';
4
3
  import { GlobalMetadataStateContext } from '../../context/GlobalMetadataContext';
5
4
  export function CSSUserModal({ onConfirmTraditionalSupportAgreement, display }) {
@@ -9,7 +8,7 @@ export function CSSUserModal({ onConfirmTraditionalSupportAgreement, display })
9
8
  const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
10
9
  const isConfirmedStateSideSupport = (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasConfirmedStatesideSupport;
11
10
  const handleCSSclick = () => {
12
- window.open(getCssPortalUrl(), '_self');
11
+ window.open('https://govsupport.redhat.com/css/s/', '_self');
13
12
  };
14
13
  const handleTraditionalSupportClick = () => {
15
14
  setShowTraditionalSupportAgreement(true);
@@ -34,7 +34,7 @@ export function CloseCaseModal(props) {
34
34
  resolutionsWithDescription.includes(option.value) ? setShowTextArea(true) : setShowTextArea(false);
35
35
  };
36
36
  const getCommentBody = () => {
37
- return `<p><strong>Reason for closing case:</strong></p><p>${selectedResolution}${resolutionsWithDescription.includes(selectedResolution) ? `. ${resolutionDescription}` : ''}</p>`;
37
+ return `**Reason for closing case:** \n${selectedResolution}${resolutionsWithDescription.includes(selectedResolution) ? `. ${resolutionDescription}` : ''}`;
38
38
  };
39
39
  // To check for required fields
40
40
  const checkForRequiredFields = () => {
@@ -6,5 +6,6 @@ export * from './useCanEditCase';
6
6
  export * from './useCanCreateCase';
7
7
  export * from './useUserPreferences';
8
8
  export * from './useChatInit';
9
+ export * from './usePreChatFormDetails';
9
10
  export * from './useChatConfig';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC"}
@@ -6,4 +6,5 @@ export * from './useCanEditCase';
6
6
  export * from './useCanCreateCase';
7
7
  export * from './useUserPreferences';
8
8
  export * from './useChatInit';
9
+ export * from './usePreChatFormDetails';
9
10
  export * from './useChatConfig';
@@ -1,6 +1,5 @@
1
- export declare function useCanEditCase(caseStatusOverride?: string): {
1
+ export declare function useCanEditCase(): {
2
2
  alert: () => boolean;
3
3
  isCaseNotEditable: boolean;
4
- isCaseArchived: boolean;
5
4
  };
6
5
  //# sourceMappingURL=useCanEditCase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCanEditCase.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCanEditCase.ts"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,CAAC,kBAAkB,CAAC,EAAE,MAAM;;;;EA0BzD"}
1
+ {"version":3,"file":"useCanEditCase.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCanEditCase.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc;;;EAO7B"}