@envive-ai/react-hooks 0.3.32 → 0.3.33

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 (170) hide show
  1. package/dist/application/commerce-api.d.cts +1 -1
  2. package/dist/application/commerce-api.d.ts +1 -1
  3. package/dist/atoms/app/index.d.cts +9 -9
  4. package/dist/atoms/app/index.d.ts +9 -9
  5. package/dist/atoms/app/variant.d.cts +8 -8
  6. package/dist/atoms/app/variant.d.ts +8 -8
  7. package/dist/atoms/chat/chatState.d.cts +20 -20
  8. package/dist/atoms/chat/chatState.d.ts +20 -20
  9. package/dist/atoms/chat/form.d.cts +2 -2
  10. package/dist/atoms/chat/form.d.ts +2 -2
  11. package/dist/atoms/chat/index.cjs +1 -1
  12. package/dist/atoms/chat/index.d.cts +3 -3
  13. package/dist/atoms/chat/index.d.ts +2 -2
  14. package/dist/atoms/chat/index.js +1 -1
  15. package/dist/atoms/chat/lastMessage.d.ts +2 -2
  16. package/dist/atoms/chat/messageQueue.d.cts +6 -6
  17. package/dist/atoms/chat/messageQueue.d.ts +6 -6
  18. package/dist/atoms/chat/performanceMetrics.d.ts +6 -6
  19. package/dist/atoms/chat/renderedWidgetRefs.d.cts +2 -2
  20. package/dist/atoms/chat/renderedWidgetRefs.d.ts +3 -3
  21. package/dist/atoms/chat/replies.d.ts +3 -3
  22. package/dist/atoms/chat/suggestions.d.cts +2 -2
  23. package/dist/atoms/chat/suggestions.d.ts +2 -2
  24. package/dist/atoms/envive/enviveConfig.d.cts +13 -13
  25. package/dist/atoms/envive/enviveConfig.d.ts +13 -13
  26. package/dist/atoms/globalSearch/globalSearch.d.cts +5 -5
  27. package/dist/atoms/globalSearch/globalSearch.d.ts +6 -6
  28. package/dist/atoms/org/customerService.d.cts +6 -6
  29. package/dist/atoms/org/customerService.d.ts +6 -6
  30. package/dist/atoms/org/graphqlConfig.d.cts +5 -5
  31. package/dist/atoms/org/graphqlConfig.d.ts +5 -5
  32. package/dist/atoms/org/index.cjs +2 -3
  33. package/dist/atoms/org/index.d.cts +2 -2
  34. package/dist/atoms/org/index.d.ts +2 -2
  35. package/dist/atoms/org/index.js +3 -3
  36. package/dist/atoms/org/newOrgConfigAtom.d.cts +2 -2
  37. package/dist/atoms/org/newOrgConfigAtom.d.ts +2 -2
  38. package/dist/atoms/org/orgAnalyticsConfig.cjs +1 -3
  39. package/dist/atoms/org/orgAnalyticsConfig.d.cts +7 -8
  40. package/dist/atoms/org/orgAnalyticsConfig.d.ts +7 -8
  41. package/dist/atoms/org/orgAnalyticsConfig.js +2 -3
  42. package/dist/atoms/search/chatSearch.cjs +1 -1
  43. package/dist/atoms/search/chatSearch.d.cts +17 -17
  44. package/dist/atoms/search/chatSearch.d.ts +17 -17
  45. package/dist/atoms/search/chatSearch.js +1 -1
  46. package/dist/atoms/search/searchAPI.cjs +1 -1
  47. package/dist/atoms/search/searchAPI.d.cts +13 -13
  48. package/dist/atoms/search/searchAPI.d.ts +13 -13
  49. package/dist/atoms/search/searchAPI.js +1 -1
  50. package/dist/atoms/widget/chatPreviewLoading.d.ts +2 -2
  51. package/dist/contexts/amplitudeContext/amplitudeContext.cjs +1 -5
  52. package/dist/contexts/amplitudeContext/amplitudeContext.js +1 -5
  53. package/dist/contexts/enviveConfigContext/enviveConfigContext.cjs +18 -23
  54. package/dist/contexts/enviveConfigContext/enviveConfigContext.d.cts +10 -12
  55. package/dist/contexts/enviveConfigContext/enviveConfigContext.d.ts +10 -12
  56. package/dist/contexts/enviveConfigContext/enviveConfigContext.js +18 -23
  57. package/dist/contexts/enviveContext/enviveContext.cjs +41 -74
  58. package/dist/contexts/enviveContext/enviveContext.d.cts +15 -32
  59. package/dist/contexts/enviveContext/enviveContext.d.ts +15 -32
  60. package/dist/contexts/enviveContext/enviveContext.js +41 -74
  61. package/dist/contexts/enviveContext/index.d.cts +2 -2
  62. package/dist/contexts/enviveContext/index.d.ts +2 -2
  63. package/dist/contexts/enviveCssContext/enviveCssContext.cjs +31 -16
  64. package/dist/contexts/enviveCssContext/enviveCssContext.js +31 -16
  65. package/dist/contexts/graphqlContext/graphqlContext.cjs +3 -212
  66. package/dist/contexts/graphqlContext/graphqlContext.d.cts +2 -10
  67. package/dist/contexts/graphqlContext/graphqlContext.d.ts +2 -10
  68. package/dist/contexts/graphqlContext/graphqlContext.js +3 -212
  69. package/dist/contexts/graphqlContext/mockV3Config.cjs +31 -16
  70. package/dist/contexts/graphqlContext/mockV3Config.js +31 -16
  71. package/dist/contexts/hardcopyContext/hardcopyContext.cjs +9 -238
  72. package/dist/contexts/hardcopyContext/hardcopyContext.d.cts +5 -17
  73. package/dist/contexts/hardcopyContext/hardcopyContext.d.ts +5 -17
  74. package/dist/contexts/hardcopyContext/hardcopyContext.js +9 -238
  75. package/dist/contexts/hardcopyContext/index.d.cts +3 -2
  76. package/dist/contexts/hardcopyContext/index.d.ts +3 -2
  77. package/dist/contexts/newOrgConfigContext/newOrgConfigContext.cjs +10 -32
  78. package/dist/contexts/newOrgConfigContext/newOrgConfigContext.d.cts +2 -2
  79. package/dist/contexts/newOrgConfigContext/newOrgConfigContext.d.ts +2 -2
  80. package/dist/contexts/newOrgConfigContext/newOrgConfigContext.js +12 -34
  81. package/dist/contexts/pageContext/mapping.d.cts +1 -1
  82. package/dist/contexts/pageContext/mapping.d.ts +1 -1
  83. package/dist/contexts/pageContext/types.d.cts +1 -1
  84. package/dist/contexts/salesAgentContext/chatAPI.cjs +2 -2
  85. package/dist/contexts/salesAgentContext/chatAPI.js +2 -2
  86. package/dist/contexts/salesAgentContext/salesAgentService.cjs +1 -1
  87. package/dist/contexts/salesAgentContext/salesAgentService.js +1 -1
  88. package/dist/contexts/searchContext/searchContext.cjs +1 -1
  89. package/dist/contexts/searchContext/searchContext.js +1 -1
  90. package/dist/contexts/systemSettingsContext/systemSettingsContext.d.cts +2 -2
  91. package/dist/contexts/types.d.cts +2 -2
  92. package/dist/contexts/types.d.ts +2 -2
  93. package/dist/contexts/typesV3.cjs +31 -16
  94. package/dist/contexts/typesV3.d.cts +62 -31
  95. package/dist/contexts/typesV3.d.ts +62 -31
  96. package/dist/contexts/typesV3.js +31 -16
  97. package/dist/contexts/userIdentityContext/userIdentityContext.cjs +1 -1
  98. package/dist/contexts/userIdentityContext/userIdentityContext.d.cts +3 -3
  99. package/dist/contexts/userIdentityContext/userIdentityContext.d.ts +3 -3
  100. package/dist/contexts/userIdentityContext/userIdentityContext.js +1 -1
  101. package/dist/hooks/ChatToggle/useChatToggle.cjs +1 -1
  102. package/dist/hooks/ChatToggle/useChatToggle.js +1 -1
  103. package/dist/hooks/GrabAndScroll/useGrabAndScroll.d.cts +2 -2
  104. package/dist/hooks/GraphQLConfig/index.cjs +0 -1
  105. package/dist/hooks/GraphQLConfig/index.d.cts +2 -2
  106. package/dist/hooks/GraphQLConfig/index.d.ts +2 -2
  107. package/dist/hooks/GraphQLConfig/index.js +2 -2
  108. package/dist/hooks/GraphQLConfig/useGraphQLConfig.cjs +7 -66
  109. package/dist/hooks/GraphQLConfig/useGraphQLConfig.d.cts +5 -13
  110. package/dist/hooks/GraphQLConfig/useGraphQLConfig.d.ts +5 -13
  111. package/dist/hooks/GraphQLConfig/useGraphQLConfig.js +8 -66
  112. package/dist/hooks/Search/useSearch.cjs +3 -3
  113. package/dist/hooks/Search/useSearch.js +3 -3
  114. package/dist/services/amplitudeService/amplitudeService.cjs +4 -3
  115. package/dist/services/amplitudeService/amplitudeService.d.cts +1 -2
  116. package/dist/services/amplitudeService/amplitudeService.d.ts +1 -2
  117. package/dist/services/amplitudeService/amplitudeService.js +4 -3
  118. package/dist/services/enviveConfigService/enviveConfigService.cjs +25 -5
  119. package/dist/services/enviveConfigService/enviveConfigService.d.cts +24 -5
  120. package/dist/services/enviveConfigService/enviveConfigService.d.ts +24 -5
  121. package/dist/services/enviveConfigService/enviveConfigService.js +25 -6
  122. package/dist/services/enviveConfigService/fetchGraphQLConfig.cjs +181 -0
  123. package/dist/services/enviveConfigService/fetchGraphQLConfig.js +180 -0
  124. package/dist/services/enviveConfigService/index.cjs +2 -1
  125. package/dist/services/enviveConfigService/index.d.cts +2 -2
  126. package/dist/services/enviveConfigService/index.d.ts +2 -2
  127. package/dist/services/enviveConfigService/index.js +2 -2
  128. package/dist/services/hardcopyService/hardcopyService.cjs +232 -0
  129. package/dist/services/hardcopyService/hardcopyService.d.cts +39 -0
  130. package/dist/services/hardcopyService/hardcopyService.d.ts +39 -0
  131. package/dist/services/hardcopyService/hardcopyService.js +229 -0
  132. package/dist/services/hardcopyService/index.cjs +5 -0
  133. package/dist/services/hardcopyService/index.d.cts +2 -0
  134. package/dist/services/hardcopyService/index.d.ts +2 -0
  135. package/dist/services/hardcopyService/index.js +3 -0
  136. package/dist/services/userIdentityService/index.cjs +1 -0
  137. package/dist/services/userIdentityService/index.d.cts +2 -2
  138. package/dist/services/userIdentityService/index.d.ts +2 -2
  139. package/dist/services/userIdentityService/index.js +2 -2
  140. package/dist/services/userIdentityService/userIdentityService.cjs +13 -1
  141. package/dist/services/userIdentityService/userIdentityService.d.cts +12 -2
  142. package/dist/services/userIdentityService/userIdentityService.d.ts +12 -2
  143. package/dist/services/userIdentityService/userIdentityService.js +13 -2
  144. package/dist/types/enviveConfig.d.cts +1 -1
  145. package/dist/types/enviveConfig.d.ts +1 -1
  146. package/package.json +5 -1
  147. package/src/atoms/org/orgAnalyticsConfig.ts +0 -5
  148. package/src/contexts/amplitudeContext/amplitudeContext.tsx +0 -4
  149. package/src/contexts/enviveConfigContext/enviveConfigContext.tsx +37 -49
  150. package/src/contexts/enviveContext/enviveContext.tsx +72 -134
  151. package/src/contexts/enviveCssContext/enviveCssContext.tsx +32 -17
  152. package/src/contexts/graphqlContext/__tests__/graphqlContext.test.tsx +3 -36
  153. package/src/contexts/graphqlContext/graphqlContext.tsx +4 -304
  154. package/src/contexts/graphqlContext/mockV3Config.ts +30 -15
  155. package/src/contexts/hardcopyContext/hardcopyContext.tsx +12 -270
  156. package/src/contexts/newOrgConfigContext/__tests__/newOrgConfigContext.test.tsx +54 -478
  157. package/src/contexts/newOrgConfigContext/newOrgConfigContext.tsx +9 -26
  158. package/src/contexts/typesV3.ts +61 -30
  159. package/src/contexts/userIdentityContext/userIdentityContext.tsx +2 -2
  160. package/src/hooks/GraphQLConfig/useGraphQLConfig.ts +2 -62
  161. package/src/hooks/Search/__tests__/useSearch.test.tsx +2 -2
  162. package/src/services/amplitudeService/__tests__/amplitudeService.test.ts +3 -5
  163. package/src/services/amplitudeService/amplitudeService.ts +5 -3
  164. package/src/services/enviveConfigService/__tests__/fetchGraphQLConfig.test.ts +425 -0
  165. package/src/services/enviveConfigService/enviveConfigService.ts +41 -13
  166. package/src/services/enviveConfigService/fetchGraphQLConfig.ts +225 -0
  167. package/src/services/hardcopyService/__tests__/hardcopyService.test.ts +367 -0
  168. package/src/services/hardcopyService/hardcopyService.ts +271 -0
  169. package/src/services/hardcopyService/index.ts +1 -0
  170. package/src/services/userIdentityService/userIdentityService.ts +18 -0
@@ -1,8 +1,6 @@
1
- import React, { ReactNode, createContext, useContext, useMemo } from 'react';
2
- import { useAtomValue, useSetAtom } from 'jotai';
3
- import { useUIConfig } from 'src/hooks/GraphQLConfig/useGraphQLConfig';
4
- import { orgShortNameAtom } from 'src/atoms/envive/enviveConfig';
5
- import { newOrgConfigAtom } from 'src/atoms/org/newOrgConfigAtom'; // Import newOrgConfigAtom
1
+ import React, { ReactNode, createContext, useContext, useEffect, useMemo } from 'react';
2
+ import { useSetAtom } from 'jotai';
3
+ import { newOrgConfigAtom } from 'src/atoms/org/newOrgConfigAtom';
6
4
  import { GraphQlConfigValues } from '../graphqlContext';
7
5
 
8
6
  export type NewOrgConfigContextType = GraphQlConfigValues & {
@@ -14,32 +12,17 @@ const NewOrgConfigContext = createContext<NewOrgConfigContextType | undefined>(u
14
12
 
15
13
  interface NewOrgConfigProviderProps {
16
14
  children: ReactNode;
17
- overrideConfig?: GraphQlConfigValues;
15
+ config: GraphQlConfigValues;
18
16
  }
19
17
 
20
- export const NewOrgConfigProvider: React.FC<NewOrgConfigProviderProps> = ({
21
- children,
22
- overrideConfig,
23
- }) => {
24
- const orgShortName = useAtomValue(orgShortNameAtom);
18
+ export const NewOrgConfigProvider: React.FC<NewOrgConfigProviderProps> = ({ children, config }) => {
25
19
  const setNewOrgConfig = useSetAtom(newOrgConfigAtom);
26
20
 
27
- const { data: fetchedConfig, loading, error } = useUIConfig();
21
+ useEffect(() => {
22
+ setNewOrgConfig(config);
23
+ }, [config, setNewOrgConfig]);
28
24
 
29
- const contextValue = useMemo(() => {
30
- if (!orgShortName || loading) {
31
- return { ...fetchedConfig, loading: true, error: null };
32
- }
33
-
34
- if (error) {
35
- return { ...fetchedConfig, loading: false, error };
36
- }
37
-
38
- const activeConfig = overrideConfig || fetchedConfig;
39
-
40
- setNewOrgConfig(activeConfig);
41
- return { ...activeConfig, loading: false, error: null };
42
- }, [orgShortName, loading, error, setNewOrgConfig, fetchedConfig, overrideConfig]);
25
+ const contextValue = useMemo(() => ({ ...config, loading: false, error: null }), [config]);
43
26
 
44
27
  return (
45
28
  <NewOrgConfigContext.Provider value={contextValue}>{children}</NewOrgConfigContext.Provider>
@@ -11,27 +11,42 @@ import { CustomerServiceType } from '../types/customerService';
11
11
  import type { SearchConfig } from './types';
12
12
 
13
13
  export enum LetterSpacingCSSVar {
14
- Tight0 = 'envive-typography-letter-spacing-tight-0',
15
- Wide1 = 'envive-typography-letter-spacing-wide-1',
14
+ T1 = 'envive-typography-letter-spacing-t1',
15
+ T2 = 'envive-typography-letter-spacing-t2',
16
+ T3 = 'envive-typography-letter-spacing-t3',
17
+ H1 = 'envive-typography-letter-spacing-h1',
18
+ H2 = 'envive-typography-letter-spacing-h2',
19
+ H3 = 'envive-typography-letter-spacing-h3',
20
+ B1 = 'envive-typography-letter-spacing-b1',
21
+ B2 = 'envive-typography-letter-spacing-b2',
22
+ B3 = 'envive-typography-letter-spacing-b3',
23
+ B4 = 'envive-typography-letter-spacing-b4',
24
+ B5 = 'envive-typography-letter-spacing-b5',
25
+ L1 = 'envive-typography-letter-spacing-l1',
26
+ L2 = 'envive-typography-letter-spacing-l2',
16
27
  }
17
28
 
18
29
  export enum LineHeightCSSVar {
19
- LineHeight124 = 'envive-typography-line-height-124',
20
- LineHeight120 = 'envive-typography-line-height-120',
21
- LineHeight118 = 'envive-typography-line-height-118',
22
- LineHeight116 = 'envive-typography-line-height-116',
23
- LineHeight114 = 'envive-typography-line-height-114',
24
- LineHeight148 = 'envive-typography-line-height-148',
25
- LineHeight140 = 'envive-typography-line-height-140',
26
- LineHeight128 = 'envive-typography-line-height-128',
27
- LineHeight130 = 'envive-typography-line-height-130',
28
- LineHeight133 = 'envive-typography-line-height-133',
30
+ T1 = 'envive-typography-line-height-t1',
31
+ T2 = 'envive-typography-line-height-t2',
32
+ T3 = 'envive-typography-line-height-t3',
33
+ H1 = 'envive-typography-line-height-h1',
34
+ H2 = 'envive-typography-line-height-h2',
35
+ H3 = 'envive-typography-line-height-h3',
36
+ B1 = 'envive-typography-line-height-b1',
37
+ B2 = 'envive-typography-line-height-b2',
38
+ B3 = 'envive-typography-line-height-b3',
39
+ B4 = 'envive-typography-line-height-b4',
40
+ B5 = 'envive-typography-line-height-b5',
41
+ L1 = 'envive-typography-line-height-l1',
42
+ L2 = 'envive-typography-line-height-l2',
29
43
  }
30
44
 
31
45
  export enum FontWeightCSSVar {
32
- RG = 'envive-typography-font-weight-rg',
33
- MD = 'envive-typography-font-weight-md',
34
- SB = 'envive-typography-font-weight-sb',
46
+ Title = 'envive-typography-font-weight-title',
47
+ Header = 'envive-typography-font-weight-header',
48
+ BodyEmphasis = 'envive-typography-font-weight-body-emphasis',
49
+ BodyStandard = 'envive-typography-font-weight-body-standard',
35
50
  }
36
51
 
37
52
  export enum FontSizeCSSVar {
@@ -125,27 +140,42 @@ type Typography = {
125
140
  };
126
141
 
127
142
  fontWeight?: {
128
- rg: string;
129
- md: string;
130
- sb: string;
143
+ title: string;
144
+ header: string;
145
+ bodyEmphasis: string;
146
+ bodyStandard: string;
131
147
  };
132
148
 
133
149
  letterSpacing?: {
134
- '0': string;
135
- 'wide-1': string;
150
+ t1: string;
151
+ t2: string;
152
+ t3: string;
153
+ h1: string;
154
+ h2: string;
155
+ h3: string;
156
+ b1: string;
157
+ b2: string;
158
+ b3: string;
159
+ b4: string;
160
+ b5: string;
161
+ l1: string;
162
+ l2: string;
136
163
  };
137
164
 
138
165
  lineHeight?: {
139
- '124': number;
140
- '120': number;
141
- '118': number;
142
- '116': number;
143
- '114': number;
144
- '148': number;
145
- '140': number;
146
- '128': number;
147
- '130': number;
148
- '133': number;
166
+ t1: number;
167
+ t2: number;
168
+ t3: number;
169
+ h1: number;
170
+ h2: number;
171
+ h3: number;
172
+ b1: number;
173
+ b2: number;
174
+ b3: number;
175
+ b4: number;
176
+ b5: number;
177
+ l1: number;
178
+ l2: number;
149
179
  };
150
180
  };
151
181
 
@@ -342,6 +372,7 @@ interface ProductCardWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.Produc
342
372
  italicizeHeadline?: boolean;
343
373
  fallbackColor?: string;
344
374
  imageSrc?: string;
375
+ mode?: Mode;
345
376
  }
346
377
 
347
378
  interface FullPageSalesAgentWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.FullPageSalesAgentV3> {
@@ -11,7 +11,7 @@ import Logger from 'src/application/logging/logger';
11
11
  import { useLocalStorage } from 'src/contexts/localStorageContext';
12
12
  import { useSetAtom } from 'jotai';
13
13
  import { userIdAtom } from 'src/atoms/app';
14
- import { UserIdentityService } from 'src/services/userIdentityService';
14
+ import { IUserIdentityService } from 'src/services/userIdentityService';
15
15
 
16
16
  const logger = new Logger('userIdentityContext');
17
17
 
@@ -26,7 +26,7 @@ export interface UserIdentityContextType {
26
26
  const UserIdentityContext = createContext<UserIdentityContextType | undefined>(undefined);
27
27
 
28
28
  interface UserIdentityProviderProps {
29
- userIdService: UserIdentityService;
29
+ userIdService: IUserIdentityService;
30
30
  children: ReactNode;
31
31
  }
32
32
 
@@ -1,62 +1,2 @@
1
- import { useCallback, useEffect, useState } from 'react';
2
- import { GraphQlConfigValues, useGraphQLClient } from 'src/contexts/graphqlContext/graphqlContext';
3
-
4
- export const useColorsAndFrontendConfig = () => {
5
- const { getColorsAndFrontendConfig, isReady } = useGraphQLClient();
6
- const [data, setData] = useState<GraphQlConfigValues>({});
7
- const [loading, setLoading] = useState(false);
8
- const [error, setError] = useState<Error | null>(null);
9
-
10
- const fetchConfig = useCallback(async () => {
11
- if (!isReady) return;
12
-
13
- setLoading(true);
14
- setError(null);
15
-
16
- try {
17
- const result = await getColorsAndFrontendConfig();
18
- setData(result);
19
- } catch (err) {
20
- setError(err instanceof Error ? err : new Error('Unknown error'));
21
- } finally {
22
- setLoading(false);
23
- }
24
- }, [getColorsAndFrontendConfig, isReady]);
25
-
26
- useEffect(() => {
27
- fetchConfig();
28
- }, [fetchConfig]);
29
-
30
- return { data, loading, error, refetch: fetchConfig };
31
- };
32
-
33
- export const useUIConfig = () => {
34
- const { getConfig, isReady } = useGraphQLClient();
35
- const [data, setData] = useState<GraphQlConfigValues>({});
36
- const [loading, setLoading] = useState(false);
37
- const [error, setError] = useState<Error | null>(null);
38
-
39
- const fetchConfig = useCallback(async () => {
40
- if (!isReady) return;
41
- if (loading) return;
42
- if (Object.keys(data).length > 0) return;
43
-
44
- setLoading(true);
45
- setError(null);
46
-
47
- try {
48
- const result = await getConfig();
49
- setData(result);
50
- } catch (err) {
51
- setError(err instanceof Error ? err : new Error('Unknown error'));
52
- } finally {
53
- setLoading(false);
54
- }
55
- }, [data, getConfig, isReady, loading]);
56
-
57
- useEffect(() => {
58
- fetchConfig();
59
- }, [fetchConfig]);
60
-
61
- return { data, loading, error, refetch: fetchConfig };
62
- };
1
+ // Hooks moved to EnviveConfigService stub retained for test mock compatibility
2
+ export const useUIConfig = () => ({ data: {}, loading: false, error: null, refetch: () => {} });
@@ -413,7 +413,7 @@ const TestWrapper: React.FC<{
413
413
  <UserIdentityProvider userIdService={testUserIdService}>
414
414
  <FeatureFlagServiceProvider featureFlagService={testFeatureFlagService}>
415
415
  <AmplitudeProvider>
416
- <NewOrgConfigProvider>
416
+ <NewOrgConfigProvider config={{}}>
417
417
  <SearchProvider>
418
418
  <AtomManipulator
419
419
  searchData={searchData}
@@ -616,7 +616,7 @@ describe('useSearch', () => {
616
616
 
617
617
  await waitFor(() => {
618
618
  const filterButtonText = screen.getByTestId('filter-button-text').textContent;
619
- expect(filterButtonText).toContain('Filter & Sort (');
619
+ expect(filterButtonText).toContain('Filter & Sort');
620
620
  });
621
621
  });
622
622
  });
@@ -323,9 +323,7 @@ describe('AmplitudeService', () => {
323
323
  });
324
324
 
325
325
  it('should send to Google Analytics when alsoSendToGoogleAnalytics is true', async () => {
326
- const service = createService({
327
- orgGaConfig: { enabled: true },
328
- });
326
+ const service = createService();
329
327
 
330
328
  const dataLayer: any[] = [];
331
329
  Object.defineProperty(global, 'window', {
@@ -358,7 +356,7 @@ describe('AmplitudeService', () => {
358
356
  });
359
357
  });
360
358
 
361
- it('should not send to Google Analytics when orgGaConfig is not provided', async () => {
359
+ it('should not send to Google Analytics when alsoSendToGoogleAnalytics is false', async () => {
362
360
  const service = createService();
363
361
 
364
362
  const dataLayer: any[] = [];
@@ -373,7 +371,7 @@ describe('AmplitudeService', () => {
373
371
  await service.trackEvent({
374
372
  eventName: SpiffyMetricsEventName.ChatUserMessageInput,
375
373
  eventProps: { message: 'test' },
376
- alsoSendToGoogleAnalytics: true,
374
+ alsoSendToGoogleAnalytics: false,
377
375
  });
378
376
 
379
377
  expect(dataLayer).toHaveLength(0);
@@ -35,7 +35,6 @@ export interface AmplitudeServiceConfig {
35
35
  orgShortName: string;
36
36
  orgId: string;
37
37
  featureFlagService: FeatureFlagService;
38
- orgGaConfig?: unknown;
39
38
  show: boolean;
40
39
  enviveOn: boolean;
41
40
  enabledFeatures?: Record<string, boolean>;
@@ -412,13 +411,16 @@ export class AmplitudeService {
412
411
  },
413
412
  );
414
413
 
415
- if (AmplitudeService.isV3EnviveEvent(eventName) && this.config.orgGaConfig) {
414
+ // TODO: Pull gaEnabled from org config when available. Hardcoded to true for now.
415
+ const gaEnabled = true;
416
+
417
+ if (AmplitudeService.isV3EnviveEvent(eventName) && gaEnabled) {
416
418
  const mergedPropsForGA4 = {
417
419
  ...this.getDefaultTrackingProps(eventName),
418
420
  ...mappedEventProps,
419
421
  };
420
422
  projectToGA4(eventName as EnviveMetricsEventName, mergedPropsForGA4);
421
- } else if (alsoSendToGoogleAnalytics && this.config.orgGaConfig) {
423
+ } else if (alsoSendToGoogleAnalytics && gaEnabled) {
422
424
  logger.logDebug('GA tracking', decoratedEventName);
423
425
  if (typeof window !== 'undefined' && window.dataLayer) {
424
426
  // eslint-disable-next-line @typescript-eslint/no-explicit-any